fern-api 5.92.0 → 5.92.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +8 -8
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -97,7 +97,7 @@ ${r.indent}`:""}}`):a._push("}"),a.item=r,a.unvisit(t);return}if(l=n[i],(c==null
|
|
|
97
97
|
${p.indent}`:""}${k0a(l)}:${a.indent?" ":""}`;return s=!1,u=!0,a.objectItem=void 0,d}};this.item=p}_push(t){let r=(this.objectItem?this.objectItem.write():"")+t;return this.prePush&&r.length&&(this.buffer+=this.prePush,this.prePush=void 0),this.buffer+=r,this.buffer.length>=this.bufferSize?(this.pushCalled=!this.push(this.buffer),this.buffer="",this.bufferLength=0,!1):!0}async _read(t){if(this.readState===IU.Consumed)return;if(this.readState!==IU.Inactive){this.readState=IU.ReadMore;return}this.readState=IU.Reading,this.pushCalled=!1;let r;for(;!this.pushCalled&&this.item!==this.root&&this.buffer!==void 0;)r=this.item.read(t),r&&await r;if(this.buffer!==void 0){if(this.item===this.root){this.buffer.length&&this.push(this.buffer),this.push(null),this.readState=IU.Consumed,this.cleanup();return}if(this.readState===IU.ReadMore){this.readState=IU.Inactive,await this._read(t);return}this.readState=IU.Inactive}}cleanup(){this.readState=IU.Consumed,this.buffer=void 0,this.visited=void 0,this.item=void 0,this.root=void 0,this.prePush=void 0}destroy(t){var r;return t&&this.emit("error",t),(r=super.destroy)===null||r===void 0||r.call(this),this.cleanup(),this}}});async function kx(e,t,{pretty:r=!1}={}){let n=new K7e(t,void 0,r?4:void 0);return new Promise((i,o)=>{n.pipe((0,N0a.createWriteStream)(e)).on("error",o).on("finish",i)})}var N0a,X2i=h(()=>{"use strict";N0a=require("fs");Y2i()});var $0a=b((Ley,eue)=>{"use strict";var eA=require("fs"),car=require("os"),uw=require("path"),j0a=require("crypto"),lY={fs:eA.constants,os:car.constants},Q0a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",U0a=/XXXXXX/,thf=3,V0a=(lY.O_CREAT||lY.fs.O_CREAT)|(lY.O_EXCL||lY.fs.O_EXCL)|(lY.O_RDWR||lY.fs.O_RDWR),rhf=car.platform()==="win32",nhf=lY.EBADF||lY.os.errno.EBADF,ihf=lY.ENOENT||lY.os.errno.ENOENT,_0a=448,q0a=384,ohf="exit",J7e=[],G0a=eA.rmdirSync.bind(eA),W0a=!1;function shf(e,t){return eA.rm(e,{recursive:!0},t)}function H0a(e){return eA.rmSync(e,{recursive:!0})}function tNi(e,t){let r=Y7e(e,t),n=r[0],i=r[1];ghf(n,function(o,s){if(o)return i(o);let a=s.tries;(function c(){try{let u=J0a(s);eA.stat(u,function(l){if(!l)return a-- >0?c():i(new Error("Could not get a unique tmp filename, max tries reached "+u));i(null,u)})}catch(u){i(u)}})()})}function rNi(e){let t=Y7e(e),r=t[0],n=Ahf(r),i=n.tries;do{let o=J0a(n);try{eA.statSync(o)}catch{return o}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function ahf(e,t){let r=Y7e(e,t),n=r[0],i=r[1];tNi(n,function(s,a){if(s)return i(s);eA.open(a,V0a,n.mode||q0a,function(u,l){if(u)return i(u);if(n.discardDescriptor)return eA.close(l,function(d){return i(d,a,void 0,$2i(a,-1,n,!1))});{let p=n.discardDescriptor||n.detachDescriptor;i(null,a,l,$2i(a,p?-1:l,n,!1))}})})}function chf(e){let t=Y7e(e),r=t[0],n=r.discardDescriptor||r.detachDescriptor,i=rNi(r),o=eA.openSync(i,V0a,r.mode||q0a);return r.discardDescriptor&&(eA.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:$2i(i,n?-1:o,r,!0)}}function uhf(e,t){let r=Y7e(e,t),n=r[0],i=r[1];tNi(n,function(s,a){if(s)return i(s);eA.mkdir(a,n.mode||_0a,function(u){if(u)return i(u);i(null,a,K0a(a,n,!1))})})}function lhf(e){let t=Y7e(e),r=t[0],n=rNi(r);return eA.mkdirSync(n,r.mode||_0a),{name:n,removeCallback:K0a(n,r,!0)}}function phf(e,t){let r=function(n){if(n&&!eNi(n))return t(n);t()};0<=e[0]?eA.close(e[0],function(){eA.unlink(e[1],r)}):eA.unlink(e[1],r)}function fhf(e){let t=null;try{0<=e[0]&&eA.closeSync(e[0])}catch(r){if(!yhf(r)&&!eNi(r))throw r}finally{try{eA.unlinkSync(e[1])}catch(r){eNi(r)||(t=r)}}if(t!==null)throw t}function $2i(e,t,r,n){let i=aar(fhf,[t,e],n),o=aar(phf,[t,e],n,i);return r.keep||J7e.unshift(i),n?i:o}function K0a(e,t,r){let n=t.unsafeCleanup?shf:eA.rmdir.bind(eA),i=t.unsafeCleanup?H0a:G0a,o=aar(i,e,r),s=aar(n,e,r,o);return t.keep||J7e.unshift(o),r?o:s}function aar(e,t,r,n){let i=!1;return function o(s){if(!i){let a=n||o,c=J7e.indexOf(a);return c>=0&&J7e.splice(c,1),i=!0,r||e===G0a||e===H0a?e(t):e(t,s||function(){})}}}function dhf(){if(W0a)for(;J7e.length;)try{J7e[0]()}catch{}}function z0a(e){let t=[],r=null;try{r=j0a.randomBytes(e)}catch{r=j0a.pseudoRandomBytes(e)}for(let n=0;n<e;n++)t.push(Q0a[r[n]%Q0a.length]);return t.join("")}function Ij(e){return typeof e>"u"}function Y7e(e,t){if(typeof e=="function")return[{},e];if(Ij(e))return[{},t];let r={};for(let n of Object.getOwnPropertyNames(e))r[n]=e[n];return[r,t]}function mhf(e,t,r){let n=uw.isAbsolute(e)?e:uw.join(t,e);eA.stat(n,function(i){i?eA.realpath(uw.dirname(n),function(o,s){if(o)return r(o);r(null,uw.join(s,uw.basename(n)))}):eA.realpath(n,r)})}function hhf(e,t){let r=uw.isAbsolute(e)?e:uw.join(t,e);try{return eA.statSync(r),eA.realpathSync(r)}catch{let i=eA.realpathSync(uw.dirname(r));return uw.join(i,uw.basename(r))}}function J0a(e){let t=e.tmpdir;if(!Ij(e.name))return uw.join(t,e.dir,e.name);if(!Ij(e.template))return uw.join(t,e.dir,e.template).replace(U0a,z0a(6));let r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",z0a(12),e.postfix?"-"+e.postfix:""].join("");return uw.join(t,e.dir,r)}function Z2i(e,t){if(typeof t!="string")throw new Error(`${e} option must be a string, got "${typeof t}".`);if(t.includes(".."))throw new Error("Relative value not allowed");return t}function Y0a(e){if(!Ij(e.name)){let t=e.name;if(uw.isAbsolute(t))throw new Error(`name option must not contain an absolute path, found "${t}".`);let r=uw.basename(t);if(r===".."||r==="."||r!==t)throw new Error(`name option must not contain a path, found "${t}".`)}if(!Ij(e.template)){if(typeof e.template!="string")throw new Error(`template option must be a string, got "${typeof e.template}".`);if(!e.template.match(U0a))throw new Error(`Invalid template, found "${e.template}".`)}if(!Ij(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=Ij(e.name)?e.tries||thf:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.prefix=Ij(e.prefix)?"":Z2i("prefix",e.prefix),e.postfix=Ij(e.postfix)?"":Z2i("postfix",e.postfix),e.template=Ij(e.template)?void 0:Z2i("template",e.template)}function M0a(e,t,r,n){if(Ij(t))return n(null);mhf(t,r,function(i,o){if(i)return n(i);let s=uw.relative(r,o);if(s.startsWith("..")||uw.isAbsolute(s))return n(new Error(`${e} option must be relative to "${r}", found "${s}".`));n(null,s)})}function L0a(e,t,r){if(Ij(t))return;let n=hhf(t,r),i=uw.relative(r,n);if(i.startsWith("..")||uw.isAbsolute(i))throw new Error(`${e} option must be relative to "${r}", found "${i}".`);return i}function ghf(e,t){Ehf(e,function(r,n){if(r)return t(r);e.tmpdir=n;try{Y0a(e,n)}catch(i){return t(i)}M0a("dir",e.dir,n,function(i,o){if(i)return t(i);e.dir=Ij(o)?"":o,M0a("template",e.template,n,function(s,a){if(s)return t(s);e.template=a,t(null,e)})})})}function Ahf(e){let t=e.tmpdir=Z0a(e);Y0a(e,t);let r=L0a("dir",e.dir,t);return e.dir=Ij(r)?"":r,e.template=L0a("template",e.template,t),e}function yhf(e){return X0a(e,-nhf,"EBADF")}function eNi(e){return X0a(e,-ihf,"ENOENT")}function X0a(e,t,r){return rhf?e.code===r:e.code===r&&e.errno===t}function bhf(){W0a=!0}function Ehf(e,t){return eA.realpath(e&&e.tmpdir||car.tmpdir(),t)}function Z0a(e){return eA.realpathSync(e&&e.tmpdir||car.tmpdir())}process.addListener(ohf,dhf);Object.defineProperty(eue.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return Z0a()}});eue.exports.dir=uhf;eue.exports.dirSync=lhf;eue.exports.file=ahf;eue.exports.fileSync=chf;eue.exports.tmpName=tNi;eue.exports.tmpNameSync=rNi;eue.exports.setGracefulCleanup=bhf});var c0=b((Uey,Z6)=>{"use strict";var{promisify:EDt}=require("util"),oye=$0a();Z6.exports.fileSync=oye.fileSync;var Ihf=EDt((e,t)=>oye.file(e,(r,n,i,o)=>r?t(r):t(void 0,{path:n,fd:i,cleanup:EDt(o)})));Z6.exports.file=async e=>Ihf(e);Z6.exports.withFile=async function(t,r){let{path:n,fd:i,cleanup:o}=await Z6.exports.file(r);try{return await t({path:n,fd:i})}finally{await o()}};Z6.exports.dirSync=oye.dirSync;var vhf=EDt((e,t)=>oye.dir(e,(r,n,i)=>r?t(r):t(void 0,{path:n,cleanup:EDt(i)})));Z6.exports.dir=async e=>vhf(e);Z6.exports.withDir=async function(t,r){let{path:n,cleanup:i}=await Z6.exports.dir(r);try{return await t({path:n})}finally{await i()}};Z6.exports.tmpNameSync=oye.tmpNameSync;Z6.exports.tmpName=EDt(oye.tmpName);Z6.exports.tmpdir=oye.tmpdir;Z6.exports.setGracefulCleanup=oye.setGracefulCleanup});async function uar(e,{pretty:t,onWrite:r}={}){let n=await tEa.default.file(),i=Vt.of(n.path);return await kx(i,e,{pretty:t}),r?.(i),(await(0,eEa.readFile)(n.path)).toString()}var eEa,tEa,rEa=h(()=>{"use strict";eEa=require("fs/promises"),tEa=be(c0(),1);Psr();X2i()});async function nEa(e,t){let r=new AbortController;return Promise.race([iEa({filepath:e,controller:r}).then(()=>!0),Gce(t).then(()=>(r.abort(),!1))])}async function iEa({filepath:e,controller:t,delayMs:r=50}){if(!t.signal.aborted&&!await Kt(e))return await Gce(r),iEa({filepath:e,controller:t,delayMs:r*2})}var oEa=h(()=>{"use strict";kt();Rsr()});var sEa={};Z(sEa,{AbsoluteFilePath:()=>Vt,RelativeFilePath:()=>xe,basename:()=>SS,convertToFernHostAbsoluteFilePath:()=>$Ae,convertToFernHostRelativeFilePath:()=>ZPt,convertToOsPath:()=>gv,cwd:()=>ru,dirname:()=>En,doesPathExist:()=>Kt,doesPathExistSync:()=>oY,getAllFilesInDirectory:()=>eDt,getAllFilesInDirectoryRelative:()=>Xya,getDirectoryContents:()=>ry,getDirectoryContentsForSnapshot:()=>tba,getFilename:()=>gU,isCI:()=>Qsr,isPathEmpty:()=>Dsr,isURL:()=>J6,join:()=>Me,listFiles:()=>PS,moveFile:()=>c0a,moveFolder:()=>EU,relative:()=>xo,relativize:()=>fE,resolve:()=>Zn,splitPath:()=>jsr,streamObjectFromFile:()=>sar,streamObjectToFile:()=>kx,stringifyLargeObject:()=>uar,waitUntilPathExists:()=>nEa});var Zt=h(()=>{"use strict";Psr();_ya();qya();f2i();Rsr();Jya();Zya();m2i();rba();nba();iba();ksr();s0a();u0a();p0a();eye();B2e();d0a();h0a();A0a();h2i();R0a();X2i();rEa();oEa()});var aEa=h(()=>{"use strict"});var cEa=h(()=>{"use strict"});var uEa=h(()=>{"use strict"});var lEa=h(()=>{"use strict"});var pEa=h(()=>{"use strict"});var fEa=h(()=>{"use strict"});var dEa=h(()=>{"use strict"});var mEa=h(()=>{"use strict"});var hEa=h(()=>{"use strict"});var gEa=h(()=>{"use strict"});var AEa=h(()=>{"use strict"});var yEa=h(()=>{"use strict"});var bEa=h(()=>{"use strict"});var EEa=h(()=>{"use strict"});var IEa=h(()=>{"use strict"});var vEa=h(()=>{"use strict"});var xEa=h(()=>{"use strict"});var CEa=h(()=>{"use strict"});var wEa=h(()=>{"use strict"});var SEa,TEa=h(()=>{"use strict";SEa={ClientCredentials:"client-credentials",AuthorizationCode:"authorization-code",DeviceCode:"device-code"}});var OEa=h(()=>{"use strict"});var BEa=h(()=>{"use strict"});var PEa=h(()=>{"use strict"});var DEa=h(()=>{"use strict"});var REa=h(()=>{"use strict"});var kEa=h(()=>{"use strict"});var FEa=h(()=>{"use strict"});var NEa=h(()=>{"use strict"});var jEa=h(()=>{"use strict"});var QEa=h(()=>{"use strict"});var zEa=h(()=>{"use strict"});var nNi=h(()=>{"use strict";aEa();cEa();uEa();lEa();pEa();fEa();dEa();mEa();hEa();gEa();AEa();yEa();bEa();EEa();IEa();vEa();xEa();CEa();wEa();TEa();OEa();BEa();PEa();DEa();REa();kEa();FEa();NEa();jEa();QEa();zEa()});var iNi={};Z(iNi,{OAuthFlowTypeSchema:()=>SEa});var MEa=h(()=>{"use strict";nNi()});var LEa=h(()=>{"use strict"});var UEa,VEa=h(()=>{"use strict";UEa={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available",Alpha:"alpha",Beta:"beta",Preview:"preview",Legacy:"legacy"}});var _Ea=h(()=>{"use strict"});var oNi=h(()=>{"use strict";LEa();VEa();_Ea()});var sNi={};Z(sNi,{AvailabilityStatusSchema:()=>UEa});var qEa=h(()=>{"use strict";oNi()});var GEa=h(()=>{"use strict"});var WEa=h(()=>{"use strict"});var HEa=h(()=>{"use strict"});var KEa=h(()=>{"use strict"});var JEa=h(()=>{"use strict"});var YEa=h(()=>{"use strict"});var XEa=h(()=>{"use strict"});var ZEa=h(()=>{"use strict"});var $Ea=h(()=>{"use strict"});var eIa=h(()=>{"use strict"});var aNi=h(()=>{"use strict";GEa();WEa();HEa();KEa();JEa();YEa();XEa();ZEa();$Ea();eIa()});var tIa={};var rIa=h(()=>{"use strict";aNi()});var nIa=h(()=>{"use strict"});var iIa=h(()=>{"use strict"});var cNi=h(()=>{"use strict";nIa();iIa()});var oIa={};var sIa=h(()=>{"use strict";cNi()});var aIa=h(()=>{"use strict"});var cIa=h(()=>{"use strict"});var uIa=h(()=>{"use strict"});var lIa=h(()=>{"use strict"});var pIa=h(()=>{"use strict"});var uNi=h(()=>{"use strict";aIa();cIa();uIa();lIa();pIa()});var fIa={};var dIa=h(()=>{"use strict";uNi()});var mIa=h(()=>{"use strict"});var lNi=h(()=>{"use strict";mIa()});var hIa={};var gIa=h(()=>{"use strict";lNi()});var AIa=h(()=>{"use strict"});var yIa=h(()=>{"use strict"});var bIa=h(()=>{"use strict"});var EIa=h(()=>{"use strict"});var IIa=h(()=>{"use strict"});var vIa=h(()=>{"use strict"});var xIa=h(()=>{"use strict"});var CIa=h(()=>{"use strict"});var wIa=h(()=>{"use strict"});var SIa=h(()=>{"use strict"});var TIa=h(()=>{"use strict"});var OIa=h(()=>{"use strict"});var BIa=h(()=>{"use strict"});var PIa=h(()=>{"use strict"});var DIa=h(()=>{"use strict"});var RIa=h(()=>{"use strict"});var kIa,FIa=h(()=>{"use strict";kIa={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",Csharp2:"c#"}});var pNi=h(()=>{"use strict";AIa();yIa();bIa();EIa();IIa();vIa();xIa();CIa();wIa();SIa();TIa();OIa();BIa();PIa();DIa();RIa();FIa()});var fNi={};Z(fNi,{SupportedSdkLanguageSchema:()=>kIa});var NIa=h(()=>{"use strict";pNi()});var jIa=h(()=>{"use strict"});var QIa=h(()=>{"use strict"});var zIa=h(()=>{"use strict"});var MIa=h(()=>{"use strict"});var LIa=h(()=>{"use strict"});var UIa=h(()=>{"use strict"});var VIa=h(()=>{"use strict"});var _Ia=h(()=>{"use strict"});var qIa=h(()=>{"use strict"});var GIa=h(()=>{"use strict"});var dNi=h(()=>{"use strict";jIa();QIa();zIa();MIa();LIa();UIa();VIa();_Ia();qIa();GIa()});var WIa={};var HIa=h(()=>{"use strict";dNi()});var KIa=h(()=>{"use strict"});var mNi=h(()=>{"use strict";KIa()});var JIa={};var YIa=h(()=>{"use strict";mNi()});var XIa=h(()=>{"use strict"});var ZIa=h(()=>{"use strict"});var $Ia=h(()=>{"use strict"});var eva=h(()=>{"use strict"});var tva=h(()=>{"use strict"});var rva=h(()=>{"use strict"});var hNi=h(()=>{"use strict";XIa();ZIa();$Ia();eva();tva();rva()});var nva={};var iva=h(()=>{"use strict";hNi()});var ova=h(()=>{"use strict"});var sva=h(()=>{"use strict"});var ava=h(()=>{"use strict"});var cva=h(()=>{"use strict"});var uva=h(()=>{"use strict"});var gNi=h(()=>{"use strict";ova();sva();ava();cva();uva()});var lva={};var pva=h(()=>{"use strict";gNi()});var fva,dva=h(()=>{"use strict";fva={Json:"json",Exploded:"exploded",Form:"form"}});var mva=h(()=>{"use strict"});var hva=h(()=>{"use strict"});var gva=h(()=>{"use strict"});var Ava=h(()=>{"use strict"});var yva=h(()=>{"use strict"});var bva=h(()=>{"use strict"});var Eva=h(()=>{"use strict"});var Iva=h(()=>{"use strict"});var vva=h(()=>{"use strict"});var xva,Cva=h(()=>{"use strict";xva={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"}});var wva=h(()=>{"use strict"});var Sva=h(()=>{"use strict"});var Tva=h(()=>{"use strict"});var Ova=h(()=>{"use strict"});var Bva=h(()=>{"use strict"});var Pva=h(()=>{"use strict"});var Dva=h(()=>{"use strict"});var Rva=h(()=>{"use strict"});var kva=h(()=>{"use strict"});var Fva=h(()=>{"use strict"});var Nva=h(()=>{"use strict"});var jva=h(()=>{"use strict"});var Qva=h(()=>{"use strict"});var zva=h(()=>{"use strict"});var Mva=h(()=>{"use strict"});var Lva=h(()=>{"use strict"});var Uva=h(()=>{"use strict"});var Vva=h(()=>{"use strict"});var _va=h(()=>{"use strict"});var qva,Gva=h(()=>{"use strict";qva={Sse:"sse",Json:"json"}});var Wva=h(()=>{"use strict"});var Hva=h(()=>{"use strict"});var ANi=h(()=>{"use strict";dva();mva();hva();gva();Ava();yva();bva();Eva();Iva();vva();Cva();wva();Sva();Tva();Ova();Bva();Pva();Dva();Rva();kva();Fva();Nva();jva();Qva();zva();Mva();Lva();Uva();Vva();_va();Gva();Wva();Hva()});var yNi={};Z(yNi,{FormDataBodyEncodingStyle:()=>fva,HttpMethodSchema:()=>xva,StreamFormat:()=>qva});var Kva=h(()=>{"use strict";ANi()});var Jva=h(()=>{"use strict"});var Yva=h(()=>{"use strict"});var Xva=h(()=>{"use strict"});var bNi=h(()=>{"use strict";Jva();Yva();Xva()});var Zva={};var $va=h(()=>{"use strict";bNi()});var exa=h(()=>{"use strict"});var txa=h(()=>{"use strict"});var rxa=h(()=>{"use strict"});var nxa=h(()=>{"use strict"});var ixa=h(()=>{"use strict"});var oxa=h(()=>{"use strict"});var sxa=h(()=>{"use strict"});var axa=h(()=>{"use strict"});var cxa=h(()=>{"use strict"});var uxa,lxa=h(()=>{"use strict";uxa={ReadOnly:"read-only",WriteOnly:"write-only"}});var pxa=h(()=>{"use strict"});var fxa=h(()=>{"use strict"});var dxa=h(()=>{"use strict"});var mxa=h(()=>{"use strict"});var hxa=h(()=>{"use strict"});var gxa=h(()=>{"use strict"});var Axa=h(()=>{"use strict"});var yxa=h(()=>{"use strict"});var bxa=h(()=>{"use strict"});var Exa=h(()=>{"use strict"});var Ixa=h(()=>{"use strict"});var vxa=h(()=>{"use strict"});var xxa=h(()=>{"use strict"});var Cxa=h(()=>{"use strict"});var wxa=h(()=>{"use strict"});var Sxa=h(()=>{"use strict"});var Txa=h(()=>{"use strict"});var Oxa,Bxa=h(()=>{"use strict";Oxa={Data:"data",Protocol:"protocol"}});var ENi=h(()=>{"use strict";exa();txa();rxa();nxa();ixa();oxa();sxa();axa();cxa();lxa();pxa();fxa();dxa();mxa();hxa();gxa();Axa();yxa();bxa();Exa();Ixa();vxa();xxa();Cxa();wxa();Sxa();Txa();Bxa()});var INi={};Z(INi,{ObjectPropertyAccess:()=>uxa,UnionDiscriminatorContext:()=>Oxa});var Pxa=h(()=>{"use strict";ENi()});var Dxa=h(()=>{"use strict"});var Rxa=h(()=>{"use strict"});var kxa=h(()=>{"use strict"});var Fxa=h(()=>{"use strict"});var Nxa=h(()=>{"use strict"});var vNi=h(()=>{"use strict";Dxa();Rxa();kxa();Fxa();Nxa()});var jxa={};var Qxa=h(()=>{"use strict";vNi()});var zxa=h(()=>{"use strict"});var Mxa=h(()=>{"use strict"});var Lxa=h(()=>{"use strict"});var xNi=h(()=>{"use strict";zxa();Mxa();Lxa()});var Uxa={};var Vxa=h(()=>{"use strict";xNi()});var _xa=h(()=>{"use strict"});var qxa=h(()=>{"use strict"});var Gxa=h(()=>{"use strict"});var Wxa=h(()=>{"use strict"});var Hxa=h(()=>{"use strict"});var CNi=h(()=>{"use strict";_xa();qxa();Gxa();Wxa();Hxa()});var Kxa={};var Jxa=h(()=>{"use strict";CNi()});var Yxa,Xxa=h(()=>{"use strict";Yxa={RsaSha256:"rsa-sha256",RsaSha384:"rsa-sha384",RsaSha512:"rsa-sha512",EcdsaSha256:"ecdsa-sha256",EcdsaSha384:"ecdsa-sha384",EcdsaSha512:"ecdsa-sha512",Ed25519:"ed25519"}});var Zxa=h(()=>{"use strict"});var $xa=h(()=>{"use strict"});var eCa,tCa=h(()=>{"use strict";eCa={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"}});var rCa=h(()=>{"use strict"});var nCa=h(()=>{"use strict"});var iCa=h(()=>{"use strict"});var oCa=h(()=>{"use strict"});var sCa,aCa=h(()=>{"use strict";sCa={Post:"POST",Get:"GET"}});var cCa,uCa=h(()=>{"use strict";cCa={Alphabetical:"alphabetical"}});var lCa,pCa=h(()=>{"use strict";lCa={Body:"body",Timestamp:"timestamp",NotificationUrl:"notification-url",MessageId:"message-id"}});var fCa=h(()=>{"use strict"});var dCa=h(()=>{"use strict"});var mCa=h(()=>{"use strict"});var hCa=h(()=>{"use strict"});var gCa,ACa=h(()=>{"use strict";gCa={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"}});var yCa,bCa=h(()=>{"use strict";yCa={Base64:"base64",Hex:"hex"}});var ECa=h(()=>{"use strict"});var ICa,vCa=h(()=>{"use strict";ICa={UnixSeconds:"unix-seconds",UnixMillis:"unix-millis",Iso8601:"iso8601"}});var xCa=h(()=>{"use strict"});var CCa=h(()=>{"use strict"});var wNi=h(()=>{"use strict";Xxa();Zxa();$xa();tCa();rCa();nCa();iCa();oCa();aCa();uCa();pCa();fCa();dCa();mCa();hCa();ACa();bCa();ECa();vCa();xCa();CCa()});var SNi={};Z(SNi,{AsymmetricAlgorithmSchema:()=>Yxa,WebhookBodyHashAlgorithmSchema:()=>eCa,WebhookMethodSchema:()=>sCa,WebhookPayloadBodySortSchema:()=>cCa,WebhookPayloadComponentSchema:()=>lCa,WebhookSignatureAlgorithmSchema:()=>gCa,WebhookSignatureEncodingSchema:()=>yCa,WebhookTimestampFormatSchema:()=>ICa});var wCa=h(()=>{"use strict";wNi()});var SCa=h(()=>{"use strict"});var TCa=h(()=>{"use strict"});var OCa=h(()=>{"use strict"});var BCa=h(()=>{"use strict"});var PCa=h(()=>{"use strict"});var DCa,RCa=h(()=>{"use strict";DCa={Client:"client",Server:"server"}});var TNi=h(()=>{"use strict";SCa();TCa();OCa();BCa();PCa();RCa()});var ONi={};Z(ONi,{WebSocketOrigin:()=>DCa});var kCa=h(()=>{"use strict";TNi()});var FCa=h(()=>{"use strict";MEa();nNi();qEa();oNi();rIa();aNi();sIa();cNi();dIa();uNi();gIa();lNi();NIa();pNi();HIa();dNi();YIa();mNi();iva();hNi();pva();gNi();Kva();ANi();$va();bNi();Pxa();ENi();Qxa();vNi();Vxa();xNi();Jxa();CNi();wCa();wNi();kCa();TNi()});var NCa=h(()=>{"use strict";FCa()});var jCa,QCa=h(()=>{"use strict";jCa=(e,t,r)=>JSON.stringify(e,t,r)});var nue,zCa,BNi,PNi,hsy,MCa=h(()=>{"use strict";nue={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},zCa={[nue.Debug]:1,[nue.Info]:2,[nue.Warn]:3,[nue.Error]:4},BNi=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)}},PNi=class{level;logger;silent;constructor(t){this.level=zCa[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=zCa[t]}isDebug(){return this.shouldLog(nue.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(nue.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(nue.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(nue.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},hsy=new PNi({level:nue.Info,logger:new BNi,silent:!0})});var LCa=h(()=>{"use strict"});var UCa=h(()=>{"use strict";MCa()});var VCa=h(()=>{"use strict"});var ju,lw=h(()=>{"use strict";ju={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 ${Chf(e)}.`}function Chf(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 eF=h(()=>{"use strict"});function kS(e){return{...e,json:_Ca(e.json),parse:_Ca(e.parse)}}function _Ca(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(`
|
|
98
98
|
`)),{ok:!0,value:t}):n}}var pY=h(()=>{"use strict"});function lar(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var DNi=h(()=>{"use strict"});var Z7e,RNi=h(()=>{"use strict";DNi();Z7e=class e extends Error{errors;constructor(t){super(t.map(lar).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}}});var $7e,kNi=h(()=>{"use strict";DNi();$7e=class e extends Error{errors;constructor(t){super(t.map(lar).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}}});function jm(e){return{nullable:()=>whf(e),optional:()=>FNi(e),optionalNullable:()=>Shf(e),transform:t=>NNi(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new $7e(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new Z7e(n.errors)}}}function whf(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:()=>ju.NULLABLE};return{...t,...jm(t)}}function FNi(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:()=>ju.OPTIONAL};return{...t,...jm(t)}}function Shf(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:()=>ju.OPTIONAL_NULLABLE};return{...t,...jm(t)}}function NNi(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 qCa=h(()=>{"use strict";lw();RNi();kNi()});var vj=h(()=>{"use strict";qCa();RNi();kNi()});function GCa(){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:()=>ju.BIGINT};return{...kS(e),...jm(e)}}var WCa=h(()=>{"use strict";lw();eF();pY();vj()});var HCa=h(()=>{"use strict";WCa()});function KCa(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Gd(t,"string")}]}:Thf.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:()=>ju.DATE};return{...kS(e),...jm(e)}}var Thf,JCa=h(()=>{"use strict";lw();eF();pY();vj();Thf=/^([+-]?\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 YCa=h(()=>{"use strict";JCa()});function FS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...kS(r),...jm(r)}}}var fY=h(()=>{"use strict";vj();pY()});function par(e){let t=new Set(e);return FS(ju.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 XCa=h(()=>{"use strict";lw();fY();eF()});var jNi=h(()=>{"use strict";XCa()});function ZCa(e){let t=QNi(e);return{...t,...jm(t)}}function QNi(e){return{parse:(t,r)=>eWe(e).parse(t,r),json:(t,r)=>eWe(e).json(t,r),getType:()=>eWe(e).getType()}}function eWe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var zNi=h(()=>{"use strict";vj()});function MNi(e){return Object.entries(e)}var $Ca=h(()=>{"use strict"});function IDt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var LNi=h(()=>{"use strict"});function iue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var vDt=h(()=>{"use strict"});function xDt(e){return Object.keys(e)}var UNi=h(()=>{"use strict"});function ewa(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var twa=h(()=>{"use strict"});function r7(e){return{withParsedProperties:t=>VNi(e,t)}}function VNi(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(Ohf.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(!iue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Gd(n,"object")}]};let o=new Set(Object.keys(t)),s=IDt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...jm(r),...r7(r)}}var Ohf,rwa=h(()=>{"use strict";LNi();eF();vDt();vj();Ohf=Object.prototype.hasOwnProperty});var CDt=h(()=>{"use strict";rwa()});function nwa(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function oue(e){return e.isProperty}var _Ni=h(()=>{"use strict"});function far(e){let t;function r(){if(t==null){t={};for(let[d,f]of MNi(e)){let m=oue(f)?f.rawKey:d,g=oue(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 MNi(e)){let m=oue(f)?f.rawKey:d,g=oue(f)?f.valueSchema:f;Phf(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])=>oue(f)?f.rawKey:d),_getParsedProperties:()=>xDt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return iwa({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 iwa({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return oue(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:()=>ju.OBJECT};return{...kS(p),...jm(p),...r7(p),...F2e(p)}}function iwa({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!iue(e))return{ok:!1,errors:[{path:s,message:Gd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!Bhf.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 F2e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>owa({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>owa({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>ju.OBJECT};return{...r,...jm(r),...r7(r),...F2e(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:()=>ju.OBJECT};return{...n,...jm(n),...r7(n),...F2e(n)}}}}function owa({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!iue(t))return{ok:!1,errors:[{path:i,message:Gd(t,"object")}]};let o=new Set(e),[s,a]=ewa(xDt(t),l=>o.has(l)),c=r(IDt(t,a)),u=n(IDt(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 Phf(e){return!Dhf(e)}function Dhf(e){switch(e.getType()){case ju.ANY:case ju.UNKNOWN:case ju.OPTIONAL:case ju.OPTIONAL_NULLABLE:return!0;default:return!1}}var Bhf,qNi=h(()=>{"use strict";lw();$Ca();LNi();eF();vDt();UNi();pY();twa();CDt();vj();_Ni();Bhf=Object.prototype.hasOwnProperty});function swa(e){return far(e)}var awa=h(()=>{"use strict";qNi()});var GNi=h(()=>{"use strict";qNi();awa();_Ni()});function cwa(e){let t={...QNi(e),_getRawProperties:()=>eWe(e)._getRawProperties(),_getParsedProperties:()=>eWe(e)._getParsedProperties()};return{...t,...jm(t),...r7(t),...F2e(t)}}var uwa=h(()=>{"use strict";GNi();CDt();vj();zNi()});var lwa=h(()=>{"use strict";zNi();uwa()});function dar(e){let t={parse:(r,n)=>pwa(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>pwa(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>ju.LIST};return{...kS(t),...jm(t)}}function pwa(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 fwa=h(()=>{"use strict";lw();eF();pY();vj()});var WNi=h(()=>{"use strict";fwa()});function dwa(e){return FS(ju.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Gd(r,`${e.toString()}`)}]})()}var mwa=h(()=>{"use strict";lw();fY();eF()});function hwa(e){return FS(ju.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Gd(r,`"${e}"`)}]})()}var gwa=h(()=>{"use strict";lw();fY();eF()});var Awa=h(()=>{"use strict";mwa();gwa()});var ywa,bwa=h(()=>{"use strict";lw();fY();ywa=FS(ju.ANY,e=>({ok:!0,value:e}))});var Ewa,Iwa=h(()=>{"use strict";lw();fY();eF();Ewa=FS(ju.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Gd(e,"boolean")}]})});var vwa,xwa=h(()=>{"use strict";lw();fY();vwa=FS(ju.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Cwa,wwa=h(()=>{"use strict";lw();fY();eF();Cwa=FS(ju.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Gd(e,"number")}]})});var Swa,Twa=h(()=>{"use strict";lw();fY();eF();Swa=FS(ju.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Gd(e,"string")}]})});var Owa,Bwa=h(()=>{"use strict";lw();fY();Owa=FS(ju.UNKNOWN,e=>({ok:!0,value:e}))});var Pwa=h(()=>{"use strict";bwa();Iwa();xwa();wwa();Twa();Bwa()});function Rwa(e,t){let r={parse:(n,i)=>Dwa({value:n,isKeyNumeric:e.getType()===ju.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)=>Dwa({value:n,isKeyNumeric:e.getType()===ju.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:()=>ju.RECORD};return{...kS(r),...jm(r)}}function Dwa({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!iue(e))return{ok:!1,errors:[{path:i,message:Gd(e,"object")}]};let o={},s=[];for(let a in e){if(!Rhf.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 Rhf,kwa=h(()=>{"use strict";lw();eF();vDt();pY();vj();Rhf=Object.prototype.hasOwnProperty});var Fwa=h(()=>{"use strict";kwa()});function Nwa(e){let t=dar(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:()=>ju.SET};return{...kS(r),...jm(r)}}var jwa=h(()=>{"use strict";lw();eF();pY();WNi();vj()});var Qwa=h(()=>{"use strict";jwa()});function Mwa(e){let t={parse:(r,n)=>zwa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>zwa((i,o)=>i.json(r,o),e,n),getType:()=>ju.UNDISCRIMINATED_UNION};return{...kS(t),...jm(t)}}function zwa(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 Lwa=h(()=>{"use strict";lw();pY();vj()});var Uwa=h(()=>{"use strict";Lwa()});function Vwa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var _wa=h(()=>{"use strict"});function Gwa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=par(xDt(t)),o={parse:(s,a)=>qwa({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)=>qwa({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:()=>ju.UNION};return{...kS(o),...jm(o),...r7(o)}}function qwa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!iue(e))return{ok:!1,errors:[{path:a,message:Gd(e,"object")}]};let c=e[t],u={};for(let f in e)khf.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 khf,Wwa=h(()=>{"use strict";lw();eF();vDt();UNi();pY();jNi();CDt();vj();khf=Object.prototype.hasOwnProperty});var Hwa=h(()=>{"use strict";_wa();Wwa()});var Kwa=h(()=>{"use strict";HCa();YCa();jNi();lwa();WNi();Awa();GNi();CDt();Pwa();Fwa();vj();Qwa();Uwa();Hwa()});var ue={};Z(ue,{JsonError:()=>Z7e,ParseError:()=>$7e,any:()=>ywa,bigint:()=>GCa,boolean:()=>Ewa,booleanLiteral:()=>dwa,date:()=>KCa,discriminant:()=>Vwa,enum_:()=>par,getObjectLikeUtils:()=>r7,getObjectUtils:()=>F2e,getSchemaUtils:()=>jm,isProperty:()=>oue,lazy:()=>ZCa,lazyObject:()=>cwa,list:()=>dar,never:()=>vwa,number:()=>Cwa,object:()=>far,objectWithoutOptionalProperties:()=>swa,optional:()=>FNi,property:()=>nwa,record:()=>Rwa,set:()=>Nwa,string:()=>Swa,stringLiteral:()=>hwa,transform:()=>NNi,undiscriminatedUnion:()=>Mwa,union:()=>Gwa,unknown:()=>Owa,withParsedProperties:()=>VNi});var Jwa=h(()=>{"use strict";Kwa()});var Ywa=h(()=>{"use strict"});var hr=h(()=>{"use strict";LCa();UCa();VCa();Jwa();Ywa()});var ho,Pp=h(()=>{"use strict";hr();ho=ue.object({docs:ue.string().optional()})});var tWe,mar=h(()=>{"use strict";hr();Pp();tWe=ue.object({scheme:ue.string()}).extend(ho)});var har,HNi=h(()=>{"use strict";hr();mar();har=ue.undiscriminatedUnion([ue.string(),tWe])});var gar,KNi=h(()=>{"use strict";hr();Pp();HNi();gar=ue.object({any:ue.list(har)}).extend(ho)});var Aar,JNi=h(()=>{"use strict";hr();Aar=ue.object({})});var yar,YNi=h(()=>{"use strict";hr();Pp();JNi();yar=ue.object({"endpoint-security":Aar}).extend(ho)});var bar,XNi=h(()=>{"use strict";hr();KNi();mar();YNi();bar=ue.undiscriminatedUnion([ue.string(),tWe,gar,yar])});var tf,Fx=h(()=>{"use strict";hr();tf=ue.object({name:ue.string().optional()})});var rWe,Ear=h(()=>{"use strict";hr();rWe=ue.object({env:ue.string().optional()})});var N2e,Iar=h(()=>{"use strict";hr();Fx();Ear();N2e=ue.object({omit:ue.boolean().optional(),placeholder:ue.string().optional()}).extend(rWe).extend(tf)});var xar,ZNi=h(()=>{"use strict";hr();Pp();Iar();xar=ue.object({scheme:ue.stringLiteral("basic"),username:N2e.optional(),password:N2e.optional()}).extend(ho)});var Car,$Ni=h(()=>{"use strict";hr();Car=ue.object({"response-property":ue.string(),"header-name":ue.string(),"value-prefix":ue.string().optional()})});var war,eji=h(()=>{"use strict";hr();$Ni();war=ue.object({endpoint:ue.string(),"expiry-response-property":ue.string().optional(),"authenticated-request-headers":ue.list(Car).optional()})});var Sar,tji=h(()=>{"use strict";hr();eji();Sar=ue.undiscriminatedUnion([ue.string(),war])});var Tar,rji=h(()=>{"use strict";hr();Pp();tji();Tar=ue.object({scheme:ue.stringLiteral("bearer"),"get-token":Sar}).extend(ho)});var Oar,nji=h(()=>{"use strict";hr();Pp();Iar();Oar=ue.object({scheme:ue.stringLiteral("bearer"),token:N2e.optional()}).extend(ho)});var Bar,iji=h(()=>{"use strict";hr();rji();nji();Bar=ue.undiscriminatedUnion([Oar,Tar])});var Par,oji=h(()=>{"use strict";hr();Pp();Fx();Ear();Par=ue.object({header:ue.string(),type:ue.string().optional(),prefix:ue.string().optional(),placeholder:ue.string().optional()}).extend(rWe).extend(tf).extend(ho)});var nWe,Dar=h(()=>{"use strict";hr();nWe=ue.string()});var Rar,sji=h(()=>{"use strict";hr();Rar=ue.enum_(["client-credentials","authorization-code","device-code"])});var kar,aji=h(()=>{"use strict";hr();kar=ue.object({"client-id":ue.string().optional(),"client-secret":ue.string().optional(),scopes:ue.string().optional()})});var Far,cji=h(()=>{"use strict";hr();Far=ue.object({"access-token":ue.string().optional(),"expires-in":ue.string().optional(),"refresh-token":ue.string().optional()})});var Nar,uji=h(()=>{"use strict";hr();aji();cji();Nar=ue.object({endpoint:ue.string(),"request-properties":kar.optional(),"response-properties":Far.optional()})});var jar,lji=h(()=>{"use strict";hr();jar=ue.object({method:ue.string().optional()})});var Qar,pji=h(()=>{"use strict";hr();Qar=ue.object({"refresh-token":ue.string()})});var zar,fji=h(()=>{"use strict";hr();zar=ue.object({"access-token":ue.string().optional(),"expires-in":ue.string().optional(),"refresh-token":ue.string().optional()})});var Mar,dji=h(()=>{"use strict";hr();pji();fji();Mar=ue.object({endpoint:ue.string(),"request-properties":Qar.optional(),"response-properties":zar.optional()})});var Lar,mji=h(()=>{"use strict";hr();Lar=ue.object({url:ue.string(),ports:ue.list(ue.number()).optional()})});var Uar,hji=h(()=>{"use strict";hr();mji();Uar=ue.undiscriminatedUnion([ue.string(),Lar])});var Var,gji=h(()=>{"use strict";hr();Pp();Dar();sji();uji();lji();dji();hji();Var=ue.object({scheme:ue.stringLiteral("oauth"),type:Rar,scopes:ue.list(nWe).optional(),"token-prefix":ue.string().optional(),"token-header":ue.string().optional(),"client-id-env":ue.string().optional(),"client-secret-env":ue.string().optional(),"get-token":Nar.optional(),"refresh-token":Mar.optional(),"client-id":ue.string().optional(),"authorization-url":ue.string().optional(),"device-authorization-url":ue.string().optional(),"token-url":ue.string().optional(),"refresh-url":ue.string().optional(),"redirect-uri":Uar.optional(),pkce:jar.optional(),"authorization-parameters":ue.record(ue.string(),ue.string()).optional(),"device-authorization-parameters":ue.record(ue.string(),ue.string()).optional(),"token-parameters":ue.record(ue.string(),ue.string()).optional(),"refresh-parameters":ue.record(ue.string(),ue.string()).optional()}).extend(ho)});var _ar,Aji=h(()=>{"use strict";hr();ZNi();iji();oji();gji();_ar=ue.undiscriminatedUnion([Var,Par,xar,Bar])});var iWe,qar=h(()=>{"use strict";hr();iWe=ue.string()});var Gar,yji=h(()=>{"use strict";hr();XNi();Aji();qar();Gar=ue.object({auth:bar.optional(),"auth-schemes":ue.record(iWe,_ar).optional()})});var bji=h(()=>{"use strict";HNi();KNi();XNi();Aji();qar();mar();Dar();Iar();ZNi();iji();YNi();JNi();oji();$Ni();rji();tji();eji();aji();cji();sji();uji();lji();dji();pji();fji();gji();hji();mji();nji();yji();Ear()});var Eji={};Z(Eji,{AnyAuthItem:()=>har,AnyAuthSchemesSchema:()=>gar,ApiAuthSchema:()=>bar,AuthSchemeDeclarationSchema:()=>_ar,AuthSchemeKey:()=>iWe,AuthSchemeReferenceSchema:()=>tWe,AuthScope:()=>nWe,AuthVariable:()=>N2e,BasicAuthSchemeSchema:()=>xar,BearerAuthSchemeSchema:()=>Bar,EndpointSecuritySchema:()=>yar,EndpointSecuritySchemaDetails:()=>Aar,HeaderAuthSchemeSchema:()=>Par,InferredAuthenticatedRequestHeader:()=>Car,InferredBearerAuthSchema:()=>Tar,InferredGetTokenEndpointSchema:()=>Sar,InferredGetTokenEndpointSchemaObject:()=>war,OAuthAccessTokenRequestPropertiesSchema:()=>kar,OAuthAccessTokenResponsePropertiesSchema:()=>Far,OAuthFlowTypeSchema:()=>Rar,OAuthGetTokenEndpointSchema:()=>Nar,OAuthPkceSchema:()=>jar,OAuthRefreshTokenEndpointSchema:()=>Mar,OAuthRefreshTokenRequestPropertiesSchema:()=>Qar,OAuthRefreshTokenResponsePropertiesSchema:()=>zar,OAuthSchemeSchema:()=>Var,RedirectUriSchema:()=>Uar,RedirectUriWithBackupPortsSchema:()=>Lar,TokenBearerAuthSchema:()=>Oar,WithAuthSchema:()=>Gar,WithEnvironmentVariable:()=>rWe});var Xwa=h(()=>{"use strict";bji()});var oWe,War=h(()=>{"use strict";hr();oWe=ue.enum_(["in-development","pre-release","deprecated","generally-available","alpha","beta","preview","legacy"])});var Har,Iji=h(()=>{"use strict";hr();War();Har=ue.object({status:oWe,message:ue.string().optional()})});var Kar,vji=h(()=>{"use strict";hr();Iji();War();Kar=ue.undiscriminatedUnion([oWe,Har])});var xji=h(()=>{"use strict";Iji();War();vji()});var Cji={};Z(Cji,{AvailabilitySchema:()=>Har,AvailabilityStatusSchema:()=>oWe,AvailabilityUnionSchema:()=>Kar});var Zwa=h(()=>{"use strict";xji()});var NS,dY=h(()=>{"use strict";hr();NS=ue.object({audiences:ue.list(ue.string()).optional()})});var NP,sue=h(()=>{"use strict";hr();vji();NP=ue.object({availability:Kar.optional()})});var mY,sWe=h(()=>{"use strict";hr();dY();sue();Pp();mY=ue.object({}).extend(ho).extend(NP).extend(NS)});var $wa,eSa=h(()=>{"use strict";hr();sWe();Fx();$wa=ue.object({}).extend(mY).extend(tf)});var Jar,wji=h(()=>{"use strict";hr();dY();sue();Jar=ue.object({}).extend(NP).extend(NS)});var jS,hY=h(()=>{"use strict";hr();jS=ue.object({"display-name":ue.string().optional()})});var Yar,Sji=h(()=>{"use strict";hr();Yar=ue.object({"method-name":ue.string().optional()})});var Xar,Tji=h(()=>{"use strict";hr();Xar=ue.object({minItems:ue.number().optional(),maxItems:ue.number().optional()})});var Zar,Oji=h(()=>{"use strict";hr();Zar=ue.object({minProperties:ue.number().optional(),maxProperties:ue.number().optional()})});var $ar,Bji=h(()=>{"use strict";hr();$ar=ue.object({min:ue.number().optional(),max:ue.number().optional(),exclusiveMin:ue.boolean().optional(),exclusiveMax:ue.boolean().optional(),multipleOf:ue.number().optional()})});var ecr,Pji=h(()=>{"use strict";hr();ecr=ue.object({minLength:ue.number().optional(),maxLength:ue.number().optional(),pattern:ue.string().optional(),format:ue.string().optional()})});var sye,wDt=h(()=>{"use strict";hr();Tji();Oji();Bji();Pji();sye=ue.undiscriminatedUnion([ecr,$ar,Xar,Zar])});var aWe,tcr=h(()=>{"use strict";hr();wDt();aWe=ue.object({validation:sye.optional()})});var Dji=h(()=>{"use strict";sWe();eSa();wji();dY();sue();hY();Pp();Sji();Fx();tcr()});var Rji={};Z(Rji,{DeclarationSchema:()=>mY,DeclarationWithNameSchema:()=>$wa,DeclarationWithoutDocsSchema:()=>Jar,WithAudiences:()=>NS,WithAvailability:()=>NP,WithDisplayName:()=>jS,WithDocsSchema:()=>ho,WithMethodName:()=>Yar,WithName:()=>tf,WithValidation:()=>aWe});var tSa=h(()=>{"use strict";Dji()});var rcr,kji=h(()=>{"use strict";hr();rcr=ue.object({type:ue.string()})});var cWe,ncr=h(()=>{"use strict";hr();kji();cWe=ue.object({proto:rcr.optional()})});var Fji=h(()=>{"use strict";ncr();kji()});var Nji={};Z(Nji,{EncodingSchema:()=>cWe,ProtobufTypeSchema:()=>rcr});var rSa=h(()=>{"use strict";Fji()});var uWe,icr=h(()=>{"use strict";hr();uWe=ue.object({id:ue.string(),default:ue.string().optional(),values:ue.list(ue.string()).optional()})});var ocr,jji=h(()=>{"use strict";hr();dY();Pp();icr();ocr=ue.object({urls:ue.record(ue.string(),ue.string()),"url-templates":ue.record(ue.string(),ue.string()).optional(),"default-urls":ue.record(ue.string(),ue.string()).optional(),variables:ue.record(ue.string(),ue.list(uWe)).optional()}).extend(NS).extend(ho)});var scr,Qji=h(()=>{"use strict";hr();dY();Pp();icr();scr=ue.object({url:ue.string(),"default-url":ue.string().optional(),"url-template":ue.string().optional(),variables:ue.list(uWe).optional()}).extend(NS).extend(ho)});var acr,zji=h(()=>{"use strict";hr();jji();Qji();acr=ue.undiscriminatedUnion([ue.string(),scr,ocr])});var ccr,Mji=h(()=>{"use strict";hr();zji();ccr=ue.object({"default-url":ue.string().optional(),"default-environment":ue.string().optional(),environments:ue.record(ue.string(),acr).optional()})});var Lji=h(()=>{"use strict";zji();jji();icr();Qji();Mji()});var Uji={};Z(Uji,{EnvironmentSchema:()=>acr,MultipleBaseUrlsEnvironmentSchema:()=>ocr,ServerVariableSchema:()=>uWe,SingleBaseUrlEnvironmentSchema:()=>scr,WithEnvironmentsSchema:()=>ccr});var nSa=h(()=>{"use strict";Lji()});var ucr,Vji=h(()=>{"use strict";hr();ucr=ue.unknown()});var lWe,lcr=h(()=>{"use strict";hr();Pp();Fx();Vji();lWe=ue.object({value:ucr}).extend(tf).extend(ho)});var pcr,_ji=h(()=>{"use strict";hr();Pp();lcr();pcr=ue.object({"status-code":ue.number(),type:ue.string().optional(),examples:ue.list(lWe).optional()}).extend(ho)});var qji=h(()=>{"use strict";_ji()});var Gji={};Z(Gji,{ErrorDeclarationSchema:()=>pcr});var iSa=h(()=>{"use strict";qji()});var pw,aye=h(()=>{"use strict";hr();pw=ue.unknown()});var fcr,Wji=h(()=>{"use strict";hr();aye();fcr=ue.object({error:ue.string().optional(),body:pw.optional()})});var dcr,Hji=h(()=>{"use strict";hr();Pp();Fx();dcr=ue.object({language:ue.string(),code:ue.string(),install:ue.string().optional()}).extend(ho).extend(tf)});var mcr,Kji=h(()=>{"use strict";hr();mcr=ue.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","js","node","ts","nodets","golang","dotnet","jvm","c#"])});var hcr,Jji=h(()=>{"use strict";hr();Pp();Fx();Kji();hcr=ue.object({sdk:mcr,code:ue.string()}).extend(ho).extend(tf)});var gcr,Yji=h(()=>{"use strict";hr();Hji();Jji();gcr=ue.undiscriminatedUnion([hcr,dcr])});var Acr,Xji=h(()=>{"use strict";hr();aye();Acr=ue.object({event:ue.string(),data:pw.optional()})});var ycr,Zji=h(()=>{"use strict";hr();Xji();ycr=ue.object({stream:ue.list(Acr)})});var bcr,$ji=h(()=>{"use strict";hr();aye();bcr=ue.object({stream:ue.list(pw)})});var Ecr,eQi=h(()=>{"use strict";hr();Wji();Zji();$ji();Ecr=ue.undiscriminatedUnion([fcr,bcr,ycr])});var pWe,Icr=h(()=>{"use strict";hr();Pp();Fx();Yji();eQi();aye();pWe=ue.object({id:ue.string().optional(),"path-parameters":ue.record(ue.string(),pw).optional(),"query-parameters":ue.record(ue.string(),pw).optional(),headers:ue.record(ue.string(),pw).optional(),request:pw.optional(),response:Ecr.optional(),"code-samples":ue.list(gcr).optional()}).extend(tf).extend(ho)});var oSa,sSa=h(()=>{"use strict";hr();Icr();oSa=ue.list(pWe)});var vcr,tQi=h(()=>{"use strict";hr();Pp();Fx();aye();vcr=ue.object({id:ue.string().optional(),payload:pw}).extend(tf).extend(ho)});var xcr,rQi=h(()=>{"use strict";hr();xcr=ue.object({type:ue.string(),body:ue.unknown()})});var Ccr,nQi=h(()=>{"use strict";hr();Pp();Fx();aye();rQi();Ccr=ue.object({"path-parameters":ue.record(ue.string(),pw).optional(),"query-parameters":ue.record(ue.string(),pw).optional(),headers:ue.record(ue.string(),pw).optional(),messages:ue.list(xcr)}).extend(tf).extend(ho)});var iQi=h(()=>{"use strict";Wji();Yji();Hji();Jji();sSa();Icr();eQi();Xji();Zji();$ji();aye();lcr();Vji();tQi();rQi();nQi();Kji()});var oQi={};Z(oQi,{ExampleBodyResponseSchema:()=>fcr,ExampleCodeSampleSchema:()=>gcr,ExampleCodeSampleSchemaLanguage:()=>dcr,ExampleCodeSampleSchemaSdk:()=>hcr,ExampleEndpointCallArraySchema:()=>oSa,ExampleEndpointCallSchema:()=>pWe,ExampleResponseSchema:()=>Ecr,ExampleSseEventSchema:()=>Acr,ExampleSseResponseSchema:()=>ycr,ExampleStreamResponseSchema:()=>bcr,ExampleTypeReferenceSchema:()=>pw,ExampleTypeSchema:()=>lWe,ExampleTypeValueSchema:()=>ucr,ExampleWebSocketMessage:()=>xcr,ExampleWebSocketSession:()=>Ccr,ExampleWebhookCallSchema:()=>vcr,SupportedSdkLanguageSchema:()=>mcr});var aSa=h(()=>{"use strict";iQi()});var wcr,sQi=h(()=>{"use strict";hr();wcr=ue.object({openapi:ue.string()})});var Scr,aQi=h(()=>{"use strict";hr();Scr=ue.object({proto:ue.string()})});var cye,SDt=h(()=>{"use strict";hr();sQi();aQi();cye=ue.undiscriminatedUnion([wcr,Scr])});var fWe,Tcr=h(()=>{"use strict";hr();sue();Pp();ncr();wDt();fWe=ue.object({default:ue.unknown().optional(),"client-default":ue.unknown().optional(),encoding:cWe.optional(),validation:sye.optional()}).extend(ho).extend(NP)});var Ocr,cQi=h(()=>{"use strict";hr();dY();Fx();Tcr();Ocr=ue.object({type:ue.string()}).extend(fWe).extend(tf).extend(NS)});var n7,dWe=h(()=>{"use strict";hr();cQi();n7=ue.undiscriminatedUnion([ue.string(),Ocr])});var Bcr,uQi=h(()=>{"use strict";hr();qar();Dar();Bcr=ue.record(iWe,ue.list(nWe))});var Pcr,lQi=h(()=>{"use strict";hr();uQi();Pcr=ue.list(Bcr)});var Dcr,pQi=h(()=>{"use strict";hr();lQi();Dcr=ue.undiscriminatedUnion([ue.boolean(),Pcr])});var Rcr,fQi=h(()=>{"use strict";hr();Rcr=ue.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var kcr,dQi=h(()=>{"use strict";hr();sue();Pp();kcr=ue.object({variable:ue.string()}).extend(NP).extend(ho)});var gY,mWe=h(()=>{"use strict";hr();dWe();dQi();gY=ue.undiscriminatedUnion([n7,kcr])});var vU,j2e=h(()=>{"use strict";hr();dY();Fx();Tcr();vU=ue.object({type:ue.string()}).extend(fWe).extend(tf).extend(NS)});var Fcr,mQi=h(()=>{"use strict";hr();j2e();Fcr=ue.object({env:ue.string().optional()}).extend(vU)});var Ncr,hQi=h(()=>{"use strict";hr();mQi();Ncr=ue.undiscriminatedUnion([ue.string(),Fcr])});var xU,Q2e=h(()=>{"use strict";hQi();xU=Ncr});var jcr,gQi=h(()=>{"use strict";hr();j2e();jcr=ue.object({"allow-multiple":ue.boolean().optional(),explode:ue.boolean().optional()}).extend(vU)});var hWe,Qcr=h(()=>{"use strict";hr();gQi();hWe=ue.undiscriminatedUnion([ue.string(),jcr])});var CU,z2e=h(()=>{"use strict";hr();CU=ue.undiscriminatedUnion([ue.string(),ue.list(ue.string())])});var zcr,AQi=h(()=>{"use strict";hr();zcr=ue.enum_(["json","exploded","form"])});var Mcr,yQi=h(()=>{"use strict";hr();j2e();AQi();Mcr=ue.object({style:zcr.optional(),"content-type":ue.string().optional()}).extend(vU)});var Lcr,bQi=h(()=>{"use strict";hr();yQi();Lcr=ue.undiscriminatedUnion([ue.string(),Mcr])});var Ucr,EQi=h(()=>{"use strict";hr();z2e();bQi();Ucr=ue.object({extends:CU.optional(),"extra-properties":ue.boolean().optional(),properties:ue.record(ue.string(),Lcr).optional(),optional:ue.boolean().optional()})});var Vcr,IQi=h(()=>{"use strict";hr();Pp();Vcr=ue.object({type:ue.string()}).extend(ho)});var _cr,vQi=h(()=>{"use strict";hr();EQi();IQi();_cr=ue.undiscriminatedUnion([ue.string(),Vcr,Ucr])});var qcr,xQi=h(()=>{"use strict";hr();Pp();Fx();Q2e();mWe();Qcr();vQi();qcr=ue.object({"content-type":ue.string().optional(),"path-parameters":ue.record(ue.string(),gY).optional(),"query-parameters":ue.record(ue.string(),hWe).optional(),headers:ue.record(ue.string(),xU).optional(),body:_cr.optional()}).extend(tf).extend(ho)});var Gcr,CQi=h(()=>{"use strict";hr();xQi();Gcr=ue.undiscriminatedUnion([ue.string(),qcr])});var Wcr,wQi=h(()=>{"use strict";hr();Pp();Wcr=ue.object({type:ue.string().optional(),property:ue.string().optional(),"status-code":ue.number().optional(),"content-type":ue.string().optional()}).extend(ho)});var gWe,Hcr=h(()=>{"use strict";hr();wQi();gWe=ue.undiscriminatedUnion([ue.string(),Wcr])});var Kcr,SQi=h(()=>{"use strict";hr();Kcr=ue.enum_(["sse","json"])});var Jcr,TQi=h(()=>{"use strict";hr();Pp();SQi();Jcr=ue.object({type:ue.string(),format:Kcr.optional(),terminator:ue.string().optional(),resumable:ue.boolean().optional()}).extend(ho)});var AWe,Ycr=h(()=>{"use strict";hr();TQi();AWe=ue.undiscriminatedUnion([ue.string(),Jcr])});var Xcr,OQi=h(()=>{"use strict";hr();Xcr=ue.object({cursor:ue.string(),next_cursor:ue.string(),results:ue.string()})});var Zcr,BQi=h(()=>{"use strict";hr();Zcr=ue.object({type:ue.stringLiteral("custom"),results:ue.string()})});var $cr,PQi=h(()=>{"use strict";hr();$cr=ue.object({offset:ue.string(),results:ue.string(),step:ue.string().optional(),"has-next-page":ue.string().optional()})});var eur,DQi=h(()=>{"use strict";hr();eur=ue.object({next_path:ue.string(),results:ue.string()})});var tur,RQi=h(()=>{"use strict";hr();tur=ue.object({next_uri:ue.string(),results:ue.string()})});var yWe,rur=h(()=>{"use strict";hr();OQi();BQi();PQi();DQi();RQi();yWe=ue.undiscriminatedUnion([Xcr,$cr,Zcr,tur,eur])});var nur,kQi=h(()=>{"use strict";hr();rur();nur=ue.undiscriminatedUnion([yWe,ue.boolean()])});var iur,FQi=h(()=>{"use strict";hr();Pp();iur=ue.object({error:ue.string()}).extend(ho)});var our,NQi=h(()=>{"use strict";hr();FQi();our=ue.undiscriminatedUnion([ue.string(),iur])});var sur,jQi=h(()=>{"use strict";hr();NQi();sur=ue.list(our)});var aur,QQi=h(()=>{"use strict";hr();aur=ue.object({disabled:ue.boolean().optional()})});var cur,zQi=h(()=>{"use strict";hr();QQi();cur=ue.undiscriminatedUnion([aur])});var uur,MQi=h(()=>{"use strict";hr();uur=ue.object({"service-name":ue.string()})});var bWe,lur=h(()=>{"use strict";hr();MQi();bWe=ue.object({grpc:uur.optional()})});var pur,LQi=h(()=>{"use strict";hr();sWe();hY();Icr();SDt();pQi();fQi();mWe();CQi();Hcr();Ycr();kQi();jQi();zQi();lur();pur=ue.object({method:Rcr.optional(),"base-path":ue.string().optional(),path:ue.string(),url:ue.string().optional(),"path-parameters":ue.record(ue.string(),gY).optional(),auth:Dcr.optional(),idempotent:ue.boolean().optional(),subtitle:ue.string().optional(),"stream-condition":ue.string().optional(),request:Gcr.optional(),response:gWe.optional(),"response-stream":AWe.optional(),errors:sur.optional(),examples:ue.list(pWe).optional(),pagination:nur.optional(),transport:bWe.optional(),source:cye.optional(),retries:cur.optional(),"global-parameters":ue.list(ue.string()).optional()}).extend(jS).extend(mY)});var fur,UQi=h(()=>{"use strict";hr();wji();hY();SDt();dWe();LQi();lur();fur=ue.object({auth:ue.boolean().optional(),url:ue.string().optional(),"base-path":ue.string(),"path-parameters":ue.record(ue.string(),n7).optional(),idempotent:ue.boolean().optional(),headers:ue.record(ue.string(),n7).optional(),transport:bWe.optional(),source:cye.optional(),endpoints:ue.record(ue.string(),pur)}).extend(Jar).extend(jS)});var wU,M2e=h(()=>{"use strict";hr();dY();sue();Pp();ncr();lcr();SDt();wU=ue.object({examples:ue.list(lWe).optional(),encoding:cWe.optional(),source:cye.optional(),inline:ue.boolean().optional()}).extend(ho).extend(NP).extend(NS)});var dur,VQi=h(()=>{"use strict";hr();wDt();M2e();dur=ue.object({type:ue.string(),validation:sye.optional()}).extend(wU)});var mur,_Qi=h(()=>{"use strict";hr();Fx();mur=ue.object({value:ue.string()}).extend(tf)});var hur,qQi=h(()=>{"use strict";hr();_Qi();hur=ue.undiscriminatedUnion([ue.string(),mur])});var gur,GQi=h(()=>{"use strict";hr();sue();hY();Pp();Fx();tcr();qQi();gur=ue.object({type:ue.string().optional(),key:hur.optional()}).extend(ho).extend(tf).extend(NP).extend(jS).extend(aWe)});var Aur,WQi=h(()=>{"use strict";hr();GQi();Aur=ue.undiscriminatedUnion([ue.string(),gur])});var yur,HQi=h(()=>{"use strict";hr();yur=ue.enum_(["data","protocol"])});var bur,KQi=h(()=>{"use strict";hr();Fx();HQi();bur=ue.object({value:ue.string(),context:yur.optional()}).extend(tf)});var Eur,JQi=h(()=>{"use strict";hr();KQi();Eur=ue.undiscriminatedUnion([ue.string(),bur])});var Iur,YQi=h(()=>{"use strict";hr();M2e();z2e();WQi();dWe();JQi();Iur=ue.object({discriminant:Eur.optional(),extends:CU.optional(),"base-properties":ue.record(ue.string(),n7).optional(),union:ue.record(ue.string(),Aur),"default-variant":ue.string().optional()}).extend(wU)});var vur,XQi=h(()=>{"use strict";hr();vur=ue.object({camel:ue.string().optional(),snake:ue.string().optional(),pascal:ue.string().optional(),"screaming-snake":ue.string().optional()})});var xur,ZQi=h(()=>{"use strict";hr();Pp();Fx();XQi();xur=ue.object({value:ue.string(),casing:vur.optional()}).extend(ho).extend(tf)});var Cur,$Qi=h(()=>{"use strict";hr();ZQi();Cur=ue.undiscriminatedUnion([ue.string(),xur])});var wur,ezi=h(()=>{"use strict";hr();M2e();$Qi();wur=ue.object({default:ue.string().optional(),enum:ue.list(Cur),"forward-compatible":ue.boolean().optional()}).extend(wU)});var Sur,tzi=h(()=>{"use strict";hr();Sur=ue.enum_(["read-only","write-only"])});var Tur,rzi=h(()=>{"use strict";hr();tzi();j2e();Tur=ue.object({access:Sur.optional()}).extend(vU)});var uye,TDt=h(()=>{"use strict";hr();rzi();uye=ue.undiscriminatedUnion([ue.string(),Tur])});var Our,nzi=h(()=>{"use strict";hr();M2e();z2e();TDt();Our=ue.object({extends:CU.optional(),properties:ue.record(ue.string(),uye).optional(),"extra-properties":ue.boolean().optional()}).extend(wU)});var Bur,izi=h(()=>{"use strict";hr();hY();Pp();tcr();Bur=ue.object({type:ue.string()}).extend(ho).extend(jS).extend(aWe)});var Pur,ozi=h(()=>{"use strict";hr();izi();Pur=ue.undiscriminatedUnion([ue.string(),Bur])});var Dur,szi=h(()=>{"use strict";hr();M2e();ozi();dWe();Dur=ue.object({discriminated:ue.booleanLiteral(!1),"base-properties":ue.record(ue.string(),n7).optional(),union:ue.list(Pur)}).extend(wU)});var Rur,azi=h(()=>{"use strict";hr();VQi();YQi();ezi();nzi();szi();Rur=ue.undiscriminatedUnion([ue.string(),Our,wur,Iur,Dur,dur])});var kur,czi=h(()=>{"use strict";hr();kur=ue.enum_(["POST","GET"])});var Fur,uzi=h(()=>{"use strict";hr();z2e();TDt();Fur=ue.object({name:ue.string(),extends:CU.optional(),properties:ue.record(ue.string(),uye).optional()})});var Nur,lzi=h(()=>{"use strict";hr();Pp();Nur=ue.object({type:ue.string()}).extend(ho)});var jur,pzi=h(()=>{"use strict";hr();uzi();lzi();jur=ue.undiscriminatedUnion([ue.string(),Nur,Fur])});var Qur,fzi=h(()=>{"use strict";hr();Qur=ue.enum_(["rsa-sha256","rsa-sha384","rsa-sha512","ecdsa-sha256","ecdsa-sha384","ecdsa-sha512","ed25519"])});var zur,dzi=h(()=>{"use strict";hr();zur=ue.enum_(["alphabetical"])});var Mur,mzi=h(()=>{"use strict";hr();Mur=ue.enum_(["body","timestamp","notification-url","message-id"])});var EWe,Lur=h(()=>{"use strict";hr();dzi();mzi();EWe=ue.object({components:ue.list(Mur),delimiter:ue.string().optional(),"body-sort":zur.optional()})});var lye,ODt=h(()=>{"use strict";hr();lye=ue.enum_(["base64","hex"])});var Uur,hzi=h(()=>{"use strict";hr();Uur=ue.enum_(["unix-seconds","unix-millis","iso8601"])});var IWe,Vur=h(()=>{"use strict";hr();hzi();IWe=ue.object({header:ue.string(),format:Uur.optional(),tolerance:ue.number().optional()})});var _ur,gzi=h(()=>{"use strict";hr();fzi();Lur();ODt();Vur();_ur=ue.object({header:ue.string(),"asymmetric-algorithm":Qur,encoding:lye.optional(),"signature-prefix":ue.string().optional(),"jwks-url":ue.string().optional(),"key-id-header":ue.string().optional(),"payload-format":EWe.optional(),timestamp:IWe.optional()})});var qur,Azi=h(()=>{"use strict";hr();qur=ue.enum_(["sha256","sha1","sha384","sha512"])});var Gur,yzi=h(()=>{"use strict";hr();Gur=ue.object({name:ue.string()})});var Wur,bzi=h(()=>{"use strict";hr();yzi();Wur=ue.union("type",{"query-parameter":Gur}).transform({transform:e=>e,untransform:e=>e})});var Hur,Ezi=h(()=>{"use strict";hr();Azi();bzi();ODt();Hur=ue.object({algorithm:qur,encoding:lye.optional(),location:Wur})});var Kur,Izi=h(()=>{"use strict";hr();Kur=ue.enum_(["sha256","sha1","sha384","sha512"])});var Jur,vzi=h(()=>{"use strict";hr();Jur=ue.object({"port-variants":ue.boolean().optional(),"legacy-query-encoding":ue.boolean().optional()})});var Yur,xzi=h(()=>{"use strict";hr();Ezi();Lur();Izi();ODt();Vur();vzi();Yur=ue.object({header:ue.string(),algorithm:Kur.optional(),encoding:lye.optional(),"signature-prefix":ue.string().optional(),"payload-format":EWe.optional(),timestamp:IWe.optional(),"body-hash-binding":Hur.optional(),"url-normalization":Jur.optional()})});var vWe,Xur=h(()=>{"use strict";hr();gzi();xzi();vWe=ue.union("type",{hmac:Yur,asymmetric:_ur}).transform({transform:e=>e,untransform:e=>e})});var Zur,Czi=h(()=>{"use strict";hr();dY();sue();hY();Pp();tQi();Q2e();Hcr();Ycr();czi();pzi();Xur();Zur=ue.object({method:kur,headers:ue.record(ue.string(),xU).optional(),payload:jur,signature:vWe.optional(),response:gWe.optional(),"response-stream":AWe.optional(),examples:ue.list(vcr).optional()}).extend(NP).extend(NS).extend(ho).extend(jS)});var $ur,wzi=h(()=>{"use strict";hr();z2e();TDt();$ur=ue.object({name:ue.string(),extends:CU.optional(),properties:ue.record(ue.string(),uye).optional()})});var elr,Szi=h(()=>{"use strict";hr();Pp();elr=ue.object({type:ue.string()}).extend(ho)});var tlr,Tzi=h(()=>{"use strict";hr();wzi();Szi();tlr=ue.undiscriminatedUnion([ue.string(),elr,$ur])});var rlr,Ozi=h(()=>{"use strict";hr();rlr=ue.enum_(["client","server"])});var nlr,Bzi=h(()=>{"use strict";hr();sWe();hY();Sji();Tzi();Ozi();nlr=ue.object({origin:rlr,body:tlr}).extend(mY).extend(jS).extend(Yar)});var ilr,Pzi=h(()=>{"use strict";hr();sWe();hY();nQi();Q2e();mWe();Qcr();Bzi();ilr=ue.object({auth:ue.boolean(),url:ue.string().optional(),path:ue.string(),"connect-method-name":ue.string().optional(),headers:ue.record(ue.string(),xU).optional(),"path-parameters":ue.record(ue.string(),gY).optional(),"query-parameters":ue.record(ue.string(),hWe).optional(),messages:ue.record(ue.string(),nlr).optional(),examples:ue.list(Ccr).optional()}).extend(mY).extend(jS)});var olr,Dzi=h(()=>{"use strict";hr();Pp();_ji();UQi();azi();Czi();Xur();Pzi();olr=ue.object({imports:ue.record(ue.string(),ue.string()).optional(),types:ue.record(ue.string(),Rur).optional(),service:fur.optional(),errors:ue.record(ue.string(),pcr).optional(),webhooks:ue.record(ue.string(),Zur).optional(),"webhook-signature":vWe.optional(),channel:ilr.optional()}).extend(ho)});var slr,Rzi=h(()=>{"use strict";hr();slr=ue.object({strategy:ue.stringLiteral("property"),"property-name":ue.string()})});var alr,kzi=h(()=>{"use strict";hr();alr=ue.object({strategy:ue.stringLiteral("status-code")})});var clr,Fzi=h(()=>{"use strict";hr();Rzi();kzi();clr=ue.undiscriminatedUnion([slr,alr])});var ulr,Nzi=h(()=>{"use strict";hr();ulr=ue.object({dependency:ue.string(),url:ue.string().optional()})});var llr,jzi=h(()=>{"use strict";hr();Nzi();llr=ue.undiscriminatedUnion([ue.string(),ulr])});var plr,Qzi=h(()=>{"use strict";hr();plr=ue.undiscriminatedUnion([ue.string(),ue.list(ue.string())])});var cSa,uSa=h(()=>{"use strict";hr();Dzi();jzi();Qzi();cSa=ue.object({navigation:plr.optional(),export:llr.optional()}).extend(olr)});var flr,zzi=h(()=>{"use strict";hr();Pp();flr=ue.object({in:ue.string().optional(),target:ue.string().optional(),type:ue.string().optional(),env:ue.string().optional(),default:ue.unknown().optional(),optional:ue.boolean().optional(),apply:ue.string().optional(),"parameter-name":ue.string().optional()}).extend(ho)});var dlr,Mzi=h(()=>{"use strict";hr();dlr=ue.object({name:ue.string().optional(),env:ue.string().optional(),value:ue.string()})});var mlr,Lzi=h(()=>{"use strict";hr();Mzi();mlr=ue.undiscriminatedUnion([ue.string(),dlr])});var hlr,Uzi=h(()=>{"use strict";hr();hlr=ue.object({name:ue.string().optional(),env:ue.string().optional(),value:ue.string()})});var glr,Vzi=h(()=>{"use strict";hr();Uzi();glr=ue.undiscriminatedUnion([ue.string(),hlr])});var Alr,_zi=h(()=>{"use strict";hr();Pp();Fx();Alr=ue.object({value:ue.string()}).extend(ho).extend(tf)});var ylr,qzi=h(()=>{"use strict";hr();_zi();ylr=ue.undiscriminatedUnion([ue.string(),Alr])});var xWe,blr=h(()=>{"use strict";hr();Vzi();qzi();xWe=ue.object({default:ue.string().optional(),values:ue.list(ylr),header:glr})});var Elr,Gzi=h(()=>{"use strict";hr();Pp();Fx();blr();Elr=ue.object({value:ue.string(),versions:xWe.optional()}).extend(ho).extend(tf)});var Ilr,Wzi=h(()=>{"use strict";hr();Gzi();Ilr=ue.undiscriminatedUnion([ue.string(),Elr])});var vlr,Hzi=h(()=>{"use strict";hr();Lzi();Wzi();vlr=ue.object({default:ue.string().optional(),values:ue.list(Ilr),header:mlr})});var xlr,Kzi=h(()=>{"use strict";hr();Pp();xlr=ue.object({type:ue.string()}).extend(ho)});var Clr,Jzi=h(()=>{"use strict";hr();Kzi();Clr=ue.undiscriminatedUnion([ue.string(),xlr])});var wlr,Yzi=h(()=>{"use strict";hr();Q2e();wlr=ue.object({headers:ue.record(ue.string(),xU).optional()})});var lSa,pSa=h(()=>{"use strict";hr();yji();hY();Pp();Mji();zzi();rur();Hzi();Q2e();mWe();Jzi();blr();Fzi();Yzi();lSa=ue.object({name:ue.string(),imports:ue.record(ue.string(),ue.string()).optional(),"error-discrimination":clr.optional(),audiences:ue.list(ue.string()).optional(),errors:ue.list(ue.string()).optional(),"base-path":ue.string().optional(),"path-parameters":ue.record(ue.string(),gY).optional(),"idempotency-headers":ue.record(ue.string(),xU).optional(),variables:ue.record(ue.string(),Clr).optional(),"global-parameters":ue.record(ue.string(),flr).optional(),pagination:yWe.optional(),product:vlr.optional(),version:xWe.optional()}).extend(ho).extend(jS).extend(ccr).extend(Gar).extend(wlr)});var Xzi=h(()=>{"use strict";Dzi();Fzi();jzi();Nzi();Qzi();uSa();Rzi();pSa();kzi();Yzi()});var Zzi={};Z(Zzi,{DefinitionFileSchema:()=>olr,ErrorDiscriminationSchema:()=>clr,Export:()=>llr,ExportDetailed:()=>ulr,Navigation:()=>plr,PackageMarkerFileSchema:()=>cSa,PropertyBasedErrorDiscrimination:()=>slr,RootApiFileSchema:()=>lSa,StatusCodeBasedErrorDiscrimination:()=>alr,WithHeadersSchema:()=>wlr});var fSa=h(()=>{"use strict";Xzi()});var $zi=h(()=>{"use strict";zzi()});var eMi={};Z(eMi,{GlobalParameterDeclarationSchema:()=>flr});var dSa=h(()=>{"use strict";$zi()});var tMi=h(()=>{"use strict";OQi();BQi();PQi();rur();DQi();RQi()});var rMi={};Z(rMi,{CursorPaginationSchema:()=>Xcr,CustomPaginationSchema:()=>Zcr,OffsetPaginationSchema:()=>$cr,PaginationSchema:()=>yWe,PathPaginationSchema:()=>eur,UriPaginationSchema:()=>tur});var mSa=h(()=>{"use strict";tMi()});var nMi=h(()=>{"use strict";Mzi();Lzi();Hzi();Wzi();Gzi()});var iMi={};Z(iMi,{ProductDeclarationHeaderObjectSchema:()=>dlr,ProductDeclarationHeaderSchema:()=>mlr,ProductDeclarationSchema:()=>vlr,ProductValue:()=>Ilr,ProductValueDetailed:()=>Elr});var hSa=h(()=>{"use strict";nMi()});var oMi=h(()=>{"use strict";AQi();MQi();pQi();LQi();lQi();uQi();Q2e();yQi();bQi();EQi();fQi();mWe();Qcr();IQi();CQi();vQi();xQi();Hcr();wQi();Ycr();TQi();UQi();kQi();gQi();NQi();jQi();FQi();zQi();QQi();lur();SQi();hQi();mQi()});var sMi={};Z(sMi,{FormDataBodyEncodingStyle:()=>zcr,GrpcTransport:()=>uur,HttpEndpointAuth:()=>Dcr,HttpEndpointSchema:()=>pur,HttpEndpointSecurity:()=>Pcr,HttpEndpointSecurityItem:()=>Bcr,HttpHeaderSchema:()=>xU,HttpInlineFileRequestBodyPropertySchema:()=>Mcr,HttpInlineRequestBodyPropertySchema:()=>Lcr,HttpInlineRequestBodySchema:()=>Ucr,HttpMethodSchema:()=>Rcr,HttpPathParameterSchema:()=>gY,HttpQueryParameterSchema:()=>hWe,HttpReferencedRequestBodySchema:()=>Vcr,HttpRequest:()=>Gcr,HttpRequestBodySchema:()=>_cr,HttpRequestSchema:()=>qcr,HttpResponseSchema:()=>gWe,HttpResponseSchemaDetailed:()=>Wcr,HttpResponseStreamSchema:()=>AWe,HttpResponseStreamSchemaDetailed:()=>Jcr,HttpServiceSchema:()=>fur,Pagination:()=>nur,QueryParameterTypeReferenceDetailed:()=>jcr,ResponseError:()=>our,ResponseErrorWithDocsSchema:()=>iur,ResponseErrorsSchema:()=>sur,RetriesConfiguration:()=>cur,RetriesDisabledSchema:()=>aur,ServiceTransport:()=>bWe,StreamFormat:()=>Kcr,TypeReferenceDeclarationWithEnvOverride:()=>Ncr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>Fcr});var gSa=h(()=>{"use strict";oMi()});var aMi=h(()=>{"use strict";sQi();aQi();SDt()});var cMi={};Z(cMi,{OpenApiSourceSchema:()=>wcr,ProtobufSourceSchema:()=>Scr,SourceSchema:()=>cye});var ASa=h(()=>{"use strict";aMi()});var ySa,bSa=h(()=>{"use strict";hr();j2e();ySa=ue.undiscriminatedUnion([ue.string(),vU])});var uMi=h(()=>{"use strict";VQi();M2e();Tcr();XQi();YQi();ezi();$Qi();ZQi();z2e();tzi();TDt();rzi();nzi();izi();ozi();GQi();qQi();_Qi();WQi();azi();j2e();bSa();cQi();dWe();szi();JQi();KQi();HQi()});var lMi={};Z(lMi,{AliasSchema:()=>dur,BaseTypeDeclarationSchema:()=>wU,BaseTypeReferenceSchema:()=>fWe,CasingOverridesSchema:()=>vur,DiscriminatedUnionSchema:()=>Iur,EnumSchema:()=>wur,EnumValue:()=>Cur,EnumValueSchema:()=>xur,ObjectExtendsSchema:()=>CU,ObjectPropertyAccess:()=>Sur,ObjectPropertySchema:()=>uye,ObjectPropertyWithAccessSchema:()=>Tur,ObjectSchema:()=>Our,SingleUndiscriminatedUnionTypeDetailedSchema:()=>Bur,SingleUndiscriminatedUnionTypeSchema:()=>Pur,SingleUnionTypeDetailedSchema:()=>gur,SingleUnionTypeKey:()=>hur,SingleUnionTypeKeySchema:()=>mur,SingleUnionTypeSchema:()=>Aur,TypeDeclarationSchema:()=>Rur,TypeReferenceDeclarationWithName:()=>vU,TypeReferenceDeclarationWithNameSchema:()=>ySa,TypeReferenceDetailedSchema:()=>Ocr,TypeReferenceSchema:()=>n7,UndiscriminatedUnionSchema:()=>Dur,UnionDiscriminant:()=>Eur,UnionDiscriminantSchema:()=>bur,UnionDiscriminatorContext:()=>yur});var ESa=h(()=>{"use strict";uMi()});var pMi=h(()=>{"use strict";Tji();Oji();Bji();Pji();wDt()});var fMi={};Z(fMi,{ListValidationSchema:()=>Xar,MapValidationSchema:()=>Zar,NumberValidationSchema:()=>$ar,StringValidationSchema:()=>ecr,ValidationSchema:()=>sye});var ISa=h(()=>{"use strict";pMi()});var dMi=h(()=>{"use strict";Kzi();Jzi();dQi()});var mMi={};Z(mMi,{VariableDeclarationDetailed:()=>xlr,VariableDeclarationSchema:()=>Clr,VariableReferenceSchema:()=>kcr});var vSa=h(()=>{"use strict";dMi()});var hMi=h(()=>{"use strict";Uzi();Vzi();blr();qzi();_zi()});var gMi={};Z(gMi,{VersionDeclarationHeaderObjectSchema:()=>hlr,VersionDeclarationHeaderSchema:()=>glr,VersionDeclarationSchema:()=>xWe,VersionValue:()=>ylr,VersionValueDetailed:()=>Alr});var xSa=h(()=>{"use strict";hMi()});var AMi=h(()=>{"use strict";fzi();gzi();xzi();Azi();Ezi();bzi();yzi();uzi();czi();dzi();mzi();Lur();pzi();lzi();Czi();Izi();ODt();Xur();hzi();Vur();vzi()});var yMi={};Z(yMi,{AsymmetricAlgorithmSchema:()=>Qur,AsymmetricSignatureSchema:()=>_ur,HmacSignatureSchema:()=>Yur,WebhookBodyHashAlgorithmSchema:()=>qur,WebhookBodyHashBindingSchema:()=>Hur,WebhookBodyHashLocationSchema:()=>Wur,WebhookBodyHashQueryParameterLocationSchema:()=>Gur,WebhookInlinedPayloadSchema:()=>Fur,WebhookMethodSchema:()=>kur,WebhookPayloadBodySortSchema:()=>zur,WebhookPayloadComponentSchema:()=>Mur,WebhookPayloadFormatSchema:()=>EWe,WebhookPayloadSchema:()=>jur,WebhookReferencedPayloadSchema:()=>Nur,WebhookSchema:()=>Zur,WebhookSignatureAlgorithmSchema:()=>Kur,WebhookSignatureEncodingSchema:()=>lye,WebhookSignatureSchema:()=>vWe,WebhookTimestampFormatSchema:()=>Uur,WebhookTimestampSchema:()=>IWe,WebhookUrlNormalizationSchema:()=>Jur});var CSa=h(()=>{"use strict";AMi()});var bMi=h(()=>{"use strict";wzi();Tzi();Bzi();Szi();Pzi();Ozi()});var EMi={};Z(EMi,{WebSocketChannelInlinedMessageSchema:()=>$ur,WebSocketChannelMessageBodySchema:()=>tlr,WebSocketChannelMessageSchema:()=>nlr,WebSocketChannelReferencedMessageSchema:()=>elr,WebSocketChannelSchema:()=>ilr,WebSocketOrigin:()=>rlr});var wSa=h(()=>{"use strict";bMi()});var SSa=h(()=>{"use strict";Xwa();bji();Zwa();xji();tSa();Dji();rSa();Fji();nSa();Lji();iSa();qji();aSa();iQi();fSa();Xzi();dSa();$zi();mSa();tMi();hSa();nMi();gSa();oMi();ASa();aMi();ESa();uMi();ISa();pMi();vSa();dMi();xSa();hMi();CSa();AMi();wSa();bMi()});var IMi={};Z(IMi,{AliasSchema:()=>dur,AnyAuthItem:()=>har,AnyAuthSchemesSchema:()=>gar,ApiAuthSchema:()=>bar,AsymmetricAlgorithmSchema:()=>Qur,AsymmetricSignatureSchema:()=>_ur,AuthSchemeDeclarationSchema:()=>_ar,AuthSchemeKey:()=>iWe,AuthSchemeReferenceSchema:()=>tWe,AuthScope:()=>nWe,AuthVariable:()=>N2e,AvailabilitySchema:()=>Har,AvailabilityStatusSchema:()=>oWe,AvailabilityUnionSchema:()=>Kar,BaseTypeDeclarationSchema:()=>wU,BaseTypeReferenceSchema:()=>fWe,BasicAuthSchemeSchema:()=>xar,BearerAuthSchemeSchema:()=>Bar,CasingOverridesSchema:()=>vur,CursorPaginationSchema:()=>Xcr,CustomPaginationSchema:()=>Zcr,DeclarationSchema:()=>mY,DeclarationWithNameSchema:()=>$wa,DeclarationWithoutDocsSchema:()=>Jar,DefinitionFileSchema:()=>olr,DiscriminatedUnionSchema:()=>Iur,EncodingSchema:()=>cWe,EndpointSecuritySchema:()=>yar,EndpointSecuritySchemaDetails:()=>Aar,EnumSchema:()=>wur,EnumValue:()=>Cur,EnumValueSchema:()=>xur,EnvironmentSchema:()=>acr,ErrorDeclarationSchema:()=>pcr,ErrorDiscriminationSchema:()=>clr,ExampleBodyResponseSchema:()=>fcr,ExampleCodeSampleSchema:()=>gcr,ExampleCodeSampleSchemaLanguage:()=>dcr,ExampleCodeSampleSchemaSdk:()=>hcr,ExampleEndpointCallArraySchema:()=>oSa,ExampleEndpointCallSchema:()=>pWe,ExampleResponseSchema:()=>Ecr,ExampleSseEventSchema:()=>Acr,ExampleSseResponseSchema:()=>ycr,ExampleStreamResponseSchema:()=>bcr,ExampleTypeReferenceSchema:()=>pw,ExampleTypeSchema:()=>lWe,ExampleTypeValueSchema:()=>ucr,ExampleWebSocketMessage:()=>xcr,ExampleWebSocketSession:()=>Ccr,ExampleWebhookCallSchema:()=>vcr,Export:()=>llr,ExportDetailed:()=>ulr,FormDataBodyEncodingStyle:()=>zcr,GlobalParameterDeclarationSchema:()=>flr,GrpcTransport:()=>uur,HeaderAuthSchemeSchema:()=>Par,HmacSignatureSchema:()=>Yur,HttpEndpointAuth:()=>Dcr,HttpEndpointSchema:()=>pur,HttpEndpointSecurity:()=>Pcr,HttpEndpointSecurityItem:()=>Bcr,HttpHeaderSchema:()=>xU,HttpInlineFileRequestBodyPropertySchema:()=>Mcr,HttpInlineRequestBodyPropertySchema:()=>Lcr,HttpInlineRequestBodySchema:()=>Ucr,HttpMethodSchema:()=>Rcr,HttpPathParameterSchema:()=>gY,HttpQueryParameterSchema:()=>hWe,HttpReferencedRequestBodySchema:()=>Vcr,HttpRequest:()=>Gcr,HttpRequestBodySchema:()=>_cr,HttpRequestSchema:()=>qcr,HttpResponseSchema:()=>gWe,HttpResponseSchemaDetailed:()=>Wcr,HttpResponseStreamSchema:()=>AWe,HttpResponseStreamSchemaDetailed:()=>Jcr,HttpServiceSchema:()=>fur,InferredAuthenticatedRequestHeader:()=>Car,InferredBearerAuthSchema:()=>Tar,InferredGetTokenEndpointSchema:()=>Sar,InferredGetTokenEndpointSchemaObject:()=>war,ListValidationSchema:()=>Xar,MapValidationSchema:()=>Zar,MultipleBaseUrlsEnvironmentSchema:()=>ocr,Navigation:()=>plr,NumberValidationSchema:()=>$ar,OAuthAccessTokenRequestPropertiesSchema:()=>kar,OAuthAccessTokenResponsePropertiesSchema:()=>Far,OAuthFlowTypeSchema:()=>Rar,OAuthGetTokenEndpointSchema:()=>Nar,OAuthPkceSchema:()=>jar,OAuthRefreshTokenEndpointSchema:()=>Mar,OAuthRefreshTokenRequestPropertiesSchema:()=>Qar,OAuthRefreshTokenResponsePropertiesSchema:()=>zar,OAuthSchemeSchema:()=>Var,ObjectExtendsSchema:()=>CU,ObjectPropertyAccess:()=>Sur,ObjectPropertySchema:()=>uye,ObjectPropertyWithAccessSchema:()=>Tur,ObjectSchema:()=>Our,OffsetPaginationSchema:()=>$cr,OpenApiSourceSchema:()=>wcr,PackageMarkerFileSchema:()=>cSa,Pagination:()=>nur,PaginationSchema:()=>yWe,PathPaginationSchema:()=>eur,ProductDeclarationHeaderObjectSchema:()=>dlr,ProductDeclarationHeaderSchema:()=>mlr,ProductDeclarationSchema:()=>vlr,ProductValue:()=>Ilr,ProductValueDetailed:()=>Elr,PropertyBasedErrorDiscrimination:()=>slr,ProtobufSourceSchema:()=>Scr,ProtobufTypeSchema:()=>rcr,QueryParameterTypeReferenceDetailed:()=>jcr,RedirectUriSchema:()=>Uar,RedirectUriWithBackupPortsSchema:()=>Lar,ResponseError:()=>our,ResponseErrorWithDocsSchema:()=>iur,ResponseErrorsSchema:()=>sur,RetriesConfiguration:()=>cur,RetriesDisabledSchema:()=>aur,RootApiFileSchema:()=>lSa,ServerVariableSchema:()=>uWe,ServiceTransport:()=>bWe,SingleBaseUrlEnvironmentSchema:()=>scr,SingleUndiscriminatedUnionTypeDetailedSchema:()=>Bur,SingleUndiscriminatedUnionTypeSchema:()=>Pur,SingleUnionTypeDetailedSchema:()=>gur,SingleUnionTypeKey:()=>hur,SingleUnionTypeKeySchema:()=>mur,SingleUnionTypeSchema:()=>Aur,SourceSchema:()=>cye,StatusCodeBasedErrorDiscrimination:()=>alr,StreamFormat:()=>Kcr,StringValidationSchema:()=>ecr,SupportedSdkLanguageSchema:()=>mcr,TokenBearerAuthSchema:()=>Oar,TypeDeclarationSchema:()=>Rur,TypeReferenceDeclarationWithEnvOverride:()=>Ncr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>Fcr,TypeReferenceDeclarationWithName:()=>vU,TypeReferenceDeclarationWithNameSchema:()=>ySa,TypeReferenceDetailedSchema:()=>Ocr,TypeReferenceSchema:()=>n7,UndiscriminatedUnionSchema:()=>Dur,UnionDiscriminant:()=>Eur,UnionDiscriminantSchema:()=>bur,UnionDiscriminatorContext:()=>yur,UriPaginationSchema:()=>tur,ValidationSchema:()=>sye,VariableDeclarationDetailed:()=>xlr,VariableDeclarationSchema:()=>Clr,VariableReferenceSchema:()=>kcr,VersionDeclarationHeaderObjectSchema:()=>hlr,VersionDeclarationHeaderSchema:()=>glr,VersionDeclarationSchema:()=>xWe,VersionValue:()=>ylr,VersionValueDetailed:()=>Alr,WebSocketChannelInlinedMessageSchema:()=>$ur,WebSocketChannelMessageBodySchema:()=>tlr,WebSocketChannelMessageSchema:()=>nlr,WebSocketChannelReferencedMessageSchema:()=>elr,WebSocketChannelSchema:()=>ilr,WebSocketOrigin:()=>rlr,WebhookBodyHashAlgorithmSchema:()=>qur,WebhookBodyHashBindingSchema:()=>Hur,WebhookBodyHashLocationSchema:()=>Wur,WebhookBodyHashQueryParameterLocationSchema:()=>Gur,WebhookInlinedPayloadSchema:()=>Fur,WebhookMethodSchema:()=>kur,WebhookPayloadBodySortSchema:()=>zur,WebhookPayloadComponentSchema:()=>Mur,WebhookPayloadFormatSchema:()=>EWe,WebhookPayloadSchema:()=>jur,WebhookReferencedPayloadSchema:()=>Nur,WebhookSchema:()=>Zur,WebhookSignatureAlgorithmSchema:()=>Kur,WebhookSignatureEncodingSchema:()=>lye,WebhookSignatureSchema:()=>vWe,WebhookTimestampFormatSchema:()=>Uur,WebhookTimestampSchema:()=>IWe,WebhookUrlNormalizationSchema:()=>Jur,WithAudiences:()=>NS,WithAuthSchema:()=>Gar,WithAvailability:()=>NP,WithDisplayName:()=>jS,WithDocsSchema:()=>ho,WithEnvironmentVariable:()=>rWe,WithEnvironmentsSchema:()=>ccr,WithHeadersSchema:()=>wlr,WithMethodName:()=>Yar,WithName:()=>tf,WithValidation:()=>aWe,auth:()=>Eji,availability:()=>Cji,commons:()=>Rji,encoding:()=>Nji,environments:()=>Uji,errors:()=>Gji,examples:()=>oQi,file:()=>Zzi,globalParameters:()=>eMi,pagination:()=>rMi,products:()=>iMi,service:()=>sMi,source:()=>cMi,types:()=>lMi,validation:()=>fMi,variables:()=>mMi,versioning:()=>gMi,webhooks:()=>yMi,websocket:()=>EMi});var TSa=h(()=>{"use strict";SSa()});function Nhf({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: ${jCa(r,void 0,2)}`),n.join(`
|
|
99
99
|
`)}var BDt,OSa=h(()=>{"use strict";QCa();BDt=class extends Error{statusCode;body;rawResponse;constructor({message:t,statusCode:r,body:n,rawResponse:i}){super(Nhf({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}}});var PDt,BSa=h(()=>{"use strict";PDt=class extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}});var PSa=h(()=>{"use strict";OSa();BSa()});var Qm={};Z(Qm,{AsymmetricAlgorithmSchema:()=>Yxa,AvailabilityStatusSchema:()=>UEa,FernDefinitionError:()=>BDt,FernDefinitionTimeoutError:()=>PDt,FormDataBodyEncodingStyle:()=>fva,HttpMethodSchema:()=>xva,OAuthFlowTypeSchema:()=>SEa,ObjectPropertyAccess:()=>uxa,StreamFormat:()=>qva,SupportedSdkLanguageSchema:()=>kIa,UnionDiscriminatorContext:()=>Oxa,WebSocketOrigin:()=>DCa,WebhookBodyHashAlgorithmSchema:()=>eCa,WebhookMethodSchema:()=>sCa,WebhookPayloadBodySortSchema:()=>cCa,WebhookPayloadComponentSchema:()=>lCa,WebhookSignatureAlgorithmSchema:()=>gCa,WebhookSignatureEncodingSchema:()=>yCa,WebhookTimestampFormatSchema:()=>ICa,auth:()=>iNi,availability:()=>sNi,commons:()=>tIa,encoding:()=>oIa,environments:()=>fIa,errors:()=>hIa,examples:()=>fNi,file:()=>WIa,globalParameters:()=>JIa,pagination:()=>nva,products:()=>lva,serialization:()=>IMi,service:()=>yNi,source:()=>Zva,types:()=>INi,validation:()=>jxa,variables:()=>Uxa,versioning:()=>Kxa,webhooks:()=>SNi,websocket:()=>ONi});var DSa=h(()=>{"use strict";NCa();TSa();PSa()});function vMi(e){return e.scheme==="oauth"}var RSa=h(()=>{"use strict"});var kSa=h(()=>{"use strict";RSa()});var jhf,FSa,NSa=h(()=>{"use strict";jhf={optional:"optional",nullable:"nullable",set:"set",list:"list",map:"map",literal:"literal"},FSa=new Set(Object.values(jhf))});function dE(e){let t=e.match(/([\w.]+)<([\w,\s]+)>/);if(t?.[0]!=null&&t[1]!=null&&t[2]!=null&&!FSa.has(t[1].trim()))return{name:t[1].trim(),arguments:t[2].split(",").map(r=>r.trim())}}var xMi=h(()=>{"use strict";NSa()});function SU(e){return dE(e)!=null}var jSa=h(()=>{"use strict";xMi()});var QSa=h(()=>{"use strict";jSa();xMi()});function CMi(e){if(e.request!=null)return typeof e.request=="string"?e.request:e.request.body}var zSa=h(()=>{"use strict"});var aue,MSa=h(()=>{"use strict";aue=class{REFERENCE_REGEX=/^(?:(\w+)::)?(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/;validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let n=t.match(this.REFERENCE_REGEX);if(!(n==null||n[2]==null||n[3]==null))return{namespace:n[1],method:n[2],path:n[3]}}}});function xg(e){return typeof e=="string"?!1:e?.extends!=null||e?.properties!=null}var wMi=h(()=>{"use strict"});function L2e(e){return e?e.proto!=null:!1}var LSa=h(()=>{"use strict"});function pye(e){return e===Qhf}var Qhf,USa=h(()=>{"use strict";Qhf="text"});var VSa=h(()=>{"use strict"});var _Sa=h(()=>{"use strict"});var SMi=h(()=>{"use strict";VSa();_Sa()});var qSa={};var GSa=h(()=>{"use strict";SMi()});var WSa=h(()=>{"use strict"});var yp,HSa=h(()=>{"use strict";Vr();yp={bearer:e=>({...e,type:"bearer",_visit:function(t){return yp._visit(this,t)}}),basic:e=>({...e,type:"basic",_visit:function(t){return yp._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return yp._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return yp._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return yp._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"bearer":return t.bearer(e);case"basic":return t.basic(e);case"header":return t.header(e);case"oauth":return t.oauth(e);case"inferred":return t.inferred(e);default:return t._other(e)}}}});var KSa=h(()=>{"use strict"});var zhf,fw,JSa=h(()=>{"use strict";zhf={All:"ALL",Any:"ANY",EndpointSecurity:"ENDPOINT_SECURITY"},fw={...zhf,_visit:(e,t)=>{switch(e){case fw.All:return t.all();case fw.Any:return t.any();case fw.EndpointSecurity:return t.endpointSecurity();default:return t._other()}}}});var YSa=h(()=>{"use strict"});var XSa=h(()=>{"use strict"});var ZSa=h(()=>{"use strict"});var $Sa=h(()=>{"use strict"});var e1a=h(()=>{"use strict"});var t1a=h(()=>{"use strict"});var r1a=h(()=>{"use strict"});var n1a=h(()=>{"use strict"});var i1a=h(()=>{"use strict"});var o1a=h(()=>{"use strict"});var s1a=h(()=>{"use strict"});var a1a=h(()=>{"use strict"});var c1a=h(()=>{"use strict"});var jP,u1a=h(()=>{"use strict";Vr();jP={clientCredentials:e=>({...e,type:"clientCredentials",_visit:function(t){return jP._visit(this,t)}}),authorizationCode:e=>({...e,type:"authorizationCode",_visit:function(t){return jP._visit(this,t)}}),deviceCode:e=>({...e,type:"deviceCode",_visit:function(t){return jP._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"clientCredentials":return t.clientCredentials(e);case"authorizationCode":return t.authorizationCode(e);case"deviceCode":return t.deviceCode(e);default:return t._other(e)}}}});var l1a=h(()=>{"use strict"});var p1a=h(()=>{"use strict"});var Mhf,DDt,f1a=h(()=>{"use strict";Mhf={S256:"S256"},DDt={...Mhf,_visit:(e,t)=>e===DDt.S256?t.s256():t._other()}});var i7,d1a=h(()=>{"use strict";Vr();i7={literal:e=>({value:e,type:"literal",_visit:function(t){return i7._visit(this,t)}}),environmentVariable:e=>({value:e,type:"environmentVariable",_visit:function(t){return i7._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"literal":return t.literal(e.value);case"environmentVariable":return t.environmentVariable(e.value);default:return t._other(e)}}}});var m1a=h(()=>{"use strict"});var h1a=h(()=>{"use strict"});var g1a=h(()=>{"use strict"});var A1a=h(()=>{"use strict"});var TMi=h(()=>{"use strict";WSa();HSa();KSa();JSa();YSa();XSa();ZSa();$Sa();e1a();t1a();r1a();n1a();i1a();o1a();s1a();a1a();c1a();u1a();l1a();p1a();f1a();d1a();m1a();h1a();g1a();A1a()});var OMi={};Z(OMi,{AuthScheme:()=>yp,AuthSchemesRequirement:()=>fw,OAuthConfiguration:()=>jP,OAuthPkceMethod:()=>DDt,OAuthPublicClientId:()=>i7});var y1a=h(()=>{"use strict";TMi()});var b1a=h(()=>{"use strict"});var Lhf,zm,E1a=h(()=>{"use strict";Lhf={InDevelopment:"IN_DEVELOPMENT",PreRelease:"PRE_RELEASE",GeneralAvailability:"GENERAL_AVAILABILITY",Deprecated:"DEPRECATED",Alpha:"ALPHA",Beta:"BETA",Preview:"PREVIEW",Legacy:"LEGACY"},zm={...Lhf,_visit:(e,t)=>{switch(e){case zm.InDevelopment:return t.inDevelopment();case zm.PreRelease:return t.preRelease();case zm.GeneralAvailability:return t.generalAvailability();case zm.Deprecated:return t.deprecated();case zm.Alpha:return t.alpha();case zm.Beta:return t.beta();case zm.Preview:return t.preview();case zm.Legacy:return t.legacy();default:return t._other()}}}});var I1a=h(()=>{"use strict"});var v1a=h(()=>{"use strict"});var x1a=h(()=>{"use strict"});var C1a=h(()=>{"use strict"});var w1a=h(()=>{"use strict"});var S1a=h(()=>{"use strict"});var T1a=h(()=>{"use strict"});var O1a=h(()=>{"use strict"});var B1a=h(()=>{"use strict"});var P1a=h(()=>{"use strict"});var D1a=h(()=>{"use strict"});var R1a=h(()=>{"use strict"});var k1a=h(()=>{"use strict"});var F1a=h(()=>{"use strict"});var N1a=h(()=>{"use strict"});var j1a=h(()=>{"use strict"});var Q1a=h(()=>{"use strict"});var z1a=h(()=>{"use strict"});var M1a=h(()=>{"use strict"});var L1a=h(()=>{"use strict"});var U1a=h(()=>{"use strict"});var V1a=h(()=>{"use strict"});var _1a=h(()=>{"use strict"});var BMi=h(()=>{"use strict";b1a();E1a();I1a();v1a();x1a();C1a();w1a();S1a();T1a();O1a();B1a();P1a();D1a();R1a();k1a();F1a();N1a();j1a();Q1a();z1a();M1a();L1a();U1a();V1a();_1a()});var PMi={};Z(PMi,{AvailabilityStatus:()=>zm});var q1a=h(()=>{"use strict";BMi()});var G1a=h(()=>{"use strict"});var DMi=h(()=>{"use strict";G1a()});var W1a={};var H1a=h(()=>{"use strict";DMi()});var K1a,J1a=h(()=>{"use strict";Vr();K1a={basic:e=>({...e,type:"basic",_visit:function(t){return $t.Auth._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return $t.Auth._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return $t.Auth._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return $t.Auth._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return $t.Auth._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"oauth":return t.oauth(e);case"inferred":return t.inferred(e);default:return t._other(e)}}}});var Y1a,X1a=h(()=>{"use strict";Vr();Y1a={basic:e=>({...e,type:"basic",_visit:function(t){return $t.AuthValues._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return $t.AuthValues._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return $t.AuthValues._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return $t.AuthValues._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return $t.AuthValues._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"oauth":return t.oauth(e);case"inferred":return t.inferred(e);default:return t._other(e)}}}});var Z1a=h(()=>{"use strict"});var $1a=h(()=>{"use strict"});var eTa=h(()=>{"use strict"});var tTa=h(()=>{"use strict"});var rTa=h(()=>{"use strict"});var nTa=h(()=>{"use strict"});var iTa=h(()=>{"use strict"});var oTa=h(()=>{"use strict"});var sTa=h(()=>{"use strict"});var aTa=h(()=>{"use strict"});var RMi=h(()=>{"use strict";J1a();X1a();Z1a();$1a();eTa();tTa();rTa();nTa();iTa();oTa();sTa();aTa()});var kMi={};Z(kMi,{Auth:()=>K1a,AuthValues:()=>Y1a});var cTa=h(()=>{"use strict";RMi()});var uTa=h(()=>{"use strict"});var lTa=h(()=>{"use strict"});var pTa=h(()=>{"use strict"});var fTa=h(()=>{"use strict"});var dTa=h(()=>{"use strict"});var mTa=h(()=>{"use strict"});var hTa=h(()=>{"use strict"});var gTa=h(()=>{"use strict"});var ATa=h(()=>{"use strict"});var FMi=h(()=>{"use strict";uTa();lTa();pTa();fTa();dTa();mTa();hTa();gTa();ATa()});var yTa={};var bTa=h(()=>{"use strict";FMi()});var ETa=h(()=>{"use strict"});var NMi=h(()=>{"use strict";ETa()});var ITa={};var vTa=h(()=>{"use strict";NMi()});var xTa=h(()=>{"use strict"});var CTa=h(()=>{"use strict"});var wTa=h(()=>{"use strict"});var STa=h(()=>{"use strict"});var TTa=h(()=>{"use strict"});var OTa,BTa=h(()=>{"use strict";Vr();OTa={file:e=>({...e,type:"file",_visit:function(t){return $t.FileUploadRequestBodyProperty._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return $t.FileUploadRequestBodyProperty._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return $t.FileUploadRequestBodyProperty._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"fileArray":return t.fileArray(e);case"bodyProperty":return t.bodyProperty(e);default:return t._other(e)}}}});var PTa=h(()=>{"use strict"});var DTa,RTa=h(()=>{"use strict";Vr();DTa={properties:e=>({value:e,type:"properties",_visit:function(t){return $t.InlinedRequestBody._visit(this,t)}}),referenced:e=>({...e,type:"referenced",_visit:function(t){return $t.InlinedRequestBody._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return $t.InlinedRequestBody._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"properties":return t.properties(e.value);case"referenced":return t.referenced(e);case"fileUpload":return t.fileUpload(e);default:return t._other(e)}}}});var kTa=h(()=>{"use strict"});var FTa=h(()=>{"use strict"});var NTa,jTa=h(()=>{"use strict";Vr();NTa={bytes:()=>({type:"bytes",_visit:function(e){return $t.ReferencedRequestBodyType._visit(this,e)}}),typeReference:e=>({value:e,type:"typeReference",_visit:function(t){return $t.ReferencedRequestBodyType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"bytes":return t.bytes();case"typeReference":return t.typeReference(e.value);default:return t._other(e)}}}});var QTa,zTa=h(()=>{"use strict";Vr();QTa={body:e=>({...e,type:"body",_visit:function(t){return $t.Request._visit(this,t)}}),inlined:e=>({...e,type:"inlined",_visit:function(t){return $t.Request._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"body":return t.body(e);case"inlined":return t.inlined(e);default:return t._other(e)}}}});var MTa,LTa=h(()=>{"use strict";Vr();MTa={json:()=>({type:"json",_visit:function(e){return $t.Response._visit(this,e)}}),streaming:()=>({type:"streaming",_visit:function(e){return $t.Response._visit(this,e)}}),streamParameter:()=>({type:"streamParameter",_visit:function(e){return $t.Response._visit(this,e)}}),fileDownload:()=>({type:"fileDownload",_visit:function(e){return $t.Response._visit(this,e)}}),text:()=>({type:"text",_visit:function(e){return $t.Response._visit(this,e)}}),bytes:()=>({type:"bytes",_visit:function(e){return $t.Response._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json();case"streaming":return t.streaming();case"streamParameter":return t.streamParameter();case"fileDownload":return t.fileDownload();case"text":return t.text();case"bytes":return t.bytes();default:return t._other(e)}}}});var jMi=h(()=>{"use strict";xTa();CTa();wTa();STa();TTa();BTa();PTa();RTa();kTa();FTa();jTa();zTa();LTa()});var QMi={};Z(QMi,{FileUploadRequestBodyProperty:()=>OTa,InlinedRequestBody:()=>DTa,ReferencedRequestBodyType:()=>NTa,Request:()=>QTa,Response:()=>MTa});var UTa=h(()=>{"use strict";jMi()});var VTa=h(()=>{"use strict"});var _Ta=h(()=>{"use strict"});var qTa=h(()=>{"use strict"});var GTa,WTa=h(()=>{"use strict";Vr();GTa={singleBaseUrl:e=>({...e,type:"singleBaseUrl",_visit:function(t){return $t.Environments._visit(this,t)}}),multipleBaseUrls:e=>({...e,type:"multipleBaseUrls",_visit:function(t){return $t.Environments._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"singleBaseUrl":return t.singleBaseUrl(e);case"multipleBaseUrls":return t.multipleBaseUrls(e);default:return t._other(e)}}}});var HTa=h(()=>{"use strict"});var KTa=h(()=>{"use strict"});var JTa=h(()=>{"use strict"});var YTa=h(()=>{"use strict"});var XTa=h(()=>{"use strict"});var ZTa=h(()=>{"use strict"});var $Ta=h(()=>{"use strict"});var eOa=h(()=>{"use strict"});var zMi=h(()=>{"use strict";VTa();_Ta();qTa();WTa();HTa();KTa();JTa();YTa();XTa();ZTa();$Ta();eOa()});var MMi={};Z(MMi,{Environments:()=>GTa});var tOa=h(()=>{"use strict";zMi()});var Uhf,fye,rOa=h(()=>{"use strict";Uhf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"},fye={...Uhf,_visit:(e,t)=>{switch(e){case fye.Get:return t.get();case fye.Post:return t.post();case fye.Put:return t.put();case fye.Patch:return t.patch();case fye.Delete:return t.delete();case fye.Head:return t.head();default:return t._other()}}}});var LMi=h(()=>{"use strict";rOa()});var UMi={};Z(UMi,{HttpMethod:()=>fye});var nOa=h(()=>{"use strict";LMi()});var iOa=h(()=>{"use strict"});var oOa=h(()=>{"use strict"});var sOa=h(()=>{"use strict"});var aOa,cOa=h(()=>{"use strict";Vr();aOa={publish:e=>({value:e,type:"publish",_visit:function(t){return $t.GeneratorOutputConfig._visit(this,t)}}),local:()=>({type:"local",_visit:function(e){return $t.GeneratorOutputConfig._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"publish":return t.publish(e.value);case"local":return t.local();default:return t._other(e)}}}});var uOa=h(()=>{"use strict"});var lOa=h(()=>{"use strict"});var pOa=h(()=>{"use strict"});var fOa=h(()=>{"use strict"});var dOa,mOa=h(()=>{"use strict";Vr();dOa={go:e=>({...e,type:"go",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),swift:e=>({...e,type:"swift",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return $t.PublishInfo._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"go":return t.go(e);case"swift":return t.swift(e);case"maven":return t.maven(e);case"npm":return t.npm(e);case"nuget":return t.nuget(e);case"pypi":return t.pypi(e);case"rubygems":return t.rubygems(e);case"crates":return t.crates(e);default:return t._other(e)}}}});var hOa=h(()=>{"use strict"});var gOa=h(()=>{"use strict"});var AOa=h(()=>{"use strict"});var VMi=h(()=>{"use strict";iOa();oOa();sOa();cOa();uOa();lOa();pOa();fOa();mOa();hOa();gOa();AOa()});var _Mi={};Z(_Mi,{GeneratorOutputConfig:()=>aOa,PublishInfo:()=>dOa});var yOa=h(()=>{"use strict";VMi()});var bOa=h(()=>{"use strict"});var EOa=h(()=>{"use strict"});var IOa=h(()=>{"use strict"});var Vhf,Slr,vOa=h(()=>{"use strict";Vhf={Critical:"CRITICAL",Warning:"WARNING"},Slr={...Vhf,_visit:(e,t)=>{switch(e){case Slr.Critical:return t.critical();case Slr.Warning:return t.warning();default:return t._other()}}}});var xOa=h(()=>{"use strict"});var qMi=h(()=>{"use strict";bOa();EOa();IOa();vOa();xOa()});var GMi={};Z(GMi,{ErrorSeverity:()=>Slr});var COa=h(()=>{"use strict";qMi()});var wOa=h(()=>{"use strict"});var SOa=h(()=>{"use strict"});var TOa=h(()=>{"use strict"});var OOa,BOa=h(()=>{"use strict";Vr();OOa={boolean:e=>({value:e,type:"boolean",_visit:function(t){return $t.LiteralType._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return $t.LiteralType._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 POa=h(()=>{"use strict"});var DOa=h(()=>{"use strict"});var ROa,kOa=h(()=>{"use strict";Vr();ROa={alias:e=>({...e,type:"alias",_visit:function(t){return $t.NamedType._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return $t.NamedType._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return $t.NamedType._visit(this,t)}}),discriminatedUnion:e=>({...e,type:"discriminatedUnion",_visit:function(t){return $t.NamedType._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return $t.NamedType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"alias":return t.alias(e);case"enum":return t.enum(e);case"object":return t.object(e);case"discriminatedUnion":return t.discriminatedUnion(e);case"undiscriminatedUnion":return t.undiscriminatedUnion(e);default:return t._other(e)}}}});var _hf,Tlr,FOa=h(()=>{"use strict";_hf={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"},Tlr={..._hf,_visit:(e,t)=>{switch(e){case Tlr.ReadOnly:return t.readOnly();case Tlr.WriteOnly:return t.writeOnly();default:return t._other()}}}});var NOa=h(()=>{"use strict"});var qhf,QP,jOa=h(()=>{"use strict";qhf={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",DateTimeRfc2822:"DATE_TIME_RFC_2822",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER"},QP={...qhf,_visit:(e,t)=>{switch(e){case QP.Integer:return t.integer();case QP.Long:return t.long();case QP.Uint:return t.uint();case QP.Uint64:return t.uint64();case QP.Float:return t.float();case QP.Double:return t.double();case QP.Boolean:return t.boolean();case QP.String:return t.string();case QP.Date:return t.date();case QP.DateTime:return t.dateTime();case QP.DateTimeRfc2822:return t.dateTimeRfc2822();case QP.Uuid:return t.uuid();case QP.Base64:return t.base64();case QP.BigInteger:return t.bigInteger();default:return t._other()}}}});var QOa,zOa=h(()=>{"use strict";Vr();QOa={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return $t.SingleDiscriminatedUnionType._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return $t.SingleDiscriminatedUnionType._visit(this,t)}}),noProperties:e=>({...e,type:"noProperties",_visit:function(t){return $t.SingleDiscriminatedUnionType._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"samePropertiesAsObject":return t.samePropertiesAsObject(e);case"singleProperty":return t.singleProperty(e);case"noProperties":return t.noProperties(e);default:return t._other(e)}}}});var MOa=h(()=>{"use strict"});var LOa=h(()=>{"use strict"});var UOa=h(()=>{"use strict"});var VOa,_Oa=h(()=>{"use strict";Vr();VOa={list:e=>({value:e,type:"list",_visit:function(t){return $t.TypeReference._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return $t.TypeReference._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return $t.TypeReference._visit(this,t)}}),named:e=>({value:e,type:"named",_visit:function(t){return $t.TypeReference._visit(this,t)}}),nullable:e=>({value:e,type:"nullable",_visit:function(t){return $t.TypeReference._visit(this,t)}}),optional:e=>({value:e,type:"optional",_visit:function(t){return $t.TypeReference._visit(this,t)}}),primitive:e=>({value:e,type:"primitive",_visit:function(t){return $t.TypeReference._visit(this,t)}}),set:e=>({value:e,type:"set",_visit:function(t){return $t.TypeReference._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return $t.TypeReference._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"list":return t.list(e.value);case"literal":return t.literal(e.value);case"map":return t.map(e);case"named":return t.named(e.value);case"nullable":return t.nullable(e.value);case"optional":return t.optional(e.value);case"primitive":return t.primitive(e.value);case"set":return t.set(e.value);case"unknown":return t.unknown();default:return t._other(e)}}}});var qOa=h(()=>{"use strict"});var WMi=h(()=>{"use strict";wOa();SOa();TOa();BOa();POa();DOa();kOa();FOa();NOa();jOa();zOa();MOa();LOa();UOa();_Oa();qOa()});var HMi={};Z(HMi,{LiteralType:()=>OOa,NamedType:()=>ROa,ObjectPropertyAccess:()=>Tlr,PrimitiveTypeV1:()=>QP,SingleDiscriminatedUnionType:()=>QOa,TypeReference:()=>VOa});var GOa=h(()=>{"use strict";WMi()});var WOa=h(()=>{"use strict"});var KMi=h(()=>{"use strict";WOa()});var HOa={};var KOa=h(()=>{"use strict";KMi()});var JOa=h(()=>{"use strict";cTa();RMi();bTa();FMi();vTa();NMi();UTa();jMi();tOa();zMi();nOa();LMi();yOa();VMi();COa();qMi();GOa();WMi();KOa();KMi()});var $t={};Z($t,{Auth:()=>K1a,AuthValues:()=>Y1a,Environments:()=>GTa,ErrorSeverity:()=>Slr,FileUploadRequestBodyProperty:()=>OTa,GeneratorOutputConfig:()=>aOa,HttpMethod:()=>fye,InlinedRequestBody:()=>DTa,LiteralType:()=>OOa,NamedType:()=>ROa,ObjectPropertyAccess:()=>Tlr,PrimitiveTypeV1:()=>QP,PublishInfo:()=>dOa,ReferencedRequestBodyType:()=>NTa,Request:()=>QTa,Response:()=>MTa,SingleDiscriminatedUnionType:()=>QOa,TypeReference:()=>VOa,auth:()=>kMi,commons:()=>yTa,declaration:()=>ITa,endpoints:()=>QMi,environment:()=>MMi,http:()=>UMi,ir:()=>_Mi,snippets:()=>GMi,types:()=>HMi,variables:()=>HOa});var YOa=h(()=>{"use strict";JOa()});var XOa=h(()=>{"use strict"});var ZOa=h(()=>{"use strict"});var $Oa=h(()=>{"use strict"});var u0,eBa=h(()=>{"use strict";Vr();u0={singleBaseUrl:e=>({...e,type:"singleBaseUrl",_visit:function(t){return u0._visit(this,t)}}),multipleBaseUrls:e=>({...e,type:"multipleBaseUrls",_visit:function(t){return u0._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"singleBaseUrl":return t.singleBaseUrl(e);case"multipleBaseUrls":return t.multipleBaseUrls(e);default:return t._other(e)}}}});var tBa=h(()=>{"use strict"});var rBa=h(()=>{"use strict"});var nBa=h(()=>{"use strict"});var iBa=h(()=>{"use strict"});var oBa=h(()=>{"use strict"});var sBa=h(()=>{"use strict"});var aBa=h(()=>{"use strict"});var JMi=h(()=>{"use strict";XOa();ZOa();$Oa();eBa();tBa();rBa();nBa();iBa();oBa();sBa();aBa()});var YMi={};Z(YMi,{Environments:()=>u0});var cBa=h(()=>{"use strict";JMi()});var uBa=h(()=>{"use strict"});var lBa=h(()=>{"use strict"});var dye,pBa=h(()=>{"use strict";Vr();dye={property:e=>({value:e,type:"property",_visit:function(t){return dye._visit(this,t)}}),statusCode:()=>({type:"statusCode",_visit:function(e){return dye._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"property":return t.property(e.value);case"statusCode":return t.statusCode();default:return t._other(e)}}}});var fBa=h(()=>{"use strict"});var XMi=h(()=>{"use strict";uBa();lBa();pBa();fBa()});var ZMi={};Z(ZMi,{ErrorDeclarationDiscriminantValue:()=>dye});var dBa=h(()=>{"use strict";XMi()});var mBa=h(()=>{"use strict"});var hBa=h(()=>{"use strict"});var gBa=h(()=>{"use strict"});var ABa=h(()=>{"use strict"});var yBa=h(()=>{"use strict"});var TU,bBa=h(()=>{"use strict";Vr();TU={basic:e=>({...e,type:"basic",_visit:function(t){return TU._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return TU._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return TU._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return TU._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"oauth":return t.oauth(e);default:return t._other(e)}}}});var EBa=h(()=>{"use strict"});var Ghf,AY,IBa=h(()=>{"use strict";Ghf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"},AY={...Ghf,_visit:(e,t)=>{switch(e){case AY.Get:return t.get();case AY.Post:return t.post();case AY.Put:return t.put();case AY.Patch:return t.patch();case AY.Delete:return t.delete();case AY.Head:return t.head();default:return t._other()}}}});var vBa=h(()=>{"use strict"});var xBa=h(()=>{"use strict"});var CBa=h(()=>{"use strict"});var wBa=h(()=>{"use strict"});var SBa=h(()=>{"use strict"});var TBa=h(()=>{"use strict"});var Nx,OBa=h(()=>{"use strict";Vr();Nx={error:e=>({value:e,type:"error",_visit:function(t){return Nx._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return Nx._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return Nx._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"error":return t.error(e.value);case"json":return t.json(e.value);case"stream":return t.stream(e.value);default:return t._other(e)}}}});var BBa=h(()=>{"use strict"});var PBa=h(()=>{"use strict"});var DBa=h(()=>{"use strict"});var RBa=h(()=>{"use strict"});var kBa=h(()=>{"use strict"});var FBa=h(()=>{"use strict"});var NBa=h(()=>{"use strict"});var jBa=h(()=>{"use strict"});var QBa=h(()=>{"use strict"});var zBa=h(()=>{"use strict"});var $Mi=h(()=>{"use strict";mBa();hBa();gBa();ABa();yBa();bBa();EBa();IBa();vBa();xBa();CBa();wBa();SBa();TBa();OBa();BBa();PBa();DBa();RBa();kBa();FBa();NBa();jBa();QBa();zBa()});var e6i={};Z(e6i,{V2AuthValues:()=>TU,V2EndpointLocationHttpMethod:()=>AY,V2HttpEndpointResponseBody:()=>Nx});var MBa=h(()=>{"use strict";$Mi()});var LBa=h(()=>{"use strict"});var UBa=h(()=>{"use strict"});var VBa=h(()=>{"use strict"});var _Ba=h(()=>{"use strict"});var qBa=h(()=>{"use strict"});var GBa=h(()=>{"use strict"});var WBa,HBa=h(()=>{"use strict";Vr();WBa={local:()=>({type:"local",_visit:function(e){return rc.GeneratorEnvironment._visit(this,e)}}),remote:e=>({...e,type:"remote",_visit:function(t){return rc.GeneratorEnvironment._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"local":return t.local();case"remote":return t.remote(e);default:return t._other(e)}}}});var KBa=h(()=>{"use strict"});var JBa=h(()=>{"use strict"});var YBa,XBa=h(()=>{"use strict";Vr();YBa={maven:e=>({...e,type:"maven",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return rc.GeneratorPublishTarget._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"maven":return t.maven(e);case"npm":return t.npm(e);case"pypi":return t.pypi(e);case"postman":return t.postman(e);case"rubygems":return t.rubygems(e);case"nuget":return t.nuget(e);case"crates":return t.crates(e);default:return t._other(e)}}}});var ZBa=h(()=>{"use strict"});var $Ba=h(()=>{"use strict"});var ePa=h(()=>{"use strict"});var tPa,rPa=h(()=>{"use strict";Vr();tPa={npm:e=>({...e,type:"npm",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return rc.GithubPublishInfo._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"npm":return t.npm(e);case"maven":return t.maven(e);case"postman":return t.postman(e);case"pypi":return t.pypi(e);case"rubygems":return t.rubygems(e);case"nuget":return t.nuget(e);case"crates":return t.crates(e);default:return t._other(e)}}}});var nPa,iPa=h(()=>{"use strict";Vr();nPa={basic:e=>({...e,type:"basic",_visit:function(t){return rc.LicenseConfig._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return rc.LicenseConfig._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"basic":return t.basic(e);case"custom":return t.custom(e);default:return t._other(e)}}}});var Whf,Olr,oPa=h(()=>{"use strict";Whf={Mit:"MIT",Apache2:"Apache-2.0"},Olr={...Whf,_visit:(e,t)=>{switch(e){case Olr.Mit:return t.mit();case Olr.Apache2:return t.apache2();default:return t._other()}}}});var sPa=h(()=>{"use strict"});var aPa=h(()=>{"use strict"});var cPa=h(()=>{"use strict"});var uPa=h(()=>{"use strict"});var lPa=h(()=>{"use strict"});var pPa=h(()=>{"use strict"});var fPa=h(()=>{"use strict"});var dPa=h(()=>{"use strict"});var mPa=h(()=>{"use strict"});var hPa=h(()=>{"use strict"});var gPa=h(()=>{"use strict"});var APa=h(()=>{"use strict"});var yPa,bPa=h(()=>{"use strict";Vr();yPa={publish:e=>({...e,type:"publish",_visit:function(t){return rc.OutputMode._visit(this,t)}}),downloadFiles:()=>({type:"downloadFiles",_visit:function(e){return rc.OutputMode._visit(this,e)}}),github:e=>({...e,type:"github",_visit:function(t){return rc.OutputMode._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"publish":return t.publish(e);case"downloadFiles":return t.downloadFiles();case"github":return t.github(e);default:return t._other(e)}}}});var EPa=h(()=>{"use strict"});var IPa=h(()=>{"use strict"});var vPa=h(()=>{"use strict"});var xPa=h(()=>{"use strict"});var CPa=h(()=>{"use strict"});var wPa=h(()=>{"use strict"});var SPa=h(()=>{"use strict"});var TPa=h(()=>{"use strict"});var OPa=h(()=>{"use strict"});var t6i=h(()=>{"use strict";LBa();UBa();VBa();_Ba();qBa();GBa();HBa();KBa();JBa();XBa();ZBa();$Ba();ePa();rPa();iPa();oPa();sPa();aPa();cPa();uPa();lPa();pPa();fPa();dPa();mPa();hPa();gPa();APa();bPa();EPa();IPa();vPa();xPa();CPa();wPa();SPa();TPa();OPa()});var r6i={};Z(r6i,{GeneratorEnvironment:()=>WBa,GeneratorPublishTarget:()=>YBa,GithubPublishInfo:()=>tPa,LicenseConfig:()=>nPa,LicenseId:()=>Olr,OutputMode:()=>yPa});var BPa=h(()=>{"use strict";t6i()});var PPa=h(()=>{"use strict";BPa();t6i()});var rc={};Z(rc,{GeneratorEnvironment:()=>WBa,GeneratorPublishTarget:()=>YBa,GithubPublishInfo:()=>tPa,LicenseConfig:()=>nPa,LicenseId:()=>Olr,OutputMode:()=>yPa,config:()=>r6i});var DPa=h(()=>{"use strict";PPa()});var RPa=h(()=>{"use strict"});var Hhf,Blr,kPa=h(()=>{"use strict";Hhf={Explicit:"explicit",Auto:"auto"},Blr={...Hhf,_visit:(e,t)=>{switch(e){case Blr.Explicit:return t.explicit();case Blr.Auto:return t.auto();default:return t._other()}}}});var FPa=h(()=>{"use strict"});var Khf,CWe,NPa=h(()=>{"use strict";Khf={Header:"header",Query:"query",Body:"body",Path:"path"},CWe={...Khf,_visit:(e,t)=>{switch(e){case CWe.Header:return t.header();case CWe.Query:return t.query();case CWe.Body:return t.body();case CWe.Path:return t.path();default:return t._other()}}}});var n6i=h(()=>{"use strict";RPa();kPa();FPa();NPa()});var i6i={};Z(i6i,{GlobalParameterApplyMode:()=>Blr,GlobalParameterLocation:()=>CWe});var jPa=h(()=>{"use strict";n6i()});var QPa=h(()=>{"use strict"});var zPa=h(()=>{"use strict"});var MPa=h(()=>{"use strict"});var LPa=h(()=>{"use strict"});var UPa=h(()=>{"use strict"});var VPa=h(()=>{"use strict"});var _Pa=h(()=>{"use strict"});var $6,qPa=h(()=>{"use strict";Vr();$6={language:e=>({...e,type:"language",_visit:function(t){return $6._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return $6._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 GPa=h(()=>{"use strict"});var WPa=h(()=>{"use strict"});var HPa=h(()=>{"use strict"});var KPa=h(()=>{"use strict"});var SA,JPa=h(()=>{"use strict";Vr();SA={body:e=>({value:e,type:"body",_visit:function(t){return SA._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return SA._visit(this,t)}}),sse:e=>({value:e,type:"sse",_visit:function(t){return SA._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"body":return t.body(e.value);case"stream":return t.stream(e.value);case"sse":return t.sse(e.value);default:return t._other(e)}}}});var YPa=h(()=>{"use strict"});var XPa=h(()=>{"use strict"});var ZPa=h(()=>{"use strict"});var $Pa=h(()=>{"use strict"});var eDa=h(()=>{"use strict"});var tDa=h(()=>{"use strict"});var dw,rDa=h(()=>{"use strict";Vr();dw={single:()=>({type:"single",_visit:function(e){return dw._visit(this,e)}}),exploded:()=>({type:"exploded",_visit:function(e){return dw._visit(this,e)}}),commaSeparated:()=>({type:"commaSeparated",_visit:function(e){return dw._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"single":return t.single();case"exploded":return t.exploded();case"commaSeparated":return t.commaSeparated();default:return t._other(e)}}}});var zP,nDa=h(()=>{"use strict";Vr();zP={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return zP._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return zP._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedRequestBody":return t.inlinedRequestBody(e);case"reference":return t.reference(e);default:return t._other(e)}}}});var Cg,iDa=h(()=>{"use strict";Vr();Cg={ok:e=>({value:e,type:"ok",_visit:function(t){return Cg._visit(this,t)}}),error:e=>({...e,type:"error",_visit:function(t){return Cg._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"ok":return t.ok(e.value);case"error":return t.error(e);default:return t._other(e)}}}});var oDa=h(()=>{"use strict"});var sDa=h(()=>{"use strict"});var xj,aDa=h(()=>{"use strict";Vr();xj={file:e=>({...e,type:"file",_visit:function(t){return xj._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return xj._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e);case"fileArray":return t.fileArray(e);default:return t._other(e)}}}});var cDa=h(()=>{"use strict"});var uDa=h(()=>{"use strict"});var lDa=h(()=>{"use strict"});var Jhf,RDt,pDa=h(()=>{"use strict";Jhf={Exploded:"exploded",Json:"json",Form:"form"},RDt={...Jhf,_visit:(e,t)=>{switch(e){case RDt.Exploded:return t.exploded();case RDt.Json:return t.json();case RDt.Form:return t.form();default:return t._other()}}}});var fDa=h(()=>{"use strict"});var jx,dDa=h(()=>{"use strict";Vr();jx={file:e=>({value:e,type:"file",_visit:function(t){return jx._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return jx._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"file":return t.file(e.value);case"bodyProperty":return t.bodyProperty(e);default:return t._other(e)}}}});var mDa=h(()=>{"use strict"});var hDa=h(()=>{"use strict"});var gDa=h(()=>{"use strict"});var MP,ADa=h(()=>{"use strict";Vr();MP={proto:e=>({...e,type:"proto",_visit:function(t){return MP._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return MP._visit(this,e)}}),openrpc:()=>({type:"openrpc",_visit:function(e){return MP._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto(e);case"openapi":return t.openapi();case"openrpc":return t.openrpc();default:return t._other(e)}}}});var yDa=h(()=>{"use strict"});var Yhf,Wd,bDa=h(()=>{"use strict";Yhf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"},Wd={...Yhf,_visit:(e,t)=>{switch(e){case Wd.Get:return t.get();case Wd.Post:return t.post();case Wd.Put:return t.put();case Wd.Patch:return t.patch();case Wd.Delete:return t.delete();case Wd.Head:return t.head();default:return t._other()}}}});var EDa=h(()=>{"use strict"});var IDa=h(()=>{"use strict"});var Kf,vDa=h(()=>{"use strict";Vr();Kf={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return Kf._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Kf._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return Kf._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return Kf._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedRequestBody":return t.inlinedRequestBody(e);case"reference":return t.reference(e);case"fileUpload":return t.fileUpload(e);case"bytes":return t.bytes(e);default:return t._other(e)}}}});var xDa=h(()=>{"use strict"});var CDa=h(()=>{"use strict"});var mu,wDa=h(()=>{"use strict";Vr();mu={json:e=>({value:e,type:"json",_visit:function(t){return mu._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return mu._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return mu._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return mu._visit(this,t)}}),streaming:e=>({value:e,type:"streaming",_visit:function(t){return mu._visit(this,t)}}),streamParameter:e=>({...e,type:"streamParameter",_visit:function(t){return mu._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json(e.value);case"fileDownload":return t.fileDownload(e);case"text":return t.text(e);case"bytes":return t.bytes(e);case"streaming":return t.streaming(e.value);case"streamParameter":return t.streamParameter(e);default:return t._other(e)}}}});var SDa=h(()=>{"use strict"});var TDa=h(()=>{"use strict"});var ODa=h(()=>{"use strict"});var mE,BDa=h(()=>{"use strict";Vr();mE={response:e=>({...e,type:"response",_visit:function(t){return mE._visit(this,t)}}),nestedPropertyAsResponse:e=>({...e,type:"nestedPropertyAsResponse",_visit:function(t){return mE._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"response":return t.response(e);case"nestedPropertyAsResponse":return t.nestedPropertyAsResponse(e);default:return t._other(e)}}}});var PDa=h(()=>{"use strict"});var DDa=h(()=>{"use strict"});var RDa=h(()=>{"use strict"});var PO,kDa=h(()=>{"use strict";Vr();PO={json:e=>({value:e,type:"json",_visit:function(t){return PO._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return PO._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return PO._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return PO._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json(e.value);case"fileDownload":return t.fileDownload(e);case"text":return t.text(e);case"bytes":return t.bytes(e);default:return t._other(e)}}}});var FDa=h(()=>{"use strict"});var l0,NDa=h(()=>{"use strict";Vr();l0={cursor:e=>({...e,type:"cursor",_visit:function(t){return l0._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return l0._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return l0._visit(this,t)}}),uri:e=>({...e,type:"uri",_visit:function(t){return l0._visit(this,t)}}),path:e=>({...e,type:"path",_visit:function(t){return l0._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 jDa=h(()=>{"use strict"});var QDa=h(()=>{"use strict"});var Xhf,kDt,zDa=h(()=>{"use strict";Xhf={Root:"ROOT",Service:"SERVICE",Endpoint:"ENDPOINT"},kDt={...Xhf,_visit:(e,t)=>{switch(e){case kDt.Root:return t.root();case kDt.Service:return t.service();case kDt.Endpoint:return t.endpoint();default:return t._other()}}}});var MDa=h(()=>{"use strict"});var LDa=h(()=>{"use strict"});var UDa=h(()=>{"use strict"});var VDa=h(()=>{"use strict"});var DO,_Da=h(()=>{"use strict";Vr();DO={query:e=>({...e,type:"query",_visit:function(t){return DO._visit(this,t)}}),body:e=>({...e,type:"body",_visit:function(t){return DO._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"query":return t.query(e);case"body":return t.body(e);default:return t._other(e)}}}});var qDa=h(()=>{"use strict"});var GDa=h(()=>{"use strict"});var WDa=h(()=>{"use strict"});var HDa=h(()=>{"use strict"});var KDa=h(()=>{"use strict"});var JDa=h(()=>{"use strict"});var o7,YDa=h(()=>{"use strict";Vr();o7={typeReference:e=>({...e,type:"typeReference",_visit:function(t){return o7._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return o7._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"typeReference":return t.typeReference(e);case"bytes":return t.bytes(e);default:return t._other(e)}}}});var OU,XDa=h(()=>{"use strict";Vr();OU={justRequestBody:e=>({value:e,type:"justRequestBody",_visit:function(t){return OU._visit(this,t)}}),wrapper:e=>({...e,type:"wrapper",_visit:function(t){return OU._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"justRequestBody":return t.justRequestBody(e.value);case"wrapper":return t.wrapper(e);default:return t._other(e)}}}});var ZDa=h(()=>{"use strict"});var $Da=h(()=>{"use strict"});var gI,eRa=h(()=>{"use strict";Vr();gI={json:e=>({...e,type:"json",_visit:function(t){return gI._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return gI._visit(this,t)}}),sse:e=>({...e,type:"sse",_visit:function(t){return gI._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"json":return t.json(e);case"text":return t.text(e);case"sse":return t.sse(e);default:return t._other(e)}}}});var tRa=h(()=>{"use strict"});var Zhf,eL,rRa=h(()=>{"use strict";Zhf={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Php:"php",Rust:"rust",Swift:"swift"},eL={...Zhf,_visit:(e,t)=>{switch(e){case eL.Curl:return t.curl();case eL.Python:return t.python();case eL.Javascript:return t.javascript();case eL.Typescript:return t.typescript();case eL.Go:return t.go();case eL.Ruby:return t.ruby();case eL.Csharp:return t.csharp();case eL.Java:return t.java();case eL.Php:return t.php();case eL.Rust:return t.rust();case eL.Swift:return t.swift();default:return t._other()}}}});var nRa=h(()=>{"use strict"});var iRa=h(()=>{"use strict"});var BU,oRa=h(()=>{"use strict";Vr();BU={http:()=>({type:"http",_visit:function(e){return BU._visit(this,e)}}),grpc:e=>({...e,type:"grpc",_visit:function(t){return BU._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"http":return t.http();case"grpc":return t.grpc(e);default:return t._other(e)}}}});var sRa=h(()=>{"use strict"});var aRa=h(()=>{"use strict"});var cRa=h(()=>{"use strict"});var uRa=h(()=>{"use strict"});var o6i=h(()=>{"use strict";QPa();zPa();MPa();LPa();UPa();VPa();_Pa();qPa();GPa();WPa();HPa();KPa();JPa();YPa();XPa();ZPa();$Pa();eDa();tDa();rDa();nDa();iDa();oDa();sDa();aDa();cDa();uDa();lDa();pDa();fDa();dDa();mDa();hDa();gDa();ADa();yDa();bDa();EDa();IDa();vDa();xDa();CDa();wDa();SDa();TDa();ODa();BDa();PDa();DDa();RDa();kDa();FDa();NDa();jDa();QDa();zDa();MDa();LDa();UDa();VDa();_Da();qDa();GDa();WDa();HDa();KDa();JDa();YDa();XDa();ZDa();$Da();eRa();tRa();rRa();nRa();iRa();oRa();sRa();aRa();cRa();uRa()});var s6i={};Z(s6i,{ExampleCodeSample:()=>$6,ExampleEndpointSuccessResponse:()=>SA,ExampleQueryParameterShape:()=>dw,ExampleRequestBody:()=>zP,ExampleResponse:()=>Cg,FileProperty:()=>xj,FileUploadBodyPropertyEncoding:()=>RDt,FileUploadRequestProperty:()=>jx,HttpEndpointSource:()=>MP,HttpMethod:()=>Wd,HttpRequestBody:()=>Kf,HttpResponseBody:()=>mu,JsonResponse:()=>mE,NonStreamHttpResponseBody:()=>PO,Pagination:()=>l0,PathParameterLocation:()=>kDt,RequestPropertyValue:()=>DO,SdkRequestBodyType:()=>o7,SdkRequestShape:()=>OU,StreamingResponse:()=>gI,SupportedSdkLanguage:()=>eL,Transport:()=>BU});var lRa=h(()=>{"use strict";o6i()});var Cj,pRa=h(()=>{"use strict";Vr();Cj={proto:e=>({...e,type:"proto",_visit:function(t){return Cj._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return Cj._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"proto":return t.proto(e);case"openapi":return t.openapi();default:return t._other(e)}}}});var fRa=h(()=>{"use strict"});var mye,dRa=h(()=>{"use strict";Vr();mye={header:e=>({...e,type:"header",_visit:function(t){return mye._visit(this,t)}}),_visit:(e,t)=>e.type==="header"?t.header(e):t._other(e)}});var mRa=h(()=>{"use strict"});var hRa=h(()=>{"use strict"});var tL,gRa=h(()=>{"use strict";Vr();tL={statusCode:()=>({type:"statusCode",_visit:function(e){return tL._visit(this,e)}}),property:e=>({...e,type:"property",_visit:function(t){return tL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"statusCode":return t.statusCode();case"property":return t.property(e);default:return t._other(e)}}}});var $hf,Plr,ARa=h(()=>{"use strict";$hf={Minimal:"minimal",Comprehensive:"comprehensive"},Plr={...$hf,_visit:(e,t)=>{switch(e){case Plr.Minimal:return t.minimal();case Plr.Comprehensive:return t.comprehensive();default:return t._other()}}}});var yRa=h(()=>{"use strict"});var bRa=h(()=>{"use strict"});var ERa=h(()=>{"use strict"});var IRa=h(()=>{"use strict"});var egf,wWe,vRa=h(()=>{"use strict";egf={Autopilot:"autopilot",Autorelease:"autorelease",Ci:"ci",Manual:"manual"},wWe={...egf,_visit:(e,t)=>{switch(e){case wWe.Autopilot:return t.autopilot();case wWe.Autorelease:return t.autorelease();case wWe.Ci:return t.ci();case wWe.Manual:return t.manual();default:return t._other()}}}});var xRa=h(()=>{"use strict"});var CRa=h(()=>{"use strict"});var wRa=h(()=>{"use strict"});var SRa=h(()=>{"use strict"});var TRa=h(()=>{"use strict"});var ORa=h(()=>{"use strict"});var BRa=h(()=>{"use strict"});var PRa=h(()=>{"use strict"});var DRa=h(()=>{"use strict"});var RRa=h(()=>{"use strict"});var kRa=h(()=>{"use strict"});var a6i=h(()=>{"use strict";pRa();fRa();dRa();mRa();hRa();gRa();ARa();yRa();bRa();ERa();IRa();vRa();xRa();CRa();wRa();SRa();TRa();ORa();BRa();PRa();DRa();RRa();kRa()});var c6i={};Z(c6i,{ApiDefinitionSource:()=>Cj,ApiVersionScheme:()=>mye,ErrorDiscriminationStrategy:()=>tL,ExampleStyle:()=>Plr,InvocationSource:()=>wWe});var FRa=h(()=>{"use strict";a6i()});var NRa=h(()=>{"use strict"});var jRa=h(()=>{"use strict"});var QRa=h(()=>{"use strict"});var tgf,s7,zRa=h(()=>{"use strict";tgf={Unary:"UNARY",ClientStream:"CLIENT_STREAM",ServerStream:"SERVER_STREAM",BidirectionalStream:"BIDIRECTIONAL_STREAM"},s7={...tgf,_visit:(e,t)=>{switch(e){case s7.Unary:return t.unary();case s7.ClientStream:return t.clientStream();case s7.ServerStream:return t.serverStream();case s7.BidirectionalStream:return t.bidirectionalStream();default:return t._other()}}}});var MRa=h(()=>{"use strict"});var Dp,LRa=h(()=>{"use strict";Vr();Dp={wellKnown:e=>({value:e,type:"wellKnown",_visit:function(t){return Dp._visit(this,t)}}),userDefined:e=>({...e,type:"userDefined",_visit:function(t){return Dp._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"wellKnown":return t.wellKnown(e.value);case"userDefined":return t.userDefined(e);default:return t._other(e)}}}});var URa=h(()=>{"use strict"});var mi,VRa=h(()=>{"use strict";Vr();mi={any:()=>({type:"any",_visit:function(e){return mi._visit(this,e)}}),api:()=>({type:"api",_visit:function(e){return mi._visit(this,e)}}),boolValue:()=>({type:"boolValue",_visit:function(e){return mi._visit(this,e)}}),bytesValue:()=>({type:"bytesValue",_visit:function(e){return mi._visit(this,e)}}),doubleValue:()=>({type:"doubleValue",_visit:function(e){return mi._visit(this,e)}}),duration:()=>({type:"duration",_visit:function(e){return mi._visit(this,e)}}),empty:()=>({type:"empty",_visit:function(e){return mi._visit(this,e)}}),enum:()=>({type:"enum",_visit:function(e){return mi._visit(this,e)}}),enumValue:()=>({type:"enumValue",_visit:function(e){return mi._visit(this,e)}}),field:()=>({type:"field",_visit:function(e){return mi._visit(this,e)}}),fieldCardinality:()=>({type:"fieldCardinality",_visit:function(e){return mi._visit(this,e)}}),fieldKind:()=>({type:"fieldKind",_visit:function(e){return mi._visit(this,e)}}),fieldMask:()=>({type:"fieldMask",_visit:function(e){return mi._visit(this,e)}}),floatValue:()=>({type:"floatValue",_visit:function(e){return mi._visit(this,e)}}),int32Value:()=>({type:"int32Value",_visit:function(e){return mi._visit(this,e)}}),int64Value:()=>({type:"int64Value",_visit:function(e){return mi._visit(this,e)}}),listValue:()=>({type:"listValue",_visit:function(e){return mi._visit(this,e)}}),method:()=>({type:"method",_visit:function(e){return mi._visit(this,e)}}),mixin:()=>({type:"mixin",_visit:function(e){return mi._visit(this,e)}}),nullValue:()=>({type:"nullValue",_visit:function(e){return mi._visit(this,e)}}),option:()=>({type:"option",_visit:function(e){return mi._visit(this,e)}}),sourceContext:()=>({type:"sourceContext",_visit:function(e){return mi._visit(this,e)}}),stringValue:()=>({type:"stringValue",_visit:function(e){return mi._visit(this,e)}}),struct:()=>({type:"struct",_visit:function(e){return mi._visit(this,e)}}),syntax:()=>({type:"syntax",_visit:function(e){return mi._visit(this,e)}}),timestamp:()=>({type:"timestamp",_visit:function(e){return mi._visit(this,e)}}),type:()=>({type:"type",_visit:function(e){return mi._visit(this,e)}}),uint32Value:()=>({type:"uint32Value",_visit:function(e){return mi._visit(this,e)}}),uint64Value:()=>({type:"uint64Value",_visit:function(e){return mi._visit(this,e)}}),value:()=>({type:"value",_visit:function(e){return mi._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"any":return t.any();case"api":return t.api();case"boolValue":return t.boolValue();case"bytesValue":return t.bytesValue();case"doubleValue":return t.doubleValue();case"duration":return t.duration();case"empty":return t.empty();case"enum":return t.enum();case"enumValue":return t.enumValue();case"field":return t.field();case"fieldCardinality":return t.fieldCardinality();case"fieldKind":return t.fieldKind();case"fieldMask":return t.fieldMask();case"floatValue":return t.floatValue();case"int32Value":return t.int32Value();case"int64Value":return t.int64Value();case"listValue":return t.listValue();case"method":return t.method();case"mixin":return t.mixin();case"nullValue":return t.nullValue();case"option":return t.option();case"sourceContext":return t.sourceContext();case"stringValue":return t.stringValue();case"struct":return t.struct();case"syntax":return t.syntax();case"timestamp":return t.timestamp();case"type":return t.type();case"uint32Value":return t.uint32Value();case"uint64Value":return t.uint64Value();case"value":return t.value();default:return t._other(e)}}}});var u6i=h(()=>{"use strict";NRa();jRa();QRa();zRa();MRa();LRa();URa();VRa()});var l6i={};Z(l6i,{ProtobufMethodType:()=>s7,ProtobufType:()=>Dp,WellKnownProtobufType:()=>mi});var _Ra=h(()=>{"use strict";u6i()});var qRa=h(()=>{"use strict"});var GRa=h(()=>{"use strict"});var WRa=h(()=>{"use strict"});var HRa=h(()=>{"use strict"});var KRa=h(()=>{"use strict"});var JRa=h(()=>{"use strict"});var YRa=h(()=>{"use strict"});var XRa=h(()=>{"use strict"});var ZRa=h(()=>{"use strict"});var $Ra=h(()=>{"use strict"});var yY,eka=h(()=>{"use strict";Vr();yY={github:e=>({...e,type:"github",_visit:function(t){return yY._visit(this,t)}}),direct:e=>({...e,type:"direct",_visit:function(t){return yY._visit(this,t)}}),filesystem:e=>({...e,type:"filesystem",_visit:function(t){return yY._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"github":return t.github(e);case"direct":return t.direct(e);case"filesystem":return t.filesystem(e);default:return t._other(e)}}}});var Jf,tka=h(()=>{"use strict";Vr();Jf={postman:e=>({...e,type:"postman",_visit:function(t){return Jf._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return Jf._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return Jf._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return Jf._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return Jf._visit(this,t)}}),go:e=>({...e,type:"go",_visit:function(t){return Jf._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return Jf._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return Jf._visit(this,t)}}),packagist:e=>({...e,type:"packagist",_visit:function(t){return Jf._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"postman":return t.postman(e);case"npm":return t.npm(e);case"maven":return t.maven(e);case"pypi":return t.pypi(e);case"crates":return t.crates(e);case"go":return t.go(e);case"nuget":return t.nuget(e);case"rubygems":return t.rubygems(e);case"packagist":return t.packagist(e);default:return t._other(e)}}}});var rka=h(()=>{"use strict"});var nka=h(()=>{"use strict"});var p6i=h(()=>{"use strict";qRa();GRa();WRa();HRa();KRa();JRa();YRa();XRa();ZRa();$Ra();eka();tka();rka();nka()});var f6i={};Z(f6i,{PublishTarget:()=>Jf,PublishingConfig:()=>yY});var ika=h(()=>{"use strict";p6i()});var oka=h(()=>{"use strict"});var ska=h(()=>{"use strict"});var aka=h(()=>{"use strict"});var cka=h(()=>{"use strict"});var Bs,uka=h(()=>{"use strict";Vr();Bs={list:e=>({list:e,type:"list",_visit:function(t){return Bs._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Bs._visit(this,t)}}),nullable:e=>({nullable:e,type:"nullable",_visit:function(t){return Bs._visit(this,t)}}),optional:e=>({optional:e,type:"optional",_visit:function(t){return Bs._visit(this,t)}}),set:e=>({set:e,type:"set",_visit:function(t){return Bs._visit(this,t)}}),literal:e=>({literal:e,type:"literal",_visit:function(t){return Bs._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"list":return t.list(e.list);case"map":return t.map(e);case"nullable":return t.nullable(e.nullable);case"optional":return t.optional(e.optional);case"set":return t.set(e.set);case"literal":return t.literal(e.literal);default:return t._other(e)}}}});var lka=h(()=>{"use strict"});var pka=h(()=>{"use strict"});var fka=h(()=>{"use strict"});var dka=h(()=>{"use strict"});var mka=h(()=>{"use strict"});var hka=h(()=>{"use strict"});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 Qu,Ika=h(()=>{"use strict";Vr();Qu={list:e=>({...e,type:"list",_visit:function(t){return Qu._visit(this,t)}}),set:e=>({...e,type:"set",_visit:function(t){return Qu._visit(this,t)}}),optional:e=>({...e,type:"optional",_visit:function(t){return Qu._visit(this,t)}}),nullable:e=>({...e,type:"nullable",_visit:function(t){return Qu._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Qu._visit(this,t)}}),literal:e=>({...e,type:"literal",_visit:function(t){return Qu._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"list":return t.list(e);case"set":return t.set(e);case"optional":return t.optional(e);case"nullable":return t.nullable(e);case"map":return t.map(e);case"literal":return t.literal(e);default:return t._other(e)}}}});var vka=h(()=>{"use strict"});var xka=h(()=>{"use strict"});var Cka=h(()=>{"use strict"});var wka=h(()=>{"use strict"});var Ska=h(()=>{"use strict"});var Tka=h(()=>{"use strict"});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 Si,jka=h(()=>{"use strict";Vr();Si={integer:e=>({integer:e,type:"integer",_visit:function(t){return Si._visit(this,t)}}),long:e=>({long:e,type:"long",_visit:function(t){return Si._visit(this,t)}}),uint:e=>({uint:e,type:"uint",_visit:function(t){return Si._visit(this,t)}}),uint64:e=>({uint64:e,type:"uint64",_visit:function(t){return Si._visit(this,t)}}),float:e=>({float:e,type:"float",_visit:function(t){return Si._visit(this,t)}}),double:e=>({double:e,type:"double",_visit:function(t){return Si._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return Si._visit(this,t)}}),string:e=>({string:e,type:"string",_visit:function(t){return Si._visit(this,t)}}),date:e=>({date:e,type:"date",_visit:function(t){return Si._visit(this,t)}}),datetime:e=>({...e,type:"datetime",_visit:function(t){return Si._visit(this,t)}}),datetimeRfc2822:e=>({...e,type:"datetimeRfc2822",_visit:function(t){return Si._visit(this,t)}}),uuid:e=>({uuid:e,type:"uuid",_visit:function(t){return Si._visit(this,t)}}),base64:e=>({base64:e,type:"base64",_visit:function(t){return Si._visit(this,t)}}),bigInteger:e=>({bigInteger:e,type:"bigInteger",_visit:function(t){return Si._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"integer":return t.integer(e.integer);case"long":return t.long(e.long);case"uint":return t.uint(e.uint);case"uint64":return t.uint64(e.uint64);case"float":return t.float(e.float);case"double":return t.double(e.double);case"boolean":return t.boolean(e.boolean);case"string":return t.string(e.string);case"date":return t.date(e.date);case"datetime":return t.datetime(e);case"datetimeRfc2822":return t.datetimeRfc2822(e);case"uuid":return t.uuid(e.uuid);case"base64":return t.base64(e.base64);case"bigInteger":return t.bigInteger(e.bigInteger);default:return t._other(e)}}}});var Qka=h(()=>{"use strict"});var zka=h(()=>{"use strict"});var bY,Mka=h(()=>{"use strict";Vr();bY={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return bY._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return bY._visit(this,t)}}),noProperties:()=>({type:"noProperties",_visit:function(e){return bY._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"samePropertiesAsObject":return t.samePropertiesAsObject(e);case"singleProperty":return t.singleProperty(e);case"noProperties":return t.noProperties();default:return t._other(e)}}}});var Lka=h(()=>{"use strict"});var Uka=h(()=>{"use strict"});var $i,Vka=h(()=>{"use strict";Vr();$i={primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return $i._visit(this,t)}}),container:e=>({container:e,type:"container",_visit:function(t){return $i._visit(this,t)}}),unknown:e=>({unknown:e,type:"unknown",_visit:function(t){return $i._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return $i._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"primitive":return t.primitive(e.primitive);case"container":return t.container(e.container);case"unknown":return t.unknown(e.unknown);case"named":return t.named(e);default:return t._other(e)}}}});var Su,_ka=h(()=>{"use strict";Vr();Su={alias:e=>({...e,type:"alias",_visit:function(t){return Su._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Su._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Su._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return Su._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return Su._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"alias":return t.alias(e);case"enum":return t.enum(e);case"object":return t.object(e);case"union":return t.union(e);case"undiscriminatedUnion":return t.undiscriminatedUnion(e);default:return t._other(e)}}}});var qka=h(()=>{"use strict"});var Gka=h(()=>{"use strict"});var Wka=h(()=>{"use strict"});var Hka=h(()=>{"use strict"});var Kka=h(()=>{"use strict"});var Jka=h(()=>{"use strict"});var Yka=h(()=>{"use strict"});var Xka=h(()=>{"use strict"});var p0,Zka=h(()=>{"use strict";Vr();p0={string:e=>({string:e,type:"string",_visit:function(t){return p0._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return p0._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"string":return t.string(e.string);case"boolean":return t.boolean(e.boolean);default:return t._other(e)}}}});var $ka=h(()=>{"use strict"});var eFa=h(()=>{"use strict"});var tFa=h(()=>{"use strict"});var rFa=h(()=>{"use strict"});var SWe,nFa=h(()=>{"use strict";Vr();SWe={enum:e=>({...e,type:"enum",_visit:function(t){return SWe._visit(this,t)}}),_visit:(e,t)=>e.type==="enum"?t.enum(e):t._other(e)}});var iFa=h(()=>{"use strict"});var rgf,U2e,oFa=h(()=>{"use strict";rgf={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"},U2e={...rgf,_visit:(e,t)=>{switch(e){case U2e.ReadOnly:return t.readOnly();case U2e.WriteOnly:return t.writeOnly();default:return t._other()}}}});var sFa=h(()=>{"use strict"});var aFa=h(()=>{"use strict"});var ngf,ns,cFa=h(()=>{"use strict";ngf={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",DateTimeRfc2822:"DATE_TIME_RFC_2822",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER"},ns={...ngf,_visit:(e,t)=>{switch(e){case ns.Integer:return t.integer();case ns.Long:return t.long();case ns.Uint:return t.uint();case ns.Uint64:return t.uint64();case ns.Float:return t.float();case ns.Double:return t.double();case ns.Boolean:return t.boolean();case ns.String:return t.string();case ns.Date:return t.date();case ns.DateTime:return t.dateTime();case ns.DateTimeRfc2822:return t.dateTimeRfc2822();case ns.Uuid:return t.uuid();case ns.Base64:return t.base64();case ns.BigInteger:return t.bigInteger();default:return t._other()}}}});var ti,uFa=h(()=>{"use strict";Vr();ti={integer:e=>({...e,type:"integer",_visit:function(t){return ti._visit(this,t)}}),long:e=>({...e,type:"long",_visit:function(t){return ti._visit(this,t)}}),uint:e=>({...e,type:"uint",_visit:function(t){return ti._visit(this,t)}}),uint64:e=>({...e,type:"uint64",_visit:function(t){return ti._visit(this,t)}}),float:e=>({...e,type:"float",_visit:function(t){return ti._visit(this,t)}}),double:e=>({...e,type:"double",_visit:function(t){return ti._visit(this,t)}}),boolean:e=>({...e,type:"boolean",_visit:function(t){return ti._visit(this,t)}}),string:e=>({...e,type:"string",_visit:function(t){return ti._visit(this,t)}}),date:e=>({...e,type:"date",_visit:function(t){return ti._visit(this,t)}}),dateTime:e=>({...e,type:"dateTime",_visit:function(t){return ti._visit(this,t)}}),dateTimeRfc2822:e=>({...e,type:"dateTimeRfc2822",_visit:function(t){return ti._visit(this,t)}}),uuid:e=>({...e,type:"uuid",_visit:function(t){return ti._visit(this,t)}}),base64:e=>({...e,type:"base64",_visit:function(t){return ti._visit(this,t)}}),bigInteger:e=>({...e,type:"bigInteger",_visit:function(t){return ti._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"integer":return t.integer(e);case"long":return t.long(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"boolean":return t.boolean(e);case"string":return t.string(e);case"date":return t.date(e);case"dateTime":return t.dateTime(e);case"dateTimeRfc2822":return t.dateTimeRfc2822(e);case"uuid":return t.uuid(e);case"base64":return t.base64(e);case"bigInteger":return t.bigInteger(e);default:return t._other(e)}}}});var lFa=h(()=>{"use strict"});var pFa=h(()=>{"use strict"});var RO,fFa=h(()=>{"use strict";Vr();RO={container:e=>({container:e,type:"container",_visit:function(t){return RO._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return RO._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return RO._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return RO._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"container":return t.container(e.container);case"named":return t.named(e);case"primitive":return t.primitive(e.primitive);case"unknown":return t.unknown();default:return t._other(e)}}}});var igf,a7,dFa=h(()=>{"use strict";igf={Enum:"ENUM",Object:"OBJECT",Union:"UNION",UndiscriminatedUnion:"UNDISCRIMINATED_UNION"},a7={...igf,_visit:(e,t)=>{switch(e){case a7.Enum:return t.enum();case a7.Object:return t.object();case a7.Union:return t.union();case a7.UndiscriminatedUnion:return t.undiscriminatedUnion();default:return t._other()}}}});var mFa=h(()=>{"use strict"});var QS,hFa=h(()=>{"use strict";Vr();QS={samePropertiesAsObject:e=>({...e,propertiesType:"samePropertiesAsObject",_visit:function(t){return QS._visit(this,t)}}),singleProperty:e=>({...e,propertiesType:"singleProperty",_visit:function(t){return QS._visit(this,t)}}),noProperties:()=>({propertiesType:"noProperties",_visit:function(e){return QS._visit(this,e)}}),_visit:(e,t)=>{switch(e.propertiesType){case"samePropertiesAsObject":return t.samePropertiesAsObject(e);case"singleProperty":return t.singleProperty(e);case"noProperties":return t.noProperties();default:return t._other(e)}}}});var gFa=h(()=>{"use strict"});var cue,AFa=h(()=>{"use strict";Vr();cue={proto:e=>({value:e,type:"proto",_visit:function(t){return cue._visit(this,t)}}),_visit:(e,t)=>e.type==="proto"?t.proto(e.value):t._other(e)}});var yFa=h(()=>{"use strict"});var bFa=h(()=>{"use strict"});var hc,EFa=h(()=>{"use strict";Vr();hc={alias:e=>({...e,type:"alias",_visit:function(t){return hc._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return hc._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return hc._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return hc._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return hc._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"alias":return t.alias(e);case"enum":return t.enum(e);case"object":return t.object(e);case"union":return t.union(e);case"undiscriminatedUnion":return t.undiscriminatedUnion(e);default:return t._other(e)}}}});var IFa=h(()=>{"use strict"});var Ur,vFa=h(()=>{"use strict";Vr();Ur={container:e=>({container:e,type:"container",_visit:function(t){return Ur._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return Ur._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return Ur._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return Ur._visit(this,e)}}),_visit:(e,t)=>{switch(e.type){case"container":return t.container(e.container);case"named":return t.named(e);case"primitive":return t.primitive(e.primitive);case"unknown":return t.unknown();default:return t._other(e)}}}});var xFa=h(()=>{"use strict"});var CFa=h(()=>{"use strict"});var wFa=h(()=>{"use strict"});var SFa=h(()=>{"use strict"});var TFa=h(()=>{"use strict"});var OFa=h(()=>{"use strict"});var ogf,uue,BFa=h(()=>{"use strict";ogf={Data:"data",Protocol:"protocol"},uue={...ogf,_visit:(e,t)=>{switch(e){case uue.Data:return t.data();case uue.Protocol:return t.protocol();default:return t._other()}}}});var PFa=h(()=>{"use strict"});var DFa=h(()=>{"use strict"});var d6i=h(()=>{"use strict";oka();ska();aka();cka();uka();lka();pka();fka();dka();mka();hka();gka();Aka();yka();bka();Eka();Ika();vka();xka();Cka();wka();Ska();Tka();Oka();Bka();Pka();Dka();Rka();kka();Fka();Nka();jka();Qka();zka();Mka();Lka();Uka();Vka();_ka();qka();Gka();Wka();Hka();Kka();Jka();Yka();Xka();Zka();$ka();eFa();tFa();rFa();nFa();iFa();oFa();sFa();aFa();cFa();uFa();lFa();pFa();fFa();dFa();mFa();hFa();gFa();AFa();yFa();bFa();EFa();IFa();vFa();xFa();CFa();wFa();SFa();TFa();OFa();BFa();PFa();DFa()});var m6i={};Z(m6i,{ContainerType:()=>Bs,ExampleContainer:()=>Qu,ExamplePrimitive:()=>Si,ExampleSingleUnionTypeProperties:()=>bY,ExampleTypeReferenceShape:()=>$i,ExampleTypeShape:()=>Su,Literal:()=>p0,NamedTypeDefault:()=>SWe,ObjectPropertyAccess:()=>U2e,PrimitiveTypeV1:()=>ns,PrimitiveTypeV2:()=>ti,ResolvedTypeReference:()=>RO,ShapeType:()=>a7,SingleUnionTypeProperties:()=>QS,Source:()=>cue,Type:()=>hc,TypeReference:()=>Ur,UnionDiscriminatorContext:()=>uue});var RFa=h(()=>{"use strict";d6i()});var kFa=h(()=>{"use strict"});var FFa=h(()=>{"use strict"});var h6i=h(()=>{"use strict";kFa();FFa()});var NFa={};var jFa=h(()=>{"use strict";h6i()});var sgf,kO,QFa=h(()=>{"use strict";sgf={RsaSha256:"RSA_SHA256",RsaSha384:"RSA_SHA384",RsaSha512:"RSA_SHA512",EcdsaSha256:"ECDSA_SHA256",EcdsaSha384:"ECDSA_SHA384",EcdsaSha512:"ECDSA_SHA512",Ed25519:"ED25519"},kO={...sgf,_visit:(e,t)=>{switch(e){case kO.RsaSha256:return t.rsaSha256();case kO.RsaSha384:return t.rsaSha384();case kO.RsaSha512:return t.rsaSha512();case kO.EcdsaSha256:return t.ecdsaSha256();case kO.EcdsaSha384:return t.ecdsaSha384();case kO.EcdsaSha512:return t.ecdsaSha512();case kO.Ed25519:return t.ed25519();default:return t._other()}}}});var zFa=h(()=>{"use strict"});var c7,MFa=h(()=>{"use strict";Vr();c7={jwks:e=>({...e,type:"jwks",_visit:function(t){return c7._visit(this,t)}}),static:e=>({...e,type:"static",_visit:function(t){return c7._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"jwks":return t.jwks(e);case"static":return t.static(e);default:return t._other(e)}}}});var LFa=h(()=>{"use strict"});var agf,u7,UFa=h(()=>{"use strict";agf={Sha256:"SHA256",Sha1:"SHA1",Sha384:"SHA384",Sha512:"SHA512"},u7={...agf,_visit:(e,t)=>{switch(e){case u7.Sha256:return t.sha256();case u7.Sha1:return t.sha1();case u7.Sha384:return t.sha384();case u7.Sha512:return t.sha512();default:return t._other()}}}});var VFa=h(()=>{"use strict"});var _Fa=h(()=>{"use strict"});var qFa=h(()=>{"use strict"});var GFa=h(()=>{"use strict"});var WFa=h(()=>{"use strict"});var HFa=h(()=>{"use strict"});var cgf,l7,KFa=h(()=>{"use strict";cgf={Sha256:"SHA256",Sha1:"SHA1",Sha384:"SHA384",Sha512:"SHA512"},l7={...cgf,_visit:(e,t)=>{switch(e){case l7.Sha256:return t.sha256();case l7.Sha1:return t.sha1();case l7.Sha384:return t.sha384();case l7.Sha512:return t.sha512();default:return t._other()}}}});var JFa=h(()=>{"use strict"});var hye,YFa=h(()=>{"use strict";Vr();hye={queryParameter:e=>({...e,type:"queryParameter",_visit:function(t){return hye._visit(this,t)}}),_visit:(e,t)=>e.type==="queryParameter"?t.queryParameter(e):t._other(e)}});var XFa=h(()=>{"use strict"});var ZFa=h(()=>{"use strict"});var ugf,Dlr,$Fa=h(()=>{"use strict";ugf={Get:"GET",Post:"POST"},Dlr={...ugf,_visit:(e,t)=>{switch(e){case Dlr.Get:return t.get();case Dlr.Post:return t.post();default:return t._other()}}}});var e2a=h(()=>{"use strict"});var t2a=h(()=>{"use strict"});var zS,r2a=h(()=>{"use strict";Vr();zS={inlinedPayload:e=>({...e,type:"inlinedPayload",_visit:function(t){return zS._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return zS._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedPayload":return t.inlinedPayload(e);case"reference":return t.reference(e);default:return t._other(e)}}}});var lgf,FDt,n2a=h(()=>{"use strict";lgf={Alphabetical:"ALPHABETICAL"},FDt={...lgf,_visit:(e,t)=>e===FDt.Alphabetical?t.alphabetical():t._other()}});var pgf,PU,i2a=h(()=>{"use strict";pgf={Body:"BODY",Timestamp:"TIMESTAMP",NotificationUrl:"NOTIFICATION_URL",MessageId:"MESSAGE_ID"},PU={...pgf,_visit:(e,t)=>{switch(e){case PU.Body:return t.body();case PU.Timestamp:return t.timestamp();case PU.NotificationUrl:return t.notificationUrl();case PU.MessageId:return t.messageId();default:return t._other()}}}});var o2a=h(()=>{"use strict"});var s2a=h(()=>{"use strict"});var fgf,V2e,a2a=h(()=>{"use strict";fgf={Base64:"BASE64",Hex:"HEX"},V2e={...fgf,_visit:(e,t)=>{switch(e){case V2e.Base64:return t.base64();case V2e.Hex:return t.hex();default:return t._other()}}}});var p7,c2a=h(()=>{"use strict";Vr();p7={hmac:e=>({...e,type:"hmac",_visit:function(t){return p7._visit(this,t)}}),asymmetric:e=>({...e,type:"asymmetric",_visit:function(t){return p7._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 u2a=h(()=>{"use strict"});var dgf,lue,l2a=h(()=>{"use strict";dgf={UnixSeconds:"UNIX_SECONDS",UnixMillis:"UNIX_MILLIS",Iso8601:"ISO8601"},lue={...dgf,_visit:(e,t)=>{switch(e){case lue.UnixSeconds:return t.unixSeconds();case lue.UnixMillis:return t.unixMillis();case lue.Iso8601:return t.iso8601();default:return t._other()}}}});var g6i=h(()=>{"use strict";QFa();zFa();MFa();LFa();UFa();VFa();_Fa();qFa();GFa();WFa();HFa();KFa();JFa();YFa();XFa();ZFa();$Fa();e2a();t2a();r2a();n2a();i2a();o2a();s2a();a2a();c2a();u2a();l2a()});var A6i={};Z(A6i,{AsymmetricAlgorithm:()=>kO,AsymmetricKeySource:()=>c7,HmacAlgorithm:()=>u7,WebhookBodyHashAlgorithm:()=>l7,WebhookBodyHashLocation:()=>hye,WebhookHttpMethod:()=>Dlr,WebhookPayload:()=>zS,WebhookPayloadBodySort:()=>FDt,WebhookPayloadComponent:()=>PU,WebhookSignatureEncoding:()=>V2e,WebhookSignatureVerification:()=>p7,WebhookTimestampFormat:()=>lue});var p2a=h(()=>{"use strict";g6i()});var f2a=h(()=>{"use strict"});var rL,d2a=h(()=>{"use strict";Vr();rL={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return rL._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return rL._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedBody":return t.inlinedBody(e);case"reference":return t.reference(e);default:return t._other(e)}}}});var m2a=h(()=>{"use strict"});var h2a=h(()=>{"use strict"});var g2a=h(()=>{"use strict"});var A2a=h(()=>{"use strict"});var y2a=h(()=>{"use strict"});var FO,b2a=h(()=>{"use strict";Vr();FO={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return FO._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return FO._visit(this,t)}}),_visit:(e,t)=>{switch(e.type){case"inlinedBody":return t.inlinedBody(e);case"reference":return t.reference(e);default:return t._other(e)}}}});var E2a=h(()=>{"use strict"});var I2a=h(()=>{"use strict"});var mgf,Rlr,v2a=h(()=>{"use strict";mgf={Client:"client",Server:"server"},Rlr={...mgf,_visit:(e,t)=>{switch(e){case Rlr.Client:return t.client();case Rlr.Server:return t.server();default:return t._other()}}}});var x2a=h(()=>{"use strict"});var y6i=h(()=>{"use strict";f2a();d2a();m2a();h2a();g2a();A2a();y2a();b2a();E2a();I2a();v2a();x2a()});var b6i={};Z(b6i,{ExampleWebSocketMessageBody:()=>rL,WebSocketMessageBody:()=>FO,WebSocketMessageOrigin:()=>Rlr});var C2a=h(()=>{"use strict";y6i()});var w2a=h(()=>{"use strict";GSa();SMi();y1a();TMi();q1a();BMi();H1a();DMi();YOa();cBa();JMi();dBa();XMi();MBa();$Mi();DPa();jPa();n6i();lRa();o6i();FRa();a6i();_Ra();u6i();ika();p6i();RFa();d6i();jFa();h6i();p2a();g6i();C2a();y6i()});var Ut={};Z(Ut,{ApiDefinitionSource:()=>Cj,ApiVersionScheme:()=>mye,AsymmetricAlgorithm:()=>kO,AsymmetricKeySource:()=>c7,AuthScheme:()=>yp,AuthSchemesRequirement:()=>fw,AvailabilityStatus:()=>zm,ContainerType:()=>Bs,Environments:()=>u0,ErrorDeclarationDiscriminantValue:()=>dye,ErrorDiscriminationStrategy:()=>tL,ExampleCodeSample:()=>$6,ExampleContainer:()=>Qu,ExampleEndpointSuccessResponse:()=>SA,ExamplePrimitive:()=>Si,ExampleQueryParameterShape:()=>dw,ExampleRequestBody:()=>zP,ExampleResponse:()=>Cg,ExampleSingleUnionTypeProperties:()=>bY,ExampleStyle:()=>Plr,ExampleTypeReferenceShape:()=>$i,ExampleTypeShape:()=>Su,ExampleWebSocketMessageBody:()=>rL,FileProperty:()=>xj,FileUploadBodyPropertyEncoding:()=>RDt,FileUploadRequestProperty:()=>jx,GlobalParameterApplyMode:()=>Blr,GlobalParameterLocation:()=>CWe,HmacAlgorithm:()=>u7,HttpEndpointSource:()=>MP,HttpMethod:()=>Wd,HttpRequestBody:()=>Kf,HttpResponseBody:()=>mu,InvocationSource:()=>wWe,JsonResponse:()=>mE,Literal:()=>p0,NamedTypeDefault:()=>SWe,NonStreamHttpResponseBody:()=>PO,OAuthConfiguration:()=>jP,OAuthPkceMethod:()=>DDt,OAuthPublicClientId:()=>i7,ObjectPropertyAccess:()=>U2e,Pagination:()=>l0,PathParameterLocation:()=>kDt,PrimitiveTypeV1:()=>ns,PrimitiveTypeV2:()=>ti,ProtobufMethodType:()=>s7,ProtobufType:()=>Dp,PublishTarget:()=>Jf,PublishingConfig:()=>yY,RequestPropertyValue:()=>DO,ResolvedTypeReference:()=>RO,SdkRequestBodyType:()=>o7,SdkRequestShape:()=>OU,ShapeType:()=>a7,SingleUnionTypeProperties:()=>QS,Source:()=>cue,StreamingResponse:()=>gI,SupportedSdkLanguage:()=>eL,Transport:()=>BU,Type:()=>hc,TypeReference:()=>Ur,UnionDiscriminatorContext:()=>uue,V2AuthValues:()=>TU,V2EndpointLocationHttpMethod:()=>AY,V2HttpEndpointResponseBody:()=>Nx,WebSocketMessageBody:()=>FO,WebSocketMessageOrigin:()=>Rlr,WebhookBodyHashAlgorithm:()=>l7,WebhookBodyHashLocation:()=>hye,WebhookHttpMethod:()=>Dlr,WebhookPayload:()=>zS,WebhookPayloadBodySort:()=>FDt,WebhookPayloadComponent:()=>PU,WebhookSignatureEncoding:()=>V2e,WebhookSignatureVerification:()=>p7,WebhookTimestampFormat:()=>lue,WellKnownProtobufType:()=>mi,audience:()=>qSa,auth:()=>OMi,commons:()=>PMi,constants:()=>W1a,dynamic:()=>$t,environment:()=>YMi,errors:()=>ZMi,examples:()=>e6i,generatorExec:()=>rc,globalParameters:()=>i6i,http:()=>s6i,ir:()=>c6i,proto:()=>l6i,publish:()=>f6i,types:()=>m6i,variables:()=>NFa,webhooks:()=>A6i,websocket:()=>b6i});var Vr=h(()=>{"use strict";w2a()});var f7,S2a,NDt,E6i,wFy,I6i=h(()=>{"use strict";f7={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},S2a={[f7.Debug]:1,[f7.Info]:2,[f7.Warn]:3,[f7.Error]:4},NDt=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)}},E6i=class{level;logger;silent;constructor(t){this.level=S2a[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=S2a[t]}isDebug(){return this.shouldLog(f7.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(f7.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(f7.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(f7.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},wFy=new E6i({level:f7.Info,logger:new NDt,silent:!0})});var T2a,O2a=h(()=>{"use strict";I6i();(function(e){e.LogLevel=f7,e.ConsoleLogger=NDt})(T2a||(T2a={}))});var B2a=h(()=>{"use strict";O2a()});var P2a=h(()=>{"use strict";B2a()});var D2a=h(()=>{"use strict"});var R2a=h(()=>{"use strict";I6i()});var k2a=h(()=>{"use strict"});var nu,mw=h(()=>{"use strict";nu={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 ${Agf(e)}.`}function Agf(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 hw(e){return{...e,json:F2a(e.json),parse:F2a(e.parse)}}function F2a(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(`
|
|
100
|
-
`)),{ok:!0,value:t}):n}}var EY=h(()=>{"use strict"});function klr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var v6i=h(()=>{"use strict"});var TWe,x6i=h(()=>{"use strict";v6i();TWe=class extends Error{errors;constructor(t){super(t.map(klr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var OWe,C6i=h(()=>{"use strict";v6i();OWe=class extends Error{errors;constructor(t){super(t.map(klr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Kd(e){return{nullable:()=>ygf(e),optional:()=>w6i(e),optionalNullable:()=>bgf(e),transform:t=>S6i(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new OWe(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new TWe(n.errors)}}}function ygf(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:()=>nu.NULLABLE};return{...t,...Kd(t)}}function w6i(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:()=>nu.OPTIONAL};return{...t,...Kd(t)}}function bgf(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:()=>nu.OPTIONAL_NULLABLE};return{...t,...Kd(t)}}function S6i(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,...Kd(r)}}var N2a=h(()=>{"use strict";mw();x6i();C6i()});var wj=h(()=>{"use strict";N2a();x6i();C6i()});function j2a(){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:()=>nu.BIGINT};return{...hw(e),...Kd(e)}}var Q2a=h(()=>{"use strict";mw();tF();EY();wj()});var z2a=h(()=>{"use strict";Q2a()});function M2a(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Hd(t,"string")}]}:Egf.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:()=>nu.DATE};return{...hw(e),...Kd(e)}}var Egf,L2a=h(()=>{"use strict";mw();tF();EY();wj();Egf=/^([+-]?\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 U2a=h(()=>{"use strict";L2a()});function MS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...hw(r),...Kd(r)}}}var IY=h(()=>{"use strict";wj();EY()});function jDt(e){let t=new Set(e);return MS(nu.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})()}function V2a(e){return jDt(e).transform({transform:t=>t,untransform:t=>t})}var _2a=h(()=>{"use strict";mw();IY();tF()});var T6i=h(()=>{"use strict";_2a()});function q2a(e){let t=O6i(e);return{...t,...Kd(t)}}function O6i(e){return{parse:(t,r)=>BWe(e).parse(t,r),json:(t,r)=>BWe(e).json(t,r),getType:()=>BWe(e).getType()}}function BWe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var B6i=h(()=>{"use strict";wj()});function P6i(e){return Object.entries(e)}var G2a=h(()=>{"use strict"});function QDt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var D6i=h(()=>{"use strict"});function pue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var zDt=h(()=>{"use strict"});function MDt(e){return Object.keys(e)}var R6i=h(()=>{"use strict"});function W2a(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var H2a=h(()=>{"use strict"});function d7(e){return{withParsedProperties:t=>k6i(e,t)}}function k6i(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(Igf.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(!pue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Hd(n,"object")}]};let o=new Set(Object.keys(t)),s=QDt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Kd(r),...d7(r)}}var Igf,K2a=h(()=>{"use strict";D6i();tF();zDt();wj();Igf=Object.prototype.hasOwnProperty});var LDt=h(()=>{"use strict";K2a()});function J2a(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function fue(e){return e.isProperty}var F6i=h(()=>{"use strict"});function Flr(e){let t;function r(){if(t==null){t={};for(let[d,f]of P6i(e)){let m=fue(f)?f.rawKey:d,g=fue(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 P6i(e)){let m=fue(f)?f.rawKey:d,g=fue(f)?f.valueSchema:f;xgf(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])=>fue(f)?f.rawKey:d),_getParsedProperties:()=>MDt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Y2a({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 Y2a({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return fue(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:()=>nu.OBJECT};return{...hw(p),...Kd(p),...d7(p),..._2e(p)}}function Y2a({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!pue(e))return{ok:!1,errors:[{path:s,message:Hd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!vgf.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 _2e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>X2a({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>X2a({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>nu.OBJECT};return{...r,...Kd(r),...d7(r),..._2e(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:()=>nu.OBJECT};return{...n,...Kd(n),...d7(n),..._2e(n)}}}}function X2a({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!pue(t))return{ok:!1,errors:[{path:i,message:Hd(t,"object")}]};let o=new Set(e),[s,a]=W2a(MDt(t),l=>o.has(l)),c=r(QDt(t,a)),u=n(QDt(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 xgf(e){return!Cgf(e)}function Cgf(e){switch(e.getType()){case nu.ANY:case nu.UNKNOWN:case nu.OPTIONAL:case nu.OPTIONAL_NULLABLE:return!0;default:return!1}}var vgf,N6i=h(()=>{"use strict";mw();G2a();D6i();tF();zDt();R6i();EY();H2a();LDt();wj();F6i();vgf=Object.prototype.hasOwnProperty});function Z2a(e){return Flr(e)}var $2a=h(()=>{"use strict";N6i()});var j6i=h(()=>{"use strict";N6i();$2a();F6i()});function eNa(e){let t={...O6i(e),_getRawProperties:()=>BWe(e)._getRawProperties(),_getParsedProperties:()=>BWe(e)._getParsedProperties()};return{...t,...Kd(t),...d7(t),..._2e(t)}}var tNa=h(()=>{"use strict";j6i();LDt();wj();B6i()});var rNa=h(()=>{"use strict";B6i();tNa()});function Nlr(e){let t={parse:(r,n)=>nNa(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>nNa(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>nu.LIST};return{...hw(t),...Kd(t)}}function nNa(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 iNa=h(()=>{"use strict";mw();tF();EY();wj()});var Q6i=h(()=>{"use strict";iNa()});function oNa(e){return MS(nu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`${e.toString()}`)}]})()}var sNa=h(()=>{"use strict";mw();IY();tF()});function aNa(e){return MS(nu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`"${e}"`)}]})()}var cNa=h(()=>{"use strict";mw();IY();tF()});var uNa=h(()=>{"use strict";sNa();cNa()});var lNa,pNa=h(()=>{"use strict";mw();IY();lNa=MS(nu.ANY,e=>({ok:!0,value:e}))});var fNa,dNa=h(()=>{"use strict";mw();IY();tF();fNa=MS(nu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"boolean")}]})});var mNa,hNa=h(()=>{"use strict";mw();IY();mNa=MS(nu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var gNa,ANa=h(()=>{"use strict";mw();IY();tF();gNa=MS(nu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"number")}]})});var yNa,bNa=h(()=>{"use strict";mw();IY();tF();yNa=MS(nu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"string")}]})});var ENa,INa=h(()=>{"use strict";mw();IY();ENa=MS(nu.UNKNOWN,e=>({ok:!0,value:e}))});var vNa=h(()=>{"use strict";pNa();dNa();hNa();ANa();bNa();INa()});function xNa(e,t){let r={parse:(n,i)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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:()=>nu.RECORD};return{...hw(r),...Kd(r)}}function CNa(e,t){let r={parse:(n,i)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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:()=>nu.RECORD};return{...hw(r),...Kd(r)}}function jlr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!pue(e))return{ok:!1,errors:[{path:i,message:Hd(e,"object")}]};let o={},s=[];for(let a in e){if(!wgf.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 wgf,wNa=h(()=>{"use strict";mw();tF();zDt();EY();wj();wgf=Object.prototype.hasOwnProperty});var SNa=h(()=>{"use strict";wNa()});function TNa(e){let t=Nlr(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:()=>nu.SET};return{...hw(r),...Kd(r)}}var ONa=h(()=>{"use strict";mw();tF();EY();Q6i();wj()});var BNa=h(()=>{"use strict";ONa()});function DNa(e){let t={parse:(r,n)=>PNa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>PNa((i,o)=>i.json(r,o),e,n),getType:()=>nu.UNDISCRIMINATED_UNION};return{...hw(t),...Kd(t)}}function PNa(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 RNa=h(()=>{"use strict";mw();EY();wj()});var kNa=h(()=>{"use strict";RNa()});function FNa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var NNa=h(()=>{"use strict"});function QNa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=jDt(MDt(t)),o={parse:(s,a)=>jNa({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)=>jNa({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:()=>nu.UNION};return{...hw(o),...Kd(o),...d7(o)}}function jNa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!pue(e))return{ok:!1,errors:[{path:a,message:Hd(e,"object")}]};let c=e[t],u={};for(let f in e)Sgf.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 Sgf,zNa=h(()=>{"use strict";mw();tF();zDt();R6i();EY();T6i();LDt();wj();Sgf=Object.prototype.hasOwnProperty});var MNa=h(()=>{"use strict";NNa();zNa()});var LNa=h(()=>{"use strict";z2a();U2a();T6i();rNa();Q6i();uNa();j6i();LDt();vNa();SNa();wj();BNa();kNa();MNa()});var O={};Z(O,{JsonError:()=>TWe,ParseError:()=>OWe,any:()=>lNa,bigint:()=>j2a,boolean:()=>fNa,booleanLiteral:()=>oNa,date:()=>M2a,discriminant:()=>FNa,enum_:()=>jDt,forwardCompatibleEnum_:()=>V2a,getObjectLikeUtils:()=>d7,getObjectUtils:()=>_2e,getSchemaUtils:()=>Kd,isProperty:()=>fue,lazy:()=>q2a,lazyObject:()=>eNa,list:()=>Nlr,never:()=>mNa,number:()=>gNa,object:()=>Flr,objectWithoutOptionalProperties:()=>Z2a,optional:()=>w6i,partialRecord:()=>CNa,property:()=>J2a,record:()=>xNa,set:()=>TNa,string:()=>yNa,stringLiteral:()=>aNa,transform:()=>S6i,undiscriminatedUnion:()=>DNa,union:()=>QNa,unknown:()=>ENa,withParsedProperties:()=>k6i});var UNa=h(()=>{"use strict";LNa()});var VNa=h(()=>{"use strict"});var Qe=h(()=>{"use strict";D2a();R2a();k2a();UNa();VNa()});var Qlr,z6i=h(()=>{"use strict";Qe();Qlr=O.string()});var PWe,zlr=h(()=>{"use strict";Qe();PWe=O.string()});var M6i=h(()=>{"use strict";z6i();zlr()});var L6i={};Z(L6i,{AudienceDefinition:()=>Qlr,AudienceReference:()=>PWe});var _Na=h(()=>{"use strict";M6i()});var Zi,Gl=h(()=>{"use strict";Qe();Zi=O.objectWithoutOptionalProperties({docs:O.string().optional()})});var q2e,U6i=h(()=>{"use strict";Qe();q2e=O.objectWithoutOptionalProperties({unsafeName:O.string(),safeName:O.string()})});var DWe,Mlr=h(()=>{"use strict";Qe();U6i();DWe=O.objectWithoutOptionalProperties({originalName:O.string(),camelCase:q2e,pascalCase:q2e,snakeCase:q2e,screamingSnakeCase:q2e})});var Co,gf=h(()=>{"use strict";Qe();Mlr();Co=O.undiscriminatedUnion([O.string(),DWe])});var RWe,Llr=h(()=>{"use strict";Qe();RWe=O.string()});var DU,G2e=h(()=>{"use strict";Qe();Gl();Llr();DU=O.objectWithoutOptionalProperties({key:RWe}).extend(Zi)});var Sj,W2e=h(()=>{"use strict";Qe();Sj=O.string()});var Ulr,V6i=h(()=>{"use strict";Qe();gf();G2e();W2e();Ulr=O.objectWithoutOptionalProperties({username:Co,usernameEnvVar:Sj.optional(),usernameOmit:O.boolean().optional(),usernamePlaceholder:O.string().optional(),password:Co,passwordEnvVar:Sj.optional(),passwordOmit:O.boolean().optional(),passwordPlaceholder:O.string().optional()}).extend(DU)});var Vlr,_6i=h(()=>{"use strict";Qe();gf();G2e();W2e();Vlr=O.objectWithoutOptionalProperties({token:Co,tokenEnvVar:Sj.optional(),tokenPlaceholder:O.string().optional()}).extend(DU)});var gye,UDt=h(()=>{"use strict";Qe();gf();gye=O.objectWithoutOptionalProperties({wireValue:O.string(),name:Co})});var fs,Ed=h(()=>{"use strict";Qe();UDt();fs=O.undiscriminatedUnion([O.string(),gye])});var _lr,q6i=h(()=>{"use strict";Qe();Wo();Ed();G2e();W2e();_lr=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),prefix:O.string().optional(),headerEnvVar:Sj.optional(),headerPlaceholder:O.string().optional()}).extend(DU)});var due,VDt=h(()=>{"use strict";Qe();due=O.string()});var vY,kWe=h(()=>{"use strict";Qe();vY=O.string()});var xY,FWe=h(()=>{"use strict";Qe();xY=O.string()});var Aye,_Dt=h(()=>{"use strict";Qe();VDt();kWe();FWe();Aye=O.objectWithoutOptionalProperties({endpointId:due,serviceId:vY,subpackageId:xY.optional()})});var qlr,G6i=h(()=>{"use strict";Qe();qlr=O.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED","ALPHA","BETA","PREVIEW","LEGACY"])});var CY,NWe=h(()=>{"use strict";Qe();G6i();CY=O.objectWithoutOptionalProperties({status:qlr,message:O.string().optional()})});var Qx,m7=h(()=>{"use strict";Qe();NWe();Gl();Qx=O.objectWithoutOptionalProperties({availability:CY.optional()}).extend(Zi)});var qDt,W6i=h(()=>{"use strict";Qe();qDt=O.unknown()});var LS,wY=h(()=>{"use strict";Qe();W6i();LS=O.objectWithoutOptionalProperties({userSpecifiedExamples:O.record(O.string(),qDt),autogeneratedExamples:O.record(O.string(),qDt)})});var yye,GDt=h(()=>{"use strict";Qe();yye=O.enum_(["READ_ONLY","WRITE_ONLY"])});var NO,mue=h(()=>{"use strict";Qe();Wo();m7();Ed();wY();GDt();NO=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),propertyAccess:yye.optional(),defaultValue:O.unknown().optional(),v2Examples:LS.optional()}).extend(Qx)});var jWe,Glr=h(()=>{"use strict";Qe();Wo();gf();jWe=O.objectWithoutOptionalProperties({name:Co,type:O.lazy(()=>Ps)})});var f0,SY=h(()=>{"use strict";Qe();mue();Glr();f0=O.objectWithoutOptionalProperties({propertyPath:O.list(jWe).optional(),property:NO})});var Wlr,H6i=h(()=>{"use strict";Qe();SY();Wlr=O.objectWithoutOptionalProperties({responseProperty:f0,headerName:O.string(),valuePrefix:O.string().optional()})});var Hlr,K6i=h(()=>{"use strict";Qe();_Dt();SY();H6i();Hlr=O.objectWithoutOptionalProperties({endpoint:Aye,expiryProperty:f0.optional(),authenticatedRequestHeaders:O.list(Wlr)})});var Klr,J6i=h(()=>{"use strict";Qe();G2e();K6i();Klr=O.objectWithoutOptionalProperties({tokenEndpoint:Hlr}).extend(DU)});var Jlr,Y6i=h(()=>{"use strict";Qe();Jlr=O.enum_(["S256"])});var Ylr,X6i=h(()=>{"use strict";Qe();Y6i();Ylr=O.objectWithoutOptionalProperties({method:Jlr})});var QWe,Xlr=h(()=>{"use strict";Vr();Qe();W2e();QWe=O.union("type",{literal:O.object({value:O.string()}),environmentVariable:O.object({value:Sj})}).transform({transform:e=>{switch(e.type){case"literal":return i7.literal(e.value);case"environmentVariable":return i7.environmentVariable(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Zlr,Z6i=h(()=>{"use strict";Qe();X6i();Xlr();Zlr=O.objectWithoutOptionalProperties({clientId:QWe,authorizationUrl:O.string(),tokenUrl:O.string(),refreshUrl:O.string().optional(),redirectUri:O.string().optional(),redirectUriBackupPorts:O.list(O.number()).optional(),scopes:O.list(O.string()).optional(),pkce:Ylr,authorizationParameters:O.record(O.string(),O.string()).optional(),tokenParameters:O.record(O.string(),O.string()).optional(),refreshParameters:O.record(O.string(),O.string()).optional(),tokenHeader:O.string().optional(),tokenPrefix:O.string().optional()})});var zWe,$lr=h(()=>{"use strict";Qe();SY();zWe=O.objectWithoutOptionalProperties({accessToken:f0,expiresIn:f0.optional(),refreshToken:f0.optional()})});var RU,H2e=h(()=>{"use strict";Vr();Qe();RU=O.union("type",{string:O.object({string:O.string()}),boolean:O.object({boolean:O.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return p0.string(e.string);case"boolean":return p0.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t})});var bye,WDt=h(()=>{"use strict";Qe();Wo();m7();Ed();wY();H2e();bye=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),allowMultiple:O.boolean(),clientDefault:RU.optional(),defaultValue:O.unknown().optional(),v2Examples:LS.optional(),explode:O.boolean().optional()}).extend(Qx)});var epr,$6i=h(()=>{"use strict";Vr();Qe();mue();WDt();epr=O.union("type",{query:bye,body:NO}).transform({transform:e=>{switch(e.type){case"query":return DO.query(e);case"body":return DO.body(e);default:return e}},untransform:({_visit:e,...t})=>t})});var LP,K2e=h(()=>{"use strict";Qe();Glr();$6i();LP=O.objectWithoutOptionalProperties({propertyPath:O.list(jWe).optional(),property:epr})});var tpr,eLi=h(()=>{"use strict";Qe();K2e();tpr=O.objectWithoutOptionalProperties({refreshToken:LP})});var rpr,tLi=h(()=>{"use strict";Qe();_Dt();$lr();eLi();rpr=O.objectWithoutOptionalProperties({endpointReference:Aye,requestProperties:tpr,responseProperties:zWe})});var npr,rLi=h(()=>{"use strict";Qe();K2e();npr=O.objectWithoutOptionalProperties({clientId:LP,clientSecret:LP,scopes:LP.optional(),customProperties:O.list(LP).optional()})});var ipr,nLi=h(()=>{"use strict";Qe();_Dt();rLi();$lr();ipr=O.objectWithoutOptionalProperties({endpointReference:Aye,requestProperties:npr,responseProperties:zWe})});var opr,iLi=h(()=>{"use strict";Qe();W2e();tLi();nLi();opr=O.objectWithoutOptionalProperties({clientIdEnvVar:Sj.optional(),clientSecretEnvVar:Sj.optional(),tokenPrefix:O.string().optional(),tokenHeader:O.string().optional(),scopes:O.list(O.string()).optional(),tokenEndpoint:ipr,refreshEndpoint:rpr.optional()})});var spr,oLi=h(()=>{"use strict";Qe();Xlr();spr=O.objectWithoutOptionalProperties({clientId:QWe,deviceAuthorizationUrl:O.string(),tokenUrl:O.string(),refreshUrl:O.string().optional(),scopes:O.list(O.string()).optional(),deviceAuthorizationParameters:O.record(O.string(),O.string()).optional(),tokenParameters:O.record(O.string(),O.string()).optional(),refreshParameters:O.record(O.string(),O.string()).optional(),tokenHeader:O.string().optional(),tokenPrefix:O.string().optional()})});var apr,sLi=h(()=>{"use strict";Vr();Qe();Z6i();iLi();oLi();apr=O.union("type",{clientCredentials:opr,authorizationCode:Zlr,deviceCode:spr}).transform({transform:e=>{switch(e.type){case"clientCredentials":return jP.clientCredentials(e);case"authorizationCode":return jP.authorizationCode(e);case"deviceCode":return jP.deviceCode(e);default:return e}},untransform:({_visit:e,...t})=>t})});var cpr,aLi=h(()=>{"use strict";Qe();G2e();sLi();cpr=O.objectWithoutOptionalProperties({configuration:apr}).extend(DU)});var upr,cLi=h(()=>{"use strict";Vr();Qe();V6i();_6i();q6i();J6i();aLi();upr=O.union(O.discriminant("type","_type"),{bearer:Vlr,basic:Ulr,header:_lr,oauth:cpr,inferred:Klr}).transform({transform:e=>{switch(e.type){case"bearer":return yp.bearer(e);case"basic":return yp.basic(e);case"header":return yp.header(e);case"oauth":return yp.oauth(e);case"inferred":return yp.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var lpr,uLi=h(()=>{"use strict";Qe();lpr=O.enum_(["ALL","ANY","ENDPOINT_SECURITY"])});var ppr,lLi=h(()=>{"use strict";Qe();Gl();cLi();uLi();ppr=O.objectWithoutOptionalProperties({requirement:lpr,schemes:O.list(upr)}).extend(Zi)});var fpr,pLi=h(()=>{"use strict";Qe();fpr=O.string()});var fLi=h(()=>{"use strict";lLi();cLi();Llr();uLi();pLi();G2e();V6i();_6i();W2e();q6i();H6i();J6i();K6i();rLi();$lr();Z6i();iLi();sLi();oLi();X6i();Y6i();Xlr();tLi();eLi();aLi();nLi()});var dLi={};Z(dLi,{ApiAuth:()=>ppr,AuthScheme:()=>upr,AuthSchemeKey:()=>RWe,AuthSchemesRequirement:()=>lpr,AuthScope:()=>fpr,BaseAuthScheme:()=>DU,BasicAuthScheme:()=>Ulr,BearerAuthScheme:()=>Vlr,EnvironmentVariable:()=>Sj,HeaderAuthScheme:()=>_lr,InferredAuthScheme:()=>Klr,InferredAuthSchemeTokenEndpoint:()=>Hlr,InferredAuthenticatedRequestHeader:()=>Wlr,OAuthAccessTokenRequestProperties:()=>npr,OAuthAccessTokenResponseProperties:()=>zWe,OAuthAuthorizationCode:()=>Zlr,OAuthClientCredentials:()=>opr,OAuthConfiguration:()=>apr,OAuthDeviceCode:()=>spr,OAuthPkceConfiguration:()=>Ylr,OAuthPkceMethod:()=>Jlr,OAuthPublicClientId:()=>QWe,OAuthRefreshEndpoint:()=>rpr,OAuthRefreshTokenRequestProperties:()=>tpr,OAuthScheme:()=>cpr,OAuthTokenEndpoint:()=>ipr});var qNa=h(()=>{"use strict";fLi()});var Eye,HDt=h(()=>{"use strict";Qe();Eye=O.string()});var Iye,KDt=h(()=>{"use strict";Qe();Iye=O.string()});var dpr,mLi=h(()=>{"use strict";Qe();dpr=O.objectWithoutOptionalProperties({original:O.string()})});var JDt,hLi=h(()=>{"use strict";Qe();JDt=O.string()});var kU,J2e=h(()=>{"use strict";Qe();gf();kU=O.objectWithoutOptionalProperties({allParts:O.list(Co),packagePath:O.list(Co),file:Co.optional()})});var jO,hue=h(()=>{"use strict";Qe();jO=O.string()});var MWe,mpr=h(()=>{"use strict";Qe();MWe=O.string()});var hpr,gLi=h(()=>{"use strict";Qe();hpr=O.string()});var LWe,gpr=h(()=>{"use strict";Qe();LWe=O.string()});var FU,Y2e=h(()=>{"use strict";Qe();FU=O.objectWithoutOptionalProperties({contentType:O.string().optional()})});var vye,YDt=h(()=>{"use strict";Qe();NWe();Gl();vye=O.objectWithoutOptionalProperties({availability:CY.optional()}).extend(Zi)});var TY,UWe=h(()=>{"use strict";Qe();TY=O.objectWithoutOptionalProperties({jsonExample:O.unknown()})});var ALi=h(()=>{"use strict";NWe();G6i();m7();HDt();VDt();_Dt();KDt();mLi();hLi();J2e();Mlr();UDt();Ed();gf();U6i();kWe();FWe();hue();mpr();gLi();gpr();Y2e();Gl();YDt();UWe()});var yLi={};Z(yLi,{Availability:()=>CY,AvailabilityStatus:()=>qlr,Declaration:()=>Qx,DisplayName:()=>Eye,EndpointId:()=>due,EndpointReference:()=>Aye,ErrorId:()=>Iye,EscapedString:()=>dpr,FeatureId:()=>JDt,FernFilepath:()=>kU,Name:()=>DWe,NameAndWireValue:()=>gye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Co,SafeAndUnsafeString:()=>q2e,ServiceId:()=>vY,SubpackageId:()=>xY,TypeId:()=>jO,WebSocketChannelId:()=>LWe,WebhookGroupId:()=>MWe,WebhookId:()=>hpr,WithContentType:()=>FU,WithDocs:()=>Zi,WithDocsAndAvailability:()=>vye,WithJsonExample:()=>TY});var GNa=h(()=>{"use strict";ALi()});var Apr,bLi=h(()=>{"use strict";Qe();Ed();Apr=O.objectWithoutOptionalProperties({errorInstanceIdKey:fs})});var ELi=h(()=>{"use strict";bLi()});var ILi={};Z(ILi,{Constants:()=>Apr});var WNa=h(()=>{"use strict";ELi()});var X2e,vLi=h(()=>{"use strict";Qe();X2e=O.objectWithoutOptionalProperties({unsafeName:O.string(),safeName:O.string()})});var tA,nL=h(()=>{"use strict";Qe();vLi();tA=O.objectWithoutOptionalProperties({originalName:O.string(),camelCase:X2e,pascalCase:X2e,snakeCase:X2e,screamingSnakeCase:X2e})});var ypr,xLi=h(()=>{"use strict";Qe();nL();ypr=O.objectWithoutOptionalProperties({username:tA,usernameOmit:O.boolean().optional(),password:tA,passwordOmit:O.boolean().optional()})});var bpr,CLi=h(()=>{"use strict";Qe();nL();bpr=O.objectWithoutOptionalProperties({token:tA})});var AI,h7=h(()=>{"use strict";Qe();nL();AI=O.objectWithoutOptionalProperties({wireValue:O.string(),name:tA})});var Epr,wLi=h(()=>{"use strict";Qe();Epr=O.enum_(["READ_ONLY","WRITE_ONLY"])});var wg,Tj=h(()=>{"use strict";Qe();Wo();h7();wLi();wg=O.objectWithoutOptionalProperties({name:AI,typeReference:O.lazy(()=>d0.TypeReference),propertyAccess:Epr.optional(),variable:O.string().optional()})});var Ipr,SLi=h(()=>{"use strict";Qe();Tj();Ipr=O.objectWithoutOptionalProperties({header:wg})});var vpr,TLi=h(()=>{"use strict";Qe();Tj();vpr=O.objectWithoutOptionalProperties({parameters:O.list(wg).optional()})});var xpr,OLi=h(()=>{"use strict";Qe();nL();Tj();xpr=O.objectWithoutOptionalProperties({clientId:tA,clientSecret:tA,customProperties:O.list(wg).optional()})});var Cpr,BLi=h(()=>{"use strict";Vr();Qe();xLi();CLi();SLi();TLi();OLi();Cpr=O.union("type",{basic:ypr,bearer:bpr,header:Ipr,oauth:xpr,inferred:vpr}).transform({transform:e=>{switch(e.type){case"basic":return $t.Auth.basic(e);case"bearer":return $t.Auth.bearer(e);case"header":return $t.Auth.header(e);case"oauth":return $t.Auth.oauth(e);case"inferred":return $t.Auth.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var wpr,PLi=h(()=>{"use strict";Qe();wpr=O.objectWithoutOptionalProperties({username:O.string(),password:O.string()})});var Spr,DLi=h(()=>{"use strict";Qe();Spr=O.objectWithoutOptionalProperties({token:O.string()})});var Tpr,RLi=h(()=>{"use strict";Qe();Tpr=O.objectWithoutOptionalProperties({value:O.unknown()})});var Opr,kLi=h(()=>{"use strict";Qe();Opr=O.objectWithoutOptionalProperties({values:O.record(O.string(),O.unknown()).optional()})});var Bpr,FLi=h(()=>{"use strict";Qe();Bpr=O.objectWithoutOptionalProperties({clientId:O.string(),clientSecret:O.string(),customPropertyValues:O.record(O.string(),O.unknown()).optional()})});var Ppr,NLi=h(()=>{"use strict";Vr();Qe();PLi();DLi();RLi();kLi();FLi();Ppr=O.union("type",{basic:wpr,bearer:Spr,header:Tpr,oauth:Bpr,inferred:Opr}).transform({transform:e=>{switch(e.type){case"basic":return $t.AuthValues.basic(e);case"bearer":return $t.AuthValues.bearer(e);case"header":return $t.AuthValues.header(e);case"oauth":return $t.AuthValues.oauth(e);case"inferred":return $t.AuthValues.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var jLi=h(()=>{"use strict";BLi();NLi();xLi();PLi();CLi();DLi();SLi();RLi();TLi();kLi();OLi();FLi()});var QLi={};Z(QLi,{Auth:()=>Cpr,AuthValues:()=>Ppr,BasicAuth:()=>ypr,BasicAuthValues:()=>wpr,BearerAuth:()=>bpr,BearerAuthValues:()=>Spr,HeaderAuth:()=>Ipr,HeaderAuthValues:()=>Tpr,InferredAuth:()=>vpr,InferredAuthValues:()=>Opr,OAuth:()=>xpr,OAuthValues:()=>Bpr});var HNa=h(()=>{"use strict";jLi()});var Dpr,zLi=h(()=>{"use strict";Qe();Dpr=O.string()});var Rpr,MLi=h(()=>{"use strict";Qe();nL();Rpr=O.objectWithoutOptionalProperties({allParts:O.list(tA),packagePath:O.list(tA),file:tA.optional()})});var KNa,JNa=h(()=>{"use strict";Qe();h7();KNa=O.undiscriminatedUnion([O.string(),AI])});var YNa,XNa=h(()=>{"use strict";Qe();nL();YNa=O.undiscriminatedUnion([O.string(),tA])});var OY,VWe=h(()=>{"use strict";Qe();OY=O.string()});var _We,kpr=h(()=>{"use strict";Qe();_We=O.objectWithoutOptionalProperties({docs:O.string().optional()})});var LLi=h(()=>{"use strict";zLi();MLi();nL();h7();JNa();XNa();vLi();VWe();kpr()});var ULi={};Z(ULi,{EndpointId:()=>Dpr,FernFilepath:()=>Rpr,Name:()=>tA,NameAndWireValue:()=>AI,NameAndWireValueOrString:()=>KNa,NameOrString:()=>YNa,SafeAndUnsafeString:()=>X2e,TypeId:()=>OY,WithDocs:()=>_We});var ZNa=h(()=>{"use strict";LLi()});var UP,gue=h(()=>{"use strict";Qe();MLi();nL();UP=O.objectWithoutOptionalProperties({fernFilepath:Rpr,name:tA})});var VLi=h(()=>{"use strict";gue()});var _Li={};Z(_Li,{Declaration:()=>UP});var $Na=h(()=>{"use strict";VLi()});var qWe,Fpr=h(()=>{"use strict";Vr();Qe();Wo();qWe=O.union("type",{bytes:O.object({}),typeReference:O.object({value:O.lazy(()=>d0.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return $t.ReferencedRequestBodyType.bytes();case"typeReference":return $t.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Npr,qLi=h(()=>{"use strict";Qe();Tj();Fpr();Npr=O.objectWithoutOptionalProperties({pathParameters:O.list(wg).optional(),body:qWe.optional()})});var jpr,GLi=h(()=>{"use strict";Qe();jpr=O.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var GWe,Qpr=h(()=>{"use strict";Qe();GLi();GWe=O.objectWithoutOptionalProperties({method:jpr,path:O.string()})});var BY,WWe=h(()=>{"use strict";Qe();BY=O.string()});var xye,XDt=h(()=>{"use strict";Qe();xye=O.string()});var Cye,ZDt=h(()=>{"use strict";Qe();Cye=O.string()});var zpr,WLi=h(()=>{"use strict";Qe();XDt();ZDt();zpr=O.record(xye,Cye)});var Mpr,HLi=h(()=>{"use strict";Qe();WWe();WLi();Mpr=O.undiscriminatedUnion([BY,zpr])});var HWe,KLi=h(()=>{"use strict";Qe();HWe=O.record(O.string(),O.unknown())});var Lpr,JLi=h(()=>{"use strict";Qe();NLi();Qpr();HLi();KLi();Lpr=O.objectWithoutOptionalProperties({endpoint:GWe,baseUrl:O.property("baseURL",O.string().optional()),environment:Mpr.optional(),auth:Ppr.optional(),pathParameters:HWe.optional(),queryParameters:HWe.optional(),headers:HWe.optional(),requestBody:O.unknown().optional()})});var Upr,YLi=h(()=>{"use strict";Qe();JLi();Upr=O.objectWithoutOptionalProperties({id:O.string(),name:O.string().optional(),isUserSpecified:O.boolean().optional()}).extend(Lpr)});var Vpr,XLi=h(()=>{"use strict";Vr();Qe();h7();Tj();Vpr=O.union("type",{file:AI,fileArray:AI,bodyProperty:wg}).transform({transform:e=>{switch(e.type){case"file":return $t.FileUploadRequestBodyProperty.file(e);case"fileArray":return $t.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return $t.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _pr,ZLi=h(()=>{"use strict";Qe();XLi();_pr=O.objectWithoutOptionalProperties({properties:O.list(Vpr)})});var qpr,$Li=h(()=>{"use strict";Qe();nL();Fpr();qpr=O.objectWithoutOptionalProperties({bodyKey:tA,bodyType:qWe})});var Gpr,e3i=h(()=>{"use strict";Vr();Qe();Tj();ZLi();$Li();Gpr=O.union("type",{properties:O.object({value:O.list(wg)}),referenced:qpr,fileUpload:_pr}).transform({transform:e=>{switch(e.type){case"properties":return $t.InlinedRequestBody.properties(e.value);case"referenced":return $t.InlinedRequestBody.referenced(e);case"fileUpload":return $t.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Wpr,t3i=h(()=>{"use strict";Qe();Wpr=O.objectWithoutOptionalProperties({includePathParameters:O.boolean(),onlyPathParameters:O.boolean()})});var Hpr,r3i=h(()=>{"use strict";Qe();gue();Tj();e3i();t3i();Hpr=O.objectWithoutOptionalProperties({declaration:UP,pathParameters:O.list(wg).optional(),queryParameters:O.list(wg).optional(),headers:O.list(wg).optional(),body:Gpr.optional(),metadata:Wpr.optional()})});var Kpr,n3i=h(()=>{"use strict";Vr();Qe();qLi();r3i();Kpr=O.union("type",{body:Npr,inlined:Hpr}).transform({transform:e=>{switch(e.type){case"body":return $t.Request.body(e);case"inlined":return $t.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Jpr,i3i=h(()=>{"use strict";Vr();Qe();Jpr=O.union("type",{json:O.object({}),streaming:O.object({}),streamParameter:O.object({}),fileDownload:O.object({}),text:O.object({}),bytes:O.object({})}).transform({transform:e=>{switch(e.type){case"json":return $t.Response.json();case"streaming":return $t.Response.streaming();case"streamParameter":return $t.Response.streamParameter();case"fileDownload":return $t.Response.fileDownload();case"text":return $t.Response.text();case"bytes":return $t.Response.bytes();default:return e}},untransform:({_visit:e,...t})=>t})});var Ypr,o3i=h(()=>{"use strict";Qe();BLi();gue();YLi();Qpr();n3i();i3i();Ypr=O.objectWithoutOptionalProperties({auth:Cpr.optional(),declaration:UP,location:GWe,request:Kpr,response:Jpr,examples:O.list(Upr).optional()})});var s3i=h(()=>{"use strict";qLi();o3i();YLi();Qpr();ZLi();XLi();r3i();e3i();t3i();$Li();Fpr();n3i();i3i()});var a3i={};Z(a3i,{BodyRequest:()=>Npr,Endpoint:()=>Ypr,EndpointExample:()=>Upr,EndpointLocation:()=>GWe,FileUploadRequestBody:()=>_pr,FileUploadRequestBodyProperty:()=>Vpr,InlinedRequest:()=>Hpr,InlinedRequestBody:()=>Gpr,InlinedRequestMetadata:()=>Wpr,ReferencedRequestBody:()=>qpr,ReferencedRequestBodyType:()=>qWe,Request:()=>Kpr,Response:()=>Jpr});var eja=h(()=>{"use strict";s3i()});var Xpr,c3i=h(()=>{"use strict";Qe();nL();XDt();Xpr=O.objectWithoutOptionalProperties({id:xye,name:tA})});var Zpr,u3i=h(()=>{"use strict";Qe();nL();kpr();XDt();WWe();ZDt();Zpr=O.objectWithoutOptionalProperties({id:BY,name:tA,urls:O.record(xye,Cye)}).extend(_We)});var $pr,l3i=h(()=>{"use strict";Qe();c3i();u3i();$pr=O.objectWithoutOptionalProperties({baseUrls:O.list(Xpr),environments:O.list(Zpr)})});var efr,p3i=h(()=>{"use strict";Qe();nL();kpr();WWe();ZDt();efr=O.objectWithoutOptionalProperties({id:BY,name:tA,url:Cye}).extend(_We)});var tfr,f3i=h(()=>{"use strict";Qe();p3i();tfr=O.objectWithoutOptionalProperties({environments:O.list(efr)})});var rfr,d3i=h(()=>{"use strict";Vr();Qe();l3i();f3i();rfr=O.union("type",{singleBaseUrl:tfr,multipleBaseUrls:$pr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return $t.Environments.singleBaseUrl(e);case"multipleBaseUrls":return $t.Environments.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var nfr,m3i=h(()=>{"use strict";Qe();WWe();d3i();nfr=O.objectWithoutOptionalProperties({defaultEnvironment:BY.optional(),environments:rfr})});var h3i=h(()=>{"use strict";XDt();c3i();WWe();d3i();m3i();ZDt();HLi();u3i();l3i();WLi();p3i();f3i()});var g3i={};Z(g3i,{EnvironmentBaseUrlId:()=>xye,EnvironmentBaseUrlWithId:()=>Xpr,EnvironmentId:()=>BY,EnvironmentUrl:()=>Cye,EnvironmentValues:()=>Mpr,Environments:()=>rfr,EnvironmentsConfig:()=>nfr,MultipleBaseUrlsEnvironment:()=>Zpr,MultipleBaseUrlsEnvironments:()=>$pr,MultipleEnvironmentUrlValues:()=>zpr,SingleBaseUrlEnvironment:()=>efr,SingleBaseUrlEnvironments:()=>tfr});var tja=h(()=>{"use strict";h3i()});var A3i=h(()=>{"use strict";GLi()});var y3i={};Z(y3i,{HttpMethod:()=>jpr});var rja=h(()=>{"use strict";A3i()});var ifr,b3i=h(()=>{"use strict";Qe();ifr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var ofr,E3i=h(()=>{"use strict";Qe();ofr=O.enum_(["explicit","auto"])});var KWe,sfr=h(()=>{"use strict";Qe();KWe=O.string()});var afr,I3i=h(()=>{"use strict";Qe();afr=O.enum_(["header","query","body","path"])});var JWe,cfr=h(()=>{"use strict";Qe();Wo();Ed();Gl();H2e();E3i();sfr();I3i();JWe=O.objectWithoutOptionalProperties({id:KWe,name:fs,location:afr,target:O.string(),valueType:O.lazy(()=>Ps),env:O.string().optional(),clientDefault:RU.optional(),optional:O.boolean().optional(),apply:ofr.optional()}).extend(Zi)});var ufr,v3i=h(()=>{"use strict";Qe();Wo();gue();ufr=O.objectWithoutOptionalProperties({declaration:UP,typeReference:O.lazy(()=>d0.TypeReference)})});var lfr,x3i=h(()=>{"use strict";Qe();h7();Tj();lfr=O.objectWithoutOptionalProperties({discriminantValue:AI,properties:O.list(wg).optional()})});var pfr,C3i=h(()=>{"use strict";Qe();h7();VWe();Tj();pfr=O.objectWithoutOptionalProperties({typeId:OY,discriminantValue:AI,properties:O.list(wg)})});var ffr,w3i=h(()=>{"use strict";Qe();Wo();h7();Tj();ffr=O.objectWithoutOptionalProperties({typeReference:O.lazy(()=>d0.TypeReference),discriminantValue:AI,properties:O.list(wg).optional()})});var dfr,S3i=h(()=>{"use strict";Vr();Qe();x3i();C3i();w3i();dfr=O.union("type",{samePropertiesAsObject:pfr,singleProperty:ffr,noProperties:lfr}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return $t.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return $t.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return $t.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mfr,T3i=h(()=>{"use strict";Qe();h7();gue();S3i();mfr=O.objectWithoutOptionalProperties({declaration:UP,discriminant:AI,types:O.record(O.string(),dfr),inheritedBaseProperties:O.list(AI).optional()})});var hfr,O3i=h(()=>{"use strict";Qe();h7();gue();hfr=O.objectWithoutOptionalProperties({declaration:UP,values:O.list(AI)})});var gfr,B3i=h(()=>{"use strict";Qe();h7();VWe();gue();Tj();gfr=O.objectWithoutOptionalProperties({declaration:UP,properties:O.list(wg),extends:O.list(OY).optional(),additionalProperties:O.boolean().optional(),deferredUnionBaseProperties:O.list(AI).optional()})});var Afr,P3i=h(()=>{"use strict";Qe();Wo();gue();Afr=O.objectWithoutOptionalProperties({declaration:UP,types:O.list(O.lazy(()=>d0.TypeReference))})});var yfr,D3i=h(()=>{"use strict";Vr();Qe();v3i();T3i();O3i();B3i();P3i();yfr=O.union("type",{alias:ufr,enum:hfr,object:gfr,discriminatedUnion:mfr,undiscriminatedUnion:Afr}).transform({transform:e=>{switch(e.type){case"alias":return $t.NamedType.alias(e);case"enum":return $t.NamedType.enum(e);case"object":return $t.NamedType.object(e);case"discriminatedUnion":return $t.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return $t.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var bfr,R3i=h(()=>{"use strict";Qe();Wo();Mlr();bfr=O.objectWithoutOptionalProperties({id:O.string(),name:DWe,typeReference:O.lazy(()=>d0.TypeReference)})});var Efr,k3i=h(()=>{"use strict";Qe();Efr=O.objectWithoutOptionalProperties({version:O.string(),repoUrl:O.string()})});var Ifr,F3i=h(()=>{"use strict";Qe();Ifr=O.objectWithoutOptionalProperties({version:O.string(),coordinate:O.string(),repoUrl:O.string().optional()})});var vfr,N3i=h(()=>{"use strict";Qe();vfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var xfr,j3i=h(()=>{"use strict";Qe();xfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var Cfr,Q3i=h(()=>{"use strict";Qe();Cfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var wfr,z3i=h(()=>{"use strict";Qe();wfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var Sfr,M3i=h(()=>{"use strict";Qe();Sfr=O.objectWithoutOptionalProperties({version:O.string(),repoUrl:O.string()})});var Tfr,L3i=h(()=>{"use strict";Vr();Qe();b3i();k3i();F3i();N3i();j3i();Q3i();z3i();M3i();Tfr=O.union("type",{go:Efr,swift:Sfr,maven:Ifr,npm:vfr,nuget:xfr,pypi:Cfr,rubygems:wfr,crates:ifr}).transform({transform:e=>{switch(e.type){case"go":return $t.PublishInfo.go(e);case"swift":return $t.PublishInfo.swift(e);case"maven":return $t.PublishInfo.maven(e);case"npm":return $t.PublishInfo.npm(e);case"nuget":return $t.PublishInfo.nuget(e);case"pypi":return $t.PublishInfo.pypi(e);case"rubygems":return $t.PublishInfo.rubygems(e);case"crates":return $t.PublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Ofr,U3i=h(()=>{"use strict";Vr();Qe();L3i();Ofr=O.union("type",{publish:O.object({value:Tfr}),local:O.object({})}).transform({transform:e=>{switch(e.type){case"publish":return $t.GeneratorOutputConfig.publish(e.value);case"local":return $t.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t})});var Bfr,V3i=h(()=>{"use strict";Qe();U3i();Bfr=O.objectWithoutOptionalProperties({apiName:O.string(),organization:O.string(),customConfig:O.unknown(),outputConfig:Ofr})});var Pfr,_3i=h(()=>{"use strict";Qe();cfr();zLi();VWe();o3i();m3i();Tj();D3i();R3i();V3i();Pfr=O.objectWithoutOptionalProperties({version:O.stringLiteral("1.0.0"),types:O.record(OY,yfr),endpoints:O.record(Dpr,Ypr),environments:nfr.optional(),headers:O.list(wg).optional(),pathParameters:O.list(wg).optional(),variables:O.list(bfr).optional(),globalParameters:O.list(JWe).optional(),generatorConfig:Bfr.optional()})});var q3i=h(()=>{"use strict";b3i();_3i();V3i();U3i();k3i();F3i();N3i();j3i();L3i();Q3i();z3i();M3i()});var G3i={};Z(G3i,{CratesPublishInfo:()=>ifr,DynamicIntermediateRepresentation:()=>Pfr,GeneratorConfig:()=>Bfr,GeneratorOutputConfig:()=>Ofr,GoPublishInfo:()=>Efr,MavenPublishInfo:()=>Ifr,NpmPublishInfo:()=>vfr,NugetPublishInfo:()=>xfr,PublishInfo:()=>Tfr,PypiPublishInfo:()=>Cfr,RubyGemsPublishInfo:()=>wfr,SwiftPublishInfo:()=>Sfr});var nja=h(()=>{"use strict";q3i()});var Dfr,W3i=h(()=>{"use strict";Qe();Dfr=O.enum_(["CRITICAL","WARNING"])});var Rfr,H3i=h(()=>{"use strict";Qe();W3i();Rfr=O.objectWithoutOptionalProperties({severity:Dfr,message:O.string()})});var ija,oja=h(()=>{"use strict";Qe();H3i();ija=O.objectWithoutOptionalProperties({snippet:O.string(),errors:O.list(Rfr).optional()})});var K3i=h(()=>{"use strict";JLi();oja();H3i();W3i();KLi()});var J3i={};Z(J3i,{EndpointSnippetRequest:()=>Lpr,EndpointSnippetResponse:()=>ija,ErrorSeverity:()=>Dfr,Error_:()=>Rfr,Values:()=>HWe});var sja=h(()=>{"use strict";K3i()});var kfr,Y3i=h(()=>{"use strict";Vr();Qe();kfr=O.union("type",{boolean:O.object({value:O.boolean()}),string:O.object({value:O.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return $t.LiteralType.boolean(e.value);case"string":return $t.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var aja,cja=h(()=>{"use strict";Qe();Wo();aja=O.objectWithoutOptionalProperties({key:O.lazy(()=>d0.TypeReference),value:O.lazy(()=>d0.TypeReference)})});var Ffr,X3i=h(()=>{"use strict";Qe();Ffr=O.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var uja,lja=h(()=>{"use strict";Vr();Qe();Wo();VWe();Y3i();X3i();uja=O.union("type",{list:O.object({value:O.lazy(()=>d0.TypeReference)}),literal:O.object({value:kfr}),map:O.lazyObject(()=>d0.MapType),named:O.object({value:OY}),nullable:O.object({value:O.lazy(()=>d0.TypeReference)}),optional:O.object({value:O.lazy(()=>d0.TypeReference)}),primitive:O.object({value:Ffr}),set:O.object({value:O.lazy(()=>d0.TypeReference)}),unknown:O.object({})}).transform({transform:e=>{switch(e.type){case"list":return $t.TypeReference.list(e.value);case"literal":return $t.TypeReference.literal(e.value);case"map":return $t.TypeReference.map(e);case"named":return $t.TypeReference.named(e.value);case"nullable":return $t.TypeReference.nullable(e.value);case"optional":return $t.TypeReference.optional(e.value);case"primitive":return $t.TypeReference.primitive(e.value);case"set":return $t.TypeReference.set(e.value);case"unknown":return $t.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var Z3i=h(()=>{"use strict";v3i();T3i();O3i();Y3i();cja();Tj();D3i();wLi();B3i();X3i();S3i();x3i();C3i();w3i();lja();P3i()});var $3i={};Z($3i,{AliasType:()=>ufr,DiscriminatedUnionType:()=>mfr,EnumType:()=>hfr,LiteralType:()=>kfr,MapType:()=>aja,NamedParameter:()=>wg,NamedType:()=>yfr,ObjectPropertyAccess:()=>Epr,ObjectType:()=>gfr,PrimitiveTypeV1:()=>Ffr,SingleDiscriminatedUnionType:()=>dfr,SingleDiscriminatedUnionTypeNoProperties:()=>lfr,SingleDiscriminatedUnionTypeObject:()=>pfr,SingleDiscriminatedUnionTypeSingleProperty:()=>ffr,TypeReference:()=>uja,UndiscriminatedUnionType:()=>Afr});var pja=h(()=>{"use strict";Z3i()});var e4i=h(()=>{"use strict";R3i()});var t4i={};Z(t4i,{VariableDeclaration:()=>bfr});var fja=h(()=>{"use strict";e4i()});var dja=h(()=>{"use strict";HNa();jLi();ZNa();LLi();$Na();VLi();eja();s3i();tja();h3i();rja();A3i();nja();q3i();sja();K3i();pja();Z3i();fja();e4i()});var d0={};Z(d0,{AliasType:()=>ufr,Auth:()=>Cpr,AuthValues:()=>Ppr,BasicAuth:()=>ypr,BasicAuthValues:()=>wpr,BearerAuth:()=>bpr,BearerAuthValues:()=>Spr,BodyRequest:()=>Npr,CratesPublishInfo:()=>ifr,Declaration:()=>UP,DiscriminatedUnionType:()=>mfr,DynamicIntermediateRepresentation:()=>Pfr,Endpoint:()=>Ypr,EndpointExample:()=>Upr,EndpointId:()=>Dpr,EndpointLocation:()=>GWe,EndpointSnippetRequest:()=>Lpr,EndpointSnippetResponse:()=>ija,EnumType:()=>hfr,EnvironmentBaseUrlId:()=>xye,EnvironmentBaseUrlWithId:()=>Xpr,EnvironmentId:()=>BY,EnvironmentUrl:()=>Cye,EnvironmentValues:()=>Mpr,Environments:()=>rfr,EnvironmentsConfig:()=>nfr,ErrorSeverity:()=>Dfr,Error_:()=>Rfr,FernFilepath:()=>Rpr,FileUploadRequestBody:()=>_pr,FileUploadRequestBodyProperty:()=>Vpr,GeneratorConfig:()=>Bfr,GeneratorOutputConfig:()=>Ofr,GoPublishInfo:()=>Efr,HeaderAuth:()=>Ipr,HeaderAuthValues:()=>Tpr,HttpMethod:()=>jpr,InferredAuth:()=>vpr,InferredAuthValues:()=>Opr,InlinedRequest:()=>Hpr,InlinedRequestBody:()=>Gpr,InlinedRequestMetadata:()=>Wpr,LiteralType:()=>kfr,MapType:()=>aja,MavenPublishInfo:()=>Ifr,MultipleBaseUrlsEnvironment:()=>Zpr,MultipleBaseUrlsEnvironments:()=>$pr,MultipleEnvironmentUrlValues:()=>zpr,Name:()=>tA,NameAndWireValue:()=>AI,NameAndWireValueOrString:()=>KNa,NameOrString:()=>YNa,NamedParameter:()=>wg,NamedType:()=>yfr,NpmPublishInfo:()=>vfr,NugetPublishInfo:()=>xfr,OAuth:()=>xpr,OAuthValues:()=>Bpr,ObjectPropertyAccess:()=>Epr,ObjectType:()=>gfr,PrimitiveTypeV1:()=>Ffr,PublishInfo:()=>Tfr,PypiPublishInfo:()=>Cfr,ReferencedRequestBody:()=>qpr,ReferencedRequestBodyType:()=>qWe,Request:()=>Kpr,Response:()=>Jpr,RubyGemsPublishInfo:()=>wfr,SafeAndUnsafeString:()=>X2e,SingleBaseUrlEnvironment:()=>efr,SingleBaseUrlEnvironments:()=>tfr,SingleDiscriminatedUnionType:()=>dfr,SingleDiscriminatedUnionTypeNoProperties:()=>lfr,SingleDiscriminatedUnionTypeObject:()=>pfr,SingleDiscriminatedUnionTypeSingleProperty:()=>ffr,SwiftPublishInfo:()=>Sfr,TypeId:()=>OY,TypeReference:()=>uja,UndiscriminatedUnionType:()=>Afr,Values:()=>HWe,VariableDeclaration:()=>bfr,WithDocs:()=>_We,auth:()=>QLi,commons:()=>ULi,declaration:()=>_Li,endpoints:()=>a3i,environment:()=>g3i,http:()=>y3i,ir:()=>G3i,snippets:()=>J3i,types:()=>$3i,variables:()=>t4i});var mja=h(()=>{"use strict";dja()});var VP,Z2e=h(()=>{"use strict";Qe();VP=O.string()});var Nfr,r4i=h(()=>{"use strict";Qe();gf();Z2e();Nfr=O.objectWithoutOptionalProperties({id:VP,name:Co})});var PY,YWe=h(()=>{"use strict";Qe();PY=O.string()});var wye,$Dt=h(()=>{"use strict";Qe();wye=O.string()});var XWe,jfr=h(()=>{"use strict";Qe();gf();XWe=O.objectWithoutOptionalProperties({id:O.string(),name:Co,default:O.string().optional(),values:O.list(O.string()).optional()})});var Qfr,n4i=h(()=>{"use strict";Qe();gf();Gl();Z2e();YWe();$Dt();jfr();Qfr=O.objectWithoutOptionalProperties({id:PY,name:Co,urls:O.record(VP,wye),audiences:O.list(O.string()).optional(),defaultUrls:O.record(VP,O.string()).optional(),urlTemplates:O.record(VP,O.string()).optional(),urlVariables:O.record(VP,O.list(XWe)).optional()}).extend(Zi)});var zfr,i4i=h(()=>{"use strict";Qe();r4i();n4i();zfr=O.objectWithoutOptionalProperties({baseUrls:O.list(Nfr),environments:O.list(Qfr)})});var Mfr,o4i=h(()=>{"use strict";Qe();gf();Gl();YWe();$Dt();jfr();Mfr=O.objectWithoutOptionalProperties({id:PY,name:Co,url:wye,audiences:O.list(O.string()).optional(),defaultUrl:O.string().optional(),urlTemplate:O.string().optional(),urlVariables:O.list(XWe).optional()}).extend(Zi)});var Lfr,s4i=h(()=>{"use strict";Qe();o4i();Lfr=O.objectWithoutOptionalProperties({environments:O.list(Mfr)})});var Ufr,a4i=h(()=>{"use strict";Vr();Qe();i4i();s4i();Ufr=O.union("type",{singleBaseUrl:Lfr,multipleBaseUrls:zfr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return u0.singleBaseUrl(e);case"multipleBaseUrls":return u0.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Vfr,c4i=h(()=>{"use strict";Qe();YWe();a4i();Vfr=O.objectWithoutOptionalProperties({defaultEnvironment:PY.optional(),environments:Ufr})});var u4i=h(()=>{"use strict";Z2e();r4i();YWe();a4i();c4i();$Dt();n4i();i4i();jfr();o4i();s4i()});var l4i={};Z(l4i,{EnvironmentBaseUrlId:()=>VP,EnvironmentBaseUrlWithId:()=>Nfr,EnvironmentId:()=>PY,EnvironmentUrl:()=>wye,Environments:()=>Ufr,EnvironmentsConfig:()=>Vfr,MultipleBaseUrlsEnvironment:()=>Qfr,MultipleBaseUrlsEnvironments:()=>zfr,ServerVariable:()=>XWe,SingleBaseUrlEnvironment:()=>Mfr,SingleBaseUrlEnvironments:()=>Lfr});var hja=h(()=>{"use strict";u4i()});var Sye,eRt=h(()=>{"use strict";Qe();KDt();J2e();gf();Sye=O.objectWithoutOptionalProperties({errorId:Iye,fernFilepath:kU,name:Co})});var US,Aue=h(()=>{"use strict";Qe();Wo();m7();Ed();wY();H2e();US=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),env:O.string().optional(),clientDefault:RU.optional(),defaultValue:O.unknown().optional(),v2Examples:LS.optional()}).extend(Qx)});var _fr,p4i=h(()=>{"use strict";Qe();Wo();gf();Gl();UWe();_fr=O.objectWithoutOptionalProperties({name:Co.optional(),shape:O.lazyObject(()=>qc)}).extend(TY).extend(Zi)});var qfr,f4i=h(()=>{"use strict";Qe();Wo();Ed();Gl();wY();Aue();eRt();p4i();qfr=O.objectWithoutOptionalProperties({name:Sye,displayName:O.string().optional(),discriminantValue:fs,type:O.lazy(()=>Ps).optional(),statusCode:O.number(),isWildcardStatusCode:O.boolean().optional(),examples:O.list(_fr),v2Examples:LS.optional(),headers:O.list(US).optional()}).extend(Zi)});var gja,Aja=h(()=>{"use strict";Vr();Qe();Ed();gja=O.union("type",{property:O.object({value:fs}),statusCode:O.object({})}).transform({transform:e=>{switch(e.type){case"property":return dye.property(e.value);case"statusCode":return dye.statusCode();default:return e}},untransform:({_visit:e,...t})=>t})});var d4i=h(()=>{"use strict";eRt();f4i();Aja();p4i()});var m4i={};Z(m4i,{DeclaredErrorName:()=>Sye,ErrorDeclaration:()=>qfr,ErrorDeclarationDiscriminantValue:()=>gja,ExampleError:()=>_fr});var yja=h(()=>{"use strict";d4i()});var Gfr,h4i=h(()=>{"use strict";Qe();Gfr=O.objectWithoutOptionalProperties({username:O.string(),password:O.string()})});var Wfr,g4i=h(()=>{"use strict";Qe();Wfr=O.objectWithoutOptionalProperties({token:O.string()})});var Hfr,A4i=h(()=>{"use strict";Qe();Hfr=O.objectWithoutOptionalProperties({value:O.unknown()})});var Kfr,y4i=h(()=>{"use strict";Qe();Z2e();$Dt();Kfr=O.record(VP,wye)});var Jfr,b4i=h(()=>{"use strict";Qe();Jfr=O.objectWithoutOptionalProperties({clientId:O.string(),clientSecret:O.string()})});var ZWe,Yfr=h(()=>{"use strict";Vr();Qe();h4i();g4i();A4i();b4i();ZWe=O.union("type",{basic:Gfr,bearer:Wfr,header:Hfr,oauth:Jfr}).transform({transform:e=>{switch(e.type){case"basic":return TU.basic(e);case"bearer":return TU.bearer(e);case"header":return TU.header(e);case"oauth":return TU.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Xfr,E4i=h(()=>{"use strict";Qe();Xfr=O.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var Zfr,I4i=h(()=>{"use strict";Qe();E4i();Zfr=O.objectWithoutOptionalProperties({method:Xfr,path:O.string()})});var $We,$fr=h(()=>{"use strict";Qe();YWe();y4i();$We=O.undiscriminatedUnion([PY,Kfr])});var edr,v4i=h(()=>{"use strict";Qe();Gl();edr=O.objectWithoutOptionalProperties({name:O.string().optional(),language:O.string(),code:O.string()}).extend(Zi)});var DY,tdr=h(()=>{"use strict";Qe();DY=O.record(O.string(),O.unknown())});var rdr,x4i=h(()=>{"use strict";Qe();Gl();Yfr();I4i();$fr();tdr();rdr=O.objectWithoutOptionalProperties({endpoint:Zfr,baseUrl:O.property("baseURL",O.string().optional()),environment:$We.optional(),auth:ZWe.optional(),pathParameters:DY.optional(),queryParameters:DY.optional(),headers:DY.optional(),requestBody:O.unknown().optional()}).extend(Zi)});var ndr,C4i=h(()=>{"use strict";Vr();Qe();ndr=O.union("type",{error:O.object({value:O.unknown()}),json:O.object({value:O.unknown()}),stream:O.object({value:O.list(O.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return Nx.error(e.value);case"json":return Nx.json(e.value);case"stream":return Nx.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var idr,w4i=h(()=>{"use strict";Qe();Gl();C4i();idr=O.objectWithoutOptionalProperties({statusCode:O.number().optional(),body:ndr.optional()}).extend(Zi)});var tRt,S4i=h(()=>{"use strict";Qe();v4i();x4i();w4i();tRt=O.objectWithoutOptionalProperties({displayName:O.string().optional(),contentType:O.string().optional(),request:rdr.optional(),response:idr.optional(),codeSamples:O.list(edr).optional()})});var odr,T4i=h(()=>{"use strict";Qe();S4i();odr=O.objectWithoutOptionalProperties({userSpecifiedExamples:O.record(O.string(),tRt),autogeneratedExamples:O.record(O.string(),tRt)})});var rRt,O4i=h(()=>{"use strict";Qe();rRt=O.objectWithoutOptionalProperties({name:O.string().optional(),payload:O.unknown()})});var sdr,B4i=h(()=>{"use strict";Qe();O4i();sdr=O.objectWithoutOptionalProperties({userSpecifiedExamples:O.record(O.string(),rRt),autogeneratedExamples:O.record(O.string(),rRt)})});var adr,P4i=h(()=>{"use strict";Qe();adr=O.objectWithoutOptionalProperties({path:O.string()})});var cdr,D4i=h(()=>{"use strict";Qe();cdr=O.objectWithoutOptionalProperties({type:O.string(),body:O.unknown()})});var nRt,R4i=h(()=>{"use strict";Qe();Yfr();$fr();tdr();P4i();D4i();nRt=O.objectWithoutOptionalProperties({channel:adr,baseUrl:O.property("baseURL",O.string().optional()),environment:$We.optional(),auth:ZWe.optional(),pathParameters:DY.optional(),queryParameters:DY.optional(),headers:DY.optional(),messages:O.list(cdr).optional()})});var udr,k4i=h(()=>{"use strict";Qe();R4i();udr=O.objectWithoutOptionalProperties({autogeneratedExamples:O.record(O.string(),nRt),userSpecifiedExamples:O.record(O.string(),nRt)})});var ny,Oj=h(()=>{"use strict";Qe();wY();ny=O.objectWithoutOptionalProperties({v2Examples:LS.optional()})});var F4i=h(()=>{"use strict";h4i();g4i();A4i();y4i();b4i();Yfr();I4i();E4i();$fr();v4i();S4i();T4i();x4i();w4i();C4i();W6i();wY();tdr();O4i();B4i();P4i();D4i();R4i();k4i();Oj()});var N4i={};Z(N4i,{BasicAuthValues:()=>Gfr,BearerAuthValues:()=>Wfr,HeaderAuthValues:()=>Hfr,MultipleEnvironmentUrlValues:()=>Kfr,OAuthValues:()=>Jfr,V2AuthValues:()=>ZWe,V2EndpointLocation:()=>Zfr,V2EndpointLocationHttpMethod:()=>Xfr,V2EnvironmentValues:()=>$We,V2HttpEndpointCodeSample:()=>edr,V2HttpEndpointExample:()=>tRt,V2HttpEndpointExamples:()=>odr,V2HttpEndpointRequest:()=>rdr,V2HttpEndpointResponse:()=>idr,V2HttpEndpointResponseBody:()=>ndr,V2SchemaExample:()=>qDt,V2SchemaExamples:()=>LS,V2ValueExamples:()=>DY,V2WebSocketEndpointLocation:()=>adr,V2WebSocketMessageExample:()=>cdr,V2WebSocketSessionExample:()=>nRt,V2WebSocketSessionExamples:()=>udr,V2WebhookExample:()=>rRt,V2WebhookExamples:()=>sdr,WithV2Examples:()=>ny});var bja=h(()=>{"use strict";F4i()});var ldr,j4i=h(()=>{"use strict";Qe();ldr=O.enum_(["MIT","Apache-2.0"])});var pdr,Q4i=h(()=>{"use strict";Qe();j4i();pdr=O.objectWithoutOptionalProperties({id:ldr})});var hE,RY=h(()=>{"use strict";Qe();hE=O.string()});var fdr,z4i=h(()=>{"use strict";Qe();RY();fdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),tokenEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var eHe,ddr=h(()=>{"use strict";Qe();eHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),token:O.string(),packageName:O.string()})});var mdr,M4i=h(()=>{"use strict";Qe();mdr=O.objectWithoutOptionalProperties({filename:O.string()})});var hdr,L4i=h(()=>{"use strict";Qe();hdr=O.objectWithoutOptionalProperties({coordinatorUrl:O.string(),coordinatorUrlV2:O.string(),id:O.string()})});var gdr,U4i=h(()=>{"use strict";Vr();Qe();L4i();gdr=O.union(O.discriminant("type","_type"),{local:O.object({}),remote:hdr}).transform({transform:e=>{switch(e.type){case"local":return rc.GeneratorEnvironment.local();case"remote":return rc.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tHe,Adr=h(()=>{"use strict";Qe();tHe=O.objectWithoutOptionalProperties({keyId:O.string(),password:O.string(),secretKey:O.string()})});var rHe,ydr=h(()=>{"use strict";Qe();Adr();rHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),username:O.string(),password:O.string(),coordinate:O.string(),signature:tHe.optional()})});var nHe,bdr=h(()=>{"use strict";Qe();nHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),token:O.string(),packageName:O.string()})});var iHe,Edr=h(()=>{"use strict";Qe();iHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),apiKey:O.string(),packageName:O.string()})});var Idr,V4i=h(()=>{"use strict";Qe();Idr=O.objectWithoutOptionalProperties({apiKey:O.string(),workspaceId:O.string()})});var vdr,_4i=h(()=>{"use strict";Qe();vdr=O.objectWithoutOptionalProperties({name:O.string(),email:O.string()})});var xdr,q4i=h(()=>{"use strict";Qe();_4i();xdr=O.objectWithoutOptionalProperties({description:O.string().optional(),authors:O.list(vdr).optional()})});var oHe,Cdr=h(()=>{"use strict";Qe();q4i();oHe=O.objectWithoutOptionalProperties({keywords:O.list(O.string()).optional(),documentationLink:O.string().optional(),homepageLink:O.string().optional()}).extend(xdr)});var sHe,wdr=h(()=>{"use strict";Qe();Cdr();sHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),username:O.string(),password:O.string(),packageName:O.string(),pypiMetadata:oHe.optional()})});var aHe,Sdr=h(()=>{"use strict";Qe();aHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),apiKey:O.string(),packageName:O.string()})});var Tdr,G4i=h(()=>{"use strict";Vr();Qe();ddr();ydr();bdr();Edr();V4i();wdr();Sdr();Tdr=O.union("type",{maven:rHe,npm:nHe,pypi:sHe,postman:Idr,rubygems:aHe,nuget:iHe,crates:eHe}).transform({transform:e=>{switch(e.type){case"maven":return rc.GeneratorPublishTarget.maven(e);case"npm":return rc.GeneratorPublishTarget.npm(e);case"pypi":return rc.GeneratorPublishTarget.pypi(e);case"postman":return rc.GeneratorPublishTarget.postman(e);case"rubygems":return rc.GeneratorPublishTarget.rubygems(e);case"nuget":return rc.GeneratorPublishTarget.nuget(e);case"crates":return rc.GeneratorPublishTarget.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Odr,W4i=h(()=>{"use strict";Qe();Adr();Odr=O.objectWithoutOptionalProperties({registryUrl:O.string(),username:O.string(),password:O.string(),group:O.string(),signature:tHe.optional()})});var Bdr,H4i=h(()=>{"use strict";Qe();Bdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),token:O.string(),scope:O.string()})});var Pdr,K4i=h(()=>{"use strict";Qe();W4i();H4i();Pdr=O.objectWithoutOptionalProperties({maven:Odr,npm:Bdr})});var Ddr,J4i=h(()=>{"use strict";Qe();ddr();ydr();bdr();Edr();wdr();Sdr();Ddr=O.objectWithoutOptionalProperties({maven:rHe,npm:nHe,pypi:sHe,rubygems:aHe,nuget:iHe,crates:eHe})});var cHe,Rdr=h(()=>{"use strict";Qe();G4i();K4i();J4i();cHe=O.objectWithoutOptionalProperties({registries:Pdr,registriesV2:Ddr,publishTarget:Tdr.optional(),version:O.string()})});var kdr,Y4i=h(()=>{"use strict";Qe();RY();kdr=O.objectWithoutOptionalProperties({keyIdEnvironmentVariable:hE,passwordEnvironmentVariable:hE,secretKeyEnvironmentVariable:hE})});var Fdr,X4i=h(()=>{"use strict";Qe();RY();Y4i();Fdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),coordinate:O.string(),usernameEnvironmentVariable:hE,passwordEnvironmentVariable:hE,signature:kdr.optional(),shouldGeneratePublishWorkflow:O.boolean().optional()})});var Ndr,Z4i=h(()=>{"use strict";Qe();RY();Ndr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),tokenEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var jdr,$4i=h(()=>{"use strict";Qe();RY();jdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),apiKeyEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var Qdr,eUi=h(()=>{"use strict";Qe();RY();Qdr=O.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:hE,workspaceIdEnvironmentVariable:hE})});var zdr,tUi=h(()=>{"use strict";Qe();RY();Cdr();zdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),usernameEnvironmentVariable:hE,passwordEnvironmentVariable:hE,pypiMetadata:oHe.optional(),shouldGeneratePublishWorkflow:O.boolean().optional()})});var Mdr,rUi=h(()=>{"use strict";Qe();RY();Mdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),apiKeyEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var Ldr,nUi=h(()=>{"use strict";Vr();Qe();z4i();X4i();Z4i();$4i();eUi();tUi();rUi();Ldr=O.union("type",{npm:Ndr,maven:Fdr,postman:Qdr,pypi:zdr,rubygems:Mdr,nuget:jdr,crates:fdr}).transform({transform:e=>{switch(e.type){case"npm":return rc.GithubPublishInfo.npm(e);case"maven":return rc.GithubPublishInfo.maven(e);case"postman":return rc.GithubPublishInfo.postman(e);case"pypi":return rc.GithubPublishInfo.pypi(e);case"rubygems":return rc.GithubPublishInfo.rubygems(e);case"nuget":return rc.GithubPublishInfo.nuget(e);case"crates":return rc.GithubPublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Udr,iUi=h(()=>{"use strict";Qe();nUi();Udr=O.objectWithoutOptionalProperties({version:O.string(),repoUrl:O.string(),installationToken:O.string().optional(),branch:O.string().optional(),publishInfo:Ldr.optional()})});var Vdr,oUi=h(()=>{"use strict";Vr();Qe();Rdr();iUi();Vdr=O.union("type",{publish:cHe,downloadFiles:O.object({}),github:Udr}).transform({transform:e=>{switch(e.type){case"publish":return rc.OutputMode.publish(e);case"downloadFiles":return rc.OutputMode.downloadFiles();case"github":return rc.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _dr,sUi=h(()=>{"use strict";Qe();_dr=O.objectWithoutOptionalProperties({packageDescription:O.property("package_description",O.string().optional()),publisherEmail:O.property("publisher_email",O.string().optional()),referenceUrl:O.property("reference_url",O.string().optional()),publisherName:O.property("publisher_name",O.string().optional())})});var qdr,aUi=h(()=>{"use strict";Qe();oUi();sUi();qdr=O.objectWithoutOptionalProperties({path:O.string(),snippetFilepath:O.string().optional(),snippetTemplateFilepath:O.string().optional(),publishingMetadata:_dr.optional(),mode:Vdr})});var Gdr,cUi=h(()=>{"use strict";Vr();Qe();Q4i();M4i();Gdr=O.union("type",{basic:pdr,custom:mdr}).transform({transform:e=>{switch(e.type){case"basic":return rc.LicenseConfig.basic(e);case"custom":return rc.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Eja,Ija=h(()=>{"use strict";Qe();U4i();aUi();Rdr();cUi();Eja=O.objectWithoutOptionalProperties({dryRun:O.boolean(),irFilepath:O.string(),originalReadmeFilepath:O.string().optional(),license:Gdr.optional(),output:qdr,publish:cHe.optional(),workspaceName:O.string(),organization:O.string(),customConfig:O.unknown(),environment:gdr,whitelabel:O.boolean(),writeUnitTests:O.boolean(),generatePaginatedClients:O.boolean().optional(),generateOauthClients:O.boolean()})});var uUi=h(()=>{"use strict";Q4i();z4i();ddr();M4i();RY();Ija();U4i();aUi();Rdr();G4i();K4i();J4i();iUi();nUi();cUi();j4i();Adr();Y4i();X4i();W4i();ydr();Z4i();H4i();bdr();$4i();Edr();q4i();_4i();oUi();V4i();eUi();sUi();tUi();Cdr();wdr();L4i();rUi();Sdr()});var lUi={};Z(lUi,{BasicLicense:()=>pdr,CratesGithubPublishInfo:()=>fdr,CratesRegistryConfig:()=>eHe,CustomLicense:()=>mdr,EnvironmentVariable:()=>hE,GeneratorConfig:()=>Eja,GeneratorEnvironment:()=>gdr,GeneratorOutputConfig:()=>qdr,GeneratorPublishConfig:()=>cHe,GeneratorPublishTarget:()=>Tdr,GeneratorRegistriesConfig:()=>Pdr,GeneratorRegistriesConfigV2:()=>Ddr,GithubOutputMode:()=>Udr,GithubPublishInfo:()=>Ldr,LicenseConfig:()=>Gdr,LicenseId:()=>ldr,MavenCentralSignature:()=>tHe,MavenCentralSignatureGithubInfo:()=>kdr,MavenGithubPublishInfo:()=>Fdr,MavenRegistryConfig:()=>Odr,MavenRegistryConfigV2:()=>rHe,NpmGithubPublishInfo:()=>Ndr,NpmRegistryConfig:()=>Bdr,NpmRegistryConfigV2:()=>nHe,NugetGithubPublishInfo:()=>jdr,NugetRegistryConfig:()=>iHe,OutputMetadata:()=>xdr,OutputMetadataAuthor:()=>vdr,OutputMode:()=>Vdr,PostmanConfig:()=>Idr,PostmanGithubPublishInfo:()=>Qdr,PublishingMetadata:()=>_dr,PypiGithubPublishInfo:()=>zdr,PypiMetadata:()=>oHe,PypiRegistryConfig:()=>sHe,RemoteGeneratorEnvironment:()=>hdr,RubyGemsGithubPublishInfo:()=>Mdr,RubyGemsRegistryConfig:()=>aHe});var vja=h(()=>{"use strict";uUi()});var xja=h(()=>{"use strict";vja();uUi()});var pUi={};Z(pUi,{BasicLicense:()=>pdr,CratesGithubPublishInfo:()=>fdr,CratesRegistryConfig:()=>eHe,CustomLicense:()=>mdr,EnvironmentVariable:()=>hE,GeneratorConfig:()=>Eja,GeneratorEnvironment:()=>gdr,GeneratorOutputConfig:()=>qdr,GeneratorPublishConfig:()=>cHe,GeneratorPublishTarget:()=>Tdr,GeneratorRegistriesConfig:()=>Pdr,GeneratorRegistriesConfigV2:()=>Ddr,GithubOutputMode:()=>Udr,GithubPublishInfo:()=>Ldr,LicenseConfig:()=>Gdr,LicenseId:()=>ldr,MavenCentralSignature:()=>tHe,MavenCentralSignatureGithubInfo:()=>kdr,MavenGithubPublishInfo:()=>Fdr,MavenRegistryConfig:()=>Odr,MavenRegistryConfigV2:()=>rHe,NpmGithubPublishInfo:()=>Ndr,NpmRegistryConfig:()=>Bdr,NpmRegistryConfigV2:()=>nHe,NugetGithubPublishInfo:()=>jdr,NugetRegistryConfig:()=>iHe,OutputMetadata:()=>xdr,OutputMetadataAuthor:()=>vdr,OutputMode:()=>Vdr,PostmanConfig:()=>Idr,PostmanGithubPublishInfo:()=>Qdr,PublishingMetadata:()=>_dr,PypiGithubPublishInfo:()=>zdr,PypiMetadata:()=>oHe,PypiRegistryConfig:()=>sHe,RemoteGeneratorEnvironment:()=>hdr,RubyGemsGithubPublishInfo:()=>Mdr,RubyGemsRegistryConfig:()=>aHe,config:()=>lUi});var Cja=h(()=>{"use strict";xja()});var fUi=h(()=>{"use strict";cfr();E3i();sfr();I3i()});var dUi={};Z(dUi,{GlobalParameter:()=>JWe,GlobalParameterApplyMode:()=>ofr,GlobalParameterId:()=>KWe,GlobalParameterLocation:()=>afr});var wja=h(()=>{"use strict";fUi()});var $2e,Wdr=h(()=>{"use strict";Qe();Wo();Ed();$2e=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var Tye,Hdr=h(()=>{"use strict";Qe();Wo();gf();Tye=O.objectWithoutOptionalProperties({name:Co,value:O.lazyObject(()=>qc)})});var Kdr,mUi=h(()=>{"use strict";Vr();Qe();Kdr=O.union("type",{single:O.object({}),exploded:O.object({}),commaSeparated:O.object({})}).transform({transform:e=>{switch(e.type){case"single":return dw.single();case"exploded":return dw.exploded();case"commaSeparated":return dw.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t})});var uHe,Jdr=h(()=>{"use strict";Qe();Wo();Ed();mUi();uHe=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc),shape:Kdr.optional()})});var Ydr,hUi=h(()=>{"use strict";Qe();Wo();Ed();Ydr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var iy,Bj=h(()=>{"use strict";Qe();HDt();J2e();gf();hue();iy=O.objectWithoutOptionalProperties({typeId:jO,fernFilepath:kU,name:Co,displayName:Eye.optional()})});var Xdr,gUi=h(()=>{"use strict";Qe();Wo();Ed();Bj();Xdr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc),originalTypeDeclaration:iy.optional()})});var lHe,Zdr=h(()=>{"use strict";Qe();UWe();hUi();gUi();lHe=O.objectWithoutOptionalProperties({properties:O.list(Xdr),extraProperties:O.list(Ydr).optional()}).extend(TY)});var $dr,AUi=h(()=>{"use strict";Vr();Qe();Wo();Zdr();$dr=O.union("type",{inlinedRequestBody:lHe,reference:O.lazyObject(()=>qc)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return zP.inlinedRequestBody(e);case"reference":return zP.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var emr,yUi=h(()=>{"use strict";Qe();Wo();eRt();emr=O.objectWithoutOptionalProperties({error:Sye,body:O.lazyObject(()=>qc).optional()})});var tmr,bUi=h(()=>{"use strict";Qe();Wo();tmr=O.objectWithoutOptionalProperties({event:O.string(),data:O.lazyObject(()=>qc)})});var rmr,EUi=h(()=>{"use strict";Vr();Qe();Wo();bUi();rmr=O.union("type",{body:O.object({value:O.lazyObject(()=>qc).optional()}),stream:O.object({value:O.list(O.lazyObject(()=>qc))}),sse:O.object({value:O.list(tmr)})}).transform({transform:e=>{switch(e.type){case"body":return SA.body(e.value);case"stream":return SA.stream(e.value);case"sse":return SA.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var nmr,IUi=h(()=>{"use strict";Vr();Qe();yUi();EUi();nmr=O.union("type",{ok:O.object({value:rmr}),error:emr}).transform({transform:e=>{switch(e.type){case"ok":return Cg.ok(e.value);case"error":return Cg.error(e);default:return e}},untransform:({_visit:e,...t})=>t})});var pHe,imr=h(()=>{"use strict";Qe();gf();Gl();Wdr();Hdr();Jdr();AUi();IUi();pHe=O.objectWithoutOptionalProperties({id:O.string().optional(),name:Co.optional(),url:O.string(),rootPathParameters:O.list(Tye),servicePathParameters:O.list(Tye),endpointPathParameters:O.list(Tye),serviceHeaders:O.list($2e),endpointHeaders:O.list($2e),queryParameters:O.list(uHe),request:$dr.optional(),response:nmr}).extend(Zi)});var omr,vUi=h(()=>{"use strict";Qe();imr();omr=O.objectWithoutOptionalProperties({example:pHe})});var fHe,smr=h(()=>{"use strict";Qe();Y2e();Gl();Oj();fHe=O.objectWithoutOptionalProperties({isOptional:O.boolean()}).extend(Zi).extend(ny).extend(FU)});var dHe,amr=h(()=>{"use strict";Qe();Gl();Oj();dHe=O.objectWithoutOptionalProperties({}).extend(Zi).extend(ny)});var cmr,xUi=h(()=>{"use strict";Qe();K2e();SY();cmr=O.objectWithoutOptionalProperties({page:LP,next:f0,results:f0})});var umr,CUi=h(()=>{"use strict";Qe();SY();umr=O.objectWithoutOptionalProperties({results:f0})});var lmr,wUi=h(()=>{"use strict";Qe();J2e();lmr=O.objectWithoutOptionalProperties({fernFilepath:kU})});var pmr,SUi=h(()=>{"use strict";gf();pmr=Co});var fmr,TUi=h(()=>{"use strict";Qe();gf();Gl();fmr=O.objectWithoutOptionalProperties({name:Co.optional(),language:O.string(),code:O.string(),install:O.string().optional()}).extend(Zi)});var Oye,iRt=h(()=>{"use strict";Qe();Oye=O.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","php","rust","swift"])});var dmr,OUi=h(()=>{"use strict";Qe();gf();Gl();iRt();dmr=O.objectWithoutOptionalProperties({name:Co.optional(),sdk:Oye,code:O.string()}).extend(Zi)});var mmr,BUi=h(()=>{"use strict";Vr();Qe();TUi();OUi();mmr=O.union("type",{language:fmr,sdk:dmr}).transform({transform:e=>{switch(e.type){case"language":return $6.language(e);case"sdk":return $6.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mHe,hmr=h(()=>{"use strict";Qe();Gl();Oj();mHe=O.objectWithoutOptionalProperties({}).extend(Zi).extend(ny)});var gmr,PUi=h(()=>{"use strict";Qe();Ed();Gl();gmr=O.objectWithoutOptionalProperties({key:fs,isOptional:O.boolean(),contentType:O.string().optional()}).extend(Zi)});var Amr,DUi=h(()=>{"use strict";Qe();Ed();Gl();Amr=O.objectWithoutOptionalProperties({key:fs,isOptional:O.boolean(),contentType:O.string().optional()}).extend(Zi)});var ymr,RUi=h(()=>{"use strict";Vr();Qe();PUi();DUi();ymr=O.union("type",{file:Amr,fileArray:gmr}).transform({transform:e=>{switch(e.type){case"file":return xj.file(e);case"fileArray":return xj.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t})});var bmr,kUi=h(()=>{"use strict";Qe();bmr=O.enum_(["exploded","json","form"])});var hHe,Emr=h(()=>{"use strict";Qe();Wo();Ed();YDt();wY();GDt();hHe=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),defaultValue:O.unknown().optional(),v2Examples:LS.optional(),propertyAccess:yye.optional()}).extend(vye)});var Imr,FUi=h(()=>{"use strict";Qe();Y2e();kUi();Emr();Imr=O.objectWithoutOptionalProperties({style:bmr.optional()}).extend(hHe).extend(FU)});var vmr,NUi=h(()=>{"use strict";Vr();Qe();RUi();FUi();vmr=O.union("type",{file:O.object({value:ymr}),bodyProperty:Imr}).transform({transform:e=>{switch(e.type){case"file":return jx.file(e.value);case"bodyProperty":return jx.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var gHe,xmr=h(()=>{"use strict";Qe();gf();Y2e();Gl();Oj();NUi();gHe=O.objectWithoutOptionalProperties({name:Co,properties:O.list(vmr)}).extend(Zi).extend(ny).extend(FU)});var Cmr,jUi=h(()=>{"use strict";Qe();Cmr=O.objectWithoutOptionalProperties({namespace:O.string()})});var wmr,QUi=h(()=>{"use strict";Qe();jUi();wmr=O.objectWithoutOptionalProperties({csharp:Cmr.optional()})});var AHe,Smr=h(()=>{"use strict";Qe();QUi();AHe=O.objectWithoutOptionalProperties({filepath:O.string(),packageName:O.string().optional(),options:wmr.optional()})});var Tmr,zUi=h(()=>{"use strict";Qe();gf();Smr();Tmr=O.objectWithoutOptionalProperties({file:AHe,name:Co})});var Omr,MUi=h(()=>{"use strict";Qe();zUi();Omr=O.objectWithoutOptionalProperties({service:Tmr})});var Bmr,LUi=h(()=>{"use strict";Qe();Llr();pLi();Bmr=O.record(RWe,O.list(fpr))});var Pmr,UUi=h(()=>{"use strict";Qe();Pmr=O.enum_(["UNARY","CLIENT_STREAM","SERVER_STREAM","BIDIRECTIONAL_STREAM"])});var Dmr,VUi=h(()=>{"use strict";Qe();UUi();Dmr=O.objectWithoutOptionalProperties({methodType:Pmr.optional()})});var Rmr,_Ui=h(()=>{"use strict";Vr();Qe();VUi();Rmr=O.union("type",{proto:Dmr,openapi:O.object({}),openrpc:O.object({})}).transform({transform:e=>{switch(e.type){case"proto":return MP.proto(e);case"openapi":return MP.openapi();case"openrpc":return MP.openrpc();default:return e}},untransform:({_visit:e,...t})=>t})});var yHe,kmr=h(()=>{"use strict";Qe();yHe=O.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var Fmr,qUi=h(()=>{"use strict";Qe();Fmr=O.objectWithoutOptionalProperties({pathParameter:O.string(),tail:O.string()})});var NU,bHe=h(()=>{"use strict";Qe();qUi();NU=O.objectWithoutOptionalProperties({head:O.string(),parts:O.list(Fmr)})});var EHe,Nmr=h(()=>{"use strict";Qe();Wo();Y2e();Gl();Oj();EHe=O.objectWithoutOptionalProperties({requestBodyType:O.lazy(()=>Ps)}).extend(Zi).extend(FU).extend(ny)});var jmr,GUi=h(()=>{"use strict";Qe();gf();Y2e();Gl();Oj();Bj();mue();Emr();jmr=O.objectWithoutOptionalProperties({name:Co,extends:O.list(iy),properties:O.list(hHe),extendedProperties:O.list(NO).optional(),extraProperties:O.property("extra-properties",O.boolean())}).extend(Zi).extend(ny).extend(FU)});var IHe,Qmr=h(()=>{"use strict";Vr();Qe();smr();xmr();Nmr();GUi();IHe=O.union("type",{inlinedRequestBody:jmr,reference:EHe,fileUpload:gHe,bytes:fHe}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return Kf.inlinedRequestBody(e);case"reference":return Kf.reference(e);case"fileUpload":return Kf.fileUpload(e);case"bytes":return Kf.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var zmr,WUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();zmr=O.objectWithoutOptionalProperties({responseBodyType:O.lazy(()=>Ps)}).extend(Zi).extend(ny)});var Mmr,HUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();mue();Mmr=O.objectWithoutOptionalProperties({responseBodyType:O.lazy(()=>Ps),responseProperty:NO.optional()}).extend(Zi).extend(ny)});var vHe,Lmr=h(()=>{"use strict";Vr();Qe();WUi();HUi();vHe=O.union("type",{response:zmr,nestedPropertyAsResponse:Mmr}).transform({transform:e=>{switch(e.type){case"response":return mE.response(e);case"nestedPropertyAsResponse":return mE.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Umr,KUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();Umr=O.objectWithoutOptionalProperties({payload:O.lazy(()=>Ps),terminator:O.string().optional()}).extend(Zi).extend(ny)});var Vmr,JUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();Vmr=O.objectWithoutOptionalProperties({payload:O.lazy(()=>Ps),terminator:O.string().optional(),resumable:O.boolean().optional()}).extend(Zi).extend(ny)});var _mr,YUi=h(()=>{"use strict";Qe();Gl();Oj();_mr=O.objectWithoutOptionalProperties({}).extend(Zi).extend(ny)});var xHe,qmr=h(()=>{"use strict";Vr();Qe();KUi();JUi();YUi();xHe=O.union("type",{json:Umr,text:_mr,sse:Vmr}).transform({transform:e=>{switch(e.type){case"json":return gI.json(e);case"text":return gI.text(e);case"sse":return gI.sse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var CHe,Gmr=h(()=>{"use strict";Qe();Gl();Oj();CHe=O.objectWithoutOptionalProperties({contentType:O.string().optional()}).extend(Zi).extend(ny)});var Wmr,XUi=h(()=>{"use strict";Vr();Qe();amr();hmr();Lmr();Gmr();Wmr=O.union("type",{json:O.object({value:vHe}),fileDownload:mHe,text:CHe,bytes:dHe}).transform({transform:e=>{switch(e.type){case"json":return PO.json(e.value);case"fileDownload":return PO.fileDownload(e);case"text":return PO.text(e);case"bytes":return PO.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Hmr,ZUi=h(()=>{"use strict";Qe();XUi();qmr();Hmr=O.objectWithoutOptionalProperties({nonStreamResponse:Wmr,streamResponse:xHe})});var Kmr,$Ui=h(()=>{"use strict";Vr();Qe();amr();hmr();Lmr();qmr();ZUi();Gmr();Kmr=O.union("type",{json:O.object({value:vHe}),fileDownload:mHe,text:CHe,bytes:dHe,streaming:O.object({value:xHe}),streamParameter:Hmr}).transform({transform:e=>{switch(e.type){case"json":return mu.json(e.value);case"fileDownload":return mu.fileDownload(e);case"text":return mu.text(e);case"bytes":return mu.bytes(e);case"streaming":return mu.streaming(e.value);case"streamParameter":return mu.streamParameter(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Bye,oRt=h(()=>{"use strict";Qe();Gl();$Ui();Bye=O.objectWithoutOptionalProperties({statusCode:O.property("status-code",O.number().optional()),isWildcardStatusCode:O.boolean().optional(),body:Kmr.optional()}).extend(Zi)});var Jmr,eVi=h(()=>{"use strict";Qe();K2e();SY();Jmr=O.objectWithoutOptionalProperties({page:LP,results:f0,hasNextPage:f0.optional(),step:LP.optional()})});var Ymr,tVi=h(()=>{"use strict";Qe();SY();Ymr=O.objectWithoutOptionalProperties({nextPath:f0,results:f0})});var Xmr,rVi=h(()=>{"use strict";Qe();SY();Xmr=O.objectWithoutOptionalProperties({nextUri:f0,results:f0})});var Zmr,nVi=h(()=>{"use strict";Vr();Qe();xUi();CUi();eVi();tVi();rVi();Zmr=O.union("type",{cursor:cmr,offset:Jmr,custom:umr,uri:Xmr,path:Ymr}).transform({transform:e=>{switch(e.type){case"cursor":return l0.cursor(e);case"offset":return l0.offset(e);case"custom":return l0.custom(e);case"uri":return l0.uri(e);case"path":return l0.path(e);default:return e}},untransform:({_visit:e,...t})=>t})});var wHe,$mr=h(()=>{"use strict";Qe();wHe=O.string()});var ehr,iVi=h(()=>{"use strict";Qe();ehr=O.enum_(["ROOT","SERVICE","ENDPOINT"])});var g7,SHe=h(()=>{"use strict";Qe();Wo();gf();Gl();wY();H2e();$mr();iVi();g7=O.objectWithoutOptionalProperties({name:Co,valueType:O.lazy(()=>Ps),location:ehr,variable:wHe.optional(),clientDefault:RU.optional(),v2Examples:LS.optional(),explode:O.boolean().optional()}).extend(Zi)});var thr,oVi=h(()=>{"use strict";Qe();Gl();eRt();thr=O.objectWithoutOptionalProperties({error:Sye}).extend(Zi)});var rhr,sVi=h(()=>{"use strict";Qe();oVi();rhr=O.list(thr)});var nhr,aVi=h(()=>{"use strict";Qe();nhr=O.objectWithoutOptionalProperties({disabled:O.boolean().optional()})});var ihr,cVi=h(()=>{"use strict";Qe();aVi();ihr=O.undiscriminatedUnion([nhr])});var ohr,uVi=h(()=>{"use strict";Vr();Qe();smr();Nmr();ohr=O.union("type",{typeReference:EHe,bytes:fHe}).transform({transform:e=>{switch(e.type){case"typeReference":return o7.typeReference(e);case"bytes":return o7.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var shr,lVi=h(()=>{"use strict";Qe();gf();shr=O.objectWithoutOptionalProperties({wrapperName:Co,bodyKey:Co,includePathParameters:O.boolean().optional(),onlyPathParameters:O.boolean().optional()})});var ahr,pVi=h(()=>{"use strict";Vr();Qe();uVi();lVi();ahr=O.union("type",{justRequestBody:O.object({value:ohr}),wrapper:shr}).transform({transform:e=>{switch(e.type){case"justRequestBody":return OU.justRequestBody(e.value);case"wrapper":return OU.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t})});var chr,fVi=h(()=>{"use strict";Qe();gf();K2e();pVi();chr=O.objectWithoutOptionalProperties({streamParameter:LP.optional(),requestParameterName:Co,shape:ahr})});var THe,uhr=h(()=>{"use strict";Vr();Qe();MUi();THe=O.union("type",{http:O.object({}),grpc:Omr}).transform({transform:e=>{switch(e.type){case"http":return BU.http();case"grpc":return BU.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t})});var lhr,dVi=h(()=>{"use strict";Qe();BUi();imr();lhr=O.objectWithoutOptionalProperties({codeSamples:O.list(mmr).optional(),example:pHe.optional()})});var phr,mVi=h(()=>{"use strict";Qe();Qmr();phr=O.objectWithoutOptionalProperties({requestBodies:O.list(IHe).optional()})});var fhr,hVi=h(()=>{"use strict";Qe();oRt();fhr=O.objectWithoutOptionalProperties({responses:O.list(Bye).optional()})});var dhr,gVi=h(()=>{"use strict";Qe();zlr();m7();VDt();Z2e();T4i();sfr();vUi();SUi();LUi();_Ui();Aue();kmr();bHe();Qmr();oRt();nVi();SHe();WDt();sVi();cVi();fVi();uhr();dVi();mVi();hVi();dhr=O.objectWithoutOptionalProperties({id:due,name:pmr,displayName:O.string().optional(),subtitle:O.string().optional(),method:yHe,headers:O.list(US),responseHeaders:O.list(US).optional(),baseUrl:VP.optional(),v2BaseUrls:O.list(VP).optional(),basePath:NU.optional(),path:NU,fullPath:NU,pathParameters:O.list(g7),allPathParameters:O.list(g7),queryParameters:O.list(bye),requestBody:IHe.optional(),v2RequestBodies:phr.optional(),sdkRequest:chr.optional(),response:Bye.optional(),v2Responses:fhr.optional(),errors:rhr,auth:O.boolean(),security:O.list(Bmr).optional(),idempotent:O.boolean(),pagination:Zmr.optional(),userSpecifiedExamples:O.list(lhr),autogeneratedExamples:O.list(omr),v2Examples:odr.optional(),transport:THe.optional(),source:Rmr.optional(),audiences:O.list(PWe).optional(),retries:ihr.optional(),globalParameters:O.list(KWe).optional(),apiPlayground:O.boolean().optional()}).extend(Qx)});var mhr,AVi=h(()=>{"use strict";Qe();mhr=O.objectWithoutOptionalProperties({})});var hhr,yVi=h(()=>{"use strict";Qe();hhr=O.objectWithoutOptionalProperties({})});var OHe,ghr=h(()=>{"use strict";Qe();AVi();yVi();OHe=O.objectWithoutOptionalProperties({json:mhr.optional(),proto:hhr.optional()})});var Ahr,bVi=h(()=>{"use strict";Qe();zlr();NWe();ghr();wUi();gVi();Aue();bHe();SHe();uhr();Ahr=O.objectWithoutOptionalProperties({availability:CY.optional(),name:lmr,displayName:O.string().optional(),basePath:NU,endpoints:O.list(dhr),headers:O.list(US),pathParameters:O.list(g7),encoding:OHe.optional(),transport:THe.optional(),audiences:O.list(PWe).optional()})});var EVi=h(()=>{"use strict";vUi();smr();amr();xUi();CUi();wUi();SUi();BUi();TUi();OUi();imr();yUi();EUi();Wdr();Zdr();hUi();gUi();Hdr();Jdr();mUi();AUi();IUi();bUi();hmr();RUi();PUi();DUi();FUi();kUi();xmr();NUi();MUi();gVi();LUi();_Ui();Aue();kmr();bHe();qUi();Qmr();Nmr();oRt();$Ui();bVi();GUi();Emr();Lmr();WUi();HUi();KUi();XUi();eVi();nVi();tVi();SHe();iVi();Glr();VUi();WDt();K2e();$6i();oVi();sVi();SY();cVi();aVi();fVi();uVi();pVi();lVi();JUi();qmr();ZUi();iRt();Gmr();YUi();uhr();rVi();dVi();mVi();hVi()});var IVi={};Z(IVi,{AutogeneratedEndpointExample:()=>omr,BytesRequest:()=>fHe,BytesResponse:()=>dHe,CursorPagination:()=>cmr,CustomPagination:()=>umr,DeclaredServiceName:()=>lmr,EndpointName:()=>pmr,ExampleCodeSample:()=>mmr,ExampleCodeSampleLanguage:()=>fmr,ExampleCodeSampleSdk:()=>dmr,ExampleEndpointCall:()=>pHe,ExampleEndpointErrorResponse:()=>emr,ExampleEndpointSuccessResponse:()=>rmr,ExampleHeader:()=>$2e,ExampleInlinedRequestBody:()=>lHe,ExampleInlinedRequestBodyExtraProperty:()=>Ydr,ExampleInlinedRequestBodyProperty:()=>Xdr,ExamplePathParameter:()=>Tye,ExampleQueryParameter:()=>uHe,ExampleQueryParameterShape:()=>Kdr,ExampleRequestBody:()=>$dr,ExampleResponse:()=>nmr,ExampleServerSideEvent:()=>tmr,FileDownloadResponse:()=>mHe,FileProperty:()=>ymr,FilePropertyArray:()=>gmr,FilePropertySingle:()=>Amr,FileUploadBodyProperty:()=>Imr,FileUploadBodyPropertyEncoding:()=>bmr,FileUploadRequest:()=>gHe,FileUploadRequestProperty:()=>vmr,GrpcTransport:()=>Omr,HttpEndpoint:()=>dhr,HttpEndpointSecurityItem:()=>Bmr,HttpEndpointSource:()=>Rmr,HttpHeader:()=>US,HttpMethod:()=>yHe,HttpPath:()=>NU,HttpPathPart:()=>Fmr,HttpRequestBody:()=>IHe,HttpRequestBodyReference:()=>EHe,HttpResponse:()=>Bye,HttpResponseBody:()=>Kmr,HttpService:()=>Ahr,InlinedRequestBody:()=>jmr,InlinedRequestBodyProperty:()=>hHe,JsonResponse:()=>vHe,JsonResponseBody:()=>zmr,JsonResponseBodyWithProperty:()=>Mmr,JsonStreamChunk:()=>Umr,NonStreamHttpResponseBody:()=>Wmr,OffsetPagination:()=>Jmr,Pagination:()=>Zmr,PathPagination:()=>Ymr,PathParameter:()=>g7,PathParameterLocation:()=>ehr,PropertyPathItem:()=>jWe,ProtoSourceInfo:()=>Dmr,QueryParameter:()=>bye,RequestProperty:()=>LP,RequestPropertyValue:()=>epr,ResponseError:()=>thr,ResponseErrors:()=>rhr,ResponseProperty:()=>f0,RetriesConfiguration:()=>ihr,RetriesDisabledSchema:()=>nhr,SdkRequest:()=>chr,SdkRequestBodyType:()=>ohr,SdkRequestShape:()=>ahr,SdkRequestWrapper:()=>shr,SseStreamChunk:()=>Vmr,StreamParameterResponse:()=>Hmr,StreamingResponse:()=>xHe,SupportedSdkLanguage:()=>Oye,TextResponse:()=>CHe,TextStreamChunk:()=>_mr,Transport:()=>THe,UriPagination:()=>Xmr,UserSpecifiedEndpointExample:()=>lhr,V2HttpRequestBodies:()=>phr,V2HttpResponses:()=>fhr});var Sja=h(()=>{"use strict";EVi()});var yhr,vVi=h(()=>{"use strict";Qe();yhr=O.string()});var bhr,xVi=h(()=>{"use strict";Qe();vVi();bhr=O.objectWithoutOptionalProperties({id:yhr,protoRootUrl:O.string()})});var Ehr,CVi=h(()=>{"use strict";Vr();Qe();xVi();Ehr=O.union("type",{proto:bhr,openapi:O.object({})}).transform({transform:e=>{switch(e.type){case"proto":return Cj.proto(e);case"openapi":return Cj.openapi();default:return e}},untransform:({_visit:e,...t})=>t})});var yue,sRt=h(()=>{"use strict";Qe();m7();Ed();yue=O.objectWithoutOptionalProperties({name:fs}).extend(Qx)});var BHe,Ihr=h(()=>{"use strict";Qe();sRt();BHe=O.objectWithoutOptionalProperties({default:yue.optional(),values:O.list(yue),forwardCompatible:O.boolean().optional()})});var vhr,wVi=h(()=>{"use strict";Qe();Aue();Ihr();vhr=O.objectWithoutOptionalProperties({header:US,value:BHe})});var xhr,SVi=h(()=>{"use strict";Vr();Qe();wVi();xhr=O.union("type",{header:vhr}).transform({transform:e=>e.type==="header"?mye.header(e):e,untransform:({_visit:e,...t})=>t})});var Chr,TVi=h(()=>{"use strict";Qe();iRt();Chr=O.objectWithoutOptionalProperties({generationLanguage:Oye.optional(),keywords:O.list(O.string()).optional(),smartCasing:O.boolean(),smartCasingDigitWordBoundary:O.boolean().optional()})});var whr,OVi=h(()=>{"use strict";Qe();Ed();whr=O.objectWithoutOptionalProperties({discriminant:fs,contentProperty:fs})});var Shr,BVi=h(()=>{"use strict";Vr();Qe();OVi();Shr=O.union("type",{statusCode:O.object({}),property:whr}).transform({transform:e=>{switch(e.type){case"statusCode":return tL.statusCode();case"property":return tL.property(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Thr,PVi=h(()=>{"use strict";Qe();Thr=O.enum_(["minimal","comprehensive"])});var Ohr,DVi=h(()=>{"use strict";Qe();Ohr=O.enum_(["autopilot","autorelease","ci","manual"])});var Bhr,RVi=h(()=>{"use strict";Qe();DVi();Bhr=O.objectWithoutOptionalProperties({cliVersion:O.string(),generatorName:O.string(),generatorVersion:O.string(),generatorConfig:O.unknown().optional(),originGitCommit:O.string().optional(),originGitCommitIsDirty:O.boolean().optional(),invokedBy:Ohr.optional(),requestedVersion:O.string().optional(),ciProvider:O.string().optional()})});var Phr,kVi=h(()=>{"use strict";Qe();kmr();Phr=O.objectWithoutOptionalProperties({headerName:O.string(),methods:O.list(yHe)})});var Dhr,FVi=h(()=>{"use strict";Qe();Dhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Rhr,NVi=h(()=>{"use strict";Qe();Rhr=O.objectWithoutOptionalProperties({version:O.string().optional(),modulePath:O.string().optional()})});var khr,jVi=h(()=>{"use strict";Qe();khr=O.objectWithoutOptionalProperties({coordinate:O.string().optional(),version:O.string().optional(),usernameEnvironmentVariable:O.string(),passwordEnvironmentVariable:O.string(),mavenUrlEnvironmentVariable:O.string()})});var Fhr,QVi=h(()=>{"use strict";Qe();Fhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional(),tokenEnvironmentVariable:O.string()})});var Nhr,zVi=h(()=>{"use strict";Qe();Nhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var jhr,MVi=h(()=>{"use strict";Qe();jhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Qhr,LVi=h(()=>{"use strict";Qe();Qhr=O.objectWithoutOptionalProperties({apiKey:O.string(),workspaceId:O.string(),collectionId:O.string().optional()})});var zhr,UVi=h(()=>{"use strict";Qe();zhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Mhr,VVi=h(()=>{"use strict";Qe();Mhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Pye,aRt=h(()=>{"use strict";Vr();Qe();FVi();NVi();jVi();QVi();zVi();MVi();LVi();UVi();VVi();Pye=O.union("type",{postman:Qhr,npm:Fhr,maven:khr,pypi:zhr,crates:Dhr,go:Rhr,nuget:Nhr,rubygems:Mhr,packagist:jhr}).transform({transform:e=>{switch(e.type){case"postman":return Jf.postman(e);case"npm":return Jf.npm(e);case"maven":return Jf.maven(e);case"pypi":return Jf.pypi(e);case"crates":return Jf.crates(e);case"go":return Jf.go(e);case"nuget":return Jf.nuget(e);case"rubygems":return Jf.rubygems(e);case"packagist":return Jf.packagist(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Lhr,_Vi=h(()=>{"use strict";Qe();aRt();Lhr=O.objectWithoutOptionalProperties({target:Pye})});var Uhr,qVi=h(()=>{"use strict";Qe();aRt();Uhr=O.objectWithoutOptionalProperties({generateFullProject:O.boolean(),publishTarget:Pye.optional()})});var Vhr,GVi=h(()=>{"use strict";Qe();aRt();Vhr=O.objectWithoutOptionalProperties({owner:O.string(),repo:O.string(),uri:O.string().optional(),token:O.string().optional(),mode:O.stringLiteral("pull-request").optional(),branch:O.string().optional(),target:Pye})});var _hr,WVi=h(()=>{"use strict";Vr();Qe();_Vi();qVi();GVi();_hr=O.union("type",{github:Vhr,direct:Lhr,filesystem:Uhr}).transform({transform:e=>{switch(e.type){case"github":return yY.github(e);case"direct":return yY.direct(e);case"filesystem":return yY.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t})});var cRt,HVi=h(()=>{"use strict";Qe();Wo();gf();Gl();UWe();cRt=O.objectWithoutOptionalProperties({name:Co.optional(),shape:O.lazy(()=>PHe)}).extend(TY).extend(Zi)});var qhr,KVi=h(()=>{"use strict";Qe();gf();Smr();qhr=O.objectWithoutOptionalProperties({file:AHe,name:Co})});var Ghr,JVi=h(()=>{"use strict";Vr();Qe();Ghr=O.union("type",{any:O.object({}),api:O.object({}),boolValue:O.object({}),bytesValue:O.object({}),doubleValue:O.object({}),duration:O.object({}),empty:O.object({}),enum:O.object({}),enumValue:O.object({}),field:O.object({}),fieldCardinality:O.object({}),fieldKind:O.object({}),fieldMask:O.object({}),floatValue:O.object({}),int32Value:O.object({}),int64Value:O.object({}),listValue:O.object({}),method:O.object({}),mixin:O.object({}),nullValue:O.object({}),option:O.object({}),sourceContext:O.object({}),stringValue:O.object({}),struct:O.object({}),syntax:O.object({}),timestamp:O.object({}),type:O.object({}),uint32Value:O.object({}),uint64Value:O.object({}),value:O.object({})}).transform({transform:e=>{switch(e.type){case"any":return mi.any();case"api":return mi.api();case"boolValue":return mi.boolValue();case"bytesValue":return mi.bytesValue();case"doubleValue":return mi.doubleValue();case"duration":return mi.duration();case"empty":return mi.empty();case"enum":return mi.enum();case"enumValue":return mi.enumValue();case"field":return mi.field();case"fieldCardinality":return mi.fieldCardinality();case"fieldKind":return mi.fieldKind();case"fieldMask":return mi.fieldMask();case"floatValue":return mi.floatValue();case"int32Value":return mi.int32Value();case"int64Value":return mi.int64Value();case"listValue":return mi.listValue();case"method":return mi.method();case"mixin":return mi.mixin();case"nullValue":return mi.nullValue();case"option":return mi.option();case"sourceContext":return mi.sourceContext();case"stringValue":return mi.stringValue();case"struct":return mi.struct();case"syntax":return mi.syntax();case"timestamp":return mi.timestamp();case"type":return mi.type();case"uint32Value":return mi.uint32Value();case"uint64Value":return mi.uint64Value();case"value":return mi.value();default:return e}},untransform:({_visit:e,...t})=>t})});var Whr,YVi=h(()=>{"use strict";Vr();Qe();KVi();JVi();Whr=O.union("type",{wellKnown:O.object({value:Ghr}),userDefined:qhr}).transform({transform:e=>{switch(e.type){case"wellKnown":return Dp.wellKnown(e.value);case"userDefined":return Dp.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Hhr,XVi=h(()=>{"use strict";Vr();Qe();YVi();Hhr=O.union("type",{proto:O.object({value:Whr})}).transform({transform:e=>e.type==="proto"?cue.proto(e.value):e,untransform:({_visit:e,...t})=>t})});var Khr,ZVi=h(()=>{"use strict";Qe();Khr=O.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var Jhr,$Vi=h(()=>{"use strict";Qe();Jhr=O.objectWithoutOptionalProperties({})});var Yhr,e_i=h(()=>{"use strict";Qe();Yhr=O.objectWithoutOptionalProperties({default:O.string().optional()})});var Xhr,t_i=h(()=>{"use strict";Qe();Xhr=O.objectWithoutOptionalProperties({default:O.boolean().optional()})});var Zhr,r_i=h(()=>{"use strict";Qe();Zhr=O.objectWithoutOptionalProperties({})});var $hr,n_i=h(()=>{"use strict";Qe();$hr=O.objectWithoutOptionalProperties({})});var egr,i_i=h(()=>{"use strict";Qe();egr=O.objectWithoutOptionalProperties({})});var tgr,o_i=h(()=>{"use strict";Qe();tgr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var rgr,s_i=h(()=>{"use strict";Qe();o_i();rgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:tgr.optional()})});var ngr,a_i=h(()=>{"use strict";Qe();ngr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var igr,c_i=h(()=>{"use strict";Qe();a_i();igr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:ngr.optional()})});var ogr,u_i=h(()=>{"use strict";Qe();ogr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var sgr,l_i=h(()=>{"use strict";Qe();u_i();sgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:ogr.optional()})});var agr,p_i=h(()=>{"use strict";Qe();agr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var cgr,f_i=h(()=>{"use strict";Qe();p_i();cgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:agr.optional()})});var ugr,d_i=h(()=>{"use strict";Qe();ugr=O.objectWithoutOptionalProperties({format:O.string().optional(),pattern:O.string().optional(),minLength:O.number().optional(),maxLength:O.number().optional()})});var lgr,m_i=h(()=>{"use strict";Qe();d_i();lgr=O.objectWithoutOptionalProperties({default:O.string().optional(),validation:ugr.optional()})});var pgr,h_i=h(()=>{"use strict";Qe();pgr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var fgr,g_i=h(()=>{"use strict";Qe();h_i();fgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:pgr.optional()})});var dgr,A_i=h(()=>{"use strict";Qe();dgr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var mgr,y_i=h(()=>{"use strict";Qe();A_i();mgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:dgr.optional()})});var hgr,b_i=h(()=>{"use strict";Qe();hgr=O.objectWithoutOptionalProperties({})});var ggr,E_i=h(()=>{"use strict";Vr();Qe();$Vi();e_i();t_i();r_i();n_i();i_i();s_i();c_i();l_i();f_i();m_i();g_i();y_i();b_i();ggr=O.union("type",{integer:sgr,long:cgr,uint:mgr,uint64:fgr,float:igr,double:rgr,boolean:Xhr,string:lgr,date:egr,dateTime:$hr,dateTimeRfc2822:Zhr,uuid:hgr,base64:Jhr,bigInteger:Yhr}).transform({transform:e=>{switch(e.type){case"integer":return ti.integer(e);case"long":return ti.long(e);case"uint":return ti.uint(e);case"uint64":return ti.uint64(e);case"float":return ti.float(e);case"double":return ti.double(e);case"boolean":return ti.boolean(e);case"string":return ti.string(e);case"date":return ti.date(e);case"dateTime":return ti.dateTime(e);case"dateTimeRfc2822":return ti.dateTimeRfc2822(e);case"uuid":return ti.uuid(e);case"base64":return ti.base64(e);case"bigInteger":return ti.bigInteger(e);default:return e}},untransform:({_visit:e,...t})=>t})});var DHe,Agr=h(()=>{"use strict";Qe();ZVi();E_i();DHe=O.objectWithoutOptionalProperties({v1:Khr,v2:ggr.optional()})});var ygr,I_i=h(()=>{"use strict";Qe();ygr=O.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"])});var bgr,v_i=h(()=>{"use strict";Qe();Bj();I_i();bgr=O.objectWithoutOptionalProperties({name:iy,shape:ygr})});var Egr,x_i=h(()=>{"use strict";Vr();Qe();Wo();Agr();v_i();Egr=O.union(O.discriminant("type","_type"),{container:O.object({container:O.lazy(()=>RHe)}),named:bgr,primitive:O.object({primitive:DHe}),unknown:O.object({})}).transform({transform:e=>{switch(e.type){case"container":return RO.container(e.container);case"named":return RO.named(e);case"primitive":return RO.primitive(e.primitive);case"unknown":return RO.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var Igr,C_i=h(()=>{"use strict";Qe();Wo();x_i();Igr=O.objectWithoutOptionalProperties({aliasOf:O.lazy(()=>Ps),resolvedType:Egr})});var vgr,w_i=h(()=>{"use strict";Qe();UDt();Bj();mue();vgr=O.objectWithoutOptionalProperties({extends:O.list(iy),properties:O.list(NO),extendedProperties:O.list(NO).optional(),extraProperties:O.property("extra-properties",O.boolean()),deferredUnionBaseProperties:O.list(gye).optional()})});var xgr,S_i=h(()=>{"use strict";Qe();Wo();Gl();xgr=O.objectWithoutOptionalProperties({type:O.lazy(()=>Ps)}).extend(Zi)});var Cgr,T_i=h(()=>{"use strict";Qe();mue();S_i();Cgr=O.objectWithoutOptionalProperties({members:O.list(xgr),baseProperties:O.list(NO).optional()})});var wgr,O_i=h(()=>{"use strict";Qe();Wo();Ed();wgr=O.objectWithoutOptionalProperties({name:fs,type:O.lazy(()=>Ps)})});var Sgr,B_i=h(()=>{"use strict";Vr();Qe();Bj();O_i();Sgr=O.union(O.discriminant("propertiesType","_type"),{samePropertiesAsObject:iy,singleProperty:wgr,noProperties:O.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return QS.samePropertiesAsObject(e);case"singleProperty":return QS.singleProperty(e);case"noProperties":return QS.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var uRt,P_i=h(()=>{"use strict";Qe();NWe();Ed();Gl();B_i();uRt=O.objectWithoutOptionalProperties({discriminantValue:fs,shape:Sgr,displayName:O.string().optional(),availability:CY.optional()}).extend(Zi)});var Tgr,D_i=h(()=>{"use strict";Qe();Tgr=O.enum_(["data","protocol"])});var Ogr,R_i=h(()=>{"use strict";Qe();UDt();Ed();Bj();mue();P_i();D_i();Ogr=O.objectWithoutOptionalProperties({discriminant:fs,extends:O.list(iy),types:O.list(uRt),baseProperties:O.list(NO),inheritedBaseProperties:O.list(gye).optional(),default:uRt.optional(),discriminatorContext:Tgr.optional()})});var Bgr,k_i=h(()=>{"use strict";Vr();Qe();C_i();Ihr();w_i();T_i();R_i();Bgr=O.union(O.discriminant("type","_type"),{alias:Igr,enum:BHe,object:vgr,union:Ogr,undiscriminatedUnion:Cgr}).transform({transform:e=>{switch(e.type){case"alias":return hc.alias(e);case"enum":return hc.enum(e);case"object":return hc.object(e);case"union":return hc.union(e);case"undiscriminatedUnion":return hc.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Pgr,F_i=h(()=>{"use strict";Qe();m7();hue();wY();Bj();ghr();HVi();XVi();k_i();Pgr=O.objectWithoutOptionalProperties({name:iy,shape:Bgr,autogeneratedExamples:O.list(cRt),userProvidedExamples:O.list(cRt),v2Examples:LS.optional(),referencedTypes:O.set(jO),encoding:OHe.optional(),source:Hhr.optional(),inline:O.boolean().optional()}).extend(Qx)});var Dgr,N_i=h(()=>{"use strict";Qe();Wo();gf();Gl();$mr();Dgr=O.objectWithoutOptionalProperties({id:wHe,name:Co,type:O.lazy(()=>Ps)}).extend(Zi)});var Rgr,j_i=h(()=>{"use strict";Qe();Wo();gf();Gl();Rgr=O.objectWithoutOptionalProperties({name:Co.optional(),payload:O.lazyObject(()=>qc)}).extend(Zi)});var kgr,Q_i=h(()=>{"use strict";Qe();kgr=O.enum_(["GET","POST"])});var Fgr,z_i=h(()=>{"use strict";gf();Fgr=Co});var Ngr,M_i=h(()=>{"use strict";Qe();Wo();Ed();YDt();Ngr=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps)}).extend(vye)});var jgr,L_i=h(()=>{"use strict";Qe();gf();Bj();M_i();jgr=O.objectWithoutOptionalProperties({name:Co,extends:O.list(iy),properties:O.list(Ngr)})});var Qgr,U_i=h(()=>{"use strict";Qe();Wo();Gl();Qgr=O.objectWithoutOptionalProperties({payloadType:O.lazy(()=>Ps)}).extend(Zi)});var zgr,V_i=h(()=>{"use strict";Vr();Qe();L_i();U_i();zgr=O.union("type",{inlinedPayload:jgr,reference:Qgr}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return zS.inlinedPayload(e);case"reference":return zS.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Mgr,__i=h(()=>{"use strict";Qe();Mgr=O.enum_(["RSA_SHA256","RSA_SHA384","RSA_SHA512","ECDSA_SHA256","ECDSA_SHA384","ECDSA_SHA512","ED25519"])});var Lgr,q_i=h(()=>{"use strict";Qe();Ed();Lgr=O.objectWithoutOptionalProperties({url:O.string(),keyIdHeader:fs.optional()})});var Ugr,G_i=h(()=>{"use strict";Qe();Ugr=O.objectWithoutOptionalProperties({})});var Vgr,W_i=h(()=>{"use strict";Vr();Qe();q_i();G_i();Vgr=O.union("type",{jwks:Lgr,static:Ugr}).transform({transform:e=>{switch(e.type){case"jwks":return c7.jwks(e);case"static":return c7.static(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _gr,H_i=h(()=>{"use strict";Qe();_gr=O.enum_(["ALPHABETICAL"])});var qgr,K_i=h(()=>{"use strict";Qe();qgr=O.enum_(["BODY","TIMESTAMP","NOTIFICATION_URL","MESSAGE_ID"])});var kHe,Ggr=h(()=>{"use strict";Qe();H_i();K_i();kHe=O.objectWithoutOptionalProperties({components:O.list(qgr),delimiter:O.string(),bodySort:_gr.optional()})});var Dye,lRt=h(()=>{"use strict";Qe();Dye=O.enum_(["BASE64","HEX"])});var Wgr,J_i=h(()=>{"use strict";Qe();Wgr=O.enum_(["UNIX_SECONDS","UNIX_MILLIS","ISO8601"])});var FHe,Hgr=h(()=>{"use strict";Qe();Ed();J_i();FHe=O.objectWithoutOptionalProperties({headerName:fs,format:Wgr,tolerance:O.number().optional()})});var Kgr,Y_i=h(()=>{"use strict";Qe();Ed();__i();W_i();Ggr();lRt();Hgr();Kgr=O.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:Mgr,encoding:Dye,signaturePrefix:O.string().optional(),keySource:Vgr,payloadFormat:kHe.optional(),timestamp:FHe.optional()})});var Jgr,X_i=h(()=>{"use strict";Qe();Jgr=O.enum_(["SHA256","SHA1","SHA384","SHA512"])});var Ygr,Z_i=h(()=>{"use strict";Qe();Ygr=O.enum_(["SHA256","SHA1","SHA384","SHA512"])});var Xgr,$_i=h(()=>{"use strict";Qe();Xgr=O.objectWithoutOptionalProperties({name:O.string()})});var Zgr,e5i=h(()=>{"use strict";Vr();Qe();$_i();Zgr=O.union("type",{queryParameter:Xgr}).transform({transform:e=>e.type==="queryParameter"?hye.queryParameter(e):e,untransform:({_visit:e,...t})=>t})});var $gr,t5i=h(()=>{"use strict";Qe();Z_i();e5i();lRt();$gr=O.objectWithoutOptionalProperties({algorithm:Ygr,encoding:Dye,location:Zgr})});var eAr,r5i=h(()=>{"use strict";Qe();eAr=O.objectWithoutOptionalProperties({portVariants:O.boolean(),legacyQueryEncoding:O.boolean()})});var tAr,n5i=h(()=>{"use strict";Qe();Ed();X_i();t5i();r5i();Ggr();lRt();Hgr();tAr=O.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:Jgr,encoding:Dye,signaturePrefix:O.string().optional(),payloadFormat:kHe,timestamp:FHe.optional(),bodyHashBinding:$gr.optional(),notificationUrlNormalization:eAr.optional()})});var rAr,i5i=h(()=>{"use strict";Vr();Qe();Y_i();n5i();rAr=O.union("type",{hmac:tAr,asymmetric:Kgr}).transform({transform:e=>{switch(e.type){case"hmac":return p7.hmac(e);case"asymmetric":return p7.asymmetric(e);default:return e}},untransform:({_visit:e,...t})=>t})});var nAr,o5i=h(()=>{"use strict";Qe();m7();gLi();B4i();xmr();Aue();oRt();j_i();Q_i();z_i();V_i();i5i();nAr=O.objectWithoutOptionalProperties({id:hpr,name:Fgr,displayName:O.string().optional(),method:kgr,headers:O.list(US),payload:zgr,signatureVerification:rAr.optional(),fileUploadPayload:gHe.optional(),responses:O.list(Bye).optional(),examples:O.list(Rgr).optional(),v2Examples:sdr.optional()}).extend(Qx)});var iAr,s5i=h(()=>{"use strict";Qe();o5i();iAr=O.list(nAr)});var oAr,a5i=h(()=>{"use strict";Vr();Qe();Wo();Zdr();oAr=O.union("type",{inlinedBody:lHe,reference:O.lazyObject(()=>qc)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return rL.inlinedBody(e);case"reference":return rL.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var NHe,sAr=h(()=>{"use strict";Qe();NHe=O.string()});var aAr,c5i=h(()=>{"use strict";Qe();a5i();sAr();aAr=O.objectWithoutOptionalProperties({type:NHe,body:oAr})});var cAr,u5i=h(()=>{"use strict";Qe();gf();Gl();Wdr();Hdr();Jdr();c5i();cAr=O.objectWithoutOptionalProperties({name:Co.optional(),url:O.string(),pathParameters:O.list(Tye),headers:O.list($2e),queryParameters:O.list(uHe),messages:O.list(aAr)}).extend(Zi)});var uAr,l5i=h(()=>{"use strict";Qe();Wo();Ed();YDt();uAr=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps)}).extend(vye)});var lAr,p5i=h(()=>{"use strict";Qe();gf();Bj();l5i();lAr=O.objectWithoutOptionalProperties({name:Co,extends:O.list(iy),properties:O.list(uAr)})});var pAr,f5i=h(()=>{"use strict";Qe();Wo();Gl();pAr=O.objectWithoutOptionalProperties({bodyType:O.lazy(()=>Ps)}).extend(Zi)});var fAr,d5i=h(()=>{"use strict";Vr();Qe();p5i();f5i();fAr=O.union("type",{inlinedBody:lAr,reference:pAr}).transform({transform:e=>{switch(e.type){case"inlinedBody":return FO.inlinedBody(e);case"reference":return FO.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var dAr,m5i=h(()=>{"use strict";Qe();dAr=O.enum_(["client","server"])});var mAr,h5i=h(()=>{"use strict";Qe();m7();d5i();sAr();m5i();mAr=O.objectWithoutOptionalProperties({type:NHe,displayName:O.string().optional(),methodName:O.string().optional(),origin:dAr,body:fAr}).extend(Qx)});var hAr,g5i=h(()=>{"use strict";gf();hAr=Co});var gAr,A5i=h(()=>{"use strict";Qe();m7();Z2e();k4i();Aue();bHe();SHe();WDt();u5i();h5i();g5i();gAr=O.objectWithoutOptionalProperties({name:hAr,displayName:O.string().optional(),connectMethodName:O.string().optional(),baseUrl:VP.optional(),path:NU,auth:O.boolean(),headers:O.list(US),queryParameters:O.list(bye),pathParameters:O.list(g7),messages:O.list(mAr),examples:O.list(cAr),v2Examples:udr.optional()}).extend(Qx)});var AAr,y5i=h(()=>{"use strict";Qe();FWe();AAr=O.objectWithoutOptionalProperties({pointsTo:xY})});var jHe,yAr=h(()=>{"use strict";Qe();KDt();J2e();kWe();FWe();hue();mpr();gpr();Gl();y5i();jHe=O.objectWithoutOptionalProperties({fernFilepath:kU,service:vY.optional(),types:O.list(jO),errors:O.list(Iye),webhooks:MWe.optional(),websocket:LWe.optional(),subpackages:O.list(xY),hasEndpointsInTree:O.boolean(),hasWebSocketInTree:O.boolean().optional(),navigationConfig:AAr.optional()}).extend(Zi)});var bAr,b5i=h(()=>{"use strict";Qe();iRt();bAr=O.objectWithoutOptionalProperties({title:O.string(),language:Oye,content:O.string()})});var EAr,E5i=h(()=>{"use strict";Qe();VDt();hLi();PVi();b5i();EAr=O.objectWithoutOptionalProperties({defaultEndpoint:due.optional(),bannerLink:O.string().optional(),introduction:O.string().optional(),apiReferenceLink:O.string().optional(),apiName:O.string().optional(),disabledFeatures:O.list(JDt).optional(),whiteLabel:O.boolean().optional(),features:O.record(JDt,O.list(due)).optional(),customSections:O.list(bAr).optional(),exampleStyle:Thr.optional()})});var IAr,I5i=h(()=>{"use strict";Qe();IAr=O.objectWithoutOptionalProperties({header:O.stringLiteral("User-Agent"),value:O.string()})});var vAr,v5i=h(()=>{"use strict";Qe();I5i();vAr=O.objectWithoutOptionalProperties({language:O.string(),sdkName:O.string(),sdkVersion:O.string(),userAgent:IAr.optional()})});var xAr,x5i=h(()=>{"use strict";Qe();kVi();v5i();xAr=O.objectWithoutOptionalProperties({isAuthMandatory:O.boolean(),hasStreamingEndpoints:O.boolean(),hasPaginatedEndpoints:O.boolean(),hasFileDownloadEndpoints:O.boolean(),platformHeaders:vAr,idempotencyKeyGeneration:Phr.optional()})});var CAr,C5i=h(()=>{"use strict";Qe();kWe();hue();CAr=O.objectWithoutOptionalProperties({typesReferencedOnlyByService:O.record(vY,O.list(jO)),sharedTypes:O.list(jO)})});var wAr,w5i=h(()=>{"use strict";Qe();CVi();wAr=O.objectWithoutOptionalProperties({sources:O.list(Ehr)})});var SAr,S5i=h(()=>{"use strict";Qe();HDt();gf();yAr();SAr=O.objectWithoutOptionalProperties({name:Co,displayName:Eye.optional()}).extend(jHe)});var Tja,Oja=h(()=>{"use strict";Qe();z6i();lLi();KDt();gf();kWe();FWe();hue();mpr();gpr();bLi();_3i();c4i();f4i();cfr();Aue();bHe();bVi();SHe();WVi();F_i();N_i();s5i();A5i();SVi();TVi();BVi();RVi();yAr();E5i();x5i();C5i();w5i();S5i();Tja=O.objectWithoutOptionalProperties({fdrApiDefinitionId:O.string().optional(),apiVersion:xhr.optional(),specVersion:O.string().optional(),apiName:Co,apiDisplayName:O.string().optional(),apiDocs:O.string().optional(),auth:ppr,headers:O.list(US),idempotencyHeaders:O.list(US),types:O.record(jO,Pgr),services:O.record(vY,Ahr),webhookGroups:O.record(MWe,iAr),websocketChannels:O.record(LWe,gAr).optional(),errors:O.record(Iye,qfr),subpackages:O.record(xY,SAr),rootPackage:jHe,constants:Apr,environments:Vfr.optional(),basePath:NU.optional(),pathParameters:O.list(g7),errorDiscriminationStrategy:Shr,sdkConfig:xAr,variables:O.list(Dgr),globalParameters:O.list(JWe).optional(),serviceTypeReferenceInfo:CAr,readmeConfig:EAr.optional(),sourceConfig:wAr.optional(),publishConfig:_hr.optional(),dynamic:Pfr.optional(),selfHosted:O.boolean().optional(),audiences:O.list(Qlr).optional(),generationMetadata:Bhr.optional(),apiPlayground:O.boolean().optional(),casingsConfig:Chr.optional()})});var T5i=h(()=>{"use strict";CVi();vVi();SVi();TVi();OVi();BVi();PVi();RVi();wVi();kVi();Oja();DVi();yAr();y5i();v5i();xVi();E5i();b5i();x5i();C5i();w5i();S5i();I5i()});var O5i={};Z(O5i,{ApiDefinitionSource:()=>Ehr,ApiDefinitionSourceId:()=>yhr,ApiVersionScheme:()=>xhr,CasingsConfig:()=>Chr,ErrorDiscriminationByPropertyStrategy:()=>whr,ErrorDiscriminationStrategy:()=>Shr,ExampleStyle:()=>Thr,GenerationMetadata:()=>Bhr,HeaderApiVersionScheme:()=>vhr,IdempotencyKeyGeneration:()=>Phr,IntermediateRepresentation:()=>Tja,InvocationSource:()=>Ohr,Package:()=>jHe,PackageNavigationConfig:()=>AAr,PlatformHeaders:()=>vAr,ProtoSource:()=>bhr,ReadmeConfig:()=>EAr,ReadmeCustomSection:()=>bAr,SdkConfig:()=>xAr,ServiceTypeReferenceInfo:()=>CAr,SourceConfig:()=>wAr,Subpackage:()=>SAr,UserAgent:()=>IAr});var Bja=h(()=>{"use strict";T5i()});var B5i=h(()=>{"use strict";jUi();Smr();QUi();UUi();zUi();YVi();KVi();JVi()});var P5i={};Z(P5i,{CsharpProtobufFileOptions:()=>Cmr,ProtobufFile:()=>AHe,ProtobufFileOptions:()=>wmr,ProtobufMethodType:()=>Pmr,ProtobufService:()=>Tmr,ProtobufType:()=>Whr,UserDefinedProtobufType:()=>qhr,WellKnownProtobufType:()=>Ghr});var Pja=h(()=>{"use strict";B5i()});var D5i=h(()=>{"use strict";FVi();_Vi();qVi();GVi();NVi();jVi();QVi();zVi();MVi();LVi();WVi();aRt();UVi();VVi()});var R5i={};Z(R5i,{CratesPublishTarget:()=>Dhr,DirectPublish:()=>Lhr,Filesystem:()=>Uhr,GithubPublish:()=>Vhr,GoPublishTarget:()=>Rhr,MavenPublishTarget:()=>khr,NpmPublishTarget:()=>Fhr,NugetPublishTarget:()=>Nhr,PackagistPublishTarget:()=>jhr,PostmanPublishTarget:()=>Qhr,PublishTarget:()=>Pye,PublishingConfig:()=>_hr,PypiPublishTarget:()=>zhr,RubyGemsPublishTarget:()=>Mhr});var Dja=h(()=>{"use strict";D5i()});var RHe,Rja=h(()=>{"use strict";Vr();Qe();Wo();H2e();RHe=O.union(O.discriminant("type","_type"),{list:O.object({list:O.lazy(()=>Ps)}),map:O.lazyObject(()=>TAr),nullable:O.object({nullable:O.lazy(()=>Ps)}),optional:O.object({optional:O.lazy(()=>Ps)}),set:O.object({set:O.lazy(()=>Ps)}),literal:O.object({literal:RU})}).transform({transform:e=>{switch(e.type){case"list":return Bs.list(e.list);case"map":return Bs.map(e);case"nullable":return Bs.nullable(e.nullable);case"optional":return Bs.optional(e.optional);case"set":return Bs.set(e.set);case"literal":return Bs.literal(e.literal);default:return e}},untransform:({_visit:e,...t})=>t})});var kja,Fja=h(()=>{"use strict";Qe();Bj();sRt();kja=O.objectWithoutOptionalProperties({default:yue.optional(),name:iy})});var OAr,Nja=h(()=>{"use strict";Qe();Wo();OAr=O.objectWithoutOptionalProperties({value:O.lazyObject(()=>qc)})});var BAr,k5i=h(()=>{"use strict";Qe();BAr=O.objectWithoutOptionalProperties({datetime:O.date(),raw:O.string().optional()})});var PAr,F5i=h(()=>{"use strict";Qe();PAr=O.objectWithoutOptionalProperties({datetime:O.date(),raw:O.string().optional()})});var QHe,DAr=h(()=>{"use strict";Vr();Qe();mLi();k5i();F5i();QHe=O.union("type",{integer:O.object({integer:O.number()}),long:O.object({long:O.number()}),uint:O.object({uint:O.number()}),uint64:O.object({uint64:O.number()}),float:O.object({float:O.number()}),double:O.object({double:O.number()}),boolean:O.object({boolean:O.boolean()}),string:O.object({string:dpr}),date:O.object({date:O.string()}),datetime:BAr,datetimeRfc2822:PAr,uuid:O.object({uuid:O.string()}),base64:O.object({base64:O.string()}),bigInteger:O.object({bigInteger:O.string()})}).transform({transform:e=>{switch(e.type){case"integer":return Si.integer(e.integer);case"long":return Si.long(e.long);case"uint":return Si.uint(e.uint);case"uint64":return Si.uint64(e.uint64);case"float":return Si.float(e.float);case"double":return Si.double(e.double);case"boolean":return Si.boolean(e.boolean);case"string":return Si.string(e.string);case"date":return Si.date(e.date);case"datetime":return Si.datetime(e);case"datetimeRfc2822":return Si.datetimeRfc2822(e);case"uuid":return Si.uuid(e.uuid);case"base64":return Si.base64(e.base64);case"bigInteger":return Si.bigInteger(e.bigInteger);default:return e}},untransform:({_visit:e,...t})=>t})});var RAr,N5i=h(()=>{"use strict";Qe();DAr();RAr=O.objectWithoutOptionalProperties({literal:QHe})});var kAr,jja=h(()=>{"use strict";Vr();Qe();Wo();N5i();kAr=O.union("type",{list:O.lazyObject(()=>FAr),set:O.lazyObject(()=>zAr),optional:O.lazyObject(()=>QAr),nullable:O.lazyObject(()=>jAr),map:O.lazyObject(()=>NAr),literal:RAr}).transform({transform:e=>{switch(e.type){case"list":return Qu.list(e);case"set":return Qu.set(e);case"optional":return Qu.optional(e);case"nullable":return Qu.nullable(e);case"map":return Qu.map(e);case"literal":return Qu.literal(e);default:return e}},untransform:({_visit:e,...t})=>t})});var MAr,j5i=h(()=>{"use strict";Qe();Ed();MAr=O.objectWithoutOptionalProperties({value:fs})});var LAr,Qja=h(()=>{"use strict";Qe();Wo();Ed();LAr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var UAr,zja=h(()=>{"use strict";Qe();Wo();UAr=O.objectWithoutOptionalProperties({key:O.lazyObject(()=>qc),value:O.lazyObject(()=>qc)})});var FAr,Mja=h(()=>{"use strict";Qe();Wo();FAr=O.objectWithoutOptionalProperties({list:O.list(O.lazyObject(()=>qc)),itemType:O.lazy(()=>Ps)})});var NAr,Lja=h(()=>{"use strict";Qe();Wo();NAr=O.objectWithoutOptionalProperties({map:O.list(O.lazyObject(()=>UAr)),keyType:O.lazy(()=>Ps),valueType:O.lazy(()=>Ps)})});var VAr,Uja=h(()=>{"use strict";Qe();Wo();Bj();VAr=O.objectWithoutOptionalProperties({typeName:iy,shape:O.lazy(()=>PHe)})});var jAr,Vja=h(()=>{"use strict";Qe();Wo();jAr=O.objectWithoutOptionalProperties({nullable:O.lazyObject(()=>qc).optional(),valueType:O.lazy(()=>Ps)})});var zHe,_ja=h(()=>{"use strict";Qe();Wo();Ed();Bj();GDt();zHe=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc),propertyAccess:yye.optional(),originalTypeDeclaration:iy})});var MHe,qja=h(()=>{"use strict";Qe();Wo();MHe=O.objectWithoutOptionalProperties({properties:O.list(O.lazyObject(()=>zHe)),extraProperties:O.list(O.lazyObject(()=>LAr)).optional()})});var _Ar,Gja=h(()=>{"use strict";Qe();Wo();hue();_Ar=O.objectWithoutOptionalProperties({typeId:jO,object:O.lazyObject(()=>MHe)})});var QAr,Wja=h(()=>{"use strict";Qe();Wo();QAr=O.objectWithoutOptionalProperties({optional:O.lazyObject(()=>qc).optional(),valueType:O.lazy(()=>Ps)})});var zAr,Hja=h(()=>{"use strict";Qe();Wo();zAr=O.objectWithoutOptionalProperties({set:O.list(O.lazyObject(()=>qc)),itemType:O.lazy(()=>Ps)})});var qAr,Kja=h(()=>{"use strict";Qe();Wo();Ed();qAr=O.objectWithoutOptionalProperties({wireDiscriminantValue:fs,shape:O.lazy(()=>GAr)})});var GAr,Jja=h(()=>{"use strict";Vr();Qe();Wo();GAr=O.union("type",{samePropertiesAsObject:O.lazyObject(()=>_Ar),singleProperty:O.lazyObject(()=>qc),noProperties:O.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return bY.samePropertiesAsObject(e);case"singleProperty":return bY.singleProperty(e);case"noProperties":return bY.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var qc,Yja=h(()=>{"use strict";Qe();Wo();UWe();qc=O.objectWithoutOptionalProperties({shape:O.lazy(()=>WAr)}).extend(TY)});var WAr,Xja=h(()=>{"use strict";Vr();Qe();Wo();DAr();WAr=O.union("type",{primitive:O.object({primitive:QHe}),container:O.object({container:O.lazy(()=>kAr)}),unknown:O.object({unknown:O.unknown()}),named:O.lazyObject(()=>VAr)}).transform({transform:e=>{switch(e.type){case"primitive":return $i.primitive(e.primitive);case"container":return $i.container(e.container);case"unknown":return $i.unknown(e.unknown);case"named":return $i.named(e);default:return e}},untransform:({_visit:e,...t})=>t})});var PHe,Zja=h(()=>{"use strict";Vr();Qe();Wo();j5i();PHe=O.union("type",{alias:O.lazyObject(()=>OAr),enum:MAr,object:O.lazyObject(()=>MHe),union:O.lazyObject(()=>KAr),undiscriminatedUnion:O.lazyObject(()=>HAr)}).transform({transform:e=>{switch(e.type){case"alias":return Su.alias(e);case"enum":return Su.enum(e);case"object":return Su.object(e);case"union":return Su.union(e);case"undiscriminatedUnion":return Su.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var HAr,$ja=h(()=>{"use strict";Qe();Wo();HAr=O.objectWithoutOptionalProperties({index:O.number(),singleUnionType:O.lazyObject(()=>qc)})});var JAr,eQa=h(()=>{"use strict";Qe();Wo();Ed();JAr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var KAr,tQa=h(()=>{"use strict";Qe();Wo();Ed();KAr=O.objectWithoutOptionalProperties({discriminant:fs,singleUnionType:O.lazyObject(()=>qAr),extendProperties:O.list(O.lazyObject(()=>zHe)).optional(),baseProperties:O.list(O.lazyObject(()=>JAr)).optional()})});var TAr,rQa=h(()=>{"use strict";Qe();Wo();TAr=O.objectWithoutOptionalProperties({keyType:O.lazy(()=>Ps),valueType:O.lazy(()=>Ps)})});var YAr,Q5i=h(()=>{"use strict";Vr();Qe();sRt();YAr=O.union("type",{enum:yue}).transform({transform:e=>e.type==="enum"?SWe.enum(e):e,untransform:({_visit:e,...t})=>t})});var XAr,z5i=h(()=>{"use strict";Qe();HDt();J2e();gf();hue();Q5i();XAr=O.objectWithoutOptionalProperties({typeId:jO,fernFilepath:kU,name:Co,displayName:Eye.optional(),default:YAr.optional(),inline:O.boolean().optional()})});var Ps,nQa=h(()=>{"use strict";Vr();Qe();Wo();z5i();Agr();Ps=O.union(O.discriminant("type","_type"),{container:O.object({container:O.lazy(()=>RHe)}),named:XAr,primitive:O.object({primitive:DHe}),unknown:O.object({})}).transform({transform:e=>{switch(e.type){case"container":return Ur.container(e.container);case"named":return Ur.named(e);case"primitive":return Ur.primitive(e.primitive);case"unknown":return Ur.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var M5i=h(()=>{"use strict";C_i();$Vi();e_i();t_i();Rja();r_i();n_i();i_i();Bj();s_i();o_i();ghr();Ihr();Fja();sRt();Nja();jja();k5i();F5i();j5i();Qja();zja();Mja();N5i();Lja();Uja();Vja();_ja();qja();Gja();Wja();DAr();Hja();Kja();Jja();HVi();Yja();Xja();Zja();$ja();eQa();tQa();c_i();a_i();l_i();u_i();AVi();H2e();f_i();p_i();rQa();z5i();Q5i();mue();GDt();w_i();Agr();ZVi();E_i();yVi();v_i();x_i();I_i();P_i();B_i();O_i();XVi();m_i();d_i();k_i();F_i();nQa();g_i();h_i();y_i();A_i();S_i();T_i();D_i();R_i();b_i()});var L5i={};Z(L5i,{AliasTypeDeclaration:()=>Igr,Base64Type:()=>Jhr,BigIntegerType:()=>Yhr,BooleanType:()=>Xhr,ContainerType:()=>RHe,DateTimeRfc2822Type:()=>Zhr,DateTimeType:()=>$hr,DateType:()=>egr,DeclaredTypeName:()=>iy,DoubleType:()=>rgr,DoubleValidationRules:()=>tgr,Encoding:()=>OHe,EnumTypeDeclaration:()=>BHe,EnumTypeReference:()=>kja,EnumValue:()=>yue,ExampleAliasType:()=>OAr,ExampleContainer:()=>kAr,ExampleDatetime:()=>BAr,ExampleDatetimeRfc2822:()=>PAr,ExampleEnumType:()=>MAr,ExampleExtraObjectProperty:()=>LAr,ExampleKeyValuePair:()=>UAr,ExampleListContainer:()=>FAr,ExampleLiteralContainer:()=>RAr,ExampleMapContainer:()=>NAr,ExampleNamedType:()=>VAr,ExampleNullableContainer:()=>jAr,ExampleObjectProperty:()=>zHe,ExampleObjectType:()=>MHe,ExampleObjectTypeWithTypeId:()=>_Ar,ExampleOptionalContainer:()=>QAr,ExamplePrimitive:()=>QHe,ExampleSetContainer:()=>zAr,ExampleSingleUnionType:()=>qAr,ExampleSingleUnionTypeProperties:()=>GAr,ExampleType:()=>cRt,ExampleTypeReference:()=>qc,ExampleTypeReferenceShape:()=>WAr,ExampleTypeShape:()=>PHe,ExampleUndiscriminatedUnionType:()=>HAr,ExampleUnionBaseProperty:()=>JAr,ExampleUnionType:()=>KAr,FloatType:()=>igr,FloatValidationRules:()=>ngr,IntegerType:()=>sgr,IntegerValidationRules:()=>ogr,JsonEncoding:()=>mhr,Literal:()=>RU,LongType:()=>cgr,LongValidationRules:()=>agr,MapType:()=>TAr,NamedType:()=>XAr,NamedTypeDefault:()=>YAr,ObjectProperty:()=>NO,ObjectPropertyAccess:()=>yye,ObjectTypeDeclaration:()=>vgr,PrimitiveType:()=>DHe,PrimitiveTypeV1:()=>Khr,PrimitiveTypeV2:()=>ggr,ProtoEncoding:()=>hhr,ResolvedNamedType:()=>bgr,ResolvedTypeReference:()=>Egr,ShapeType:()=>ygr,SingleUnionType:()=>uRt,SingleUnionTypeProperties:()=>Sgr,SingleUnionTypeProperty:()=>wgr,Source:()=>Hhr,StringType:()=>lgr,StringValidationRules:()=>ugr,Type:()=>Bgr,TypeDeclaration:()=>Pgr,TypeReference:()=>Ps,Uint64Type:()=>fgr,Uint64ValidationRules:()=>pgr,UintType:()=>mgr,UintValidationRules:()=>dgr,UndiscriminatedUnionMember:()=>xgr,UndiscriminatedUnionTypeDeclaration:()=>Cgr,UnionDiscriminatorContext:()=>Tgr,UnionTypeDeclaration:()=>Ogr,UuidType:()=>hgr});var iQa=h(()=>{"use strict";M5i()});var U5i=h(()=>{"use strict";N_i();$mr()});var V5i={};Z(V5i,{VariableDeclaration:()=>Dgr,VariableId:()=>wHe});var oQa=h(()=>{"use strict";U5i()});var _5i=h(()=>{"use strict";__i();Y_i();W_i();j_i();X_i();n5i();L_i();M_i();q_i();G_i();o5i();Z_i();t5i();e5i();$_i();s5i();Q_i();z_i();r5i();V_i();H_i();K_i();Ggr();U_i();lRt();i5i();Hgr();J_i()});var q5i={};Z(q5i,{AsymmetricAlgorithm:()=>Mgr,AsymmetricKeySignatureVerification:()=>Kgr,AsymmetricKeySource:()=>Vgr,ExampleWebhookCall:()=>Rgr,HmacAlgorithm:()=>Jgr,HmacSignatureVerification:()=>tAr,InlinedWebhookPayload:()=>jgr,InlinedWebhookPayloadProperty:()=>Ngr,JwksKeySource:()=>Lgr,StaticKeySource:()=>Ugr,Webhook:()=>nAr,WebhookBodyHashAlgorithm:()=>Ygr,WebhookBodyHashBinding:()=>$gr,WebhookBodyHashLocation:()=>Zgr,WebhookBodyHashQueryParameterLocation:()=>Xgr,WebhookGroup:()=>iAr,WebhookHttpMethod:()=>kgr,WebhookName:()=>Fgr,WebhookNotificationUrlNormalization:()=>eAr,WebhookPayload:()=>zgr,WebhookPayloadBodySort:()=>_gr,WebhookPayloadComponent:()=>qgr,WebhookPayloadFormat:()=>kHe,WebhookPayloadReference:()=>Qgr,WebhookSignatureEncoding:()=>Dye,WebhookSignatureVerification:()=>rAr,WebhookTimestampConfig:()=>FHe,WebhookTimestampFormat:()=>Wgr});var sQa=h(()=>{"use strict";_5i()});var G5i=h(()=>{"use strict";c5i();a5i();u5i();p5i();l5i();A5i();h5i();d5i();f5i();sAr();m5i();g5i()});var W5i={};Z(W5i,{ExampleWebSocketMessage:()=>aAr,ExampleWebSocketMessageBody:()=>oAr,ExampleWebSocketSession:()=>cAr,InlinedWebSocketMessageBody:()=>lAr,InlinedWebSocketMessageBodyProperty:()=>uAr,WebSocketChannel:()=>gAr,WebSocketMessage:()=>mAr,WebSocketMessageBody:()=>fAr,WebSocketMessageBodyReference:()=>pAr,WebSocketMessageId:()=>NHe,WebSocketMessageOrigin:()=>dAr,WebSocketName:()=>hAr});var aQa=h(()=>{"use strict";G5i()});var cQa=h(()=>{"use strict";_Na();M6i();qNa();fLi();GNa();ALi();WNa();ELi();mja();hja();u4i();yja();d4i();bja();F4i();Cja();wja();fUi();Sja();EVi();Bja();T5i();Pja();B5i();Dja();D5i();iQa();M5i();oQa();U5i();sQa();_5i();aQa();G5i()});var Ri={};Z(Ri,{AliasTypeDeclaration:()=>Igr,ApiAuth:()=>ppr,ApiDefinitionSource:()=>Ehr,ApiDefinitionSourceId:()=>yhr,ApiVersionScheme:()=>xhr,AsymmetricAlgorithm:()=>Mgr,AsymmetricKeySignatureVerification:()=>Kgr,AsymmetricKeySource:()=>Vgr,AudienceDefinition:()=>Qlr,AudienceReference:()=>PWe,AuthScheme:()=>upr,AuthSchemeKey:()=>RWe,AuthSchemesRequirement:()=>lpr,AuthScope:()=>fpr,AutogeneratedEndpointExample:()=>omr,Availability:()=>CY,AvailabilityStatus:()=>qlr,Base64Type:()=>Jhr,BaseAuthScheme:()=>DU,BasicAuthScheme:()=>Ulr,BasicAuthValues:()=>Gfr,BearerAuthScheme:()=>Vlr,BearerAuthValues:()=>Wfr,BigIntegerType:()=>Yhr,BooleanType:()=>Xhr,BytesRequest:()=>fHe,BytesResponse:()=>dHe,CasingsConfig:()=>Chr,Constants:()=>Apr,ContainerType:()=>RHe,CratesPublishTarget:()=>Dhr,CsharpProtobufFileOptions:()=>Cmr,CursorPagination:()=>cmr,CustomPagination:()=>umr,DateTimeRfc2822Type:()=>Zhr,DateTimeType:()=>$hr,DateType:()=>egr,Declaration:()=>Qx,DeclaredErrorName:()=>Sye,DeclaredServiceName:()=>lmr,DeclaredTypeName:()=>iy,DirectPublish:()=>Lhr,DisplayName:()=>Eye,DoubleType:()=>rgr,DoubleValidationRules:()=>tgr,Encoding:()=>OHe,EndpointId:()=>due,EndpointName:()=>pmr,EndpointReference:()=>Aye,EnumTypeDeclaration:()=>BHe,EnumTypeReference:()=>kja,EnumValue:()=>yue,EnvironmentBaseUrlId:()=>VP,EnvironmentBaseUrlWithId:()=>Nfr,EnvironmentId:()=>PY,EnvironmentUrl:()=>wye,EnvironmentVariable:()=>Sj,Environments:()=>Ufr,EnvironmentsConfig:()=>Vfr,ErrorDeclaration:()=>qfr,ErrorDeclarationDiscriminantValue:()=>gja,ErrorDiscriminationByPropertyStrategy:()=>whr,ErrorDiscriminationStrategy:()=>Shr,ErrorId:()=>Iye,EscapedString:()=>dpr,ExampleAliasType:()=>OAr,ExampleCodeSample:()=>mmr,ExampleCodeSampleLanguage:()=>fmr,ExampleCodeSampleSdk:()=>dmr,ExampleContainer:()=>kAr,ExampleDatetime:()=>BAr,ExampleDatetimeRfc2822:()=>PAr,ExampleEndpointCall:()=>pHe,ExampleEndpointErrorResponse:()=>emr,ExampleEndpointSuccessResponse:()=>rmr,ExampleEnumType:()=>MAr,ExampleError:()=>_fr,ExampleExtraObjectProperty:()=>LAr,ExampleHeader:()=>$2e,ExampleInlinedRequestBody:()=>lHe,ExampleInlinedRequestBodyExtraProperty:()=>Ydr,ExampleInlinedRequestBodyProperty:()=>Xdr,ExampleKeyValuePair:()=>UAr,ExampleListContainer:()=>FAr,ExampleLiteralContainer:()=>RAr,ExampleMapContainer:()=>NAr,ExampleNamedType:()=>VAr,ExampleNullableContainer:()=>jAr,ExampleObjectProperty:()=>zHe,ExampleObjectType:()=>MHe,ExampleObjectTypeWithTypeId:()=>_Ar,ExampleOptionalContainer:()=>QAr,ExamplePathParameter:()=>Tye,ExamplePrimitive:()=>QHe,ExampleQueryParameter:()=>uHe,ExampleQueryParameterShape:()=>Kdr,ExampleRequestBody:()=>$dr,ExampleResponse:()=>nmr,ExampleServerSideEvent:()=>tmr,ExampleSetContainer:()=>zAr,ExampleSingleUnionType:()=>qAr,ExampleSingleUnionTypeProperties:()=>GAr,ExampleStyle:()=>Thr,ExampleType:()=>cRt,ExampleTypeReference:()=>qc,ExampleTypeReferenceShape:()=>WAr,ExampleTypeShape:()=>PHe,ExampleUndiscriminatedUnionType:()=>HAr,ExampleUnionBaseProperty:()=>JAr,ExampleUnionType:()=>KAr,ExampleWebSocketMessage:()=>aAr,ExampleWebSocketMessageBody:()=>oAr,ExampleWebSocketSession:()=>cAr,ExampleWebhookCall:()=>Rgr,FeatureId:()=>JDt,FernFilepath:()=>kU,FileDownloadResponse:()=>mHe,FileProperty:()=>ymr,FilePropertyArray:()=>gmr,FilePropertySingle:()=>Amr,FileUploadBodyProperty:()=>Imr,FileUploadBodyPropertyEncoding:()=>bmr,FileUploadRequest:()=>gHe,FileUploadRequestProperty:()=>vmr,Filesystem:()=>Uhr,FloatType:()=>igr,FloatValidationRules:()=>ngr,GenerationMetadata:()=>Bhr,GithubPublish:()=>Vhr,GlobalParameter:()=>JWe,GlobalParameterApplyMode:()=>ofr,GlobalParameterId:()=>KWe,GlobalParameterLocation:()=>afr,GoPublishTarget:()=>Rhr,GrpcTransport:()=>Omr,HeaderApiVersionScheme:()=>vhr,HeaderAuthScheme:()=>_lr,HeaderAuthValues:()=>Hfr,HmacAlgorithm:()=>Jgr,HmacSignatureVerification:()=>tAr,HttpEndpoint:()=>dhr,HttpEndpointSecurityItem:()=>Bmr,HttpEndpointSource:()=>Rmr,HttpHeader:()=>US,HttpMethod:()=>yHe,HttpPath:()=>NU,HttpPathPart:()=>Fmr,HttpRequestBody:()=>IHe,HttpRequestBodyReference:()=>EHe,HttpResponse:()=>Bye,HttpResponseBody:()=>Kmr,HttpService:()=>Ahr,IdempotencyKeyGeneration:()=>Phr,InferredAuthScheme:()=>Klr,InferredAuthSchemeTokenEndpoint:()=>Hlr,InferredAuthenticatedRequestHeader:()=>Wlr,InlinedRequestBody:()=>jmr,InlinedRequestBodyProperty:()=>hHe,InlinedWebSocketMessageBody:()=>lAr,InlinedWebSocketMessageBodyProperty:()=>uAr,InlinedWebhookPayload:()=>jgr,InlinedWebhookPayloadProperty:()=>Ngr,IntegerType:()=>sgr,IntegerValidationRules:()=>ogr,IntermediateRepresentation:()=>Tja,InvocationSource:()=>Ohr,JsonEncoding:()=>mhr,JsonResponse:()=>vHe,JsonResponseBody:()=>zmr,JsonResponseBodyWithProperty:()=>Mmr,JsonStreamChunk:()=>Umr,JwksKeySource:()=>Lgr,Literal:()=>RU,LongType:()=>cgr,LongValidationRules:()=>agr,MapType:()=>TAr,MavenPublishTarget:()=>khr,MultipleBaseUrlsEnvironment:()=>Qfr,MultipleBaseUrlsEnvironments:()=>zfr,MultipleEnvironmentUrlValues:()=>Kfr,Name:()=>DWe,NameAndWireValue:()=>gye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Co,NamedType:()=>XAr,NamedTypeDefault:()=>YAr,NonStreamHttpResponseBody:()=>Wmr,NpmPublishTarget:()=>Fhr,NugetPublishTarget:()=>Nhr,OAuthAccessTokenRequestProperties:()=>npr,OAuthAccessTokenResponseProperties:()=>zWe,OAuthAuthorizationCode:()=>Zlr,OAuthClientCredentials:()=>opr,OAuthConfiguration:()=>apr,OAuthDeviceCode:()=>spr,OAuthPkceConfiguration:()=>Ylr,OAuthPkceMethod:()=>Jlr,OAuthPublicClientId:()=>QWe,OAuthRefreshEndpoint:()=>rpr,OAuthRefreshTokenRequestProperties:()=>tpr,OAuthScheme:()=>cpr,OAuthTokenEndpoint:()=>ipr,OAuthValues:()=>Jfr,ObjectProperty:()=>NO,ObjectPropertyAccess:()=>yye,ObjectTypeDeclaration:()=>vgr,OffsetPagination:()=>Jmr,Package:()=>jHe,PackageNavigationConfig:()=>AAr,PackagistPublishTarget:()=>jhr,Pagination:()=>Zmr,PathPagination:()=>Ymr,PathParameter:()=>g7,PathParameterLocation:()=>ehr,PlatformHeaders:()=>vAr,PostmanPublishTarget:()=>Qhr,PrimitiveType:()=>DHe,PrimitiveTypeV1:()=>Khr,PrimitiveTypeV2:()=>ggr,PropertyPathItem:()=>jWe,ProtoEncoding:()=>hhr,ProtoSource:()=>bhr,ProtoSourceInfo:()=>Dmr,ProtobufFile:()=>AHe,ProtobufFileOptions:()=>wmr,ProtobufMethodType:()=>Pmr,ProtobufService:()=>Tmr,ProtobufType:()=>Whr,PublishTarget:()=>Pye,PublishingConfig:()=>_hr,PypiPublishTarget:()=>zhr,QueryParameter:()=>bye,ReadmeConfig:()=>EAr,ReadmeCustomSection:()=>bAr,RequestProperty:()=>LP,RequestPropertyValue:()=>epr,ResolvedNamedType:()=>bgr,ResolvedTypeReference:()=>Egr,ResponseError:()=>thr,ResponseErrors:()=>rhr,ResponseProperty:()=>f0,RetriesConfiguration:()=>ihr,RetriesDisabledSchema:()=>nhr,RubyGemsPublishTarget:()=>Mhr,SafeAndUnsafeString:()=>q2e,SdkConfig:()=>xAr,SdkRequest:()=>chr,SdkRequestBodyType:()=>ohr,SdkRequestShape:()=>ahr,SdkRequestWrapper:()=>shr,ServerVariable:()=>XWe,ServiceId:()=>vY,ServiceTypeReferenceInfo:()=>CAr,ShapeType:()=>ygr,SingleBaseUrlEnvironment:()=>Mfr,SingleBaseUrlEnvironments:()=>Lfr,SingleUnionType:()=>uRt,SingleUnionTypeProperties:()=>Sgr,SingleUnionTypeProperty:()=>wgr,Source:()=>Hhr,SourceConfig:()=>wAr,SseStreamChunk:()=>Vmr,StaticKeySource:()=>Ugr,StreamParameterResponse:()=>Hmr,StreamingResponse:()=>xHe,StringType:()=>lgr,StringValidationRules:()=>ugr,Subpackage:()=>SAr,SubpackageId:()=>xY,SupportedSdkLanguage:()=>Oye,TextResponse:()=>CHe,TextStreamChunk:()=>_mr,Transport:()=>THe,Type:()=>Bgr,TypeDeclaration:()=>Pgr,TypeId:()=>jO,TypeReference:()=>Ps,Uint64Type:()=>fgr,Uint64ValidationRules:()=>pgr,UintType:()=>mgr,UintValidationRules:()=>dgr,UndiscriminatedUnionMember:()=>xgr,UndiscriminatedUnionTypeDeclaration:()=>Cgr,UnionDiscriminatorContext:()=>Tgr,UnionTypeDeclaration:()=>Ogr,UriPagination:()=>Xmr,UserAgent:()=>IAr,UserDefinedProtobufType:()=>qhr,UserSpecifiedEndpointExample:()=>lhr,UuidType:()=>hgr,V2AuthValues:()=>ZWe,V2EndpointLocation:()=>Zfr,V2EndpointLocationHttpMethod:()=>Xfr,V2EnvironmentValues:()=>$We,V2HttpEndpointCodeSample:()=>edr,V2HttpEndpointExample:()=>tRt,V2HttpEndpointExamples:()=>odr,V2HttpEndpointRequest:()=>rdr,V2HttpEndpointResponse:()=>idr,V2HttpEndpointResponseBody:()=>ndr,V2HttpRequestBodies:()=>phr,V2HttpResponses:()=>fhr,V2SchemaExample:()=>qDt,V2SchemaExamples:()=>LS,V2ValueExamples:()=>DY,V2WebSocketEndpointLocation:()=>adr,V2WebSocketMessageExample:()=>cdr,V2WebSocketSessionExample:()=>nRt,V2WebSocketSessionExamples:()=>udr,V2WebhookExample:()=>rRt,V2WebhookExamples:()=>sdr,VariableDeclaration:()=>Dgr,VariableId:()=>wHe,WebSocketChannel:()=>gAr,WebSocketChannelId:()=>LWe,WebSocketMessage:()=>mAr,WebSocketMessageBody:()=>fAr,WebSocketMessageBodyReference:()=>pAr,WebSocketMessageId:()=>NHe,WebSocketMessageOrigin:()=>dAr,WebSocketName:()=>hAr,Webhook:()=>nAr,WebhookBodyHashAlgorithm:()=>Ygr,WebhookBodyHashBinding:()=>$gr,WebhookBodyHashLocation:()=>Zgr,WebhookBodyHashQueryParameterLocation:()=>Xgr,WebhookGroup:()=>iAr,WebhookGroupId:()=>MWe,WebhookHttpMethod:()=>kgr,WebhookId:()=>hpr,WebhookName:()=>Fgr,WebhookNotificationUrlNormalization:()=>eAr,WebhookPayload:()=>zgr,WebhookPayloadBodySort:()=>_gr,WebhookPayloadComponent:()=>qgr,WebhookPayloadFormat:()=>kHe,WebhookPayloadReference:()=>Qgr,WebhookSignatureEncoding:()=>Dye,WebhookSignatureVerification:()=>rAr,WebhookTimestampConfig:()=>FHe,WebhookTimestampFormat:()=>Wgr,WellKnownProtobufType:()=>Ghr,WithContentType:()=>FU,WithDocs:()=>Zi,WithDocsAndAvailability:()=>vye,WithJsonExample:()=>TY,WithV2Examples:()=>ny,audience:()=>L6i,auth:()=>dLi,commons:()=>yLi,constants:()=>ILi,dynamic:()=>d0,environment:()=>l4i,errors:()=>m4i,examples:()=>N4i,generatorExec:()=>pUi,globalParameters:()=>dUi,http:()=>IVi,ir:()=>O5i,proto:()=>P5i,publish:()=>R5i,types:()=>L5i,variables:()=>V5i,webhooks:()=>q5i,websocket:()=>W5i});var Wo=h(()=>{"use strict";cQa()});var uQa=h(()=>{"use strict";Vr();P2a();Wo()});var zn=h(()=>{"use strict";uQa();Vr();Wo()});var _P,lQa=h(()=>{"use strict";_P={integer:"integer",long:"long",uint:"uint",uint64:"uint64",float:"float",double:"double",boolean:"boolean",string:"string",datetime:"datetime",datetimeRfc2822:"datetime-rfc-2822",base64:"base64",uuid:"uuid",date:"date",bigint:"bigint",unknown:"unknown"}});function eNe({type:e,_default:t,validation:r,visitor:n}){switch(e){case _P.integer:{let l=r??void 0;return n.primitive({v1:ns.Integer,v2:ti.integer({default:t??void 0,validation:l!=null?{min:l.min,max:l.max,exclusiveMin:l.exclusiveMin,exclusiveMax:l.exclusiveMax,multipleOf:l.multipleOf}:void 0})})}case _P.double:{let l=r??void 0;return n.primitive({v1:ns.Double,v2:ti.double({default:t??void 0,validation:l!=null?{min:l.min,max:l.max,exclusiveMin:l.exclusiveMin,exclusiveMax:l.exclusiveMax,multipleOf:l.multipleOf}:void 0})})}case _P.string:{let l=r??void 0;return n.primitive({v1:ns.String,v2:ti.string({default:t??void 0,validation:l!=null?{format:l.format,pattern:l.pattern,minLength:l.minLength,maxLength:l.maxLength}:void 0})})}case _P.float:return n.primitive({v1:ns.Float,v2:void 0});case _P.long:{let l=r??void 0;return n.primitive({v1:ns.Long,v2:ti.long({default:t??void 0,validation:l!=null?{min:l.min,max:l.max,exclusiveMin:l.exclusiveMin,exclusiveMax:l.exclusiveMax,multipleOf:l.multipleOf}:void 0})})}case _P.boolean:return n.primitive({v1:ns.Boolean,v2:ti.boolean({default:t??void 0})});case _P.datetime:return n.primitive({v1:ns.DateTime,v2:void 0});case _P.datetimeRfc2822:return n.primitive({v1:ns.DateTimeRfc2822,v2:ti.dateTimeRfc2822({})});case _P.date:return n.primitive({v1:ns.Date,v2:void 0});case _P.uuid:return n.primitive({v1:ns.Uuid,v2:void 0});case _P.base64:return n.primitive({v1:ns.Base64,v2:void 0});case _P.bigint:return n.primitive({v1:ns.BigInteger,v2:ti.bigInteger({default:t??void 0})});case _P.uint:return n.primitive({v1:ns.Uint,v2:void 0});case _P.uint64:return n.primitive({v1:ns.Uint64,v2:void 0});case _P.unknown:return n.unknown()}let i=e.match(Pj.MAP);if(i?.[1]!=null&&i[2]!=null)return n.map({keyType:i[1],valueType:i[2]});let o=e.match(Pj.LIST);if(o?.[1]!=null)return n.list(o[1]);let s=e.match(Pj.SET);if(s?.[1]!=null)return n.set(s[1]);let a=e.match(Pj.OPTIONAL);if(a?.[1]!=null)return n.optional(a[1]);let c=e.match(Pj.NULLABLE);if(c?.[1]!=null)return n.nullable(c[1]);let u=e.match(Pj.LITERAL);if(u?.[1]!=null)return n.literal(p0.string(u[1]));if(u?.[2]!=null){let l=u[2];switch(l){case"false":return n.literal(p0.boolean(!1));case"true":return n.literal(p0.boolean(!0));default:throw new Error(`Unsupported literal value: ${l}`)}}return n.named(e)}var Pj,LHe=h(()=>{"use strict";zn();lQa();Pj={MAP:/^map<\s*([^,]*)\s*,\s*(.*)\s*>$/,LIST:/^list<\s*(.*)\s*>$/,SET:/^set<\s*(.*)\s*>$/,OPTIONAL:/^optional<\s*(.*)\s*>$/,NULLABLE:/^nullable<\s*(.*)\s*>$/,LITERAL:/^literal<\s*(?:"(.*)"|(true|false))\s*>$/}});function jU(e){if(e===pQa)return{isOptional:!1};if(e.match(Pj.OPTIONAL)?.[1]===pQa)return{isOptional:!0}}var pQa,K5i=h(()=>{"use strict";LHe();pQa="bytes"});function pRt(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return jU(t)}var fQa=h(()=>{"use strict";K5i()});function J5i({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(J5i({input:r,typeName:t}))return!0;return!1}var dQa=h(()=>{"use strict"});function mQa(e){return J5i({input:e,typeName:"file"})}var hQa=h(()=>{"use strict";dQa()});function gQa(e){let t=0,r=0;function n(){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)return;let o="";for(;t<e.length&&e[t]!=="<"&&e[t]!==","&&e[t]!==">";)o+=e[t++];if(o.trim()){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t<e.length&&e[t]==="<"){if(t++,r++,r>128)throw new Error("Internal error; Exceeded maximum recursion depth while parsing generics.");let s={name:o.trim(),arguments:[]};for(;t<e.length&&e[t]!==">";){for(;t<e.length&&/[\s,]/.test(e[t]);)t++;if(t<e.length&&e[t]!==">"){let a=n();a&&s.arguments.push(a)}}if(t<e.length&&e[t]===">")t++,r--;else throw new Error("Malformed input: missing closing '>' for generic arguments.");return s}else return o.trim()}}let i=n();if(typeof i=="object")return i}var AQa=h(()=>{"use strict"});function yQa(e){return e.match(Pj.LIST)?.[1]===Y5i}function Dj(e){if(e===Y5i)return{isOptional:!1,isArray:!1};let t=e.match(Pj.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===Y5i)return{isOptional:!0,isArray:!1};if(yQa(t[1]))return{isOptional:!0,isArray:!0}}if(yQa(e))return{isOptional:!1,isArray:!0}}var Y5i,X5i=h(()=>{"use strict";LHe();Y5i="file"});function Ogf(e){return typeof e=="string"?!1:Rf.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(xg(e.body)&&Object.values(e.body.properties??[]).some(Pgf))}function tNe(e){if(!(!Ogf(e)||e.body==null)&&e.name!=null&&e.body!=null&&xg(e.body))return Bgf(e.name,e.body)}function Bgf(e,t){let r=Object.entries(t.properties??[]).reduce((n,[i,o])=>{let s=typeof o!="string"?o.docs:void 0,a=typeof o!="string"?o["content-type"]:void 0,c=typeof o!="string"?o.style:void 0,u=Dj(typeof o=="string"?o:o.type);return u!=null?n.push({isFile:!0,key:i,docs:s,isOptional:u.isOptional,isArray:u.isArray,contentType:a,style:c}):n.push({isFile:!1,key:i,propertyType:o,docs:s,contentType:a,style:c}),n},[]);return t["extra-properties"],{name:e,extends:t.extends,properties:r}}function Pgf(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=gQa(t);return r==null?!1:mQa(r)}var bQa=h(()=>{"use strict";kt();hQa();AQa();wMi();X5i()});function rNe(e){if(e===EQa)return{isOptional:!1};if(e.match(Pj.OPTIONAL)?.[1]===EQa)return{isOptional:!0}}var EQa,IQa=h(()=>{"use strict";LHe();EQa="text"});function bv({type:e,_default:t,validation:r,visitor:n}){return eNe({type:e,_default:t,validation:r,visitor:{primitive:n.primitive,map:({keyType:i,valueType:o})=>n.map({keyType:bv({type:i,_default:void 0,validation:void 0,visitor:n}),valueType:bv({type:o,_default:void 0,validation:void 0,visitor:n})}),list:i=>n.list(bv({type:i,_default:void 0,validation:void 0,visitor:n})),set:i=>n.set(bv({type:i,_default:void 0,validation:void 0,visitor:n})),optional:i=>n.optional(bv({type:i,_default:t,validation:r,visitor:n})),nullable:i=>n.nullable(bv({type:i,_default:t,validation:r,visitor:n})),literal:n.literal,named:n.named,unknown:n.unknown}})}var vQa=h(()=>{"use strict";LHe()});function Z5i(e,t){if(Dgf(e))return t.sdk(e);if(Rgf(e))return t.language(e);Ee(e)}function Dgf(e){return e.sdk!=null}function Rgf(e){return e.language!=null}var xQa=h(()=>{"use strict";kt()});function CQa(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}var wQa=h(()=>{"use strict"});function SQa(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}var TQa=h(()=>{"use strict"});function nNe(e,t,r){return kgf(e,t)?r.stream(t):Fgf(e,t)?r.events(t):r.body(t)}function kgf(e,t){return t.stream!==void 0&&CQa(e)}function Fgf(e,t){return t.stream!==void 0&&SQa(e)}var OQa=h(()=>{"use strict";wQa();TQa()});function iNe(e,t){if(BQa(e))return t.single(e);if(PQa(e))return t.any(e);if(Ngf(e))return t.endpointSecurity(e);Ee(e)}function BQa(e){return typeof e=="string"||e.scheme!=null}function PQa(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function Ngf(e){let[t,...r]=Object.keys(e);return t==="endpoint-security"&&r.length===0}var DQa=h(()=>{"use strict";kt()});function oNe(e,t){if(RQa(e))return t.header(e);switch(e.scheme){case"basic":return t.basic(e);case"bearer":return"get-token"in e?t.inferredBearer(e):t.tokenBearer(e);case"oauth":return t.oauth(e);default:Ee(e)}}function RQa(e){return e.header!=null}var kQa=h(()=>{"use strict";kt()});function kY(e,t){if(FQa(e))return t.singleBaseUrl(e);if(qP(e))return t.multipleBaseUrls(e);Ee(e)}function FQa(e){return typeof e=="string"||"url"in e}function qP(e){return typeof e!="string"&&"urls"in e}var NQa=h(()=>{"use strict";kt()});function bue(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}var jQa=h(()=>{"use strict"});function Ev(e,t){if(Rye(e))return t.alias(e);if(QU(e))return t.discriminatedUnion(e);if(rf(e))return t.object(e);if(UHe(e))return t.undiscriminatedUnion(e);if(A7(e))return t.enum(e);Ee(e)}function Rye(e){return typeof e=="string"||e.type!=null}function rf(e){return e.extends!=null||e.properties!=null}function QU(e){return e.union!=null&&e.discriminated==null}function UHe(e){let t=e;return t.union!=null&&t.discriminated!=null}function A7(e){return e.enum!=null}var QQa=h(()=>{"use strict";kt()});var Qo=h(()=>{"use strict";DSa();kSa();QSa();zSa();MSa();wMi();LSa();USa();fQa();bQa();K5i();X5i();IQa();vQa();xQa();OQa();DQa();kQa();NQa();jQa();QQa();LHe()});var b7,r8i=h(()=>{"use strict";b7=class{generatorsConfiguration;workspaceName;cliVersion;absoluteFilePath;changelog;constructor({generatorsConfiguration:t,workspaceName:r,cliVersion:n,absoluteFilePath:i,changelog:o}){this.generatorsConfiguration=t,this.workspaceName=r,this.cliVersion=n,this.absoluteFilePath=i,this.changelog=o}}});var GQa=h(()=>{"use strict"});function kye(e){if(typeof e.raw?.output=="object"&&e.raw?.output!==null){let t=e.raw.output["package-name"];if(t!=null)return t;let r=e.raw.output.coordinate;if(r!=null)return r}if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config.package_name;if(t!=null)return t;let r=e.raw.config.module?.path;if(r!=null)return r;let n=e.raw.config.packageName;if(typeof n=="string")return n}}function Fye(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function qgf(e){if(!Array.isArray(e))return i8i;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>_gf.has(r));return t.length>0?t:i8i}function Nye(e){let t=e.idempotencyKeyGenerationConfig??Ggf(e);return Wgf(t)}function Ggf(e){let t=typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config:typeof e.config=="object"&&e.config!==null?e.config:void 0;if(t!=null)return t["auto-generate-idempotency-key"]}function Wgf(e){if(e===!0)return{headerName:WQa,methods:i8i};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:WQa,methods:qgf(e.methods)}}}function VHe(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))Hgf.has(r)||(t[r]=n);return t}async function $Ar({version:e,packageName:t,generatorInvocation:r,context:n}){if(e==null||r.outputMode.type==="downloadFiles")return;let i=r.outputMode.type==="publishV2"||r.outputMode.type==="publish",o=t??kye(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await Kgf({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${n8i(s)}: ${Ln(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${n8i(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:B.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${n8i(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function Kgf({packageName:e,version:t,language:r}){switch(r){case"typescript":return await Jgf(e,t);case"python":return await Ygf(e,t);case"java":return await Xgf(e,t);case"csharp":return await Zgf(e,t);case"ruby":return await $gf(e,t);case"go":return await eAf(e,t);case"rust":return await tAf(e,t);default:return!1}}async function Jgf(e,t){let r=encodeURIComponent(e).replace(/^%40/,"@"),n={accept:"application/json"},i=process.env.NPM_TOKEN;i!=null&&(n.authorization=`Bearer ${i}`);let o=await fetch(`https://registry.npmjs.org/${r}/${t}`,{headers:n,signal:AbortSignal.timeout(sNe)});return o.ok?(await o.json()).version===t:!1}async function Ygf(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(sNe)})).ok}async function Xgf(e,t){let r=e.split(":");if(r.length<2||!r[0]||!r[1])return!1;let n=r[0],i=r[1],o=await fetch(`https://search.maven.org/solrsearch/select?q=g:${encodeURIComponent(n)}+AND+a:${encodeURIComponent(i)}+AND+v:${encodeURIComponent(t)}&rows=1&wt=json`,{signal:AbortSignal.timeout(sNe)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function Zgf(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(sNe)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function $gf(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(sNe)})).ok}async function eAf(e,t){let r=e.replace(/[A-Z]/g,s=>"!"+s.toLowerCase()),n=t.startsWith("v")?t:`v${t}`,i=await fetch(`https://proxy.golang.org/${r}/@v/${n}.info`,{signal:AbortSignal.timeout(sNe)});return i.ok?(await i.json()).Version!=null:!1}async function tAf(e,t){let r=await fetch(`https://crates.io/api/v1/crates/${e}/${t}`,{headers:{"user-agent":"fern-cli (https://buildwithfern.com)"},signal:AbortSignal.timeout(sNe)});return r.ok?(await r.json()).version?.num===t:!1}function n8i(e){switch(e){case"typescript":return"npm";case"python":return"PyPI";case"java":return"Maven Central";case"csharp":return"NuGet";case"ruby":return"RubyGems";case"go":return"Go Module Proxy";case"rust":return"crates.io";default:return e}}var WQa,i8i,_gf,Hgf,sNe,HQa=h(()=>{"use strict";kt();Qt();WQa="Idempotency-Key",i8i=["POST","PUT"],_gf=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);Hgf=new Set(["user-agent","auto-generate-idempotency-key"]);sNe=5e3});var KQa=b(iL=>{"use strict";var rAf=iL&&iL.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iL,"__esModule",{value:!0});var nAf=require("fs"),iAf=rAf(vA()),_He=iAf.default("@kwsites/file-exists");function oAf(e,t,r){_He("checking %s",e);try{let n=nAf.statSync(e);return n.isFile()&&t?(_He("[OK] path represents a file"),!0):n.isDirectory()&&r?(_He("[OK] path represents a directory"),!0):(_He("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return _He("[FAIL] path is not accessible: %o",n),!1;throw _He("[FATAL] %o",n),n}}function sAf(e,t=iL.READABLE){return oAf(e,(t&iL.FILE)>0,(t&iL.FOLDER)>0)}iL.exists=sAf;iL.FILE=1;iL.FOLDER=2;iL.READABLE=iL.FILE+iL.FOLDER});var o8i=b(eyr=>{"use strict";function aAf(e){for(var t in e)eyr.hasOwnProperty(t)||(eyr[t]=e[t])}Object.defineProperty(eyr,"__esModule",{value:!0});aAf(KQa())});function qHe(...e){let t=new String(e);return s8i.set(t,e),t}function MU(e){return e instanceof String&&s8i.has(e)}function GHe(e){return s8i.get(e)??[]}var s8i,jye=h(()=>{"use strict";s8i=new WeakMap});var dRt=b(aNe=>{"use strict";Object.defineProperty(aNe,"__esModule",{value:!0});aNe.createDeferred=aNe.deferred=void 0;function a8i(){let e,t,r="pending";return{promise:new Promise((i,o)=>{e=i,t=o}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}aNe.deferred=a8i;aNe.createDeferred=a8i;aNe.default=a8i});function*JQa(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function fAf(e,t){for(let{name:n}of JQa(e,"task")){if(cAf.has(n))return WHe(!0,t);if(uAf.has(n))return WHe(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:lAf.has(r)?WHe(!0,t.slice(1)):pAf.has(r)?WHe(!1,t.slice(1)):t.length===1?WHe(!1,t):WHe(!0,t)}function WHe(e=!1,t=[]){let r=t.at(0)?.toLowerCase();return r===void 0?null:{isWrite:e,isRead:!e,key:r,value:t.at(1)}}function dAf(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function mAf(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function hAf(e){for(let{name:t}of JQa(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function gAf({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*AAf(e){for(let t of e){let r=gAf(t),n=r&&mAf(t.value);n&&(yield{...n,scope:r})}}function yAf(e,t,r){let n={read:[],write:[...AAf(t)]};return e==="config"&&bAf(n,hAf(t),fAf(t,r)),n}function bAf(e,t,r){if(r===null)return;let n=dAf(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function xAf(e){let t=IAf[e??""]??vAf;return{short:new Map([...YQa.short.entries(),...t.short.entries()]),long:t.long}}function XQa(e,t=EAf){if(e.startsWith("--")){let r=e.indexOf("=");if(r>2)return[{name:e.slice(0,r),value:e.slice(r+1),needsNext:!1}];let n=e.slice(2);return[{name:e,needsNext:t.long.has(n)}]}if(e.length===2){let r=e.charAt(1),n=t.short.get(r);return[{name:e,needsNext:n===!0}]}return CAf(e,t.short)}function CAf(e,t){let r=e.slice(1).split(""),n=[];for(let i=0;i<r.length;i++){let o=r[i],s=t.get(o);if(s===void 0)return[{name:e,needsNext:!1}];if(s){let a=r.slice(i+1).join("");if(a&&![...a].every(c=>t.has(c)))return n.push({name:`-${o}`,value:a,needsNext:!1}),n}n.push({name:`-${o}`,needsNext:s})}return n}function wAf(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=XQa(n),o=r+1;for(let s of i){let a={name:s.name,value:s.value,absorbedNext:!1,isGlobal:!0};s.needsNext&&a.value===void 0&&o<e.length&&(a.value=String(e[o]),a.absorbedNext=!0,o++),t.push(a)}r=o}return{flags:t,taskIndex:r}}function SAf(e,t,r=[]){let n=xAf(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(MU(a)){o.push(...GHe(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let d=e[p];MU(d)?o.push(...GHe(d)):o.push(String(d))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let u=XQa(c,n),l=s+1;for(let p of u){let d={name:p.name,value:p.value,absorbedNext:!1,isGlobal:!1};p.needsNext&&d.value===void 0&&l<e.length&&!MU(e[l])&&(d.value=String(e[l]),d.absorbedNext=!0,l++),r.push(d)}s=l}return{flags:r,positionals:i,pathspecs:o}}function*TAf({write:e}){for(let t of e)for(let r of OAf){let n=r(t.key);n&&(yield n)}}function UU(e,t,r=String(e)){let n=typeof e=="string"?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(i){if(n.test(i))return{category:t,message:`Configuring ${r} is not permitted without enabling ${t}`}}}function LU(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return UU(r,t,e)}function*BAf(e,t){for(let r of t)for(let n of PAf){let i=n(e,r.name);i&&(yield i)}}function mRt(e,t,r,n=String(t)){let i=typeof t=="string"?new RegExp(`\\s*${t.toLowerCase()}`):t,o=`Use of ${e?`${e} with option `:""}${n} is not permitted without enabling ${r}`;return function(s,a){if((!e||s===e)&&i.test(a))return{category:r,message:o}}}function ZQa(e,t,r){return[...BAf(e,t),...TAf(r)]}function DAf(...e){let{flags:t,taskIndex:r}=wAf(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=SAf(i,n,t),a=yAf(n,t,o);return{task:n,flags:t.map(kAf),paths:s,config:a,vulnerabilities:RAf(ZQa(n,t,a))}}function RAf(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function kAf({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*FAf(e){let t=parseInt(e.git_config_count??"0",10);for(let r=0;r<t;r++){let n=e[`git_config_key_${r}`],i=e[`git_config_value_${r}`];n!==void 0&&(yield{key:n.toLowerCase().trim(),value:i,scope:"env"})}}function*NAf(e){for(let t of Object.keys(e))if(eza(t)){let r=$Qa[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function eza(e){return Object.hasOwn($Qa,e)}function jAf(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(eza(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function QAf(e){let t=jAf(e),r={read:[],write:[...FAf(t)]},n=[...NAf(t),...ZQa(null,[],r)];return{config:r,vulnerabilities:n}}function tza(e,t){return[...DAf(...e).vulnerabilities,...QAf(t).vulnerabilities]}var cAf,uAf,lAf,pAf,YQa,EAf,IAf,vAf,OAf,PAf,$Qa,rza=h(()=>{"use strict";jye();cAf=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),uAf=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),lAf=new Set(["edit","remove-section","rename-section","set","unset"]),pAf=new Set(["get","get-color","get-colorbool","list"]);YQa={short:new Map([["c",!0]])},EAf={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...YQa.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},IAf={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},vAf={short:new Map,long:new Set};OAf=[UU("alias","allowUnsafeAlias"),UU("core.askPass","allowUnsafeAskPass"),UU("core.editor","allowUnsafeEditor"),UU("core.fsmonitor","allowUnsafeFsMonitor"),UU("core.gitProxy","allowUnsafeGitProxy"),UU("core.hooksPath","allowUnsafeHooksPath"),UU("core.pager","allowUnsafePager"),UU("core.sshCommand","allowUnsafeSshCommand"),LU("credential.helper","allowUnsafeCredentialHelper"),LU("diff.command","allowUnsafeDiffExternal"),UU("diff.external","allowUnsafeDiffExternal"),LU("diff.textconv","allowUnsafeDiffTextConv"),LU("filter.clean","allowUnsafeFilter"),LU("filter.smudge","allowUnsafeFilter"),LU("gpg.program","allowUnsafeGpgProgram"),UU("init.templateDir","allowUnsafeTemplateDir"),LU("merge.driver","allowUnsafeMergeDriver"),LU("mergetool.path","allowUnsafeMergeDriver"),LU("mergetool.cmd","allowUnsafeMergeDriver"),LU("protocol.allow","allowUnsafeProtocolOverride"),LU("remote.receivepack","allowUnsafePack"),LU("remote.uploadpack","allowUnsafePack"),UU("sequence.editor","allowUnsafeEditor")];PAf=[mRt(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),mRt("clone",/^-\w*u/,"allowUnsafePack"),mRt("clone","--u","allowUnsafePack"),mRt("push","--exec","allowUnsafePack"),mRt(null,"--template","allowUnsafeTemplateDir")];$Qa={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeConfigPaths",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass"}});function jza(e){return typeof e!="function"?lNe:e}function Qza(e){return typeof e=="function"&&e!==lNe}function zza(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Mza(e,t=0){return Lza(e)&&e.length>t?e[t]:void 0}function uNe(e,t=0){if(Lza(e)&&e.length>t)return e[e.length-1-t]}function Lza(e){return myr(e)}function bRt(e="",t=!0,r=`
|
|
100
|
+
`)),{ok:!0,value:t}):n}}var EY=h(()=>{"use strict"});function klr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var v6i=h(()=>{"use strict"});var TWe,x6i=h(()=>{"use strict";v6i();TWe=class extends Error{errors;constructor(t){super(t.map(klr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var OWe,C6i=h(()=>{"use strict";v6i();OWe=class extends Error{errors;constructor(t){super(t.map(klr).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function Kd(e){return{nullable:()=>ygf(e),optional:()=>w6i(e),optionalNullable:()=>bgf(e),transform:t=>S6i(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new OWe(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new TWe(n.errors)}}}function ygf(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:()=>nu.NULLABLE};return{...t,...Kd(t)}}function w6i(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:()=>nu.OPTIONAL};return{...t,...Kd(t)}}function bgf(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:()=>nu.OPTIONAL_NULLABLE};return{...t,...Kd(t)}}function S6i(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,...Kd(r)}}var N2a=h(()=>{"use strict";mw();x6i();C6i()});var wj=h(()=>{"use strict";N2a();x6i();C6i()});function j2a(){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:()=>nu.BIGINT};return{...hw(e),...Kd(e)}}var Q2a=h(()=>{"use strict";mw();tF();EY();wj()});var z2a=h(()=>{"use strict";Q2a()});function M2a(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Hd(t,"string")}]}:Egf.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:()=>nu.DATE};return{...hw(e),...Kd(e)}}var Egf,L2a=h(()=>{"use strict";mw();tF();EY();wj();Egf=/^([+-]?\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 U2a=h(()=>{"use strict";L2a()});function MS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...hw(r),...Kd(r)}}}var IY=h(()=>{"use strict";wj();EY()});function jDt(e){let t=new Set(e);return MS(nu.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})()}function V2a(e){return jDt(e).transform({transform:t=>t,untransform:t=>t})}var _2a=h(()=>{"use strict";mw();IY();tF()});var T6i=h(()=>{"use strict";_2a()});function q2a(e){let t=O6i(e);return{...t,...Kd(t)}}function O6i(e){return{parse:(t,r)=>BWe(e).parse(t,r),json:(t,r)=>BWe(e).json(t,r),getType:()=>BWe(e).getType()}}function BWe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var B6i=h(()=>{"use strict";wj()});function P6i(e){return Object.entries(e)}var G2a=h(()=>{"use strict"});function QDt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var D6i=h(()=>{"use strict"});function pue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var zDt=h(()=>{"use strict"});function MDt(e){return Object.keys(e)}var R6i=h(()=>{"use strict"});function W2a(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var H2a=h(()=>{"use strict"});function d7(e){return{withParsedProperties:t=>k6i(e,t)}}function k6i(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(Igf.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(!pue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Hd(n,"object")}]};let o=new Set(Object.keys(t)),s=QDt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Kd(r),...d7(r)}}var Igf,K2a=h(()=>{"use strict";D6i();tF();zDt();wj();Igf=Object.prototype.hasOwnProperty});var LDt=h(()=>{"use strict";K2a()});function J2a(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function fue(e){return e.isProperty}var F6i=h(()=>{"use strict"});function Flr(e){let t;function r(){if(t==null){t={};for(let[d,f]of P6i(e)){let m=fue(f)?f.rawKey:d,g=fue(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 P6i(e)){let m=fue(f)?f.rawKey:d,g=fue(f)?f.valueSchema:f;xgf(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])=>fue(f)?f.rawKey:d),_getParsedProperties:()=>MDt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Y2a({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 Y2a({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return fue(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:()=>nu.OBJECT};return{...hw(p),...Kd(p),...d7(p),..._2e(p)}}function Y2a({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!pue(e))return{ok:!1,errors:[{path:s,message:Hd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!vgf.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 _2e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>X2a({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>X2a({extensionKeys:t._getParsedProperties(),value:n,transformBase:o=>e.json(o,i),transformExtension:o=>t.json(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),getType:()=>nu.OBJECT};return{...r,...Kd(r),...d7(r),..._2e(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:()=>nu.OBJECT};return{...n,...Kd(n),...d7(n),..._2e(n)}}}}function X2a({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!pue(t))return{ok:!1,errors:[{path:i,message:Hd(t,"object")}]};let o=new Set(e),[s,a]=W2a(MDt(t),l=>o.has(l)),c=r(QDt(t,a)),u=n(QDt(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 xgf(e){return!Cgf(e)}function Cgf(e){switch(e.getType()){case nu.ANY:case nu.UNKNOWN:case nu.OPTIONAL:case nu.OPTIONAL_NULLABLE:return!0;default:return!1}}var vgf,N6i=h(()=>{"use strict";mw();G2a();D6i();tF();zDt();R6i();EY();H2a();LDt();wj();F6i();vgf=Object.prototype.hasOwnProperty});function Z2a(e){return Flr(e)}var $2a=h(()=>{"use strict";N6i()});var j6i=h(()=>{"use strict";N6i();$2a();F6i()});function eNa(e){let t={...O6i(e),_getRawProperties:()=>BWe(e)._getRawProperties(),_getParsedProperties:()=>BWe(e)._getParsedProperties()};return{...t,...Kd(t),...d7(t),..._2e(t)}}var tNa=h(()=>{"use strict";j6i();LDt();wj();B6i()});var rNa=h(()=>{"use strict";B6i();tNa()});function Nlr(e){let t={parse:(r,n)=>nNa(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>nNa(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>nu.LIST};return{...hw(t),...Kd(t)}}function nNa(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 iNa=h(()=>{"use strict";mw();tF();EY();wj()});var Q6i=h(()=>{"use strict";iNa()});function oNa(e){return MS(nu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`${e.toString()}`)}]})()}var sNa=h(()=>{"use strict";mw();IY();tF()});function aNa(e){return MS(nu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Hd(r,`"${e}"`)}]})()}var cNa=h(()=>{"use strict";mw();IY();tF()});var uNa=h(()=>{"use strict";sNa();cNa()});var lNa,pNa=h(()=>{"use strict";mw();IY();lNa=MS(nu.ANY,e=>({ok:!0,value:e}))});var fNa,dNa=h(()=>{"use strict";mw();IY();tF();fNa=MS(nu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"boolean")}]})});var mNa,hNa=h(()=>{"use strict";mw();IY();mNa=MS(nu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var gNa,ANa=h(()=>{"use strict";mw();IY();tF();gNa=MS(nu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"number")}]})});var yNa,bNa=h(()=>{"use strict";mw();IY();tF();yNa=MS(nu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Hd(e,"string")}]})});var ENa,INa=h(()=>{"use strict";mw();IY();ENa=MS(nu.UNKNOWN,e=>({ok:!0,value:e}))});var vNa=h(()=>{"use strict";pNa();dNa();hNa();ANa();bNa();INa()});function xNa(e,t){let r={parse:(n,i)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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:()=>nu.RECORD};return{...hw(r),...Kd(r)}}function CNa(e,t){let r={parse:(n,i)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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)=>jlr({value:n,isKeyNumeric:e.getType()===nu.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:()=>nu.RECORD};return{...hw(r),...Kd(r)}}function jlr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!pue(e))return{ok:!1,errors:[{path:i,message:Hd(e,"object")}]};let o={},s=[];for(let a in e){if(!wgf.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 wgf,wNa=h(()=>{"use strict";mw();tF();zDt();EY();wj();wgf=Object.prototype.hasOwnProperty});var SNa=h(()=>{"use strict";wNa()});function TNa(e){let t=Nlr(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:()=>nu.SET};return{...hw(r),...Kd(r)}}var ONa=h(()=>{"use strict";mw();tF();EY();Q6i();wj()});var BNa=h(()=>{"use strict";ONa()});function DNa(e){let t={parse:(r,n)=>PNa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>PNa((i,o)=>i.json(r,o),e,n),getType:()=>nu.UNDISCRIMINATED_UNION};return{...hw(t),...Kd(t)}}function PNa(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 RNa=h(()=>{"use strict";mw();EY();wj()});var kNa=h(()=>{"use strict";RNa()});function FNa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var NNa=h(()=>{"use strict"});function QNa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=jDt(MDt(t)),o={parse:(s,a)=>jNa({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)=>jNa({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:()=>nu.UNION};return{...hw(o),...Kd(o),...d7(o)}}function jNa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!pue(e))return{ok:!1,errors:[{path:a,message:Hd(e,"object")}]};let c=e[t],u={};for(let f in e)Sgf.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 Sgf,zNa=h(()=>{"use strict";mw();tF();zDt();R6i();EY();T6i();LDt();wj();Sgf=Object.prototype.hasOwnProperty});var MNa=h(()=>{"use strict";NNa();zNa()});var LNa=h(()=>{"use strict";z2a();U2a();T6i();rNa();Q6i();uNa();j6i();LDt();vNa();SNa();wj();BNa();kNa();MNa()});var O={};Z(O,{JsonError:()=>TWe,ParseError:()=>OWe,any:()=>lNa,bigint:()=>j2a,boolean:()=>fNa,booleanLiteral:()=>oNa,date:()=>M2a,discriminant:()=>FNa,enum_:()=>jDt,forwardCompatibleEnum_:()=>V2a,getObjectLikeUtils:()=>d7,getObjectUtils:()=>_2e,getSchemaUtils:()=>Kd,isProperty:()=>fue,lazy:()=>q2a,lazyObject:()=>eNa,list:()=>Nlr,never:()=>mNa,number:()=>gNa,object:()=>Flr,objectWithoutOptionalProperties:()=>Z2a,optional:()=>w6i,partialRecord:()=>CNa,property:()=>J2a,record:()=>xNa,set:()=>TNa,string:()=>yNa,stringLiteral:()=>aNa,transform:()=>S6i,undiscriminatedUnion:()=>DNa,union:()=>QNa,unknown:()=>ENa,withParsedProperties:()=>k6i});var UNa=h(()=>{"use strict";LNa()});var VNa=h(()=>{"use strict"});var Qe=h(()=>{"use strict";D2a();R2a();k2a();UNa();VNa()});var Qlr,z6i=h(()=>{"use strict";Qe();Qlr=O.string()});var PWe,zlr=h(()=>{"use strict";Qe();PWe=O.string()});var M6i=h(()=>{"use strict";z6i();zlr()});var L6i={};Z(L6i,{AudienceDefinition:()=>Qlr,AudienceReference:()=>PWe});var _Na=h(()=>{"use strict";M6i()});var Zi,Gl=h(()=>{"use strict";Qe();Zi=O.objectWithoutOptionalProperties({docs:O.string().optional()})});var q2e,U6i=h(()=>{"use strict";Qe();q2e=O.objectWithoutOptionalProperties({unsafeName:O.string(),safeName:O.string()})});var DWe,Mlr=h(()=>{"use strict";Qe();U6i();DWe=O.objectWithoutOptionalProperties({originalName:O.string(),camelCase:q2e,pascalCase:q2e,snakeCase:q2e,screamingSnakeCase:q2e})});var Co,gf=h(()=>{"use strict";Qe();Mlr();Co=O.undiscriminatedUnion([O.string(),DWe])});var RWe,Llr=h(()=>{"use strict";Qe();RWe=O.string()});var DU,G2e=h(()=>{"use strict";Qe();Gl();Llr();DU=O.objectWithoutOptionalProperties({key:RWe}).extend(Zi)});var Sj,W2e=h(()=>{"use strict";Qe();Sj=O.string()});var Ulr,V6i=h(()=>{"use strict";Qe();gf();G2e();W2e();Ulr=O.objectWithoutOptionalProperties({username:Co,usernameEnvVar:Sj.optional(),usernameOmit:O.boolean().optional(),usernamePlaceholder:O.string().optional(),password:Co,passwordEnvVar:Sj.optional(),passwordOmit:O.boolean().optional(),passwordPlaceholder:O.string().optional()}).extend(DU)});var Vlr,_6i=h(()=>{"use strict";Qe();gf();G2e();W2e();Vlr=O.objectWithoutOptionalProperties({token:Co,tokenEnvVar:Sj.optional(),tokenPlaceholder:O.string().optional()}).extend(DU)});var gye,UDt=h(()=>{"use strict";Qe();gf();gye=O.objectWithoutOptionalProperties({wireValue:O.string(),name:Co})});var fs,Ed=h(()=>{"use strict";Qe();UDt();fs=O.undiscriminatedUnion([O.string(),gye])});var _lr,q6i=h(()=>{"use strict";Qe();Wo();Ed();G2e();W2e();_lr=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),prefix:O.string().optional(),headerEnvVar:Sj.optional(),headerPlaceholder:O.string().optional()}).extend(DU)});var due,VDt=h(()=>{"use strict";Qe();due=O.string()});var vY,kWe=h(()=>{"use strict";Qe();vY=O.string()});var xY,FWe=h(()=>{"use strict";Qe();xY=O.string()});var Aye,_Dt=h(()=>{"use strict";Qe();VDt();kWe();FWe();Aye=O.objectWithoutOptionalProperties({endpointId:due,serviceId:vY,subpackageId:xY.optional()})});var qlr,G6i=h(()=>{"use strict";Qe();qlr=O.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED","ALPHA","BETA","PREVIEW","LEGACY"])});var CY,NWe=h(()=>{"use strict";Qe();G6i();CY=O.objectWithoutOptionalProperties({status:qlr,message:O.string().optional()})});var Qx,m7=h(()=>{"use strict";Qe();NWe();Gl();Qx=O.objectWithoutOptionalProperties({availability:CY.optional()}).extend(Zi)});var qDt,W6i=h(()=>{"use strict";Qe();qDt=O.unknown()});var LS,wY=h(()=>{"use strict";Qe();W6i();LS=O.objectWithoutOptionalProperties({userSpecifiedExamples:O.record(O.string(),qDt),autogeneratedExamples:O.record(O.string(),qDt)})});var yye,GDt=h(()=>{"use strict";Qe();yye=O.enum_(["READ_ONLY","WRITE_ONLY"])});var NO,mue=h(()=>{"use strict";Qe();Wo();m7();Ed();wY();GDt();NO=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),propertyAccess:yye.optional(),defaultValue:O.unknown().optional(),v2Examples:LS.optional()}).extend(Qx)});var jWe,Glr=h(()=>{"use strict";Qe();Wo();gf();jWe=O.objectWithoutOptionalProperties({name:Co,type:O.lazy(()=>Ps)})});var f0,SY=h(()=>{"use strict";Qe();mue();Glr();f0=O.objectWithoutOptionalProperties({propertyPath:O.list(jWe).optional(),property:NO})});var Wlr,H6i=h(()=>{"use strict";Qe();SY();Wlr=O.objectWithoutOptionalProperties({responseProperty:f0,headerName:O.string(),valuePrefix:O.string().optional()})});var Hlr,K6i=h(()=>{"use strict";Qe();_Dt();SY();H6i();Hlr=O.objectWithoutOptionalProperties({endpoint:Aye,expiryProperty:f0.optional(),authenticatedRequestHeaders:O.list(Wlr)})});var Klr,J6i=h(()=>{"use strict";Qe();G2e();K6i();Klr=O.objectWithoutOptionalProperties({tokenEndpoint:Hlr}).extend(DU)});var Jlr,Y6i=h(()=>{"use strict";Qe();Jlr=O.enum_(["S256"])});var Ylr,X6i=h(()=>{"use strict";Qe();Y6i();Ylr=O.objectWithoutOptionalProperties({method:Jlr})});var QWe,Xlr=h(()=>{"use strict";Vr();Qe();W2e();QWe=O.union("type",{literal:O.object({value:O.string()}),environmentVariable:O.object({value:Sj})}).transform({transform:e=>{switch(e.type){case"literal":return i7.literal(e.value);case"environmentVariable":return i7.environmentVariable(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Zlr,Z6i=h(()=>{"use strict";Qe();X6i();Xlr();Zlr=O.objectWithoutOptionalProperties({clientId:QWe,authorizationUrl:O.string(),tokenUrl:O.string(),refreshUrl:O.string().optional(),redirectUri:O.string().optional(),redirectUriBackupPorts:O.list(O.number()).optional(),scopes:O.list(O.string()).optional(),pkce:Ylr,authorizationParameters:O.record(O.string(),O.string()).optional(),tokenParameters:O.record(O.string(),O.string()).optional(),refreshParameters:O.record(O.string(),O.string()).optional(),tokenHeader:O.string().optional(),tokenPrefix:O.string().optional()})});var zWe,$lr=h(()=>{"use strict";Qe();SY();zWe=O.objectWithoutOptionalProperties({accessToken:f0,expiresIn:f0.optional(),refreshToken:f0.optional()})});var RU,H2e=h(()=>{"use strict";Vr();Qe();RU=O.union("type",{string:O.object({string:O.string()}),boolean:O.object({boolean:O.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return p0.string(e.string);case"boolean":return p0.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t})});var bye,WDt=h(()=>{"use strict";Qe();Wo();m7();Ed();wY();H2e();bye=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),allowMultiple:O.boolean(),clientDefault:RU.optional(),defaultValue:O.unknown().optional(),v2Examples:LS.optional(),explode:O.boolean().optional()}).extend(Qx)});var epr,$6i=h(()=>{"use strict";Vr();Qe();mue();WDt();epr=O.union("type",{query:bye,body:NO}).transform({transform:e=>{switch(e.type){case"query":return DO.query(e);case"body":return DO.body(e);default:return e}},untransform:({_visit:e,...t})=>t})});var LP,K2e=h(()=>{"use strict";Qe();Glr();$6i();LP=O.objectWithoutOptionalProperties({propertyPath:O.list(jWe).optional(),property:epr})});var tpr,eLi=h(()=>{"use strict";Qe();K2e();tpr=O.objectWithoutOptionalProperties({refreshToken:LP})});var rpr,tLi=h(()=>{"use strict";Qe();_Dt();$lr();eLi();rpr=O.objectWithoutOptionalProperties({endpointReference:Aye,requestProperties:tpr,responseProperties:zWe})});var npr,rLi=h(()=>{"use strict";Qe();K2e();npr=O.objectWithoutOptionalProperties({clientId:LP,clientSecret:LP,scopes:LP.optional(),customProperties:O.list(LP).optional()})});var ipr,nLi=h(()=>{"use strict";Qe();_Dt();rLi();$lr();ipr=O.objectWithoutOptionalProperties({endpointReference:Aye,requestProperties:npr,responseProperties:zWe})});var opr,iLi=h(()=>{"use strict";Qe();W2e();tLi();nLi();opr=O.objectWithoutOptionalProperties({clientIdEnvVar:Sj.optional(),clientSecretEnvVar:Sj.optional(),tokenPrefix:O.string().optional(),tokenHeader:O.string().optional(),scopes:O.list(O.string()).optional(),tokenEndpoint:ipr,refreshEndpoint:rpr.optional()})});var spr,oLi=h(()=>{"use strict";Qe();Xlr();spr=O.objectWithoutOptionalProperties({clientId:QWe,deviceAuthorizationUrl:O.string(),tokenUrl:O.string(),refreshUrl:O.string().optional(),scopes:O.list(O.string()).optional(),deviceAuthorizationParameters:O.record(O.string(),O.string()).optional(),tokenParameters:O.record(O.string(),O.string()).optional(),refreshParameters:O.record(O.string(),O.string()).optional(),tokenHeader:O.string().optional(),tokenPrefix:O.string().optional()})});var apr,sLi=h(()=>{"use strict";Vr();Qe();Z6i();iLi();oLi();apr=O.union("type",{clientCredentials:opr,authorizationCode:Zlr,deviceCode:spr}).transform({transform:e=>{switch(e.type){case"clientCredentials":return jP.clientCredentials(e);case"authorizationCode":return jP.authorizationCode(e);case"deviceCode":return jP.deviceCode(e);default:return e}},untransform:({_visit:e,...t})=>t})});var cpr,aLi=h(()=>{"use strict";Qe();G2e();sLi();cpr=O.objectWithoutOptionalProperties({configuration:apr}).extend(DU)});var upr,cLi=h(()=>{"use strict";Vr();Qe();V6i();_6i();q6i();J6i();aLi();upr=O.union(O.discriminant("type","_type"),{bearer:Vlr,basic:Ulr,header:_lr,oauth:cpr,inferred:Klr}).transform({transform:e=>{switch(e.type){case"bearer":return yp.bearer(e);case"basic":return yp.basic(e);case"header":return yp.header(e);case"oauth":return yp.oauth(e);case"inferred":return yp.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var lpr,uLi=h(()=>{"use strict";Qe();lpr=O.enum_(["ALL","ANY","ENDPOINT_SECURITY"])});var ppr,lLi=h(()=>{"use strict";Qe();Gl();cLi();uLi();ppr=O.objectWithoutOptionalProperties({requirement:lpr,schemes:O.list(upr)}).extend(Zi)});var fpr,pLi=h(()=>{"use strict";Qe();fpr=O.string()});var fLi=h(()=>{"use strict";lLi();cLi();Llr();uLi();pLi();G2e();V6i();_6i();W2e();q6i();H6i();J6i();K6i();rLi();$lr();Z6i();iLi();sLi();oLi();X6i();Y6i();Xlr();tLi();eLi();aLi();nLi()});var dLi={};Z(dLi,{ApiAuth:()=>ppr,AuthScheme:()=>upr,AuthSchemeKey:()=>RWe,AuthSchemesRequirement:()=>lpr,AuthScope:()=>fpr,BaseAuthScheme:()=>DU,BasicAuthScheme:()=>Ulr,BearerAuthScheme:()=>Vlr,EnvironmentVariable:()=>Sj,HeaderAuthScheme:()=>_lr,InferredAuthScheme:()=>Klr,InferredAuthSchemeTokenEndpoint:()=>Hlr,InferredAuthenticatedRequestHeader:()=>Wlr,OAuthAccessTokenRequestProperties:()=>npr,OAuthAccessTokenResponseProperties:()=>zWe,OAuthAuthorizationCode:()=>Zlr,OAuthClientCredentials:()=>opr,OAuthConfiguration:()=>apr,OAuthDeviceCode:()=>spr,OAuthPkceConfiguration:()=>Ylr,OAuthPkceMethod:()=>Jlr,OAuthPublicClientId:()=>QWe,OAuthRefreshEndpoint:()=>rpr,OAuthRefreshTokenRequestProperties:()=>tpr,OAuthScheme:()=>cpr,OAuthTokenEndpoint:()=>ipr});var qNa=h(()=>{"use strict";fLi()});var Eye,HDt=h(()=>{"use strict";Qe();Eye=O.string()});var Iye,KDt=h(()=>{"use strict";Qe();Iye=O.string()});var dpr,mLi=h(()=>{"use strict";Qe();dpr=O.objectWithoutOptionalProperties({original:O.string()})});var JDt,hLi=h(()=>{"use strict";Qe();JDt=O.string()});var kU,J2e=h(()=>{"use strict";Qe();gf();kU=O.objectWithoutOptionalProperties({allParts:O.list(Co),packagePath:O.list(Co),file:Co.optional()})});var jO,hue=h(()=>{"use strict";Qe();jO=O.string()});var MWe,mpr=h(()=>{"use strict";Qe();MWe=O.string()});var hpr,gLi=h(()=>{"use strict";Qe();hpr=O.string()});var LWe,gpr=h(()=>{"use strict";Qe();LWe=O.string()});var FU,Y2e=h(()=>{"use strict";Qe();FU=O.objectWithoutOptionalProperties({contentType:O.string().optional()})});var vye,YDt=h(()=>{"use strict";Qe();NWe();Gl();vye=O.objectWithoutOptionalProperties({availability:CY.optional()}).extend(Zi)});var TY,UWe=h(()=>{"use strict";Qe();TY=O.objectWithoutOptionalProperties({jsonExample:O.unknown()})});var ALi=h(()=>{"use strict";NWe();G6i();m7();HDt();VDt();_Dt();KDt();mLi();hLi();J2e();Mlr();UDt();Ed();gf();U6i();kWe();FWe();hue();mpr();gLi();gpr();Y2e();Gl();YDt();UWe()});var yLi={};Z(yLi,{Availability:()=>CY,AvailabilityStatus:()=>qlr,Declaration:()=>Qx,DisplayName:()=>Eye,EndpointId:()=>due,EndpointReference:()=>Aye,ErrorId:()=>Iye,EscapedString:()=>dpr,FeatureId:()=>JDt,FernFilepath:()=>kU,Name:()=>DWe,NameAndWireValue:()=>gye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Co,SafeAndUnsafeString:()=>q2e,ServiceId:()=>vY,SubpackageId:()=>xY,TypeId:()=>jO,WebSocketChannelId:()=>LWe,WebhookGroupId:()=>MWe,WebhookId:()=>hpr,WithContentType:()=>FU,WithDocs:()=>Zi,WithDocsAndAvailability:()=>vye,WithJsonExample:()=>TY});var GNa=h(()=>{"use strict";ALi()});var Apr,bLi=h(()=>{"use strict";Qe();Ed();Apr=O.objectWithoutOptionalProperties({errorInstanceIdKey:fs})});var ELi=h(()=>{"use strict";bLi()});var ILi={};Z(ILi,{Constants:()=>Apr});var WNa=h(()=>{"use strict";ELi()});var X2e,vLi=h(()=>{"use strict";Qe();X2e=O.objectWithoutOptionalProperties({unsafeName:O.string(),safeName:O.string()})});var tA,nL=h(()=>{"use strict";Qe();vLi();tA=O.objectWithoutOptionalProperties({originalName:O.string(),camelCase:X2e,pascalCase:X2e,snakeCase:X2e,screamingSnakeCase:X2e})});var ypr,xLi=h(()=>{"use strict";Qe();nL();ypr=O.objectWithoutOptionalProperties({username:tA,usernameOmit:O.boolean().optional(),password:tA,passwordOmit:O.boolean().optional()})});var bpr,CLi=h(()=>{"use strict";Qe();nL();bpr=O.objectWithoutOptionalProperties({token:tA})});var AI,h7=h(()=>{"use strict";Qe();nL();AI=O.objectWithoutOptionalProperties({wireValue:O.string(),name:tA})});var Epr,wLi=h(()=>{"use strict";Qe();Epr=O.enum_(["READ_ONLY","WRITE_ONLY"])});var wg,Tj=h(()=>{"use strict";Qe();Wo();h7();wLi();wg=O.objectWithoutOptionalProperties({name:AI,typeReference:O.lazy(()=>d0.TypeReference),propertyAccess:Epr.optional(),variable:O.string().optional()})});var Ipr,SLi=h(()=>{"use strict";Qe();Tj();Ipr=O.objectWithoutOptionalProperties({header:wg})});var vpr,TLi=h(()=>{"use strict";Qe();Tj();vpr=O.objectWithoutOptionalProperties({parameters:O.list(wg).optional()})});var xpr,OLi=h(()=>{"use strict";Qe();nL();Tj();xpr=O.objectWithoutOptionalProperties({clientId:tA,clientSecret:tA,customProperties:O.list(wg).optional()})});var Cpr,BLi=h(()=>{"use strict";Vr();Qe();xLi();CLi();SLi();TLi();OLi();Cpr=O.union("type",{basic:ypr,bearer:bpr,header:Ipr,oauth:xpr,inferred:vpr}).transform({transform:e=>{switch(e.type){case"basic":return $t.Auth.basic(e);case"bearer":return $t.Auth.bearer(e);case"header":return $t.Auth.header(e);case"oauth":return $t.Auth.oauth(e);case"inferred":return $t.Auth.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var wpr,PLi=h(()=>{"use strict";Qe();wpr=O.objectWithoutOptionalProperties({username:O.string(),password:O.string()})});var Spr,DLi=h(()=>{"use strict";Qe();Spr=O.objectWithoutOptionalProperties({token:O.string()})});var Tpr,RLi=h(()=>{"use strict";Qe();Tpr=O.objectWithoutOptionalProperties({value:O.unknown()})});var Opr,kLi=h(()=>{"use strict";Qe();Opr=O.objectWithoutOptionalProperties({values:O.record(O.string(),O.unknown()).optional()})});var Bpr,FLi=h(()=>{"use strict";Qe();Bpr=O.objectWithoutOptionalProperties({clientId:O.string(),clientSecret:O.string(),customPropertyValues:O.record(O.string(),O.unknown()).optional()})});var Ppr,NLi=h(()=>{"use strict";Vr();Qe();PLi();DLi();RLi();kLi();FLi();Ppr=O.union("type",{basic:wpr,bearer:Spr,header:Tpr,oauth:Bpr,inferred:Opr}).transform({transform:e=>{switch(e.type){case"basic":return $t.AuthValues.basic(e);case"bearer":return $t.AuthValues.bearer(e);case"header":return $t.AuthValues.header(e);case"oauth":return $t.AuthValues.oauth(e);case"inferred":return $t.AuthValues.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var jLi=h(()=>{"use strict";BLi();NLi();xLi();PLi();CLi();DLi();SLi();RLi();TLi();kLi();OLi();FLi()});var QLi={};Z(QLi,{Auth:()=>Cpr,AuthValues:()=>Ppr,BasicAuth:()=>ypr,BasicAuthValues:()=>wpr,BearerAuth:()=>bpr,BearerAuthValues:()=>Spr,HeaderAuth:()=>Ipr,HeaderAuthValues:()=>Tpr,InferredAuth:()=>vpr,InferredAuthValues:()=>Opr,OAuth:()=>xpr,OAuthValues:()=>Bpr});var HNa=h(()=>{"use strict";jLi()});var Dpr,zLi=h(()=>{"use strict";Qe();Dpr=O.string()});var Rpr,MLi=h(()=>{"use strict";Qe();nL();Rpr=O.objectWithoutOptionalProperties({allParts:O.list(tA),packagePath:O.list(tA),file:tA.optional()})});var KNa,JNa=h(()=>{"use strict";Qe();h7();KNa=O.undiscriminatedUnion([O.string(),AI])});var YNa,XNa=h(()=>{"use strict";Qe();nL();YNa=O.undiscriminatedUnion([O.string(),tA])});var OY,VWe=h(()=>{"use strict";Qe();OY=O.string()});var _We,kpr=h(()=>{"use strict";Qe();_We=O.objectWithoutOptionalProperties({docs:O.string().optional()})});var LLi=h(()=>{"use strict";zLi();MLi();nL();h7();JNa();XNa();vLi();VWe();kpr()});var ULi={};Z(ULi,{EndpointId:()=>Dpr,FernFilepath:()=>Rpr,Name:()=>tA,NameAndWireValue:()=>AI,NameAndWireValueOrString:()=>KNa,NameOrString:()=>YNa,SafeAndUnsafeString:()=>X2e,TypeId:()=>OY,WithDocs:()=>_We});var ZNa=h(()=>{"use strict";LLi()});var UP,gue=h(()=>{"use strict";Qe();MLi();nL();UP=O.objectWithoutOptionalProperties({fernFilepath:Rpr,name:tA})});var VLi=h(()=>{"use strict";gue()});var _Li={};Z(_Li,{Declaration:()=>UP});var $Na=h(()=>{"use strict";VLi()});var qWe,Fpr=h(()=>{"use strict";Vr();Qe();Wo();qWe=O.union("type",{bytes:O.object({}),typeReference:O.object({value:O.lazy(()=>d0.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return $t.ReferencedRequestBodyType.bytes();case"typeReference":return $t.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Npr,qLi=h(()=>{"use strict";Qe();Tj();Fpr();Npr=O.objectWithoutOptionalProperties({pathParameters:O.list(wg).optional(),body:qWe.optional()})});var jpr,GLi=h(()=>{"use strict";Qe();jpr=O.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var GWe,Qpr=h(()=>{"use strict";Qe();GLi();GWe=O.objectWithoutOptionalProperties({method:jpr,path:O.string()})});var BY,WWe=h(()=>{"use strict";Qe();BY=O.string()});var xye,XDt=h(()=>{"use strict";Qe();xye=O.string()});var Cye,ZDt=h(()=>{"use strict";Qe();Cye=O.string()});var zpr,WLi=h(()=>{"use strict";Qe();XDt();ZDt();zpr=O.record(xye,Cye)});var Mpr,HLi=h(()=>{"use strict";Qe();WWe();WLi();Mpr=O.undiscriminatedUnion([BY,zpr])});var HWe,KLi=h(()=>{"use strict";Qe();HWe=O.record(O.string(),O.unknown())});var Lpr,JLi=h(()=>{"use strict";Qe();NLi();Qpr();HLi();KLi();Lpr=O.objectWithoutOptionalProperties({endpoint:GWe,baseUrl:O.property("baseURL",O.string().optional()),environment:Mpr.optional(),auth:Ppr.optional(),pathParameters:HWe.optional(),queryParameters:HWe.optional(),headers:HWe.optional(),requestBody:O.unknown().optional()})});var Upr,YLi=h(()=>{"use strict";Qe();JLi();Upr=O.objectWithoutOptionalProperties({id:O.string(),name:O.string().optional(),isUserSpecified:O.boolean().optional()}).extend(Lpr)});var Vpr,XLi=h(()=>{"use strict";Vr();Qe();h7();Tj();Vpr=O.union("type",{file:AI,fileArray:AI,bodyProperty:wg}).transform({transform:e=>{switch(e.type){case"file":return $t.FileUploadRequestBodyProperty.file(e);case"fileArray":return $t.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return $t.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _pr,ZLi=h(()=>{"use strict";Qe();XLi();_pr=O.objectWithoutOptionalProperties({properties:O.list(Vpr)})});var qpr,$Li=h(()=>{"use strict";Qe();nL();Fpr();qpr=O.objectWithoutOptionalProperties({bodyKey:tA,bodyType:qWe})});var Gpr,e3i=h(()=>{"use strict";Vr();Qe();Tj();ZLi();$Li();Gpr=O.union("type",{properties:O.object({value:O.list(wg)}),referenced:qpr,fileUpload:_pr}).transform({transform:e=>{switch(e.type){case"properties":return $t.InlinedRequestBody.properties(e.value);case"referenced":return $t.InlinedRequestBody.referenced(e);case"fileUpload":return $t.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Wpr,t3i=h(()=>{"use strict";Qe();Wpr=O.objectWithoutOptionalProperties({includePathParameters:O.boolean(),onlyPathParameters:O.boolean()})});var Hpr,r3i=h(()=>{"use strict";Qe();gue();Tj();e3i();t3i();Hpr=O.objectWithoutOptionalProperties({declaration:UP,pathParameters:O.list(wg).optional(),queryParameters:O.list(wg).optional(),headers:O.list(wg).optional(),body:Gpr.optional(),metadata:Wpr.optional()})});var Kpr,n3i=h(()=>{"use strict";Vr();Qe();qLi();r3i();Kpr=O.union("type",{body:Npr,inlined:Hpr}).transform({transform:e=>{switch(e.type){case"body":return $t.Request.body(e);case"inlined":return $t.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Jpr,i3i=h(()=>{"use strict";Vr();Qe();Jpr=O.union("type",{json:O.object({}),streaming:O.object({}),streamParameter:O.object({}),fileDownload:O.object({}),text:O.object({}),bytes:O.object({})}).transform({transform:e=>{switch(e.type){case"json":return $t.Response.json();case"streaming":return $t.Response.streaming();case"streamParameter":return $t.Response.streamParameter();case"fileDownload":return $t.Response.fileDownload();case"text":return $t.Response.text();case"bytes":return $t.Response.bytes();default:return e}},untransform:({_visit:e,...t})=>t})});var Ypr,o3i=h(()=>{"use strict";Qe();BLi();gue();YLi();Qpr();n3i();i3i();Ypr=O.objectWithoutOptionalProperties({auth:Cpr.optional(),declaration:UP,location:GWe,request:Kpr,response:Jpr,examples:O.list(Upr).optional()})});var s3i=h(()=>{"use strict";qLi();o3i();YLi();Qpr();ZLi();XLi();r3i();e3i();t3i();$Li();Fpr();n3i();i3i()});var a3i={};Z(a3i,{BodyRequest:()=>Npr,Endpoint:()=>Ypr,EndpointExample:()=>Upr,EndpointLocation:()=>GWe,FileUploadRequestBody:()=>_pr,FileUploadRequestBodyProperty:()=>Vpr,InlinedRequest:()=>Hpr,InlinedRequestBody:()=>Gpr,InlinedRequestMetadata:()=>Wpr,ReferencedRequestBody:()=>qpr,ReferencedRequestBodyType:()=>qWe,Request:()=>Kpr,Response:()=>Jpr});var eja=h(()=>{"use strict";s3i()});var Xpr,c3i=h(()=>{"use strict";Qe();nL();XDt();Xpr=O.objectWithoutOptionalProperties({id:xye,name:tA})});var Zpr,u3i=h(()=>{"use strict";Qe();nL();kpr();XDt();WWe();ZDt();Zpr=O.objectWithoutOptionalProperties({id:BY,name:tA,urls:O.record(xye,Cye)}).extend(_We)});var $pr,l3i=h(()=>{"use strict";Qe();c3i();u3i();$pr=O.objectWithoutOptionalProperties({baseUrls:O.list(Xpr),environments:O.list(Zpr)})});var efr,p3i=h(()=>{"use strict";Qe();nL();kpr();WWe();ZDt();efr=O.objectWithoutOptionalProperties({id:BY,name:tA,url:Cye}).extend(_We)});var tfr,f3i=h(()=>{"use strict";Qe();p3i();tfr=O.objectWithoutOptionalProperties({environments:O.list(efr)})});var rfr,d3i=h(()=>{"use strict";Vr();Qe();l3i();f3i();rfr=O.union("type",{singleBaseUrl:tfr,multipleBaseUrls:$pr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return $t.Environments.singleBaseUrl(e);case"multipleBaseUrls":return $t.Environments.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var nfr,m3i=h(()=>{"use strict";Qe();WWe();d3i();nfr=O.objectWithoutOptionalProperties({defaultEnvironment:BY.optional(),environments:rfr})});var h3i=h(()=>{"use strict";XDt();c3i();WWe();d3i();m3i();ZDt();HLi();u3i();l3i();WLi();p3i();f3i()});var g3i={};Z(g3i,{EnvironmentBaseUrlId:()=>xye,EnvironmentBaseUrlWithId:()=>Xpr,EnvironmentId:()=>BY,EnvironmentUrl:()=>Cye,EnvironmentValues:()=>Mpr,Environments:()=>rfr,EnvironmentsConfig:()=>nfr,MultipleBaseUrlsEnvironment:()=>Zpr,MultipleBaseUrlsEnvironments:()=>$pr,MultipleEnvironmentUrlValues:()=>zpr,SingleBaseUrlEnvironment:()=>efr,SingleBaseUrlEnvironments:()=>tfr});var tja=h(()=>{"use strict";h3i()});var A3i=h(()=>{"use strict";GLi()});var y3i={};Z(y3i,{HttpMethod:()=>jpr});var rja=h(()=>{"use strict";A3i()});var ifr,b3i=h(()=>{"use strict";Qe();ifr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var ofr,E3i=h(()=>{"use strict";Qe();ofr=O.enum_(["explicit","auto"])});var KWe,sfr=h(()=>{"use strict";Qe();KWe=O.string()});var afr,I3i=h(()=>{"use strict";Qe();afr=O.enum_(["header","query","body","path"])});var JWe,cfr=h(()=>{"use strict";Qe();Wo();Ed();Gl();H2e();E3i();sfr();I3i();JWe=O.objectWithoutOptionalProperties({id:KWe,name:fs,location:afr,target:O.string(),valueType:O.lazy(()=>Ps),env:O.string().optional(),clientDefault:RU.optional(),optional:O.boolean().optional(),apply:ofr.optional()}).extend(Zi)});var ufr,v3i=h(()=>{"use strict";Qe();Wo();gue();ufr=O.objectWithoutOptionalProperties({declaration:UP,typeReference:O.lazy(()=>d0.TypeReference)})});var lfr,x3i=h(()=>{"use strict";Qe();h7();Tj();lfr=O.objectWithoutOptionalProperties({discriminantValue:AI,properties:O.list(wg).optional()})});var pfr,C3i=h(()=>{"use strict";Qe();h7();VWe();Tj();pfr=O.objectWithoutOptionalProperties({typeId:OY,discriminantValue:AI,properties:O.list(wg)})});var ffr,w3i=h(()=>{"use strict";Qe();Wo();h7();Tj();ffr=O.objectWithoutOptionalProperties({typeReference:O.lazy(()=>d0.TypeReference),discriminantValue:AI,properties:O.list(wg).optional()})});var dfr,S3i=h(()=>{"use strict";Vr();Qe();x3i();C3i();w3i();dfr=O.union("type",{samePropertiesAsObject:pfr,singleProperty:ffr,noProperties:lfr}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return $t.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return $t.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return $t.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mfr,T3i=h(()=>{"use strict";Qe();h7();gue();S3i();mfr=O.objectWithoutOptionalProperties({declaration:UP,discriminant:AI,types:O.record(O.string(),dfr),inheritedBaseProperties:O.list(AI).optional()})});var hfr,O3i=h(()=>{"use strict";Qe();h7();gue();hfr=O.objectWithoutOptionalProperties({declaration:UP,values:O.list(AI)})});var gfr,B3i=h(()=>{"use strict";Qe();h7();VWe();gue();Tj();gfr=O.objectWithoutOptionalProperties({declaration:UP,properties:O.list(wg),extends:O.list(OY).optional(),additionalProperties:O.boolean().optional(),deferredUnionBaseProperties:O.list(AI).optional()})});var Afr,P3i=h(()=>{"use strict";Qe();Wo();gue();Afr=O.objectWithoutOptionalProperties({declaration:UP,types:O.list(O.lazy(()=>d0.TypeReference))})});var yfr,D3i=h(()=>{"use strict";Vr();Qe();v3i();T3i();O3i();B3i();P3i();yfr=O.union("type",{alias:ufr,enum:hfr,object:gfr,discriminatedUnion:mfr,undiscriminatedUnion:Afr}).transform({transform:e=>{switch(e.type){case"alias":return $t.NamedType.alias(e);case"enum":return $t.NamedType.enum(e);case"object":return $t.NamedType.object(e);case"discriminatedUnion":return $t.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return $t.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var bfr,R3i=h(()=>{"use strict";Qe();Wo();Mlr();bfr=O.objectWithoutOptionalProperties({id:O.string(),name:DWe,typeReference:O.lazy(()=>d0.TypeReference)})});var Efr,k3i=h(()=>{"use strict";Qe();Efr=O.objectWithoutOptionalProperties({version:O.string(),repoUrl:O.string()})});var Ifr,F3i=h(()=>{"use strict";Qe();Ifr=O.objectWithoutOptionalProperties({version:O.string(),coordinate:O.string(),repoUrl:O.string().optional()})});var vfr,N3i=h(()=>{"use strict";Qe();vfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var xfr,j3i=h(()=>{"use strict";Qe();xfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var Cfr,Q3i=h(()=>{"use strict";Qe();Cfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var wfr,z3i=h(()=>{"use strict";Qe();wfr=O.objectWithoutOptionalProperties({version:O.string(),packageName:O.string(),repoUrl:O.string().optional()})});var Sfr,M3i=h(()=>{"use strict";Qe();Sfr=O.objectWithoutOptionalProperties({version:O.string(),repoUrl:O.string()})});var Tfr,L3i=h(()=>{"use strict";Vr();Qe();b3i();k3i();F3i();N3i();j3i();Q3i();z3i();M3i();Tfr=O.union("type",{go:Efr,swift:Sfr,maven:Ifr,npm:vfr,nuget:xfr,pypi:Cfr,rubygems:wfr,crates:ifr}).transform({transform:e=>{switch(e.type){case"go":return $t.PublishInfo.go(e);case"swift":return $t.PublishInfo.swift(e);case"maven":return $t.PublishInfo.maven(e);case"npm":return $t.PublishInfo.npm(e);case"nuget":return $t.PublishInfo.nuget(e);case"pypi":return $t.PublishInfo.pypi(e);case"rubygems":return $t.PublishInfo.rubygems(e);case"crates":return $t.PublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Ofr,U3i=h(()=>{"use strict";Vr();Qe();L3i();Ofr=O.union("type",{publish:O.object({value:Tfr}),local:O.object({})}).transform({transform:e=>{switch(e.type){case"publish":return $t.GeneratorOutputConfig.publish(e.value);case"local":return $t.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t})});var Bfr,V3i=h(()=>{"use strict";Qe();U3i();Bfr=O.objectWithoutOptionalProperties({apiName:O.string(),organization:O.string(),customConfig:O.unknown(),outputConfig:Ofr})});var Pfr,_3i=h(()=>{"use strict";Qe();cfr();zLi();VWe();o3i();m3i();Tj();D3i();R3i();V3i();Pfr=O.objectWithoutOptionalProperties({version:O.stringLiteral("1.0.0"),types:O.record(OY,yfr),endpoints:O.record(Dpr,Ypr),environments:nfr.optional(),headers:O.list(wg).optional(),pathParameters:O.list(wg).optional(),variables:O.list(bfr).optional(),globalParameters:O.list(JWe).optional(),generatorConfig:Bfr.optional()})});var q3i=h(()=>{"use strict";b3i();_3i();V3i();U3i();k3i();F3i();N3i();j3i();L3i();Q3i();z3i();M3i()});var G3i={};Z(G3i,{CratesPublishInfo:()=>ifr,DynamicIntermediateRepresentation:()=>Pfr,GeneratorConfig:()=>Bfr,GeneratorOutputConfig:()=>Ofr,GoPublishInfo:()=>Efr,MavenPublishInfo:()=>Ifr,NpmPublishInfo:()=>vfr,NugetPublishInfo:()=>xfr,PublishInfo:()=>Tfr,PypiPublishInfo:()=>Cfr,RubyGemsPublishInfo:()=>wfr,SwiftPublishInfo:()=>Sfr});var nja=h(()=>{"use strict";q3i()});var Dfr,W3i=h(()=>{"use strict";Qe();Dfr=O.enum_(["CRITICAL","WARNING"])});var Rfr,H3i=h(()=>{"use strict";Qe();W3i();Rfr=O.objectWithoutOptionalProperties({severity:Dfr,message:O.string()})});var ija,oja=h(()=>{"use strict";Qe();H3i();ija=O.objectWithoutOptionalProperties({snippet:O.string(),errors:O.list(Rfr).optional()})});var K3i=h(()=>{"use strict";JLi();oja();H3i();W3i();KLi()});var J3i={};Z(J3i,{EndpointSnippetRequest:()=>Lpr,EndpointSnippetResponse:()=>ija,ErrorSeverity:()=>Dfr,Error_:()=>Rfr,Values:()=>HWe});var sja=h(()=>{"use strict";K3i()});var kfr,Y3i=h(()=>{"use strict";Vr();Qe();kfr=O.union("type",{boolean:O.object({value:O.boolean()}),string:O.object({value:O.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return $t.LiteralType.boolean(e.value);case"string":return $t.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var aja,cja=h(()=>{"use strict";Qe();Wo();aja=O.objectWithoutOptionalProperties({key:O.lazy(()=>d0.TypeReference),value:O.lazy(()=>d0.TypeReference)})});var Ffr,X3i=h(()=>{"use strict";Qe();Ffr=O.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var uja,lja=h(()=>{"use strict";Vr();Qe();Wo();VWe();Y3i();X3i();uja=O.union("type",{list:O.object({value:O.lazy(()=>d0.TypeReference)}),literal:O.object({value:kfr}),map:O.lazyObject(()=>d0.MapType),named:O.object({value:OY}),nullable:O.object({value:O.lazy(()=>d0.TypeReference)}),optional:O.object({value:O.lazy(()=>d0.TypeReference)}),primitive:O.object({value:Ffr}),set:O.object({value:O.lazy(()=>d0.TypeReference)}),unknown:O.object({})}).transform({transform:e=>{switch(e.type){case"list":return $t.TypeReference.list(e.value);case"literal":return $t.TypeReference.literal(e.value);case"map":return $t.TypeReference.map(e);case"named":return $t.TypeReference.named(e.value);case"nullable":return $t.TypeReference.nullable(e.value);case"optional":return $t.TypeReference.optional(e.value);case"primitive":return $t.TypeReference.primitive(e.value);case"set":return $t.TypeReference.set(e.value);case"unknown":return $t.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var Z3i=h(()=>{"use strict";v3i();T3i();O3i();Y3i();cja();Tj();D3i();wLi();B3i();X3i();S3i();x3i();C3i();w3i();lja();P3i()});var $3i={};Z($3i,{AliasType:()=>ufr,DiscriminatedUnionType:()=>mfr,EnumType:()=>hfr,LiteralType:()=>kfr,MapType:()=>aja,NamedParameter:()=>wg,NamedType:()=>yfr,ObjectPropertyAccess:()=>Epr,ObjectType:()=>gfr,PrimitiveTypeV1:()=>Ffr,SingleDiscriminatedUnionType:()=>dfr,SingleDiscriminatedUnionTypeNoProperties:()=>lfr,SingleDiscriminatedUnionTypeObject:()=>pfr,SingleDiscriminatedUnionTypeSingleProperty:()=>ffr,TypeReference:()=>uja,UndiscriminatedUnionType:()=>Afr});var pja=h(()=>{"use strict";Z3i()});var e4i=h(()=>{"use strict";R3i()});var t4i={};Z(t4i,{VariableDeclaration:()=>bfr});var fja=h(()=>{"use strict";e4i()});var dja=h(()=>{"use strict";HNa();jLi();ZNa();LLi();$Na();VLi();eja();s3i();tja();h3i();rja();A3i();nja();q3i();sja();K3i();pja();Z3i();fja();e4i()});var d0={};Z(d0,{AliasType:()=>ufr,Auth:()=>Cpr,AuthValues:()=>Ppr,BasicAuth:()=>ypr,BasicAuthValues:()=>wpr,BearerAuth:()=>bpr,BearerAuthValues:()=>Spr,BodyRequest:()=>Npr,CratesPublishInfo:()=>ifr,Declaration:()=>UP,DiscriminatedUnionType:()=>mfr,DynamicIntermediateRepresentation:()=>Pfr,Endpoint:()=>Ypr,EndpointExample:()=>Upr,EndpointId:()=>Dpr,EndpointLocation:()=>GWe,EndpointSnippetRequest:()=>Lpr,EndpointSnippetResponse:()=>ija,EnumType:()=>hfr,EnvironmentBaseUrlId:()=>xye,EnvironmentBaseUrlWithId:()=>Xpr,EnvironmentId:()=>BY,EnvironmentUrl:()=>Cye,EnvironmentValues:()=>Mpr,Environments:()=>rfr,EnvironmentsConfig:()=>nfr,ErrorSeverity:()=>Dfr,Error_:()=>Rfr,FernFilepath:()=>Rpr,FileUploadRequestBody:()=>_pr,FileUploadRequestBodyProperty:()=>Vpr,GeneratorConfig:()=>Bfr,GeneratorOutputConfig:()=>Ofr,GoPublishInfo:()=>Efr,HeaderAuth:()=>Ipr,HeaderAuthValues:()=>Tpr,HttpMethod:()=>jpr,InferredAuth:()=>vpr,InferredAuthValues:()=>Opr,InlinedRequest:()=>Hpr,InlinedRequestBody:()=>Gpr,InlinedRequestMetadata:()=>Wpr,LiteralType:()=>kfr,MapType:()=>aja,MavenPublishInfo:()=>Ifr,MultipleBaseUrlsEnvironment:()=>Zpr,MultipleBaseUrlsEnvironments:()=>$pr,MultipleEnvironmentUrlValues:()=>zpr,Name:()=>tA,NameAndWireValue:()=>AI,NameAndWireValueOrString:()=>KNa,NameOrString:()=>YNa,NamedParameter:()=>wg,NamedType:()=>yfr,NpmPublishInfo:()=>vfr,NugetPublishInfo:()=>xfr,OAuth:()=>xpr,OAuthValues:()=>Bpr,ObjectPropertyAccess:()=>Epr,ObjectType:()=>gfr,PrimitiveTypeV1:()=>Ffr,PublishInfo:()=>Tfr,PypiPublishInfo:()=>Cfr,ReferencedRequestBody:()=>qpr,ReferencedRequestBodyType:()=>qWe,Request:()=>Kpr,Response:()=>Jpr,RubyGemsPublishInfo:()=>wfr,SafeAndUnsafeString:()=>X2e,SingleBaseUrlEnvironment:()=>efr,SingleBaseUrlEnvironments:()=>tfr,SingleDiscriminatedUnionType:()=>dfr,SingleDiscriminatedUnionTypeNoProperties:()=>lfr,SingleDiscriminatedUnionTypeObject:()=>pfr,SingleDiscriminatedUnionTypeSingleProperty:()=>ffr,SwiftPublishInfo:()=>Sfr,TypeId:()=>OY,TypeReference:()=>uja,UndiscriminatedUnionType:()=>Afr,Values:()=>HWe,VariableDeclaration:()=>bfr,WithDocs:()=>_We,auth:()=>QLi,commons:()=>ULi,declaration:()=>_Li,endpoints:()=>a3i,environment:()=>g3i,http:()=>y3i,ir:()=>G3i,snippets:()=>J3i,types:()=>$3i,variables:()=>t4i});var mja=h(()=>{"use strict";dja()});var VP,Z2e=h(()=>{"use strict";Qe();VP=O.string()});var Nfr,r4i=h(()=>{"use strict";Qe();gf();Z2e();Nfr=O.objectWithoutOptionalProperties({id:VP,name:Co})});var PY,YWe=h(()=>{"use strict";Qe();PY=O.string()});var wye,$Dt=h(()=>{"use strict";Qe();wye=O.string()});var XWe,jfr=h(()=>{"use strict";Qe();gf();XWe=O.objectWithoutOptionalProperties({id:O.string(),name:Co,default:O.string().optional(),values:O.list(O.string()).optional()})});var Qfr,n4i=h(()=>{"use strict";Qe();gf();Gl();Z2e();YWe();$Dt();jfr();Qfr=O.objectWithoutOptionalProperties({id:PY,name:Co,urls:O.record(VP,wye),audiences:O.list(O.string()).optional(),defaultUrls:O.record(VP,O.string()).optional(),urlTemplates:O.record(VP,O.string()).optional(),urlVariables:O.record(VP,O.list(XWe)).optional()}).extend(Zi)});var zfr,i4i=h(()=>{"use strict";Qe();r4i();n4i();zfr=O.objectWithoutOptionalProperties({baseUrls:O.list(Nfr),environments:O.list(Qfr)})});var Mfr,o4i=h(()=>{"use strict";Qe();gf();Gl();YWe();$Dt();jfr();Mfr=O.objectWithoutOptionalProperties({id:PY,name:Co,url:wye,audiences:O.list(O.string()).optional(),defaultUrl:O.string().optional(),urlTemplate:O.string().optional(),urlVariables:O.list(XWe).optional()}).extend(Zi)});var Lfr,s4i=h(()=>{"use strict";Qe();o4i();Lfr=O.objectWithoutOptionalProperties({environments:O.list(Mfr)})});var Ufr,a4i=h(()=>{"use strict";Vr();Qe();i4i();s4i();Ufr=O.union("type",{singleBaseUrl:Lfr,multipleBaseUrls:zfr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return u0.singleBaseUrl(e);case"multipleBaseUrls":return u0.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Vfr,c4i=h(()=>{"use strict";Qe();YWe();a4i();Vfr=O.objectWithoutOptionalProperties({defaultEnvironment:PY.optional(),environments:Ufr})});var u4i=h(()=>{"use strict";Z2e();r4i();YWe();a4i();c4i();$Dt();n4i();i4i();jfr();o4i();s4i()});var l4i={};Z(l4i,{EnvironmentBaseUrlId:()=>VP,EnvironmentBaseUrlWithId:()=>Nfr,EnvironmentId:()=>PY,EnvironmentUrl:()=>wye,Environments:()=>Ufr,EnvironmentsConfig:()=>Vfr,MultipleBaseUrlsEnvironment:()=>Qfr,MultipleBaseUrlsEnvironments:()=>zfr,ServerVariable:()=>XWe,SingleBaseUrlEnvironment:()=>Mfr,SingleBaseUrlEnvironments:()=>Lfr});var hja=h(()=>{"use strict";u4i()});var Sye,eRt=h(()=>{"use strict";Qe();KDt();J2e();gf();Sye=O.objectWithoutOptionalProperties({errorId:Iye,fernFilepath:kU,name:Co})});var US,Aue=h(()=>{"use strict";Qe();Wo();m7();Ed();wY();H2e();US=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),env:O.string().optional(),clientDefault:RU.optional(),defaultValue:O.unknown().optional(),v2Examples:LS.optional()}).extend(Qx)});var _fr,p4i=h(()=>{"use strict";Qe();Wo();gf();Gl();UWe();_fr=O.objectWithoutOptionalProperties({name:Co.optional(),shape:O.lazyObject(()=>qc)}).extend(TY).extend(Zi)});var qfr,f4i=h(()=>{"use strict";Qe();Wo();Ed();Gl();wY();Aue();eRt();p4i();qfr=O.objectWithoutOptionalProperties({name:Sye,displayName:O.string().optional(),discriminantValue:fs,type:O.lazy(()=>Ps).optional(),statusCode:O.number(),isWildcardStatusCode:O.boolean().optional(),examples:O.list(_fr),v2Examples:LS.optional(),headers:O.list(US).optional()}).extend(Zi)});var gja,Aja=h(()=>{"use strict";Vr();Qe();Ed();gja=O.union("type",{property:O.object({value:fs}),statusCode:O.object({})}).transform({transform:e=>{switch(e.type){case"property":return dye.property(e.value);case"statusCode":return dye.statusCode();default:return e}},untransform:({_visit:e,...t})=>t})});var d4i=h(()=>{"use strict";eRt();f4i();Aja();p4i()});var m4i={};Z(m4i,{DeclaredErrorName:()=>Sye,ErrorDeclaration:()=>qfr,ErrorDeclarationDiscriminantValue:()=>gja,ExampleError:()=>_fr});var yja=h(()=>{"use strict";d4i()});var Gfr,h4i=h(()=>{"use strict";Qe();Gfr=O.objectWithoutOptionalProperties({username:O.string(),password:O.string()})});var Wfr,g4i=h(()=>{"use strict";Qe();Wfr=O.objectWithoutOptionalProperties({token:O.string()})});var Hfr,A4i=h(()=>{"use strict";Qe();Hfr=O.objectWithoutOptionalProperties({value:O.unknown()})});var Kfr,y4i=h(()=>{"use strict";Qe();Z2e();$Dt();Kfr=O.record(VP,wye)});var Jfr,b4i=h(()=>{"use strict";Qe();Jfr=O.objectWithoutOptionalProperties({clientId:O.string(),clientSecret:O.string()})});var ZWe,Yfr=h(()=>{"use strict";Vr();Qe();h4i();g4i();A4i();b4i();ZWe=O.union("type",{basic:Gfr,bearer:Wfr,header:Hfr,oauth:Jfr}).transform({transform:e=>{switch(e.type){case"basic":return TU.basic(e);case"bearer":return TU.bearer(e);case"header":return TU.header(e);case"oauth":return TU.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Xfr,E4i=h(()=>{"use strict";Qe();Xfr=O.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var Zfr,I4i=h(()=>{"use strict";Qe();E4i();Zfr=O.objectWithoutOptionalProperties({method:Xfr,path:O.string()})});var $We,$fr=h(()=>{"use strict";Qe();YWe();y4i();$We=O.undiscriminatedUnion([PY,Kfr])});var edr,v4i=h(()=>{"use strict";Qe();Gl();edr=O.objectWithoutOptionalProperties({name:O.string().optional(),language:O.string(),code:O.string()}).extend(Zi)});var DY,tdr=h(()=>{"use strict";Qe();DY=O.record(O.string(),O.unknown())});var rdr,x4i=h(()=>{"use strict";Qe();Gl();Yfr();I4i();$fr();tdr();rdr=O.objectWithoutOptionalProperties({endpoint:Zfr,baseUrl:O.property("baseURL",O.string().optional()),environment:$We.optional(),auth:ZWe.optional(),pathParameters:DY.optional(),queryParameters:DY.optional(),headers:DY.optional(),requestBody:O.unknown().optional()}).extend(Zi)});var ndr,C4i=h(()=>{"use strict";Vr();Qe();ndr=O.union("type",{error:O.object({value:O.unknown()}),json:O.object({value:O.unknown()}),stream:O.object({value:O.list(O.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return Nx.error(e.value);case"json":return Nx.json(e.value);case"stream":return Nx.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var idr,w4i=h(()=>{"use strict";Qe();Gl();C4i();idr=O.objectWithoutOptionalProperties({statusCode:O.number().optional(),body:ndr.optional()}).extend(Zi)});var tRt,S4i=h(()=>{"use strict";Qe();v4i();x4i();w4i();tRt=O.objectWithoutOptionalProperties({displayName:O.string().optional(),contentType:O.string().optional(),request:rdr.optional(),response:idr.optional(),codeSamples:O.list(edr).optional()})});var odr,T4i=h(()=>{"use strict";Qe();S4i();odr=O.objectWithoutOptionalProperties({userSpecifiedExamples:O.record(O.string(),tRt),autogeneratedExamples:O.record(O.string(),tRt)})});var rRt,O4i=h(()=>{"use strict";Qe();rRt=O.objectWithoutOptionalProperties({name:O.string().optional(),payload:O.unknown()})});var sdr,B4i=h(()=>{"use strict";Qe();O4i();sdr=O.objectWithoutOptionalProperties({userSpecifiedExamples:O.record(O.string(),rRt),autogeneratedExamples:O.record(O.string(),rRt)})});var adr,P4i=h(()=>{"use strict";Qe();adr=O.objectWithoutOptionalProperties({path:O.string()})});var cdr,D4i=h(()=>{"use strict";Qe();cdr=O.objectWithoutOptionalProperties({type:O.string(),body:O.unknown()})});var nRt,R4i=h(()=>{"use strict";Qe();Yfr();$fr();tdr();P4i();D4i();nRt=O.objectWithoutOptionalProperties({channel:adr,baseUrl:O.property("baseURL",O.string().optional()),environment:$We.optional(),auth:ZWe.optional(),pathParameters:DY.optional(),queryParameters:DY.optional(),headers:DY.optional(),messages:O.list(cdr).optional()})});var udr,k4i=h(()=>{"use strict";Qe();R4i();udr=O.objectWithoutOptionalProperties({autogeneratedExamples:O.record(O.string(),nRt),userSpecifiedExamples:O.record(O.string(),nRt)})});var ny,Oj=h(()=>{"use strict";Qe();wY();ny=O.objectWithoutOptionalProperties({v2Examples:LS.optional()})});var F4i=h(()=>{"use strict";h4i();g4i();A4i();y4i();b4i();Yfr();I4i();E4i();$fr();v4i();S4i();T4i();x4i();w4i();C4i();W6i();wY();tdr();O4i();B4i();P4i();D4i();R4i();k4i();Oj()});var N4i={};Z(N4i,{BasicAuthValues:()=>Gfr,BearerAuthValues:()=>Wfr,HeaderAuthValues:()=>Hfr,MultipleEnvironmentUrlValues:()=>Kfr,OAuthValues:()=>Jfr,V2AuthValues:()=>ZWe,V2EndpointLocation:()=>Zfr,V2EndpointLocationHttpMethod:()=>Xfr,V2EnvironmentValues:()=>$We,V2HttpEndpointCodeSample:()=>edr,V2HttpEndpointExample:()=>tRt,V2HttpEndpointExamples:()=>odr,V2HttpEndpointRequest:()=>rdr,V2HttpEndpointResponse:()=>idr,V2HttpEndpointResponseBody:()=>ndr,V2SchemaExample:()=>qDt,V2SchemaExamples:()=>LS,V2ValueExamples:()=>DY,V2WebSocketEndpointLocation:()=>adr,V2WebSocketMessageExample:()=>cdr,V2WebSocketSessionExample:()=>nRt,V2WebSocketSessionExamples:()=>udr,V2WebhookExample:()=>rRt,V2WebhookExamples:()=>sdr,WithV2Examples:()=>ny});var bja=h(()=>{"use strict";F4i()});var ldr,j4i=h(()=>{"use strict";Qe();ldr=O.enum_(["MIT","Apache-2.0"])});var pdr,Q4i=h(()=>{"use strict";Qe();j4i();pdr=O.objectWithoutOptionalProperties({id:ldr})});var hE,RY=h(()=>{"use strict";Qe();hE=O.string()});var fdr,z4i=h(()=>{"use strict";Qe();RY();fdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),tokenEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var eHe,ddr=h(()=>{"use strict";Qe();eHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),token:O.string(),packageName:O.string()})});var mdr,M4i=h(()=>{"use strict";Qe();mdr=O.objectWithoutOptionalProperties({filename:O.string()})});var hdr,L4i=h(()=>{"use strict";Qe();hdr=O.objectWithoutOptionalProperties({coordinatorUrl:O.string(),coordinatorUrlV2:O.string(),id:O.string()})});var gdr,U4i=h(()=>{"use strict";Vr();Qe();L4i();gdr=O.union(O.discriminant("type","_type"),{local:O.object({}),remote:hdr}).transform({transform:e=>{switch(e.type){case"local":return rc.GeneratorEnvironment.local();case"remote":return rc.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tHe,Adr=h(()=>{"use strict";Qe();tHe=O.objectWithoutOptionalProperties({keyId:O.string(),password:O.string(),secretKey:O.string()})});var rHe,ydr=h(()=>{"use strict";Qe();Adr();rHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),username:O.string(),password:O.string(),coordinate:O.string(),signature:tHe.optional()})});var nHe,bdr=h(()=>{"use strict";Qe();nHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),token:O.string(),packageName:O.string()})});var iHe,Edr=h(()=>{"use strict";Qe();iHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),apiKey:O.string(),packageName:O.string()})});var Idr,V4i=h(()=>{"use strict";Qe();Idr=O.objectWithoutOptionalProperties({apiKey:O.string(),workspaceId:O.string()})});var vdr,_4i=h(()=>{"use strict";Qe();vdr=O.objectWithoutOptionalProperties({name:O.string(),email:O.string()})});var xdr,q4i=h(()=>{"use strict";Qe();_4i();xdr=O.objectWithoutOptionalProperties({description:O.string().optional(),authors:O.list(vdr).optional()})});var oHe,Cdr=h(()=>{"use strict";Qe();q4i();oHe=O.objectWithoutOptionalProperties({keywords:O.list(O.string()).optional(),documentationLink:O.string().optional(),homepageLink:O.string().optional()}).extend(xdr)});var sHe,wdr=h(()=>{"use strict";Qe();Cdr();sHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),username:O.string(),password:O.string(),packageName:O.string(),pypiMetadata:oHe.optional()})});var aHe,Sdr=h(()=>{"use strict";Qe();aHe=O.objectWithoutOptionalProperties({registryUrl:O.string(),apiKey:O.string(),packageName:O.string()})});var Tdr,G4i=h(()=>{"use strict";Vr();Qe();ddr();ydr();bdr();Edr();V4i();wdr();Sdr();Tdr=O.union("type",{maven:rHe,npm:nHe,pypi:sHe,postman:Idr,rubygems:aHe,nuget:iHe,crates:eHe}).transform({transform:e=>{switch(e.type){case"maven":return rc.GeneratorPublishTarget.maven(e);case"npm":return rc.GeneratorPublishTarget.npm(e);case"pypi":return rc.GeneratorPublishTarget.pypi(e);case"postman":return rc.GeneratorPublishTarget.postman(e);case"rubygems":return rc.GeneratorPublishTarget.rubygems(e);case"nuget":return rc.GeneratorPublishTarget.nuget(e);case"crates":return rc.GeneratorPublishTarget.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Odr,W4i=h(()=>{"use strict";Qe();Adr();Odr=O.objectWithoutOptionalProperties({registryUrl:O.string(),username:O.string(),password:O.string(),group:O.string(),signature:tHe.optional()})});var Bdr,H4i=h(()=>{"use strict";Qe();Bdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),token:O.string(),scope:O.string()})});var Pdr,K4i=h(()=>{"use strict";Qe();W4i();H4i();Pdr=O.objectWithoutOptionalProperties({maven:Odr,npm:Bdr})});var Ddr,J4i=h(()=>{"use strict";Qe();ddr();ydr();bdr();Edr();wdr();Sdr();Ddr=O.objectWithoutOptionalProperties({maven:rHe,npm:nHe,pypi:sHe,rubygems:aHe,nuget:iHe,crates:eHe})});var cHe,Rdr=h(()=>{"use strict";Qe();G4i();K4i();J4i();cHe=O.objectWithoutOptionalProperties({registries:Pdr,registriesV2:Ddr,publishTarget:Tdr.optional(),version:O.string()})});var kdr,Y4i=h(()=>{"use strict";Qe();RY();kdr=O.objectWithoutOptionalProperties({keyIdEnvironmentVariable:hE,passwordEnvironmentVariable:hE,secretKeyEnvironmentVariable:hE})});var Fdr,X4i=h(()=>{"use strict";Qe();RY();Y4i();Fdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),coordinate:O.string(),usernameEnvironmentVariable:hE,passwordEnvironmentVariable:hE,signature:kdr.optional(),shouldGeneratePublishWorkflow:O.boolean().optional()})});var Ndr,Z4i=h(()=>{"use strict";Qe();RY();Ndr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),tokenEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var jdr,$4i=h(()=>{"use strict";Qe();RY();jdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),apiKeyEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var Qdr,eUi=h(()=>{"use strict";Qe();RY();Qdr=O.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:hE,workspaceIdEnvironmentVariable:hE})});var zdr,tUi=h(()=>{"use strict";Qe();RY();Cdr();zdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),usernameEnvironmentVariable:hE,passwordEnvironmentVariable:hE,pypiMetadata:oHe.optional(),shouldGeneratePublishWorkflow:O.boolean().optional()})});var Mdr,rUi=h(()=>{"use strict";Qe();RY();Mdr=O.objectWithoutOptionalProperties({registryUrl:O.string(),packageName:O.string(),apiKeyEnvironmentVariable:hE,shouldGeneratePublishWorkflow:O.boolean().optional()})});var Ldr,nUi=h(()=>{"use strict";Vr();Qe();z4i();X4i();Z4i();$4i();eUi();tUi();rUi();Ldr=O.union("type",{npm:Ndr,maven:Fdr,postman:Qdr,pypi:zdr,rubygems:Mdr,nuget:jdr,crates:fdr}).transform({transform:e=>{switch(e.type){case"npm":return rc.GithubPublishInfo.npm(e);case"maven":return rc.GithubPublishInfo.maven(e);case"postman":return rc.GithubPublishInfo.postman(e);case"pypi":return rc.GithubPublishInfo.pypi(e);case"rubygems":return rc.GithubPublishInfo.rubygems(e);case"nuget":return rc.GithubPublishInfo.nuget(e);case"crates":return rc.GithubPublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Udr,iUi=h(()=>{"use strict";Qe();nUi();Udr=O.objectWithoutOptionalProperties({version:O.string(),repoUrl:O.string(),installationToken:O.string().optional(),branch:O.string().optional(),publishInfo:Ldr.optional()})});var Vdr,oUi=h(()=>{"use strict";Vr();Qe();Rdr();iUi();Vdr=O.union("type",{publish:cHe,downloadFiles:O.object({}),github:Udr}).transform({transform:e=>{switch(e.type){case"publish":return rc.OutputMode.publish(e);case"downloadFiles":return rc.OutputMode.downloadFiles();case"github":return rc.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _dr,sUi=h(()=>{"use strict";Qe();_dr=O.objectWithoutOptionalProperties({packageDescription:O.property("package_description",O.string().optional()),publisherEmail:O.property("publisher_email",O.string().optional()),referenceUrl:O.property("reference_url",O.string().optional()),publisherName:O.property("publisher_name",O.string().optional())})});var qdr,aUi=h(()=>{"use strict";Qe();oUi();sUi();qdr=O.objectWithoutOptionalProperties({path:O.string(),snippetFilepath:O.string().optional(),snippetTemplateFilepath:O.string().optional(),publishingMetadata:_dr.optional(),mode:Vdr})});var Gdr,cUi=h(()=>{"use strict";Vr();Qe();Q4i();M4i();Gdr=O.union("type",{basic:pdr,custom:mdr}).transform({transform:e=>{switch(e.type){case"basic":return rc.LicenseConfig.basic(e);case"custom":return rc.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Eja,Ija=h(()=>{"use strict";Qe();U4i();aUi();Rdr();cUi();Eja=O.objectWithoutOptionalProperties({dryRun:O.boolean(),irFilepath:O.string(),originalReadmeFilepath:O.string().optional(),license:Gdr.optional(),output:qdr,publish:cHe.optional(),workspaceName:O.string(),organization:O.string(),customConfig:O.unknown(),environment:gdr,whitelabel:O.boolean(),writeUnitTests:O.boolean(),generatePaginatedClients:O.boolean().optional(),generateOauthClients:O.boolean()})});var uUi=h(()=>{"use strict";Q4i();z4i();ddr();M4i();RY();Ija();U4i();aUi();Rdr();G4i();K4i();J4i();iUi();nUi();cUi();j4i();Adr();Y4i();X4i();W4i();ydr();Z4i();H4i();bdr();$4i();Edr();q4i();_4i();oUi();V4i();eUi();sUi();tUi();Cdr();wdr();L4i();rUi();Sdr()});var lUi={};Z(lUi,{BasicLicense:()=>pdr,CratesGithubPublishInfo:()=>fdr,CratesRegistryConfig:()=>eHe,CustomLicense:()=>mdr,EnvironmentVariable:()=>hE,GeneratorConfig:()=>Eja,GeneratorEnvironment:()=>gdr,GeneratorOutputConfig:()=>qdr,GeneratorPublishConfig:()=>cHe,GeneratorPublishTarget:()=>Tdr,GeneratorRegistriesConfig:()=>Pdr,GeneratorRegistriesConfigV2:()=>Ddr,GithubOutputMode:()=>Udr,GithubPublishInfo:()=>Ldr,LicenseConfig:()=>Gdr,LicenseId:()=>ldr,MavenCentralSignature:()=>tHe,MavenCentralSignatureGithubInfo:()=>kdr,MavenGithubPublishInfo:()=>Fdr,MavenRegistryConfig:()=>Odr,MavenRegistryConfigV2:()=>rHe,NpmGithubPublishInfo:()=>Ndr,NpmRegistryConfig:()=>Bdr,NpmRegistryConfigV2:()=>nHe,NugetGithubPublishInfo:()=>jdr,NugetRegistryConfig:()=>iHe,OutputMetadata:()=>xdr,OutputMetadataAuthor:()=>vdr,OutputMode:()=>Vdr,PostmanConfig:()=>Idr,PostmanGithubPublishInfo:()=>Qdr,PublishingMetadata:()=>_dr,PypiGithubPublishInfo:()=>zdr,PypiMetadata:()=>oHe,PypiRegistryConfig:()=>sHe,RemoteGeneratorEnvironment:()=>hdr,RubyGemsGithubPublishInfo:()=>Mdr,RubyGemsRegistryConfig:()=>aHe});var vja=h(()=>{"use strict";uUi()});var xja=h(()=>{"use strict";vja();uUi()});var pUi={};Z(pUi,{BasicLicense:()=>pdr,CratesGithubPublishInfo:()=>fdr,CratesRegistryConfig:()=>eHe,CustomLicense:()=>mdr,EnvironmentVariable:()=>hE,GeneratorConfig:()=>Eja,GeneratorEnvironment:()=>gdr,GeneratorOutputConfig:()=>qdr,GeneratorPublishConfig:()=>cHe,GeneratorPublishTarget:()=>Tdr,GeneratorRegistriesConfig:()=>Pdr,GeneratorRegistriesConfigV2:()=>Ddr,GithubOutputMode:()=>Udr,GithubPublishInfo:()=>Ldr,LicenseConfig:()=>Gdr,LicenseId:()=>ldr,MavenCentralSignature:()=>tHe,MavenCentralSignatureGithubInfo:()=>kdr,MavenGithubPublishInfo:()=>Fdr,MavenRegistryConfig:()=>Odr,MavenRegistryConfigV2:()=>rHe,NpmGithubPublishInfo:()=>Ndr,NpmRegistryConfig:()=>Bdr,NpmRegistryConfigV2:()=>nHe,NugetGithubPublishInfo:()=>jdr,NugetRegistryConfig:()=>iHe,OutputMetadata:()=>xdr,OutputMetadataAuthor:()=>vdr,OutputMode:()=>Vdr,PostmanConfig:()=>Idr,PostmanGithubPublishInfo:()=>Qdr,PublishingMetadata:()=>_dr,PypiGithubPublishInfo:()=>zdr,PypiMetadata:()=>oHe,PypiRegistryConfig:()=>sHe,RemoteGeneratorEnvironment:()=>hdr,RubyGemsGithubPublishInfo:()=>Mdr,RubyGemsRegistryConfig:()=>aHe,config:()=>lUi});var Cja=h(()=>{"use strict";xja()});var fUi=h(()=>{"use strict";cfr();E3i();sfr();I3i()});var dUi={};Z(dUi,{GlobalParameter:()=>JWe,GlobalParameterApplyMode:()=>ofr,GlobalParameterId:()=>KWe,GlobalParameterLocation:()=>afr});var wja=h(()=>{"use strict";fUi()});var $2e,Wdr=h(()=>{"use strict";Qe();Wo();Ed();$2e=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var Tye,Hdr=h(()=>{"use strict";Qe();Wo();gf();Tye=O.objectWithoutOptionalProperties({name:Co,value:O.lazyObject(()=>qc)})});var Kdr,mUi=h(()=>{"use strict";Vr();Qe();Kdr=O.union("type",{single:O.object({}),exploded:O.object({}),commaSeparated:O.object({})}).transform({transform:e=>{switch(e.type){case"single":return dw.single();case"exploded":return dw.exploded();case"commaSeparated":return dw.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t})});var uHe,Jdr=h(()=>{"use strict";Qe();Wo();Ed();mUi();uHe=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc),shape:Kdr.optional()})});var Ydr,hUi=h(()=>{"use strict";Qe();Wo();Ed();Ydr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var iy,Bj=h(()=>{"use strict";Qe();HDt();J2e();gf();hue();iy=O.objectWithoutOptionalProperties({typeId:jO,fernFilepath:kU,name:Co,displayName:Eye.optional()})});var Xdr,gUi=h(()=>{"use strict";Qe();Wo();Ed();Bj();Xdr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc),originalTypeDeclaration:iy.optional()})});var lHe,Zdr=h(()=>{"use strict";Qe();UWe();hUi();gUi();lHe=O.objectWithoutOptionalProperties({properties:O.list(Xdr),extraProperties:O.list(Ydr).optional()}).extend(TY)});var $dr,AUi=h(()=>{"use strict";Vr();Qe();Wo();Zdr();$dr=O.union("type",{inlinedRequestBody:lHe,reference:O.lazyObject(()=>qc)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return zP.inlinedRequestBody(e);case"reference":return zP.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var emr,yUi=h(()=>{"use strict";Qe();Wo();eRt();emr=O.objectWithoutOptionalProperties({error:Sye,body:O.lazyObject(()=>qc).optional()})});var tmr,bUi=h(()=>{"use strict";Qe();Wo();tmr=O.objectWithoutOptionalProperties({event:O.string(),data:O.lazyObject(()=>qc)})});var rmr,EUi=h(()=>{"use strict";Vr();Qe();Wo();bUi();rmr=O.union("type",{body:O.object({value:O.lazyObject(()=>qc).optional()}),stream:O.object({value:O.list(O.lazyObject(()=>qc))}),sse:O.object({value:O.list(tmr)})}).transform({transform:e=>{switch(e.type){case"body":return SA.body(e.value);case"stream":return SA.stream(e.value);case"sse":return SA.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var nmr,IUi=h(()=>{"use strict";Vr();Qe();yUi();EUi();nmr=O.union("type",{ok:O.object({value:rmr}),error:emr}).transform({transform:e=>{switch(e.type){case"ok":return Cg.ok(e.value);case"error":return Cg.error(e);default:return e}},untransform:({_visit:e,...t})=>t})});var pHe,imr=h(()=>{"use strict";Qe();gf();Gl();Wdr();Hdr();Jdr();AUi();IUi();pHe=O.objectWithoutOptionalProperties({id:O.string().optional(),name:Co.optional(),url:O.string(),rootPathParameters:O.list(Tye),servicePathParameters:O.list(Tye),endpointPathParameters:O.list(Tye),serviceHeaders:O.list($2e),endpointHeaders:O.list($2e),queryParameters:O.list(uHe),request:$dr.optional(),response:nmr}).extend(Zi)});var omr,vUi=h(()=>{"use strict";Qe();imr();omr=O.objectWithoutOptionalProperties({example:pHe})});var fHe,smr=h(()=>{"use strict";Qe();Y2e();Gl();Oj();fHe=O.objectWithoutOptionalProperties({isOptional:O.boolean()}).extend(Zi).extend(ny).extend(FU)});var dHe,amr=h(()=>{"use strict";Qe();Gl();Oj();dHe=O.objectWithoutOptionalProperties({}).extend(Zi).extend(ny)});var cmr,xUi=h(()=>{"use strict";Qe();K2e();SY();cmr=O.objectWithoutOptionalProperties({page:LP,next:f0,results:f0})});var umr,CUi=h(()=>{"use strict";Qe();SY();umr=O.objectWithoutOptionalProperties({results:f0})});var lmr,wUi=h(()=>{"use strict";Qe();J2e();lmr=O.objectWithoutOptionalProperties({fernFilepath:kU})});var pmr,SUi=h(()=>{"use strict";gf();pmr=Co});var fmr,TUi=h(()=>{"use strict";Qe();gf();Gl();fmr=O.objectWithoutOptionalProperties({name:Co.optional(),language:O.string(),code:O.string(),install:O.string().optional()}).extend(Zi)});var Oye,iRt=h(()=>{"use strict";Qe();Oye=O.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","php","rust","swift"])});var dmr,OUi=h(()=>{"use strict";Qe();gf();Gl();iRt();dmr=O.objectWithoutOptionalProperties({name:Co.optional(),sdk:Oye,code:O.string()}).extend(Zi)});var mmr,BUi=h(()=>{"use strict";Vr();Qe();TUi();OUi();mmr=O.union("type",{language:fmr,sdk:dmr}).transform({transform:e=>{switch(e.type){case"language":return $6.language(e);case"sdk":return $6.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mHe,hmr=h(()=>{"use strict";Qe();Gl();Oj();mHe=O.objectWithoutOptionalProperties({}).extend(Zi).extend(ny)});var gmr,PUi=h(()=>{"use strict";Qe();Ed();Gl();gmr=O.objectWithoutOptionalProperties({key:fs,isOptional:O.boolean(),contentType:O.string().optional()}).extend(Zi)});var Amr,DUi=h(()=>{"use strict";Qe();Ed();Gl();Amr=O.objectWithoutOptionalProperties({key:fs,isOptional:O.boolean(),contentType:O.string().optional()}).extend(Zi)});var ymr,RUi=h(()=>{"use strict";Vr();Qe();PUi();DUi();ymr=O.union("type",{file:Amr,fileArray:gmr}).transform({transform:e=>{switch(e.type){case"file":return xj.file(e);case"fileArray":return xj.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t})});var bmr,kUi=h(()=>{"use strict";Qe();bmr=O.enum_(["exploded","json","form"])});var hHe,Emr=h(()=>{"use strict";Qe();Wo();Ed();YDt();wY();GDt();hHe=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps),defaultValue:O.unknown().optional(),v2Examples:LS.optional(),propertyAccess:yye.optional()}).extend(vye)});var Imr,FUi=h(()=>{"use strict";Qe();Y2e();kUi();Emr();Imr=O.objectWithoutOptionalProperties({style:bmr.optional()}).extend(hHe).extend(FU)});var vmr,NUi=h(()=>{"use strict";Vr();Qe();RUi();FUi();vmr=O.union("type",{file:O.object({value:ymr}),bodyProperty:Imr}).transform({transform:e=>{switch(e.type){case"file":return jx.file(e.value);case"bodyProperty":return jx.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var gHe,xmr=h(()=>{"use strict";Qe();gf();Y2e();Gl();Oj();NUi();gHe=O.objectWithoutOptionalProperties({name:Co,properties:O.list(vmr)}).extend(Zi).extend(ny).extend(FU)});var Cmr,jUi=h(()=>{"use strict";Qe();Cmr=O.objectWithoutOptionalProperties({namespace:O.string()})});var wmr,QUi=h(()=>{"use strict";Qe();jUi();wmr=O.objectWithoutOptionalProperties({csharp:Cmr.optional()})});var AHe,Smr=h(()=>{"use strict";Qe();QUi();AHe=O.objectWithoutOptionalProperties({filepath:O.string(),packageName:O.string().optional(),options:wmr.optional()})});var Tmr,zUi=h(()=>{"use strict";Qe();gf();Smr();Tmr=O.objectWithoutOptionalProperties({file:AHe,name:Co})});var Omr,MUi=h(()=>{"use strict";Qe();zUi();Omr=O.objectWithoutOptionalProperties({service:Tmr})});var Bmr,LUi=h(()=>{"use strict";Qe();Llr();pLi();Bmr=O.record(RWe,O.list(fpr))});var Pmr,UUi=h(()=>{"use strict";Qe();Pmr=O.enum_(["UNARY","CLIENT_STREAM","SERVER_STREAM","BIDIRECTIONAL_STREAM"])});var Dmr,VUi=h(()=>{"use strict";Qe();UUi();Dmr=O.objectWithoutOptionalProperties({methodType:Pmr.optional()})});var Rmr,_Ui=h(()=>{"use strict";Vr();Qe();VUi();Rmr=O.union("type",{proto:Dmr,openapi:O.object({}),openrpc:O.object({})}).transform({transform:e=>{switch(e.type){case"proto":return MP.proto(e);case"openapi":return MP.openapi();case"openrpc":return MP.openrpc();default:return e}},untransform:({_visit:e,...t})=>t})});var yHe,kmr=h(()=>{"use strict";Qe();yHe=O.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var Fmr,qUi=h(()=>{"use strict";Qe();Fmr=O.objectWithoutOptionalProperties({pathParameter:O.string(),tail:O.string()})});var NU,bHe=h(()=>{"use strict";Qe();qUi();NU=O.objectWithoutOptionalProperties({head:O.string(),parts:O.list(Fmr)})});var EHe,Nmr=h(()=>{"use strict";Qe();Wo();Y2e();Gl();Oj();EHe=O.objectWithoutOptionalProperties({requestBodyType:O.lazy(()=>Ps)}).extend(Zi).extend(FU).extend(ny)});var jmr,GUi=h(()=>{"use strict";Qe();gf();Y2e();Gl();Oj();Bj();mue();Emr();jmr=O.objectWithoutOptionalProperties({name:Co,extends:O.list(iy),properties:O.list(hHe),extendedProperties:O.list(NO).optional(),extraProperties:O.property("extra-properties",O.boolean())}).extend(Zi).extend(ny).extend(FU)});var IHe,Qmr=h(()=>{"use strict";Vr();Qe();smr();xmr();Nmr();GUi();IHe=O.union("type",{inlinedRequestBody:jmr,reference:EHe,fileUpload:gHe,bytes:fHe}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return Kf.inlinedRequestBody(e);case"reference":return Kf.reference(e);case"fileUpload":return Kf.fileUpload(e);case"bytes":return Kf.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var zmr,WUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();zmr=O.objectWithoutOptionalProperties({responseBodyType:O.lazy(()=>Ps)}).extend(Zi).extend(ny)});var Mmr,HUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();mue();Mmr=O.objectWithoutOptionalProperties({responseBodyType:O.lazy(()=>Ps),responseProperty:NO.optional()}).extend(Zi).extend(ny)});var vHe,Lmr=h(()=>{"use strict";Vr();Qe();WUi();HUi();vHe=O.union("type",{response:zmr,nestedPropertyAsResponse:Mmr}).transform({transform:e=>{switch(e.type){case"response":return mE.response(e);case"nestedPropertyAsResponse":return mE.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Umr,KUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();Umr=O.objectWithoutOptionalProperties({payload:O.lazy(()=>Ps),terminator:O.string().optional()}).extend(Zi).extend(ny)});var Vmr,JUi=h(()=>{"use strict";Qe();Wo();Gl();Oj();Vmr=O.objectWithoutOptionalProperties({payload:O.lazy(()=>Ps),terminator:O.string().optional(),resumable:O.boolean().optional()}).extend(Zi).extend(ny)});var _mr,YUi=h(()=>{"use strict";Qe();Gl();Oj();_mr=O.objectWithoutOptionalProperties({}).extend(Zi).extend(ny)});var xHe,qmr=h(()=>{"use strict";Vr();Qe();KUi();JUi();YUi();xHe=O.union("type",{json:Umr,text:_mr,sse:Vmr}).transform({transform:e=>{switch(e.type){case"json":return gI.json(e);case"text":return gI.text(e);case"sse":return gI.sse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var CHe,Gmr=h(()=>{"use strict";Qe();Gl();Oj();CHe=O.objectWithoutOptionalProperties({contentType:O.string().optional()}).extend(Zi).extend(ny)});var Wmr,XUi=h(()=>{"use strict";Vr();Qe();amr();hmr();Lmr();Gmr();Wmr=O.union("type",{json:O.object({value:vHe}),fileDownload:mHe,text:CHe,bytes:dHe}).transform({transform:e=>{switch(e.type){case"json":return PO.json(e.value);case"fileDownload":return PO.fileDownload(e);case"text":return PO.text(e);case"bytes":return PO.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Hmr,ZUi=h(()=>{"use strict";Qe();XUi();qmr();Hmr=O.objectWithoutOptionalProperties({nonStreamResponse:Wmr,streamResponse:xHe})});var Kmr,$Ui=h(()=>{"use strict";Vr();Qe();amr();hmr();Lmr();qmr();ZUi();Gmr();Kmr=O.union("type",{json:O.object({value:vHe}),fileDownload:mHe,text:CHe,bytes:dHe,streaming:O.object({value:xHe}),streamParameter:Hmr}).transform({transform:e=>{switch(e.type){case"json":return mu.json(e.value);case"fileDownload":return mu.fileDownload(e);case"text":return mu.text(e);case"bytes":return mu.bytes(e);case"streaming":return mu.streaming(e.value);case"streamParameter":return mu.streamParameter(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Bye,oRt=h(()=>{"use strict";Qe();Gl();$Ui();Bye=O.objectWithoutOptionalProperties({statusCode:O.property("status-code",O.number().optional()),isWildcardStatusCode:O.boolean().optional(),body:Kmr.optional()}).extend(Zi)});var Jmr,eVi=h(()=>{"use strict";Qe();K2e();SY();Jmr=O.objectWithoutOptionalProperties({page:LP,results:f0,hasNextPage:f0.optional(),step:LP.optional()})});var Ymr,tVi=h(()=>{"use strict";Qe();SY();Ymr=O.objectWithoutOptionalProperties({nextPath:f0,results:f0})});var Xmr,rVi=h(()=>{"use strict";Qe();SY();Xmr=O.objectWithoutOptionalProperties({nextUri:f0,results:f0})});var Zmr,nVi=h(()=>{"use strict";Vr();Qe();xUi();CUi();eVi();tVi();rVi();Zmr=O.union("type",{cursor:cmr,offset:Jmr,custom:umr,uri:Xmr,path:Ymr}).transform({transform:e=>{switch(e.type){case"cursor":return l0.cursor(e);case"offset":return l0.offset(e);case"custom":return l0.custom(e);case"uri":return l0.uri(e);case"path":return l0.path(e);default:return e}},untransform:({_visit:e,...t})=>t})});var wHe,$mr=h(()=>{"use strict";Qe();wHe=O.string()});var ehr,iVi=h(()=>{"use strict";Qe();ehr=O.enum_(["ROOT","SERVICE","ENDPOINT"])});var g7,SHe=h(()=>{"use strict";Qe();Wo();gf();Gl();wY();H2e();$mr();iVi();g7=O.objectWithoutOptionalProperties({name:Co,valueType:O.lazy(()=>Ps),location:ehr,variable:wHe.optional(),clientDefault:RU.optional(),v2Examples:LS.optional(),explode:O.boolean().optional()}).extend(Zi)});var thr,oVi=h(()=>{"use strict";Qe();Gl();eRt();thr=O.objectWithoutOptionalProperties({error:Sye}).extend(Zi)});var rhr,sVi=h(()=>{"use strict";Qe();oVi();rhr=O.list(thr)});var nhr,aVi=h(()=>{"use strict";Qe();nhr=O.objectWithoutOptionalProperties({disabled:O.boolean().optional()})});var ihr,cVi=h(()=>{"use strict";Qe();aVi();ihr=O.undiscriminatedUnion([nhr])});var ohr,uVi=h(()=>{"use strict";Vr();Qe();smr();Nmr();ohr=O.union("type",{typeReference:EHe,bytes:fHe}).transform({transform:e=>{switch(e.type){case"typeReference":return o7.typeReference(e);case"bytes":return o7.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var shr,lVi=h(()=>{"use strict";Qe();gf();shr=O.objectWithoutOptionalProperties({wrapperName:Co,bodyKey:Co,includePathParameters:O.boolean().optional(),onlyPathParameters:O.boolean().optional()})});var ahr,pVi=h(()=>{"use strict";Vr();Qe();uVi();lVi();ahr=O.union("type",{justRequestBody:O.object({value:ohr}),wrapper:shr}).transform({transform:e=>{switch(e.type){case"justRequestBody":return OU.justRequestBody(e.value);case"wrapper":return OU.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t})});var chr,fVi=h(()=>{"use strict";Qe();gf();K2e();pVi();chr=O.objectWithoutOptionalProperties({streamParameter:LP.optional(),requestParameterName:Co,shape:ahr})});var THe,uhr=h(()=>{"use strict";Vr();Qe();MUi();THe=O.union("type",{http:O.object({}),grpc:Omr}).transform({transform:e=>{switch(e.type){case"http":return BU.http();case"grpc":return BU.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t})});var lhr,dVi=h(()=>{"use strict";Qe();BUi();imr();lhr=O.objectWithoutOptionalProperties({codeSamples:O.list(mmr).optional(),example:pHe.optional()})});var phr,mVi=h(()=>{"use strict";Qe();Qmr();phr=O.objectWithoutOptionalProperties({requestBodies:O.list(IHe).optional()})});var fhr,hVi=h(()=>{"use strict";Qe();oRt();fhr=O.objectWithoutOptionalProperties({responses:O.list(Bye).optional()})});var dhr,gVi=h(()=>{"use strict";Qe();zlr();m7();VDt();Z2e();T4i();sfr();vUi();SUi();LUi();_Ui();Aue();kmr();bHe();Qmr();oRt();nVi();SHe();WDt();sVi();cVi();fVi();uhr();dVi();mVi();hVi();dhr=O.objectWithoutOptionalProperties({id:due,name:pmr,displayName:O.string().optional(),subtitle:O.string().optional(),method:yHe,headers:O.list(US),responseHeaders:O.list(US).optional(),baseUrl:VP.optional(),v2BaseUrls:O.list(VP).optional(),basePath:NU.optional(),path:NU,fullPath:NU,pathParameters:O.list(g7),allPathParameters:O.list(g7),queryParameters:O.list(bye),requestBody:IHe.optional(),v2RequestBodies:phr.optional(),sdkRequest:chr.optional(),response:Bye.optional(),v2Responses:fhr.optional(),errors:rhr,auth:O.boolean(),security:O.list(Bmr).optional(),idempotent:O.boolean(),pagination:Zmr.optional(),userSpecifiedExamples:O.list(lhr),autogeneratedExamples:O.list(omr),v2Examples:odr.optional(),transport:THe.optional(),source:Rmr.optional(),audiences:O.list(PWe).optional(),retries:ihr.optional(),globalParameters:O.list(KWe).optional(),apiPlayground:O.boolean().optional()}).extend(Qx)});var mhr,AVi=h(()=>{"use strict";Qe();mhr=O.objectWithoutOptionalProperties({})});var hhr,yVi=h(()=>{"use strict";Qe();hhr=O.objectWithoutOptionalProperties({})});var OHe,ghr=h(()=>{"use strict";Qe();AVi();yVi();OHe=O.objectWithoutOptionalProperties({json:mhr.optional(),proto:hhr.optional()})});var Ahr,bVi=h(()=>{"use strict";Qe();zlr();NWe();ghr();wUi();gVi();Aue();bHe();SHe();uhr();Ahr=O.objectWithoutOptionalProperties({availability:CY.optional(),name:lmr,displayName:O.string().optional(),basePath:NU,endpoints:O.list(dhr),headers:O.list(US),pathParameters:O.list(g7),encoding:OHe.optional(),transport:THe.optional(),audiences:O.list(PWe).optional()})});var EVi=h(()=>{"use strict";vUi();smr();amr();xUi();CUi();wUi();SUi();BUi();TUi();OUi();imr();yUi();EUi();Wdr();Zdr();hUi();gUi();Hdr();Jdr();mUi();AUi();IUi();bUi();hmr();RUi();PUi();DUi();FUi();kUi();xmr();NUi();MUi();gVi();LUi();_Ui();Aue();kmr();bHe();qUi();Qmr();Nmr();oRt();$Ui();bVi();GUi();Emr();Lmr();WUi();HUi();KUi();XUi();eVi();nVi();tVi();SHe();iVi();Glr();VUi();WDt();K2e();$6i();oVi();sVi();SY();cVi();aVi();fVi();uVi();pVi();lVi();JUi();qmr();ZUi();iRt();Gmr();YUi();uhr();rVi();dVi();mVi();hVi()});var IVi={};Z(IVi,{AutogeneratedEndpointExample:()=>omr,BytesRequest:()=>fHe,BytesResponse:()=>dHe,CursorPagination:()=>cmr,CustomPagination:()=>umr,DeclaredServiceName:()=>lmr,EndpointName:()=>pmr,ExampleCodeSample:()=>mmr,ExampleCodeSampleLanguage:()=>fmr,ExampleCodeSampleSdk:()=>dmr,ExampleEndpointCall:()=>pHe,ExampleEndpointErrorResponse:()=>emr,ExampleEndpointSuccessResponse:()=>rmr,ExampleHeader:()=>$2e,ExampleInlinedRequestBody:()=>lHe,ExampleInlinedRequestBodyExtraProperty:()=>Ydr,ExampleInlinedRequestBodyProperty:()=>Xdr,ExamplePathParameter:()=>Tye,ExampleQueryParameter:()=>uHe,ExampleQueryParameterShape:()=>Kdr,ExampleRequestBody:()=>$dr,ExampleResponse:()=>nmr,ExampleServerSideEvent:()=>tmr,FileDownloadResponse:()=>mHe,FileProperty:()=>ymr,FilePropertyArray:()=>gmr,FilePropertySingle:()=>Amr,FileUploadBodyProperty:()=>Imr,FileUploadBodyPropertyEncoding:()=>bmr,FileUploadRequest:()=>gHe,FileUploadRequestProperty:()=>vmr,GrpcTransport:()=>Omr,HttpEndpoint:()=>dhr,HttpEndpointSecurityItem:()=>Bmr,HttpEndpointSource:()=>Rmr,HttpHeader:()=>US,HttpMethod:()=>yHe,HttpPath:()=>NU,HttpPathPart:()=>Fmr,HttpRequestBody:()=>IHe,HttpRequestBodyReference:()=>EHe,HttpResponse:()=>Bye,HttpResponseBody:()=>Kmr,HttpService:()=>Ahr,InlinedRequestBody:()=>jmr,InlinedRequestBodyProperty:()=>hHe,JsonResponse:()=>vHe,JsonResponseBody:()=>zmr,JsonResponseBodyWithProperty:()=>Mmr,JsonStreamChunk:()=>Umr,NonStreamHttpResponseBody:()=>Wmr,OffsetPagination:()=>Jmr,Pagination:()=>Zmr,PathPagination:()=>Ymr,PathParameter:()=>g7,PathParameterLocation:()=>ehr,PropertyPathItem:()=>jWe,ProtoSourceInfo:()=>Dmr,QueryParameter:()=>bye,RequestProperty:()=>LP,RequestPropertyValue:()=>epr,ResponseError:()=>thr,ResponseErrors:()=>rhr,ResponseProperty:()=>f0,RetriesConfiguration:()=>ihr,RetriesDisabledSchema:()=>nhr,SdkRequest:()=>chr,SdkRequestBodyType:()=>ohr,SdkRequestShape:()=>ahr,SdkRequestWrapper:()=>shr,SseStreamChunk:()=>Vmr,StreamParameterResponse:()=>Hmr,StreamingResponse:()=>xHe,SupportedSdkLanguage:()=>Oye,TextResponse:()=>CHe,TextStreamChunk:()=>_mr,Transport:()=>THe,UriPagination:()=>Xmr,UserSpecifiedEndpointExample:()=>lhr,V2HttpRequestBodies:()=>phr,V2HttpResponses:()=>fhr});var Sja=h(()=>{"use strict";EVi()});var yhr,vVi=h(()=>{"use strict";Qe();yhr=O.string()});var bhr,xVi=h(()=>{"use strict";Qe();vVi();bhr=O.objectWithoutOptionalProperties({id:yhr,protoRootUrl:O.string()})});var Ehr,CVi=h(()=>{"use strict";Vr();Qe();xVi();Ehr=O.union("type",{proto:bhr,openapi:O.object({})}).transform({transform:e=>{switch(e.type){case"proto":return Cj.proto(e);case"openapi":return Cj.openapi();default:return e}},untransform:({_visit:e,...t})=>t})});var yue,sRt=h(()=>{"use strict";Qe();m7();Ed();yue=O.objectWithoutOptionalProperties({name:fs}).extend(Qx)});var BHe,Ihr=h(()=>{"use strict";Qe();sRt();BHe=O.objectWithoutOptionalProperties({default:yue.optional(),values:O.list(yue),forwardCompatible:O.boolean().optional()})});var vhr,wVi=h(()=>{"use strict";Qe();Aue();Ihr();vhr=O.objectWithoutOptionalProperties({header:US,value:BHe})});var xhr,SVi=h(()=>{"use strict";Vr();Qe();wVi();xhr=O.union("type",{header:vhr}).transform({transform:e=>e.type==="header"?mye.header(e):e,untransform:({_visit:e,...t})=>t})});var Chr,TVi=h(()=>{"use strict";Qe();iRt();Chr=O.objectWithoutOptionalProperties({generationLanguage:Oye.optional(),keywords:O.list(O.string()).optional(),smartCasing:O.boolean(),smartCasingDigitWordBoundary:O.boolean().optional()})});var whr,OVi=h(()=>{"use strict";Qe();Ed();whr=O.objectWithoutOptionalProperties({discriminant:fs,contentProperty:fs})});var Shr,BVi=h(()=>{"use strict";Vr();Qe();OVi();Shr=O.union("type",{statusCode:O.object({}),property:whr}).transform({transform:e=>{switch(e.type){case"statusCode":return tL.statusCode();case"property":return tL.property(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Thr,PVi=h(()=>{"use strict";Qe();Thr=O.enum_(["minimal","comprehensive"])});var Ohr,DVi=h(()=>{"use strict";Qe();Ohr=O.enum_(["autopilot","autorelease","ci","manual"])});var Bhr,RVi=h(()=>{"use strict";Qe();DVi();Bhr=O.objectWithoutOptionalProperties({cliVersion:O.string(),generatorName:O.string(),generatorVersion:O.string(),generatorConfig:O.unknown().optional(),originGitCommit:O.string().optional(),originGitCommitIsDirty:O.boolean().optional(),invokedBy:Ohr.optional(),requestedVersion:O.string().optional(),ciProvider:O.string().optional()})});var Phr,kVi=h(()=>{"use strict";Qe();kmr();Phr=O.objectWithoutOptionalProperties({headerName:O.string(),methods:O.list(yHe)})});var Dhr,FVi=h(()=>{"use strict";Qe();Dhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Rhr,NVi=h(()=>{"use strict";Qe();Rhr=O.objectWithoutOptionalProperties({version:O.string().optional(),modulePath:O.string().optional()})});var khr,jVi=h(()=>{"use strict";Qe();khr=O.objectWithoutOptionalProperties({coordinate:O.string().optional(),version:O.string().optional(),usernameEnvironmentVariable:O.string(),passwordEnvironmentVariable:O.string(),mavenUrlEnvironmentVariable:O.string()})});var Fhr,QVi=h(()=>{"use strict";Qe();Fhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional(),tokenEnvironmentVariable:O.string()})});var Nhr,zVi=h(()=>{"use strict";Qe();Nhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var jhr,MVi=h(()=>{"use strict";Qe();jhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Qhr,LVi=h(()=>{"use strict";Qe();Qhr=O.objectWithoutOptionalProperties({apiKey:O.string(),workspaceId:O.string(),collectionId:O.string().optional()})});var zhr,UVi=h(()=>{"use strict";Qe();zhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Mhr,VVi=h(()=>{"use strict";Qe();Mhr=O.objectWithoutOptionalProperties({version:O.string().optional(),packageName:O.string().optional()})});var Pye,aRt=h(()=>{"use strict";Vr();Qe();FVi();NVi();jVi();QVi();zVi();MVi();LVi();UVi();VVi();Pye=O.union("type",{postman:Qhr,npm:Fhr,maven:khr,pypi:zhr,crates:Dhr,go:Rhr,nuget:Nhr,rubygems:Mhr,packagist:jhr}).transform({transform:e=>{switch(e.type){case"postman":return Jf.postman(e);case"npm":return Jf.npm(e);case"maven":return Jf.maven(e);case"pypi":return Jf.pypi(e);case"crates":return Jf.crates(e);case"go":return Jf.go(e);case"nuget":return Jf.nuget(e);case"rubygems":return Jf.rubygems(e);case"packagist":return Jf.packagist(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Lhr,_Vi=h(()=>{"use strict";Qe();aRt();Lhr=O.objectWithoutOptionalProperties({target:Pye})});var Uhr,qVi=h(()=>{"use strict";Qe();aRt();Uhr=O.objectWithoutOptionalProperties({generateFullProject:O.boolean(),publishTarget:Pye.optional()})});var Vhr,GVi=h(()=>{"use strict";Qe();aRt();Vhr=O.objectWithoutOptionalProperties({owner:O.string(),repo:O.string(),uri:O.string().optional(),token:O.string().optional(),mode:O.stringLiteral("pull-request").optional(),branch:O.string().optional(),target:Pye})});var _hr,WVi=h(()=>{"use strict";Vr();Qe();_Vi();qVi();GVi();_hr=O.union("type",{github:Vhr,direct:Lhr,filesystem:Uhr}).transform({transform:e=>{switch(e.type){case"github":return yY.github(e);case"direct":return yY.direct(e);case"filesystem":return yY.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t})});var cRt,HVi=h(()=>{"use strict";Qe();Wo();gf();Gl();UWe();cRt=O.objectWithoutOptionalProperties({name:Co.optional(),shape:O.lazy(()=>PHe)}).extend(TY).extend(Zi)});var qhr,KVi=h(()=>{"use strict";Qe();gf();Smr();qhr=O.objectWithoutOptionalProperties({file:AHe,name:Co})});var Ghr,JVi=h(()=>{"use strict";Vr();Qe();Ghr=O.union("type",{any:O.object({}),api:O.object({}),boolValue:O.object({}),bytesValue:O.object({}),doubleValue:O.object({}),duration:O.object({}),empty:O.object({}),enum:O.object({}),enumValue:O.object({}),field:O.object({}),fieldCardinality:O.object({}),fieldKind:O.object({}),fieldMask:O.object({}),floatValue:O.object({}),int32Value:O.object({}),int64Value:O.object({}),listValue:O.object({}),method:O.object({}),mixin:O.object({}),nullValue:O.object({}),option:O.object({}),sourceContext:O.object({}),stringValue:O.object({}),struct:O.object({}),syntax:O.object({}),timestamp:O.object({}),type:O.object({}),uint32Value:O.object({}),uint64Value:O.object({}),value:O.object({})}).transform({transform:e=>{switch(e.type){case"any":return mi.any();case"api":return mi.api();case"boolValue":return mi.boolValue();case"bytesValue":return mi.bytesValue();case"doubleValue":return mi.doubleValue();case"duration":return mi.duration();case"empty":return mi.empty();case"enum":return mi.enum();case"enumValue":return mi.enumValue();case"field":return mi.field();case"fieldCardinality":return mi.fieldCardinality();case"fieldKind":return mi.fieldKind();case"fieldMask":return mi.fieldMask();case"floatValue":return mi.floatValue();case"int32Value":return mi.int32Value();case"int64Value":return mi.int64Value();case"listValue":return mi.listValue();case"method":return mi.method();case"mixin":return mi.mixin();case"nullValue":return mi.nullValue();case"option":return mi.option();case"sourceContext":return mi.sourceContext();case"stringValue":return mi.stringValue();case"struct":return mi.struct();case"syntax":return mi.syntax();case"timestamp":return mi.timestamp();case"type":return mi.type();case"uint32Value":return mi.uint32Value();case"uint64Value":return mi.uint64Value();case"value":return mi.value();default:return e}},untransform:({_visit:e,...t})=>t})});var Whr,YVi=h(()=>{"use strict";Vr();Qe();KVi();JVi();Whr=O.union("type",{wellKnown:O.object({value:Ghr}),userDefined:qhr}).transform({transform:e=>{switch(e.type){case"wellKnown":return Dp.wellKnown(e.value);case"userDefined":return Dp.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Hhr,XVi=h(()=>{"use strict";Vr();Qe();YVi();Hhr=O.union("type",{proto:O.object({value:Whr})}).transform({transform:e=>e.type==="proto"?cue.proto(e.value):e,untransform:({_visit:e,...t})=>t})});var Khr,ZVi=h(()=>{"use strict";Qe();Khr=O.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var Jhr,$Vi=h(()=>{"use strict";Qe();Jhr=O.objectWithoutOptionalProperties({})});var Yhr,e_i=h(()=>{"use strict";Qe();Yhr=O.objectWithoutOptionalProperties({default:O.string().optional()})});var Xhr,t_i=h(()=>{"use strict";Qe();Xhr=O.objectWithoutOptionalProperties({default:O.boolean().optional()})});var Zhr,r_i=h(()=>{"use strict";Qe();Zhr=O.objectWithoutOptionalProperties({})});var $hr,n_i=h(()=>{"use strict";Qe();$hr=O.objectWithoutOptionalProperties({})});var egr,i_i=h(()=>{"use strict";Qe();egr=O.objectWithoutOptionalProperties({})});var tgr,o_i=h(()=>{"use strict";Qe();tgr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var rgr,s_i=h(()=>{"use strict";Qe();o_i();rgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:tgr.optional()})});var ngr,a_i=h(()=>{"use strict";Qe();ngr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var igr,c_i=h(()=>{"use strict";Qe();a_i();igr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:ngr.optional()})});var ogr,u_i=h(()=>{"use strict";Qe();ogr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var sgr,l_i=h(()=>{"use strict";Qe();u_i();sgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:ogr.optional()})});var agr,p_i=h(()=>{"use strict";Qe();agr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var cgr,f_i=h(()=>{"use strict";Qe();p_i();cgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:agr.optional()})});var ugr,d_i=h(()=>{"use strict";Qe();ugr=O.objectWithoutOptionalProperties({format:O.string().optional(),pattern:O.string().optional(),minLength:O.number().optional(),maxLength:O.number().optional()})});var lgr,m_i=h(()=>{"use strict";Qe();d_i();lgr=O.objectWithoutOptionalProperties({default:O.string().optional(),validation:ugr.optional()})});var pgr,h_i=h(()=>{"use strict";Qe();pgr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var fgr,g_i=h(()=>{"use strict";Qe();h_i();fgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:pgr.optional()})});var dgr,A_i=h(()=>{"use strict";Qe();dgr=O.objectWithoutOptionalProperties({min:O.number().optional(),max:O.number().optional(),exclusiveMin:O.boolean().optional(),exclusiveMax:O.boolean().optional(),multipleOf:O.number().optional()})});var mgr,y_i=h(()=>{"use strict";Qe();A_i();mgr=O.objectWithoutOptionalProperties({default:O.number().optional(),validation:dgr.optional()})});var hgr,b_i=h(()=>{"use strict";Qe();hgr=O.objectWithoutOptionalProperties({})});var ggr,E_i=h(()=>{"use strict";Vr();Qe();$Vi();e_i();t_i();r_i();n_i();i_i();s_i();c_i();l_i();f_i();m_i();g_i();y_i();b_i();ggr=O.union("type",{integer:sgr,long:cgr,uint:mgr,uint64:fgr,float:igr,double:rgr,boolean:Xhr,string:lgr,date:egr,dateTime:$hr,dateTimeRfc2822:Zhr,uuid:hgr,base64:Jhr,bigInteger:Yhr}).transform({transform:e=>{switch(e.type){case"integer":return ti.integer(e);case"long":return ti.long(e);case"uint":return ti.uint(e);case"uint64":return ti.uint64(e);case"float":return ti.float(e);case"double":return ti.double(e);case"boolean":return ti.boolean(e);case"string":return ti.string(e);case"date":return ti.date(e);case"dateTime":return ti.dateTime(e);case"dateTimeRfc2822":return ti.dateTimeRfc2822(e);case"uuid":return ti.uuid(e);case"base64":return ti.base64(e);case"bigInteger":return ti.bigInteger(e);default:return e}},untransform:({_visit:e,...t})=>t})});var DHe,Agr=h(()=>{"use strict";Qe();ZVi();E_i();DHe=O.objectWithoutOptionalProperties({v1:Khr,v2:ggr.optional()})});var ygr,I_i=h(()=>{"use strict";Qe();ygr=O.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"])});var bgr,v_i=h(()=>{"use strict";Qe();Bj();I_i();bgr=O.objectWithoutOptionalProperties({name:iy,shape:ygr})});var Egr,x_i=h(()=>{"use strict";Vr();Qe();Wo();Agr();v_i();Egr=O.union(O.discriminant("type","_type"),{container:O.object({container:O.lazy(()=>RHe)}),named:bgr,primitive:O.object({primitive:DHe}),unknown:O.object({})}).transform({transform:e=>{switch(e.type){case"container":return RO.container(e.container);case"named":return RO.named(e);case"primitive":return RO.primitive(e.primitive);case"unknown":return RO.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var Igr,C_i=h(()=>{"use strict";Qe();Wo();x_i();Igr=O.objectWithoutOptionalProperties({aliasOf:O.lazy(()=>Ps),resolvedType:Egr})});var vgr,w_i=h(()=>{"use strict";Qe();UDt();Bj();mue();vgr=O.objectWithoutOptionalProperties({extends:O.list(iy),properties:O.list(NO),extendedProperties:O.list(NO).optional(),extraProperties:O.property("extra-properties",O.boolean()),deferredUnionBaseProperties:O.list(gye).optional()})});var xgr,S_i=h(()=>{"use strict";Qe();Wo();Gl();xgr=O.objectWithoutOptionalProperties({type:O.lazy(()=>Ps)}).extend(Zi)});var Cgr,T_i=h(()=>{"use strict";Qe();mue();S_i();Cgr=O.objectWithoutOptionalProperties({members:O.list(xgr),baseProperties:O.list(NO).optional()})});var wgr,O_i=h(()=>{"use strict";Qe();Wo();Ed();wgr=O.objectWithoutOptionalProperties({name:fs,type:O.lazy(()=>Ps)})});var Sgr,B_i=h(()=>{"use strict";Vr();Qe();Bj();O_i();Sgr=O.union(O.discriminant("propertiesType","_type"),{samePropertiesAsObject:iy,singleProperty:wgr,noProperties:O.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return QS.samePropertiesAsObject(e);case"singleProperty":return QS.singleProperty(e);case"noProperties":return QS.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var uRt,P_i=h(()=>{"use strict";Qe();NWe();Ed();Gl();B_i();uRt=O.objectWithoutOptionalProperties({discriminantValue:fs,shape:Sgr,displayName:O.string().optional(),availability:CY.optional()}).extend(Zi)});var Tgr,D_i=h(()=>{"use strict";Qe();Tgr=O.enum_(["data","protocol"])});var Ogr,R_i=h(()=>{"use strict";Qe();UDt();Ed();Bj();mue();P_i();D_i();Ogr=O.objectWithoutOptionalProperties({discriminant:fs,extends:O.list(iy),types:O.list(uRt),baseProperties:O.list(NO),inheritedBaseProperties:O.list(gye).optional(),default:uRt.optional(),discriminatorContext:Tgr.optional()})});var Bgr,k_i=h(()=>{"use strict";Vr();Qe();C_i();Ihr();w_i();T_i();R_i();Bgr=O.union(O.discriminant("type","_type"),{alias:Igr,enum:BHe,object:vgr,union:Ogr,undiscriminatedUnion:Cgr}).transform({transform:e=>{switch(e.type){case"alias":return hc.alias(e);case"enum":return hc.enum(e);case"object":return hc.object(e);case"union":return hc.union(e);case"undiscriminatedUnion":return hc.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Pgr,F_i=h(()=>{"use strict";Qe();m7();hue();wY();Bj();ghr();HVi();XVi();k_i();Pgr=O.objectWithoutOptionalProperties({name:iy,shape:Bgr,autogeneratedExamples:O.list(cRt),userProvidedExamples:O.list(cRt),v2Examples:LS.optional(),referencedTypes:O.set(jO),encoding:OHe.optional(),source:Hhr.optional(),inline:O.boolean().optional()}).extend(Qx)});var Dgr,N_i=h(()=>{"use strict";Qe();Wo();gf();Gl();$mr();Dgr=O.objectWithoutOptionalProperties({id:wHe,name:Co,type:O.lazy(()=>Ps)}).extend(Zi)});var Rgr,j_i=h(()=>{"use strict";Qe();Wo();gf();Gl();Rgr=O.objectWithoutOptionalProperties({name:Co.optional(),payload:O.lazyObject(()=>qc)}).extend(Zi)});var kgr,Q_i=h(()=>{"use strict";Qe();kgr=O.enum_(["GET","POST"])});var Fgr,z_i=h(()=>{"use strict";gf();Fgr=Co});var Ngr,M_i=h(()=>{"use strict";Qe();Wo();Ed();YDt();Ngr=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps)}).extend(vye)});var jgr,L_i=h(()=>{"use strict";Qe();gf();Bj();M_i();jgr=O.objectWithoutOptionalProperties({name:Co,extends:O.list(iy),properties:O.list(Ngr)})});var Qgr,U_i=h(()=>{"use strict";Qe();Wo();Gl();Qgr=O.objectWithoutOptionalProperties({payloadType:O.lazy(()=>Ps)}).extend(Zi)});var zgr,V_i=h(()=>{"use strict";Vr();Qe();L_i();U_i();zgr=O.union("type",{inlinedPayload:jgr,reference:Qgr}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return zS.inlinedPayload(e);case"reference":return zS.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Mgr,__i=h(()=>{"use strict";Qe();Mgr=O.enum_(["RSA_SHA256","RSA_SHA384","RSA_SHA512","ECDSA_SHA256","ECDSA_SHA384","ECDSA_SHA512","ED25519"])});var Lgr,q_i=h(()=>{"use strict";Qe();Ed();Lgr=O.objectWithoutOptionalProperties({url:O.string(),keyIdHeader:fs.optional()})});var Ugr,G_i=h(()=>{"use strict";Qe();Ugr=O.objectWithoutOptionalProperties({})});var Vgr,W_i=h(()=>{"use strict";Vr();Qe();q_i();G_i();Vgr=O.union("type",{jwks:Lgr,static:Ugr}).transform({transform:e=>{switch(e.type){case"jwks":return c7.jwks(e);case"static":return c7.static(e);default:return e}},untransform:({_visit:e,...t})=>t})});var _gr,H_i=h(()=>{"use strict";Qe();_gr=O.enum_(["ALPHABETICAL"])});var qgr,K_i=h(()=>{"use strict";Qe();qgr=O.enum_(["BODY","TIMESTAMP","NOTIFICATION_URL","MESSAGE_ID"])});var kHe,Ggr=h(()=>{"use strict";Qe();H_i();K_i();kHe=O.objectWithoutOptionalProperties({components:O.list(qgr),delimiter:O.string(),bodySort:_gr.optional()})});var Dye,lRt=h(()=>{"use strict";Qe();Dye=O.enum_(["BASE64","HEX"])});var Wgr,J_i=h(()=>{"use strict";Qe();Wgr=O.enum_(["UNIX_SECONDS","UNIX_MILLIS","ISO8601"])});var FHe,Hgr=h(()=>{"use strict";Qe();Ed();J_i();FHe=O.objectWithoutOptionalProperties({headerName:fs,format:Wgr,tolerance:O.number().optional()})});var Kgr,Y_i=h(()=>{"use strict";Qe();Ed();__i();W_i();Ggr();lRt();Hgr();Kgr=O.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:Mgr,encoding:Dye,signaturePrefix:O.string().optional(),keySource:Vgr,payloadFormat:kHe.optional(),timestamp:FHe.optional()})});var Jgr,X_i=h(()=>{"use strict";Qe();Jgr=O.enum_(["SHA256","SHA1","SHA384","SHA512"])});var Ygr,Z_i=h(()=>{"use strict";Qe();Ygr=O.enum_(["SHA256","SHA1","SHA384","SHA512"])});var Xgr,$_i=h(()=>{"use strict";Qe();Xgr=O.objectWithoutOptionalProperties({name:O.string()})});var Zgr,e5i=h(()=>{"use strict";Vr();Qe();$_i();Zgr=O.union("type",{queryParameter:Xgr}).transform({transform:e=>e.type==="queryParameter"?hye.queryParameter(e):e,untransform:({_visit:e,...t})=>t})});var $gr,t5i=h(()=>{"use strict";Qe();Z_i();e5i();lRt();$gr=O.objectWithoutOptionalProperties({algorithm:Ygr,encoding:Dye,location:Zgr})});var eAr,r5i=h(()=>{"use strict";Qe();eAr=O.objectWithoutOptionalProperties({portVariants:O.boolean(),legacyQueryEncoding:O.boolean()})});var tAr,n5i=h(()=>{"use strict";Qe();Ed();X_i();t5i();r5i();Ggr();lRt();Hgr();tAr=O.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:Jgr,encoding:Dye,signaturePrefix:O.string().optional(),payloadFormat:kHe,timestamp:FHe.optional(),bodyHashBinding:$gr.optional(),notificationUrlNormalization:eAr.optional()})});var rAr,i5i=h(()=>{"use strict";Vr();Qe();Y_i();n5i();rAr=O.union("type",{hmac:tAr,asymmetric:Kgr}).transform({transform:e=>{switch(e.type){case"hmac":return p7.hmac(e);case"asymmetric":return p7.asymmetric(e);default:return e}},untransform:({_visit:e,...t})=>t})});var nAr,o5i=h(()=>{"use strict";Qe();m7();gLi();B4i();xmr();Aue();oRt();j_i();Q_i();z_i();V_i();i5i();nAr=O.objectWithoutOptionalProperties({id:hpr,name:Fgr,displayName:O.string().optional(),method:kgr,headers:O.list(US),payload:zgr,signatureVerification:rAr.optional(),fileUploadPayload:gHe.optional(),responses:O.list(Bye).optional(),examples:O.list(Rgr).optional(),v2Examples:sdr.optional()}).extend(Qx)});var iAr,s5i=h(()=>{"use strict";Qe();o5i();iAr=O.list(nAr)});var oAr,a5i=h(()=>{"use strict";Vr();Qe();Wo();Zdr();oAr=O.union("type",{inlinedBody:lHe,reference:O.lazyObject(()=>qc)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return rL.inlinedBody(e);case"reference":return rL.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var NHe,sAr=h(()=>{"use strict";Qe();NHe=O.string()});var aAr,c5i=h(()=>{"use strict";Qe();a5i();sAr();aAr=O.objectWithoutOptionalProperties({type:NHe,body:oAr})});var cAr,u5i=h(()=>{"use strict";Qe();gf();Gl();Wdr();Hdr();Jdr();c5i();cAr=O.objectWithoutOptionalProperties({name:Co.optional(),url:O.string(),pathParameters:O.list(Tye),headers:O.list($2e),queryParameters:O.list(uHe),messages:O.list(aAr)}).extend(Zi)});var uAr,l5i=h(()=>{"use strict";Qe();Wo();Ed();YDt();uAr=O.objectWithoutOptionalProperties({name:fs,valueType:O.lazy(()=>Ps)}).extend(vye)});var lAr,p5i=h(()=>{"use strict";Qe();gf();Bj();l5i();lAr=O.objectWithoutOptionalProperties({name:Co,extends:O.list(iy),properties:O.list(uAr)})});var pAr,f5i=h(()=>{"use strict";Qe();Wo();Gl();pAr=O.objectWithoutOptionalProperties({bodyType:O.lazy(()=>Ps)}).extend(Zi)});var fAr,d5i=h(()=>{"use strict";Vr();Qe();p5i();f5i();fAr=O.union("type",{inlinedBody:lAr,reference:pAr}).transform({transform:e=>{switch(e.type){case"inlinedBody":return FO.inlinedBody(e);case"reference":return FO.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var dAr,m5i=h(()=>{"use strict";Qe();dAr=O.enum_(["client","server"])});var mAr,h5i=h(()=>{"use strict";Qe();m7();d5i();sAr();m5i();mAr=O.objectWithoutOptionalProperties({type:NHe,displayName:O.string().optional(),methodName:O.string().optional(),origin:dAr,body:fAr}).extend(Qx)});var hAr,g5i=h(()=>{"use strict";gf();hAr=Co});var gAr,A5i=h(()=>{"use strict";Qe();m7();Z2e();k4i();Aue();bHe();SHe();WDt();u5i();h5i();g5i();gAr=O.objectWithoutOptionalProperties({name:hAr,displayName:O.string().optional(),connectMethodName:O.string().optional(),baseUrl:VP.optional(),path:NU,auth:O.boolean(),headers:O.list(US),queryParameters:O.list(bye),pathParameters:O.list(g7),messages:O.list(mAr),examples:O.list(cAr),v2Examples:udr.optional()}).extend(Qx)});var AAr,y5i=h(()=>{"use strict";Qe();FWe();AAr=O.objectWithoutOptionalProperties({pointsTo:xY})});var jHe,yAr=h(()=>{"use strict";Qe();KDt();J2e();kWe();FWe();hue();mpr();gpr();Gl();y5i();jHe=O.objectWithoutOptionalProperties({fernFilepath:kU,service:vY.optional(),types:O.list(jO),errors:O.list(Iye),webhooks:MWe.optional(),websocket:LWe.optional(),subpackages:O.list(xY),hasEndpointsInTree:O.boolean(),hasWebSocketInTree:O.boolean().optional(),navigationConfig:AAr.optional()}).extend(Zi)});var bAr,b5i=h(()=>{"use strict";Qe();iRt();bAr=O.objectWithoutOptionalProperties({title:O.string(),language:Oye,content:O.string()})});var EAr,E5i=h(()=>{"use strict";Qe();VDt();hLi();PVi();b5i();EAr=O.objectWithoutOptionalProperties({defaultEndpoint:due.optional(),bannerLink:O.string().optional(),introduction:O.string().optional(),apiReferenceLink:O.string().optional(),apiName:O.string().optional(),disabledFeatures:O.list(JDt).optional(),whiteLabel:O.boolean().optional(),features:O.record(JDt,O.list(due)).optional(),customSections:O.list(bAr).optional(),exampleStyle:Thr.optional()})});var IAr,I5i=h(()=>{"use strict";Qe();IAr=O.objectWithoutOptionalProperties({header:O.stringLiteral("User-Agent"),value:O.string()})});var vAr,v5i=h(()=>{"use strict";Qe();I5i();vAr=O.objectWithoutOptionalProperties({language:O.string(),sdkName:O.string(),sdkVersion:O.string(),userAgent:IAr.optional()})});var xAr,x5i=h(()=>{"use strict";Qe();kVi();v5i();xAr=O.objectWithoutOptionalProperties({isAuthMandatory:O.boolean(),hasStreamingEndpoints:O.boolean(),hasPaginatedEndpoints:O.boolean(),hasFileDownloadEndpoints:O.boolean(),platformHeaders:vAr,idempotencyKeyGeneration:Phr.optional()})});var CAr,C5i=h(()=>{"use strict";Qe();kWe();hue();CAr=O.objectWithoutOptionalProperties({typesReferencedOnlyByService:O.record(vY,O.list(jO)),sharedTypes:O.list(jO)})});var wAr,w5i=h(()=>{"use strict";Qe();CVi();wAr=O.objectWithoutOptionalProperties({sources:O.list(Ehr)})});var SAr,S5i=h(()=>{"use strict";Qe();HDt();gf();yAr();SAr=O.objectWithoutOptionalProperties({name:Co,displayName:Eye.optional()}).extend(jHe)});var Tja,Oja=h(()=>{"use strict";Qe();z6i();lLi();KDt();gf();kWe();FWe();hue();mpr();gpr();bLi();_3i();c4i();f4i();cfr();Aue();bHe();bVi();SHe();WVi();F_i();N_i();s5i();A5i();SVi();TVi();BVi();RVi();yAr();E5i();x5i();C5i();w5i();S5i();Tja=O.objectWithoutOptionalProperties({fdrApiDefinitionId:O.string().optional(),apiVersion:xhr.optional(),specVersion:O.string().optional(),apiName:Co,apiDisplayName:O.string().optional(),apiDocs:O.string().optional(),auth:ppr,headers:O.list(US),idempotencyHeaders:O.list(US),types:O.record(jO,Pgr),services:O.record(vY,Ahr),webhookGroups:O.record(MWe,iAr),websocketChannels:O.record(LWe,gAr).optional(),errors:O.record(Iye,qfr),subpackages:O.record(xY,SAr),rootPackage:jHe,constants:Apr,environments:Vfr.optional(),basePath:NU.optional(),pathParameters:O.list(g7),errorDiscriminationStrategy:Shr,sdkConfig:xAr,variables:O.list(Dgr),globalParameters:O.list(JWe).optional(),serviceTypeReferenceInfo:CAr,readmeConfig:EAr.optional(),sourceConfig:wAr.optional(),publishConfig:_hr.optional(),dynamic:Pfr.optional(),selfHosted:O.boolean().optional(),audiences:O.list(Qlr).optional(),generationMetadata:Bhr.optional(),apiPlayground:O.boolean().optional(),casingsConfig:Chr.optional()})});var T5i=h(()=>{"use strict";CVi();vVi();SVi();TVi();OVi();BVi();PVi();RVi();wVi();kVi();Oja();DVi();yAr();y5i();v5i();xVi();E5i();b5i();x5i();C5i();w5i();S5i();I5i()});var O5i={};Z(O5i,{ApiDefinitionSource:()=>Ehr,ApiDefinitionSourceId:()=>yhr,ApiVersionScheme:()=>xhr,CasingsConfig:()=>Chr,ErrorDiscriminationByPropertyStrategy:()=>whr,ErrorDiscriminationStrategy:()=>Shr,ExampleStyle:()=>Thr,GenerationMetadata:()=>Bhr,HeaderApiVersionScheme:()=>vhr,IdempotencyKeyGeneration:()=>Phr,IntermediateRepresentation:()=>Tja,InvocationSource:()=>Ohr,Package:()=>jHe,PackageNavigationConfig:()=>AAr,PlatformHeaders:()=>vAr,ProtoSource:()=>bhr,ReadmeConfig:()=>EAr,ReadmeCustomSection:()=>bAr,SdkConfig:()=>xAr,ServiceTypeReferenceInfo:()=>CAr,SourceConfig:()=>wAr,Subpackage:()=>SAr,UserAgent:()=>IAr});var Bja=h(()=>{"use strict";T5i()});var B5i=h(()=>{"use strict";jUi();Smr();QUi();UUi();zUi();YVi();KVi();JVi()});var P5i={};Z(P5i,{CsharpProtobufFileOptions:()=>Cmr,ProtobufFile:()=>AHe,ProtobufFileOptions:()=>wmr,ProtobufMethodType:()=>Pmr,ProtobufService:()=>Tmr,ProtobufType:()=>Whr,UserDefinedProtobufType:()=>qhr,WellKnownProtobufType:()=>Ghr});var Pja=h(()=>{"use strict";B5i()});var D5i=h(()=>{"use strict";FVi();_Vi();qVi();GVi();NVi();jVi();QVi();zVi();MVi();LVi();WVi();aRt();UVi();VVi()});var R5i={};Z(R5i,{CratesPublishTarget:()=>Dhr,DirectPublish:()=>Lhr,Filesystem:()=>Uhr,GithubPublish:()=>Vhr,GoPublishTarget:()=>Rhr,MavenPublishTarget:()=>khr,NpmPublishTarget:()=>Fhr,NugetPublishTarget:()=>Nhr,PackagistPublishTarget:()=>jhr,PostmanPublishTarget:()=>Qhr,PublishTarget:()=>Pye,PublishingConfig:()=>_hr,PypiPublishTarget:()=>zhr,RubyGemsPublishTarget:()=>Mhr});var Dja=h(()=>{"use strict";D5i()});var RHe,Rja=h(()=>{"use strict";Vr();Qe();Wo();H2e();RHe=O.union(O.discriminant("type","_type"),{list:O.object({list:O.lazy(()=>Ps)}),map:O.lazyObject(()=>TAr),nullable:O.object({nullable:O.lazy(()=>Ps)}),optional:O.object({optional:O.lazy(()=>Ps)}),set:O.object({set:O.lazy(()=>Ps)}),literal:O.object({literal:RU})}).transform({transform:e=>{switch(e.type){case"list":return Bs.list(e.list);case"map":return Bs.map(e);case"nullable":return Bs.nullable(e.nullable);case"optional":return Bs.optional(e.optional);case"set":return Bs.set(e.set);case"literal":return Bs.literal(e.literal);default:return e}},untransform:({_visit:e,...t})=>t})});var kja,Fja=h(()=>{"use strict";Qe();Bj();sRt();kja=O.objectWithoutOptionalProperties({default:yue.optional(),name:iy})});var OAr,Nja=h(()=>{"use strict";Qe();Wo();OAr=O.objectWithoutOptionalProperties({value:O.lazyObject(()=>qc)})});var BAr,k5i=h(()=>{"use strict";Qe();BAr=O.objectWithoutOptionalProperties({datetime:O.date(),raw:O.string().optional()})});var PAr,F5i=h(()=>{"use strict";Qe();PAr=O.objectWithoutOptionalProperties({datetime:O.date(),raw:O.string().optional()})});var QHe,DAr=h(()=>{"use strict";Vr();Qe();mLi();k5i();F5i();QHe=O.union("type",{integer:O.object({integer:O.number()}),long:O.object({long:O.number()}),uint:O.object({uint:O.number()}),uint64:O.object({uint64:O.number()}),float:O.object({float:O.number()}),double:O.object({double:O.number()}),boolean:O.object({boolean:O.boolean()}),string:O.object({string:dpr}),date:O.object({date:O.string()}),datetime:BAr,datetimeRfc2822:PAr,uuid:O.object({uuid:O.string()}),base64:O.object({base64:O.string()}),bigInteger:O.object({bigInteger:O.string()})}).transform({transform:e=>{switch(e.type){case"integer":return Si.integer(e.integer);case"long":return Si.long(e.long);case"uint":return Si.uint(e.uint);case"uint64":return Si.uint64(e.uint64);case"float":return Si.float(e.float);case"double":return Si.double(e.double);case"boolean":return Si.boolean(e.boolean);case"string":return Si.string(e.string);case"date":return Si.date(e.date);case"datetime":return Si.datetime(e);case"datetimeRfc2822":return Si.datetimeRfc2822(e);case"uuid":return Si.uuid(e.uuid);case"base64":return Si.base64(e.base64);case"bigInteger":return Si.bigInteger(e.bigInteger);default:return e}},untransform:({_visit:e,...t})=>t})});var RAr,N5i=h(()=>{"use strict";Qe();DAr();RAr=O.objectWithoutOptionalProperties({literal:QHe})});var kAr,jja=h(()=>{"use strict";Vr();Qe();Wo();N5i();kAr=O.union("type",{list:O.lazyObject(()=>FAr),set:O.lazyObject(()=>zAr),optional:O.lazyObject(()=>QAr),nullable:O.lazyObject(()=>jAr),map:O.lazyObject(()=>NAr),literal:RAr}).transform({transform:e=>{switch(e.type){case"list":return Qu.list(e);case"set":return Qu.set(e);case"optional":return Qu.optional(e);case"nullable":return Qu.nullable(e);case"map":return Qu.map(e);case"literal":return Qu.literal(e);default:return e}},untransform:({_visit:e,...t})=>t})});var MAr,j5i=h(()=>{"use strict";Qe();Ed();MAr=O.objectWithoutOptionalProperties({value:fs})});var LAr,Qja=h(()=>{"use strict";Qe();Wo();Ed();LAr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var UAr,zja=h(()=>{"use strict";Qe();Wo();UAr=O.objectWithoutOptionalProperties({key:O.lazyObject(()=>qc),value:O.lazyObject(()=>qc)})});var FAr,Mja=h(()=>{"use strict";Qe();Wo();FAr=O.objectWithoutOptionalProperties({list:O.list(O.lazyObject(()=>qc)),itemType:O.lazy(()=>Ps)})});var NAr,Lja=h(()=>{"use strict";Qe();Wo();NAr=O.objectWithoutOptionalProperties({map:O.list(O.lazyObject(()=>UAr)),keyType:O.lazy(()=>Ps),valueType:O.lazy(()=>Ps)})});var VAr,Uja=h(()=>{"use strict";Qe();Wo();Bj();VAr=O.objectWithoutOptionalProperties({typeName:iy,shape:O.lazy(()=>PHe)})});var jAr,Vja=h(()=>{"use strict";Qe();Wo();jAr=O.objectWithoutOptionalProperties({nullable:O.lazyObject(()=>qc).optional(),valueType:O.lazy(()=>Ps)})});var zHe,_ja=h(()=>{"use strict";Qe();Wo();Ed();Bj();GDt();zHe=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc),propertyAccess:yye.optional(),originalTypeDeclaration:iy})});var MHe,qja=h(()=>{"use strict";Qe();Wo();MHe=O.objectWithoutOptionalProperties({properties:O.list(O.lazyObject(()=>zHe)),extraProperties:O.list(O.lazyObject(()=>LAr)).optional()})});var _Ar,Gja=h(()=>{"use strict";Qe();Wo();hue();_Ar=O.objectWithoutOptionalProperties({typeId:jO,object:O.lazyObject(()=>MHe)})});var QAr,Wja=h(()=>{"use strict";Qe();Wo();QAr=O.objectWithoutOptionalProperties({optional:O.lazyObject(()=>qc).optional(),valueType:O.lazy(()=>Ps)})});var zAr,Hja=h(()=>{"use strict";Qe();Wo();zAr=O.objectWithoutOptionalProperties({set:O.list(O.lazyObject(()=>qc)),itemType:O.lazy(()=>Ps)})});var qAr,Kja=h(()=>{"use strict";Qe();Wo();Ed();qAr=O.objectWithoutOptionalProperties({wireDiscriminantValue:fs,shape:O.lazy(()=>GAr)})});var GAr,Jja=h(()=>{"use strict";Vr();Qe();Wo();GAr=O.union("type",{samePropertiesAsObject:O.lazyObject(()=>_Ar),singleProperty:O.lazyObject(()=>qc),noProperties:O.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return bY.samePropertiesAsObject(e);case"singleProperty":return bY.singleProperty(e);case"noProperties":return bY.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var qc,Yja=h(()=>{"use strict";Qe();Wo();UWe();qc=O.objectWithoutOptionalProperties({shape:O.lazy(()=>WAr)}).extend(TY)});var WAr,Xja=h(()=>{"use strict";Vr();Qe();Wo();DAr();WAr=O.union("type",{primitive:O.object({primitive:QHe}),container:O.object({container:O.lazy(()=>kAr)}),unknown:O.object({unknown:O.unknown()}),named:O.lazyObject(()=>VAr)}).transform({transform:e=>{switch(e.type){case"primitive":return $i.primitive(e.primitive);case"container":return $i.container(e.container);case"unknown":return $i.unknown(e.unknown);case"named":return $i.named(e);default:return e}},untransform:({_visit:e,...t})=>t})});var PHe,Zja=h(()=>{"use strict";Vr();Qe();Wo();j5i();PHe=O.union("type",{alias:O.lazyObject(()=>OAr),enum:MAr,object:O.lazyObject(()=>MHe),union:O.lazyObject(()=>KAr),undiscriminatedUnion:O.lazyObject(()=>HAr)}).transform({transform:e=>{switch(e.type){case"alias":return Su.alias(e);case"enum":return Su.enum(e);case"object":return Su.object(e);case"union":return Su.union(e);case"undiscriminatedUnion":return Su.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var HAr,$ja=h(()=>{"use strict";Qe();Wo();HAr=O.objectWithoutOptionalProperties({index:O.number(),singleUnionType:O.lazyObject(()=>qc)})});var JAr,eQa=h(()=>{"use strict";Qe();Wo();Ed();JAr=O.objectWithoutOptionalProperties({name:fs,value:O.lazyObject(()=>qc)})});var KAr,tQa=h(()=>{"use strict";Qe();Wo();Ed();KAr=O.objectWithoutOptionalProperties({discriminant:fs,singleUnionType:O.lazyObject(()=>qAr),extendProperties:O.list(O.lazyObject(()=>zHe)).optional(),baseProperties:O.list(O.lazyObject(()=>JAr)).optional()})});var TAr,rQa=h(()=>{"use strict";Qe();Wo();TAr=O.objectWithoutOptionalProperties({keyType:O.lazy(()=>Ps),valueType:O.lazy(()=>Ps)})});var YAr,Q5i=h(()=>{"use strict";Vr();Qe();sRt();YAr=O.union("type",{enum:yue}).transform({transform:e=>e.type==="enum"?SWe.enum(e):e,untransform:({_visit:e,...t})=>t})});var XAr,z5i=h(()=>{"use strict";Qe();HDt();J2e();gf();hue();Q5i();XAr=O.objectWithoutOptionalProperties({typeId:jO,fernFilepath:kU,name:Co,displayName:Eye.optional(),default:YAr.optional(),inline:O.boolean().optional()})});var Ps,nQa=h(()=>{"use strict";Vr();Qe();Wo();z5i();Agr();Ps=O.union(O.discriminant("type","_type"),{container:O.object({container:O.lazy(()=>RHe)}),named:XAr,primitive:O.object({primitive:DHe}),unknown:O.object({})}).transform({transform:e=>{switch(e.type){case"container":return Ur.container(e.container);case"named":return Ur.named(e);case"primitive":return Ur.primitive(e.primitive);case"unknown":return Ur.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var M5i=h(()=>{"use strict";C_i();$Vi();e_i();t_i();Rja();r_i();n_i();i_i();Bj();s_i();o_i();ghr();Ihr();Fja();sRt();Nja();jja();k5i();F5i();j5i();Qja();zja();Mja();N5i();Lja();Uja();Vja();_ja();qja();Gja();Wja();DAr();Hja();Kja();Jja();HVi();Yja();Xja();Zja();$ja();eQa();tQa();c_i();a_i();l_i();u_i();AVi();H2e();f_i();p_i();rQa();z5i();Q5i();mue();GDt();w_i();Agr();ZVi();E_i();yVi();v_i();x_i();I_i();P_i();B_i();O_i();XVi();m_i();d_i();k_i();F_i();nQa();g_i();h_i();y_i();A_i();S_i();T_i();D_i();R_i();b_i()});var L5i={};Z(L5i,{AliasTypeDeclaration:()=>Igr,Base64Type:()=>Jhr,BigIntegerType:()=>Yhr,BooleanType:()=>Xhr,ContainerType:()=>RHe,DateTimeRfc2822Type:()=>Zhr,DateTimeType:()=>$hr,DateType:()=>egr,DeclaredTypeName:()=>iy,DoubleType:()=>rgr,DoubleValidationRules:()=>tgr,Encoding:()=>OHe,EnumTypeDeclaration:()=>BHe,EnumTypeReference:()=>kja,EnumValue:()=>yue,ExampleAliasType:()=>OAr,ExampleContainer:()=>kAr,ExampleDatetime:()=>BAr,ExampleDatetimeRfc2822:()=>PAr,ExampleEnumType:()=>MAr,ExampleExtraObjectProperty:()=>LAr,ExampleKeyValuePair:()=>UAr,ExampleListContainer:()=>FAr,ExampleLiteralContainer:()=>RAr,ExampleMapContainer:()=>NAr,ExampleNamedType:()=>VAr,ExampleNullableContainer:()=>jAr,ExampleObjectProperty:()=>zHe,ExampleObjectType:()=>MHe,ExampleObjectTypeWithTypeId:()=>_Ar,ExampleOptionalContainer:()=>QAr,ExamplePrimitive:()=>QHe,ExampleSetContainer:()=>zAr,ExampleSingleUnionType:()=>qAr,ExampleSingleUnionTypeProperties:()=>GAr,ExampleType:()=>cRt,ExampleTypeReference:()=>qc,ExampleTypeReferenceShape:()=>WAr,ExampleTypeShape:()=>PHe,ExampleUndiscriminatedUnionType:()=>HAr,ExampleUnionBaseProperty:()=>JAr,ExampleUnionType:()=>KAr,FloatType:()=>igr,FloatValidationRules:()=>ngr,IntegerType:()=>sgr,IntegerValidationRules:()=>ogr,JsonEncoding:()=>mhr,Literal:()=>RU,LongType:()=>cgr,LongValidationRules:()=>agr,MapType:()=>TAr,NamedType:()=>XAr,NamedTypeDefault:()=>YAr,ObjectProperty:()=>NO,ObjectPropertyAccess:()=>yye,ObjectTypeDeclaration:()=>vgr,PrimitiveType:()=>DHe,PrimitiveTypeV1:()=>Khr,PrimitiveTypeV2:()=>ggr,ProtoEncoding:()=>hhr,ResolvedNamedType:()=>bgr,ResolvedTypeReference:()=>Egr,ShapeType:()=>ygr,SingleUnionType:()=>uRt,SingleUnionTypeProperties:()=>Sgr,SingleUnionTypeProperty:()=>wgr,Source:()=>Hhr,StringType:()=>lgr,StringValidationRules:()=>ugr,Type:()=>Bgr,TypeDeclaration:()=>Pgr,TypeReference:()=>Ps,Uint64Type:()=>fgr,Uint64ValidationRules:()=>pgr,UintType:()=>mgr,UintValidationRules:()=>dgr,UndiscriminatedUnionMember:()=>xgr,UndiscriminatedUnionTypeDeclaration:()=>Cgr,UnionDiscriminatorContext:()=>Tgr,UnionTypeDeclaration:()=>Ogr,UuidType:()=>hgr});var iQa=h(()=>{"use strict";M5i()});var U5i=h(()=>{"use strict";N_i();$mr()});var V5i={};Z(V5i,{VariableDeclaration:()=>Dgr,VariableId:()=>wHe});var oQa=h(()=>{"use strict";U5i()});var _5i=h(()=>{"use strict";__i();Y_i();W_i();j_i();X_i();n5i();L_i();M_i();q_i();G_i();o5i();Z_i();t5i();e5i();$_i();s5i();Q_i();z_i();r5i();V_i();H_i();K_i();Ggr();U_i();lRt();i5i();Hgr();J_i()});var q5i={};Z(q5i,{AsymmetricAlgorithm:()=>Mgr,AsymmetricKeySignatureVerification:()=>Kgr,AsymmetricKeySource:()=>Vgr,ExampleWebhookCall:()=>Rgr,HmacAlgorithm:()=>Jgr,HmacSignatureVerification:()=>tAr,InlinedWebhookPayload:()=>jgr,InlinedWebhookPayloadProperty:()=>Ngr,JwksKeySource:()=>Lgr,StaticKeySource:()=>Ugr,Webhook:()=>nAr,WebhookBodyHashAlgorithm:()=>Ygr,WebhookBodyHashBinding:()=>$gr,WebhookBodyHashLocation:()=>Zgr,WebhookBodyHashQueryParameterLocation:()=>Xgr,WebhookGroup:()=>iAr,WebhookHttpMethod:()=>kgr,WebhookName:()=>Fgr,WebhookNotificationUrlNormalization:()=>eAr,WebhookPayload:()=>zgr,WebhookPayloadBodySort:()=>_gr,WebhookPayloadComponent:()=>qgr,WebhookPayloadFormat:()=>kHe,WebhookPayloadReference:()=>Qgr,WebhookSignatureEncoding:()=>Dye,WebhookSignatureVerification:()=>rAr,WebhookTimestampConfig:()=>FHe,WebhookTimestampFormat:()=>Wgr});var sQa=h(()=>{"use strict";_5i()});var G5i=h(()=>{"use strict";c5i();a5i();u5i();p5i();l5i();A5i();h5i();d5i();f5i();sAr();m5i();g5i()});var W5i={};Z(W5i,{ExampleWebSocketMessage:()=>aAr,ExampleWebSocketMessageBody:()=>oAr,ExampleWebSocketSession:()=>cAr,InlinedWebSocketMessageBody:()=>lAr,InlinedWebSocketMessageBodyProperty:()=>uAr,WebSocketChannel:()=>gAr,WebSocketMessage:()=>mAr,WebSocketMessageBody:()=>fAr,WebSocketMessageBodyReference:()=>pAr,WebSocketMessageId:()=>NHe,WebSocketMessageOrigin:()=>dAr,WebSocketName:()=>hAr});var aQa=h(()=>{"use strict";G5i()});var cQa=h(()=>{"use strict";_Na();M6i();qNa();fLi();GNa();ALi();WNa();ELi();mja();hja();u4i();yja();d4i();bja();F4i();Cja();wja();fUi();Sja();EVi();Bja();T5i();Pja();B5i();Dja();D5i();iQa();M5i();oQa();U5i();sQa();_5i();aQa();G5i()});var Ri={};Z(Ri,{AliasTypeDeclaration:()=>Igr,ApiAuth:()=>ppr,ApiDefinitionSource:()=>Ehr,ApiDefinitionSourceId:()=>yhr,ApiVersionScheme:()=>xhr,AsymmetricAlgorithm:()=>Mgr,AsymmetricKeySignatureVerification:()=>Kgr,AsymmetricKeySource:()=>Vgr,AudienceDefinition:()=>Qlr,AudienceReference:()=>PWe,AuthScheme:()=>upr,AuthSchemeKey:()=>RWe,AuthSchemesRequirement:()=>lpr,AuthScope:()=>fpr,AutogeneratedEndpointExample:()=>omr,Availability:()=>CY,AvailabilityStatus:()=>qlr,Base64Type:()=>Jhr,BaseAuthScheme:()=>DU,BasicAuthScheme:()=>Ulr,BasicAuthValues:()=>Gfr,BearerAuthScheme:()=>Vlr,BearerAuthValues:()=>Wfr,BigIntegerType:()=>Yhr,BooleanType:()=>Xhr,BytesRequest:()=>fHe,BytesResponse:()=>dHe,CasingsConfig:()=>Chr,Constants:()=>Apr,ContainerType:()=>RHe,CratesPublishTarget:()=>Dhr,CsharpProtobufFileOptions:()=>Cmr,CursorPagination:()=>cmr,CustomPagination:()=>umr,DateTimeRfc2822Type:()=>Zhr,DateTimeType:()=>$hr,DateType:()=>egr,Declaration:()=>Qx,DeclaredErrorName:()=>Sye,DeclaredServiceName:()=>lmr,DeclaredTypeName:()=>iy,DirectPublish:()=>Lhr,DisplayName:()=>Eye,DoubleType:()=>rgr,DoubleValidationRules:()=>tgr,Encoding:()=>OHe,EndpointId:()=>due,EndpointName:()=>pmr,EndpointReference:()=>Aye,EnumTypeDeclaration:()=>BHe,EnumTypeReference:()=>kja,EnumValue:()=>yue,EnvironmentBaseUrlId:()=>VP,EnvironmentBaseUrlWithId:()=>Nfr,EnvironmentId:()=>PY,EnvironmentUrl:()=>wye,EnvironmentVariable:()=>Sj,Environments:()=>Ufr,EnvironmentsConfig:()=>Vfr,ErrorDeclaration:()=>qfr,ErrorDeclarationDiscriminantValue:()=>gja,ErrorDiscriminationByPropertyStrategy:()=>whr,ErrorDiscriminationStrategy:()=>Shr,ErrorId:()=>Iye,EscapedString:()=>dpr,ExampleAliasType:()=>OAr,ExampleCodeSample:()=>mmr,ExampleCodeSampleLanguage:()=>fmr,ExampleCodeSampleSdk:()=>dmr,ExampleContainer:()=>kAr,ExampleDatetime:()=>BAr,ExampleDatetimeRfc2822:()=>PAr,ExampleEndpointCall:()=>pHe,ExampleEndpointErrorResponse:()=>emr,ExampleEndpointSuccessResponse:()=>rmr,ExampleEnumType:()=>MAr,ExampleError:()=>_fr,ExampleExtraObjectProperty:()=>LAr,ExampleHeader:()=>$2e,ExampleInlinedRequestBody:()=>lHe,ExampleInlinedRequestBodyExtraProperty:()=>Ydr,ExampleInlinedRequestBodyProperty:()=>Xdr,ExampleKeyValuePair:()=>UAr,ExampleListContainer:()=>FAr,ExampleLiteralContainer:()=>RAr,ExampleMapContainer:()=>NAr,ExampleNamedType:()=>VAr,ExampleNullableContainer:()=>jAr,ExampleObjectProperty:()=>zHe,ExampleObjectType:()=>MHe,ExampleObjectTypeWithTypeId:()=>_Ar,ExampleOptionalContainer:()=>QAr,ExamplePathParameter:()=>Tye,ExamplePrimitive:()=>QHe,ExampleQueryParameter:()=>uHe,ExampleQueryParameterShape:()=>Kdr,ExampleRequestBody:()=>$dr,ExampleResponse:()=>nmr,ExampleServerSideEvent:()=>tmr,ExampleSetContainer:()=>zAr,ExampleSingleUnionType:()=>qAr,ExampleSingleUnionTypeProperties:()=>GAr,ExampleStyle:()=>Thr,ExampleType:()=>cRt,ExampleTypeReference:()=>qc,ExampleTypeReferenceShape:()=>WAr,ExampleTypeShape:()=>PHe,ExampleUndiscriminatedUnionType:()=>HAr,ExampleUnionBaseProperty:()=>JAr,ExampleUnionType:()=>KAr,ExampleWebSocketMessage:()=>aAr,ExampleWebSocketMessageBody:()=>oAr,ExampleWebSocketSession:()=>cAr,ExampleWebhookCall:()=>Rgr,FeatureId:()=>JDt,FernFilepath:()=>kU,FileDownloadResponse:()=>mHe,FileProperty:()=>ymr,FilePropertyArray:()=>gmr,FilePropertySingle:()=>Amr,FileUploadBodyProperty:()=>Imr,FileUploadBodyPropertyEncoding:()=>bmr,FileUploadRequest:()=>gHe,FileUploadRequestProperty:()=>vmr,Filesystem:()=>Uhr,FloatType:()=>igr,FloatValidationRules:()=>ngr,GenerationMetadata:()=>Bhr,GithubPublish:()=>Vhr,GlobalParameter:()=>JWe,GlobalParameterApplyMode:()=>ofr,GlobalParameterId:()=>KWe,GlobalParameterLocation:()=>afr,GoPublishTarget:()=>Rhr,GrpcTransport:()=>Omr,HeaderApiVersionScheme:()=>vhr,HeaderAuthScheme:()=>_lr,HeaderAuthValues:()=>Hfr,HmacAlgorithm:()=>Jgr,HmacSignatureVerification:()=>tAr,HttpEndpoint:()=>dhr,HttpEndpointSecurityItem:()=>Bmr,HttpEndpointSource:()=>Rmr,HttpHeader:()=>US,HttpMethod:()=>yHe,HttpPath:()=>NU,HttpPathPart:()=>Fmr,HttpRequestBody:()=>IHe,HttpRequestBodyReference:()=>EHe,HttpResponse:()=>Bye,HttpResponseBody:()=>Kmr,HttpService:()=>Ahr,IdempotencyKeyGeneration:()=>Phr,InferredAuthScheme:()=>Klr,InferredAuthSchemeTokenEndpoint:()=>Hlr,InferredAuthenticatedRequestHeader:()=>Wlr,InlinedRequestBody:()=>jmr,InlinedRequestBodyProperty:()=>hHe,InlinedWebSocketMessageBody:()=>lAr,InlinedWebSocketMessageBodyProperty:()=>uAr,InlinedWebhookPayload:()=>jgr,InlinedWebhookPayloadProperty:()=>Ngr,IntegerType:()=>sgr,IntegerValidationRules:()=>ogr,IntermediateRepresentation:()=>Tja,InvocationSource:()=>Ohr,JsonEncoding:()=>mhr,JsonResponse:()=>vHe,JsonResponseBody:()=>zmr,JsonResponseBodyWithProperty:()=>Mmr,JsonStreamChunk:()=>Umr,JwksKeySource:()=>Lgr,Literal:()=>RU,LongType:()=>cgr,LongValidationRules:()=>agr,MapType:()=>TAr,MavenPublishTarget:()=>khr,MultipleBaseUrlsEnvironment:()=>Qfr,MultipleBaseUrlsEnvironments:()=>zfr,MultipleEnvironmentUrlValues:()=>Kfr,Name:()=>DWe,NameAndWireValue:()=>gye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Co,NamedType:()=>XAr,NamedTypeDefault:()=>YAr,NonStreamHttpResponseBody:()=>Wmr,NpmPublishTarget:()=>Fhr,NugetPublishTarget:()=>Nhr,OAuthAccessTokenRequestProperties:()=>npr,OAuthAccessTokenResponseProperties:()=>zWe,OAuthAuthorizationCode:()=>Zlr,OAuthClientCredentials:()=>opr,OAuthConfiguration:()=>apr,OAuthDeviceCode:()=>spr,OAuthPkceConfiguration:()=>Ylr,OAuthPkceMethod:()=>Jlr,OAuthPublicClientId:()=>QWe,OAuthRefreshEndpoint:()=>rpr,OAuthRefreshTokenRequestProperties:()=>tpr,OAuthScheme:()=>cpr,OAuthTokenEndpoint:()=>ipr,OAuthValues:()=>Jfr,ObjectProperty:()=>NO,ObjectPropertyAccess:()=>yye,ObjectTypeDeclaration:()=>vgr,OffsetPagination:()=>Jmr,Package:()=>jHe,PackageNavigationConfig:()=>AAr,PackagistPublishTarget:()=>jhr,Pagination:()=>Zmr,PathPagination:()=>Ymr,PathParameter:()=>g7,PathParameterLocation:()=>ehr,PlatformHeaders:()=>vAr,PostmanPublishTarget:()=>Qhr,PrimitiveType:()=>DHe,PrimitiveTypeV1:()=>Khr,PrimitiveTypeV2:()=>ggr,PropertyPathItem:()=>jWe,ProtoEncoding:()=>hhr,ProtoSource:()=>bhr,ProtoSourceInfo:()=>Dmr,ProtobufFile:()=>AHe,ProtobufFileOptions:()=>wmr,ProtobufMethodType:()=>Pmr,ProtobufService:()=>Tmr,ProtobufType:()=>Whr,PublishTarget:()=>Pye,PublishingConfig:()=>_hr,PypiPublishTarget:()=>zhr,QueryParameter:()=>bye,ReadmeConfig:()=>EAr,ReadmeCustomSection:()=>bAr,RequestProperty:()=>LP,RequestPropertyValue:()=>epr,ResolvedNamedType:()=>bgr,ResolvedTypeReference:()=>Egr,ResponseError:()=>thr,ResponseErrors:()=>rhr,ResponseProperty:()=>f0,RetriesConfiguration:()=>ihr,RetriesDisabledSchema:()=>nhr,RubyGemsPublishTarget:()=>Mhr,SafeAndUnsafeString:()=>q2e,SdkConfig:()=>xAr,SdkRequest:()=>chr,SdkRequestBodyType:()=>ohr,SdkRequestShape:()=>ahr,SdkRequestWrapper:()=>shr,ServerVariable:()=>XWe,ServiceId:()=>vY,ServiceTypeReferenceInfo:()=>CAr,ShapeType:()=>ygr,SingleBaseUrlEnvironment:()=>Mfr,SingleBaseUrlEnvironments:()=>Lfr,SingleUnionType:()=>uRt,SingleUnionTypeProperties:()=>Sgr,SingleUnionTypeProperty:()=>wgr,Source:()=>Hhr,SourceConfig:()=>wAr,SseStreamChunk:()=>Vmr,StaticKeySource:()=>Ugr,StreamParameterResponse:()=>Hmr,StreamingResponse:()=>xHe,StringType:()=>lgr,StringValidationRules:()=>ugr,Subpackage:()=>SAr,SubpackageId:()=>xY,SupportedSdkLanguage:()=>Oye,TextResponse:()=>CHe,TextStreamChunk:()=>_mr,Transport:()=>THe,Type:()=>Bgr,TypeDeclaration:()=>Pgr,TypeId:()=>jO,TypeReference:()=>Ps,Uint64Type:()=>fgr,Uint64ValidationRules:()=>pgr,UintType:()=>mgr,UintValidationRules:()=>dgr,UndiscriminatedUnionMember:()=>xgr,UndiscriminatedUnionTypeDeclaration:()=>Cgr,UnionDiscriminatorContext:()=>Tgr,UnionTypeDeclaration:()=>Ogr,UriPagination:()=>Xmr,UserAgent:()=>IAr,UserDefinedProtobufType:()=>qhr,UserSpecifiedEndpointExample:()=>lhr,UuidType:()=>hgr,V2AuthValues:()=>ZWe,V2EndpointLocation:()=>Zfr,V2EndpointLocationHttpMethod:()=>Xfr,V2EnvironmentValues:()=>$We,V2HttpEndpointCodeSample:()=>edr,V2HttpEndpointExample:()=>tRt,V2HttpEndpointExamples:()=>odr,V2HttpEndpointRequest:()=>rdr,V2HttpEndpointResponse:()=>idr,V2HttpEndpointResponseBody:()=>ndr,V2HttpRequestBodies:()=>phr,V2HttpResponses:()=>fhr,V2SchemaExample:()=>qDt,V2SchemaExamples:()=>LS,V2ValueExamples:()=>DY,V2WebSocketEndpointLocation:()=>adr,V2WebSocketMessageExample:()=>cdr,V2WebSocketSessionExample:()=>nRt,V2WebSocketSessionExamples:()=>udr,V2WebhookExample:()=>rRt,V2WebhookExamples:()=>sdr,VariableDeclaration:()=>Dgr,VariableId:()=>wHe,WebSocketChannel:()=>gAr,WebSocketChannelId:()=>LWe,WebSocketMessage:()=>mAr,WebSocketMessageBody:()=>fAr,WebSocketMessageBodyReference:()=>pAr,WebSocketMessageId:()=>NHe,WebSocketMessageOrigin:()=>dAr,WebSocketName:()=>hAr,Webhook:()=>nAr,WebhookBodyHashAlgorithm:()=>Ygr,WebhookBodyHashBinding:()=>$gr,WebhookBodyHashLocation:()=>Zgr,WebhookBodyHashQueryParameterLocation:()=>Xgr,WebhookGroup:()=>iAr,WebhookGroupId:()=>MWe,WebhookHttpMethod:()=>kgr,WebhookId:()=>hpr,WebhookName:()=>Fgr,WebhookNotificationUrlNormalization:()=>eAr,WebhookPayload:()=>zgr,WebhookPayloadBodySort:()=>_gr,WebhookPayloadComponent:()=>qgr,WebhookPayloadFormat:()=>kHe,WebhookPayloadReference:()=>Qgr,WebhookSignatureEncoding:()=>Dye,WebhookSignatureVerification:()=>rAr,WebhookTimestampConfig:()=>FHe,WebhookTimestampFormat:()=>Wgr,WellKnownProtobufType:()=>Ghr,WithContentType:()=>FU,WithDocs:()=>Zi,WithDocsAndAvailability:()=>vye,WithJsonExample:()=>TY,WithV2Examples:()=>ny,audience:()=>L6i,auth:()=>dLi,commons:()=>yLi,constants:()=>ILi,dynamic:()=>d0,environment:()=>l4i,errors:()=>m4i,examples:()=>N4i,generatorExec:()=>pUi,globalParameters:()=>dUi,http:()=>IVi,ir:()=>O5i,proto:()=>P5i,publish:()=>R5i,types:()=>L5i,variables:()=>V5i,webhooks:()=>q5i,websocket:()=>W5i});var Wo=h(()=>{"use strict";cQa()});var uQa=h(()=>{"use strict";Vr();P2a();Wo()});var zn=h(()=>{"use strict";uQa();Vr();Wo()});var _P,lQa=h(()=>{"use strict";_P={integer:"integer",long:"long",uint:"uint",uint64:"uint64",float:"float",double:"double",boolean:"boolean",string:"string",datetime:"datetime",datetimeRfc2822:"datetime-rfc-2822",base64:"base64",uuid:"uuid",date:"date",bigint:"bigint",unknown:"unknown"}});function eNe({type:e,_default:t,validation:r,visitor:n}){switch(e){case _P.integer:{let l=r??void 0;return n.primitive({v1:ns.Integer,v2:ti.integer({default:t??void 0,validation:l!=null?{min:l.min,max:l.max,exclusiveMin:l.exclusiveMin,exclusiveMax:l.exclusiveMax,multipleOf:l.multipleOf}:void 0})})}case _P.double:{let l=r??void 0;return n.primitive({v1:ns.Double,v2:ti.double({default:t??void 0,validation:l!=null?{min:l.min,max:l.max,exclusiveMin:l.exclusiveMin,exclusiveMax:l.exclusiveMax,multipleOf:l.multipleOf}:void 0})})}case _P.string:{let l=r??void 0;return n.primitive({v1:ns.String,v2:ti.string({default:t??void 0,validation:l!=null?{format:l.format,pattern:l.pattern,minLength:l.minLength,maxLength:l.maxLength}:void 0})})}case _P.float:return n.primitive({v1:ns.Float,v2:void 0});case _P.long:{let l=r??void 0;return n.primitive({v1:ns.Long,v2:ti.long({default:t??void 0,validation:l!=null?{min:l.min,max:l.max,exclusiveMin:l.exclusiveMin,exclusiveMax:l.exclusiveMax,multipleOf:l.multipleOf}:void 0})})}case _P.boolean:return n.primitive({v1:ns.Boolean,v2:ti.boolean({default:t??void 0})});case _P.datetime:return n.primitive({v1:ns.DateTime,v2:void 0});case _P.datetimeRfc2822:return n.primitive({v1:ns.DateTimeRfc2822,v2:ti.dateTimeRfc2822({})});case _P.date:return n.primitive({v1:ns.Date,v2:void 0});case _P.uuid:return n.primitive({v1:ns.Uuid,v2:void 0});case _P.base64:return n.primitive({v1:ns.Base64,v2:void 0});case _P.bigint:return n.primitive({v1:ns.BigInteger,v2:ti.bigInteger({default:t??void 0})});case _P.uint:return n.primitive({v1:ns.Uint,v2:void 0});case _P.uint64:return n.primitive({v1:ns.Uint64,v2:void 0});case _P.unknown:return n.unknown()}let i=e.match(Pj.MAP);if(i?.[1]!=null&&i[2]!=null)return n.map({keyType:i[1],valueType:i[2]});let o=e.match(Pj.LIST);if(o?.[1]!=null)return n.list(o[1]);let s=e.match(Pj.SET);if(s?.[1]!=null)return n.set(s[1]);let a=e.match(Pj.OPTIONAL);if(a?.[1]!=null)return n.optional(a[1]);let c=e.match(Pj.NULLABLE);if(c?.[1]!=null)return n.nullable(c[1]);let u=e.match(Pj.LITERAL);if(u?.[1]!=null)return n.literal(p0.string(u[1]));if(u?.[2]!=null){let l=u[2];switch(l){case"false":return n.literal(p0.boolean(!1));case"true":return n.literal(p0.boolean(!0));default:throw new Error(`Unsupported literal value: ${l}`)}}return n.named(e)}var Pj,LHe=h(()=>{"use strict";zn();lQa();Pj={MAP:/^map<\s*([^,]*)\s*,\s*(.*)\s*>$/,LIST:/^list<\s*(.*)\s*>$/,SET:/^set<\s*(.*)\s*>$/,OPTIONAL:/^optional<\s*(.*)\s*>$/,NULLABLE:/^nullable<\s*(.*)\s*>$/,LITERAL:/^literal<\s*(?:"(.*)"|(true|false))\s*>$/}});function jU(e){if(e===pQa)return{isOptional:!1};if(e.match(Pj.OPTIONAL)?.[1]===pQa)return{isOptional:!0}}var pQa,K5i=h(()=>{"use strict";LHe();pQa="bytes"});function pRt(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return jU(t)}var fQa=h(()=>{"use strict";K5i()});function J5i({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(J5i({input:r,typeName:t}))return!0;return!1}var dQa=h(()=>{"use strict"});function mQa(e){return J5i({input:e,typeName:"file"})}var hQa=h(()=>{"use strict";dQa()});function gQa(e){let t=0,r=0;function n(){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)return;let o="";for(;t<e.length&&e[t]!=="<"&&e[t]!==","&&e[t]!==">";)o+=e[t++];if(o.trim()){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t<e.length&&e[t]==="<"){if(t++,r++,r>128)throw new Error("Internal error; Exceeded maximum recursion depth while parsing generics.");let s={name:o.trim(),arguments:[]};for(;t<e.length&&e[t]!==">";){for(;t<e.length&&/[\s,]/.test(e[t]);)t++;if(t<e.length&&e[t]!==">"){let a=n();a&&s.arguments.push(a)}}if(t<e.length&&e[t]===">")t++,r--;else throw new Error("Malformed input: missing closing '>' for generic arguments.");return s}else return o.trim()}}let i=n();if(typeof i=="object")return i}var AQa=h(()=>{"use strict"});function yQa(e){return e.match(Pj.LIST)?.[1]===Y5i}function Dj(e){if(e===Y5i)return{isOptional:!1,isArray:!1};let t=e.match(Pj.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===Y5i)return{isOptional:!0,isArray:!1};if(yQa(t[1]))return{isOptional:!0,isArray:!0}}if(yQa(e))return{isOptional:!1,isArray:!0}}var Y5i,X5i=h(()=>{"use strict";LHe();Y5i="file"});function Ogf(e){return typeof e=="string"?!1:Rf.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(xg(e.body)&&Object.values(e.body.properties??[]).some(Pgf))}function tNe(e){if(!(!Ogf(e)||e.body==null)&&e.name!=null&&e.body!=null&&xg(e.body))return Bgf(e.name,e.body)}function Bgf(e,t){let r=Object.entries(t.properties??[]).reduce((n,[i,o])=>{let s=typeof o!="string"?o.docs:void 0,a=typeof o!="string"?o["content-type"]:void 0,c=typeof o!="string"?o.style:void 0,u=Dj(typeof o=="string"?o:o.type);return u!=null?n.push({isFile:!0,key:i,docs:s,isOptional:u.isOptional,isArray:u.isArray,contentType:a,style:c}):n.push({isFile:!1,key:i,propertyType:o,docs:s,contentType:a,style:c}),n},[]);return t["extra-properties"],{name:e,extends:t.extends,properties:r}}function Pgf(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=gQa(t);return r==null?!1:mQa(r)}var bQa=h(()=>{"use strict";kt();hQa();AQa();wMi();X5i()});function rNe(e){if(e===EQa)return{isOptional:!1};if(e.match(Pj.OPTIONAL)?.[1]===EQa)return{isOptional:!0}}var EQa,IQa=h(()=>{"use strict";LHe();EQa="text"});function bv({type:e,_default:t,validation:r,visitor:n}){return eNe({type:e,_default:t,validation:r,visitor:{primitive:n.primitive,map:({keyType:i,valueType:o})=>n.map({keyType:bv({type:i,_default:void 0,validation:void 0,visitor:n}),valueType:bv({type:o,_default:void 0,validation:void 0,visitor:n})}),list:i=>n.list(bv({type:i,_default:void 0,validation:void 0,visitor:n})),set:i=>n.set(bv({type:i,_default:void 0,validation:void 0,visitor:n})),optional:i=>n.optional(bv({type:i,_default:t,validation:r,visitor:n})),nullable:i=>n.nullable(bv({type:i,_default:t,validation:r,visitor:n})),literal:n.literal,named:n.named,unknown:n.unknown}})}var vQa=h(()=>{"use strict";LHe()});function Z5i(e,t){if(Dgf(e))return t.sdk(e);if(Rgf(e))return t.language(e);Ee(e)}function Dgf(e){return e.sdk!=null}function Rgf(e){return e.language!=null}var xQa=h(()=>{"use strict";kt()});function CQa(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}var wQa=h(()=>{"use strict"});function SQa(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}var TQa=h(()=>{"use strict"});function nNe(e,t,r){return kgf(e,t)?r.stream(t):Fgf(e,t)?r.events(t):r.body(t)}function kgf(e,t){return t.stream!==void 0&&CQa(e)}function Fgf(e,t){return t.stream!==void 0&&SQa(e)}var OQa=h(()=>{"use strict";wQa();TQa()});function iNe(e,t){if(BQa(e))return t.single(e);if(PQa(e))return t.any(e);if(Ngf(e))return t.endpointSecurity(e);Ee(e)}function BQa(e){return typeof e=="string"||e.scheme!=null}function PQa(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function Ngf(e){let[t,...r]=Object.keys(e);return t==="endpoint-security"&&r.length===0}var DQa=h(()=>{"use strict";kt()});function oNe(e,t){if(RQa(e))return t.header(e);switch(e.scheme){case"basic":return t.basic(e);case"bearer":return"get-token"in e?t.inferredBearer(e):t.tokenBearer(e);case"oauth":return t.oauth(e);default:Ee(e)}}function RQa(e){return e.header!=null}var kQa=h(()=>{"use strict";kt()});function kY(e,t){if(FQa(e))return t.singleBaseUrl(e);if(qP(e))return t.multipleBaseUrls(e);Ee(e)}function FQa(e){return typeof e=="string"||"url"in e}function qP(e){return typeof e!="string"&&"urls"in e}var NQa=h(()=>{"use strict";kt()});function bue(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}var jQa=h(()=>{"use strict"});function Ev(e,t){if(Rye(e))return t.alias(e);if(QU(e))return t.discriminatedUnion(e);if(rf(e))return t.object(e);if(UHe(e))return t.undiscriminatedUnion(e);if(A7(e))return t.enum(e);Ee(e)}function Rye(e){return typeof e=="string"||e.type!=null}function rf(e){return e.extends!=null||e.properties!=null}function QU(e){return e.union!=null&&e.discriminated==null}function UHe(e){let t=e;return t.union!=null&&t.discriminated!=null}function A7(e){return e.enum!=null}var QQa=h(()=>{"use strict";kt()});var Qo=h(()=>{"use strict";DSa();kSa();QSa();zSa();MSa();wMi();LSa();USa();fQa();bQa();K5i();X5i();IQa();vQa();xQa();OQa();DQa();kQa();NQa();jQa();QQa();LHe()});var b7,r8i=h(()=>{"use strict";b7=class{generatorsConfiguration;workspaceName;cliVersion;absoluteFilePath;changelog;constructor({generatorsConfiguration:t,workspaceName:r,cliVersion:n,absoluteFilePath:i,changelog:o}){this.generatorsConfiguration=t,this.workspaceName=r,this.cliVersion=n,this.absoluteFilePath=i,this.changelog=o}}});var GQa=h(()=>{"use strict"});function kye(e){if(typeof e.raw?.output=="object"&&e.raw?.output!==null){let t=e.raw.output["package-name"];if(t!=null)return t;let r=e.raw.output.coordinate;if(r!=null)return r}if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config.package_name;if(t!=null)return t;let r=e.raw.config["package-name"];if(typeof r=="string")return r;let n=e.raw.config.module?.path;if(n!=null)return n;let i=e.raw.config.packageName;if(typeof i=="string")return i}}function Fye(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function qgf(e){if(!Array.isArray(e))return i8i;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>_gf.has(r));return t.length>0?t:i8i}function Nye(e){let t=e.idempotencyKeyGenerationConfig??Ggf(e);return Wgf(t)}function Ggf(e){let t=typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config:typeof e.config=="object"&&e.config!==null?e.config:void 0;if(t!=null)return t["auto-generate-idempotency-key"]}function Wgf(e){if(e===!0)return{headerName:WQa,methods:i8i};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:WQa,methods:qgf(e.methods)}}}function VHe(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))Hgf.has(r)||(t[r]=n);return t}async function $Ar({version:e,packageName:t,generatorInvocation:r,context:n}){if(e==null||r.outputMode.type==="downloadFiles")return;let i=r.outputMode.type==="publishV2"||r.outputMode.type==="publish",o=t??kye(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await Kgf({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${n8i(s)}: ${Ln(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${n8i(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:B.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${n8i(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function Kgf({packageName:e,version:t,language:r}){switch(r){case"typescript":return await Jgf(e,t);case"python":return await Ygf(e,t);case"java":return await Xgf(e,t);case"csharp":return await Zgf(e,t);case"ruby":return await $gf(e,t);case"go":return await eAf(e,t);case"rust":return await tAf(e,t);default:return!1}}async function Jgf(e,t){let r=encodeURIComponent(e).replace(/^%40/,"@"),n={accept:"application/json"},i=process.env.NPM_TOKEN;i!=null&&(n.authorization=`Bearer ${i}`);let o=await fetch(`https://registry.npmjs.org/${r}/${t}`,{headers:n,signal:AbortSignal.timeout(sNe)});return o.ok?(await o.json()).version===t:!1}async function Ygf(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(sNe)})).ok}async function Xgf(e,t){let r=e.split(":");if(r.length<2||!r[0]||!r[1])return!1;let n=r[0],i=r[1],o=await fetch(`https://search.maven.org/solrsearch/select?q=g:${encodeURIComponent(n)}+AND+a:${encodeURIComponent(i)}+AND+v:${encodeURIComponent(t)}&rows=1&wt=json`,{signal:AbortSignal.timeout(sNe)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function Zgf(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(sNe)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function $gf(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(sNe)})).ok}async function eAf(e,t){let r=e.replace(/[A-Z]/g,s=>"!"+s.toLowerCase()),n=t.startsWith("v")?t:`v${t}`,i=await fetch(`https://proxy.golang.org/${r}/@v/${n}.info`,{signal:AbortSignal.timeout(sNe)});return i.ok?(await i.json()).Version!=null:!1}async function tAf(e,t){let r=await fetch(`https://crates.io/api/v1/crates/${e}/${t}`,{headers:{"user-agent":"fern-cli (https://buildwithfern.com)"},signal:AbortSignal.timeout(sNe)});return r.ok?(await r.json()).version?.num===t:!1}function n8i(e){switch(e){case"typescript":return"npm";case"python":return"PyPI";case"java":return"Maven Central";case"csharp":return"NuGet";case"ruby":return"RubyGems";case"go":return"Go Module Proxy";case"rust":return"crates.io";default:return e}}var WQa,i8i,_gf,Hgf,sNe,HQa=h(()=>{"use strict";kt();Qt();WQa="Idempotency-Key",i8i=["POST","PUT"],_gf=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);Hgf=new Set(["user-agent","auto-generate-idempotency-key"]);sNe=5e3});var KQa=b(iL=>{"use strict";var rAf=iL&&iL.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iL,"__esModule",{value:!0});var nAf=require("fs"),iAf=rAf(vA()),_He=iAf.default("@kwsites/file-exists");function oAf(e,t,r){_He("checking %s",e);try{let n=nAf.statSync(e);return n.isFile()&&t?(_He("[OK] path represents a file"),!0):n.isDirectory()&&r?(_He("[OK] path represents a directory"),!0):(_He("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return _He("[FAIL] path is not accessible: %o",n),!1;throw _He("[FATAL] %o",n),n}}function sAf(e,t=iL.READABLE){return oAf(e,(t&iL.FILE)>0,(t&iL.FOLDER)>0)}iL.exists=sAf;iL.FILE=1;iL.FOLDER=2;iL.READABLE=iL.FILE+iL.FOLDER});var o8i=b(eyr=>{"use strict";function aAf(e){for(var t in e)eyr.hasOwnProperty(t)||(eyr[t]=e[t])}Object.defineProperty(eyr,"__esModule",{value:!0});aAf(KQa())});function qHe(...e){let t=new String(e);return s8i.set(t,e),t}function MU(e){return e instanceof String&&s8i.has(e)}function GHe(e){return s8i.get(e)??[]}var s8i,jye=h(()=>{"use strict";s8i=new WeakMap});var dRt=b(aNe=>{"use strict";Object.defineProperty(aNe,"__esModule",{value:!0});aNe.createDeferred=aNe.deferred=void 0;function a8i(){let e,t,r="pending";return{promise:new Promise((i,o)=>{e=i,t=o}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}aNe.deferred=a8i;aNe.createDeferred=a8i;aNe.default=a8i});function*JQa(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function fAf(e,t){for(let{name:n}of JQa(e,"task")){if(cAf.has(n))return WHe(!0,t);if(uAf.has(n))return WHe(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:lAf.has(r)?WHe(!0,t.slice(1)):pAf.has(r)?WHe(!1,t.slice(1)):t.length===1?WHe(!1,t):WHe(!0,t)}function WHe(e=!1,t=[]){let r=t.at(0)?.toLowerCase();return r===void 0?null:{isWrite:e,isRead:!e,key:r,value:t.at(1)}}function dAf(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function mAf(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function hAf(e){for(let{name:t}of JQa(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function gAf({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*AAf(e){for(let t of e){let r=gAf(t),n=r&&mAf(t.value);n&&(yield{...n,scope:r})}}function yAf(e,t,r){let n={read:[],write:[...AAf(t)]};return e==="config"&&bAf(n,hAf(t),fAf(t,r)),n}function bAf(e,t,r){if(r===null)return;let n=dAf(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function xAf(e){let t=IAf[e??""]??vAf;return{short:new Map([...YQa.short.entries(),...t.short.entries()]),long:t.long}}function XQa(e,t=EAf){if(e.startsWith("--")){let r=e.indexOf("=");if(r>2)return[{name:e.slice(0,r),value:e.slice(r+1),needsNext:!1}];let n=e.slice(2);return[{name:e,needsNext:t.long.has(n)}]}if(e.length===2){let r=e.charAt(1),n=t.short.get(r);return[{name:e,needsNext:n===!0}]}return CAf(e,t.short)}function CAf(e,t){let r=e.slice(1).split(""),n=[];for(let i=0;i<r.length;i++){let o=r[i],s=t.get(o);if(s===void 0)return[{name:e,needsNext:!1}];if(s){let a=r.slice(i+1).join("");if(a&&![...a].every(c=>t.has(c)))return n.push({name:`-${o}`,value:a,needsNext:!1}),n}n.push({name:`-${o}`,needsNext:s})}return n}function wAf(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=XQa(n),o=r+1;for(let s of i){let a={name:s.name,value:s.value,absorbedNext:!1,isGlobal:!0};s.needsNext&&a.value===void 0&&o<e.length&&(a.value=String(e[o]),a.absorbedNext=!0,o++),t.push(a)}r=o}return{flags:t,taskIndex:r}}function SAf(e,t,r=[]){let n=xAf(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(MU(a)){o.push(...GHe(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let d=e[p];MU(d)?o.push(...GHe(d)):o.push(String(d))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let u=XQa(c,n),l=s+1;for(let p of u){let d={name:p.name,value:p.value,absorbedNext:!1,isGlobal:!1};p.needsNext&&d.value===void 0&&l<e.length&&!MU(e[l])&&(d.value=String(e[l]),d.absorbedNext=!0,l++),r.push(d)}s=l}return{flags:r,positionals:i,pathspecs:o}}function*TAf({write:e}){for(let t of e)for(let r of OAf){let n=r(t.key);n&&(yield n)}}function UU(e,t,r=String(e)){let n=typeof e=="string"?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(i){if(n.test(i))return{category:t,message:`Configuring ${r} is not permitted without enabling ${t}`}}}function LU(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return UU(r,t,e)}function*BAf(e,t){for(let r of t)for(let n of PAf){let i=n(e,r.name);i&&(yield i)}}function mRt(e,t,r,n=String(t)){let i=typeof t=="string"?new RegExp(`\\s*${t.toLowerCase()}`):t,o=`Use of ${e?`${e} with option `:""}${n} is not permitted without enabling ${r}`;return function(s,a){if((!e||s===e)&&i.test(a))return{category:r,message:o}}}function ZQa(e,t,r){return[...BAf(e,t),...TAf(r)]}function DAf(...e){let{flags:t,taskIndex:r}=wAf(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=SAf(i,n,t),a=yAf(n,t,o);return{task:n,flags:t.map(kAf),paths:s,config:a,vulnerabilities:RAf(ZQa(n,t,a))}}function RAf(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function kAf({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*FAf(e){let t=parseInt(e.git_config_count??"0",10);for(let r=0;r<t;r++){let n=e[`git_config_key_${r}`],i=e[`git_config_value_${r}`];n!==void 0&&(yield{key:n.toLowerCase().trim(),value:i,scope:"env"})}}function*NAf(e){for(let t of Object.keys(e))if(eza(t)){let r=$Qa[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function eza(e){return Object.hasOwn($Qa,e)}function jAf(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(eza(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function QAf(e){let t=jAf(e),r={read:[],write:[...FAf(t)]},n=[...NAf(t),...ZQa(null,[],r)];return{config:r,vulnerabilities:n}}function tza(e,t){return[...DAf(...e).vulnerabilities,...QAf(t).vulnerabilities]}var cAf,uAf,lAf,pAf,YQa,EAf,IAf,vAf,OAf,PAf,$Qa,rza=h(()=>{"use strict";jye();cAf=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),uAf=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),lAf=new Set(["edit","remove-section","rename-section","set","unset"]),pAf=new Set(["get","get-color","get-colorbool","list"]);YQa={short:new Map([["c",!0]])},EAf={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...YQa.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},IAf={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},vAf={short:new Map,long:new Set};OAf=[UU("alias","allowUnsafeAlias"),UU("core.askPass","allowUnsafeAskPass"),UU("core.editor","allowUnsafeEditor"),UU("core.fsmonitor","allowUnsafeFsMonitor"),UU("core.gitProxy","allowUnsafeGitProxy"),UU("core.hooksPath","allowUnsafeHooksPath"),UU("core.pager","allowUnsafePager"),UU("core.sshCommand","allowUnsafeSshCommand"),LU("credential.helper","allowUnsafeCredentialHelper"),LU("diff.command","allowUnsafeDiffExternal"),UU("diff.external","allowUnsafeDiffExternal"),LU("diff.textconv","allowUnsafeDiffTextConv"),LU("filter.clean","allowUnsafeFilter"),LU("filter.smudge","allowUnsafeFilter"),LU("gpg.program","allowUnsafeGpgProgram"),UU("init.templateDir","allowUnsafeTemplateDir"),LU("merge.driver","allowUnsafeMergeDriver"),LU("mergetool.path","allowUnsafeMergeDriver"),LU("mergetool.cmd","allowUnsafeMergeDriver"),LU("protocol.allow","allowUnsafeProtocolOverride"),LU("remote.receivepack","allowUnsafePack"),LU("remote.uploadpack","allowUnsafePack"),UU("sequence.editor","allowUnsafeEditor")];PAf=[mRt(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),mRt("clone",/^-\w*u/,"allowUnsafePack"),mRt("clone","--u","allowUnsafePack"),mRt("push","--exec","allowUnsafePack"),mRt(null,"--template","allowUnsafeTemplateDir")];$Qa={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeConfigPaths",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass"}});function jza(e){return typeof e!="function"?lNe:e}function Qza(e){return typeof e=="function"&&e!==lNe}function zza(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Mza(e,t=0){return Lza(e)&&e.length>t?e[t]:void 0}function uNe(e,t=0){if(Lza(e)&&e.length>t)return e[e.length-1-t]}function Lza(e){return myr(e)}function bRt(e="",t=!0,r=`
|
|
101
101
|
`){return e.split(r).reduce((n,i)=>{let o=t?i.trim():i;return o&&n.push(o),n},[])}function D8i(e,t){return bRt(e,!0).map(r=>t(r))}function R8i(e){return(0,lyr.exists)(e,lyr.FOLDER)}function VU(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Uza(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function pyr(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function NY(e){return Array.isArray(e)?e:[e]}function Vza(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function XHe(e){return NY(e).map(t=>t instanceof String?t:String(t))}function oy(e,t=0){if(e==null)return t;let r=parseInt(e,10);return Number.isNaN(r)?t:r}function gRt(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function ARt(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function _za(e,t){let r={};return t.forEach(n=>{e[n]!==void 0&&(r[n]=e[n])}),r}function m8i(e=0){return new Promise(t=>setTimeout(t,e))}function h8i(e){if(e!==!1)return e}function GP(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function g8i(e,t){let r=MU(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function dyr(e){return!!e&&ERt(e)==="[object Object]"}function qza(e){return typeof e=="function"}function qAf(){throw new Error("LineParser:useMatches not implemented")}function Hza(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...Kza},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}function F8i(e,t=[]){return dyr(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];if(MU(i))r.push(i);else if(g8i(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let o of i)g8i(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function rF(e,t=0,r=!1){let n=[];for(let i=0,o=t<0?e.length:t;i<o;i++)"string|number".includes(typeof e[i])&&n.push(String(e[i]));return F8i(N8i(e),n),r||n.push(...HAf(e)),n}function HAf(e){let t=typeof uNe(e)=="function";return XHe(GP(uNe(e,t?1:0),IRt,[]))}function N8i(e){let t=qza(uNe(e));return GP(uNe(e,t?1:0),dyr)}function m0(e,t=!0){let r=jza(uNe(e));return t||Qza(r)?r:void 0}function y8i(e,t){return e(t.stdOut,t.stdErr)}function kj(e,t,r,n=!0){return NY(r).forEach(i=>{for(let o=bRt(i,n),s=0,a=o.length;s<a;s++){let c=(u=0)=>{if(!(s+u>=a))return o[s+u]};t.some(({parse:u})=>u(c,e))}}),e}function YAf(e){switch(e){case"bare":return Zza();case"root":return Xza()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:hyr,parser:j8i}}function Xza(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:hyr,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Zza(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:hyr,parser:j8i}}function XAf(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}function ZAf(e,t){let r=new eMa(e),n=e?rMa:tMa;return bRt(t).forEach(i=>{let o=i.replace(n,"");r.paths.push(o),(nMa.test(o)?r.folders:r.files).push(o)}),r}function iMa(e){return{commands:gyr,format:"empty",parser:e}}function Rj(e){return{commands:gyr,format:"empty",parser(){throw typeof e=="string"?new Fza(e):e}}}function nF(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function oMa(e){return{commands:e,format:"buffer",parser(t){return t}}}function sMa(e){return e.format==="buffer"}function aMa(e){return e.format==="empty"||!e.commands.length}function eyf(e,t){let{cleanMode:r,options:n,valid:i}=ryf(e);return r?i.options?(n.push(...t),n.some(oyf)?Rj(Q8i):uMa(r,n)):Rj(M8i+JSON.stringify(e)):Rj(z8i)}function uMa(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return ZAf(e==="n",n)}}}function tyf(e){return Array.isArray(e)&&e.every(t=>L8i.has(t))}function ryf(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{nyf(i)?(t=i,n.cleanMode=!0):n.options=n.options&&iyf(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function nyf(e){return e==="f"||e==="n"}function iyf(e){return/^-[a-z]$/i.test(e)&&L8i.has(e.charAt(1))}function oyf(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}function syf(e){let t=new fMa;for(let r of pMa(e))t.addValue(r.file,String(r.key),r.value);return t}function ayf(e,t){let r=null,n=[],i=new Map;for(let o of pMa(e,t))o.key===t&&(n.push(r=o.value),i.has(o.file)||i.set(o.file,[]),i.get(o.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function cyf(e){return e.replace(/^(file):/,"")}function*pMa(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;n<i;){let o=cyf(r[n++]),s=r[n++],a=t;if(s.includes(`
|
|
102
102
|
`)){let c=zza(s,`
|
|
103
103
|
`);a=c[0],s=c[1]}yield{file:o,key:a,value:s}}}function c8i(e,t){return typeof e=="string"&&Object.hasOwn(I8i,e)?e:t}function lyf(e,t,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(o){return o}}}function pyf(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return ayf(n,e)}}}function fyf(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return syf(r)}}}function dyf(){return{addConfig(e,t,...r){return this._runTask(lyf(e,t,r[0]===!0,c8i(r[1],"local")),m0(arguments))},getConfig(e,t){return this._runTask(pyf(e,c8i(t,void 0)),m0(arguments))},listConfig(...e){return this._runTask(fyf(c8i(e[0],void 0)),m0(arguments))}}}function myf(e){return mMa.has(e)}function hyf(...e){return new AMa().param(...e)}function gyf(e){let t=new Set,r={};return D8i(e,n=>{let[i,o,s]=n.split(KHe);t.add(i),(r[i]=r[i]||[]).push({line:oy(o),path:i,preview:s})}),{paths:t,results:r}}function Ayf(){return{grep(e){let t=m0(arguments),r=rF(arguments);for(let i of gMa)if(r.includes(i))return this._runTask(Rj(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=hyf().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return gyf(i)}},t)}}}function yyf(e,t){let r=["reset"];return EMa(e)&&r.push(`--${e}`),r.push(...t),nF(r)}function byf(e){if(EMa(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function EMa(e){return typeof e=="string"&&IMa.includes(e)}function Eyf(){return(0,cyr.default)("simple-git")}function iza(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...i)=>{e(n,...i),r(n,...i)}:e:(n,...i)=>{e(`%s ${n}`,t,...i),r&&r(n,...i)}}function Iyf(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function U8i(e,t,r,n=Eyf()){let i=e&&`[${e}]`||"",o=[],s=typeof t=="string"?n.extend(t):t,a=Iyf(GP(t,yI),s,n);return u(r);function c(l,p){return VU(o,U8i(e,a.replace(/^[^:]+/,l),p,n))}function u(l){let p=l&&`[${l}]`||"",d=s&&iza(s,p)||lNe,f=iza(n,`${i} ${p}`,d);return Object.assign(s?d:f,{label:e,sibling:c,info:f,step:u})}}function cNe(e,t){return{method:Mza(e.commands)||"",commands:t}}function xyf(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function oza(e,t,r,n){return i=>{r("%s received %L bytes",t,i),n("%B",i),e.push(i)}}function Syf(e,t,r=lNe){let n=o=>{r(null,o)},i=o=>{o?.task===e&&r(o instanceof yRt?Tyf(o):o,void 0)};t.then(n,i)}function Tyf(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=lNe};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,i){return i in e||(n[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),n}}function sza(e,t){return iMa(r=>{if(!R8i(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}function l8i(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=pyr(t,"-B")),nF(t)}function Pyf(){return{checkout(){return this._runTask(l8i(rF(arguments,1)),m0(arguments))},checkoutBranch(e,t){return this._runTask(l8i(["-b",e,t,...rF(arguments)]),m0(arguments))},checkoutLocalBranch(e){return this._runTask(l8i(["-b",e,...rF(arguments)]),m0(arguments))}}}function Ryf(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function kyf(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return kj(Ryf(),[OMa],e)}})}}}function Nyf(e){return kj({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},BMa,e)}function Qyf(e,t,r){return{commands:["-c","core.abbrev=40","commit",...gRt(e,"-m"),...t,...r],format:"utf-8",parser:Nyf}}function zyf(){return{commit(t,...r){let n=m0(arguments),i=e(t)||Qyf(NY(t),NY(GP(r[0],syr,[])),[...XHe(GP(r[1],IRt,[])),...rF(arguments,0,!0)]);return this._runTask(i,n)}};function e(t){return!syr(t)&&Rj("git.commit: requires the commit message to be supplied as a string/string[]")}}function Lyf(){return{firstCommit(){return this._runTask(nF(["rev-list","--max-parents=0","HEAD"],!0),m0(arguments))}}}function Vyf(e,t){let r=["hash-object",e];return t&&r.push("-w"),nF(r,!0)}function qyf(e,t,r){let n=String(r).trim(),i;if(i=PMa.exec(n))return new iyr(e,t,!1,i[1]);if(i=DMa.exec(n))return new iyr(e,t,!0,i[1]);let o="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){o=s.join(" ");break}return new iyr(e,t,/^re/i.test(n),o)}function Wyf(e){return e.includes(V8i)}function Hyf(e=!1,t,r){let n=["init",...r];return e&&!Wyf(n)&&n.splice(1,0,V8i),{commands:n,format:"utf-8",parser(i){return qyf(n.includes("--bare"),t,i)}}}function _8i(e){for(let t=0;t<e.length;t++){let r=q8i.exec(e[t]);if(r)return`--${r[1]}`}return""}function Jyf(e){return q8i.test(e)}function kMa(e=""){let t=FMa[e];return r=>kj(new RMa,t,r,!1)}function Xyf(e,t){return t.reduce((r,n,i)=>(r[n]=e[i]||"",r),Object.create({diff:null}))}function jMa(e=H8i,t=QMa,r=""){let n=kMa(r);return function(i){let o=bRt(i.trim(),!1,G8i).map(function(s){let a=s.split(W8i),c=Xyf(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}function Zyf(e){let t=_8i(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Ayr(r)||{commands:r,format:"utf-8",parser:kMa(t)}}function Ayr(e){let t=e.filter(Jyf);if(t.length>1)return Rj(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return Rj(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}function $yf(e,t){let r=[],n=[];return Object.keys(e).forEach(i=>{r.push(i),n.push(String(e[i]))}),[r,n.join(t)]}function ebf(e){return Object.keys(e).reduce((t,r)=>(r in C8i||(t[r]=e[r]),t),{})}function LMa(e={},t=[]){let r=GP(e.splitter,yI,H8i),n=dyr(e.format)?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,o]=$yf(n,r),s=[],a=[`--pretty=format:${G8i}${o}${W8i}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";s.push(`${e.from||""}${u}${e.to||""}`)}return yI(e.file)&&a.push("--follow",qHe(e.file)),F8i(ebf(e),a),{fields:i,splitter:r,commands:[...a,...s]}}function tbf(e,t,r){let n=jMa(e,t,_8i(r));return{commands:["log",...r],format:"utf-8",parser:n}}function rbf(){return{log(...r){let n=m0(arguments),i=LMa(N8i(arguments),XHe(GP(arguments[0],IRt,[]))),o=t(...r)||Ayr(i.commands)||e(i);return this._runTask(o,n)}};function e(r){return tbf(r.splitter,r.fields,r.commands)}function t(r,n){return yI(r)&&yI(n)&&Rj("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}function f8i(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function lza(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:oy(t&&t[1]||"0"),delta:oy(r&&r[1]||"0")}}function GMa(e,t){return kj({remoteMessages:new HMa},WMa,t)}function sbf(e,t){let r=kj(new _Ma,JMa,[e,t]);return r.message&&r}function yza(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=XMa(t,r);if(n.failed)throw new yRt(n);return n}}:Rj("Git.merge requires at least one option")}function ubf(e,t,r){let n=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:i,branch:!i,new:!o,alreadyUpdated:o,local:e,remote:t}}function pbf(e={},t){return VU(t,"--tags"),Y8i(e,t)}function Y8i(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),pyr(r,"-v"),VU(r,"--verbose"),VU(r,"--porcelain"),{commands:r,format:"utf-8",parser:ZMa}}function fbf(){return{showBuffer(){let e=["show",...rF(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(oMa(e),m0(arguments))},show(){let e=["show",...rF(arguments,1)];return this._runTask(nF(e),m0(arguments))}}}function vza(e){let[t,r]=e.split(KHe);return{from:r||t,to:t}}function oL(e,t,r){return[`${e}${t}`,r]}function d8i(e,...t){return t.map(r=>oL(e,r,(n,i)=>n.conflicted.push(i)))}function hbf(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.slice(3));case r.charAt(1):return n(" ",r.charAt(0),r.slice(2));default:return}function n(i,o,s){let a=`${i}${o}`,c=r6a.get(a);c&&c(e,s),a!=="##"&&a!=="!!"&&e.files.push(new t6a(s,i,o))}}function Abf(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!i6a.includes(r))],parser(r){return n6a(r)}}}function uyr(e=0,t=0,r=0,n="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function bbf(){return uyr(0,0,0,"",!1)}function Ebf(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Ibf,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(X8i));n(t)}})}}}function Ibf(e){return e===X8i?bbf():kj(uyr(0,0,0,e),o6a,e)}function Cza(e,t,r,...n){return yI(r)?t(r,GP(n[0],yI),rF(arguments)):Rj(`git.${e}() requires a string 'repoPath'`)}function xbf(){return{clone(e,...t){return this._runTask(Cza("clone",S8i,GP(e,yI),...t),m0(arguments))},mirror(e,...t){return this._runTask(Cza("mirror",s6a,GP(e,yI),...t),m0(arguments))}}}function Tbf(e,t){return nF(["apply",...t,...e])}function Bbf(e,t){return{branch:e,hash:t,success:!0}}function Pbf(e){return{branch:e,hash:null,success:!1}}function d6a(e,t){return t===1&&O8i.test(e)}function Oza(e){return e?e.charAt(0):""}function h6a(e,t=!1){return kj(new m6a,t?[A6a]:g6a,e)}function b6a(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function Nbf(e){let t=b6a(e),r=e.includes("--show-current"),n=["branch",...e];return n.length===1&&n.push("-a"),n.includes("-v")||n.splice(1,0,"-v"),{format:"utf-8",commands:n,parser(i,o){return t?yyr(i,o).all[0]:h6a(i,r)}}}function jbf(){return{format:"utf-8",commands:["branch","-v"],parser(e){return h6a(e)}}}function Qbf(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return yyr(r,n)},onError({exitCode:r,stdOut:n},i,o,s){if(!d6a(String(i),r))return s(i);o(n)}}}function zbf(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,i){return yyr(n,i).branches[e]},onError({exitCode:n,stdErr:i,stdOut:o},s,a,c){if(!d6a(String(s),n))return c(s);throw new yRt(r.parser(ARt(o),ARt(i)),String(s))}};return r}function Lbf(e){let t=e.trim().replace(/^["']|["']$/g,"");return t&&(0,E6a.normalize)(t)}function Vbf(e){return{commands:["check-ignore",...e],format:"utf-8",parser:I6a}}function qbf(e,t){return kj({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},x6a,[e,t])}function Wbf(e){return/^--upload-pack(=|$)/.test(e)}function Hbf(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(Wbf)?Rj("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:qbf}}function Jbf(e){return kj({moves:[]},w6a,e)}function Xbf(e,t){return{commands:["mv","-v",...NY(e),t],format:"utf-8",parser:Jbf}}function $bf(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(i,o){return J8i(i,o)},onError(i,o,s,a){let c=sbf(ARt(i.stdOut),ARt(i.stdErr));if(c)return a(new yRt(c));a(o)}}}function t0f(e){let t={};return O6a(e,([r])=>t[r]={name:r}),Object.values(t)}function r0f(e){let t={};return O6a(e,([r,n,i])=>{Object.hasOwn(t,r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&n&&(t[r].refs[i.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function O6a(e,t){D8i(e,r=>t(r.split(/\s+/)))}function i0f(e,t,r){return nF(["remote","add",...r,e,t])}function o0f(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?r0f:t0f}}function s0f(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),nF(t)}function a0f(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),nF(t)}function c0f(e){return nF(["remote","remove",e])}function l0f(e={},t){let r=LMa(e),n=["stash","list",...r.commands,...t],i=jMa(r.splitter,r.fields,_8i(n));return Ayr(n)||{commands:n,format:"utf-8",parser:i}}function f0f(e,t){return byr(["add",e,t])}function d0f(e){return byr(["init",...e])}function byr(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),nF(t)}function m0f(e){return byr(["update",...e])}function g0f(e,t){let r=Number.isNaN(e),n=Number.isNaN(t);return r!==n?r?1:-1:r?R6a(e,t):0}function R6a(e,t){return e===t?0:e>t?1:-1}function A0f(e){return e.trim()}function tyr(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}function b0f(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return k6a(r,t)}}}function E0f(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function I0f(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}function w0f(e){return e?[{type:"spawn.before",action(n,i){e.aborted&&i.kill(new JHe(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,i){function o(){i.kill(new JHe(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),i.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function S0f(e={}){return{type:"spawn.args",action(t,{env:r}){for(let n of tza(t,r))if(e[n.category]!==!0)throw new JHe(void 0,"unsafe",n.message);return t}}}function T0f(e){let t=gRt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}function O0f({onClose:e=!0,onExit:t=50}={}){function r(){let i=-1,o={close:(0,HHe.deferred)(),closeTimeout:(0,HHe.deferred)(),exit:(0,HHe.deferred)(),exitTimeout:(0,HHe.deferred)()},s=Promise.race([e===!1?Pza:o.closeTimeout.promise,t===!1?Pza:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){i=a,o.close.done()},exit(a){i=a,o.exit.done()},get exitCode(){return i},result:s}}function n(i,o,s){i!==!1&&(i===!0?o.promise:o.promise.then(()=>m8i(i))).then(s.done)}return{type:"spawn.after",async action(i,{spawned:o,close:s}){let a=r(),c=!0,u=()=>{c=!1};o.stdout?.on("data",u),o.stderr?.on("data",u),o.on("error",u),o.on("close",l=>a.close(l)),o.on("exit",l=>a.exit(l));try{await a.result,c&&await m8i(50),s(a.exitCode)}catch(l){s(a.exitCode,l)}}}}function P0f(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function Rza(e,t){if(e.length<1||e.length>2)throw new JHe(void 0,"binary",B0f);if(e.some(P0f))if(t)console.warn(Dza);else throw new JHe(void 0,"binary",Dza);let[n,i]=e;return{binary:n,prefix:i}}function D0f(e,t=["git"],r=!1){let n=Rza(NY(t),r);e.on("binary",i=>{n=Rza(NY(i),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}function R0f(e){return!!(e.exitCode&&e.stdErr.length)}function k0f(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function F0f(e=!1,t=R0f,r=k0f){return(n,i)=>!e&&n||!t(i)?n:r(i)}function kza(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new Eue(void 0,n.toString("utf-8"))}:{error:n}}}}function j0f(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,s){return r.includes(s.method)?Uza(o,t):o}},{type:"spawn.after",action(o,s){s.commands.includes(t)&&s.spawned.stderr?.on("data",a=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(a.toString("utf8"));c&&e({method:s.method,stage:Q0f(c[1]),progress:oy(c[2]),processed:oy(c[3]),total:oy(c[4])})})}}]}function Q0f(e){return String(e.toLowerCase().split(" ",1))||"unknown"}function z0f(e){let t=_za(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function M0f({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,i){let o;function s(){o&&clearTimeout(o),o=setTimeout(c,e)}function a(){i.spawned.stdout?.off("data",s),i.spawned.stderr?.off("data",s),i.spawned.off("exit",a),i.spawned.off("close",a),o&&clearTimeout(o)}function c(){a(),i.kill(new JHe(void 0,"timeout","block timeout reached"))}r&&i.spawned.stdout?.on("data",s),t&&i.spawned.stderr?.on("data",s),i.spawned.on("exit",a),i.spawned.on("close",a),s()}}}function L0f(){return{type:"spawn.args",action(e){let t=[],r;function n(i){(r=r||[]).push(...i)}for(let i=0;i<e.length;i++){let o=e[i];if(MU(o)){n(GHe(o));continue}if(o==="--"){n(e.slice(i+1).flatMap(s=>MU(s)&&GHe(s)||s));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}function V0f(e,t){let r=new N0f,n=Hza(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!R8i(n.baseDir))throw new C0f(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(T0f(n.config)),r.add(S0f(n.unsafe)),r.add(O0f(n.completion)),n.abort&&r.add(w0f(n.abort)),n.progress&&r.add(j0f(n.progress)),n.timeout&&r.add(M0f(n.timeout)),n.spawnOptions&&r.add(z0f(n.spawnOptions)),r.add(L0f()),r.add(kza(F0f(!0))),n.errors&&r.add(kza(n.errors)),D0f(r,n.binary,n.unsafe?.allowUnsafeCustomBinary),new U0f(n,r)}var lyr,cyr,wMa,u6a,E6a,HHe,N6a,B8i,zAf,P8i,MAf,Eo,LAf,zx,UAf,Iv,Eue,zye,yRt,YHe,Fza,Nza,KHe,lNe,ERt,fyr,IRt,Gza,yI,syr,myr,k8i,A8i,VAf,ayr,_Af,Bl,Qye,GAf,Kza,WAf,KAf,JAf,Jza,Tu,Yza,b8i,hyr,j8i,$za,eMa,tMa,rMa,nMa,$Af,E8i,gyr,vv,cMa,Q8i,z8i,M8i,ryr,L8i,lMa,fMa,uyf,I8i,dMa,u8i,mMa,hMa,gMa,hRt,nza,AMa,yMa,bMa,nyr,IMa,vMa,xMa,CMa,vyf,x8i,Cyf,SMa,TMa,wyf,Oyf,Byf,Dyf,OMa,Fyf,BMa,jyf,Myf,Uyf,_yf,iyr,PMa,DMa,Gyf,V8i,Kyf,q8i,vRt,RMa,Yyf,p8i,aza,cza,uza,FMa,NMa,G8i,W8i,H8i,QMa,zMa,MMa,K8i,C8i,UMa,oyr,VMa,nbf,w8i,_Ma,ibf,qMa,obf,WMa,HMa,KMa,pza,fza,dza,mza,JMa,hza,J8i,YMa,gza,XMa,Aza,abf,cbf,bza,ZMa,Eza,lbf,$Ma,e6a,dbf,Iza,t6a,mbf,xza,r6a,n6a,gbf,i6a,ybf,X8i,o6a,vbf,S8i,s6a,Cbf,a6a,T8i,wbf,c6a,wza,l6a,Sbf,p6a,Obf,f6a,Dbf,Sza,O8i,Tza,yyr,Rbf,m6a,kbf,g6a,A6a,Fbf,y6a,Mbf,I6a,Ubf,v6a,_bf,x6a,Gbf,C6a,Kbf,w6a,Ybf,S6a,Zbf,T6a,e0f,n0f,B6a,u0f,P6a,p0f,D6a,h0f,Bza,k6a,y0f,F6a,v0f,x0f,C0f,JHe,Pza,B0f,Dza,N0f,U0f,pNe,Eyr=h(()=>{"use strict";lyr=be(o8i(),1);jye();jye();cyr=be(vA(),1),wMa=require("child_process");jye();jye();u6a=be(dRt(),1),E6a=require("path");jye();rza();HHe=be(dRt(),1),N6a=require("events");jye();B8i=Object.defineProperty,zAf=Object.getOwnPropertyDescriptor,P8i=Object.getOwnPropertyNames,MAf=Object.prototype.hasOwnProperty,Eo=(e,t)=>function(){return e&&(t=(0,e[P8i(e)[0]])(e=0)),t},LAf=(e,t)=>function(){return t||(0,e[P8i(e)[0]])((t={exports:{}}).exports,t),t.exports},zx=(e,t)=>{for(var r in t)B8i(e,r,{get:t[r],enumerable:!0})},UAf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of P8i(t))!MAf.call(e,i)&&i!==r&&B8i(e,i,{get:()=>t[i],enumerable:!(n=zAf(t,i))||n.enumerable});return e},Iv=e=>UAf(B8i({},"__esModule",{value:!0}),e),zye=Eo({"src/lib/errors/git-error.ts"(){"use strict";Eue=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),YHe=Eo({"src/lib/errors/git-response-error.ts"(){"use strict";zye(),yRt=class extends Eue{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Nza=Eo({"src/lib/errors/task-configuration-error.ts"(){"use strict";zye(),Fza=class extends Eue{constructor(e){super(void 0,e)}}}});fyr=Eo({"src/lib/utils/util.ts"(){"use strict";k8i(),KHe="\0",lNe=()=>{},ERt=Object.prototype.toString.call.bind(Object.prototype.toString)}});k8i=Eo({"src/lib/utils/argument-filters.ts"(){"use strict";fyr(),IRt=e=>Array.isArray(e),Gza=e=>typeof e=="number",yI=e=>typeof e=="string"||MU(e),syr=e=>yI(e)||Array.isArray(e)&&e.every(yI),myr=e=>e==null||"number|boolean|function".includes(typeof e)?!1:typeof e.length=="number"}}),VAf=Eo({"src/lib/utils/exit-codes.ts"(){"use strict";A8i=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(A8i||{})}}),_Af=Eo({"src/lib/utils/git-output-streams.ts"(){"use strict";ayr=class Wza{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new Wza(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});GAf=Eo({"src/lib/utils/line-parser.ts"(){"use strict";Bl=class{constructor(e,t){this.matches=[],this.useMatches=qAf,this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,o)=>this.addMatch(i,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Qye=class extends Bl{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});WAf=Eo({"src/lib/utils/simple-git-options.ts"(){"use strict";Kza={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});KAf=Eo({"src/lib/utils/task-options.ts"(){"use strict";k8i(),fyr()}});JAf=Eo({"src/lib/utils/task-parser.ts"(){"use strict";fyr()}}),Jza={};zx(Jza,{ExitCodes:()=>A8i,GitOutputStreams:()=>ayr,LineParser:()=>Bl,NOOP:()=>lNe,NULL:()=>KHe,RemoteLineParser:()=>Qye,append:()=>VU,appendTaskOptions:()=>F8i,asArray:()=>NY,asCamelCase:()=>Vza,asFunction:()=>jza,asNumber:()=>oy,asStringArray:()=>XHe,bufferToString:()=>ARt,callTaskParser:()=>y8i,createInstanceConfig:()=>Hza,delay:()=>m8i,filterArray:()=>IRt,filterFunction:()=>qza,filterHasLength:()=>myr,filterNumber:()=>Gza,filterPlainObject:()=>dyr,filterPrimitives:()=>g8i,filterString:()=>yI,filterStringOrStringArray:()=>syr,filterType:()=>GP,first:()=>Mza,folderExists:()=>R8i,forEachLineWithContent:()=>D8i,getTrailingOptions:()=>rF,including:()=>Uza,isUserFunction:()=>Qza,last:()=>uNe,objectToString:()=>ERt,orVoid:()=>h8i,parseStringResponse:()=>kj,pick:()=>_za,prefixedArray:()=>gRt,remove:()=>pyr,splitOn:()=>zza,toLinesWithContent:()=>bRt,trailingFunctionArgument:()=>m0,trailingOptionsArgument:()=>N8i});Tu=Eo({"src/lib/utils/index.ts"(){"use strict";k8i(),VAf(),_Af(),GAf(),WAf(),KAf(),JAf(),fyr()}}),Yza={};zx(Yza,{CheckRepoActions:()=>b8i,checkIsBareRepoTask:()=>Zza,checkIsRepoRootTask:()=>Xza,checkIsRepoTask:()=>YAf});$za=Eo({"src/lib/tasks/check-is-repo.ts"(){"use strict";Tu(),b8i=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(b8i||{}),hyr=({exitCode:e},t,r,n)=>{if(e===128&&XAf(t))return r(Buffer.from("false"));n(t)},j8i=e=>e.trim()==="true"}});$Af=Eo({"src/lib/responses/CleanSummary.ts"(){"use strict";Tu(),eMa=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},tMa=/^[a-z]+\s*/i,rMa=/^[a-z]+\s+[a-z]+\s*/i,nMa=/\/$/}}),E8i={};zx(E8i,{EMPTY_COMMANDS:()=>gyr,adhocExecTask:()=>iMa,configurationErrorTask:()=>Rj,isBufferTask:()=>sMa,isEmptyTask:()=>aMa,straightThroughBufferTask:()=>oMa,straightThroughStringTask:()=>nF});vv=Eo({"src/lib/tasks/task.ts"(){"use strict";Nza(),gyr=[]}}),cMa={};zx(cMa,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Q8i,CONFIG_ERROR_MODE_REQUIRED:()=>z8i,CONFIG_ERROR_UNKNOWN_OPTION:()=>M8i,CleanOptions:()=>ryr,cleanTask:()=>uMa,cleanWithOptionsTask:()=>eyf,isCleanOptionsArray:()=>tyf});lMa=Eo({"src/lib/tasks/clean.ts"(){"use strict";$Af(),Tu(),vv(),Q8i="Git clean interactive mode is not supported",z8i='Git clean mode parameter ("n" or "f") is required',M8i="Git clean unknown option found in: ",ryr=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(ryr||{}),L8i=new Set(["i",...XHe(Object.values(ryr))])}});uyf=Eo({"src/lib/responses/ConfigList.ts"(){"use strict";Tu(),fMa=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=uNe(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);Object.hasOwn(n,t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});dMa=Eo({"src/lib/tasks/config.ts"(){"use strict";uyf(),Tu(),I8i=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(I8i||{})}});hMa=Eo({"src/lib/tasks/diff-name-status.ts"(){"use strict";u8i=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(u8i||{}),mMa=new Set(Object.values(u8i))}});yMa=Eo({"src/lib/tasks/grep.ts"(){"use strict";Tu(),vv(),gMa=["-h"],hRt=Symbol("grepQuery"),AMa=class{constructor(){this[nza]=[]}*[(nza=hRt,Symbol.iterator)](){for(let e of this[hRt])yield e}and(...e){return e.length&&this[hRt].push("--and","(",...gRt(e,"-e"),")"),this}param(...e){return this[hRt].push(...gRt(e,"-e")),this}}}}),bMa={};zx(bMa,{ResetMode:()=>nyr,getResetMode:()=>byf,resetTask:()=>yyf});vMa=Eo({"src/lib/tasks/reset.ts"(){"use strict";Tu(),vv(),nyr=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(nyr||{}),IMa=XHe(Object.values(nyr))}});xMa=Eo({"src/lib/git-logger.ts"(){"use strict";Tu(),cyr.default.formatters.L=e=>String(myr(e)?e.length:"-"),cyr.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):ERt(e)}}),vyf=Eo({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";zye(),xMa(),CMa=class v8i{constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let r=v8i.getName(t.commands[0]),n=U8i(this.logLabel,r);return{task:t,logger:n,name:r}}push(t){let r=this.createProgress(t);return r.logger("Adding task to the queue, commands = %o",t.commands),this._queue.set(t,r),r}fatal(t){for(let[r,{logger:n}]of Array.from(this._queue.entries()))r===t.task?(n.info("Failed %o",t),n("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):n.info("A fatal exception occurred in a previous task, the queue has been purged: %o",t.message),this.complete(r);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(t){this.withProgress(t)&&this._queue.delete(t)}attempt(t){let r=this.withProgress(t);if(!r)throw new Eue(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(t="empty"){return`task:${t}:${++v8i.counter}`}static{this.counter=0}}}});Cyf=Eo({"src/lib/runners/git-executor-chain.ts"(){"use strict";zye(),vv(),Tu(),vyf(),x8i=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new CMa}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){let t=await this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return await(aMa(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n))}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}}onFatalException(e,t){let r=t instanceof Eue?Object.assign(t,{task:e}):new Eue(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(e,t){let r=this._plugins.exec("spawn.binary","",cNe(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],{...cNe(e,e.commands),env:{...this.env}}),i=await this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=await this.handleTaskData(e,n,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),sMa(e)?y8i(e.parser,o):y8i(e.parser,o.asStrings())}async attemptEmptyTask(e,t){return t("empty task bypassing child process to call to task's parser"),e.parser(this)}handleTaskData(e,t,r,n){let{exitCode:i,rejection:o,stdOut:s,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",i);let{error:l}=this._plugins.exec("task.error",{error:o},{...cNe(e,t),...r});if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,p=>{n.info("custom error handler treated as success"),n("custom error returned a %s",ERt(p)),c(new ayr(Array.isArray(p)?Buffer.concat(p):p,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,a.length,o),u(l);n.info("retrieving task output complete"),c(new ayr(Buffer.concat(s),Buffer.concat(a)))})}async gitResponse(e,t,r,n,i){let o=i.sibling("output"),s=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},cNe(e,e.commands));return new Promise(a=>{let c=[],u=[];i.info("%s %o",t,r),i("%O",s);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,{...cNe(e,r),kill(d){l=d||l}});let p=(0,wMa.spawn)(t,r,s);p.stdout.on("data",oza(c,"stdOut",i,o.step("stdOut"))),p.stderr.on("data",oza(u,"stdErr",i,o.step("stdErr"))),p.on("error",xyf(u,i)),n&&(i("Passing child process stdOut/stdErr to custom outputHandler"),n(t,p.stdout,p.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...cNe(e,r),spawned:p,close(d,f){a({stdOut:c,stdErr:u,exitCode:d,rejection:l||f})},kill(d){p.killed||(l=d,p.kill("SIGINT"))}})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,{...cNe(e,t),kill(n){r=n||r}}),r}}}}),SMa={};zx(SMa,{GitExecutor:()=>TMa});wyf=Eo({"src/lib/runners/git-executor.ts"(){"use strict";Cyf(),TMa=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new x8i(this,this._scheduler,this._plugins)}chain(){return new x8i(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});Oyf=Eo({"src/lib/task-callback.ts"(){"use strict";YHe(),Tu()}});Byf=Eo({"src/lib/tasks/change-working-directory.ts"(){"use strict";Tu(),vv()}});Dyf=Eo({"src/lib/tasks/checkout.ts"(){"use strict";Tu(),vv()}});Fyf=Eo({"src/lib/tasks/count-objects.ts"(){"use strict";Tu(),OMa=new Bl(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Vza(t);Object.hasOwn(e,n)&&(e[n]=oy(r))})}});jyf=Eo({"src/lib/parsers/parse-commit.ts"(){"use strict";Tu(),BMa=[new Bl(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new Bl(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new Bl(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new Bl(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;n==="-"?e.summary.deletions=i:n==="+"&&(e.summary.insertions=i)})]}});Myf=Eo({"src/lib/tasks/commit.ts"(){"use strict";jyf(),Tu(),vv()}});Uyf=Eo({"src/lib/tasks/first-commit.ts"(){"use strict";Tu(),vv()}});_yf=Eo({"src/lib/tasks/hash-object.ts"(){"use strict";vv()}});Gyf=Eo({"src/lib/responses/InitSummary.ts"(){"use strict";iyr=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},PMa=/^Init.+ repository in (.+)$/,DMa=/^Rein.+ in (.+)$/}});Kyf=Eo({"src/lib/tasks/init.ts"(){"use strict";Gyf(),V8i="--bare"}});vRt=Eo({"src/lib/args/log-format.ts"(){"use strict";q8i=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Yyf=Eo({"src/lib/responses/DiffSummary.ts"(){"use strict";RMa=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});NMa=Eo({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";vRt(),Yyf(),hMa(),Tu(),p8i=[new Bl(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:oy(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new Bl(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:oy(r),after:oy(n),binary:!0})}),new Bl(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=oy(t),e.insertions=oy(n?.[1]),e.deletions=oy(i?.[1])})],aza=[new Bl(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let i=oy(t),o=oy(r);e.changed++,e.insertions+=i,e.deletions+=o,e.files.push({file:n,changes:i+o,insertions:i,deletions:o,binary:!1})}),new Bl(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],cza=[new Bl(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],uza=[new Bl(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,i,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:h8i(myf(t)&&t),from:h8i(!!o&&n!==o&&n),similarity:oy(r)})})],FMa={"":p8i,"--stat":p8i,"--numstat":aza,"--name-status":uza,"--name-only":cza}}});zMa=Eo({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";Tu(),NMa(),vRt(),G8i="\xF2\xF2\xF2\xF2\xF2\xF2 ",W8i=" \xF2\xF2",H8i=" \xF2 ",QMa=["hash","date","message","refs","author_name","author_email"]}}),MMa={};zx(MMa,{diffSummaryTask:()=>Zyf,validateLogFormatConfig:()=>Ayr});K8i=Eo({"src/lib/tasks/diff.ts"(){"use strict";vRt(),NMa(),vv()}});UMa=Eo({"src/lib/tasks/log.ts"(){"use strict";vRt(),zMa(),Tu(),vv(),K8i(),C8i=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(C8i||{})}}),nbf=Eo({"src/lib/responses/MergeSummary.ts"(){"use strict";oyr=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},VMa=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),ibf=Eo({"src/lib/responses/PullSummary.ts"(){"use strict";w8i=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},_Ma=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});obf=Eo({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";Tu(),qMa=[new Qye(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=f8i(e.remoteMessages);Object.assign(i,{[n]:oy(r)})}),new Qye(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=f8i(e.remoteMessages);Object.assign(i,{[n]:oy(r)})}),new Qye(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let i=f8i(e.remoteMessages);i.total=lza(t),i.reused=lza(r),i.packReused=oy(n)})]}});KMa=Eo({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";Tu(),obf(),WMa=[new Qye(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...qMa,new Qye([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Qye([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:oy(t),summary:r,url:n}})],HMa=class{constructor(){this.all=[]}}}});YMa=Eo({"src/lib/parsers/parse-pull.ts"(){"use strict";ibf(),Tu(),KMa(),pza=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,fza=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,dza=/^(create|delete) mode \d+ (.+)/,mza=[new Bl(pza,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new Bl(fza,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new Bl(dza,(e,[t,r])=>{VU(e.files,r),VU(t==="create"?e.created:e.deleted,r)})],JMa=[new Bl(/^from\s(.+)$/i,(e,[t])=>{e.remote=t}),new Bl(/^fatal:\s(.+)$/,(e,[t])=>{e.message=t}),new Bl(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,i])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],hza=(e,t)=>kj(new w8i,mza,[e,t]),J8i=(e,t)=>Object.assign(new w8i,hza(e,t),GMa(e,t))}}),abf=Eo({"src/lib/parsers/parse-merge.ts"(){"use strict";nbf(),Tu(),YMa(),gza=[new Bl(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new Bl(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new oyr(t,r))}),new Bl(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new oyr(t,r,{deleteRef:n}))}),new Bl(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new oyr(t,null))}),new Bl(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],XMa=(e,t)=>Object.assign(Aza(e,t),J8i(e,t)),Aza=e=>kj(new VMa,gza,e)}});cbf=Eo({"src/lib/tasks/merge.ts"(){"use strict";YHe(),abf(),vv()}});lbf=Eo({"src/lib/parsers/parse-push.ts"(){"use strict";Tu(),KMa(),bza=[new Bl(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new Bl(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new Bl(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(ubf(t,r,n))}),new Bl(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:n}}),new Bl(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,i])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:i}}})],ZMa=(e,t)=>{let r=Eza(e,t),n=GMa(e,t);return{...r,...n}},Eza=(e,t)=>kj({pushed:[]},bza,[e,t])}}),$Ma={};zx($Ma,{pushTagsTask:()=>pbf,pushTask:()=>Y8i});e6a=Eo({"src/lib/tasks/push.ts"(){"use strict";lbf(),Tu()}});dbf=Eo({"src/lib/tasks/show.ts"(){"use strict";Tu(),vv()}}),mbf=Eo({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Iza=/^(.+)\0(.+)$/,t6a=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Iza.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});gbf=Eo({"src/lib/responses/StatusSummary.ts"(){"use strict";Tu(),mbf(),xza=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},r6a=new Map([oL(" ","A",(e,t)=>e.created.push(t)),oL(" ","D",(e,t)=>e.deleted.push(t)),oL(" ","M",(e,t)=>e.modified.push(t)),oL("A"," ",(e,t)=>{e.created.push(t),e.staged.push(t)}),oL("A","M",(e,t)=>{e.created.push(t),e.staged.push(t),e.modified.push(t)}),oL("D"," ",(e,t)=>{e.deleted.push(t),e.staged.push(t)}),oL("M"," ",(e,t)=>{e.modified.push(t),e.staged.push(t)}),oL("M","M",(e,t)=>{e.modified.push(t),e.staged.push(t)}),oL("R"," ",(e,t)=>{e.renamed.push(vza(t))}),oL("R","M",(e,t)=>{let r=vza(t);e.renamed.push(r),e.modified.push(r.to)}),oL("!","!",(e,t)=>{(e.ignored=e.ignored||[]).push(t)}),oL("?","?",(e,t)=>e.not_added.push(t)),...d8i("A","A","U"),...d8i("D","D","U"),...d8i("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,s=/\son\s(\S+?)(?=\.{3}|$)/,a=r.exec(t);e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=i.exec(t),e.current=GP(a?.[1],yI,null),a=o.exec(t),e.tracking=GP(a?.[1],yI,null),a=s.exec(t),a&&(e.current=GP(a?.[1],yI,e.current)),e.detached=/\(no branch\)/.test(t)}]]),n6a=function(e){let t=e.split(KHe),r=new xza;for(let n=0,i=t.length;n<i;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=KHe+(t[n++]||"")),hbf(r,o))}return r}}});ybf=Eo({"src/lib/tasks/status.ts"(){"use strict";gbf(),i6a=["--null","-z"]}});vbf=Eo({"src/lib/tasks/version.ts"(){"use strict";Tu(),X8i="installed=false",o6a=[new Bl(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,i=""])=>{Object.assign(e,uyr(oy(t),oy(r),oy(n),i))}),new Bl(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,i=""])=>{Object.assign(e,uyr(oy(t),oy(r),n,i))})]}});Cbf=Eo({"src/lib/tasks/clone.ts"(){"use strict";vv(),Tu(),S8i=(e,t,r)=>{let n=["clone",...r];return yI(e)&&n.push(qHe(e)),yI(t)&&n.push(qHe(t)),nF(n)},s6a=(e,t,r)=>(VU(r,"--mirror"),S8i(e,t,r))}}),a6a={};zx(a6a,{SimpleGitApi:()=>T8i});wbf=Eo({"src/lib/simple-git-api.ts"(){"use strict";Oyf(),Byf(),Dyf(),Fyf(),Myf(),dMa(),Uyf(),yMa(),_yf(),Kyf(),UMa(),cbf(),e6a(),dbf(),ybf(),vv(),vbf(),Tu(),Cbf(),T8i=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&Syf(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(nF(["add",...NY(e)]),m0(arguments))}cwd(e){let t=m0(arguments);return typeof e=="string"?this._runTask(sza(e,this._executor),t):typeof e?.path=="string"?this._runTask(sza(e.path,e.root&&this._executor||void 0),t):this._runTask(Rj("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(Vyf(e,t===!0),m0(arguments))}init(e){return this._runTask(Hyf(e===!0,this._executor.cwd,rF(arguments)),m0(arguments))}merge(){return this._runTask(yza(rF(arguments)),m0(arguments))}mergeFromTo(e,t){return yI(e)&&yI(t)?this._runTask(yza([e,t,...rF(arguments)]),m0(arguments,!1)):this._runTask(Rj("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Y8i({remote:GP(arguments[0],yI),branch:GP(arguments[1],yI)},rF(arguments));return this._runTask(e,m0(arguments))}stash(){return this._runTask(nF(["stash",...rF(arguments)]),m0(arguments))}status(){return this._runTask(Abf(rF(arguments)),m0(arguments))}},Object.assign(T8i.prototype,Pyf(),xbf(),zyf(),dyf(),kyf(),Lyf(),Ayf(),rbf(),fbf(),Ebf())}}),c6a={};zx(c6a,{Scheduler:()=>l6a});Sbf=Eo({"src/lib/runners/scheduler.ts"(){"use strict";Tu(),xMa(),wza=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,u6a.createDeferred)();return{promise:t,done:r,id:e}}})(),l6a=class{constructor(e=2){this.concurrency=e,this.logger=U8i("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=VU(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),pyr(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=VU(this.pending,wza());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),p6a={};zx(p6a,{applyPatchTask:()=>Tbf});Obf=Eo({"src/lib/tasks/apply-patch.ts"(){"use strict";vv()}});Dbf=Eo({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";f6a=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});Rbf=Eo({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";Dbf(),Tu(),Sza=/(\S+)\s+\(\S+\s([^)]+)\)/,O8i=/^error[^']+'([^']+)'/m,Tza=[new Bl(Sza,(e,[t,r])=>{let n=Bbf(t,r);e.all.push(n),e.branches[t]=n}),new Bl(O8i,(e,[t])=>{let r=Pbf(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],yyr=(e,t)=>kj(new f6a,Tza,[e,t])}}),kbf=Eo({"src/lib/responses/BranchSummary.ts"(){"use strict";m6a=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:i}}}}});Fbf=Eo({"src/lib/parsers/parse-branch.ts"(){"use strict";kbf(),Tu(),g6a=[new Bl(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,i])=>{e.push(Oza(t),!0,r,n,i)}),new Bl(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,n,i])=>{e.push(Oza(t),!1,r,n,i)})],A6a=new Bl(/^(\S+)$/s,(e,[t])=>{e.push("*",!1,t,"","")})}}),y6a={};zx(y6a,{branchLocalTask:()=>jbf,branchTask:()=>Nbf,containsDeleteBranchCommand:()=>b6a,deleteBranchTask:()=>zbf,deleteBranchesTask:()=>Qbf});Mbf=Eo({"src/lib/tasks/branch.ts"(){"use strict";YHe(),Rbf(),Fbf(),Tu()}});Ubf=Eo({"src/lib/responses/CheckIgnore.ts"(){"use strict";I6a=e=>e.split(/\n/g).map(Lbf).filter(Boolean)}}),v6a={};zx(v6a,{checkIgnoreTask:()=>Vbf});_bf=Eo({"src/lib/tasks/check-ignore.ts"(){"use strict";Ubf()}});Gbf=Eo({"src/lib/parsers/parse-fetch.ts"(){"use strict";Tu(),x6a=[new Bl(/From (.+)$/,(e,[t])=>{e.remote=t}),new Bl(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new Bl(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new Bl(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new Bl(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,i])=>{e.updated.push({name:n,tracking:i,to:r,from:t})})]}}),C6a={};zx(C6a,{fetchTask:()=>Hbf});Kbf=Eo({"src/lib/tasks/fetch.ts"(){"use strict";Gbf(),vv()}});Ybf=Eo({"src/lib/parsers/parse-move.ts"(){"use strict";Tu(),w6a=[new Bl(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),S6a={};zx(S6a,{moveTask:()=>Xbf});Zbf=Eo({"src/lib/tasks/move.ts"(){"use strict";Ybf(),Tu()}}),T6a={};zx(T6a,{pullTask:()=>$bf});e0f=Eo({"src/lib/tasks/pull.ts"(){"use strict";YHe(),YMa(),Tu()}});n0f=Eo({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";Tu()}}),B6a={};zx(B6a,{addRemoteTask:()=>i0f,getRemotesTask:()=>o0f,listRemotesTask:()=>s0f,remoteTask:()=>a0f,removeRemoteTask:()=>c0f});u0f=Eo({"src/lib/tasks/remote.ts"(){"use strict";n0f(),vv()}}),P6a={};zx(P6a,{stashListTask:()=>l0f});p0f=Eo({"src/lib/tasks/stash-list.ts"(){"use strict";vRt(),zMa(),K8i(),UMa()}}),D6a={};zx(D6a,{addSubModuleTask:()=>f0f,initSubModuleTask:()=>d0f,subModuleTask:()=>byr,updateSubModuleTask:()=>m0f});h0f=Eo({"src/lib/tasks/sub-module.ts"(){"use strict";vv()}});y0f=Eo({"src/lib/responses/TagList.ts"(){"use strict";Bza=class{constructor(e,t){this.all=e,this.latest=t}},k6a=function(e,t=!1){let r=e.split(`
|
|
@@ -129,7 +129,7 @@ GFS4: `),console.error(e)});gE[MO]||(iUa=global[MO]||[],sUa(gE,iUa),gE.close=(fu
|
|
|
129
129
|
|
|
130
130
|
`)?n.split(`
|
|
131
131
|
|
|
132
|
-
`):n.split(",")}switch(e){case"hoist-pattern":case"public-hoist-pattern":return r(t)}return t}TUa.exports=nqi});var FUa=b(kUa=>{"use strict";var DUa=require("os"),Cue=require("path"),RUa=DUa.tmpdir(),nxf=process.getuid?process.getuid():process.pid,ixf=()=>!0,BUa=process.platform==="win32",PUa={editor:()=>process.env.EDITOR||process.env.VISUAL||(BUa?"notepad.exe":"vi"),shell:()=>BUa?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},oxf={fromString:()=>process.umask()},pKe=DUa.homedir();pKe?process.env.HOME=pKe:pKe=Cue.resolve(RUa,"npm-"+nxf);var sxf=process.platform==="win32"?"npm-cache":".npm",axf=process.platform==="win32"&&process.env.APPDATA||pKe,cxf=Cue.resolve(axf,sxf),pbr,TNe;Object.defineProperty(kUa,"defaults",{get:function(){return pbr||(process.env.PREFIX?TNe=process.env.PREFIX:process.platform==="win32"?TNe=Cue.dirname(process.execPath):(TNe=Cue.dirname(Cue.dirname(process.execPath)),process.env.DESTDIR&&(TNe=Cue.join(process.env.DESTDIR,TNe))),pbr={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:cxf,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:PUa.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Cue.resolve(TNe,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Cue.resolve(pKe,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:TNe,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:PUa.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:RUa,unicode:ixf(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:Cue.resolve(pKe,".npmrc"),umask:process.umask?process.umask():oxf.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},pbr)}})});var jUa=b((qgb,iqi)=>{"use strict";var ONe=require("path"),uxf=OUa(),NUa=FUa();iqi.exports=(e,t,r)=>{let n=new uxf(Object.assign({},NUa.defaults,r),t);n.add(Object.assign({},e),"cli");let i=[],o=!1;if(require.resolve.paths){let u=require.resolve.paths("npm"),l;try{l=require.resolve("npm",{paths:u.slice(-1)})}catch{o=!0}l&&i.push(n.addFile(ONe.resolve(ONe.dirname(l),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=ONe.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let u=ONe.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(u,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let u=ONe.resolve(n.get("prefix"),"etc");n.root.globalconfig=ONe.resolve(u,"npmrc"),n.root.globalignorefile=ONe.resolve(u,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let c=n.get("cafile");return c&&n.loadCAFile(c),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(iqi.exports,"defaults",{get(){return NUa.defaults},enumerable:!0})});var qUa=b((Ggb,_Ua)=>{"use strict";var QUa=jUa(),zUa=":_authToken",MUa=":_auth",LUa=":username",UUa=":_password";_Ua.exports=function(){let t,r;arguments.length>=2?(t=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?t=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:QUa()).config,t=t||r.npmrc.get("registry")||QUa.defaults.registry,VUa(t,r)||pxf(r.npmrc)};function lxf(e,t){let r=new URL(t,new URL(e.startsWith("//")?`./${e}`:e,"resolve://"));if(r.protocol==="resolve:"){let{pathname:n,search:i,hash:o}=r;return n+i+o}return r.toString()}function VUa(e,t){let r=e instanceof URL?e:new URL(e.startsWith("//")?`http:${e}`:e),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=dxf(i,t.npmrc);if(o)return o;if(!t.recursive)return/\/$/.test(e)?void 0:VUa(new URL("./",r),t);r.pathname=lxf(fxf(n),"..")||"/"}}function pxf(e){return e.get("_auth")?{token:fbr(e.get("_auth")),type:"Basic"}:void 0}function fxf(e){return e[e.length-1]==="/"?e:e+"/"}function dxf(e,t){let r=mxf(t.get(e+zUa)||t.get(e+"/"+zUa));if(r)return r;let n=t.get(e+LUa)||t.get(e+"/"+LUa),i=t.get(e+UUa)||t.get(e+"/"+UUa),o=hxf(n,i);if(o)return o;let s=gxf(t.get(e+MUa)||t.get(e+"/"+MUa));if(s)return s}function fbr(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(t,r){return process.env[r]})}function mxf(e){return e?{token:fbr(e),type:"Bearer"}:void 0}function hxf(e,t){if(!e||!t)return;let r=Buffer.from(fbr(t),"base64").toString("utf8");return{token:Buffer.from(e+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:e}}function gxf(e){return e?{token:fbr(e),type:"Basic"}:void 0}});async function oqi(e,t={}){let{version:r="latest"}=t,{omitDeprecated:n=!0}=t,i=e.split("/")[0],o=t.registryUrl??H9i(i),s=new URL(encodeURIComponent(e).replace(/^%40/,"@"),o),a=(0,GUa.default)(o.toString(),{recursive:!0}),c={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete c.accept,a&&(c.authorization=`${a.type} ${a.token}`);let u;try{u=await w4a(s,{headers:c,keepalive:!0}).json()}catch(p){throw p?.response?.status===404?new dbr(e):p}if(t.allVersions)return u;let l=new fKe(e,r);if(u["dist-tags"][r]){let{time:p}=u;u=u.versions[u["dist-tags"][r]],u.time=p}else if(r){let p=!!u.versions[r];if(n&&!p)for(let[f,m]of Object.entries(u.versions))m.deprecated&&delete u.versions[f];if(!p){let f=Object.keys(u.versions);if(r=WUa.default.maxSatisfying(f,r),!r)throw l}let{time:d}=u;if(u=u.versions[r],u.time=d,!u)throw l}return u}var GUa,WUa,dbr,fKe,sqi=h(()=>{"use strict";S4a();Y4a();GUa=be(qUa(),1),WUa=be(cw(),1),dbr=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},fKe=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}}});async function BNe(e,t){let{version:r}=await oqi(e.toLowerCase(),t);return r}var mbr=h(()=>{"use strict";sqi();sqi()});async function gbr({packageName:e,generatorInvocation:t}){if(t.language==null||e==null)return;let r=bxf(t.outputMode),n=await vxf({packageName:e,language:t.language,githubRepository:Lxf(t),registryInfo:r});return n==null?void 0:VRt.default.inc(n,"patch")??void 0}function bxf(e){let t=e.type;switch(t){case"publish":return Ixf(e);case"publishV2":return Exf(e.publishV2);case"downloadFiles":return hbr.Empty;case"github":return XUa(e.publishInfo);case"githubV2":return XUa(e.githubV2.publishInfo);default:Ee(t)}}function XUa(e){if(e==null)return{registryUrl:void 0,token:void 0,username:void 0};let t=e.type;switch(t){case"npm":return{registryUrl:e.registryUrl,token:e.token,username:void 0};case"maven":return{registryUrl:e.registryUrl,token:e.credentials?.password,username:e.credentials?.username};case"pypi":return{registryUrl:e.registryUrl,token:e.credentials?.password,username:void 0};case"nuget":return{registryUrl:e.registryUrl,token:e.apiKey,username:void 0};case"rubygems":return{registryUrl:e.registryUrl,token:e.apiKey,username:void 0};case"crates":return{registryUrl:e.registryUrl,token:e.token,username:void 0};case"postman":return{registryUrl:void 0,token:void 0,username:void 0};default:Ee(t)}}function Exf(e){let t=e.type;switch(t){case"npmOverride":return{registryUrl:e.npmOverride?.registryUrl,token:e.npmOverride?.token,username:void 0};case"mavenOverride":return{registryUrl:e.mavenOverride?.registryUrl,token:e.mavenOverride?.password,username:e.mavenOverride?.username};case"pypiOverride":return{registryUrl:e.pypiOverride?.registryUrl,token:e.pypiOverride?.password,username:void 0};case"nugetOverride":return{registryUrl:e.nugetOverride?.registryUrl,token:e.nugetOverride?.apiKey,username:void 0};case"rubyGemsOverride":return{registryUrl:e.rubyGemsOverride?.registryUrl,token:e.rubyGemsOverride?.apiKey,username:void 0};case"cratesOverride":return{registryUrl:e.cratesOverride?.registryUrl,token:e.cratesOverride?.token,username:void 0};case"postman":return{registryUrl:void 0,token:void 0,username:void 0};default:Ee(t)}}function Ixf(e){let t=e.registryOverrides;return t.npm!=null?{registryUrl:t.npm.registryUrl,token:t.npm.token,username:void 0}:t.maven!=null?{registryUrl:t.maven.registryUrl,token:t.maven.password,username:t.maven.username}:hbr.Empty}async function vxf({packageName:e,language:t,githubRepository:r,registryInfo:n}){let i=[];switch(t){case"typescript":i.push(await Sxf(e,n));break;case"python":i.push(await Oxf(e,n));break;case"java":i.push(await Pxf(e,n));break;case"csharp":i.push(await Rxf(e,n));break;case"ruby":i.push(await Fxf(e,n));break;case"go":i.push(await Nxf(e,n));break;case"rust":i.push(await Qxf(e,n));break;case"php":case"swift":break}return r!=null&&(i.push(await zxf(r)),i.push(await Mxf(r))),xxf(i)}function xxf(e){let t,r;for(let n of e){if(n==null)continue;let i=VRt.default.parse(n,{loose:!0});i!=null&&(r==null||VRt.default.gt(i,r))&&(t=n,r=i)}return t}function Cxf(e){return e.registryUrl!=null&&e.registryUrl!==""?e.registryUrl:Axf}function wxf(e){return e.token!=null&&e.token!==""?e.token:process.env.NPM_TOKEN}async function Sxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=Cxf(t),n=wxf(t);if(n!=null){let i=encodeURIComponent(e).replace(/^%40/,"@"),o=await fetch(`${r}/${i}`,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*",authorization:`Bearer ${n}`}});if(o.ok){let a=(await o.json())["dist-tags"]?.latest;if(a!=null)return a}}return await BNe(e)}catch{return}}function Txf(e){let t=e.registryUrl;return t==null||t===""||t.includes("upload.pypi.org")||t.includes("pypi.org/legacy")?HUa:`${t.replace(/\/+$/,"").replace(/\/legacy$/,"").replace(/\/simple$/,"")}/pypi`}async function Oxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=Txf(t),n={},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=`Bearer ${i}`);let s=Object.keys(n).length>0?await fetch(`${r}/${e}/json`,{headers:n}):await fetch(`${r}/${e}/json`);return s.ok?(await s.json()).info.version:void 0}catch{return}}function Bxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("oss.sonatype.org")||t.includes("s01.oss.sonatype.org")||t.includes("central.sonatype.com")||t.includes("search.maven.org"),aqi}async function Pxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=e.split(":");if(r.length<2||!r[0]||!r[1])return;let n=r[0],i=r[1],o=Bxf(t),s={},a=t.token??void 0;if(a!=null&&a!==""){let p=t.username??"";s.authorization=`Basic ${Buffer.from(`${p}:${a}`).toString("base64")}`}let c=`${o}?q=g:${encodeURIComponent(n)}+AND+a:${encodeURIComponent(i)}&rows=1&wt=json`,l=Object.keys(s).length>0?await fetch(c,{headers:s}):await fetch(c);if(l.ok){let d=(await l.json()).response?.docs?.[0]?.latestVersion;if(d!=null)return d}return}catch{return}}function Dxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("nuget.org")?KUa:`${t.replace(/\/+$/,"")}/v3-flatcontainer`}async function Rxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=Dxf(t),n={},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=`Basic ${Buffer.from(`:${i}`).toString("base64")}`);let o=`${r}/${e.toLowerCase()}/index.json`,a=Object.keys(n).length>0?await fetch(o,{headers:n}):await fetch(o);if(a.ok){let u=(await a.json()).versions??[];for(let l=u.length-1;l>=0;l--){let p=u[l];if(p!=null&&!p.includes("-"))return p}}return}catch{return}}function kxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("rubygems.org")?JUa:`${t.replace(/\/+$/,"")}/api/v1/gems`}async function Fxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=kxf(t),n={},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=i);let s=Object.keys(n).length>0?await fetch(`${r}/${e}.json`,{headers:n}):await fetch(`${r}/${e}.json`);if(s.ok){let a=await s.json();if(a.version!=null)return a.version}return}catch{return}}async function Nxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{if(/\/v\d+$/.test(e))return await cqi(e);let r=10,n=[];n.push(cqi(e).then(s=>({version:s,major:0})));for(let s=2;s<=r;s++)n.push(cqi(`${e}/v${s}`).then(a=>({version:a,major:s})));let i=await Promise.all(n),o;for(let s of i)s.version!=null&&(o==null||VRt.default.gt(s.version,o))&&(o=s.version);return o}catch{return}}async function cqi(e){try{let t=e.replace(/[A-Z]/g,n=>"!"+n.toLowerCase()),r=await fetch(`${yxf}/${t}/@latest`);if(r.ok){let n=await r.json();if(n.Version!=null)return n.Version.replace(/^v/,"")}return}catch{return}}function jxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("crates.io")?YUa:t.replace(/\/+$/,"")}async function Qxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=jxf(t),n={"user-agent":"fern-cli (https://buildwithfern.com)"},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=`Bearer ${i}`);let o=await fetch(`${r}/${e}`,{headers:n});if(o.ok){let a=(await o.json()).crate?.max_stable_version;if(a!=null)return a}return}catch{return}}async function zxf(e){try{return await Yyr(e)}catch{return}}async function Mxf(e){try{let t=await Kyr(e,".fern/metadata.json");if(t!=null){let r=JSON.parse(t);if(r.sdkVersion!=null)return r.sdkVersion}return}catch{return}}function Lxf(e){if(e.outputMode.type==="githubV2")return`${e.outputMode.githubV2.owner}/${e.outputMode.githubV2.repo}`}var VRt,hbr,Axf,HUa,aqi,KUa,JUa,yxf,YUa,ZUa=h(()=>{"use strict";kt();jY();mbr();VRt=be(cw(),1);(function(e){e.Empty={registryUrl:void 0,token:void 0,username:void 0}})(hbr||(hbr={}));Axf="https://registry.npmjs.org",HUa="https://pypi.org/pypi",aqi="https://search.maven.org/solrsearch/select",KUa="https://api.nuget.org/v3-flatcontainer",JUa="https://rubygems.org/api/v1/gems",yxf="https://proxy.golang.org",YUa="https://crates.io/api/v1/crates"});function QY(){let e=Uxf(process.env.FERN_INVOKER);return e??($Ua()?"ci":"manual")}function zY(){if(process.env.GITHUB_ACTIONS==="true")return"github";if(process.env.GITLAB_CI==="true")return"gitlab";if(process.env.BITBUCKET_BUILD_NUMBER!=null)return"bitbucket";if(process.env.CIRCLECI==="true")return"circleci";if(process.env.TRAVIS==="true")return"travis";if(process.env.JENKINS_URL!=null||process.env.JENKINS_HOME!=null)return"jenkins";if(process.env.TF_BUILD!=null)return"azure-pipelines";if(process.env.BUILDKITE==="true")return"buildkite";if(process.env.CODEBUILD_BUILD_ID!=null)return"codebuild";if(process.env.TEAMCITY_VERSION!=null)return"teamcity";if(process.env.DRONE==="true")return"drone";if(process.env.SEMAPHORE==="true")return"semaphore";if(process.env.APPVEYOR==="true"||process.env.APPVEYOR==="True")return"appveyor";if($Ua())return"unknown"}function Uxf(e){if(e==null)return;let t=e.trim().toLowerCase();switch(t){case"autopilot":case"autorelease":case"ci":case"manual":return t;default:return}}function $Ua(){return!!(process.env.CI||process.env.CONTINUOUS_INTEGRATION||process.env.GITHUB_ACTIONS||process.env.GITLAB_CI||process.env.CIRCLECI||process.env.TRAVIS||process.env.JENKINS_URL||process.env.JENKINS_HOME||process.env.TF_BUILD||process.env.BUILDKITE||process.env.CODEBUILD_BUILD_ID||process.env.TEAMCITY_VERSION||process.env.BITBUCKET_BUILD_NUMBER||process.env.DRONE||process.env.SEMAPHORE||process.env.APPVEYOR||process.env.BUDDY_WORKSPACE_ID||process.env.WERCKER_RUN_ID)}var eVa=h(()=>{"use strict"});var tVa=h(()=>{"use strict"});var Nj,rVa=h(()=>{"use strict";r8i();Nj=class extends b7{definition;sources;type="fern";constructor({definition:t,sources:r,...n}){super(n),this.definition=t,this.sources=r??[]}async getDefinition(){return this.definition}async toFernWorkspace({context:t},r,n,i){return this}getSources(){return this.sources}getAbsoluteFilePaths(){return[this.absoluteFilePath]}}});function Abr({generatorInvocation:e,version:t,userProvidedVersion:r,packageName:n,context:i}){if(e.language==="python"){let o=Jf.pypi({version:t,packageName:n});return i.logger.debug(`Created PyPiPublishTarget: version ${t} package name: ${n}`),o}else if(e.language==="typescript"){if(r!=null){let o=n??(typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config.packageJson?.name:void 0),s=Jf.npm({version:r,packageName:o,tokenEnvironmentVariable:""});return i.logger.debug(`Created NpmPublishTarget: version ${r} package name: ${o}`),s}return}else if(e.language==="rust"){let o=Jf.crates({version:t,packageName:n});return i.logger.debug(`Created CratesPublishTarget: version ${t} package name: ${n}`),o}else if(e.language==="go"){if(r!=null){let o=(()=>{let a=e.raw?.config;if(typeof a!="object"||a===null)return;let c=a.module;if(!(c==null||typeof c.path!="string"))return c.path})(),s=Jf.go({version:r,modulePath:o});return i.logger.debug(`Created GoPublishTarget: version ${r} module path: ${o}`),s}return}else if(e.language==="java"){let o=e.raw?.config,s=(()=>{if(!o||typeof o!="object"||o===null)return;let c=o;if(typeof c.group=="string"&&typeof c.artifact=="string")return{groupId:c.group,artifactId:c.artifact};if(typeof c["package-prefix"]=="string"&&n)return{groupId:c["package-prefix"],artifactId:n};typeof c["package-prefix"]=="string"&&!n&&i.logger.warn("Java generator has package-prefix configured but packageName is missing")})(),a=s?`${s.groupId}:${s.artifactId}`:void 0;if(a){let c=t??"0.0.0",u=Jf.maven({coordinate:a,version:c,usernameEnvironmentVariable:"MAVEN_USERNAME",passwordEnvironmentVariable:"MAVEN_PASSWORD",mavenUrlEnvironmentVariable:"MAVEN_PUBLISH_REGISTRY_URL"});return i.logger.debug(`Created MavenPublishTarget: coordinate ${a} version ${c}`),u}else o&&typeof o=="object"&&i.logger.debug("Java generator config provided but could not construct Maven coordinate. Expected either 'group' and 'artifact' or 'package-prefix' with packageName.");return}else if(e.language==="ruby"){let o=Jf.rubygems({version:t,packageName:n});return i.logger.debug(`Created RubyGemsPublishTarget: version ${t} package name: ${n}`),o}else if(e.language==="php"){let o=n??(()=>{let a=e.raw?.config;if(typeof a!="object"||a===null)return;let c=a.packageName;return typeof c=="string"?c:void 0})(),s=Jf.packagist({version:t,packageName:o});return i.logger.debug(`Created PackagistPublishTarget: version ${t} package name: ${o}`),s}else if(e.language==="csharp"){if(r!=null){let o=n??(typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config["package-id"]:void 0),s=Jf.nuget({version:r,packageName:typeof o=="string"?o:void 0});return i.logger.debug(`Created NugetPublishTarget: version ${r} package name: ${String(o)}`),s}return}}var nVa=h(()=>{"use strict";zn()});function MY(){if(process.env.IGNORE_GIT_IN_METADATA==="true")return"DUMMY";try{let e=(0,uqi.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();return/^[0-9a-f]{40}$/.test(e)?e:void 0}catch{return}}function LY(){if(process.env.IGNORE_GIT_IN_METADATA!=="true")try{return(0,uqi.execSync)("git status --porcelain",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0}catch{return}}var uqi,iVa=h(()=>{"use strict";uqi=require("child_process")});var oVa=h(()=>{"use strict"});var ay,vb,_Rt,sVa,lqi,bI,PNe,Ff,ybr,Rp,dKe,aVa,VS,AE,pqi,_S,bbr,cVa,_ye,uVa,lVa,pVa,fVa,dVa,x7,qRt,Ebr=h(()=>{"use strict";ay="fern",vb="definition",_Rt="openapi",sVa="changelog",lqi="asyncapi",bI="api.yml",PNe="__package__",Ff=`${PNe}.yml`,ybr="dependencies.yml",Rp="generators.yml",dKe="generators.yaml",aVa="dependencies.yml",VS="docs.yml",AE="fern.config.json",pqi="api",_S=".fernignore",bbr="snippet.json",cVa="snippet-templates.json",_ye="default-group",uVa="spec-origin",lVa="async-api",pVa="openapi",fVa="openapi-overrides",dVa="api-settings",x7="apis",qRt="local"});function xr(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let p=0;p<l.length;p++){let d=l[p];d in a||(a[d]=u[d].bind(a))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var c;let u=r?.Parent?new o:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function EI(e){return e&&Object.assign(GRt,e),GRt}var fqi,Ibr,C7,qye,GRt,mKe=h(()=>{"use strict";fqi=Object.freeze({status:"aborted"});Ibr=Symbol("zod_brand"),C7=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},qye=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},GRt={}});var bi={};Z(bi,{BIGINT_FORMAT_RANGES:()=>vqi,Class:()=>mqi,NUMBER_FORMAT_RANGES:()=>Iqi,aborted:()=>Kye,allowsEval:()=>Aqi,assert:()=>Wxf,assertEqual:()=>Vxf,assertIs:()=>qxf,assertNever:()=>Gxf,assertNotEqual:()=>_xf,assignProp:()=>Wye,base64ToUint8Array:()=>hVa,base64urlToUint8Array:()=>uCf,cached:()=>gKe,captureStackTrace:()=>xbr,cleanEnum:()=>cCf,cleanRegex:()=>KRt,clone:()=>iF,cloneDef:()=>Kxf,createTransparentProxy:()=>eCf,defineLazy:()=>kp,esc:()=>vbr,escapeRegex:()=>_U,extend:()=>nCf,finalizeIssue:()=>jj,floatSafeRemainder:()=>hqi,getElementAtPath:()=>Jxf,getEnumValues:()=>HRt,getLengthableOrigin:()=>XRt,getParsedType:()=>$xf,getSizableOrigin:()=>YRt,hexToUint8Array:()=>pCf,isObject:()=>DNe,isPlainObject:()=>Hye,issue:()=>AKe,joinValues:()=>en,jsonStringifyReplacer:()=>hKe,merge:()=>oCf,mergeDefs:()=>wue,normalizeParams:()=>Oi,nullish:()=>Gye,numKeys:()=>Zxf,objectClone:()=>Hxf,omit:()=>rCf,optionalKeys:()=>Eqi,parsedType:()=>hi,partial:()=>sCf,pick:()=>tCf,prefixIssues:()=>sL,primitiveTypes:()=>bqi,promiseAllObject:()=>Yxf,propertyKeyTypes:()=>JRt,randomString:()=>Xxf,required:()=>aCf,safeExtend:()=>iCf,shallowClone:()=>yqi,slugify:()=>gqi,stringifyPrimitive:()=>si,uint8ArrayToBase64:()=>gVa,uint8ArrayToBase64url:()=>lCf,uint8ArrayToHex:()=>fCf,unwrapMessage:()=>WRt});function Vxf(e){return e}function _xf(e){return e}function qxf(e){}function Gxf(e){throw new Error("Unexpected value in exhaustive check")}function Wxf(e){}function HRt(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function en(e,t="|"){return e.map(r=>si(r)).join(t)}function hKe(e,t){return typeof t=="bigint"?t.toString():t}function gKe(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Gye(e){return e==null}function KRt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function hqi(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let o=r>i?r:i,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}function kp(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==mVa)return n===void 0&&(n=mVa,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Hxf(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Wye(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function wue(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Kxf(e){return wue(e._zod.def)}function Jxf(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Yxf(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<t.length;o++)i[t[o]]=n[o];return i})}function Xxf(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function vbr(e){return JSON.stringify(e)}function gqi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function DNe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Hye(e){if(DNe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(DNe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function yqi(e){return Hye(e)?{...e}:Array.isArray(e)?[...e]:e}function Zxf(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function _U(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function iF(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Oi(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function eCf(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,o){return t??(t=e()),Reflect.set(t,n,i,o)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function si(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Eqi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function tCf(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=wue(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return Wye(this,"shape",s),s},checks:[]});return iF(e,o)}function rCf(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=wue(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Wye(this,"shape",s),s},checks:[]});return iF(e,o)}function nCf(e,t){if(!Hye(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=wue(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Wye(this,"shape",o),o}});return iF(e,i)}function iCf(e,t){if(!Hye(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=wue(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Wye(this,"shape",n),n}});return iF(e,r)}function oCf(e,t){let r=wue(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Wye(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return iF(e,r)}function sCf(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=wue(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Wye(this,"shape",c),c},checks:[]});return iF(t,s)}function aCf(e,t,r){let n=wue(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(let s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return Wye(this,"shape",o),o}});return iF(t,n)}function Kye(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function sL(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function WRt(e){return typeof e=="string"?e:e?.message}function jj(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=WRt(e.inst?._zod.def?.error?.(e))??WRt(t?.error?.(e))??WRt(r.customError?.(e))??WRt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function YRt(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function XRt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function hi(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function AKe(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function cCf(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function hVa(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function gVa(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function uCf(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return hVa(t+r)}function lCf(e){return gVa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pCf(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function fCf(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var mVa,xbr,Aqi,$xf,JRt,bqi,Iqi,vqi,mqi,za=h(()=>{"use strict";mVa=Symbol("evaluating");xbr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Aqi=gKe(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});$xf=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},JRt=new Set(["string","number","symbol"]),bqi=new Set(["string","number","bigint","boolean","symbol","undefined"]);Iqi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},vqi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};mqi=class{constructor(...t){}}});function $Rt(e,t=r=>r.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function ekt(e,t=r=>r.message){let r={_errors:[]},n=i=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>n({issues:s}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let s=r,a=0;for(;a<o.path.length;){let c=o.path[a];a===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return n(e),r}function xqi(e,t=r=>r.message){let r={errors:[]},n=(i,o=[])=>{var s,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{let u=[...o,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,p=0;for(;p<u.length;){let d=u[p],f=p===u.length-1;typeof d=="string"?(l.properties??(l.properties={}),(s=l.properties)[d]??(s[d]={errors:[]}),l=l.properties[d]):(l.items??(l.items=[]),(a=l.items)[d]??(a[d]={errors:[]}),l=l.items[d]),f&&l.errors.push(t(c)),p++}}};return n(e),r}function yVa(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function Cqi(e){let t=[],r=[...e.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${yVa(n.path)}`);return t.join(`
|
|
132
|
+
`):n.split(",")}switch(e){case"hoist-pattern":case"public-hoist-pattern":return r(t)}return t}TUa.exports=nqi});var FUa=b(kUa=>{"use strict";var DUa=require("os"),Cue=require("path"),RUa=DUa.tmpdir(),nxf=process.getuid?process.getuid():process.pid,ixf=()=>!0,BUa=process.platform==="win32",PUa={editor:()=>process.env.EDITOR||process.env.VISUAL||(BUa?"notepad.exe":"vi"),shell:()=>BUa?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},oxf={fromString:()=>process.umask()},pKe=DUa.homedir();pKe?process.env.HOME=pKe:pKe=Cue.resolve(RUa,"npm-"+nxf);var sxf=process.platform==="win32"?"npm-cache":".npm",axf=process.platform==="win32"&&process.env.APPDATA||pKe,cxf=Cue.resolve(axf,sxf),pbr,TNe;Object.defineProperty(kUa,"defaults",{get:function(){return pbr||(process.env.PREFIX?TNe=process.env.PREFIX:process.platform==="win32"?TNe=Cue.dirname(process.execPath):(TNe=Cue.dirname(Cue.dirname(process.execPath)),process.env.DESTDIR&&(TNe=Cue.join(process.env.DESTDIR,TNe))),pbr={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:cxf,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:PUa.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Cue.resolve(TNe,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Cue.resolve(pKe,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:TNe,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:PUa.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:RUa,unicode:ixf(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:Cue.resolve(pKe,".npmrc"),umask:process.umask?process.umask():oxf.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},pbr)}})});var jUa=b((qgb,iqi)=>{"use strict";var ONe=require("path"),uxf=OUa(),NUa=FUa();iqi.exports=(e,t,r)=>{let n=new uxf(Object.assign({},NUa.defaults,r),t);n.add(Object.assign({},e),"cli");let i=[],o=!1;if(require.resolve.paths){let u=require.resolve.paths("npm"),l;try{l=require.resolve("npm",{paths:u.slice(-1)})}catch{o=!0}l&&i.push(n.addFile(ONe.resolve(ONe.dirname(l),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=ONe.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let u=ONe.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(u,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let u=ONe.resolve(n.get("prefix"),"etc");n.root.globalconfig=ONe.resolve(u,"npmrc"),n.root.globalignorefile=ONe.resolve(u,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let c=n.get("cafile");return c&&n.loadCAFile(c),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(iqi.exports,"defaults",{get(){return NUa.defaults},enumerable:!0})});var qUa=b((Ggb,_Ua)=>{"use strict";var QUa=jUa(),zUa=":_authToken",MUa=":_auth",LUa=":username",UUa=":_password";_Ua.exports=function(){let t,r;arguments.length>=2?(t=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?t=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:QUa()).config,t=t||r.npmrc.get("registry")||QUa.defaults.registry,VUa(t,r)||pxf(r.npmrc)};function lxf(e,t){let r=new URL(t,new URL(e.startsWith("//")?`./${e}`:e,"resolve://"));if(r.protocol==="resolve:"){let{pathname:n,search:i,hash:o}=r;return n+i+o}return r.toString()}function VUa(e,t){let r=e instanceof URL?e:new URL(e.startsWith("//")?`http:${e}`:e),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=dxf(i,t.npmrc);if(o)return o;if(!t.recursive)return/\/$/.test(e)?void 0:VUa(new URL("./",r),t);r.pathname=lxf(fxf(n),"..")||"/"}}function pxf(e){return e.get("_auth")?{token:fbr(e.get("_auth")),type:"Basic"}:void 0}function fxf(e){return e[e.length-1]==="/"?e:e+"/"}function dxf(e,t){let r=mxf(t.get(e+zUa)||t.get(e+"/"+zUa));if(r)return r;let n=t.get(e+LUa)||t.get(e+"/"+LUa),i=t.get(e+UUa)||t.get(e+"/"+UUa),o=hxf(n,i);if(o)return o;let s=gxf(t.get(e+MUa)||t.get(e+"/"+MUa));if(s)return s}function fbr(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(t,r){return process.env[r]})}function mxf(e){return e?{token:fbr(e),type:"Bearer"}:void 0}function hxf(e,t){if(!e||!t)return;let r=Buffer.from(fbr(t),"base64").toString("utf8");return{token:Buffer.from(e+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:e}}function gxf(e){return e?{token:fbr(e),type:"Basic"}:void 0}});async function oqi(e,t={}){let{version:r="latest"}=t,{omitDeprecated:n=!0}=t,i=e.split("/")[0],o=t.registryUrl??H9i(i),s=new URL(encodeURIComponent(e).replace(/^%40/,"@"),o),a=(0,GUa.default)(o.toString(),{recursive:!0}),c={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};t.fullMetadata&&delete c.accept,a&&(c.authorization=`${a.type} ${a.token}`);let u;try{u=await w4a(s,{headers:c,keepalive:!0}).json()}catch(p){throw p?.response?.status===404?new dbr(e):p}if(t.allVersions)return u;let l=new fKe(e,r);if(u["dist-tags"][r]){let{time:p}=u;u=u.versions[u["dist-tags"][r]],u.time=p}else if(r){let p=!!u.versions[r];if(n&&!p)for(let[f,m]of Object.entries(u.versions))m.deprecated&&delete u.versions[f];if(!p){let f=Object.keys(u.versions);if(r=WUa.default.maxSatisfying(f,r),!r)throw l}let{time:d}=u;if(u=u.versions[r],u.time=d,!u)throw l}return u}var GUa,WUa,dbr,fKe,sqi=h(()=>{"use strict";S4a();Y4a();GUa=be(qUa(),1),WUa=be(cw(),1),dbr=class extends Error{constructor(t){super(`Package \`${t}\` could not be found`),this.name="PackageNotFoundError"}},fKe=class extends Error{constructor(t,r){super(`Version \`${r}\` for package \`${t}\` could not be found`),this.name="VersionNotFoundError"}}});async function BNe(e,t){let{version:r}=await oqi(e.toLowerCase(),t);return r}var mbr=h(()=>{"use strict";sqi();sqi()});async function gbr({packageName:e,generatorInvocation:t}){if(t.language==null||e==null)return;let r=bxf(t.outputMode),n=await vxf({packageName:e,language:t.language,githubRepository:Lxf(t),registryInfo:r});return n==null?void 0:VRt.default.inc(n,"patch")??void 0}function bxf(e){let t=e.type;switch(t){case"publish":return Ixf(e);case"publishV2":return Exf(e.publishV2);case"downloadFiles":return hbr.Empty;case"github":return XUa(e.publishInfo);case"githubV2":return XUa(e.githubV2.publishInfo);default:Ee(t)}}function XUa(e){if(e==null)return{registryUrl:void 0,token:void 0,username:void 0};let t=e.type;switch(t){case"npm":return{registryUrl:e.registryUrl,token:e.token,username:void 0};case"maven":return{registryUrl:e.registryUrl,token:e.credentials?.password,username:e.credentials?.username};case"pypi":return{registryUrl:e.registryUrl,token:e.credentials?.password,username:void 0};case"nuget":return{registryUrl:e.registryUrl,token:e.apiKey,username:void 0};case"rubygems":return{registryUrl:e.registryUrl,token:e.apiKey,username:void 0};case"crates":return{registryUrl:e.registryUrl,token:e.token,username:void 0};case"postman":return{registryUrl:void 0,token:void 0,username:void 0};default:Ee(t)}}function Exf(e){let t=e.type;switch(t){case"npmOverride":return{registryUrl:e.npmOverride?.registryUrl,token:e.npmOverride?.token,username:void 0};case"mavenOverride":return{registryUrl:e.mavenOverride?.registryUrl,token:e.mavenOverride?.password,username:e.mavenOverride?.username};case"pypiOverride":return{registryUrl:e.pypiOverride?.registryUrl,token:e.pypiOverride?.password,username:void 0};case"nugetOverride":return{registryUrl:e.nugetOverride?.registryUrl,token:e.nugetOverride?.apiKey,username:void 0};case"rubyGemsOverride":return{registryUrl:e.rubyGemsOverride?.registryUrl,token:e.rubyGemsOverride?.apiKey,username:void 0};case"cratesOverride":return{registryUrl:e.cratesOverride?.registryUrl,token:e.cratesOverride?.token,username:void 0};case"postman":return{registryUrl:void 0,token:void 0,username:void 0};default:Ee(t)}}function Ixf(e){let t=e.registryOverrides;return t.npm!=null?{registryUrl:t.npm.registryUrl,token:t.npm.token,username:void 0}:t.maven!=null?{registryUrl:t.maven.registryUrl,token:t.maven.password,username:t.maven.username}:hbr.Empty}async function vxf({packageName:e,language:t,githubRepository:r,registryInfo:n}){let i=[];switch(t){case"typescript":i.push(await Sxf(e,n));break;case"python":i.push(await Oxf(e,n));break;case"java":i.push(await Pxf(e,n));break;case"csharp":i.push(await Rxf(e,n));break;case"ruby":i.push(await Fxf(e,n));break;case"go":i.push(await Nxf(e,n));break;case"rust":i.push(await Qxf(e,n));break;case"php":case"swift":break}return r!=null&&(i.push(await zxf(r)),i.push(await Mxf(r))),xxf(i)}function xxf(e){let t,r;for(let n of e){if(n==null)continue;let i=VRt.default.parse(n,{loose:!0});i!=null&&(r==null||VRt.default.gt(i,r))&&(t=n,r=i)}return t}function Cxf(e){return e.registryUrl!=null&&e.registryUrl!==""?e.registryUrl:Axf}function wxf(e){return e.token!=null&&e.token!==""?e.token:process.env.NPM_TOKEN}async function Sxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=Cxf(t),n=wxf(t);if(n!=null){let i=encodeURIComponent(e).replace(/^%40/,"@"),o=await fetch(`${r}/${i}`,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*",authorization:`Bearer ${n}`}});if(o.ok){let a=(await o.json())["dist-tags"]?.latest;if(a!=null)return a}}return await BNe(e)}catch{return}}function Txf(e){let t=e.registryUrl;return t==null||t===""||t.includes("upload.pypi.org")||t.includes("pypi.org/legacy")?HUa:`${t.replace(/\/+$/,"").replace(/\/legacy$/,"").replace(/\/simple$/,"")}/pypi`}async function Oxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=Txf(t),n={},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=`Bearer ${i}`);let s=Object.keys(n).length>0?await fetch(`${r}/${e}/json`,{headers:n}):await fetch(`${r}/${e}/json`);return s.ok?(await s.json()).info.version:void 0}catch{return}}function Bxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("oss.sonatype.org")||t.includes("s01.oss.sonatype.org")||t.includes("central.sonatype.com")||t.includes("search.maven.org"),aqi}async function Pxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=e.split(":");if(r.length<2||!r[0]||!r[1])return;let n=r[0],i=r[1],o=Bxf(t),s={},a=t.token??void 0;if(a!=null&&a!==""){let p=t.username??"";s.authorization=`Basic ${Buffer.from(`${p}:${a}`).toString("base64")}`}let c=`${o}?q=g:${encodeURIComponent(n)}+AND+a:${encodeURIComponent(i)}&rows=1&wt=json`,l=Object.keys(s).length>0?await fetch(c,{headers:s}):await fetch(c);if(l.ok){let d=(await l.json()).response?.docs?.[0]?.latestVersion;if(d!=null)return d}return}catch{return}}function Dxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("nuget.org")?KUa:`${t.replace(/\/+$/,"")}/v3-flatcontainer`}async function Rxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=Dxf(t),n={},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=`Basic ${Buffer.from(`:${i}`).toString("base64")}`);let o=`${r}/${e.toLowerCase()}/index.json`,a=Object.keys(n).length>0?await fetch(o,{headers:n}):await fetch(o);if(a.ok){let u=(await a.json()).versions??[];for(let l=u.length-1;l>=0;l--){let p=u[l];if(p!=null&&!p.includes("-"))return p}}return}catch{return}}function kxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("rubygems.org")?JUa:`${t.replace(/\/+$/,"")}/api/v1/gems`}async function Fxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=kxf(t),n={},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=i);let s=Object.keys(n).length>0?await fetch(`${r}/${e}.json`,{headers:n}):await fetch(`${r}/${e}.json`);if(s.ok){let a=await s.json();if(a.version!=null)return a.version}return}catch{return}}async function Nxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{if(/\/v\d+$/.test(e))return await cqi(e);let r=10,n=[];n.push(cqi(e).then(s=>({version:s,major:0})));for(let s=2;s<=r;s++)n.push(cqi(`${e}/v${s}`).then(a=>({version:a,major:s})));let i=await Promise.all(n),o;for(let s of i)s.version!=null&&(o==null||VRt.default.gt(s.version,o))&&(o=s.version);return o}catch{return}}async function cqi(e){try{let t=e.replace(/[A-Z]/g,n=>"!"+n.toLowerCase()),r=await fetch(`${yxf}/${t}/@latest`);if(r.ok){let n=await r.json();if(n.Version!=null)return n.Version.replace(/^v/,"")}return}catch{return}}function jxf(e){let t=e.registryUrl;return t==null||t===""||t.includes("crates.io")?YUa:t.replace(/\/+$/,"")}async function Qxf(e,t={registryUrl:void 0,token:void 0,username:void 0}){try{let r=jxf(t),n={"user-agent":"fern-cli (https://buildwithfern.com)"},i=t.token??void 0;i!=null&&i!==""&&(n.authorization=`Bearer ${i}`);let o=await fetch(`${r}/${e}`,{headers:n});if(o.ok){let a=(await o.json()).crate?.max_stable_version;if(a!=null)return a}return}catch{return}}async function zxf(e){try{return await Yyr(e)}catch{return}}async function Mxf(e){try{let t=await Kyr(e,".fern/metadata.json");if(t!=null){let r=JSON.parse(t);if(r.sdkVersion!=null)return r.sdkVersion}return}catch{return}}function Lxf(e){if(e.outputMode.type==="githubV2")return`${e.outputMode.githubV2.owner}/${e.outputMode.githubV2.repo}`}var VRt,hbr,Axf,HUa,aqi,KUa,JUa,yxf,YUa,ZUa=h(()=>{"use strict";kt();jY();mbr();VRt=be(cw(),1);(function(e){e.Empty={registryUrl:void 0,token:void 0,username:void 0}})(hbr||(hbr={}));Axf="https://registry.npmjs.org",HUa="https://pypi.org/pypi",aqi="https://search.maven.org/solrsearch/select",KUa="https://api.nuget.org/v3-flatcontainer",JUa="https://rubygems.org/api/v1/gems",yxf="https://proxy.golang.org",YUa="https://crates.io/api/v1/crates"});function QY(){let e=Uxf(process.env.FERN_INVOKER);return e??($Ua()?"ci":"manual")}function zY(){if(process.env.GITHUB_ACTIONS==="true")return"github";if(process.env.GITLAB_CI==="true")return"gitlab";if(process.env.BITBUCKET_BUILD_NUMBER!=null)return"bitbucket";if(process.env.CIRCLECI==="true")return"circleci";if(process.env.TRAVIS==="true")return"travis";if(process.env.JENKINS_URL!=null||process.env.JENKINS_HOME!=null)return"jenkins";if(process.env.TF_BUILD!=null)return"azure-pipelines";if(process.env.BUILDKITE==="true")return"buildkite";if(process.env.CODEBUILD_BUILD_ID!=null)return"codebuild";if(process.env.TEAMCITY_VERSION!=null)return"teamcity";if(process.env.DRONE==="true")return"drone";if(process.env.SEMAPHORE==="true")return"semaphore";if(process.env.APPVEYOR==="true"||process.env.APPVEYOR==="True")return"appveyor";if($Ua())return"unknown"}function Uxf(e){if(e==null)return;let t=e.trim().toLowerCase();switch(t){case"autopilot":case"autorelease":case"ci":case"manual":return t;default:return}}function $Ua(){return!!(process.env.CI||process.env.CONTINUOUS_INTEGRATION||process.env.GITHUB_ACTIONS||process.env.GITLAB_CI||process.env.CIRCLECI||process.env.TRAVIS||process.env.JENKINS_URL||process.env.JENKINS_HOME||process.env.TF_BUILD||process.env.BUILDKITE||process.env.CODEBUILD_BUILD_ID||process.env.TEAMCITY_VERSION||process.env.BITBUCKET_BUILD_NUMBER||process.env.DRONE||process.env.SEMAPHORE||process.env.APPVEYOR||process.env.BUDDY_WORKSPACE_ID||process.env.WERCKER_RUN_ID)}var eVa=h(()=>{"use strict"});var tVa=h(()=>{"use strict"});var Nj,rVa=h(()=>{"use strict";r8i();Nj=class extends b7{definition;sources;type="fern";constructor({definition:t,sources:r,...n}){super(n),this.definition=t,this.sources=r??[]}async getDefinition(){return this.definition}async toFernWorkspace({context:t},r,n,i){return this}getSources(){return this.sources}getAbsoluteFilePaths(){return[this.absoluteFilePath]}}});function Abr({generatorInvocation:e,version:t,userProvidedVersion:r,packageName:n,context:i}){if(e.language==="python"){let o=Jf.pypi({version:t,packageName:n});return i.logger.debug(`Created PyPiPublishTarget: version ${t} package name: ${n}`),o}else if(e.language==="typescript"){if(r!=null){let o=n??(typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config.packageJson?.name:void 0),s=Jf.npm({version:r,packageName:o,tokenEnvironmentVariable:""});return i.logger.debug(`Created NpmPublishTarget: version ${r} package name: ${o}`),s}return}else if(e.language==="rust"){let o=Jf.crates({version:t,packageName:n});return i.logger.debug(`Created CratesPublishTarget: version ${t} package name: ${n}`),o}else if(e.language==="go"){if(r!=null){let o=(()=>{let a=e.raw?.config;if(typeof a!="object"||a===null)return;let c=a.module;if(!(c==null||typeof c.path!="string"))return c.path})(),s=Jf.go({version:r,modulePath:o});return i.logger.debug(`Created GoPublishTarget: version ${r} module path: ${o}`),s}return}else if(e.language==="java"){let o=e.raw?.config,s=(()=>{if(!o||typeof o!="object"||o===null)return;let c=o;if(typeof c.group=="string"&&typeof c.artifact=="string")return{groupId:c.group,artifactId:c.artifact};if(typeof c["package-prefix"]=="string"&&n)return{groupId:c["package-prefix"],artifactId:n};typeof c["package-prefix"]=="string"&&!n&&i.logger.warn("Java generator has package-prefix configured but no package name could be resolved. Set 'package-name' (or 'group' and 'artifact') in the generator config to stamp Maven coordinates.")})(),a=s?`${s.groupId}:${s.artifactId}`:void 0;if(a){let c=t??"0.0.0",u=Jf.maven({coordinate:a,version:c,usernameEnvironmentVariable:"MAVEN_USERNAME",passwordEnvironmentVariable:"MAVEN_PASSWORD",mavenUrlEnvironmentVariable:"MAVEN_PUBLISH_REGISTRY_URL"});return i.logger.debug(`Created MavenPublishTarget: coordinate ${a} version ${c}`),u}else o&&typeof o=="object"&&i.logger.debug("Java generator config provided but could not construct Maven coordinate. Expected either 'group' and 'artifact' or 'package-prefix' with packageName.");return}else if(e.language==="ruby"){let o=Jf.rubygems({version:t,packageName:n});return i.logger.debug(`Created RubyGemsPublishTarget: version ${t} package name: ${n}`),o}else if(e.language==="php"){let o=n??(()=>{let a=e.raw?.config;if(typeof a!="object"||a===null)return;let c=a.packageName;return typeof c=="string"?c:void 0})(),s=Jf.packagist({version:t,packageName:o});return i.logger.debug(`Created PackagistPublishTarget: version ${t} package name: ${o}`),s}else if(e.language==="csharp"){if(r!=null){let o=n??(typeof e.raw?.config=="object"&&e.raw?.config!==null?e.raw.config["package-id"]:void 0),s=Jf.nuget({version:r,packageName:typeof o=="string"?o:void 0});return i.logger.debug(`Created NugetPublishTarget: version ${r} package name: ${String(o)}`),s}return}}var nVa=h(()=>{"use strict";zn()});function MY(){if(process.env.IGNORE_GIT_IN_METADATA==="true")return"DUMMY";try{let e=(0,uqi.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();return/^[0-9a-f]{40}$/.test(e)?e:void 0}catch{return}}function LY(){if(process.env.IGNORE_GIT_IN_METADATA!=="true")try{return(0,uqi.execSync)("git status --porcelain",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0}catch{return}}var uqi,iVa=h(()=>{"use strict";uqi=require("child_process")});var oVa=h(()=>{"use strict"});var ay,vb,_Rt,sVa,lqi,bI,PNe,Ff,ybr,Rp,dKe,aVa,VS,AE,pqi,_S,bbr,cVa,_ye,uVa,lVa,pVa,fVa,dVa,x7,qRt,Ebr=h(()=>{"use strict";ay="fern",vb="definition",_Rt="openapi",sVa="changelog",lqi="asyncapi",bI="api.yml",PNe="__package__",Ff=`${PNe}.yml`,ybr="dependencies.yml",Rp="generators.yml",dKe="generators.yaml",aVa="dependencies.yml",VS="docs.yml",AE="fern.config.json",pqi="api",_S=".fernignore",bbr="snippet.json",cVa="snippet-templates.json",_ye="default-group",uVa="spec-origin",lVa="async-api",pVa="openapi",fVa="openapi-overrides",dVa="api-settings",x7="apis",qRt="local"});function xr(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let p=0;p<l.length;p++){let d=l[p];d in a||(a[d]=u[d].bind(a))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var c;let u=r?.Parent?new o:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function EI(e){return e&&Object.assign(GRt,e),GRt}var fqi,Ibr,C7,qye,GRt,mKe=h(()=>{"use strict";fqi=Object.freeze({status:"aborted"});Ibr=Symbol("zod_brand"),C7=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},qye=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},GRt={}});var bi={};Z(bi,{BIGINT_FORMAT_RANGES:()=>vqi,Class:()=>mqi,NUMBER_FORMAT_RANGES:()=>Iqi,aborted:()=>Kye,allowsEval:()=>Aqi,assert:()=>Wxf,assertEqual:()=>Vxf,assertIs:()=>qxf,assertNever:()=>Gxf,assertNotEqual:()=>_xf,assignProp:()=>Wye,base64ToUint8Array:()=>hVa,base64urlToUint8Array:()=>uCf,cached:()=>gKe,captureStackTrace:()=>xbr,cleanEnum:()=>cCf,cleanRegex:()=>KRt,clone:()=>iF,cloneDef:()=>Kxf,createTransparentProxy:()=>eCf,defineLazy:()=>kp,esc:()=>vbr,escapeRegex:()=>_U,extend:()=>nCf,finalizeIssue:()=>jj,floatSafeRemainder:()=>hqi,getElementAtPath:()=>Jxf,getEnumValues:()=>HRt,getLengthableOrigin:()=>XRt,getParsedType:()=>$xf,getSizableOrigin:()=>YRt,hexToUint8Array:()=>pCf,isObject:()=>DNe,isPlainObject:()=>Hye,issue:()=>AKe,joinValues:()=>en,jsonStringifyReplacer:()=>hKe,merge:()=>oCf,mergeDefs:()=>wue,normalizeParams:()=>Oi,nullish:()=>Gye,numKeys:()=>Zxf,objectClone:()=>Hxf,omit:()=>rCf,optionalKeys:()=>Eqi,parsedType:()=>hi,partial:()=>sCf,pick:()=>tCf,prefixIssues:()=>sL,primitiveTypes:()=>bqi,promiseAllObject:()=>Yxf,propertyKeyTypes:()=>JRt,randomString:()=>Xxf,required:()=>aCf,safeExtend:()=>iCf,shallowClone:()=>yqi,slugify:()=>gqi,stringifyPrimitive:()=>si,uint8ArrayToBase64:()=>gVa,uint8ArrayToBase64url:()=>lCf,uint8ArrayToHex:()=>fCf,unwrapMessage:()=>WRt});function Vxf(e){return e}function _xf(e){return e}function qxf(e){}function Gxf(e){throw new Error("Unexpected value in exhaustive check")}function Wxf(e){}function HRt(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function en(e,t="|"){return e.map(r=>si(r)).join(t)}function hKe(e,t){return typeof t=="bigint"?t.toString():t}function gKe(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Gye(e){return e==null}function KRt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function hqi(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let o=r>i?r:i,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}function kp(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==mVa)return n===void 0&&(n=mVa,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Hxf(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Wye(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function wue(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Kxf(e){return wue(e._zod.def)}function Jxf(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Yxf(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<t.length;o++)i[t[o]]=n[o];return i})}function Xxf(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function vbr(e){return JSON.stringify(e)}function gqi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function DNe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Hye(e){if(DNe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(DNe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function yqi(e){return Hye(e)?{...e}:Array.isArray(e)?[...e]:e}function Zxf(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function _U(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function iF(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Oi(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function eCf(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,o){return t??(t=e()),Reflect.set(t,n,i,o)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function si(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Eqi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function tCf(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=wue(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return Wye(this,"shape",s),s},checks:[]});return iF(e,o)}function rCf(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=wue(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Wye(this,"shape",s),s},checks:[]});return iF(e,o)}function nCf(e,t){if(!Hye(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=wue(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Wye(this,"shape",o),o}});return iF(e,i)}function iCf(e,t){if(!Hye(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=wue(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Wye(this,"shape",n),n}});return iF(e,r)}function oCf(e,t){let r=wue(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Wye(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return iF(e,r)}function sCf(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=wue(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Wye(this,"shape",c),c},checks:[]});return iF(t,s)}function aCf(e,t,r){let n=wue(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(let s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return Wye(this,"shape",o),o}});return iF(t,n)}function Kye(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function sL(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function WRt(e){return typeof e=="string"?e:e?.message}function jj(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=WRt(e.inst?._zod.def?.error?.(e))??WRt(t?.error?.(e))??WRt(r.customError?.(e))??WRt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function YRt(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function XRt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function hi(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function AKe(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function cCf(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function hVa(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function gVa(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function uCf(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return hVa(t+r)}function lCf(e){return gVa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pCf(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function fCf(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var mVa,xbr,Aqi,$xf,JRt,bqi,Iqi,vqi,mqi,za=h(()=>{"use strict";mVa=Symbol("evaluating");xbr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Aqi=gKe(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});$xf=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},JRt=new Set(["string","number","symbol"]),bqi=new Set(["string","number","bigint","boolean","symbol","undefined"]);Iqi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},vqi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};mqi=class{constructor(...t){}}});function $Rt(e,t=r=>r.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function ekt(e,t=r=>r.message){let r={_errors:[]},n=i=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>n({issues:s}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let s=r,a=0;for(;a<o.path.length;){let c=o.path[a];a===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return n(e),r}function xqi(e,t=r=>r.message){let r={errors:[]},n=(i,o=[])=>{var s,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{let u=[...o,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,p=0;for(;p<u.length;){let d=u[p],f=p===u.length-1;typeof d=="string"?(l.properties??(l.properties={}),(s=l.properties)[d]??(s[d]={errors:[]}),l=l.properties[d]):(l.items??(l.items=[]),(a=l.items)[d]??(a[d]={errors:[]}),l=l.items[d]),f&&l.errors.push(t(c)),p++}}};return n(e),r}function yVa(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function Cqi(e){let t=[],r=[...e.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${yVa(n.path)}`);return t.join(`
|
|
133
133
|
`)}var AVa,ZRt,Qj,wqi=h(()=>{"use strict";mKe();za();AVa=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hKe,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ZRt=xr("$ZodError",AVa),Qj=xr("$ZodError",AVa,{Parent:Error})});var yKe,Cbr,bKe,wbr,EKe,Sqi,IKe,Tqi,Sbr,mCf,Tbr,hCf,Obr,gCf,Bbr,ACf,Pbr,yCf,Dbr,bCf,Rbr,ECf,kbr,ICf,Oqi=h(()=>{"use strict";mKe();wqi();za();yKe=e=>(t,r,n,i)=>{let o=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new C7;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map(c=>jj(c,o,EI())));throw xbr(a,i?.callee),a}return s.value},Cbr=yKe(Qj),bKe=e=>async(t,r,n,i)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(i?.Err??e)(s.issues.map(c=>jj(c,o,EI())));throw xbr(a,i?.callee),a}return s.value},wbr=bKe(Qj),EKe=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new C7;return o.issues.length?{success:!1,error:new(e??ZRt)(o.issues.map(s=>jj(s,i,EI())))}:{success:!0,data:o.value}},Sqi=EKe(Qj),IKe=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},o=t._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>jj(s,i,EI())))}:{success:!0,data:o.value}},Tqi=IKe(Qj),Sbr=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return yKe(e)(t,r,i)},mCf=Sbr(Qj),Tbr=e=>(t,r,n)=>yKe(e)(t,r,n),hCf=Tbr(Qj),Obr=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bKe(e)(t,r,i)},gCf=Obr(Qj),Bbr=e=>async(t,r,n)=>bKe(e)(t,r,n),ACf=Bbr(Qj),Pbr=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return EKe(e)(t,r,i)},yCf=Pbr(Qj),Dbr=e=>(t,r,n)=>EKe(e)(t,r,n),bCf=Dbr(Qj),Rbr=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return IKe(e)(t,r,i)},ECf=Rbr(Qj),kbr=e=>async(t,r,n)=>IKe(e)(t,r,n),ICf=kbr(Qj)});var qU={};Z(qU,{base64:()=>qqi,base64url:()=>Fbr,bigint:()=>Yqi,boolean:()=>Zqi,browserEmail:()=>BCf,cidrv4:()=>Vqi,cidrv6:()=>_qi,cuid:()=>Bqi,cuid2:()=>Pqi,date:()=>Wqi,datetime:()=>Kqi,domain:()=>RCf,duration:()=>Nqi,e164:()=>Gqi,email:()=>Qqi,emoji:()=>zqi,extendedDuration:()=>vCf,guid:()=>jqi,hex:()=>kCf,hostname:()=>DCf,html5Email:()=>SCf,idnEmail:()=>OCf,integer:()=>Xqi,ipv4:()=>Mqi,ipv6:()=>Lqi,ksuid:()=>kqi,lowercase:()=>tGi,mac:()=>Uqi,md5_base64:()=>NCf,md5_base64url:()=>jCf,md5_hex:()=>FCf,nanoid:()=>Fqi,null:()=>$qi,number:()=>Nbr,rfc5322Email:()=>TCf,sha1_base64:()=>zCf,sha1_base64url:()=>MCf,sha1_hex:()=>QCf,sha256_base64:()=>UCf,sha256_base64url:()=>VCf,sha256_hex:()=>LCf,sha384_base64:()=>qCf,sha384_base64url:()=>GCf,sha384_hex:()=>_Cf,sha512_base64:()=>HCf,sha512_base64url:()=>KCf,sha512_hex:()=>WCf,string:()=>Jqi,time:()=>Hqi,ulid:()=>Dqi,undefined:()=>eGi,unicodeEmail:()=>bVa,uppercase:()=>rGi,uuid:()=>RNe,uuid4:()=>xCf,uuid6:()=>CCf,uuid7:()=>wCf,xid:()=>Rqi});function zqi(){return new RegExp(PCf,"u")}function IVa(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Hqi(e){return new RegExp(`^${IVa(e)}$`)}function Kqi(e){let t=IVa({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${EVa}T(?:${n})$`)}function tkt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function rkt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Bqi,Pqi,Dqi,Rqi,kqi,Fqi,Nqi,vCf,jqi,RNe,xCf,CCf,wCf,Qqi,SCf,TCf,bVa,OCf,BCf,PCf,Mqi,Lqi,Uqi,Vqi,_qi,qqi,Fbr,DCf,RCf,Gqi,EVa,Wqi,Jqi,Yqi,Xqi,Nbr,Zqi,$qi,eGi,tGi,rGi,kCf,FCf,NCf,jCf,QCf,zCf,MCf,LCf,UCf,VCf,_Cf,qCf,GCf,WCf,HCf,KCf,jbr=h(()=>{"use strict";za();Bqi=/^[cC][^\s-]{8,}$/,Pqi=/^[0-9a-z]+$/,Dqi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rqi=/^[0-9a-vA-V]{20}$/,kqi=/^[A-Za-z0-9]{27}$/,Fqi=/^[a-zA-Z0-9_-]{21}$/,Nqi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vCf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,jqi=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,RNe=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,xCf=RNe(4),CCf=RNe(6),wCf=RNe(7),Qqi=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,SCf=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,TCf=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,bVa=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,OCf=bVa,BCf=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,PCf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Mqi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Lqi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Uqi=e=>{let t=_U(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Vqi=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,_qi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qqi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Fbr=/^[A-Za-z0-9_-]*$/,DCf=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,RCf=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Gqi=/^\+[1-9]\d{6,14}$/,EVa="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Wqi=new RegExp(`^${EVa}$`);Jqi=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Yqi=/^-?\d+n?$/,Xqi=/^-?\d+$/,Nbr=/^-?\d+(?:\.\d+)?$/,Zqi=/^(?:true|false)$/i,$qi=/^null$/i,eGi=/^undefined$/i,tGi=/^[^A-Z]*$/,rGi=/^[^a-z]*$/,kCf=/^[0-9a-fA-F]*$/;FCf=/^[0-9a-fA-F]{32}$/,NCf=tkt(22,"=="),jCf=rkt(22),QCf=/^[0-9a-fA-F]{40}$/,zCf=tkt(27,"="),MCf=rkt(27),LCf=/^[0-9a-fA-F]{64}$/,UCf=tkt(43,"="),VCf=rkt(43),_Cf=/^[0-9a-fA-F]{96}$/,qCf=tkt(64,""),GCf=rkt(64),WCf=/^[0-9a-fA-F]{128}$/,HCf=tkt(86,"=="),KCf=rkt(86)});function vVa(e,t,r){e.issues.length&&t.issues.push(...sL(r,e.issues))}var TA,xVa,Qbr,zbr,nGi,iGi,oGi,sGi,aGi,cGi,uGi,lGi,pGi,vKe,fGi,dGi,mGi,hGi,gGi,AGi,yGi,bGi,EGi,Mbr=h(()=>{"use strict";mKe();jbr();za();TA=xr("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),xVa={number:"number",bigint:"bigint",object:"date"},Qbr=xr("$ZodCheckLessThan",(e,t)=>{TA.init(e,t);let r=xVa[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),zbr=xr("$ZodCheckGreaterThan",(e,t)=>{TA.init(e,t);let r=xVa[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nGi=xr("$ZodCheckMultipleOf",(e,t)=>{TA.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):hqi(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),iGi=xr("$ZodCheckNumberFormat",(e,t)=>{TA.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=Iqi[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=i,a.maximum=o,r&&(a.pattern=Xqi)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<i&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),oGi=xr("$ZodCheckBigIntFormat",(e,t)=>{TA.init(e,t);let[r,n]=vqi[t.format];e._zod.onattach.push(i=>{let o=i._zod.bag;o.format=t.format,o.minimum=r,o.maximum=n}),e._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),sGi=xr("$ZodCheckMaxSize",(e,t)=>{var r;TA.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Gye(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let i=n.value;i.size<=t.maximum||n.issues.push({origin:YRt(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),aGi=xr("$ZodCheckMinSize",(e,t)=>{var r;TA.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Gye(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;i.size>=t.minimum||n.issues.push({origin:YRt(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),cGi=xr("$ZodCheckSizeEquals",(e,t)=>{var r;TA.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Gye(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=n=>{let i=n.value,o=i.size;if(o===t.size)return;let s=o>t.size;n.issues.push({origin:YRt(i),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),uGi=xr("$ZodCheckMaxLength",(e,t)=>{var r;TA.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Gye(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let i=n.value;if(i.length<=t.maximum)return;let s=XRt(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),lGi=xr("$ZodCheckMinLength",(e,t)=>{var r;TA.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Gye(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let s=XRt(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),pGi=xr("$ZodCheckLengthEquals",(e,t)=>{var r;TA.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Gye(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{let i=n.value,o=i.length;if(o===t.length)return;let s=XRt(i),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),vKe=xr("$ZodCheckStringFormat",(e,t)=>{var r,n;TA.init(e,t),e._zod.onattach.push(i=>{let o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),fGi=xr("$ZodCheckRegex",(e,t)=>{vKe.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),dGi=xr("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tGi),vKe.init(e,t)}),mGi=xr("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=rGi),vKe.init(e,t)}),hGi=xr("$ZodCheckIncludes",(e,t)=>{TA.init(e,t);let r=_U(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),gGi=xr("$ZodCheckStartsWith",(e,t)=>{TA.init(e,t);let r=new RegExp(`^${_U(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),AGi=xr("$ZodCheckEndsWith",(e,t)=>{TA.init(e,t);let r=new RegExp(`.*${_U(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});yGi=xr("$ZodCheckProperty",(e,t)=>{TA.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>vVa(i,r,t.property));vVa(n,r,t.property)}}),bGi=xr("$ZodCheckMimeType",(e,t)=>{TA.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),EGi=xr("$ZodCheckOverwrite",(e,t)=>{TA.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var nkt,IGi=h(()=>{"use strict";nkt=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
134
134
|
`).filter(s=>s),i=Math.min(...n.map(s=>s.length-s.trimStart().length)),o=n.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let t=Function,r=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,i.join(`
|
|
135
135
|
`))}}});var vGi,xGi=h(()=>{"use strict";vGi={major:4,minor:3,patch:6}});function GGi(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function jVa(e){if(!Fbr.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return GGi(r)}function QVa(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}function wVa(e,t,r){e.issues.length&&t.issues.push(...sL(r,e.issues)),t.value[r]=e.value}function qbr(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...sL(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function zVa(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Eqi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function MVa(e,t,r,n,i,o){let s=[],a=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let p in t){if(a.has(p))continue;if(u==="never"){s.push(p);continue}let d=c.run({value:t[p],issues:[]},n);d instanceof Promise?e.push(d.then(f=>qbr(f,r,p,t,l))):qbr(d,r,p,t,l)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}function SVa(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let i=e.filter(o=>!Kye(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>jj(s,n,EI())))}),t)}function TVa(e,t,r,n){let i=e.filter(o=>o.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>jj(s,n,EI())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function CGi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Hye(e)&&Hye(t)){let r=Object.keys(t),n=Object.keys(e).filter(o=>r.indexOf(o)!==-1),i={...e,...t};for(let o of n){let s=CGi(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let i=e[n],o=t[n],s=CGi(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function OVa(e,t,r){let n=new Map,i;for(let a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);let o=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&i&&e.issues.push({...i,keys:o}),Kye(e))return e;let s=CGi(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}function Lbr(e,t,r){e.issues.length&&t.issues.push(...sL(r,e.issues)),t.value[r]=e.value}function BVa(e,t,r,n,i,o,s){e.issues.length&&(JRt.has(typeof n)?r.issues.push(...sL(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(a=>jj(a,s,EI()))})),t.issues.length&&(JRt.has(typeof n)?r.issues.push(...sL(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:t.issues.map(a=>jj(a,s,EI()))})),r.value.set(e.value,t.value)}function PVa(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function DVa(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function RVa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function kVa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Ubr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}function Vbr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(o=>_br(e,o,t.out,r)):_br(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(o=>_br(e,o,t.in,r)):_br(e,i,t.in,r)}}function _br(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}function FVa(e){return e.value=Object.freeze(e.value),e}function NVa(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(AKe(i))}}var zu,kNe,rA,wGi,SGi,TGi,OGi,BGi,PGi,DGi,RGi,kGi,FGi,NGi,jGi,QGi,zGi,MGi,LGi,UGi,VGi,_Gi,qGi,WGi,HGi,KGi,JGi,YGi,Gbr,XGi,ikt,Wbr,ZGi,$Gi,e7i,t7i,r7i,n7i,i7i,o7i,s7i,a7i,LVa,c7i,okt,u7i,l7i,p7i,Hbr,f7i,d7i,m7i,h7i,g7i,A7i,y7i,Kbr,b7i,E7i,I7i,v7i,x7i,C7i,w7i,S7i,T7i,skt,O7i,B7i,P7i,D7i,R7i,k7i,F7i=h(()=>{"use strict";Mbr();mKe();IGi();Oqi();jbr();za();xGi();za();zu=xr("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vGi;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let o of i._zod.onattach)o(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,a,c)=>{let u=Kye(s),l;for(let p of a){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(u)continue;let d=s.issues.length,f=p._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new C7;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,s.issues.length!==d&&(u||(u=Kye(s,d)))});else{if(s.issues.length===d)continue;u||(u=Kye(s,d))}}return l?l.then(()=>s):s},o=(s,a,c)=>{if(Kye(s))return s.aborted=!0,s;let u=i(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new C7;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,s,a)):o(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new C7;return c.then(u=>i(u,n,a))}return i(c,n,a)}}kp(e,"~standard",()=>({validate:i=>{try{let o=Sqi(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Tqi(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),kNe=xr("$ZodString",(e,t)=>{zu.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Jqi(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rA=xr("$ZodStringFormat",(e,t)=>{vKe.init(e,t),kNe.init(e,t)}),wGi=xr("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=jqi),rA.init(e,t)}),SGi=xr("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=RNe(n))}else t.pattern??(t.pattern=RNe());rA.init(e,t)}),TGi=xr("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qqi),rA.init(e,t)}),OGi=xr("$ZodURL",(e,t)=>{rA.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),BGi=xr("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=zqi()),rA.init(e,t)}),PGi=xr("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Fqi),rA.init(e,t)}),DGi=xr("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Bqi),rA.init(e,t)}),RGi=xr("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Pqi),rA.init(e,t)}),kGi=xr("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dqi),rA.init(e,t)}),FGi=xr("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Rqi),rA.init(e,t)}),NGi=xr("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=kqi),rA.init(e,t)}),jGi=xr("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Kqi(t)),rA.init(e,t)}),QGi=xr("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Wqi),rA.init(e,t)}),zGi=xr("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Hqi(t)),rA.init(e,t)}),MGi=xr("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Nqi),rA.init(e,t)}),LGi=xr("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Mqi),rA.init(e,t),e._zod.bag.format="ipv4"}),UGi=xr("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Lqi),rA.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),VGi=xr("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Uqi(t.delimiter)),rA.init(e,t),e._zod.bag.format="mac"}),_Gi=xr("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Vqi),rA.init(e,t)}),qGi=xr("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_qi),rA.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});WGi=xr("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=qqi),rA.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{GGi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});HGi=xr("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Fbr),rA.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{jVa(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),KGi=xr("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Gqi),rA.init(e,t)});JGi=xr("$ZodJWT",(e,t)=>{rA.init(e,t),e._zod.check=r=>{QVa(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),YGi=xr("$ZodCustomStringFormat",(e,t)=>{rA.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Gbr=xr("$ZodNumber",(e,t)=>{zu.init(e,t),e._zod.pattern=e._zod.bag.pattern??Nbr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),r}}),XGi=xr("$ZodNumberFormat",(e,t)=>{iGi.init(e,t),Gbr.init(e,t)}),ikt=xr("$ZodBoolean",(e,t)=>{zu.init(e,t),e._zod.pattern=Zqi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Wbr=xr("$ZodBigInt",(e,t)=>{zu.init(e,t),e._zod.pattern=Yqi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),ZGi=xr("$ZodBigIntFormat",(e,t)=>{oGi.init(e,t),Wbr.init(e,t)}),$Gi=xr("$ZodSymbol",(e,t)=>{zu.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),r}}),e7i=xr("$ZodUndefined",(e,t)=>{zu.init(e,t),e._zod.pattern=eGi,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),r}}),t7i=xr("$ZodNull",(e,t)=>{zu.init(e,t),e._zod.pattern=$qi,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),r7i=xr("$ZodAny",(e,t)=>{zu.init(e,t),e._zod.parse=r=>r}),n7i=xr("$ZodUnknown",(e,t)=>{zu.init(e,t),e._zod.parse=r=>r}),i7i=xr("$ZodNever",(e,t)=>{zu.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),o7i=xr("$ZodVoid",(e,t)=>{zu.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),s7i=xr("$ZodDate",(e,t)=>{zu.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),r}});a7i=xr("$ZodArray",(e,t)=>{zu.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let o=[];for(let s=0;s<i.length;s++){let a=i[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?o.push(c.then(u=>wVa(u,r,s))):wVa(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});LVa=xr("$ZodObject",(e,t)=>{if(zu.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=gKe(()=>zVa(t));kp(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let p of l.values)c[u].add(p)}}return c});let i=DNe,o=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=n.value);let u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let l=[],p=s.shape;for(let d of s.keys){let f=p[d],m=f._zod.optout==="optional",g=f._zod.run({value:u[d],issues:[]},c);g instanceof Promise?l.push(g.then(A=>qbr(A,a,d,u,m))):qbr(g,a,d,u,m)}return o?MVa(l,u,a,c,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),c7i=xr("$ZodObjectJIT",(e,t)=>{LVa.init(e,t);let r=e._zod.parse,n=gKe(()=>zVa(t)),i=d=>{let f=new nkt(["shape","payload","ctx"]),m=n.value,g=x=>{let I=vbr(x);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};f.write("const input = payload.value;");let A=Object.create(null),y=0;for(let x of m.keys)A[x]=`key_${y++}`;f.write("const newResult = {};");for(let x of m.keys){let I=A[x],C=vbr(x),P=d[x]?._zod?.optout==="optional";f.write(`const ${I} = ${g(x)};`),P?f.write(`
|
|
@@ -3359,7 +3359,7 @@ ${dku.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&ejo(th
|
|
|
3359
3359
|
`+TLe.default.red(">> ")+t),this.screen.render(r,n)}getMaskedValue(t){return this.status==="answered"?this.opt.mask?TLe.default.cyan(vku(t,this.opt.mask)):TLe.default.italic(TLe.default.dim("[hidden]")):this.opt.mask?vku(t,this.opt.mask):TLe.default.italic(TLe.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 tGr=be(zw(),1);var IFu=be(Njo(),1),$qr=require("child_process"),Eit=require("fs"),Zqr=be(require("path"),1),vFu=be(require("os"),1),xFu=require("crypto"),bQo=be(bFu(),1);var Jqr=class extends Error{originalError;constructor(t){super(`Failed to create temporary file. ${t.message}`),this.originalError=t}};var JUt=class extends Error{originalError;constructor(t){super(`Failed to launch editor. ${t.message}`),this.originalError=t}};var Yqr=class extends Error{originalError;constructor(t){super(`Failed to read temporary file. ${t.message}`),this.originalError=t}};var Xqr=class extends Error{originalError;constructor(t){super(`Failed to remove temporary file. ${t.message}`),this.originalError=t}};function eGr(e="",t,r){let n=new EQo(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 EFu(e){return e?e.replace(/[^a-zA-Z0-9_.-]/g,"_"):""}function Vym(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 EQo=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=Vym(t).map(i=>i.replace("\\ "," ")),n=r.shift();this.editor={args:r,bin:n}}createTemporaryFile(){try{let t=this.fileOptions.dir??vFu.default.tmpdir(),r=(0,xFu.randomUUID)(),n=EFu(this.fileOptions.prefix),i=EFu(this.fileOptions.postfix),o=`${n}${r}${i}`,s=Zqr.default.resolve(t,o),a=Zqr.default.resolve(t)+Zqr.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,Eit.writeFileSync)(this.tempFile,this.text,c)}catch(t){throw new Jqr(t)}}readTemporaryFile(){try{let t=(0,Eit.readFileSync)(this.tempFile);if(t.length===0)this.text="";else{let r=(0,IFu.detect)(t)??"utf8";bQo.default.encodingExists(r)||(r="utf8"),this.text=bQo.default.decode(t,r)}}catch(t){throw new Yqr(t)}}removeTemporaryFile(){try{(0,Eit.unlinkSync)(this.tempFile)}catch(t){throw new Xqr(t)}}launchEditor(){try{let t=(0,$qr.spawnSync)(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=t.status??0}catch(t){throw new JUt(t)}}launchEditorAsync(t){try{(0,$qr.spawn)(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",n=>{this.lastExitStatus=n,setImmediate(t)})}catch(r){throw new JUt(r)}}};var CFu=be(r3(),1);var YUt=class extends Mw{_run(t){this.done=t,this.editorResult=new CFu.Subject;let r=SB(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"?tGr.default.dim("Received"):tGr.default.dim("Press <enter> to launch your preferred editor."),t&&(r=tGr.default.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),eGr(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 BFu=require("stream");var TFu=be(require("readline"),1),OFu=be(SFu(),1),DLe=class{constructor(t){this.rl||=TFu.default.createInterface(qym(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 qym(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 OFu.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}var XUt=class extends DLe{constructor(t={}){super(t),this.log=new BFu.Writable({write:(r,n,i)=>{this.writeLog(r),i()}}),this.bottomBar=t.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return FUt(this.rl,this.bottomBar.split(`
|
|
3360
3360
|
`).length),this}updateBottomBar(t){return FUt(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+`
|
|
3361
3361
|
`}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&&xqr(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var Dd=be(r3(),1),RFu=be(pUt(),1);var rGr=be(r3(),1),PFu=be(pUt(),1),nGr=function(e,t,r){return typeof e[t]!="function"?(0,rGr.of)(e):(0,rGr.from)((0,PFu.default)(e[t])(r).then(n=>(e[t]=n,e)))};var DFu={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}},Iit=class extends DLe{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,Dd.from)(t):(0,Dd.isObservable)(t)?n=t:Object.values(t).every(i=>typeof i=="object"&&!Array.isArray(i)&&i!=null)?n=(0,Dd.from)(Object.entries(t).map(([i,o])=>({name:i,...o}))):n=(0,Dd.from)([t]),this.process=n.pipe((0,Dd.concatMap)(this.processQuestion.bind(this)),(0,Dd.publish)()),this.process.connect(),this.process.pipe((0,Dd.reduce)((i,o)=>(DFu.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,Dd.defer)(()=>(0,Dd.of)(t).pipe((0,Dd.concatMap)(this.setDefaultType.bind(this)),(0,Dd.concatMap)(this.filterIfRunnable.bind(this)),(0,Dd.concatMap)(()=>nGr(t,"message",this.answers)),(0,Dd.concatMap)(()=>nGr(t,"default",this.answers)),(0,Dd.concatMap)(()=>nGr(t,"choices",this.answers)),(0,Dd.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,Dd.defer)(()=>(0,Dd.from)(this.activePrompt.run().then(n=>({name:t.name,answer:n}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,Dd.defer)(()=>(0,Dd.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&DFu.get(this.answers,t.name)!==void 0)return Dd.EMPTY;if(t.when===!1)return Dd.EMPTY;if(typeof t.when!="function")return(0,Dd.of)(t);let{answers:r}=this;return(0,Dd.defer)(()=>(0,Dd.from)((0,RFu.default)(t.when)(r).then(n=>{if(n)return t})).pipe((0,Dd.filter)(n=>n!=null)))}};function kFu(e){let t=function(r,n){let i;try{i=new Iit(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",jUt),this.registerPrompt("input",SLe),this.registerPrompt("number",QUt),this.registerPrompt("confirm",zUt),this.registerPrompt("rawlist",MUt),this.registerPrompt("expand",LUt),this.registerPrompt("checkbox",UUt),this.registerPrompt("password",VUt),this.registerPrompt("editor",YUt)},t.restoreDefaultPrompts(),t}var vQo=kFu();function Wym(e,t){vQo.registerPrompt(e,t)}function Hym(){vQo.restoreDefaultPrompts()}var Kym={prompt:vQo,ui:{BottomBar:XUt,Prompt:Iit},createPromptModule:kFu,registerPrompt:Wym,restoreDefaultPrompts:Hym,Separator:KQ},cu=Kym;var vit=require("path");function NFu(){let e=Jym();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function Jym(e=process.argv[1]?(0,vit.dirname)(process.argv[1]):process.cwd(),t=vit.sep==="\\"){let r=t?FFu(e):e;return n=>{if(!n)return;let i=t?FFu(n):n,{dir:o,base:s,ext:a}=vit.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 FFu(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var xQo=e=>{if("flags"in e){let t=jFu(e.flags),r=QFu(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,CQo(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,Yym(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function Yym(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 jFu=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,ZUt(r)]).filter(([,t])=>t!==void 0)),QFu=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?CQo(n):void 0]}))};var ZUt=e=>e===void 0?void 0:e.variant??e.enabled,CQo=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var t2=(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 wQo(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Zym="NativeGzipValidationError",$ym=31,ebm=139,tbm=8,rbm=e=>e.length>=2&&e[0]===$ym&&e[1]===ebm;var $Ut,nbm=()=>{if($Ut)return $Ut;$Ut=[];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;$Ut[e]=t>>>0}return $Ut},ibm=e=>{let t=nbm(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},iGr=e=>{let t=new Error(`Native gzip produced invalid output: ${e}`);throw t.name=Zym,t},obm=async(e,t)=>{e.size<18&&iGr("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!rbm(r)||r[2]!==tbm)&&iGr("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==ibm(t)&&iGr("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&iGr("invalid-size")};async function eVt(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 obm(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var sbm=["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"],zFu=function(e,t=[]){if(!e)return!1;let r=e.toLowerCase();return sbm.concat(t).some(n=>{let i=n.toLowerCase();return r.indexOf(i)!==-1})};var cbm=Array.isArray,MFu=Object.prototype,YSI=MFu.hasOwnProperty,SQo=MFu.toString,xit=cbm||function(e){return SQo.call(e)==="[object Array]"};var tVt=e=>e===Object(e)&&!xit(e);var Cit=e=>e===void 0,Gve=e=>SQo.call(e)=="[object String]",LFu=e=>Gve(e)&&e.trim().length===0;var rVt=e=>SQo.call(e)=="[object Number]"&&e===e;var TQo=e=>e instanceof Error;function oGr(e){return e===null||typeof e!="object"}function RLe(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function UFu(e){return RLe(e,"ErrorEvent")}function wit(e){return typeof Event<"u"&&ubm(e,Event)}function VFu(e){return RLe(e,"Object")}function ubm(e,t){try{return e instanceof t}catch{return!1}}function nVt(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),rVt(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),nVt(i||r,t,r,n))}var lbm=864e5,sGr=class{constructor(t){this._buckets={},this._onBucketRateLimited=t._onBucketRateLimited,this._bucketSize=nVt(t.bucketSize,0,100,t._logger),this._refillRate=nVt(t.refillRate,0,this._bucketSize,t._logger),this._refillInterval=nVt(t.refillInterval,0,lbm,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 aGr="0123456789abcdef",cGr=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+=aGr.charAt(this.bytes[r]>>>4),t+=aGr.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+=aGr.charAt(this.bytes[r]>>>4),t+=aGr.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}},OQo=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??pbm()}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 cGr.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,cGr.ofInner(t)}},pbm=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())}),_Fu,Iee=()=>fbm().toString(),fbm=()=>(_Fu||(_Fu=new OQo)).generate();var uGr=class{add(t){let r=Iee();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 dbm(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}var qFu=(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=>qFu(`${e} ${o}`,t,r)}},mbm=e=>e();function GFu(e,t=mbm){return qFu(e,t,dbm())}var Tit="Mobile",pGr="iOS",Sit="Android",WFu="Tablet",c1I=Sit+" "+WFu;var gbm="Apple",u1I=gbm+" Watch",HFu="Safari",fGr="BlackBerry",KFu="Samsung",Abm=KFu+"Browser",ybm=KFu+" Internet",dGr="Chrome",bbm=dGr+" OS",Ebm=dGr+" "+pGr,JFu="Internet Explorer",Ibm=JFu+" "+Tit,PQo="Opera",l1I=PQo+" Mini",YFu="Edge",vbm="Microsoft "+YFu,DQo="Firefox",xbm=DQo+" "+pGr,RQo="Nintendo",kQo="PlayStation",lGr="Xbox",Cbm=Sit+" "+Tit,wbm=Tit+" "+HFu,iVt="Windows",Sbm=iVt+" Phone";var XFu="Generic",p1I=XFu+" "+Tit.toLowerCase(),f1I=XFu+" "+WFu.toLowerCase(),Tbm="Konqueror",Obm="Oculus Browser",RD="(\\d+(\\.\\d+)?)",BQo=new RegExp("Version/"+RD),d1I=new RegExp(lGr,"i"),m1I=new RegExp(kQo+" \\w+","i"),h1I=new RegExp(RQo+" \\w+","i"),Bbm=new RegExp(fGr+"|PlayBook|BB10","i"),Pbm={"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 g1I={[Ibm]:[new RegExp("rv:"+RD)],[vbm]:[new RegExp(YFu+"?\\/"+RD)],[dGr]:[new RegExp("("+dGr+"|CrMo)\\/"+RD)],[Ebm]:[new RegExp("CriOS\\/"+RD)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+RD)],[HFu]:[BQo],[wbm]:[BQo],[PQo]:[new RegExp("("+PQo+"|OPR)\\/"+RD)],[DQo]:[new RegExp(DQo+"\\/"+RD)],[xbm]:[new RegExp("FxiOS\\/"+RD)],[Tbm]:[new RegExp("Konqueror[:/]?"+RD,"i")],[fGr]:[new RegExp(fGr+" "+RD),BQo],[Cbm]:[new RegExp("android\\s"+RD,"i")],[ybm]:[new RegExp(Abm+"\\/"+RD)],[Obm]:[new RegExp("OculusBrowser\\/"+RD)],[JFu]:[new RegExp("(rv:|MSIE )"+RD)],Mozilla:[new RegExp("rv:"+RD)]};var A1I=[[new RegExp(lGr+"; "+lGr+" (.*?)[);]","i"),e=>[lGr,e&&e[1]||""]],[new RegExp(RQo,"i"),[RQo,""]],[new RegExp(kQo,"i"),[kQo,""]],[Bbm,[fGr,""]],[new RegExp(iVt,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Sbm,""];if(new RegExp(Tit).test(t)&&!/IEMobile\b/.test(t))return[iVt+" "+Tit,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let n=r[1],i=Pbm[n]||"";return/arm/i.test(t)&&(i="RT"),[iVt,i]}return[iVt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){let t=[e[3],e[4],e[5]||"0"];return[pGr,t.join(".")]}return[pGr,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=Cit(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Sit+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Sit+")","i"),e=>{if(e&&e[2]){let t=[e[2],e[3],e[4]||"0"];return[Sit,t.join(".")]}return[Sit,""]}],[/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/,[bbm,""]],[/Linux|debian/i,["Linux",""]]];var ZFu="utf8";function $Fu(e){return e?.replace(/\/+$/,"")}async function e2u(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 mGr(){return new Date().toISOString()}function vee(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}var t2u=e=>e instanceof Error;function FQo(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var Dbm={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}},D1I=Dbm.info;var hGr=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 FLe=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()}},kLe=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};async function r2u(e){if(e instanceof FLe){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 gGr(e){return typeof e=="object"&&(e instanceof FLe||e instanceof kLe)}function AGr(e){return typeof e=="object"&&e instanceof FLe&&e.status===413}var oVt=class{constructor(t,r={}){this.flushPromise=null,this.shutdownPromise=null,this.promiseQueue=new uGr,this._events=new hGr,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=GFu("[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=$Fu(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:gGr},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=!wQo()||(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(t2.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(t2.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(t2.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:xQo(p)})).catch(p=>(this._events.emit("error",p),{success:!1,error:this.categorizeRequestError(p)}))}categorizeRequestError(t){if(t instanceof FLe)return{type:"api_error",statusCode:t.status};if(t instanceof kLe){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=ZUt(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(t2.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(t2.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(t2.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(t2.Queue)||[];o.length>=this.maxQueueSize&&(o.shift(),this._logger.info("Queue is full, the oldest event is dropped.")),o.push({message:i}),this.setPersistedProperty(t2.Queue,o),this._events.emit(t,i),o.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=vee(()=>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:mGr()};this.historicalMigration&&(o.historical_migration=!0);let s=JSON.stringify(o),a=`${this.host}/batch/`,c=this.disableCompression?null:await eVt(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:mGr(),uuid:n?.uuid?n.uuid:Iee()};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 r2u(t)})}async flush(){if(this.disabled)return;let t=FQo([this.flushPromise]).then(()=>this._flush());return this.flushPromise=t,this.addPendingPromise(t),FQo([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(t2.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(t2.Queue)||[]).slice(i.length);this.setPersistedProperty(t2.Queue,m),t=m,await this.flushStorage()},a={api_key:this.apiKey,batch:o,sent_at:mGr()};this.historicalMigration&&(a.historical_migration=!0);let c=JSON.stringify(a),u=`${this.host}/batch/`,l=this.disableCompression?null:await eVt(c,this.isDebug),p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...l!==null&&{"Content-Encoding":"gzip"}},body:l||c},d={retryCheck:f=>AGr(f)?!1:gGr(f)};try{await(await this.fetchWithRetry(u,p,d)).body?.cancel()?.catch(()=>{})}catch(f){if(AGr(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 kLe||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 eVt(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=>AGr(s)?!1:gGr(s)}),{kind:"ok"}}catch(s){return AGr(s)?{kind:"too-large"}:s instanceof kLe?{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,ZFu)}catch{o instanceof Blob?s=o.size:s=new TextEncoder().encode(o).length}return await e2u(async()=>{let a=new AbortController,c=i??this.requestTimeout,u=vee(()=>a.abort(),c),l=null;try{l=await this.fetch(t,{signal:a.signal,...r})}catch(d){throw new kLe(d)}finally{clearTimeout(u)}if(!(r.mode==="no-cors")&&(l.status<200||l.status>=400))throw new FLe(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(t2.Queue)||[]).length===0||(await this.flush(),r)););}catch(o){if(!gGr(o))throw o;await r2u(o)}},i;try{return await Promise.race([new Promise((o,s)=>{i=vee(()=>{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 YQ={};Z(YQ,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>vGr,DOMExceptionCoercer:()=>zQo,EXCEPTION_STEP_INTERNAL_FIELDS:()=>sVt,ErrorCoercer:()=>MQo,ErrorEventCoercer:()=>LQo,ErrorPropertiesBuilder:()=>NQo,EventCoercer:()=>_Qo,ExceptionStepsBuffer:()=>KQo,ObjectCoercer:()=>VQo,PrimitiveCoercer:()=>qQo,PromiseRejectionEventCoercer:()=>GQo,ReduceableCache:()=>WQo,StringCoercer:()=>UQo,chromeStackLineParser:()=>jQo,createDefaultStackParser:()=>Kbm,createStackParser:()=>d2u,geckoStackLineParser:()=>QQo,getUtf8ByteLength:()=>h2u,nodeStackLineParser:()=>u2u,opera10StackLineParser:()=>s2u,opera11StackLineParser:()=>a2u,resolveExceptionStepsConfig:()=>HQo,reverseAndStripFrames:()=>f2u,stripReservedExceptionStepFields:()=>Xbm,winjsStackLineParser:()=>o2u});var yGr,n2u,bGr;function i2u(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return bGr&&r.length===n2u||(n2u=r.length,bGr=r.reduce((n,i)=>{yGr||(yGr={});let o=yGr[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,yGr[i]=[u,l];break}}}return n},{})),bGr}var Nbm=4,NQo=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&&xit(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:i2u(this.stackParser),skipFirstLines:t.skipFirstLines??1}}buildCoercingContext(t,r,n=0){let i=(s,a)=>{if(a<=Nbm){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 OB="?";function xee(e,t,r,n,i){let o={platform:e,filename:t,function:r==="<anonymous>"?OB:r,in_app:!0};return Cit(n)||(o.lineno=n),Cit(i)||(o.colno=i),o}var EGr=(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]:OB,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var jbm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Qbm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zbm=/\((\S*)(?::(\d+))(?::(\d+))\)/,jQo=(e,t)=>{let r=jbm.exec(e);if(r){let[,i,o,s]=r;return xee(t,i,OB,+o,+s)}let n=Qbm.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let a=zbm.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[o,s]=EGr(n[1]||OB,n[2]);return xee(t,s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}};var Mbm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Lbm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,QQo=(e,t)=>{let r=Mbm.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let s=Lbm.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]||OB;return[o,i]=EGr(o,i),xee(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};var Ubm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,o2u=(e,t)=>{let r=Ubm.exec(e);return r?xee(t,r[2],r[1]||OB,+r[3],r[4]?+r[4]:void 0):void 0};var Vbm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,s2u=(e,t)=>{let r=Vbm.exec(e);return r?xee(t,r[2],r[3]||OB,+r[1]):void 0},_bm=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,a2u=(e,t)=>{let r=_bm.exec(e);return r?xee(t,r[5],r[3]||r[4]||OB,+r[1],+r[2]):void 0};var qbm=/^\s*[-]{4,}$/,Gbm=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,u2u=(e,t)=>{let r=e.match(Gbm);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||OB,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:c2u(r[3]),colno:c2u(r[4]),in_app:Wbm(c||"",u),platform:t}}if(e.match(qbm))return{filename:e,platform:t}};function Wbm(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 c2u(e){return parseInt(e||"",10)||void 0}var l2u=/\(error: (.*)\)/,p2u=50;function f2u(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,p2u).map(r=>({...r,filename:r.filename||Hbm(t).filename,function:r.function||OB}))}function Hbm(e){return e[e.length-1]||{}}function Kbm(){return d2u("web:javascript",jQo,QQo)}function d2u(e,...t){return(r,n=0)=>{let i=[],o=r.split(`
|
|
3362
|
-
`);for(let s=n;s<o.length;s++){let a=o[s];if(a.length>1024)continue;let c=l2u.test(a)?a.replace(l2u,"$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>=p2u)break}}return f2u(i)}}var zQo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=Gve(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 RLe(t,"DOMException")}isDOMError(t){return RLe(t,"DOMError")}};var MQo=class{match(t){return TQo(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 LQo=class{constructor(){}match(t){return UFu(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 Jbm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,UQo=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(Jbm);return i&&(r=i[1],n=i[2]),[r,n]}};var m2u=["fatal","error","warning","log","info","debug"];function IGr(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 VQo=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 wit(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=IGr(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return Gve(t)&&!LFu(t)&&m2u.indexOf(t)>=0}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(t2u(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var _Qo=class{match(t){return wit(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${IGr(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var qQo=class{match(t){return oGr(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var GQo=class{match(t){return RLe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!wit(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 oGr(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 WQo=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 sVt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},Ybm=new Set([sVt.MESSAGE,sVt.TIMESTAMP]),vGr={enabled:!0,max_bytes:32768};function HQo(e){return e?{enabled:e.enabled??vGr.enabled,max_bytes:Zbm(e.max_bytes,vGr.max_bytes)}:{...vGr}}function Xbm(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>Ybm.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var KQo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=HQo(t)}setConfig(t){this._config=HQo(t),this._trimToMaxBytes()}add(t){let r=$bm(t);if(!r)return;let n=h2u(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 Zbm(e,t){if(!rVt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function $bm(e){let t=e0m(e);if(t)try{let r=JSON.parse(t);if(!tVt(r))return;let n=r,i=n[sVt.MESSAGE],o=n[sVt.TIMESTAMP];return!Gve(i)||i.trim().length===0||!Gve(o)&&!rVt(o)?void 0:{step:n,json:t}}catch{return}}function e0m(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 h2u(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 y2u=require("fs"),b2u=require("readline"),xGr=new YQ.ReduceableCache(25),E2u=new YQ.ReduceableCache(20),JQo=7,t0m=1e3,r0m=1e4;async function I2u(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"||s0m(s)||a0m(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(E2u.get(i))continue;let o=t[i];if(!o)continue;o.sort((c,u)=>c-u);let s=u0m(o);if(s.every(c=>c0m(i,c)))continue;let a=l0m(xGr,i,{});n.push(n0m(i,s,a))}return await Promise.all(n).catch(()=>{}),e&&e.length>0&&i0m(e,xGr),xGr.reduce(),e}function n0m(e,t,r){return new Promise(n=>{let i=(0,y2u.createReadStream)(e),o=(0,b2u.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(){E2u.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]=p0m(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 i0m(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;o0m(r.lineno,r,n)}}function o0m(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=v2u(e);i<e;i++){let o=r[i];if(o===void 0)return void g2u(t);t.pre_context.push(o)}if(r[e]===void 0)return void g2u(t);t.context_line=r[e];let n=x2u(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 g2u(e){delete e.pre_context,delete e.context_line,delete e.post_context}function s0m(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function a0m(e){return e.lineno!==void 0&&e.lineno>r0m||e.colno!==void 0&&e.colno>t0m}function c0m(e,t){let r=xGr.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 u0m(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=A2u(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+JQo:(i.push(n),n=A2u(o)),t++}return i}function A2u(e){return[v2u(e),x2u(e)]}function v2u(e){return Math.max(1,e-JQo)}function x2u(e){return e+JQo}function l0m(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function p0m(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 Oit=require("path");function C2u(e=process.cwd()){let t=Oit.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,Oit.isAbsolute)(o.filename)&&(o.filename=r((0,Oit.relative)(n,r(o.filename))));return i}}function f0m(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 w2u(e,t){globalThis.process?.on("uncaughtException",f0m(e,t))}function S2u(e){globalThis.process?.on("unhandledRejection",t=>e(t,{mechanism:{type:"onunhandledrejection",handled:!1}}))}var d0m=2e3,pH=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new sGr({refillRate:1,bucketSize:10,refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return tVt(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()&&(w2u(this.onException.bind(this),this.onFatalError.bind(this)),S2u(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(d0m),process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}};var T2u="5.35.1";var wfe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var Bit=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(wfe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(wfe.QUOTA_LIMITED),r===void 0&&o.push(wfe.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 O2u(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 m0m=6e4,h0m=1152921504606847e3,g0m=["is_not","is_set"],Pit=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},Rd=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},Cee=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},CGr=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 Cee||u instanceof Rd?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 Cee||u instanceof Rd?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 Rd("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 Rd("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 Rd(`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 Rd("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Rd(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Rd(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Rd(`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 Rd(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else throw new Rd(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Rd(`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 Cee)throw f;if(f instanceof Rd)l=!0;else throw f}if(p!==void 0)return p;if(l)throw new Rd("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 k2u(c,i,this.cohorts,this.debugMode,p=>this.evaluateFlagDependency(p,i,o)):u==="flag"?await this.evaluateFlagDependency(c,i,o):R2u(c,i,a),!l)return!1}if(s==null)return!0}return!(s!=null&&await B2u(t.key,r)>s/100)}async getMatchingVariant(t,r){let n=await B2u(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(m0m,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 Pit(`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 Pit(`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 Pit(`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 Pit&&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=vee(()=>{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 B2u(e,t,r=""){let n=await O2u(`${e}.${t}${r}`);return parseInt(n.slice(0,15),16)/h0m}function R2u(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 Rd(`Property ${n} not found in propertyValues`)}let s=t[n];if(s==null&&!g0m.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 P2u(String(i))&&String(s).match(String(i))!==null;case"not_regex":return P2u(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 Rd("Date operations cannot be performed on boolean values");let u=I0m(String(i));if(u==null&&(u=D2u(i)),u==null)throw new Rd(`Invalid date: ${i}`);let l=D2u(s);return["is_date_before"].includes(o)?l<u:l>u}case"semver_eq":return D_(BB(String(s)),BB(String(i)))===0;case"semver_neq":return D_(BB(String(s)),BB(String(i)))!==0;case"semver_gt":return D_(BB(String(s)),BB(String(i)))>0;case"semver_gte":return D_(BB(String(s)),BB(String(i)))>=0;case"semver_lt":return D_(BB(String(s)),BB(String(i)))<0;case"semver_lte":return D_(BB(String(s)),BB(String(i)))<=0;case"semver_tilde":{let u=BB(String(s)),{lower:l,upper:p}=y0m(String(i));return D_(u,l)>=0&&D_(u,p)<0}case"semver_caret":{let u=BB(String(s)),{lower:l,upper:p}=b0m(String(i));return D_(u,l)>=0&&D_(u,p)<0}case"semver_wildcard":{let u=BB(String(s)),{lower:l,upper:p}=E0m(String(i));return D_(u,l)>=0&&D_(u,p)<0}default:throw new Rd(`Unknown operator: ${o}`)}}function A0m(e,t){if(!(e in t))throw new Cee(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function k2u(e,t,r,n=!1,i){let o=String(e.value);A0m(o,r);let s=r[o];return F2u(s,t,r,n,i)}async function F2u(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 F2u(c,t,r,n,i);if(o==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof Cee)throw u;if(u instanceof Rd)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Rd("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 k2u(c,t,r,n,i);else if(c.type==="flag"){if(!i)throw new Rd(`Flag dependency '${c.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(c)}else u=R2u(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 Cee)throw u;if(u instanceof Rd)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Rd("can't match cohort without a given cohort property value");return o==="AND"}function P2u(e){try{return new RegExp(e),!0}catch{return!1}}function N2u(e,t){if(!/^\d+$/.test(e))throw new Rd(`Invalid semver: ${t}`);if(e.length>1&&e[0]==="0")throw new Rd(`Invalid semver: ${t}`);return parseInt(e,10)}function BB(e){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new Rd(`Invalid semver: ${e}`);let n=r.split("."),i=c=>c===void 0||c===""?0:N2u(c,e),o=i(n[0]),s=i(n[1]),a=i(n[2]);return[o,s,a]}function D_(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 y0m(e){let t=BB(e),r=[t[0],t[1],t[2]],n=[t[0],t[1]+1,0];return{lower:r,upper:n}}function b0m(e){let t=BB(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 E0m(e){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new Rd(`Invalid wildcard semver: ${e}`);let n=r.split("."),i=c=>{try{return N2u(c,e)}catch{throw new Rd(`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 D2u(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 Rd(`${e} is in an invalid date format`)}throw new Rd(`The date provided ${e} must be a string, number, or date object`)}function I0m(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 wGr=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};var v0m=100,j2u=3e4,x0m=5e4,C0m=50,w0m=500,S0m="https://us.i.posthog.com",Q2u=new Set;function SGr(e,t){Q2u.has(e)||(Q2u.add(e),console.warn(`[PostHog] ${t}`))}function T0m(e){return typeof e=="string"?e.trim():""}function O0m(e){return(typeof e=="string"?e.trim():"")||void 0}function B0m(e){return(typeof e=="string"?e.trim():"")||S0m}function P0m(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 TGr=class extends oVt{constructor(t,r={}){let n=T0m(t),i={...r,host:B0m(r.host),personalApiKey:O0m(r.personalApiKey)};if(super(n,i),this._memoryStorage=new wGr,this.options=i,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,v0m):j2u,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 CGr({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 pH(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||x0m}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??w0m,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??C0m;this._waitUntilCycle.timer=vee(()=>{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 T2u}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=j2u){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 S=this._flagOverrides[t];if(S===void 0)return;let P=this._payloadOverrides?.[t];return{key:t,enabled:S!==!1,variant:typeof S=="string"?S:void 0,payload:P}}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,x,I;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let S=this.featureFlagsPoller?.featureFlagsByKey[t];if(S)try{let P=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(S,d,{matchValue:i});if(P){m=!0;let D=P.value;E=S.id,I="Evaluated locally",f={key:t,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:P.payload??void 0}}}catch(P){if(P instanceof Cee||P instanceof Rd)this._logger?.info(`${P.name} when computing flag locally: ${t}: ${P.message}`);else throw P}}if(!m&&!c){let S=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,a,[t]);if(S===void 0)y=wfe.UNKNOWN_ERROR;else{g=S.requestId,A=S.evaluatedAt;let P=[];S.errorsWhileComputingFlags&&P.push(wfe.ERRORS_WHILE_COMPUTING),S.quotaLimited?.includes("feature_flags")&&P.push(wfe.QUOTA_LIMITED);let D=S.flags[t];if(D===void 0)P.push(wfe.FLAG_MISSING);else{E=D.metadata?.id,x=D.metadata?.version,I=D.reason?.description??D.reason?.code;let T;if(D.metadata?.payload!==void 0)try{T=JSON.parse(D.metadata.payload)}catch{T=D.metadata.payload}f={key:t,enabled:D.enabled,variant:D.variant,payload:T}}P.length>0&&(y=P.join(","))}}if(o){let S=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,P={$feature_flag:t,$feature_flag_response:S,$feature_flag_id:E,$feature_flag_version:x,$feature_flag_reason:I,locally_evaluated:m,[`$feature/${t}`]:S,$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&&(P.$feature_flag_definitions_loaded_at=D)}y&&(P.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:S,groups:s,disableGeoip:a,properties:P})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){SGr("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(SGr("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){SGr("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 Bit({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),x=new Set;if(E)for(let[C,S]of Object.entries(E.response)){let P=this.featureFlagsPoller?.featureFlagsByKey[C];f[C]={key:C,enabled:S!==!1,variant:typeof S=="string"?S:void 0,payload:E.payloads[C],id:P?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0},x.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[S,P]of Object.entries(C.flags)){if(x.has(S))continue;let D;if(P.metadata?.payload!==void 0)try{D=JSON.parse(P.metadata.payload)}catch{D=P.metadata.payload}f[S]={key:S,enabled:P.enabled,variant:P.variant,payload:D,id:P.metadata?.id,version:P.metadata?.version,reason:P.reason?.description??P.reason?.code,locallyEvaluated:!1}}}}if(this._flagOverrides!==void 0)for(let[C,S]of Object.entries(this._flagOverrides)){if(S===void 0){delete f[C];continue}let P=f[C];f[C]={key:C,enabled:S!==!1,variant:typeof S=="string"?S:void 0,payload:P?.payload,id:P?.id,version:P?.version,reason:P?.reason,locallyEvaluated:P?.locallyEvaluated??!1}}if(this._payloadOverrides!==void 0)for(let[C,S]of Object.entries(this._payloadOverrides)){let P=f[C];P&&(f[C]={...P,payload:S})}return new Bit({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=vee(()=>{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(VFu(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(!pH.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(pH.buildEventMessage(t,{syntheticException:s},r,n).then(a=>this.capture({...a,uuid:i,flags:o})))}}async captureExceptionImmediate(t,r,n,i){if(!pH.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(pH.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=Iee(),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){SGr("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 P0m(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"&&zFu(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 z2u=require("async_hooks"),OGr=class{constructor(){this.storage=new z2u.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 M2u="posthog-node";function D0m(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[YQo.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 YQo=class{static#e=this.POSTHOG_ID_TAG="posthog_distinct_id";constructor(t,r,n,i,o){this.name=M2u,this.name=M2u,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(D0m(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};pH.errorPropertiesBuilder=new YQ.ErrorPropertiesBuilder([new YQ.EventCoercer,new YQ.ErrorCoercer,new YQ.ObjectCoercer,new YQ.StringCoercer,new YQ.PrimitiveCoercer],YQ.createStackParser("node:javascript",YQ.nodeStackLineParser),[NFu(),I2u,C2u()]);var Wve=class extends TGr{getLibraryId(){return"posthog-node"}initializeContext(){return new OGr}};var BGr=class{posthog;constructor({posthogApiKey:t}){this.posthog=new Wve(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.92.0",usingAccessToken:!0,...lce()}})}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 aVt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};lm();Zt();var Dit=require("fs/promises"),L2u=require("os"),U2u=require("path");Irt();var R0m="id",k0m=".fern",cVt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new Wve(r),this.userId=t==null?void 0:bRo(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.92.0",...t,...t.properties,usingAccessToken:!1,...r!=null?{userEmail:r}:{},...lce()}})}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 Cf({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=TD(),r=Me(Vt.of((0,L2u.homedir)()),xe.of(k0m),xe.of(R0m));try{await Kt(r)?this.persistedDistinctId=(await(0,Dit.readFile)(r)).toString():(await(0,Dit.mkdir)((0,U2u.dirname)(r),{recursive:!0}),await(0,Dit.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var XQo;async function uVt(){return XQo==null&&(XQo=await F0m()),XQo}async function F0m(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new aVt;let r=await Wrt();return r!=null?new cVt({token:r,posthogApiKey:e}):await VQ()!=null?new BGr({posthogApiKey:e}):new cVt({token:void 0,posthogApiKey:e})}catch{return new aVt}}bn();kt();Qt();FW();var lVt=be(require("process"),1);RGe();var q2u=be(lCo(),1),G2u=be(_2u(),1);function U1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=_G(e),e.length===0))return 0;e=e.replace((0,G2u.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(q2u.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}bn();function PGr(e){let t=0;for(let r of e.split(`
|
|
3362
|
+
`);for(let s=n;s<o.length;s++){let a=o[s];if(a.length>1024)continue;let c=l2u.test(a)?a.replace(l2u,"$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>=p2u)break}}return f2u(i)}}var zQo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=Gve(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 RLe(t,"DOMException")}isDOMError(t){return RLe(t,"DOMError")}};var MQo=class{match(t){return TQo(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 LQo=class{constructor(){}match(t){return UFu(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 Jbm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,UQo=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(Jbm);return i&&(r=i[1],n=i[2]),[r,n]}};var m2u=["fatal","error","warning","log","info","debug"];function IGr(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 VQo=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 wit(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=IGr(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return Gve(t)&&!LFu(t)&&m2u.indexOf(t)>=0}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(t2u(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var _Qo=class{match(t){return wit(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${IGr(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var qQo=class{match(t){return oGr(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var GQo=class{match(t){return RLe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!wit(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 oGr(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 WQo=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 sVt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},Ybm=new Set([sVt.MESSAGE,sVt.TIMESTAMP]),vGr={enabled:!0,max_bytes:32768};function HQo(e){return e?{enabled:e.enabled??vGr.enabled,max_bytes:Zbm(e.max_bytes,vGr.max_bytes)}:{...vGr}}function Xbm(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>Ybm.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var KQo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=HQo(t)}setConfig(t){this._config=HQo(t),this._trimToMaxBytes()}add(t){let r=$bm(t);if(!r)return;let n=h2u(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 Zbm(e,t){if(!rVt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function $bm(e){let t=e0m(e);if(t)try{let r=JSON.parse(t);if(!tVt(r))return;let n=r,i=n[sVt.MESSAGE],o=n[sVt.TIMESTAMP];return!Gve(i)||i.trim().length===0||!Gve(o)&&!rVt(o)?void 0:{step:n,json:t}}catch{return}}function e0m(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 h2u(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 y2u=require("fs"),b2u=require("readline"),xGr=new YQ.ReduceableCache(25),E2u=new YQ.ReduceableCache(20),JQo=7,t0m=1e3,r0m=1e4;async function I2u(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"||s0m(s)||a0m(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(E2u.get(i))continue;let o=t[i];if(!o)continue;o.sort((c,u)=>c-u);let s=u0m(o);if(s.every(c=>c0m(i,c)))continue;let a=l0m(xGr,i,{});n.push(n0m(i,s,a))}return await Promise.all(n).catch(()=>{}),e&&e.length>0&&i0m(e,xGr),xGr.reduce(),e}function n0m(e,t,r){return new Promise(n=>{let i=(0,y2u.createReadStream)(e),o=(0,b2u.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(){E2u.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]=p0m(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 i0m(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;o0m(r.lineno,r,n)}}function o0m(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=v2u(e);i<e;i++){let o=r[i];if(o===void 0)return void g2u(t);t.pre_context.push(o)}if(r[e]===void 0)return void g2u(t);t.context_line=r[e];let n=x2u(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 g2u(e){delete e.pre_context,delete e.context_line,delete e.post_context}function s0m(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function a0m(e){return e.lineno!==void 0&&e.lineno>r0m||e.colno!==void 0&&e.colno>t0m}function c0m(e,t){let r=xGr.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 u0m(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=A2u(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+JQo:(i.push(n),n=A2u(o)),t++}return i}function A2u(e){return[v2u(e),x2u(e)]}function v2u(e){return Math.max(1,e-JQo)}function x2u(e){return e+JQo}function l0m(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function p0m(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 Oit=require("path");function C2u(e=process.cwd()){let t=Oit.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,Oit.isAbsolute)(o.filename)&&(o.filename=r((0,Oit.relative)(n,r(o.filename))));return i}}function f0m(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 w2u(e,t){globalThis.process?.on("uncaughtException",f0m(e,t))}function S2u(e){globalThis.process?.on("unhandledRejection",t=>e(t,{mechanism:{type:"onunhandledrejection",handled:!1}}))}var d0m=2e3,pH=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new sGr({refillRate:1,bucketSize:10,refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return tVt(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()&&(w2u(this.onException.bind(this),this.onFatalError.bind(this)),S2u(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(d0m),process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}};var T2u="5.35.1";var wfe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var Bit=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(wfe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(wfe.QUOTA_LIMITED),r===void 0&&o.push(wfe.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 O2u(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 m0m=6e4,h0m=1152921504606847e3,g0m=["is_not","is_set"],Pit=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},Rd=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},Cee=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},CGr=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 Cee||u instanceof Rd?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 Cee||u instanceof Rd?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 Rd("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 Rd("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 Rd(`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 Rd("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Rd(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Rd(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Rd(`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 Rd(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else throw new Rd(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Rd(`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 Cee)throw f;if(f instanceof Rd)l=!0;else throw f}if(p!==void 0)return p;if(l)throw new Rd("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 k2u(c,i,this.cohorts,this.debugMode,p=>this.evaluateFlagDependency(p,i,o)):u==="flag"?await this.evaluateFlagDependency(c,i,o):R2u(c,i,a),!l)return!1}if(s==null)return!0}return!(s!=null&&await B2u(t.key,r)>s/100)}async getMatchingVariant(t,r){let n=await B2u(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(m0m,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 Pit(`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 Pit(`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 Pit(`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 Pit&&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=vee(()=>{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 B2u(e,t,r=""){let n=await O2u(`${e}.${t}${r}`);return parseInt(n.slice(0,15),16)/h0m}function R2u(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 Rd(`Property ${n} not found in propertyValues`)}let s=t[n];if(s==null&&!g0m.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 P2u(String(i))&&String(s).match(String(i))!==null;case"not_regex":return P2u(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 Rd("Date operations cannot be performed on boolean values");let u=I0m(String(i));if(u==null&&(u=D2u(i)),u==null)throw new Rd(`Invalid date: ${i}`);let l=D2u(s);return["is_date_before"].includes(o)?l<u:l>u}case"semver_eq":return D_(BB(String(s)),BB(String(i)))===0;case"semver_neq":return D_(BB(String(s)),BB(String(i)))!==0;case"semver_gt":return D_(BB(String(s)),BB(String(i)))>0;case"semver_gte":return D_(BB(String(s)),BB(String(i)))>=0;case"semver_lt":return D_(BB(String(s)),BB(String(i)))<0;case"semver_lte":return D_(BB(String(s)),BB(String(i)))<=0;case"semver_tilde":{let u=BB(String(s)),{lower:l,upper:p}=y0m(String(i));return D_(u,l)>=0&&D_(u,p)<0}case"semver_caret":{let u=BB(String(s)),{lower:l,upper:p}=b0m(String(i));return D_(u,l)>=0&&D_(u,p)<0}case"semver_wildcard":{let u=BB(String(s)),{lower:l,upper:p}=E0m(String(i));return D_(u,l)>=0&&D_(u,p)<0}default:throw new Rd(`Unknown operator: ${o}`)}}function A0m(e,t){if(!(e in t))throw new Cee(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function k2u(e,t,r,n=!1,i){let o=String(e.value);A0m(o,r);let s=r[o];return F2u(s,t,r,n,i)}async function F2u(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 F2u(c,t,r,n,i);if(o==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof Cee)throw u;if(u instanceof Rd)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Rd("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 k2u(c,t,r,n,i);else if(c.type==="flag"){if(!i)throw new Rd(`Flag dependency '${c.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(c)}else u=R2u(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 Cee)throw u;if(u instanceof Rd)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Rd("can't match cohort without a given cohort property value");return o==="AND"}function P2u(e){try{return new RegExp(e),!0}catch{return!1}}function N2u(e,t){if(!/^\d+$/.test(e))throw new Rd(`Invalid semver: ${t}`);if(e.length>1&&e[0]==="0")throw new Rd(`Invalid semver: ${t}`);return parseInt(e,10)}function BB(e){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new Rd(`Invalid semver: ${e}`);let n=r.split("."),i=c=>c===void 0||c===""?0:N2u(c,e),o=i(n[0]),s=i(n[1]),a=i(n[2]);return[o,s,a]}function D_(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 y0m(e){let t=BB(e),r=[t[0],t[1],t[2]],n=[t[0],t[1]+1,0];return{lower:r,upper:n}}function b0m(e){let t=BB(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 E0m(e){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new Rd(`Invalid wildcard semver: ${e}`);let n=r.split("."),i=c=>{try{return N2u(c,e)}catch{throw new Rd(`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 D2u(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 Rd(`${e} is in an invalid date format`)}throw new Rd(`The date provided ${e} must be a string, number, or date object`)}function I0m(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 wGr=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};var v0m=100,j2u=3e4,x0m=5e4,C0m=50,w0m=500,S0m="https://us.i.posthog.com",Q2u=new Set;function SGr(e,t){Q2u.has(e)||(Q2u.add(e),console.warn(`[PostHog] ${t}`))}function T0m(e){return typeof e=="string"?e.trim():""}function O0m(e){return(typeof e=="string"?e.trim():"")||void 0}function B0m(e){return(typeof e=="string"?e.trim():"")||S0m}function P0m(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 TGr=class extends oVt{constructor(t,r={}){let n=T0m(t),i={...r,host:B0m(r.host),personalApiKey:O0m(r.personalApiKey)};if(super(n,i),this._memoryStorage=new wGr,this.options=i,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,v0m):j2u,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 CGr({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 pH(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||x0m}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??w0m,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??C0m;this._waitUntilCycle.timer=vee(()=>{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 T2u}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=j2u){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 S=this._flagOverrides[t];if(S===void 0)return;let P=this._payloadOverrides?.[t];return{key:t,enabled:S!==!1,variant:typeof S=="string"?S:void 0,payload:P}}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,x,I;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let S=this.featureFlagsPoller?.featureFlagsByKey[t];if(S)try{let P=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(S,d,{matchValue:i});if(P){m=!0;let D=P.value;E=S.id,I="Evaluated locally",f={key:t,enabled:D!==!1,variant:typeof D=="string"?D:void 0,payload:P.payload??void 0}}}catch(P){if(P instanceof Cee||P instanceof Rd)this._logger?.info(`${P.name} when computing flag locally: ${t}: ${P.message}`);else throw P}}if(!m&&!c){let S=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,a,[t]);if(S===void 0)y=wfe.UNKNOWN_ERROR;else{g=S.requestId,A=S.evaluatedAt;let P=[];S.errorsWhileComputingFlags&&P.push(wfe.ERRORS_WHILE_COMPUTING),S.quotaLimited?.includes("feature_flags")&&P.push(wfe.QUOTA_LIMITED);let D=S.flags[t];if(D===void 0)P.push(wfe.FLAG_MISSING);else{E=D.metadata?.id,x=D.metadata?.version,I=D.reason?.description??D.reason?.code;let T;if(D.metadata?.payload!==void 0)try{T=JSON.parse(D.metadata.payload)}catch{T=D.metadata.payload}f={key:t,enabled:D.enabled,variant:D.variant,payload:T}}P.length>0&&(y=P.join(","))}}if(o){let S=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,P={$feature_flag:t,$feature_flag_response:S,$feature_flag_id:E,$feature_flag_version:x,$feature_flag_reason:I,locally_evaluated:m,[`$feature/${t}`]:S,$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&&(P.$feature_flag_definitions_loaded_at=D)}y&&(P.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:S,groups:s,disableGeoip:a,properties:P})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){SGr("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(SGr("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){SGr("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 Bit({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),x=new Set;if(E)for(let[C,S]of Object.entries(E.response)){let P=this.featureFlagsPoller?.featureFlagsByKey[C];f[C]={key:C,enabled:S!==!1,variant:typeof S=="string"?S:void 0,payload:E.payloads[C],id:P?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0},x.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[S,P]of Object.entries(C.flags)){if(x.has(S))continue;let D;if(P.metadata?.payload!==void 0)try{D=JSON.parse(P.metadata.payload)}catch{D=P.metadata.payload}f[S]={key:S,enabled:P.enabled,variant:P.variant,payload:D,id:P.metadata?.id,version:P.metadata?.version,reason:P.reason?.description??P.reason?.code,locallyEvaluated:!1}}}}if(this._flagOverrides!==void 0)for(let[C,S]of Object.entries(this._flagOverrides)){if(S===void 0){delete f[C];continue}let P=f[C];f[C]={key:C,enabled:S!==!1,variant:typeof S=="string"?S:void 0,payload:P?.payload,id:P?.id,version:P?.version,reason:P?.reason,locallyEvaluated:P?.locallyEvaluated??!1}}if(this._payloadOverrides!==void 0)for(let[C,S]of Object.entries(this._payloadOverrides)){let P=f[C];P&&(f[C]={...P,payload:S})}return new Bit({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=vee(()=>{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(VFu(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(!pH.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(pH.buildEventMessage(t,{syntheticException:s},r,n).then(a=>this.capture({...a,uuid:i,flags:o})))}}async captureExceptionImmediate(t,r,n,i){if(!pH.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(pH.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=Iee(),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){SGr("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 P0m(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"&&zFu(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 z2u=require("async_hooks"),OGr=class{constructor(){this.storage=new z2u.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 M2u="posthog-node";function D0m(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[YQo.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 YQo=class{static#e=this.POSTHOG_ID_TAG="posthog_distinct_id";constructor(t,r,n,i,o){this.name=M2u,this.name=M2u,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(D0m(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};pH.errorPropertiesBuilder=new YQ.ErrorPropertiesBuilder([new YQ.EventCoercer,new YQ.ErrorCoercer,new YQ.ObjectCoercer,new YQ.StringCoercer,new YQ.PrimitiveCoercer],YQ.createStackParser("node:javascript",YQ.nodeStackLineParser),[NFu(),I2u,C2u()]);var Wve=class extends TGr{getLibraryId(){return"posthog-node"}initializeContext(){return new OGr}};var BGr=class{posthog;constructor({posthogApiKey:t}){this.posthog=new Wve(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.92.1",usingAccessToken:!0,...lce()}})}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 aVt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};lm();Zt();var Dit=require("fs/promises"),L2u=require("os"),U2u=require("path");Irt();var R0m="id",k0m=".fern",cVt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new Wve(r),this.userId=t==null?void 0:bRo(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.92.1",...t,...t.properties,usingAccessToken:!1,...r!=null?{userEmail:r}:{},...lce()}})}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 Cf({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=TD(),r=Me(Vt.of((0,L2u.homedir)()),xe.of(k0m),xe.of(R0m));try{await Kt(r)?this.persistedDistinctId=(await(0,Dit.readFile)(r)).toString():(await(0,Dit.mkdir)((0,U2u.dirname)(r),{recursive:!0}),await(0,Dit.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var XQo;async function uVt(){return XQo==null&&(XQo=await F0m()),XQo}async function F0m(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new aVt;let r=await Wrt();return r!=null?new cVt({token:r,posthogApiKey:e}):await VQ()!=null?new BGr({posthogApiKey:e}):new cVt({token:void 0,posthogApiKey:e})}catch{return new aVt}}bn();kt();Qt();FW();var lVt=be(require("process"),1);RGe();var q2u=be(lCo(),1),G2u=be(_2u(),1);function U1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=_G(e),e.length===0))return 0;e=e.replace((0,G2u.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(q2u.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}bn();function PGr(e){let t=0;for(let r of e.split(`
|
|
3363
3363
|
`))t=Math.max(t,U1(r));return t}var pNu=be($Qo(),1);var j0m=/[\p{Lu}]/u,Q0m=/[\p{Ll}]/u,K2u=/^[\p{Lu}](?![\p{Lu}])/gu,X2u=/([\p{Alpha}\p{N}_]|$)/u,ezo=/[_.\- ]+/,z0m=new RegExp("^"+ezo.source),J2u=new RegExp(ezo.source+X2u.source,"gu"),Y2u=new RegExp("\\d+"+X2u.source,"gu"),M0m=(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&&j0m.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,s=o,o=!0,c++):o&&s&&Q0m.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},L0m=(e,t)=>(K2u.lastIndex=0,e.replace(K2u,r=>t(r))),U0m=(e,t)=>(J2u.lastIndex=0,Y2u.lastIndex=0,e.replace(J2u,(r,n)=>t(n)).replace(Y2u,r=>t(r)));function tzo(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?ezo.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=M0m(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(z0m,""),e=t.preserveConsecutiveUppercase?L0m(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),U0m(e,n))}var ozo=be($2u(),1);RGe();var eNu=(e=0)=>t=>`\x1B[${t+e}m`,tNu=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,rNu=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,k0={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]}},xPI=Object.keys(k0.modifier),G0m=Object.keys(k0.color),W0m=Object.keys(k0.bgColor),CPI=[...G0m,...W0m];function H0m(){let e=new Map;for(let[t,r]of Object.entries(k0)){for(let[n,i]of Object.entries(r))k0[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=k0[n],e.set(i[0],i[1]);Object.defineProperty(k0,t,{value:r,enumerable:!1})}return Object.defineProperty(k0,"codes",{value:e,enumerable:!1}),k0.color.close="\x1B[39m",k0.bgColor.close="\x1B[49m",k0.color.ansi=eNu(),k0.color.ansi256=tNu(),k0.color.ansi16m=rNu(),k0.bgColor.ansi=eNu(10),k0.bgColor.ansi256=tNu(10),k0.bgColor.ansi16m=rNu(10),Object.defineProperties(k0,{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=>k0.rgbToAnsi256(...k0.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)=>k0.ansi256ToAnsi(k0.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>k0.ansi256ToAnsi(k0.hexToAnsi256(t)),enumerable:!1}}),k0}var K0m=H0m(),nNu=K0m;var DGr=new Set(["\x1B","\x9B"]),J0m=39,nzo="\x07",sNu="[",Y0m="]",aNu="m",izo=`${Y0m}8;;`,iNu=e=>`${DGr.values().next().value}${sNu}${e}${aNu}`,oNu=e=>`${DGr.values().next().value}${izo}${e}${nzo}`,X0m=e=>e.split(" ").map(t=>U1(t)),rzo=(e,t,r)=>{let n=[...t],i=!1,o=!1,s=U1(_G(e[e.length-1]));for(let[a,c]of n.entries()){let u=U1(c);if(s+u<=r?e[e.length-1]+=c:(e.push(c),s=0),DGr.has(c)&&(i=!0,o=n.slice(a+1).join("").startsWith(izo)),i){o?c===nzo&&(i=!1,o=!1):c===aNu&&(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())},Z0m=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(U1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},$0m=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,o,s=X0m(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=U1(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(""),rzo(a,l,t);continue}if(p+s[u]>t&&p>0&&s[u]>0){if(r.wordWrap===!1&&p<t){rzo(a,l,t);continue}a.push("")}if(p+s[u]>t&&r.wordWrap===!1){rzo(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Z0m(u)));let c=[...a.join(`
|
|
3364
3364
|
`)];for(let[u,l]of c.entries()){if(n+=l,DGr.has(l)){let{groups:d}=new RegExp(`(?:\\${sNu}(?<code>\\d+)m|\\${izo}(?<uri>.*)${nzo})`).exec(c.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let f=Number.parseFloat(d.code);i=f===J0m?void 0:f}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let p=nNu.codes.get(Number(i));c[u+1]===`
|
|
3365
3365
|
`?(o&&(n+=oNu("")),i&&p&&(n+=iNu(p))):l===`
|
|
@@ -3933,7 +3933,7 @@ Hint: Values starting with "@" (such as scoped npm packages) must be wrapped in
|
|
|
3933
3933
|
Add a 'docs:' section to your fern.yml to get started.`,code:B.Code.ConfigError});let o=await new APe({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&&Voh(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 B({code:B.Code.ValidationError});return}if(c.length>0)for(let p of c){let d=p.severity==="warning"?le.yellow:le.red;process.stderr.write(`${d(`${p.displayRelativeFilepath}:${p.line}:${p.column}: ${p.message}`)}
|
|
3934
3934
|
`)}let l=0;if(o.mdxParseErrors.length>0){for(let p of o.mdxParseErrors)t.stderr.info(`
|
|
3935
3935
|
${p.toString()}
|
|
3936
|
-
`);r.fix?l+=await Zti(t,o.mdxParseErrors):process.stdout.isTTY===!0&&!IZn()&&await $ti(t,o.mdxParseErrors)}if(r.fix&&c.length>0){let d=await new Qbt({context:t}).fix({workspace:n,violations:c});l+=d.fixedCount}if(u&&(!r.fix||l===0))throw new B({code:B.Code.ValidationError});if(o.warningCount>0){t.stderr.info(`${Pr.warning} ${le.yellow(`Found ${o.warningCount} warnings`)}`),t.stderr.info(le.dim(" Run 'fern docs check --strict' to treat warnings as errors"));return}t.stderr.info(`${Pr.success} ${le.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=>Bee(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 Voh(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 IZo(e){let t=new EZo;$n(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}))}Ib();Qt();var vcl=be(require("net"),1),xcl=be(require("os"),1),rri=class extends Error{constructor(t){super(`${t} is locked`)}},Ubt={old:new Set,young:new Set},_oh=1e3*15,Ccl=new Set;var tqt,qoh=()=>{let e=xcl.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},Ecl=e=>new Promise((t,r)=>{let n=vcl.default.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),Icl=async(e,t)=>{if(e.host||e.port===0)return Ecl(e);for(let r of t)try{await Ecl({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},Goh=e=>Ubt.old.has(e)||Ubt.young.has(e)||Ccl.has(e),Woh=function*(e){e&&(yield*e),yield 0};async function bPe(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??{};tqt===void 0&&(tqt=setTimeout(()=>{tqt=void 0,Ubt.old=Ubt.young,Ubt.young=new Set},_oh),tqt.unref&&tqt.unref());let o=qoh();for(let s of Woh(t))try{if(r.has(s))continue;let a=await Icl({...i,port:s},o);for(;Goh(a);){if(s!==0)throw new rri(s);a=await Icl({...i,port:s},o)}return n?Ccl.add(a):Ubt.young.add(a),a}catch(a){if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof rri))throw a}throw new Error("No available ports found")}Qt();var Tcl=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,wcl="docs.buildwithfern.com",Scl=62;function U4e(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)),Tcl.test(t)}function Ocl(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function rqt({orgId:e,previewId:t}){let r=Ocl(t),n=`${e}-preview-${r}.${wcl}`;if(n.length<=Scl)return n;let i=`${e}-preview-`,o=Scl-i.length;if(o<8)throw new B({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:B.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${wcl}`}kt();BC();Wm();Zt();TI();Qt();bn();var ars=require("child_process"),Z0l=be(CZo(),1),crs=be(Vri(),1),urs=be(require("fs"),1),MPe=require("fs/promises"),$0l=be(require("http"),1),eEl=be(require("os"),1),Dii=be(require("path"),1);nni();Zt();var N9=require("fs/promises"),fml=require("os"),pes=be(require("path"),1),kmh=".fern",Fmh="logs",les=100*1024*1024;function Nmh(){return"cli@5.92.
|
|
3936
|
+
`);r.fix?l+=await Zti(t,o.mdxParseErrors):process.stdout.isTTY===!0&&!IZn()&&await $ti(t,o.mdxParseErrors)}if(r.fix&&c.length>0){let d=await new Qbt({context:t}).fix({workspace:n,violations:c});l+=d.fixedCount}if(u&&(!r.fix||l===0))throw new B({code:B.Code.ValidationError});if(o.warningCount>0){t.stderr.info(`${Pr.warning} ${le.yellow(`Found ${o.warningCount} warnings`)}`),t.stderr.info(le.dim(" Run 'fern docs check --strict' to treat warnings as errors"));return}t.stderr.info(`${Pr.success} ${le.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=>Bee(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 Voh(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 IZo(e){let t=new EZo;$n(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}))}Ib();Qt();var vcl=be(require("net"),1),xcl=be(require("os"),1),rri=class extends Error{constructor(t){super(`${t} is locked`)}},Ubt={old:new Set,young:new Set},_oh=1e3*15,Ccl=new Set;var tqt,qoh=()=>{let e=xcl.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},Ecl=e=>new Promise((t,r)=>{let n=vcl.default.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),Icl=async(e,t)=>{if(e.host||e.port===0)return Ecl(e);for(let r of t)try{await Ecl({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},Goh=e=>Ubt.old.has(e)||Ubt.young.has(e)||Ccl.has(e),Woh=function*(e){e&&(yield*e),yield 0};async function bPe(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??{};tqt===void 0&&(tqt=setTimeout(()=>{tqt=void 0,Ubt.old=Ubt.young,Ubt.young=new Set},_oh),tqt.unref&&tqt.unref());let o=qoh();for(let s of Woh(t))try{if(r.has(s))continue;let a=await Icl({...i,port:s},o);for(;Goh(a);){if(s!==0)throw new rri(s);a=await Icl({...i,port:s},o)}return n?Ccl.add(a):Ubt.young.add(a),a}catch(a){if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof rri))throw a}throw new Error("No available ports found")}Qt();var Tcl=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,wcl="docs.buildwithfern.com",Scl=62;function U4e(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)),Tcl.test(t)}function Ocl(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function rqt({orgId:e,previewId:t}){let r=Ocl(t),n=`${e}-preview-${r}.${wcl}`;if(n.length<=Scl)return n;let i=`${e}-preview-`,o=Scl-i.length;if(o<8)throw new B({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:B.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${wcl}`}kt();BC();Wm();Zt();TI();Qt();bn();var ars=require("child_process"),Z0l=be(CZo(),1),crs=be(Vri(),1),urs=be(require("fs"),1),MPe=require("fs/promises"),$0l=be(require("http"),1),eEl=be(require("os"),1),Dii=be(require("path"),1);nni();Zt();var N9=require("fs/promises"),fml=require("os"),pes=be(require("path"),1),kmh=".fern",Fmh="logs",les=100*1024*1024;function Nmh(){return"cli@5.92.1"}var tUe=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??Me(Me(Vt.of((0,fml.homedir)()),xe.of(kmh)),xe.of(Fmh));await Kt(n)||await(0,N9.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=Me(n,xe.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${pes.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
|
|
3937
3937
|
`);await(0,N9.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)+`
|
|
3938
3938
|
`;try{await(0,N9.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:Nmh(),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,N9.readdir)(t)).filter(c=>c.endsWith(".log")),i=[];for(let c of n){let u=pes.default.join(t,c);try{let l=await(0,N9.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=les/1024/1024;if(o<=les){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<=les)break;if(!(this.logFilePath!=null&&c.fullPath===this.logFilePath))try{await(0,N9.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 ini={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"};function dml(e){let t=jmh();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:ini});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",...ini}})}catch{return new Response(JSON.stringify(i()),{headers:{"Content-Type":"application/json",...ini}})}let d=/^\/_local\/(.*)/.exec(p.pathname);return u.method==="GET"&&d!=null?new Response(t.file(`/${d[1]}`),{headers:ini}):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 tUe.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 jmh(){return globalThis.Bun}Qt();var Rml=require("events"),uni=be(require("fs"),1),nUe=be(require("path"),1);var mml=be(require("os"),1),hml=300,OPe=20,Nqt=1e7,gml=mml.default.platform();var Qmh=gml==="darwin",fes=gml==="win32",BPe=Qmh||fes,Aml=3e3,yml=2e4,des=1250;var kie;(function(e){e[e.DIR=1]="DIR",e[e.FILE=2]="FILE"})(kie||(kie={}));var rUe;(function(e){e.CHANGE="change",e.RENAME="rename"})(rUe||(rUe={}));var jqt;(function(e){e.CHANGE="change",e.ERROR="error"})(jqt||(jqt={}));var Tc;(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"})(Tc||(Tc={}));var uN;(function(e){e.ALL="all",e.CLOSE="close",e.ERROR="error",e.READY="ready"})(uN||(uN={}));var zmh=(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,S=I-u,P=C>=t||S>=o;return[I,P]},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,S=I-u,P=t-C,D=o-S,T=Math.min(P,D);return E(T)},E=I=>{a&&clearTimeout(a),!(I<=0)&&(a=setTimeout(A,I))},x=(...I)=>{let[C,S]=l(),P=!!a;if(s=I,c=C,(S||!a)&&E(t),S)return P?p(C):m(C)};return x.cancel=d,x.flush=f,x},oni=zmh;var Aes=be(require("fs"),1),ani=be(require("path"),1);var jd=be(require("fs"),1),GB=require("util");var ime=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},Fie=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(i){return t(i)}};var mes=be(require("process"),1),bml=mes.default.getuid?!mes.default.getuid():!1,Eml=1e4,hM=()=>{};var Qqt={isChangeErrorOk:e=>{if(!Qqt.isNodeError(e))return!1;let{code:t}=e;return t==="ENOSYS"||!bml&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!Qqt.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(!Qqt.isNodeError(e))throw e;if(!Qqt.isChangeErrorOk(e))throw e}},tx=Qqt;var hes=class{constructor(){this.interval=25,this.intervalId=void 0,this.limit=Eml,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()}}}}},Iml=new hes;var ome=(e,t)=>function(n){return function i(...o){return Iml.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)})}},sme=(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 Mmh={attempt:{chmod:ime((0,GB.promisify)(jd.default.chmod),tx.onChangeError),chown:ime((0,GB.promisify)(jd.default.chown),tx.onChangeError),close:ime((0,GB.promisify)(jd.default.close),hM),fsync:ime((0,GB.promisify)(jd.default.fsync),hM),mkdir:ime((0,GB.promisify)(jd.default.mkdir),hM),realpath:ime((0,GB.promisify)(jd.default.realpath),hM),stat:ime((0,GB.promisify)(jd.default.stat),hM),unlink:ime((0,GB.promisify)(jd.default.unlink),hM),chmodSync:Fie(jd.default.chmodSync,tx.onChangeError),chownSync:Fie(jd.default.chownSync,tx.onChangeError),closeSync:Fie(jd.default.closeSync,hM),existsSync:Fie(jd.default.existsSync,hM),fsyncSync:Fie(jd.default.fsync,hM),mkdirSync:Fie(jd.default.mkdirSync,hM),realpathSync:Fie(jd.default.realpathSync,hM),statSync:Fie(jd.default.statSync,hM),unlinkSync:Fie(jd.default.unlinkSync,hM)},retry:{close:ome((0,GB.promisify)(jd.default.close),tx.isRetriableError),fsync:ome((0,GB.promisify)(jd.default.fsync),tx.isRetriableError),open:ome((0,GB.promisify)(jd.default.open),tx.isRetriableError),readFile:ome((0,GB.promisify)(jd.default.readFile),tx.isRetriableError),rename:ome((0,GB.promisify)(jd.default.rename),tx.isRetriableError),stat:ome((0,GB.promisify)(jd.default.stat),tx.isRetriableError),write:ome((0,GB.promisify)(jd.default.write),tx.isRetriableError),writeFile:ome((0,GB.promisify)(jd.default.writeFile),tx.isRetriableError),closeSync:sme(jd.default.closeSync,tx.isRetriableError),fsyncSync:sme(jd.default.fsyncSync,tx.isRetriableError),openSync:sme(jd.default.openSync,tx.isRetriableError),readFileSync:sme(jd.default.readFileSync,tx.isRetriableError),renameSync:sme(jd.default.renameSync,tx.isRetriableError),statSync:sme(jd.default.statSync,tx.isRetriableError),writeSync:sme(jd.default.writeSync,tx.isRetriableError),writeFileSync:sme(jd.default.writeFileSync,tx.isRetriableError)}},vml=Mmh;var sni=be(require("fs"),1),zqt=be(require("path"),1);var ges=()=>{};var Lmh=()=>{let e=ges,t=ges,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}},xml=Lmh;var Umh=()=>{let{promise:e,resolve:t,isPending:r}=xml(),n=0,i=()=>{n+=1},o=()=>{n-=1,!n&&t()};return i(),queueMicrotask(o),{promise:e,isPending:r,increment:i,decrement:o}},Cml=Umh;var wml={then:e=>{e()}};var Sml=e=>Array.isArray(e)?e:[e],Tml=e=>typeof e=="function";var Vmh=(e,t)=>{let r=t?.followSymlinks??!1,n=t?.depth??1/0,i=t?.limit??1/0,o=t?.ignore??[],s=Sml(o).map(oe=>Tml(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={},x={},I=new Set,C={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{},map:{}},S={directories:l,directoriesNames:p,directoriesNamesToPaths:d,files:f,filesNames:m,filesNamesToPaths:g,symlinks:A,symlinksNames:y,symlinksNamesToPaths:E,map:x},{promise:P,increment:D,decrement:T}=Cml(),z=0,K=(oe,de,Oe,Ce)=>{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),!(Ce>=n)&&(z>=i||fe(de,Ce+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))},X=(oe,de,Oe,Ce)=>{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&&(Ce>=n||z>=i||we(de,Ce+1)))},ce=(oe,de,Oe,Ce,Ne)=>{c.aborted||a(de)||(Ce.isDirectory()?K(oe,de,Oe,Ne):Ce.isFile()?Y(oe,de,Oe):Ce.isSymbolicLink()&&X(oe,de,Oe,Ne))},pe=(oe,de,Oe,Ce)=>{if(c.aborted)return;let Ne=de===zqt.default.sep?"":zqt.default.sep,Ze=Oe.name,ct=`${de}${Ne}${Ze}`;a(ct)||(Oe.isDirectory()?K(oe,ct,Ze,Ce):Oe.isFile()?Y(oe,ct,Ze):Oe.isSymbolicLink()&&X(oe,ct,Ze,Ce))},ne=(oe,de,Oe,Ce)=>{for(let Ne=0,Ze=Oe.length;Ne<Ze;Ne++)pe(oe,de,Oe[Ne],Ce)},fe=(oe,de)=>{c.aborted||de>n||z>=i||(D(),sni.default.readdir(oe,{withFileTypes:!0},(Oe,Ce)=>{if(Oe||c.aborted||!Ce.length)return T();(u(Ce)||wml).then(()=>{let Ze=x[oe]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};ne(Ze,oe,Ce,de),T()})}))},we=(oe,de)=>{D(),sni.default.realpath(oe,(Oe,Ce)=>{if(Oe||c.aborted)return T();sni.default.stat(Ce,(Ne,Ze)=>{if(Ne||c.aborted)return T();let ct=zqt.default.basename(Ce),ht=x[oe]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};ce(ht,Ce,ct,Ze,de),T()})})};return(async(oe,de=1)=>(oe=zqt.default.normalize(oe),I.add(oe),fe(oe,de),await P,c.aborted?C:S))(e)},Oml=Vmh;var Nie={lang:{debounce:oni,attempt:e=>{try{return e()}catch(t){return Nie.lang.castError(t)}},castArray:e=>Nie.lang.isArray(e)?e:[e],castError:e=>Nie.lang.isError(e)?e:Nie.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(Nie.lang.isNaN(e))return Nie.lang.isNaN(t);if(Nie.lang.isPrimitive(e)||Nie.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(ani.default.sep).length-1),getRealPath:(e,t)=>{try{return t?Aes.default.realpathSync.native(e):Aes.default.realpathSync(e)}catch{return}},isSubPath:(e,t)=>t.startsWith(e)&&t[e.length]===ani.default.sep&&t.length-e.length>ani.default.sep.length,poll:(e,t=yml)=>vml.retry.stat(t)(e,{bigint:!0}).catch(Nie.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 Oml(e,{depth:r,limit:n,ignore:t,signal:i});return[s.directories,s.files]}}}},Zl=Nie;var cni=be(require("path"),1);var yes=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=hml){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===Tc.CHANGE&&a===Tc.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===Tc.ADD_DIR?await this.eventsPopulateAddDir(t,i,r,n):s===Tc.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??OPe:Math.min(1,this.options.depth??OPe),s=this.options.limit??Nqt,[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(Tc.ADD,t))}onTargetAddDir(t){t!==this.folderPath&&this.options.recursive&&!BPe&&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(Tc.ADD_DIR,t))}onTargetChange(t){this._isSubRoot(t)&&this.watcher.event(Tc.CHANGE,t)}onTargetUnlink(t){this.watcher.watchersClose(cni.default.dirname(t),t,!1),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlink(t,this.options.renameTimeout):this.watcher.event(Tc.UNLINK,t))}onTargetUnlinkDir(t){this.watcher.watchersClose(cni.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(Tc.UNLINK_DIR,t))}onTargetEvent(t){let[r,n]=t;r===Tc.ADD?this.onTargetAdd(n):r===Tc.ADD_DIR?this.onTargetAddDir(n):r===Tc.CHANGE?this.onTargetChange(n):r===Tc.UNLINK?this.onTargetUnlink(n):r===Tc.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=rUe.CHANGE,r){if(this.watcher.isClosed())return;let n=cni.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){fes&&t.code==="EPERM"?this.onWatcherChange(rUe.CHANGE,""):this.watcher.error(t)}async init(){await this.initWatcherEvents(),await this.initInitialEvents()}async initWatcherEvents(){let t=this.onWatcherChange.bind(this);this.fswatcher.on(jqt.CHANGE,t);let r=this.onWatcherError.bind(this);this.fswatcher.on(jqt.ERROR,r)}async initInitialEvents(){let t=!this.watcher.isReady();if(this.filePath){if(this.watcher._poller.stats.has(this.filePath))return;await this.onWatcherEvent(rUe.CHANGE,this.filePath,t)}else{let r=this.options.recursive&&BPe&&this.options.native!==!1?this.options.depth??OPe:Math.min(1,this.options.depth??OPe),n=this.options.limit??Nqt,[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(rUe.CHANGE,a,t)}))}}},Bml=yes;var lN={interval:100,intervalId:void 0,fns:new Map,init:()=>{lN.intervalId||(lN.intervalId=setInterval(lN.resolve,lN.interval))},reset:()=>{lN.intervalId&&(clearInterval(lN.intervalId),delete lN.intervalId)},add:(e,t)=>{lN.fns.set(e,Date.now()+t),lN.init()},remove:e=>{lN.fns.delete(e)},resolve:()=>{if(!lN.fns.size)return lN.reset();let e=Date.now();for(let[t,r]of lN.fns)r>=e||(lN.remove(t),t())}},Mqt=lN;var Lqt=class e{constructor(t){this._watcher=t,this.reset()}getLockAdd(t,r=des){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),Mqt.remove(u)},u=()=>{c(),a()};Mqt.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=des){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),Mqt.remove(u)},u=()=>{c(),a()};Mqt.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,Tc.ADD,kie.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,Tc.ADD_DIR,kie.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,Tc.UNLINK,kie.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,Tc.UNLINK_DIR,kie.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}}};Lqt.DIR_EVENTS={add:Tc.ADD_DIR,rename:Tc.RENAME_DIR,unlink:Tc.UNLINK_DIR};Lqt.FILE_EVENTS={add:Tc.ADD,change:Tc.CHANGE,rename:Tc.RENAME,unlink:Tc.UNLINK};var Pml=Lqt;var bes=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}},Ees=bes;var Ies=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}},Dml=Ies;var ves=class{constructor(){this.inos={},this.paths=new Ees,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 Dml(n)}reset(){this.inos={},this.paths=new Ees,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,Tc.ADD,i),[Tc.ADD];if(i.isDirectory())return this.updateIno(t,Tc.ADD_DIR,i),[Tc.ADD_DIR]}else if(n&&!i){if(n.isFile())return this.updateIno(t,Tc.UNLINK,n),[Tc.UNLINK];if(n.isDirectory())return this.updateIno(t,Tc.UNLINK_DIR,n),[Tc.UNLINK_DIR]}else if(n&&i){if(n.isFile()){if(i.isFile())return n.ino===i.ino&&!n.size&&!i.size?[]:(this.updateIno(t,Tc.CHANGE,i),[Tc.CHANGE]);if(i.isDirectory())return this.updateIno(t,Tc.UNLINK,n),this.updateIno(t,Tc.ADD_DIR,i),[Tc.UNLINK,Tc.ADD_DIR]}else if(n.isDirectory()){if(i.isFile())return this.updateIno(t,Tc.UNLINK_DIR,n),this.updateIno(t,Tc.ADD,i),[Tc.UNLINK_DIR,Tc.ADD];if(i.isDirectory())return n.ino===i.ino?[]:(this.updateIno(t,Tc.UNLINK_DIR,n),this.updateIno(t,Tc.ADD_DIR,i),[Tc.UNLINK_DIR,Tc.ADD_DIR])}}return[]}updateIno(t,r,n){let i=this.inos[r]=this.inos[r]||(this.inos[r]={}),o=n.isFile()?kie.FILE:kie.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)}}},xes=ves;var Ces=class e extends Rml.EventEmitter{constructor(t,r,n){super(),this._closed=!1,this._ready=!1,this._closeAborter=new AbortController,this._closeSignal=this._closeAborter.signal,this.on(uN.CLOSE,()=>this._closeAborter.abort()),this._closeWait=new Promise(i=>this.on(uN.CLOSE,i)),this._readyWait=new Promise(i=>this.on(uN.READY,i)),this._locker=new Pml(this),this._roots=new Set,this._poller=new xes,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(uN.CLOSE))}error(t){if(this.isClosed())return!1;let r=Zl.lang.castError(t);return this.emit(uN.ERROR,r)}event(t,r,n){return this.isClosed()?!1:(this.emit(uN.ALL,t,r,n),this.emit(t,r,n))}ready(){return this.isClosed()||this.isReady()?!1:(this._ready=!0,this.emit(uN.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 Bml(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=nUe.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??OPe))&&l.handler===n&&(!l.filePath||l.filePath===i)&&l.options.ignore===r.ignore&&!!l.options.native==!!r.native&&(!r.recursive||l.options.recursive&&BPe&&l.options.native!==!1)))return!0;if(!BPe)break;let u=nUe.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||BPe&&r.native!==!1?r:{...r,recursive:!1},l={watcher:uni.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=nUe.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||BPe&&r.native!==!1)return this.watchersLock(()=>this.watchDirectories([t],r,n,i,o));{r={...r,recursive:!0};let s=r.depth??OPe,a=r.limit??Nqt,[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(uN.CLOSE,c),s.watchFile(t,r,o)},c=()=>{this._subwatchers.delete(i),this.removeListener(uN.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=nUe.default.dirname(t);return this.watchDirectory(i,r,n,t)}async watchPollingOnce(t,r,n){if(this.isClosed())return;let i=!1,o=new xes,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??Aml},o={targetPath:t,options:r},s=()=>{this._pollers.add(o),this.on(uN.CLOSE,a),uni.default.watchFile(t,i,n)},a=()=>{this._pollers.delete(o),this.removeListener(uN.CLOSE,a),uni.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=nUe.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=nUe.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(uN.ALL,n),r.readdirMap=void 0,this.ready())}},kml=Ces;function _mh(e){return"code"in e&&typeof e.code=="string"}function Fml(e){return e instanceof Error?e:new Error(String(e))}function Nml(e){return _mh(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 lni({absoluteFilePathToFern:e,additionalFilepaths:t,context:r}){let n=new kml([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(Fml(c))};n.once("ready",s),n.once("error",a)});return i!=null&&(n.close(),r.failAndThrow(Nml(i),i,{code:B.Code.EnvironmentError})),n.on("error",o=>{let s=Fml(o);r.failWithoutThrowing(Nml(s),s,{code:B.Code.EnvironmentError}),n.close()}),n}Zt();TI();Qt();bn();var Q0l=require("child_process"),xii=be(kes(),1),z0l=be(Wts(),1),HE=require("fs"),YB=require("fs/promises"),M0l=require("os"),fN=be(require("path"),1),L0l=be(c0(),1),U0l=be(j0l(),1),fUe=process.platform==="win32",vii=le.cyan("[docs]:"),bbh="etag",Ebh=23,nrs=e=>e.padEnd(Ebh," "),Ibh="preview",vbh="app-preview",xbh="bundle",Cbh=".next",wbh="standalone",Sbh=".fern",Tbh="packages/fern-docs/bundle/.next/server/instrumentation.js",Obh='Cannot find matching keyid: {"signatures":',Bbh="ERR_PNPM_IGNORED_BUILDS";function Pbh(e){try{let r=(0,Q0l.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 B({message:`Windows long path support is not enabled. The docs bundle contains deeply nested .pnpm paths that exceed the 260-character MAX_PATH limit.
|
|
3939
3939
|
|
|
@@ -4279,7 +4279,7 @@ Please ensure you have membership at https://dashboard.buildwithfern.com, and as
|
|
|
4279
4279
|
`);i.failAndThrow(s!=null?`No docs instance found matching '${s}'.
|
|
4280
4280
|
|
|
4281
4281
|
Available instances:
|
|
4282
|
-
${I}`:"No docs instance found. Failed to register.",void 0,{code:B.Code.ConfigError});return}let E=(typeof y.customDomain=="string"?[y.customDomain]:y.customDomain??[]).map(UMl);VMl(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 x;return await i.runInteractiveTask({name:y.url},async()=>{let I=performance.now(),C=()=>O8l({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 P=0;;P++)try{x=await C();break}catch(D){if(!(D instanceof nxt)||P>=gHt.length){if(D instanceof nxt)return i.failAndThrow("Another docs publish is currently in progress. Please try again once the other publish is complete.",void 0,{code:B.Code.NetworkError});throw D}let T=gHt[P]??gHt[gHt.length-1]??6e4,z=T/6e4;i.logger.warn(`Another docs publish is in progress. Retrying in ${z} minute${z===1?"":"s"} (attempt ${P+1}/${gHt.length})...`),await new Promise(K=>setTimeout(K,T))}let S=performance.now()-I;i.logger.debug(`Docs publishing completed in ${S.toFixed(0)}ms`)}),x}Qt();var Ddi=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 cd({context:this.context,task:this.task});try{let s=await AHt({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.92.
|
|
4282
|
+
${I}`:"No docs instance found. Failed to register.",void 0,{code:B.Code.ConfigError});return}let E=(typeof y.customDomain=="string"?[y.customDomain]:y.customDomain??[]).map(UMl);VMl(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 x;return await i.runInteractiveTask({name:y.url},async()=>{let I=performance.now(),C=()=>O8l({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 P=0;;P++)try{x=await C();break}catch(D){if(!(D instanceof nxt)||P>=gHt.length){if(D instanceof nxt)return i.failAndThrow("Another docs publish is currently in progress. Please try again once the other publish is complete.",void 0,{code:B.Code.NetworkError});throw D}let T=gHt[P]??gHt[gHt.length-1]??6e4,z=T/6e4;i.logger.warn(`Another docs publish is in progress. Retrying in ${z} minute${z===1?"":"s"} (attempt ${P+1}/${gHt.length})...`),await new Promise(K=>setTimeout(K,T))}let S=performance.now()-I;i.logger.debug(`Docs publishing completed in ${S.toFixed(0)}ms`)}),x}Qt();var Ddi=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 cd({context:this.context,task:this.task});try{let s=await AHt({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.92.1",loginCommand:"fern auth login"});return o.getResult()===kf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:Ln(s)}}}};kt();bn();var ixt=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(`
|
|
4283
4283
|
`),this.stream.write(`${le.cyan("\u25C6")} ${le.bold(t.title)}
|
|
4284
4284
|
`),t.subtitle!=null&&this.stream.write(` ${le.dim(t.subtitle)}
|
|
4285
4285
|
`),this.stream.write(`
|
|
@@ -4548,7 +4548,7 @@ ${qKt(this).map(t=>` ${t.fn} - ${t.path}:${t.position}`).join(`
|
|
|
4548
4548
|
`),this.hasSameAccess(this.init)||t.write(`${this.init} `),t.writeTextStatement("init"),t.writeNoIndent(`#else
|
|
4549
4549
|
`),t.writeTextStatement("set"),t.writeNoIndent(`#endif
|
|
4550
4550
|
`)):(this.hasSameAccess(this.init)||t.write(`${this.init} `),this.accessors?.init?(t.write("init"),t.write(" => "),this.accessors.init(t),t.writeTextStatement("")):t.write("init; "))),this.set&&(this.hasSameAccess(this.set)||t.write(`${this.set} `),this.accessors?.set?(t.write("set"),t.write(" => "),this.accessors.set(t),t.writeTextStatement("")):t.write("set; ")),t.write("}")),this.initializer!=null?(i?t.write(" => "):t.write(" = "),this.initializer.write(t),t.writeLine(";")):!this.skipDefaultInitializer&&!r&&n?Da.Type(this.type)&&this.type.writeEmptyCollectionInitializer(t):!this.get&&!this.init&&t.writeLine(";")}hasSameAccess(t){return t===!0||t===this.access}};kt();var qK;(function(e){e[e.INSTANCE=0]="INSTANCE",e[e.STATIC=1]="STATIC"})(qK||(qK={}));var URe=class e extends ORe{name;isAsync;access;return;noBody;body;bodyType;summary;doc;type;reference;override;parameters;typeParameters;annotations;interfaceReference;constructor({name:t,isAsync:r,override:n,access:i,return_:o,body:s,noBody:a,bodyType:c,summary:u,doc:l,type:p,classReference:d,parameters:f,typeParameters:m,annotations:g,codeExample:A,interfaceReference:y,origin:E,enclosingType:x},I){super({enclosingType:x},E,I),this.name=t,this.isAsync=r??!1,this.override=n??!1,this.access=i,this.return=o,this.noBody=a??!1,this.body=s,this.bodyType=c??e.BodyType.Statement,this.summary=u,this.doc=this.csharp.xmlDocBlockOf(l??{summary:u,codeExample:A}),this.type=p??qK.INSTANCE,this.reference=d,this.parameters=f??[],this.typeParameters=m??[],this.annotations=(g??[]).map(C=>C instanceof Ik?this.csharp.annotation({reference:C}):C),this.interfaceReference=y}get isAsyncEnumerable(){return Da.AsyncEnumerable(this.return)}addParameter(t){return t instanceof _K||(t=new _K(t,this.generation)),this.parameters.push(t),t}write(t){if(t.writeNode(this.doc),this.annotations.forEach(r=>{r.write(t)}),t.writeNewLineIfLastLineNot(),this.access&&t.write(`${this.access} `),this.type===qK.STATIC&&t.write("static "),this.isAsync&&t.write("async "),this.override&&t.write("override "),this.return==null?this.isAsync?(t.writeNode(this.System.Threading.Tasks.Task()),t.write(" ")):t.write("void "):(this.isAsync&&!this.isAsyncEnumerable?t.writeNode(this.System.Threading.Tasks.Task(this.return)):this.return.write(t),t.write(" ")),this.interfaceReference&&t.write(`${this.interfaceReference.name}.`),t.write(this.name),this.typeParameters.length>0&&(t.write("<"),this.typeParameters.forEach((r,n)=>{r.write(t),n<this.typeParameters.length-1&&t.write(", ")}),t.write(">")),t.write("("),this.parameters.forEach((r,n)=>{r.write(t),n<this.parameters.length-1&&t.write(", ")}),t.write(")"),this.noBody)t.writeLine(";");else switch(this.bodyType){case e.BodyType.Statement:t.write(" "),t.pushScope(),this.body?.write(t),t.popScope();break;case e.BodyType.Expression:t.write(" => "),this.body?.write(t),t.writeSemicolonIfLastCharacterIsNot();break;default:Ee(this.bodyType)}}getParameters(){return this.parameters}};(function(e){e.BodyType={Statement:"statement",Expression:"expression"}})(URe||(URe={}));var HCt=class extends Z3{access;partial;reference;interfaceReferences;fields=[];methods=[];constructor({name:t,namespace:r,access:n,partial:i,interfaceReferences:o,enclosingType:s,origin:a},c){super(a,c),t=t||(a?this.model.getClassNameFor(a):oI("Class/Interface name or origin is required")),this.reference=s?this.csharp.classReference({name:t,enclosingType:s}):this.csharp.classReference({name:t,namespace:r||oI("Class/Interface: Namespace or enclosingType is required ")}),this.access=n,this.partial=i??!1,this.interfaceReferences=o??[]}get name(){return this.reference.name}get namespace(){return this.reference.namespace}get enclosingType(){return this.reference.enclosingType}get isNested(){return this.enclosingType!=null}explicit(t){return this.origin?this.model.explicit(Da.Provenance(this.origin)?this.origin.node:this.origin,t):oI(`Cannot create explicit named member '${t}' on '${this.name}' because the class is not bound to an origin.`)}getField(t){return this.fields.find(r=>this.model.provenance(r.origin)?.jsonPath===t.jsonPath)}addField(t){t.enclosingType=this.reference;let r=new WCt(t,this.generation);return this.fields.push(r),r}addMethod(t){t.enclosingType=this.reference;let r=new URe(t,this.generation);return this.methods.push(r),r}get multipartMethodName(){return"AddJsonPart"}get multipartMethodNameForCollection(){return"AddJsonParts"}get isOptional(){return!1}get isCollection(){return!1}get isReferenceType(){}asOptional(){return new rG(this,this.generation)}asNullable(){return new J_e(this,this.generation)}asNonOptional(){return this}get defaultValue(){return this.csharp.Literal.null()}get fullyQualifiedName(){return this.reference.fullyQualifiedName}};var yae=class e extends HCt{static ClassType={Class:"class",Record:"record",Struct:"struct",RecordStruct:"record struct"};static Access=JC;static_;abstract_;sealed;readonly;parentClassReference;type;summary;doc;annotations=[];primaryConstructor;namespaceReferences=[];skipNamespaceDeclaration;constructors=[];operators=[];nestedClasses=[];nestedInterfaces=[];rawBodyBlocks=[];constructor({name:t,namespace:r,access:n,static_:i,abstract_:o,sealed:s,partial:a,readonly:c,parentClassReference:u,interfaceReferences:l,enclosingType:p,type:d,summary:f,doc:m,annotations:g,primaryConstructor:A,skipNamespaceDeclaration:y,origin:E},x){super({name:t,namespace:r,access:n,partial:a,interfaceReferences:l,enclosingType:p,origin:E},x),this.skipNamespaceDeclaration=y??!1,this.static_=i??!1,this.abstract_=o??!1,this.sealed=s??!1,this.readonly=c??!1,this.type=d??e.ClassType.Class,this.summary=f,this.doc=this.csharp.xmlDocBlockOf(m??{summary:f}),this.parentClassReference=u,this.annotations=(g??[]).map(I=>I instanceof Ik?this.csharp.annotation({reference:I}):I),this.primaryConstructor=A}addConstructor(t){let r=new e.Constructor(t,this.generation);return this.constructors.push(r),r}addNestedClass(t){if(t instanceof e||(t.enclosingType=this.reference,t=new e(t,this.generation)),!t.isNested)throw new Error(`Set the enclosingType of the class ${this.name} to add the nested class ${t.name}.`);return this.nestedClasses.push(t),t}addNestedClasses(t){t.forEach(r=>{r instanceof e?this.addNestedClass(r):this.addNestedClass(r)})}addAnnotation(t){return t instanceof Ohe||(t=new Ohe(t,this.generation)),this.annotations.push(t),t}addOperator(t){this.operators.push(t)}addOperators(t){t.forEach(r=>this.addOperator(r))}addRawBodyContent(t){this.rawBodyBlocks.push(t)}write(t){if(this.namespaceReferences.forEach(r=>{t.addNamespace(r)}),!this.isNested&&!this.skipNamespaceDeclaration&&(t.writeLine(`namespace ${this.namespace};`),t.newLine()),t.writeNode(this.doc),this.annotations.forEach(r=>{r.write(t)}),this.skipNamespaceDeclaration||t.writeNewLineIfLastLineNot(),t.write(`${this.access}`),this.static_&&t.write(" static"),this.abstract_&&t.write(" abstract"),this.sealed&&t.write(" sealed"),this.readonly&&t.write(" readonly"),this.partial&&t.write(" partial"),t.write(` ${this.type}`),t.write(` ${this.name}`),this.primaryConstructor!=null&&this.primaryConstructor.parameters.length>0){let r=this.primaryConstructor;t.write("("),r.parameters.forEach((n,i)=>{i>0&&t.write(","),n.write(t)}),t.write(")")}if(this.parentClassReference!=null||this.interfaceReferences.length>0){if(t.write(" : "),this.parentClassReference!=null&&(this.parentClassReference.write(t),this.interfaceReferences.length>0&&t.write(", ")),this.primaryConstructor!=null&&this.primaryConstructor.superClassArguments.length>0){let r=this.primaryConstructor;t.write("("),this.primaryConstructor.superClassArguments.forEach((n,i)=>{n.write(t),i<r.superClassArguments.length-1&&t.write(", ")}),t.write(")")}this.interfaceReferences.forEach((r,n)=>{r.write(t),n<this.interfaceReferences.length-1&&t.write(", ")})}if(!this.hasBody()){t.write(";");return}t.writeNewLineIfLastLineNot(),t.pushScope(),t.pushTypeScope(this.reference.fullyQualifiedName),this.writeConsts(t),this.writeFieldFields(t),this.writeConstructors(t),this.writeProperties(t),this.writeMethods(t),this.writeOperators(t),this.writeRawBodyBlocks(t),this.writeNestedClasses(t),this.writeNestedInterfaces(t),t.popTypeScope(),t.popScope()}hasBody(){return this.fields.length>0||this.constructors.length>0||this.nestedClasses.length>0||this.nestedInterfaces.length>0||this.methods.length>0||this.operators.length>0||this.rawBodyBlocks.length>0}writeConstructors(t){this.constructors.forEach(r=>{t.writeNode(this.csharp.xmlDocBlockOf(r.doc)),r.annotations.forEach(n=>{n.write(t),t.writeNewLineIfLastLineNot()}),t.write(`${r.access} ${this.name} (`),r.parameters.forEach((n,i)=>{n.write(t),i<r.parameters.length-1&&t.write(", ")}),t.write(")"),r.baseConstructorCall!=null&&(t.write(" : "),r.baseConstructorCall.write(t)),t.pushScope(),r.body.write(t),t.popScope(),t.newLine()})}writeFields({writer:t,fields:r}){r.forEach((n,i)=>{n.write(t),t.writeNewLineIfLastLineNot(),i<this.fields.length-1&&t.newLine()})}writeConsts(t){this.writeFields({writer:t,fields:this.getFields().sort(KCt).sort(HRs).filter(this.fieldConstFilter())})}writeFieldFields(t){this.writeFields({writer:t,fields:this.getFields().sort(KCt).sort(HRs).filter(this.fieldFieldFilter())})}writeProperties(t){this.writeFields({writer:t,fields:this.getFields().sort(KCt).sort(HRs).filter(this.fieldPropertyFilter())})}writeMethods(t){this.methods.sort(KCt).sort(HMg).sort(WMg).forEach(r=>{r.write(t),t.writeNewLineIfLastLineNot(),t.newLine()})}writeOperators(t){this.operators.forEach(r=>{this.writeOperator({writer:t,operator:r}),t.newLine()})}writeRawBodyBlocks(t){this.rawBodyBlocks.forEach(r=>{r.write(t),t.writeNewLineIfLastLineNot()})}writeNestedClasses(t){this.nestedClasses.sort(KCt).forEach((r,n)=>{r.write(t),t.writeNewLineIfLastLineNot(),n<this.fields.length-1&&t.newLine()})}writeNestedInterfaces(t){this.nestedInterfaces.sort(KCt).forEach((r,n)=>{r.write(t),t.writeNewLineIfLastLineNot(),n<this.fields.length-1&&t.newLine()})}fieldConstFilter(){return t=>t.isConst}fieldFieldFilter(){return t=>t.isField}fieldPropertyFilter(){return t=>t.isProperty}getFields(){return this.fields}get isReferenceType(){return this.type===e.ClassType.Class||this.type===e.ClassType.Record}writeOperator({writer:t,operator:r}){if(t.write("public static "),r.type===e.CastOperator.Type.Explicit||r.type===e.CastOperator.Type.Implicit){t.write(`${r.type} `),t.write("operator ");let n=r.to??this.reference;t.writeNode(n),t.write("("),r.parameter.write(t)}else{let n=r;n.return.write(t),t.write(" operator "),t.write(`${r.type}(`),n.parameters.forEach((i,o)=>{i.write(t),o<n.parameters.length-1&&t.write(", ")})}r.useExpressionBody?(t.write(") => "),t.writeNodeStatement(r.body)):(t.write(") {"),t.writeNode(r.body),t.writeLine("}"))}addNamespaceReference(t){this.namespaceReferences.push(t)}};(function(e){class t{generation;doc;body;parameters;access;baseConstructorCall;annotations;constructor({doc:i,body:o,parameters:s,access:a,baseConstructorCall:c,annotations:u},l){this.generation=l,this.parameters=s??[],this.access=a??JC.Public,this.doc=i,this.annotations=u??[],this.body=new zRe({},this.generation),o!=null&&this.body.append(o),this.baseConstructorCall=c}addParameter(i){let o=new _K(i,this.generation);return this.parameters.push(o),o}}e.Constructor=t;let r;(function(n){n.Type={Implicit:"implicit",Explicit:"explicit"}})(r=e.CastOperator||(e.CastOperator={}))})(yae||(yae={}));function Drp(e){switch(e){case void 0:return 0;case JC.Private:return 1;case JC.Protected:return 2;case JC.Internal:return 3;case JC.Public:return 4}}function KCt(e,t){return Drp(e.access)-Drp(t.access)}function HRs(e,t){return e.isStatic===t.isStatic?0:e.isStatic?-1:1}function WMg(e,t){return e.type===qK.STATIC&&t.type!==qK.STATIC?-1:e.type!==qK.STATIC&&t.type===qK.STATIC?1:0}function HMg(e,t){return e.name==="FromProto"||e.name==="ToProto"?t.name==="Equals"||t.name==="ToString"?-1:1:t.name==="FromProto"||t.name==="ToProto"?e.name==="Equals"||e.name==="ToString"?1:-1:e.name==="ToString"?1:t.name==="ToString"?-1:e.name==="Equals"?t.name==="ToString"?-1:1:t.name==="Equals"?e.name==="ToString"?1:-1:0}var JCt=class extends Z3{get name(){return this.reference.name}get namespace(){return this.reference.namespace}access;reference;annotations;fields=[];generateSerializer=!1;serializerClassReference;constructor({name:t,namespace:r,access:n,annotations:i,origin:o},s){super(o,s),this.reference=this.csharp.classReference({name:t,namespace:r,origin:o}),this.access=n,this.annotations=i??[]}getNamespace(){return this.namespace}addAnnotation(t){this.annotations.push(t)}addMember(t){this.fields.push({name:t.name,wireValue:t.value,value:this.csharp.annotation({reference:this.System.Runtime.Serialization.EnumMember,argument:this.csharp.codeblock(r=>{r.write("Value = "),r.writeNode(this.csharp.string_({string:t.value}))})})})}enableSerializerGeneration(){return this.generateSerializer=!0,this.serializerClassReference=this.csharp.classReference({name:`${this.name}Serializer`,namespace:this.namespace}),this.serializerClassReference}write(t){t.writeLine(`namespace ${this.namespace};`),t.newLine();for(let r of this.annotations)r.write(t);t.writeNewLineIfLastLineNot(),t.write(`${this.access} `),t.write("enum "),t.writeLine(`${this.name}`),t.pushScope(),this.fields.forEach((r,n)=>{r.value.write(t),t.write(r.name),n<this.fields.length-1&&(t.writeLine(","),t.newLine())}),t.writeNewLineIfLastLineNot(),t.popScope(),this.generateSerializer&&this.writeSerializerClass(t)}writeSerializerClass(t){t.newLine(),t.writeLine(`internal class ${this.name}Serializer : global::System.Text.Json.Serialization.JsonConverter<${this.name}>`),t.pushScope(),t.writeLine(`private static readonly global::System.Collections.Generic.Dictionary<string, ${this.name}> _stringToEnum = new()`),t.pushScope();for(let r of this.fields)t.writeLine(`{ ${JSON.stringify(GKt(r))}, ${this.name}.${r.name} },`);t.popScope(!1),t.writeLine(";"),t.newLine(),t.writeLine(`private static readonly global::System.Collections.Generic.Dictionary<${this.name}, string> _enumToString = new()`),t.pushScope();for(let r of this.fields)t.writeLine(`{ ${this.name}.${r.name}, ${JSON.stringify(GKt(r))} },`);t.popScope(!1),t.writeLine(";"),t.newLine(),t.writeLine(`public override ${this.name} Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options)`),t.pushScope(),t.writeLine('var stringValue = reader.GetString() ?? throw new global::System.Exception("The JSON value could not be read as a string.");'),t.writeLine("return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default;"),t.popScope(),t.newLine(),t.writeLine(`public override void Write(global::System.Text.Json.Utf8JsonWriter writer, ${this.name} value, global::System.Text.Json.JsonSerializerOptions options)`),t.pushScope(),t.writeLine("writer.WriteStringValue(_enumToString.TryGetValue(value, out var stringValue) ? stringValue : null);"),t.popScope(),t.newLine(),t.writeLine(`public override ${this.name} ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options)`),t.pushScope(),t.writeLine('var stringValue = reader.GetString() ?? throw new global::System.Exception("The JSON property name could not be read as a string.");'),t.writeLine("return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default;"),t.popScope(),t.newLine(),t.writeLine(`public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, ${this.name} value, global::System.Text.Json.JsonSerializerOptions options)`),t.pushScope(),t.writeLine("writer.WritePropertyName(_enumToString.TryGetValue(value, out var stringValue) ? stringValue : value.ToString());"),t.popScope(),t.popScope()}};var YCt=class extends HCt{constructor({name:t,namespace:r,access:n,partial:i,interfaceReferences:o,enclosingType:s,origin:a},c){super({name:t,namespace:r,access:n,partial:i,interfaceReferences:o,enclosingType:s,origin:a},c)}write(t){this.isNested||(t.writeLine(`namespace ${this.namespace};`),t.newLine()),t.write(`${this.access} `),this.partial&&t.write("partial "),t.write("interface "),t.writeLine(`${this.name}`),this.interfaceReferences.length>0&&(t.write(" : "),this.interfaceReferences.forEach((r,n)=>{r.write(t),n<this.interfaceReferences.length-1&&t.write(", ")})),t.pushScope();for(let r of this.fields)r.write(t),t.writeLine("");t.dedent(),t.indent();for(let r of this.methods)r.write(t),t.writeLine("");t.popScope()}};var XCt=class extends Z3{get name(){return this.reference.name}get namespace(){return this.reference.namespace}reference;parentClassReference;testMethods=[];constructor({name:t,namespace:r,parentClassReference:n,origin:i},o){super(i,o),this.reference=this.csharp.classReference({name:t,namespace:r,origin:i}),this.parentClassReference=n}write(t){t.writeNode(this.getClass())}getClass(){let t=[this.NUnit.Framework.TestFixture,this.csharp.annotation({reference:this.NUnit.Framework.Parallelizable,argument:"ParallelScope.Self"})],r=new yae({access:JC.Public,name:this.name,namespace:this.namespace,annotations:t,parentClassReference:this.parentClassReference,origin:this.origin},this.generation);for(let n of this.testMethods)r.addMethod({access:JC.Public,isAsync:n.isAsync,name:n.name,parameters:[],body:n.body,annotations:[this.NUnit.Framework.Test]});return r}addTestMethod(t){this.testMethods.push(t)}};function Rrp(e){return typeof e=="object"&&e!=null}function krp(e){let t=e.publishConfig;if(!Rrp(t)||t.type!=="filesystem")return;let r=t.publishTarget;if(!(!Rrp(r)||r.type!=="nuget"))return{version:typeof r.version=="string"?r.version:void 0,packageName:typeof r.packageName=="string"?r.packageName:void 0}}var KRs={System:["AccessViolationException","Action","Activator","AggregateException","AppContext","AppDomain","AppDomainSetup","AppDomainUnloadedException","ApplicationException","ApplicationId","ArgIterator","ArgumentException","ArgumentNullException","ArgumentOutOfRangeException","ArithmeticException","Array","ArrayTypeMismatchException","AssemblyLoadEventArgs","AssemblyLoadEventHandler","AsyncCallback","Attribute","AttributeTargets","AttributeUsageAttribute","BadImageFormatException","Base64FormattingOptions","BitConverter","Boolean","Buffer","Byte","CannotUnloadAppDomainException","Char","CharEnumerator","CLSCompliantAttribute","Console","ConsoleCancelEventArgs","ConsoleCancelEventHandler","ConsoleColor","ConsoleKey","ConsoleKeyInfo","ConsoleModifiers","ConsoleSpecialKey","ContextBoundObject","ContextMarshalException","ContextStaticAttribute","Convert","CultureAwareComparer","DataMisalignedException","DateOnly","DateTime","DateTimeKind","DateTimeOffset","DayOfWeek","DBNull","Decimal","Delegate","DivideByZeroException","DllNotFoundException","Double","DuplicateWaitObjectException","EntryPointNotFoundException","Enum","Environment","EnvironmentVariableTarget","EventArgs","EventHandler","Exception","ExecutionEngineException","FieldAccessException","FlagsAttribute","FormatException","FormattableString","GC","GCCollectionMode","GCGenerationInfo","GCKind","GCMemoryInfo","GCNotificationStatus","Guid","Half","HashCode","IAsyncDisposable","IAsyncResult","ICloneable","IComparable","IConvertible","ICustomFormatter","IDisposable","IFormatProvider","IFormattable","Index","IndexOutOfRangeException","InsufficientExecutionStackException","InsufficientMemoryException","Int128","Int16","Int32","Int64","IntPtr","InvalidCastException","InvalidOperationException","InvalidProgramException","InvalidTimeZoneException","ISpanFormattable","IUtf8SpanFormattable","LoaderOptimization","LoaderOptimizationAttribute","LocalDataStoreSlot","MarshalByRefObject","Math","MathF","MemberAccessException","MemoryExtensions","MethodAccessException","MidpointRounding","MissingFieldException","MissingMemberException","MissingMethodException","ModuleHandle","MTAThreadAttribute","MulticastDelegate","MulticastNotSupportedException","NonSerializedAttribute","NotFiniteNumberException","NotImplementedException","NotSupportedException","Nullable","NullReferenceException","Object","ObjectDisposedException","ObsoleteAttribute","OperatingSystem","OperationCanceledException","OrdinalComparer","OutOfMemoryException","OverflowException","ParamArrayAttribute","PlatformID","PlatformNotSupportedException","Random","Range","RankException","ResolveEventArgs","ResolveEventHandler","RuntimeArgumentHandle","RuntimeFieldHandle","RuntimeMethodHandle","RuntimeTypeHandle","SByte","SerializableAttribute","Single","StackOverflowException","STAThreadAttribute","String","StringComparer","StringComparison","StringNormalizationExtensions","StringSplitOptions","SystemException","ThreadStaticAttribute","TimeOnly","TimeoutException","TimeProvider","TimeSpan","TimeZone","TimeZoneInfo","TimeZoneNotFoundException","Tuple","TupleExtensions","Type","TypeAccessException","TypeCode","TypedReference","TypeInitializationException","TypeLoadException","TypeUnloadedException","UInt128","UInt16","UInt32","UInt64","UIntPtr","UnauthorizedAccessException","UnhandledExceptionEventArgs","UnhandledExceptionEventHandler","UnitySerializationHolder","ValueTuple","ValueType","Version","Void","WeakReference","Buffers","Collections","ComponentModel","Diagnostics","Globalization","IO","Linq","Net","Numerics","Reflection","Resources","Runtime","Security","Text","Threading"],"System.Collections.Generic":["ByteEqualityComparer","CollectionExtensions","IEnumerable","KeyNotFoundException","KeyValuePair","NonRandomizedStringEqualityComparer","ReferenceEqualityComparer"],"System.IO":["BinaryReader","BinaryWriter","BufferedStream","Directory","DirectoryInfo","DirectoryNotFoundException","EndOfStreamException","EnumerationOptions","File","FileAccess","FileAttributes","FileInfo","FileLoadException","FileMode","FileNotFoundException","FileOptions","FileShare","FileStream","FileStreamOptions","FileSystemInfo","HandleInheritability","InvalidDataException","IOException","MatchCasing","MatchType","MemoryStream","Path","PathTooLongException","RandomAccess","SearchOption","SeekOrigin","Stream","StreamReader","StreamWriter","StringReader","StringWriter","TextReader","TextWriter","UnixFileMode","UnmanagedMemoryAccessor","UnmanagedMemoryStream","System.IO.Enumeration"],"System.Linq":["Enumerable"],"System.Net.Http":["HttpClient","HttpMethod"],"System.Threading":["AbandonedMutexException","ApartmentState","AsyncFlowControl","AutoResetEvent","CancellationToken","CancellationTokenRegistration","CancellationTokenSource","CompressedStack","ContextCallback","EventResetMode","EventWaitHandle","ExecutionContext","Interlocked","IOCompletionCallback","IThreadPoolWorkItem","ITimer","LazyInitializer","LazyThreadSafetyMode","Lock","LockRecursionException","LockRecursionPolicy","ManualResetEvent","ManualResetEventSlim","Monitor","Mutex","NativeOverlapped","Overlapped","ParameterizedThreadStart","PeriodicTimer","PreAllocatedOverlapped","ReaderWriterLockSlim","RegisteredWaitHandle","Semaphore","SemaphoreFullException","SemaphoreSlim","SendOrPostCallback","SpinLock","SpinWait","SynchronizationContext","SynchronizationLockException","Thread","ThreadAbortException","ThreadExceptionEventArgs","ThreadExceptionEventHandler","ThreadInterruptedException","ThreadPool","ThreadPoolBoundHandle","ThreadPriority","ThreadStart","ThreadStartException","ThreadState","ThreadStateException","Timeout","Timer","TimerCallback","Volatile","WaitCallback","WaitHandle","WaitHandleCannotBeOpenedException","WaitHandleExtensions","WaitOrTimerCallback","Tasks"],"System.Threading.Tasks":["ConcurrentExclusiveSchedulerPair","ConfigureAwaitOptions","Task","TaskAsyncEnumerableExtensions","TaskCanceledException","TaskCompletionSource","TaskContinuationOptions","TaskCreationOptions","TaskExtensions","TaskFactory","TaskScheduler","TaskSchedulerException","TaskStatus","TaskToAsyncResult","UnobservedTaskExceptionEventArgs","ValueTask","Sources"]};var KMg=new Set(["abstract","as","base","bool","break","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","else","enum","event","explicit","extern","false","finally","fixed","float","for","foreach","goto","if","implicit","in","int","interface","internal","is","lock","long","namespace","new","null","object","operator","out","override","params","private","protected","public","readonly","ref","return","sbyte","sealed","short","sizeof","stackalloc","static","string","struct","switch","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","virtual","void","volatile","while"]);var JMg=new Set(["from","where","select","orderby","groupby","into","let","join","on","equals"]),YMg=new Set(["async","await"]),XMg=new Set(["yield"]),ZMg=new Set(["var","dynamic"]),$Mg=new Set(["using","alias"]);var e6g=new Set(["required","scoped","unmanaged","managed"]),t6g=new Set(["when","and","or","not"]),r6g=new Set(["Equals","GetHashCode","ToString","GetType","MemberwiseClone","Finalize"]),n6g=new Set([...KMg,...JMg,...YMg,...XMg,...ZMg,...$Mg,...e6g,...t6g]),GAi=class{registry;name;jsonPath;constructor(t,r,n){this.registry=t,this.name=r,this.jsonPath=n}};var WAi=class{scope;constructor(t){this.scope=t}byName=new Map;byPath=new Map;redirections=new Map;[Symbol.iterator](){return this.byName.values()}has(t){return this.byName.has(t)}getByJsonPath(t){return this.byPath.get(t)}getByName(t){return this.byName.get(t)}getRedirectedName(t){return this.redirections.get(t)}set(t){this.byName.has(t.name)&&oI(`set: ${t.name} in ${this.scope.fullyQualifiedName} already exists`),t.jsonPath&&this.byPath.has(t.jsonPath)&&oI(`set: ${t.name} in ${this.scope.fullyQualifiedName} already exists by jsonPath`),this.byName.set(t.name,t),t.jsonPath&&this.byPath.set(t.jsonPath,t)}redirect(t,r){this.redirections.has(t)&&oI(`redirect: ${t} in ${this.scope.fullyQualifiedName} already has a redirect`),this.redirections.set(t,r)}},JRs=class extends GAi{namespace;fullyQualifiedName;fields;methods;constructor(t,r,n,i){super(t,r),this.namespace=n,this.fullyQualifiedName=i,this.fields=new WAi(this),this.methods=new WAi(this)}isKeyword(t){return n6g.has(t)}isBuiltinMemberName(t){return r6g.has(t)}isTypeName(t){return this.name===t}isField(t){return this.fields.has(t)}isMethod(t){return this.methods.has(t)}isMember(t){return this.isField(t)||this.isMethod(t)}nameBlocked(t){if(this.isKeyword(t))return"keyword";if(this.isBuiltinMemberName(t))return"builtin";if(this.isTypeName(t))return"typeName";if(this.isField(t))return"field";if(this.isMethod(t))return"method"}getAlternativeName(t){let r=`${t}_`,n=2;for(;this.nameBlocked(r);)r=`${t}_${n}`,n++;return r}getFieldByJsonPath(t){return t!==void 0?this.fields.getByJsonPath(t):void 0}getFieldByName(t){return this.fields.getByName(t)}getRedirectedFieldName(t){return this.fields.getRedirectedName(t)}registerField(t,r,n){let i=this.registry.model.jsonPath(r);if(i){let a=this.fields.getByJsonPath(i);if(a)return a.name}let o=this.fields.getByName(t);if(o&&i===o.jsonPath)return t;switch(this.nameBlocked(t)){case"field":r&&Da.Provenance(r)&&r.explicit||oI(`Field ${t} already exists - attempting to add a duplicate field with the same name that is not an explicitly named property`);break;case"keyword":case"builtin":case"typeName":case"method":break;default:return this.fields.set(new HAi(this.registry,t,this,i,n)),this.registry.setFieldNameShortcut(i,t),t}let s=this.getAlternativeName(t);return this.fields.set(new HAi(this.registry,s,this,i,n)),this.fields.redirect(t,s),this.registry.setFieldNameShortcut(i,s),s}getFieldName(t,r){let n=this.getFieldByJsonPath(this.registry.model.jsonPath(t))?.name;if(n)return n;if(Da.Provenance(t)){let s=this.getRedirectedFieldName(r);if(s)return s;let a=this.getFieldByName(r);return a?this.registry.model.provenance(a.jsonPath)?.explicit?r:`${r}_`:r}let i=this.getFieldByName(r);if(i)return this.registry.model.provenance(i.jsonPath)?.explicit?r:i.name;let o=this.getRedirectedFieldName(r);if(o)return o;this.isMethod(r)}},YRs=class extends GAi{scope;constructor(t,r,n,i){super(t,r,i),this.scope=n}},HAi=class extends YRs{field;constructor(t,r,n,i,o){super(t,r,n,i),this.field=o}};var $Ct=class e{generation;classReferenceByJsonPath=new Map;typeRegistry=new Map;namespaceRegistry=new Map;typeNames=new Map;namespaceNames=new Map;nestedTypeShadows=new Map;implicitNamespaces=new Set;shortcuts=new Map;knownBuiltInIdentifiers=new Set(["Text","Json","Xml","Security","Collections","Data","Diagnostics","Globalization","Math","Reflection","Runtime","Security","Serialization","Threading","Xml"]);constructor(t){this.generation=t,this.initializeBuiltIns()}get csharp(){return this.generation.csharp}get model(){return this.generation.model}initializeBuiltIns(){for(let[t,r]of Object.entries(KRs))t.split(".").forEach(n=>this.knownBuiltInIdentifiers.add(n)),r.forEach(n=>this.knownBuiltInIdentifiers.add(n));for(let[t,r]of Object.entries(KRs)){for(let i of r)this.typeNames.set(i,new Set([t]));let n=t.split(".")[0];n&&this.typeNames.set(n,new Set([t]))}this.typeNames.set("System",new Set(["System"])),this.typeNames.set("NUnit",new Set(["NUnit"])),this.typeNames.set("OneOf",new Set(["OneOf"])),this.knownBuiltInIdentifiers.add("NUnit"),this.knownBuiltInIdentifiers.add("OneOf")}setFieldNameShortcut(t,r){if(t){let n=this.shortcuts.get(t);n&&n!==r&&oI(`BAD_BAD_BAD setFieldNameShortcut: ${t} already has a name: ${n} - while setting to ${r} - if this is happening, then you could be getting back the wrong name later!`),this.shortcuts.set(t,r)}}getFieldNameByOrigin(t){return this.shortcuts.get(this.model.jsonPath(t)??">ignore<")}isKnownBuiltInIdentifier(t){return!t||typeof t!="string"?!1:this.knownBuiltInIdentifiers.has(t)}isKnownNamespace(t){return!t||typeof t!="string"?!1:this.namespaceRegistry.has(t)}isRegisteredTypeName(t){return this.typeRegistry.has(t)}isAmbiguousTypeName(t){return t?(this.typeNames.get(t)?.size??0)>1:!1}isAmbiguousNamespaceName(t){return t?(this.namespaceNames.get(t)?.size??0)>1:!1}hasTypeNamespaceConflict(t){return!t||this.knownBuiltInIdentifiers.has(t)?!1:this.typeNames.has(t)&&(this.namespaceNames.get(t)?.has("")??!1)}hasNestedTypeShadowInScope(t,r){if(!t||this.knownBuiltInIdentifiers.has(t))return!1;let n=this.nestedTypeShadows.get(t);return n?r.some(i=>n.has(i)):!1}static fullyQualifiedNameOf(t){return t.enclosingType?`${t.enclosingType.fullyQualifiedName??`${t.namespace}.${t.enclosingType.name}`}+${t.name}`:`${t.namespace}.${t.name}`}registerNamespace(t,r){this.namespaceRegistry.has(t)&&this.namespaceRegistry.get(t)!==r||this.namespaceRegistry.set(t,r)}trackType(t,r){let{name:n,namespace:i,enclosingType:o,fullyQualifiedName:s,origin:a}=t;if(a){let c=this.model.jsonPath(a)??oI(`JsonPath not found for origin: ${JSON.stringify(a).substring(0,100)}`);this.classReferenceByJsonPath.set(c,t)}if(r&&r!==s&&!this.typeRegistry.has(r)&&this.typeRegistry.set(r,t),!this.typeRegistry.has(s)){this.typeRegistry.set(s,t);for(let c of this.allNamespacesOf(i))this.registerNamespace(c,c);if(!o)this.trackTypeName(n,i);else if(n===i.split(".")[0]){let c=this.nestedTypeShadows.get(n);c||(c=new Set,this.nestedTypeShadows.set(n,c)),c.add(o.fullyQualifiedName)}for(let c of[this.generation.namespaces.root,...this.implicitNamespaces])if(i.startsWith(c)){let u=i.split(".")[c.split(".").length];u&&this.trackTypeName(u,i)}}return t}addImplicitNamespace(t){this.implicitNamespaces.add(t)}isNamespaceImplicit(t){return this.implicitNamespaces.has(t)}get implicitlyImportedNamespaces(){return[...this.implicitNamespaces]}trackTypeName(t,r){this.typeNames.has(t)?this.typeNames.get(t)?.add(r):this.typeNames.set(t,new Set([r]));let n=r.split("."),i="";for(let o of n)this.namespaceNames.has(o)?this.namespaceNames.get(o)?.add(i):this.namespaceNames.set(o,new Set([i])),i=i?`${i}.${o}`:o}allNamespacesOf(t){if(!t||typeof t!="string")return new Set;let r="",n=new Set;for(let i of t.split("."))i.trim()&&(r=r?`${r}.${i}`:`${i}`,n.add(r));return n}registerClassReference(t,r){let{name:n,namespace:i,enclosingType:o,origin:s}=t,a=this.model.jsonPath(s),c=(a?this.classReferenceByJsonPath.get(a):void 0)??this.typeRegistry.get(r),u=this.model.jsonPath(c?.origin),l=u&&a?u===a?"match":"mismatch":"no origin";if(c&&l!=="mismatch")return new Ik({name:c.name,namespace:c.namespace,enclosingType:c.enclosingType,fullyQualifiedName:c.fullyQualifiedName,namespaceAlias:t.namespaceAlias,fullyQualified:t.fullyQualified,generics:t.generics,global:t.global,origin:c.origin??s,isCollection:c.isCollection,isReferenceType:c.isReferenceType,multipartMethodName:c.multipartMethodName,multipartMethodNameForCollection:c.multipartMethodNameForCollection},c.scope,this.generation);let p=!1,d=this.resolveNamespace(i);d!==i&&(i=d,p=!0);let f;e:for(;;){f=e.fullyQualifiedNameOf({name:n,namespace:i,enclosingType:o});let m="",g=i.split(".");for(let A=0;A<g.length;A++)if(m=m?`${m}.${g[A]}`:`${g[A]}`,this.typeRegistry.has(m)){g[A]=`${g[A]}_`,i=g.join("."),p=!0;continue e}if(p&&this.registerNamespace(t.namespace,i),l==="mismatch"&&c?.name===n){n=`${n}_`,p=!0;continue e}if(this.namespaceRegistry.has(f)){n=`${n}_`,p=!0;continue e}if(this.typeRegistry.has(f)){n=`${n}_`,p=!0;continue e}if(o){let A=f.replaceAll("+",".");if(this.typeRegistry.has(A)){n=`${n}_`,p=!0;continue e}if(this.namespaceRegistry.has(A)){n=`${n}_`,p=!0;continue e}}else{let A=f.split(".");for(let y=1;y<A.length;y++){let E=A.slice(0,y).join(".")+"+"+A.slice(y).join("+");if(this.typeRegistry.has(E)){n=`${n}_`,p=!0;continue e}}}break}return this.trackType(new Ik({name:n,namespace:i,enclosingType:o,namespaceAlias:t.namespaceAlias,fullyQualified:t.fullyQualified,generics:t.generics,global:t.global,fullyQualifiedName:f,origin:s,isCollection:t.isCollection,isReferenceType:t.isReferenceType,multipartMethodName:t.multipartMethodName,multipartMethodNameForCollection:t.multipartMethodNameForCollection},new JRs(this,n,i,f),this.generation),r)}resolveNamespace(t){let r=this.namespaceRegistry.get(t);if(r!==void 0)return r;let n=t.split(".");for(let i=n.length-1;i>=0;i--){let o=n.slice(0,i).join(".");if(this.namespaceRegistry.has(o)){let s=this.namespaceRegistry.get(o);if(s!==void 0){let a=n.slice(i).join("."),c=`${s}.${a}`;return this.registerNamespace(t,c),c}}}return t}canonicalizeNamespace(t){let r=this.namespaceRegistry.get(t);if(r!==void 0)return r;let n=!1,i=t;e:for(;;){let o="",s=i.split(".");for(let a=0;a<s.length;a++)if(o=o?`${o}.${s[a]}`:`${s[a]}`,this.typeRegistry.has(o)){s[a]=`${s[a]}_`,i=s.join("."),n=!0;continue e}break}return n&&this.registerNamespace(t,i),i}};var KAi=class{generation;constructor(t){this.generation=t}get model(){return this.generation.model}frozen=!1;extraClassReferences=new Map;classReference(t){return this.classReferenceInternal(t)}classReferenceInternal(t){if(!t.name&&"origin"in t&&t.origin&&(t.name=this.model.getClassNameFor(t.origin)),t.enclosingType){if(t.namespace&&t.namespace!==t.enclosingType.namespace)throw new Error("ClassReference: Both enclosingType and namespace cannot be provided");t.namespace=t.enclosingType.namespace}let r=$Ct.fullyQualifiedNameOf(t);if(this.frozen&&!this.generation.registry.isRegisteredTypeName(r)){let n=this.extraClassReferences.get(r);n||(n=new Set,this.extraClassReferences.set(r,n)),n.add(`${r} -
|
|
4551
|
-
${_Kt()}`)}return this.generation.registry.registerClassReference(t,r)}freezeClassReferences(){this.frozen=!0}getPropertyName(t,r){let n=this.model.getPropertyNameFor(r),i=this.model.origin(r);if(i){let o=t.getFieldName(i,n);if(o)return o}return n}class_(t){let r=t;return"reference"in t&&(r={...t.reference,...t}),new yae(r,this.generation)}testClass(t){return new XCt(t,this.generation)}annotation(t){return new Ohe(t,this.generation)}annotationGroup(t){return new UCt(t,this.generation)}instantiateClass(t){return new CCt(t,this.generation)}invokeMethod(t){return new OCt(t,this.generation)}codeblock(t){return new QRe(t,this.generation)}code(){return new zRe({},this.generation)}anonymousFunction(t){return new VCt(t)}parameter(t){return new _K(t,this.generation)}interface_(t){return new YCt(t,this.generation)}enum_(t){return new JCt(t,this.generation)}dictionary(t){return new wCt(t,this.generation)}list(t){return new TCt(t,this.generation)}readOnlyMemory(t){return new BCt(t,this.generation)}set(t){return new PCt(t,this.generation)}switch_(t){return new qCt(t,this.generation)}ternary(t){return new GCt(t,this.generation)}and(t){return new LCt(t,this.generation)}or(t){return new _Ct(t,this.generation)}enumInstantiation(t){return new SCt(t,this.generation)}string_(t){return new DCt(t,this.generation)}xmlDocBlock(t){return new LRe(t,this.generation)}InstantiatedPrimitive={string:t=>new aP({type:"string",value:t},this.generation),boolean:t=>new aP({type:"boolean",value:t},this.generation),integer:t=>new aP({type:"integer",value:t},this.generation),long:t=>new aP({type:"long",value:t},this.generation),uint:t=>new aP({type:"uint",value:t},this.generation),ulong:t=>new aP({type:"ulong",value:t},this.generation),float:t=>new aP({type:"float",value:t},this.generation),double:t=>new aP({type:"double",value:t},this.generation),date:t=>new aP({type:"date",value:t},this.generation),dateTime:(t,r=!0)=>new aP({type:"dateTime",value:t,parse:r},this.generation),uuid:t=>new aP({type:"uuid",value:t},this.generation),null:()=>new aP({type:"null"},this.generation)};Literal={class_:({reference:t,fields:r})=>new wl.Class_(t,r,this.generation),dictionary:({keyType:t,valueType:r,entries:n})=>new wl.Dictionary(t,r,n,this.generation),list:({valueType:t,values:r})=>new wl.List(t,r,this.generation),set:({valueType:t,values:r})=>new wl.Set(t,r,this.generation),boolean:t=>new wl.Boolean(t,this.generation),float:t=>new wl.Float(t,this.generation),date:t=>new wl.Date(t,this.generation),datetime:t=>new wl.DateTime(t,this.generation),decimal:t=>new wl.Decimal(t,this.generation),double:t=>new wl.Double(t,this.generation),integer:t=>new wl.Integer(t,this.generation),long:t=>new wl.Long(t,this.generation),uint:t=>new wl.Uint(t,this.generation),ulong:t=>new wl.Ulong(t,this.generation),reference:t=>new wl.Reference(t,this.generation),string:t=>new wl.String(t,this.generation),null:()=>new wl.Null(this.generation),nop:()=>new wl.Nop(this.generation),unknown:t=>new wl.Unknown(t,this.generation)};xmlDocBlockOf(t){return t instanceof LRe?t:new LRe(t,this.generation)}VALID_READ_ONLY_MEMORY_TYPES=new Set(["int","long","uint","ulong","string","bool","float","double"]);validateReadOnlyMemoryTypes(){for(let t of this.generation.settings.readOnlyMemoryTypes)if(!this.VALID_READ_ONLY_MEMORY_TYPES.has(t))throw new Error(`Type "${t}" is not a valid 'read-only-memory-types' custom config option; expected one of ${JSON.stringify(this.VALID_READ_ONLY_MEMORY_TYPES)}.`)}};function vu(e){let t={},r={};for(let[n,i]of Object.entries(e))i.length===0?Object.defineProperty(r,n,{get(){return n in t||(t[n]=i()),t[n]},enumerable:!0,configurable:!0}):r[n]=i;return r}var JAi=class{generation;constructor(t){this.generation=t}get csharp(){return this.generation.csharp}System=vu({Action:t=>this.csharp.classReference({name:"Action",namespace:"System",generics:t||void 0,multipartMethodName:null,multipartMethodNameForCollection:null,isReferenceType:!0}),Func:(t,r)=>this.csharp.classReference({name:"Func",namespace:"System",generics:t?r?[...t,r]:t:r?[r]:void 0,multipartMethodName:null,multipartMethodNameForCollection:null,isReferenceType:!0}),DateOnly:()=>this.csharp.classReference({name:"DateOnly",namespace:"System"}),DateTime:()=>this.csharp.classReference({name:"DateTime",namespace:"System"}),Enum:()=>this.csharp.classReference({name:"Enum",namespace:"System"}),Exception:()=>this.csharp.classReference({name:"Exception",namespace:"System"}),ReadOnlyMemory:t=>this.csharp.classReference({name:"ReadOnlyMemory",namespace:"System",generics:[t]}),Serializable:()=>this.csharp.classReference({name:"SerializableAttribute",namespace:"System"}),String:()=>this.csharp.classReference({name:"String",namespace:"System"}),Type:()=>this.csharp.classReference({name:"Type",namespace:"System",isReferenceType:!0,multipartMethodName:null,multipartMethodNameForCollection:null,fullyQualified:!0}),TimeSpan:()=>this.csharp.classReference({name:"TimeSpan",namespace:"System"}),Uri:()=>this.csharp.classReference({name:"Uri",namespace:"System"}),UriBuilder:()=>this.csharp.classReference({name:"UriBuilder",namespace:"System"}),Runtime:()=>vu({Serialization:()=>vu({EnumMember:()=>this.csharp.classReference({name:"EnumMemberAttribute",namespace:"System.Runtime.Serialization"})})}),Collections:()=>vu({Generic:()=>vu({IAsyncEnumerable:t=>this.csharp.classReference({name:"IAsyncEnumerable",namespace:"System.Collections.Generic",generics:t?[t]:void 0}),IEnumerable:t=>this.csharp.classReference({name:"IEnumerable",namespace:"System.Collections.Generic",generics:t?[t]:void 0}),KeyValuePair:(t,r)=>this.csharp.classReference({name:"KeyValuePair",namespace:"System.Collections.Generic",generics:t&&r?[t,r]:void 0}),List:t=>this.csharp.classReference({name:"List",namespace:"System.Collections.Generic",generics:t?[t]:void 0,isCollection:!0}),HashSet:t=>this.csharp.classReference({name:"HashSet",namespace:"System.Collections.Generic",generics:t?[t]:void 0,isCollection:!0}),Dictionary:(t,r)=>this.csharp.classReference({name:"Dictionary",namespace:"System.Collections.Generic",generics:t&&r?[t,r]:void 0,isCollection:!0}),IDictionary:(t,r)=>this.csharp.classReference({name:"IDictionary",namespace:"System.Collections.Generic",generics:[t,r]})}),Linq:()=>vu({Enumerable:()=>this.csharp.classReference({name:"Enumerable",namespace:"System.Linq"})})}),Globalization:()=>vu({DateTimeStyles:()=>this.csharp.classReference({name:"DateTimeStyles",namespace:"System.Globalization"})}),Linq:()=>vu({Enumerable:()=>this.csharp.classReference({name:"Enumerable",namespace:"System.Linq"})}),Net:()=>vu({Http:()=>vu({HttpClient:()=>this.csharp.classReference({name:"HttpClient",namespace:"System.Net.Http"}),HttpMethod:()=>this.csharp.classReference({name:"HttpMethod",namespace:"System.Net.Http"}),HttpResponseHeaders:()=>this.csharp.classReference({name:"HttpResponseHeaders",namespace:"System.Net.Http.Headers"})}),ServerSentEvents:()=>vu({SseEvent:()=>this.csharp.classReference({name:"SseEvent",namespace:"System.Net.ServerSentEvents"}),SseParser:()=>this.csharp.classReference({name:"SseParser",namespace:"System.Net.ServerSentEvents"})}),WebSockets:()=>vu({ClientWebSocketOptions:()=>this.csharp.classReference({name:"ClientWebSocketOptions",namespace:"System.Net.WebSockets"})})}),IO:()=>vu({MemoryStream:()=>this.csharp.classReference({name:"MemoryStream",namespace:"System.IO"}),Stream:()=>this.csharp.classReference({name:"Stream",namespace:"System.IO"}),StreamReader:()=>this.csharp.classReference({name:"StreamReader",namespace:"System.IO"})}),Text:()=>vu({Encoding:()=>this.csharp.classReference({name:"Encoding",namespace:"System.Text"}),Encoding_UTF8:()=>this.csharp.classReference({name:"UTF8",enclosingType:this.csharp.classReference({name:"Encoding",namespace:"System.Text"})}),Json:()=>vu({JsonElement:()=>this.csharp.classReference({name:"JsonElement",namespace:"System.Text.Json"}),JsonDocument:()=>this.csharp.classReference({name:"JsonDocument",namespace:"System.Text.Json"}),JsonException:()=>this.csharp.classReference({name:"JsonException",namespace:"System.Text.Json"}),Utf8JsonReader:()=>this.csharp.classReference({name:"Utf8JsonReader",namespace:"System.Text.Json"}),JsonSerializerOptions:()=>this.csharp.classReference({name:"JsonSerializerOptions",namespace:"System.Text.Json"}),JsonSerializer:()=>this.csharp.classReference({name:"JsonSerializer",namespace:"System.Text.Json"}),Utf8JsonWriter:()=>this.csharp.classReference({name:"Utf8JsonWriter",namespace:"System.Text.Json"}),Nodes:()=>vu({JsonNode:()=>this.csharp.classReference({name:"JsonNode",namespace:"System.Text.Json.Nodes"}),JsonObject:()=>this.csharp.classReference({name:"JsonObject",namespace:"System.Text.Json.Nodes"})}),Serialization:()=>vu({IJsonOnDeserialized:()=>this.csharp.classReference({name:"IJsonOnDeserialized",namespace:"System.Text.Json.Serialization"}),IJsonOnSerializing:()=>this.csharp.classReference({name:"IJsonOnSerializing",namespace:"System.Text.Json.Serialization"}),JsonOnDeserializedAttribute:()=>this.csharp.classReference({name:"JsonOnDeserializedAttribute",namespace:"System.Text.Json.Serialization"}),JsonExtensionData:()=>this.csharp.classReference({name:"JsonExtensionDataAttribute",namespace:"System.Text.Json.Serialization"}),JsonConverter:t=>this.csharp.classReference({name:"JsonConverter",namespace:"System.Text.Json.Serialization",generics:t?[t]:void 0}),JsonIgnore:()=>this.csharp.classReference({name:"JsonIgnoreAttribute",namespace:"System.Text.Json.Serialization"}),JsonPropertyName:()=>this.csharp.classReference({name:"JsonPropertyNameAttribute",namespace:"System.Text.Json.Serialization"})})})}),Threading:()=>vu({CancellationToken:()=>this.csharp.classReference({name:"CancellationToken",namespace:"System.Threading"}),Tasks:()=>vu({Task:t=>this.csharp.classReference({name:"Task",namespace:"System.Threading.Tasks",generics:t?[t]:void 0}),ValueTask:t=>this.csharp.classReference({name:"ValueTask",namespace:"System.Threading.Tasks",generics:t?[t]:void 0})})}),ComponentModel:()=>vu({INotifyPropertyChanged:()=>this.csharp.classReference({name:"INotifyPropertyChanged",namespace:"System.ComponentModel"}),PropertyChangedEventHandler:()=>this.csharp.classReference({name:"PropertyChangedEventHandler",namespace:"System.ComponentModel"})}),IAsyncDisposable:()=>this.csharp.classReference({name:"IAsyncDisposable",namespace:"System"}),IDisposable:()=>this.csharp.classReference({name:"IDisposable",namespace:"System"})});NUnit=vu({Framework:()=>vu({TestFixture:()=>this.csharp.classReference({name:"TestFixture",namespace:"NUnit.Framework"}),Test:()=>this.csharp.classReference({name:"Test",namespace:"NUnit.Framework"}),OneTimeTearDown:()=>this.csharp.classReference({name:"OneTimeTearDown",namespace:"NUnit.Framework"}),OneTimeSetUp:()=>this.csharp.classReference({name:"OneTimeSetUp",namespace:"NUnit.Framework"}),SetUpFixture:()=>this.csharp.classReference({name:"SetUpFixture",namespace:"NUnit.Framework"}),Parallelizable:()=>this.csharp.classReference({name:"Parallelizable",namespace:"NUnit.Framework"})})});OneOf=vu({OneOf:t=>this.csharp.classReference({name:"OneOf",namespace:"OneOf",generics:t}),OneOfBase:t=>this.csharp.classReference({name:"OneOfBase",namespace:"OneOf",generics:t})});Google=vu({Protobuf:()=>vu({ByteString:()=>this.csharp.classReference({name:"ByteString",namespace:"Google.Protobuf"}),WellKnownTypes:()=>vu({Struct:()=>this.csharp.classReference({name:"Struct",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"}),Value:()=>this.csharp.classReference({name:"Value",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"}),ListValue:()=>this.csharp.classReference({name:"ListValue",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"}),Timestamp:()=>this.csharp.classReference({name:"Timestamp",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"})})})});WireMock=vu({Server:()=>this.csharp.classReference({name:"WireMockServer",namespace:"WireMock.Server"}),WireMockServerSettings:()=>this.csharp.classReference({name:"WireMockServerSettings",namespace:"WireMock.Settings"}),WireMockConsoleLogger:()=>this.csharp.classReference({name:"WireMockConsoleLogger",namespace:"WireMock.Logging"})});Grpc=vu({Core:()=>vu({RpcException:()=>this.csharp.classReference({name:"RpcException",namespace:"Grpc.Core"})})})};var XRs=new Set(["name","camelCase","snakeCase","screamingSnakeCase","pascalCase"]);function i6g(e,t){return XRs.has(t)?e??"":e?`${e}.${t}`:t}var YAi=class{generation;indexByObject=new Map;indexByPath=new Map;explicitByObject=new Map;explicitByPath=new Map;root;ir;get csharp(){return this.generation.csharp}get registry(){return this.generation.registry}constructor(t,r){this.generation=r,this.root=this.createIndex(t),this.ir=t}createIndex(t,r="",n){let i=i6g(n?.jsonPath,r);if(this.indexByPath.has(i)){n||oI(`Parent provenance not found for node: ${JSON.stringify(t).substring(0,100)}`),this.indexByObject.set(t,n);let s=XRs.has(r);for(let[a,c]of Object.entries(t))typeof c=="object"&&c!==null&&(s&&XRs.has(a)?this.indexByObject.set(c,n):this.createIndex(c,a,n));return n}let o={jsonPath:i,name:r,node:t,parent:n};this.indexByObject.set(t,o),this.indexByPath.set(i,o);for(let[s,a]of Object.entries(t))typeof a=="object"&&a!==null&&this.createIndex(a,s,o);return o}staticExplicit(t){return this.explicit(this.ir,t)}explicit(t,r){let n=this.provenance(t)??oI(`Provenance not found for node: ${JSON.stringify(t).substring(0,100)}`),i={...n,jsonPath:`${n.jsonPath}+${r}`,name:r,node:n.node,parent:n,explicit:!0},o=this.explicitByObject.get(n.node);return o?o.add(i):this.explicitByObject.set(n.node,new Set([i])),this.explicitByPath.set(i.jsonPath,i),i}provenance(t){if(t!==void 0)return Da.string(t)?this.explicitByPath.get(t)??this.indexByPath.get(t):Da.Provenance(t)?this.explicitByPath.get(t.jsonPath)??this.indexByPath.get(t.jsonPath):this.indexByObject.get(t)}origin(t){let r=this.provenance(t);return r?.explicit?r:r?.node}irNode(t){return this.provenance(t)?.node}jsonPath(t){return this.provenance(t)?.jsonPath}getEnumValueName(t,r){let n=Da.IR.ExampleEnumType(r)?r.value:r,i=t.values.find(o=>this.nameEquals(o.name,n));return i?this.getPropertyNameFor(i):oI(`Unexpected - can't find enum value ${JSON.stringify(n)} in enum`)}getPropertyNameFor(t){let r=this.registry.getFieldNameByOrigin(t);if(r)return r;if(Da.Provenance(t))return t.name;if("name"in t){if(Da.IR.NameAndWireValue(t.name))return this.generation.case.pascalSafe(t.name);if(Da.IR.Name(t.name))return this.generation.case.pascalSafe(t.name);if(typeof t.name=="string")return this.generation.case.pascalSafe(t.name)}if("pascalCase"in t)return this.generation.case.pascalSafe(t);throw new Error(`Unknown property type: ${this.jsonPath(t)}`)}getClassNameFor(t){if(Da.Provenance(t))return t.name;if("name"in t){if(Da.IR.TypeDeclaration(t))return this.generation.case.pascalSafe(t.name.name);if(Da.IR.NameAndWireValue(t.name))return this.generation.case.pascalSafe(t.name);if(Da.IR.Name(t.name))return this.generation.case.pascalSafe(t.name);if(typeof t.name=="string")return this.generation.case.pascalSafe(t.name)}if("pascalCase"in t)return this.generation.case.pascalSafe(t);throw new Error(`Unknown property type: ${JSON.stringify(t)}`)}nameEquals(t,r){return this.generation.case.camelSafe(t)===this.generation.case.camelSafe(r)}dereferenceType(t){let r=Da.string(t)?t:Da.IR.NamedType(t)||Da.IR.DeclaredTypeName(t)?t.typeId:Da.IR.ExampleNamedType(t)?t.typeName.typeId:t.name.typeId,n=this.irNode(this.ir.types[r]);if(Da.IR.TypeDeclaration(n))return{typeId:r,typeDeclaration:n};oI(`dereferenceType: typeId ${r} not resolved.`)}};function XAi(...e){return e.filter(Boolean).join("/")}var OJt=class{intermediateRepresentation;apiName;customConfig;generatorConfig;support;constructor(t,r,n,i,o={makeRelativeFilePath:s=>s,makeAbsoluteFilePath:s=>s,getNamespaceForTypeId:s=>"",getDirectoryForTypeId:s=>"",getCoreAsIsFiles:()=>[],getCoreTestAsIsFiles:()=>[],getPublicCoreAsIsFiles:()=>[],getAsyncCoreAsIsFiles:()=>[],getChildNamespaceSegments:s=>[]}){this.intermediateRepresentation=t,this.apiName=r,this.customConfig=n,this.generatorConfig=i,this.support=o;let s=Da.IR.IntermediateRepresentation(t)?t.casingsConfig:void 0;this.case=new WKt({generationLanguage:"csharp",keywords:s?.keywords,smartCasing:s?.smartCasing??!0}),this.model=new YAi(t,this),this.ir=Da.IR.IntermediateRepresentation(t)?t:{},this.dir=Da.DynamicIR.DynamicIntermediateRepresentation(t)?t:{}}ir;dir;csharp=new KAi(this);registry=new $Ct(this);model;case;extern=new JAi(this);settings=vu({namespace:()=>this.customConfig.namespace??jAi(QAi(`${this.generatorConfig.organization}_${this.apiName}`)),readOnlyMemoryTypes:()=>this.customConfig["read-only-memory-types"]??[],simplifyObjectDictionaries:()=>this.customConfig["simplify-object-dictionaries"]??!1,useFullyQualifiedNamespaces:()=>this.customConfig["experimental-fully-qualified-namespaces"]??!1,useDotnetFormat:()=>this.customConfig["experimental-dotnet-format"]??!1,enableWebsockets:()=>this.customConfig["experimental-enable-websockets"]??!1,enableReadonlyConstants:()=>this.customConfig["experimental-readonly-constants"]??!1,generateLiterals:()=>this.customConfig["generate-literals"]??this.customConfig["experimental-readonly-constants"]??!1,enableExplicitNullableOptional:()=>this.customConfig["experimental-explicit-nullable-optional"]??!1,useDefaultRequestParameterValues:()=>this.customConfig["use-default-request-parameter-values"]??!1,redactResponseBodyOnError:()=>this.customConfig["redact-response-body-on-error"]??!1,enableInlineTypes:()=>this.customConfig["enable-inline-types"]??!1,temporaryWebsocketEnvironments:()=>this.customConfig["temporary-websocket-environments"]??{},baseApiExceptionClassName:()=>this.customConfig["base-api-exception-class-name"]??"",baseExceptionClassName:()=>this.customConfig["base-exception-class-name"]??"",shouldGeneratedDiscriminatedUnions:()=>this.customConfig["use-discriminated-unions"]??!0,shouldGenerateUndiscriminatedUnions:()=>this.customConfig["use-undiscriminated-unions"]??!1,dedupeUnionBaseProperties:()=>this.customConfig["dedupe-union-base-properties"]??!1,exportedClientClassName:()=>this.customConfig["exported-client-class-name"]??"",clientClassName:()=>this.customConfig["client-class-name"]??"",rootNamespaceForCoreClasses:()=>this.customConfig["root-namespace-for-core-classes"]??!0,packageId:()=>this.customConfig["package-id"]??"",isForwardCompatibleEnumsEnabled:()=>this.customConfig["enable-forward-compatible-enums"]??this.customConfig["experimental-enable-forward-compatible-enums"]??!0,websocketEnvironments:()=>this.customConfig["temporary-websocket-environments"]??{},customPagerName:()=>this.customConfig["custom-pager-name"]??"",usePageIndexSemantics:()=>this.customConfig["offset-semantics"]==="page-index",environmentClassName:()=>this.customConfig["environment-class-name"]??"",generateErrorTypes:()=>this.customConfig["generate-error-types"]??!0,shouldInlinePathParameters:()=>this.customConfig["inline-path-parameters"]??!0,includeExceptionHandler:()=>this.customConfig["include-exception-handler"]??!1,exceptionInterceptorClassName:()=>this.customConfig["exception-interceptor-class-name"]??"",shouldGenerateMockServerTests:()=>this.customConfig["generate-mock-server-tests"]??this.customConfig["enable-wire-tests"]??!0,rootClientAccess:()=>this.customConfig["root-client-class-access"]=="internal"?JC.Internal:JC.Public,extraDependencies:()=>this.customConfig["extra-dependencies"]??{},omitFernHeaders:()=>this.customConfig["omit-fern-headers"]??!1,includePlatformHeaders:()=>this.customConfig["include-platform-headers"]??!1,allowUserAgentAppInfo:()=>this.customConfig["allow-user-agent-app-info"]??!1,userAgentNameFromPackage:()=>this.customConfig["user-agent-name-from-package"]??!1,unifiedClientOptions:()=>this.customConfig["unified-client-options"]??!1,serverUrlVariables:()=>this.customConfig["server-url-variables"]??!0,pascalCaseEnvironments:()=>this.customConfig["pascal-case-environments"]??!0,slnFormat:()=>this.customConfig["sln-format"]??"slnx",explicitNamespaces:()=>this.customConfig["explicit-namespaces"]===!0,maxRetries:()=>this.customConfig.maxRetries,retryStatusCodes:()=>this.customConfig.retryStatusCodes??"legacy",defaultTimeoutInMilliseconds:()=>{let t=this.customConfig["default-timeout-in-milliseconds"];if(t!=null)return t;let r=this.customConfig["default-timeout-in-seconds"];if(r!=null)return r==="infinity"?"infinity":r*1e3},outputPath:()=>{let t=this.customConfig["output-path"];return t==null?{library:"src",test:"src",solution:".",other:"."}:typeof t=="string"?{library:t,test:t,solution:".",other:"."}:{library:t.library??"src",test:t.test??"src",solution:t.solution??".",other:t.other??"."}}});constants={folders:vu({mockServerTests:()=>this.support.makeRelativeFilePath("Unit/MockServer"),types:()=>"Types",exceptions:()=>"Exceptions",src:()=>"src",protobuf:()=>"proto",serializationTests:()=>this.support.makeRelativeFilePath("Unit/Serialization"),project:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.sourceFiles,this.support.makeRelativeFilePath(this.names.files.project))),sourceFiles:()=>this.support.makeRelativeFilePath(this.constants.folders.src),coreFiles:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.project,this.support.makeRelativeFilePath(this.constants.defaults.core))),publicCoreFiles:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.project,this.support.makeRelativeFilePath(this.constants.defaults.core),this.support.makeRelativeFilePath(this.constants.defaults.publicCore))),testFiles:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.sourceFiles,this.support.makeRelativeFilePath(this.names.files.testProject)))}),formatting:vu({indent:()=>" "}),defaults:vu({core:()=>"Core",publicCore:()=>"Public",version:()=>"0.0.0"})};namespaces=vu({root:()=>this.settings.namespace,core:()=>`${this.namespaces.root}.Core`,qualifiedRoot:()=>this.qualifyNamespace(this.namespaces.root),qualifiedCore:()=>this.qualifyNamespace(this.namespaces.core),test:()=>this.registry.canonicalizeNamespace(`${this.namespaces.root}.Test`),testUtils:()=>`${this.namespaces.test}.Utils`,mockServerTest:()=>`${this.namespaces.test}.Unit.MockServer`,publicCore:()=>this.namespaces.root,webSocketsCore:()=>`${this.namespaces.core}.WebSockets`,publicCoreTest:()=>`${this.namespaces.root}.Test.PublicCore`,asIsTestUtils:()=>`${this.namespaces.root}.Test.Utils`,publicCoreClasses:()=>this.settings.rootNamespaceForCoreClasses?this.namespaces.root:this.namespaces.core,implicit:()=>new Set(["System","System.Collections.Generic","System.IO","System.Linq","System.Threading","System.Threading.Tasks","System.Net.Http"])});names={classes:vu({baseApiException:()=>this.settings.baseApiExceptionClassName||`${this.names.project.clientPrefix}ApiException`,baseException:()=>this.settings.baseExceptionClassName||`${this.names.project.clientPrefix}Exception`,rootClient:()=>this.settings.clientClassName||`${this.names.project.clientPrefix}Client`,rootClientForSnippets:()=>this.settings.exportedClientClassName||this.names.classes.rootClient,customPager:()=>this.settings.customPagerName||`${this.names.project.packageId.replace(/[^a-zA-Z0-9]/g,"")}Pager`,environment:()=>this.settings.environmentClassName||`${this.names.project.clientPrefix}Environment`,exceptionInterceptor:()=>this.settings.exceptionInterceptorClassName||`${this.names.project.packageId.replace(/[^a-zA-Z0-9]/g,"")}ExceptionInterceptor`}),project:vu({client:()=>jAi(QAi(`${this.generatorConfig.organization}_${this.generatorConfig.workspaceName}`)),clientPrefix:()=>this.settings.exportedClientClassName||this.settings.clientClassName||this.names.project.client,packageId:()=>this.settings.packageId||krp(this.ir)?.packageName||this.namespaces.root}),files:vu({project:()=>this.namespaces.root,testProject:()=>`${this.namespaces.root}.Test`}),methods:vu({mockOauth:()=>"MockOAuthEndpoint",mockInferredAuth:()=>"MockInferredAuthEndpoint",getAccessTokenAsync:()=>"GetAccessTokenAsync",getAuthHeadersAsync:()=>"GetAuthHeadersAsync"}),variables:vu({client:()=>"client",response:()=>"response",httpRequest:()=>"httpRequest",sendRequest:()=>"sendRequest",responseBody:()=>"responseBody",query:()=>"_query",headers:()=>"_headers"}),parameters:vu({cancellationToken:()=>"cancellationToken",requestOptions:()=>"options",idempotentOptions:()=>"options"})};Types=vu({Arbitrary:t=>new md.ArbitraryType(t,this),HttpMethodExtensions:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("HttpMethodExtensions")}),FormRequest:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("FormRequest")}),Optional:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("Optional")}),ClientOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("ClientOptions"),namespace:this.namespaces.publicCoreClasses}),AppInfo:()=>this.csharp.classReference({origin:this.model.staticExplicit("AppInfo"),namespace:this.namespaces.publicCoreClasses}),RawClient:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("RawClient")}),RequestOptions:()=>this.csharp.classReference({namespace:this.namespaces.publicCoreClasses,origin:this.model.staticExplicit("RequestOptions")}),RequestOptionsInterface:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("IRequestOptions")}),JsonRequest:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("JsonRequest")}),Version:()=>this.csharp.classReference({namespace:this.namespaces.publicCore,origin:this.model.staticExplicit("Version")}),ValueConvert:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("ValueConvert")}),FileParameter:()=>this.csharp.classReference({namespace:this.namespaces.publicCore,origin:this.model.staticExplicit("FileParameter"),multipartMethodName:"AddFileParameterPart",multipartMethodNameForCollection:"AddFileParameterParts",isReferenceType:!0}),DefaultHttpClientFactory:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("DefaultHttpClientFactory")}),Headers:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("Headers")}),HeaderValue:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("HeaderValue")}),RootClient:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.rootClient),namespace:this.namespaces.root}),RootClientForSnippets:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.rootClientForSnippets),namespace:this.namespaces.root}),BaseApiException:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.baseApiException),namespace:this.namespaces.publicCoreClasses}),BaseException:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.baseException),namespace:this.namespaces.publicCoreClasses}),ExceptionInterceptor:()=>this.csharp.classReference({origin:this.model.staticExplicit("IExceptionInterceptor"),namespace:this.namespaces.core}),ExceptionHandler:()=>this.csharp.classReference({origin:this.model.staticExplicit("ExceptionHandler"),namespace:this.namespaces.core}),CustomExceptionInterceptor:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.exceptionInterceptor),namespace:this.namespaces.core}),ProtoAnyMapper:()=>this.csharp.classReference({origin:this.model.staticExplicit("ProtoAnyMapper"),namespace:this.namespaces.core}),Constants:()=>this.csharp.classReference({origin:this.model.staticExplicit("Constants"),namespace:this.namespaces.core}),DateTimeSerializer:()=>this.csharp.classReference({origin:this.model.staticExplicit("DateTimeSerializer"),namespace:this.namespaces.core}),JsonUtils:()=>this.csharp.classReference({origin:this.model.staticExplicit("JsonUtils"),namespace:this.namespaces.core}),JsonAssert:()=>this.csharp.classReference({origin:this.model.staticExplicit("JsonAssert"),namespace:this.namespaces.testUtils}),CustomPagerFactory:()=>this.csharp.classReference({origin:this.model.staticExplicit(`${this.names.classes.customPager}Factory`),namespace:this.namespaces.core}),CustomPagerContext:()=>this.csharp.classReference({origin:this.model.staticExplicit(`${this.names.classes.customPager}Context`),namespace:this.namespaces.core}),Environments:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.environment),namespace:this.namespaces.publicCoreClasses}),TestClient:()=>this.csharp.classReference({origin:this.model.staticExplicit("TestClient"),namespace:this.namespaces.test}),BaseMockServerTest:()=>this.csharp.classReference({origin:this.model.staticExplicit("BaseMockServerTest"),namespace:this.namespaces.mockServerTest}),IdempotentRequestOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("IdempotentRequestOptions"),namespace:this.namespaces.publicCoreClasses}),IdempotentRequestOptionsInterface:()=>this.csharp.classReference({origin:this.model.staticExplicit("IIdempotentRequestOptions"),namespace:this.namespaces.core}),IStringEnum:()=>this.csharp.classReference({origin:this.model.staticExplicit("IStringEnum"),namespace:this.namespaces.core}),WebSocketClient:()=>this.csharp.classReference({origin:this.model.staticExplicit("WebSocketClient"),namespace:this.namespaces.webSocketsCore}),QueryBuilder:()=>this.csharp.classReference({origin:this.model.staticExplicit("Query"),namespace:this.namespaces.webSocketsCore}),QueryStringBuilder:()=>this.csharp.classReference({origin:this.model.staticExplicit("QueryStringBuilder"),namespace:this.namespaces.core}),QueryStringBuilderBuilder:()=>this.csharp.classReference({origin:this.model.staticExplicit("QueryStringBuilder.Builder"),namespace:this.namespaces.core}),OAuthTokenProvider:()=>this.csharp.classReference({origin:this.model.staticExplicit("OAuthTokenProvider"),namespace:this.namespaces.core}),InferredAuthTokenProvider:()=>this.csharp.classReference({origin:this.model.staticExplicit("InferredAuthTokenProvider"),namespace:this.namespaces.core}),ProtoConverter:()=>this.csharp.classReference({origin:this.model.staticExplicit("ProtoConverter"),namespace:this.namespaces.core}),RawGrpcClient:()=>this.csharp.classReference({origin:this.model.staticExplicit("RawGrpcClient"),namespace:this.namespaces.core}),Extensions:()=>this.csharp.classReference({origin:this.model.staticExplicit("Extensions"),namespace:this.namespaces.core}),GrpcRequestOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("GrpcRequestOptions"),namespace:this.namespaces.root}),GrpcChannelOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("GrpcChannelOptions"),namespace:"Grpc.Net.Client"}),StringEnum:t=>this.csharp.classReference({origin:this.model.staticExplicit("StringEnum"),namespace:this.namespaces.core,generics:t?[t]:void 0}),WebSocketEvent:t=>this.csharp.classReference({origin:this.model.staticExplicit("Event"),namespace:this.namespaces.webSocketsCore,generics:[t]}),ConnectionStatus:()=>this.csharp.classReference({origin:this.model.staticExplicit("ConnectionStatus"),namespace:this.namespaces.webSocketsCore}),WebSocketConnected:()=>this.csharp.classReference({origin:this.model.staticExplicit("Connected"),namespace:this.namespaces.webSocketsCore}),WebSocketClosed:()=>this.csharp.classReference({origin:this.model.staticExplicit("Closed"),namespace:this.namespaces.webSocketsCore}),ReconnectionInfo:()=>this.csharp.classReference({origin:this.model.staticExplicit("ReconnectionInfo"),namespace:this.namespaces.webSocketsCore}),CustomPagerClass:t=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.customPager),namespace:this.namespaces.core,generics:[t]}),Pager:t=>this.csharp.classReference({origin:this.model.staticExplicit("Pager"),namespace:this.namespaces.core,generics:[t]}),OffsetPager:({requestType:t,requestOptionsType:r,responseType:n,offsetType:i,stepType:o,itemType:s})=>this.csharp.classReference({origin:this.model.staticExplicit("OffsetPager"),namespace:this.namespaces.core,generics:[t,r,n,i,o,s]}),CursorPager:({requestType:t,requestOptionsType:r,responseType:n,cursorType:i,itemType:o})=>this.csharp.classReference({origin:this.model.staticExplicit("CursorPager"),namespace:this.namespaces.core,generics:[t,r,n,i,o]}),CollectionItemSerializer:(t,r)=>this.csharp.classReference({origin:this.model.staticExplicit("CollectionItemSerializer"),namespace:this.namespaces.core,generics:[t,r]}),OneOfSerializer:t=>this.csharp.classReference({origin:this.model.staticExplicit("OneOfSerializer"),namespace:this.namespaces.core,generics:[t]}),AdditionalProperties:t=>this.csharp.classReference({origin:this.model.staticExplicit("AdditionalProperties"),namespace:this.namespaces.publicCore,generics:t?[t]:void 0}),ReadOnlyAdditionalProperties:t=>this.csharp.classReference({origin:this.model.staticExplicit("ReadOnlyAdditionalProperties"),namespace:this.namespaces.publicCore,generics:t?[t]:void 0})});Primitive=vu({string:()=>new md.String(this),boolean:()=>new md.Boolean(this),integer:()=>new md.Integer(this),long:()=>new md.Long(this),uint:()=>new md.Uint(this),ulong:()=>new md.ULong(this),float:()=>new md.Float(this),double:()=>new md.Double(this),object:()=>new md.Object(this)});Value=vu({binary:()=>new e4.Binary(this),dateOnly:()=>new e4.DateOnly(this),dateTime:()=>new e4.DateTime(this),uuid:()=>new e4.Uuid(this),stringEnum:t=>new e4.StringEnum(t,this)});Collection=vu({array:t=>new tO.Array(t,this),listType:t=>new tO.ListType(t,this),list:t=>new tO.List(t,this),set:t=>new tO.Set(t,this),map:(t,r,n)=>new tO.Map(t,r,this,n),idictionary:(t,r,n)=>new tO.IDictionary(t,r,this,n),keyValuePair:(t,r)=>new tO.KeyValuePair(t,r,this)});format=vu({private:t=>`_${zAi.camelCase(t)}`});initialize(){return this.initializers.implicitNamespaces}initializers=vu({implicitNamespaces:()=>{for(let t of this.namespaces.implicit)this.registry.addImplicitNamespace(t);return!0}});get System(){return this.extern.System}get NUnit(){return this.extern.NUnit}get OneOf(){return this.extern.OneOf}get Google(){return this.extern.Google}get Grpc(){return this.extern.Grpc}get WireMock(){return this.extern.WireMock}qualifyNamespace(t){let r=t.split(".")[0];return r&&this.registry.hasTypeNamespaceConflict(r)?`global::${t}`:t}};var GK=class{generation;constructor(t){this.generation=t}get csharp(){return this.generation.csharp}get case(){return this.generation.case}get settings(){return this.generation.settings}get constants(){return this.generation.constants}get namespaces(){return this.generation.namespaces}get names(){return this.generation.names}get model(){return this.generation.model}get format(){return this.generation.format}get registry(){return this.generation.registry}get Types(){return this.generation.Types}get System(){return this.generation.extern.System}get NUnit(){return this.generation.extern.NUnit}get OneOf(){return this.generation.extern.OneOf}get Google(){return this.generation.extern.Google}get Grpc(){return this.generation.extern.Grpc}get WireMock(){return this.generation.extern.WireMock}get Primitive(){return this.generation.Primitive}get Value(){return this.generation.Value}get Collection(){return this.generation.Collection}};kt();var ZAi=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?this.csharp.Literal.null():(this.context.errors.add({severity:Br.Critical,message:"Expected non-null value, but got null"}),this.csharp.Literal.nop());if(t.value===void 0&&!t.fallbackToDefault)return this.csharp.Literal.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value,fallbackToDefault:t.fallbackToDefault});case"literal":return this.convertLiteral({literal:t.typeReference.value,fallbackToDefault:t.forceLiteral?t.fallbackToDefault:void 0,value:t.value,forceLiteral:t.forceLiteral});case"map":return this.convertMap({map:t.typeReference,value:t.value,fallbackToDefault:t.fallbackToDefault});case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?this.csharp.Literal.nop():this.convertNamed({named:r,value:t.value,as:t.as,fallbackToDefault:t.fallbackToDefault})}case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,forceLiteral:t.forceLiteral});case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,forceLiteral:t.forceLiteral});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as,fallbackToDefault:t.fallbackToDefault});case"set":return this.convertSet({set:t.typeReference.value,value:t.value,fallbackToDefault:t.fallbackToDefault});case"unknown":return this.convertUnknown({value:t.value,fallbackToDefault:t.fallbackToDefault});default:Ee(t.typeReference)}}convertList({list:t,value:r,fallbackToDefault:n}){return Array.isArray(r)?this.csharp.Literal.list({valueType:this.context.dynamicTypeMapper.convert({typeReference:t,unboxOptionals:!0}),values:r.map((i,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:t,value:i})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Br.Critical,message:`Expected array but got: ${typeof r}`}),this.csharp.Literal.nop())}convertLiteral({literal:t,value:r,fallbackToDefault:n,forceLiteral:i}){if(this.settings.generateLiterals&&!i)return this.csharp.Literal.nop();switch(t.type){case"boolean":{let o=this.context.getValueAsBoolean({value:r});return o==null?this.csharp.Literal.nop():this.csharp.Literal.boolean(o)}case"string":{let o=this.context.getValueAsString({value:r});return o==null?n?this.Primitive.string.getDeterminsticDefault(n):this.csharp.Literal.nop():this.csharp.Literal.string(o)}default:Ee(t)}}convertSet({set:t,value:r,fallbackToDefault:n}){return Array.isArray(r)?this.csharp.Literal.set({valueType:this.context.dynamicTypeMapper.convert({typeReference:t,unboxOptionals:!0}),values:r.map((i,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:t,value:i})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Br.Critical,message:`Expected array but got: ${typeof r}`}),this.csharp.Literal.nop())}convertMap({map:t,value:r,fallbackToDefault:n}){return typeof r!="object"||r==null?(this.context.errors.add({severity:Br.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),this.csharp.Literal.nop()):this.csharp.Literal.dictionary({keyType:this.context.dynamicTypeMapper.convert({typeReference:t.key}),valueType:t.value.type==="unknown"?this.context.dynamicTypeMapper.convert({typeReference:t.value}).asOptional():this.context.dynamicTypeMapper.convert({typeReference:t.value}),entries:Object.entries(r).map(([i,o])=>{this.context.errors.scope(i);try{return{key:this.convert({typeReference:t.key,value:i,as:"key"}),value:this.convert({typeReference:t.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:r,as:n,fallbackToDefault:i}){switch(t.type){case"alias":return this.settings.generateLiterals&&t.typeReference.type==="literal"?this.csharp.Literal.reference(this.csharp.instantiateClass({classReference:this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),arguments_:[]})):this.convert({typeReference:t.typeReference,value:r,as:n,fallbackToDefault:i});case"discriminatedUnion":return this.settings.shouldGeneratedDiscriminatedUnions?this.convertDiscriminatedUnion({discriminatedUnion:t,value:r,fallbackToDefault:i}):this.convertUnknown({value:r,fallbackToDefault:i});case"enum":return this.getEnumValue(t,r);case"object":return this.convertObject({object_:t,value:r,fallbackToDefault:i});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:r,fallbackToDefault:i});default:Ee(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:r,fallbackToDefault:n}){let i=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),o=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:r});if(o==null)return this.csharp.Literal.nop();let s=o.singleDiscriminatedUnionType,a=this.getBaseProperties({discriminatedUnionTypeInstance:o,singleDiscriminatedUnionType:s});switch(s.type){case"samePropertiesAsObject":{let c=this.context.resolveNamedType({typeId:s.typeId});return c==null?this.csharp.Literal.nop():this.instantiateUnionWithBaseProperties({classReference:i,baseProperties:a,arguments_:[this.convertNamed({named:c,value:o.value})]})}case"singleProperty":{if(this.context.getRecord(o.value)==null)return this.csharp.Literal.nop();try{let u=["Value","Type"].includes(s.discriminantValue.name.pascalCase.safeName)?`${s.discriminantValue.name.pascalCase.safeName}Inner`:s.discriminantValue.name.pascalCase.safeName;return this.context.errors.scope(s.discriminantValue.wireValue),this.instantiateUnionWithBaseProperties({classReference:i,baseProperties:a,arguments_:[this.csharp.instantiateClass({classReference:this.csharp.classReference({name:u,enclosingType:i}),arguments_:[this.convert({typeReference:s.typeReference,value:s.discriminantValue.wireValue})]})]})}finally{this.context.errors.unscope()}}case"noProperties":return this.instantiateUnionWithBaseProperties({classReference:i,baseProperties:a,arguments_:[this.csharp.instantiateClass({classReference:this.csharp.classReference({origin:o.discriminantValue,enclosingType:i}),arguments_:[]})]});default:Ee(s)}}getBaseProperties({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:r}){return this.context.associateByWireValue({parameters:r.properties??[],values:this.context.getRecord(t.value)??{},ignoreMissingParameters:!0}).map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),assignment:this.convert(i)}}finally{this.context.errors.unscope()}})}instantiateUnionWithBaseProperties({classReference:t,arguments_:r,baseProperties:n}){let i=this.csharp.instantiateClass({classReference:t,arguments_:r,multiline:!0});return n.length===0?this.csharp.Literal.reference(i):this.csharp.Literal.reference(this.csharp.codeblock(o=>{o.write(i," "),o.pushScope();for(let s of n)o.write(s.name," = ",s.assignment,",");o.popScope(!1)}))}getEnumValue(t,r){if(typeof r!="string")return this.context.errors.add({severity:Br.Critical,message:`Expected enum value string, got: ${typeof r}`}),this.csharp.Literal.nop();let n=t.values.find(s=>s.wireValue===r);if(n==null)return this.context.errors.add({severity:Br.Critical,message:`An enum value named "${r}" does not exist in this context`}),this.csharp.Literal.nop();let i=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),o=i.registerField(this.model.getPropertyNameFor(n),n);return this.csharp.Literal.reference(this.csharp.enumInstantiation({reference:i,value:o}))}convertObject({object_:t,value:r,fallbackToDefault:n}){let i=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),o=this.getOmittedBasePropertyWireValues(t),s=o.size===0?t.properties:t.properties.filter(f=>!o.has(f.name.wireValue)),a=new Map;for(let f of s){let m=this.context.resolvePropertyName(i,f.name.name);a.set(f.name.wireValue,m)}let c=this.context.getRecord(r)??{},u=o.size===0?c:Object.fromEntries(Object.entries(c).filter(([f])=>!o.has(f))),p=this.context.associateByWireValue({parameters:s,values:u}).map(f=>{this.context.errors.scope(f.name.wireValue);try{return{name:a.get(f.name.wireValue)??this.context.getClassName(f.name.name),value:this.convert(f)}}finally{this.context.errors.unscope()}}),d=new Set(Object.keys(u));for(let f of s){let m=a.get(f.name.wireValue)??this.context.getClassName(f.name.name);if(d.has(f.name.wireValue)){if(this.isRequiredProperty(f.typeReference)){let g=p.find(A=>A.name===m);if(g!=null&&Da.Literal.nop(g.value)){let A=this.getDefaultLiteralForType(f.typeReference);A!=null&&(g.value=A)}}continue}if(this.isRequiredProperty(f.typeReference)){let g=this.getDefaultLiteralForType(f.typeReference);g!=null&&p.push({name:m,value:g})}}return this.csharp.Literal.class_({reference:i,fields:p})}getOmittedBasePropertyWireValues(t){return this.settings.dedupeUnionBaseProperties?new Set((t.deferredUnionBaseProperties??[]).map(r=>r.wireValue)):new Set}isRequiredProperty(t){return!(this.context.isOptional(t)||this.context.isNullable(t)||t.type==="list"||t.type==="set"||t.type==="map")}getDefaultLiteralForType(t,r){switch(t.type){case"primitive":return this.getDefaultLiteralForPrimitive(t.value);case"literal":return this.convertLiteral({literal:t.value,value:t.value.value});case"named":{let n=this.context.resolveNamedType({typeId:t.value});if(n==null)return;if(n.type==="alias")return this.getDefaultLiteralForType(n.typeReference,r);if(n.type==="enum"&&n.values.length>0){let i=n.values[0];if(i!=null)return this.getEnumValue(n,i.wireValue)}return n.type==="undiscriminatedUnion"?this.getDefaultLiteralForUndiscriminatedUnion(n,r):n.type==="object"?this.getDefaultLiteralForObject(n,t.value,r):void 0}default:return}}getDefaultLiteralForObject(t,r,n){let i=n??new Set;if(i.has(r))return;i.add(r);let o=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),s=[];for(let a of t.properties)if(this.isRequiredProperty(a.typeReference)){let c=this.getDefaultLiteralForType(a.typeReference,i);c!=null&&s.push({name:this.context.resolvePropertyName(o,a.name.name),value:c})}return i.delete(r),this.csharp.Literal.class_({reference:o,fields:s})}getDefaultLiteralForUndiscriminatedUnion(t,r){for(let n of t.types){let i=this.getDefaultLiteralForType(n,r);if(i!=null)return i}}getDefaultLiteralForPrimitive(t){switch(t){case"INTEGER":return this.csharp.Literal.integer(0);case"LONG":return this.csharp.Literal.long(0);case"UINT":return this.csharp.Literal.uint(0);case"UINT_64":return this.csharp.Literal.ulong(0);case"FLOAT":return this.csharp.Literal.float(0);case"DOUBLE":return this.csharp.Literal.double(0);case"BOOLEAN":return this.csharp.Literal.boolean(!1);case"STRING":case"UUID":case"BASE_64":case"BIG_INTEGER":return this.csharp.Literal.string("");case"DATE":return this.csharp.Literal.date("0001-01-01");case"DATE_TIME":case"DATE_TIME_RFC_2822":return this.csharp.Literal.datetime("0001-01-01T00:00:00.000Z");default:Ee(t)}}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:r,fallbackToDefault:n}){let i=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:r});return i==null?this.csharp.Literal.nop():i.typeLiteral}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:r}){for(let n of t.types){let i=this.context.errors.size();try{let o=this.convert({typeReference:n,value:r});if(Da.Literal.nop(o)||this.context.errors.size()>i){this.context.errors.truncate(i);continue}return{valueTypeReference:n,typeLiteral:o}}catch{this.context.errors.truncate(i);continue}}this.context.errors.add({severity:Br.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:t,fallbackToDefault:r}){return this.csharp.Literal.unknown(t)}convertPrimitive({primitive:t,value:r,as:n,fallbackToDefault:i}){switch(t){case"INTEGER":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.integer.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.integer(o)}case"LONG":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.long.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.long(o)}case"UINT":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.uint.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.uint(o)}case"UINT_64":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.ulong.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.ulong(o)}case"FLOAT":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.float.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.float(o)}case"DOUBLE":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.double.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.double(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:r,as:n});return o==null?i?this.Primitive.boolean.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.boolean(o)}case"STRING":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}case"DATE":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Value.dateOnly.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.date(o)}case"DATE_TIME":case"DATE_TIME_RFC_2822":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Value.dateTime.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.datetime(o)}case"UUID":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}case"BASE_64":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}case"BIG_INTEGER":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}default:Ee(t)}}getValueAsNumber({value:t,as:r}){let n=r==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:r}){let n=r==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};kt();var $Ai=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}convert(t){switch(t.typeReference.type){case"list":return this.Collection.list(this.convert({typeReference:t.typeReference.value,unboxOptionals:!0}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return this.Collection.map(this.convert({typeReference:t.typeReference.key}),this.convert({typeReference:t.typeReference.value}));case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?this.convertUnknown():this.convertNamed({named:r,typeId:t.typeReference.value})}case"optional":case"nullable":{let r=this.convert({typeReference:t.typeReference.value});return t.unboxOptionals?r.asNonOptional():r.asOptional()}case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return this.Collection.set(this.convert({typeReference:t.typeReference.value,unboxOptionals:!0}));case"unknown":return this.convertUnknown();default:Ee(t.typeReference)}}convertToClassReference(t,r){return this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)})}convertNamed({named:t,typeId:r}){switch(t.type){case"alias":return this.settings.generateLiterals&&t.typeReference.type==="literal"?this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}):this.convert({typeReference:t.typeReference});case"enum":case"object":return this.convertToClassReference(t,r);case"discriminatedUnion":return this.settings.shouldGeneratedDiscriminatedUnions?this.convertToClassReference(t,r):this.Primitive.object;case"undiscriminatedUnion":return this.settings.shouldGenerateUndiscriminatedUnions?this.convertToClassReference(t,r):this.OneOf.OneOf(t.types.map(n=>this.convert({typeReference:n})));default:Ee(t)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return this.Primitive.boolean;case"string":return this.Primitive.string}}convertUnknown(){return this.Primitive.object}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return this.Primitive.integer;case"UINT":return this.Primitive.uint;case"LONG":return this.Primitive.long;case"UINT_64":return this.Primitive.ulong;case"FLOAT":return this.Primitive.float;case"DOUBLE":return this.Primitive.double;case"BOOLEAN":return this.Primitive.boolean;case"STRING":return this.Primitive.string;case"DATE":return this.Value.dateOnly;case"DATE_TIME":case"DATE_TIME_RFC_2822":return this.Value.dateTime;case"UUID":return this.Primitive.string;case"BASE_64":return this.Primitive.string;case"BIG_INTEGER":return this.Primitive.string;default:Ee(t)}}};kt();var eyi=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}getFilePropertyInfo({body:t,value:r}){let n={fileFields:[],bodyPropertyFields:[]},i=this.context.getRecord(r)??{};for(let o of t.properties)switch(o.type){case"file":Da.Record.missingKey(i,o.wireValue)&&(i[o.wireValue]="[bytes]"),n.fileFields.push({name:this.context.getPropertyName(o.name),value:this.getSingleFileProperty({property:o,record:i})});break;case"fileArray":Da.Record.missingKey(i,o.wireValue)&&(i[o.wireValue]=["[bytes]"]),n.fileFields.push({name:this.context.getPropertyName(o.name),value:this.getArrayFileProperty({property:o,record:i})});break;case"bodyProperty":if(Da.Record.missingKey(i,o.name.wireValue))switch(o.typeReference.type){case"optional":break;case"primitive":{switch(o.typeReference.value.toLowerCase()){case"integer":{i[o.name.wireValue]=123;break}case"string":{i[o.name.wireValue]="[string]";break}case"boolean":{i[o.name.wireValue]=!0;break}case"double":{i[o.name.wireValue]=123.456;break}case"float":{i[o.name.wireValue]=123.456;break}case"long":{i[o.name.wireValue]=123456789;break}case"uint":{i[o.name.wireValue]=123;break}case"uint64":{i[o.name.wireValue]=12345;break}case"date":{i[o.name.wireValue]=new Date(2021,1,1);break}case"datetime":{i[o.name.wireValue]=new Date(2021,1,1,12,0,0);break}case"uuid":{i[o.name.wireValue]="123e4567-e89b-12d3-a456-426614174000";break}case"base64":{i[o.name.wireValue]="SGVsbG8gd29ybGQh";break}case"biginteger":{i[o.name.wireValue]="12345678901234567890";break}}break}default:break}n.bodyPropertyFields.push({name:this.context.getPropertyName(o.name.name),value:this.getBodyProperty({property:o,record:i})});break;default:Ee(o)}return n}getSingleFileProperty({property:t,record:r}){let n=this.context.getSingleFileValue({property:t,record:r});return n==null?this.csharp.Literal.nop():this.context.getFileParameterForString(n)}getArrayFileProperty({property:t,record:r}){let n=this.context.getFileArrayValues({property:t,record:r});return n==null?this.csharp.Literal.nop():this.csharp.Literal.list({valueType:this.Types.FileParameter,values:n.map(i=>this.context.getFileParameterForString(i))})}getBodyProperty({property:t,record:r}){let n=r[t.name.wireValue];return n==null?this.csharp.Literal.nop():this.context.dynamicLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var tyi=class e extends hx{ir;dynamicTypeMapper;dynamicLiteralMapper;filePropertyMapper;generation;get namespaces(){return this.generation.namespaces}get registry(){return this.generation.registry}get settings(){return this.generation.settings}get constants(){return this.generation.constants}get names(){return this.generation.names}get model(){return this.generation.model}get format(){return this.generation.format}get csharp(){return this.generation.csharp}get Types(){return this.generation.Types}get System(){return this.generation.extern.System}get NUnit(){return this.generation.extern.NUnit}get OneOf(){return this.generation.extern.OneOf}get Google(){return this.generation.extern.Google}get WireMock(){return this.generation.extern.WireMock}get Primitive(){return this.generation.Primitive}get Value(){return this.generation.Value}get Collection(){return this.generation.Collection}constructor({ir:t,config:r,options:n,generation:i}){super({ir:t,config:r,options:n}),this.ir=t,this.generation=i??new OJt(t,r.workspaceName,r.customConfig!=null?r.customConfig:{},r),this.dynamicTypeMapper=new $Ai({context:this}),this.dynamicLiteralMapper=new ZAi({context:this}),this.filePropertyMapper=new eyi({context:this})}clone(){return new e({ir:this.ir,config:this.config,options:this.options,generation:this.generation})}getFileParameterForString(t){return this.csharp.Literal.reference(this.csharp.instantiateClass({classReference:this.Types.FileParameter,arguments_:[],properties:[{name:"Stream",value:this.getMemoryStreamForString(t)}],multiline:!0}))}getMemoryStreamForString(t){return this.System.IO.MemoryStream.new({arguments_:[this.csharp.invokeMethod({on:this.System.Text.Encoding_UTF8,method:"GetBytes",arguments_:[this.csharp.Literal.string(t)]})]})}getClassName(t){return t.pascalCase.safeName}getParameterName(t){return t.camelCase.safeName}getPropertyName(t){return t.pascalCase.safeName}resolvePropertyName(t,r){let n=r.pascalCase.safeName,i=t.scope.getRedirectedFieldName(n);return i||(t.scope.isField(n)?n:t.registerField(n))}getMethodName(t){return`${t.pascalCase.safeName}Async`}getNamespace(t,r){let n=this.getNamespaceSegments(t);return n=r!=null?[...n,r]:n,[this.namespaces.root,...n].join(".")}getEnvironmentTypeReferenceFromID(t){let r=this.resolveEnvironmentName(t);if(r!=null)return this.getEnvironmentClassReferenceForEnumName(r)}getEnvironmentClassReferenceForEnumName(t){return this.csharp.classReference({name:`${this.generation.Types.Environments.name}.${this.getClassName(t)}`,namespace:this.namespaces.root})}getNamespaceSegments(t){return(this.settings.explicitNamespaces?t.allParts:t.packagePath).map(n=>n.pascalCase.safeName)}precalculate(t){this.generation.initialize(),this.System.Collections.Generic.KeyValuePair(),this.System.Collections.Generic.IEnumerable(),this.System.Collections.Generic.IAsyncEnumerable(),this.System.Collections.Generic.HashSet(),this.System.Collections.Generic.List(),this.System.Collections.Generic.Dictionary(),this.System.Threading.Tasks.Task(),Object.entries(this.ir.types).sort((r,n)=>r[0].length-n[0].length).forEach(([r,n])=>{this.dynamicTypeMapper.convertToClassReference(n,r)});for(let[r,n]of t.entries())if(this.csharp.classReference({origin:this.model.staticExplicit(`Example${r}`),namespace:"Usage"}),n.endpoint){let i=this.resolveEndpointLocation(n.endpoint);for(let o of i)switch(o.request.type){case"inlined":this.csharp.classReference({origin:o.request.declaration.name,namespace:this.getNamespace(o.request.declaration.fernFilepath)});break;case"body":break}}this.generation.Types.ClientOptions,this.generation.Types.RootClientForSnippets,this.csharp.freezeClassReferences()}};kt();Wi();var Frp="request",ryi=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}async generateSnippet({endpoint:t,request:r,options:n}){return this.buildCodeBlock({endpoint:t,snippet:r,options:n}).toString({namespace:"Examples",generation:this.generation,allNamespaceSegments:new Set,allTypeClassReferences:new Map,skipGlobalQualifier:!0})}generateSnippetSync({endpoint:t,request:r,options:n}){return this.buildCodeBlock({endpoint:t,snippet:r,options:n}).toString({namespace:"Examples",generation:this.generation,allNamespaceSegments:new Set,allTypeClassReferences:new Map,skipGlobalQualifier:!0})}async generateSnippetAst({endpoint:t,request:r,options:n}){throw new Error("Unsupported")}buildCodeBlock({endpoint:t,snippet:r,options:n}){if(t.examples&&Da.DynamicIR.EndpointExample(r)&&!t.examples.find(s=>s.id===r.id))throw new Error("Endpoint does not have an example that matches the snippet");let i=this.csharp.codeblock(s=>{s.writeNodeStatement(this.constructClient({endpoint:t,snippet:r})),s.newLine(),s.writeNodeStatement(this.callMethod({endpoint:t,snippet:r}))}),o=this.getStyle(n);switch(o){case lS.Concise:return i;case lS.Full:return this.buildFullCodeBlock({body:i,options:n});default:Ee(o)}}buildFullCodeBlock({body:t,options:r}){let n=this.getConfig(r),i=n.fullStyleMethodName??n.fullStyleClassName??"Example",o=this.csharp.class_({name:"Examples",namespace:"Examples",partial:!0,skipNamespaceDeclaration:!0,access:ZCt.Access.Public});return o.addNamespaceReference(this.Types.RootClientForSnippets.namespace),o.addMethod({name:i,access:ZCt.Access.Public,isAsync:!0,parameters:[],body:t}),o}constructClient({endpoint:t,snippet:r}){return this.csharp.codeblock(n=>{n.write("var client = "),n.writeNode(this.getRootClientConstructorInvocation(this.getConstructorArgs({endpoint:t,snippet:r})))})}callMethod({endpoint:t,snippet:r}){let n=t.response?.type==="streaming"||t.response?.type==="streamParameter",i=this.csharp.invokeMethod({on:this.csharp.codeblock("client"),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:r}),async:!0,configureAwait:!0,multiline:!0,isAsyncEnumerable:n});return n?this.csharp.codeblock(o=>{o.write("await foreach (var item in "),o.writeNode(i),o.writeLine(")"),o.pushScope(),o.writeLine("/* consume each item */"),o.popScope()}):i}getConstructorArgs({endpoint:t,snippet:r}){let n=[];t.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:r.auth})):this.context.errors.add({severity:Br.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`}));let i=[],o=this.getConstructorBaseUrlArgs({baseUrl:r.baseURL,environment:r.environment});o.length>0&&i.push(...o),this.context.errors.scope(jo.Headers);let s=[];if(this.context.ir.headers!=null&&r.headers!=null&&s.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),this.settings.unifiedClientOptions){let a=[...n.map(c=>({name:Fu(c.name),assignment:c.assignment})),...s.map(c=>({name:Fu(c.name),assignment:c.assignment})),...i.map(c=>({name:c.name,assignment:c.assignment}))];return a.length===0?[]:[{name:"clientOptions",assignment:this.csharp.instantiateClass({classReference:this.Types.ClientOptions,arguments_:a,multiline:!0})}]}return i.length===0?[...n,...s]:[...n,...s,{name:"clientOptions",assignment:this.csharp.instantiateClass({classReference:this.Types.ClientOptions,arguments_:i.map(a=>({name:a.name,assignment:a.assignment})),multiline:!0})}]}getConstructorBaseUrlArgs({baseUrl:t,environment:r}){let n=this.getBaseUrlArg({baseUrl:t,environment:r});return Da.Literal.nop(n)?[]:[{name:this.getBaseUrlOptionName(),assignment:n}]}getBaseUrlArg({baseUrl:t,environment:r}){if(t!=null&&r!=null)return this.context.errors.add({severity:Br.Critical,message:"Cannot specify both baseUrl and environment options"}),this.csharp.Literal.nop();if(t!=null)return this.context.ir.environments?.environments.type==="multipleBaseUrls"?(this.context.errors.add({severity:Br.Critical,message:"The C# SDK doesn't support a baseUrl when multiple URL environments are configured"}),this.csharp.Literal.nop()):this.csharp.Literal.string(t);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);return n==null?(this.context.errors.add({severity:Br.Warning,message:`Environment ${JSON.stringify(r)} was not found`}),this.csharp.Literal.nop()):this.csharp.Literal.reference(n)}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?this.csharp.Literal.reference(this.csharp.instantiateClass({classReference:this.Types.Environments,arguments_:Object.entries(r).map(([n,i])=>({name:Fu(Xn(n)),assignment:this.context.dynamicLiteralMapper.convert({typeReference:{type:"primitive",value:"STRING"},value:i})})),multiline:!0})):this.csharp.Literal.nop()}return this.csharp.Literal.nop()}getConstructorAuthArgs({auth:t,values:r}){if(r.type!==t.type)return this.addError(this.context.newAuthMismatchError({auth:t,values:r}).message),[];switch(t.type){case"basic":return r.type==="basic"?this.getConstructorBasicAuthArg({auth:t,values:r}):[];case"bearer":return r.type==="bearer"?this.getConstructorBearerAuthArgs({auth:t,values:r}):[];case"header":return r.type==="header"?this.getConstructorHeaderAuthArgs({auth:t,values:r}):[];case"oauth":return r.type==="oauth"?this.getConstructorOAuthArgs({auth:t,values:r}):[];case"inferred":return r.type==="inferred"?this.getConstructorInferredAuthArgs({auth:t,values:r}):[];default:Ee(t)}}addError(t){this.context.errors.add({severity:Br.Critical,message:t})}addWarning(t){this.context.errors.add({severity:Br.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:r}){let n=t,i=!!n.usernameOmit,o=!!n.passwordOmit,s=[];return i||s.push({name:this.context.getParameterName(t.username),assignment:this.csharp.Literal.string(r.username)}),o||s.push({name:this.context.getParameterName(t.password),assignment:this.csharp.Literal.string(r.password)}),s}getConstructorBearerAuthArgs({auth:t,values:r}){return[{name:this.context.getParameterName(t.token),assignment:this.csharp.Literal.string(r.token)}]}getConstructorHeaderAuthArgs({auth:t,values:r}){return[{name:this.context.getParameterName(t.header.name.name),assignment:this.context.dynamicLiteralMapper.convert({typeReference:t.header.typeReference,value:r.value,fallbackToDefault:t.header.name.wireValue})}]}getConstructorOAuthArgs({auth:t,values:r}){return[{name:this.context.getParameterName(t.clientId),assignment:this.csharp.Literal.string(r.clientId)},{name:this.context.getParameterName(t.clientSecret),assignment:this.csharp.Literal.string(r.clientSecret)}]}getConstructorInferredAuthArgs({auth:t,values:r}){let n=[];if(t.parameters!=null)for(let i of t.parameters){let o=i.name.wireValue,s=r.values?.[o];n.push({name:this.context.getParameterName(i.name.name),assignment:this.context.dynamicLiteralMapper.convert({typeReference:i.typeReference,value:s,fallbackToDefault:o})})}else this.context.errors.add({severity:Br.Critical,message:"Inferred auth parameters are not defined in the IR. Please ensure you're using IR version 62.3.0 or later."});return n}getConstructorHeaderArgs({headers:t,values:r}){let n=[];for(let i of t){let o=r[i.name.wireValue],s=this.getConstructorHeaderArg({header:i,value:o});s!=null&&n.push({name:this.context.getParameterName(i.name.name),assignment:s})}return n}getConstructorHeaderArg({header:t,value:r}){let n=this.context.dynamicLiteralMapper.convert({typeReference:t.typeReference,value:r,fallbackToDefault:t.name.wireValue});if(!Da.Literal.nop(n))return n}getMethodArgs({endpoint:t,snippet:r}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:r});default:Ee(t.request)}}getMethodArgsForInlinedRequest({request:t,snippet:r}){this.context.errors.scope(jo.PathParameters);let n=[...this.context.ir.pathParameters??[],...t.pathParameters??[]],i=this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:this.settings.shouldInlinePathParameters}),o=i?this.getPathParameters({namedParameters:n,snippet:r}):[],s=i?[]:this.getPathParameterArguments({namedParameters:n,snippet:r});this.context.errors.unscope(),this.context.errors.scope(jo.RequestBody);let a=this.getFilePropertyInfo({request:t,snippet:r});this.context.errors.unscope();let c=this.getInlinedRequestArg({request:t,snippet:r,pathParameterFields:o,filePropertyInfo:a});return s.length>0?[...s.map(u=>this.namedArgument({name:u.name,value:u.value})),this.namedArgument({name:Frp,value:c})]:[c]}getFilePropertyInfo({request:t,snippet:r}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:r.requestBody})}getInlinedRequestArg({request:t,snippet:r,pathParameterFields:n,filePropertyInfo:i}){let o=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)});this.context.errors.scope(jo.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:t.queryParameters??[],values:r.queryParameters??{}}).map(p=>({name:this.context.resolvePropertyName(o,p.name.name),value:this.context.dynamicLiteralMapper.convert(p)}));this.context.errors.unscope(),this.context.errors.scope(jo.Headers);let u=this.context.associateByWireValue({parameters:t.headers??[],values:r.headers??{}}).map(p=>({name:this.context.resolvePropertyName(o,p.name.name),value:this.context.dynamicLiteralMapper.convert({...p,fallbackToDefault:p.name.wireValue})}));this.context.errors.unscope(),this.context.errors.scope(jo.RequestBody);let l=t.body!=null?this.getInlinedRequestBodyConstructorFields({body:t.body,value:r.requestBody,filePropertyInfo:i,classReference:o}):[];return this.context.errors.unscope(),this.csharp.Literal.class_({reference:o,fields:[...n,...a,...u,...l]})}getInlinedRequestBodyConstructorFields({body:t,value:r,filePropertyInfo:n,classReference:i}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:t.value,value:r,classReference:i});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:t,value:r,classReference:i})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:Ee(t)}}getInlinedRequestBodyPropertyConstructorFields({parameters:t,value:r,classReference:n}){let i=[],o=this.context.associateByWireValue({parameters:t,values:this.context.getRecord(r)??{}});for(let s of o)i.push({name:this.context.resolvePropertyName(n,s.name.name),value:this.context.dynamicLiteralMapper.convert({...s,fallbackToDefault:s.name.wireValue})});return i}getFileUploadRequestBodyConstructorFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:t,value:r,classReference:n}){return{name:this.context.resolvePropertyName(n,t.bodyKey),value:this.getReferencedRequestBodyPropertyLiteral({body:t.bodyType,value:r})}}getReferencedRequestBodyPropertyLiteral({body:t,value:r}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicLiteralMapper.convert({typeReference:t.value,value:r,fallbackToDefault:JSON.stringify(t.value)});default:Ee(t)}}getMethodArgsForBodyRequest({request:t,snippet:r}){this.context.errors.scope(jo.PathParameters);let n=[...this.context.ir.pathParameters??[],...t.pathParameters??[]],i=this.getPathParameterArguments({namedParameters:n,snippet:r});this.context.errors.unscope(),this.context.errors.scope(jo.RequestBody);let o=t.body!=null?this.getBodyRequestArg({body:t.body,value:r.requestBody}):void 0;if(this.context.errors.unscope(),i.length>0&&o!=null)return[...i.map(a=>this.namedArgument({name:a.name,value:a.value})),this.namedArgument({name:Frp,value:o})];let s=i.map(a=>a.value);return o!=null&&s.push(o),s}getPathParameterArguments({namedParameters:t,snippet:r}){return this.context.associateByWireValueOrDefault({parameters:t,values:r.pathParameters??{}}).map(i=>({name:this.context.getParameterName(i.name.name),value:this.context.dynamicLiteralMapper.convert({...i,fallbackToDefault:i.name.wireValue,forceLiteral:!0})}))}namedArgument({name:t,value:r}){return this.csharp.codeblock(n=>{n.write(`${t}: `),n.writeNode(r)})}getBodyRequestArg({body:t,value:r}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return t.value.type==="optional"&&r==null?this.csharp.Literal.null():this.context.dynamicLiteralMapper.convert({typeReference:t.value,value:r,fallbackToDefault:JSON.stringify(t.value)});default:Ee(t)}}getBytesBodyRequestArg({value:t}){let r=this.context.getValueAsString({value:t});return r==null&&(this.context.errors.add({severity:Br.Critical,message:"The bytes request body must be provided in string format"}),r="[bytes]"),this.csharp.Literal.reference(this.context.getMemoryStreamForString(r))}getRootClientConstructorInvocation(t){return this.csharp.instantiateClass({classReference:this.Types.RootClientForSnippets,arguments_:t,forceUseConstructor:!0,multiline:!0})}getPathParameters({namedParameters:t,snippet:r}){let n=[],i=this.context.associateByWireValueOrDefault({parameters:t,values:r.pathParameters??{}});for(let o of i)n.push({name:this.context.getPropertyName(o.name.name),value:this.context.dynamicLiteralMapper.convert({...o,fallbackToDefault:o.name.wireValue})});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(r=>this.context.getClassName(r)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getBaseUrlOptionName(){return this.context.ir.environments?.environments.type==="multipleBaseUrls"?"Environment":"BaseUrl"}getStyle(t){return t.style??this.context.options.style??lS.Full}getConfig(t){return t.config??this.context.options.config??{}}};var BJt=class extends mx{constructor({ir:t,config:r,options:n={}}){super(new tyi({ir:t,config:r,options:n}))}precalculate(t){this.context.precalculate(t)}async generate(t,r={}){return super.generate(t,r)}generateSync(t,r={}){return super.generateSync(t,r)}async generateSnippetAst(t){return super.generateSnippetAst(t)}createSnippetGenerator(t){return new ryi({context:t})}};Zt();var ewt=require("fs/promises"),jrp=be(require("path"),1);function iO(e){let t=e.endpoint.method;if(t!=="HEAD")return{...e,baseURL:e.baseUrl,endpoint:{...e.endpoint,method:t},auth:o6g(e.auth)}}function o6g(e){if(e!=null)return e}function Nrp(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,s6g(r)]).filter(([t,r])=>r!=null))}function s6g(e){let t=e.location.method;if(t!=="HEAD")return{...e,location:{...e.location,method:t},examples:e.examples!=null?a6g(e.examples):void 0,auth:l6g(e.auth)}}function a6g(e){return e.map(t=>c6g(t)).filter(t=>t!=null)}function c6g(e){let t=e.endpoint.method;if(t!=="HEAD")return{...e,baseURL:e.baseUrl,endpoint:{...e.endpoint,method:t},auth:u6g(e.auth)}}function u6g(e){if(e!=null)return e}function l6g(e){if(e!=null)return e}function oO(e){return{...e,endpoints:Nrp(e.endpoints)}}var p6g=`<Project Sdk="Microsoft.NET.Sdk">
|
|
4551
|
+
${_Kt()}`)}return this.generation.registry.registerClassReference(t,r)}freezeClassReferences(){this.frozen=!0}getPropertyName(t,r){let n=this.model.getPropertyNameFor(r),i=this.model.origin(r);if(i){let o=t.getFieldName(i,n);if(o)return o}return n}class_(t){let r=t;return"reference"in t&&(r={...t.reference,...t}),new yae(r,this.generation)}testClass(t){return new XCt(t,this.generation)}annotation(t){return new Ohe(t,this.generation)}annotationGroup(t){return new UCt(t,this.generation)}instantiateClass(t){return new CCt(t,this.generation)}invokeMethod(t){return new OCt(t,this.generation)}codeblock(t){return new QRe(t,this.generation)}code(){return new zRe({},this.generation)}anonymousFunction(t){return new VCt(t)}parameter(t){return new _K(t,this.generation)}interface_(t){return new YCt(t,this.generation)}enum_(t){return new JCt(t,this.generation)}dictionary(t){return new wCt(t,this.generation)}list(t){return new TCt(t,this.generation)}readOnlyMemory(t){return new BCt(t,this.generation)}set(t){return new PCt(t,this.generation)}switch_(t){return new qCt(t,this.generation)}ternary(t){return new GCt(t,this.generation)}and(t){return new LCt(t,this.generation)}or(t){return new _Ct(t,this.generation)}enumInstantiation(t){return new SCt(t,this.generation)}string_(t){return new DCt(t,this.generation)}xmlDocBlock(t){return new LRe(t,this.generation)}InstantiatedPrimitive={string:t=>new aP({type:"string",value:t},this.generation),boolean:t=>new aP({type:"boolean",value:t},this.generation),integer:t=>new aP({type:"integer",value:t},this.generation),long:t=>new aP({type:"long",value:t},this.generation),uint:t=>new aP({type:"uint",value:t},this.generation),ulong:t=>new aP({type:"ulong",value:t},this.generation),float:t=>new aP({type:"float",value:t},this.generation),double:t=>new aP({type:"double",value:t},this.generation),date:t=>new aP({type:"date",value:t},this.generation),dateTime:(t,r=!0)=>new aP({type:"dateTime",value:t,parse:r},this.generation),uuid:t=>new aP({type:"uuid",value:t},this.generation),null:()=>new aP({type:"null"},this.generation)};Literal={class_:({reference:t,fields:r})=>new wl.Class_(t,r,this.generation),dictionary:({keyType:t,valueType:r,entries:n})=>new wl.Dictionary(t,r,n,this.generation),list:({valueType:t,values:r})=>new wl.List(t,r,this.generation),set:({valueType:t,values:r})=>new wl.Set(t,r,this.generation),boolean:t=>new wl.Boolean(t,this.generation),float:t=>new wl.Float(t,this.generation),date:t=>new wl.Date(t,this.generation),datetime:t=>new wl.DateTime(t,this.generation),decimal:t=>new wl.Decimal(t,this.generation),double:t=>new wl.Double(t,this.generation),integer:t=>new wl.Integer(t,this.generation),long:t=>new wl.Long(t,this.generation),uint:t=>new wl.Uint(t,this.generation),ulong:t=>new wl.Ulong(t,this.generation),reference:t=>new wl.Reference(t,this.generation),string:t=>new wl.String(t,this.generation),null:()=>new wl.Null(this.generation),nop:()=>new wl.Nop(this.generation),unknown:t=>new wl.Unknown(t,this.generation)};xmlDocBlockOf(t){return t instanceof LRe?t:new LRe(t,this.generation)}VALID_READ_ONLY_MEMORY_TYPES=new Set(["int","long","uint","ulong","string","bool","float","double"]);validateReadOnlyMemoryTypes(){for(let t of this.generation.settings.readOnlyMemoryTypes)if(!this.VALID_READ_ONLY_MEMORY_TYPES.has(t))throw new Error(`Type "${t}" is not a valid 'read-only-memory-types' custom config option; expected one of ${JSON.stringify(this.VALID_READ_ONLY_MEMORY_TYPES)}.`)}};function vu(e){let t={},r={};for(let[n,i]of Object.entries(e))i.length===0?Object.defineProperty(r,n,{get(){return n in t||(t[n]=i()),t[n]},enumerable:!0,configurable:!0}):r[n]=i;return r}var JAi=class{generation;constructor(t){this.generation=t}get csharp(){return this.generation.csharp}System=vu({Action:t=>this.csharp.classReference({name:"Action",namespace:"System",generics:t||void 0,multipartMethodName:null,multipartMethodNameForCollection:null,isReferenceType:!0}),Func:(t,r)=>this.csharp.classReference({name:"Func",namespace:"System",generics:t?r?[...t,r]:t:r?[r]:void 0,multipartMethodName:null,multipartMethodNameForCollection:null,isReferenceType:!0}),DateOnly:()=>this.csharp.classReference({name:"DateOnly",namespace:"System"}),DateTime:()=>this.csharp.classReference({name:"DateTime",namespace:"System"}),Enum:()=>this.csharp.classReference({name:"Enum",namespace:"System"}),Exception:()=>this.csharp.classReference({name:"Exception",namespace:"System"}),ReadOnlyMemory:t=>this.csharp.classReference({name:"ReadOnlyMemory",namespace:"System",generics:[t]}),Serializable:()=>this.csharp.classReference({name:"SerializableAttribute",namespace:"System"}),String:()=>this.csharp.classReference({name:"String",namespace:"System"}),Type:()=>this.csharp.classReference({name:"Type",namespace:"System",isReferenceType:!0,multipartMethodName:null,multipartMethodNameForCollection:null,fullyQualified:!0}),TimeSpan:()=>this.csharp.classReference({name:"TimeSpan",namespace:"System"}),Uri:()=>this.csharp.classReference({name:"Uri",namespace:"System"}),UriBuilder:()=>this.csharp.classReference({name:"UriBuilder",namespace:"System"}),Runtime:()=>vu({Serialization:()=>vu({EnumMember:()=>this.csharp.classReference({name:"EnumMemberAttribute",namespace:"System.Runtime.Serialization"})})}),Collections:()=>vu({Generic:()=>vu({IAsyncEnumerable:t=>this.csharp.classReference({name:"IAsyncEnumerable",namespace:"System.Collections.Generic",generics:t?[t]:void 0}),IEnumerable:t=>this.csharp.classReference({name:"IEnumerable",namespace:"System.Collections.Generic",generics:t?[t]:void 0}),KeyValuePair:(t,r)=>this.csharp.classReference({name:"KeyValuePair",namespace:"System.Collections.Generic",generics:t&&r?[t,r]:void 0}),List:t=>this.csharp.classReference({name:"List",namespace:"System.Collections.Generic",generics:t?[t]:void 0,isCollection:!0}),HashSet:t=>this.csharp.classReference({name:"HashSet",namespace:"System.Collections.Generic",generics:t?[t]:void 0,isCollection:!0}),Dictionary:(t,r)=>this.csharp.classReference({name:"Dictionary",namespace:"System.Collections.Generic",generics:t&&r?[t,r]:void 0,isCollection:!0}),IDictionary:(t,r)=>this.csharp.classReference({name:"IDictionary",namespace:"System.Collections.Generic",generics:[t,r]})}),Linq:()=>vu({Enumerable:()=>this.csharp.classReference({name:"Enumerable",namespace:"System.Linq"})})}),Globalization:()=>vu({DateTimeStyles:()=>this.csharp.classReference({name:"DateTimeStyles",namespace:"System.Globalization"})}),Linq:()=>vu({Enumerable:()=>this.csharp.classReference({name:"Enumerable",namespace:"System.Linq"})}),Net:()=>vu({Http:()=>vu({HttpClient:()=>this.csharp.classReference({name:"HttpClient",namespace:"System.Net.Http"}),HttpMethod:()=>this.csharp.classReference({name:"HttpMethod",namespace:"System.Net.Http"}),HttpResponseHeaders:()=>this.csharp.classReference({name:"HttpResponseHeaders",namespace:"System.Net.Http.Headers"})}),ServerSentEvents:()=>vu({SseEvent:()=>this.csharp.classReference({name:"SseEvent",namespace:"System.Net.ServerSentEvents"}),SseParser:()=>this.csharp.classReference({name:"SseParser",namespace:"System.Net.ServerSentEvents"})}),WebSockets:()=>vu({ClientWebSocketOptions:()=>this.csharp.classReference({name:"ClientWebSocketOptions",namespace:"System.Net.WebSockets"})})}),IO:()=>vu({MemoryStream:()=>this.csharp.classReference({name:"MemoryStream",namespace:"System.IO"}),Stream:()=>this.csharp.classReference({name:"Stream",namespace:"System.IO"}),StreamReader:()=>this.csharp.classReference({name:"StreamReader",namespace:"System.IO"})}),Text:()=>vu({Encoding:()=>this.csharp.classReference({name:"Encoding",namespace:"System.Text"}),Encoding_UTF8:()=>this.csharp.classReference({name:"UTF8",enclosingType:this.csharp.classReference({name:"Encoding",namespace:"System.Text"})}),Json:()=>vu({JsonElement:()=>this.csharp.classReference({name:"JsonElement",namespace:"System.Text.Json"}),JsonDocument:()=>this.csharp.classReference({name:"JsonDocument",namespace:"System.Text.Json"}),JsonException:()=>this.csharp.classReference({name:"JsonException",namespace:"System.Text.Json"}),Utf8JsonReader:()=>this.csharp.classReference({name:"Utf8JsonReader",namespace:"System.Text.Json"}),JsonSerializerOptions:()=>this.csharp.classReference({name:"JsonSerializerOptions",namespace:"System.Text.Json"}),JsonSerializer:()=>this.csharp.classReference({name:"JsonSerializer",namespace:"System.Text.Json"}),Utf8JsonWriter:()=>this.csharp.classReference({name:"Utf8JsonWriter",namespace:"System.Text.Json"}),Nodes:()=>vu({JsonNode:()=>this.csharp.classReference({name:"JsonNode",namespace:"System.Text.Json.Nodes"}),JsonObject:()=>this.csharp.classReference({name:"JsonObject",namespace:"System.Text.Json.Nodes"})}),Serialization:()=>vu({IJsonOnDeserialized:()=>this.csharp.classReference({name:"IJsonOnDeserialized",namespace:"System.Text.Json.Serialization"}),IJsonOnSerializing:()=>this.csharp.classReference({name:"IJsonOnSerializing",namespace:"System.Text.Json.Serialization"}),JsonOnDeserializedAttribute:()=>this.csharp.classReference({name:"JsonOnDeserializedAttribute",namespace:"System.Text.Json.Serialization"}),JsonExtensionData:()=>this.csharp.classReference({name:"JsonExtensionDataAttribute",namespace:"System.Text.Json.Serialization"}),JsonConverter:t=>this.csharp.classReference({name:"JsonConverter",namespace:"System.Text.Json.Serialization",generics:t?[t]:void 0}),JsonIgnore:()=>this.csharp.classReference({name:"JsonIgnoreAttribute",namespace:"System.Text.Json.Serialization"}),JsonPropertyName:()=>this.csharp.classReference({name:"JsonPropertyNameAttribute",namespace:"System.Text.Json.Serialization"})})})}),Threading:()=>vu({CancellationToken:()=>this.csharp.classReference({name:"CancellationToken",namespace:"System.Threading"}),Tasks:()=>vu({Task:t=>this.csharp.classReference({name:"Task",namespace:"System.Threading.Tasks",generics:t?[t]:void 0}),ValueTask:t=>this.csharp.classReference({name:"ValueTask",namespace:"System.Threading.Tasks",generics:t?[t]:void 0})})}),ComponentModel:()=>vu({INotifyPropertyChanged:()=>this.csharp.classReference({name:"INotifyPropertyChanged",namespace:"System.ComponentModel"}),PropertyChangedEventHandler:()=>this.csharp.classReference({name:"PropertyChangedEventHandler",namespace:"System.ComponentModel"})}),IAsyncDisposable:()=>this.csharp.classReference({name:"IAsyncDisposable",namespace:"System"}),IDisposable:()=>this.csharp.classReference({name:"IDisposable",namespace:"System"})});NUnit=vu({Framework:()=>vu({TestFixture:()=>this.csharp.classReference({name:"TestFixture",namespace:"NUnit.Framework"}),Test:()=>this.csharp.classReference({name:"Test",namespace:"NUnit.Framework"}),OneTimeTearDown:()=>this.csharp.classReference({name:"OneTimeTearDown",namespace:"NUnit.Framework"}),OneTimeSetUp:()=>this.csharp.classReference({name:"OneTimeSetUp",namespace:"NUnit.Framework"}),SetUpFixture:()=>this.csharp.classReference({name:"SetUpFixture",namespace:"NUnit.Framework"}),Parallelizable:()=>this.csharp.classReference({name:"Parallelizable",namespace:"NUnit.Framework"})})});OneOf=vu({OneOf:t=>this.csharp.classReference({name:"OneOf",namespace:"OneOf",generics:t}),OneOfBase:t=>this.csharp.classReference({name:"OneOfBase",namespace:"OneOf",generics:t})});Google=vu({Protobuf:()=>vu({ByteString:()=>this.csharp.classReference({name:"ByteString",namespace:"Google.Protobuf"}),WellKnownTypes:()=>vu({Struct:()=>this.csharp.classReference({name:"Struct",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"}),Value:()=>this.csharp.classReference({name:"Value",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"}),ListValue:()=>this.csharp.classReference({name:"ListValue",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"}),Timestamp:()=>this.csharp.classReference({name:"Timestamp",namespace:"Google.Protobuf.WellKnownTypes",namespaceAlias:"WellKnownProto"})})})});WireMock=vu({Server:()=>this.csharp.classReference({name:"WireMockServer",namespace:"WireMock.Server"}),WireMockServerSettings:()=>this.csharp.classReference({name:"WireMockServerSettings",namespace:"WireMock.Settings"}),WireMockConsoleLogger:()=>this.csharp.classReference({name:"WireMockConsoleLogger",namespace:"WireMock.Logging"})});Grpc=vu({Core:()=>vu({RpcException:()=>this.csharp.classReference({name:"RpcException",namespace:"Grpc.Core"})})})};var XRs=new Set(["name","camelCase","snakeCase","screamingSnakeCase","pascalCase"]);function i6g(e,t){return XRs.has(t)?e??"":e?`${e}.${t}`:t}var YAi=class{generation;indexByObject=new Map;indexByPath=new Map;explicitByObject=new Map;explicitByPath=new Map;root;ir;get csharp(){return this.generation.csharp}get registry(){return this.generation.registry}constructor(t,r){this.generation=r,this.root=this.createIndex(t),this.ir=t}createIndex(t,r="",n){let i=i6g(n?.jsonPath,r);if(this.indexByPath.has(i)){n||oI(`Parent provenance not found for node: ${JSON.stringify(t).substring(0,100)}`),this.indexByObject.set(t,n);let s=XRs.has(r);for(let[a,c]of Object.entries(t))typeof c=="object"&&c!==null&&(s&&XRs.has(a)?this.indexByObject.set(c,n):this.createIndex(c,a,n));return n}let o={jsonPath:i,name:r,node:t,parent:n};this.indexByObject.set(t,o),this.indexByPath.set(i,o);for(let[s,a]of Object.entries(t))typeof a=="object"&&a!==null&&this.createIndex(a,s,o);return o}staticExplicit(t){return this.explicit(this.ir,t)}explicit(t,r){let n=this.provenance(t)??oI(`Provenance not found for node: ${JSON.stringify(t).substring(0,100)}`),i={...n,jsonPath:`${n.jsonPath}+${r}`,name:r,node:n.node,parent:n,explicit:!0},o=this.explicitByObject.get(n.node);return o?o.add(i):this.explicitByObject.set(n.node,new Set([i])),this.explicitByPath.set(i.jsonPath,i),i}provenance(t){if(t!==void 0)return Da.string(t)?this.explicitByPath.get(t)??this.indexByPath.get(t):Da.Provenance(t)?this.explicitByPath.get(t.jsonPath)??this.indexByPath.get(t.jsonPath):this.indexByObject.get(t)}origin(t){let r=this.provenance(t);return r?.explicit?r:r?.node}irNode(t){return this.provenance(t)?.node}jsonPath(t){return this.provenance(t)?.jsonPath}getEnumValueName(t,r){let n=Da.IR.ExampleEnumType(r)?r.value:r,i=t.values.find(o=>this.nameEquals(o.name,n));return i?this.getPropertyNameFor(i):oI(`Unexpected - can't find enum value ${JSON.stringify(n)} in enum`)}getPropertyNameFor(t){let r=this.registry.getFieldNameByOrigin(t);if(r)return r;if(Da.Provenance(t))return t.name;if("name"in t){if(Da.IR.NameAndWireValue(t.name))return this.generation.case.pascalSafe(t.name);if(Da.IR.Name(t.name))return this.generation.case.pascalSafe(t.name);if(typeof t.name=="string")return this.generation.case.pascalSafe(t.name)}if("pascalCase"in t)return this.generation.case.pascalSafe(t);throw new Error(`Unknown property type: ${this.jsonPath(t)}`)}getClassNameFor(t){if(Da.Provenance(t))return t.name;if("name"in t){if(Da.IR.TypeDeclaration(t))return this.generation.case.pascalSafe(t.name.name);if(Da.IR.NameAndWireValue(t.name))return this.generation.case.pascalSafe(t.name);if(Da.IR.Name(t.name))return this.generation.case.pascalSafe(t.name);if(typeof t.name=="string")return this.generation.case.pascalSafe(t.name)}if("pascalCase"in t)return this.generation.case.pascalSafe(t);throw new Error(`Unknown property type: ${JSON.stringify(t)}`)}nameEquals(t,r){return this.generation.case.camelSafe(t)===this.generation.case.camelSafe(r)}dereferenceType(t){let r=Da.string(t)?t:Da.IR.NamedType(t)||Da.IR.DeclaredTypeName(t)?t.typeId:Da.IR.ExampleNamedType(t)?t.typeName.typeId:t.name.typeId,n=this.irNode(this.ir.types[r]);if(Da.IR.TypeDeclaration(n))return{typeId:r,typeDeclaration:n};oI(`dereferenceType: typeId ${r} not resolved.`)}};function XAi(...e){return e.filter(Boolean).join("/")}var OJt=class{intermediateRepresentation;apiName;customConfig;generatorConfig;support;constructor(t,r,n,i,o={makeRelativeFilePath:s=>s,makeAbsoluteFilePath:s=>s,getNamespaceForTypeId:s=>"",getDirectoryForTypeId:s=>"",getCoreAsIsFiles:()=>[],getCoreTestAsIsFiles:()=>[],getPublicCoreAsIsFiles:()=>[],getAsyncCoreAsIsFiles:()=>[],getChildNamespaceSegments:s=>[]}){this.intermediateRepresentation=t,this.apiName=r,this.customConfig=n,this.generatorConfig=i,this.support=o;let s=Da.IR.IntermediateRepresentation(t)?t.casingsConfig:void 0;this.case=new WKt({generationLanguage:"csharp",keywords:s?.keywords,smartCasing:s?.smartCasing??!0}),this.model=new YAi(t,this),this.ir=Da.IR.IntermediateRepresentation(t)?t:{},this.dir=Da.DynamicIR.DynamicIntermediateRepresentation(t)?t:{}}ir;dir;csharp=new KAi(this);registry=new $Ct(this);model;case;extern=new JAi(this);settings=vu({namespace:()=>this.customConfig.namespace??jAi(QAi(`${this.generatorConfig.organization}_${this.apiName}`)),readOnlyMemoryTypes:()=>this.customConfig["read-only-memory-types"]??[],simplifyObjectDictionaries:()=>this.customConfig["simplify-object-dictionaries"]??!1,useFullyQualifiedNamespaces:()=>this.customConfig["experimental-fully-qualified-namespaces"]??!1,useDotnetFormat:()=>this.customConfig["experimental-dotnet-format"]??!1,enableWebsockets:()=>this.customConfig["experimental-enable-websockets"]??!1,enableReadonlyConstants:()=>this.customConfig["experimental-readonly-constants"]??!1,generateLiterals:()=>this.customConfig["generate-literals"]??this.customConfig["experimental-readonly-constants"]??!1,enableExplicitNullableOptional:()=>this.customConfig["experimental-explicit-nullable-optional"]??!1,useDefaultRequestParameterValues:()=>this.customConfig["use-default-request-parameter-values"]??!1,redactResponseBodyOnError:()=>this.customConfig["redact-response-body-on-error"]??!1,enableInlineTypes:()=>this.customConfig["enable-inline-types"]??!1,temporaryWebsocketEnvironments:()=>this.customConfig["temporary-websocket-environments"]??{},baseApiExceptionClassName:()=>this.customConfig["base-api-exception-class-name"]??"",baseExceptionClassName:()=>this.customConfig["base-exception-class-name"]??"",shouldGeneratedDiscriminatedUnions:()=>this.customConfig["use-discriminated-unions"]??!0,shouldGenerateUndiscriminatedUnions:()=>this.customConfig["use-undiscriminated-unions"]??!1,dedupeUnionBaseProperties:()=>this.customConfig["dedupe-union-base-properties"]??!1,exportedClientClassName:()=>this.customConfig["exported-client-class-name"]??"",clientClassName:()=>this.customConfig["client-class-name"]??"",rootNamespaceForCoreClasses:()=>this.customConfig["root-namespace-for-core-classes"]??!0,packageId:()=>this.customConfig["package-id"]??"",isForwardCompatibleEnumsEnabled:()=>this.customConfig["enable-forward-compatible-enums"]??this.customConfig["experimental-enable-forward-compatible-enums"]??!0,websocketEnvironments:()=>this.customConfig["temporary-websocket-environments"]??{},customPagerName:()=>this.customConfig["custom-pager-name"]??"",usePageIndexSemantics:()=>this.customConfig["offset-semantics"]==="page-index",environmentClassName:()=>this.customConfig["environment-class-name"]??"",generateErrorTypes:()=>this.customConfig["generate-error-types"]??!0,shouldInlinePathParameters:()=>this.customConfig["inline-path-parameters"]??!0,includeExceptionHandler:()=>this.customConfig["include-exception-handler"]??!1,exceptionInterceptorClassName:()=>this.customConfig["exception-interceptor-class-name"]??"",shouldGenerateMockServerTests:()=>this.customConfig["generate-mock-server-tests"]??this.customConfig["enable-wire-tests"]??!0,rootClientAccess:()=>this.customConfig["root-client-class-access"]=="internal"?JC.Internal:JC.Public,extraDependencies:()=>this.customConfig["extra-dependencies"]??{},omitFernHeaders:()=>this.customConfig["omit-fern-headers"]??!1,preferExplicitAuth:()=>this.customConfig["prefer-explicit-auth"]??!1,includePlatformHeaders:()=>this.customConfig["include-platform-headers"]??!1,allowUserAgentAppInfo:()=>this.customConfig["allow-user-agent-app-info"]??!1,userAgentNameFromPackage:()=>this.customConfig["user-agent-name-from-package"]??!1,unifiedClientOptions:()=>this.customConfig["unified-client-options"]??!1,serverUrlVariables:()=>this.customConfig["server-url-variables"]??!0,pascalCaseEnvironments:()=>this.customConfig["pascal-case-environments"]??!0,slnFormat:()=>this.customConfig["sln-format"]??"slnx",explicitNamespaces:()=>this.customConfig["explicit-namespaces"]===!0,maxRetries:()=>this.customConfig.maxRetries,retryStatusCodes:()=>this.customConfig.retryStatusCodes??"legacy",defaultTimeoutInMilliseconds:()=>{let t=this.customConfig["default-timeout-in-milliseconds"];if(t!=null)return t;let r=this.customConfig["default-timeout-in-seconds"];if(r!=null)return r==="infinity"?"infinity":r*1e3},outputPath:()=>{let t=this.customConfig["output-path"];return t==null?{library:"src",test:"src",solution:".",other:"."}:typeof t=="string"?{library:t,test:t,solution:".",other:"."}:{library:t.library??"src",test:t.test??"src",solution:t.solution??".",other:t.other??"."}}});constants={folders:vu({mockServerTests:()=>this.support.makeRelativeFilePath("Unit/MockServer"),types:()=>"Types",exceptions:()=>"Exceptions",src:()=>"src",protobuf:()=>"proto",serializationTests:()=>this.support.makeRelativeFilePath("Unit/Serialization"),project:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.sourceFiles,this.support.makeRelativeFilePath(this.names.files.project))),sourceFiles:()=>this.support.makeRelativeFilePath(this.constants.folders.src),coreFiles:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.project,this.support.makeRelativeFilePath(this.constants.defaults.core))),publicCoreFiles:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.project,this.support.makeRelativeFilePath(this.constants.defaults.core),this.support.makeRelativeFilePath(this.constants.defaults.publicCore))),testFiles:()=>this.support.makeRelativeFilePath(XAi(this.constants.folders.sourceFiles,this.support.makeRelativeFilePath(this.names.files.testProject)))}),formatting:vu({indent:()=>" "}),defaults:vu({core:()=>"Core",publicCore:()=>"Public",version:()=>"0.0.0"})};namespaces=vu({root:()=>this.settings.namespace,core:()=>`${this.namespaces.root}.Core`,qualifiedRoot:()=>this.qualifyNamespace(this.namespaces.root),qualifiedCore:()=>this.qualifyNamespace(this.namespaces.core),test:()=>this.registry.canonicalizeNamespace(`${this.namespaces.root}.Test`),testUtils:()=>`${this.namespaces.test}.Utils`,mockServerTest:()=>`${this.namespaces.test}.Unit.MockServer`,publicCore:()=>this.namespaces.root,webSocketsCore:()=>`${this.namespaces.core}.WebSockets`,publicCoreTest:()=>`${this.namespaces.root}.Test.PublicCore`,asIsTestUtils:()=>`${this.namespaces.root}.Test.Utils`,publicCoreClasses:()=>this.settings.rootNamespaceForCoreClasses?this.namespaces.root:this.namespaces.core,implicit:()=>new Set(["System","System.Collections.Generic","System.IO","System.Linq","System.Threading","System.Threading.Tasks","System.Net.Http"])});names={classes:vu({baseApiException:()=>this.settings.baseApiExceptionClassName||`${this.names.project.clientPrefix}ApiException`,baseException:()=>this.settings.baseExceptionClassName||`${this.names.project.clientPrefix}Exception`,rootClient:()=>this.settings.clientClassName||`${this.names.project.clientPrefix}Client`,rootClientForSnippets:()=>this.settings.exportedClientClassName||this.names.classes.rootClient,customPager:()=>this.settings.customPagerName||`${this.names.project.packageId.replace(/[^a-zA-Z0-9]/g,"")}Pager`,environment:()=>this.settings.environmentClassName||`${this.names.project.clientPrefix}Environment`,exceptionInterceptor:()=>this.settings.exceptionInterceptorClassName||`${this.names.project.packageId.replace(/[^a-zA-Z0-9]/g,"")}ExceptionInterceptor`}),project:vu({client:()=>jAi(QAi(`${this.generatorConfig.organization}_${this.generatorConfig.workspaceName}`)),clientPrefix:()=>this.settings.exportedClientClassName||this.settings.clientClassName||this.names.project.client,packageId:()=>this.settings.packageId||krp(this.ir)?.packageName||this.namespaces.root}),files:vu({project:()=>this.namespaces.root,testProject:()=>`${this.namespaces.root}.Test`}),methods:vu({mockOauth:()=>"MockOAuthEndpoint",mockInferredAuth:()=>"MockInferredAuthEndpoint",getAccessTokenAsync:()=>"GetAccessTokenAsync",getAuthHeadersAsync:()=>"GetAuthHeadersAsync"}),variables:vu({client:()=>"client",response:()=>"response",httpRequest:()=>"httpRequest",sendRequest:()=>"sendRequest",responseBody:()=>"responseBody",query:()=>"_query",headers:()=>"_headers"}),parameters:vu({cancellationToken:()=>"cancellationToken",requestOptions:()=>"options",idempotentOptions:()=>"options"})};Types=vu({Arbitrary:t=>new md.ArbitraryType(t,this),HttpMethodExtensions:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("HttpMethodExtensions")}),FormRequest:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("FormRequest")}),Optional:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("Optional")}),ClientOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("ClientOptions"),namespace:this.namespaces.publicCoreClasses}),AppInfo:()=>this.csharp.classReference({origin:this.model.staticExplicit("AppInfo"),namespace:this.namespaces.publicCoreClasses}),RawClient:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("RawClient")}),RequestOptions:()=>this.csharp.classReference({namespace:this.namespaces.publicCoreClasses,origin:this.model.staticExplicit("RequestOptions")}),RequestOptionsInterface:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("IRequestOptions")}),JsonRequest:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("JsonRequest")}),Version:()=>this.csharp.classReference({namespace:this.namespaces.publicCore,origin:this.model.staticExplicit("Version")}),ValueConvert:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("ValueConvert")}),FileParameter:()=>this.csharp.classReference({namespace:this.namespaces.publicCore,origin:this.model.staticExplicit("FileParameter"),multipartMethodName:"AddFileParameterPart",multipartMethodNameForCollection:"AddFileParameterParts",isReferenceType:!0}),DefaultHttpClientFactory:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("DefaultHttpClientFactory")}),Headers:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("Headers")}),HeaderValue:()=>this.csharp.classReference({namespace:this.namespaces.core,origin:this.model.staticExplicit("HeaderValue")}),RootClient:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.rootClient),namespace:this.namespaces.root}),RootClientForSnippets:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.rootClientForSnippets),namespace:this.namespaces.root}),BaseApiException:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.baseApiException),namespace:this.namespaces.publicCoreClasses}),BaseException:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.baseException),namespace:this.namespaces.publicCoreClasses}),ExceptionInterceptor:()=>this.csharp.classReference({origin:this.model.staticExplicit("IExceptionInterceptor"),namespace:this.namespaces.core}),ExceptionHandler:()=>this.csharp.classReference({origin:this.model.staticExplicit("ExceptionHandler"),namespace:this.namespaces.core}),CustomExceptionInterceptor:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.exceptionInterceptor),namespace:this.namespaces.core}),ProtoAnyMapper:()=>this.csharp.classReference({origin:this.model.staticExplicit("ProtoAnyMapper"),namespace:this.namespaces.core}),Constants:()=>this.csharp.classReference({origin:this.model.staticExplicit("Constants"),namespace:this.namespaces.core}),DateTimeSerializer:()=>this.csharp.classReference({origin:this.model.staticExplicit("DateTimeSerializer"),namespace:this.namespaces.core}),JsonUtils:()=>this.csharp.classReference({origin:this.model.staticExplicit("JsonUtils"),namespace:this.namespaces.core}),JsonAssert:()=>this.csharp.classReference({origin:this.model.staticExplicit("JsonAssert"),namespace:this.namespaces.testUtils}),CustomPagerFactory:()=>this.csharp.classReference({origin:this.model.staticExplicit(`${this.names.classes.customPager}Factory`),namespace:this.namespaces.core}),CustomPagerContext:()=>this.csharp.classReference({origin:this.model.staticExplicit(`${this.names.classes.customPager}Context`),namespace:this.namespaces.core}),Environments:()=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.environment),namespace:this.namespaces.publicCoreClasses}),TestClient:()=>this.csharp.classReference({origin:this.model.staticExplicit("TestClient"),namespace:this.namespaces.test}),BaseMockServerTest:()=>this.csharp.classReference({origin:this.model.staticExplicit("BaseMockServerTest"),namespace:this.namespaces.mockServerTest}),IdempotentRequestOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("IdempotentRequestOptions"),namespace:this.namespaces.publicCoreClasses}),IdempotentRequestOptionsInterface:()=>this.csharp.classReference({origin:this.model.staticExplicit("IIdempotentRequestOptions"),namespace:this.namespaces.core}),IStringEnum:()=>this.csharp.classReference({origin:this.model.staticExplicit("IStringEnum"),namespace:this.namespaces.core}),WebSocketClient:()=>this.csharp.classReference({origin:this.model.staticExplicit("WebSocketClient"),namespace:this.namespaces.webSocketsCore}),QueryBuilder:()=>this.csharp.classReference({origin:this.model.staticExplicit("Query"),namespace:this.namespaces.webSocketsCore}),QueryStringBuilder:()=>this.csharp.classReference({origin:this.model.staticExplicit("QueryStringBuilder"),namespace:this.namespaces.core}),QueryStringBuilderBuilder:()=>this.csharp.classReference({origin:this.model.staticExplicit("QueryStringBuilder.Builder"),namespace:this.namespaces.core}),OAuthTokenProvider:()=>this.csharp.classReference({origin:this.model.staticExplicit("OAuthTokenProvider"),namespace:this.namespaces.core}),InferredAuthTokenProvider:()=>this.csharp.classReference({origin:this.model.staticExplicit("InferredAuthTokenProvider"),namespace:this.namespaces.core}),ProtoConverter:()=>this.csharp.classReference({origin:this.model.staticExplicit("ProtoConverter"),namespace:this.namespaces.core}),RawGrpcClient:()=>this.csharp.classReference({origin:this.model.staticExplicit("RawGrpcClient"),namespace:this.namespaces.core}),Extensions:()=>this.csharp.classReference({origin:this.model.staticExplicit("Extensions"),namespace:this.namespaces.core}),GrpcRequestOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("GrpcRequestOptions"),namespace:this.namespaces.root}),GrpcChannelOptions:()=>this.csharp.classReference({origin:this.model.staticExplicit("GrpcChannelOptions"),namespace:"Grpc.Net.Client"}),StringEnum:t=>this.csharp.classReference({origin:this.model.staticExplicit("StringEnum"),namespace:this.namespaces.core,generics:t?[t]:void 0}),WebSocketEvent:t=>this.csharp.classReference({origin:this.model.staticExplicit("Event"),namespace:this.namespaces.webSocketsCore,generics:[t]}),ConnectionStatus:()=>this.csharp.classReference({origin:this.model.staticExplicit("ConnectionStatus"),namespace:this.namespaces.webSocketsCore}),WebSocketConnected:()=>this.csharp.classReference({origin:this.model.staticExplicit("Connected"),namespace:this.namespaces.webSocketsCore}),WebSocketClosed:()=>this.csharp.classReference({origin:this.model.staticExplicit("Closed"),namespace:this.namespaces.webSocketsCore}),ReconnectionInfo:()=>this.csharp.classReference({origin:this.model.staticExplicit("ReconnectionInfo"),namespace:this.namespaces.webSocketsCore}),CustomPagerClass:t=>this.csharp.classReference({origin:this.model.staticExplicit(this.names.classes.customPager),namespace:this.namespaces.core,generics:[t]}),Pager:t=>this.csharp.classReference({origin:this.model.staticExplicit("Pager"),namespace:this.namespaces.core,generics:[t]}),OffsetPager:({requestType:t,requestOptionsType:r,responseType:n,offsetType:i,stepType:o,itemType:s})=>this.csharp.classReference({origin:this.model.staticExplicit("OffsetPager"),namespace:this.namespaces.core,generics:[t,r,n,i,o,s]}),CursorPager:({requestType:t,requestOptionsType:r,responseType:n,cursorType:i,itemType:o})=>this.csharp.classReference({origin:this.model.staticExplicit("CursorPager"),namespace:this.namespaces.core,generics:[t,r,n,i,o]}),CollectionItemSerializer:(t,r)=>this.csharp.classReference({origin:this.model.staticExplicit("CollectionItemSerializer"),namespace:this.namespaces.core,generics:[t,r]}),OneOfSerializer:t=>this.csharp.classReference({origin:this.model.staticExplicit("OneOfSerializer"),namespace:this.namespaces.core,generics:[t]}),AdditionalProperties:t=>this.csharp.classReference({origin:this.model.staticExplicit("AdditionalProperties"),namespace:this.namespaces.publicCore,generics:t?[t]:void 0}),ReadOnlyAdditionalProperties:t=>this.csharp.classReference({origin:this.model.staticExplicit("ReadOnlyAdditionalProperties"),namespace:this.namespaces.publicCore,generics:t?[t]:void 0})});Primitive=vu({string:()=>new md.String(this),boolean:()=>new md.Boolean(this),integer:()=>new md.Integer(this),long:()=>new md.Long(this),uint:()=>new md.Uint(this),ulong:()=>new md.ULong(this),float:()=>new md.Float(this),double:()=>new md.Double(this),object:()=>new md.Object(this)});Value=vu({binary:()=>new e4.Binary(this),dateOnly:()=>new e4.DateOnly(this),dateTime:()=>new e4.DateTime(this),uuid:()=>new e4.Uuid(this),stringEnum:t=>new e4.StringEnum(t,this)});Collection=vu({array:t=>new tO.Array(t,this),listType:t=>new tO.ListType(t,this),list:t=>new tO.List(t,this),set:t=>new tO.Set(t,this),map:(t,r,n)=>new tO.Map(t,r,this,n),idictionary:(t,r,n)=>new tO.IDictionary(t,r,this,n),keyValuePair:(t,r)=>new tO.KeyValuePair(t,r,this)});format=vu({private:t=>`_${zAi.camelCase(t)}`});initialize(){return this.initializers.implicitNamespaces}initializers=vu({implicitNamespaces:()=>{for(let t of this.namespaces.implicit)this.registry.addImplicitNamespace(t);return!0}});get System(){return this.extern.System}get NUnit(){return this.extern.NUnit}get OneOf(){return this.extern.OneOf}get Google(){return this.extern.Google}get Grpc(){return this.extern.Grpc}get WireMock(){return this.extern.WireMock}qualifyNamespace(t){let r=t.split(".")[0];return r&&this.registry.hasTypeNamespaceConflict(r)?`global::${t}`:t}};var GK=class{generation;constructor(t){this.generation=t}get csharp(){return this.generation.csharp}get case(){return this.generation.case}get settings(){return this.generation.settings}get constants(){return this.generation.constants}get namespaces(){return this.generation.namespaces}get names(){return this.generation.names}get model(){return this.generation.model}get format(){return this.generation.format}get registry(){return this.generation.registry}get Types(){return this.generation.Types}get System(){return this.generation.extern.System}get NUnit(){return this.generation.extern.NUnit}get OneOf(){return this.generation.extern.OneOf}get Google(){return this.generation.extern.Google}get Grpc(){return this.generation.extern.Grpc}get WireMock(){return this.generation.extern.WireMock}get Primitive(){return this.generation.Primitive}get Value(){return this.generation.Value}get Collection(){return this.generation.Collection}};kt();var ZAi=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?this.csharp.Literal.null():(this.context.errors.add({severity:Br.Critical,message:"Expected non-null value, but got null"}),this.csharp.Literal.nop());if(t.value===void 0&&!t.fallbackToDefault)return this.csharp.Literal.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value,fallbackToDefault:t.fallbackToDefault});case"literal":return this.convertLiteral({literal:t.typeReference.value,fallbackToDefault:t.forceLiteral?t.fallbackToDefault:void 0,value:t.value,forceLiteral:t.forceLiteral});case"map":return this.convertMap({map:t.typeReference,value:t.value,fallbackToDefault:t.fallbackToDefault});case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?this.csharp.Literal.nop():this.convertNamed({named:r,value:t.value,as:t.as,fallbackToDefault:t.fallbackToDefault})}case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,forceLiteral:t.forceLiteral});case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,forceLiteral:t.forceLiteral});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as,fallbackToDefault:t.fallbackToDefault});case"set":return this.convertSet({set:t.typeReference.value,value:t.value,fallbackToDefault:t.fallbackToDefault});case"unknown":return this.convertUnknown({value:t.value,fallbackToDefault:t.fallbackToDefault});default:Ee(t.typeReference)}}convertList({list:t,value:r,fallbackToDefault:n}){return Array.isArray(r)?this.csharp.Literal.list({valueType:this.context.dynamicTypeMapper.convert({typeReference:t,unboxOptionals:!0}),values:r.map((i,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:t,value:i})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Br.Critical,message:`Expected array but got: ${typeof r}`}),this.csharp.Literal.nop())}convertLiteral({literal:t,value:r,fallbackToDefault:n,forceLiteral:i}){if(this.settings.generateLiterals&&!i)return this.csharp.Literal.nop();switch(t.type){case"boolean":{let o=this.context.getValueAsBoolean({value:r});return o==null?this.csharp.Literal.nop():this.csharp.Literal.boolean(o)}case"string":{let o=this.context.getValueAsString({value:r});return o==null?n?this.Primitive.string.getDeterminsticDefault(n):this.csharp.Literal.nop():this.csharp.Literal.string(o)}default:Ee(t)}}convertSet({set:t,value:r,fallbackToDefault:n}){return Array.isArray(r)?this.csharp.Literal.set({valueType:this.context.dynamicTypeMapper.convert({typeReference:t,unboxOptionals:!0}),values:r.map((i,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:t,value:i})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Br.Critical,message:`Expected array but got: ${typeof r}`}),this.csharp.Literal.nop())}convertMap({map:t,value:r,fallbackToDefault:n}){return typeof r!="object"||r==null?(this.context.errors.add({severity:Br.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),this.csharp.Literal.nop()):this.csharp.Literal.dictionary({keyType:this.context.dynamicTypeMapper.convert({typeReference:t.key}),valueType:t.value.type==="unknown"?this.context.dynamicTypeMapper.convert({typeReference:t.value}).asOptional():this.context.dynamicTypeMapper.convert({typeReference:t.value}),entries:Object.entries(r).map(([i,o])=>{this.context.errors.scope(i);try{return{key:this.convert({typeReference:t.key,value:i,as:"key"}),value:this.convert({typeReference:t.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:r,as:n,fallbackToDefault:i}){switch(t.type){case"alias":return this.settings.generateLiterals&&t.typeReference.type==="literal"?this.csharp.Literal.reference(this.csharp.instantiateClass({classReference:this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),arguments_:[]})):this.convert({typeReference:t.typeReference,value:r,as:n,fallbackToDefault:i});case"discriminatedUnion":return this.settings.shouldGeneratedDiscriminatedUnions?this.convertDiscriminatedUnion({discriminatedUnion:t,value:r,fallbackToDefault:i}):this.convertUnknown({value:r,fallbackToDefault:i});case"enum":return this.getEnumValue(t,r);case"object":return this.convertObject({object_:t,value:r,fallbackToDefault:i});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:r,fallbackToDefault:i});default:Ee(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:r,fallbackToDefault:n}){let i=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),o=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:r});if(o==null)return this.csharp.Literal.nop();let s=o.singleDiscriminatedUnionType,a=this.getBaseProperties({discriminatedUnionTypeInstance:o,singleDiscriminatedUnionType:s});switch(s.type){case"samePropertiesAsObject":{let c=this.context.resolveNamedType({typeId:s.typeId});return c==null?this.csharp.Literal.nop():this.instantiateUnionWithBaseProperties({classReference:i,baseProperties:a,arguments_:[this.convertNamed({named:c,value:o.value})]})}case"singleProperty":{if(this.context.getRecord(o.value)==null)return this.csharp.Literal.nop();try{let u=["Value","Type"].includes(s.discriminantValue.name.pascalCase.safeName)?`${s.discriminantValue.name.pascalCase.safeName}Inner`:s.discriminantValue.name.pascalCase.safeName;return this.context.errors.scope(s.discriminantValue.wireValue),this.instantiateUnionWithBaseProperties({classReference:i,baseProperties:a,arguments_:[this.csharp.instantiateClass({classReference:this.csharp.classReference({name:u,enclosingType:i}),arguments_:[this.convert({typeReference:s.typeReference,value:s.discriminantValue.wireValue})]})]})}finally{this.context.errors.unscope()}}case"noProperties":return this.instantiateUnionWithBaseProperties({classReference:i,baseProperties:a,arguments_:[this.csharp.instantiateClass({classReference:this.csharp.classReference({origin:o.discriminantValue,enclosingType:i}),arguments_:[]})]});default:Ee(s)}}getBaseProperties({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:r}){return this.context.associateByWireValue({parameters:r.properties??[],values:this.context.getRecord(t.value)??{},ignoreMissingParameters:!0}).map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),assignment:this.convert(i)}}finally{this.context.errors.unscope()}})}instantiateUnionWithBaseProperties({classReference:t,arguments_:r,baseProperties:n}){let i=this.csharp.instantiateClass({classReference:t,arguments_:r,multiline:!0});return n.length===0?this.csharp.Literal.reference(i):this.csharp.Literal.reference(this.csharp.codeblock(o=>{o.write(i," "),o.pushScope();for(let s of n)o.write(s.name," = ",s.assignment,",");o.popScope(!1)}))}getEnumValue(t,r){if(typeof r!="string")return this.context.errors.add({severity:Br.Critical,message:`Expected enum value string, got: ${typeof r}`}),this.csharp.Literal.nop();let n=t.values.find(s=>s.wireValue===r);if(n==null)return this.context.errors.add({severity:Br.Critical,message:`An enum value named "${r}" does not exist in this context`}),this.csharp.Literal.nop();let i=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),o=i.registerField(this.model.getPropertyNameFor(n),n);return this.csharp.Literal.reference(this.csharp.enumInstantiation({reference:i,value:o}))}convertObject({object_:t,value:r,fallbackToDefault:n}){let i=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),o=this.getOmittedBasePropertyWireValues(t),s=o.size===0?t.properties:t.properties.filter(f=>!o.has(f.name.wireValue)),a=new Map;for(let f of s){let m=this.context.resolvePropertyName(i,f.name.name);a.set(f.name.wireValue,m)}let c=this.context.getRecord(r)??{},u=o.size===0?c:Object.fromEntries(Object.entries(c).filter(([f])=>!o.has(f))),p=this.context.associateByWireValue({parameters:s,values:u}).map(f=>{this.context.errors.scope(f.name.wireValue);try{return{name:a.get(f.name.wireValue)??this.context.getClassName(f.name.name),value:this.convert(f)}}finally{this.context.errors.unscope()}}),d=new Set(Object.keys(u));for(let f of s){let m=a.get(f.name.wireValue)??this.context.getClassName(f.name.name);if(d.has(f.name.wireValue)){if(this.isRequiredProperty(f.typeReference)){let g=p.find(A=>A.name===m);if(g!=null&&Da.Literal.nop(g.value)){let A=this.getDefaultLiteralForType(f.typeReference);A!=null&&(g.value=A)}}continue}if(this.isRequiredProperty(f.typeReference)){let g=this.getDefaultLiteralForType(f.typeReference);g!=null&&p.push({name:m,value:g})}}return this.csharp.Literal.class_({reference:i,fields:p})}getOmittedBasePropertyWireValues(t){return this.settings.dedupeUnionBaseProperties?new Set((t.deferredUnionBaseProperties??[]).map(r=>r.wireValue)):new Set}isRequiredProperty(t){return!(this.context.isOptional(t)||this.context.isNullable(t)||t.type==="list"||t.type==="set"||t.type==="map")}getDefaultLiteralForType(t,r){switch(t.type){case"primitive":return this.getDefaultLiteralForPrimitive(t.value);case"literal":return this.convertLiteral({literal:t.value,value:t.value.value});case"named":{let n=this.context.resolveNamedType({typeId:t.value});if(n==null)return;if(n.type==="alias")return this.getDefaultLiteralForType(n.typeReference,r);if(n.type==="enum"&&n.values.length>0){let i=n.values[0];if(i!=null)return this.getEnumValue(n,i.wireValue)}return n.type==="undiscriminatedUnion"?this.getDefaultLiteralForUndiscriminatedUnion(n,r):n.type==="object"?this.getDefaultLiteralForObject(n,t.value,r):void 0}default:return}}getDefaultLiteralForObject(t,r,n){let i=n??new Set;if(i.has(r))return;i.add(r);let o=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}),s=[];for(let a of t.properties)if(this.isRequiredProperty(a.typeReference)){let c=this.getDefaultLiteralForType(a.typeReference,i);c!=null&&s.push({name:this.context.resolvePropertyName(o,a.name.name),value:c})}return i.delete(r),this.csharp.Literal.class_({reference:o,fields:s})}getDefaultLiteralForUndiscriminatedUnion(t,r){for(let n of t.types){let i=this.getDefaultLiteralForType(n,r);if(i!=null)return i}}getDefaultLiteralForPrimitive(t){switch(t){case"INTEGER":return this.csharp.Literal.integer(0);case"LONG":return this.csharp.Literal.long(0);case"UINT":return this.csharp.Literal.uint(0);case"UINT_64":return this.csharp.Literal.ulong(0);case"FLOAT":return this.csharp.Literal.float(0);case"DOUBLE":return this.csharp.Literal.double(0);case"BOOLEAN":return this.csharp.Literal.boolean(!1);case"STRING":case"UUID":case"BASE_64":case"BIG_INTEGER":return this.csharp.Literal.string("");case"DATE":return this.csharp.Literal.date("0001-01-01");case"DATE_TIME":case"DATE_TIME_RFC_2822":return this.csharp.Literal.datetime("0001-01-01T00:00:00.000Z");default:Ee(t)}}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:r,fallbackToDefault:n}){let i=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:r});return i==null?this.csharp.Literal.nop():i.typeLiteral}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:r}){for(let n of t.types){let i=this.context.errors.size();try{let o=this.convert({typeReference:n,value:r});if(Da.Literal.nop(o)||this.context.errors.size()>i){this.context.errors.truncate(i);continue}return{valueTypeReference:n,typeLiteral:o}}catch{this.context.errors.truncate(i);continue}}this.context.errors.add({severity:Br.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:t,fallbackToDefault:r}){return this.csharp.Literal.unknown(t)}convertPrimitive({primitive:t,value:r,as:n,fallbackToDefault:i}){switch(t){case"INTEGER":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.integer.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.integer(o)}case"LONG":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.long.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.long(o)}case"UINT":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.uint.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.uint(o)}case"UINT_64":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.ulong.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.ulong(o)}case"FLOAT":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.float.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.float(o)}case"DOUBLE":{let o=this.getValueAsNumber({value:r,as:n});return o==null?i?this.Primitive.double.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.double(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:r,as:n});return o==null?i?this.Primitive.boolean.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.boolean(o)}case"STRING":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}case"DATE":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Value.dateOnly.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.date(o)}case"DATE_TIME":case"DATE_TIME_RFC_2822":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Value.dateTime.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.datetime(o)}case"UUID":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}case"BASE_64":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}case"BIG_INTEGER":{let o=this.context.getValueAsString({value:r});return o==null?i?this.Primitive.string.getDeterminsticDefault(i):this.csharp.Literal.nop():this.csharp.Literal.string(o)}default:Ee(t)}}getValueAsNumber({value:t,as:r}){let n=r==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:r}){let n=r==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};kt();var $Ai=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}convert(t){switch(t.typeReference.type){case"list":return this.Collection.list(this.convert({typeReference:t.typeReference.value,unboxOptionals:!0}));case"literal":return this.convertLiteral({literal:t.typeReference.value});case"map":return this.Collection.map(this.convert({typeReference:t.typeReference.key}),this.convert({typeReference:t.typeReference.value}));case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?this.convertUnknown():this.convertNamed({named:r,typeId:t.typeReference.value})}case"optional":case"nullable":{let r=this.convert({typeReference:t.typeReference.value});return t.unboxOptionals?r.asNonOptional():r.asOptional()}case"primitive":return this.convertPrimitive({primitive:t.typeReference.value});case"set":return this.Collection.set(this.convert({typeReference:t.typeReference.value,unboxOptionals:!0}));case"unknown":return this.convertUnknown();default:Ee(t.typeReference)}}convertToClassReference(t,r){return this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)})}convertNamed({named:t,typeId:r}){switch(t.type){case"alias":return this.settings.generateLiterals&&t.typeReference.type==="literal"?this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)}):this.convert({typeReference:t.typeReference});case"enum":case"object":return this.convertToClassReference(t,r);case"discriminatedUnion":return this.settings.shouldGeneratedDiscriminatedUnions?this.convertToClassReference(t,r):this.Primitive.object;case"undiscriminatedUnion":return this.settings.shouldGenerateUndiscriminatedUnions?this.convertToClassReference(t,r):this.OneOf.OneOf(t.types.map(n=>this.convert({typeReference:n})));default:Ee(t)}}convertLiteral({literal:t}){switch(t.type){case"boolean":return this.Primitive.boolean;case"string":return this.Primitive.string}}convertUnknown(){return this.Primitive.object}convertPrimitive({primitive:t}){switch(t){case"INTEGER":return this.Primitive.integer;case"UINT":return this.Primitive.uint;case"LONG":return this.Primitive.long;case"UINT_64":return this.Primitive.ulong;case"FLOAT":return this.Primitive.float;case"DOUBLE":return this.Primitive.double;case"BOOLEAN":return this.Primitive.boolean;case"STRING":return this.Primitive.string;case"DATE":return this.Value.dateOnly;case"DATE_TIME":case"DATE_TIME_RFC_2822":return this.Value.dateTime;case"UUID":return this.Primitive.string;case"BASE_64":return this.Primitive.string;case"BIG_INTEGER":return this.Primitive.string;default:Ee(t)}}};kt();var eyi=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}getFilePropertyInfo({body:t,value:r}){let n={fileFields:[],bodyPropertyFields:[]},i=this.context.getRecord(r)??{};for(let o of t.properties)switch(o.type){case"file":Da.Record.missingKey(i,o.wireValue)&&(i[o.wireValue]="[bytes]"),n.fileFields.push({name:this.context.getPropertyName(o.name),value:this.getSingleFileProperty({property:o,record:i})});break;case"fileArray":Da.Record.missingKey(i,o.wireValue)&&(i[o.wireValue]=["[bytes]"]),n.fileFields.push({name:this.context.getPropertyName(o.name),value:this.getArrayFileProperty({property:o,record:i})});break;case"bodyProperty":if(Da.Record.missingKey(i,o.name.wireValue))switch(o.typeReference.type){case"optional":break;case"primitive":{switch(o.typeReference.value.toLowerCase()){case"integer":{i[o.name.wireValue]=123;break}case"string":{i[o.name.wireValue]="[string]";break}case"boolean":{i[o.name.wireValue]=!0;break}case"double":{i[o.name.wireValue]=123.456;break}case"float":{i[o.name.wireValue]=123.456;break}case"long":{i[o.name.wireValue]=123456789;break}case"uint":{i[o.name.wireValue]=123;break}case"uint64":{i[o.name.wireValue]=12345;break}case"date":{i[o.name.wireValue]=new Date(2021,1,1);break}case"datetime":{i[o.name.wireValue]=new Date(2021,1,1,12,0,0);break}case"uuid":{i[o.name.wireValue]="123e4567-e89b-12d3-a456-426614174000";break}case"base64":{i[o.name.wireValue]="SGVsbG8gd29ybGQh";break}case"biginteger":{i[o.name.wireValue]="12345678901234567890";break}}break}default:break}n.bodyPropertyFields.push({name:this.context.getPropertyName(o.name.name),value:this.getBodyProperty({property:o,record:i})});break;default:Ee(o)}return n}getSingleFileProperty({property:t,record:r}){let n=this.context.getSingleFileValue({property:t,record:r});return n==null?this.csharp.Literal.nop():this.context.getFileParameterForString(n)}getArrayFileProperty({property:t,record:r}){let n=this.context.getFileArrayValues({property:t,record:r});return n==null?this.csharp.Literal.nop():this.csharp.Literal.list({valueType:this.Types.FileParameter,values:n.map(i=>this.context.getFileParameterForString(i))})}getBodyProperty({property:t,record:r}){let n=r[t.name.wireValue];return n==null?this.csharp.Literal.nop():this.context.dynamicLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var tyi=class e extends hx{ir;dynamicTypeMapper;dynamicLiteralMapper;filePropertyMapper;generation;get namespaces(){return this.generation.namespaces}get registry(){return this.generation.registry}get settings(){return this.generation.settings}get constants(){return this.generation.constants}get names(){return this.generation.names}get model(){return this.generation.model}get format(){return this.generation.format}get csharp(){return this.generation.csharp}get Types(){return this.generation.Types}get System(){return this.generation.extern.System}get NUnit(){return this.generation.extern.NUnit}get OneOf(){return this.generation.extern.OneOf}get Google(){return this.generation.extern.Google}get WireMock(){return this.generation.extern.WireMock}get Primitive(){return this.generation.Primitive}get Value(){return this.generation.Value}get Collection(){return this.generation.Collection}constructor({ir:t,config:r,options:n,generation:i}){super({ir:t,config:r,options:n}),this.ir=t,this.generation=i??new OJt(t,r.workspaceName,r.customConfig!=null?r.customConfig:{},r),this.dynamicTypeMapper=new $Ai({context:this}),this.dynamicLiteralMapper=new ZAi({context:this}),this.filePropertyMapper=new eyi({context:this})}clone(){return new e({ir:this.ir,config:this.config,options:this.options,generation:this.generation})}getFileParameterForString(t){return this.csharp.Literal.reference(this.csharp.instantiateClass({classReference:this.Types.FileParameter,arguments_:[],properties:[{name:"Stream",value:this.getMemoryStreamForString(t)}],multiline:!0}))}getMemoryStreamForString(t){return this.System.IO.MemoryStream.new({arguments_:[this.csharp.invokeMethod({on:this.System.Text.Encoding_UTF8,method:"GetBytes",arguments_:[this.csharp.Literal.string(t)]})]})}getClassName(t){return t.pascalCase.safeName}getParameterName(t){return t.camelCase.safeName}getPropertyName(t){return t.pascalCase.safeName}resolvePropertyName(t,r){let n=r.pascalCase.safeName,i=t.scope.getRedirectedFieldName(n);return i||(t.scope.isField(n)?n:t.registerField(n))}getMethodName(t){return`${t.pascalCase.safeName}Async`}getNamespace(t,r){let n=this.getNamespaceSegments(t);return n=r!=null?[...n,r]:n,[this.namespaces.root,...n].join(".")}getEnvironmentTypeReferenceFromID(t){let r=this.resolveEnvironmentName(t);if(r!=null)return this.getEnvironmentClassReferenceForEnumName(r)}getEnvironmentClassReferenceForEnumName(t){return this.csharp.classReference({name:`${this.generation.Types.Environments.name}.${this.getClassName(t)}`,namespace:this.namespaces.root})}getNamespaceSegments(t){return(this.settings.explicitNamespaces?t.allParts:t.packagePath).map(n=>n.pascalCase.safeName)}precalculate(t){this.generation.initialize(),this.System.Collections.Generic.KeyValuePair(),this.System.Collections.Generic.IEnumerable(),this.System.Collections.Generic.IAsyncEnumerable(),this.System.Collections.Generic.HashSet(),this.System.Collections.Generic.List(),this.System.Collections.Generic.Dictionary(),this.System.Threading.Tasks.Task(),Object.entries(this.ir.types).sort((r,n)=>r[0].length-n[0].length).forEach(([r,n])=>{this.dynamicTypeMapper.convertToClassReference(n,r)});for(let[r,n]of t.entries())if(this.csharp.classReference({origin:this.model.staticExplicit(`Example${r}`),namespace:"Usage"}),n.endpoint){let i=this.resolveEndpointLocation(n.endpoint);for(let o of i)switch(o.request.type){case"inlined":this.csharp.classReference({origin:o.request.declaration.name,namespace:this.getNamespace(o.request.declaration.fernFilepath)});break;case"body":break}}this.generation.Types.ClientOptions,this.generation.Types.RootClientForSnippets,this.csharp.freezeClassReferences()}};kt();Wi();var Frp="request",ryi=class extends GK{context;constructor({context:t}){super(t.generation),this.context=t}async generateSnippet({endpoint:t,request:r,options:n}){return this.buildCodeBlock({endpoint:t,snippet:r,options:n}).toString({namespace:"Examples",generation:this.generation,allNamespaceSegments:new Set,allTypeClassReferences:new Map,skipGlobalQualifier:!0})}generateSnippetSync({endpoint:t,request:r,options:n}){return this.buildCodeBlock({endpoint:t,snippet:r,options:n}).toString({namespace:"Examples",generation:this.generation,allNamespaceSegments:new Set,allTypeClassReferences:new Map,skipGlobalQualifier:!0})}async generateSnippetAst({endpoint:t,request:r,options:n}){throw new Error("Unsupported")}buildCodeBlock({endpoint:t,snippet:r,options:n}){if(t.examples&&Da.DynamicIR.EndpointExample(r)&&!t.examples.find(s=>s.id===r.id))throw new Error("Endpoint does not have an example that matches the snippet");let i=this.csharp.codeblock(s=>{s.writeNodeStatement(this.constructClient({endpoint:t,snippet:r})),s.newLine(),s.writeNodeStatement(this.callMethod({endpoint:t,snippet:r}))}),o=this.getStyle(n);switch(o){case lS.Concise:return i;case lS.Full:return this.buildFullCodeBlock({body:i,options:n});default:Ee(o)}}buildFullCodeBlock({body:t,options:r}){let n=this.getConfig(r),i=n.fullStyleMethodName??n.fullStyleClassName??"Example",o=this.csharp.class_({name:"Examples",namespace:"Examples",partial:!0,skipNamespaceDeclaration:!0,access:ZCt.Access.Public});return o.addNamespaceReference(this.Types.RootClientForSnippets.namespace),o.addMethod({name:i,access:ZCt.Access.Public,isAsync:!0,parameters:[],body:t}),o}constructClient({endpoint:t,snippet:r}){return this.csharp.codeblock(n=>{n.write("var client = "),n.writeNode(this.getRootClientConstructorInvocation(this.getConstructorArgs({endpoint:t,snippet:r})))})}callMethod({endpoint:t,snippet:r}){let n=t.response?.type==="streaming"||t.response?.type==="streamParameter",i=this.csharp.invokeMethod({on:this.csharp.codeblock("client"),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:r}),async:!0,configureAwait:!0,multiline:!0,isAsyncEnumerable:n});return n?this.csharp.codeblock(o=>{o.write("await foreach (var item in "),o.writeNode(i),o.writeLine(")"),o.pushScope(),o.writeLine("/* consume each item */"),o.popScope()}):i}getConstructorArgs({endpoint:t,snippet:r}){let n=[];t.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:r.auth})):this.context.errors.add({severity:Br.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`}));let i=[],o=this.getConstructorBaseUrlArgs({baseUrl:r.baseURL,environment:r.environment});o.length>0&&i.push(...o),this.context.errors.scope(jo.Headers);let s=[];if(this.context.ir.headers!=null&&r.headers!=null&&s.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),this.settings.unifiedClientOptions){let a=[...n.map(c=>({name:Fu(c.name),assignment:c.assignment})),...s.map(c=>({name:Fu(c.name),assignment:c.assignment})),...i.map(c=>({name:c.name,assignment:c.assignment}))];return a.length===0?[]:[{name:"clientOptions",assignment:this.csharp.instantiateClass({classReference:this.Types.ClientOptions,arguments_:a,multiline:!0})}]}return i.length===0?[...n,...s]:[...n,...s,{name:"clientOptions",assignment:this.csharp.instantiateClass({classReference:this.Types.ClientOptions,arguments_:i.map(a=>({name:a.name,assignment:a.assignment})),multiline:!0})}]}getConstructorBaseUrlArgs({baseUrl:t,environment:r}){let n=this.getBaseUrlArg({baseUrl:t,environment:r});return Da.Literal.nop(n)?[]:[{name:this.getBaseUrlOptionName(),assignment:n}]}getBaseUrlArg({baseUrl:t,environment:r}){if(t!=null&&r!=null)return this.context.errors.add({severity:Br.Critical,message:"Cannot specify both baseUrl and environment options"}),this.csharp.Literal.nop();if(t!=null)return this.context.ir.environments?.environments.type==="multipleBaseUrls"?(this.context.errors.add({severity:Br.Critical,message:"The C# SDK doesn't support a baseUrl when multiple URL environments are configured"}),this.csharp.Literal.nop()):this.csharp.Literal.string(t);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentTypeReferenceFromID(r);return n==null?(this.context.errors.add({severity:Br.Warning,message:`Environment ${JSON.stringify(r)} was not found`}),this.csharp.Literal.nop()):this.csharp.Literal.reference(n)}if(this.context.isMultiEnvironmentValues(r))return this.context.validateMultiEnvironmentUrlValues(r)?this.csharp.Literal.reference(this.csharp.instantiateClass({classReference:this.Types.Environments,arguments_:Object.entries(r).map(([n,i])=>({name:Fu(Xn(n)),assignment:this.context.dynamicLiteralMapper.convert({typeReference:{type:"primitive",value:"STRING"},value:i})})),multiline:!0})):this.csharp.Literal.nop()}return this.csharp.Literal.nop()}getConstructorAuthArgs({auth:t,values:r}){if(r.type!==t.type)return this.addError(this.context.newAuthMismatchError({auth:t,values:r}).message),[];switch(t.type){case"basic":return r.type==="basic"?this.getConstructorBasicAuthArg({auth:t,values:r}):[];case"bearer":return r.type==="bearer"?this.getConstructorBearerAuthArgs({auth:t,values:r}):[];case"header":return r.type==="header"?this.getConstructorHeaderAuthArgs({auth:t,values:r}):[];case"oauth":return r.type==="oauth"?this.getConstructorOAuthArgs({auth:t,values:r}):[];case"inferred":return r.type==="inferred"?this.getConstructorInferredAuthArgs({auth:t,values:r}):[];default:Ee(t)}}addError(t){this.context.errors.add({severity:Br.Critical,message:t})}addWarning(t){this.context.errors.add({severity:Br.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:r}){let n=t,i=!!n.usernameOmit,o=!!n.passwordOmit,s=[];return i||s.push({name:this.context.getParameterName(t.username),assignment:this.csharp.Literal.string(r.username)}),o||s.push({name:this.context.getParameterName(t.password),assignment:this.csharp.Literal.string(r.password)}),s}getConstructorBearerAuthArgs({auth:t,values:r}){return[{name:this.context.getParameterName(t.token),assignment:this.csharp.Literal.string(r.token)}]}getConstructorHeaderAuthArgs({auth:t,values:r}){return[{name:this.context.getParameterName(t.header.name.name),assignment:this.context.dynamicLiteralMapper.convert({typeReference:t.header.typeReference,value:r.value,fallbackToDefault:t.header.name.wireValue})}]}getConstructorOAuthArgs({auth:t,values:r}){return[{name:this.context.getParameterName(t.clientId),assignment:this.csharp.Literal.string(r.clientId)},{name:this.context.getParameterName(t.clientSecret),assignment:this.csharp.Literal.string(r.clientSecret)}]}getConstructorInferredAuthArgs({auth:t,values:r}){let n=[];if(t.parameters!=null)for(let i of t.parameters){let o=i.name.wireValue,s=r.values?.[o];n.push({name:this.context.getParameterName(i.name.name),assignment:this.context.dynamicLiteralMapper.convert({typeReference:i.typeReference,value:s,fallbackToDefault:o})})}else this.context.errors.add({severity:Br.Critical,message:"Inferred auth parameters are not defined in the IR. Please ensure you're using IR version 62.3.0 or later."});return n}getConstructorHeaderArgs({headers:t,values:r}){let n=[];for(let i of t){let o=r[i.name.wireValue],s=this.getConstructorHeaderArg({header:i,value:o});s!=null&&n.push({name:this.context.getParameterName(i.name.name),assignment:s})}return n}getConstructorHeaderArg({header:t,value:r}){let n=this.context.dynamicLiteralMapper.convert({typeReference:t.typeReference,value:r,fallbackToDefault:t.name.wireValue});if(!Da.Literal.nop(n))return n}getMethodArgs({endpoint:t,snippet:r}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:r});default:Ee(t.request)}}getMethodArgsForInlinedRequest({request:t,snippet:r}){this.context.errors.scope(jo.PathParameters);let n=[...this.context.ir.pathParameters??[],...t.pathParameters??[]],i=this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:this.settings.shouldInlinePathParameters}),o=i?this.getPathParameters({namedParameters:n,snippet:r}):[],s=i?[]:this.getPathParameterArguments({namedParameters:n,snippet:r});this.context.errors.unscope(),this.context.errors.scope(jo.RequestBody);let a=this.getFilePropertyInfo({request:t,snippet:r});this.context.errors.unscope();let c=this.getInlinedRequestArg({request:t,snippet:r,pathParameterFields:o,filePropertyInfo:a});return s.length>0?[...s.map(u=>this.namedArgument({name:u.name,value:u.value})),this.namedArgument({name:Frp,value:c})]:[c]}getFilePropertyInfo({request:t,snippet:r}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:r.requestBody})}getInlinedRequestArg({request:t,snippet:r,pathParameterFields:n,filePropertyInfo:i}){let o=this.csharp.classReference({origin:t.declaration,namespace:this.context.getNamespace(t.declaration.fernFilepath)});this.context.errors.scope(jo.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:t.queryParameters??[],values:r.queryParameters??{}}).map(p=>({name:this.context.resolvePropertyName(o,p.name.name),value:this.context.dynamicLiteralMapper.convert(p)}));this.context.errors.unscope(),this.context.errors.scope(jo.Headers);let u=this.context.associateByWireValue({parameters:t.headers??[],values:r.headers??{}}).map(p=>({name:this.context.resolvePropertyName(o,p.name.name),value:this.context.dynamicLiteralMapper.convert({...p,fallbackToDefault:p.name.wireValue})}));this.context.errors.unscope(),this.context.errors.scope(jo.RequestBody);let l=t.body!=null?this.getInlinedRequestBodyConstructorFields({body:t.body,value:r.requestBody,filePropertyInfo:i,classReference:o}):[];return this.context.errors.unscope(),this.csharp.Literal.class_({reference:o,fields:[...n,...a,...u,...l]})}getInlinedRequestBodyConstructorFields({body:t,value:r,filePropertyInfo:n,classReference:i}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:t.value,value:r,classReference:i});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:t,value:r,classReference:i})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:Ee(t)}}getInlinedRequestBodyPropertyConstructorFields({parameters:t,value:r,classReference:n}){let i=[],o=this.context.associateByWireValue({parameters:t,values:this.context.getRecord(r)??{}});for(let s of o)i.push({name:this.context.resolvePropertyName(n,s.name.name),value:this.context.dynamicLiteralMapper.convert({...s,fallbackToDefault:s.name.wireValue})});return i}getFileUploadRequestBodyConstructorFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:t,value:r,classReference:n}){return{name:this.context.resolvePropertyName(n,t.bodyKey),value:this.getReferencedRequestBodyPropertyLiteral({body:t.bodyType,value:r})}}getReferencedRequestBodyPropertyLiteral({body:t,value:r}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicLiteralMapper.convert({typeReference:t.value,value:r,fallbackToDefault:JSON.stringify(t.value)});default:Ee(t)}}getMethodArgsForBodyRequest({request:t,snippet:r}){this.context.errors.scope(jo.PathParameters);let n=[...this.context.ir.pathParameters??[],...t.pathParameters??[]],i=this.getPathParameterArguments({namedParameters:n,snippet:r});this.context.errors.unscope(),this.context.errors.scope(jo.RequestBody);let o=t.body!=null?this.getBodyRequestArg({body:t.body,value:r.requestBody}):void 0;if(this.context.errors.unscope(),i.length>0&&o!=null)return[...i.map(a=>this.namedArgument({name:a.name,value:a.value})),this.namedArgument({name:Frp,value:o})];let s=i.map(a=>a.value);return o!=null&&s.push(o),s}getPathParameterArguments({namedParameters:t,snippet:r}){return this.context.associateByWireValueOrDefault({parameters:t,values:r.pathParameters??{}}).map(i=>({name:this.context.getParameterName(i.name.name),value:this.context.dynamicLiteralMapper.convert({...i,fallbackToDefault:i.name.wireValue,forceLiteral:!0})}))}namedArgument({name:t,value:r}){return this.csharp.codeblock(n=>{n.write(`${t}: `),n.writeNode(r)})}getBodyRequestArg({body:t,value:r}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return t.value.type==="optional"&&r==null?this.csharp.Literal.null():this.context.dynamicLiteralMapper.convert({typeReference:t.value,value:r,fallbackToDefault:JSON.stringify(t.value)});default:Ee(t)}}getBytesBodyRequestArg({value:t}){let r=this.context.getValueAsString({value:t});return r==null&&(this.context.errors.add({severity:Br.Critical,message:"The bytes request body must be provided in string format"}),r="[bytes]"),this.csharp.Literal.reference(this.context.getMemoryStreamForString(r))}getRootClientConstructorInvocation(t){return this.csharp.instantiateClass({classReference:this.Types.RootClientForSnippets,arguments_:t,forceUseConstructor:!0,multiline:!0})}getPathParameters({namedParameters:t,snippet:r}){let n=[],i=this.context.associateByWireValueOrDefault({parameters:t,values:r.pathParameters??{}});for(let o of i)n.push({name:this.context.getPropertyName(o.name.name),value:this.context.dynamicLiteralMapper.convert({...o,fallbackToDefault:o.name.wireValue})});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(r=>this.context.getClassName(r)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getBaseUrlOptionName(){return this.context.ir.environments?.environments.type==="multipleBaseUrls"?"Environment":"BaseUrl"}getStyle(t){return t.style??this.context.options.style??lS.Full}getConfig(t){return t.config??this.context.options.config??{}}};var BJt=class extends mx{constructor({ir:t,config:r,options:n={}}){super(new tyi({ir:t,config:r,options:n}))}precalculate(t){this.context.precalculate(t)}async generate(t,r={}){return super.generate(t,r)}generateSync(t,r={}){return super.generateSync(t,r)}async generateSnippetAst(t){return super.generateSnippetAst(t)}createSnippetGenerator(t){return new ryi({context:t})}};Zt();var ewt=require("fs/promises"),jrp=be(require("path"),1);function iO(e){let t=e.endpoint.method;if(t!=="HEAD")return{...e,baseURL:e.baseUrl,endpoint:{...e.endpoint,method:t},auth:o6g(e.auth)}}function o6g(e){if(e!=null)return e}function Nrp(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,s6g(r)]).filter(([t,r])=>r!=null))}function s6g(e){let t=e.location.method;if(t!=="HEAD")return{...e,location:{...e.location,method:t},examples:e.examples!=null?a6g(e.examples):void 0,auth:l6g(e.auth)}}function a6g(e){return e.map(t=>c6g(t)).filter(t=>t!=null)}function c6g(e){let t=e.endpoint.method;if(t!=="HEAD")return{...e,baseURL:e.baseUrl,endpoint:{...e.endpoint,method:t},auth:u6g(e.auth)}}function u6g(e){if(e!=null)return e}function l6g(e){if(e!=null)return e}function oO(e){return{...e,endpoints:Nrp(e.endpoints)}}var p6g=`<Project Sdk="Microsoft.NET.Sdk">
|
|
4552
4552
|
<PropertyGroup>
|
|
4553
4553
|
<TargetFramework>net10.0</TargetFramework>
|
|
4554
4554
|
<RootNamespace>Snippets</RootNamespace>
|
|
@@ -4933,7 +4933,7 @@ ${r}`}function h0i(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
4933
4933
|
`),g="";return c&&(g=l.style.error(c)),[`${p} ${f} ${s}`,[m,g].filter(Boolean).join(`
|
|
4934
4934
|
`)]});var q9g=Ix((e,t)=>{let{validate:r=()=>!0}=e,n=aI(e.theme),[i,o]=Zc("idle"),[s,a]=Zc(),[c,u]=Zc(""),l=bx({status:i,theme:n});Ex(async(g,A)=>{if(i==="idle")if(yx(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]")}${ESt}`),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 b8e=be(zw(),1);var G9g={icon:{cursor:pC.pointer},style:{disabled:e=>b8e.default.dim(`- ${e}`),searchTerm:e=>b8e.default.cyan(e),description:e=>b8e.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${b8e.default.bold(t)} ${b8e.default.dim(r)}`).join(b8e.default.dim(" \u2022 "))},helpMode:"always"};function vNs(e){return!hd.isSeparator(e)&&!e.disabled}function W9g(e){return e.map(t=>{if(hd.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 H9g=Ix((e,t)=>{let{pageSize:r=7,validate:n=()=>!0}=e,i=aI(G9g,e.theme),[o,s]=Zc("loading"),[a,c]=Zc(""),[u,l]=Zc([]),[p,d]=Zc(),f=bx({status:o,theme:i}),m=f6(()=>{let z=u.findIndex(vNs),K=u.findLastIndex(vNs);return{first:z,last:K}},[u]),[g=m.first,A]=Zc();c4(()=>{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(W9g(Y)),s("idle"))}catch(Y){!z.signal.aborted&&Y instanceof Error&&d(Y.message)}})(),()=>{z.abort()}},[a]);let y=u[g];Ex(async(z,K)=>{if(yx(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(Hhe(z)&&y)K.clearLine(0),K.write(y.name),c(y.name);else if(o!=="loading"&&(lP(z)||p6(z))){if(K.clearLine(0),lP(z)&&g!==m.first||p6(z)&&g!==m.last){let Y=lP(z)?-1:1,X=g;do X=(X+Y+u.length)%u.length;while(!vNs(u[X]));A(X)}}else c(K.line)});let E=i.style.message(e.message,o),x;if(i.helpMode!=="never")if(e.instructions){let{pager:z,navigation:K}=e.instructions;x=i.style.help(u.length>r?z:K)}else x=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let I=h8e({items:u,active:g,renderItem({item:z,isActive:K}){if(hd.isSeparator(z))return` ${z.separator}`;if(z.disabled){let ce=typeof z.disabled=="string"?z.disabled:"(disabled)";return i.style.disabled(`${z.name} ${ce}`)}let Y=K?i.style.highlight:ce=>ce,X=K?i.icon.cursor:" ";return Y(`${X} ${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 S;if(o==="done"&&y)return[f,E,i.style.answer(y.short)].filter(Boolean).join(" ").trimEnd();S=i.style.searchTerm(a);let P=y?.description,D=[f,E,S].filter(Boolean).join(" ").trimEnd(),T=[C??I," ",P?i.style.description(P):"",x].filter(Boolean).join(`
|
|
4935
4935
|
`).trimEnd();return[D,T]});var vSt=be(zw(),1);var K9g={icon:{cursor:pC.pointer},style:{disabled:e=>vSt.default.dim(`- ${e}`),description:e=>vSt.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${vSt.default.bold(t)} ${vSt.default.dim(r)}`).join(vSt.default.dim(" \u2022 "))},helpMode:"always",indexMode:"hidden",keybindings:[]};function ISt(e){return!hd.isSeparator(e)&&!e.disabled}function J9g(e){return e.map(t=>{if(hd.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 xNs=Ix((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=aI(K9g,e.theme),{keybindings:o}=i,[s,a]=Zc("idle"),c=bx({status:s,theme:i}),u=m8e(),l=!o.includes("vim"),p=f6(()=>J9g(e.choices),[e.choices]),d=f6(()=>{let P=p.findIndex(ISt),D=p.findLastIndex(ISt);if(P===-1)throw new Dae("[select prompt] No selectable choices. All choices are disabled.");return{first:P,last:D}},[p]),f=f6(()=>"default"in e?p.findIndex(P=>ISt(P)&&P.value===e.default):-1,[e.default,p]),[m,g]=Zc(f===-1?d.first:f),A=p[m];Ex((P,D)=>{if(clearTimeout(u.current),yx(P))a("done"),t(A.value);else if(lP(P,o)||p6(P,o)){if(D.clearLine(0),r||lP(P,o)&&m!==d.first||p6(P,o)&&m!==d.last){let T=lP(P,o)?-1:1,z=m;do z=(z+T+p.length)%p.length;while(!ISt(p[z]));g(z)}}else if(_Yt(P)&&!Number.isNaN(Number(D.line))){let T=Number(D.line)-1,z=-1,K=p.findIndex(X=>hd.isSeparator(X)?!1:(z++,z===T)),Y=p[K];Y!=null&&ISt(Y)&&g(K),u.current=setTimeout(()=>{D.clearLine(0)},700)}else if(p8e(P))D.clearLine(0);else if(l){let T=D.line.toLowerCase(),z=p.findIndex(K=>hd.isSeparator(K)||!ISt(K)?!1:K.name.toLowerCase().startsWith(T));z!==-1&&g(z),u.current=setTimeout(()=>{D.clearLine(0)},700)}}),c4(()=>()=>{clearTimeout(u.current)},[]);let y=i.style.message(e.message,s),E;if(i.helpMode!=="never")if(e.instructions){let{pager:P,navigation:D}=e.instructions;E=i.style.help(p.length>n?P:D)}else E=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let x=0,I=h8e({items:p,active:m,renderItem({item:P,isActive:D,index:T}){if(hd.isSeparator(P))return x++,` ${P.separator}`;let z=i.indexMode==="number"?`${T+1-x}. `:"";if(P.disabled){let X=typeof P.disabled=="string"?P.disabled:"(disabled)";return i.style.disabled(`${z}${P.name} ${X}`)}let K=D?i.style.highlight:X=>X,Y=D?i.icon.cursor:" ";return K(`${Y} ${z}${P.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(`
|
|
4936
|
-
`).trimEnd()}${ESt}`});bn();Wi();var Rae={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"},Y9g={[Rae.GENERATION_STARTED]:!1,[Rae.GENERATION_COMPLETED]:!1,[Rae.GENERATION_FAILED]:!0,[Rae.VERIFICATION_FAILED]:!0,[Rae.SDK_PR_CREATED]:!1,[Rae.UPGRADE_APPLIED]:!1,[Rae.MAJOR_VERSION_BUMP]:!1};function Zlp(e){return Y9g[e]}function $lp(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 epp(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 tpp(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 rpp(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 npp(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?Rae.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?Rae.VERIFICATION_FAILED:Rae.GENERATION_FAILED}var X9g="",Z9g="FERN_AUTOMATION_EVENTS_ORIGIN",$9g=3e3,X0i=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[Z9g]??X9g)),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(),$9g);try{let s={"content-type":"application/json"},a=await VQ();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(rpp(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function ipp(){let{fern_run_id:e,github_run_id:t}=lce();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.92.
|
|
4936
|
+
`).trimEnd()}${ESt}`});bn();Wi();var Rae={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"},Y9g={[Rae.GENERATION_STARTED]:!1,[Rae.GENERATION_COMPLETED]:!1,[Rae.GENERATION_FAILED]:!0,[Rae.VERIFICATION_FAILED]:!0,[Rae.SDK_PR_CREATED]:!1,[Rae.UPGRADE_APPLIED]:!1,[Rae.MAJOR_VERSION_BUMP]:!1};function Zlp(e){return Y9g[e]}function $lp(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 epp(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 tpp(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 rpp(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 npp(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?Rae.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?Rae.VERIFICATION_FAILED:Rae.GENERATION_FAILED}var X9g="",Z9g="FERN_AUTOMATION_EVENTS_ORIGIN",$9g=3e3,X0i=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[Z9g]??X9g)),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(),$9g);try{let s={"content-type":"application/json"},a=await VQ();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(rpp(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function ipp(){let{fern_run_id:e,github_run_id:t}=lce();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.92.1"}}function opp(){return process.env.FERN_AUTOMATION==="true"}var Z0i=class{constructor(t,r=X0i.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=ipp()}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:$lp(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!Zlp(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:epp(t,r),context:{automation:tpp(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Qt();function $0i(e,t,r){if(t instanceof tu)return;let n=u2e(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new B({message:s,code:n});opp()?tqg(i,e,n,s,a):eqg(e,o,n,a)}function eqg(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),qBt(r)&&e.captureException(n,{tags:{"error.code":r}})}function tqg(e,t,r,n,i){let o=npp(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Qt();function E8e(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function eEi({cliName:e,packageVersion:t,isLocal:r}){return E8e()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var tEi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(eEi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new B({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:B.Code.ConfigError});this.sentry=jBt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[dqe(),Xge(),Zge(),Nge(),Yge()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),QBt()}}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):gO(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 rEi=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new B({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:B.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()}}};Tpe();kt();Ib();Qt();bn();var HYt=class{result=kf.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=kf.Failure,!(r instanceof tu)&&(t!=null&&(this.lastFailureMessage=t),v6t({message:t,error:r,logger:this.logger}),$0i(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=dv(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new CNs({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${le.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()===kf.Success}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
|
|
4937
4937
|
`)}},CNs=class extends HYt{name;subtitle;constructor({name:t,subtitle:r,...n}){super(n),this.name=t,this.subtitle=r}start(){return super.start(),this.logAtLevelWithOverrides(_n.Info,["Started."],{omitOnTTY:!0}),this.flushLogs(),this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.result===kf.Success?this.logAtLevelWithOverrides(_n.Info,["Finished."],{omitOnTTY:!0}):this.logAtLevelWithOverrides(_n.Error,["Failed."],{omitOnTTY:!0}),super.finish())}setSubtitle(t){this.subtitle=t}print({spinner:t}){let r=[this.name];return this.subtitle!=null&&r.push(le.dim(this.subtitle)),r.push(...this.subtasks.map(n=>n.print({spinner:t}))),uj({prefix:this.getIcon({spinner:t}),content:r.join(`
|
|
4938
4938
|
`)})}printInteractiveTasks({spinner:t}){return this.print({spinner:t})}getIcon({spinner:t}){let r=this.subtasks.length>0;switch(this.status){case"notStarted":return r?le.dim("\u25B8 "):le.dim("\u25E6 ");case"running":return r?le.cyan("\u25BE "):t;case"finished":switch(this.getResult()){case kf.Success:return r?le.green("\u25BE "):le.green("\u2713 ");case kf.Failure:return r?le.red("\u25BE "):le.red("x ")}}}getResult(){if(this.result===kf.Failure)return kf.Failure;for(let t of this.subtasks)if(t.getResult()===kf.Failure)return kf.Failure;return kf.Success}};Qt();var spp=be(eMe(),1);bn();function app(e){return e.filter(t=>t.isUpgradeAvailable).length>0}function rqg(e){return(e.cliUpgradeInfo?.isUpgradeAvailable??!1)||app(e.generatorUpgradeInfo)}async function cpp({cliEnvironment:e,upgradeInfo:t}){if(!rqg(t)||e.packageVersion==t.cliUpgradeInfo?.latestVersion)return;let r=`${le.underline("Upgrades available")}
|
|
4939
4939
|
|
|
@@ -4942,7 +4942,7 @@ ${r}`}function h0i(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
4942
4942
|
Run ${le.cyan("fern generator upgrade")} to upgrade your generators.`),i.length>2&&(r+=`
|
|
4943
4943
|
Run ${le.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),Rit(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function wNs({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:n=!0}){if(!app(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+=`
|
|
4944
4944
|
${await nqg(a.generatorName)} (${a.apiName!=null?"API: "+a.apiName+", ":""}Group: ${a.generatorGroup}) `+le.dim(a.currentVersion)+le.reset(" \u2192 ")+le.green(a.latestVersion);return i+=`
|
|
4945
|
-
`,n?Rit(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function nqg(e){let r=await new spp.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new B({message:`Generator ${e} not found`,code:B.Code.ConfigError});return r.body.displayName}Io();jpe();Qt();async function iqg({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){if(t.length===1){let a={type:"singleApi",versions:{}};return await upp({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(c,u,l,p)=>{a.versions[u]==null&&(a.versions[u]={});let d=qze(l.name);if(d==null){p.logger.debug(`Skipping unknown generator: ${l.name}`);return}let f=await d1({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 upp({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=qze(u.name);if(p==null){l.logger.debug(`Skipping unknown generator: ${u.name}`);return}let d=await d1({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 upp({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 TL({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?DA(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 lpp(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=B1(a.latestVersion,a.previousVersion)}catch{throw new B({message:`Generator "${s}" has an invalid version "${a.previousVersion}" in generators.yml. Use an exact version like 1.2.3.`,code:B.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 nEi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){let s=[];if(e!=null){let a=await iqg({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(...lpp(u,c,t.logger));else s.push(...lpp(a.versions,void 0,t.logger))}return s}Qt();mbr();async function Khe({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await BNe(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new B({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:B.Code.NetworkError})}}var ppp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],iEi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=_n.Info;isLocal;stdoutRedirector=new rEi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await uVt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new z6t(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 tEi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Z0i(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.92.
|
|
4945
|
+
`,n?Rit(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function nqg(e){let r=await new spp.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new B({message:`Generator ${e} not found`,code:B.Code.ConfigError});return r.body.displayName}Io();jpe();Qt();async function iqg({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){if(t.length===1){let a={type:"singleApi",versions:{}};return await upp({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(c,u,l,p)=>{a.versions[u]==null&&(a.versions[u]={});let d=qze(l.name);if(d==null){p.logger.debug(`Skipping unknown generator: ${l.name}`);return}let f=await d1({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 upp({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=qze(u.name);if(p==null){l.logger.debug(`Skipping unknown generator: ${u.name}`);return}let d=await d1({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 upp({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 TL({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?DA(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 lpp(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=B1(a.latestVersion,a.previousVersion)}catch{throw new B({message:`Generator "${s}" has an invalid version "${a.previousVersion}" in generators.yml. Use an exact version like 1.2.3.`,code:B.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 nEi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){let s=[];if(e!=null){let a=await iqg({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(...lpp(u,c,t.logger));else s.push(...lpp(a.versions,void 0,t.logger))}return s}Qt();mbr();async function Khe({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await BNe(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new B({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:B.Code.NetworkError})}}var ppp=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],iEi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=_n.Info;isLocal;stdoutRedirector=new rEi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await uVt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new z6t(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 tEi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Z0i(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.92.1"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${le.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)&&(v6t({message:t,error:r,logger:this.logger}),$0i(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)+`
|
|
4946
4946
|
`),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 cpp({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
4947
4947
|
`)||(r+=`
|
|
4948
4948
|
`),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=FRi(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 HYt(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=dv((t,...r)=>this.log(t,...r));stderr=dv((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=t.type==="docs"?"docs":t.workspaceName??"api",n=fpp(r),i=1+(this.longestWorkspaceName!=null?fpp(this.longestWorkspaceName):n).length,o=n.padEnd(i),s=ppp[this.numTasks++%ppp.length],a=le.hex(s)(o);return{...this.constructTaskInit(),logPrefix:a,title:le.hex(s).bold(r)}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===kf.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=>sw.indexOf(i.level)>=sw.indexOf(this.logLevel));this.ttyAwareLogger.log(n,{includeDebugInfo:this.logLevel===_n.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 Khe({cliEnvironment:this.environment,includePreReleases:t}),n=B1(r,this.environment.packageVersion);this.logger.debug(`Latest version: ${r}. `+(n?"Upgrade available.":"No upgrade available."));let i={isUpgradeAvailable:n,latestVersion:r},o=await nEi({project:this.project,cliContext:this});this._isUpgradeAvailable={cliUpgradeInfo:i,generatorUpgradeInfo:o}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){try{return await xNs({message:t,choices:[{name:"No",value:!1},{name:"Yes",value:!0}],default:r,theme:{prefix:le.yellow("?"),style:{answer:i=>le.cyan(i),message:i=>le.bold(i),highlight:i=>le.cyan(i)}}})}catch(n){throw n?.name==="ExitPromptError"?(this.logger.info(`
|