fern-api 5.75.5 → 5.75.6
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 +6 -6
- 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}`:""}${Aya(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===mU.Consumed)return;if(this.readState!==mU.Inactive){this.readState=mU.ReadMore;return}this.readState=mU.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=mU.Consumed,this.cleanup();return}if(this.readState===mU.ReadMore){this.readState=mU.Inactive,await this._read(t);return}this.readState=mU.Inactive}}cleanup(){this.readState=mU.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 Px(e,t,{pretty:r=!1}={}){let n=new w7e(t,void 0,r?4:void 0);return new Promise((i,o)=>{n.pipe((0,bya.createWriteStream)(e)).on("error",o).on("finish",i)})}var bya,NFi=h(()=>{"use strict";bya=require("fs");FFi()});var Qya=b((bKA,Gce)=>{"use strict";var Xg=require("fs"),Rsr=require("os"),sw=require("path"),Eya=require("crypto"),tY={fs:Xg.constants,os:Rsr.constants},Iya="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wya=/XXXXXX/,Elf=3,Sya=(tY.O_CREAT||tY.fs.O_CREAT)|(tY.O_EXCL||tY.fs.O_EXCL)|(tY.O_RDWR||tY.fs.O_RDWR),Ilf=Rsr.platform()==="win32",vlf=tY.EBADF||tY.os.errno.EBADF,xlf=tY.ENOENT||tY.os.errno.ENOENT,Tya=448,Oya=384,Clf="exit",S7e=[],Bya=Xg.rmdirSync.bind(Xg),Pya=!1;function wlf(e,t){return Xg.rm(e,{recursive:!0},t)}function Dya(e){return Xg.rmSync(e,{recursive:!0})}function MFi(e,t){let r=T7e(e,t),n=r[0],i=r[1];Nlf(n,function(o,s){if(o)return i(o);let a=s.tries;(function c(){try{let u=kya(s);Xg.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 LFi(e){let t=T7e(e),r=t[0],n=jlf(r),i=n.tries;do{let o=kya(n);try{Xg.statSync(o)}catch{return o}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function Slf(e,t){let r=T7e(e,t),n=r[0],i=r[1];MFi(n,function(s,a){if(s)return i(s);Xg.open(a,Sya,n.mode||Oya,function(u,l){if(u)return i(u);if(n.discardDescriptor)return Xg.close(l,function(d){return i(d,a,void 0,QFi(a,-1,n,!1))});{let p=n.discardDescriptor||n.detachDescriptor;i(null,a,l,QFi(a,p?-1:l,n,!1))}})})}function Tlf(e){let t=T7e(e),r=t[0],n=r.discardDescriptor||r.detachDescriptor,i=LFi(r),o=Xg.openSync(i,Sya,r.mode||Oya);return r.discardDescriptor&&(Xg.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:QFi(i,n?-1:o,r,!0)}}function Olf(e,t){let r=T7e(e,t),n=r[0],i=r[1];MFi(n,function(s,a){if(s)return i(s);Xg.mkdir(a,n.mode||Tya,function(u){if(u)return i(u);i(null,a,Rya(a,n,!1))})})}function Blf(e){let t=T7e(e),r=t[0],n=LFi(r);return Xg.mkdirSync(n,r.mode||Tya),{name:n,removeCallback:Rya(n,r,!0)}}function Plf(e,t){let r=function(n){if(n&&!zFi(n))return t(n);t()};0<=e[0]?Xg.close(e[0],function(){Xg.unlink(e[1],r)}):Xg.unlink(e[1],r)}function Dlf(e){let t=null;try{0<=e[0]&&Xg.closeSync(e[0])}catch(r){if(!Qlf(r)&&!zFi(r))throw r}finally{try{Xg.unlinkSync(e[1])}catch(r){zFi(r)||(t=r)}}if(t!==null)throw t}function QFi(e,t,r,n){let i=Dsr(Dlf,[t,e],n),o=Dsr(Plf,[t,e],n,i);return r.keep||S7e.unshift(i),n?i:o}function Rya(e,t,r){let n=t.unsafeCleanup?wlf:Xg.rmdir.bind(Xg),i=t.unsafeCleanup?Dya:Bya,o=Dsr(i,e,r),s=Dsr(n,e,r,o);return t.keep||S7e.unshift(o),r?o:s}function Dsr(e,t,r,n){let i=!1;return function o(s){if(!i){let a=n||o,c=S7e.indexOf(a);return c>=0&&S7e.splice(c,1),i=!0,r||e===Bya||e===Dya?e(t):e(t,s||function(){})}}}function Rlf(){if(Pya)for(;S7e.length;)try{S7e[0]()}catch{}}function vya(e){let t=[],r=null;try{r=Eya.randomBytes(e)}catch{r=Eya.pseudoRandomBytes(e)}for(let n=0;n<e;n++)t.push(Iya[r[n]%Iya.length]);return t.join("")}function fj(e){return typeof e>"u"}function T7e(e,t){if(typeof e=="function")return[{},e];if(fj(e))return[{},t];let r={};for(let n of Object.getOwnPropertyNames(e))r[n]=e[n];return[r,t]}function klf(e,t,r){let n=sw.isAbsolute(e)?e:sw.join(t,e);Xg.stat(n,function(i){i?Xg.realpath(sw.dirname(n),function(o,s){if(o)return r(o);r(null,sw.join(s,sw.basename(n)))}):Xg.realpath(n,r)})}function Flf(e,t){let r=sw.isAbsolute(e)?e:sw.join(t,e);try{return Xg.statSync(r),Xg.realpathSync(r)}catch{let i=Xg.realpathSync(sw.dirname(r));return sw.join(i,sw.basename(r))}}function kya(e){let t=e.tmpdir;if(!fj(e.name))return sw.join(t,e.dir,e.name);if(!fj(e.template))return sw.join(t,e.dir,e.template).replace(wya,vya(6));let r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",vya(12),e.postfix?"-"+e.postfix:""].join("");return sw.join(t,e.dir,r)}function jFi(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 Fya(e){if(!fj(e.name)){let t=e.name;if(sw.isAbsolute(t))throw new Error(`name option must not contain an absolute path, found "${t}".`);let r=sw.basename(t);if(r===".."||r==="."||r!==t)throw new Error(`name option must not contain a path, found "${t}".`)}if(!fj(e.template)){if(typeof e.template!="string")throw new Error(`template option must be a string, got "${typeof e.template}".`);if(!e.template.match(wya))throw new Error(`Invalid template, found "${e.template}".`)}if(!fj(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=fj(e.name)?e.tries||Elf:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.prefix=fj(e.prefix)?"":jFi("prefix",e.prefix),e.postfix=fj(e.postfix)?"":jFi("postfix",e.postfix),e.template=fj(e.template)?void 0:jFi("template",e.template)}function xya(e,t,r,n){if(fj(t))return n(null);klf(t,r,function(i,o){if(i)return n(i);let s=sw.relative(r,o);if(s.startsWith("..")||sw.isAbsolute(s))return n(new Error(`${e} option must be relative to "${r}", found "${s}".`));n(null,s)})}function Cya(e,t,r){if(fj(t))return;let n=Flf(t,r),i=sw.relative(r,n);if(i.startsWith("..")||sw.isAbsolute(i))throw new Error(`${e} option must be relative to "${r}", found "${i}".`);return i}function Nlf(e,t){Mlf(e,function(r,n){if(r)return t(r);e.tmpdir=n;try{Fya(e,n)}catch(i){return t(i)}xya("dir",e.dir,n,function(i,o){if(i)return t(i);e.dir=fj(o)?"":o,xya("template",e.template,n,function(s,a){if(s)return t(s);e.template=a,t(null,e)})})})}function jlf(e){let t=e.tmpdir=jya(e);Fya(e,t);let r=Cya("dir",e.dir,t);return e.dir=fj(r)?"":r,e.template=Cya("template",e.template,t),e}function Qlf(e){return Nya(e,-vlf,"EBADF")}function zFi(e){return Nya(e,-xlf,"ENOENT")}function Nya(e,t,r){return Ilf?e.code===r:e.code===r&&e.errno===t}function zlf(){Pya=!0}function Mlf(e,t){return Xg.realpath(e&&e.tmpdir||Rsr.tmpdir(),t)}function jya(e){return Xg.realpathSync(e&&e.tmpdir||Rsr.tmpdir())}process.addListener(Clf,Rlf);Object.defineProperty(Gce.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return jya()}});Gce.exports.dir=Olf;Gce.exports.dirSync=Blf;Gce.exports.file=Slf;Gce.exports.fileSync=Tlf;Gce.exports.tmpName=MFi;Gce.exports.tmpNameSync=LFi;Gce.exports.setGracefulCleanup=zlf});var lE=b((EKA,G6)=>{"use strict";var{promisify:WPt}=require("util"),WAe=Qya();G6.exports.fileSync=WAe.fileSync;var Llf=WPt((e,t)=>WAe.file(e,(r,n,i,o)=>r?t(r):t(void 0,{path:n,fd:i,cleanup:WPt(o)})));G6.exports.file=async e=>Llf(e);G6.exports.withFile=async function(t,r){let{path:n,fd:i,cleanup:o}=await G6.exports.file(r);try{return await t({path:n,fd:i})}finally{await o()}};G6.exports.dirSync=WAe.dirSync;var Ulf=WPt((e,t)=>WAe.dir(e,(r,n,i)=>r?t(r):t(void 0,{path:n,cleanup:WPt(i)})));G6.exports.dir=async e=>Ulf(e);G6.exports.withDir=async function(t,r){let{path:n,cleanup:i}=await G6.exports.dir(r);try{return await t({path:n})}finally{await i()}};G6.exports.tmpNameSync=WAe.tmpNameSync;G6.exports.tmpName=WPt(WAe.tmpName);G6.exports.tmpdir=WAe.tmpdir;G6.exports.setGracefulCleanup=WAe.setGracefulCleanup});async function ksr(e,{pretty:t,onWrite:r}={}){let n=await Mya.default.file(),i=Vt.of(n.path);return await Px(i,e,{pretty:t}),r?.(i),(await(0,zya.readFile)(n.path)).toString()}var zya,Mya,Lya=h(()=>{"use strict";zya=require("fs/promises"),Mya=be(lE(),1);esr();NFi()});async function Uya(e,t){let r=new AbortController;return Promise.race([Vya({filepath:e,controller:r}).then(()=>!0),Nce(t).then(()=>(r.abort(),!1))])}async function Vya({filepath:e,controller:t,delayMs:r=50}){if(!t.signal.aborted&&!await rr(e))return await Nce(r),Vya({filepath:e,controller:t,delayMs:r*2})}var _ya=h(()=>{"use strict";Dt();rsr()});var Gya={};X(Gya,{AbsoluteFilePath:()=>Vt,RelativeFilePath:()=>we,basename:()=>IS,convertToFernHostAbsoluteFilePath:()=>LAe,convertToFernHostRelativeFilePath:()=>CPt,convertToOsPath:()=>dv,cwd:()=>ru,dirname:()=>bn,doesPathExist:()=>rr,doesPathExistSync:()=>YJ,getAllFilesInDirectory:()=>SPt,getAllFilesInDirectoryRelative:()=>Nga,getDirectoryContents:()=>$A,getDirectoryContentsForSnapshot:()=>Mga,getFilename:()=>uU,isCI:()=>asr,isPathEmpty:()=>tsr,isURL:()=>U6,join:()=>We,listFiles:()=>wS,moveFile:()=>WAa,moveFolder:()=>dU,relative:()=>Fo,relativize:()=>uE,resolve:()=>ri,splitPath:()=>ssr,streamObjectFromFile:()=>Psr,streamObjectToFile:()=>Px,stringifyLargeObject:()=>ksr,waitUntilPathExists:()=>Uya});var Zt=h(()=>{"use strict";esr();Tga();Oga();Yki();rsr();kga();jga();Zki();Lga();Uga();Vga();nsr();GAa();HAa();JAa();UAe();f2e();XAa();$Aa();tya();$ki();gya();NFi();Lya();_ya()});var qya=h(()=>{"use strict"});var Wya=h(()=>{"use strict"});var Hya=h(()=>{"use strict"});var Kya=h(()=>{"use strict"});var Jya=h(()=>{"use strict"});var Yya=h(()=>{"use strict"});var Xya=h(()=>{"use strict"});var Zya=h(()=>{"use strict"});var $ya=h(()=>{"use strict"});var eba=h(()=>{"use strict"});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 cba=h(()=>{"use strict"});var uba=h(()=>{"use strict"});var lba=h(()=>{"use strict"});var pba=h(()=>{"use strict"});var fba=h(()=>{"use strict"});var dba=h(()=>{"use strict"});var mba=h(()=>{"use strict"});var hba=h(()=>{"use strict"});var gba=h(()=>{"use strict"});var Aba=h(()=>{"use strict"});var UFi=h(()=>{"use strict";qya();Wya();Hya();Kya();Jya();Yya();Xya();Zya();$ya();eba();tba();rba();nba();iba();oba();sba();aba();cba();uba();lba();pba();fba();dba();mba();hba();gba();Aba()});var yba={};var bba=h(()=>{"use strict";UFi()});var Eba=h(()=>{"use strict"});var Iba,vba=h(()=>{"use strict";Iba={InDevelopment:"in-development",PreRelease:"pre-release",Deprecated:"deprecated",GenerallyAvailable:"generally-available",Alpha:"alpha",Beta:"beta",Preview:"preview",Legacy:"legacy"}});var xba=h(()=>{"use strict"});var VFi=h(()=>{"use strict";Eba();vba();xba()});var _Fi={};X(_Fi,{AvailabilityStatusSchema:()=>Iba});var Cba=h(()=>{"use strict";VFi()});var wba=h(()=>{"use strict"});var Sba=h(()=>{"use strict"});var Tba=h(()=>{"use strict"});var Oba=h(()=>{"use strict"});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 GFi=h(()=>{"use strict";wba();Sba();Tba();Oba();Bba();Pba();Dba();Rba();kba();Fba()});var Nba={};var jba=h(()=>{"use strict";GFi()});var Qba=h(()=>{"use strict"});var zba=h(()=>{"use strict"});var qFi=h(()=>{"use strict";Qba();zba()});var Mba={};var Lba=h(()=>{"use strict";qFi()});var Uba=h(()=>{"use strict"});var Vba=h(()=>{"use strict"});var _ba=h(()=>{"use strict"});var Gba=h(()=>{"use strict"});var qba=h(()=>{"use strict"});var WFi=h(()=>{"use strict";Uba();Vba();_ba();Gba();qba()});var Wba={};var Hba=h(()=>{"use strict";WFi()});var Kba=h(()=>{"use strict"});var HFi=h(()=>{"use strict";Kba()});var Jba={};var Yba=h(()=>{"use strict";HFi()});var Xba=h(()=>{"use strict"});var Zba=h(()=>{"use strict"});var $ba=h(()=>{"use strict"});var e0a=h(()=>{"use strict"});var t0a=h(()=>{"use strict"});var r0a=h(()=>{"use strict"});var n0a=h(()=>{"use strict"});var i0a=h(()=>{"use strict"});var o0a=h(()=>{"use strict"});var s0a=h(()=>{"use strict"});var a0a=h(()=>{"use strict"});var c0a=h(()=>{"use strict"});var u0a=h(()=>{"use strict"});var l0a=h(()=>{"use strict"});var p0a=h(()=>{"use strict"});var f0a=h(()=>{"use strict"});var d0a,m0a=h(()=>{"use strict";d0a={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 KFi=h(()=>{"use strict";Xba();Zba();$ba();e0a();t0a();r0a();n0a();i0a();o0a();s0a();a0a();c0a();u0a();l0a();p0a();f0a();m0a()});var JFi={};X(JFi,{SupportedSdkLanguageSchema:()=>d0a});var h0a=h(()=>{"use strict";KFi()});var g0a=h(()=>{"use strict"});var A0a=h(()=>{"use strict"});var y0a=h(()=>{"use strict"});var b0a=h(()=>{"use strict"});var E0a=h(()=>{"use strict"});var I0a=h(()=>{"use strict"});var v0a=h(()=>{"use strict"});var x0a=h(()=>{"use strict"});var C0a=h(()=>{"use strict"});var w0a=h(()=>{"use strict"});var YFi=h(()=>{"use strict";g0a();A0a();y0a();b0a();E0a();I0a();v0a();x0a();C0a();w0a()});var S0a={};var T0a=h(()=>{"use strict";YFi()});var O0a=h(()=>{"use strict"});var XFi=h(()=>{"use strict";O0a()});var B0a={};var P0a=h(()=>{"use strict";XFi()});var D0a=h(()=>{"use strict"});var R0a=h(()=>{"use strict"});var k0a=h(()=>{"use strict"});var F0a=h(()=>{"use strict"});var N0a=h(()=>{"use strict"});var j0a=h(()=>{"use strict"});var ZFi=h(()=>{"use strict";D0a();R0a();k0a();F0a();N0a();j0a()});var Q0a={};var z0a=h(()=>{"use strict";ZFi()});var M0a=h(()=>{"use strict"});var L0a=h(()=>{"use strict"});var U0a=h(()=>{"use strict"});var V0a=h(()=>{"use strict"});var _0a=h(()=>{"use strict"});var $Fi=h(()=>{"use strict";M0a();L0a();U0a();V0a();_0a()});var G0a={};var q0a=h(()=>{"use strict";$Fi()});var W0a,H0a=h(()=>{"use strict";W0a={Json:"json",Exploded:"exploded",Form:"form"}});var K0a=h(()=>{"use strict"});var J0a=h(()=>{"use strict"});var Y0a=h(()=>{"use strict"});var X0a=h(()=>{"use strict"});var Z0a=h(()=>{"use strict"});var $0a=h(()=>{"use strict"});var eEa=h(()=>{"use strict"});var tEa=h(()=>{"use strict"});var rEa=h(()=>{"use strict"});var nEa,iEa=h(()=>{"use strict";nEa={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"}});var oEa=h(()=>{"use strict"});var sEa=h(()=>{"use strict"});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,wEa=h(()=>{"use strict";CEa={Sse:"sse",Json:"json"}});var SEa=h(()=>{"use strict"});var TEa=h(()=>{"use strict"});var e2i=h(()=>{"use strict";H0a();K0a();J0a();Y0a();X0a();Z0a();$0a();eEa();tEa();rEa();iEa();oEa();sEa();aEa();cEa();uEa();lEa();pEa();fEa();dEa();mEa();hEa();gEa();AEa();yEa();bEa();EEa();IEa();vEa();xEa();wEa();SEa();TEa()});var t2i={};X(t2i,{FormDataBodyEncodingStyle:()=>W0a,HttpMethodSchema:()=>nEa,StreamFormat:()=>CEa});var OEa=h(()=>{"use strict";e2i()});var BEa=h(()=>{"use strict"});var PEa=h(()=>{"use strict"});var DEa=h(()=>{"use strict"});var r2i=h(()=>{"use strict";BEa();PEa();DEa()});var REa={};var kEa=h(()=>{"use strict";r2i()});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 MEa=h(()=>{"use strict"});var LEa=h(()=>{"use strict"});var UEa=h(()=>{"use strict"});var VEa=h(()=>{"use strict"});var _Ea,GEa=h(()=>{"use strict";_Ea={ReadOnly:"read-only",WriteOnly:"write-only"}});var qEa=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 tIa=h(()=>{"use strict"});var rIa=h(()=>{"use strict"});var nIa=h(()=>{"use strict"});var iIa=h(()=>{"use strict"});var oIa=h(()=>{"use strict"});var sIa=h(()=>{"use strict"});var aIa=h(()=>{"use strict"});var cIa,uIa=h(()=>{"use strict";cIa={Data:"data",Protocol:"protocol"}});var n2i=h(()=>{"use strict";FEa();NEa();jEa();QEa();zEa();MEa();LEa();UEa();VEa();GEa();qEa();WEa();HEa();KEa();JEa();YEa();XEa();ZEa();$Ea();eIa();tIa();rIa();nIa();iIa();oIa();sIa();aIa();uIa()});var i2i={};X(i2i,{ObjectPropertyAccess:()=>_Ea,UnionDiscriminatorContext:()=>cIa});var lIa=h(()=>{"use strict";n2i()});var pIa=h(()=>{"use strict"});var fIa=h(()=>{"use strict"});var dIa=h(()=>{"use strict"});var mIa=h(()=>{"use strict"});var hIa=h(()=>{"use strict"});var o2i=h(()=>{"use strict";pIa();fIa();dIa();mIa();hIa()});var gIa={};var AIa=h(()=>{"use strict";o2i()});var yIa=h(()=>{"use strict"});var bIa=h(()=>{"use strict"});var EIa=h(()=>{"use strict"});var s2i=h(()=>{"use strict";yIa();bIa();EIa()});var IIa={};var vIa=h(()=>{"use strict";s2i()});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 a2i=h(()=>{"use strict";xIa();CIa();wIa();SIa();TIa()});var OIa={};var BIa=h(()=>{"use strict";a2i()});var PIa,DIa=h(()=>{"use strict";PIa={RsaSha256:"rsa-sha256",RsaSha384:"rsa-sha384",RsaSha512:"rsa-sha512",EcdsaSha256:"ecdsa-sha256",EcdsaSha384:"ecdsa-sha384",EcdsaSha512:"ecdsa-sha512",Ed25519:"ed25519"}});var RIa=h(()=>{"use strict"});var kIa=h(()=>{"use strict"});var FIa,NIa=h(()=>{"use strict";FIa={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"}});var jIa=h(()=>{"use strict"});var QIa=h(()=>{"use strict"});var zIa=h(()=>{"use strict"});var MIa=h(()=>{"use strict"});var LIa,UIa=h(()=>{"use strict";LIa={Post:"POST",Get:"GET"}});var VIa,_Ia=h(()=>{"use strict";VIa={Alphabetical:"alphabetical"}});var GIa,qIa=h(()=>{"use strict";GIa={Body:"body",Timestamp:"timestamp",NotificationUrl:"notification-url",MessageId:"message-id"}});var WIa=h(()=>{"use strict"});var HIa=h(()=>{"use strict"});var KIa=h(()=>{"use strict"});var JIa=h(()=>{"use strict"});var YIa,XIa=h(()=>{"use strict";YIa={Sha256:"sha256",Sha1:"sha1",Sha384:"sha384",Sha512:"sha512"}});var ZIa,$Ia=h(()=>{"use strict";ZIa={Base64:"base64",Hex:"hex"}});var eva=h(()=>{"use strict"});var tva,rva=h(()=>{"use strict";tva={UnixSeconds:"unix-seconds",UnixMillis:"unix-millis",Iso8601:"iso8601"}});var nva=h(()=>{"use strict"});var c2i=h(()=>{"use strict";DIa();RIa();kIa();NIa();jIa();QIa();zIa();MIa();UIa();_Ia();qIa();WIa();HIa();KIa();JIa();XIa();$Ia();eva();rva();nva()});var u2i={};X(u2i,{AsymmetricAlgorithmSchema:()=>PIa,WebhookBodyHashAlgorithmSchema:()=>FIa,WebhookMethodSchema:()=>LIa,WebhookPayloadBodySortSchema:()=>VIa,WebhookPayloadComponentSchema:()=>GIa,WebhookSignatureAlgorithmSchema:()=>YIa,WebhookSignatureEncodingSchema:()=>ZIa,WebhookTimestampFormatSchema:()=>tva});var iva=h(()=>{"use strict";c2i()});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 lva,pva=h(()=>{"use strict";lva={Client:"client",Server:"server"}});var l2i=h(()=>{"use strict";ova();sva();ava();cva();uva();pva()});var p2i={};X(p2i,{WebSocketOrigin:()=>lva});var fva=h(()=>{"use strict";l2i()});var dva=h(()=>{"use strict";bba();UFi();Cba();VFi();jba();GFi();Lba();qFi();Hba();WFi();Yba();HFi();h0a();KFi();T0a();YFi();P0a();XFi();z0a();ZFi();q0a();$Fi();OEa();e2i();kEa();r2i();lIa();n2i();AIa();o2i();vIa();s2i();BIa();a2i();iva();c2i();fva();l2i()});var mva=h(()=>{"use strict";dva()});var hva,gva=h(()=>{"use strict";hva=(e,t,r)=>JSON.stringify(e,t,r)});var Hce,Ava,f2i,d2i,L$A,yva=h(()=>{"use strict";Hce={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Ava={[Hce.Debug]:1,[Hce.Info]:2,[Hce.Warn]:3,[Hce.Error]:4},f2i=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)}},d2i=class{level;logger;silent;constructor(t){this.level=Ava[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=Ava[t]}isDebug(){return this.shouldLog(Hce.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(Hce.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(Hce.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(Hce.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},L$A=new d2i({level:Hce.Info,logger:new f2i,silent:!0})});var bva=h(()=>{"use strict"});var Eva=h(()=>{"use strict";yva()});var Iva=h(()=>{"use strict"});var ju,aw=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 Ld(e,t){return`Expected ${t}. Received ${_lf(e)}.`}function _lf(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 Kk=h(()=>{"use strict"});function OS(e){return{...e,json:vva(e.json),parse:vva(e.parse)}}function vva(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 rY=h(()=>{"use strict"});function Fsr(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var m2i=h(()=>{"use strict"});var B7e,h2i=h(()=>{"use strict";m2i();B7e=class e extends Error{errors;constructor(t){super(t.map(Fsr).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}}});var P7e,g2i=h(()=>{"use strict";m2i();P7e=class e extends Error{errors;constructor(t){super(t.map(Fsr).join("; ")),this.errors=t,Object.setPrototypeOf(this,e.prototype)}}});function Pm(e){return{nullable:()=>Glf(e),optional:()=>A2i(e),optionalNullable:()=>qlf(e),transform:t=>y2i(e,t),parseOrThrow:(t,r)=>{let n=e.parse(t,r);if(n.ok)return n.value;throw new P7e(n.errors)},jsonOrThrow:(t,r)=>{let n=e.json(t,r);if(n.ok)return n.value;throw new B7e(n.errors)}}}function Glf(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,...Pm(t)}}function A2i(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,...Pm(t)}}function qlf(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,...Pm(t)}}function y2i(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,...Pm(r)}}var xva=h(()=>{"use strict";aw();h2i();g2i()});var dj=h(()=>{"use strict";xva();h2i();g2i()});function Cva(){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:Ld(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Ld(t,"bigint")}]}:{ok:!0,value:t},getType:()=>ju.BIGINT};return{...OS(e),...Pm(e)}}var wva=h(()=>{"use strict";aw();Kk();rY();dj()});var Sva=h(()=>{"use strict";wva()});function Tva(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Ld(t,"string")}]}:Wlf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Ld(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Ld(t,"Date object")}]},getType:()=>ju.DATE};return{...OS(e),...Pm(e)}}var Wlf,Ova=h(()=>{"use strict";aw();Kk();rY();dj();Wlf=/^([+-]?\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 Bva=h(()=>{"use strict";Ova()});function BS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...OS(r),...Pm(r)}}}var nY=h(()=>{"use strict";dj();rY()});function Nsr(e){let t=new Set(e);return BS(ju.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Ld(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Ld(n,"enum")}]}:{ok:!0,value:n})()}var Pva=h(()=>{"use strict";aw();nY();Kk()});var b2i=h(()=>{"use strict";Pva()});function Dva(e){let t=E2i(e);return{...t,...Pm(t)}}function E2i(e){return{parse:(t,r)=>D7e(e).parse(t,r),json:(t,r)=>D7e(e).json(t,r),getType:()=>D7e(e).getType()}}function D7e(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var I2i=h(()=>{"use strict";dj()});function v2i(e){return Object.entries(e)}var Rva=h(()=>{"use strict"});function HPt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var x2i=h(()=>{"use strict"});function Kce(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var KPt=h(()=>{"use strict"});function JPt(e){return Object.keys(e)}var C2i=h(()=>{"use strict"});function kva(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Fva=h(()=>{"use strict"});function Yq(e){return{withParsedProperties:t=>w2i(e,t)}}function w2i(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(Hlf.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(!Kce(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Ld(n,"object")}]};let o=new Set(Object.keys(t)),s=HPt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,...Pm(r),...Yq(r)}}var Hlf,Nva=h(()=>{"use strict";x2i();Kk();KPt();dj();Hlf=Object.prototype.hasOwnProperty});var YPt=h(()=>{"use strict";Nva()});function jva(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function Jce(e){return e.isProperty}var S2i=h(()=>{"use strict"});function jsr(e){let t;function r(){if(t==null){t={};for(let[d,f]of v2i(e)){let m=Jce(f)?f.rawKey:d,g=Jce(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 v2i(e)){let m=Jce(f)?f.rawKey:d,g=Jce(f)?f.valueSchema:f;Jlf(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])=>Jce(f)?f.rawKey:d),_getParsedProperties:()=>JPt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Qva({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 Qva({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return Jce(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{...OS(p),...Pm(p),...Yq(p),...A2e(p)}}function Qva({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!Kce(e))return{ok:!1,errors:[{path:s,message:Ld(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!Klf.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 A2e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>zva({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>zva({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,...Pm(r),...Yq(r),...A2e(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,...Pm(n),...Yq(n),...A2e(n)}}}}function zva({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!Kce(t))return{ok:!1,errors:[{path:i,message:Ld(t,"object")}]};let o=new Set(e),[s,a]=kva(JPt(t),l=>o.has(l)),c=r(HPt(t,a)),u=n(HPt(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 Jlf(e){return!Ylf(e)}function Ylf(e){switch(e.getType()){case ju.ANY:case ju.UNKNOWN:case ju.OPTIONAL:case ju.OPTIONAL_NULLABLE:return!0;default:return!1}}var Klf,T2i=h(()=>{"use strict";aw();Rva();x2i();Kk();KPt();C2i();rY();Fva();YPt();dj();S2i();Klf=Object.prototype.hasOwnProperty});function Mva(e){return jsr(e)}var Lva=h(()=>{"use strict";T2i()});var O2i=h(()=>{"use strict";T2i();Lva();S2i()});function Uva(e){let t={...E2i(e),_getRawProperties:()=>D7e(e)._getRawProperties(),_getParsedProperties:()=>D7e(e)._getParsedProperties()};return{...t,...Pm(t),...Yq(t),...A2e(t)}}var Vva=h(()=>{"use strict";O2i();YPt();dj();I2i()});var _va=h(()=>{"use strict";I2i();Vva()});function Qsr(e){let t={parse:(r,n)=>Gva(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>Gva(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>ju.LIST};return{...OS(t),...Pm(t)}}function Gva(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Ld(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 qva=h(()=>{"use strict";aw();Kk();rY();dj()});var B2i=h(()=>{"use strict";qva()});function Wva(e){return BS(ju.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Ld(r,`${e.toString()}`)}]})()}var Hva=h(()=>{"use strict";aw();nY();Kk()});function Kva(e){return BS(ju.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Ld(r,`"${e}"`)}]})()}var Jva=h(()=>{"use strict";aw();nY();Kk()});var Yva=h(()=>{"use strict";Hva();Jva()});var Xva,Zva=h(()=>{"use strict";aw();nY();Xva=BS(ju.ANY,e=>({ok:!0,value:e}))});var $va,exa=h(()=>{"use strict";aw();nY();Kk();$va=BS(ju.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Ld(e,"boolean")}]})});var txa,rxa=h(()=>{"use strict";aw();nY();txa=BS(ju.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var nxa,ixa=h(()=>{"use strict";aw();nY();Kk();nxa=BS(ju.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Ld(e,"number")}]})});var oxa,sxa=h(()=>{"use strict";aw();nY();Kk();oxa=BS(ju.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Ld(e,"string")}]})});var axa,cxa=h(()=>{"use strict";aw();nY();axa=BS(ju.UNKNOWN,e=>({ok:!0,value:e}))});var uxa=h(()=>{"use strict";Zva();exa();rxa();ixa();sxa();cxa()});function pxa(e,t){let r={parse:(n,i)=>lxa({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)=>lxa({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{...OS(r),...Pm(r)}}function lxa({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!Kce(e))return{ok:!1,errors:[{path:i,message:Ld(e,"object")}]};let o={},s=[];for(let a in e){if(!Xlf.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 Xlf,fxa=h(()=>{"use strict";aw();Kk();KPt();rY();dj();Xlf=Object.prototype.hasOwnProperty});var dxa=h(()=>{"use strict";fxa()});function mxa(e){let t=Qsr(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:Ld(n,"Set")}]},getType:()=>ju.SET};return{...OS(r),...Pm(r)}}var hxa=h(()=>{"use strict";aw();Kk();rY();B2i();dj()});var gxa=h(()=>{"use strict";hxa()});function yxa(e){let t={parse:(r,n)=>Axa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>Axa((i,o)=>i.json(r,o),e,n),getType:()=>ju.UNDISCRIMINATED_UNION};return{...OS(t),...Pm(t)}}function Axa(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 bxa=h(()=>{"use strict";aw();rY();dj()});var Exa=h(()=>{"use strict";bxa()});function Ixa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var vxa=h(()=>{"use strict"});function Cxa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=Nsr(JPt(t)),o={parse:(s,a)=>xxa({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)=>xxa({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{...OS(o),...Pm(o),...Yq(o)}}function xxa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!Kce(e))return{ok:!1,errors:[{path:a,message:Ld(e,"object")}]};let c=e[t],u={};for(let f in e)Zlf.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 Zlf,wxa=h(()=>{"use strict";aw();Kk();KPt();C2i();rY();b2i();YPt();dj();Zlf=Object.prototype.hasOwnProperty});var Sxa=h(()=>{"use strict";vxa();wxa()});var Txa=h(()=>{"use strict";Sva();Bva();b2i();_va();B2i();Yva();O2i();YPt();uxa();dxa();dj();gxa();Exa();Sxa()});var pe={};X(pe,{JsonError:()=>B7e,ParseError:()=>P7e,any:()=>Xva,bigint:()=>Cva,boolean:()=>$va,booleanLiteral:()=>Wva,date:()=>Tva,discriminant:()=>Ixa,enum_:()=>Nsr,getObjectLikeUtils:()=>Yq,getObjectUtils:()=>A2e,getSchemaUtils:()=>Pm,isProperty:()=>Jce,lazy:()=>Dva,lazyObject:()=>Uva,list:()=>Qsr,never:()=>txa,number:()=>nxa,object:()=>jsr,objectWithoutOptionalProperties:()=>Mva,optional:()=>A2i,property:()=>jva,record:()=>pxa,set:()=>mxa,string:()=>oxa,stringLiteral:()=>Kva,transform:()=>y2i,undiscriminatedUnion:()=>yxa,union:()=>Cxa,unknown:()=>axa,withParsedProperties:()=>w2i});var Oxa=h(()=>{"use strict";Txa()});var Bxa=h(()=>{"use strict"});var hr=h(()=>{"use strict";bva();Eva();Iva();Oxa();Bxa()});var fo,Bp=h(()=>{"use strict";hr();fo=pe.object({docs:pe.string().optional()})});var R7e,zsr=h(()=>{"use strict";hr();Bp();R7e=pe.object({scheme:pe.string()}).extend(fo)});var Msr,P2i=h(()=>{"use strict";hr();zsr();Msr=pe.undiscriminatedUnion([pe.string(),R7e])});var Lsr,D2i=h(()=>{"use strict";hr();Bp();P2i();Lsr=pe.object({any:pe.list(Msr)}).extend(fo)});var Usr,R2i=h(()=>{"use strict";hr();Usr=pe.object({})});var Vsr,k2i=h(()=>{"use strict";hr();Bp();R2i();Vsr=pe.object({"endpoint-security":Usr}).extend(fo)});var _sr,F2i=h(()=>{"use strict";hr();D2i();zsr();k2i();_sr=pe.undiscriminatedUnion([pe.string(),R7e,Lsr,Vsr])});var $p,Dx=h(()=>{"use strict";hr();$p=pe.object({name:pe.string().optional()})});var k7e,Gsr=h(()=>{"use strict";hr();k7e=pe.object({env:pe.string().optional()})});var y2e,qsr=h(()=>{"use strict";hr();Dx();Gsr();y2e=pe.object({omit:pe.boolean().optional(),placeholder:pe.string().optional()}).extend(k7e).extend($p)});var Wsr,N2i=h(()=>{"use strict";hr();Bp();qsr();Wsr=pe.object({scheme:pe.stringLiteral("basic"),username:y2e.optional(),password:y2e.optional()}).extend(fo)});var Hsr,j2i=h(()=>{"use strict";hr();Hsr=pe.object({"response-property":pe.string(),"header-name":pe.string(),"value-prefix":pe.string().optional()})});var Ksr,Q2i=h(()=>{"use strict";hr();j2i();Ksr=pe.object({endpoint:pe.string(),"expiry-response-property":pe.string().optional(),"authenticated-request-headers":pe.list(Hsr).optional()})});var Jsr,z2i=h(()=>{"use strict";hr();Q2i();Jsr=pe.undiscriminatedUnion([pe.string(),Ksr])});var Ysr,M2i=h(()=>{"use strict";hr();Bp();z2i();Ysr=pe.object({scheme:pe.stringLiteral("bearer"),"get-token":Jsr}).extend(fo)});var Xsr,L2i=h(()=>{"use strict";hr();Bp();qsr();Xsr=pe.object({scheme:pe.stringLiteral("bearer"),token:y2e.optional()}).extend(fo)});var Zsr,U2i=h(()=>{"use strict";hr();M2i();L2i();Zsr=pe.undiscriminatedUnion([Xsr,Ysr])});var $sr,V2i=h(()=>{"use strict";hr();Bp();Dx();Gsr();$sr=pe.object({header:pe.string(),type:pe.string().optional(),prefix:pe.string().optional(),placeholder:pe.string().optional()}).extend(k7e).extend($p).extend(fo)});var F7e,ear=h(()=>{"use strict";hr();F7e=pe.string()});var tar,_2i=h(()=>{"use strict";hr();tar=pe.object({"client-id":pe.string().optional(),"client-secret":pe.string().optional(),scopes:pe.string().optional()})});var rar,G2i=h(()=>{"use strict";hr();rar=pe.object({"access-token":pe.string().optional(),"expires-in":pe.string().optional(),"refresh-token":pe.string().optional()})});var nar,q2i=h(()=>{"use strict";hr();_2i();G2i();nar=pe.object({endpoint:pe.string(),"request-properties":tar.optional(),"response-properties":rar.optional()})});var iar,W2i=h(()=>{"use strict";hr();iar=pe.object({"refresh-token":pe.string()})});var oar,H2i=h(()=>{"use strict";hr();oar=pe.object({"access-token":pe.string().optional(),"expires-in":pe.string().optional(),"refresh-token":pe.string().optional()})});var sar,K2i=h(()=>{"use strict";hr();W2i();H2i();sar=pe.object({endpoint:pe.string(),"request-properties":iar.optional(),"response-properties":oar.optional()})});var aar,J2i=h(()=>{"use strict";hr();Bp();ear();q2i();K2i();aar=pe.object({scheme:pe.stringLiteral("oauth"),type:pe.stringLiteral("client-credentials"),scopes:pe.list(F7e).optional(),"client-id-env":pe.string().optional(),"client-secret-env":pe.string().optional(),"token-prefix":pe.string().optional(),"token-header":pe.string().optional(),"get-token":nar,"refresh-token":sar.optional()}).extend(fo)});var car,Y2i=h(()=>{"use strict";hr();N2i();U2i();V2i();J2i();car=pe.undiscriminatedUnion([aar,$sr,Wsr,Zsr])});var N7e,uar=h(()=>{"use strict";hr();N7e=pe.string()});var lar,X2i=h(()=>{"use strict";hr();F2i();Y2i();uar();lar=pe.object({auth:_sr.optional(),"auth-schemes":pe.record(N7e,car).optional()})});var Z2i=h(()=>{"use strict";P2i();D2i();F2i();Y2i();uar();zsr();ear();qsr();N2i();U2i();k2i();R2i();V2i();j2i();M2i();z2i();Q2i();_2i();G2i();q2i();K2i();W2i();H2i();J2i();L2i();X2i();Gsr()});var $2i={};X($2i,{AnyAuthItem:()=>Msr,AnyAuthSchemesSchema:()=>Lsr,ApiAuthSchema:()=>_sr,AuthSchemeDeclarationSchema:()=>car,AuthSchemeKey:()=>N7e,AuthSchemeReferenceSchema:()=>R7e,AuthScope:()=>F7e,AuthVariable:()=>y2e,BasicAuthSchemeSchema:()=>Wsr,BearerAuthSchemeSchema:()=>Zsr,EndpointSecuritySchema:()=>Vsr,EndpointSecuritySchemaDetails:()=>Usr,HeaderAuthSchemeSchema:()=>$sr,InferredAuthenticatedRequestHeader:()=>Hsr,InferredBearerAuthSchema:()=>Ysr,InferredGetTokenEndpointSchema:()=>Jsr,InferredGetTokenEndpointSchemaObject:()=>Ksr,OAuthAccessTokenRequestPropertiesSchema:()=>tar,OAuthAccessTokenResponsePropertiesSchema:()=>rar,OAuthGetTokenEndpointSchema:()=>nar,OAuthRefreshTokenEndpointSchema:()=>sar,OAuthRefreshTokenRequestPropertiesSchema:()=>iar,OAuthRefreshTokenResponsePropertiesSchema:()=>oar,OAuthSchemeSchema:()=>aar,TokenBearerAuthSchema:()=>Xsr,WithAuthSchema:()=>lar,WithEnvironmentVariable:()=>k7e});var Pxa=h(()=>{"use strict";Z2i()});var j7e,par=h(()=>{"use strict";hr();j7e=pe.enum_(["in-development","pre-release","deprecated","generally-available","alpha","beta","preview","legacy"])});var far,eNi=h(()=>{"use strict";hr();par();far=pe.object({status:j7e,message:pe.string().optional()})});var dar,tNi=h(()=>{"use strict";hr();eNi();par();dar=pe.undiscriminatedUnion([j7e,far])});var rNi=h(()=>{"use strict";eNi();par();tNi()});var nNi={};X(nNi,{AvailabilitySchema:()=>far,AvailabilityStatusSchema:()=>j7e,AvailabilityUnionSchema:()=>dar});var Dxa=h(()=>{"use strict";rNi()});var PS,iY=h(()=>{"use strict";hr();PS=pe.object({audiences:pe.list(pe.string()).optional()})});var BP,Yce=h(()=>{"use strict";hr();tNi();BP=pe.object({availability:dar.optional()})});var oY,Q7e=h(()=>{"use strict";hr();iY();Yce();Bp();oY=pe.object({}).extend(fo).extend(BP).extend(PS)});var Rxa,kxa=h(()=>{"use strict";hr();Q7e();Dx();Rxa=pe.object({}).extend(oY).extend($p)});var mar,iNi=h(()=>{"use strict";hr();iY();Yce();mar=pe.object({}).extend(BP).extend(PS)});var DS,sY=h(()=>{"use strict";hr();DS=pe.object({"display-name":pe.string().optional()})});var har,oNi=h(()=>{"use strict";hr();har=pe.object({"method-name":pe.string().optional()})});var gar,sNi=h(()=>{"use strict";hr();gar=pe.object({minItems:pe.number().optional(),maxItems:pe.number().optional()})});var Aar,aNi=h(()=>{"use strict";hr();Aar=pe.object({minProperties:pe.number().optional(),maxProperties:pe.number().optional()})});var yar,cNi=h(()=>{"use strict";hr();yar=pe.object({min:pe.number().optional(),max:pe.number().optional(),exclusiveMin:pe.boolean().optional(),exclusiveMax:pe.boolean().optional(),multipleOf:pe.number().optional()})});var bar,uNi=h(()=>{"use strict";hr();bar=pe.object({minLength:pe.number().optional(),maxLength:pe.number().optional(),pattern:pe.string().optional(),format:pe.string().optional()})});var HAe,XPt=h(()=>{"use strict";hr();sNi();aNi();cNi();uNi();HAe=pe.undiscriminatedUnion([bar,yar,gar,Aar])});var z7e,Ear=h(()=>{"use strict";hr();XPt();z7e=pe.object({validation:HAe.optional()})});var lNi=h(()=>{"use strict";Q7e();kxa();iNi();iY();Yce();sY();Bp();oNi();Dx();Ear()});var pNi={};X(pNi,{DeclarationSchema:()=>oY,DeclarationWithNameSchema:()=>Rxa,DeclarationWithoutDocsSchema:()=>mar,WithAudiences:()=>PS,WithAvailability:()=>BP,WithDisplayName:()=>DS,WithDocsSchema:()=>fo,WithMethodName:()=>har,WithName:()=>$p,WithValidation:()=>z7e});var Fxa=h(()=>{"use strict";lNi()});var Iar,fNi=h(()=>{"use strict";hr();Iar=pe.object({type:pe.string()})});var M7e,xar=h(()=>{"use strict";hr();fNi();M7e=pe.object({proto:Iar.optional()})});var dNi=h(()=>{"use strict";xar();fNi()});var mNi={};X(mNi,{EncodingSchema:()=>M7e,ProtobufTypeSchema:()=>Iar});var Nxa=h(()=>{"use strict";dNi()});var L7e,Car=h(()=>{"use strict";hr();L7e=pe.object({id:pe.string(),default:pe.string().optional(),values:pe.list(pe.string()).optional()})});var war,hNi=h(()=>{"use strict";hr();iY();Bp();Car();war=pe.object({urls:pe.record(pe.string(),pe.string()),"url-templates":pe.record(pe.string(),pe.string()).optional(),"default-urls":pe.record(pe.string(),pe.string()).optional(),variables:pe.record(pe.string(),pe.list(L7e)).optional()}).extend(PS).extend(fo)});var Sar,gNi=h(()=>{"use strict";hr();iY();Bp();Car();Sar=pe.object({url:pe.string(),"default-url":pe.string().optional(),"url-template":pe.string().optional(),variables:pe.list(L7e).optional()}).extend(PS).extend(fo)});var Tar,ANi=h(()=>{"use strict";hr();hNi();gNi();Tar=pe.undiscriminatedUnion([pe.string(),Sar,war])});var Oar,yNi=h(()=>{"use strict";hr();ANi();Oar=pe.object({"default-url":pe.string().optional(),"default-environment":pe.string().optional(),environments:pe.record(pe.string(),Tar).optional()})});var bNi=h(()=>{"use strict";ANi();hNi();Car();gNi();yNi()});var ENi={};X(ENi,{EnvironmentSchema:()=>Tar,MultipleBaseUrlsEnvironmentSchema:()=>war,ServerVariableSchema:()=>L7e,SingleBaseUrlEnvironmentSchema:()=>Sar,WithEnvironmentsSchema:()=>Oar});var jxa=h(()=>{"use strict";bNi()});var Bar,INi=h(()=>{"use strict";hr();Bar=pe.unknown()});var U7e,Par=h(()=>{"use strict";hr();Bp();Dx();INi();U7e=pe.object({value:Bar}).extend($p).extend(fo)});var Dar,vNi=h(()=>{"use strict";hr();Bp();Par();Dar=pe.object({"status-code":pe.number(),type:pe.string().optional(),examples:pe.list(U7e).optional()}).extend(fo)});var xNi=h(()=>{"use strict";vNi()});var CNi={};X(CNi,{ErrorDeclarationSchema:()=>Dar});var Qxa=h(()=>{"use strict";xNi()});var cw,KAe=h(()=>{"use strict";hr();cw=pe.unknown()});var Rar,wNi=h(()=>{"use strict";hr();KAe();Rar=pe.object({error:pe.string().optional(),body:cw.optional()})});var kar,SNi=h(()=>{"use strict";hr();Bp();Dx();kar=pe.object({language:pe.string(),code:pe.string(),install:pe.string().optional()}).extend(fo).extend($p)});var Far,TNi=h(()=>{"use strict";hr();Far=pe.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","js","node","ts","nodets","golang","dotnet","jvm","c#"])});var Nar,ONi=h(()=>{"use strict";hr();Bp();Dx();TNi();Nar=pe.object({sdk:Far,code:pe.string()}).extend(fo).extend($p)});var jar,BNi=h(()=>{"use strict";hr();SNi();ONi();jar=pe.undiscriminatedUnion([Nar,kar])});var Qar,PNi=h(()=>{"use strict";hr();KAe();Qar=pe.object({event:pe.string(),data:cw.optional()})});var zar,DNi=h(()=>{"use strict";hr();PNi();zar=pe.object({stream:pe.list(Qar)})});var Mar,RNi=h(()=>{"use strict";hr();KAe();Mar=pe.object({stream:pe.list(cw)})});var Lar,kNi=h(()=>{"use strict";hr();wNi();DNi();RNi();Lar=pe.undiscriminatedUnion([Rar,Mar,zar])});var V7e,Uar=h(()=>{"use strict";hr();Bp();Dx();BNi();kNi();KAe();V7e=pe.object({id:pe.string().optional(),"path-parameters":pe.record(pe.string(),cw).optional(),"query-parameters":pe.record(pe.string(),cw).optional(),headers:pe.record(pe.string(),cw).optional(),request:cw.optional(),response:Lar.optional(),"code-samples":pe.list(jar).optional()}).extend($p).extend(fo)});var zxa,Mxa=h(()=>{"use strict";hr();Uar();zxa=pe.list(V7e)});var Var,FNi=h(()=>{"use strict";hr();Bp();Dx();KAe();Var=pe.object({id:pe.string().optional(),payload:cw}).extend($p).extend(fo)});var _ar,NNi=h(()=>{"use strict";hr();_ar=pe.object({type:pe.string(),body:pe.unknown()})});var Gar,jNi=h(()=>{"use strict";hr();Bp();Dx();KAe();NNi();Gar=pe.object({"path-parameters":pe.record(pe.string(),cw).optional(),"query-parameters":pe.record(pe.string(),cw).optional(),headers:pe.record(pe.string(),cw).optional(),messages:pe.list(_ar)}).extend($p).extend(fo)});var QNi=h(()=>{"use strict";wNi();BNi();SNi();ONi();Mxa();Uar();kNi();PNi();DNi();RNi();KAe();Par();INi();FNi();NNi();jNi();TNi()});var zNi={};X(zNi,{ExampleBodyResponseSchema:()=>Rar,ExampleCodeSampleSchema:()=>jar,ExampleCodeSampleSchemaLanguage:()=>kar,ExampleCodeSampleSchemaSdk:()=>Nar,ExampleEndpointCallArraySchema:()=>zxa,ExampleEndpointCallSchema:()=>V7e,ExampleResponseSchema:()=>Lar,ExampleSseEventSchema:()=>Qar,ExampleSseResponseSchema:()=>zar,ExampleStreamResponseSchema:()=>Mar,ExampleTypeReferenceSchema:()=>cw,ExampleTypeSchema:()=>U7e,ExampleTypeValueSchema:()=>Bar,ExampleWebSocketMessage:()=>_ar,ExampleWebSocketSession:()=>Gar,ExampleWebhookCallSchema:()=>Var,SupportedSdkLanguageSchema:()=>Far});var Lxa=h(()=>{"use strict";QNi()});var qar,MNi=h(()=>{"use strict";hr();qar=pe.object({openapi:pe.string()})});var War,LNi=h(()=>{"use strict";hr();War=pe.object({proto:pe.string()})});var JAe,ZPt=h(()=>{"use strict";hr();MNi();LNi();JAe=pe.undiscriminatedUnion([qar,War])});var _7e,Har=h(()=>{"use strict";hr();Yce();Bp();xar();XPt();_7e=pe.object({default:pe.unknown().optional(),"client-default":pe.unknown().optional(),encoding:M7e.optional(),validation:HAe.optional()}).extend(fo).extend(BP)});var Kar,UNi=h(()=>{"use strict";hr();iY();Dx();Har();Kar=pe.object({type:pe.string()}).extend(_7e).extend($p).extend(PS)});var Xq,G7e=h(()=>{"use strict";hr();UNi();Xq=pe.undiscriminatedUnion([pe.string(),Kar])});var Jar,VNi=h(()=>{"use strict";hr();uar();ear();Jar=pe.record(N7e,pe.list(F7e))});var Yar,_Ni=h(()=>{"use strict";hr();VNi();Yar=pe.list(Jar)});var Xar,GNi=h(()=>{"use strict";hr();_Ni();Xar=pe.undiscriminatedUnion([pe.boolean(),Yar])});var Zar,qNi=h(()=>{"use strict";hr();Zar=pe.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var $ar,WNi=h(()=>{"use strict";hr();Yce();Bp();$ar=pe.object({variable:pe.string()}).extend(BP).extend(fo)});var aY,q7e=h(()=>{"use strict";hr();G7e();WNi();aY=pe.undiscriminatedUnion([Xq,$ar])});var hU,b2e=h(()=>{"use strict";hr();iY();Dx();Har();hU=pe.object({type:pe.string()}).extend(_7e).extend($p).extend(PS)});var ecr,HNi=h(()=>{"use strict";hr();b2e();ecr=pe.object({env:pe.string().optional()}).extend(hU)});var tcr,KNi=h(()=>{"use strict";hr();HNi();tcr=pe.undiscriminatedUnion([pe.string(),ecr])});var gU,E2e=h(()=>{"use strict";KNi();gU=tcr});var rcr,JNi=h(()=>{"use strict";hr();b2e();rcr=pe.object({"allow-multiple":pe.boolean().optional(),explode:pe.boolean().optional()}).extend(hU)});var W7e,ncr=h(()=>{"use strict";hr();JNi();W7e=pe.undiscriminatedUnion([pe.string(),rcr])});var AU,I2e=h(()=>{"use strict";hr();AU=pe.undiscriminatedUnion([pe.string(),pe.list(pe.string())])});var icr,YNi=h(()=>{"use strict";hr();icr=pe.enum_(["json","exploded","form"])});var ocr,XNi=h(()=>{"use strict";hr();b2e();YNi();ocr=pe.object({style:icr.optional(),"content-type":pe.string().optional()}).extend(hU)});var scr,ZNi=h(()=>{"use strict";hr();XNi();scr=pe.undiscriminatedUnion([pe.string(),ocr])});var acr,$Ni=h(()=>{"use strict";hr();I2e();ZNi();acr=pe.object({extends:AU.optional(),"extra-properties":pe.boolean().optional(),properties:pe.record(pe.string(),scr).optional()})});var ccr,eji=h(()=>{"use strict";hr();Bp();ccr=pe.object({type:pe.string()}).extend(fo)});var ucr,tji=h(()=>{"use strict";hr();$Ni();eji();ucr=pe.undiscriminatedUnion([pe.string(),ccr,acr])});var lcr,rji=h(()=>{"use strict";hr();Bp();Dx();E2e();q7e();ncr();tji();lcr=pe.object({"content-type":pe.string().optional(),"path-parameters":pe.record(pe.string(),aY).optional(),"query-parameters":pe.record(pe.string(),W7e).optional(),headers:pe.record(pe.string(),gU).optional(),body:ucr.optional()}).extend($p).extend(fo)});var pcr,nji=h(()=>{"use strict";hr();rji();pcr=pe.undiscriminatedUnion([pe.string(),lcr])});var fcr,iji=h(()=>{"use strict";hr();Bp();fcr=pe.object({type:pe.string().optional(),property:pe.string().optional(),"status-code":pe.number().optional(),"content-type":pe.string().optional()}).extend(fo)});var H7e,dcr=h(()=>{"use strict";hr();iji();H7e=pe.undiscriminatedUnion([pe.string(),fcr])});var mcr,oji=h(()=>{"use strict";hr();mcr=pe.enum_(["sse","json"])});var hcr,sji=h(()=>{"use strict";hr();Bp();oji();hcr=pe.object({type:pe.string(),format:mcr.optional(),terminator:pe.string().optional(),resumable:pe.boolean().optional()}).extend(fo)});var K7e,gcr=h(()=>{"use strict";hr();sji();K7e=pe.undiscriminatedUnion([pe.string(),hcr])});var Acr,aji=h(()=>{"use strict";hr();Acr=pe.object({cursor:pe.string(),next_cursor:pe.string(),results:pe.string()})});var ycr,cji=h(()=>{"use strict";hr();ycr=pe.object({type:pe.stringLiteral("custom"),results:pe.string()})});var bcr,uji=h(()=>{"use strict";hr();bcr=pe.object({offset:pe.string(),results:pe.string(),step:pe.string().optional(),"has-next-page":pe.string().optional()})});var Ecr,lji=h(()=>{"use strict";hr();Ecr=pe.object({next_path:pe.string(),results:pe.string()})});var Icr,pji=h(()=>{"use strict";hr();Icr=pe.object({next_uri:pe.string(),results:pe.string()})});var J7e,vcr=h(()=>{"use strict";hr();aji();cji();uji();lji();pji();J7e=pe.undiscriminatedUnion([Acr,bcr,ycr,Icr,Ecr])});var xcr,fji=h(()=>{"use strict";hr();vcr();xcr=pe.undiscriminatedUnion([J7e,pe.boolean()])});var Ccr,dji=h(()=>{"use strict";hr();Bp();Ccr=pe.object({error:pe.string()}).extend(fo)});var wcr,mji=h(()=>{"use strict";hr();dji();wcr=pe.undiscriminatedUnion([pe.string(),Ccr])});var Scr,hji=h(()=>{"use strict";hr();mji();Scr=pe.list(wcr)});var Tcr,gji=h(()=>{"use strict";hr();Tcr=pe.object({disabled:pe.boolean().optional()})});var Ocr,Aji=h(()=>{"use strict";hr();gji();Ocr=pe.undiscriminatedUnion([Tcr])});var Bcr,yji=h(()=>{"use strict";hr();Bcr=pe.object({"service-name":pe.string()})});var Y7e,Pcr=h(()=>{"use strict";hr();yji();Y7e=pe.object({grpc:Bcr.optional()})});var Dcr,bji=h(()=>{"use strict";hr();Q7e();sY();Uar();ZPt();GNi();qNi();q7e();nji();dcr();gcr();fji();hji();Aji();Pcr();Dcr=pe.object({method:Zar.optional(),"base-path":pe.string().optional(),path:pe.string(),url:pe.string().optional(),"path-parameters":pe.record(pe.string(),aY).optional(),auth:Xar.optional(),idempotent:pe.boolean().optional(),subtitle:pe.string().optional(),"stream-condition":pe.string().optional(),request:pcr.optional(),response:H7e.optional(),"response-stream":K7e.optional(),errors:Scr.optional(),examples:pe.list(V7e).optional(),pagination:xcr.optional(),transport:Y7e.optional(),source:JAe.optional(),retries:Ocr.optional(),"global-parameters":pe.list(pe.string()).optional()}).extend(DS).extend(oY)});var Rcr,Eji=h(()=>{"use strict";hr();iNi();sY();ZPt();G7e();bji();Pcr();Rcr=pe.object({auth:pe.boolean().optional(),url:pe.string().optional(),"base-path":pe.string(),"path-parameters":pe.record(pe.string(),Xq).optional(),idempotent:pe.boolean().optional(),headers:pe.record(pe.string(),Xq).optional(),transport:Y7e.optional(),source:JAe.optional(),endpoints:pe.record(pe.string(),Dcr)}).extend(mar).extend(DS)});var yU,v2e=h(()=>{"use strict";hr();iY();Yce();Bp();xar();Par();ZPt();yU=pe.object({examples:pe.list(U7e).optional(),encoding:M7e.optional(),source:JAe.optional(),inline:pe.boolean().optional()}).extend(fo).extend(BP).extend(PS)});var kcr,Iji=h(()=>{"use strict";hr();XPt();v2e();kcr=pe.object({type:pe.string(),validation:HAe.optional()}).extend(yU)});var Fcr,vji=h(()=>{"use strict";hr();Dx();Fcr=pe.object({value:pe.string()}).extend($p)});var Ncr,xji=h(()=>{"use strict";hr();vji();Ncr=pe.undiscriminatedUnion([pe.string(),Fcr])});var jcr,Cji=h(()=>{"use strict";hr();Yce();sY();Bp();Dx();Ear();xji();jcr=pe.object({type:pe.string().optional(),key:Ncr.optional()}).extend(fo).extend($p).extend(BP).extend(DS).extend(z7e)});var Qcr,wji=h(()=>{"use strict";hr();Cji();Qcr=pe.undiscriminatedUnion([pe.string(),jcr])});var zcr,Sji=h(()=>{"use strict";hr();zcr=pe.enum_(["data","protocol"])});var Mcr,Tji=h(()=>{"use strict";hr();Dx();Sji();Mcr=pe.object({value:pe.string(),context:zcr.optional()}).extend($p)});var Lcr,Oji=h(()=>{"use strict";hr();Tji();Lcr=pe.undiscriminatedUnion([pe.string(),Mcr])});var Ucr,Bji=h(()=>{"use strict";hr();v2e();I2e();wji();G7e();Oji();Ucr=pe.object({discriminant:Lcr.optional(),extends:AU.optional(),"base-properties":pe.record(pe.string(),Xq).optional(),union:pe.record(pe.string(),Qcr),"default-variant":pe.string().optional()}).extend(yU)});var Vcr,Pji=h(()=>{"use strict";hr();Vcr=pe.object({camel:pe.string().optional(),snake:pe.string().optional(),pascal:pe.string().optional(),"screaming-snake":pe.string().optional()})});var _cr,Dji=h(()=>{"use strict";hr();Bp();Dx();Pji();_cr=pe.object({value:pe.string(),casing:Vcr.optional()}).extend(fo).extend($p)});var Gcr,Rji=h(()=>{"use strict";hr();Dji();Gcr=pe.undiscriminatedUnion([pe.string(),_cr])});var qcr,kji=h(()=>{"use strict";hr();v2e();Rji();qcr=pe.object({default:pe.string().optional(),enum:pe.list(Gcr),"forward-compatible":pe.boolean().optional()}).extend(yU)});var Wcr,Fji=h(()=>{"use strict";hr();Wcr=pe.enum_(["read-only","write-only"])});var Hcr,Nji=h(()=>{"use strict";hr();Fji();b2e();Hcr=pe.object({access:Wcr.optional()}).extend(hU)});var YAe,$Pt=h(()=>{"use strict";hr();Nji();YAe=pe.undiscriminatedUnion([pe.string(),Hcr])});var Kcr,jji=h(()=>{"use strict";hr();v2e();I2e();$Pt();Kcr=pe.object({extends:AU.optional(),properties:pe.record(pe.string(),YAe).optional(),"extra-properties":pe.boolean().optional()}).extend(yU)});var Jcr,Qji=h(()=>{"use strict";hr();sY();Bp();Ear();Jcr=pe.object({type:pe.string()}).extend(fo).extend(DS).extend(z7e)});var Ycr,zji=h(()=>{"use strict";hr();Qji();Ycr=pe.undiscriminatedUnion([pe.string(),Jcr])});var Xcr,Mji=h(()=>{"use strict";hr();v2e();zji();G7e();Xcr=pe.object({discriminated:pe.booleanLiteral(!1),"base-properties":pe.record(pe.string(),Xq).optional(),union:pe.list(Ycr)}).extend(yU)});var Zcr,Lji=h(()=>{"use strict";hr();Iji();Bji();kji();jji();Mji();Zcr=pe.undiscriminatedUnion([pe.string(),Kcr,qcr,Ucr,Xcr,kcr])});var $cr,Uji=h(()=>{"use strict";hr();$cr=pe.enum_(["POST","GET"])});var eur,Vji=h(()=>{"use strict";hr();I2e();$Pt();eur=pe.object({name:pe.string(),extends:AU.optional(),properties:pe.record(pe.string(),YAe).optional()})});var tur,_ji=h(()=>{"use strict";hr();Bp();tur=pe.object({type:pe.string()}).extend(fo)});var rur,Gji=h(()=>{"use strict";hr();Vji();_ji();rur=pe.undiscriminatedUnion([pe.string(),tur,eur])});var nur,qji=h(()=>{"use strict";hr();nur=pe.enum_(["rsa-sha256","rsa-sha384","rsa-sha512","ecdsa-sha256","ecdsa-sha384","ecdsa-sha512","ed25519"])});var iur,Wji=h(()=>{"use strict";hr();iur=pe.enum_(["alphabetical"])});var our,Hji=h(()=>{"use strict";hr();our=pe.enum_(["body","timestamp","notification-url","message-id"])});var X7e,sur=h(()=>{"use strict";hr();Wji();Hji();X7e=pe.object({components:pe.list(our),delimiter:pe.string().optional(),"body-sort":iur.optional()})});var XAe,eDt=h(()=>{"use strict";hr();XAe=pe.enum_(["base64","hex"])});var aur,Kji=h(()=>{"use strict";hr();aur=pe.enum_(["unix-seconds","unix-millis","iso8601"])});var Z7e,cur=h(()=>{"use strict";hr();Kji();Z7e=pe.object({header:pe.string(),format:aur.optional(),tolerance:pe.number().optional()})});var uur,Jji=h(()=>{"use strict";hr();qji();sur();eDt();cur();uur=pe.object({header:pe.string(),"asymmetric-algorithm":nur,encoding:XAe.optional(),"signature-prefix":pe.string().optional(),"jwks-url":pe.string().optional(),"key-id-header":pe.string().optional(),"payload-format":X7e.optional(),timestamp:Z7e.optional()})});var lur,Yji=h(()=>{"use strict";hr();lur=pe.enum_(["sha256","sha1","sha384","sha512"])});var pur,Xji=h(()=>{"use strict";hr();pur=pe.object({name:pe.string()})});var fur,Zji=h(()=>{"use strict";hr();Xji();fur=pe.union("type",{"query-parameter":pur}).transform({transform:e=>e,untransform:e=>e})});var dur,$ji=h(()=>{"use strict";hr();Yji();Zji();eDt();dur=pe.object({algorithm:lur,encoding:XAe.optional(),location:fur})});var mur,eQi=h(()=>{"use strict";hr();mur=pe.enum_(["sha256","sha1","sha384","sha512"])});var hur,tQi=h(()=>{"use strict";hr();$ji();sur();eQi();eDt();cur();hur=pe.object({header:pe.string(),algorithm:mur.optional(),encoding:XAe.optional(),"signature-prefix":pe.string().optional(),"payload-format":X7e.optional(),timestamp:Z7e.optional(),"body-hash-binding":dur.optional()})});var $7e,gur=h(()=>{"use strict";hr();Jji();tQi();$7e=pe.union("type",{hmac:hur,asymmetric:uur}).transform({transform:e=>e,untransform:e=>e})});var Aur,rQi=h(()=>{"use strict";hr();iY();Yce();sY();Bp();FNi();E2e();dcr();gcr();Uji();Gji();gur();Aur=pe.object({method:$cr,headers:pe.record(pe.string(),gU).optional(),payload:rur,signature:$7e.optional(),response:H7e.optional(),"response-stream":K7e.optional(),examples:pe.list(Var).optional()}).extend(BP).extend(PS).extend(fo).extend(DS)});var yur,nQi=h(()=>{"use strict";hr();I2e();$Pt();yur=pe.object({name:pe.string(),extends:AU.optional(),properties:pe.record(pe.string(),YAe).optional()})});var bur,iQi=h(()=>{"use strict";hr();Bp();bur=pe.object({type:pe.string()}).extend(fo)});var Eur,oQi=h(()=>{"use strict";hr();nQi();iQi();Eur=pe.undiscriminatedUnion([pe.string(),bur,yur])});var Iur,sQi=h(()=>{"use strict";hr();Iur=pe.enum_(["client","server"])});var vur,aQi=h(()=>{"use strict";hr();Q7e();sY();oNi();oQi();sQi();vur=pe.object({origin:Iur,body:Eur}).extend(oY).extend(DS).extend(har)});var xur,cQi=h(()=>{"use strict";hr();Q7e();sY();jNi();E2e();q7e();ncr();aQi();xur=pe.object({auth:pe.boolean(),url:pe.string().optional(),path:pe.string(),"connect-method-name":pe.string().optional(),headers:pe.record(pe.string(),gU).optional(),"path-parameters":pe.record(pe.string(),aY).optional(),"query-parameters":pe.record(pe.string(),W7e).optional(),messages:pe.record(pe.string(),vur).optional(),examples:pe.list(Gar).optional()}).extend(oY).extend(DS)});var Cur,uQi=h(()=>{"use strict";hr();Bp();vNi();Eji();Lji();rQi();gur();cQi();Cur=pe.object({imports:pe.record(pe.string(),pe.string()).optional(),types:pe.record(pe.string(),Zcr).optional(),service:Rcr.optional(),errors:pe.record(pe.string(),Dar).optional(),webhooks:pe.record(pe.string(),Aur).optional(),"webhook-signature":$7e.optional(),channel:xur.optional()}).extend(fo)});var wur,lQi=h(()=>{"use strict";hr();wur=pe.object({strategy:pe.stringLiteral("property"),"property-name":pe.string()})});var Sur,pQi=h(()=>{"use strict";hr();Sur=pe.object({strategy:pe.stringLiteral("status-code")})});var Tur,fQi=h(()=>{"use strict";hr();lQi();pQi();Tur=pe.undiscriminatedUnion([wur,Sur])});var Our,dQi=h(()=>{"use strict";hr();Our=pe.object({dependency:pe.string(),url:pe.string().optional()})});var Bur,mQi=h(()=>{"use strict";hr();dQi();Bur=pe.undiscriminatedUnion([pe.string(),Our])});var Pur,hQi=h(()=>{"use strict";hr();Pur=pe.undiscriminatedUnion([pe.string(),pe.list(pe.string())])});var Uxa,Vxa=h(()=>{"use strict";hr();uQi();mQi();hQi();Uxa=pe.object({navigation:Pur.optional(),export:Bur.optional()}).extend(Cur)});var Dur,gQi=h(()=>{"use strict";hr();Bp();Dur=pe.object({in:pe.string().optional(),target:pe.string().optional(),type:pe.string().optional(),env:pe.string().optional(),default:pe.unknown().optional(),optional:pe.boolean().optional(),apply:pe.string().optional(),"parameter-name":pe.string().optional()}).extend(fo)});var Rur,AQi=h(()=>{"use strict";hr();Rur=pe.object({name:pe.string().optional(),env:pe.string().optional(),value:pe.string()})});var kur,yQi=h(()=>{"use strict";hr();AQi();kur=pe.undiscriminatedUnion([pe.string(),Rur])});var Fur,bQi=h(()=>{"use strict";hr();Fur=pe.object({name:pe.string().optional(),env:pe.string().optional(),value:pe.string()})});var Nur,EQi=h(()=>{"use strict";hr();bQi();Nur=pe.undiscriminatedUnion([pe.string(),Fur])});var jur,IQi=h(()=>{"use strict";hr();Bp();Dx();jur=pe.object({value:pe.string()}).extend(fo).extend($p)});var Qur,vQi=h(()=>{"use strict";hr();IQi();Qur=pe.undiscriminatedUnion([pe.string(),jur])});var eWe,zur=h(()=>{"use strict";hr();EQi();vQi();eWe=pe.object({default:pe.string().optional(),values:pe.list(Qur),header:Nur})});var Mur,xQi=h(()=>{"use strict";hr();Bp();Dx();zur();Mur=pe.object({value:pe.string(),versions:eWe.optional()}).extend(fo).extend($p)});var Lur,CQi=h(()=>{"use strict";hr();xQi();Lur=pe.undiscriminatedUnion([pe.string(),Mur])});var Uur,wQi=h(()=>{"use strict";hr();yQi();CQi();Uur=pe.object({default:pe.string().optional(),values:pe.list(Lur),header:kur})});var Vur,SQi=h(()=>{"use strict";hr();Bp();Vur=pe.object({type:pe.string()}).extend(fo)});var _ur,TQi=h(()=>{"use strict";hr();SQi();_ur=pe.undiscriminatedUnion([pe.string(),Vur])});var Gur,OQi=h(()=>{"use strict";hr();E2e();Gur=pe.object({headers:pe.record(pe.string(),gU).optional()})});var _xa,Gxa=h(()=>{"use strict";hr();X2i();sY();Bp();yNi();gQi();vcr();wQi();E2e();q7e();TQi();zur();fQi();OQi();_xa=pe.object({name:pe.string(),imports:pe.record(pe.string(),pe.string()).optional(),"error-discrimination":Tur.optional(),audiences:pe.list(pe.string()).optional(),errors:pe.list(pe.string()).optional(),"base-path":pe.string().optional(),"path-parameters":pe.record(pe.string(),aY).optional(),"idempotency-headers":pe.record(pe.string(),gU).optional(),variables:pe.record(pe.string(),_ur).optional(),"global-parameters":pe.record(pe.string(),Dur).optional(),pagination:J7e.optional(),product:Uur.optional(),version:eWe.optional()}).extend(fo).extend(DS).extend(Oar).extend(lar).extend(Gur)});var BQi=h(()=>{"use strict";uQi();fQi();mQi();dQi();hQi();Vxa();lQi();Gxa();pQi();OQi()});var PQi={};X(PQi,{DefinitionFileSchema:()=>Cur,ErrorDiscriminationSchema:()=>Tur,Export:()=>Bur,ExportDetailed:()=>Our,Navigation:()=>Pur,PackageMarkerFileSchema:()=>Uxa,PropertyBasedErrorDiscrimination:()=>wur,RootApiFileSchema:()=>_xa,StatusCodeBasedErrorDiscrimination:()=>Sur,WithHeadersSchema:()=>Gur});var qxa=h(()=>{"use strict";BQi()});var DQi=h(()=>{"use strict";gQi()});var RQi={};X(RQi,{GlobalParameterDeclarationSchema:()=>Dur});var Wxa=h(()=>{"use strict";DQi()});var kQi=h(()=>{"use strict";aji();cji();uji();vcr();lji();pji()});var FQi={};X(FQi,{CursorPaginationSchema:()=>Acr,CustomPaginationSchema:()=>ycr,OffsetPaginationSchema:()=>bcr,PaginationSchema:()=>J7e,PathPaginationSchema:()=>Ecr,UriPaginationSchema:()=>Icr});var Hxa=h(()=>{"use strict";kQi()});var NQi=h(()=>{"use strict";AQi();yQi();wQi();CQi();xQi()});var jQi={};X(jQi,{ProductDeclarationHeaderObjectSchema:()=>Rur,ProductDeclarationHeaderSchema:()=>kur,ProductDeclarationSchema:()=>Uur,ProductValue:()=>Lur,ProductValueDetailed:()=>Mur});var Kxa=h(()=>{"use strict";NQi()});var QQi=h(()=>{"use strict";YNi();yji();GNi();bji();_Ni();VNi();E2e();XNi();ZNi();$Ni();qNi();q7e();ncr();eji();nji();tji();rji();dcr();iji();gcr();sji();Eji();fji();JNi();mji();hji();dji();Aji();gji();Pcr();oji();KNi();HNi()});var zQi={};X(zQi,{FormDataBodyEncodingStyle:()=>icr,GrpcTransport:()=>Bcr,HttpEndpointAuth:()=>Xar,HttpEndpointSchema:()=>Dcr,HttpEndpointSecurity:()=>Yar,HttpEndpointSecurityItem:()=>Jar,HttpHeaderSchema:()=>gU,HttpInlineFileRequestBodyPropertySchema:()=>ocr,HttpInlineRequestBodyPropertySchema:()=>scr,HttpInlineRequestBodySchema:()=>acr,HttpMethodSchema:()=>Zar,HttpPathParameterSchema:()=>aY,HttpQueryParameterSchema:()=>W7e,HttpReferencedRequestBodySchema:()=>ccr,HttpRequest:()=>pcr,HttpRequestBodySchema:()=>ucr,HttpRequestSchema:()=>lcr,HttpResponseSchema:()=>H7e,HttpResponseSchemaDetailed:()=>fcr,HttpResponseStreamSchema:()=>K7e,HttpResponseStreamSchemaDetailed:()=>hcr,HttpServiceSchema:()=>Rcr,Pagination:()=>xcr,QueryParameterTypeReferenceDetailed:()=>rcr,ResponseError:()=>wcr,ResponseErrorWithDocsSchema:()=>Ccr,ResponseErrorsSchema:()=>Scr,RetriesConfiguration:()=>Ocr,RetriesDisabledSchema:()=>Tcr,ServiceTransport:()=>Y7e,StreamFormat:()=>mcr,TypeReferenceDeclarationWithEnvOverride:()=>tcr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>ecr});var Jxa=h(()=>{"use strict";QQi()});var MQi=h(()=>{"use strict";MNi();LNi();ZPt()});var LQi={};X(LQi,{OpenApiSourceSchema:()=>qar,ProtobufSourceSchema:()=>War,SourceSchema:()=>JAe});var Yxa=h(()=>{"use strict";MQi()});var Xxa,Zxa=h(()=>{"use strict";hr();b2e();Xxa=pe.undiscriminatedUnion([pe.string(),hU])});var UQi=h(()=>{"use strict";Iji();v2e();Har();Pji();Bji();kji();Rji();Dji();I2e();Fji();$Pt();Nji();jji();Qji();zji();Cji();xji();vji();wji();Lji();b2e();Zxa();UNi();G7e();Mji();Oji();Tji();Sji()});var VQi={};X(VQi,{AliasSchema:()=>kcr,BaseTypeDeclarationSchema:()=>yU,BaseTypeReferenceSchema:()=>_7e,CasingOverridesSchema:()=>Vcr,DiscriminatedUnionSchema:()=>Ucr,EnumSchema:()=>qcr,EnumValue:()=>Gcr,EnumValueSchema:()=>_cr,ObjectExtendsSchema:()=>AU,ObjectPropertyAccess:()=>Wcr,ObjectPropertySchema:()=>YAe,ObjectPropertyWithAccessSchema:()=>Hcr,ObjectSchema:()=>Kcr,SingleUndiscriminatedUnionTypeDetailedSchema:()=>Jcr,SingleUndiscriminatedUnionTypeSchema:()=>Ycr,SingleUnionTypeDetailedSchema:()=>jcr,SingleUnionTypeKey:()=>Ncr,SingleUnionTypeKeySchema:()=>Fcr,SingleUnionTypeSchema:()=>Qcr,TypeDeclarationSchema:()=>Zcr,TypeReferenceDeclarationWithName:()=>hU,TypeReferenceDeclarationWithNameSchema:()=>Xxa,TypeReferenceDetailedSchema:()=>Kar,TypeReferenceSchema:()=>Xq,UndiscriminatedUnionSchema:()=>Xcr,UnionDiscriminant:()=>Lcr,UnionDiscriminantSchema:()=>Mcr,UnionDiscriminatorContext:()=>zcr});var $xa=h(()=>{"use strict";UQi()});var _Qi=h(()=>{"use strict";sNi();aNi();cNi();uNi();XPt()});var GQi={};X(GQi,{ListValidationSchema:()=>gar,MapValidationSchema:()=>Aar,NumberValidationSchema:()=>yar,StringValidationSchema:()=>bar,ValidationSchema:()=>HAe});var eCa=h(()=>{"use strict";_Qi()});var qQi=h(()=>{"use strict";SQi();TQi();WNi()});var WQi={};X(WQi,{VariableDeclarationDetailed:()=>Vur,VariableDeclarationSchema:()=>_ur,VariableReferenceSchema:()=>$ar});var tCa=h(()=>{"use strict";qQi()});var HQi=h(()=>{"use strict";bQi();EQi();zur();vQi();IQi()});var KQi={};X(KQi,{VersionDeclarationHeaderObjectSchema:()=>Fur,VersionDeclarationHeaderSchema:()=>Nur,VersionDeclarationSchema:()=>eWe,VersionValue:()=>Qur,VersionValueDetailed:()=>jur});var rCa=h(()=>{"use strict";HQi()});var JQi=h(()=>{"use strict";qji();Jji();tQi();Yji();$ji();Zji();Xji();Vji();Uji();Wji();Hji();sur();Gji();_ji();rQi();eQi();eDt();gur();Kji();cur()});var YQi={};X(YQi,{AsymmetricAlgorithmSchema:()=>nur,AsymmetricSignatureSchema:()=>uur,HmacSignatureSchema:()=>hur,WebhookBodyHashAlgorithmSchema:()=>lur,WebhookBodyHashBindingSchema:()=>dur,WebhookBodyHashLocationSchema:()=>fur,WebhookBodyHashQueryParameterLocationSchema:()=>pur,WebhookInlinedPayloadSchema:()=>eur,WebhookMethodSchema:()=>$cr,WebhookPayloadBodySortSchema:()=>iur,WebhookPayloadComponentSchema:()=>our,WebhookPayloadFormatSchema:()=>X7e,WebhookPayloadSchema:()=>rur,WebhookReferencedPayloadSchema:()=>tur,WebhookSchema:()=>Aur,WebhookSignatureAlgorithmSchema:()=>mur,WebhookSignatureEncodingSchema:()=>XAe,WebhookSignatureSchema:()=>$7e,WebhookTimestampFormatSchema:()=>aur,WebhookTimestampSchema:()=>Z7e});var nCa=h(()=>{"use strict";JQi()});var XQi=h(()=>{"use strict";nQi();oQi();aQi();iQi();cQi();sQi()});var ZQi={};X(ZQi,{WebSocketChannelInlinedMessageSchema:()=>yur,WebSocketChannelMessageBodySchema:()=>Eur,WebSocketChannelMessageSchema:()=>vur,WebSocketChannelReferencedMessageSchema:()=>bur,WebSocketChannelSchema:()=>xur,WebSocketOrigin:()=>Iur});var iCa=h(()=>{"use strict";XQi()});var oCa=h(()=>{"use strict";Pxa();Z2i();Dxa();rNi();Fxa();lNi();Nxa();dNi();jxa();bNi();Qxa();xNi();Lxa();QNi();qxa();BQi();Wxa();DQi();Hxa();kQi();Kxa();NQi();Jxa();QQi();Yxa();MQi();$xa();UQi();eCa();_Qi();tCa();qQi();rCa();HQi();nCa();JQi();iCa();XQi()});var $Qi={};X($Qi,{AliasSchema:()=>kcr,AnyAuthItem:()=>Msr,AnyAuthSchemesSchema:()=>Lsr,ApiAuthSchema:()=>_sr,AsymmetricAlgorithmSchema:()=>nur,AsymmetricSignatureSchema:()=>uur,AuthSchemeDeclarationSchema:()=>car,AuthSchemeKey:()=>N7e,AuthSchemeReferenceSchema:()=>R7e,AuthScope:()=>F7e,AuthVariable:()=>y2e,AvailabilitySchema:()=>far,AvailabilityStatusSchema:()=>j7e,AvailabilityUnionSchema:()=>dar,BaseTypeDeclarationSchema:()=>yU,BaseTypeReferenceSchema:()=>_7e,BasicAuthSchemeSchema:()=>Wsr,BearerAuthSchemeSchema:()=>Zsr,CasingOverridesSchema:()=>Vcr,CursorPaginationSchema:()=>Acr,CustomPaginationSchema:()=>ycr,DeclarationSchema:()=>oY,DeclarationWithNameSchema:()=>Rxa,DeclarationWithoutDocsSchema:()=>mar,DefinitionFileSchema:()=>Cur,DiscriminatedUnionSchema:()=>Ucr,EncodingSchema:()=>M7e,EndpointSecuritySchema:()=>Vsr,EndpointSecuritySchemaDetails:()=>Usr,EnumSchema:()=>qcr,EnumValue:()=>Gcr,EnumValueSchema:()=>_cr,EnvironmentSchema:()=>Tar,ErrorDeclarationSchema:()=>Dar,ErrorDiscriminationSchema:()=>Tur,ExampleBodyResponseSchema:()=>Rar,ExampleCodeSampleSchema:()=>jar,ExampleCodeSampleSchemaLanguage:()=>kar,ExampleCodeSampleSchemaSdk:()=>Nar,ExampleEndpointCallArraySchema:()=>zxa,ExampleEndpointCallSchema:()=>V7e,ExampleResponseSchema:()=>Lar,ExampleSseEventSchema:()=>Qar,ExampleSseResponseSchema:()=>zar,ExampleStreamResponseSchema:()=>Mar,ExampleTypeReferenceSchema:()=>cw,ExampleTypeSchema:()=>U7e,ExampleTypeValueSchema:()=>Bar,ExampleWebSocketMessage:()=>_ar,ExampleWebSocketSession:()=>Gar,ExampleWebhookCallSchema:()=>Var,Export:()=>Bur,ExportDetailed:()=>Our,FormDataBodyEncodingStyle:()=>icr,GlobalParameterDeclarationSchema:()=>Dur,GrpcTransport:()=>Bcr,HeaderAuthSchemeSchema:()=>$sr,HmacSignatureSchema:()=>hur,HttpEndpointAuth:()=>Xar,HttpEndpointSchema:()=>Dcr,HttpEndpointSecurity:()=>Yar,HttpEndpointSecurityItem:()=>Jar,HttpHeaderSchema:()=>gU,HttpInlineFileRequestBodyPropertySchema:()=>ocr,HttpInlineRequestBodyPropertySchema:()=>scr,HttpInlineRequestBodySchema:()=>acr,HttpMethodSchema:()=>Zar,HttpPathParameterSchema:()=>aY,HttpQueryParameterSchema:()=>W7e,HttpReferencedRequestBodySchema:()=>ccr,HttpRequest:()=>pcr,HttpRequestBodySchema:()=>ucr,HttpRequestSchema:()=>lcr,HttpResponseSchema:()=>H7e,HttpResponseSchemaDetailed:()=>fcr,HttpResponseStreamSchema:()=>K7e,HttpResponseStreamSchemaDetailed:()=>hcr,HttpServiceSchema:()=>Rcr,InferredAuthenticatedRequestHeader:()=>Hsr,InferredBearerAuthSchema:()=>Ysr,InferredGetTokenEndpointSchema:()=>Jsr,InferredGetTokenEndpointSchemaObject:()=>Ksr,ListValidationSchema:()=>gar,MapValidationSchema:()=>Aar,MultipleBaseUrlsEnvironmentSchema:()=>war,Navigation:()=>Pur,NumberValidationSchema:()=>yar,OAuthAccessTokenRequestPropertiesSchema:()=>tar,OAuthAccessTokenResponsePropertiesSchema:()=>rar,OAuthGetTokenEndpointSchema:()=>nar,OAuthRefreshTokenEndpointSchema:()=>sar,OAuthRefreshTokenRequestPropertiesSchema:()=>iar,OAuthRefreshTokenResponsePropertiesSchema:()=>oar,OAuthSchemeSchema:()=>aar,ObjectExtendsSchema:()=>AU,ObjectPropertyAccess:()=>Wcr,ObjectPropertySchema:()=>YAe,ObjectPropertyWithAccessSchema:()=>Hcr,ObjectSchema:()=>Kcr,OffsetPaginationSchema:()=>bcr,OpenApiSourceSchema:()=>qar,PackageMarkerFileSchema:()=>Uxa,Pagination:()=>xcr,PaginationSchema:()=>J7e,PathPaginationSchema:()=>Ecr,ProductDeclarationHeaderObjectSchema:()=>Rur,ProductDeclarationHeaderSchema:()=>kur,ProductDeclarationSchema:()=>Uur,ProductValue:()=>Lur,ProductValueDetailed:()=>Mur,PropertyBasedErrorDiscrimination:()=>wur,ProtobufSourceSchema:()=>War,ProtobufTypeSchema:()=>Iar,QueryParameterTypeReferenceDetailed:()=>rcr,ResponseError:()=>wcr,ResponseErrorWithDocsSchema:()=>Ccr,ResponseErrorsSchema:()=>Scr,RetriesConfiguration:()=>Ocr,RetriesDisabledSchema:()=>Tcr,RootApiFileSchema:()=>_xa,ServerVariableSchema:()=>L7e,ServiceTransport:()=>Y7e,SingleBaseUrlEnvironmentSchema:()=>Sar,SingleUndiscriminatedUnionTypeDetailedSchema:()=>Jcr,SingleUndiscriminatedUnionTypeSchema:()=>Ycr,SingleUnionTypeDetailedSchema:()=>jcr,SingleUnionTypeKey:()=>Ncr,SingleUnionTypeKeySchema:()=>Fcr,SingleUnionTypeSchema:()=>Qcr,SourceSchema:()=>JAe,StatusCodeBasedErrorDiscrimination:()=>Sur,StreamFormat:()=>mcr,StringValidationSchema:()=>bar,SupportedSdkLanguageSchema:()=>Far,TokenBearerAuthSchema:()=>Xsr,TypeDeclarationSchema:()=>Zcr,TypeReferenceDeclarationWithEnvOverride:()=>tcr,TypeReferenceDeclarationWithEnvOverrideSchema:()=>ecr,TypeReferenceDeclarationWithName:()=>hU,TypeReferenceDeclarationWithNameSchema:()=>Xxa,TypeReferenceDetailedSchema:()=>Kar,TypeReferenceSchema:()=>Xq,UndiscriminatedUnionSchema:()=>Xcr,UnionDiscriminant:()=>Lcr,UnionDiscriminantSchema:()=>Mcr,UnionDiscriminatorContext:()=>zcr,UriPaginationSchema:()=>Icr,ValidationSchema:()=>HAe,VariableDeclarationDetailed:()=>Vur,VariableDeclarationSchema:()=>_ur,VariableReferenceSchema:()=>$ar,VersionDeclarationHeaderObjectSchema:()=>Fur,VersionDeclarationHeaderSchema:()=>Nur,VersionDeclarationSchema:()=>eWe,VersionValue:()=>Qur,VersionValueDetailed:()=>jur,WebSocketChannelInlinedMessageSchema:()=>yur,WebSocketChannelMessageBodySchema:()=>Eur,WebSocketChannelMessageSchema:()=>vur,WebSocketChannelReferencedMessageSchema:()=>bur,WebSocketChannelSchema:()=>xur,WebSocketOrigin:()=>Iur,WebhookBodyHashAlgorithmSchema:()=>lur,WebhookBodyHashBindingSchema:()=>dur,WebhookBodyHashLocationSchema:()=>fur,WebhookBodyHashQueryParameterLocationSchema:()=>pur,WebhookInlinedPayloadSchema:()=>eur,WebhookMethodSchema:()=>$cr,WebhookPayloadBodySortSchema:()=>iur,WebhookPayloadComponentSchema:()=>our,WebhookPayloadFormatSchema:()=>X7e,WebhookPayloadSchema:()=>rur,WebhookReferencedPayloadSchema:()=>tur,WebhookSchema:()=>Aur,WebhookSignatureAlgorithmSchema:()=>mur,WebhookSignatureEncodingSchema:()=>XAe,WebhookSignatureSchema:()=>$7e,WebhookTimestampFormatSchema:()=>aur,WebhookTimestampSchema:()=>Z7e,WithAudiences:()=>PS,WithAuthSchema:()=>lar,WithAvailability:()=>BP,WithDisplayName:()=>DS,WithDocsSchema:()=>fo,WithEnvironmentVariable:()=>k7e,WithEnvironmentsSchema:()=>Oar,WithHeadersSchema:()=>Gur,WithMethodName:()=>har,WithName:()=>$p,WithValidation:()=>z7e,auth:()=>$2i,availability:()=>nNi,commons:()=>pNi,encoding:()=>mNi,environments:()=>ENi,errors:()=>CNi,examples:()=>zNi,file:()=>PQi,globalParameters:()=>RQi,pagination:()=>FQi,products:()=>jQi,service:()=>zQi,source:()=>LQi,types:()=>VQi,validation:()=>GQi,variables:()=>WQi,versioning:()=>KQi,webhooks:()=>YQi,websocket:()=>ZQi});var sCa=h(()=>{"use strict";oCa()});function epf({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: ${hva(r,void 0,2)}`),n.join(`
|
|
99
99
|
`)}var tDt,aCa=h(()=>{"use strict";gva();tDt=class extends Error{statusCode;body;rawResponse;constructor({message:t,statusCode:r,body:n,rawResponse:i}){super(epf({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 rDt,cCa=h(()=>{"use strict";rDt=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 uCa=h(()=>{"use strict";aCa();cCa()});var Dm={};X(Dm,{AsymmetricAlgorithmSchema:()=>PIa,AvailabilityStatusSchema:()=>Iba,FernDefinitionError:()=>tDt,FernDefinitionTimeoutError:()=>rDt,FormDataBodyEncodingStyle:()=>W0a,HttpMethodSchema:()=>nEa,ObjectPropertyAccess:()=>_Ea,StreamFormat:()=>CEa,SupportedSdkLanguageSchema:()=>d0a,UnionDiscriminatorContext:()=>cIa,WebSocketOrigin:()=>lva,WebhookBodyHashAlgorithmSchema:()=>FIa,WebhookMethodSchema:()=>LIa,WebhookPayloadBodySortSchema:()=>VIa,WebhookPayloadComponentSchema:()=>GIa,WebhookSignatureAlgorithmSchema:()=>YIa,WebhookSignatureEncodingSchema:()=>ZIa,WebhookTimestampFormatSchema:()=>tva,auth:()=>yba,availability:()=>_Fi,commons:()=>Nba,encoding:()=>Mba,environments:()=>Wba,errors:()=>Jba,examples:()=>JFi,file:()=>S0a,globalParameters:()=>B0a,pagination:()=>Q0a,products:()=>G0a,serialization:()=>$Qi,service:()=>t2i,source:()=>REa,types:()=>i2i,validation:()=>gIa,variables:()=>IIa,versioning:()=>OIa,webhooks:()=>u2i,websocket:()=>p2i});var lCa=h(()=>{"use strict";mva();sCa();uCa()});function ezi(e){return e.scheme==="oauth"}var pCa=h(()=>{"use strict"});var fCa=h(()=>{"use strict";pCa()});var tpf,dCa,mCa=h(()=>{"use strict";tpf={optional:"optional",nullable:"nullable",set:"set",list:"list",map:"map",literal:"literal"},dCa=new Set(Object.values(tpf))});function pE(e){let t=e.match(/([\w.]+)<([\w,\s]+)>/);if(t?.[0]!=null&&t[1]!=null&&t[2]!=null&&!dCa.has(t[1].trim()))return{name:t[1].trim(),arguments:t[2].split(",").map(r=>r.trim())}}var tzi=h(()=>{"use strict";mCa()});function bU(e){return pE(e)!=null}var hCa=h(()=>{"use strict";tzi()});var gCa=h(()=>{"use strict";hCa();tzi()});function rzi(e){if(e.request!=null)return typeof e.request=="string"?e.request:e.request.body}var ACa=h(()=>{"use strict"});var Xce,yCa=h(()=>{"use strict";Xce=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 Eg(e){return typeof e=="string"?!1:e?.extends!=null||e?.properties!=null}var nzi=h(()=>{"use strict"});function x2e(e){return e?e.proto!=null:!1}var bCa=h(()=>{"use strict"});function ZAe(e){return e===rpf}var rpf,ECa=h(()=>{"use strict";rpf="text"});var ICa=h(()=>{"use strict"});var vCa=h(()=>{"use strict"});var izi=h(()=>{"use strict";ICa();vCa()});var xCa={};var CCa=h(()=>{"use strict";izi()});var wCa=h(()=>{"use strict"});var Gp,SCa=h(()=>{"use strict";Jr();Gp={bearer:e=>({...e,type:"bearer",_visit:function(t){return Gp._visit(this,t)}}),basic:e=>({...e,type:"basic",_visit:function(t){return Gp._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return Gp._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return Gp._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return Gp._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 TCa=h(()=>{"use strict"});var npf,uw,OCa=h(()=>{"use strict";npf={All:"ALL",Any:"ANY",EndpointSecurity:"ENDPOINT_SECURITY"},uw={...npf,_visit:(e,t)=>{switch(e){case uw.All:return t.all();case uw.Any:return t.any();case uw.EndpointSecurity:return t.endpointSecurity();default:return t._other()}}}});var BCa=h(()=>{"use strict"});var PCa=h(()=>{"use strict"});var DCa=h(()=>{"use strict"});var RCa=h(()=>{"use strict"});var kCa=h(()=>{"use strict"});var FCa=h(()=>{"use strict"});var NCa=h(()=>{"use strict"});var jCa=h(()=>{"use strict"});var QCa=h(()=>{"use strict"});var zCa=h(()=>{"use strict"});var MCa=h(()=>{"use strict"});var LCa=h(()=>{"use strict"});var cY,UCa=h(()=>{"use strict";Jr();cY={clientCredentials:e=>({...e,type:"clientCredentials",_visit:function(t){return cY._visit(this,t)}}),_visit:(e,t)=>e.type==="clientCredentials"?t.clientCredentials(e):t._other(e)}});var VCa=h(()=>{"use strict"});var _Ca=h(()=>{"use strict"});var GCa=h(()=>{"use strict"});var qCa=h(()=>{"use strict"});var ozi=h(()=>{"use strict";wCa();SCa();TCa();OCa();BCa();PCa();DCa();RCa();kCa();FCa();NCa();jCa();QCa();zCa();MCa();LCa();UCa();VCa();_Ca();GCa();qCa()});var szi={};X(szi,{AuthScheme:()=>Gp,AuthSchemesRequirement:()=>uw,OAuthConfiguration:()=>cY});var WCa=h(()=>{"use strict";ozi()});var HCa=h(()=>{"use strict"});var ipf,Rm,KCa=h(()=>{"use strict";ipf={InDevelopment:"IN_DEVELOPMENT",PreRelease:"PRE_RELEASE",GeneralAvailability:"GENERAL_AVAILABILITY",Deprecated:"DEPRECATED",Alpha:"ALPHA",Beta:"BETA",Preview:"PREVIEW",Legacy:"LEGACY"},Rm={...ipf,_visit:(e,t)=>{switch(e){case Rm.InDevelopment:return t.inDevelopment();case Rm.PreRelease:return t.preRelease();case Rm.GeneralAvailability:return t.generalAvailability();case Rm.Deprecated:return t.deprecated();case Rm.Alpha:return t.alpha();case Rm.Beta:return t.beta();case Rm.Preview:return t.preview();case Rm.Legacy:return t.legacy();default:return t._other()}}}});var JCa=h(()=>{"use strict"});var YCa=h(()=>{"use strict"});var XCa=h(()=>{"use strict"});var ZCa=h(()=>{"use strict"});var $Ca=h(()=>{"use strict"});var ewa=h(()=>{"use strict"});var twa=h(()=>{"use strict"});var rwa=h(()=>{"use strict"});var nwa=h(()=>{"use strict"});var iwa=h(()=>{"use strict"});var owa=h(()=>{"use strict"});var swa=h(()=>{"use strict"});var awa=h(()=>{"use strict"});var cwa=h(()=>{"use strict"});var uwa=h(()=>{"use strict"});var lwa=h(()=>{"use strict"});var pwa=h(()=>{"use strict"});var fwa=h(()=>{"use strict"});var dwa=h(()=>{"use strict"});var mwa=h(()=>{"use strict"});var hwa=h(()=>{"use strict"});var gwa=h(()=>{"use strict"});var Awa=h(()=>{"use strict"});var azi=h(()=>{"use strict";HCa();KCa();JCa();YCa();XCa();ZCa();$Ca();ewa();twa();rwa();nwa();iwa();owa();swa();awa();cwa();uwa();lwa();pwa();fwa();dwa();mwa();hwa();gwa();Awa()});var czi={};X(czi,{AvailabilityStatus:()=>Rm});var ywa=h(()=>{"use strict";azi()});var bwa=h(()=>{"use strict"});var uzi=h(()=>{"use strict";bwa()});var Ewa={};var Iwa=h(()=>{"use strict";uzi()});var vwa,xwa=h(()=>{"use strict";Jr();vwa={basic:e=>({...e,type:"basic",_visit:function(t){return Xt.Auth._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return Xt.Auth._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return Xt.Auth._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return Xt.Auth._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return Xt.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 Cwa,wwa=h(()=>{"use strict";Jr();Cwa={basic:e=>({...e,type:"basic",_visit:function(t){return Xt.AuthValues._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return Xt.AuthValues._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return Xt.AuthValues._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return Xt.AuthValues._visit(this,t)}}),inferred:e=>({...e,type:"inferred",_visit:function(t){return Xt.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 Swa=h(()=>{"use strict"});var Twa=h(()=>{"use strict"});var Owa=h(()=>{"use strict"});var Bwa=h(()=>{"use strict"});var Pwa=h(()=>{"use strict"});var Dwa=h(()=>{"use strict"});var Rwa=h(()=>{"use strict"});var kwa=h(()=>{"use strict"});var Fwa=h(()=>{"use strict"});var Nwa=h(()=>{"use strict"});var lzi=h(()=>{"use strict";xwa();wwa();Swa();Twa();Owa();Bwa();Pwa();Dwa();Rwa();kwa();Fwa();Nwa()});var pzi={};X(pzi,{Auth:()=>vwa,AuthValues:()=>Cwa});var jwa=h(()=>{"use strict";lzi()});var Qwa=h(()=>{"use strict"});var zwa=h(()=>{"use strict"});var Mwa=h(()=>{"use strict"});var Lwa=h(()=>{"use strict"});var Uwa=h(()=>{"use strict"});var Vwa=h(()=>{"use strict"});var _wa=h(()=>{"use strict"});var Gwa=h(()=>{"use strict"});var qwa=h(()=>{"use strict"});var fzi=h(()=>{"use strict";Qwa();zwa();Mwa();Lwa();Uwa();Vwa();_wa();Gwa();qwa()});var Wwa={};var Hwa=h(()=>{"use strict";fzi()});var Kwa=h(()=>{"use strict"});var dzi=h(()=>{"use strict";Kwa()});var Jwa={};var Ywa=h(()=>{"use strict";dzi()});var Xwa=h(()=>{"use strict"});var Zwa=h(()=>{"use strict"});var $wa=h(()=>{"use strict"});var eSa=h(()=>{"use strict"});var tSa=h(()=>{"use strict"});var rSa,nSa=h(()=>{"use strict";Jr();rSa={file:e=>({...e,type:"file",_visit:function(t){return Xt.FileUploadRequestBodyProperty._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return Xt.FileUploadRequestBodyProperty._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return Xt.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 iSa=h(()=>{"use strict"});var oSa,sSa=h(()=>{"use strict";Jr();oSa={properties:e=>({value:e,type:"properties",_visit:function(t){return Xt.InlinedRequestBody._visit(this,t)}}),referenced:e=>({...e,type:"referenced",_visit:function(t){return Xt.InlinedRequestBody._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return Xt.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 aSa=h(()=>{"use strict"});var cSa=h(()=>{"use strict"});var uSa,lSa=h(()=>{"use strict";Jr();uSa={bytes:()=>({type:"bytes",_visit:function(e){return Xt.ReferencedRequestBodyType._visit(this,e)}}),typeReference:e=>({value:e,type:"typeReference",_visit:function(t){return Xt.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 pSa,fSa=h(()=>{"use strict";Jr();pSa={body:e=>({...e,type:"body",_visit:function(t){return Xt.Request._visit(this,t)}}),inlined:e=>({...e,type:"inlined",_visit:function(t){return Xt.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 dSa,mSa=h(()=>{"use strict";Jr();dSa={json:()=>({type:"json",_visit:function(e){return Xt.Response._visit(this,e)}}),streaming:()=>({type:"streaming",_visit:function(e){return Xt.Response._visit(this,e)}}),streamParameter:()=>({type:"streamParameter",_visit:function(e){return Xt.Response._visit(this,e)}}),fileDownload:()=>({type:"fileDownload",_visit:function(e){return Xt.Response._visit(this,e)}}),text:()=>({type:"text",_visit:function(e){return Xt.Response._visit(this,e)}}),bytes:()=>({type:"bytes",_visit:function(e){return Xt.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 mzi=h(()=>{"use strict";Xwa();Zwa();$wa();eSa();tSa();nSa();iSa();sSa();aSa();cSa();lSa();fSa();mSa()});var hzi={};X(hzi,{FileUploadRequestBodyProperty:()=>rSa,InlinedRequestBody:()=>oSa,ReferencedRequestBodyType:()=>uSa,Request:()=>pSa,Response:()=>dSa});var hSa=h(()=>{"use strict";mzi()});var gSa=h(()=>{"use strict"});var ASa=h(()=>{"use strict"});var ySa=h(()=>{"use strict"});var bSa,ESa=h(()=>{"use strict";Jr();bSa={singleBaseUrl:e=>({...e,type:"singleBaseUrl",_visit:function(t){return Xt.Environments._visit(this,t)}}),multipleBaseUrls:e=>({...e,type:"multipleBaseUrls",_visit:function(t){return Xt.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 ISa=h(()=>{"use strict"});var vSa=h(()=>{"use strict"});var xSa=h(()=>{"use strict"});var CSa=h(()=>{"use strict"});var wSa=h(()=>{"use strict"});var SSa=h(()=>{"use strict"});var TSa=h(()=>{"use strict"});var OSa=h(()=>{"use strict"});var gzi=h(()=>{"use strict";gSa();ASa();ySa();ESa();ISa();vSa();xSa();CSa();wSa();SSa();TSa();OSa()});var Azi={};X(Azi,{Environments:()=>bSa});var BSa=h(()=>{"use strict";gzi()});var opf,$Ae,PSa=h(()=>{"use strict";opf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"},$Ae={...opf,_visit:(e,t)=>{switch(e){case $Ae.Get:return t.get();case $Ae.Post:return t.post();case $Ae.Put:return t.put();case $Ae.Patch:return t.patch();case $Ae.Delete:return t.delete();case $Ae.Head:return t.head();default:return t._other()}}}});var yzi=h(()=>{"use strict";PSa()});var bzi={};X(bzi,{HttpMethod:()=>$Ae});var DSa=h(()=>{"use strict";yzi()});var RSa=h(()=>{"use strict"});var kSa=h(()=>{"use strict"});var FSa=h(()=>{"use strict"});var NSa,jSa=h(()=>{"use strict";Jr();NSa={publish:e=>({value:e,type:"publish",_visit:function(t){return Xt.GeneratorOutputConfig._visit(this,t)}}),local:()=>({type:"local",_visit:function(e){return Xt.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 QSa=h(()=>{"use strict"});var zSa=h(()=>{"use strict"});var MSa=h(()=>{"use strict"});var LSa=h(()=>{"use strict"});var USa,VSa=h(()=>{"use strict";Jr();USa={go:e=>({...e,type:"go",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),swift:e=>({...e,type:"swift",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return Xt.PublishInfo._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return Xt.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 _Sa=h(()=>{"use strict"});var GSa=h(()=>{"use strict"});var qSa=h(()=>{"use strict"});var Ezi=h(()=>{"use strict";RSa();kSa();FSa();jSa();QSa();zSa();MSa();LSa();VSa();_Sa();GSa();qSa()});var Izi={};X(Izi,{GeneratorOutputConfig:()=>NSa,PublishInfo:()=>USa});var WSa=h(()=>{"use strict";Ezi()});var HSa=h(()=>{"use strict"});var KSa=h(()=>{"use strict"});var JSa=h(()=>{"use strict"});var spf,qur,YSa=h(()=>{"use strict";spf={Critical:"CRITICAL",Warning:"WARNING"},qur={...spf,_visit:(e,t)=>{switch(e){case qur.Critical:return t.critical();case qur.Warning:return t.warning();default:return t._other()}}}});var XSa=h(()=>{"use strict"});var vzi=h(()=>{"use strict";HSa();KSa();JSa();YSa();XSa()});var xzi={};X(xzi,{ErrorSeverity:()=>qur});var ZSa=h(()=>{"use strict";vzi()});var $Sa=h(()=>{"use strict"});var e1a=h(()=>{"use strict"});var t1a=h(()=>{"use strict"});var r1a,n1a=h(()=>{"use strict";Jr();r1a={boolean:e=>({value:e,type:"boolean",_visit:function(t){return Xt.LiteralType._visit(this,t)}}),string:e=>({value:e,type:"string",_visit:function(t){return Xt.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 i1a=h(()=>{"use strict"});var o1a=h(()=>{"use strict"});var s1a,a1a=h(()=>{"use strict";Jr();s1a={alias:e=>({...e,type:"alias",_visit:function(t){return Xt.NamedType._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return Xt.NamedType._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return Xt.NamedType._visit(this,t)}}),discriminatedUnion:e=>({...e,type:"discriminatedUnion",_visit:function(t){return Xt.NamedType._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return Xt.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 apf,Wur,c1a=h(()=>{"use strict";apf={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"},Wur={...apf,_visit:(e,t)=>{switch(e){case Wur.ReadOnly:return t.readOnly();case Wur.WriteOnly:return t.writeOnly();default:return t._other()}}}});var u1a=h(()=>{"use strict"});var cpf,PP,l1a=h(()=>{"use strict";cpf={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"},PP={...cpf,_visit:(e,t)=>{switch(e){case PP.Integer:return t.integer();case PP.Long:return t.long();case PP.Uint:return t.uint();case PP.Uint64:return t.uint64();case PP.Float:return t.float();case PP.Double:return t.double();case PP.Boolean:return t.boolean();case PP.String:return t.string();case PP.Date:return t.date();case PP.DateTime:return t.dateTime();case PP.DateTimeRfc2822:return t.dateTimeRfc2822();case PP.Uuid:return t.uuid();case PP.Base64:return t.base64();case PP.BigInteger:return t.bigInteger();default:return t._other()}}}});var p1a,f1a=h(()=>{"use strict";Jr();p1a={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return Xt.SingleDiscriminatedUnionType._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return Xt.SingleDiscriminatedUnionType._visit(this,t)}}),noProperties:e=>({...e,type:"noProperties",_visit:function(t){return Xt.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 d1a=h(()=>{"use strict"});var m1a=h(()=>{"use strict"});var h1a=h(()=>{"use strict"});var g1a,A1a=h(()=>{"use strict";Jr();g1a={list:e=>({value:e,type:"list",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),literal:e=>({value:e,type:"literal",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),map:e=>({...e,type:"map",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),named:e=>({value:e,type:"named",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),nullable:e=>({value:e,type:"nullable",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),optional:e=>({value:e,type:"optional",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),primitive:e=>({value:e,type:"primitive",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),set:e=>({value:e,type:"set",_visit:function(t){return Xt.TypeReference._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return Xt.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 y1a=h(()=>{"use strict"});var Czi=h(()=>{"use strict";$Sa();e1a();t1a();n1a();i1a();o1a();a1a();c1a();u1a();l1a();f1a();d1a();m1a();h1a();A1a();y1a()});var wzi={};X(wzi,{LiteralType:()=>r1a,NamedType:()=>s1a,ObjectPropertyAccess:()=>Wur,PrimitiveTypeV1:()=>PP,SingleDiscriminatedUnionType:()=>p1a,TypeReference:()=>g1a});var b1a=h(()=>{"use strict";Czi()});var E1a=h(()=>{"use strict"});var Szi=h(()=>{"use strict";E1a()});var I1a={};var v1a=h(()=>{"use strict";Szi()});var x1a=h(()=>{"use strict";jwa();lzi();Hwa();fzi();Ywa();dzi();hSa();mzi();BSa();gzi();DSa();yzi();WSa();Ezi();ZSa();vzi();b1a();Czi();v1a();Szi()});var Xt={};X(Xt,{Auth:()=>vwa,AuthValues:()=>Cwa,Environments:()=>bSa,ErrorSeverity:()=>qur,FileUploadRequestBodyProperty:()=>rSa,GeneratorOutputConfig:()=>NSa,HttpMethod:()=>$Ae,InlinedRequestBody:()=>oSa,LiteralType:()=>r1a,NamedType:()=>s1a,ObjectPropertyAccess:()=>Wur,PrimitiveTypeV1:()=>PP,PublishInfo:()=>USa,ReferencedRequestBodyType:()=>uSa,Request:()=>pSa,Response:()=>dSa,SingleDiscriminatedUnionType:()=>p1a,TypeReference:()=>g1a,auth:()=>pzi,commons:()=>Wwa,declaration:()=>Jwa,endpoints:()=>hzi,environment:()=>Azi,http:()=>bzi,ir:()=>Izi,snippets:()=>xzi,types:()=>wzi,variables:()=>I1a});var C1a=h(()=>{"use strict";x1a()});var w1a=h(()=>{"use strict"});var S1a=h(()=>{"use strict"});var T1a=h(()=>{"use strict"});var o0,O1a=h(()=>{"use strict";Jr();o0={singleBaseUrl:e=>({...e,type:"singleBaseUrl",_visit:function(t){return o0._visit(this,t)}}),multipleBaseUrls:e=>({...e,type:"multipleBaseUrls",_visit:function(t){return o0._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 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 Tzi=h(()=>{"use strict";w1a();S1a();T1a();O1a();B1a();P1a();D1a();R1a();k1a();F1a();N1a()});var Ozi={};X(Ozi,{Environments:()=>o0});var j1a=h(()=>{"use strict";Tzi()});var Q1a=h(()=>{"use strict"});var z1a=h(()=>{"use strict"});var eye,M1a=h(()=>{"use strict";Jr();eye={property:e=>({value:e,type:"property",_visit:function(t){return eye._visit(this,t)}}),statusCode:()=>({type:"statusCode",_visit:function(e){return eye._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 L1a=h(()=>{"use strict"});var Bzi=h(()=>{"use strict";Q1a();z1a();M1a();L1a()});var Pzi={};X(Pzi,{ErrorDeclarationDiscriminantValue:()=>eye});var U1a=h(()=>{"use strict";Bzi()});var V1a=h(()=>{"use strict"});var _1a=h(()=>{"use strict"});var G1a=h(()=>{"use strict"});var q1a=h(()=>{"use strict"});var W1a=h(()=>{"use strict"});var EU,H1a=h(()=>{"use strict";Jr();EU={basic:e=>({...e,type:"basic",_visit:function(t){return EU._visit(this,t)}}),bearer:e=>({...e,type:"bearer",_visit:function(t){return EU._visit(this,t)}}),header:e=>({...e,type:"header",_visit:function(t){return EU._visit(this,t)}}),oauth:e=>({...e,type:"oauth",_visit:function(t){return EU._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 K1a=h(()=>{"use strict"});var upf,uY,J1a=h(()=>{"use strict";upf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"},uY={...upf,_visit:(e,t)=>{switch(e){case uY.Get:return t.get();case uY.Post:return t.post();case uY.Put:return t.put();case uY.Patch:return t.patch();case uY.Delete:return t.delete();case uY.Head:return t.head();default:return t._other()}}}});var Y1a=h(()=>{"use strict"});var X1a=h(()=>{"use strict"});var Z1a=h(()=>{"use strict"});var $1a=h(()=>{"use strict"});var eTa=h(()=>{"use strict"});var tTa=h(()=>{"use strict"});var Rx,rTa=h(()=>{"use strict";Jr();Rx={error:e=>({value:e,type:"error",_visit:function(t){return Rx._visit(this,t)}}),json:e=>({value:e,type:"json",_visit:function(t){return Rx._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return Rx._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 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 cTa=h(()=>{"use strict"});var uTa=h(()=>{"use strict"});var lTa=h(()=>{"use strict"});var pTa=h(()=>{"use strict"});var fTa=h(()=>{"use strict"});var Dzi=h(()=>{"use strict";V1a();_1a();G1a();q1a();W1a();H1a();K1a();J1a();Y1a();X1a();Z1a();$1a();eTa();tTa();rTa();nTa();iTa();oTa();sTa();aTa();cTa();uTa();lTa();pTa();fTa()});var Rzi={};X(Rzi,{V2AuthValues:()=>EU,V2EndpointLocationHttpMethod:()=>uY,V2HttpEndpointResponseBody:()=>Rx});var dTa=h(()=>{"use strict";Dzi()});var mTa=h(()=>{"use strict"});var hTa=h(()=>{"use strict"});var gTa=h(()=>{"use strict"});var ATa=h(()=>{"use strict"});var yTa=h(()=>{"use strict"});var bTa=h(()=>{"use strict"});var ETa,ITa=h(()=>{"use strict";Jr();ETa={local:()=>({type:"local",_visit:function(e){return tc.GeneratorEnvironment._visit(this,e)}}),remote:e=>({...e,type:"remote",_visit:function(t){return tc.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 vTa=h(()=>{"use strict"});var xTa=h(()=>{"use strict"});var CTa,wTa=h(()=>{"use strict";Jr();CTa={maven:e=>({...e,type:"maven",_visit:function(t){return tc.GeneratorPublishTarget._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return tc.GeneratorPublishTarget._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return tc.GeneratorPublishTarget._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return tc.GeneratorPublishTarget._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return tc.GeneratorPublishTarget._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return tc.GeneratorPublishTarget._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return tc.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 STa=h(()=>{"use strict"});var TTa=h(()=>{"use strict"});var OTa=h(()=>{"use strict"});var BTa,PTa=h(()=>{"use strict";Jr();BTa={npm:e=>({...e,type:"npm",_visit:function(t){return tc.GithubPublishInfo._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return tc.GithubPublishInfo._visit(this,t)}}),postman:e=>({...e,type:"postman",_visit:function(t){return tc.GithubPublishInfo._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return tc.GithubPublishInfo._visit(this,t)}}),rubygems:e=>({...e,type:"rubygems",_visit:function(t){return tc.GithubPublishInfo._visit(this,t)}}),nuget:e=>({...e,type:"nuget",_visit:function(t){return tc.GithubPublishInfo._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return tc.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 DTa,RTa=h(()=>{"use strict";Jr();DTa={basic:e=>({...e,type:"basic",_visit:function(t){return tc.LicenseConfig._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return tc.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 lpf,Hur,kTa=h(()=>{"use strict";lpf={Mit:"MIT",Apache2:"Apache-2.0"},Hur={...lpf,_visit:(e,t)=>{switch(e){case Hur.Mit:return t.mit();case Hur.Apache2:return t.apache2();default:return t._other()}}}});var FTa=h(()=>{"use strict"});var NTa=h(()=>{"use strict"});var jTa=h(()=>{"use strict"});var QTa=h(()=>{"use strict"});var zTa=h(()=>{"use strict"});var MTa=h(()=>{"use strict"});var LTa=h(()=>{"use strict"});var UTa=h(()=>{"use strict"});var VTa=h(()=>{"use strict"});var _Ta=h(()=>{"use strict"});var GTa=h(()=>{"use strict"});var qTa=h(()=>{"use strict"});var WTa,HTa=h(()=>{"use strict";Jr();WTa={publish:e=>({...e,type:"publish",_visit:function(t){return tc.OutputMode._visit(this,t)}}),downloadFiles:()=>({type:"downloadFiles",_visit:function(e){return tc.OutputMode._visit(this,e)}}),github:e=>({...e,type:"github",_visit:function(t){return tc.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 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 tOa=h(()=>{"use strict"});var rOa=h(()=>{"use strict"});var kzi=h(()=>{"use strict";mTa();hTa();gTa();ATa();yTa();bTa();ITa();vTa();xTa();wTa();STa();TTa();OTa();PTa();RTa();kTa();FTa();NTa();jTa();QTa();zTa();MTa();LTa();UTa();VTa();_Ta();GTa();qTa();HTa();KTa();JTa();YTa();XTa();ZTa();$Ta();eOa();tOa();rOa()});var Fzi={};X(Fzi,{GeneratorEnvironment:()=>ETa,GeneratorPublishTarget:()=>CTa,GithubPublishInfo:()=>BTa,LicenseConfig:()=>DTa,LicenseId:()=>Hur,OutputMode:()=>WTa});var nOa=h(()=>{"use strict";kzi()});var iOa=h(()=>{"use strict";nOa();kzi()});var tc={};X(tc,{GeneratorEnvironment:()=>ETa,GeneratorPublishTarget:()=>CTa,GithubPublishInfo:()=>BTa,LicenseConfig:()=>DTa,LicenseId:()=>Hur,OutputMode:()=>WTa,config:()=>Fzi});var oOa=h(()=>{"use strict";iOa()});var sOa=h(()=>{"use strict"});var ppf,Kur,aOa=h(()=>{"use strict";ppf={Explicit:"explicit",Auto:"auto"},Kur={...ppf,_visit:(e,t)=>{switch(e){case Kur.Explicit:return t.explicit();case Kur.Auto:return t.auto();default:return t._other()}}}});var cOa=h(()=>{"use strict"});var fpf,tWe,uOa=h(()=>{"use strict";fpf={Header:"header",Query:"query",Body:"body",Path:"path"},tWe={...fpf,_visit:(e,t)=>{switch(e){case tWe.Header:return t.header();case tWe.Query:return t.query();case tWe.Body:return t.body();case tWe.Path:return t.path();default:return t._other()}}}});var Nzi=h(()=>{"use strict";sOa();aOa();cOa();uOa()});var jzi={};X(jzi,{GlobalParameterApplyMode:()=>Kur,GlobalParameterLocation:()=>tWe});var lOa=h(()=>{"use strict";Nzi()});var pOa=h(()=>{"use strict"});var fOa=h(()=>{"use strict"});var dOa=h(()=>{"use strict"});var mOa=h(()=>{"use strict"});var hOa=h(()=>{"use strict"});var gOa=h(()=>{"use strict"});var AOa=h(()=>{"use strict"});var q6,yOa=h(()=>{"use strict";Jr();q6={language:e=>({...e,type:"language",_visit:function(t){return q6._visit(this,t)}}),sdk:e=>({...e,type:"sdk",_visit:function(t){return q6._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 bOa=h(()=>{"use strict"});var EOa=h(()=>{"use strict"});var IOa=h(()=>{"use strict"});var vOa=h(()=>{"use strict"});var CA,xOa=h(()=>{"use strict";Jr();CA={body:e=>({value:e,type:"body",_visit:function(t){return CA._visit(this,t)}}),stream:e=>({value:e,type:"stream",_visit:function(t){return CA._visit(this,t)}}),sse:e=>({value:e,type:"sse",_visit:function(t){return CA._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 COa=h(()=>{"use strict"});var wOa=h(()=>{"use strict"});var SOa=h(()=>{"use strict"});var TOa=h(()=>{"use strict"});var OOa=h(()=>{"use strict"});var BOa=h(()=>{"use strict"});var lw,POa=h(()=>{"use strict";Jr();lw={single:()=>({type:"single",_visit:function(e){return lw._visit(this,e)}}),exploded:()=>({type:"exploded",_visit:function(e){return lw._visit(this,e)}}),commaSeparated:()=>({type:"commaSeparated",_visit:function(e){return lw._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 DP,DOa=h(()=>{"use strict";Jr();DP={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return DP._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return DP._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 Ig,ROa=h(()=>{"use strict";Jr();Ig={ok:e=>({value:e,type:"ok",_visit:function(t){return Ig._visit(this,t)}}),error:e=>({...e,type:"error",_visit:function(t){return Ig._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 kOa=h(()=>{"use strict"});var FOa=h(()=>{"use strict"});var mj,NOa=h(()=>{"use strict";Jr();mj={file:e=>({...e,type:"file",_visit:function(t){return mj._visit(this,t)}}),fileArray:e=>({...e,type:"fileArray",_visit:function(t){return mj._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 jOa=h(()=>{"use strict"});var QOa=h(()=>{"use strict"});var zOa=h(()=>{"use strict"});var dpf,nDt,MOa=h(()=>{"use strict";dpf={Exploded:"exploded",Json:"json",Form:"form"},nDt={...dpf,_visit:(e,t)=>{switch(e){case nDt.Exploded:return t.exploded();case nDt.Json:return t.json();case nDt.Form:return t.form();default:return t._other()}}}});var LOa=h(()=>{"use strict"});var kx,UOa=h(()=>{"use strict";Jr();kx={file:e=>({value:e,type:"file",_visit:function(t){return kx._visit(this,t)}}),bodyProperty:e=>({...e,type:"bodyProperty",_visit:function(t){return kx._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 VOa=h(()=>{"use strict"});var _Oa=h(()=>{"use strict"});var GOa=h(()=>{"use strict"});var RP,qOa=h(()=>{"use strict";Jr();RP={proto:e=>({...e,type:"proto",_visit:function(t){return RP._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return RP._visit(this,e)}}),openrpc:()=>({type:"openrpc",_visit:function(e){return RP._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 WOa=h(()=>{"use strict"});var mpf,Ud,HOa=h(()=>{"use strict";mpf={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"},Ud={...mpf,_visit:(e,t)=>{switch(e){case Ud.Get:return t.get();case Ud.Post:return t.post();case Ud.Put:return t.put();case Ud.Patch:return t.patch();case Ud.Delete:return t.delete();case Ud.Head:return t.head();default:return t._other()}}}});var KOa=h(()=>{"use strict"});var JOa=h(()=>{"use strict"});var Hf,YOa=h(()=>{"use strict";Jr();Hf={inlinedRequestBody:e=>({...e,type:"inlinedRequestBody",_visit:function(t){return Hf._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return Hf._visit(this,t)}}),fileUpload:e=>({...e,type:"fileUpload",_visit:function(t){return Hf._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return Hf._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 XOa=h(()=>{"use strict"});var ZOa=h(()=>{"use strict"});var mu,$Oa=h(()=>{"use strict";Jr();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 eBa=h(()=>{"use strict"});var tBa=h(()=>{"use strict"});var rBa=h(()=>{"use strict"});var fE,nBa=h(()=>{"use strict";Jr();fE={response:e=>({...e,type:"response",_visit:function(t){return fE._visit(this,t)}}),nestedPropertyAsResponse:e=>({...e,type:"nestedPropertyAsResponse",_visit:function(t){return fE._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 iBa=h(()=>{"use strict"});var oBa=h(()=>{"use strict"});var sBa=h(()=>{"use strict"});var CO,aBa=h(()=>{"use strict";Jr();CO={json:e=>({value:e,type:"json",_visit:function(t){return CO._visit(this,t)}}),fileDownload:e=>({...e,type:"fileDownload",_visit:function(t){return CO._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return CO._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return CO._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 cBa=h(()=>{"use strict"});var s0,uBa=h(()=>{"use strict";Jr();s0={cursor:e=>({...e,type:"cursor",_visit:function(t){return s0._visit(this,t)}}),offset:e=>({...e,type:"offset",_visit:function(t){return s0._visit(this,t)}}),custom:e=>({...e,type:"custom",_visit:function(t){return s0._visit(this,t)}}),uri:e=>({...e,type:"uri",_visit:function(t){return s0._visit(this,t)}}),path:e=>({...e,type:"path",_visit:function(t){return s0._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 lBa=h(()=>{"use strict"});var pBa=h(()=>{"use strict"});var hpf,iDt,fBa=h(()=>{"use strict";hpf={Root:"ROOT",Service:"SERVICE",Endpoint:"ENDPOINT"},iDt={...hpf,_visit:(e,t)=>{switch(e){case iDt.Root:return t.root();case iDt.Service:return t.service();case iDt.Endpoint:return t.endpoint();default:return t._other()}}}});var dBa=h(()=>{"use strict"});var mBa=h(()=>{"use strict"});var hBa=h(()=>{"use strict"});var gBa=h(()=>{"use strict"});var wO,ABa=h(()=>{"use strict";Jr();wO={query:e=>({...e,type:"query",_visit:function(t){return wO._visit(this,t)}}),body:e=>({...e,type:"body",_visit:function(t){return wO._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 yBa=h(()=>{"use strict"});var bBa=h(()=>{"use strict"});var EBa=h(()=>{"use strict"});var IBa=h(()=>{"use strict"});var vBa=h(()=>{"use strict"});var xBa=h(()=>{"use strict"});var Zq,CBa=h(()=>{"use strict";Jr();Zq={typeReference:e=>({...e,type:"typeReference",_visit:function(t){return Zq._visit(this,t)}}),bytes:e=>({...e,type:"bytes",_visit:function(t){return Zq._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 IU,wBa=h(()=>{"use strict";Jr();IU={justRequestBody:e=>({value:e,type:"justRequestBody",_visit:function(t){return IU._visit(this,t)}}),wrapper:e=>({...e,type:"wrapper",_visit:function(t){return IU._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 SBa=h(()=>{"use strict"});var TBa=h(()=>{"use strict"});var mI,OBa=h(()=>{"use strict";Jr();mI={json:e=>({...e,type:"json",_visit:function(t){return mI._visit(this,t)}}),text:e=>({...e,type:"text",_visit:function(t){return mI._visit(this,t)}}),sse:e=>({...e,type:"sse",_visit:function(t){return mI._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 BBa=h(()=>{"use strict"});var gpf,W6,PBa=h(()=>{"use strict";gpf={Curl:"curl",Python:"python",Javascript:"javascript",Typescript:"typescript",Go:"go",Ruby:"ruby",Csharp:"csharp",Java:"java",Php:"php",Rust:"rust",Swift:"swift"},W6={...gpf,_visit:(e,t)=>{switch(e){case W6.Curl:return t.curl();case W6.Python:return t.python();case W6.Javascript:return t.javascript();case W6.Typescript:return t.typescript();case W6.Go:return t.go();case W6.Ruby:return t.ruby();case W6.Csharp:return t.csharp();case W6.Java:return t.java();case W6.Php:return t.php();case W6.Rust:return t.rust();case W6.Swift:return t.swift();default:return t._other()}}}});var DBa=h(()=>{"use strict"});var RBa=h(()=>{"use strict"});var vU,kBa=h(()=>{"use strict";Jr();vU={http:()=>({type:"http",_visit:function(e){return vU._visit(this,e)}}),grpc:e=>({...e,type:"grpc",_visit:function(t){return vU._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 FBa=h(()=>{"use strict"});var NBa=h(()=>{"use strict"});var jBa=h(()=>{"use strict"});var QBa=h(()=>{"use strict"});var Qzi=h(()=>{"use strict";pOa();fOa();dOa();mOa();hOa();gOa();AOa();yOa();bOa();EOa();IOa();vOa();xOa();COa();wOa();SOa();TOa();OOa();BOa();POa();DOa();ROa();kOa();FOa();NOa();jOa();QOa();zOa();MOa();LOa();UOa();VOa();_Oa();GOa();qOa();WOa();HOa();KOa();JOa();YOa();XOa();ZOa();$Oa();eBa();tBa();rBa();nBa();iBa();oBa();sBa();aBa();cBa();uBa();lBa();pBa();fBa();dBa();mBa();hBa();gBa();ABa();yBa();bBa();EBa();IBa();vBa();xBa();CBa();wBa();SBa();TBa();OBa();BBa();PBa();DBa();RBa();kBa();FBa();NBa();jBa();QBa()});var zzi={};X(zzi,{ExampleCodeSample:()=>q6,ExampleEndpointSuccessResponse:()=>CA,ExampleQueryParameterShape:()=>lw,ExampleRequestBody:()=>DP,ExampleResponse:()=>Ig,FileProperty:()=>mj,FileUploadBodyPropertyEncoding:()=>nDt,FileUploadRequestProperty:()=>kx,HttpEndpointSource:()=>RP,HttpMethod:()=>Ud,HttpRequestBody:()=>Hf,HttpResponseBody:()=>mu,JsonResponse:()=>fE,NonStreamHttpResponseBody:()=>CO,Pagination:()=>s0,PathParameterLocation:()=>iDt,RequestPropertyValue:()=>wO,SdkRequestBodyType:()=>Zq,SdkRequestShape:()=>IU,StreamingResponse:()=>mI,SupportedSdkLanguage:()=>W6,Transport:()=>vU});var zBa=h(()=>{"use strict";Qzi()});var hj,MBa=h(()=>{"use strict";Jr();hj={proto:e=>({...e,type:"proto",_visit:function(t){return hj._visit(this,t)}}),openapi:()=>({type:"openapi",_visit:function(e){return hj._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 LBa=h(()=>{"use strict"});var tye,UBa=h(()=>{"use strict";Jr();tye={header:e=>({...e,type:"header",_visit:function(t){return tye._visit(this,t)}}),_visit:(e,t)=>e.type==="header"?t.header(e):t._other(e)}});var VBa=h(()=>{"use strict"});var _Ba=h(()=>{"use strict"});var H6,GBa=h(()=>{"use strict";Jr();H6={statusCode:()=>({type:"statusCode",_visit:function(e){return H6._visit(this,e)}}),property:e=>({...e,type:"property",_visit:function(t){return H6._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 Apf,Jur,qBa=h(()=>{"use strict";Apf={Minimal:"minimal",Comprehensive:"comprehensive"},Jur={...Apf,_visit:(e,t)=>{switch(e){case Jur.Minimal:return t.minimal();case Jur.Comprehensive:return t.comprehensive();default:return t._other()}}}});var WBa=h(()=>{"use strict"});var HBa=h(()=>{"use strict"});var KBa=h(()=>{"use strict"});var JBa=h(()=>{"use strict"});var ypf,rWe,YBa=h(()=>{"use strict";ypf={Autopilot:"autopilot",Autorelease:"autorelease",Ci:"ci",Manual:"manual"},rWe={...ypf,_visit:(e,t)=>{switch(e){case rWe.Autopilot:return t.autopilot();case rWe.Autorelease:return t.autorelease();case rWe.Ci:return t.ci();case rWe.Manual:return t.manual();default:return t._other()}}}});var XBa=h(()=>{"use strict"});var ZBa=h(()=>{"use strict"});var $Ba=h(()=>{"use strict"});var ePa=h(()=>{"use strict"});var tPa=h(()=>{"use strict"});var rPa=h(()=>{"use strict"});var nPa=h(()=>{"use strict"});var iPa=h(()=>{"use strict"});var oPa=h(()=>{"use strict"});var sPa=h(()=>{"use strict"});var aPa=h(()=>{"use strict"});var Mzi=h(()=>{"use strict";MBa();LBa();UBa();VBa();_Ba();GBa();qBa();WBa();HBa();KBa();JBa();YBa();XBa();ZBa();$Ba();ePa();tPa();rPa();nPa();iPa();oPa();sPa();aPa()});var Lzi={};X(Lzi,{ApiDefinitionSource:()=>hj,ApiVersionScheme:()=>tye,ErrorDiscriminationStrategy:()=>H6,ExampleStyle:()=>Jur,InvocationSource:()=>rWe});var cPa=h(()=>{"use strict";Mzi()});var uPa=h(()=>{"use strict"});var lPa=h(()=>{"use strict"});var pPa=h(()=>{"use strict"});var bpf,$q,fPa=h(()=>{"use strict";bpf={Unary:"UNARY",ClientStream:"CLIENT_STREAM",ServerStream:"SERVER_STREAM",BidirectionalStream:"BIDIRECTIONAL_STREAM"},$q={...bpf,_visit:(e,t)=>{switch(e){case $q.Unary:return t.unary();case $q.ClientStream:return t.clientStream();case $q.ServerStream:return t.serverStream();case $q.BidirectionalStream:return t.bidirectionalStream();default:return t._other()}}}});var dPa=h(()=>{"use strict"});var Pp,mPa=h(()=>{"use strict";Jr();Pp={wellKnown:e=>({value:e,type:"wellKnown",_visit:function(t){return Pp._visit(this,t)}}),userDefined:e=>({...e,type:"userDefined",_visit:function(t){return Pp._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 hPa=h(()=>{"use strict"});var fi,gPa=h(()=>{"use strict";Jr();fi={any:()=>({type:"any",_visit:function(e){return fi._visit(this,e)}}),api:()=>({type:"api",_visit:function(e){return fi._visit(this,e)}}),boolValue:()=>({type:"boolValue",_visit:function(e){return fi._visit(this,e)}}),bytesValue:()=>({type:"bytesValue",_visit:function(e){return fi._visit(this,e)}}),doubleValue:()=>({type:"doubleValue",_visit:function(e){return fi._visit(this,e)}}),duration:()=>({type:"duration",_visit:function(e){return fi._visit(this,e)}}),empty:()=>({type:"empty",_visit:function(e){return fi._visit(this,e)}}),enum:()=>({type:"enum",_visit:function(e){return fi._visit(this,e)}}),enumValue:()=>({type:"enumValue",_visit:function(e){return fi._visit(this,e)}}),field:()=>({type:"field",_visit:function(e){return fi._visit(this,e)}}),fieldCardinality:()=>({type:"fieldCardinality",_visit:function(e){return fi._visit(this,e)}}),fieldKind:()=>({type:"fieldKind",_visit:function(e){return fi._visit(this,e)}}),fieldMask:()=>({type:"fieldMask",_visit:function(e){return fi._visit(this,e)}}),floatValue:()=>({type:"floatValue",_visit:function(e){return fi._visit(this,e)}}),int32Value:()=>({type:"int32Value",_visit:function(e){return fi._visit(this,e)}}),int64Value:()=>({type:"int64Value",_visit:function(e){return fi._visit(this,e)}}),listValue:()=>({type:"listValue",_visit:function(e){return fi._visit(this,e)}}),method:()=>({type:"method",_visit:function(e){return fi._visit(this,e)}}),mixin:()=>({type:"mixin",_visit:function(e){return fi._visit(this,e)}}),nullValue:()=>({type:"nullValue",_visit:function(e){return fi._visit(this,e)}}),option:()=>({type:"option",_visit:function(e){return fi._visit(this,e)}}),sourceContext:()=>({type:"sourceContext",_visit:function(e){return fi._visit(this,e)}}),stringValue:()=>({type:"stringValue",_visit:function(e){return fi._visit(this,e)}}),struct:()=>({type:"struct",_visit:function(e){return fi._visit(this,e)}}),syntax:()=>({type:"syntax",_visit:function(e){return fi._visit(this,e)}}),timestamp:()=>({type:"timestamp",_visit:function(e){return fi._visit(this,e)}}),type:()=>({type:"type",_visit:function(e){return fi._visit(this,e)}}),uint32Value:()=>({type:"uint32Value",_visit:function(e){return fi._visit(this,e)}}),uint64Value:()=>({type:"uint64Value",_visit:function(e){return fi._visit(this,e)}}),value:()=>({type:"value",_visit:function(e){return fi._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 Uzi=h(()=>{"use strict";uPa();lPa();pPa();fPa();dPa();mPa();hPa();gPa()});var Vzi={};X(Vzi,{ProtobufMethodType:()=>$q,ProtobufType:()=>Pp,WellKnownProtobufType:()=>fi});var APa=h(()=>{"use strict";Uzi()});var yPa=h(()=>{"use strict"});var bPa=h(()=>{"use strict"});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 lY,SPa=h(()=>{"use strict";Jr();lY={github:e=>({...e,type:"github",_visit:function(t){return lY._visit(this,t)}}),direct:e=>({...e,type:"direct",_visit:function(t){return lY._visit(this,t)}}),filesystem:e=>({...e,type:"filesystem",_visit:function(t){return lY._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 yb,TPa=h(()=>{"use strict";Jr();yb={postman:e=>({...e,type:"postman",_visit:function(t){return yb._visit(this,t)}}),npm:e=>({...e,type:"npm",_visit:function(t){return yb._visit(this,t)}}),maven:e=>({...e,type:"maven",_visit:function(t){return yb._visit(this,t)}}),pypi:e=>({...e,type:"pypi",_visit:function(t){return yb._visit(this,t)}}),crates:e=>({...e,type:"crates",_visit:function(t){return yb._visit(this,t)}}),go:e=>({...e,type:"go",_visit:function(t){return yb._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);default:return t._other(e)}}}});var OPa=h(()=>{"use strict"});var _zi=h(()=>{"use strict";yPa();bPa();EPa();IPa();vPa();xPa();CPa();wPa();SPa();TPa();OPa()});var Gzi={};X(Gzi,{PublishTarget:()=>yb,PublishingConfig:()=>lY});var BPa=h(()=>{"use strict";_zi()});var PPa=h(()=>{"use strict"});var DPa=h(()=>{"use strict"});var RPa=h(()=>{"use strict"});var kPa=h(()=>{"use strict"});var Bs,FPa=h(()=>{"use strict";Jr();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 NPa=h(()=>{"use strict"});var jPa=h(()=>{"use strict"});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 GPa=h(()=>{"use strict"});var qPa=h(()=>{"use strict"});var Qu,WPa=h(()=>{"use strict";Jr();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 HPa=h(()=>{"use strict"});var KPa=h(()=>{"use strict"});var JPa=h(()=>{"use strict"});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 rDa=h(()=>{"use strict"});var nDa=h(()=>{"use strict"});var iDa=h(()=>{"use strict"});var oDa=h(()=>{"use strict"});var sDa=h(()=>{"use strict"});var Si,aDa=h(()=>{"use strict";Jr();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 cDa=h(()=>{"use strict"});var uDa=h(()=>{"use strict"});var pY,lDa=h(()=>{"use strict";Jr();pY={samePropertiesAsObject:e=>({...e,type:"samePropertiesAsObject",_visit:function(t){return pY._visit(this,t)}}),singleProperty:e=>({...e,type:"singleProperty",_visit:function(t){return pY._visit(this,t)}}),noProperties:()=>({type:"noProperties",_visit:function(e){return pY._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 pDa=h(()=>{"use strict"});var fDa=h(()=>{"use strict"});var Zi,dDa=h(()=>{"use strict";Jr();Zi={primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return Zi._visit(this,t)}}),container:e=>({container:e,type:"container",_visit:function(t){return Zi._visit(this,t)}}),unknown:e=>({unknown:e,type:"unknown",_visit:function(t){return Zi._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return Zi._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,mDa=h(()=>{"use strict";Jr();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 hDa=h(()=>{"use strict"});var gDa=h(()=>{"use strict"});var ADa=h(()=>{"use strict"});var yDa=h(()=>{"use strict"});var bDa=h(()=>{"use strict"});var EDa=h(()=>{"use strict"});var IDa=h(()=>{"use strict"});var vDa=h(()=>{"use strict"});var a0,xDa=h(()=>{"use strict";Jr();a0={string:e=>({string:e,type:"string",_visit:function(t){return a0._visit(this,t)}}),boolean:e=>({boolean:e,type:"boolean",_visit:function(t){return a0._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 CDa=h(()=>{"use strict"});var wDa=h(()=>{"use strict"});var SDa=h(()=>{"use strict"});var TDa=h(()=>{"use strict"});var nWe,ODa=h(()=>{"use strict";Jr();nWe={enum:e=>({...e,type:"enum",_visit:function(t){return nWe._visit(this,t)}}),_visit:(e,t)=>e.type==="enum"?t.enum(e):t._other(e)}});var BDa=h(()=>{"use strict"});var Epf,C2e,PDa=h(()=>{"use strict";Epf={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"},C2e={...Epf,_visit:(e,t)=>{switch(e){case C2e.ReadOnly:return t.readOnly();case C2e.WriteOnly:return t.writeOnly();default:return t._other()}}}});var DDa=h(()=>{"use strict"});var RDa=h(()=>{"use strict"});var Ipf,rs,kDa=h(()=>{"use strict";Ipf={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"},rs={...Ipf,_visit:(e,t)=>{switch(e){case rs.Integer:return t.integer();case rs.Long:return t.long();case rs.Uint:return t.uint();case rs.Uint64:return t.uint64();case rs.Float:return t.float();case rs.Double:return t.double();case rs.Boolean:return t.boolean();case rs.String:return t.string();case rs.Date:return t.date();case rs.DateTime:return t.dateTime();case rs.DateTimeRfc2822:return t.dateTimeRfc2822();case rs.Uuid:return t.uuid();case rs.Base64:return t.base64();case rs.BigInteger:return t.bigInteger();default:return t._other()}}}});var ti,FDa=h(()=>{"use strict";Jr();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 NDa=h(()=>{"use strict"});var jDa=h(()=>{"use strict"});var SO,QDa=h(()=>{"use strict";Jr();SO={container:e=>({container:e,type:"container",_visit:function(t){return SO._visit(this,t)}}),named:e=>({...e,type:"named",_visit:function(t){return SO._visit(this,t)}}),primitive:e=>({primitive:e,type:"primitive",_visit:function(t){return SO._visit(this,t)}}),unknown:()=>({type:"unknown",_visit:function(e){return SO._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 vpf,e7,zDa=h(()=>{"use strict";vpf={Enum:"ENUM",Object:"OBJECT",Union:"UNION",UndiscriminatedUnion:"UNDISCRIMINATED_UNION"},e7={...vpf,_visit:(e,t)=>{switch(e){case e7.Enum:return t.enum();case e7.Object:return t.object();case e7.Union:return t.union();case e7.UndiscriminatedUnion:return t.undiscriminatedUnion();default:return t._other()}}}});var MDa=h(()=>{"use strict"});var RS,LDa=h(()=>{"use strict";Jr();RS={samePropertiesAsObject:e=>({...e,propertiesType:"samePropertiesAsObject",_visit:function(t){return RS._visit(this,t)}}),singleProperty:e=>({...e,propertiesType:"singleProperty",_visit:function(t){return RS._visit(this,t)}}),noProperties:()=>({propertiesType:"noProperties",_visit:function(e){return RS._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 UDa=h(()=>{"use strict"});var Zce,VDa=h(()=>{"use strict";Jr();Zce={proto:e=>({value:e,type:"proto",_visit:function(t){return Zce._visit(this,t)}}),_visit:(e,t)=>e.type==="proto"?t.proto(e.value):t._other(e)}});var _Da=h(()=>{"use strict"});var GDa=h(()=>{"use strict"});var mc,qDa=h(()=>{"use strict";Jr();mc={alias:e=>({...e,type:"alias",_visit:function(t){return mc._visit(this,t)}}),enum:e=>({...e,type:"enum",_visit:function(t){return mc._visit(this,t)}}),object:e=>({...e,type:"object",_visit:function(t){return mc._visit(this,t)}}),union:e=>({...e,type:"union",_visit:function(t){return mc._visit(this,t)}}),undiscriminatedUnion:e=>({...e,type:"undiscriminatedUnion",_visit:function(t){return mc._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 WDa=h(()=>{"use strict"});var Ur,HDa=h(()=>{"use strict";Jr();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 KDa=h(()=>{"use strict"});var JDa=h(()=>{"use strict"});var YDa=h(()=>{"use strict"});var XDa=h(()=>{"use strict"});var ZDa=h(()=>{"use strict"});var $Da=h(()=>{"use strict"});var xpf,$ce,eRa=h(()=>{"use strict";xpf={Data:"data",Protocol:"protocol"},$ce={...xpf,_visit:(e,t)=>{switch(e){case $ce.Data:return t.data();case $ce.Protocol:return t.protocol();default:return t._other()}}}});var tRa=h(()=>{"use strict"});var rRa=h(()=>{"use strict"});var qzi=h(()=>{"use strict";PPa();DPa();RPa();kPa();FPa();NPa();jPa();QPa();zPa();MPa();LPa();UPa();VPa();_Pa();GPa();qPa();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();GDa();qDa();WDa();HDa();KDa();JDa();YDa();XDa();ZDa();$Da();eRa();tRa();rRa()});var Wzi={};X(Wzi,{ContainerType:()=>Bs,ExampleContainer:()=>Qu,ExamplePrimitive:()=>Si,ExampleSingleUnionTypeProperties:()=>pY,ExampleTypeReferenceShape:()=>Zi,ExampleTypeShape:()=>Su,Literal:()=>a0,NamedTypeDefault:()=>nWe,ObjectPropertyAccess:()=>C2e,PrimitiveTypeV1:()=>rs,PrimitiveTypeV2:()=>ti,ResolvedTypeReference:()=>SO,ShapeType:()=>e7,SingleUnionTypeProperties:()=>RS,Source:()=>Zce,Type:()=>mc,TypeReference:()=>Ur,UnionDiscriminatorContext:()=>$ce});var nRa=h(()=>{"use strict";qzi()});var iRa=h(()=>{"use strict"});var oRa=h(()=>{"use strict"});var Hzi=h(()=>{"use strict";iRa();oRa()});var sRa={};var aRa=h(()=>{"use strict";Hzi()});var Cpf,TO,cRa=h(()=>{"use strict";Cpf={RsaSha256:"RSA_SHA256",RsaSha384:"RSA_SHA384",RsaSha512:"RSA_SHA512",EcdsaSha256:"ECDSA_SHA256",EcdsaSha384:"ECDSA_SHA384",EcdsaSha512:"ECDSA_SHA512",Ed25519:"ED25519"},TO={...Cpf,_visit:(e,t)=>{switch(e){case TO.RsaSha256:return t.rsaSha256();case TO.RsaSha384:return t.rsaSha384();case TO.RsaSha512:return t.rsaSha512();case TO.EcdsaSha256:return t.ecdsaSha256();case TO.EcdsaSha384:return t.ecdsaSha384();case TO.EcdsaSha512:return t.ecdsaSha512();case TO.Ed25519:return t.ed25519();default:return t._other()}}}});var uRa=h(()=>{"use strict"});var t7,lRa=h(()=>{"use strict";Jr();t7={jwks:e=>({...e,type:"jwks",_visit:function(t){return t7._visit(this,t)}}),static:e=>({...e,type:"static",_visit:function(t){return t7._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 pRa=h(()=>{"use strict"});var wpf,r7,fRa=h(()=>{"use strict";wpf={Sha256:"SHA256",Sha1:"SHA1",Sha384:"SHA384",Sha512:"SHA512"},r7={...wpf,_visit:(e,t)=>{switch(e){case r7.Sha256:return t.sha256();case r7.Sha1:return t.sha1();case r7.Sha384:return t.sha384();case r7.Sha512:return t.sha512();default:return t._other()}}}});var dRa=h(()=>{"use strict"});var mRa=h(()=>{"use strict"});var hRa=h(()=>{"use strict"});var gRa=h(()=>{"use strict"});var ARa=h(()=>{"use strict"});var yRa=h(()=>{"use strict"});var Spf,n7,bRa=h(()=>{"use strict";Spf={Sha256:"SHA256",Sha1:"SHA1",Sha384:"SHA384",Sha512:"SHA512"},n7={...Spf,_visit:(e,t)=>{switch(e){case n7.Sha256:return t.sha256();case n7.Sha1:return t.sha1();case n7.Sha384:return t.sha384();case n7.Sha512:return t.sha512();default:return t._other()}}}});var ERa=h(()=>{"use strict"});var rye,IRa=h(()=>{"use strict";Jr();rye={queryParameter:e=>({...e,type:"queryParameter",_visit:function(t){return rye._visit(this,t)}}),_visit:(e,t)=>e.type==="queryParameter"?t.queryParameter(e):t._other(e)}});var vRa=h(()=>{"use strict"});var xRa=h(()=>{"use strict"});var Tpf,Yur,CRa=h(()=>{"use strict";Tpf={Get:"GET",Post:"POST"},Yur={...Tpf,_visit:(e,t)=>{switch(e){case Yur.Get:return t.get();case Yur.Post:return t.post();default:return t._other()}}}});var wRa=h(()=>{"use strict"});var kS,SRa=h(()=>{"use strict";Jr();kS={inlinedPayload:e=>({...e,type:"inlinedPayload",_visit:function(t){return kS._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return kS._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 Opf,oDt,TRa=h(()=>{"use strict";Opf={Alphabetical:"ALPHABETICAL"},oDt={...Opf,_visit:(e,t)=>e===oDt.Alphabetical?t.alphabetical():t._other()}});var Bpf,xU,ORa=h(()=>{"use strict";Bpf={Body:"BODY",Timestamp:"TIMESTAMP",NotificationUrl:"NOTIFICATION_URL",MessageId:"MESSAGE_ID"},xU={...Bpf,_visit:(e,t)=>{switch(e){case xU.Body:return t.body();case xU.Timestamp:return t.timestamp();case xU.NotificationUrl:return t.notificationUrl();case xU.MessageId:return t.messageId();default:return t._other()}}}});var BRa=h(()=>{"use strict"});var PRa=h(()=>{"use strict"});var Ppf,w2e,DRa=h(()=>{"use strict";Ppf={Base64:"BASE64",Hex:"HEX"},w2e={...Ppf,_visit:(e,t)=>{switch(e){case w2e.Base64:return t.base64();case w2e.Hex:return t.hex();default:return t._other()}}}});var i7,RRa=h(()=>{"use strict";Jr();i7={hmac:e=>({...e,type:"hmac",_visit:function(t){return i7._visit(this,t)}}),asymmetric:e=>({...e,type:"asymmetric",_visit:function(t){return i7._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 kRa=h(()=>{"use strict"});var Dpf,eue,FRa=h(()=>{"use strict";Dpf={UnixSeconds:"UNIX_SECONDS",UnixMillis:"UNIX_MILLIS",Iso8601:"ISO8601"},eue={...Dpf,_visit:(e,t)=>{switch(e){case eue.UnixSeconds:return t.unixSeconds();case eue.UnixMillis:return t.unixMillis();case eue.Iso8601:return t.iso8601();default:return t._other()}}}});var Kzi=h(()=>{"use strict";cRa();uRa();lRa();pRa();fRa();dRa();mRa();hRa();gRa();ARa();yRa();bRa();ERa();IRa();vRa();xRa();CRa();wRa();SRa();TRa();ORa();BRa();PRa();DRa();RRa();kRa();FRa()});var Jzi={};X(Jzi,{AsymmetricAlgorithm:()=>TO,AsymmetricKeySource:()=>t7,HmacAlgorithm:()=>r7,WebhookBodyHashAlgorithm:()=>n7,WebhookBodyHashLocation:()=>rye,WebhookHttpMethod:()=>Yur,WebhookPayload:()=>kS,WebhookPayloadBodySort:()=>oDt,WebhookPayloadComponent:()=>xU,WebhookSignatureEncoding:()=>w2e,WebhookSignatureVerification:()=>i7,WebhookTimestampFormat:()=>eue});var NRa=h(()=>{"use strict";Kzi()});var jRa=h(()=>{"use strict"});var K6,QRa=h(()=>{"use strict";Jr();K6={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return K6._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return K6._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 zRa=h(()=>{"use strict"});var MRa=h(()=>{"use strict"});var LRa=h(()=>{"use strict"});var URa=h(()=>{"use strict"});var VRa=h(()=>{"use strict"});var OO,_Ra=h(()=>{"use strict";Jr();OO={inlinedBody:e=>({...e,type:"inlinedBody",_visit:function(t){return OO._visit(this,t)}}),reference:e=>({...e,type:"reference",_visit:function(t){return OO._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 GRa=h(()=>{"use strict"});var qRa=h(()=>{"use strict"});var Rpf,Xur,WRa=h(()=>{"use strict";Rpf={Client:"client",Server:"server"},Xur={...Rpf,_visit:(e,t)=>{switch(e){case Xur.Client:return t.client();case Xur.Server:return t.server();default:return t._other()}}}});var HRa=h(()=>{"use strict"});var Yzi=h(()=>{"use strict";jRa();QRa();zRa();MRa();LRa();URa();VRa();_Ra();GRa();qRa();WRa();HRa()});var Xzi={};X(Xzi,{ExampleWebSocketMessageBody:()=>K6,WebSocketMessageBody:()=>OO,WebSocketMessageOrigin:()=>Xur});var KRa=h(()=>{"use strict";Yzi()});var JRa=h(()=>{"use strict";CCa();izi();WCa();ozi();ywa();azi();Iwa();uzi();C1a();j1a();Tzi();U1a();Bzi();dTa();Dzi();oOa();lOa();Nzi();zBa();Qzi();cPa();Mzi();APa();Uzi();BPa();_zi();nRa();qzi();aRa();Hzi();NRa();Kzi();KRa();Yzi()});var Ut={};X(Ut,{ApiDefinitionSource:()=>hj,ApiVersionScheme:()=>tye,AsymmetricAlgorithm:()=>TO,AsymmetricKeySource:()=>t7,AuthScheme:()=>Gp,AuthSchemesRequirement:()=>uw,AvailabilityStatus:()=>Rm,ContainerType:()=>Bs,Environments:()=>o0,ErrorDeclarationDiscriminantValue:()=>eye,ErrorDiscriminationStrategy:()=>H6,ExampleCodeSample:()=>q6,ExampleContainer:()=>Qu,ExampleEndpointSuccessResponse:()=>CA,ExamplePrimitive:()=>Si,ExampleQueryParameterShape:()=>lw,ExampleRequestBody:()=>DP,ExampleResponse:()=>Ig,ExampleSingleUnionTypeProperties:()=>pY,ExampleStyle:()=>Jur,ExampleTypeReferenceShape:()=>Zi,ExampleTypeShape:()=>Su,ExampleWebSocketMessageBody:()=>K6,FileProperty:()=>mj,FileUploadBodyPropertyEncoding:()=>nDt,FileUploadRequestProperty:()=>kx,GlobalParameterApplyMode:()=>Kur,GlobalParameterLocation:()=>tWe,HmacAlgorithm:()=>r7,HttpEndpointSource:()=>RP,HttpMethod:()=>Ud,HttpRequestBody:()=>Hf,HttpResponseBody:()=>mu,InvocationSource:()=>rWe,JsonResponse:()=>fE,Literal:()=>a0,NamedTypeDefault:()=>nWe,NonStreamHttpResponseBody:()=>CO,OAuthConfiguration:()=>cY,ObjectPropertyAccess:()=>C2e,Pagination:()=>s0,PathParameterLocation:()=>iDt,PrimitiveTypeV1:()=>rs,PrimitiveTypeV2:()=>ti,ProtobufMethodType:()=>$q,ProtobufType:()=>Pp,PublishTarget:()=>yb,PublishingConfig:()=>lY,RequestPropertyValue:()=>wO,ResolvedTypeReference:()=>SO,SdkRequestBodyType:()=>Zq,SdkRequestShape:()=>IU,ShapeType:()=>e7,SingleUnionTypeProperties:()=>RS,Source:()=>Zce,StreamingResponse:()=>mI,SupportedSdkLanguage:()=>W6,Transport:()=>vU,Type:()=>mc,TypeReference:()=>Ur,UnionDiscriminatorContext:()=>$ce,V2AuthValues:()=>EU,V2EndpointLocationHttpMethod:()=>uY,V2HttpEndpointResponseBody:()=>Rx,WebSocketMessageBody:()=>OO,WebSocketMessageOrigin:()=>Xur,WebhookBodyHashAlgorithm:()=>n7,WebhookBodyHashLocation:()=>rye,WebhookHttpMethod:()=>Yur,WebhookPayload:()=>kS,WebhookPayloadBodySort:()=>oDt,WebhookPayloadComponent:()=>xU,WebhookSignatureEncoding:()=>w2e,WebhookSignatureVerification:()=>i7,WebhookTimestampFormat:()=>eue,WellKnownProtobufType:()=>fi,audience:()=>xCa,auth:()=>szi,commons:()=>czi,constants:()=>Ewa,dynamic:()=>Xt,environment:()=>Ozi,errors:()=>Pzi,examples:()=>Rzi,generatorExec:()=>tc,globalParameters:()=>jzi,http:()=>zzi,ir:()=>Lzi,proto:()=>Vzi,publish:()=>Gzi,types:()=>Wzi,variables:()=>sRa,webhooks:()=>Jzi,websocket:()=>Xzi});var Jr=h(()=>{"use strict";JRa()});var o7,YRa,sDt,Zzi,wTy,$zi=h(()=>{"use strict";o7={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},YRa={[o7.Debug]:1,[o7.Info]:2,[o7.Warn]:3,[o7.Error]:4},sDt=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)}},Zzi=class{level;logger;silent;constructor(t){this.level=YRa[t.level],this.logger=t.logger,this.silent=t.silent}shouldLog(t){return!this.silent&&this.level<=YRa[t]}isDebug(){return this.shouldLog(o7.Debug)}debug(t,...r){this.isDebug()&&this.logger.debug(t,...r)}isInfo(){return this.shouldLog(o7.Info)}info(t,...r){this.isInfo()&&this.logger.info(t,...r)}isWarn(){return this.shouldLog(o7.Warn)}warn(t,...r){this.isWarn()&&this.logger.warn(t,...r)}isError(){return this.shouldLog(o7.Error)}error(t,...r){this.isError()&&this.logger.error(t,...r)}},wTy=new Zzi({level:o7.Info,logger:new sDt,silent:!0})});var XRa,ZRa=h(()=>{"use strict";$zi();(function(e){e.LogLevel=o7,e.ConsoleLogger=sDt})(XRa||(XRa={}))});var $Ra=h(()=>{"use strict";ZRa()});var eka=h(()=>{"use strict";$Ra()});var tka=h(()=>{"use strict"});var rka=h(()=>{"use strict";$zi()});var nka=h(()=>{"use strict"});var nu,pw=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 Vd(e,t){return`Expected ${t}. Received ${Npf(e)}.`}function Npf(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 Jk=h(()=>{"use strict"});function fw(e){return{...e,json:ika(e.json),parse:ika(e.parse)}}function ika(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 fY=h(()=>{"use strict"});function Zur(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var eMi=h(()=>{"use strict"});var iWe,tMi=h(()=>{"use strict";eMi();iWe=class extends Error{errors;constructor(t){super(t.map(Zur).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var oWe,rMi=h(()=>{"use strict";eMi();oWe=class extends Error{errors;constructor(t){super(t.map(Zur).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function _d(e){return{nullable:()=>jpf(e),optional:()=>nMi(e),optionalNullable:()=>Qpf(e),transform:t=>iMi(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 iWe(n.errors)}}}function jpf(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,..._d(t)}}function nMi(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,..._d(t)}}function Qpf(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,..._d(t)}}function iMi(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,..._d(r)}}var oka=h(()=>{"use strict";pw();tMi();rMi()});var gj=h(()=>{"use strict";oka();tMi();rMi()});function ska(){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:Vd(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Vd(t,"bigint")}]}:{ok:!0,value:t},getType:()=>nu.BIGINT};return{...fw(e),..._d(e)}}var aka=h(()=>{"use strict";pw();Jk();fY();gj()});var cka=h(()=>{"use strict";aka()});function uka(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Vd(t,"string")}]}:zpf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Vd(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Vd(t,"Date object")}]},getType:()=>nu.DATE};return{...fw(e),..._d(e)}}var zpf,lka=h(()=>{"use strict";pw();Jk();fY();gj();zpf=/^([+-]?\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 pka=h(()=>{"use strict";lka()});function FS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...fw(r),..._d(r)}}}var dY=h(()=>{"use strict";gj();fY()});function aDt(e){let t=new Set(e);return FS(nu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Vd(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Vd(n,"enum")}]}:{ok:!0,value:n})()}function fka(e){return aDt(e).transform({transform:t=>t,untransform:t=>t})}var dka=h(()=>{"use strict";pw();dY();Jk()});var oMi=h(()=>{"use strict";dka()});function mka(e){let t=sMi(e);return{...t,..._d(t)}}function sMi(e){return{parse:(t,r)=>sWe(e).parse(t,r),json:(t,r)=>sWe(e).json(t,r),getType:()=>sWe(e).getType()}}function sWe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var aMi=h(()=>{"use strict";gj()});function cMi(e){return Object.entries(e)}var hka=h(()=>{"use strict"});function cDt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var uMi=h(()=>{"use strict"});function tue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var uDt=h(()=>{"use strict"});function lDt(e){return Object.keys(e)}var lMi=h(()=>{"use strict"});function gka(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Aka=h(()=>{"use strict"});function s7(e){return{withParsedProperties:t=>pMi(e,t)}}function pMi(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(Mpf.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(!tue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Vd(n,"object")}]};let o=new Set(Object.keys(t)),s=cDt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,..._d(r),...s7(r)}}var Mpf,yka=h(()=>{"use strict";uMi();Jk();uDt();gj();Mpf=Object.prototype.hasOwnProperty});var pDt=h(()=>{"use strict";yka()});function bka(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function rue(e){return e.isProperty}var fMi=h(()=>{"use strict"});function $ur(e){let t;function r(){if(t==null){t={};for(let[d,f]of cMi(e)){let m=rue(f)?f.rawKey:d,g=rue(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 cMi(e)){let m=rue(f)?f.rawKey:d,g=rue(f)?f.valueSchema:f;Upf(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])=>rue(f)?f.rawKey:d),_getParsedProperties:()=>lDt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Eka({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 Eka({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return rue(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{...fw(p),..._d(p),...s7(p),...S2e(p)}}function Eka({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!tue(e))return{ok:!1,errors:[{path:s,message:Vd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!Lpf.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 S2e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>Ika({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>Ika({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,..._d(r),...s7(r),...S2e(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,..._d(n),...s7(n),...S2e(n)}}}}function Ika({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!tue(t))return{ok:!1,errors:[{path:i,message:Vd(t,"object")}]};let o=new Set(e),[s,a]=gka(lDt(t),l=>o.has(l)),c=r(cDt(t,a)),u=n(cDt(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 Upf(e){return!Vpf(e)}function Vpf(e){switch(e.getType()){case nu.ANY:case nu.UNKNOWN:case nu.OPTIONAL:case nu.OPTIONAL_NULLABLE:return!0;default:return!1}}var Lpf,dMi=h(()=>{"use strict";pw();hka();uMi();Jk();uDt();lMi();fY();Aka();pDt();gj();fMi();Lpf=Object.prototype.hasOwnProperty});function vka(e){return $ur(e)}var xka=h(()=>{"use strict";dMi()});var mMi=h(()=>{"use strict";dMi();xka();fMi()});function Cka(e){let t={...sMi(e),_getRawProperties:()=>sWe(e)._getRawProperties(),_getParsedProperties:()=>sWe(e)._getParsedProperties()};return{...t,..._d(t),...s7(t),...S2e(t)}}var wka=h(()=>{"use strict";mMi();pDt();gj();aMi()});var Ska=h(()=>{"use strict";aMi();wka()});function elr(e){let t={parse:(r,n)=>Tka(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>Tka(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>nu.LIST};return{...fw(t),..._d(t)}}function Tka(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Vd(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 Oka=h(()=>{"use strict";pw();Jk();fY();gj()});var hMi=h(()=>{"use strict";Oka()});function Bka(e){return FS(nu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Vd(r,`${e.toString()}`)}]})()}var Pka=h(()=>{"use strict";pw();dY();Jk()});function Dka(e){return FS(nu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Vd(r,`"${e}"`)}]})()}var Rka=h(()=>{"use strict";pw();dY();Jk()});var kka=h(()=>{"use strict";Pka();Rka()});var Fka,Nka=h(()=>{"use strict";pw();dY();Fka=FS(nu.ANY,e=>({ok:!0,value:e}))});var jka,Qka=h(()=>{"use strict";pw();dY();Jk();jka=FS(nu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Vd(e,"boolean")}]})});var zka,Mka=h(()=>{"use strict";pw();dY();zka=FS(nu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Lka,Uka=h(()=>{"use strict";pw();dY();Jk();Lka=FS(nu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Vd(e,"number")}]})});var Vka,_ka=h(()=>{"use strict";pw();dY();Jk();Vka=FS(nu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Vd(e,"string")}]})});var Gka,qka=h(()=>{"use strict";pw();dY();Gka=FS(nu.UNKNOWN,e=>({ok:!0,value:e}))});var Wka=h(()=>{"use strict";Nka();Qka();Mka();Uka();_ka();qka()});function Hka(e,t){let r={parse:(n,i)=>tlr({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)=>tlr({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{...fw(r),..._d(r)}}function Kka(e,t){let r={parse:(n,i)=>tlr({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)=>tlr({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{...fw(r),..._d(r)}}function tlr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!tue(e))return{ok:!1,errors:[{path:i,message:Vd(e,"object")}]};let o={},s=[];for(let a in e){if(!_pf.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 _pf,Jka=h(()=>{"use strict";pw();Jk();uDt();fY();gj();_pf=Object.prototype.hasOwnProperty});var Yka=h(()=>{"use strict";Jka()});function Xka(e){let t=elr(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:Vd(n,"Set")}]},getType:()=>nu.SET};return{...fw(r),..._d(r)}}var Zka=h(()=>{"use strict";pw();Jk();fY();hMi();gj()});var $ka=h(()=>{"use strict";Zka()});function tFa(e){let t={parse:(r,n)=>eFa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>eFa((i,o)=>i.json(r,o),e,n),getType:()=>nu.UNDISCRIMINATED_UNION};return{...fw(t),..._d(t)}}function eFa(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 rFa=h(()=>{"use strict";pw();fY();gj()});var nFa=h(()=>{"use strict";rFa()});function iFa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var oFa=h(()=>{"use strict"});function aFa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=aDt(lDt(t)),o={parse:(s,a)=>sFa({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)=>sFa({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{...fw(o),..._d(o),...s7(o)}}function sFa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!tue(e))return{ok:!1,errors:[{path:a,message:Vd(e,"object")}]};let c=e[t],u={};for(let f in e)Gpf.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 Gpf,cFa=h(()=>{"use strict";pw();Jk();uDt();lMi();fY();oMi();pDt();gj();Gpf=Object.prototype.hasOwnProperty});var uFa=h(()=>{"use strict";oFa();cFa()});var lFa=h(()=>{"use strict";cka();pka();oMi();Ska();hMi();kka();mMi();pDt();Wka();Yka();gj();$ka();nFa();uFa()});var D={};X(D,{JsonError:()=>iWe,ParseError:()=>oWe,any:()=>Fka,bigint:()=>ska,boolean:()=>jka,booleanLiteral:()=>Bka,date:()=>uka,discriminant:()=>iFa,enum_:()=>aDt,forwardCompatibleEnum_:()=>fka,getObjectLikeUtils:()=>s7,getObjectUtils:()=>S2e,getSchemaUtils:()=>_d,isProperty:()=>rue,lazy:()=>mka,lazyObject:()=>Cka,list:()=>elr,never:()=>zka,number:()=>Lka,object:()=>$ur,objectWithoutOptionalProperties:()=>vka,optional:()=>nMi,partialRecord:()=>Kka,property:()=>bka,record:()=>Hka,set:()=>Xka,string:()=>Vka,stringLiteral:()=>Dka,transform:()=>iMi,undiscriminatedUnion:()=>tFa,union:()=>aFa,unknown:()=>Gka,withParsedProperties:()=>pMi});var pFa=h(()=>{"use strict";lFa()});var fFa=h(()=>{"use strict"});var je=h(()=>{"use strict";tka();rka();nka();pFa();fFa()});var rlr,gMi=h(()=>{"use strict";je();rlr=D.string()});var aWe,nlr=h(()=>{"use strict";je();aWe=D.string()});var AMi=h(()=>{"use strict";gMi();nlr()});var yMi={};X(yMi,{AudienceDefinition:()=>rlr,AudienceReference:()=>aWe});var dFa=h(()=>{"use strict";AMi()});var Xi,Gl=h(()=>{"use strict";je();Xi=D.objectWithoutOptionalProperties({docs:D.string().optional()})});var T2e,bMi=h(()=>{"use strict";je();T2e=D.objectWithoutOptionalProperties({unsafeName:D.string(),safeName:D.string()})});var cWe,ilr=h(()=>{"use strict";je();bMi();cWe=D.objectWithoutOptionalProperties({originalName:D.string(),camelCase:T2e,pascalCase:T2e,snakeCase:T2e,screamingSnakeCase:T2e})});var Io,hf=h(()=>{"use strict";je();ilr();Io=D.undiscriminatedUnion([D.string(),cWe])});var uWe,olr=h(()=>{"use strict";je();uWe=D.string()});var CU,O2e=h(()=>{"use strict";je();Gl();olr();CU=D.objectWithoutOptionalProperties({key:uWe}).extend(Xi)});var wU,lWe=h(()=>{"use strict";je();wU=D.string()});var slr,EMi=h(()=>{"use strict";je();hf();O2e();lWe();slr=D.objectWithoutOptionalProperties({username:Io,usernameEnvVar:wU.optional(),usernameOmit:D.boolean().optional(),usernamePlaceholder:D.string().optional(),password:Io,passwordEnvVar:wU.optional(),passwordOmit:D.boolean().optional(),passwordPlaceholder:D.string().optional()}).extend(CU)});var alr,IMi=h(()=>{"use strict";je();hf();O2e();lWe();alr=D.objectWithoutOptionalProperties({token:Io,tokenEnvVar:wU.optional(),tokenPlaceholder:D.string().optional()}).extend(CU)});var nye,fDt=h(()=>{"use strict";je();hf();nye=D.objectWithoutOptionalProperties({wireValue:D.string(),name:Io})});var fs,yd=h(()=>{"use strict";je();fDt();fs=D.undiscriminatedUnion([D.string(),nye])});var clr,vMi=h(()=>{"use strict";je();Wo();yd();O2e();lWe();clr=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),prefix:D.string().optional(),headerEnvVar:wU.optional(),headerPlaceholder:D.string().optional()}).extend(CU)});var nue,dDt=h(()=>{"use strict";je();nue=D.string()});var mY,pWe=h(()=>{"use strict";je();mY=D.string()});var hY,fWe=h(()=>{"use strict";je();hY=D.string()});var iye,mDt=h(()=>{"use strict";je();dDt();pWe();fWe();iye=D.objectWithoutOptionalProperties({endpointId:nue,serviceId:mY,subpackageId:hY.optional()})});var ulr,xMi=h(()=>{"use strict";je();ulr=D.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED","ALPHA","BETA","PREVIEW","LEGACY"])});var gY,dWe=h(()=>{"use strict";je();xMi();gY=D.objectWithoutOptionalProperties({status:ulr,message:D.string().optional()})});var Fx,a7=h(()=>{"use strict";je();dWe();Gl();Fx=D.objectWithoutOptionalProperties({availability:gY.optional()}).extend(Xi)});var hDt,CMi=h(()=>{"use strict";je();hDt=D.unknown()});var NS,AY=h(()=>{"use strict";je();CMi();NS=D.objectWithoutOptionalProperties({userSpecifiedExamples:D.record(D.string(),hDt),autogeneratedExamples:D.record(D.string(),hDt)})});var oye,gDt=h(()=>{"use strict";je();oye=D.enum_(["READ_ONLY","WRITE_ONLY"])});var BO,iue=h(()=>{"use strict";je();Wo();a7();yd();AY();gDt();BO=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),propertyAccess:oye.optional(),defaultValue:D.unknown().optional(),v2Examples:NS.optional()}).extend(Fx)});var mWe,llr=h(()=>{"use strict";je();Wo();hf();mWe=D.objectWithoutOptionalProperties({name:Io,type:D.lazy(()=>Ps)})});var c0,yY=h(()=>{"use strict";je();iue();llr();c0=D.objectWithoutOptionalProperties({propertyPath:D.list(mWe).optional(),property:BO})});var plr,wMi=h(()=>{"use strict";je();yY();plr=D.objectWithoutOptionalProperties({responseProperty:c0,headerName:D.string(),valuePrefix:D.string().optional()})});var flr,SMi=h(()=>{"use strict";je();mDt();yY();wMi();flr=D.objectWithoutOptionalProperties({endpoint:iye,expiryProperty:c0.optional(),authenticatedRequestHeaders:D.list(plr)})});var dlr,TMi=h(()=>{"use strict";je();O2e();SMi();dlr=D.objectWithoutOptionalProperties({tokenEndpoint:flr}).extend(CU)});var hWe,mlr=h(()=>{"use strict";je();yY();hWe=D.objectWithoutOptionalProperties({accessToken:c0,expiresIn:c0.optional(),refreshToken:c0.optional()})});var SU,B2e=h(()=>{"use strict";Jr();je();SU=D.union("type",{string:D.object({string:D.string()}),boolean:D.object({boolean:D.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return a0.string(e.string);case"boolean":return a0.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t})});var sye,ADt=h(()=>{"use strict";je();Wo();a7();yd();AY();B2e();sye=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),allowMultiple:D.boolean(),clientDefault:SU.optional(),defaultValue:D.unknown().optional(),v2Examples:NS.optional(),explode:D.boolean().optional()}).extend(Fx)});var hlr,OMi=h(()=>{"use strict";Jr();je();iue();ADt();hlr=D.union("type",{query:sye,body:BO}).transform({transform:e=>{switch(e.type){case"query":return wO.query(e);case"body":return wO.body(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kP,P2e=h(()=>{"use strict";je();llr();OMi();kP=D.objectWithoutOptionalProperties({propertyPath:D.list(mWe).optional(),property:hlr})});var glr,BMi=h(()=>{"use strict";je();P2e();glr=D.objectWithoutOptionalProperties({refreshToken:kP})});var Alr,PMi=h(()=>{"use strict";je();mDt();mlr();BMi();Alr=D.objectWithoutOptionalProperties({endpointReference:iye,requestProperties:glr,responseProperties:hWe})});var ylr,DMi=h(()=>{"use strict";je();P2e();ylr=D.objectWithoutOptionalProperties({clientId:kP,clientSecret:kP,scopes:kP.optional(),customProperties:D.list(kP).optional()})});var blr,RMi=h(()=>{"use strict";je();mDt();DMi();mlr();blr=D.objectWithoutOptionalProperties({endpointReference:iye,requestProperties:ylr,responseProperties:hWe})});var Elr,kMi=h(()=>{"use strict";je();lWe();PMi();RMi();Elr=D.objectWithoutOptionalProperties({clientIdEnvVar:wU.optional(),clientSecretEnvVar:wU.optional(),tokenPrefix:D.string().optional(),tokenHeader:D.string().optional(),scopes:D.list(D.string()).optional(),tokenEndpoint:blr,refreshEndpoint:Alr.optional()})});var Ilr,FMi=h(()=>{"use strict";Jr();je();kMi();Ilr=D.union("type",{clientCredentials:Elr}).transform({transform:e=>e.type==="clientCredentials"?cY.clientCredentials(e):e,untransform:({_visit:e,...t})=>t})});var vlr,NMi=h(()=>{"use strict";je();O2e();FMi();vlr=D.objectWithoutOptionalProperties({configuration:Ilr}).extend(CU)});var xlr,jMi=h(()=>{"use strict";Jr();je();EMi();IMi();vMi();TMi();NMi();xlr=D.union(D.discriminant("type","_type"),{bearer:alr,basic:slr,header:clr,oauth:vlr,inferred:dlr}).transform({transform:e=>{switch(e.type){case"bearer":return Gp.bearer(e);case"basic":return Gp.basic(e);case"header":return Gp.header(e);case"oauth":return Gp.oauth(e);case"inferred":return Gp.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Clr,QMi=h(()=>{"use strict";je();Clr=D.enum_(["ALL","ANY","ENDPOINT_SECURITY"])});var wlr,zMi=h(()=>{"use strict";je();Gl();jMi();QMi();wlr=D.objectWithoutOptionalProperties({requirement:Clr,schemes:D.list(xlr)}).extend(Xi)});var Slr,MMi=h(()=>{"use strict";je();Slr=D.string()});var LMi=h(()=>{"use strict";zMi();jMi();olr();QMi();MMi();O2e();EMi();IMi();lWe();vMi();wMi();TMi();SMi();DMi();mlr();kMi();FMi();PMi();BMi();NMi();RMi()});var UMi={};X(UMi,{ApiAuth:()=>wlr,AuthScheme:()=>xlr,AuthSchemeKey:()=>uWe,AuthSchemesRequirement:()=>Clr,AuthScope:()=>Slr,BaseAuthScheme:()=>CU,BasicAuthScheme:()=>slr,BearerAuthScheme:()=>alr,EnvironmentVariable:()=>wU,HeaderAuthScheme:()=>clr,InferredAuthScheme:()=>dlr,InferredAuthSchemeTokenEndpoint:()=>flr,InferredAuthenticatedRequestHeader:()=>plr,OAuthAccessTokenRequestProperties:()=>ylr,OAuthAccessTokenResponseProperties:()=>hWe,OAuthClientCredentials:()=>Elr,OAuthConfiguration:()=>Ilr,OAuthRefreshEndpoint:()=>Alr,OAuthRefreshTokenRequestProperties:()=>glr,OAuthScheme:()=>vlr,OAuthTokenEndpoint:()=>blr});var mFa=h(()=>{"use strict";LMi()});var aye,yDt=h(()=>{"use strict";je();aye=D.string()});var cye,bDt=h(()=>{"use strict";je();cye=D.string()});var Tlr,VMi=h(()=>{"use strict";je();Tlr=D.objectWithoutOptionalProperties({original:D.string()})});var EDt,_Mi=h(()=>{"use strict";je();EDt=D.string()});var TU,D2e=h(()=>{"use strict";je();hf();TU=D.objectWithoutOptionalProperties({allParts:D.list(Io),packagePath:D.list(Io),file:Io.optional()})});var PO,oue=h(()=>{"use strict";je();PO=D.string()});var gWe,Olr=h(()=>{"use strict";je();gWe=D.string()});var Blr,GMi=h(()=>{"use strict";je();Blr=D.string()});var AWe,Plr=h(()=>{"use strict";je();AWe=D.string()});var OU,R2e=h(()=>{"use strict";je();OU=D.objectWithoutOptionalProperties({contentType:D.string().optional()})});var uye,IDt=h(()=>{"use strict";je();dWe();Gl();uye=D.objectWithoutOptionalProperties({availability:gY.optional()}).extend(Xi)});var bY,yWe=h(()=>{"use strict";je();bY=D.objectWithoutOptionalProperties({jsonExample:D.unknown()})});var qMi=h(()=>{"use strict";dWe();xMi();a7();yDt();dDt();mDt();bDt();VMi();_Mi();D2e();ilr();fDt();yd();hf();bMi();pWe();fWe();oue();Olr();GMi();Plr();R2e();Gl();IDt();yWe()});var WMi={};X(WMi,{Availability:()=>gY,AvailabilityStatus:()=>ulr,Declaration:()=>Fx,DisplayName:()=>aye,EndpointId:()=>nue,EndpointReference:()=>iye,ErrorId:()=>cye,EscapedString:()=>Tlr,FeatureId:()=>EDt,FernFilepath:()=>TU,Name:()=>cWe,NameAndWireValue:()=>nye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Io,SafeAndUnsafeString:()=>T2e,ServiceId:()=>mY,SubpackageId:()=>hY,TypeId:()=>PO,WebSocketChannelId:()=>AWe,WebhookGroupId:()=>gWe,WebhookId:()=>Blr,WithContentType:()=>OU,WithDocs:()=>Xi,WithDocsAndAvailability:()=>uye,WithJsonExample:()=>bY});var hFa=h(()=>{"use strict";qMi()});var Dlr,HMi=h(()=>{"use strict";je();yd();Dlr=D.objectWithoutOptionalProperties({errorInstanceIdKey:fs})});var KMi=h(()=>{"use strict";HMi()});var JMi={};X(JMi,{Constants:()=>Dlr});var gFa=h(()=>{"use strict";KMi()});var k2e,YMi=h(()=>{"use strict";je();k2e=D.objectWithoutOptionalProperties({unsafeName:D.string(),safeName:D.string()})});var Zg,J6=h(()=>{"use strict";je();YMi();Zg=D.objectWithoutOptionalProperties({originalName:D.string(),camelCase:k2e,pascalCase:k2e,snakeCase:k2e,screamingSnakeCase:k2e})});var Rlr,XMi=h(()=>{"use strict";je();J6();Rlr=D.objectWithoutOptionalProperties({username:Zg,usernameOmit:D.boolean().optional(),password:Zg,passwordOmit:D.boolean().optional()})});var klr,ZMi=h(()=>{"use strict";je();J6();klr=D.objectWithoutOptionalProperties({token:Zg})});var hI,c7=h(()=>{"use strict";je();J6();hI=D.objectWithoutOptionalProperties({wireValue:D.string(),name:Zg})});var Flr,$Mi=h(()=>{"use strict";je();Flr=D.enum_(["READ_ONLY","WRITE_ONLY"])});var vg,Aj=h(()=>{"use strict";je();Wo();c7();$Mi();vg=D.objectWithoutOptionalProperties({name:hI,typeReference:D.lazy(()=>u0.TypeReference),propertyAccess:Flr.optional(),variable:D.string().optional()})});var Nlr,e6i=h(()=>{"use strict";je();Aj();Nlr=D.objectWithoutOptionalProperties({header:vg})});var jlr,t6i=h(()=>{"use strict";je();Aj();jlr=D.objectWithoutOptionalProperties({parameters:D.list(vg).optional()})});var Qlr,r6i=h(()=>{"use strict";je();J6();Aj();Qlr=D.objectWithoutOptionalProperties({clientId:Zg,clientSecret:Zg,customProperties:D.list(vg).optional()})});var zlr,n6i=h(()=>{"use strict";Jr();je();XMi();ZMi();e6i();t6i();r6i();zlr=D.union("type",{basic:Rlr,bearer:klr,header:Nlr,oauth:Qlr,inferred:jlr}).transform({transform:e=>{switch(e.type){case"basic":return Xt.Auth.basic(e);case"bearer":return Xt.Auth.bearer(e);case"header":return Xt.Auth.header(e);case"oauth":return Xt.Auth.oauth(e);case"inferred":return Xt.Auth.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Mlr,i6i=h(()=>{"use strict";je();Mlr=D.objectWithoutOptionalProperties({username:D.string(),password:D.string()})});var Llr,o6i=h(()=>{"use strict";je();Llr=D.objectWithoutOptionalProperties({token:D.string()})});var Ulr,s6i=h(()=>{"use strict";je();Ulr=D.objectWithoutOptionalProperties({value:D.unknown()})});var Vlr,a6i=h(()=>{"use strict";je();Vlr=D.objectWithoutOptionalProperties({values:D.record(D.string(),D.unknown()).optional()})});var _lr,c6i=h(()=>{"use strict";je();_lr=D.objectWithoutOptionalProperties({clientId:D.string(),clientSecret:D.string(),customPropertyValues:D.record(D.string(),D.unknown()).optional()})});var Glr,u6i=h(()=>{"use strict";Jr();je();i6i();o6i();s6i();a6i();c6i();Glr=D.union("type",{basic:Mlr,bearer:Llr,header:Ulr,oauth:_lr,inferred:Vlr}).transform({transform:e=>{switch(e.type){case"basic":return Xt.AuthValues.basic(e);case"bearer":return Xt.AuthValues.bearer(e);case"header":return Xt.AuthValues.header(e);case"oauth":return Xt.AuthValues.oauth(e);case"inferred":return Xt.AuthValues.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var l6i=h(()=>{"use strict";n6i();u6i();XMi();i6i();ZMi();o6i();e6i();s6i();t6i();a6i();r6i();c6i()});var p6i={};X(p6i,{Auth:()=>zlr,AuthValues:()=>Glr,BasicAuth:()=>Rlr,BasicAuthValues:()=>Mlr,BearerAuth:()=>klr,BearerAuthValues:()=>Llr,HeaderAuth:()=>Nlr,HeaderAuthValues:()=>Ulr,InferredAuth:()=>jlr,InferredAuthValues:()=>Vlr,OAuth:()=>Qlr,OAuthValues:()=>_lr});var AFa=h(()=>{"use strict";l6i()});var qlr,f6i=h(()=>{"use strict";je();qlr=D.string()});var Wlr,d6i=h(()=>{"use strict";je();J6();Wlr=D.objectWithoutOptionalProperties({allParts:D.list(Zg),packagePath:D.list(Zg),file:Zg.optional()})});var yFa,bFa=h(()=>{"use strict";je();c7();yFa=D.undiscriminatedUnion([D.string(),hI])});var EFa,IFa=h(()=>{"use strict";je();J6();EFa=D.undiscriminatedUnion([D.string(),Zg])});var EY,bWe=h(()=>{"use strict";je();EY=D.string()});var EWe,Hlr=h(()=>{"use strict";je();EWe=D.objectWithoutOptionalProperties({docs:D.string().optional()})});var m6i=h(()=>{"use strict";f6i();d6i();J6();c7();bFa();IFa();YMi();bWe();Hlr()});var h6i={};X(h6i,{EndpointId:()=>qlr,FernFilepath:()=>Wlr,Name:()=>Zg,NameAndWireValue:()=>hI,NameAndWireValueOrString:()=>yFa,NameOrString:()=>EFa,SafeAndUnsafeString:()=>k2e,TypeId:()=>EY,WithDocs:()=>EWe});var vFa=h(()=>{"use strict";m6i()});var FP,sue=h(()=>{"use strict";je();d6i();J6();FP=D.objectWithoutOptionalProperties({fernFilepath:Wlr,name:Zg})});var g6i=h(()=>{"use strict";sue()});var A6i={};X(A6i,{Declaration:()=>FP});var xFa=h(()=>{"use strict";g6i()});var IWe,Klr=h(()=>{"use strict";Jr();je();Wo();IWe=D.union("type",{bytes:D.object({}),typeReference:D.object({value:D.lazy(()=>u0.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return Xt.ReferencedRequestBodyType.bytes();case"typeReference":return Xt.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Jlr,y6i=h(()=>{"use strict";je();Aj();Klr();Jlr=D.objectWithoutOptionalProperties({pathParameters:D.list(vg).optional(),body:IWe.optional()})});var Ylr,b6i=h(()=>{"use strict";je();Ylr=D.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var vWe,Xlr=h(()=>{"use strict";je();b6i();vWe=D.objectWithoutOptionalProperties({method:Ylr,path:D.string()})});var IY,xWe=h(()=>{"use strict";je();IY=D.string()});var lye,vDt=h(()=>{"use strict";je();lye=D.string()});var pye,xDt=h(()=>{"use strict";je();pye=D.string()});var Zlr,E6i=h(()=>{"use strict";je();vDt();xDt();Zlr=D.record(lye,pye)});var $lr,I6i=h(()=>{"use strict";je();xWe();E6i();$lr=D.undiscriminatedUnion([IY,Zlr])});var CWe,v6i=h(()=>{"use strict";je();CWe=D.record(D.string(),D.unknown())});var epr,x6i=h(()=>{"use strict";je();u6i();Xlr();I6i();v6i();epr=D.objectWithoutOptionalProperties({endpoint:vWe,baseUrl:D.property("baseURL",D.string().optional()),environment:$lr.optional(),auth:Glr.optional(),pathParameters:CWe.optional(),queryParameters:CWe.optional(),headers:CWe.optional(),requestBody:D.unknown().optional()})});var tpr,C6i=h(()=>{"use strict";je();x6i();tpr=D.objectWithoutOptionalProperties({id:D.string(),name:D.string().optional(),isUserSpecified:D.boolean().optional()}).extend(epr)});var rpr,w6i=h(()=>{"use strict";Jr();je();c7();Aj();rpr=D.union("type",{file:hI,fileArray:hI,bodyProperty:vg}).transform({transform:e=>{switch(e.type){case"file":return Xt.FileUploadRequestBodyProperty.file(e);case"fileArray":return Xt.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return Xt.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var npr,S6i=h(()=>{"use strict";je();w6i();npr=D.objectWithoutOptionalProperties({properties:D.list(rpr)})});var ipr,T6i=h(()=>{"use strict";je();J6();Klr();ipr=D.objectWithoutOptionalProperties({bodyKey:Zg,bodyType:IWe})});var opr,O6i=h(()=>{"use strict";Jr();je();Aj();S6i();T6i();opr=D.union("type",{properties:D.object({value:D.list(vg)}),referenced:ipr,fileUpload:npr}).transform({transform:e=>{switch(e.type){case"properties":return Xt.InlinedRequestBody.properties(e.value);case"referenced":return Xt.InlinedRequestBody.referenced(e);case"fileUpload":return Xt.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t})});var spr,B6i=h(()=>{"use strict";je();spr=D.objectWithoutOptionalProperties({includePathParameters:D.boolean(),onlyPathParameters:D.boolean()})});var apr,P6i=h(()=>{"use strict";je();sue();Aj();O6i();B6i();apr=D.objectWithoutOptionalProperties({declaration:FP,pathParameters:D.list(vg).optional(),queryParameters:D.list(vg).optional(),headers:D.list(vg).optional(),body:opr.optional(),metadata:spr.optional()})});var cpr,D6i=h(()=>{"use strict";Jr();je();y6i();P6i();cpr=D.union("type",{body:Jlr,inlined:apr}).transform({transform:e=>{switch(e.type){case"body":return Xt.Request.body(e);case"inlined":return Xt.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var upr,R6i=h(()=>{"use strict";Jr();je();upr=D.union("type",{json:D.object({}),streaming:D.object({}),streamParameter:D.object({}),fileDownload:D.object({}),text:D.object({}),bytes:D.object({})}).transform({transform:e=>{switch(e.type){case"json":return Xt.Response.json();case"streaming":return Xt.Response.streaming();case"streamParameter":return Xt.Response.streamParameter();case"fileDownload":return Xt.Response.fileDownload();case"text":return Xt.Response.text();case"bytes":return Xt.Response.bytes();default:return e}},untransform:({_visit:e,...t})=>t})});var lpr,k6i=h(()=>{"use strict";je();n6i();sue();C6i();Xlr();D6i();R6i();lpr=D.objectWithoutOptionalProperties({auth:zlr.optional(),declaration:FP,location:vWe,request:cpr,response:upr,examples:D.list(tpr).optional()})});var F6i=h(()=>{"use strict";y6i();k6i();C6i();Xlr();S6i();w6i();P6i();O6i();B6i();T6i();Klr();D6i();R6i()});var N6i={};X(N6i,{BodyRequest:()=>Jlr,Endpoint:()=>lpr,EndpointExample:()=>tpr,EndpointLocation:()=>vWe,FileUploadRequestBody:()=>npr,FileUploadRequestBodyProperty:()=>rpr,InlinedRequest:()=>apr,InlinedRequestBody:()=>opr,InlinedRequestMetadata:()=>spr,ReferencedRequestBody:()=>ipr,ReferencedRequestBodyType:()=>IWe,Request:()=>cpr,Response:()=>upr});var CFa=h(()=>{"use strict";F6i()});var ppr,j6i=h(()=>{"use strict";je();J6();vDt();ppr=D.objectWithoutOptionalProperties({id:lye,name:Zg})});var fpr,Q6i=h(()=>{"use strict";je();J6();Hlr();vDt();xWe();xDt();fpr=D.objectWithoutOptionalProperties({id:IY,name:Zg,urls:D.record(lye,pye)}).extend(EWe)});var dpr,z6i=h(()=>{"use strict";je();j6i();Q6i();dpr=D.objectWithoutOptionalProperties({baseUrls:D.list(ppr),environments:D.list(fpr)})});var mpr,M6i=h(()=>{"use strict";je();J6();Hlr();xWe();xDt();mpr=D.objectWithoutOptionalProperties({id:IY,name:Zg,url:pye}).extend(EWe)});var hpr,L6i=h(()=>{"use strict";je();M6i();hpr=D.objectWithoutOptionalProperties({environments:D.list(mpr)})});var gpr,U6i=h(()=>{"use strict";Jr();je();z6i();L6i();gpr=D.union("type",{singleBaseUrl:hpr,multipleBaseUrls:dpr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return Xt.Environments.singleBaseUrl(e);case"multipleBaseUrls":return Xt.Environments.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Apr,V6i=h(()=>{"use strict";je();xWe();U6i();Apr=D.objectWithoutOptionalProperties({defaultEnvironment:IY.optional(),environments:gpr})});var _6i=h(()=>{"use strict";vDt();j6i();xWe();U6i();V6i();xDt();I6i();Q6i();z6i();E6i();M6i();L6i()});var G6i={};X(G6i,{EnvironmentBaseUrlId:()=>lye,EnvironmentBaseUrlWithId:()=>ppr,EnvironmentId:()=>IY,EnvironmentUrl:()=>pye,EnvironmentValues:()=>$lr,Environments:()=>gpr,EnvironmentsConfig:()=>Apr,MultipleBaseUrlsEnvironment:()=>fpr,MultipleBaseUrlsEnvironments:()=>dpr,MultipleEnvironmentUrlValues:()=>Zlr,SingleBaseUrlEnvironment:()=>mpr,SingleBaseUrlEnvironments:()=>hpr});var wFa=h(()=>{"use strict";_6i()});var q6i=h(()=>{"use strict";b6i()});var W6i={};X(W6i,{HttpMethod:()=>Ylr});var SFa=h(()=>{"use strict";q6i()});var ypr,H6i=h(()=>{"use strict";je();ypr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var bpr,K6i=h(()=>{"use strict";je();bpr=D.enum_(["explicit","auto"])});var wWe,Epr=h(()=>{"use strict";je();wWe=D.string()});var Ipr,J6i=h(()=>{"use strict";je();Ipr=D.enum_(["header","query","body","path"])});var SWe,vpr=h(()=>{"use strict";je();Wo();yd();Gl();B2e();K6i();Epr();J6i();SWe=D.objectWithoutOptionalProperties({id:wWe,name:fs,location:Ipr,target:D.string(),valueType:D.lazy(()=>Ps),env:D.string().optional(),clientDefault:SU.optional(),optional:D.boolean().optional(),apply:bpr.optional()}).extend(Xi)});var xpr,Y6i=h(()=>{"use strict";je();Wo();sue();xpr=D.objectWithoutOptionalProperties({declaration:FP,typeReference:D.lazy(()=>u0.TypeReference)})});var Cpr,X6i=h(()=>{"use strict";je();c7();Aj();Cpr=D.objectWithoutOptionalProperties({discriminantValue:hI,properties:D.list(vg).optional()})});var wpr,Z6i=h(()=>{"use strict";je();c7();bWe();Aj();wpr=D.objectWithoutOptionalProperties({typeId:EY,discriminantValue:hI,properties:D.list(vg)})});var Spr,$6i=h(()=>{"use strict";je();Wo();c7();Aj();Spr=D.objectWithoutOptionalProperties({typeReference:D.lazy(()=>u0.TypeReference),discriminantValue:hI,properties:D.list(vg).optional()})});var Tpr,eLi=h(()=>{"use strict";Jr();je();X6i();Z6i();$6i();Tpr=D.union("type",{samePropertiesAsObject:wpr,singleProperty:Spr,noProperties:Cpr}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return Xt.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return Xt.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return Xt.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Opr,tLi=h(()=>{"use strict";je();c7();sue();eLi();Opr=D.objectWithoutOptionalProperties({declaration:FP,discriminant:hI,types:D.record(D.string(),Tpr),inheritedBaseProperties:D.list(hI).optional()})});var Bpr,rLi=h(()=>{"use strict";je();c7();sue();Bpr=D.objectWithoutOptionalProperties({declaration:FP,values:D.list(hI)})});var Ppr,nLi=h(()=>{"use strict";je();c7();bWe();sue();Aj();Ppr=D.objectWithoutOptionalProperties({declaration:FP,properties:D.list(vg),extends:D.list(EY).optional(),additionalProperties:D.boolean().optional(),deferredUnionBaseProperties:D.list(hI).optional()})});var Dpr,iLi=h(()=>{"use strict";je();Wo();sue();Dpr=D.objectWithoutOptionalProperties({declaration:FP,types:D.list(D.lazy(()=>u0.TypeReference))})});var Rpr,oLi=h(()=>{"use strict";Jr();je();Y6i();tLi();rLi();nLi();iLi();Rpr=D.union("type",{alias:xpr,enum:Bpr,object:Ppr,discriminatedUnion:Opr,undiscriminatedUnion:Dpr}).transform({transform:e=>{switch(e.type){case"alias":return Xt.NamedType.alias(e);case"enum":return Xt.NamedType.enum(e);case"object":return Xt.NamedType.object(e);case"discriminatedUnion":return Xt.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return Xt.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kpr,sLi=h(()=>{"use strict";je();Wo();ilr();kpr=D.objectWithoutOptionalProperties({id:D.string(),name:cWe,typeReference:D.lazy(()=>u0.TypeReference)})});var Fpr,aLi=h(()=>{"use strict";je();Fpr=D.objectWithoutOptionalProperties({version:D.string(),repoUrl:D.string()})});var Npr,cLi=h(()=>{"use strict";je();Npr=D.objectWithoutOptionalProperties({version:D.string(),coordinate:D.string(),repoUrl:D.string().optional()})});var jpr,uLi=h(()=>{"use strict";je();jpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var Qpr,lLi=h(()=>{"use strict";je();Qpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var zpr,pLi=h(()=>{"use strict";je();zpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var Mpr,fLi=h(()=>{"use strict";je();Mpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var Lpr,dLi=h(()=>{"use strict";je();Lpr=D.objectWithoutOptionalProperties({version:D.string(),repoUrl:D.string()})});var Upr,mLi=h(()=>{"use strict";Jr();je();H6i();aLi();cLi();uLi();lLi();pLi();fLi();dLi();Upr=D.union("type",{go:Fpr,swift:Lpr,maven:Npr,npm:jpr,nuget:Qpr,pypi:zpr,rubygems:Mpr,crates:ypr}).transform({transform:e=>{switch(e.type){case"go":return Xt.PublishInfo.go(e);case"swift":return Xt.PublishInfo.swift(e);case"maven":return Xt.PublishInfo.maven(e);case"npm":return Xt.PublishInfo.npm(e);case"nuget":return Xt.PublishInfo.nuget(e);case"pypi":return Xt.PublishInfo.pypi(e);case"rubygems":return Xt.PublishInfo.rubygems(e);case"crates":return Xt.PublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Vpr,hLi=h(()=>{"use strict";Jr();je();mLi();Vpr=D.union("type",{publish:D.object({value:Upr}),local:D.object({})}).transform({transform:e=>{switch(e.type){case"publish":return Xt.GeneratorOutputConfig.publish(e.value);case"local":return Xt.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t})});var _pr,gLi=h(()=>{"use strict";je();hLi();_pr=D.objectWithoutOptionalProperties({apiName:D.string(),organization:D.string(),customConfig:D.unknown(),outputConfig:Vpr})});var Gpr,ALi=h(()=>{"use strict";je();vpr();f6i();bWe();k6i();V6i();Aj();oLi();sLi();gLi();Gpr=D.objectWithoutOptionalProperties({version:D.stringLiteral("1.0.0"),types:D.record(EY,Rpr),endpoints:D.record(qlr,lpr),environments:Apr.optional(),headers:D.list(vg).optional(),pathParameters:D.list(vg).optional(),variables:D.list(kpr).optional(),globalParameters:D.list(SWe).optional(),generatorConfig:_pr.optional()})});var yLi=h(()=>{"use strict";H6i();ALi();gLi();hLi();aLi();cLi();uLi();lLi();mLi();pLi();fLi();dLi()});var bLi={};X(bLi,{CratesPublishInfo:()=>ypr,DynamicIntermediateRepresentation:()=>Gpr,GeneratorConfig:()=>_pr,GeneratorOutputConfig:()=>Vpr,GoPublishInfo:()=>Fpr,MavenPublishInfo:()=>Npr,NpmPublishInfo:()=>jpr,NugetPublishInfo:()=>Qpr,PublishInfo:()=>Upr,PypiPublishInfo:()=>zpr,RubyGemsPublishInfo:()=>Mpr,SwiftPublishInfo:()=>Lpr});var TFa=h(()=>{"use strict";yLi()});var qpr,ELi=h(()=>{"use strict";je();qpr=D.enum_(["CRITICAL","WARNING"])});var Wpr,ILi=h(()=>{"use strict";je();ELi();Wpr=D.objectWithoutOptionalProperties({severity:qpr,message:D.string()})});var OFa,BFa=h(()=>{"use strict";je();ILi();OFa=D.objectWithoutOptionalProperties({snippet:D.string(),errors:D.list(Wpr).optional()})});var vLi=h(()=>{"use strict";x6i();BFa();ILi();ELi();v6i()});var xLi={};X(xLi,{EndpointSnippetRequest:()=>epr,EndpointSnippetResponse:()=>OFa,ErrorSeverity:()=>qpr,Error_:()=>Wpr,Values:()=>CWe});var PFa=h(()=>{"use strict";vLi()});var Hpr,CLi=h(()=>{"use strict";Jr();je();Hpr=D.union("type",{boolean:D.object({value:D.boolean()}),string:D.object({value:D.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return Xt.LiteralType.boolean(e.value);case"string":return Xt.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var DFa,RFa=h(()=>{"use strict";je();Wo();DFa=D.objectWithoutOptionalProperties({key:D.lazy(()=>u0.TypeReference),value:D.lazy(()=>u0.TypeReference)})});var Kpr,wLi=h(()=>{"use strict";je();Kpr=D.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var kFa,FFa=h(()=>{"use strict";Jr();je();Wo();bWe();CLi();wLi();kFa=D.union("type",{list:D.object({value:D.lazy(()=>u0.TypeReference)}),literal:D.object({value:Hpr}),map:D.lazyObject(()=>u0.MapType),named:D.object({value:EY}),nullable:D.object({value:D.lazy(()=>u0.TypeReference)}),optional:D.object({value:D.lazy(()=>u0.TypeReference)}),primitive:D.object({value:Kpr}),set:D.object({value:D.lazy(()=>u0.TypeReference)}),unknown:D.object({})}).transform({transform:e=>{switch(e.type){case"list":return Xt.TypeReference.list(e.value);case"literal":return Xt.TypeReference.literal(e.value);case"map":return Xt.TypeReference.map(e);case"named":return Xt.TypeReference.named(e.value);case"nullable":return Xt.TypeReference.nullable(e.value);case"optional":return Xt.TypeReference.optional(e.value);case"primitive":return Xt.TypeReference.primitive(e.value);case"set":return Xt.TypeReference.set(e.value);case"unknown":return Xt.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var SLi=h(()=>{"use strict";Y6i();tLi();rLi();CLi();RFa();Aj();oLi();$Mi();nLi();wLi();eLi();X6i();Z6i();$6i();FFa();iLi()});var TLi={};X(TLi,{AliasType:()=>xpr,DiscriminatedUnionType:()=>Opr,EnumType:()=>Bpr,LiteralType:()=>Hpr,MapType:()=>DFa,NamedParameter:()=>vg,NamedType:()=>Rpr,ObjectPropertyAccess:()=>Flr,ObjectType:()=>Ppr,PrimitiveTypeV1:()=>Kpr,SingleDiscriminatedUnionType:()=>Tpr,SingleDiscriminatedUnionTypeNoProperties:()=>Cpr,SingleDiscriminatedUnionTypeObject:()=>wpr,SingleDiscriminatedUnionTypeSingleProperty:()=>Spr,TypeReference:()=>kFa,UndiscriminatedUnionType:()=>Dpr});var NFa=h(()=>{"use strict";SLi()});var OLi=h(()=>{"use strict";sLi()});var BLi={};X(BLi,{VariableDeclaration:()=>kpr});var jFa=h(()=>{"use strict";OLi()});var QFa=h(()=>{"use strict";AFa();l6i();vFa();m6i();xFa();g6i();CFa();F6i();wFa();_6i();SFa();q6i();TFa();yLi();PFa();vLi();NFa();SLi();jFa();OLi()});var u0={};X(u0,{AliasType:()=>xpr,Auth:()=>zlr,AuthValues:()=>Glr,BasicAuth:()=>Rlr,BasicAuthValues:()=>Mlr,BearerAuth:()=>klr,BearerAuthValues:()=>Llr,BodyRequest:()=>Jlr,CratesPublishInfo:()=>ypr,Declaration:()=>FP,DiscriminatedUnionType:()=>Opr,DynamicIntermediateRepresentation:()=>Gpr,Endpoint:()=>lpr,EndpointExample:()=>tpr,EndpointId:()=>qlr,EndpointLocation:()=>vWe,EndpointSnippetRequest:()=>epr,EndpointSnippetResponse:()=>OFa,EnumType:()=>Bpr,EnvironmentBaseUrlId:()=>lye,EnvironmentBaseUrlWithId:()=>ppr,EnvironmentId:()=>IY,EnvironmentUrl:()=>pye,EnvironmentValues:()=>$lr,Environments:()=>gpr,EnvironmentsConfig:()=>Apr,ErrorSeverity:()=>qpr,Error_:()=>Wpr,FernFilepath:()=>Wlr,FileUploadRequestBody:()=>npr,FileUploadRequestBodyProperty:()=>rpr,GeneratorConfig:()=>_pr,GeneratorOutputConfig:()=>Vpr,GoPublishInfo:()=>Fpr,HeaderAuth:()=>Nlr,HeaderAuthValues:()=>Ulr,HttpMethod:()=>Ylr,InferredAuth:()=>jlr,InferredAuthValues:()=>Vlr,InlinedRequest:()=>apr,InlinedRequestBody:()=>opr,InlinedRequestMetadata:()=>spr,LiteralType:()=>Hpr,MapType:()=>DFa,MavenPublishInfo:()=>Npr,MultipleBaseUrlsEnvironment:()=>fpr,MultipleBaseUrlsEnvironments:()=>dpr,MultipleEnvironmentUrlValues:()=>Zlr,Name:()=>Zg,NameAndWireValue:()=>hI,NameAndWireValueOrString:()=>yFa,NameOrString:()=>EFa,NamedParameter:()=>vg,NamedType:()=>Rpr,NpmPublishInfo:()=>jpr,NugetPublishInfo:()=>Qpr,OAuth:()=>Qlr,OAuthValues:()=>_lr,ObjectPropertyAccess:()=>Flr,ObjectType:()=>Ppr,PrimitiveTypeV1:()=>Kpr,PublishInfo:()=>Upr,PypiPublishInfo:()=>zpr,ReferencedRequestBody:()=>ipr,ReferencedRequestBodyType:()=>IWe,Request:()=>cpr,Response:()=>upr,RubyGemsPublishInfo:()=>Mpr,SafeAndUnsafeString:()=>k2e,SingleBaseUrlEnvironment:()=>mpr,SingleBaseUrlEnvironments:()=>hpr,SingleDiscriminatedUnionType:()=>Tpr,SingleDiscriminatedUnionTypeNoProperties:()=>Cpr,SingleDiscriminatedUnionTypeObject:()=>wpr,SingleDiscriminatedUnionTypeSingleProperty:()=>Spr,SwiftPublishInfo:()=>Lpr,TypeId:()=>EY,TypeReference:()=>kFa,UndiscriminatedUnionType:()=>Dpr,Values:()=>CWe,VariableDeclaration:()=>kpr,WithDocs:()=>EWe,auth:()=>p6i,commons:()=>h6i,declaration:()=>A6i,endpoints:()=>N6i,environment:()=>G6i,http:()=>W6i,ir:()=>bLi,snippets:()=>xLi,types:()=>TLi,variables:()=>BLi});var zFa=h(()=>{"use strict";QFa()});var NP,F2e=h(()=>{"use strict";je();NP=D.string()});var Jpr,PLi=h(()=>{"use strict";je();hf();F2e();Jpr=D.objectWithoutOptionalProperties({id:NP,name:Io})});var vY,TWe=h(()=>{"use strict";je();vY=D.string()});var fye,CDt=h(()=>{"use strict";je();fye=D.string()});var OWe,Ypr=h(()=>{"use strict";je();hf();OWe=D.objectWithoutOptionalProperties({id:D.string(),name:Io,default:D.string().optional(),values:D.list(D.string()).optional()})});var Xpr,DLi=h(()=>{"use strict";je();hf();Gl();F2e();TWe();CDt();Ypr();Xpr=D.objectWithoutOptionalProperties({id:vY,name:Io,urls:D.record(NP,fye),audiences:D.list(D.string()).optional(),defaultUrls:D.record(NP,D.string()).optional(),urlTemplates:D.record(NP,D.string()).optional(),urlVariables:D.record(NP,D.list(OWe)).optional()}).extend(Xi)});var Zpr,RLi=h(()=>{"use strict";je();PLi();DLi();Zpr=D.objectWithoutOptionalProperties({baseUrls:D.list(Jpr),environments:D.list(Xpr)})});var $pr,kLi=h(()=>{"use strict";je();hf();Gl();TWe();CDt();Ypr();$pr=D.objectWithoutOptionalProperties({id:vY,name:Io,url:fye,audiences:D.list(D.string()).optional(),defaultUrl:D.string().optional(),urlTemplate:D.string().optional(),urlVariables:D.list(OWe).optional()}).extend(Xi)});var efr,FLi=h(()=>{"use strict";je();kLi();efr=D.objectWithoutOptionalProperties({environments:D.list($pr)})});var tfr,NLi=h(()=>{"use strict";Jr();je();RLi();FLi();tfr=D.union("type",{singleBaseUrl:efr,multipleBaseUrls:Zpr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return o0.singleBaseUrl(e);case"multipleBaseUrls":return o0.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var rfr,jLi=h(()=>{"use strict";je();TWe();NLi();rfr=D.objectWithoutOptionalProperties({defaultEnvironment:vY.optional(),environments:tfr})});var QLi=h(()=>{"use strict";F2e();PLi();TWe();NLi();jLi();CDt();DLi();RLi();Ypr();kLi();FLi()});var zLi={};X(zLi,{EnvironmentBaseUrlId:()=>NP,EnvironmentBaseUrlWithId:()=>Jpr,EnvironmentId:()=>vY,EnvironmentUrl:()=>fye,Environments:()=>tfr,EnvironmentsConfig:()=>rfr,MultipleBaseUrlsEnvironment:()=>Xpr,MultipleBaseUrlsEnvironments:()=>Zpr,ServerVariable:()=>OWe,SingleBaseUrlEnvironment:()=>$pr,SingleBaseUrlEnvironments:()=>efr});var MFa=h(()=>{"use strict";QLi()});var dye,wDt=h(()=>{"use strict";je();bDt();D2e();hf();dye=D.objectWithoutOptionalProperties({errorId:cye,fernFilepath:TU,name:Io})});var jS,aue=h(()=>{"use strict";je();Wo();a7();yd();AY();B2e();jS=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),env:D.string().optional(),clientDefault:SU.optional(),defaultValue:D.unknown().optional(),v2Examples:NS.optional()}).extend(Fx)});var nfr,MLi=h(()=>{"use strict";je();Wo();hf();Gl();yWe();nfr=D.objectWithoutOptionalProperties({name:Io.optional(),shape:D.lazyObject(()=>_c)}).extend(bY).extend(Xi)});var ifr,LLi=h(()=>{"use strict";je();Wo();yd();Gl();AY();aue();wDt();MLi();ifr=D.objectWithoutOptionalProperties({name:dye,displayName:D.string().optional(),discriminantValue:fs,type:D.lazy(()=>Ps).optional(),statusCode:D.number(),isWildcardStatusCode:D.boolean().optional(),examples:D.list(nfr),v2Examples:NS.optional(),headers:D.list(jS).optional()}).extend(Xi)});var LFa,UFa=h(()=>{"use strict";Jr();je();yd();LFa=D.union("type",{property:D.object({value:fs}),statusCode:D.object({})}).transform({transform:e=>{switch(e.type){case"property":return eye.property(e.value);case"statusCode":return eye.statusCode();default:return e}},untransform:({_visit:e,...t})=>t})});var ULi=h(()=>{"use strict";wDt();LLi();UFa();MLi()});var VLi={};X(VLi,{DeclaredErrorName:()=>dye,ErrorDeclaration:()=>ifr,ErrorDeclarationDiscriminantValue:()=>LFa,ExampleError:()=>nfr});var VFa=h(()=>{"use strict";ULi()});var ofr,_Li=h(()=>{"use strict";je();ofr=D.objectWithoutOptionalProperties({username:D.string(),password:D.string()})});var sfr,GLi=h(()=>{"use strict";je();sfr=D.objectWithoutOptionalProperties({token:D.string()})});var afr,qLi=h(()=>{"use strict";je();afr=D.objectWithoutOptionalProperties({value:D.unknown()})});var cfr,WLi=h(()=>{"use strict";je();F2e();CDt();cfr=D.record(NP,fye)});var ufr,HLi=h(()=>{"use strict";je();ufr=D.objectWithoutOptionalProperties({clientId:D.string(),clientSecret:D.string()})});var BWe,lfr=h(()=>{"use strict";Jr();je();_Li();GLi();qLi();HLi();BWe=D.union("type",{basic:ofr,bearer:sfr,header:afr,oauth:ufr}).transform({transform:e=>{switch(e.type){case"basic":return EU.basic(e);case"bearer":return EU.bearer(e);case"header":return EU.header(e);case"oauth":return EU.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t})});var pfr,KLi=h(()=>{"use strict";je();pfr=D.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var ffr,JLi=h(()=>{"use strict";je();KLi();ffr=D.objectWithoutOptionalProperties({method:pfr,path:D.string()})});var PWe,dfr=h(()=>{"use strict";je();TWe();WLi();PWe=D.undiscriminatedUnion([vY,cfr])});var mfr,YLi=h(()=>{"use strict";je();Gl();mfr=D.objectWithoutOptionalProperties({name:D.string().optional(),language:D.string(),code:D.string()}).extend(Xi)});var xY,hfr=h(()=>{"use strict";je();xY=D.record(D.string(),D.unknown())});var gfr,XLi=h(()=>{"use strict";je();Gl();lfr();JLi();dfr();hfr();gfr=D.objectWithoutOptionalProperties({endpoint:ffr,baseUrl:D.property("baseURL",D.string().optional()),environment:PWe.optional(),auth:BWe.optional(),pathParameters:xY.optional(),queryParameters:xY.optional(),headers:xY.optional(),requestBody:D.unknown().optional()}).extend(Xi)});var Afr,ZLi=h(()=>{"use strict";Jr();je();Afr=D.union("type",{error:D.object({value:D.unknown()}),json:D.object({value:D.unknown()}),stream:D.object({value:D.list(D.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return Rx.error(e.value);case"json":return Rx.json(e.value);case"stream":return Rx.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var yfr,$Li=h(()=>{"use strict";je();Gl();ZLi();yfr=D.objectWithoutOptionalProperties({statusCode:D.number().optional(),body:Afr.optional()}).extend(Xi)});var SDt,e3i=h(()=>{"use strict";je();YLi();XLi();$Li();SDt=D.objectWithoutOptionalProperties({displayName:D.string().optional(),contentType:D.string().optional(),request:gfr.optional(),response:yfr.optional(),codeSamples:D.list(mfr).optional()})});var bfr,t3i=h(()=>{"use strict";je();e3i();bfr=D.objectWithoutOptionalProperties({userSpecifiedExamples:D.record(D.string(),SDt),autogeneratedExamples:D.record(D.string(),SDt)})});var TDt,r3i=h(()=>{"use strict";je();TDt=D.objectWithoutOptionalProperties({name:D.string().optional(),payload:D.unknown()})});var Efr,n3i=h(()=>{"use strict";je();r3i();Efr=D.objectWithoutOptionalProperties({userSpecifiedExamples:D.record(D.string(),TDt),autogeneratedExamples:D.record(D.string(),TDt)})});var Ifr,i3i=h(()=>{"use strict";je();Ifr=D.objectWithoutOptionalProperties({path:D.string()})});var vfr,o3i=h(()=>{"use strict";je();vfr=D.objectWithoutOptionalProperties({type:D.string(),body:D.unknown()})});var ODt,s3i=h(()=>{"use strict";je();lfr();dfr();hfr();i3i();o3i();ODt=D.objectWithoutOptionalProperties({channel:Ifr,baseUrl:D.property("baseURL",D.string().optional()),environment:PWe.optional(),auth:BWe.optional(),pathParameters:xY.optional(),queryParameters:xY.optional(),headers:xY.optional(),messages:D.list(vfr).optional()})});var xfr,a3i=h(()=>{"use strict";je();s3i();xfr=D.objectWithoutOptionalProperties({autogeneratedExamples:D.record(D.string(),ODt),userSpecifiedExamples:D.record(D.string(),ODt)})});var ey,yj=h(()=>{"use strict";je();AY();ey=D.objectWithoutOptionalProperties({v2Examples:NS.optional()})});var c3i=h(()=>{"use strict";_Li();GLi();qLi();WLi();HLi();lfr();JLi();KLi();dfr();YLi();e3i();t3i();XLi();$Li();ZLi();CMi();AY();hfr();r3i();n3i();i3i();o3i();s3i();a3i();yj()});var u3i={};X(u3i,{BasicAuthValues:()=>ofr,BearerAuthValues:()=>sfr,HeaderAuthValues:()=>afr,MultipleEnvironmentUrlValues:()=>cfr,OAuthValues:()=>ufr,V2AuthValues:()=>BWe,V2EndpointLocation:()=>ffr,V2EndpointLocationHttpMethod:()=>pfr,V2EnvironmentValues:()=>PWe,V2HttpEndpointCodeSample:()=>mfr,V2HttpEndpointExample:()=>SDt,V2HttpEndpointExamples:()=>bfr,V2HttpEndpointRequest:()=>gfr,V2HttpEndpointResponse:()=>yfr,V2HttpEndpointResponseBody:()=>Afr,V2SchemaExample:()=>hDt,V2SchemaExamples:()=>NS,V2ValueExamples:()=>xY,V2WebSocketEndpointLocation:()=>Ifr,V2WebSocketMessageExample:()=>vfr,V2WebSocketSessionExample:()=>ODt,V2WebSocketSessionExamples:()=>xfr,V2WebhookExample:()=>TDt,V2WebhookExamples:()=>Efr,WithV2Examples:()=>ey});var _Fa=h(()=>{"use strict";c3i()});var Cfr,l3i=h(()=>{"use strict";je();Cfr=D.enum_(["MIT","Apache-2.0"])});var wfr,p3i=h(()=>{"use strict";je();l3i();wfr=D.objectWithoutOptionalProperties({id:Cfr})});var dE,CY=h(()=>{"use strict";je();dE=D.string()});var Sfr,f3i=h(()=>{"use strict";je();CY();Sfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),tokenEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var DWe,Tfr=h(()=>{"use strict";je();DWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),token:D.string(),packageName:D.string()})});var Ofr,d3i=h(()=>{"use strict";je();Ofr=D.objectWithoutOptionalProperties({filename:D.string()})});var Bfr,m3i=h(()=>{"use strict";je();Bfr=D.objectWithoutOptionalProperties({coordinatorUrl:D.string(),coordinatorUrlV2:D.string(),id:D.string()})});var Pfr,h3i=h(()=>{"use strict";Jr();je();m3i();Pfr=D.union(D.discriminant("type","_type"),{local:D.object({}),remote:Bfr}).transform({transform:e=>{switch(e.type){case"local":return tc.GeneratorEnvironment.local();case"remote":return tc.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t})});var RWe,Dfr=h(()=>{"use strict";je();RWe=D.objectWithoutOptionalProperties({keyId:D.string(),password:D.string(),secretKey:D.string()})});var kWe,Rfr=h(()=>{"use strict";je();Dfr();kWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),username:D.string(),password:D.string(),coordinate:D.string(),signature:RWe.optional()})});var FWe,kfr=h(()=>{"use strict";je();FWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),token:D.string(),packageName:D.string()})});var NWe,Ffr=h(()=>{"use strict";je();NWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),apiKey:D.string(),packageName:D.string()})});var Nfr,g3i=h(()=>{"use strict";je();Nfr=D.objectWithoutOptionalProperties({apiKey:D.string(),workspaceId:D.string()})});var jfr,A3i=h(()=>{"use strict";je();jfr=D.objectWithoutOptionalProperties({name:D.string(),email:D.string()})});var Qfr,y3i=h(()=>{"use strict";je();A3i();Qfr=D.objectWithoutOptionalProperties({description:D.string().optional(),authors:D.list(jfr).optional()})});var jWe,zfr=h(()=>{"use strict";je();y3i();jWe=D.objectWithoutOptionalProperties({keywords:D.list(D.string()).optional(),documentationLink:D.string().optional(),homepageLink:D.string().optional()}).extend(Qfr)});var QWe,Mfr=h(()=>{"use strict";je();zfr();QWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),username:D.string(),password:D.string(),packageName:D.string(),pypiMetadata:jWe.optional()})});var zWe,Lfr=h(()=>{"use strict";je();zWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),apiKey:D.string(),packageName:D.string()})});var Ufr,b3i=h(()=>{"use strict";Jr();je();Tfr();Rfr();kfr();Ffr();g3i();Mfr();Lfr();Ufr=D.union("type",{maven:kWe,npm:FWe,pypi:QWe,postman:Nfr,rubygems:zWe,nuget:NWe,crates:DWe}).transform({transform:e=>{switch(e.type){case"maven":return tc.GeneratorPublishTarget.maven(e);case"npm":return tc.GeneratorPublishTarget.npm(e);case"pypi":return tc.GeneratorPublishTarget.pypi(e);case"postman":return tc.GeneratorPublishTarget.postman(e);case"rubygems":return tc.GeneratorPublishTarget.rubygems(e);case"nuget":return tc.GeneratorPublishTarget.nuget(e);case"crates":return tc.GeneratorPublishTarget.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Vfr,E3i=h(()=>{"use strict";je();Dfr();Vfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),username:D.string(),password:D.string(),group:D.string(),signature:RWe.optional()})});var _fr,I3i=h(()=>{"use strict";je();_fr=D.objectWithoutOptionalProperties({registryUrl:D.string(),token:D.string(),scope:D.string()})});var Gfr,v3i=h(()=>{"use strict";je();E3i();I3i();Gfr=D.objectWithoutOptionalProperties({maven:Vfr,npm:_fr})});var qfr,x3i=h(()=>{"use strict";je();Tfr();Rfr();kfr();Ffr();Mfr();Lfr();qfr=D.objectWithoutOptionalProperties({maven:kWe,npm:FWe,pypi:QWe,rubygems:zWe,nuget:NWe,crates:DWe})});var MWe,Wfr=h(()=>{"use strict";je();b3i();v3i();x3i();MWe=D.objectWithoutOptionalProperties({registries:Gfr,registriesV2:qfr,publishTarget:Ufr.optional(),version:D.string()})});var Hfr,C3i=h(()=>{"use strict";je();CY();Hfr=D.objectWithoutOptionalProperties({keyIdEnvironmentVariable:dE,passwordEnvironmentVariable:dE,secretKeyEnvironmentVariable:dE})});var Kfr,w3i=h(()=>{"use strict";je();CY();C3i();Kfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),coordinate:D.string(),usernameEnvironmentVariable:dE,passwordEnvironmentVariable:dE,signature:Hfr.optional(),shouldGeneratePublishWorkflow:D.boolean().optional()})});var Jfr,S3i=h(()=>{"use strict";je();CY();Jfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),tokenEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var Yfr,T3i=h(()=>{"use strict";je();CY();Yfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),apiKeyEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var Xfr,O3i=h(()=>{"use strict";je();CY();Xfr=D.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:dE,workspaceIdEnvironmentVariable:dE})});var Zfr,B3i=h(()=>{"use strict";je();CY();zfr();Zfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),usernameEnvironmentVariable:dE,passwordEnvironmentVariable:dE,pypiMetadata:jWe.optional(),shouldGeneratePublishWorkflow:D.boolean().optional()})});var $fr,P3i=h(()=>{"use strict";je();CY();$fr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),apiKeyEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var edr,D3i=h(()=>{"use strict";Jr();je();f3i();w3i();S3i();T3i();O3i();B3i();P3i();edr=D.union("type",{npm:Jfr,maven:Kfr,postman:Xfr,pypi:Zfr,rubygems:$fr,nuget:Yfr,crates:Sfr}).transform({transform:e=>{switch(e.type){case"npm":return tc.GithubPublishInfo.npm(e);case"maven":return tc.GithubPublishInfo.maven(e);case"postman":return tc.GithubPublishInfo.postman(e);case"pypi":return tc.GithubPublishInfo.pypi(e);case"rubygems":return tc.GithubPublishInfo.rubygems(e);case"nuget":return tc.GithubPublishInfo.nuget(e);case"crates":return tc.GithubPublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tdr,R3i=h(()=>{"use strict";je();D3i();tdr=D.objectWithoutOptionalProperties({version:D.string(),repoUrl:D.string(),installationToken:D.string().optional(),branch:D.string().optional(),publishInfo:edr.optional()})});var rdr,k3i=h(()=>{"use strict";Jr();je();Wfr();R3i();rdr=D.union("type",{publish:MWe,downloadFiles:D.object({}),github:tdr}).transform({transform:e=>{switch(e.type){case"publish":return tc.OutputMode.publish(e);case"downloadFiles":return tc.OutputMode.downloadFiles();case"github":return tc.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t})});var ndr,F3i=h(()=>{"use strict";je();ndr=D.objectWithoutOptionalProperties({packageDescription:D.property("package_description",D.string().optional()),publisherEmail:D.property("publisher_email",D.string().optional()),referenceUrl:D.property("reference_url",D.string().optional()),publisherName:D.property("publisher_name",D.string().optional())})});var idr,N3i=h(()=>{"use strict";je();k3i();F3i();idr=D.objectWithoutOptionalProperties({path:D.string(),snippetFilepath:D.string().optional(),snippetTemplateFilepath:D.string().optional(),publishingMetadata:ndr.optional(),mode:rdr})});var odr,j3i=h(()=>{"use strict";Jr();je();p3i();d3i();odr=D.union("type",{basic:wfr,custom:Ofr}).transform({transform:e=>{switch(e.type){case"basic":return tc.LicenseConfig.basic(e);case"custom":return tc.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t})});var GFa,qFa=h(()=>{"use strict";je();h3i();N3i();Wfr();j3i();GFa=D.objectWithoutOptionalProperties({dryRun:D.boolean(),irFilepath:D.string(),originalReadmeFilepath:D.string().optional(),license:odr.optional(),output:idr,publish:MWe.optional(),workspaceName:D.string(),organization:D.string(),customConfig:D.unknown(),environment:Pfr,whitelabel:D.boolean(),writeUnitTests:D.boolean(),generatePaginatedClients:D.boolean().optional(),generateOauthClients:D.boolean()})});var Q3i=h(()=>{"use strict";p3i();f3i();Tfr();d3i();CY();qFa();h3i();N3i();Wfr();b3i();v3i();x3i();R3i();D3i();j3i();l3i();Dfr();C3i();w3i();E3i();Rfr();S3i();I3i();kfr();T3i();Ffr();y3i();A3i();k3i();g3i();O3i();F3i();B3i();zfr();Mfr();m3i();P3i();Lfr()});var z3i={};X(z3i,{BasicLicense:()=>wfr,CratesGithubPublishInfo:()=>Sfr,CratesRegistryConfig:()=>DWe,CustomLicense:()=>Ofr,EnvironmentVariable:()=>dE,GeneratorConfig:()=>GFa,GeneratorEnvironment:()=>Pfr,GeneratorOutputConfig:()=>idr,GeneratorPublishConfig:()=>MWe,GeneratorPublishTarget:()=>Ufr,GeneratorRegistriesConfig:()=>Gfr,GeneratorRegistriesConfigV2:()=>qfr,GithubOutputMode:()=>tdr,GithubPublishInfo:()=>edr,LicenseConfig:()=>odr,LicenseId:()=>Cfr,MavenCentralSignature:()=>RWe,MavenCentralSignatureGithubInfo:()=>Hfr,MavenGithubPublishInfo:()=>Kfr,MavenRegistryConfig:()=>Vfr,MavenRegistryConfigV2:()=>kWe,NpmGithubPublishInfo:()=>Jfr,NpmRegistryConfig:()=>_fr,NpmRegistryConfigV2:()=>FWe,NugetGithubPublishInfo:()=>Yfr,NugetRegistryConfig:()=>NWe,OutputMetadata:()=>Qfr,OutputMetadataAuthor:()=>jfr,OutputMode:()=>rdr,PostmanConfig:()=>Nfr,PostmanGithubPublishInfo:()=>Xfr,PublishingMetadata:()=>ndr,PypiGithubPublishInfo:()=>Zfr,PypiMetadata:()=>jWe,PypiRegistryConfig:()=>QWe,RemoteGeneratorEnvironment:()=>Bfr,RubyGemsGithubPublishInfo:()=>$fr,RubyGemsRegistryConfig:()=>zWe});var WFa=h(()=>{"use strict";Q3i()});var HFa=h(()=>{"use strict";WFa();Q3i()});var M3i={};X(M3i,{BasicLicense:()=>wfr,CratesGithubPublishInfo:()=>Sfr,CratesRegistryConfig:()=>DWe,CustomLicense:()=>Ofr,EnvironmentVariable:()=>dE,GeneratorConfig:()=>GFa,GeneratorEnvironment:()=>Pfr,GeneratorOutputConfig:()=>idr,GeneratorPublishConfig:()=>MWe,GeneratorPublishTarget:()=>Ufr,GeneratorRegistriesConfig:()=>Gfr,GeneratorRegistriesConfigV2:()=>qfr,GithubOutputMode:()=>tdr,GithubPublishInfo:()=>edr,LicenseConfig:()=>odr,LicenseId:()=>Cfr,MavenCentralSignature:()=>RWe,MavenCentralSignatureGithubInfo:()=>Hfr,MavenGithubPublishInfo:()=>Kfr,MavenRegistryConfig:()=>Vfr,MavenRegistryConfigV2:()=>kWe,NpmGithubPublishInfo:()=>Jfr,NpmRegistryConfig:()=>_fr,NpmRegistryConfigV2:()=>FWe,NugetGithubPublishInfo:()=>Yfr,NugetRegistryConfig:()=>NWe,OutputMetadata:()=>Qfr,OutputMetadataAuthor:()=>jfr,OutputMode:()=>rdr,PostmanConfig:()=>Nfr,PostmanGithubPublishInfo:()=>Xfr,PublishingMetadata:()=>ndr,PypiGithubPublishInfo:()=>Zfr,PypiMetadata:()=>jWe,PypiRegistryConfig:()=>QWe,RemoteGeneratorEnvironment:()=>Bfr,RubyGemsGithubPublishInfo:()=>$fr,RubyGemsRegistryConfig:()=>zWe,config:()=>z3i});var KFa=h(()=>{"use strict";HFa()});var L3i=h(()=>{"use strict";vpr();K6i();Epr();J6i()});var U3i={};X(U3i,{GlobalParameter:()=>SWe,GlobalParameterApplyMode:()=>bpr,GlobalParameterId:()=>wWe,GlobalParameterLocation:()=>Ipr});var JFa=h(()=>{"use strict";L3i()});var N2e,sdr=h(()=>{"use strict";je();Wo();yd();N2e=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var mye,adr=h(()=>{"use strict";je();Wo();hf();mye=D.objectWithoutOptionalProperties({name:Io,value:D.lazyObject(()=>_c)})});var cdr,V3i=h(()=>{"use strict";Jr();je();cdr=D.union("type",{single:D.object({}),exploded:D.object({}),commaSeparated:D.object({})}).transform({transform:e=>{switch(e.type){case"single":return lw.single();case"exploded":return lw.exploded();case"commaSeparated":return lw.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t})});var LWe,udr=h(()=>{"use strict";je();Wo();yd();V3i();LWe=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c),shape:cdr.optional()})});var ldr,_3i=h(()=>{"use strict";je();Wo();yd();ldr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var ty,bj=h(()=>{"use strict";je();yDt();D2e();hf();oue();ty=D.objectWithoutOptionalProperties({typeId:PO,fernFilepath:TU,name:Io,displayName:aye.optional()})});var pdr,G3i=h(()=>{"use strict";je();Wo();yd();bj();pdr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c),originalTypeDeclaration:ty.optional()})});var UWe,fdr=h(()=>{"use strict";je();yWe();_3i();G3i();UWe=D.objectWithoutOptionalProperties({properties:D.list(pdr),extraProperties:D.list(ldr).optional()}).extend(bY)});var ddr,q3i=h(()=>{"use strict";Jr();je();Wo();fdr();ddr=D.union("type",{inlinedRequestBody:UWe,reference:D.lazyObject(()=>_c)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return DP.inlinedRequestBody(e);case"reference":return DP.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mdr,W3i=h(()=>{"use strict";je();Wo();wDt();mdr=D.objectWithoutOptionalProperties({error:dye,body:D.lazyObject(()=>_c).optional()})});var hdr,H3i=h(()=>{"use strict";je();Wo();hdr=D.objectWithoutOptionalProperties({event:D.string(),data:D.lazyObject(()=>_c)})});var gdr,K3i=h(()=>{"use strict";Jr();je();Wo();H3i();gdr=D.union("type",{body:D.object({value:D.lazyObject(()=>_c).optional()}),stream:D.object({value:D.list(D.lazyObject(()=>_c))}),sse:D.object({value:D.list(hdr)})}).transform({transform:e=>{switch(e.type){case"body":return CA.body(e.value);case"stream":return CA.stream(e.value);case"sse":return CA.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Adr,J3i=h(()=>{"use strict";Jr();je();W3i();K3i();Adr=D.union("type",{ok:D.object({value:gdr}),error:mdr}).transform({transform:e=>{switch(e.type){case"ok":return Ig.ok(e.value);case"error":return Ig.error(e);default:return e}},untransform:({_visit:e,...t})=>t})});var VWe,ydr=h(()=>{"use strict";je();hf();Gl();sdr();adr();udr();q3i();J3i();VWe=D.objectWithoutOptionalProperties({id:D.string().optional(),name:Io.optional(),url:D.string(),rootPathParameters:D.list(mye),servicePathParameters:D.list(mye),endpointPathParameters:D.list(mye),serviceHeaders:D.list(N2e),endpointHeaders:D.list(N2e),queryParameters:D.list(LWe),request:ddr.optional(),response:Adr}).extend(Xi)});var bdr,Y3i=h(()=>{"use strict";je();ydr();bdr=D.objectWithoutOptionalProperties({example:VWe})});var _We,Edr=h(()=>{"use strict";je();R2e();Gl();yj();_We=D.objectWithoutOptionalProperties({isOptional:D.boolean()}).extend(Xi).extend(ey).extend(OU)});var GWe,Idr=h(()=>{"use strict";je();Gl();yj();GWe=D.objectWithoutOptionalProperties({}).extend(Xi).extend(ey)});var vdr,X3i=h(()=>{"use strict";je();P2e();yY();vdr=D.objectWithoutOptionalProperties({page:kP,next:c0,results:c0})});var xdr,Z3i=h(()=>{"use strict";je();yY();xdr=D.objectWithoutOptionalProperties({results:c0})});var Cdr,$3i=h(()=>{"use strict";je();D2e();Cdr=D.objectWithoutOptionalProperties({fernFilepath:TU})});var wdr,e4i=h(()=>{"use strict";hf();wdr=Io});var Sdr,t4i=h(()=>{"use strict";je();hf();Gl();Sdr=D.objectWithoutOptionalProperties({name:Io.optional(),language:D.string(),code:D.string(),install:D.string().optional()}).extend(Xi)});var hye,BDt=h(()=>{"use strict";je();hye=D.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","php","rust","swift"])});var Tdr,r4i=h(()=>{"use strict";je();hf();Gl();BDt();Tdr=D.objectWithoutOptionalProperties({name:Io.optional(),sdk:hye,code:D.string()}).extend(Xi)});var Odr,n4i=h(()=>{"use strict";Jr();je();t4i();r4i();Odr=D.union("type",{language:Sdr,sdk:Tdr}).transform({transform:e=>{switch(e.type){case"language":return q6.language(e);case"sdk":return q6.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t})});var qWe,Bdr=h(()=>{"use strict";je();Gl();yj();qWe=D.objectWithoutOptionalProperties({}).extend(Xi).extend(ey)});var Pdr,i4i=h(()=>{"use strict";je();yd();Gl();Pdr=D.objectWithoutOptionalProperties({key:fs,isOptional:D.boolean(),contentType:D.string().optional()}).extend(Xi)});var Ddr,o4i=h(()=>{"use strict";je();yd();Gl();Ddr=D.objectWithoutOptionalProperties({key:fs,isOptional:D.boolean(),contentType:D.string().optional()}).extend(Xi)});var Rdr,s4i=h(()=>{"use strict";Jr();je();i4i();o4i();Rdr=D.union("type",{file:Ddr,fileArray:Pdr}).transform({transform:e=>{switch(e.type){case"file":return mj.file(e);case"fileArray":return mj.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kdr,a4i=h(()=>{"use strict";je();kdr=D.enum_(["exploded","json","form"])});var WWe,Fdr=h(()=>{"use strict";je();Wo();yd();IDt();AY();gDt();WWe=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),defaultValue:D.unknown().optional(),v2Examples:NS.optional(),propertyAccess:oye.optional()}).extend(uye)});var Ndr,c4i=h(()=>{"use strict";je();R2e();a4i();Fdr();Ndr=D.objectWithoutOptionalProperties({style:kdr.optional()}).extend(WWe).extend(OU)});var jdr,u4i=h(()=>{"use strict";Jr();je();s4i();c4i();jdr=D.union("type",{file:D.object({value:Rdr}),bodyProperty:Ndr}).transform({transform:e=>{switch(e.type){case"file":return kx.file(e.value);case"bodyProperty":return kx.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var HWe,Qdr=h(()=>{"use strict";je();hf();R2e();Gl();yj();u4i();HWe=D.objectWithoutOptionalProperties({name:Io,properties:D.list(jdr)}).extend(Xi).extend(ey).extend(OU)});var zdr,l4i=h(()=>{"use strict";je();zdr=D.objectWithoutOptionalProperties({namespace:D.string()})});var Mdr,p4i=h(()=>{"use strict";je();l4i();Mdr=D.objectWithoutOptionalProperties({csharp:zdr.optional()})});var KWe,Ldr=h(()=>{"use strict";je();p4i();KWe=D.objectWithoutOptionalProperties({filepath:D.string(),packageName:D.string().optional(),options:Mdr.optional()})});var Udr,f4i=h(()=>{"use strict";je();hf();Ldr();Udr=D.objectWithoutOptionalProperties({file:KWe,name:Io})});var Vdr,d4i=h(()=>{"use strict";je();f4i();Vdr=D.objectWithoutOptionalProperties({service:Udr})});var _dr,m4i=h(()=>{"use strict";je();olr();MMi();_dr=D.record(uWe,D.list(Slr))});var Gdr,h4i=h(()=>{"use strict";je();Gdr=D.enum_(["UNARY","CLIENT_STREAM","SERVER_STREAM","BIDIRECTIONAL_STREAM"])});var qdr,g4i=h(()=>{"use strict";je();h4i();qdr=D.objectWithoutOptionalProperties({methodType:Gdr.optional()})});var Wdr,A4i=h(()=>{"use strict";Jr();je();g4i();Wdr=D.union("type",{proto:qdr,openapi:D.object({}),openrpc:D.object({})}).transform({transform:e=>{switch(e.type){case"proto":return RP.proto(e);case"openapi":return RP.openapi();case"openrpc":return RP.openrpc();default:return e}},untransform:({_visit:e,...t})=>t})});var JWe,Hdr=h(()=>{"use strict";je();JWe=D.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var Kdr,y4i=h(()=>{"use strict";je();Kdr=D.objectWithoutOptionalProperties({pathParameter:D.string(),tail:D.string()})});var BU,YWe=h(()=>{"use strict";je();y4i();BU=D.objectWithoutOptionalProperties({head:D.string(),parts:D.list(Kdr)})});var XWe,Jdr=h(()=>{"use strict";je();Wo();R2e();Gl();yj();XWe=D.objectWithoutOptionalProperties({requestBodyType:D.lazy(()=>Ps)}).extend(Xi).extend(OU).extend(ey)});var Ydr,b4i=h(()=>{"use strict";je();hf();R2e();Gl();yj();bj();iue();Fdr();Ydr=D.objectWithoutOptionalProperties({name:Io,extends:D.list(ty),properties:D.list(WWe),extendedProperties:D.list(BO).optional(),extraProperties:D.property("extra-properties",D.boolean())}).extend(Xi).extend(ey).extend(OU)});var ZWe,Xdr=h(()=>{"use strict";Jr();je();Edr();Qdr();Jdr();b4i();ZWe=D.union("type",{inlinedRequestBody:Ydr,reference:XWe,fileUpload:HWe,bytes:_We}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return Hf.inlinedRequestBody(e);case"reference":return Hf.reference(e);case"fileUpload":return Hf.fileUpload(e);case"bytes":return Hf.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Zdr,E4i=h(()=>{"use strict";je();Wo();Gl();yj();Zdr=D.objectWithoutOptionalProperties({responseBodyType:D.lazy(()=>Ps)}).extend(Xi).extend(ey)});var $dr,I4i=h(()=>{"use strict";je();Wo();Gl();yj();iue();$dr=D.objectWithoutOptionalProperties({responseBodyType:D.lazy(()=>Ps),responseProperty:BO.optional()}).extend(Xi).extend(ey)});var $We,emr=h(()=>{"use strict";Jr();je();E4i();I4i();$We=D.union("type",{response:Zdr,nestedPropertyAsResponse:$dr}).transform({transform:e=>{switch(e.type){case"response":return fE.response(e);case"nestedPropertyAsResponse":return fE.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tmr,v4i=h(()=>{"use strict";je();Wo();Gl();yj();tmr=D.objectWithoutOptionalProperties({payload:D.lazy(()=>Ps),terminator:D.string().optional()}).extend(Xi).extend(ey)});var rmr,x4i=h(()=>{"use strict";je();Wo();Gl();yj();rmr=D.objectWithoutOptionalProperties({payload:D.lazy(()=>Ps),terminator:D.string().optional(),resumable:D.boolean().optional()}).extend(Xi).extend(ey)});var nmr,C4i=h(()=>{"use strict";je();Gl();yj();nmr=D.objectWithoutOptionalProperties({}).extend(Xi).extend(ey)});var eHe,imr=h(()=>{"use strict";Jr();je();v4i();x4i();C4i();eHe=D.union("type",{json:tmr,text:nmr,sse:rmr}).transform({transform:e=>{switch(e.type){case"json":return mI.json(e);case"text":return mI.text(e);case"sse":return mI.sse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tHe,omr=h(()=>{"use strict";je();Gl();yj();tHe=D.objectWithoutOptionalProperties({contentType:D.string().optional()}).extend(Xi).extend(ey)});var smr,w4i=h(()=>{"use strict";Jr();je();Idr();Bdr();emr();omr();smr=D.union("type",{json:D.object({value:$We}),fileDownload:qWe,text:tHe,bytes:GWe}).transform({transform:e=>{switch(e.type){case"json":return CO.json(e.value);case"fileDownload":return CO.fileDownload(e);case"text":return CO.text(e);case"bytes":return CO.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var amr,S4i=h(()=>{"use strict";je();w4i();imr();amr=D.objectWithoutOptionalProperties({nonStreamResponse:smr,streamResponse:eHe})});var cmr,T4i=h(()=>{"use strict";Jr();je();Idr();Bdr();emr();imr();S4i();omr();cmr=D.union("type",{json:D.object({value:$We}),fileDownload:qWe,text:tHe,bytes:GWe,streaming:D.object({value:eHe}),streamParameter:amr}).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 gye,PDt=h(()=>{"use strict";je();Gl();T4i();gye=D.objectWithoutOptionalProperties({statusCode:D.property("status-code",D.number().optional()),isWildcardStatusCode:D.boolean().optional(),body:cmr.optional()}).extend(Xi)});var umr,O4i=h(()=>{"use strict";je();P2e();yY();umr=D.objectWithoutOptionalProperties({page:kP,results:c0,hasNextPage:c0.optional(),step:kP.optional()})});var lmr,B4i=h(()=>{"use strict";je();yY();lmr=D.objectWithoutOptionalProperties({nextPath:c0,results:c0})});var pmr,P4i=h(()=>{"use strict";je();yY();pmr=D.objectWithoutOptionalProperties({nextUri:c0,results:c0})});var fmr,D4i=h(()=>{"use strict";Jr();je();X3i();Z3i();O4i();B4i();P4i();fmr=D.union("type",{cursor:vdr,offset:umr,custom:xdr,uri:pmr,path:lmr}).transform({transform:e=>{switch(e.type){case"cursor":return s0.cursor(e);case"offset":return s0.offset(e);case"custom":return s0.custom(e);case"uri":return s0.uri(e);case"path":return s0.path(e);default:return e}},untransform:({_visit:e,...t})=>t})});var rHe,dmr=h(()=>{"use strict";je();rHe=D.string()});var mmr,R4i=h(()=>{"use strict";je();mmr=D.enum_(["ROOT","SERVICE","ENDPOINT"])});var u7,nHe=h(()=>{"use strict";je();Wo();hf();Gl();AY();B2e();dmr();R4i();u7=D.objectWithoutOptionalProperties({name:Io,valueType:D.lazy(()=>Ps),location:mmr,variable:rHe.optional(),clientDefault:SU.optional(),v2Examples:NS.optional(),explode:D.boolean().optional()}).extend(Xi)});var hmr,k4i=h(()=>{"use strict";je();Gl();wDt();hmr=D.objectWithoutOptionalProperties({error:dye}).extend(Xi)});var gmr,F4i=h(()=>{"use strict";je();k4i();gmr=D.list(hmr)});var Amr,N4i=h(()=>{"use strict";je();Amr=D.objectWithoutOptionalProperties({disabled:D.boolean().optional()})});var ymr,j4i=h(()=>{"use strict";je();N4i();ymr=D.undiscriminatedUnion([Amr])});var bmr,Q4i=h(()=>{"use strict";Jr();je();Edr();Jdr();bmr=D.union("type",{typeReference:XWe,bytes:_We}).transform({transform:e=>{switch(e.type){case"typeReference":return Zq.typeReference(e);case"bytes":return Zq.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Emr,z4i=h(()=>{"use strict";je();hf();Emr=D.objectWithoutOptionalProperties({wrapperName:Io,bodyKey:Io,includePathParameters:D.boolean().optional(),onlyPathParameters:D.boolean().optional()})});var Imr,M4i=h(()=>{"use strict";Jr();je();Q4i();z4i();Imr=D.union("type",{justRequestBody:D.object({value:bmr}),wrapper:Emr}).transform({transform:e=>{switch(e.type){case"justRequestBody":return IU.justRequestBody(e.value);case"wrapper":return IU.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t})});var vmr,L4i=h(()=>{"use strict";je();hf();P2e();M4i();vmr=D.objectWithoutOptionalProperties({streamParameter:kP.optional(),requestParameterName:Io,shape:Imr})});var iHe,xmr=h(()=>{"use strict";Jr();je();d4i();iHe=D.union("type",{http:D.object({}),grpc:Vdr}).transform({transform:e=>{switch(e.type){case"http":return vU.http();case"grpc":return vU.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Cmr,U4i=h(()=>{"use strict";je();n4i();ydr();Cmr=D.objectWithoutOptionalProperties({codeSamples:D.list(Odr).optional(),example:VWe.optional()})});var wmr,V4i=h(()=>{"use strict";je();Xdr();wmr=D.objectWithoutOptionalProperties({requestBodies:D.list(ZWe).optional()})});var Smr,_4i=h(()=>{"use strict";je();PDt();Smr=D.objectWithoutOptionalProperties({responses:D.list(gye).optional()})});var Tmr,G4i=h(()=>{"use strict";je();nlr();a7();dDt();F2e();t3i();Epr();Y3i();e4i();m4i();A4i();aue();Hdr();YWe();Xdr();PDt();D4i();nHe();ADt();F4i();j4i();L4i();xmr();U4i();V4i();_4i();Tmr=D.objectWithoutOptionalProperties({id:nue,name:wdr,displayName:D.string().optional(),subtitle:D.string().optional(),method:JWe,headers:D.list(jS),responseHeaders:D.list(jS).optional(),baseUrl:NP.optional(),v2BaseUrls:D.list(NP).optional(),basePath:BU.optional(),path:BU,fullPath:BU,pathParameters:D.list(u7),allPathParameters:D.list(u7),queryParameters:D.list(sye),requestBody:ZWe.optional(),v2RequestBodies:wmr.optional(),sdkRequest:vmr.optional(),response:gye.optional(),v2Responses:Smr.optional(),errors:gmr,auth:D.boolean(),security:D.list(_dr).optional(),idempotent:D.boolean(),pagination:fmr.optional(),userSpecifiedExamples:D.list(Cmr),autogeneratedExamples:D.list(bdr),v2Examples:bfr.optional(),transport:iHe.optional(),source:Wdr.optional(),audiences:D.list(aWe).optional(),retries:ymr.optional(),globalParameters:D.list(wWe).optional(),apiPlayground:D.boolean().optional()}).extend(Fx)});var Omr,q4i=h(()=>{"use strict";je();Omr=D.objectWithoutOptionalProperties({})});var Bmr,W4i=h(()=>{"use strict";je();Bmr=D.objectWithoutOptionalProperties({})});var oHe,Pmr=h(()=>{"use strict";je();q4i();W4i();oHe=D.objectWithoutOptionalProperties({json:Omr.optional(),proto:Bmr.optional()})});var Dmr,H4i=h(()=>{"use strict";je();nlr();dWe();Pmr();$3i();G4i();aue();YWe();nHe();xmr();Dmr=D.objectWithoutOptionalProperties({availability:gY.optional(),name:Cdr,displayName:D.string().optional(),basePath:BU,endpoints:D.list(Tmr),headers:D.list(jS),pathParameters:D.list(u7),encoding:oHe.optional(),transport:iHe.optional(),audiences:D.list(aWe).optional()})});var K4i=h(()=>{"use strict";Y3i();Edr();Idr();X3i();Z3i();$3i();e4i();n4i();t4i();r4i();ydr();W3i();K3i();sdr();fdr();_3i();G3i();adr();udr();V3i();q3i();J3i();H3i();Bdr();s4i();i4i();o4i();c4i();a4i();Qdr();u4i();d4i();G4i();m4i();A4i();aue();Hdr();YWe();y4i();Xdr();Jdr();PDt();T4i();H4i();b4i();Fdr();emr();E4i();I4i();v4i();w4i();O4i();D4i();B4i();nHe();R4i();llr();g4i();ADt();P2e();OMi();k4i();F4i();yY();j4i();N4i();L4i();Q4i();M4i();z4i();x4i();imr();S4i();BDt();omr();C4i();xmr();P4i();U4i();V4i();_4i()});var J4i={};X(J4i,{AutogeneratedEndpointExample:()=>bdr,BytesRequest:()=>_We,BytesResponse:()=>GWe,CursorPagination:()=>vdr,CustomPagination:()=>xdr,DeclaredServiceName:()=>Cdr,EndpointName:()=>wdr,ExampleCodeSample:()=>Odr,ExampleCodeSampleLanguage:()=>Sdr,ExampleCodeSampleSdk:()=>Tdr,ExampleEndpointCall:()=>VWe,ExampleEndpointErrorResponse:()=>mdr,ExampleEndpointSuccessResponse:()=>gdr,ExampleHeader:()=>N2e,ExampleInlinedRequestBody:()=>UWe,ExampleInlinedRequestBodyExtraProperty:()=>ldr,ExampleInlinedRequestBodyProperty:()=>pdr,ExamplePathParameter:()=>mye,ExampleQueryParameter:()=>LWe,ExampleQueryParameterShape:()=>cdr,ExampleRequestBody:()=>ddr,ExampleResponse:()=>Adr,ExampleServerSideEvent:()=>hdr,FileDownloadResponse:()=>qWe,FileProperty:()=>Rdr,FilePropertyArray:()=>Pdr,FilePropertySingle:()=>Ddr,FileUploadBodyProperty:()=>Ndr,FileUploadBodyPropertyEncoding:()=>kdr,FileUploadRequest:()=>HWe,FileUploadRequestProperty:()=>jdr,GrpcTransport:()=>Vdr,HttpEndpoint:()=>Tmr,HttpEndpointSecurityItem:()=>_dr,HttpEndpointSource:()=>Wdr,HttpHeader:()=>jS,HttpMethod:()=>JWe,HttpPath:()=>BU,HttpPathPart:()=>Kdr,HttpRequestBody:()=>ZWe,HttpRequestBodyReference:()=>XWe,HttpResponse:()=>gye,HttpResponseBody:()=>cmr,HttpService:()=>Dmr,InlinedRequestBody:()=>Ydr,InlinedRequestBodyProperty:()=>WWe,JsonResponse:()=>$We,JsonResponseBody:()=>Zdr,JsonResponseBodyWithProperty:()=>$dr,JsonStreamChunk:()=>tmr,NonStreamHttpResponseBody:()=>smr,OffsetPagination:()=>umr,Pagination:()=>fmr,PathPagination:()=>lmr,PathParameter:()=>u7,PathParameterLocation:()=>mmr,PropertyPathItem:()=>mWe,ProtoSourceInfo:()=>qdr,QueryParameter:()=>sye,RequestProperty:()=>kP,RequestPropertyValue:()=>hlr,ResponseError:()=>hmr,ResponseErrors:()=>gmr,ResponseProperty:()=>c0,RetriesConfiguration:()=>ymr,RetriesDisabledSchema:()=>Amr,SdkRequest:()=>vmr,SdkRequestBodyType:()=>bmr,SdkRequestShape:()=>Imr,SdkRequestWrapper:()=>Emr,SseStreamChunk:()=>rmr,StreamParameterResponse:()=>amr,StreamingResponse:()=>eHe,SupportedSdkLanguage:()=>hye,TextResponse:()=>tHe,TextStreamChunk:()=>nmr,Transport:()=>iHe,UriPagination:()=>pmr,UserSpecifiedEndpointExample:()=>Cmr,V2HttpRequestBodies:()=>wmr,V2HttpResponses:()=>Smr});var YFa=h(()=>{"use strict";K4i()});var Rmr,Y4i=h(()=>{"use strict";je();Rmr=D.string()});var kmr,X4i=h(()=>{"use strict";je();Y4i();kmr=D.objectWithoutOptionalProperties({id:Rmr,protoRootUrl:D.string()})});var Fmr,Z4i=h(()=>{"use strict";Jr();je();X4i();Fmr=D.union("type",{proto:kmr,openapi:D.object({})}).transform({transform:e=>{switch(e.type){case"proto":return hj.proto(e);case"openapi":return hj.openapi();default:return e}},untransform:({_visit:e,...t})=>t})});var cue,DDt=h(()=>{"use strict";je();a7();yd();cue=D.objectWithoutOptionalProperties({name:fs}).extend(Fx)});var sHe,Nmr=h(()=>{"use strict";je();DDt();sHe=D.objectWithoutOptionalProperties({default:cue.optional(),values:D.list(cue),forwardCompatible:D.boolean().optional()})});var jmr,$4i=h(()=>{"use strict";je();aue();Nmr();jmr=D.objectWithoutOptionalProperties({header:jS,value:sHe})});var Qmr,eUi=h(()=>{"use strict";Jr();je();$4i();Qmr=D.union("type",{header:jmr}).transform({transform:e=>e.type==="header"?tye.header(e):e,untransform:({_visit:e,...t})=>t})});var zmr,tUi=h(()=>{"use strict";je();BDt();zmr=D.objectWithoutOptionalProperties({generationLanguage:hye.optional(),keywords:D.list(D.string()).optional(),smartCasing:D.boolean(),smartCasingDigitWordBoundary:D.boolean().optional()})});var Mmr,rUi=h(()=>{"use strict";je();yd();Mmr=D.objectWithoutOptionalProperties({discriminant:fs,contentProperty:fs})});var Lmr,nUi=h(()=>{"use strict";Jr();je();rUi();Lmr=D.union("type",{statusCode:D.object({}),property:Mmr}).transform({transform:e=>{switch(e.type){case"statusCode":return H6.statusCode();case"property":return H6.property(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Umr,iUi=h(()=>{"use strict";je();Umr=D.enum_(["minimal","comprehensive"])});var Vmr,oUi=h(()=>{"use strict";je();Vmr=D.enum_(["autopilot","autorelease","ci","manual"])});var _mr,sUi=h(()=>{"use strict";je();oUi();_mr=D.objectWithoutOptionalProperties({cliVersion:D.string(),generatorName:D.string(),generatorVersion:D.string(),generatorConfig:D.unknown().optional(),originGitCommit:D.string().optional(),originGitCommitIsDirty:D.boolean().optional(),invokedBy:Vmr.optional(),requestedVersion:D.string().optional(),ciProvider:D.string().optional()})});var Gmr,aUi=h(()=>{"use strict";je();Hdr();Gmr=D.objectWithoutOptionalProperties({headerName:D.string(),methods:D.list(JWe)})});var qmr,cUi=h(()=>{"use strict";je();qmr=D.objectWithoutOptionalProperties({version:D.string().optional(),packageName:D.string().optional()})});var Wmr,uUi=h(()=>{"use strict";je();Wmr=D.objectWithoutOptionalProperties({version:D.string().optional(),modulePath:D.string().optional()})});var Hmr,lUi=h(()=>{"use strict";je();Hmr=D.objectWithoutOptionalProperties({coordinate:D.string().optional(),version:D.string().optional(),usernameEnvironmentVariable:D.string(),passwordEnvironmentVariable:D.string(),mavenUrlEnvironmentVariable:D.string()})});var Kmr,pUi=h(()=>{"use strict";je();Kmr=D.objectWithoutOptionalProperties({version:D.string().optional(),packageName:D.string().optional(),tokenEnvironmentVariable:D.string()})});var Jmr,fUi=h(()=>{"use strict";je();Jmr=D.objectWithoutOptionalProperties({apiKey:D.string(),workspaceId:D.string(),collectionId:D.string().optional()})});var Ymr,dUi=h(()=>{"use strict";je();Ymr=D.objectWithoutOptionalProperties({version:D.string().optional(),packageName:D.string().optional()})});var Aye,RDt=h(()=>{"use strict";Jr();je();cUi();uUi();lUi();pUi();fUi();dUi();Aye=D.union("type",{postman:Jmr,npm:Kmr,maven:Hmr,pypi:Ymr,crates:qmr,go:Wmr}).transform({transform:e=>{switch(e.type){case"postman":return yb.postman(e);case"npm":return yb.npm(e);case"maven":return yb.maven(e);case"pypi":return yb.pypi(e);case"crates":return yb.crates(e);case"go":return yb.go(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Xmr,mUi=h(()=>{"use strict";je();RDt();Xmr=D.objectWithoutOptionalProperties({target:Aye})});var Zmr,hUi=h(()=>{"use strict";je();RDt();Zmr=D.objectWithoutOptionalProperties({generateFullProject:D.boolean(),publishTarget:Aye.optional()})});var $mr,gUi=h(()=>{"use strict";je();RDt();$mr=D.objectWithoutOptionalProperties({owner:D.string(),repo:D.string(),uri:D.string().optional(),token:D.string().optional(),mode:D.stringLiteral("pull-request").optional(),branch:D.string().optional(),target:Aye})});var ehr,AUi=h(()=>{"use strict";Jr();je();mUi();hUi();gUi();ehr=D.union("type",{github:$mr,direct:Xmr,filesystem:Zmr}).transform({transform:e=>{switch(e.type){case"github":return lY.github(e);case"direct":return lY.direct(e);case"filesystem":return lY.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kDt,yUi=h(()=>{"use strict";je();Wo();hf();Gl();yWe();kDt=D.objectWithoutOptionalProperties({name:Io.optional(),shape:D.lazy(()=>aHe)}).extend(bY).extend(Xi)});var thr,bUi=h(()=>{"use strict";je();hf();Ldr();thr=D.objectWithoutOptionalProperties({file:KWe,name:Io})});var rhr,EUi=h(()=>{"use strict";Jr();je();rhr=D.union("type",{any:D.object({}),api:D.object({}),boolValue:D.object({}),bytesValue:D.object({}),doubleValue:D.object({}),duration:D.object({}),empty:D.object({}),enum:D.object({}),enumValue:D.object({}),field:D.object({}),fieldCardinality:D.object({}),fieldKind:D.object({}),fieldMask:D.object({}),floatValue:D.object({}),int32Value:D.object({}),int64Value:D.object({}),listValue:D.object({}),method:D.object({}),mixin:D.object({}),nullValue:D.object({}),option:D.object({}),sourceContext:D.object({}),stringValue:D.object({}),struct:D.object({}),syntax:D.object({}),timestamp:D.object({}),type:D.object({}),uint32Value:D.object({}),uint64Value:D.object({}),value:D.object({})}).transform({transform:e=>{switch(e.type){case"any":return fi.any();case"api":return fi.api();case"boolValue":return fi.boolValue();case"bytesValue":return fi.bytesValue();case"doubleValue":return fi.doubleValue();case"duration":return fi.duration();case"empty":return fi.empty();case"enum":return fi.enum();case"enumValue":return fi.enumValue();case"field":return fi.field();case"fieldCardinality":return fi.fieldCardinality();case"fieldKind":return fi.fieldKind();case"fieldMask":return fi.fieldMask();case"floatValue":return fi.floatValue();case"int32Value":return fi.int32Value();case"int64Value":return fi.int64Value();case"listValue":return fi.listValue();case"method":return fi.method();case"mixin":return fi.mixin();case"nullValue":return fi.nullValue();case"option":return fi.option();case"sourceContext":return fi.sourceContext();case"stringValue":return fi.stringValue();case"struct":return fi.struct();case"syntax":return fi.syntax();case"timestamp":return fi.timestamp();case"type":return fi.type();case"uint32Value":return fi.uint32Value();case"uint64Value":return fi.uint64Value();case"value":return fi.value();default:return e}},untransform:({_visit:e,...t})=>t})});var nhr,IUi=h(()=>{"use strict";Jr();je();bUi();EUi();nhr=D.union("type",{wellKnown:D.object({value:rhr}),userDefined:thr}).transform({transform:e=>{switch(e.type){case"wellKnown":return Pp.wellKnown(e.value);case"userDefined":return Pp.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var ihr,vUi=h(()=>{"use strict";Jr();je();IUi();ihr=D.union("type",{proto:D.object({value:nhr})}).transform({transform:e=>e.type==="proto"?Zce.proto(e.value):e,untransform:({_visit:e,...t})=>t})});var ohr,xUi=h(()=>{"use strict";je();ohr=D.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var shr,CUi=h(()=>{"use strict";je();shr=D.objectWithoutOptionalProperties({})});var ahr,wUi=h(()=>{"use strict";je();ahr=D.objectWithoutOptionalProperties({default:D.string().optional()})});var chr,SUi=h(()=>{"use strict";je();chr=D.objectWithoutOptionalProperties({default:D.boolean().optional()})});var uhr,TUi=h(()=>{"use strict";je();uhr=D.objectWithoutOptionalProperties({})});var lhr,OUi=h(()=>{"use strict";je();lhr=D.objectWithoutOptionalProperties({})});var phr,BUi=h(()=>{"use strict";je();phr=D.objectWithoutOptionalProperties({})});var fhr,PUi=h(()=>{"use strict";je();fhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var dhr,DUi=h(()=>{"use strict";je();PUi();dhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:fhr.optional()})});var mhr,RUi=h(()=>{"use strict";je();mhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var hhr,kUi=h(()=>{"use strict";je();RUi();hhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:mhr.optional()})});var ghr,FUi=h(()=>{"use strict";je();ghr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var Ahr,NUi=h(()=>{"use strict";je();FUi();Ahr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:ghr.optional()})});var yhr,jUi=h(()=>{"use strict";je();yhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var bhr,QUi=h(()=>{"use strict";je();jUi();bhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:yhr.optional()})});var Ehr,zUi=h(()=>{"use strict";je();Ehr=D.objectWithoutOptionalProperties({format:D.string().optional(),pattern:D.string().optional(),minLength:D.number().optional(),maxLength:D.number().optional()})});var Ihr,MUi=h(()=>{"use strict";je();zUi();Ihr=D.objectWithoutOptionalProperties({default:D.string().optional(),validation:Ehr.optional()})});var vhr,LUi=h(()=>{"use strict";je();vhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var xhr,UUi=h(()=>{"use strict";je();LUi();xhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:vhr.optional()})});var Chr,VUi=h(()=>{"use strict";je();Chr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var whr,_Ui=h(()=>{"use strict";je();VUi();whr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:Chr.optional()})});var Shr,GUi=h(()=>{"use strict";je();Shr=D.objectWithoutOptionalProperties({})});var Thr,qUi=h(()=>{"use strict";Jr();je();CUi();wUi();SUi();TUi();OUi();BUi();DUi();kUi();NUi();QUi();MUi();UUi();_Ui();GUi();Thr=D.union("type",{integer:Ahr,long:bhr,uint:whr,uint64:xhr,float:hhr,double:dhr,boolean:chr,string:Ihr,date:phr,dateTime:lhr,dateTimeRfc2822:uhr,uuid:Shr,base64:shr,bigInteger:ahr}).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 cHe,Ohr=h(()=>{"use strict";je();xUi();qUi();cHe=D.objectWithoutOptionalProperties({v1:ohr,v2:Thr.optional()})});var Bhr,WUi=h(()=>{"use strict";je();Bhr=D.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"])});var Phr,HUi=h(()=>{"use strict";je();bj();WUi();Phr=D.objectWithoutOptionalProperties({name:ty,shape:Bhr})});var Dhr,KUi=h(()=>{"use strict";Jr();je();Wo();Ohr();HUi();Dhr=D.union(D.discriminant("type","_type"),{container:D.object({container:D.lazy(()=>uHe)}),named:Phr,primitive:D.object({primitive:cHe}),unknown:D.object({})}).transform({transform:e=>{switch(e.type){case"container":return SO.container(e.container);case"named":return SO.named(e);case"primitive":return SO.primitive(e.primitive);case"unknown":return SO.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var Rhr,JUi=h(()=>{"use strict";je();Wo();KUi();Rhr=D.objectWithoutOptionalProperties({aliasOf:D.lazy(()=>Ps),resolvedType:Dhr})});var khr,YUi=h(()=>{"use strict";je();fDt();bj();iue();khr=D.objectWithoutOptionalProperties({extends:D.list(ty),properties:D.list(BO),extendedProperties:D.list(BO).optional(),extraProperties:D.property("extra-properties",D.boolean()),deferredUnionBaseProperties:D.list(nye).optional()})});var Fhr,XUi=h(()=>{"use strict";je();Wo();Gl();Fhr=D.objectWithoutOptionalProperties({type:D.lazy(()=>Ps)}).extend(Xi)});var Nhr,ZUi=h(()=>{"use strict";je();iue();XUi();Nhr=D.objectWithoutOptionalProperties({members:D.list(Fhr),baseProperties:D.list(BO).optional()})});var jhr,$Ui=h(()=>{"use strict";je();Wo();yd();jhr=D.objectWithoutOptionalProperties({name:fs,type:D.lazy(()=>Ps)})});var Qhr,eVi=h(()=>{"use strict";Jr();je();bj();$Ui();Qhr=D.union(D.discriminant("propertiesType","_type"),{samePropertiesAsObject:ty,singleProperty:jhr,noProperties:D.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return RS.samePropertiesAsObject(e);case"singleProperty":return RS.singleProperty(e);case"noProperties":return RS.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var FDt,tVi=h(()=>{"use strict";je();dWe();yd();Gl();eVi();FDt=D.objectWithoutOptionalProperties({discriminantValue:fs,shape:Qhr,displayName:D.string().optional(),availability:gY.optional()}).extend(Xi)});var zhr,rVi=h(()=>{"use strict";je();zhr=D.enum_(["data","protocol"])});var Mhr,nVi=h(()=>{"use strict";je();fDt();yd();bj();iue();tVi();rVi();Mhr=D.objectWithoutOptionalProperties({discriminant:fs,extends:D.list(ty),types:D.list(FDt),baseProperties:D.list(BO),inheritedBaseProperties:D.list(nye).optional(),default:FDt.optional(),discriminatorContext:zhr.optional()})});var Lhr,iVi=h(()=>{"use strict";Jr();je();JUi();Nmr();YUi();ZUi();nVi();Lhr=D.union(D.discriminant("type","_type"),{alias:Rhr,enum:sHe,object:khr,union:Mhr,undiscriminatedUnion:Nhr}).transform({transform:e=>{switch(e.type){case"alias":return mc.alias(e);case"enum":return mc.enum(e);case"object":return mc.object(e);case"union":return mc.union(e);case"undiscriminatedUnion":return mc.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Uhr,oVi=h(()=>{"use strict";je();a7();oue();AY();bj();Pmr();yUi();vUi();iVi();Uhr=D.objectWithoutOptionalProperties({name:ty,shape:Lhr,autogeneratedExamples:D.list(kDt),userProvidedExamples:D.list(kDt),v2Examples:NS.optional(),referencedTypes:D.set(PO),encoding:oHe.optional(),source:ihr.optional(),inline:D.boolean().optional()}).extend(Fx)});var Vhr,sVi=h(()=>{"use strict";je();Wo();hf();Gl();dmr();Vhr=D.objectWithoutOptionalProperties({id:rHe,name:Io,type:D.lazy(()=>Ps)}).extend(Xi)});var _hr,aVi=h(()=>{"use strict";je();Wo();hf();Gl();_hr=D.objectWithoutOptionalProperties({name:Io.optional(),payload:D.lazyObject(()=>_c)}).extend(Xi)});var Ghr,cVi=h(()=>{"use strict";je();Ghr=D.enum_(["GET","POST"])});var qhr,uVi=h(()=>{"use strict";hf();qhr=Io});var Whr,lVi=h(()=>{"use strict";je();Wo();yd();IDt();Whr=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps)}).extend(uye)});var Hhr,pVi=h(()=>{"use strict";je();hf();bj();lVi();Hhr=D.objectWithoutOptionalProperties({name:Io,extends:D.list(ty),properties:D.list(Whr)})});var Khr,fVi=h(()=>{"use strict";je();Wo();Gl();Khr=D.objectWithoutOptionalProperties({payloadType:D.lazy(()=>Ps)}).extend(Xi)});var Jhr,dVi=h(()=>{"use strict";Jr();je();pVi();fVi();Jhr=D.union("type",{inlinedPayload:Hhr,reference:Khr}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return kS.inlinedPayload(e);case"reference":return kS.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Yhr,mVi=h(()=>{"use strict";je();Yhr=D.enum_(["RSA_SHA256","RSA_SHA384","RSA_SHA512","ECDSA_SHA256","ECDSA_SHA384","ECDSA_SHA512","ED25519"])});var Xhr,hVi=h(()=>{"use strict";je();yd();Xhr=D.objectWithoutOptionalProperties({url:D.string(),keyIdHeader:fs.optional()})});var Zhr,gVi=h(()=>{"use strict";je();Zhr=D.objectWithoutOptionalProperties({})});var $hr,AVi=h(()=>{"use strict";Jr();je();hVi();gVi();$hr=D.union("type",{jwks:Xhr,static:Zhr}).transform({transform:e=>{switch(e.type){case"jwks":return t7.jwks(e);case"static":return t7.static(e);default:return e}},untransform:({_visit:e,...t})=>t})});var egr,yVi=h(()=>{"use strict";je();egr=D.enum_(["ALPHABETICAL"])});var tgr,bVi=h(()=>{"use strict";je();tgr=D.enum_(["BODY","TIMESTAMP","NOTIFICATION_URL","MESSAGE_ID"])});var lHe,rgr=h(()=>{"use strict";je();yVi();bVi();lHe=D.objectWithoutOptionalProperties({components:D.list(tgr),delimiter:D.string(),bodySort:egr.optional()})});var yye,NDt=h(()=>{"use strict";je();yye=D.enum_(["BASE64","HEX"])});var ngr,EVi=h(()=>{"use strict";je();ngr=D.enum_(["UNIX_SECONDS","UNIX_MILLIS","ISO8601"])});var pHe,igr=h(()=>{"use strict";je();yd();EVi();pHe=D.objectWithoutOptionalProperties({headerName:fs,format:ngr,tolerance:D.number().optional()})});var ogr,IVi=h(()=>{"use strict";je();yd();mVi();AVi();rgr();NDt();igr();ogr=D.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:Yhr,encoding:yye,signaturePrefix:D.string().optional(),keySource:$hr,payloadFormat:lHe.optional(),timestamp:pHe.optional()})});var sgr,vVi=h(()=>{"use strict";je();sgr=D.enum_(["SHA256","SHA1","SHA384","SHA512"])});var agr,xVi=h(()=>{"use strict";je();agr=D.enum_(["SHA256","SHA1","SHA384","SHA512"])});var cgr,CVi=h(()=>{"use strict";je();cgr=D.objectWithoutOptionalProperties({name:D.string()})});var ugr,wVi=h(()=>{"use strict";Jr();je();CVi();ugr=D.union("type",{queryParameter:cgr}).transform({transform:e=>e.type==="queryParameter"?rye.queryParameter(e):e,untransform:({_visit:e,...t})=>t})});var lgr,SVi=h(()=>{"use strict";je();xVi();wVi();NDt();lgr=D.objectWithoutOptionalProperties({algorithm:agr,encoding:yye,location:ugr})});var pgr,TVi=h(()=>{"use strict";je();yd();vVi();SVi();rgr();NDt();igr();pgr=D.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:sgr,encoding:yye,signaturePrefix:D.string().optional(),payloadFormat:lHe,timestamp:pHe.optional(),bodyHashBinding:lgr.optional()})});var fgr,OVi=h(()=>{"use strict";Jr();je();IVi();TVi();fgr=D.union("type",{hmac:pgr,asymmetric:ogr}).transform({transform:e=>{switch(e.type){case"hmac":return i7.hmac(e);case"asymmetric":return i7.asymmetric(e);default:return e}},untransform:({_visit:e,...t})=>t})});var dgr,BVi=h(()=>{"use strict";je();a7();GMi();n3i();Qdr();aue();PDt();aVi();cVi();uVi();dVi();OVi();dgr=D.objectWithoutOptionalProperties({id:Blr,name:qhr,displayName:D.string().optional(),method:Ghr,headers:D.list(jS),payload:Jhr,signatureVerification:fgr.optional(),fileUploadPayload:HWe.optional(),responses:D.list(gye).optional(),examples:D.list(_hr).optional(),v2Examples:Efr.optional()}).extend(Fx)});var mgr,PVi=h(()=>{"use strict";je();BVi();mgr=D.list(dgr)});var hgr,DVi=h(()=>{"use strict";Jr();je();Wo();fdr();hgr=D.union("type",{inlinedBody:UWe,reference:D.lazyObject(()=>_c)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return K6.inlinedBody(e);case"reference":return K6.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var fHe,ggr=h(()=>{"use strict";je();fHe=D.string()});var Agr,RVi=h(()=>{"use strict";je();DVi();ggr();Agr=D.objectWithoutOptionalProperties({type:fHe,body:hgr})});var ygr,kVi=h(()=>{"use strict";je();hf();Gl();sdr();adr();udr();RVi();ygr=D.objectWithoutOptionalProperties({name:Io.optional(),url:D.string(),pathParameters:D.list(mye),headers:D.list(N2e),queryParameters:D.list(LWe),messages:D.list(Agr)}).extend(Xi)});var bgr,FVi=h(()=>{"use strict";je();Wo();yd();IDt();bgr=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps)}).extend(uye)});var Egr,NVi=h(()=>{"use strict";je();hf();bj();FVi();Egr=D.objectWithoutOptionalProperties({name:Io,extends:D.list(ty),properties:D.list(bgr)})});var Igr,jVi=h(()=>{"use strict";je();Wo();Gl();Igr=D.objectWithoutOptionalProperties({bodyType:D.lazy(()=>Ps)}).extend(Xi)});var vgr,QVi=h(()=>{"use strict";Jr();je();NVi();jVi();vgr=D.union("type",{inlinedBody:Egr,reference:Igr}).transform({transform:e=>{switch(e.type){case"inlinedBody":return OO.inlinedBody(e);case"reference":return OO.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var xgr,zVi=h(()=>{"use strict";je();xgr=D.enum_(["client","server"])});var Cgr,MVi=h(()=>{"use strict";je();a7();QVi();ggr();zVi();Cgr=D.objectWithoutOptionalProperties({type:fHe,displayName:D.string().optional(),methodName:D.string().optional(),origin:xgr,body:vgr}).extend(Fx)});var wgr,LVi=h(()=>{"use strict";hf();wgr=Io});var Sgr,UVi=h(()=>{"use strict";je();a7();F2e();a3i();aue();YWe();nHe();ADt();kVi();MVi();LVi();Sgr=D.objectWithoutOptionalProperties({name:wgr,displayName:D.string().optional(),connectMethodName:D.string().optional(),baseUrl:NP.optional(),path:BU,auth:D.boolean(),headers:D.list(jS),queryParameters:D.list(sye),pathParameters:D.list(u7),messages:D.list(Cgr),examples:D.list(ygr),v2Examples:xfr.optional()}).extend(Fx)});var Tgr,VVi=h(()=>{"use strict";je();fWe();Tgr=D.objectWithoutOptionalProperties({pointsTo:hY})});var dHe,Ogr=h(()=>{"use strict";je();bDt();D2e();pWe();fWe();oue();Olr();Plr();Gl();VVi();dHe=D.objectWithoutOptionalProperties({fernFilepath:TU,service:mY.optional(),types:D.list(PO),errors:D.list(cye),webhooks:gWe.optional(),websocket:AWe.optional(),subpackages:D.list(hY),hasEndpointsInTree:D.boolean(),hasWebSocketInTree:D.boolean().optional(),navigationConfig:Tgr.optional()}).extend(Xi)});var Bgr,_Vi=h(()=>{"use strict";je();BDt();Bgr=D.objectWithoutOptionalProperties({title:D.string(),language:hye,content:D.string()})});var Pgr,GVi=h(()=>{"use strict";je();dDt();_Mi();iUi();_Vi();Pgr=D.objectWithoutOptionalProperties({defaultEndpoint:nue.optional(),bannerLink:D.string().optional(),introduction:D.string().optional(),apiReferenceLink:D.string().optional(),apiName:D.string().optional(),disabledFeatures:D.list(EDt).optional(),whiteLabel:D.boolean().optional(),features:D.record(EDt,D.list(nue)).optional(),customSections:D.list(Bgr).optional(),exampleStyle:Umr.optional()})});var Dgr,qVi=h(()=>{"use strict";je();Dgr=D.objectWithoutOptionalProperties({header:D.stringLiteral("User-Agent"),value:D.string()})});var Rgr,WVi=h(()=>{"use strict";je();qVi();Rgr=D.objectWithoutOptionalProperties({language:D.string(),sdkName:D.string(),sdkVersion:D.string(),userAgent:Dgr.optional()})});var kgr,HVi=h(()=>{"use strict";je();aUi();WVi();kgr=D.objectWithoutOptionalProperties({isAuthMandatory:D.boolean(),hasStreamingEndpoints:D.boolean(),hasPaginatedEndpoints:D.boolean(),hasFileDownloadEndpoints:D.boolean(),platformHeaders:Rgr,idempotencyKeyGeneration:Gmr.optional()})});var Fgr,KVi=h(()=>{"use strict";je();pWe();oue();Fgr=D.objectWithoutOptionalProperties({typesReferencedOnlyByService:D.record(mY,D.list(PO)),sharedTypes:D.list(PO)})});var Ngr,JVi=h(()=>{"use strict";je();Z4i();Ngr=D.objectWithoutOptionalProperties({sources:D.list(Fmr)})});var jgr,YVi=h(()=>{"use strict";je();yDt();hf();Ogr();jgr=D.objectWithoutOptionalProperties({name:Io,displayName:aye.optional()}).extend(dHe)});var XFa,ZFa=h(()=>{"use strict";je();gMi();zMi();bDt();hf();pWe();fWe();oue();Olr();Plr();HMi();ALi();jLi();LLi();vpr();aue();YWe();H4i();nHe();AUi();oVi();sVi();PVi();UVi();eUi();tUi();nUi();sUi();Ogr();GVi();HVi();KVi();JVi();YVi();XFa=D.objectWithoutOptionalProperties({fdrApiDefinitionId:D.string().optional(),apiVersion:Qmr.optional(),specVersion:D.string().optional(),apiName:Io,apiDisplayName:D.string().optional(),apiDocs:D.string().optional(),auth:wlr,headers:D.list(jS),idempotencyHeaders:D.list(jS),types:D.record(PO,Uhr),services:D.record(mY,Dmr),webhookGroups:D.record(gWe,mgr),websocketChannels:D.record(AWe,Sgr).optional(),errors:D.record(cye,ifr),subpackages:D.record(hY,jgr),rootPackage:dHe,constants:Dlr,environments:rfr.optional(),basePath:BU.optional(),pathParameters:D.list(u7),errorDiscriminationStrategy:Lmr,sdkConfig:kgr,variables:D.list(Vhr),globalParameters:D.list(SWe).optional(),serviceTypeReferenceInfo:Fgr,readmeConfig:Pgr.optional(),sourceConfig:Ngr.optional(),publishConfig:ehr.optional(),dynamic:Gpr.optional(),selfHosted:D.boolean().optional(),audiences:D.list(rlr).optional(),generationMetadata:_mr.optional(),apiPlayground:D.boolean().optional(),casingsConfig:zmr.optional()})});var XVi=h(()=>{"use strict";Z4i();Y4i();eUi();tUi();rUi();nUi();iUi();sUi();$4i();aUi();ZFa();oUi();Ogr();VVi();WVi();X4i();GVi();_Vi();HVi();KVi();JVi();YVi();qVi()});var ZVi={};X(ZVi,{ApiDefinitionSource:()=>Fmr,ApiDefinitionSourceId:()=>Rmr,ApiVersionScheme:()=>Qmr,CasingsConfig:()=>zmr,ErrorDiscriminationByPropertyStrategy:()=>Mmr,ErrorDiscriminationStrategy:()=>Lmr,ExampleStyle:()=>Umr,GenerationMetadata:()=>_mr,HeaderApiVersionScheme:()=>jmr,IdempotencyKeyGeneration:()=>Gmr,IntermediateRepresentation:()=>XFa,InvocationSource:()=>Vmr,Package:()=>dHe,PackageNavigationConfig:()=>Tgr,PlatformHeaders:()=>Rgr,ProtoSource:()=>kmr,ReadmeConfig:()=>Pgr,ReadmeCustomSection:()=>Bgr,SdkConfig:()=>kgr,ServiceTypeReferenceInfo:()=>Fgr,SourceConfig:()=>Ngr,Subpackage:()=>jgr,UserAgent:()=>Dgr});var $Fa=h(()=>{"use strict";XVi()});var $Vi=h(()=>{"use strict";l4i();Ldr();p4i();h4i();f4i();IUi();bUi();EUi()});var e_i={};X(e_i,{CsharpProtobufFileOptions:()=>zdr,ProtobufFile:()=>KWe,ProtobufFileOptions:()=>Mdr,ProtobufMethodType:()=>Gdr,ProtobufService:()=>Udr,ProtobufType:()=>nhr,UserDefinedProtobufType:()=>thr,WellKnownProtobufType:()=>rhr});var e2a=h(()=>{"use strict";$Vi()});var t_i=h(()=>{"use strict";cUi();mUi();hUi();gUi();uUi();lUi();pUi();fUi();AUi();RDt();dUi()});var r_i={};X(r_i,{CratesPublishTarget:()=>qmr,DirectPublish:()=>Xmr,Filesystem:()=>Zmr,GithubPublish:()=>$mr,GoPublishTarget:()=>Wmr,MavenPublishTarget:()=>Hmr,NpmPublishTarget:()=>Kmr,PostmanPublishTarget:()=>Jmr,PublishTarget:()=>Aye,PublishingConfig:()=>ehr,PypiPublishTarget:()=>Ymr});var t2a=h(()=>{"use strict";t_i()});var uHe,r2a=h(()=>{"use strict";Jr();je();Wo();B2e();uHe=D.union(D.discriminant("type","_type"),{list:D.object({list:D.lazy(()=>Ps)}),map:D.lazyObject(()=>Qgr),nullable:D.object({nullable:D.lazy(()=>Ps)}),optional:D.object({optional:D.lazy(()=>Ps)}),set:D.object({set:D.lazy(()=>Ps)}),literal:D.object({literal:SU})}).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 n2a,i2a=h(()=>{"use strict";je();bj();DDt();n2a=D.objectWithoutOptionalProperties({default:cue.optional(),name:ty})});var zgr,o2a=h(()=>{"use strict";je();Wo();zgr=D.objectWithoutOptionalProperties({value:D.lazyObject(()=>_c)})});var Mgr,n_i=h(()=>{"use strict";je();Mgr=D.objectWithoutOptionalProperties({datetime:D.date(),raw:D.string().optional()})});var Lgr,i_i=h(()=>{"use strict";je();Lgr=D.objectWithoutOptionalProperties({datetime:D.date(),raw:D.string().optional()})});var mHe,Ugr=h(()=>{"use strict";Jr();je();VMi();n_i();i_i();mHe=D.union("type",{integer:D.object({integer:D.number()}),long:D.object({long:D.number()}),uint:D.object({uint:D.number()}),uint64:D.object({uint64:D.number()}),float:D.object({float:D.number()}),double:D.object({double:D.number()}),boolean:D.object({boolean:D.boolean()}),string:D.object({string:Tlr}),date:D.object({date:D.string()}),datetime:Mgr,datetimeRfc2822:Lgr,uuid:D.object({uuid:D.string()}),base64:D.object({base64:D.string()}),bigInteger:D.object({bigInteger:D.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 Vgr,o_i=h(()=>{"use strict";je();Ugr();Vgr=D.objectWithoutOptionalProperties({literal:mHe})});var _gr,s2a=h(()=>{"use strict";Jr();je();Wo();o_i();_gr=D.union("type",{list:D.lazyObject(()=>Ggr),set:D.lazyObject(()=>Kgr),optional:D.lazyObject(()=>Hgr),nullable:D.lazyObject(()=>Wgr),map:D.lazyObject(()=>qgr),literal:Vgr}).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 Jgr,s_i=h(()=>{"use strict";je();yd();Jgr=D.objectWithoutOptionalProperties({value:fs})});var Ygr,a2a=h(()=>{"use strict";je();Wo();yd();Ygr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var Xgr,c2a=h(()=>{"use strict";je();Wo();Xgr=D.objectWithoutOptionalProperties({key:D.lazyObject(()=>_c),value:D.lazyObject(()=>_c)})});var Ggr,u2a=h(()=>{"use strict";je();Wo();Ggr=D.objectWithoutOptionalProperties({list:D.list(D.lazyObject(()=>_c)),itemType:D.lazy(()=>Ps)})});var qgr,l2a=h(()=>{"use strict";je();Wo();qgr=D.objectWithoutOptionalProperties({map:D.list(D.lazyObject(()=>Xgr)),keyType:D.lazy(()=>Ps),valueType:D.lazy(()=>Ps)})});var Zgr,p2a=h(()=>{"use strict";je();Wo();bj();Zgr=D.objectWithoutOptionalProperties({typeName:ty,shape:D.lazy(()=>aHe)})});var Wgr,f2a=h(()=>{"use strict";je();Wo();Wgr=D.objectWithoutOptionalProperties({nullable:D.lazyObject(()=>_c).optional(),valueType:D.lazy(()=>Ps)})});var hHe,d2a=h(()=>{"use strict";je();Wo();yd();bj();gDt();hHe=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c),propertyAccess:oye.optional(),originalTypeDeclaration:ty})});var gHe,m2a=h(()=>{"use strict";je();Wo();gHe=D.objectWithoutOptionalProperties({properties:D.list(D.lazyObject(()=>hHe)),extraProperties:D.list(D.lazyObject(()=>Ygr)).optional()})});var $gr,h2a=h(()=>{"use strict";je();Wo();oue();$gr=D.objectWithoutOptionalProperties({typeId:PO,object:D.lazyObject(()=>gHe)})});var Hgr,g2a=h(()=>{"use strict";je();Wo();Hgr=D.objectWithoutOptionalProperties({optional:D.lazyObject(()=>_c).optional(),valueType:D.lazy(()=>Ps)})});var Kgr,A2a=h(()=>{"use strict";je();Wo();Kgr=D.objectWithoutOptionalProperties({set:D.list(D.lazyObject(()=>_c)),itemType:D.lazy(()=>Ps)})});var eAr,y2a=h(()=>{"use strict";je();Wo();yd();eAr=D.objectWithoutOptionalProperties({wireDiscriminantValue:fs,shape:D.lazy(()=>tAr)})});var tAr,b2a=h(()=>{"use strict";Jr();je();Wo();tAr=D.union("type",{samePropertiesAsObject:D.lazyObject(()=>$gr),singleProperty:D.lazyObject(()=>_c),noProperties:D.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return pY.samePropertiesAsObject(e);case"singleProperty":return pY.singleProperty(e);case"noProperties":return pY.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var _c,E2a=h(()=>{"use strict";je();Wo();yWe();_c=D.objectWithoutOptionalProperties({shape:D.lazy(()=>rAr)}).extend(bY)});var rAr,I2a=h(()=>{"use strict";Jr();je();Wo();Ugr();rAr=D.union("type",{primitive:D.object({primitive:mHe}),container:D.object({container:D.lazy(()=>_gr)}),unknown:D.object({unknown:D.unknown()}),named:D.lazyObject(()=>Zgr)}).transform({transform:e=>{switch(e.type){case"primitive":return Zi.primitive(e.primitive);case"container":return Zi.container(e.container);case"unknown":return Zi.unknown(e.unknown);case"named":return Zi.named(e);default:return e}},untransform:({_visit:e,...t})=>t})});var aHe,v2a=h(()=>{"use strict";Jr();je();Wo();s_i();aHe=D.union("type",{alias:D.lazyObject(()=>zgr),enum:Jgr,object:D.lazyObject(()=>gHe),union:D.lazyObject(()=>iAr),undiscriminatedUnion:D.lazyObject(()=>nAr)}).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 nAr,x2a=h(()=>{"use strict";je();Wo();nAr=D.objectWithoutOptionalProperties({index:D.number(),singleUnionType:D.lazyObject(()=>_c)})});var oAr,C2a=h(()=>{"use strict";je();Wo();yd();oAr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var iAr,w2a=h(()=>{"use strict";je();Wo();yd();iAr=D.objectWithoutOptionalProperties({discriminant:fs,singleUnionType:D.lazyObject(()=>eAr),extendProperties:D.list(D.lazyObject(()=>hHe)).optional(),baseProperties:D.list(D.lazyObject(()=>oAr)).optional()})});var Qgr,S2a=h(()=>{"use strict";je();Wo();Qgr=D.objectWithoutOptionalProperties({keyType:D.lazy(()=>Ps),valueType:D.lazy(()=>Ps)})});var sAr,a_i=h(()=>{"use strict";Jr();je();DDt();sAr=D.union("type",{enum:cue}).transform({transform:e=>e.type==="enum"?nWe.enum(e):e,untransform:({_visit:e,...t})=>t})});var aAr,c_i=h(()=>{"use strict";je();yDt();D2e();hf();oue();a_i();aAr=D.objectWithoutOptionalProperties({typeId:PO,fernFilepath:TU,name:Io,displayName:aye.optional(),default:sAr.optional(),inline:D.boolean().optional()})});var Ps,T2a=h(()=>{"use strict";Jr();je();Wo();c_i();Ohr();Ps=D.union(D.discriminant("type","_type"),{container:D.object({container:D.lazy(()=>uHe)}),named:aAr,primitive:D.object({primitive:cHe}),unknown:D.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 u_i=h(()=>{"use strict";JUi();CUi();wUi();SUi();r2a();TUi();OUi();BUi();bj();DUi();PUi();Pmr();Nmr();i2a();DDt();o2a();s2a();n_i();i_i();s_i();a2a();c2a();u2a();o_i();l2a();p2a();f2a();d2a();m2a();h2a();g2a();Ugr();A2a();y2a();b2a();yUi();E2a();I2a();v2a();x2a();C2a();w2a();kUi();RUi();NUi();FUi();q4i();B2e();QUi();jUi();S2a();c_i();a_i();iue();gDt();YUi();Ohr();xUi();qUi();W4i();HUi();KUi();WUi();tVi();eVi();$Ui();vUi();MUi();zUi();iVi();oVi();T2a();UUi();LUi();_Ui();VUi();XUi();ZUi();rVi();nVi();GUi()});var l_i={};X(l_i,{AliasTypeDeclaration:()=>Rhr,Base64Type:()=>shr,BigIntegerType:()=>ahr,BooleanType:()=>chr,ContainerType:()=>uHe,DateTimeRfc2822Type:()=>uhr,DateTimeType:()=>lhr,DateType:()=>phr,DeclaredTypeName:()=>ty,DoubleType:()=>dhr,DoubleValidationRules:()=>fhr,Encoding:()=>oHe,EnumTypeDeclaration:()=>sHe,EnumTypeReference:()=>n2a,EnumValue:()=>cue,ExampleAliasType:()=>zgr,ExampleContainer:()=>_gr,ExampleDatetime:()=>Mgr,ExampleDatetimeRfc2822:()=>Lgr,ExampleEnumType:()=>Jgr,ExampleExtraObjectProperty:()=>Ygr,ExampleKeyValuePair:()=>Xgr,ExampleListContainer:()=>Ggr,ExampleLiteralContainer:()=>Vgr,ExampleMapContainer:()=>qgr,ExampleNamedType:()=>Zgr,ExampleNullableContainer:()=>Wgr,ExampleObjectProperty:()=>hHe,ExampleObjectType:()=>gHe,ExampleObjectTypeWithTypeId:()=>$gr,ExampleOptionalContainer:()=>Hgr,ExamplePrimitive:()=>mHe,ExampleSetContainer:()=>Kgr,ExampleSingleUnionType:()=>eAr,ExampleSingleUnionTypeProperties:()=>tAr,ExampleType:()=>kDt,ExampleTypeReference:()=>_c,ExampleTypeReferenceShape:()=>rAr,ExampleTypeShape:()=>aHe,ExampleUndiscriminatedUnionType:()=>nAr,ExampleUnionBaseProperty:()=>oAr,ExampleUnionType:()=>iAr,FloatType:()=>hhr,FloatValidationRules:()=>mhr,IntegerType:()=>Ahr,IntegerValidationRules:()=>ghr,JsonEncoding:()=>Omr,Literal:()=>SU,LongType:()=>bhr,LongValidationRules:()=>yhr,MapType:()=>Qgr,NamedType:()=>aAr,NamedTypeDefault:()=>sAr,ObjectProperty:()=>BO,ObjectPropertyAccess:()=>oye,ObjectTypeDeclaration:()=>khr,PrimitiveType:()=>cHe,PrimitiveTypeV1:()=>ohr,PrimitiveTypeV2:()=>Thr,ProtoEncoding:()=>Bmr,ResolvedNamedType:()=>Phr,ResolvedTypeReference:()=>Dhr,ShapeType:()=>Bhr,SingleUnionType:()=>FDt,SingleUnionTypeProperties:()=>Qhr,SingleUnionTypeProperty:()=>jhr,Source:()=>ihr,StringType:()=>Ihr,StringValidationRules:()=>Ehr,Type:()=>Lhr,TypeDeclaration:()=>Uhr,TypeReference:()=>Ps,Uint64Type:()=>xhr,Uint64ValidationRules:()=>vhr,UintType:()=>whr,UintValidationRules:()=>Chr,UndiscriminatedUnionMember:()=>Fhr,UndiscriminatedUnionTypeDeclaration:()=>Nhr,UnionDiscriminatorContext:()=>zhr,UnionTypeDeclaration:()=>Mhr,UuidType:()=>Shr});var O2a=h(()=>{"use strict";u_i()});var p_i=h(()=>{"use strict";sVi();dmr()});var f_i={};X(f_i,{VariableDeclaration:()=>Vhr,VariableId:()=>rHe});var B2a=h(()=>{"use strict";p_i()});var d_i=h(()=>{"use strict";mVi();IVi();AVi();aVi();vVi();TVi();pVi();lVi();hVi();gVi();BVi();xVi();SVi();wVi();CVi();PVi();cVi();uVi();dVi();yVi();bVi();rgr();fVi();NDt();OVi();igr();EVi()});var m_i={};X(m_i,{AsymmetricAlgorithm:()=>Yhr,AsymmetricKeySignatureVerification:()=>ogr,AsymmetricKeySource:()=>$hr,ExampleWebhookCall:()=>_hr,HmacAlgorithm:()=>sgr,HmacSignatureVerification:()=>pgr,InlinedWebhookPayload:()=>Hhr,InlinedWebhookPayloadProperty:()=>Whr,JwksKeySource:()=>Xhr,StaticKeySource:()=>Zhr,Webhook:()=>dgr,WebhookBodyHashAlgorithm:()=>agr,WebhookBodyHashBinding:()=>lgr,WebhookBodyHashLocation:()=>ugr,WebhookBodyHashQueryParameterLocation:()=>cgr,WebhookGroup:()=>mgr,WebhookHttpMethod:()=>Ghr,WebhookName:()=>qhr,WebhookPayload:()=>Jhr,WebhookPayloadBodySort:()=>egr,WebhookPayloadComponent:()=>tgr,WebhookPayloadFormat:()=>lHe,WebhookPayloadReference:()=>Khr,WebhookSignatureEncoding:()=>yye,WebhookSignatureVerification:()=>fgr,WebhookTimestampConfig:()=>pHe,WebhookTimestampFormat:()=>ngr});var P2a=h(()=>{"use strict";d_i()});var h_i=h(()=>{"use strict";RVi();DVi();kVi();NVi();FVi();UVi();MVi();QVi();jVi();ggr();zVi();LVi()});var g_i={};X(g_i,{ExampleWebSocketMessage:()=>Agr,ExampleWebSocketMessageBody:()=>hgr,ExampleWebSocketSession:()=>ygr,InlinedWebSocketMessageBody:()=>Egr,InlinedWebSocketMessageBodyProperty:()=>bgr,WebSocketChannel:()=>Sgr,WebSocketMessage:()=>Cgr,WebSocketMessageBody:()=>vgr,WebSocketMessageBodyReference:()=>Igr,WebSocketMessageId:()=>fHe,WebSocketMessageOrigin:()=>xgr,WebSocketName:()=>wgr});var D2a=h(()=>{"use strict";h_i()});var R2a=h(()=>{"use strict";dFa();AMi();mFa();LMi();hFa();qMi();gFa();KMi();zFa();MFa();QLi();VFa();ULi();_Fa();c3i();KFa();JFa();L3i();YFa();K4i();$Fa();XVi();e2a();$Vi();t2a();t_i();O2a();u_i();B2a();p_i();P2a();d_i();D2a();h_i()});var Ri={};X(Ri,{AliasTypeDeclaration:()=>Rhr,ApiAuth:()=>wlr,ApiDefinitionSource:()=>Fmr,ApiDefinitionSourceId:()=>Rmr,ApiVersionScheme:()=>Qmr,AsymmetricAlgorithm:()=>Yhr,AsymmetricKeySignatureVerification:()=>ogr,AsymmetricKeySource:()=>$hr,AudienceDefinition:()=>rlr,AudienceReference:()=>aWe,AuthScheme:()=>xlr,AuthSchemeKey:()=>uWe,AuthSchemesRequirement:()=>Clr,AuthScope:()=>Slr,AutogeneratedEndpointExample:()=>bdr,Availability:()=>gY,AvailabilityStatus:()=>ulr,Base64Type:()=>shr,BaseAuthScheme:()=>CU,BasicAuthScheme:()=>slr,BasicAuthValues:()=>ofr,BearerAuthScheme:()=>alr,BearerAuthValues:()=>sfr,BigIntegerType:()=>ahr,BooleanType:()=>chr,BytesRequest:()=>_We,BytesResponse:()=>GWe,CasingsConfig:()=>zmr,Constants:()=>Dlr,ContainerType:()=>uHe,CratesPublishTarget:()=>qmr,CsharpProtobufFileOptions:()=>zdr,CursorPagination:()=>vdr,CustomPagination:()=>xdr,DateTimeRfc2822Type:()=>uhr,DateTimeType:()=>lhr,DateType:()=>phr,Declaration:()=>Fx,DeclaredErrorName:()=>dye,DeclaredServiceName:()=>Cdr,DeclaredTypeName:()=>ty,DirectPublish:()=>Xmr,DisplayName:()=>aye,DoubleType:()=>dhr,DoubleValidationRules:()=>fhr,Encoding:()=>oHe,EndpointId:()=>nue,EndpointName:()=>wdr,EndpointReference:()=>iye,EnumTypeDeclaration:()=>sHe,EnumTypeReference:()=>n2a,EnumValue:()=>cue,EnvironmentBaseUrlId:()=>NP,EnvironmentBaseUrlWithId:()=>Jpr,EnvironmentId:()=>vY,EnvironmentUrl:()=>fye,EnvironmentVariable:()=>wU,Environments:()=>tfr,EnvironmentsConfig:()=>rfr,ErrorDeclaration:()=>ifr,ErrorDeclarationDiscriminantValue:()=>LFa,ErrorDiscriminationByPropertyStrategy:()=>Mmr,ErrorDiscriminationStrategy:()=>Lmr,ErrorId:()=>cye,EscapedString:()=>Tlr,ExampleAliasType:()=>zgr,ExampleCodeSample:()=>Odr,ExampleCodeSampleLanguage:()=>Sdr,ExampleCodeSampleSdk:()=>Tdr,ExampleContainer:()=>_gr,ExampleDatetime:()=>Mgr,ExampleDatetimeRfc2822:()=>Lgr,ExampleEndpointCall:()=>VWe,ExampleEndpointErrorResponse:()=>mdr,ExampleEndpointSuccessResponse:()=>gdr,ExampleEnumType:()=>Jgr,ExampleError:()=>nfr,ExampleExtraObjectProperty:()=>Ygr,ExampleHeader:()=>N2e,ExampleInlinedRequestBody:()=>UWe,ExampleInlinedRequestBodyExtraProperty:()=>ldr,ExampleInlinedRequestBodyProperty:()=>pdr,ExampleKeyValuePair:()=>Xgr,ExampleListContainer:()=>Ggr,ExampleLiteralContainer:()=>Vgr,ExampleMapContainer:()=>qgr,ExampleNamedType:()=>Zgr,ExampleNullableContainer:()=>Wgr,ExampleObjectProperty:()=>hHe,ExampleObjectType:()=>gHe,ExampleObjectTypeWithTypeId:()=>$gr,ExampleOptionalContainer:()=>Hgr,ExamplePathParameter:()=>mye,ExamplePrimitive:()=>mHe,ExampleQueryParameter:()=>LWe,ExampleQueryParameterShape:()=>cdr,ExampleRequestBody:()=>ddr,ExampleResponse:()=>Adr,ExampleServerSideEvent:()=>hdr,ExampleSetContainer:()=>Kgr,ExampleSingleUnionType:()=>eAr,ExampleSingleUnionTypeProperties:()=>tAr,ExampleStyle:()=>Umr,ExampleType:()=>kDt,ExampleTypeReference:()=>_c,ExampleTypeReferenceShape:()=>rAr,ExampleTypeShape:()=>aHe,ExampleUndiscriminatedUnionType:()=>nAr,ExampleUnionBaseProperty:()=>oAr,ExampleUnionType:()=>iAr,ExampleWebSocketMessage:()=>Agr,ExampleWebSocketMessageBody:()=>hgr,ExampleWebSocketSession:()=>ygr,ExampleWebhookCall:()=>_hr,FeatureId:()=>EDt,FernFilepath:()=>TU,FileDownloadResponse:()=>qWe,FileProperty:()=>Rdr,FilePropertyArray:()=>Pdr,FilePropertySingle:()=>Ddr,FileUploadBodyProperty:()=>Ndr,FileUploadBodyPropertyEncoding:()=>kdr,FileUploadRequest:()=>HWe,FileUploadRequestProperty:()=>jdr,Filesystem:()=>Zmr,FloatType:()=>hhr,FloatValidationRules:()=>mhr,GenerationMetadata:()=>_mr,GithubPublish:()=>$mr,GlobalParameter:()=>SWe,GlobalParameterApplyMode:()=>bpr,GlobalParameterId:()=>wWe,GlobalParameterLocation:()=>Ipr,GoPublishTarget:()=>Wmr,GrpcTransport:()=>Vdr,HeaderApiVersionScheme:()=>jmr,HeaderAuthScheme:()=>clr,HeaderAuthValues:()=>afr,HmacAlgorithm:()=>sgr,HmacSignatureVerification:()=>pgr,HttpEndpoint:()=>Tmr,HttpEndpointSecurityItem:()=>_dr,HttpEndpointSource:()=>Wdr,HttpHeader:()=>jS,HttpMethod:()=>JWe,HttpPath:()=>BU,HttpPathPart:()=>Kdr,HttpRequestBody:()=>ZWe,HttpRequestBodyReference:()=>XWe,HttpResponse:()=>gye,HttpResponseBody:()=>cmr,HttpService:()=>Dmr,IdempotencyKeyGeneration:()=>Gmr,InferredAuthScheme:()=>dlr,InferredAuthSchemeTokenEndpoint:()=>flr,InferredAuthenticatedRequestHeader:()=>plr,InlinedRequestBody:()=>Ydr,InlinedRequestBodyProperty:()=>WWe,InlinedWebSocketMessageBody:()=>Egr,InlinedWebSocketMessageBodyProperty:()=>bgr,InlinedWebhookPayload:()=>Hhr,InlinedWebhookPayloadProperty:()=>Whr,IntegerType:()=>Ahr,IntegerValidationRules:()=>ghr,IntermediateRepresentation:()=>XFa,InvocationSource:()=>Vmr,JsonEncoding:()=>Omr,JsonResponse:()=>$We,JsonResponseBody:()=>Zdr,JsonResponseBodyWithProperty:()=>$dr,JsonStreamChunk:()=>tmr,JwksKeySource:()=>Xhr,Literal:()=>SU,LongType:()=>bhr,LongValidationRules:()=>yhr,MapType:()=>Qgr,MavenPublishTarget:()=>Hmr,MultipleBaseUrlsEnvironment:()=>Xpr,MultipleBaseUrlsEnvironments:()=>Zpr,MultipleEnvironmentUrlValues:()=>cfr,Name:()=>cWe,NameAndWireValue:()=>nye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Io,NamedType:()=>aAr,NamedTypeDefault:()=>sAr,NonStreamHttpResponseBody:()=>smr,NpmPublishTarget:()=>Kmr,OAuthAccessTokenRequestProperties:()=>ylr,OAuthAccessTokenResponseProperties:()=>hWe,OAuthClientCredentials:()=>Elr,OAuthConfiguration:()=>Ilr,OAuthRefreshEndpoint:()=>Alr,OAuthRefreshTokenRequestProperties:()=>glr,OAuthScheme:()=>vlr,OAuthTokenEndpoint:()=>blr,OAuthValues:()=>ufr,ObjectProperty:()=>BO,ObjectPropertyAccess:()=>oye,ObjectTypeDeclaration:()=>khr,OffsetPagination:()=>umr,Package:()=>dHe,PackageNavigationConfig:()=>Tgr,Pagination:()=>fmr,PathPagination:()=>lmr,PathParameter:()=>u7,PathParameterLocation:()=>mmr,PlatformHeaders:()=>Rgr,PostmanPublishTarget:()=>Jmr,PrimitiveType:()=>cHe,PrimitiveTypeV1:()=>ohr,PrimitiveTypeV2:()=>Thr,PropertyPathItem:()=>mWe,ProtoEncoding:()=>Bmr,ProtoSource:()=>kmr,ProtoSourceInfo:()=>qdr,ProtobufFile:()=>KWe,ProtobufFileOptions:()=>Mdr,ProtobufMethodType:()=>Gdr,ProtobufService:()=>Udr,ProtobufType:()=>nhr,PublishTarget:()=>Aye,PublishingConfig:()=>ehr,PypiPublishTarget:()=>Ymr,QueryParameter:()=>sye,ReadmeConfig:()=>Pgr,ReadmeCustomSection:()=>Bgr,RequestProperty:()=>kP,RequestPropertyValue:()=>hlr,ResolvedNamedType:()=>Phr,ResolvedTypeReference:()=>Dhr,ResponseError:()=>hmr,ResponseErrors:()=>gmr,ResponseProperty:()=>c0,RetriesConfiguration:()=>ymr,RetriesDisabledSchema:()=>Amr,SafeAndUnsafeString:()=>T2e,SdkConfig:()=>kgr,SdkRequest:()=>vmr,SdkRequestBodyType:()=>bmr,SdkRequestShape:()=>Imr,SdkRequestWrapper:()=>Emr,ServerVariable:()=>OWe,ServiceId:()=>mY,ServiceTypeReferenceInfo:()=>Fgr,ShapeType:()=>Bhr,SingleBaseUrlEnvironment:()=>$pr,SingleBaseUrlEnvironments:()=>efr,SingleUnionType:()=>FDt,SingleUnionTypeProperties:()=>Qhr,SingleUnionTypeProperty:()=>jhr,Source:()=>ihr,SourceConfig:()=>Ngr,SseStreamChunk:()=>rmr,StaticKeySource:()=>Zhr,StreamParameterResponse:()=>amr,StreamingResponse:()=>eHe,StringType:()=>Ihr,StringValidationRules:()=>Ehr,Subpackage:()=>jgr,SubpackageId:()=>hY,SupportedSdkLanguage:()=>hye,TextResponse:()=>tHe,TextStreamChunk:()=>nmr,Transport:()=>iHe,Type:()=>Lhr,TypeDeclaration:()=>Uhr,TypeId:()=>PO,TypeReference:()=>Ps,Uint64Type:()=>xhr,Uint64ValidationRules:()=>vhr,UintType:()=>whr,UintValidationRules:()=>Chr,UndiscriminatedUnionMember:()=>Fhr,UndiscriminatedUnionTypeDeclaration:()=>Nhr,UnionDiscriminatorContext:()=>zhr,UnionTypeDeclaration:()=>Mhr,UriPagination:()=>pmr,UserAgent:()=>Dgr,UserDefinedProtobufType:()=>thr,UserSpecifiedEndpointExample:()=>Cmr,UuidType:()=>Shr,V2AuthValues:()=>BWe,V2EndpointLocation:()=>ffr,V2EndpointLocationHttpMethod:()=>pfr,V2EnvironmentValues:()=>PWe,V2HttpEndpointCodeSample:()=>mfr,V2HttpEndpointExample:()=>SDt,V2HttpEndpointExamples:()=>bfr,V2HttpEndpointRequest:()=>gfr,V2HttpEndpointResponse:()=>yfr,V2HttpEndpointResponseBody:()=>Afr,V2HttpRequestBodies:()=>wmr,V2HttpResponses:()=>Smr,V2SchemaExample:()=>hDt,V2SchemaExamples:()=>NS,V2ValueExamples:()=>xY,V2WebSocketEndpointLocation:()=>Ifr,V2WebSocketMessageExample:()=>vfr,V2WebSocketSessionExample:()=>ODt,V2WebSocketSessionExamples:()=>xfr,V2WebhookExample:()=>TDt,V2WebhookExamples:()=>Efr,VariableDeclaration:()=>Vhr,VariableId:()=>rHe,WebSocketChannel:()=>Sgr,WebSocketChannelId:()=>AWe,WebSocketMessage:()=>Cgr,WebSocketMessageBody:()=>vgr,WebSocketMessageBodyReference:()=>Igr,WebSocketMessageId:()=>fHe,WebSocketMessageOrigin:()=>xgr,WebSocketName:()=>wgr,Webhook:()=>dgr,WebhookBodyHashAlgorithm:()=>agr,WebhookBodyHashBinding:()=>lgr,WebhookBodyHashLocation:()=>ugr,WebhookBodyHashQueryParameterLocation:()=>cgr,WebhookGroup:()=>mgr,WebhookGroupId:()=>gWe,WebhookHttpMethod:()=>Ghr,WebhookId:()=>Blr,WebhookName:()=>qhr,WebhookPayload:()=>Jhr,WebhookPayloadBodySort:()=>egr,WebhookPayloadComponent:()=>tgr,WebhookPayloadFormat:()=>lHe,WebhookPayloadReference:()=>Khr,WebhookSignatureEncoding:()=>yye,WebhookSignatureVerification:()=>fgr,WebhookTimestampConfig:()=>pHe,WebhookTimestampFormat:()=>ngr,WellKnownProtobufType:()=>rhr,WithContentType:()=>OU,WithDocs:()=>Xi,WithDocsAndAvailability:()=>uye,WithJsonExample:()=>bY,WithV2Examples:()=>ey,audience:()=>yMi,auth:()=>UMi,commons:()=>WMi,constants:()=>JMi,dynamic:()=>u0,environment:()=>zLi,errors:()=>VLi,examples:()=>u3i,generatorExec:()=>M3i,globalParameters:()=>U3i,http:()=>J4i,ir:()=>ZVi,proto:()=>e_i,publish:()=>r_i,types:()=>l_i,variables:()=>f_i,webhooks:()=>m_i,websocket:()=>g_i});var Wo=h(()=>{"use strict";R2a()});var k2a=h(()=>{"use strict";Jr();eka();Wo()});var Ln=h(()=>{"use strict";k2a();Jr();Wo()});var jP,F2a=h(()=>{"use strict";jP={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 j2e({type:e,_default:t,validation:r,visitor:n}){switch(e){case jP.integer:{let l=r??void 0;return n.primitive({v1:rs.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 jP.double:{let l=r??void 0;return n.primitive({v1:rs.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 jP.string:{let l=r??void 0;return n.primitive({v1:rs.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 jP.float:return n.primitive({v1:rs.Float,v2:void 0});case jP.long:{let l=r??void 0;return n.primitive({v1:rs.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 jP.boolean:return n.primitive({v1:rs.Boolean,v2:ti.boolean({default:t??void 0})});case jP.datetime:return n.primitive({v1:rs.DateTime,v2:void 0});case jP.datetimeRfc2822:return n.primitive({v1:rs.DateTimeRfc2822,v2:ti.dateTimeRfc2822({})});case jP.date:return n.primitive({v1:rs.Date,v2:void 0});case jP.uuid:return n.primitive({v1:rs.Uuid,v2:void 0});case jP.base64:return n.primitive({v1:rs.Base64,v2:void 0});case jP.bigint:return n.primitive({v1:rs.BigInteger,v2:ti.bigInteger({default:t??void 0})});case jP.uint:return n.primitive({v1:rs.Uint,v2:void 0});case jP.uint64:return n.primitive({v1:rs.Uint64,v2:void 0});case jP.unknown:return n.unknown()}let i=e.match(Ej.MAP);if(i?.[1]!=null&&i[2]!=null)return n.map({keyType:i[1],valueType:i[2]});let o=e.match(Ej.LIST);if(o?.[1]!=null)return n.list(o[1]);let s=e.match(Ej.SET);if(s?.[1]!=null)return n.set(s[1]);let a=e.match(Ej.OPTIONAL);if(a?.[1]!=null)return n.optional(a[1]);let c=e.match(Ej.NULLABLE);if(c?.[1]!=null)return n.nullable(c[1]);let u=e.match(Ej.LITERAL);if(u?.[1]!=null)return n.literal(a0.string(u[1]));if(u?.[2]!=null){let l=u[2];switch(l){case"false":return n.literal(a0.boolean(!1));case"true":return n.literal(a0.boolean(!0));default:throw new Error(`Unsupported literal value: ${l}`)}}return n.named(e)}var Ej,AHe=h(()=>{"use strict";Ln();F2a();Ej={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 PU(e){if(e===N2a)return{isOptional:!1};if(e.match(Ej.OPTIONAL)?.[1]===N2a)return{isOptional:!0}}var N2a,y_i=h(()=>{"use strict";AHe();N2a="bytes"});function jDt(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return PU(t)}var j2a=h(()=>{"use strict";y_i()});function b_i({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(b_i({input:r,typeName:t}))return!0;return!1}var Q2a=h(()=>{"use strict"});function z2a(e){return b_i({input:e,typeName:"file"})}var M2a=h(()=>{"use strict";Q2a()});function L2a(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 U2a=h(()=>{"use strict"});function V2a(e){return e.match(Ej.LIST)?.[1]===E_i}function Ij(e){if(e===E_i)return{isOptional:!1,isArray:!1};let t=e.match(Ej.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===E_i)return{isOptional:!0,isArray:!1};if(V2a(t[1]))return{isOptional:!0,isArray:!0}}if(V2a(e))return{isOptional:!1,isArray:!0}}var E_i,I_i=h(()=>{"use strict";AHe();E_i="file"});function Wpf(e){return typeof e=="string"?!1:Df.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(Eg(e.body)&&Object.values(e.body.properties??[]).some(Kpf))}function Q2e(e){if(!(!Wpf(e)||e.body==null)&&e.name!=null&&e.body!=null&&Eg(e.body))return Hpf(e.name,e.body)}function Hpf(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=Ij(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 Kpf(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=L2a(t);return r==null?!1:z2a(r)}var _2a=h(()=>{"use strict";Dt();M2a();U2a();nzi();I_i()});function z2e(e){if(e===G2a)return{isOptional:!1};if(e.match(Ej.OPTIONAL)?.[1]===G2a)return{isOptional:!0}}var G2a,q2a=h(()=>{"use strict";AHe();G2a="text"});function gv({type:e,_default:t,validation:r,visitor:n}){return j2e({type:e,_default:t,validation:r,visitor:{primitive:n.primitive,map:({keyType:i,valueType:o})=>n.map({keyType:gv({type:i,_default:void 0,validation:void 0,visitor:n}),valueType:gv({type:o,_default:void 0,validation:void 0,visitor:n})}),list:i=>n.list(gv({type:i,_default:void 0,validation:void 0,visitor:n})),set:i=>n.set(gv({type:i,_default:void 0,validation:void 0,visitor:n})),optional:i=>n.optional(gv({type:i,_default:t,validation:r,visitor:n})),nullable:i=>n.nullable(gv({type:i,_default:t,validation:r,visitor:n})),literal:n.literal,named:n.named,unknown:n.unknown}})}var W2a=h(()=>{"use strict";AHe()});function v_i(e,t){if(Jpf(e))return t.sdk(e);if(Ypf(e))return t.language(e);Ee(e)}function Jpf(e){return e.sdk!=null}function Ypf(e){return e.language!=null}var H2a=h(()=>{"use strict";Dt()});function K2a(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}var J2a=h(()=>{"use strict"});function Y2a(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}var X2a=h(()=>{"use strict"});function M2e(e,t,r){return Xpf(e,t)?r.stream(t):Zpf(e,t)?r.events(t):r.body(t)}function Xpf(e,t){return t.stream!==void 0&&K2a(e)}function Zpf(e,t){return t.stream!==void 0&&Y2a(e)}var Z2a=h(()=>{"use strict";J2a();X2a()});function L2e(e,t){if($2a(e))return t.single(e);if(eNa(e))return t.any(e);if($pf(e))return t.endpointSecurity(e);Ee(e)}function $2a(e){return typeof e=="string"||e.scheme!=null}function eNa(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function $pf(e){let[t,...r]=Object.keys(e);return t==="endpoint-security"&&r.length===0}var tNa=h(()=>{"use strict";Dt()});function U2e(e,t){if(rNa(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 rNa(e){return e.header!=null}var nNa=h(()=>{"use strict";Dt()});function wY(e,t){if(iNa(e))return t.singleBaseUrl(e);if(QP(e))return t.multipleBaseUrls(e);Ee(e)}function iNa(e){return typeof e=="string"||"url"in e}function QP(e){return typeof e!="string"&&"urls"in e}var oNa=h(()=>{"use strict";Dt()});function uue(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}var sNa=h(()=>{"use strict"});function Av(e,t){if(bye(e))return t.alias(e);if(DU(e))return t.discriminatedUnion(e);if(ef(e))return t.object(e);if(yHe(e))return t.undiscriminatedUnion(e);if(l7(e))return t.enum(e);Ee(e)}function bye(e){return typeof e=="string"||e.type!=null}function ef(e){return e.extends!=null||e.properties!=null}function DU(e){return e.union!=null&&e.discriminated==null}function yHe(e){let t=e;return t.union!=null&&t.discriminated!=null}function l7(e){return e.enum!=null}var aNa=h(()=>{"use strict";Dt()});var No=h(()=>{"use strict";lCa();fCa();gCa();ACa();yCa();nzi();bCa();ECa();j2a();_2a();y_i();I_i();q2a();W2a();H2a();Z2a();tNa();nNa();oNa();sNa();aNa();AHe()});var f7,S_i=h(()=>{"use strict";f7=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 hNa=h(()=>{"use strict"});function bHe(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}}function Eye(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function cff(e){if(!Array.isArray(e))return O_i;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>aff.has(r));return t.length>0?t:O_i}function Iye(e){let t=e.idempotencyKeyGenerationConfig??uff(e);return lff(t)}function uff(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 lff(e){if(e===!0)return{headerName:gNa,methods:O_i};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:gNa,methods:cff(e.methods)}}}function EHe(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))pff.has(r)||(t[r]=n);return t}async function uAr({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??bHe(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await fff({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${T_i(s)}: ${Mn(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${T_i(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:P.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${T_i(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function fff({packageName:e,version:t,language:r}){switch(r){case"typescript":return await dff(e,t);case"python":return await mff(e,t);case"java":return await hff(e,t);case"csharp":return await gff(e,t);case"ruby":return await Aff(e,t);case"go":return await yff(e,t);case"rust":return await bff(e,t);default:return!1}}async function dff(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(V2e)});return o.ok?(await o.json()).version===t:!1}async function mff(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(V2e)})).ok}async function hff(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(V2e)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function gff(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(V2e)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function Aff(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(V2e)})).ok}async function yff(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(V2e)});return i.ok?(await i.json()).Version!=null:!1}async function bff(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(V2e)});return r.ok?(await r.json()).version?.num===t:!1}function T_i(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 gNa,O_i,aff,pff,V2e,ANa=h(()=>{"use strict";Dt();Qt();gNa="Idempotency-Key",O_i=["POST","PUT"],aff=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);pff=new Set(["user-agent","auto-generate-idempotency-key"]);V2e=5e3});var yNa=b(Y6=>{"use strict";var Eff=Y6&&Y6.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y6,"__esModule",{value:!0});var Iff=require("fs"),vff=Eff(EA()),IHe=vff.default("@kwsites/file-exists");function xff(e,t,r){IHe("checking %s",e);try{let n=Iff.statSync(e);return n.isFile()&&t?(IHe("[OK] path represents a file"),!0):n.isDirectory()&&r?(IHe("[OK] path represents a directory"),!0):(IHe("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return IHe("[FAIL] path is not accessible: %o",n),!1;throw IHe("[FATAL] %o",n),n}}function Cff(e,t=Y6.READABLE){return xff(e,(t&Y6.FILE)>0,(t&Y6.FOLDER)>0)}Y6.exists=Cff;Y6.FILE=1;Y6.FOLDER=2;Y6.READABLE=Y6.FILE+Y6.FOLDER});var B_i=b(lAr=>{"use strict";function wff(e){for(var t in e)lAr.hasOwnProperty(t)||(lAr[t]=e[t])}Object.defineProperty(lAr,"__esModule",{value:!0});wff(yNa())});function vHe(...e){let t=new String(e);return P_i.set(t,e),t}function kU(e){return e instanceof String&&P_i.has(e)}function xHe(e){return P_i.get(e)??[]}var P_i,vye=h(()=>{"use strict";P_i=new WeakMap});var zDt=b(_2e=>{"use strict";Object.defineProperty(_2e,"__esModule",{value:!0});_2e.createDeferred=_2e.deferred=void 0;function D_i(){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}}}_2e.deferred=D_i;_2e.createDeferred=D_i;_2e.default=D_i});function*bNa(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function Pff(e,t){for(let{name:n}of bNa(e,"task")){if(Sff.has(n))return CHe(!0,t);if(Tff.has(n))return CHe(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:Off.has(r)?CHe(!0,t.slice(1)):Bff.has(r)?CHe(!1,t.slice(1)):t.length===1?CHe(!1,t):CHe(!0,t)}function CHe(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 Dff(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function Rff(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function kff(e){for(let{name:t}of bNa(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 Fff({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*Nff(e){for(let t of e){let r=Fff(t),n=r&&Rff(t.value);n&&(yield{...n,scope:r})}}function jff(e,t,r){let n={read:[],write:[...Nff(t)]};return e==="config"&&Qff(n,kff(t),Pff(t,r)),n}function Qff(e,t,r){if(r===null)return;let n=Dff(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function Uff(e){let t=Mff[e??""]??Lff;return{short:new Map([...ENa.short.entries(),...t.short.entries()]),long:t.long}}function INa(e,t=zff){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 Vff(e,t.short)}function Vff(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 _ff(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=INa(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 Gff(e,t,r=[]){let n=Uff(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(kU(a)){o.push(...xHe(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let d=e[p];kU(d)?o.push(...xHe(d)):o.push(String(d))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let u=INa(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&&!kU(e[l])&&(d.value=String(e[l]),d.absorbedNext=!0,l++),r.push(d)}s=l}return{flags:r,positionals:i,pathspecs:o}}function*qff({write:e}){for(let t of e)for(let r of Wff){let n=r(t.key);n&&(yield n)}}function NU(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 FU(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return NU(r,t,e)}function*Hff(e,t){for(let r of t)for(let n of Kff){let i=n(e,r.name);i&&(yield i)}}function MDt(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 vNa(e,t,r){return[...Hff(e,t),...qff(r)]}function Jff(...e){let{flags:t,taskIndex:r}=_ff(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=Gff(i,n,t),a=jff(n,t,o);return{task:n,flags:t.map(Xff),paths:s,config:a,vulnerabilities:Yff(vNa(n,t,a))}}function Yff(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function Xff({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*Zff(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*$ff(e){for(let t of Object.keys(e))if(CNa(t)){let r=xNa[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function CNa(e){return Object.hasOwn(xNa,e)}function edf(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(CNa(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function tdf(e){let t=edf(e),r={read:[],write:[...Zff(t)]},n=[...$ff(t),...vNa(null,[],r)];return{config:r,vulnerabilities:n}}function wNa(e,t){return[...Jff(...e).vulnerabilities,...tdf(t).vulnerabilities]}var Sff,Tff,Off,Bff,ENa,zff,Mff,Lff,Wff,Kff,xNa,SNa=h(()=>{"use strict";vye();Sff=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),Tff=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),Off=new Set(["edit","remove-section","rename-section","set","unset"]),Bff=new Set(["get","get-color","get-colorbool","list"]);ENa={short:new Map([["c",!0]])},zff={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...ENa.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},Mff={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"])}},Lff={short:new Map,long:new Set};Wff=[NU("alias","allowUnsafeAlias"),NU("core.askPass","allowUnsafeAskPass"),NU("core.editor","allowUnsafeEditor"),NU("core.fsmonitor","allowUnsafeFsMonitor"),NU("core.gitProxy","allowUnsafeGitProxy"),NU("core.hooksPath","allowUnsafeHooksPath"),NU("core.pager","allowUnsafePager"),NU("core.sshCommand","allowUnsafeSshCommand"),FU("credential.helper","allowUnsafeCredentialHelper"),FU("diff.command","allowUnsafeDiffExternal"),NU("diff.external","allowUnsafeDiffExternal"),FU("diff.textconv","allowUnsafeDiffTextConv"),FU("filter.clean","allowUnsafeFilter"),FU("filter.smudge","allowUnsafeFilter"),FU("gpg.program","allowUnsafeGpgProgram"),NU("init.templateDir","allowUnsafeTemplateDir"),FU("merge.driver","allowUnsafeMergeDriver"),FU("mergetool.path","allowUnsafeMergeDriver"),FU("mergetool.cmd","allowUnsafeMergeDriver"),FU("protocol.allow","allowUnsafeProtocolOverride"),FU("remote.receivepack","allowUnsafePack"),FU("remote.uploadpack","allowUnsafePack"),NU("sequence.editor","allowUnsafeEditor")];Kff=[MDt(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),MDt("clone",/^-\w*u/,"allowUnsafePack"),MDt("clone","--u","allowUnsafePack"),MDt("push","--exec","allowUnsafePack"),MDt(null,"--template","allowUnsafeTemplateDir")];xNa={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 sja(e){return typeof e!="function"?W2e:e}function aja(e){return typeof e=="function"&&e!==W2e}function cja(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function uja(e,t=0){return lja(e)&&e.length>t?e[t]:void 0}function q2e(e,t=0){if(lja(e)&&e.length>t)return e[e.length-1-t]}function lja(e){return CAr(e)}function GDt(e="",t=!0,r=`
|
|
100
|
+
`)),{ok:!0,value:t}):n}}var fY=h(()=>{"use strict"});function Zur(e){return e.path.length===0?e.message:`${e.path.join(" -> ")}: ${e.message}`}var eMi=h(()=>{"use strict"});var iWe,tMi=h(()=>{"use strict";eMi();iWe=class extends Error{errors;constructor(t){super(t.map(Zur).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});var oWe,rMi=h(()=>{"use strict";eMi();oWe=class extends Error{errors;constructor(t){super(t.map(Zur).join("; ")),this.errors=t,Object.setPrototypeOf(this,new.target.prototype),this.name=this.constructor.name}}});function _d(e){return{nullable:()=>jpf(e),optional:()=>nMi(e),optionalNullable:()=>Qpf(e),transform:t=>iMi(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 iWe(n.errors)}}}function jpf(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,..._d(t)}}function nMi(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,..._d(t)}}function Qpf(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,..._d(t)}}function iMi(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,..._d(r)}}var oka=h(()=>{"use strict";pw();tMi();rMi()});var gj=h(()=>{"use strict";oka();tMi();rMi()});function ska(){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:Vd(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="bigint"?{ok:!1,errors:[{path:r,message:Vd(t,"bigint")}]}:{ok:!0,value:t},getType:()=>nu.BIGINT};return{...fw(e),..._d(e)}}var aka=h(()=>{"use strict";pw();Jk();fY();gj()});var cka=h(()=>{"use strict";aka()});function uka(){let e={parse:(t,{breadcrumbsPrefix:r=[]}={})=>typeof t!="string"?{ok:!1,errors:[{path:r,message:Vd(t,"string")}]}:zpf.test(t)?{ok:!0,value:new Date(t)}:{ok:!1,errors:[{path:r,message:Vd(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:r=[]}={})=>t instanceof Date?{ok:!0,value:t.toISOString()}:{ok:!1,errors:[{path:r,message:Vd(t,"Date object")}]},getType:()=>nu.DATE};return{...fw(e),..._d(e)}}var zpf,lka=h(()=>{"use strict";pw();Jk();fY();gj();zpf=/^([+-]?\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 pka=h(()=>{"use strict";lka()});function FS(e,t){return()=>{let r={parse:t,json:t,getType:()=>e};return{...fw(r),..._d(r)}}}var dY=h(()=>{"use strict";gj();fY()});function aDt(e){let t=new Set(e);return FS(nu.ENUM,(n,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:o=[]}={})=>typeof n!="string"?{ok:!1,errors:[{path:o,message:Vd(n,"string")}]}:!t.has(n)&&!i?{ok:!1,errors:[{path:o,message:Vd(n,"enum")}]}:{ok:!0,value:n})()}function fka(e){return aDt(e).transform({transform:t=>t,untransform:t=>t})}var dka=h(()=>{"use strict";pw();dY();Jk()});var oMi=h(()=>{"use strict";dka()});function mka(e){let t=sMi(e);return{...t,..._d(t)}}function sMi(e){return{parse:(t,r)=>sWe(e).parse(t,r),json:(t,r)=>sWe(e).json(t,r),getType:()=>sWe(e).getType()}}function sWe(e){let t=e;return t.__zurg_memoized==null&&(t.__zurg_memoized=e()),t.__zurg_memoized}var aMi=h(()=>{"use strict";gj()});function cMi(e){return Object.entries(e)}var hka=h(()=>{"use strict"});function cDt(e,t){let r=new Set(t);return Object.entries(e).reduce((n,[i,o])=>(r.has(i)&&(n[i]=o),n),{})}var uMi=h(()=>{"use strict"});function tue(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:Object.getPrototypeOf(t)===null}var uDt=h(()=>{"use strict"});function lDt(e){return Object.keys(e)}var lMi=h(()=>{"use strict"});function gka(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}var Aka=h(()=>{"use strict"});function s7(e){return{withParsedProperties:t=>pMi(e,t)}}function pMi(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(Mpf.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(!tue(n))return{ok:!1,errors:[{path:i?.breadcrumbsPrefix??[],message:Vd(n,"object")}]};let o=new Set(Object.keys(t)),s=cDt(n,Object.keys(n).filter(a=>!o.has(a)));return e.json(s,i)},getType:()=>e.getType()};return{...r,..._d(r),...s7(r)}}var Mpf,yka=h(()=>{"use strict";uMi();Jk();uDt();gj();Mpf=Object.prototype.hasOwnProperty});var pDt=h(()=>{"use strict";yka()});function bka(e,t){return{rawKey:e,valueSchema:t,isProperty:!0}}function rue(e){return e.isProperty}var fMi=h(()=>{"use strict"});function $ur(e){let t;function r(){if(t==null){t={};for(let[d,f]of cMi(e)){let m=rue(f)?f.rawKey:d,g=rue(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 cMi(e)){let m=rue(f)?f.rawKey:d,g=rue(f)?f.valueSchema:f;Upf(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])=>rue(f)?f.rawKey:d),_getParsedProperties:()=>lDt(e),parse:(d,f)=>{let m=f?.breadcrumbsPrefix??[];return Eka({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 Eka({value:d,requiredKeys:c(),requiredKeysSet:l(),getProperty:g=>{let A=e[g];if(A!=null)return rue(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{...fw(p),..._d(p),...s7(p),...S2e(p)}}function Eka({value:e,requiredKeys:t,requiredKeysSet:r,getProperty:n,unrecognizedObjectKeys:i="fail",skipValidation:o=!1,breadcrumbsPrefix:s=[]}){if(!tue(e))return{ok:!1,errors:[{path:s,message:Vd(e,"object")}]};let a=t.length,c=[],u={};for(let l in e){if(!Lpf.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 S2e(e){return{extend:t=>{let r={_getParsedProperties:()=>[...e._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...e._getRawProperties(),...t._getRawProperties()],parse:(n,i)=>Ika({extensionKeys:t._getRawProperties(),value:n,transformBase:o=>e.parse(o,i),transformExtension:o=>t.parse(o,i),breadcrumbsPrefix:i?.breadcrumbsPrefix}),json:(n,i)=>Ika({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,..._d(r),...s7(r),...S2e(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,..._d(n),...s7(n),...S2e(n)}}}}function Ika({extensionKeys:e,value:t,transformBase:r,transformExtension:n,breadcrumbsPrefix:i=[]}){if(!tue(t))return{ok:!1,errors:[{path:i,message:Vd(t,"object")}]};let o=new Set(e),[s,a]=gka(lDt(t),l=>o.has(l)),c=r(cDt(t,a)),u=n(cDt(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 Upf(e){return!Vpf(e)}function Vpf(e){switch(e.getType()){case nu.ANY:case nu.UNKNOWN:case nu.OPTIONAL:case nu.OPTIONAL_NULLABLE:return!0;default:return!1}}var Lpf,dMi=h(()=>{"use strict";pw();hka();uMi();Jk();uDt();lMi();fY();Aka();pDt();gj();fMi();Lpf=Object.prototype.hasOwnProperty});function vka(e){return $ur(e)}var xka=h(()=>{"use strict";dMi()});var mMi=h(()=>{"use strict";dMi();xka();fMi()});function Cka(e){let t={...sMi(e),_getRawProperties:()=>sWe(e)._getRawProperties(),_getParsedProperties:()=>sWe(e)._getParsedProperties()};return{...t,..._d(t),...s7(t),...S2e(t)}}var wka=h(()=>{"use strict";mMi();pDt();gj();aMi()});var Ska=h(()=>{"use strict";aMi();wka()});function elr(e){let t={parse:(r,n)=>Tka(r,(i,o)=>e.parse(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),json:(r,n)=>Tka(r,(i,o)=>e.json(i,{...n,breadcrumbsPrefix:[...n?.breadcrumbsPrefix??[],`[${o}]`]})),getType:()=>nu.LIST};return{...fw(t),..._d(t)}}function Tka(e,t){if(!Array.isArray(e))return{ok:!1,errors:[{message:Vd(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 Oka=h(()=>{"use strict";pw();Jk();fY();gj()});var hMi=h(()=>{"use strict";Oka()});function Bka(e){return FS(nu.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Vd(r,`${e.toString()}`)}]})()}var Pka=h(()=>{"use strict";pw();dY();Jk()});function Dka(e){return FS(nu.STRING_LITERAL,(r,{breadcrumbsPrefix:n=[]}={})=>r===e?{ok:!0,value:e}:{ok:!1,errors:[{path:n,message:Vd(r,`"${e}"`)}]})()}var Rka=h(()=>{"use strict";pw();dY();Jk()});var kka=h(()=>{"use strict";Pka();Rka()});var Fka,Nka=h(()=>{"use strict";pw();dY();Fka=FS(nu.ANY,e=>({ok:!0,value:e}))});var jka,Qka=h(()=>{"use strict";pw();dY();Jk();jka=FS(nu.BOOLEAN,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="boolean"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Vd(e,"boolean")}]})});var zka,Mka=h(()=>{"use strict";pw();dY();zka=FS(nu.NEVER,(e,{breadcrumbsPrefix:t=[]}={})=>({ok:!1,errors:[{path:t,message:"Expected never"}]}))});var Lka,Uka=h(()=>{"use strict";pw();dY();Jk();Lka=FS(nu.NUMBER,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="number"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Vd(e,"number")}]})});var Vka,_ka=h(()=>{"use strict";pw();dY();Jk();Vka=FS(nu.STRING,(e,{breadcrumbsPrefix:t=[]}={})=>typeof e=="string"?{ok:!0,value:e}:{ok:!1,errors:[{path:t,message:Vd(e,"string")}]})});var Gka,qka=h(()=>{"use strict";pw();dY();Gka=FS(nu.UNKNOWN,e=>({ok:!0,value:e}))});var Wka=h(()=>{"use strict";Nka();Qka();Mka();Uka();_ka();qka()});function Hka(e,t){let r={parse:(n,i)=>tlr({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)=>tlr({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{...fw(r),..._d(r)}}function Kka(e,t){let r={parse:(n,i)=>tlr({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)=>tlr({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{...fw(r),..._d(r)}}function tlr({value:e,isKeyNumeric:t,transformKey:r,transformValue:n,breadcrumbsPrefix:i=[]}){if(!tue(e))return{ok:!1,errors:[{path:i,message:Vd(e,"object")}]};let o={},s=[];for(let a in e){if(!_pf.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 _pf,Jka=h(()=>{"use strict";pw();Jk();uDt();fY();gj();_pf=Object.prototype.hasOwnProperty});var Yka=h(()=>{"use strict";Jka()});function Xka(e){let t=elr(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:Vd(n,"Set")}]},getType:()=>nu.SET};return{...fw(r),..._d(r)}}var Zka=h(()=>{"use strict";pw();Jk();fY();hMi();gj()});var $ka=h(()=>{"use strict";Zka()});function tFa(e){let t={parse:(r,n)=>eFa((i,o)=>i.parse(r,o),e,n),json:(r,n)=>eFa((i,o)=>i.json(r,o),e,n),getType:()=>nu.UNDISCRIMINATED_UNION};return{...fw(t),..._d(t)}}function eFa(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 rFa=h(()=>{"use strict";pw();fY();gj()});var nFa=h(()=>{"use strict";rFa()});function iFa(e,t){return{parsedDiscriminant:e,rawDiscriminant:t}}var oFa=h(()=>{"use strict"});function aFa(e,t){let r=typeof e=="string"?e:e.rawDiscriminant,n=typeof e=="string"?e:e.parsedDiscriminant,i=aDt(lDt(t)),o={parse:(s,a)=>sFa({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)=>sFa({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{...fw(o),..._d(o),...s7(o)}}function sFa({value:e,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:n,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:o=!1,transformAdditionalProperties:s,breadcrumbsPrefix:a=[]}){if(!tue(e))return{ok:!1,errors:[{path:a,message:Vd(e,"object")}]};let c=e[t],u={};for(let f in e)Gpf.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 Gpf,cFa=h(()=>{"use strict";pw();Jk();uDt();lMi();fY();oMi();pDt();gj();Gpf=Object.prototype.hasOwnProperty});var uFa=h(()=>{"use strict";oFa();cFa()});var lFa=h(()=>{"use strict";cka();pka();oMi();Ska();hMi();kka();mMi();pDt();Wka();Yka();gj();$ka();nFa();uFa()});var D={};X(D,{JsonError:()=>iWe,ParseError:()=>oWe,any:()=>Fka,bigint:()=>ska,boolean:()=>jka,booleanLiteral:()=>Bka,date:()=>uka,discriminant:()=>iFa,enum_:()=>aDt,forwardCompatibleEnum_:()=>fka,getObjectLikeUtils:()=>s7,getObjectUtils:()=>S2e,getSchemaUtils:()=>_d,isProperty:()=>rue,lazy:()=>mka,lazyObject:()=>Cka,list:()=>elr,never:()=>zka,number:()=>Lka,object:()=>$ur,objectWithoutOptionalProperties:()=>vka,optional:()=>nMi,partialRecord:()=>Kka,property:()=>bka,record:()=>Hka,set:()=>Xka,string:()=>Vka,stringLiteral:()=>Dka,transform:()=>iMi,undiscriminatedUnion:()=>tFa,union:()=>aFa,unknown:()=>Gka,withParsedProperties:()=>pMi});var pFa=h(()=>{"use strict";lFa()});var fFa=h(()=>{"use strict"});var je=h(()=>{"use strict";tka();rka();nka();pFa();fFa()});var rlr,gMi=h(()=>{"use strict";je();rlr=D.string()});var aWe,nlr=h(()=>{"use strict";je();aWe=D.string()});var AMi=h(()=>{"use strict";gMi();nlr()});var yMi={};X(yMi,{AudienceDefinition:()=>rlr,AudienceReference:()=>aWe});var dFa=h(()=>{"use strict";AMi()});var Xi,Gl=h(()=>{"use strict";je();Xi=D.objectWithoutOptionalProperties({docs:D.string().optional()})});var T2e,bMi=h(()=>{"use strict";je();T2e=D.objectWithoutOptionalProperties({unsafeName:D.string(),safeName:D.string()})});var cWe,ilr=h(()=>{"use strict";je();bMi();cWe=D.objectWithoutOptionalProperties({originalName:D.string(),camelCase:T2e,pascalCase:T2e,snakeCase:T2e,screamingSnakeCase:T2e})});var Io,hf=h(()=>{"use strict";je();ilr();Io=D.undiscriminatedUnion([D.string(),cWe])});var uWe,olr=h(()=>{"use strict";je();uWe=D.string()});var CU,O2e=h(()=>{"use strict";je();Gl();olr();CU=D.objectWithoutOptionalProperties({key:uWe}).extend(Xi)});var wU,lWe=h(()=>{"use strict";je();wU=D.string()});var slr,EMi=h(()=>{"use strict";je();hf();O2e();lWe();slr=D.objectWithoutOptionalProperties({username:Io,usernameEnvVar:wU.optional(),usernameOmit:D.boolean().optional(),usernamePlaceholder:D.string().optional(),password:Io,passwordEnvVar:wU.optional(),passwordOmit:D.boolean().optional(),passwordPlaceholder:D.string().optional()}).extend(CU)});var alr,IMi=h(()=>{"use strict";je();hf();O2e();lWe();alr=D.objectWithoutOptionalProperties({token:Io,tokenEnvVar:wU.optional(),tokenPlaceholder:D.string().optional()}).extend(CU)});var nye,fDt=h(()=>{"use strict";je();hf();nye=D.objectWithoutOptionalProperties({wireValue:D.string(),name:Io})});var fs,yd=h(()=>{"use strict";je();fDt();fs=D.undiscriminatedUnion([D.string(),nye])});var clr,vMi=h(()=>{"use strict";je();Wo();yd();O2e();lWe();clr=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),prefix:D.string().optional(),headerEnvVar:wU.optional(),headerPlaceholder:D.string().optional()}).extend(CU)});var nue,dDt=h(()=>{"use strict";je();nue=D.string()});var mY,pWe=h(()=>{"use strict";je();mY=D.string()});var hY,fWe=h(()=>{"use strict";je();hY=D.string()});var iye,mDt=h(()=>{"use strict";je();dDt();pWe();fWe();iye=D.objectWithoutOptionalProperties({endpointId:nue,serviceId:mY,subpackageId:hY.optional()})});var ulr,xMi=h(()=>{"use strict";je();ulr=D.enum_(["IN_DEVELOPMENT","PRE_RELEASE","GENERAL_AVAILABILITY","DEPRECATED","ALPHA","BETA","PREVIEW","LEGACY"])});var gY,dWe=h(()=>{"use strict";je();xMi();gY=D.objectWithoutOptionalProperties({status:ulr,message:D.string().optional()})});var Fx,a7=h(()=>{"use strict";je();dWe();Gl();Fx=D.objectWithoutOptionalProperties({availability:gY.optional()}).extend(Xi)});var hDt,CMi=h(()=>{"use strict";je();hDt=D.unknown()});var NS,AY=h(()=>{"use strict";je();CMi();NS=D.objectWithoutOptionalProperties({userSpecifiedExamples:D.record(D.string(),hDt),autogeneratedExamples:D.record(D.string(),hDt)})});var oye,gDt=h(()=>{"use strict";je();oye=D.enum_(["READ_ONLY","WRITE_ONLY"])});var BO,iue=h(()=>{"use strict";je();Wo();a7();yd();AY();gDt();BO=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),propertyAccess:oye.optional(),defaultValue:D.unknown().optional(),v2Examples:NS.optional()}).extend(Fx)});var mWe,llr=h(()=>{"use strict";je();Wo();hf();mWe=D.objectWithoutOptionalProperties({name:Io,type:D.lazy(()=>Ps)})});var c0,yY=h(()=>{"use strict";je();iue();llr();c0=D.objectWithoutOptionalProperties({propertyPath:D.list(mWe).optional(),property:BO})});var plr,wMi=h(()=>{"use strict";je();yY();plr=D.objectWithoutOptionalProperties({responseProperty:c0,headerName:D.string(),valuePrefix:D.string().optional()})});var flr,SMi=h(()=>{"use strict";je();mDt();yY();wMi();flr=D.objectWithoutOptionalProperties({endpoint:iye,expiryProperty:c0.optional(),authenticatedRequestHeaders:D.list(plr)})});var dlr,TMi=h(()=>{"use strict";je();O2e();SMi();dlr=D.objectWithoutOptionalProperties({tokenEndpoint:flr}).extend(CU)});var hWe,mlr=h(()=>{"use strict";je();yY();hWe=D.objectWithoutOptionalProperties({accessToken:c0,expiresIn:c0.optional(),refreshToken:c0.optional()})});var SU,B2e=h(()=>{"use strict";Jr();je();SU=D.union("type",{string:D.object({string:D.string()}),boolean:D.object({boolean:D.boolean()})}).transform({transform:e=>{switch(e.type){case"string":return a0.string(e.string);case"boolean":return a0.boolean(e.boolean);default:return e}},untransform:({_visit:e,...t})=>t})});var sye,ADt=h(()=>{"use strict";je();Wo();a7();yd();AY();B2e();sye=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),allowMultiple:D.boolean(),clientDefault:SU.optional(),defaultValue:D.unknown().optional(),v2Examples:NS.optional(),explode:D.boolean().optional()}).extend(Fx)});var hlr,OMi=h(()=>{"use strict";Jr();je();iue();ADt();hlr=D.union("type",{query:sye,body:BO}).transform({transform:e=>{switch(e.type){case"query":return wO.query(e);case"body":return wO.body(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kP,P2e=h(()=>{"use strict";je();llr();OMi();kP=D.objectWithoutOptionalProperties({propertyPath:D.list(mWe).optional(),property:hlr})});var glr,BMi=h(()=>{"use strict";je();P2e();glr=D.objectWithoutOptionalProperties({refreshToken:kP})});var Alr,PMi=h(()=>{"use strict";je();mDt();mlr();BMi();Alr=D.objectWithoutOptionalProperties({endpointReference:iye,requestProperties:glr,responseProperties:hWe})});var ylr,DMi=h(()=>{"use strict";je();P2e();ylr=D.objectWithoutOptionalProperties({clientId:kP,clientSecret:kP,scopes:kP.optional(),customProperties:D.list(kP).optional()})});var blr,RMi=h(()=>{"use strict";je();mDt();DMi();mlr();blr=D.objectWithoutOptionalProperties({endpointReference:iye,requestProperties:ylr,responseProperties:hWe})});var Elr,kMi=h(()=>{"use strict";je();lWe();PMi();RMi();Elr=D.objectWithoutOptionalProperties({clientIdEnvVar:wU.optional(),clientSecretEnvVar:wU.optional(),tokenPrefix:D.string().optional(),tokenHeader:D.string().optional(),scopes:D.list(D.string()).optional(),tokenEndpoint:blr,refreshEndpoint:Alr.optional()})});var Ilr,FMi=h(()=>{"use strict";Jr();je();kMi();Ilr=D.union("type",{clientCredentials:Elr}).transform({transform:e=>e.type==="clientCredentials"?cY.clientCredentials(e):e,untransform:({_visit:e,...t})=>t})});var vlr,NMi=h(()=>{"use strict";je();O2e();FMi();vlr=D.objectWithoutOptionalProperties({configuration:Ilr}).extend(CU)});var xlr,jMi=h(()=>{"use strict";Jr();je();EMi();IMi();vMi();TMi();NMi();xlr=D.union(D.discriminant("type","_type"),{bearer:alr,basic:slr,header:clr,oauth:vlr,inferred:dlr}).transform({transform:e=>{switch(e.type){case"bearer":return Gp.bearer(e);case"basic":return Gp.basic(e);case"header":return Gp.header(e);case"oauth":return Gp.oauth(e);case"inferred":return Gp.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Clr,QMi=h(()=>{"use strict";je();Clr=D.enum_(["ALL","ANY","ENDPOINT_SECURITY"])});var wlr,zMi=h(()=>{"use strict";je();Gl();jMi();QMi();wlr=D.objectWithoutOptionalProperties({requirement:Clr,schemes:D.list(xlr)}).extend(Xi)});var Slr,MMi=h(()=>{"use strict";je();Slr=D.string()});var LMi=h(()=>{"use strict";zMi();jMi();olr();QMi();MMi();O2e();EMi();IMi();lWe();vMi();wMi();TMi();SMi();DMi();mlr();kMi();FMi();PMi();BMi();NMi();RMi()});var UMi={};X(UMi,{ApiAuth:()=>wlr,AuthScheme:()=>xlr,AuthSchemeKey:()=>uWe,AuthSchemesRequirement:()=>Clr,AuthScope:()=>Slr,BaseAuthScheme:()=>CU,BasicAuthScheme:()=>slr,BearerAuthScheme:()=>alr,EnvironmentVariable:()=>wU,HeaderAuthScheme:()=>clr,InferredAuthScheme:()=>dlr,InferredAuthSchemeTokenEndpoint:()=>flr,InferredAuthenticatedRequestHeader:()=>plr,OAuthAccessTokenRequestProperties:()=>ylr,OAuthAccessTokenResponseProperties:()=>hWe,OAuthClientCredentials:()=>Elr,OAuthConfiguration:()=>Ilr,OAuthRefreshEndpoint:()=>Alr,OAuthRefreshTokenRequestProperties:()=>glr,OAuthScheme:()=>vlr,OAuthTokenEndpoint:()=>blr});var mFa=h(()=>{"use strict";LMi()});var aye,yDt=h(()=>{"use strict";je();aye=D.string()});var cye,bDt=h(()=>{"use strict";je();cye=D.string()});var Tlr,VMi=h(()=>{"use strict";je();Tlr=D.objectWithoutOptionalProperties({original:D.string()})});var EDt,_Mi=h(()=>{"use strict";je();EDt=D.string()});var TU,D2e=h(()=>{"use strict";je();hf();TU=D.objectWithoutOptionalProperties({allParts:D.list(Io),packagePath:D.list(Io),file:Io.optional()})});var PO,oue=h(()=>{"use strict";je();PO=D.string()});var gWe,Olr=h(()=>{"use strict";je();gWe=D.string()});var Blr,GMi=h(()=>{"use strict";je();Blr=D.string()});var AWe,Plr=h(()=>{"use strict";je();AWe=D.string()});var OU,R2e=h(()=>{"use strict";je();OU=D.objectWithoutOptionalProperties({contentType:D.string().optional()})});var uye,IDt=h(()=>{"use strict";je();dWe();Gl();uye=D.objectWithoutOptionalProperties({availability:gY.optional()}).extend(Xi)});var bY,yWe=h(()=>{"use strict";je();bY=D.objectWithoutOptionalProperties({jsonExample:D.unknown()})});var qMi=h(()=>{"use strict";dWe();xMi();a7();yDt();dDt();mDt();bDt();VMi();_Mi();D2e();ilr();fDt();yd();hf();bMi();pWe();fWe();oue();Olr();GMi();Plr();R2e();Gl();IDt();yWe()});var WMi={};X(WMi,{Availability:()=>gY,AvailabilityStatus:()=>ulr,Declaration:()=>Fx,DisplayName:()=>aye,EndpointId:()=>nue,EndpointReference:()=>iye,ErrorId:()=>cye,EscapedString:()=>Tlr,FeatureId:()=>EDt,FernFilepath:()=>TU,Name:()=>cWe,NameAndWireValue:()=>nye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Io,SafeAndUnsafeString:()=>T2e,ServiceId:()=>mY,SubpackageId:()=>hY,TypeId:()=>PO,WebSocketChannelId:()=>AWe,WebhookGroupId:()=>gWe,WebhookId:()=>Blr,WithContentType:()=>OU,WithDocs:()=>Xi,WithDocsAndAvailability:()=>uye,WithJsonExample:()=>bY});var hFa=h(()=>{"use strict";qMi()});var Dlr,HMi=h(()=>{"use strict";je();yd();Dlr=D.objectWithoutOptionalProperties({errorInstanceIdKey:fs})});var KMi=h(()=>{"use strict";HMi()});var JMi={};X(JMi,{Constants:()=>Dlr});var gFa=h(()=>{"use strict";KMi()});var k2e,YMi=h(()=>{"use strict";je();k2e=D.objectWithoutOptionalProperties({unsafeName:D.string(),safeName:D.string()})});var Zg,J6=h(()=>{"use strict";je();YMi();Zg=D.objectWithoutOptionalProperties({originalName:D.string(),camelCase:k2e,pascalCase:k2e,snakeCase:k2e,screamingSnakeCase:k2e})});var Rlr,XMi=h(()=>{"use strict";je();J6();Rlr=D.objectWithoutOptionalProperties({username:Zg,usernameOmit:D.boolean().optional(),password:Zg,passwordOmit:D.boolean().optional()})});var klr,ZMi=h(()=>{"use strict";je();J6();klr=D.objectWithoutOptionalProperties({token:Zg})});var hI,c7=h(()=>{"use strict";je();J6();hI=D.objectWithoutOptionalProperties({wireValue:D.string(),name:Zg})});var Flr,$Mi=h(()=>{"use strict";je();Flr=D.enum_(["READ_ONLY","WRITE_ONLY"])});var vg,Aj=h(()=>{"use strict";je();Wo();c7();$Mi();vg=D.objectWithoutOptionalProperties({name:hI,typeReference:D.lazy(()=>u0.TypeReference),propertyAccess:Flr.optional(),variable:D.string().optional()})});var Nlr,e6i=h(()=>{"use strict";je();Aj();Nlr=D.objectWithoutOptionalProperties({header:vg})});var jlr,t6i=h(()=>{"use strict";je();Aj();jlr=D.objectWithoutOptionalProperties({parameters:D.list(vg).optional()})});var Qlr,r6i=h(()=>{"use strict";je();J6();Aj();Qlr=D.objectWithoutOptionalProperties({clientId:Zg,clientSecret:Zg,customProperties:D.list(vg).optional()})});var zlr,n6i=h(()=>{"use strict";Jr();je();XMi();ZMi();e6i();t6i();r6i();zlr=D.union("type",{basic:Rlr,bearer:klr,header:Nlr,oauth:Qlr,inferred:jlr}).transform({transform:e=>{switch(e.type){case"basic":return Xt.Auth.basic(e);case"bearer":return Xt.Auth.bearer(e);case"header":return Xt.Auth.header(e);case"oauth":return Xt.Auth.oauth(e);case"inferred":return Xt.Auth.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Mlr,i6i=h(()=>{"use strict";je();Mlr=D.objectWithoutOptionalProperties({username:D.string(),password:D.string()})});var Llr,o6i=h(()=>{"use strict";je();Llr=D.objectWithoutOptionalProperties({token:D.string()})});var Ulr,s6i=h(()=>{"use strict";je();Ulr=D.objectWithoutOptionalProperties({value:D.unknown()})});var Vlr,a6i=h(()=>{"use strict";je();Vlr=D.objectWithoutOptionalProperties({values:D.record(D.string(),D.unknown()).optional()})});var _lr,c6i=h(()=>{"use strict";je();_lr=D.objectWithoutOptionalProperties({clientId:D.string(),clientSecret:D.string(),customPropertyValues:D.record(D.string(),D.unknown()).optional()})});var Glr,u6i=h(()=>{"use strict";Jr();je();i6i();o6i();s6i();a6i();c6i();Glr=D.union("type",{basic:Mlr,bearer:Llr,header:Ulr,oauth:_lr,inferred:Vlr}).transform({transform:e=>{switch(e.type){case"basic":return Xt.AuthValues.basic(e);case"bearer":return Xt.AuthValues.bearer(e);case"header":return Xt.AuthValues.header(e);case"oauth":return Xt.AuthValues.oauth(e);case"inferred":return Xt.AuthValues.inferred(e);default:return e}},untransform:({_visit:e,...t})=>t})});var l6i=h(()=>{"use strict";n6i();u6i();XMi();i6i();ZMi();o6i();e6i();s6i();t6i();a6i();r6i();c6i()});var p6i={};X(p6i,{Auth:()=>zlr,AuthValues:()=>Glr,BasicAuth:()=>Rlr,BasicAuthValues:()=>Mlr,BearerAuth:()=>klr,BearerAuthValues:()=>Llr,HeaderAuth:()=>Nlr,HeaderAuthValues:()=>Ulr,InferredAuth:()=>jlr,InferredAuthValues:()=>Vlr,OAuth:()=>Qlr,OAuthValues:()=>_lr});var AFa=h(()=>{"use strict";l6i()});var qlr,f6i=h(()=>{"use strict";je();qlr=D.string()});var Wlr,d6i=h(()=>{"use strict";je();J6();Wlr=D.objectWithoutOptionalProperties({allParts:D.list(Zg),packagePath:D.list(Zg),file:Zg.optional()})});var yFa,bFa=h(()=>{"use strict";je();c7();yFa=D.undiscriminatedUnion([D.string(),hI])});var EFa,IFa=h(()=>{"use strict";je();J6();EFa=D.undiscriminatedUnion([D.string(),Zg])});var EY,bWe=h(()=>{"use strict";je();EY=D.string()});var EWe,Hlr=h(()=>{"use strict";je();EWe=D.objectWithoutOptionalProperties({docs:D.string().optional()})});var m6i=h(()=>{"use strict";f6i();d6i();J6();c7();bFa();IFa();YMi();bWe();Hlr()});var h6i={};X(h6i,{EndpointId:()=>qlr,FernFilepath:()=>Wlr,Name:()=>Zg,NameAndWireValue:()=>hI,NameAndWireValueOrString:()=>yFa,NameOrString:()=>EFa,SafeAndUnsafeString:()=>k2e,TypeId:()=>EY,WithDocs:()=>EWe});var vFa=h(()=>{"use strict";m6i()});var FP,sue=h(()=>{"use strict";je();d6i();J6();FP=D.objectWithoutOptionalProperties({fernFilepath:Wlr,name:Zg})});var g6i=h(()=>{"use strict";sue()});var A6i={};X(A6i,{Declaration:()=>FP});var xFa=h(()=>{"use strict";g6i()});var IWe,Klr=h(()=>{"use strict";Jr();je();Wo();IWe=D.union("type",{bytes:D.object({}),typeReference:D.object({value:D.lazy(()=>u0.TypeReference)})}).transform({transform:e=>{switch(e.type){case"bytes":return Xt.ReferencedRequestBodyType.bytes();case"typeReference":return Xt.ReferencedRequestBodyType.typeReference(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Jlr,y6i=h(()=>{"use strict";je();Aj();Klr();Jlr=D.objectWithoutOptionalProperties({pathParameters:D.list(vg).optional(),body:IWe.optional()})});var Ylr,b6i=h(()=>{"use strict";je();Ylr=D.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var vWe,Xlr=h(()=>{"use strict";je();b6i();vWe=D.objectWithoutOptionalProperties({method:Ylr,path:D.string()})});var IY,xWe=h(()=>{"use strict";je();IY=D.string()});var lye,vDt=h(()=>{"use strict";je();lye=D.string()});var pye,xDt=h(()=>{"use strict";je();pye=D.string()});var Zlr,E6i=h(()=>{"use strict";je();vDt();xDt();Zlr=D.record(lye,pye)});var $lr,I6i=h(()=>{"use strict";je();xWe();E6i();$lr=D.undiscriminatedUnion([IY,Zlr])});var CWe,v6i=h(()=>{"use strict";je();CWe=D.record(D.string(),D.unknown())});var epr,x6i=h(()=>{"use strict";je();u6i();Xlr();I6i();v6i();epr=D.objectWithoutOptionalProperties({endpoint:vWe,baseUrl:D.property("baseURL",D.string().optional()),environment:$lr.optional(),auth:Glr.optional(),pathParameters:CWe.optional(),queryParameters:CWe.optional(),headers:CWe.optional(),requestBody:D.unknown().optional()})});var tpr,C6i=h(()=>{"use strict";je();x6i();tpr=D.objectWithoutOptionalProperties({id:D.string(),name:D.string().optional(),isUserSpecified:D.boolean().optional()}).extend(epr)});var rpr,w6i=h(()=>{"use strict";Jr();je();c7();Aj();rpr=D.union("type",{file:hI,fileArray:hI,bodyProperty:vg}).transform({transform:e=>{switch(e.type){case"file":return Xt.FileUploadRequestBodyProperty.file(e);case"fileArray":return Xt.FileUploadRequestBodyProperty.fileArray(e);case"bodyProperty":return Xt.FileUploadRequestBodyProperty.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var npr,S6i=h(()=>{"use strict";je();w6i();npr=D.objectWithoutOptionalProperties({properties:D.list(rpr)})});var ipr,T6i=h(()=>{"use strict";je();J6();Klr();ipr=D.objectWithoutOptionalProperties({bodyKey:Zg,bodyType:IWe})});var opr,O6i=h(()=>{"use strict";Jr();je();Aj();S6i();T6i();opr=D.union("type",{properties:D.object({value:D.list(vg)}),referenced:ipr,fileUpload:npr}).transform({transform:e=>{switch(e.type){case"properties":return Xt.InlinedRequestBody.properties(e.value);case"referenced":return Xt.InlinedRequestBody.referenced(e);case"fileUpload":return Xt.InlinedRequestBody.fileUpload(e);default:return e}},untransform:({_visit:e,...t})=>t})});var spr,B6i=h(()=>{"use strict";je();spr=D.objectWithoutOptionalProperties({includePathParameters:D.boolean(),onlyPathParameters:D.boolean()})});var apr,P6i=h(()=>{"use strict";je();sue();Aj();O6i();B6i();apr=D.objectWithoutOptionalProperties({declaration:FP,pathParameters:D.list(vg).optional(),queryParameters:D.list(vg).optional(),headers:D.list(vg).optional(),body:opr.optional(),metadata:spr.optional()})});var cpr,D6i=h(()=>{"use strict";Jr();je();y6i();P6i();cpr=D.union("type",{body:Jlr,inlined:apr}).transform({transform:e=>{switch(e.type){case"body":return Xt.Request.body(e);case"inlined":return Xt.Request.inlined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var upr,R6i=h(()=>{"use strict";Jr();je();upr=D.union("type",{json:D.object({}),streaming:D.object({}),streamParameter:D.object({}),fileDownload:D.object({}),text:D.object({}),bytes:D.object({})}).transform({transform:e=>{switch(e.type){case"json":return Xt.Response.json();case"streaming":return Xt.Response.streaming();case"streamParameter":return Xt.Response.streamParameter();case"fileDownload":return Xt.Response.fileDownload();case"text":return Xt.Response.text();case"bytes":return Xt.Response.bytes();default:return e}},untransform:({_visit:e,...t})=>t})});var lpr,k6i=h(()=>{"use strict";je();n6i();sue();C6i();Xlr();D6i();R6i();lpr=D.objectWithoutOptionalProperties({auth:zlr.optional(),declaration:FP,location:vWe,request:cpr,response:upr,examples:D.list(tpr).optional()})});var F6i=h(()=>{"use strict";y6i();k6i();C6i();Xlr();S6i();w6i();P6i();O6i();B6i();T6i();Klr();D6i();R6i()});var N6i={};X(N6i,{BodyRequest:()=>Jlr,Endpoint:()=>lpr,EndpointExample:()=>tpr,EndpointLocation:()=>vWe,FileUploadRequestBody:()=>npr,FileUploadRequestBodyProperty:()=>rpr,InlinedRequest:()=>apr,InlinedRequestBody:()=>opr,InlinedRequestMetadata:()=>spr,ReferencedRequestBody:()=>ipr,ReferencedRequestBodyType:()=>IWe,Request:()=>cpr,Response:()=>upr});var CFa=h(()=>{"use strict";F6i()});var ppr,j6i=h(()=>{"use strict";je();J6();vDt();ppr=D.objectWithoutOptionalProperties({id:lye,name:Zg})});var fpr,Q6i=h(()=>{"use strict";je();J6();Hlr();vDt();xWe();xDt();fpr=D.objectWithoutOptionalProperties({id:IY,name:Zg,urls:D.record(lye,pye)}).extend(EWe)});var dpr,z6i=h(()=>{"use strict";je();j6i();Q6i();dpr=D.objectWithoutOptionalProperties({baseUrls:D.list(ppr),environments:D.list(fpr)})});var mpr,M6i=h(()=>{"use strict";je();J6();Hlr();xWe();xDt();mpr=D.objectWithoutOptionalProperties({id:IY,name:Zg,url:pye}).extend(EWe)});var hpr,L6i=h(()=>{"use strict";je();M6i();hpr=D.objectWithoutOptionalProperties({environments:D.list(mpr)})});var gpr,U6i=h(()=>{"use strict";Jr();je();z6i();L6i();gpr=D.union("type",{singleBaseUrl:hpr,multipleBaseUrls:dpr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return Xt.Environments.singleBaseUrl(e);case"multipleBaseUrls":return Xt.Environments.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Apr,V6i=h(()=>{"use strict";je();xWe();U6i();Apr=D.objectWithoutOptionalProperties({defaultEnvironment:IY.optional(),environments:gpr})});var _6i=h(()=>{"use strict";vDt();j6i();xWe();U6i();V6i();xDt();I6i();Q6i();z6i();E6i();M6i();L6i()});var G6i={};X(G6i,{EnvironmentBaseUrlId:()=>lye,EnvironmentBaseUrlWithId:()=>ppr,EnvironmentId:()=>IY,EnvironmentUrl:()=>pye,EnvironmentValues:()=>$lr,Environments:()=>gpr,EnvironmentsConfig:()=>Apr,MultipleBaseUrlsEnvironment:()=>fpr,MultipleBaseUrlsEnvironments:()=>dpr,MultipleEnvironmentUrlValues:()=>Zlr,SingleBaseUrlEnvironment:()=>mpr,SingleBaseUrlEnvironments:()=>hpr});var wFa=h(()=>{"use strict";_6i()});var q6i=h(()=>{"use strict";b6i()});var W6i={};X(W6i,{HttpMethod:()=>Ylr});var SFa=h(()=>{"use strict";q6i()});var ypr,H6i=h(()=>{"use strict";je();ypr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var bpr,K6i=h(()=>{"use strict";je();bpr=D.enum_(["explicit","auto"])});var wWe,Epr=h(()=>{"use strict";je();wWe=D.string()});var Ipr,J6i=h(()=>{"use strict";je();Ipr=D.enum_(["header","query","body","path"])});var SWe,vpr=h(()=>{"use strict";je();Wo();yd();Gl();B2e();K6i();Epr();J6i();SWe=D.objectWithoutOptionalProperties({id:wWe,name:fs,location:Ipr,target:D.string(),valueType:D.lazy(()=>Ps),env:D.string().optional(),clientDefault:SU.optional(),optional:D.boolean().optional(),apply:bpr.optional()}).extend(Xi)});var xpr,Y6i=h(()=>{"use strict";je();Wo();sue();xpr=D.objectWithoutOptionalProperties({declaration:FP,typeReference:D.lazy(()=>u0.TypeReference)})});var Cpr,X6i=h(()=>{"use strict";je();c7();Aj();Cpr=D.objectWithoutOptionalProperties({discriminantValue:hI,properties:D.list(vg).optional()})});var wpr,Z6i=h(()=>{"use strict";je();c7();bWe();Aj();wpr=D.objectWithoutOptionalProperties({typeId:EY,discriminantValue:hI,properties:D.list(vg)})});var Spr,$6i=h(()=>{"use strict";je();Wo();c7();Aj();Spr=D.objectWithoutOptionalProperties({typeReference:D.lazy(()=>u0.TypeReference),discriminantValue:hI,properties:D.list(vg).optional()})});var Tpr,eLi=h(()=>{"use strict";Jr();je();X6i();Z6i();$6i();Tpr=D.union("type",{samePropertiesAsObject:wpr,singleProperty:Spr,noProperties:Cpr}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return Xt.SingleDiscriminatedUnionType.samePropertiesAsObject(e);case"singleProperty":return Xt.SingleDiscriminatedUnionType.singleProperty(e);case"noProperties":return Xt.SingleDiscriminatedUnionType.noProperties(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Opr,tLi=h(()=>{"use strict";je();c7();sue();eLi();Opr=D.objectWithoutOptionalProperties({declaration:FP,discriminant:hI,types:D.record(D.string(),Tpr),inheritedBaseProperties:D.list(hI).optional()})});var Bpr,rLi=h(()=>{"use strict";je();c7();sue();Bpr=D.objectWithoutOptionalProperties({declaration:FP,values:D.list(hI)})});var Ppr,nLi=h(()=>{"use strict";je();c7();bWe();sue();Aj();Ppr=D.objectWithoutOptionalProperties({declaration:FP,properties:D.list(vg),extends:D.list(EY).optional(),additionalProperties:D.boolean().optional(),deferredUnionBaseProperties:D.list(hI).optional()})});var Dpr,iLi=h(()=>{"use strict";je();Wo();sue();Dpr=D.objectWithoutOptionalProperties({declaration:FP,types:D.list(D.lazy(()=>u0.TypeReference))})});var Rpr,oLi=h(()=>{"use strict";Jr();je();Y6i();tLi();rLi();nLi();iLi();Rpr=D.union("type",{alias:xpr,enum:Bpr,object:Ppr,discriminatedUnion:Opr,undiscriminatedUnion:Dpr}).transform({transform:e=>{switch(e.type){case"alias":return Xt.NamedType.alias(e);case"enum":return Xt.NamedType.enum(e);case"object":return Xt.NamedType.object(e);case"discriminatedUnion":return Xt.NamedType.discriminatedUnion(e);case"undiscriminatedUnion":return Xt.NamedType.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kpr,sLi=h(()=>{"use strict";je();Wo();ilr();kpr=D.objectWithoutOptionalProperties({id:D.string(),name:cWe,typeReference:D.lazy(()=>u0.TypeReference)})});var Fpr,aLi=h(()=>{"use strict";je();Fpr=D.objectWithoutOptionalProperties({version:D.string(),repoUrl:D.string()})});var Npr,cLi=h(()=>{"use strict";je();Npr=D.objectWithoutOptionalProperties({version:D.string(),coordinate:D.string(),repoUrl:D.string().optional()})});var jpr,uLi=h(()=>{"use strict";je();jpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var Qpr,lLi=h(()=>{"use strict";je();Qpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var zpr,pLi=h(()=>{"use strict";je();zpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var Mpr,fLi=h(()=>{"use strict";je();Mpr=D.objectWithoutOptionalProperties({version:D.string(),packageName:D.string(),repoUrl:D.string().optional()})});var Lpr,dLi=h(()=>{"use strict";je();Lpr=D.objectWithoutOptionalProperties({version:D.string(),repoUrl:D.string()})});var Upr,mLi=h(()=>{"use strict";Jr();je();H6i();aLi();cLi();uLi();lLi();pLi();fLi();dLi();Upr=D.union("type",{go:Fpr,swift:Lpr,maven:Npr,npm:jpr,nuget:Qpr,pypi:zpr,rubygems:Mpr,crates:ypr}).transform({transform:e=>{switch(e.type){case"go":return Xt.PublishInfo.go(e);case"swift":return Xt.PublishInfo.swift(e);case"maven":return Xt.PublishInfo.maven(e);case"npm":return Xt.PublishInfo.npm(e);case"nuget":return Xt.PublishInfo.nuget(e);case"pypi":return Xt.PublishInfo.pypi(e);case"rubygems":return Xt.PublishInfo.rubygems(e);case"crates":return Xt.PublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Vpr,hLi=h(()=>{"use strict";Jr();je();mLi();Vpr=D.union("type",{publish:D.object({value:Upr}),local:D.object({})}).transform({transform:e=>{switch(e.type){case"publish":return Xt.GeneratorOutputConfig.publish(e.value);case"local":return Xt.GeneratorOutputConfig.local();default:return e}},untransform:({_visit:e,...t})=>t})});var _pr,gLi=h(()=>{"use strict";je();hLi();_pr=D.objectWithoutOptionalProperties({apiName:D.string(),organization:D.string(),customConfig:D.unknown(),outputConfig:Vpr})});var Gpr,ALi=h(()=>{"use strict";je();vpr();f6i();bWe();k6i();V6i();Aj();oLi();sLi();gLi();Gpr=D.objectWithoutOptionalProperties({version:D.stringLiteral("1.0.0"),types:D.record(EY,Rpr),endpoints:D.record(qlr,lpr),environments:Apr.optional(),headers:D.list(vg).optional(),pathParameters:D.list(vg).optional(),variables:D.list(kpr).optional(),globalParameters:D.list(SWe).optional(),generatorConfig:_pr.optional()})});var yLi=h(()=>{"use strict";H6i();ALi();gLi();hLi();aLi();cLi();uLi();lLi();mLi();pLi();fLi();dLi()});var bLi={};X(bLi,{CratesPublishInfo:()=>ypr,DynamicIntermediateRepresentation:()=>Gpr,GeneratorConfig:()=>_pr,GeneratorOutputConfig:()=>Vpr,GoPublishInfo:()=>Fpr,MavenPublishInfo:()=>Npr,NpmPublishInfo:()=>jpr,NugetPublishInfo:()=>Qpr,PublishInfo:()=>Upr,PypiPublishInfo:()=>zpr,RubyGemsPublishInfo:()=>Mpr,SwiftPublishInfo:()=>Lpr});var TFa=h(()=>{"use strict";yLi()});var qpr,ELi=h(()=>{"use strict";je();qpr=D.enum_(["CRITICAL","WARNING"])});var Wpr,ILi=h(()=>{"use strict";je();ELi();Wpr=D.objectWithoutOptionalProperties({severity:qpr,message:D.string()})});var OFa,BFa=h(()=>{"use strict";je();ILi();OFa=D.objectWithoutOptionalProperties({snippet:D.string(),errors:D.list(Wpr).optional()})});var vLi=h(()=>{"use strict";x6i();BFa();ILi();ELi();v6i()});var xLi={};X(xLi,{EndpointSnippetRequest:()=>epr,EndpointSnippetResponse:()=>OFa,ErrorSeverity:()=>qpr,Error_:()=>Wpr,Values:()=>CWe});var PFa=h(()=>{"use strict";vLi()});var Hpr,CLi=h(()=>{"use strict";Jr();je();Hpr=D.union("type",{boolean:D.object({value:D.boolean()}),string:D.object({value:D.string()})}).transform({transform:e=>{switch(e.type){case"boolean":return Xt.LiteralType.boolean(e.value);case"string":return Xt.LiteralType.string(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var DFa,RFa=h(()=>{"use strict";je();Wo();DFa=D.objectWithoutOptionalProperties({key:D.lazy(()=>u0.TypeReference),value:D.lazy(()=>u0.TypeReference)})});var Kpr,wLi=h(()=>{"use strict";je();Kpr=D.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var kFa,FFa=h(()=>{"use strict";Jr();je();Wo();bWe();CLi();wLi();kFa=D.union("type",{list:D.object({value:D.lazy(()=>u0.TypeReference)}),literal:D.object({value:Hpr}),map:D.lazyObject(()=>u0.MapType),named:D.object({value:EY}),nullable:D.object({value:D.lazy(()=>u0.TypeReference)}),optional:D.object({value:D.lazy(()=>u0.TypeReference)}),primitive:D.object({value:Kpr}),set:D.object({value:D.lazy(()=>u0.TypeReference)}),unknown:D.object({})}).transform({transform:e=>{switch(e.type){case"list":return Xt.TypeReference.list(e.value);case"literal":return Xt.TypeReference.literal(e.value);case"map":return Xt.TypeReference.map(e);case"named":return Xt.TypeReference.named(e.value);case"nullable":return Xt.TypeReference.nullable(e.value);case"optional":return Xt.TypeReference.optional(e.value);case"primitive":return Xt.TypeReference.primitive(e.value);case"set":return Xt.TypeReference.set(e.value);case"unknown":return Xt.TypeReference.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var SLi=h(()=>{"use strict";Y6i();tLi();rLi();CLi();RFa();Aj();oLi();$Mi();nLi();wLi();eLi();X6i();Z6i();$6i();FFa();iLi()});var TLi={};X(TLi,{AliasType:()=>xpr,DiscriminatedUnionType:()=>Opr,EnumType:()=>Bpr,LiteralType:()=>Hpr,MapType:()=>DFa,NamedParameter:()=>vg,NamedType:()=>Rpr,ObjectPropertyAccess:()=>Flr,ObjectType:()=>Ppr,PrimitiveTypeV1:()=>Kpr,SingleDiscriminatedUnionType:()=>Tpr,SingleDiscriminatedUnionTypeNoProperties:()=>Cpr,SingleDiscriminatedUnionTypeObject:()=>wpr,SingleDiscriminatedUnionTypeSingleProperty:()=>Spr,TypeReference:()=>kFa,UndiscriminatedUnionType:()=>Dpr});var NFa=h(()=>{"use strict";SLi()});var OLi=h(()=>{"use strict";sLi()});var BLi={};X(BLi,{VariableDeclaration:()=>kpr});var jFa=h(()=>{"use strict";OLi()});var QFa=h(()=>{"use strict";AFa();l6i();vFa();m6i();xFa();g6i();CFa();F6i();wFa();_6i();SFa();q6i();TFa();yLi();PFa();vLi();NFa();SLi();jFa();OLi()});var u0={};X(u0,{AliasType:()=>xpr,Auth:()=>zlr,AuthValues:()=>Glr,BasicAuth:()=>Rlr,BasicAuthValues:()=>Mlr,BearerAuth:()=>klr,BearerAuthValues:()=>Llr,BodyRequest:()=>Jlr,CratesPublishInfo:()=>ypr,Declaration:()=>FP,DiscriminatedUnionType:()=>Opr,DynamicIntermediateRepresentation:()=>Gpr,Endpoint:()=>lpr,EndpointExample:()=>tpr,EndpointId:()=>qlr,EndpointLocation:()=>vWe,EndpointSnippetRequest:()=>epr,EndpointSnippetResponse:()=>OFa,EnumType:()=>Bpr,EnvironmentBaseUrlId:()=>lye,EnvironmentBaseUrlWithId:()=>ppr,EnvironmentId:()=>IY,EnvironmentUrl:()=>pye,EnvironmentValues:()=>$lr,Environments:()=>gpr,EnvironmentsConfig:()=>Apr,ErrorSeverity:()=>qpr,Error_:()=>Wpr,FernFilepath:()=>Wlr,FileUploadRequestBody:()=>npr,FileUploadRequestBodyProperty:()=>rpr,GeneratorConfig:()=>_pr,GeneratorOutputConfig:()=>Vpr,GoPublishInfo:()=>Fpr,HeaderAuth:()=>Nlr,HeaderAuthValues:()=>Ulr,HttpMethod:()=>Ylr,InferredAuth:()=>jlr,InferredAuthValues:()=>Vlr,InlinedRequest:()=>apr,InlinedRequestBody:()=>opr,InlinedRequestMetadata:()=>spr,LiteralType:()=>Hpr,MapType:()=>DFa,MavenPublishInfo:()=>Npr,MultipleBaseUrlsEnvironment:()=>fpr,MultipleBaseUrlsEnvironments:()=>dpr,MultipleEnvironmentUrlValues:()=>Zlr,Name:()=>Zg,NameAndWireValue:()=>hI,NameAndWireValueOrString:()=>yFa,NameOrString:()=>EFa,NamedParameter:()=>vg,NamedType:()=>Rpr,NpmPublishInfo:()=>jpr,NugetPublishInfo:()=>Qpr,OAuth:()=>Qlr,OAuthValues:()=>_lr,ObjectPropertyAccess:()=>Flr,ObjectType:()=>Ppr,PrimitiveTypeV1:()=>Kpr,PublishInfo:()=>Upr,PypiPublishInfo:()=>zpr,ReferencedRequestBody:()=>ipr,ReferencedRequestBodyType:()=>IWe,Request:()=>cpr,Response:()=>upr,RubyGemsPublishInfo:()=>Mpr,SafeAndUnsafeString:()=>k2e,SingleBaseUrlEnvironment:()=>mpr,SingleBaseUrlEnvironments:()=>hpr,SingleDiscriminatedUnionType:()=>Tpr,SingleDiscriminatedUnionTypeNoProperties:()=>Cpr,SingleDiscriminatedUnionTypeObject:()=>wpr,SingleDiscriminatedUnionTypeSingleProperty:()=>Spr,SwiftPublishInfo:()=>Lpr,TypeId:()=>EY,TypeReference:()=>kFa,UndiscriminatedUnionType:()=>Dpr,Values:()=>CWe,VariableDeclaration:()=>kpr,WithDocs:()=>EWe,auth:()=>p6i,commons:()=>h6i,declaration:()=>A6i,endpoints:()=>N6i,environment:()=>G6i,http:()=>W6i,ir:()=>bLi,snippets:()=>xLi,types:()=>TLi,variables:()=>BLi});var zFa=h(()=>{"use strict";QFa()});var NP,F2e=h(()=>{"use strict";je();NP=D.string()});var Jpr,PLi=h(()=>{"use strict";je();hf();F2e();Jpr=D.objectWithoutOptionalProperties({id:NP,name:Io})});var vY,TWe=h(()=>{"use strict";je();vY=D.string()});var fye,CDt=h(()=>{"use strict";je();fye=D.string()});var OWe,Ypr=h(()=>{"use strict";je();hf();OWe=D.objectWithoutOptionalProperties({id:D.string(),name:Io,default:D.string().optional(),values:D.list(D.string()).optional()})});var Xpr,DLi=h(()=>{"use strict";je();hf();Gl();F2e();TWe();CDt();Ypr();Xpr=D.objectWithoutOptionalProperties({id:vY,name:Io,urls:D.record(NP,fye),audiences:D.list(D.string()).optional(),defaultUrls:D.record(NP,D.string()).optional(),urlTemplates:D.record(NP,D.string()).optional(),urlVariables:D.record(NP,D.list(OWe)).optional()}).extend(Xi)});var Zpr,RLi=h(()=>{"use strict";je();PLi();DLi();Zpr=D.objectWithoutOptionalProperties({baseUrls:D.list(Jpr),environments:D.list(Xpr)})});var $pr,kLi=h(()=>{"use strict";je();hf();Gl();TWe();CDt();Ypr();$pr=D.objectWithoutOptionalProperties({id:vY,name:Io,url:fye,audiences:D.list(D.string()).optional(),defaultUrl:D.string().optional(),urlTemplate:D.string().optional(),urlVariables:D.list(OWe).optional()}).extend(Xi)});var efr,FLi=h(()=>{"use strict";je();kLi();efr=D.objectWithoutOptionalProperties({environments:D.list($pr)})});var tfr,NLi=h(()=>{"use strict";Jr();je();RLi();FLi();tfr=D.union("type",{singleBaseUrl:efr,multipleBaseUrls:Zpr}).transform({transform:e=>{switch(e.type){case"singleBaseUrl":return o0.singleBaseUrl(e);case"multipleBaseUrls":return o0.multipleBaseUrls(e);default:return e}},untransform:({_visit:e,...t})=>t})});var rfr,jLi=h(()=>{"use strict";je();TWe();NLi();rfr=D.objectWithoutOptionalProperties({defaultEnvironment:vY.optional(),environments:tfr})});var QLi=h(()=>{"use strict";F2e();PLi();TWe();NLi();jLi();CDt();DLi();RLi();Ypr();kLi();FLi()});var zLi={};X(zLi,{EnvironmentBaseUrlId:()=>NP,EnvironmentBaseUrlWithId:()=>Jpr,EnvironmentId:()=>vY,EnvironmentUrl:()=>fye,Environments:()=>tfr,EnvironmentsConfig:()=>rfr,MultipleBaseUrlsEnvironment:()=>Xpr,MultipleBaseUrlsEnvironments:()=>Zpr,ServerVariable:()=>OWe,SingleBaseUrlEnvironment:()=>$pr,SingleBaseUrlEnvironments:()=>efr});var MFa=h(()=>{"use strict";QLi()});var dye,wDt=h(()=>{"use strict";je();bDt();D2e();hf();dye=D.objectWithoutOptionalProperties({errorId:cye,fernFilepath:TU,name:Io})});var jS,aue=h(()=>{"use strict";je();Wo();a7();yd();AY();B2e();jS=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),env:D.string().optional(),clientDefault:SU.optional(),defaultValue:D.unknown().optional(),v2Examples:NS.optional()}).extend(Fx)});var nfr,MLi=h(()=>{"use strict";je();Wo();hf();Gl();yWe();nfr=D.objectWithoutOptionalProperties({name:Io.optional(),shape:D.lazyObject(()=>_c)}).extend(bY).extend(Xi)});var ifr,LLi=h(()=>{"use strict";je();Wo();yd();Gl();AY();aue();wDt();MLi();ifr=D.objectWithoutOptionalProperties({name:dye,displayName:D.string().optional(),discriminantValue:fs,type:D.lazy(()=>Ps).optional(),statusCode:D.number(),isWildcardStatusCode:D.boolean().optional(),examples:D.list(nfr),v2Examples:NS.optional(),headers:D.list(jS).optional()}).extend(Xi)});var LFa,UFa=h(()=>{"use strict";Jr();je();yd();LFa=D.union("type",{property:D.object({value:fs}),statusCode:D.object({})}).transform({transform:e=>{switch(e.type){case"property":return eye.property(e.value);case"statusCode":return eye.statusCode();default:return e}},untransform:({_visit:e,...t})=>t})});var ULi=h(()=>{"use strict";wDt();LLi();UFa();MLi()});var VLi={};X(VLi,{DeclaredErrorName:()=>dye,ErrorDeclaration:()=>ifr,ErrorDeclarationDiscriminantValue:()=>LFa,ExampleError:()=>nfr});var VFa=h(()=>{"use strict";ULi()});var ofr,_Li=h(()=>{"use strict";je();ofr=D.objectWithoutOptionalProperties({username:D.string(),password:D.string()})});var sfr,GLi=h(()=>{"use strict";je();sfr=D.objectWithoutOptionalProperties({token:D.string()})});var afr,qLi=h(()=>{"use strict";je();afr=D.objectWithoutOptionalProperties({value:D.unknown()})});var cfr,WLi=h(()=>{"use strict";je();F2e();CDt();cfr=D.record(NP,fye)});var ufr,HLi=h(()=>{"use strict";je();ufr=D.objectWithoutOptionalProperties({clientId:D.string(),clientSecret:D.string()})});var BWe,lfr=h(()=>{"use strict";Jr();je();_Li();GLi();qLi();HLi();BWe=D.union("type",{basic:ofr,bearer:sfr,header:afr,oauth:ufr}).transform({transform:e=>{switch(e.type){case"basic":return EU.basic(e);case"bearer":return EU.bearer(e);case"header":return EU.header(e);case"oauth":return EU.oauth(e);default:return e}},untransform:({_visit:e,...t})=>t})});var pfr,KLi=h(()=>{"use strict";je();pfr=D.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var ffr,JLi=h(()=>{"use strict";je();KLi();ffr=D.objectWithoutOptionalProperties({method:pfr,path:D.string()})});var PWe,dfr=h(()=>{"use strict";je();TWe();WLi();PWe=D.undiscriminatedUnion([vY,cfr])});var mfr,YLi=h(()=>{"use strict";je();Gl();mfr=D.objectWithoutOptionalProperties({name:D.string().optional(),language:D.string(),code:D.string()}).extend(Xi)});var xY,hfr=h(()=>{"use strict";je();xY=D.record(D.string(),D.unknown())});var gfr,XLi=h(()=>{"use strict";je();Gl();lfr();JLi();dfr();hfr();gfr=D.objectWithoutOptionalProperties({endpoint:ffr,baseUrl:D.property("baseURL",D.string().optional()),environment:PWe.optional(),auth:BWe.optional(),pathParameters:xY.optional(),queryParameters:xY.optional(),headers:xY.optional(),requestBody:D.unknown().optional()}).extend(Xi)});var Afr,ZLi=h(()=>{"use strict";Jr();je();Afr=D.union("type",{error:D.object({value:D.unknown()}),json:D.object({value:D.unknown()}),stream:D.object({value:D.list(D.unknown())})}).transform({transform:e=>{switch(e.type){case"error":return Rx.error(e.value);case"json":return Rx.json(e.value);case"stream":return Rx.stream(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var yfr,$Li=h(()=>{"use strict";je();Gl();ZLi();yfr=D.objectWithoutOptionalProperties({statusCode:D.number().optional(),body:Afr.optional()}).extend(Xi)});var SDt,e3i=h(()=>{"use strict";je();YLi();XLi();$Li();SDt=D.objectWithoutOptionalProperties({displayName:D.string().optional(),contentType:D.string().optional(),request:gfr.optional(),response:yfr.optional(),codeSamples:D.list(mfr).optional()})});var bfr,t3i=h(()=>{"use strict";je();e3i();bfr=D.objectWithoutOptionalProperties({userSpecifiedExamples:D.record(D.string(),SDt),autogeneratedExamples:D.record(D.string(),SDt)})});var TDt,r3i=h(()=>{"use strict";je();TDt=D.objectWithoutOptionalProperties({name:D.string().optional(),payload:D.unknown()})});var Efr,n3i=h(()=>{"use strict";je();r3i();Efr=D.objectWithoutOptionalProperties({userSpecifiedExamples:D.record(D.string(),TDt),autogeneratedExamples:D.record(D.string(),TDt)})});var Ifr,i3i=h(()=>{"use strict";je();Ifr=D.objectWithoutOptionalProperties({path:D.string()})});var vfr,o3i=h(()=>{"use strict";je();vfr=D.objectWithoutOptionalProperties({type:D.string(),body:D.unknown()})});var ODt,s3i=h(()=>{"use strict";je();lfr();dfr();hfr();i3i();o3i();ODt=D.objectWithoutOptionalProperties({channel:Ifr,baseUrl:D.property("baseURL",D.string().optional()),environment:PWe.optional(),auth:BWe.optional(),pathParameters:xY.optional(),queryParameters:xY.optional(),headers:xY.optional(),messages:D.list(vfr).optional()})});var xfr,a3i=h(()=>{"use strict";je();s3i();xfr=D.objectWithoutOptionalProperties({autogeneratedExamples:D.record(D.string(),ODt),userSpecifiedExamples:D.record(D.string(),ODt)})});var ey,yj=h(()=>{"use strict";je();AY();ey=D.objectWithoutOptionalProperties({v2Examples:NS.optional()})});var c3i=h(()=>{"use strict";_Li();GLi();qLi();WLi();HLi();lfr();JLi();KLi();dfr();YLi();e3i();t3i();XLi();$Li();ZLi();CMi();AY();hfr();r3i();n3i();i3i();o3i();s3i();a3i();yj()});var u3i={};X(u3i,{BasicAuthValues:()=>ofr,BearerAuthValues:()=>sfr,HeaderAuthValues:()=>afr,MultipleEnvironmentUrlValues:()=>cfr,OAuthValues:()=>ufr,V2AuthValues:()=>BWe,V2EndpointLocation:()=>ffr,V2EndpointLocationHttpMethod:()=>pfr,V2EnvironmentValues:()=>PWe,V2HttpEndpointCodeSample:()=>mfr,V2HttpEndpointExample:()=>SDt,V2HttpEndpointExamples:()=>bfr,V2HttpEndpointRequest:()=>gfr,V2HttpEndpointResponse:()=>yfr,V2HttpEndpointResponseBody:()=>Afr,V2SchemaExample:()=>hDt,V2SchemaExamples:()=>NS,V2ValueExamples:()=>xY,V2WebSocketEndpointLocation:()=>Ifr,V2WebSocketMessageExample:()=>vfr,V2WebSocketSessionExample:()=>ODt,V2WebSocketSessionExamples:()=>xfr,V2WebhookExample:()=>TDt,V2WebhookExamples:()=>Efr,WithV2Examples:()=>ey});var _Fa=h(()=>{"use strict";c3i()});var Cfr,l3i=h(()=>{"use strict";je();Cfr=D.enum_(["MIT","Apache-2.0"])});var wfr,p3i=h(()=>{"use strict";je();l3i();wfr=D.objectWithoutOptionalProperties({id:Cfr})});var dE,CY=h(()=>{"use strict";je();dE=D.string()});var Sfr,f3i=h(()=>{"use strict";je();CY();Sfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),tokenEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var DWe,Tfr=h(()=>{"use strict";je();DWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),token:D.string(),packageName:D.string()})});var Ofr,d3i=h(()=>{"use strict";je();Ofr=D.objectWithoutOptionalProperties({filename:D.string()})});var Bfr,m3i=h(()=>{"use strict";je();Bfr=D.objectWithoutOptionalProperties({coordinatorUrl:D.string(),coordinatorUrlV2:D.string(),id:D.string()})});var Pfr,h3i=h(()=>{"use strict";Jr();je();m3i();Pfr=D.union(D.discriminant("type","_type"),{local:D.object({}),remote:Bfr}).transform({transform:e=>{switch(e.type){case"local":return tc.GeneratorEnvironment.local();case"remote":return tc.GeneratorEnvironment.remote(e);default:return e}},untransform:({_visit:e,...t})=>t})});var RWe,Dfr=h(()=>{"use strict";je();RWe=D.objectWithoutOptionalProperties({keyId:D.string(),password:D.string(),secretKey:D.string()})});var kWe,Rfr=h(()=>{"use strict";je();Dfr();kWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),username:D.string(),password:D.string(),coordinate:D.string(),signature:RWe.optional()})});var FWe,kfr=h(()=>{"use strict";je();FWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),token:D.string(),packageName:D.string()})});var NWe,Ffr=h(()=>{"use strict";je();NWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),apiKey:D.string(),packageName:D.string()})});var Nfr,g3i=h(()=>{"use strict";je();Nfr=D.objectWithoutOptionalProperties({apiKey:D.string(),workspaceId:D.string()})});var jfr,A3i=h(()=>{"use strict";je();jfr=D.objectWithoutOptionalProperties({name:D.string(),email:D.string()})});var Qfr,y3i=h(()=>{"use strict";je();A3i();Qfr=D.objectWithoutOptionalProperties({description:D.string().optional(),authors:D.list(jfr).optional()})});var jWe,zfr=h(()=>{"use strict";je();y3i();jWe=D.objectWithoutOptionalProperties({keywords:D.list(D.string()).optional(),documentationLink:D.string().optional(),homepageLink:D.string().optional()}).extend(Qfr)});var QWe,Mfr=h(()=>{"use strict";je();zfr();QWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),username:D.string(),password:D.string(),packageName:D.string(),pypiMetadata:jWe.optional()})});var zWe,Lfr=h(()=>{"use strict";je();zWe=D.objectWithoutOptionalProperties({registryUrl:D.string(),apiKey:D.string(),packageName:D.string()})});var Ufr,b3i=h(()=>{"use strict";Jr();je();Tfr();Rfr();kfr();Ffr();g3i();Mfr();Lfr();Ufr=D.union("type",{maven:kWe,npm:FWe,pypi:QWe,postman:Nfr,rubygems:zWe,nuget:NWe,crates:DWe}).transform({transform:e=>{switch(e.type){case"maven":return tc.GeneratorPublishTarget.maven(e);case"npm":return tc.GeneratorPublishTarget.npm(e);case"pypi":return tc.GeneratorPublishTarget.pypi(e);case"postman":return tc.GeneratorPublishTarget.postman(e);case"rubygems":return tc.GeneratorPublishTarget.rubygems(e);case"nuget":return tc.GeneratorPublishTarget.nuget(e);case"crates":return tc.GeneratorPublishTarget.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Vfr,E3i=h(()=>{"use strict";je();Dfr();Vfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),username:D.string(),password:D.string(),group:D.string(),signature:RWe.optional()})});var _fr,I3i=h(()=>{"use strict";je();_fr=D.objectWithoutOptionalProperties({registryUrl:D.string(),token:D.string(),scope:D.string()})});var Gfr,v3i=h(()=>{"use strict";je();E3i();I3i();Gfr=D.objectWithoutOptionalProperties({maven:Vfr,npm:_fr})});var qfr,x3i=h(()=>{"use strict";je();Tfr();Rfr();kfr();Ffr();Mfr();Lfr();qfr=D.objectWithoutOptionalProperties({maven:kWe,npm:FWe,pypi:QWe,rubygems:zWe,nuget:NWe,crates:DWe})});var MWe,Wfr=h(()=>{"use strict";je();b3i();v3i();x3i();MWe=D.objectWithoutOptionalProperties({registries:Gfr,registriesV2:qfr,publishTarget:Ufr.optional(),version:D.string()})});var Hfr,C3i=h(()=>{"use strict";je();CY();Hfr=D.objectWithoutOptionalProperties({keyIdEnvironmentVariable:dE,passwordEnvironmentVariable:dE,secretKeyEnvironmentVariable:dE})});var Kfr,w3i=h(()=>{"use strict";je();CY();C3i();Kfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),coordinate:D.string(),usernameEnvironmentVariable:dE,passwordEnvironmentVariable:dE,signature:Hfr.optional(),shouldGeneratePublishWorkflow:D.boolean().optional()})});var Jfr,S3i=h(()=>{"use strict";je();CY();Jfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),tokenEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var Yfr,T3i=h(()=>{"use strict";je();CY();Yfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),apiKeyEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var Xfr,O3i=h(()=>{"use strict";je();CY();Xfr=D.objectWithoutOptionalProperties({apiKeyEnvironmentVariable:dE,workspaceIdEnvironmentVariable:dE})});var Zfr,B3i=h(()=>{"use strict";je();CY();zfr();Zfr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),usernameEnvironmentVariable:dE,passwordEnvironmentVariable:dE,pypiMetadata:jWe.optional(),shouldGeneratePublishWorkflow:D.boolean().optional()})});var $fr,P3i=h(()=>{"use strict";je();CY();$fr=D.objectWithoutOptionalProperties({registryUrl:D.string(),packageName:D.string(),apiKeyEnvironmentVariable:dE,shouldGeneratePublishWorkflow:D.boolean().optional()})});var edr,D3i=h(()=>{"use strict";Jr();je();f3i();w3i();S3i();T3i();O3i();B3i();P3i();edr=D.union("type",{npm:Jfr,maven:Kfr,postman:Xfr,pypi:Zfr,rubygems:$fr,nuget:Yfr,crates:Sfr}).transform({transform:e=>{switch(e.type){case"npm":return tc.GithubPublishInfo.npm(e);case"maven":return tc.GithubPublishInfo.maven(e);case"postman":return tc.GithubPublishInfo.postman(e);case"pypi":return tc.GithubPublishInfo.pypi(e);case"rubygems":return tc.GithubPublishInfo.rubygems(e);case"nuget":return tc.GithubPublishInfo.nuget(e);case"crates":return tc.GithubPublishInfo.crates(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tdr,R3i=h(()=>{"use strict";je();D3i();tdr=D.objectWithoutOptionalProperties({version:D.string(),repoUrl:D.string(),installationToken:D.string().optional(),branch:D.string().optional(),publishInfo:edr.optional()})});var rdr,k3i=h(()=>{"use strict";Jr();je();Wfr();R3i();rdr=D.union("type",{publish:MWe,downloadFiles:D.object({}),github:tdr}).transform({transform:e=>{switch(e.type){case"publish":return tc.OutputMode.publish(e);case"downloadFiles":return tc.OutputMode.downloadFiles();case"github":return tc.OutputMode.github(e);default:return e}},untransform:({_visit:e,...t})=>t})});var ndr,F3i=h(()=>{"use strict";je();ndr=D.objectWithoutOptionalProperties({packageDescription:D.property("package_description",D.string().optional()),publisherEmail:D.property("publisher_email",D.string().optional()),referenceUrl:D.property("reference_url",D.string().optional()),publisherName:D.property("publisher_name",D.string().optional())})});var idr,N3i=h(()=>{"use strict";je();k3i();F3i();idr=D.objectWithoutOptionalProperties({path:D.string(),snippetFilepath:D.string().optional(),snippetTemplateFilepath:D.string().optional(),publishingMetadata:ndr.optional(),mode:rdr})});var odr,j3i=h(()=>{"use strict";Jr();je();p3i();d3i();odr=D.union("type",{basic:wfr,custom:Ofr}).transform({transform:e=>{switch(e.type){case"basic":return tc.LicenseConfig.basic(e);case"custom":return tc.LicenseConfig.custom(e);default:return e}},untransform:({_visit:e,...t})=>t})});var GFa,qFa=h(()=>{"use strict";je();h3i();N3i();Wfr();j3i();GFa=D.objectWithoutOptionalProperties({dryRun:D.boolean(),irFilepath:D.string(),originalReadmeFilepath:D.string().optional(),license:odr.optional(),output:idr,publish:MWe.optional(),workspaceName:D.string(),organization:D.string(),customConfig:D.unknown(),environment:Pfr,whitelabel:D.boolean(),writeUnitTests:D.boolean(),generatePaginatedClients:D.boolean().optional(),generateOauthClients:D.boolean()})});var Q3i=h(()=>{"use strict";p3i();f3i();Tfr();d3i();CY();qFa();h3i();N3i();Wfr();b3i();v3i();x3i();R3i();D3i();j3i();l3i();Dfr();C3i();w3i();E3i();Rfr();S3i();I3i();kfr();T3i();Ffr();y3i();A3i();k3i();g3i();O3i();F3i();B3i();zfr();Mfr();m3i();P3i();Lfr()});var z3i={};X(z3i,{BasicLicense:()=>wfr,CratesGithubPublishInfo:()=>Sfr,CratesRegistryConfig:()=>DWe,CustomLicense:()=>Ofr,EnvironmentVariable:()=>dE,GeneratorConfig:()=>GFa,GeneratorEnvironment:()=>Pfr,GeneratorOutputConfig:()=>idr,GeneratorPublishConfig:()=>MWe,GeneratorPublishTarget:()=>Ufr,GeneratorRegistriesConfig:()=>Gfr,GeneratorRegistriesConfigV2:()=>qfr,GithubOutputMode:()=>tdr,GithubPublishInfo:()=>edr,LicenseConfig:()=>odr,LicenseId:()=>Cfr,MavenCentralSignature:()=>RWe,MavenCentralSignatureGithubInfo:()=>Hfr,MavenGithubPublishInfo:()=>Kfr,MavenRegistryConfig:()=>Vfr,MavenRegistryConfigV2:()=>kWe,NpmGithubPublishInfo:()=>Jfr,NpmRegistryConfig:()=>_fr,NpmRegistryConfigV2:()=>FWe,NugetGithubPublishInfo:()=>Yfr,NugetRegistryConfig:()=>NWe,OutputMetadata:()=>Qfr,OutputMetadataAuthor:()=>jfr,OutputMode:()=>rdr,PostmanConfig:()=>Nfr,PostmanGithubPublishInfo:()=>Xfr,PublishingMetadata:()=>ndr,PypiGithubPublishInfo:()=>Zfr,PypiMetadata:()=>jWe,PypiRegistryConfig:()=>QWe,RemoteGeneratorEnvironment:()=>Bfr,RubyGemsGithubPublishInfo:()=>$fr,RubyGemsRegistryConfig:()=>zWe});var WFa=h(()=>{"use strict";Q3i()});var HFa=h(()=>{"use strict";WFa();Q3i()});var M3i={};X(M3i,{BasicLicense:()=>wfr,CratesGithubPublishInfo:()=>Sfr,CratesRegistryConfig:()=>DWe,CustomLicense:()=>Ofr,EnvironmentVariable:()=>dE,GeneratorConfig:()=>GFa,GeneratorEnvironment:()=>Pfr,GeneratorOutputConfig:()=>idr,GeneratorPublishConfig:()=>MWe,GeneratorPublishTarget:()=>Ufr,GeneratorRegistriesConfig:()=>Gfr,GeneratorRegistriesConfigV2:()=>qfr,GithubOutputMode:()=>tdr,GithubPublishInfo:()=>edr,LicenseConfig:()=>odr,LicenseId:()=>Cfr,MavenCentralSignature:()=>RWe,MavenCentralSignatureGithubInfo:()=>Hfr,MavenGithubPublishInfo:()=>Kfr,MavenRegistryConfig:()=>Vfr,MavenRegistryConfigV2:()=>kWe,NpmGithubPublishInfo:()=>Jfr,NpmRegistryConfig:()=>_fr,NpmRegistryConfigV2:()=>FWe,NugetGithubPublishInfo:()=>Yfr,NugetRegistryConfig:()=>NWe,OutputMetadata:()=>Qfr,OutputMetadataAuthor:()=>jfr,OutputMode:()=>rdr,PostmanConfig:()=>Nfr,PostmanGithubPublishInfo:()=>Xfr,PublishingMetadata:()=>ndr,PypiGithubPublishInfo:()=>Zfr,PypiMetadata:()=>jWe,PypiRegistryConfig:()=>QWe,RemoteGeneratorEnvironment:()=>Bfr,RubyGemsGithubPublishInfo:()=>$fr,RubyGemsRegistryConfig:()=>zWe,config:()=>z3i});var KFa=h(()=>{"use strict";HFa()});var L3i=h(()=>{"use strict";vpr();K6i();Epr();J6i()});var U3i={};X(U3i,{GlobalParameter:()=>SWe,GlobalParameterApplyMode:()=>bpr,GlobalParameterId:()=>wWe,GlobalParameterLocation:()=>Ipr});var JFa=h(()=>{"use strict";L3i()});var N2e,sdr=h(()=>{"use strict";je();Wo();yd();N2e=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var mye,adr=h(()=>{"use strict";je();Wo();hf();mye=D.objectWithoutOptionalProperties({name:Io,value:D.lazyObject(()=>_c)})});var cdr,V3i=h(()=>{"use strict";Jr();je();cdr=D.union("type",{single:D.object({}),exploded:D.object({}),commaSeparated:D.object({})}).transform({transform:e=>{switch(e.type){case"single":return lw.single();case"exploded":return lw.exploded();case"commaSeparated":return lw.commaSeparated();default:return e}},untransform:({_visit:e,...t})=>t})});var LWe,udr=h(()=>{"use strict";je();Wo();yd();V3i();LWe=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c),shape:cdr.optional()})});var ldr,_3i=h(()=>{"use strict";je();Wo();yd();ldr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var ty,bj=h(()=>{"use strict";je();yDt();D2e();hf();oue();ty=D.objectWithoutOptionalProperties({typeId:PO,fernFilepath:TU,name:Io,displayName:aye.optional()})});var pdr,G3i=h(()=>{"use strict";je();Wo();yd();bj();pdr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c),originalTypeDeclaration:ty.optional()})});var UWe,fdr=h(()=>{"use strict";je();yWe();_3i();G3i();UWe=D.objectWithoutOptionalProperties({properties:D.list(pdr),extraProperties:D.list(ldr).optional()}).extend(bY)});var ddr,q3i=h(()=>{"use strict";Jr();je();Wo();fdr();ddr=D.union("type",{inlinedRequestBody:UWe,reference:D.lazyObject(()=>_c)}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return DP.inlinedRequestBody(e);case"reference":return DP.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var mdr,W3i=h(()=>{"use strict";je();Wo();wDt();mdr=D.objectWithoutOptionalProperties({error:dye,body:D.lazyObject(()=>_c).optional()})});var hdr,H3i=h(()=>{"use strict";je();Wo();hdr=D.objectWithoutOptionalProperties({event:D.string(),data:D.lazyObject(()=>_c)})});var gdr,K3i=h(()=>{"use strict";Jr();je();Wo();H3i();gdr=D.union("type",{body:D.object({value:D.lazyObject(()=>_c).optional()}),stream:D.object({value:D.list(D.lazyObject(()=>_c))}),sse:D.object({value:D.list(hdr)})}).transform({transform:e=>{switch(e.type){case"body":return CA.body(e.value);case"stream":return CA.stream(e.value);case"sse":return CA.sse(e.value);default:return e}},untransform:({_visit:e,...t})=>t})});var Adr,J3i=h(()=>{"use strict";Jr();je();W3i();K3i();Adr=D.union("type",{ok:D.object({value:gdr}),error:mdr}).transform({transform:e=>{switch(e.type){case"ok":return Ig.ok(e.value);case"error":return Ig.error(e);default:return e}},untransform:({_visit:e,...t})=>t})});var VWe,ydr=h(()=>{"use strict";je();hf();Gl();sdr();adr();udr();q3i();J3i();VWe=D.objectWithoutOptionalProperties({id:D.string().optional(),name:Io.optional(),url:D.string(),rootPathParameters:D.list(mye),servicePathParameters:D.list(mye),endpointPathParameters:D.list(mye),serviceHeaders:D.list(N2e),endpointHeaders:D.list(N2e),queryParameters:D.list(LWe),request:ddr.optional(),response:Adr}).extend(Xi)});var bdr,Y3i=h(()=>{"use strict";je();ydr();bdr=D.objectWithoutOptionalProperties({example:VWe})});var _We,Edr=h(()=>{"use strict";je();R2e();Gl();yj();_We=D.objectWithoutOptionalProperties({isOptional:D.boolean()}).extend(Xi).extend(ey).extend(OU)});var GWe,Idr=h(()=>{"use strict";je();Gl();yj();GWe=D.objectWithoutOptionalProperties({}).extend(Xi).extend(ey)});var vdr,X3i=h(()=>{"use strict";je();P2e();yY();vdr=D.objectWithoutOptionalProperties({page:kP,next:c0,results:c0})});var xdr,Z3i=h(()=>{"use strict";je();yY();xdr=D.objectWithoutOptionalProperties({results:c0})});var Cdr,$3i=h(()=>{"use strict";je();D2e();Cdr=D.objectWithoutOptionalProperties({fernFilepath:TU})});var wdr,e4i=h(()=>{"use strict";hf();wdr=Io});var Sdr,t4i=h(()=>{"use strict";je();hf();Gl();Sdr=D.objectWithoutOptionalProperties({name:Io.optional(),language:D.string(),code:D.string(),install:D.string().optional()}).extend(Xi)});var hye,BDt=h(()=>{"use strict";je();hye=D.enum_(["curl","python","javascript","typescript","go","ruby","csharp","java","php","rust","swift"])});var Tdr,r4i=h(()=>{"use strict";je();hf();Gl();BDt();Tdr=D.objectWithoutOptionalProperties({name:Io.optional(),sdk:hye,code:D.string()}).extend(Xi)});var Odr,n4i=h(()=>{"use strict";Jr();je();t4i();r4i();Odr=D.union("type",{language:Sdr,sdk:Tdr}).transform({transform:e=>{switch(e.type){case"language":return q6.language(e);case"sdk":return q6.sdk(e);default:return e}},untransform:({_visit:e,...t})=>t})});var qWe,Bdr=h(()=>{"use strict";je();Gl();yj();qWe=D.objectWithoutOptionalProperties({}).extend(Xi).extend(ey)});var Pdr,i4i=h(()=>{"use strict";je();yd();Gl();Pdr=D.objectWithoutOptionalProperties({key:fs,isOptional:D.boolean(),contentType:D.string().optional()}).extend(Xi)});var Ddr,o4i=h(()=>{"use strict";je();yd();Gl();Ddr=D.objectWithoutOptionalProperties({key:fs,isOptional:D.boolean(),contentType:D.string().optional()}).extend(Xi)});var Rdr,s4i=h(()=>{"use strict";Jr();je();i4i();o4i();Rdr=D.union("type",{file:Ddr,fileArray:Pdr}).transform({transform:e=>{switch(e.type){case"file":return mj.file(e);case"fileArray":return mj.fileArray(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kdr,a4i=h(()=>{"use strict";je();kdr=D.enum_(["exploded","json","form"])});var WWe,Fdr=h(()=>{"use strict";je();Wo();yd();IDt();AY();gDt();WWe=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps),defaultValue:D.unknown().optional(),v2Examples:NS.optional(),propertyAccess:oye.optional()}).extend(uye)});var Ndr,c4i=h(()=>{"use strict";je();R2e();a4i();Fdr();Ndr=D.objectWithoutOptionalProperties({style:kdr.optional()}).extend(WWe).extend(OU)});var jdr,u4i=h(()=>{"use strict";Jr();je();s4i();c4i();jdr=D.union("type",{file:D.object({value:Rdr}),bodyProperty:Ndr}).transform({transform:e=>{switch(e.type){case"file":return kx.file(e.value);case"bodyProperty":return kx.bodyProperty(e);default:return e}},untransform:({_visit:e,...t})=>t})});var HWe,Qdr=h(()=>{"use strict";je();hf();R2e();Gl();yj();u4i();HWe=D.objectWithoutOptionalProperties({name:Io,properties:D.list(jdr)}).extend(Xi).extend(ey).extend(OU)});var zdr,l4i=h(()=>{"use strict";je();zdr=D.objectWithoutOptionalProperties({namespace:D.string()})});var Mdr,p4i=h(()=>{"use strict";je();l4i();Mdr=D.objectWithoutOptionalProperties({csharp:zdr.optional()})});var KWe,Ldr=h(()=>{"use strict";je();p4i();KWe=D.objectWithoutOptionalProperties({filepath:D.string(),packageName:D.string().optional(),options:Mdr.optional()})});var Udr,f4i=h(()=>{"use strict";je();hf();Ldr();Udr=D.objectWithoutOptionalProperties({file:KWe,name:Io})});var Vdr,d4i=h(()=>{"use strict";je();f4i();Vdr=D.objectWithoutOptionalProperties({service:Udr})});var _dr,m4i=h(()=>{"use strict";je();olr();MMi();_dr=D.record(uWe,D.list(Slr))});var Gdr,h4i=h(()=>{"use strict";je();Gdr=D.enum_(["UNARY","CLIENT_STREAM","SERVER_STREAM","BIDIRECTIONAL_STREAM"])});var qdr,g4i=h(()=>{"use strict";je();h4i();qdr=D.objectWithoutOptionalProperties({methodType:Gdr.optional()})});var Wdr,A4i=h(()=>{"use strict";Jr();je();g4i();Wdr=D.union("type",{proto:qdr,openapi:D.object({}),openrpc:D.object({})}).transform({transform:e=>{switch(e.type){case"proto":return RP.proto(e);case"openapi":return RP.openapi();case"openrpc":return RP.openrpc();default:return e}},untransform:({_visit:e,...t})=>t})});var JWe,Hdr=h(()=>{"use strict";je();JWe=D.enum_(["GET","POST","PUT","PATCH","DELETE","HEAD"])});var Kdr,y4i=h(()=>{"use strict";je();Kdr=D.objectWithoutOptionalProperties({pathParameter:D.string(),tail:D.string()})});var BU,YWe=h(()=>{"use strict";je();y4i();BU=D.objectWithoutOptionalProperties({head:D.string(),parts:D.list(Kdr)})});var XWe,Jdr=h(()=>{"use strict";je();Wo();R2e();Gl();yj();XWe=D.objectWithoutOptionalProperties({requestBodyType:D.lazy(()=>Ps)}).extend(Xi).extend(OU).extend(ey)});var Ydr,b4i=h(()=>{"use strict";je();hf();R2e();Gl();yj();bj();iue();Fdr();Ydr=D.objectWithoutOptionalProperties({name:Io,extends:D.list(ty),properties:D.list(WWe),extendedProperties:D.list(BO).optional(),extraProperties:D.property("extra-properties",D.boolean())}).extend(Xi).extend(ey).extend(OU)});var ZWe,Xdr=h(()=>{"use strict";Jr();je();Edr();Qdr();Jdr();b4i();ZWe=D.union("type",{inlinedRequestBody:Ydr,reference:XWe,fileUpload:HWe,bytes:_We}).transform({transform:e=>{switch(e.type){case"inlinedRequestBody":return Hf.inlinedRequestBody(e);case"reference":return Hf.reference(e);case"fileUpload":return Hf.fileUpload(e);case"bytes":return Hf.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Zdr,E4i=h(()=>{"use strict";je();Wo();Gl();yj();Zdr=D.objectWithoutOptionalProperties({responseBodyType:D.lazy(()=>Ps)}).extend(Xi).extend(ey)});var $dr,I4i=h(()=>{"use strict";je();Wo();Gl();yj();iue();$dr=D.objectWithoutOptionalProperties({responseBodyType:D.lazy(()=>Ps),responseProperty:BO.optional()}).extend(Xi).extend(ey)});var $We,emr=h(()=>{"use strict";Jr();je();E4i();I4i();$We=D.union("type",{response:Zdr,nestedPropertyAsResponse:$dr}).transform({transform:e=>{switch(e.type){case"response":return fE.response(e);case"nestedPropertyAsResponse":return fE.nestedPropertyAsResponse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tmr,v4i=h(()=>{"use strict";je();Wo();Gl();yj();tmr=D.objectWithoutOptionalProperties({payload:D.lazy(()=>Ps),terminator:D.string().optional()}).extend(Xi).extend(ey)});var rmr,x4i=h(()=>{"use strict";je();Wo();Gl();yj();rmr=D.objectWithoutOptionalProperties({payload:D.lazy(()=>Ps),terminator:D.string().optional(),resumable:D.boolean().optional()}).extend(Xi).extend(ey)});var nmr,C4i=h(()=>{"use strict";je();Gl();yj();nmr=D.objectWithoutOptionalProperties({}).extend(Xi).extend(ey)});var eHe,imr=h(()=>{"use strict";Jr();je();v4i();x4i();C4i();eHe=D.union("type",{json:tmr,text:nmr,sse:rmr}).transform({transform:e=>{switch(e.type){case"json":return mI.json(e);case"text":return mI.text(e);case"sse":return mI.sse(e);default:return e}},untransform:({_visit:e,...t})=>t})});var tHe,omr=h(()=>{"use strict";je();Gl();yj();tHe=D.objectWithoutOptionalProperties({contentType:D.string().optional()}).extend(Xi).extend(ey)});var smr,w4i=h(()=>{"use strict";Jr();je();Idr();Bdr();emr();omr();smr=D.union("type",{json:D.object({value:$We}),fileDownload:qWe,text:tHe,bytes:GWe}).transform({transform:e=>{switch(e.type){case"json":return CO.json(e.value);case"fileDownload":return CO.fileDownload(e);case"text":return CO.text(e);case"bytes":return CO.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var amr,S4i=h(()=>{"use strict";je();w4i();imr();amr=D.objectWithoutOptionalProperties({nonStreamResponse:smr,streamResponse:eHe})});var cmr,T4i=h(()=>{"use strict";Jr();je();Idr();Bdr();emr();imr();S4i();omr();cmr=D.union("type",{json:D.object({value:$We}),fileDownload:qWe,text:tHe,bytes:GWe,streaming:D.object({value:eHe}),streamParameter:amr}).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 gye,PDt=h(()=>{"use strict";je();Gl();T4i();gye=D.objectWithoutOptionalProperties({statusCode:D.property("status-code",D.number().optional()),isWildcardStatusCode:D.boolean().optional(),body:cmr.optional()}).extend(Xi)});var umr,O4i=h(()=>{"use strict";je();P2e();yY();umr=D.objectWithoutOptionalProperties({page:kP,results:c0,hasNextPage:c0.optional(),step:kP.optional()})});var lmr,B4i=h(()=>{"use strict";je();yY();lmr=D.objectWithoutOptionalProperties({nextPath:c0,results:c0})});var pmr,P4i=h(()=>{"use strict";je();yY();pmr=D.objectWithoutOptionalProperties({nextUri:c0,results:c0})});var fmr,D4i=h(()=>{"use strict";Jr();je();X3i();Z3i();O4i();B4i();P4i();fmr=D.union("type",{cursor:vdr,offset:umr,custom:xdr,uri:pmr,path:lmr}).transform({transform:e=>{switch(e.type){case"cursor":return s0.cursor(e);case"offset":return s0.offset(e);case"custom":return s0.custom(e);case"uri":return s0.uri(e);case"path":return s0.path(e);default:return e}},untransform:({_visit:e,...t})=>t})});var rHe,dmr=h(()=>{"use strict";je();rHe=D.string()});var mmr,R4i=h(()=>{"use strict";je();mmr=D.enum_(["ROOT","SERVICE","ENDPOINT"])});var u7,nHe=h(()=>{"use strict";je();Wo();hf();Gl();AY();B2e();dmr();R4i();u7=D.objectWithoutOptionalProperties({name:Io,valueType:D.lazy(()=>Ps),location:mmr,variable:rHe.optional(),clientDefault:SU.optional(),v2Examples:NS.optional(),explode:D.boolean().optional()}).extend(Xi)});var hmr,k4i=h(()=>{"use strict";je();Gl();wDt();hmr=D.objectWithoutOptionalProperties({error:dye}).extend(Xi)});var gmr,F4i=h(()=>{"use strict";je();k4i();gmr=D.list(hmr)});var Amr,N4i=h(()=>{"use strict";je();Amr=D.objectWithoutOptionalProperties({disabled:D.boolean().optional()})});var ymr,j4i=h(()=>{"use strict";je();N4i();ymr=D.undiscriminatedUnion([Amr])});var bmr,Q4i=h(()=>{"use strict";Jr();je();Edr();Jdr();bmr=D.union("type",{typeReference:XWe,bytes:_We}).transform({transform:e=>{switch(e.type){case"typeReference":return Zq.typeReference(e);case"bytes":return Zq.bytes(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Emr,z4i=h(()=>{"use strict";je();hf();Emr=D.objectWithoutOptionalProperties({wrapperName:Io,bodyKey:Io,includePathParameters:D.boolean().optional(),onlyPathParameters:D.boolean().optional()})});var Imr,M4i=h(()=>{"use strict";Jr();je();Q4i();z4i();Imr=D.union("type",{justRequestBody:D.object({value:bmr}),wrapper:Emr}).transform({transform:e=>{switch(e.type){case"justRequestBody":return IU.justRequestBody(e.value);case"wrapper":return IU.wrapper(e);default:return e}},untransform:({_visit:e,...t})=>t})});var vmr,L4i=h(()=>{"use strict";je();hf();P2e();M4i();vmr=D.objectWithoutOptionalProperties({streamParameter:kP.optional(),requestParameterName:Io,shape:Imr})});var iHe,xmr=h(()=>{"use strict";Jr();je();d4i();iHe=D.union("type",{http:D.object({}),grpc:Vdr}).transform({transform:e=>{switch(e.type){case"http":return vU.http();case"grpc":return vU.grpc(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Cmr,U4i=h(()=>{"use strict";je();n4i();ydr();Cmr=D.objectWithoutOptionalProperties({codeSamples:D.list(Odr).optional(),example:VWe.optional()})});var wmr,V4i=h(()=>{"use strict";je();Xdr();wmr=D.objectWithoutOptionalProperties({requestBodies:D.list(ZWe).optional()})});var Smr,_4i=h(()=>{"use strict";je();PDt();Smr=D.objectWithoutOptionalProperties({responses:D.list(gye).optional()})});var Tmr,G4i=h(()=>{"use strict";je();nlr();a7();dDt();F2e();t3i();Epr();Y3i();e4i();m4i();A4i();aue();Hdr();YWe();Xdr();PDt();D4i();nHe();ADt();F4i();j4i();L4i();xmr();U4i();V4i();_4i();Tmr=D.objectWithoutOptionalProperties({id:nue,name:wdr,displayName:D.string().optional(),subtitle:D.string().optional(),method:JWe,headers:D.list(jS),responseHeaders:D.list(jS).optional(),baseUrl:NP.optional(),v2BaseUrls:D.list(NP).optional(),basePath:BU.optional(),path:BU,fullPath:BU,pathParameters:D.list(u7),allPathParameters:D.list(u7),queryParameters:D.list(sye),requestBody:ZWe.optional(),v2RequestBodies:wmr.optional(),sdkRequest:vmr.optional(),response:gye.optional(),v2Responses:Smr.optional(),errors:gmr,auth:D.boolean(),security:D.list(_dr).optional(),idempotent:D.boolean(),pagination:fmr.optional(),userSpecifiedExamples:D.list(Cmr),autogeneratedExamples:D.list(bdr),v2Examples:bfr.optional(),transport:iHe.optional(),source:Wdr.optional(),audiences:D.list(aWe).optional(),retries:ymr.optional(),globalParameters:D.list(wWe).optional(),apiPlayground:D.boolean().optional()}).extend(Fx)});var Omr,q4i=h(()=>{"use strict";je();Omr=D.objectWithoutOptionalProperties({})});var Bmr,W4i=h(()=>{"use strict";je();Bmr=D.objectWithoutOptionalProperties({})});var oHe,Pmr=h(()=>{"use strict";je();q4i();W4i();oHe=D.objectWithoutOptionalProperties({json:Omr.optional(),proto:Bmr.optional()})});var Dmr,H4i=h(()=>{"use strict";je();nlr();dWe();Pmr();$3i();G4i();aue();YWe();nHe();xmr();Dmr=D.objectWithoutOptionalProperties({availability:gY.optional(),name:Cdr,displayName:D.string().optional(),basePath:BU,endpoints:D.list(Tmr),headers:D.list(jS),pathParameters:D.list(u7),encoding:oHe.optional(),transport:iHe.optional(),audiences:D.list(aWe).optional()})});var K4i=h(()=>{"use strict";Y3i();Edr();Idr();X3i();Z3i();$3i();e4i();n4i();t4i();r4i();ydr();W3i();K3i();sdr();fdr();_3i();G3i();adr();udr();V3i();q3i();J3i();H3i();Bdr();s4i();i4i();o4i();c4i();a4i();Qdr();u4i();d4i();G4i();m4i();A4i();aue();Hdr();YWe();y4i();Xdr();Jdr();PDt();T4i();H4i();b4i();Fdr();emr();E4i();I4i();v4i();w4i();O4i();D4i();B4i();nHe();R4i();llr();g4i();ADt();P2e();OMi();k4i();F4i();yY();j4i();N4i();L4i();Q4i();M4i();z4i();x4i();imr();S4i();BDt();omr();C4i();xmr();P4i();U4i();V4i();_4i()});var J4i={};X(J4i,{AutogeneratedEndpointExample:()=>bdr,BytesRequest:()=>_We,BytesResponse:()=>GWe,CursorPagination:()=>vdr,CustomPagination:()=>xdr,DeclaredServiceName:()=>Cdr,EndpointName:()=>wdr,ExampleCodeSample:()=>Odr,ExampleCodeSampleLanguage:()=>Sdr,ExampleCodeSampleSdk:()=>Tdr,ExampleEndpointCall:()=>VWe,ExampleEndpointErrorResponse:()=>mdr,ExampleEndpointSuccessResponse:()=>gdr,ExampleHeader:()=>N2e,ExampleInlinedRequestBody:()=>UWe,ExampleInlinedRequestBodyExtraProperty:()=>ldr,ExampleInlinedRequestBodyProperty:()=>pdr,ExamplePathParameter:()=>mye,ExampleQueryParameter:()=>LWe,ExampleQueryParameterShape:()=>cdr,ExampleRequestBody:()=>ddr,ExampleResponse:()=>Adr,ExampleServerSideEvent:()=>hdr,FileDownloadResponse:()=>qWe,FileProperty:()=>Rdr,FilePropertyArray:()=>Pdr,FilePropertySingle:()=>Ddr,FileUploadBodyProperty:()=>Ndr,FileUploadBodyPropertyEncoding:()=>kdr,FileUploadRequest:()=>HWe,FileUploadRequestProperty:()=>jdr,GrpcTransport:()=>Vdr,HttpEndpoint:()=>Tmr,HttpEndpointSecurityItem:()=>_dr,HttpEndpointSource:()=>Wdr,HttpHeader:()=>jS,HttpMethod:()=>JWe,HttpPath:()=>BU,HttpPathPart:()=>Kdr,HttpRequestBody:()=>ZWe,HttpRequestBodyReference:()=>XWe,HttpResponse:()=>gye,HttpResponseBody:()=>cmr,HttpService:()=>Dmr,InlinedRequestBody:()=>Ydr,InlinedRequestBodyProperty:()=>WWe,JsonResponse:()=>$We,JsonResponseBody:()=>Zdr,JsonResponseBodyWithProperty:()=>$dr,JsonStreamChunk:()=>tmr,NonStreamHttpResponseBody:()=>smr,OffsetPagination:()=>umr,Pagination:()=>fmr,PathPagination:()=>lmr,PathParameter:()=>u7,PathParameterLocation:()=>mmr,PropertyPathItem:()=>mWe,ProtoSourceInfo:()=>qdr,QueryParameter:()=>sye,RequestProperty:()=>kP,RequestPropertyValue:()=>hlr,ResponseError:()=>hmr,ResponseErrors:()=>gmr,ResponseProperty:()=>c0,RetriesConfiguration:()=>ymr,RetriesDisabledSchema:()=>Amr,SdkRequest:()=>vmr,SdkRequestBodyType:()=>bmr,SdkRequestShape:()=>Imr,SdkRequestWrapper:()=>Emr,SseStreamChunk:()=>rmr,StreamParameterResponse:()=>amr,StreamingResponse:()=>eHe,SupportedSdkLanguage:()=>hye,TextResponse:()=>tHe,TextStreamChunk:()=>nmr,Transport:()=>iHe,UriPagination:()=>pmr,UserSpecifiedEndpointExample:()=>Cmr,V2HttpRequestBodies:()=>wmr,V2HttpResponses:()=>Smr});var YFa=h(()=>{"use strict";K4i()});var Rmr,Y4i=h(()=>{"use strict";je();Rmr=D.string()});var kmr,X4i=h(()=>{"use strict";je();Y4i();kmr=D.objectWithoutOptionalProperties({id:Rmr,protoRootUrl:D.string()})});var Fmr,Z4i=h(()=>{"use strict";Jr();je();X4i();Fmr=D.union("type",{proto:kmr,openapi:D.object({})}).transform({transform:e=>{switch(e.type){case"proto":return hj.proto(e);case"openapi":return hj.openapi();default:return e}},untransform:({_visit:e,...t})=>t})});var cue,DDt=h(()=>{"use strict";je();a7();yd();cue=D.objectWithoutOptionalProperties({name:fs}).extend(Fx)});var sHe,Nmr=h(()=>{"use strict";je();DDt();sHe=D.objectWithoutOptionalProperties({default:cue.optional(),values:D.list(cue),forwardCompatible:D.boolean().optional()})});var jmr,$4i=h(()=>{"use strict";je();aue();Nmr();jmr=D.objectWithoutOptionalProperties({header:jS,value:sHe})});var Qmr,eUi=h(()=>{"use strict";Jr();je();$4i();Qmr=D.union("type",{header:jmr}).transform({transform:e=>e.type==="header"?tye.header(e):e,untransform:({_visit:e,...t})=>t})});var zmr,tUi=h(()=>{"use strict";je();BDt();zmr=D.objectWithoutOptionalProperties({generationLanguage:hye.optional(),keywords:D.list(D.string()).optional(),smartCasing:D.boolean(),smartCasingDigitWordBoundary:D.boolean().optional()})});var Mmr,rUi=h(()=>{"use strict";je();yd();Mmr=D.objectWithoutOptionalProperties({discriminant:fs,contentProperty:fs})});var Lmr,nUi=h(()=>{"use strict";Jr();je();rUi();Lmr=D.union("type",{statusCode:D.object({}),property:Mmr}).transform({transform:e=>{switch(e.type){case"statusCode":return H6.statusCode();case"property":return H6.property(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Umr,iUi=h(()=>{"use strict";je();Umr=D.enum_(["minimal","comprehensive"])});var Vmr,oUi=h(()=>{"use strict";je();Vmr=D.enum_(["autopilot","autorelease","ci","manual"])});var _mr,sUi=h(()=>{"use strict";je();oUi();_mr=D.objectWithoutOptionalProperties({cliVersion:D.string(),generatorName:D.string(),generatorVersion:D.string(),generatorConfig:D.unknown().optional(),originGitCommit:D.string().optional(),originGitCommitIsDirty:D.boolean().optional(),invokedBy:Vmr.optional(),requestedVersion:D.string().optional(),ciProvider:D.string().optional()})});var Gmr,aUi=h(()=>{"use strict";je();Hdr();Gmr=D.objectWithoutOptionalProperties({headerName:D.string(),methods:D.list(JWe)})});var qmr,cUi=h(()=>{"use strict";je();qmr=D.objectWithoutOptionalProperties({version:D.string().optional(),packageName:D.string().optional()})});var Wmr,uUi=h(()=>{"use strict";je();Wmr=D.objectWithoutOptionalProperties({version:D.string().optional(),modulePath:D.string().optional()})});var Hmr,lUi=h(()=>{"use strict";je();Hmr=D.objectWithoutOptionalProperties({coordinate:D.string().optional(),version:D.string().optional(),usernameEnvironmentVariable:D.string(),passwordEnvironmentVariable:D.string(),mavenUrlEnvironmentVariable:D.string()})});var Kmr,pUi=h(()=>{"use strict";je();Kmr=D.objectWithoutOptionalProperties({version:D.string().optional(),packageName:D.string().optional(),tokenEnvironmentVariable:D.string()})});var Jmr,fUi=h(()=>{"use strict";je();Jmr=D.objectWithoutOptionalProperties({apiKey:D.string(),workspaceId:D.string(),collectionId:D.string().optional()})});var Ymr,dUi=h(()=>{"use strict";je();Ymr=D.objectWithoutOptionalProperties({version:D.string().optional(),packageName:D.string().optional()})});var Aye,RDt=h(()=>{"use strict";Jr();je();cUi();uUi();lUi();pUi();fUi();dUi();Aye=D.union("type",{postman:Jmr,npm:Kmr,maven:Hmr,pypi:Ymr,crates:qmr,go:Wmr}).transform({transform:e=>{switch(e.type){case"postman":return yb.postman(e);case"npm":return yb.npm(e);case"maven":return yb.maven(e);case"pypi":return yb.pypi(e);case"crates":return yb.crates(e);case"go":return yb.go(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Xmr,mUi=h(()=>{"use strict";je();RDt();Xmr=D.objectWithoutOptionalProperties({target:Aye})});var Zmr,hUi=h(()=>{"use strict";je();RDt();Zmr=D.objectWithoutOptionalProperties({generateFullProject:D.boolean(),publishTarget:Aye.optional()})});var $mr,gUi=h(()=>{"use strict";je();RDt();$mr=D.objectWithoutOptionalProperties({owner:D.string(),repo:D.string(),uri:D.string().optional(),token:D.string().optional(),mode:D.stringLiteral("pull-request").optional(),branch:D.string().optional(),target:Aye})});var ehr,AUi=h(()=>{"use strict";Jr();je();mUi();hUi();gUi();ehr=D.union("type",{github:$mr,direct:Xmr,filesystem:Zmr}).transform({transform:e=>{switch(e.type){case"github":return lY.github(e);case"direct":return lY.direct(e);case"filesystem":return lY.filesystem(e);default:return e}},untransform:({_visit:e,...t})=>t})});var kDt,yUi=h(()=>{"use strict";je();Wo();hf();Gl();yWe();kDt=D.objectWithoutOptionalProperties({name:Io.optional(),shape:D.lazy(()=>aHe)}).extend(bY).extend(Xi)});var thr,bUi=h(()=>{"use strict";je();hf();Ldr();thr=D.objectWithoutOptionalProperties({file:KWe,name:Io})});var rhr,EUi=h(()=>{"use strict";Jr();je();rhr=D.union("type",{any:D.object({}),api:D.object({}),boolValue:D.object({}),bytesValue:D.object({}),doubleValue:D.object({}),duration:D.object({}),empty:D.object({}),enum:D.object({}),enumValue:D.object({}),field:D.object({}),fieldCardinality:D.object({}),fieldKind:D.object({}),fieldMask:D.object({}),floatValue:D.object({}),int32Value:D.object({}),int64Value:D.object({}),listValue:D.object({}),method:D.object({}),mixin:D.object({}),nullValue:D.object({}),option:D.object({}),sourceContext:D.object({}),stringValue:D.object({}),struct:D.object({}),syntax:D.object({}),timestamp:D.object({}),type:D.object({}),uint32Value:D.object({}),uint64Value:D.object({}),value:D.object({})}).transform({transform:e=>{switch(e.type){case"any":return fi.any();case"api":return fi.api();case"boolValue":return fi.boolValue();case"bytesValue":return fi.bytesValue();case"doubleValue":return fi.doubleValue();case"duration":return fi.duration();case"empty":return fi.empty();case"enum":return fi.enum();case"enumValue":return fi.enumValue();case"field":return fi.field();case"fieldCardinality":return fi.fieldCardinality();case"fieldKind":return fi.fieldKind();case"fieldMask":return fi.fieldMask();case"floatValue":return fi.floatValue();case"int32Value":return fi.int32Value();case"int64Value":return fi.int64Value();case"listValue":return fi.listValue();case"method":return fi.method();case"mixin":return fi.mixin();case"nullValue":return fi.nullValue();case"option":return fi.option();case"sourceContext":return fi.sourceContext();case"stringValue":return fi.stringValue();case"struct":return fi.struct();case"syntax":return fi.syntax();case"timestamp":return fi.timestamp();case"type":return fi.type();case"uint32Value":return fi.uint32Value();case"uint64Value":return fi.uint64Value();case"value":return fi.value();default:return e}},untransform:({_visit:e,...t})=>t})});var nhr,IUi=h(()=>{"use strict";Jr();je();bUi();EUi();nhr=D.union("type",{wellKnown:D.object({value:rhr}),userDefined:thr}).transform({transform:e=>{switch(e.type){case"wellKnown":return Pp.wellKnown(e.value);case"userDefined":return Pp.userDefined(e);default:return e}},untransform:({_visit:e,...t})=>t})});var ihr,vUi=h(()=>{"use strict";Jr();je();IUi();ihr=D.union("type",{proto:D.object({value:nhr})}).transform({transform:e=>e.type==="proto"?Zce.proto(e.value):e,untransform:({_visit:e,...t})=>t})});var ohr,xUi=h(()=>{"use strict";je();ohr=D.enum_(["INTEGER","LONG","UINT","UINT_64","FLOAT","DOUBLE","BOOLEAN","STRING","DATE","DATE_TIME","DATE_TIME_RFC_2822","UUID","BASE_64","BIG_INTEGER"])});var shr,CUi=h(()=>{"use strict";je();shr=D.objectWithoutOptionalProperties({})});var ahr,wUi=h(()=>{"use strict";je();ahr=D.objectWithoutOptionalProperties({default:D.string().optional()})});var chr,SUi=h(()=>{"use strict";je();chr=D.objectWithoutOptionalProperties({default:D.boolean().optional()})});var uhr,TUi=h(()=>{"use strict";je();uhr=D.objectWithoutOptionalProperties({})});var lhr,OUi=h(()=>{"use strict";je();lhr=D.objectWithoutOptionalProperties({})});var phr,BUi=h(()=>{"use strict";je();phr=D.objectWithoutOptionalProperties({})});var fhr,PUi=h(()=>{"use strict";je();fhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var dhr,DUi=h(()=>{"use strict";je();PUi();dhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:fhr.optional()})});var mhr,RUi=h(()=>{"use strict";je();mhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var hhr,kUi=h(()=>{"use strict";je();RUi();hhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:mhr.optional()})});var ghr,FUi=h(()=>{"use strict";je();ghr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var Ahr,NUi=h(()=>{"use strict";je();FUi();Ahr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:ghr.optional()})});var yhr,jUi=h(()=>{"use strict";je();yhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var bhr,QUi=h(()=>{"use strict";je();jUi();bhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:yhr.optional()})});var Ehr,zUi=h(()=>{"use strict";je();Ehr=D.objectWithoutOptionalProperties({format:D.string().optional(),pattern:D.string().optional(),minLength:D.number().optional(),maxLength:D.number().optional()})});var Ihr,MUi=h(()=>{"use strict";je();zUi();Ihr=D.objectWithoutOptionalProperties({default:D.string().optional(),validation:Ehr.optional()})});var vhr,LUi=h(()=>{"use strict";je();vhr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var xhr,UUi=h(()=>{"use strict";je();LUi();xhr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:vhr.optional()})});var Chr,VUi=h(()=>{"use strict";je();Chr=D.objectWithoutOptionalProperties({min:D.number().optional(),max:D.number().optional(),exclusiveMin:D.boolean().optional(),exclusiveMax:D.boolean().optional(),multipleOf:D.number().optional()})});var whr,_Ui=h(()=>{"use strict";je();VUi();whr=D.objectWithoutOptionalProperties({default:D.number().optional(),validation:Chr.optional()})});var Shr,GUi=h(()=>{"use strict";je();Shr=D.objectWithoutOptionalProperties({})});var Thr,qUi=h(()=>{"use strict";Jr();je();CUi();wUi();SUi();TUi();OUi();BUi();DUi();kUi();NUi();QUi();MUi();UUi();_Ui();GUi();Thr=D.union("type",{integer:Ahr,long:bhr,uint:whr,uint64:xhr,float:hhr,double:dhr,boolean:chr,string:Ihr,date:phr,dateTime:lhr,dateTimeRfc2822:uhr,uuid:Shr,base64:shr,bigInteger:ahr}).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 cHe,Ohr=h(()=>{"use strict";je();xUi();qUi();cHe=D.objectWithoutOptionalProperties({v1:ohr,v2:Thr.optional()})});var Bhr,WUi=h(()=>{"use strict";je();Bhr=D.enum_(["ENUM","OBJECT","UNION","UNDISCRIMINATED_UNION"])});var Phr,HUi=h(()=>{"use strict";je();bj();WUi();Phr=D.objectWithoutOptionalProperties({name:ty,shape:Bhr})});var Dhr,KUi=h(()=>{"use strict";Jr();je();Wo();Ohr();HUi();Dhr=D.union(D.discriminant("type","_type"),{container:D.object({container:D.lazy(()=>uHe)}),named:Phr,primitive:D.object({primitive:cHe}),unknown:D.object({})}).transform({transform:e=>{switch(e.type){case"container":return SO.container(e.container);case"named":return SO.named(e);case"primitive":return SO.primitive(e.primitive);case"unknown":return SO.unknown();default:return e}},untransform:({_visit:e,...t})=>t})});var Rhr,JUi=h(()=>{"use strict";je();Wo();KUi();Rhr=D.objectWithoutOptionalProperties({aliasOf:D.lazy(()=>Ps),resolvedType:Dhr})});var khr,YUi=h(()=>{"use strict";je();fDt();bj();iue();khr=D.objectWithoutOptionalProperties({extends:D.list(ty),properties:D.list(BO),extendedProperties:D.list(BO).optional(),extraProperties:D.property("extra-properties",D.boolean()),deferredUnionBaseProperties:D.list(nye).optional()})});var Fhr,XUi=h(()=>{"use strict";je();Wo();Gl();Fhr=D.objectWithoutOptionalProperties({type:D.lazy(()=>Ps)}).extend(Xi)});var Nhr,ZUi=h(()=>{"use strict";je();iue();XUi();Nhr=D.objectWithoutOptionalProperties({members:D.list(Fhr),baseProperties:D.list(BO).optional()})});var jhr,$Ui=h(()=>{"use strict";je();Wo();yd();jhr=D.objectWithoutOptionalProperties({name:fs,type:D.lazy(()=>Ps)})});var Qhr,eVi=h(()=>{"use strict";Jr();je();bj();$Ui();Qhr=D.union(D.discriminant("propertiesType","_type"),{samePropertiesAsObject:ty,singleProperty:jhr,noProperties:D.object({})}).transform({transform:e=>{switch(e.propertiesType){case"samePropertiesAsObject":return RS.samePropertiesAsObject(e);case"singleProperty":return RS.singleProperty(e);case"noProperties":return RS.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var FDt,tVi=h(()=>{"use strict";je();dWe();yd();Gl();eVi();FDt=D.objectWithoutOptionalProperties({discriminantValue:fs,shape:Qhr,displayName:D.string().optional(),availability:gY.optional()}).extend(Xi)});var zhr,rVi=h(()=>{"use strict";je();zhr=D.enum_(["data","protocol"])});var Mhr,nVi=h(()=>{"use strict";je();fDt();yd();bj();iue();tVi();rVi();Mhr=D.objectWithoutOptionalProperties({discriminant:fs,extends:D.list(ty),types:D.list(FDt),baseProperties:D.list(BO),inheritedBaseProperties:D.list(nye).optional(),default:FDt.optional(),discriminatorContext:zhr.optional()})});var Lhr,iVi=h(()=>{"use strict";Jr();je();JUi();Nmr();YUi();ZUi();nVi();Lhr=D.union(D.discriminant("type","_type"),{alias:Rhr,enum:sHe,object:khr,union:Mhr,undiscriminatedUnion:Nhr}).transform({transform:e=>{switch(e.type){case"alias":return mc.alias(e);case"enum":return mc.enum(e);case"object":return mc.object(e);case"union":return mc.union(e);case"undiscriminatedUnion":return mc.undiscriminatedUnion(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Uhr,oVi=h(()=>{"use strict";je();a7();oue();AY();bj();Pmr();yUi();vUi();iVi();Uhr=D.objectWithoutOptionalProperties({name:ty,shape:Lhr,autogeneratedExamples:D.list(kDt),userProvidedExamples:D.list(kDt),v2Examples:NS.optional(),referencedTypes:D.set(PO),encoding:oHe.optional(),source:ihr.optional(),inline:D.boolean().optional()}).extend(Fx)});var Vhr,sVi=h(()=>{"use strict";je();Wo();hf();Gl();dmr();Vhr=D.objectWithoutOptionalProperties({id:rHe,name:Io,type:D.lazy(()=>Ps)}).extend(Xi)});var _hr,aVi=h(()=>{"use strict";je();Wo();hf();Gl();_hr=D.objectWithoutOptionalProperties({name:Io.optional(),payload:D.lazyObject(()=>_c)}).extend(Xi)});var Ghr,cVi=h(()=>{"use strict";je();Ghr=D.enum_(["GET","POST"])});var qhr,uVi=h(()=>{"use strict";hf();qhr=Io});var Whr,lVi=h(()=>{"use strict";je();Wo();yd();IDt();Whr=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps)}).extend(uye)});var Hhr,pVi=h(()=>{"use strict";je();hf();bj();lVi();Hhr=D.objectWithoutOptionalProperties({name:Io,extends:D.list(ty),properties:D.list(Whr)})});var Khr,fVi=h(()=>{"use strict";je();Wo();Gl();Khr=D.objectWithoutOptionalProperties({payloadType:D.lazy(()=>Ps)}).extend(Xi)});var Jhr,dVi=h(()=>{"use strict";Jr();je();pVi();fVi();Jhr=D.union("type",{inlinedPayload:Hhr,reference:Khr}).transform({transform:e=>{switch(e.type){case"inlinedPayload":return kS.inlinedPayload(e);case"reference":return kS.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var Yhr,mVi=h(()=>{"use strict";je();Yhr=D.enum_(["RSA_SHA256","RSA_SHA384","RSA_SHA512","ECDSA_SHA256","ECDSA_SHA384","ECDSA_SHA512","ED25519"])});var Xhr,hVi=h(()=>{"use strict";je();yd();Xhr=D.objectWithoutOptionalProperties({url:D.string(),keyIdHeader:fs.optional()})});var Zhr,gVi=h(()=>{"use strict";je();Zhr=D.objectWithoutOptionalProperties({})});var $hr,AVi=h(()=>{"use strict";Jr();je();hVi();gVi();$hr=D.union("type",{jwks:Xhr,static:Zhr}).transform({transform:e=>{switch(e.type){case"jwks":return t7.jwks(e);case"static":return t7.static(e);default:return e}},untransform:({_visit:e,...t})=>t})});var egr,yVi=h(()=>{"use strict";je();egr=D.enum_(["ALPHABETICAL"])});var tgr,bVi=h(()=>{"use strict";je();tgr=D.enum_(["BODY","TIMESTAMP","NOTIFICATION_URL","MESSAGE_ID"])});var lHe,rgr=h(()=>{"use strict";je();yVi();bVi();lHe=D.objectWithoutOptionalProperties({components:D.list(tgr),delimiter:D.string(),bodySort:egr.optional()})});var yye,NDt=h(()=>{"use strict";je();yye=D.enum_(["BASE64","HEX"])});var ngr,EVi=h(()=>{"use strict";je();ngr=D.enum_(["UNIX_SECONDS","UNIX_MILLIS","ISO8601"])});var pHe,igr=h(()=>{"use strict";je();yd();EVi();pHe=D.objectWithoutOptionalProperties({headerName:fs,format:ngr,tolerance:D.number().optional()})});var ogr,IVi=h(()=>{"use strict";je();yd();mVi();AVi();rgr();NDt();igr();ogr=D.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:Yhr,encoding:yye,signaturePrefix:D.string().optional(),keySource:$hr,payloadFormat:lHe.optional(),timestamp:pHe.optional()})});var sgr,vVi=h(()=>{"use strict";je();sgr=D.enum_(["SHA256","SHA1","SHA384","SHA512"])});var agr,xVi=h(()=>{"use strict";je();agr=D.enum_(["SHA256","SHA1","SHA384","SHA512"])});var cgr,CVi=h(()=>{"use strict";je();cgr=D.objectWithoutOptionalProperties({name:D.string()})});var ugr,wVi=h(()=>{"use strict";Jr();je();CVi();ugr=D.union("type",{queryParameter:cgr}).transform({transform:e=>e.type==="queryParameter"?rye.queryParameter(e):e,untransform:({_visit:e,...t})=>t})});var lgr,SVi=h(()=>{"use strict";je();xVi();wVi();NDt();lgr=D.objectWithoutOptionalProperties({algorithm:agr,encoding:yye,location:ugr})});var pgr,TVi=h(()=>{"use strict";je();yd();vVi();SVi();rgr();NDt();igr();pgr=D.objectWithoutOptionalProperties({signatureHeaderName:fs,algorithm:sgr,encoding:yye,signaturePrefix:D.string().optional(),payloadFormat:lHe,timestamp:pHe.optional(),bodyHashBinding:lgr.optional()})});var fgr,OVi=h(()=>{"use strict";Jr();je();IVi();TVi();fgr=D.union("type",{hmac:pgr,asymmetric:ogr}).transform({transform:e=>{switch(e.type){case"hmac":return i7.hmac(e);case"asymmetric":return i7.asymmetric(e);default:return e}},untransform:({_visit:e,...t})=>t})});var dgr,BVi=h(()=>{"use strict";je();a7();GMi();n3i();Qdr();aue();PDt();aVi();cVi();uVi();dVi();OVi();dgr=D.objectWithoutOptionalProperties({id:Blr,name:qhr,displayName:D.string().optional(),method:Ghr,headers:D.list(jS),payload:Jhr,signatureVerification:fgr.optional(),fileUploadPayload:HWe.optional(),responses:D.list(gye).optional(),examples:D.list(_hr).optional(),v2Examples:Efr.optional()}).extend(Fx)});var mgr,PVi=h(()=>{"use strict";je();BVi();mgr=D.list(dgr)});var hgr,DVi=h(()=>{"use strict";Jr();je();Wo();fdr();hgr=D.union("type",{inlinedBody:UWe,reference:D.lazyObject(()=>_c)}).transform({transform:e=>{switch(e.type){case"inlinedBody":return K6.inlinedBody(e);case"reference":return K6.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var fHe,ggr=h(()=>{"use strict";je();fHe=D.string()});var Agr,RVi=h(()=>{"use strict";je();DVi();ggr();Agr=D.objectWithoutOptionalProperties({type:fHe,body:hgr})});var ygr,kVi=h(()=>{"use strict";je();hf();Gl();sdr();adr();udr();RVi();ygr=D.objectWithoutOptionalProperties({name:Io.optional(),url:D.string(),pathParameters:D.list(mye),headers:D.list(N2e),queryParameters:D.list(LWe),messages:D.list(Agr)}).extend(Xi)});var bgr,FVi=h(()=>{"use strict";je();Wo();yd();IDt();bgr=D.objectWithoutOptionalProperties({name:fs,valueType:D.lazy(()=>Ps)}).extend(uye)});var Egr,NVi=h(()=>{"use strict";je();hf();bj();FVi();Egr=D.objectWithoutOptionalProperties({name:Io,extends:D.list(ty),properties:D.list(bgr)})});var Igr,jVi=h(()=>{"use strict";je();Wo();Gl();Igr=D.objectWithoutOptionalProperties({bodyType:D.lazy(()=>Ps)}).extend(Xi)});var vgr,QVi=h(()=>{"use strict";Jr();je();NVi();jVi();vgr=D.union("type",{inlinedBody:Egr,reference:Igr}).transform({transform:e=>{switch(e.type){case"inlinedBody":return OO.inlinedBody(e);case"reference":return OO.reference(e);default:return e}},untransform:({_visit:e,...t})=>t})});var xgr,zVi=h(()=>{"use strict";je();xgr=D.enum_(["client","server"])});var Cgr,MVi=h(()=>{"use strict";je();a7();QVi();ggr();zVi();Cgr=D.objectWithoutOptionalProperties({type:fHe,displayName:D.string().optional(),methodName:D.string().optional(),origin:xgr,body:vgr}).extend(Fx)});var wgr,LVi=h(()=>{"use strict";hf();wgr=Io});var Sgr,UVi=h(()=>{"use strict";je();a7();F2e();a3i();aue();YWe();nHe();ADt();kVi();MVi();LVi();Sgr=D.objectWithoutOptionalProperties({name:wgr,displayName:D.string().optional(),connectMethodName:D.string().optional(),baseUrl:NP.optional(),path:BU,auth:D.boolean(),headers:D.list(jS),queryParameters:D.list(sye),pathParameters:D.list(u7),messages:D.list(Cgr),examples:D.list(ygr),v2Examples:xfr.optional()}).extend(Fx)});var Tgr,VVi=h(()=>{"use strict";je();fWe();Tgr=D.objectWithoutOptionalProperties({pointsTo:hY})});var dHe,Ogr=h(()=>{"use strict";je();bDt();D2e();pWe();fWe();oue();Olr();Plr();Gl();VVi();dHe=D.objectWithoutOptionalProperties({fernFilepath:TU,service:mY.optional(),types:D.list(PO),errors:D.list(cye),webhooks:gWe.optional(),websocket:AWe.optional(),subpackages:D.list(hY),hasEndpointsInTree:D.boolean(),hasWebSocketInTree:D.boolean().optional(),navigationConfig:Tgr.optional()}).extend(Xi)});var Bgr,_Vi=h(()=>{"use strict";je();BDt();Bgr=D.objectWithoutOptionalProperties({title:D.string(),language:hye,content:D.string()})});var Pgr,GVi=h(()=>{"use strict";je();dDt();_Mi();iUi();_Vi();Pgr=D.objectWithoutOptionalProperties({defaultEndpoint:nue.optional(),bannerLink:D.string().optional(),introduction:D.string().optional(),apiReferenceLink:D.string().optional(),apiName:D.string().optional(),disabledFeatures:D.list(EDt).optional(),whiteLabel:D.boolean().optional(),features:D.record(EDt,D.list(nue)).optional(),customSections:D.list(Bgr).optional(),exampleStyle:Umr.optional()})});var Dgr,qVi=h(()=>{"use strict";je();Dgr=D.objectWithoutOptionalProperties({header:D.stringLiteral("User-Agent"),value:D.string()})});var Rgr,WVi=h(()=>{"use strict";je();qVi();Rgr=D.objectWithoutOptionalProperties({language:D.string(),sdkName:D.string(),sdkVersion:D.string(),userAgent:Dgr.optional()})});var kgr,HVi=h(()=>{"use strict";je();aUi();WVi();kgr=D.objectWithoutOptionalProperties({isAuthMandatory:D.boolean(),hasStreamingEndpoints:D.boolean(),hasPaginatedEndpoints:D.boolean(),hasFileDownloadEndpoints:D.boolean(),platformHeaders:Rgr,idempotencyKeyGeneration:Gmr.optional()})});var Fgr,KVi=h(()=>{"use strict";je();pWe();oue();Fgr=D.objectWithoutOptionalProperties({typesReferencedOnlyByService:D.record(mY,D.list(PO)),sharedTypes:D.list(PO)})});var Ngr,JVi=h(()=>{"use strict";je();Z4i();Ngr=D.objectWithoutOptionalProperties({sources:D.list(Fmr)})});var jgr,YVi=h(()=>{"use strict";je();yDt();hf();Ogr();jgr=D.objectWithoutOptionalProperties({name:Io,displayName:aye.optional()}).extend(dHe)});var XFa,ZFa=h(()=>{"use strict";je();gMi();zMi();bDt();hf();pWe();fWe();oue();Olr();Plr();HMi();ALi();jLi();LLi();vpr();aue();YWe();H4i();nHe();AUi();oVi();sVi();PVi();UVi();eUi();tUi();nUi();sUi();Ogr();GVi();HVi();KVi();JVi();YVi();XFa=D.objectWithoutOptionalProperties({fdrApiDefinitionId:D.string().optional(),apiVersion:Qmr.optional(),specVersion:D.string().optional(),apiName:Io,apiDisplayName:D.string().optional(),apiDocs:D.string().optional(),auth:wlr,headers:D.list(jS),idempotencyHeaders:D.list(jS),types:D.record(PO,Uhr),services:D.record(mY,Dmr),webhookGroups:D.record(gWe,mgr),websocketChannels:D.record(AWe,Sgr).optional(),errors:D.record(cye,ifr),subpackages:D.record(hY,jgr),rootPackage:dHe,constants:Dlr,environments:rfr.optional(),basePath:BU.optional(),pathParameters:D.list(u7),errorDiscriminationStrategy:Lmr,sdkConfig:kgr,variables:D.list(Vhr),globalParameters:D.list(SWe).optional(),serviceTypeReferenceInfo:Fgr,readmeConfig:Pgr.optional(),sourceConfig:Ngr.optional(),publishConfig:ehr.optional(),dynamic:Gpr.optional(),selfHosted:D.boolean().optional(),audiences:D.list(rlr).optional(),generationMetadata:_mr.optional(),apiPlayground:D.boolean().optional(),casingsConfig:zmr.optional()})});var XVi=h(()=>{"use strict";Z4i();Y4i();eUi();tUi();rUi();nUi();iUi();sUi();$4i();aUi();ZFa();oUi();Ogr();VVi();WVi();X4i();GVi();_Vi();HVi();KVi();JVi();YVi();qVi()});var ZVi={};X(ZVi,{ApiDefinitionSource:()=>Fmr,ApiDefinitionSourceId:()=>Rmr,ApiVersionScheme:()=>Qmr,CasingsConfig:()=>zmr,ErrorDiscriminationByPropertyStrategy:()=>Mmr,ErrorDiscriminationStrategy:()=>Lmr,ExampleStyle:()=>Umr,GenerationMetadata:()=>_mr,HeaderApiVersionScheme:()=>jmr,IdempotencyKeyGeneration:()=>Gmr,IntermediateRepresentation:()=>XFa,InvocationSource:()=>Vmr,Package:()=>dHe,PackageNavigationConfig:()=>Tgr,PlatformHeaders:()=>Rgr,ProtoSource:()=>kmr,ReadmeConfig:()=>Pgr,ReadmeCustomSection:()=>Bgr,SdkConfig:()=>kgr,ServiceTypeReferenceInfo:()=>Fgr,SourceConfig:()=>Ngr,Subpackage:()=>jgr,UserAgent:()=>Dgr});var $Fa=h(()=>{"use strict";XVi()});var $Vi=h(()=>{"use strict";l4i();Ldr();p4i();h4i();f4i();IUi();bUi();EUi()});var e_i={};X(e_i,{CsharpProtobufFileOptions:()=>zdr,ProtobufFile:()=>KWe,ProtobufFileOptions:()=>Mdr,ProtobufMethodType:()=>Gdr,ProtobufService:()=>Udr,ProtobufType:()=>nhr,UserDefinedProtobufType:()=>thr,WellKnownProtobufType:()=>rhr});var e2a=h(()=>{"use strict";$Vi()});var t_i=h(()=>{"use strict";cUi();mUi();hUi();gUi();uUi();lUi();pUi();fUi();AUi();RDt();dUi()});var r_i={};X(r_i,{CratesPublishTarget:()=>qmr,DirectPublish:()=>Xmr,Filesystem:()=>Zmr,GithubPublish:()=>$mr,GoPublishTarget:()=>Wmr,MavenPublishTarget:()=>Hmr,NpmPublishTarget:()=>Kmr,PostmanPublishTarget:()=>Jmr,PublishTarget:()=>Aye,PublishingConfig:()=>ehr,PypiPublishTarget:()=>Ymr});var t2a=h(()=>{"use strict";t_i()});var uHe,r2a=h(()=>{"use strict";Jr();je();Wo();B2e();uHe=D.union(D.discriminant("type","_type"),{list:D.object({list:D.lazy(()=>Ps)}),map:D.lazyObject(()=>Qgr),nullable:D.object({nullable:D.lazy(()=>Ps)}),optional:D.object({optional:D.lazy(()=>Ps)}),set:D.object({set:D.lazy(()=>Ps)}),literal:D.object({literal:SU})}).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 n2a,i2a=h(()=>{"use strict";je();bj();DDt();n2a=D.objectWithoutOptionalProperties({default:cue.optional(),name:ty})});var zgr,o2a=h(()=>{"use strict";je();Wo();zgr=D.objectWithoutOptionalProperties({value:D.lazyObject(()=>_c)})});var Mgr,n_i=h(()=>{"use strict";je();Mgr=D.objectWithoutOptionalProperties({datetime:D.date(),raw:D.string().optional()})});var Lgr,i_i=h(()=>{"use strict";je();Lgr=D.objectWithoutOptionalProperties({datetime:D.date(),raw:D.string().optional()})});var mHe,Ugr=h(()=>{"use strict";Jr();je();VMi();n_i();i_i();mHe=D.union("type",{integer:D.object({integer:D.number()}),long:D.object({long:D.number()}),uint:D.object({uint:D.number()}),uint64:D.object({uint64:D.number()}),float:D.object({float:D.number()}),double:D.object({double:D.number()}),boolean:D.object({boolean:D.boolean()}),string:D.object({string:Tlr}),date:D.object({date:D.string()}),datetime:Mgr,datetimeRfc2822:Lgr,uuid:D.object({uuid:D.string()}),base64:D.object({base64:D.string()}),bigInteger:D.object({bigInteger:D.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 Vgr,o_i=h(()=>{"use strict";je();Ugr();Vgr=D.objectWithoutOptionalProperties({literal:mHe})});var _gr,s2a=h(()=>{"use strict";Jr();je();Wo();o_i();_gr=D.union("type",{list:D.lazyObject(()=>Ggr),set:D.lazyObject(()=>Kgr),optional:D.lazyObject(()=>Hgr),nullable:D.lazyObject(()=>Wgr),map:D.lazyObject(()=>qgr),literal:Vgr}).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 Jgr,s_i=h(()=>{"use strict";je();yd();Jgr=D.objectWithoutOptionalProperties({value:fs})});var Ygr,a2a=h(()=>{"use strict";je();Wo();yd();Ygr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var Xgr,c2a=h(()=>{"use strict";je();Wo();Xgr=D.objectWithoutOptionalProperties({key:D.lazyObject(()=>_c),value:D.lazyObject(()=>_c)})});var Ggr,u2a=h(()=>{"use strict";je();Wo();Ggr=D.objectWithoutOptionalProperties({list:D.list(D.lazyObject(()=>_c)),itemType:D.lazy(()=>Ps)})});var qgr,l2a=h(()=>{"use strict";je();Wo();qgr=D.objectWithoutOptionalProperties({map:D.list(D.lazyObject(()=>Xgr)),keyType:D.lazy(()=>Ps),valueType:D.lazy(()=>Ps)})});var Zgr,p2a=h(()=>{"use strict";je();Wo();bj();Zgr=D.objectWithoutOptionalProperties({typeName:ty,shape:D.lazy(()=>aHe)})});var Wgr,f2a=h(()=>{"use strict";je();Wo();Wgr=D.objectWithoutOptionalProperties({nullable:D.lazyObject(()=>_c).optional(),valueType:D.lazy(()=>Ps)})});var hHe,d2a=h(()=>{"use strict";je();Wo();yd();bj();gDt();hHe=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c),propertyAccess:oye.optional(),originalTypeDeclaration:ty})});var gHe,m2a=h(()=>{"use strict";je();Wo();gHe=D.objectWithoutOptionalProperties({properties:D.list(D.lazyObject(()=>hHe)),extraProperties:D.list(D.lazyObject(()=>Ygr)).optional()})});var $gr,h2a=h(()=>{"use strict";je();Wo();oue();$gr=D.objectWithoutOptionalProperties({typeId:PO,object:D.lazyObject(()=>gHe)})});var Hgr,g2a=h(()=>{"use strict";je();Wo();Hgr=D.objectWithoutOptionalProperties({optional:D.lazyObject(()=>_c).optional(),valueType:D.lazy(()=>Ps)})});var Kgr,A2a=h(()=>{"use strict";je();Wo();Kgr=D.objectWithoutOptionalProperties({set:D.list(D.lazyObject(()=>_c)),itemType:D.lazy(()=>Ps)})});var eAr,y2a=h(()=>{"use strict";je();Wo();yd();eAr=D.objectWithoutOptionalProperties({wireDiscriminantValue:fs,shape:D.lazy(()=>tAr)})});var tAr,b2a=h(()=>{"use strict";Jr();je();Wo();tAr=D.union("type",{samePropertiesAsObject:D.lazyObject(()=>$gr),singleProperty:D.lazyObject(()=>_c),noProperties:D.object({})}).transform({transform:e=>{switch(e.type){case"samePropertiesAsObject":return pY.samePropertiesAsObject(e);case"singleProperty":return pY.singleProperty(e);case"noProperties":return pY.noProperties();default:return e}},untransform:({_visit:e,...t})=>t})});var _c,E2a=h(()=>{"use strict";je();Wo();yWe();_c=D.objectWithoutOptionalProperties({shape:D.lazy(()=>rAr)}).extend(bY)});var rAr,I2a=h(()=>{"use strict";Jr();je();Wo();Ugr();rAr=D.union("type",{primitive:D.object({primitive:mHe}),container:D.object({container:D.lazy(()=>_gr)}),unknown:D.object({unknown:D.unknown()}),named:D.lazyObject(()=>Zgr)}).transform({transform:e=>{switch(e.type){case"primitive":return Zi.primitive(e.primitive);case"container":return Zi.container(e.container);case"unknown":return Zi.unknown(e.unknown);case"named":return Zi.named(e);default:return e}},untransform:({_visit:e,...t})=>t})});var aHe,v2a=h(()=>{"use strict";Jr();je();Wo();s_i();aHe=D.union("type",{alias:D.lazyObject(()=>zgr),enum:Jgr,object:D.lazyObject(()=>gHe),union:D.lazyObject(()=>iAr),undiscriminatedUnion:D.lazyObject(()=>nAr)}).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 nAr,x2a=h(()=>{"use strict";je();Wo();nAr=D.objectWithoutOptionalProperties({index:D.number(),singleUnionType:D.lazyObject(()=>_c)})});var oAr,C2a=h(()=>{"use strict";je();Wo();yd();oAr=D.objectWithoutOptionalProperties({name:fs,value:D.lazyObject(()=>_c)})});var iAr,w2a=h(()=>{"use strict";je();Wo();yd();iAr=D.objectWithoutOptionalProperties({discriminant:fs,singleUnionType:D.lazyObject(()=>eAr),extendProperties:D.list(D.lazyObject(()=>hHe)).optional(),baseProperties:D.list(D.lazyObject(()=>oAr)).optional()})});var Qgr,S2a=h(()=>{"use strict";je();Wo();Qgr=D.objectWithoutOptionalProperties({keyType:D.lazy(()=>Ps),valueType:D.lazy(()=>Ps)})});var sAr,a_i=h(()=>{"use strict";Jr();je();DDt();sAr=D.union("type",{enum:cue}).transform({transform:e=>e.type==="enum"?nWe.enum(e):e,untransform:({_visit:e,...t})=>t})});var aAr,c_i=h(()=>{"use strict";je();yDt();D2e();hf();oue();a_i();aAr=D.objectWithoutOptionalProperties({typeId:PO,fernFilepath:TU,name:Io,displayName:aye.optional(),default:sAr.optional(),inline:D.boolean().optional()})});var Ps,T2a=h(()=>{"use strict";Jr();je();Wo();c_i();Ohr();Ps=D.union(D.discriminant("type","_type"),{container:D.object({container:D.lazy(()=>uHe)}),named:aAr,primitive:D.object({primitive:cHe}),unknown:D.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 u_i=h(()=>{"use strict";JUi();CUi();wUi();SUi();r2a();TUi();OUi();BUi();bj();DUi();PUi();Pmr();Nmr();i2a();DDt();o2a();s2a();n_i();i_i();s_i();a2a();c2a();u2a();o_i();l2a();p2a();f2a();d2a();m2a();h2a();g2a();Ugr();A2a();y2a();b2a();yUi();E2a();I2a();v2a();x2a();C2a();w2a();kUi();RUi();NUi();FUi();q4i();B2e();QUi();jUi();S2a();c_i();a_i();iue();gDt();YUi();Ohr();xUi();qUi();W4i();HUi();KUi();WUi();tVi();eVi();$Ui();vUi();MUi();zUi();iVi();oVi();T2a();UUi();LUi();_Ui();VUi();XUi();ZUi();rVi();nVi();GUi()});var l_i={};X(l_i,{AliasTypeDeclaration:()=>Rhr,Base64Type:()=>shr,BigIntegerType:()=>ahr,BooleanType:()=>chr,ContainerType:()=>uHe,DateTimeRfc2822Type:()=>uhr,DateTimeType:()=>lhr,DateType:()=>phr,DeclaredTypeName:()=>ty,DoubleType:()=>dhr,DoubleValidationRules:()=>fhr,Encoding:()=>oHe,EnumTypeDeclaration:()=>sHe,EnumTypeReference:()=>n2a,EnumValue:()=>cue,ExampleAliasType:()=>zgr,ExampleContainer:()=>_gr,ExampleDatetime:()=>Mgr,ExampleDatetimeRfc2822:()=>Lgr,ExampleEnumType:()=>Jgr,ExampleExtraObjectProperty:()=>Ygr,ExampleKeyValuePair:()=>Xgr,ExampleListContainer:()=>Ggr,ExampleLiteralContainer:()=>Vgr,ExampleMapContainer:()=>qgr,ExampleNamedType:()=>Zgr,ExampleNullableContainer:()=>Wgr,ExampleObjectProperty:()=>hHe,ExampleObjectType:()=>gHe,ExampleObjectTypeWithTypeId:()=>$gr,ExampleOptionalContainer:()=>Hgr,ExamplePrimitive:()=>mHe,ExampleSetContainer:()=>Kgr,ExampleSingleUnionType:()=>eAr,ExampleSingleUnionTypeProperties:()=>tAr,ExampleType:()=>kDt,ExampleTypeReference:()=>_c,ExampleTypeReferenceShape:()=>rAr,ExampleTypeShape:()=>aHe,ExampleUndiscriminatedUnionType:()=>nAr,ExampleUnionBaseProperty:()=>oAr,ExampleUnionType:()=>iAr,FloatType:()=>hhr,FloatValidationRules:()=>mhr,IntegerType:()=>Ahr,IntegerValidationRules:()=>ghr,JsonEncoding:()=>Omr,Literal:()=>SU,LongType:()=>bhr,LongValidationRules:()=>yhr,MapType:()=>Qgr,NamedType:()=>aAr,NamedTypeDefault:()=>sAr,ObjectProperty:()=>BO,ObjectPropertyAccess:()=>oye,ObjectTypeDeclaration:()=>khr,PrimitiveType:()=>cHe,PrimitiveTypeV1:()=>ohr,PrimitiveTypeV2:()=>Thr,ProtoEncoding:()=>Bmr,ResolvedNamedType:()=>Phr,ResolvedTypeReference:()=>Dhr,ShapeType:()=>Bhr,SingleUnionType:()=>FDt,SingleUnionTypeProperties:()=>Qhr,SingleUnionTypeProperty:()=>jhr,Source:()=>ihr,StringType:()=>Ihr,StringValidationRules:()=>Ehr,Type:()=>Lhr,TypeDeclaration:()=>Uhr,TypeReference:()=>Ps,Uint64Type:()=>xhr,Uint64ValidationRules:()=>vhr,UintType:()=>whr,UintValidationRules:()=>Chr,UndiscriminatedUnionMember:()=>Fhr,UndiscriminatedUnionTypeDeclaration:()=>Nhr,UnionDiscriminatorContext:()=>zhr,UnionTypeDeclaration:()=>Mhr,UuidType:()=>Shr});var O2a=h(()=>{"use strict";u_i()});var p_i=h(()=>{"use strict";sVi();dmr()});var f_i={};X(f_i,{VariableDeclaration:()=>Vhr,VariableId:()=>rHe});var B2a=h(()=>{"use strict";p_i()});var d_i=h(()=>{"use strict";mVi();IVi();AVi();aVi();vVi();TVi();pVi();lVi();hVi();gVi();BVi();xVi();SVi();wVi();CVi();PVi();cVi();uVi();dVi();yVi();bVi();rgr();fVi();NDt();OVi();igr();EVi()});var m_i={};X(m_i,{AsymmetricAlgorithm:()=>Yhr,AsymmetricKeySignatureVerification:()=>ogr,AsymmetricKeySource:()=>$hr,ExampleWebhookCall:()=>_hr,HmacAlgorithm:()=>sgr,HmacSignatureVerification:()=>pgr,InlinedWebhookPayload:()=>Hhr,InlinedWebhookPayloadProperty:()=>Whr,JwksKeySource:()=>Xhr,StaticKeySource:()=>Zhr,Webhook:()=>dgr,WebhookBodyHashAlgorithm:()=>agr,WebhookBodyHashBinding:()=>lgr,WebhookBodyHashLocation:()=>ugr,WebhookBodyHashQueryParameterLocation:()=>cgr,WebhookGroup:()=>mgr,WebhookHttpMethod:()=>Ghr,WebhookName:()=>qhr,WebhookPayload:()=>Jhr,WebhookPayloadBodySort:()=>egr,WebhookPayloadComponent:()=>tgr,WebhookPayloadFormat:()=>lHe,WebhookPayloadReference:()=>Khr,WebhookSignatureEncoding:()=>yye,WebhookSignatureVerification:()=>fgr,WebhookTimestampConfig:()=>pHe,WebhookTimestampFormat:()=>ngr});var P2a=h(()=>{"use strict";d_i()});var h_i=h(()=>{"use strict";RVi();DVi();kVi();NVi();FVi();UVi();MVi();QVi();jVi();ggr();zVi();LVi()});var g_i={};X(g_i,{ExampleWebSocketMessage:()=>Agr,ExampleWebSocketMessageBody:()=>hgr,ExampleWebSocketSession:()=>ygr,InlinedWebSocketMessageBody:()=>Egr,InlinedWebSocketMessageBodyProperty:()=>bgr,WebSocketChannel:()=>Sgr,WebSocketMessage:()=>Cgr,WebSocketMessageBody:()=>vgr,WebSocketMessageBodyReference:()=>Igr,WebSocketMessageId:()=>fHe,WebSocketMessageOrigin:()=>xgr,WebSocketName:()=>wgr});var D2a=h(()=>{"use strict";h_i()});var R2a=h(()=>{"use strict";dFa();AMi();mFa();LMi();hFa();qMi();gFa();KMi();zFa();MFa();QLi();VFa();ULi();_Fa();c3i();KFa();JFa();L3i();YFa();K4i();$Fa();XVi();e2a();$Vi();t2a();t_i();O2a();u_i();B2a();p_i();P2a();d_i();D2a();h_i()});var Ri={};X(Ri,{AliasTypeDeclaration:()=>Rhr,ApiAuth:()=>wlr,ApiDefinitionSource:()=>Fmr,ApiDefinitionSourceId:()=>Rmr,ApiVersionScheme:()=>Qmr,AsymmetricAlgorithm:()=>Yhr,AsymmetricKeySignatureVerification:()=>ogr,AsymmetricKeySource:()=>$hr,AudienceDefinition:()=>rlr,AudienceReference:()=>aWe,AuthScheme:()=>xlr,AuthSchemeKey:()=>uWe,AuthSchemesRequirement:()=>Clr,AuthScope:()=>Slr,AutogeneratedEndpointExample:()=>bdr,Availability:()=>gY,AvailabilityStatus:()=>ulr,Base64Type:()=>shr,BaseAuthScheme:()=>CU,BasicAuthScheme:()=>slr,BasicAuthValues:()=>ofr,BearerAuthScheme:()=>alr,BearerAuthValues:()=>sfr,BigIntegerType:()=>ahr,BooleanType:()=>chr,BytesRequest:()=>_We,BytesResponse:()=>GWe,CasingsConfig:()=>zmr,Constants:()=>Dlr,ContainerType:()=>uHe,CratesPublishTarget:()=>qmr,CsharpProtobufFileOptions:()=>zdr,CursorPagination:()=>vdr,CustomPagination:()=>xdr,DateTimeRfc2822Type:()=>uhr,DateTimeType:()=>lhr,DateType:()=>phr,Declaration:()=>Fx,DeclaredErrorName:()=>dye,DeclaredServiceName:()=>Cdr,DeclaredTypeName:()=>ty,DirectPublish:()=>Xmr,DisplayName:()=>aye,DoubleType:()=>dhr,DoubleValidationRules:()=>fhr,Encoding:()=>oHe,EndpointId:()=>nue,EndpointName:()=>wdr,EndpointReference:()=>iye,EnumTypeDeclaration:()=>sHe,EnumTypeReference:()=>n2a,EnumValue:()=>cue,EnvironmentBaseUrlId:()=>NP,EnvironmentBaseUrlWithId:()=>Jpr,EnvironmentId:()=>vY,EnvironmentUrl:()=>fye,EnvironmentVariable:()=>wU,Environments:()=>tfr,EnvironmentsConfig:()=>rfr,ErrorDeclaration:()=>ifr,ErrorDeclarationDiscriminantValue:()=>LFa,ErrorDiscriminationByPropertyStrategy:()=>Mmr,ErrorDiscriminationStrategy:()=>Lmr,ErrorId:()=>cye,EscapedString:()=>Tlr,ExampleAliasType:()=>zgr,ExampleCodeSample:()=>Odr,ExampleCodeSampleLanguage:()=>Sdr,ExampleCodeSampleSdk:()=>Tdr,ExampleContainer:()=>_gr,ExampleDatetime:()=>Mgr,ExampleDatetimeRfc2822:()=>Lgr,ExampleEndpointCall:()=>VWe,ExampleEndpointErrorResponse:()=>mdr,ExampleEndpointSuccessResponse:()=>gdr,ExampleEnumType:()=>Jgr,ExampleError:()=>nfr,ExampleExtraObjectProperty:()=>Ygr,ExampleHeader:()=>N2e,ExampleInlinedRequestBody:()=>UWe,ExampleInlinedRequestBodyExtraProperty:()=>ldr,ExampleInlinedRequestBodyProperty:()=>pdr,ExampleKeyValuePair:()=>Xgr,ExampleListContainer:()=>Ggr,ExampleLiteralContainer:()=>Vgr,ExampleMapContainer:()=>qgr,ExampleNamedType:()=>Zgr,ExampleNullableContainer:()=>Wgr,ExampleObjectProperty:()=>hHe,ExampleObjectType:()=>gHe,ExampleObjectTypeWithTypeId:()=>$gr,ExampleOptionalContainer:()=>Hgr,ExamplePathParameter:()=>mye,ExamplePrimitive:()=>mHe,ExampleQueryParameter:()=>LWe,ExampleQueryParameterShape:()=>cdr,ExampleRequestBody:()=>ddr,ExampleResponse:()=>Adr,ExampleServerSideEvent:()=>hdr,ExampleSetContainer:()=>Kgr,ExampleSingleUnionType:()=>eAr,ExampleSingleUnionTypeProperties:()=>tAr,ExampleStyle:()=>Umr,ExampleType:()=>kDt,ExampleTypeReference:()=>_c,ExampleTypeReferenceShape:()=>rAr,ExampleTypeShape:()=>aHe,ExampleUndiscriminatedUnionType:()=>nAr,ExampleUnionBaseProperty:()=>oAr,ExampleUnionType:()=>iAr,ExampleWebSocketMessage:()=>Agr,ExampleWebSocketMessageBody:()=>hgr,ExampleWebSocketSession:()=>ygr,ExampleWebhookCall:()=>_hr,FeatureId:()=>EDt,FernFilepath:()=>TU,FileDownloadResponse:()=>qWe,FileProperty:()=>Rdr,FilePropertyArray:()=>Pdr,FilePropertySingle:()=>Ddr,FileUploadBodyProperty:()=>Ndr,FileUploadBodyPropertyEncoding:()=>kdr,FileUploadRequest:()=>HWe,FileUploadRequestProperty:()=>jdr,Filesystem:()=>Zmr,FloatType:()=>hhr,FloatValidationRules:()=>mhr,GenerationMetadata:()=>_mr,GithubPublish:()=>$mr,GlobalParameter:()=>SWe,GlobalParameterApplyMode:()=>bpr,GlobalParameterId:()=>wWe,GlobalParameterLocation:()=>Ipr,GoPublishTarget:()=>Wmr,GrpcTransport:()=>Vdr,HeaderApiVersionScheme:()=>jmr,HeaderAuthScheme:()=>clr,HeaderAuthValues:()=>afr,HmacAlgorithm:()=>sgr,HmacSignatureVerification:()=>pgr,HttpEndpoint:()=>Tmr,HttpEndpointSecurityItem:()=>_dr,HttpEndpointSource:()=>Wdr,HttpHeader:()=>jS,HttpMethod:()=>JWe,HttpPath:()=>BU,HttpPathPart:()=>Kdr,HttpRequestBody:()=>ZWe,HttpRequestBodyReference:()=>XWe,HttpResponse:()=>gye,HttpResponseBody:()=>cmr,HttpService:()=>Dmr,IdempotencyKeyGeneration:()=>Gmr,InferredAuthScheme:()=>dlr,InferredAuthSchemeTokenEndpoint:()=>flr,InferredAuthenticatedRequestHeader:()=>plr,InlinedRequestBody:()=>Ydr,InlinedRequestBodyProperty:()=>WWe,InlinedWebSocketMessageBody:()=>Egr,InlinedWebSocketMessageBodyProperty:()=>bgr,InlinedWebhookPayload:()=>Hhr,InlinedWebhookPayloadProperty:()=>Whr,IntegerType:()=>Ahr,IntegerValidationRules:()=>ghr,IntermediateRepresentation:()=>XFa,InvocationSource:()=>Vmr,JsonEncoding:()=>Omr,JsonResponse:()=>$We,JsonResponseBody:()=>Zdr,JsonResponseBodyWithProperty:()=>$dr,JsonStreamChunk:()=>tmr,JwksKeySource:()=>Xhr,Literal:()=>SU,LongType:()=>bhr,LongValidationRules:()=>yhr,MapType:()=>Qgr,MavenPublishTarget:()=>Hmr,MultipleBaseUrlsEnvironment:()=>Xpr,MultipleBaseUrlsEnvironments:()=>Zpr,MultipleEnvironmentUrlValues:()=>cfr,Name:()=>cWe,NameAndWireValue:()=>nye,NameAndWireValueOrString:()=>fs,NameOrString:()=>Io,NamedType:()=>aAr,NamedTypeDefault:()=>sAr,NonStreamHttpResponseBody:()=>smr,NpmPublishTarget:()=>Kmr,OAuthAccessTokenRequestProperties:()=>ylr,OAuthAccessTokenResponseProperties:()=>hWe,OAuthClientCredentials:()=>Elr,OAuthConfiguration:()=>Ilr,OAuthRefreshEndpoint:()=>Alr,OAuthRefreshTokenRequestProperties:()=>glr,OAuthScheme:()=>vlr,OAuthTokenEndpoint:()=>blr,OAuthValues:()=>ufr,ObjectProperty:()=>BO,ObjectPropertyAccess:()=>oye,ObjectTypeDeclaration:()=>khr,OffsetPagination:()=>umr,Package:()=>dHe,PackageNavigationConfig:()=>Tgr,Pagination:()=>fmr,PathPagination:()=>lmr,PathParameter:()=>u7,PathParameterLocation:()=>mmr,PlatformHeaders:()=>Rgr,PostmanPublishTarget:()=>Jmr,PrimitiveType:()=>cHe,PrimitiveTypeV1:()=>ohr,PrimitiveTypeV2:()=>Thr,PropertyPathItem:()=>mWe,ProtoEncoding:()=>Bmr,ProtoSource:()=>kmr,ProtoSourceInfo:()=>qdr,ProtobufFile:()=>KWe,ProtobufFileOptions:()=>Mdr,ProtobufMethodType:()=>Gdr,ProtobufService:()=>Udr,ProtobufType:()=>nhr,PublishTarget:()=>Aye,PublishingConfig:()=>ehr,PypiPublishTarget:()=>Ymr,QueryParameter:()=>sye,ReadmeConfig:()=>Pgr,ReadmeCustomSection:()=>Bgr,RequestProperty:()=>kP,RequestPropertyValue:()=>hlr,ResolvedNamedType:()=>Phr,ResolvedTypeReference:()=>Dhr,ResponseError:()=>hmr,ResponseErrors:()=>gmr,ResponseProperty:()=>c0,RetriesConfiguration:()=>ymr,RetriesDisabledSchema:()=>Amr,SafeAndUnsafeString:()=>T2e,SdkConfig:()=>kgr,SdkRequest:()=>vmr,SdkRequestBodyType:()=>bmr,SdkRequestShape:()=>Imr,SdkRequestWrapper:()=>Emr,ServerVariable:()=>OWe,ServiceId:()=>mY,ServiceTypeReferenceInfo:()=>Fgr,ShapeType:()=>Bhr,SingleBaseUrlEnvironment:()=>$pr,SingleBaseUrlEnvironments:()=>efr,SingleUnionType:()=>FDt,SingleUnionTypeProperties:()=>Qhr,SingleUnionTypeProperty:()=>jhr,Source:()=>ihr,SourceConfig:()=>Ngr,SseStreamChunk:()=>rmr,StaticKeySource:()=>Zhr,StreamParameterResponse:()=>amr,StreamingResponse:()=>eHe,StringType:()=>Ihr,StringValidationRules:()=>Ehr,Subpackage:()=>jgr,SubpackageId:()=>hY,SupportedSdkLanguage:()=>hye,TextResponse:()=>tHe,TextStreamChunk:()=>nmr,Transport:()=>iHe,Type:()=>Lhr,TypeDeclaration:()=>Uhr,TypeId:()=>PO,TypeReference:()=>Ps,Uint64Type:()=>xhr,Uint64ValidationRules:()=>vhr,UintType:()=>whr,UintValidationRules:()=>Chr,UndiscriminatedUnionMember:()=>Fhr,UndiscriminatedUnionTypeDeclaration:()=>Nhr,UnionDiscriminatorContext:()=>zhr,UnionTypeDeclaration:()=>Mhr,UriPagination:()=>pmr,UserAgent:()=>Dgr,UserDefinedProtobufType:()=>thr,UserSpecifiedEndpointExample:()=>Cmr,UuidType:()=>Shr,V2AuthValues:()=>BWe,V2EndpointLocation:()=>ffr,V2EndpointLocationHttpMethod:()=>pfr,V2EnvironmentValues:()=>PWe,V2HttpEndpointCodeSample:()=>mfr,V2HttpEndpointExample:()=>SDt,V2HttpEndpointExamples:()=>bfr,V2HttpEndpointRequest:()=>gfr,V2HttpEndpointResponse:()=>yfr,V2HttpEndpointResponseBody:()=>Afr,V2HttpRequestBodies:()=>wmr,V2HttpResponses:()=>Smr,V2SchemaExample:()=>hDt,V2SchemaExamples:()=>NS,V2ValueExamples:()=>xY,V2WebSocketEndpointLocation:()=>Ifr,V2WebSocketMessageExample:()=>vfr,V2WebSocketSessionExample:()=>ODt,V2WebSocketSessionExamples:()=>xfr,V2WebhookExample:()=>TDt,V2WebhookExamples:()=>Efr,VariableDeclaration:()=>Vhr,VariableId:()=>rHe,WebSocketChannel:()=>Sgr,WebSocketChannelId:()=>AWe,WebSocketMessage:()=>Cgr,WebSocketMessageBody:()=>vgr,WebSocketMessageBodyReference:()=>Igr,WebSocketMessageId:()=>fHe,WebSocketMessageOrigin:()=>xgr,WebSocketName:()=>wgr,Webhook:()=>dgr,WebhookBodyHashAlgorithm:()=>agr,WebhookBodyHashBinding:()=>lgr,WebhookBodyHashLocation:()=>ugr,WebhookBodyHashQueryParameterLocation:()=>cgr,WebhookGroup:()=>mgr,WebhookGroupId:()=>gWe,WebhookHttpMethod:()=>Ghr,WebhookId:()=>Blr,WebhookName:()=>qhr,WebhookPayload:()=>Jhr,WebhookPayloadBodySort:()=>egr,WebhookPayloadComponent:()=>tgr,WebhookPayloadFormat:()=>lHe,WebhookPayloadReference:()=>Khr,WebhookSignatureEncoding:()=>yye,WebhookSignatureVerification:()=>fgr,WebhookTimestampConfig:()=>pHe,WebhookTimestampFormat:()=>ngr,WellKnownProtobufType:()=>rhr,WithContentType:()=>OU,WithDocs:()=>Xi,WithDocsAndAvailability:()=>uye,WithJsonExample:()=>bY,WithV2Examples:()=>ey,audience:()=>yMi,auth:()=>UMi,commons:()=>WMi,constants:()=>JMi,dynamic:()=>u0,environment:()=>zLi,errors:()=>VLi,examples:()=>u3i,generatorExec:()=>M3i,globalParameters:()=>U3i,http:()=>J4i,ir:()=>ZVi,proto:()=>e_i,publish:()=>r_i,types:()=>l_i,variables:()=>f_i,webhooks:()=>m_i,websocket:()=>g_i});var Wo=h(()=>{"use strict";R2a()});var k2a=h(()=>{"use strict";Jr();eka();Wo()});var Ln=h(()=>{"use strict";k2a();Jr();Wo()});var jP,F2a=h(()=>{"use strict";jP={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 j2e({type:e,_default:t,validation:r,visitor:n}){switch(e){case jP.integer:{let l=r??void 0;return n.primitive({v1:rs.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 jP.double:{let l=r??void 0;return n.primitive({v1:rs.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 jP.string:{let l=r??void 0;return n.primitive({v1:rs.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 jP.float:return n.primitive({v1:rs.Float,v2:void 0});case jP.long:{let l=r??void 0;return n.primitive({v1:rs.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 jP.boolean:return n.primitive({v1:rs.Boolean,v2:ti.boolean({default:t??void 0})});case jP.datetime:return n.primitive({v1:rs.DateTime,v2:void 0});case jP.datetimeRfc2822:return n.primitive({v1:rs.DateTimeRfc2822,v2:ti.dateTimeRfc2822({})});case jP.date:return n.primitive({v1:rs.Date,v2:void 0});case jP.uuid:return n.primitive({v1:rs.Uuid,v2:void 0});case jP.base64:return n.primitive({v1:rs.Base64,v2:void 0});case jP.bigint:return n.primitive({v1:rs.BigInteger,v2:ti.bigInteger({default:t??void 0})});case jP.uint:return n.primitive({v1:rs.Uint,v2:void 0});case jP.uint64:return n.primitive({v1:rs.Uint64,v2:void 0});case jP.unknown:return n.unknown()}let i=e.match(Ej.MAP);if(i?.[1]!=null&&i[2]!=null)return n.map({keyType:i[1],valueType:i[2]});let o=e.match(Ej.LIST);if(o?.[1]!=null)return n.list(o[1]);let s=e.match(Ej.SET);if(s?.[1]!=null)return n.set(s[1]);let a=e.match(Ej.OPTIONAL);if(a?.[1]!=null)return n.optional(a[1]);let c=e.match(Ej.NULLABLE);if(c?.[1]!=null)return n.nullable(c[1]);let u=e.match(Ej.LITERAL);if(u?.[1]!=null)return n.literal(a0.string(u[1]));if(u?.[2]!=null){let l=u[2];switch(l){case"false":return n.literal(a0.boolean(!1));case"true":return n.literal(a0.boolean(!0));default:throw new Error(`Unsupported literal value: ${l}`)}}return n.named(e)}var Ej,AHe=h(()=>{"use strict";Ln();F2a();Ej={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 PU(e){if(e===N2a)return{isOptional:!1};if(e.match(Ej.OPTIONAL)?.[1]===N2a)return{isOptional:!0}}var N2a,y_i=h(()=>{"use strict";AHe();N2a="bytes"});function jDt(e){let t=typeof e=="string"?e:typeof e.body=="string"?e.body:void 0;if(t!=null)return PU(t)}var j2a=h(()=>{"use strict";y_i()});function b_i({input:e,typeName:t}){for(let r of e.arguments)if(typeof r=="string"){if(r===t)return!0}else if(b_i({input:r,typeName:t}))return!0;return!1}var Q2a=h(()=>{"use strict"});function z2a(e){return b_i({input:e,typeName:"file"})}var M2a=h(()=>{"use strict";Q2a()});function L2a(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 U2a=h(()=>{"use strict"});function V2a(e){return e.match(Ej.LIST)?.[1]===E_i}function Ij(e){if(e===E_i)return{isOptional:!1,isArray:!1};let t=e.match(Ej.OPTIONAL);if(t?.[1]!==void 0){if(t[1]===E_i)return{isOptional:!0,isArray:!1};if(V2a(t[1]))return{isOptional:!0,isArray:!0}}if(V2a(e))return{isOptional:!1,isArray:!0}}var E_i,I_i=h(()=>{"use strict";AHe();E_i="file"});function Wpf(e){return typeof e=="string"?!1:Df.parse(e["content-type"])?.isMultiPartFormData()??!1?!0:e.body==null?!1:!!(Eg(e.body)&&Object.values(e.body.properties??[]).some(Kpf))}function Q2e(e){if(!(!Wpf(e)||e.body==null)&&e.name!=null&&e.body!=null&&Eg(e.body))return Hpf(e.name,e.body)}function Hpf(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=Ij(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 Kpf(e){let t=typeof e=="string"?e:e.type;if(t==="file")return!0;if(!t.includes("file"))return!1;let r=L2a(t);return r==null?!1:z2a(r)}var _2a=h(()=>{"use strict";Dt();M2a();U2a();nzi();I_i()});function z2e(e){if(e===G2a)return{isOptional:!1};if(e.match(Ej.OPTIONAL)?.[1]===G2a)return{isOptional:!0}}var G2a,q2a=h(()=>{"use strict";AHe();G2a="text"});function gv({type:e,_default:t,validation:r,visitor:n}){return j2e({type:e,_default:t,validation:r,visitor:{primitive:n.primitive,map:({keyType:i,valueType:o})=>n.map({keyType:gv({type:i,_default:void 0,validation:void 0,visitor:n}),valueType:gv({type:o,_default:void 0,validation:void 0,visitor:n})}),list:i=>n.list(gv({type:i,_default:void 0,validation:void 0,visitor:n})),set:i=>n.set(gv({type:i,_default:void 0,validation:void 0,visitor:n})),optional:i=>n.optional(gv({type:i,_default:t,validation:r,visitor:n})),nullable:i=>n.nullable(gv({type:i,_default:t,validation:r,visitor:n})),literal:n.literal,named:n.named,unknown:n.unknown}})}var W2a=h(()=>{"use strict";AHe()});function v_i(e,t){if(Jpf(e))return t.sdk(e);if(Ypf(e))return t.language(e);Ee(e)}function Jpf(e){return e.sdk!=null}function Ypf(e){return e.language!=null}var H2a=h(()=>{"use strict";Dt()});function K2a(e){return e["response-stream"]!=null&&(typeof e["response-stream"]=="string"||e["response-stream"].format==null||e["response-stream"].format==="json")}var J2a=h(()=>{"use strict"});function Y2a(e){return e["response-stream"]!=null&&typeof e["response-stream"]!="string"&&e["response-stream"].format==="sse"}var X2a=h(()=>{"use strict"});function M2e(e,t,r){return Xpf(e,t)?r.stream(t):Zpf(e,t)?r.events(t):r.body(t)}function Xpf(e,t){return t.stream!==void 0&&K2a(e)}function Zpf(e,t){return t.stream!==void 0&&Y2a(e)}var Z2a=h(()=>{"use strict";J2a();X2a()});function L2e(e,t){if($2a(e))return t.single(e);if(eNa(e))return t.any(e);if($pf(e))return t.endpointSecurity(e);Ee(e)}function $2a(e){return typeof e=="string"||e.scheme!=null}function eNa(e){let[t,...r]=Object.keys(e);return t==="any"&&r.length===0}function $pf(e){let[t,...r]=Object.keys(e);return t==="endpoint-security"&&r.length===0}var tNa=h(()=>{"use strict";Dt()});function U2e(e,t){if(rNa(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 rNa(e){return e.header!=null}var nNa=h(()=>{"use strict";Dt()});function wY(e,t){if(iNa(e))return t.singleBaseUrl(e);if(QP(e))return t.multipleBaseUrls(e);Ee(e)}function iNa(e){return typeof e=="string"||"url"in e}function QP(e){return typeof e!="string"&&"urls"in e}var oNa=h(()=>{"use strict";Dt()});function uue(e){return typeof e=="string"?e.startsWith("$"):"variable"in e}var sNa=h(()=>{"use strict"});function Av(e,t){if(bye(e))return t.alias(e);if(DU(e))return t.discriminatedUnion(e);if(ef(e))return t.object(e);if(yHe(e))return t.undiscriminatedUnion(e);if(l7(e))return t.enum(e);Ee(e)}function bye(e){return typeof e=="string"||e.type!=null}function ef(e){return e.extends!=null||e.properties!=null}function DU(e){return e.union!=null&&e.discriminated==null}function yHe(e){let t=e;return t.union!=null&&t.discriminated!=null}function l7(e){return e.enum!=null}var aNa=h(()=>{"use strict";Dt()});var No=h(()=>{"use strict";lCa();fCa();gCa();ACa();yCa();nzi();bCa();ECa();j2a();_2a();y_i();I_i();q2a();W2a();H2a();Z2a();tNa();nNa();oNa();sNa();aNa();AHe()});var f7,S_i=h(()=>{"use strict";f7=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 hNa=h(()=>{"use strict"});function bHe(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 Eye(e){if(typeof e.raw?.config=="object"&&e.raw?.config!==null){let t=e.raw.config["user-agent"];if(t!=null)return t}}function cff(e){if(!Array.isArray(e))return O_i;let t=e.filter(r=>typeof r=="string").map(r=>r.toUpperCase()).filter(r=>aff.has(r));return t.length>0?t:O_i}function Iye(e){let t=e.idempotencyKeyGenerationConfig??uff(e);return lff(t)}function uff(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 lff(e){if(e===!0)return{headerName:gNa,methods:O_i};if(typeof e=="object"&&e!==null){let t=e["header-name"];return{headerName:typeof t=="string"?t:gNa,methods:cff(e.methods)}}}function EHe(e){if(typeof e!="object"||e===null)return e;let t={};for(let[r,n]of Object.entries(e))pff.has(r)||(t[r]=n);return t}async function uAr({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??bHe(r);if(r.language==null||o==null)return;let s=r.language,a;try{a=await fff({packageName:o,version:e,language:s})}catch(c){n.logger.debug(`Could not verify version availability on ${T_i(s)}: ${Mn(c)}`);return}a&&(i?n.failAndThrow(`Version ${e} of ${o} already exists on the ${T_i(s)} registry. Please use a different version number. If you want to automatically increment the version, omit the --version flag.`,void 0,{code:P.Code.VersionError}):n.logger.warn(`Version ${e} of ${o} already exists on the ${T_i(s)} registry. If your CI pipeline publishes this version, it may fail.`))}async function fff({packageName:e,version:t,language:r}){switch(r){case"typescript":return await dff(e,t);case"python":return await mff(e,t);case"java":return await hff(e,t);case"csharp":return await gff(e,t);case"ruby":return await Aff(e,t);case"go":return await yff(e,t);case"rust":return await bff(e,t);default:return!1}}async function dff(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(V2e)});return o.ok?(await o.json()).version===t:!1}async function mff(e,t){return(await fetch(`https://pypi.org/pypi/${e}/${t}/json`,{signal:AbortSignal.timeout(V2e)})).ok}async function hff(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(V2e)});return o.ok?((await o.json()).response?.numFound??0)>0:!1}async function gff(e,t){let r=await fetch(`https://api.nuget.org/v3-flatcontainer/${e.toLowerCase()}/index.json`,{signal:AbortSignal.timeout(V2e)});return r.ok?((await r.json()).versions??[]).some(o=>o.toLowerCase()===t.toLowerCase()):!1}async function Aff(e,t){return(await fetch(`https://rubygems.org/api/v2/rubygems/${e}/versions/${t}.json`,{signal:AbortSignal.timeout(V2e)})).ok}async function yff(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(V2e)});return i.ok?(await i.json()).Version!=null:!1}async function bff(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(V2e)});return r.ok?(await r.json()).version?.num===t:!1}function T_i(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 gNa,O_i,aff,pff,V2e,ANa=h(()=>{"use strict";Dt();Qt();gNa="Idempotency-Key",O_i=["POST","PUT"],aff=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);pff=new Set(["user-agent","auto-generate-idempotency-key"]);V2e=5e3});var yNa=b(Y6=>{"use strict";var Eff=Y6&&Y6.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y6,"__esModule",{value:!0});var Iff=require("fs"),vff=Eff(EA()),IHe=vff.default("@kwsites/file-exists");function xff(e,t,r){IHe("checking %s",e);try{let n=Iff.statSync(e);return n.isFile()&&t?(IHe("[OK] path represents a file"),!0):n.isDirectory()&&r?(IHe("[OK] path represents a directory"),!0):(IHe("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return IHe("[FAIL] path is not accessible: %o",n),!1;throw IHe("[FATAL] %o",n),n}}function Cff(e,t=Y6.READABLE){return xff(e,(t&Y6.FILE)>0,(t&Y6.FOLDER)>0)}Y6.exists=Cff;Y6.FILE=1;Y6.FOLDER=2;Y6.READABLE=Y6.FILE+Y6.FOLDER});var B_i=b(lAr=>{"use strict";function wff(e){for(var t in e)lAr.hasOwnProperty(t)||(lAr[t]=e[t])}Object.defineProperty(lAr,"__esModule",{value:!0});wff(yNa())});function vHe(...e){let t=new String(e);return P_i.set(t,e),t}function kU(e){return e instanceof String&&P_i.has(e)}function xHe(e){return P_i.get(e)??[]}var P_i,vye=h(()=>{"use strict";P_i=new WeakMap});var zDt=b(_2e=>{"use strict";Object.defineProperty(_2e,"__esModule",{value:!0});_2e.createDeferred=_2e.deferred=void 0;function D_i(){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}}}_2e.deferred=D_i;_2e.createDeferred=D_i;_2e.default=D_i});function*bNa(e,t){let r=t==="global";for(let n of e)n.isGlobal===r&&(yield n)}function Pff(e,t){for(let{name:n}of bNa(e,"task")){if(Sff.has(n))return CHe(!0,t);if(Tff.has(n))return CHe(!1,t)}let r=t.at(0)?.toLowerCase();return r===void 0?null:Off.has(r)?CHe(!0,t.slice(1)):Bff.has(r)?CHe(!1,t.slice(1)):t.length===1?CHe(!1,t):CHe(!0,t)}function CHe(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 Dff(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function Rff(e){let t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function kff(e){for(let{name:t}of bNa(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 Fff({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*Nff(e){for(let t of e){let r=Fff(t),n=r&&Rff(t.value);n&&(yield{...n,scope:r})}}function jff(e,t,r){let n={read:[],write:[...Nff(t)]};return e==="config"&&Qff(n,kff(t),Pff(t,r)),n}function Qff(e,t,r){if(r===null)return;let n=Dff(t,r);r.isWrite?e.write.push(n):e.read.push(n)}function Uff(e){let t=Mff[e??""]??Lff;return{short:new Map([...ENa.short.entries(),...t.short.entries()]),long:t.long}}function INa(e,t=zff){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 Vff(e,t.short)}function Vff(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 _ff(e,t=[]){let r=0;for(;r<e.length;){let n=String(e[r]);if(!n.startsWith("-")||n.length<2)break;let i=INa(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 Gff(e,t,r=[]){let n=Uff(t),i=[],o=[],s=0;for(;s<e.length;){let a=e[s];if(kU(a)){o.push(...xHe(a)),s++;continue}let c=String(a);if(c==="--"){for(let p=s+1;p<e.length;p++){let d=e[p];kU(d)?o.push(...xHe(d)):o.push(String(d))}break}if(!c.startsWith("-")||c.length<2){i.push(c),s++;continue}let u=INa(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&&!kU(e[l])&&(d.value=String(e[l]),d.absorbedNext=!0,l++),r.push(d)}s=l}return{flags:r,positionals:i,pathspecs:o}}function*qff({write:e}){for(let t of e)for(let r of Wff){let n=r(t.key);n&&(yield n)}}function NU(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 FU(e,t){let r=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return NU(r,t,e)}function*Hff(e,t){for(let r of t)for(let n of Kff){let i=n(e,r.name);i&&(yield i)}}function MDt(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 vNa(e,t,r){return[...Hff(e,t),...qff(r)]}function Jff(...e){let{flags:t,taskIndex:r}=_ff(e),n=r<e.length?String(e[r]).toLowerCase():null,i=n!==null?e.slice(r+1):[],{positionals:o,pathspecs:s}=Gff(i,n,t),a=jff(n,t,o);return{task:n,flags:t.map(Xff),paths:s,config:a,vulnerabilities:Yff(vNa(n,t,a))}}function Yff(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function Xff({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}function*Zff(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*$ff(e){for(let t of Object.keys(e))if(CNa(t)){let r=xNa[t];yield{category:r,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${r}`}}}function CNa(e){return Object.hasOwn(xNa,e)}function edf(e){let t={};for(let[r,n]of Object.entries(e)){let i=r.toLowerCase().trim();(CNa(i)||i.startsWith("git"))&&(t[i]=String(n))}return t}function tdf(e){let t=edf(e),r={read:[],write:[...Zff(t)]},n=[...$ff(t),...vNa(null,[],r)];return{config:r,vulnerabilities:n}}function wNa(e,t){return[...Jff(...e).vulnerabilities,...tdf(t).vulnerabilities]}var Sff,Tff,Off,Bff,ENa,zff,Mff,Lff,Wff,Kff,xNa,SNa=h(()=>{"use strict";vye();Sff=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),Tff=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),Off=new Set(["edit","remove-section","rename-section","set","unset"]),Bff=new Set(["get","get-color","get-colorbool","list"]);ENa={short:new Map([["c",!0]])},zff={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...ENa.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},Mff={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"])}},Lff={short:new Map,long:new Set};Wff=[NU("alias","allowUnsafeAlias"),NU("core.askPass","allowUnsafeAskPass"),NU("core.editor","allowUnsafeEditor"),NU("core.fsmonitor","allowUnsafeFsMonitor"),NU("core.gitProxy","allowUnsafeGitProxy"),NU("core.hooksPath","allowUnsafeHooksPath"),NU("core.pager","allowUnsafePager"),NU("core.sshCommand","allowUnsafeSshCommand"),FU("credential.helper","allowUnsafeCredentialHelper"),FU("diff.command","allowUnsafeDiffExternal"),NU("diff.external","allowUnsafeDiffExternal"),FU("diff.textconv","allowUnsafeDiffTextConv"),FU("filter.clean","allowUnsafeFilter"),FU("filter.smudge","allowUnsafeFilter"),FU("gpg.program","allowUnsafeGpgProgram"),NU("init.templateDir","allowUnsafeTemplateDir"),FU("merge.driver","allowUnsafeMergeDriver"),FU("mergetool.path","allowUnsafeMergeDriver"),FU("mergetool.cmd","allowUnsafeMergeDriver"),FU("protocol.allow","allowUnsafeProtocolOverride"),FU("remote.receivepack","allowUnsafePack"),FU("remote.uploadpack","allowUnsafePack"),NU("sequence.editor","allowUnsafeEditor")];Kff=[MDt(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),MDt("clone",/^-\w*u/,"allowUnsafePack"),MDt("clone","--u","allowUnsafePack"),MDt("push","--exec","allowUnsafePack"),MDt(null,"--template","allowUnsafeTemplateDir")];xNa={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 sja(e){return typeof e!="function"?W2e:e}function aja(e){return typeof e=="function"&&e!==W2e}function cja(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function uja(e,t=0){return lja(e)&&e.length>t?e[t]:void 0}function q2e(e,t=0){if(lja(e)&&e.length>t)return e[e.length-1-t]}function lja(e){return CAr(e)}function GDt(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 t5i(e,t){return GDt(e,!0).map(r=>t(r))}function r5i(e){return(0,EAr.exists)(e,EAr.FOLDER)}function jU(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function pja(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function IAr(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function TY(e){return Array.isArray(e)?e:[e]}function fja(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function BHe(e){return TY(e).map(t=>t instanceof String?t:String(t))}function ry(e,t=0){if(e==null)return t;let r=parseInt(e,10);return Number.isNaN(r)?t:r}function UDt(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function VDt(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function dja(e,t){let r={};return t.forEach(n=>{e[n]!==void 0&&(r[n]=e[n])}),r}function z_i(e=0){return new Promise(t=>setTimeout(t,e))}function M_i(e){if(e!==!1)return e}function zP(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function L_i(e,t){let r=kU(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function xAr(e){return!!e&&qDt(e)==="[object Object]"}function mja(e){return typeof e=="function"}function cdf(){throw new Error("LineParser:useMatches not implemented")}function Aja(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...yja},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}function i5i(e,t=[]){return xAr(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];if(kU(i))r.push(i);else if(L_i(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let o of i)L_i(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function Yk(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 i5i(o5i(e),n),r||n.push(...pdf(e)),n}function pdf(e){let t=typeof q2e(e)=="function";return BHe(zP(q2e(e,t?1:0),WDt,[]))}function o5i(e){let t=mja(q2e(e));return zP(q2e(e,t?1:0),xAr)}function l0(e,t=!0){let r=sja(q2e(e));return t||aja(r)?r:void 0}function V_i(e,t){return e(t.stdOut,t.stdErr)}function xj(e,t,r,n=!0){return TY(r).forEach(i=>{for(let o=GDt(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 mdf(e){switch(e){case"bare":return vja();case"root":return Ija()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:wAr,parser:s5i}}function Ija(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:wAr,parser(t){return/^\.(git)?$/.test(t.trim())}}}function vja(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:wAr,parser:s5i}}function hdf(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}function gdf(e,t){let r=new Cja(e),n=e?Sja:wja;return GDt(t).forEach(i=>{let o=i.replace(n,"");r.paths.push(o),(Tja.test(o)?r.folders:r.files).push(o)}),r}function Oja(e){return{commands:SAr,format:"empty",parser:e}}function vj(e){return{commands:SAr,format:"empty",parser(){throw typeof e=="string"?new ija(e):e}}}function Xk(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function Bja(e){return{commands:e,format:"buffer",parser(t){return t}}}function Pja(e){return e.format==="buffer"}function Dja(e){return e.format==="empty"||!e.commands.length}function ydf(e,t){let{cleanMode:r,options:n,valid:i}=Edf(e);return r?i.options?(n.push(...t),n.some(xdf)?vj(a5i):kja(r,n)):vj(u5i+JSON.stringify(e)):vj(c5i)}function kja(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return gdf(e==="n",n)}}}function bdf(e){return Array.isArray(e)&&e.every(t=>l5i.has(t))}function Edf(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{Idf(i)?(t=i,n.cleanMode=!0):n.options=n.options&&vdf(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function Idf(e){return e==="f"||e==="n"}function vdf(e){return/^-[a-z]$/i.test(e)&&l5i.has(e.charAt(1))}function xdf(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}function Cdf(e){let t=new jja;for(let r of Nja(e))t.addValue(r.file,String(r.key),r.value);return t}function wdf(e,t){let r=null,n=[],i=new Map;for(let o of Nja(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 Sdf(e){return e.replace(/^(file):/,"")}function*Nja(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;n<i;){let o=Sdf(r[n++]),s=r[n++],a=t;if(s.includes(`
|
|
102
102
|
`)){let c=cja(s,`
|
|
103
103
|
`);a=c[0],s=c[1]}yield{file:o,key:a,value:s}}}function R_i(e,t){return typeof e=="string"&&Object.hasOwn(q_i,e)?e:t}function Odf(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 Bdf(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 wdf(n,e)}}}function Pdf(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return Cdf(r)}}}function Ddf(){return{addConfig(e,t,...r){return this._runTask(Odf(e,t,r[0]===!0,R_i(r[1],"local")),l0(arguments))},getConfig(e,t){return this._runTask(Bdf(e,R_i(t,void 0)),l0(arguments))},listConfig(...e){return this._runTask(Pdf(R_i(e[0],void 0)),l0(arguments))}}}function Rdf(e){return zja.has(e)}function kdf(...e){return new Uja().param(...e)}function Fdf(e){let t=new Set,r={};return t5i(e,n=>{let[i,o,s]=n.split(SHe);t.add(i),(r[i]=r[i]||[]).push({line:ry(o),path:i,preview:s})}),{paths:t,results:r}}function Ndf(){return{grep(e){let t=l0(arguments),r=Yk(arguments);for(let i of Lja)if(r.includes(i))return this._runTask(vj(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=kdf().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return Fdf(i)}},t)}}}function jdf(e,t){let r=["reset"];return Gja(e)&&r.push(`--${e}`),r.push(...t),Xk(r)}function Qdf(e){if(Gja(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Gja(e){return typeof e=="string"&&qja.includes(e)}function zdf(){return(0,yAr.default)("simple-git")}function ONa(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 Mdf(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 p5i(e,t,r,n=zdf()){let i=e&&`[${e}]`||"",o=[],s=typeof t=="string"?n.extend(t):t,a=Mdf(zP(t,gI),s,n);return u(r);function c(l,p){return jU(o,p5i(e,a.replace(/^[^:]+/,l),p,n))}function u(l){let p=l&&`[${l}]`||"",d=s&&ONa(s,p)||W2e,f=ONa(n,`${i} ${p}`,d);return Object.assign(s?d:f,{label:e,sibling:c,info:f,step:u})}}function G2e(e,t){return{method:uja(e.commands)||"",commands:t}}function Udf(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function BNa(e,t,r,n){return i=>{r("%s received %L bytes",t,i),n("%B",i),e.push(i)}}function Gdf(e,t,r=W2e){let n=o=>{r(null,o)},i=o=>{o?.task===e&&r(o instanceof _Dt?qdf(o):o,void 0)};t.then(n,i)}function qdf(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=W2e};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 PNa(e,t){return Oja(r=>{if(!r5i(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}function F_i(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=IAr(t,"-B")),Xk(t)}function Kdf(){return{checkout(){return this._runTask(F_i(Yk(arguments,1)),l0(arguments))},checkoutBranch(e,t){return this._runTask(F_i(["-b",e,t,...Yk(arguments)]),l0(arguments))},checkoutLocalBranch(e){return this._runTask(F_i(["-b",e,...Yk(arguments)]),l0(arguments))}}}function Ydf(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Xdf(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return xj(Ydf(),[Zja],e)}})}}}function $df(e){return xj({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},$ja,e)}function tmf(e,t,r){return{commands:["-c","core.abbrev=40","commit",...UDt(e,"-m"),...t,...r],format:"utf-8",parser:$df}}function rmf(){return{commit(t,...r){let n=l0(arguments),i=e(t)||tmf(TY(t),TY(zP(r[0],gAr,[])),[...BHe(zP(r[1],WDt,[])),...Yk(arguments,0,!0)]);return this._runTask(i,n)}};function e(t){return!gAr(t)&&vj("git.commit: requires the commit message to be supplied as a string/string[]")}}function imf(){return{firstCommit(){return this._runTask(Xk(["rev-list","--max-parents=0","HEAD"],!0),l0(arguments))}}}function smf(e,t){let r=["hash-object",e];return t&&r.push("-w"),Xk(r,!0)}function cmf(e,t,r){let n=String(r).trim(),i;if(i=eQa.exec(n))return new mAr(e,t,!1,i[1]);if(i=tQa.exec(n))return new mAr(e,t,!0,i[1]);let o="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){o=s.join(" ");break}return new mAr(e,t,/^re/i.test(n),o)}function lmf(e){return e.includes(f5i)}function pmf(e=!1,t,r){let n=["init",...r];return e&&!lmf(n)&&n.splice(1,0,f5i),{commands:n,format:"utf-8",parser(i){return cmf(n.includes("--bare"),t,i)}}}function d5i(e){for(let t=0;t<e.length;t++){let r=m5i.exec(e[t]);if(r)return`--${r[1]}`}return""}function dmf(e){return m5i.test(e)}function nQa(e=""){let t=iQa[e];return r=>xj(new rQa,t,r,!1)}function hmf(e,t){return t.reduce((r,n,i)=>(r[n]=e[i]||"",r),Object.create({diff:null}))}function sQa(e=A5i,t=aQa,r=""){let n=nQa(r);return function(i){let o=GDt(i.trim(),!1,h5i).map(function(s){let a=s.split(g5i),c=hmf(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 gmf(e){let t=d5i(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),TAr(r)||{commands:r,format:"utf-8",parser:nQa(t)}}function TAr(e){let t=e.filter(dmf);if(t.length>1)return vj(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return vj(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}function Amf(e,t){let r=[],n=[];return Object.keys(e).forEach(i=>{r.push(i),n.push(String(e[i]))}),[r,n.join(t)]}function ymf(e){return Object.keys(e).reduce((t,r)=>(r in K_i||(t[r]=e[r]),t),{})}function lQa(e={},t=[]){let r=zP(e.splitter,gI,A5i),n=xAr(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]=Amf(n,r),s=[],a=[`--pretty=format:${h5i}${o}${g5i}`,...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 gI(e.file)&&a.push("--follow",vHe(e.file)),i5i(ymf(e),a),{fields:i,splitter:r,commands:[...a,...s]}}function bmf(e,t,r){let n=sQa(e,t,d5i(r));return{commands:["log",...r],format:"utf-8",parser:n}}function Emf(){return{log(...r){let n=l0(arguments),i=lQa(o5i(arguments),BHe(zP(arguments[0],WDt,[]))),o=t(...r)||TAr(i.commands)||e(i);return this._runTask(o,n)}};function e(r){return bmf(r.splitter,r.fields,r.commands)}function t(r,n){return gI(r)&&gI(n)&&vj("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}function j_i(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 FNa(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:ry(t&&t[1]||"0"),delta:ry(r&&r[1]||"0")}}function hQa(e,t){return xj({remoteMessages:new AQa},gQa,t)}function Cmf(e,t){let r=xj(new dQa,bQa,[e,t]);return r.message&&r}function VNa(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=IQa(t,r);if(n.failed)throw new _Dt(n);return n}}:vj("Git.merge requires at least one option")}function Tmf(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 Bmf(e={},t){return jU(t,"--tags"),E5i(e,t)}function E5i(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),IAr(r,"-v"),jU(r,"--verbose"),jU(r,"--porcelain"),{commands:r,format:"utf-8",parser:vQa}}function Pmf(){return{showBuffer(){let e=["show",...Yk(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(Bja(e),l0(arguments))},show(){let e=["show",...Yk(arguments,1)];return this._runTask(Xk(e),l0(arguments))}}}function WNa(e){let[t,r]=e.split(SHe);return{from:r||t,to:t}}function X6(e,t,r){return[`${e}${t}`,r]}function Q_i(e,...t){return t.map(r=>X6(e,r,(n,i)=>n.conflicted.push(i)))}function kmf(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=SQa.get(a);c&&c(e,s),a!=="##"&&a!=="!!"&&e.files.push(new wQa(s,i,o))}}function Nmf(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!OQa.includes(r))],parser(r){return TQa(r)}}}function bAr(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 Qmf(){return bAr(0,0,0,"",!1)}function zmf(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Mmf,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(I5i));n(t)}})}}}function Mmf(e){return e===I5i?Qmf():xj(bAr(0,0,0,e),BQa,e)}function KNa(e,t,r,...n){return gI(r)?t(r,zP(n[0],gI),Yk(arguments)):vj(`git.${e}() requires a string 'repoPath'`)}function Umf(){return{clone(e,...t){return this._runTask(KNa("clone",Y_i,zP(e,gI),...t),l0(arguments))},mirror(e,...t){return this._runTask(KNa("mirror",PQa,zP(e,gI),...t),l0(arguments))}}}function qmf(e,t){return Xk(["apply",...t,...e])}function Hmf(e,t){return{branch:e,hash:t,success:!0}}function Kmf(e){return{branch:e,hash:null,success:!1}}function QQa(e,t){return t===1&&Z_i.test(e)}function ZNa(e){return e?e.charAt(0):""}function MQa(e,t=!1){return xj(new zQa,t?[UQa]:LQa,e)}function _Qa(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function $mf(e){let t=_Qa(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?OAr(i,o).all[0]:MQa(i,r)}}}function ehf(){return{format:"utf-8",commands:["branch","-v"],parser(e){return MQa(e)}}}function thf(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return OAr(r,n)},onError({exitCode:r,stdOut:n},i,o,s){if(!QQa(String(i),r))return s(i);o(n)}}}function rhf(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,i){return OAr(n,i).branches[e]},onError({exitCode:n,stdErr:i,stdOut:o},s,a,c){if(!QQa(String(s),n))return c(s);throw new _Dt(r.parser(VDt(o),VDt(i)),String(s))}};return r}function ihf(e){let t=e.trim().replace(/^["']|["']$/g,"");return t&&(0,GQa.normalize)(t)}function shf(e){return{commands:["check-ignore",...e],format:"utf-8",parser:qQa}}function chf(e,t){return xj({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},HQa,[e,t])}function lhf(e){return/^--upload-pack(=|$)/.test(e)}function phf(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(lhf)?vj("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:chf}}function dhf(e){return xj({moves:[]},JQa,e)}function hhf(e,t){return{commands:["mv","-v",...TY(e),t],format:"utf-8",parser:dhf}}function Ahf(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 b5i(i,o)},onError(i,o,s,a){let c=Cmf(VDt(i.stdOut),VDt(i.stdErr));if(c)return a(new _Dt(c));a(o)}}}function bhf(e){let t={};return ZQa(e,([r])=>t[r]={name:r}),Object.values(t)}function Ehf(e){let t={};return ZQa(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 ZQa(e,t){t5i(e,r=>t(r.split(/\s+/)))}function vhf(e,t,r){return Xk(["remote","add",...r,e,t])}function xhf(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?Ehf:bhf}}function Chf(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),Xk(t)}function whf(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),Xk(t)}function Shf(e){return Xk(["remote","remove",e])}function Ohf(e={},t){let r=lQa(e),n=["stash","list",...r.commands,...t],i=sQa(r.splitter,r.fields,d5i(n));return TAr(n)||{commands:n,format:"utf-8",parser:i}}function Phf(e,t){return BAr(["add",e,t])}function Dhf(e){return BAr(["init",...e])}function BAr(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),Xk(t)}function Rhf(e){return BAr(["update",...e])}function Fhf(e,t){let r=Number.isNaN(e),n=Number.isNaN(t);return r!==n?r?1:-1:r?rza(e,t):0}function rza(e,t){return e===t?0:e>t?1:-1}function Nhf(e){return e.trim()}function pAr(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}function Qhf(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return nza(r,t)}}}function zhf(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function Mhf(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}function _hf(e){return e?[{type:"spawn.before",action(n,i){e.aborted&&i.kill(new THe(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,i){function o(){i.kill(new THe(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),i.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function Ghf(e={}){return{type:"spawn.args",action(t,{env:r}){for(let n of wNa(t,r))if(e[n.category]!==!0)throw new THe(void 0,"unsafe",n.message);return t}}}function qhf(e){let t=UDt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}function Whf({onClose:e=!0,onExit:t=50}={}){function r(){let i=-1,o={close:(0,wHe.deferred)(),closeTimeout:(0,wHe.deferred)(),exit:(0,wHe.deferred)(),exitTimeout:(0,wHe.deferred)()},s=Promise.race([e===!1?eja:o.closeTimeout.promise,t===!1?eja: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(()=>z_i(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 z_i(50),s(a.exitCode)}catch(l){s(a.exitCode,l)}}}}function Khf(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function rja(e,t){if(e.length<1||e.length>2)throw new THe(void 0,"binary",Hhf);if(e.some(Khf))if(t)console.warn(tja);else throw new THe(void 0,"binary",tja);let[n,i]=e;return{binary:n,prefix:i}}function Jhf(e,t=["git"],r=!1){let n=rja(TY(t),r);e.on("binary",i=>{n=rja(TY(i),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}function Yhf(e){return!!(e.exitCode&&e.stdErr.length)}function Xhf(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Zhf(e=!1,t=Yhf,r=Xhf){return(n,i)=>!e&&n||!t(i)?n:r(i)}function nja(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 lue(void 0,n.toString("utf-8"))}:{error:n}}}}function egf(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,s){return r.includes(s.method)?pja(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:tgf(c[1]),progress:ry(c[2]),processed:ry(c[3]),total:ry(c[4])})})}}]}function tgf(e){return String(e.toLowerCase().split(" ",1))||"unknown"}function rgf(e){let t=dja(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function ngf({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 THe(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 igf(){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(kU(o)){n(xHe(o));continue}if(o==="--"){n(e.slice(i+1).flatMap(s=>kU(s)&&xHe(s)||s));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}function sgf(e,t){let r=new $hf,n=Aja(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!r5i(n.baseDir))throw new Vhf(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(qhf(n.config)),r.add(Ghf(n.unsafe)),r.add(Whf(n.completion)),n.abort&&r.add(_hf(n.abort)),n.progress&&r.add(egf(n.progress)),n.timeout&&r.add(ngf(n.timeout)),n.spawnOptions&&r.add(rgf(n.spawnOptions)),r.add(igf()),r.add(nja(Zhf(!0))),n.errors&&r.add(nja(n.errors)),Jhf(r,n.binary,n.unsafe?.allowUnsafeCustomBinary),new ogf(n,r)}var EAr,yAr,Jja,kQa,GQa,wHe,oza,$_i,rdf,e5i,ndf,yo,idf,Nx,odf,yv,lue,Cye,_Dt,OHe,ija,oja,SHe,W2e,qDt,vAr,WDt,hja,gI,gAr,CAr,n5i,U_i,sdf,AAr,adf,Sl,xye,udf,yja,ldf,fdf,ddf,bja,Tu,Eja,__i,wAr,s5i,xja,Cja,wja,Sja,Tja,Adf,G_i,SAr,bv,Rja,a5i,c5i,u5i,fAr,l5i,Fja,jja,Tdf,q_i,Qja,k_i,zja,Mja,Lja,LDt,TNa,Uja,Vja,_ja,dAr,qja,Wja,Hja,Kja,Ldf,H_i,Vdf,Yja,Xja,_df,Wdf,Hdf,Jdf,Zja,Zdf,$ja,emf,nmf,omf,amf,mAr,eQa,tQa,umf,f5i,fmf,m5i,HDt,rQa,mmf,N_i,DNa,RNa,kNa,iQa,oQa,h5i,g5i,A5i,aQa,cQa,uQa,y5i,K_i,pQa,hAr,fQa,Imf,J_i,dQa,vmf,mQa,xmf,gQa,AQa,yQa,NNa,jNa,QNa,zNa,bQa,MNa,b5i,EQa,LNa,IQa,UNa,wmf,Smf,_Na,vQa,GNa,Omf,xQa,CQa,Dmf,qNa,wQa,Rmf,HNa,SQa,TQa,Fmf,OQa,jmf,I5i,BQa,Lmf,Y_i,PQa,Vmf,DQa,X_i,_mf,RQa,JNa,FQa,Gmf,NQa,Wmf,jQa,Jmf,YNa,Z_i,XNa,OAr,Ymf,zQa,Xmf,LQa,UQa,Zmf,VQa,nhf,qQa,ohf,WQa,ahf,HQa,uhf,KQa,fhf,JQa,mhf,YQa,ghf,XQa,yhf,Ihf,$Qa,Thf,eza,Bhf,tza,khf,$Na,nza,jhf,iza,Lhf,Uhf,Vhf,THe,eja,Hhf,tja,$hf,ogf,H2e,PAr=h(()=>{"use strict";EAr=be(B_i(),1);vye();vye();yAr=be(EA(),1),Jja=require("child_process");vye();vye();kQa=be(zDt(),1),GQa=require("path");vye();SNa();wHe=be(zDt(),1),oza=require("events");vye();$_i=Object.defineProperty,rdf=Object.getOwnPropertyDescriptor,e5i=Object.getOwnPropertyNames,ndf=Object.prototype.hasOwnProperty,yo=(e,t)=>function(){return e&&(t=(0,e[e5i(e)[0]])(e=0)),t},idf=(e,t)=>function(){return t||(0,e[e5i(e)[0]])((t={exports:{}}).exports,t),t.exports},Nx=(e,t)=>{for(var r in t)$_i(e,r,{get:t[r],enumerable:!0})},odf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of e5i(t))!ndf.call(e,i)&&i!==r&&$_i(e,i,{get:()=>t[i],enumerable:!(n=rdf(t,i))||n.enumerable});return e},yv=e=>odf($_i({},"__esModule",{value:!0}),e),Cye=yo({"src/lib/errors/git-error.ts"(){"use strict";lue=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),OHe=yo({"src/lib/errors/git-response-error.ts"(){"use strict";Cye(),_Dt=class extends lue{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),oja=yo({"src/lib/errors/task-configuration-error.ts"(){"use strict";Cye(),ija=class extends lue{constructor(e){super(void 0,e)}}}});vAr=yo({"src/lib/utils/util.ts"(){"use strict";n5i(),SHe="\0",W2e=()=>{},qDt=Object.prototype.toString.call.bind(Object.prototype.toString)}});n5i=yo({"src/lib/utils/argument-filters.ts"(){"use strict";vAr(),WDt=e=>Array.isArray(e),hja=e=>typeof e=="number",gI=e=>typeof e=="string"||kU(e),gAr=e=>gI(e)||Array.isArray(e)&&e.every(gI),CAr=e=>e==null||"number|boolean|function".includes(typeof e)?!1:typeof e.length=="number"}}),sdf=yo({"src/lib/utils/exit-codes.ts"(){"use strict";U_i=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(U_i||{})}}),adf=yo({"src/lib/utils/git-output-streams.ts"(){"use strict";AAr=class gja{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new gja(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});udf=yo({"src/lib/utils/line-parser.ts"(){"use strict";Sl=class{constructor(e,t){this.matches=[],this.useMatches=cdf,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))}},xye=class extends Sl{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)}}}});ldf=yo({"src/lib/utils/simple-git-options.ts"(){"use strict";yja={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});fdf=yo({"src/lib/utils/task-options.ts"(){"use strict";n5i(),vAr()}});ddf=yo({"src/lib/utils/task-parser.ts"(){"use strict";vAr()}}),bja={};Nx(bja,{ExitCodes:()=>U_i,GitOutputStreams:()=>AAr,LineParser:()=>Sl,NOOP:()=>W2e,NULL:()=>SHe,RemoteLineParser:()=>xye,append:()=>jU,appendTaskOptions:()=>i5i,asArray:()=>TY,asCamelCase:()=>fja,asFunction:()=>sja,asNumber:()=>ry,asStringArray:()=>BHe,bufferToString:()=>VDt,callTaskParser:()=>V_i,createInstanceConfig:()=>Aja,delay:()=>z_i,filterArray:()=>WDt,filterFunction:()=>mja,filterHasLength:()=>CAr,filterNumber:()=>hja,filterPlainObject:()=>xAr,filterPrimitives:()=>L_i,filterString:()=>gI,filterStringOrStringArray:()=>gAr,filterType:()=>zP,first:()=>uja,folderExists:()=>r5i,forEachLineWithContent:()=>t5i,getTrailingOptions:()=>Yk,including:()=>pja,isUserFunction:()=>aja,last:()=>q2e,objectToString:()=>qDt,orVoid:()=>M_i,parseStringResponse:()=>xj,pick:()=>dja,prefixedArray:()=>UDt,remove:()=>IAr,splitOn:()=>cja,toLinesWithContent:()=>GDt,trailingFunctionArgument:()=>l0,trailingOptionsArgument:()=>o5i});Tu=yo({"src/lib/utils/index.ts"(){"use strict";n5i(),sdf(),adf(),udf(),ldf(),fdf(),ddf(),vAr()}}),Eja={};Nx(Eja,{CheckRepoActions:()=>__i,checkIsBareRepoTask:()=>vja,checkIsRepoRootTask:()=>Ija,checkIsRepoTask:()=>mdf});xja=yo({"src/lib/tasks/check-is-repo.ts"(){"use strict";Tu(),__i=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(__i||{}),wAr=({exitCode:e},t,r,n)=>{if(e===128&&hdf(t))return r(Buffer.from("false"));n(t)},s5i=e=>e.trim()==="true"}});Adf=yo({"src/lib/responses/CleanSummary.ts"(){"use strict";Tu(),Cja=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},wja=/^[a-z]+\s*/i,Sja=/^[a-z]+\s+[a-z]+\s*/i,Tja=/\/$/}}),G_i={};Nx(G_i,{EMPTY_COMMANDS:()=>SAr,adhocExecTask:()=>Oja,configurationErrorTask:()=>vj,isBufferTask:()=>Pja,isEmptyTask:()=>Dja,straightThroughBufferTask:()=>Bja,straightThroughStringTask:()=>Xk});bv=yo({"src/lib/tasks/task.ts"(){"use strict";oja(),SAr=[]}}),Rja={};Nx(Rja,{CONFIG_ERROR_INTERACTIVE_MODE:()=>a5i,CONFIG_ERROR_MODE_REQUIRED:()=>c5i,CONFIG_ERROR_UNKNOWN_OPTION:()=>u5i,CleanOptions:()=>fAr,cleanTask:()=>kja,cleanWithOptionsTask:()=>ydf,isCleanOptionsArray:()=>bdf});Fja=yo({"src/lib/tasks/clean.ts"(){"use strict";Adf(),Tu(),bv(),a5i="Git clean interactive mode is not supported",c5i='Git clean mode parameter ("n" or "f") is required',u5i="Git clean unknown option found in: ",fAr=(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))(fAr||{}),l5i=new Set(["i",...BHe(Object.values(fAr))])}});Tdf=yo({"src/lib/responses/ConfigList.ts"(){"use strict";Tu(),jja=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=q2e(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}}}});Qja=yo({"src/lib/tasks/config.ts"(){"use strict";Tdf(),Tu(),q_i=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(q_i||{})}});Mja=yo({"src/lib/tasks/diff-name-status.ts"(){"use strict";k_i=(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))(k_i||{}),zja=new Set(Object.values(k_i))}});Vja=yo({"src/lib/tasks/grep.ts"(){"use strict";Tu(),bv(),Lja=["-h"],LDt=Symbol("grepQuery"),Uja=class{constructor(){this[TNa]=[]}*[(TNa=LDt,Symbol.iterator)](){for(let e of this[LDt])yield e}and(...e){return e.length&&this[LDt].push("--and","(",...UDt(e,"-e"),")"),this}param(...e){return this[LDt].push(...UDt(e,"-e")),this}}}}),_ja={};Nx(_ja,{ResetMode:()=>dAr,getResetMode:()=>Qdf,resetTask:()=>jdf});Wja=yo({"src/lib/tasks/reset.ts"(){"use strict";Tu(),bv(),dAr=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(dAr||{}),qja=BHe(Object.values(dAr))}});Hja=yo({"src/lib/git-logger.ts"(){"use strict";Tu(),yAr.default.formatters.L=e=>String(CAr(e)?e.length:"-"),yAr.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):qDt(e)}}),Ldf=yo({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";Cye(),Hja(),Kja=class W_i{constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let r=W_i.getName(t.commands[0]),n=p5i(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 lue(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(t="empty"){return`task:${t}:${++W_i.counter}`}static{this.counter=0}}}});Vdf=yo({"src/lib/runners/git-executor-chain.ts"(){"use strict";Cye(),bv(),Tu(),Ldf(),H_i=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Kja}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(Dja(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 lue?Object.assign(t,{task:e}):new lue(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","",G2e(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],{...G2e(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),Pja(e)?V_i(e.parser,o):V_i(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},{...G2e(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",qDt(p)),c(new AAr(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 AAr(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},G2e(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,{...G2e(e,r),kill(d){l=d||l}});let p=(0,Jja.spawn)(t,r,s);p.stdout.on("data",BNa(c,"stdOut",i,o.step("stdOut"))),p.stderr.on("data",BNa(u,"stdErr",i,o.step("stdErr"))),p.on("error",Udf(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,{...G2e(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,{...G2e(e,t),kill(n){r=n||r}}),r}}}}),Yja={};Nx(Yja,{GitExecutor:()=>Xja});_df=yo({"src/lib/runners/git-executor.ts"(){"use strict";Vdf(),Xja=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new H_i(this,this._scheduler,this._plugins)}chain(){return new H_i(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});Wdf=yo({"src/lib/task-callback.ts"(){"use strict";OHe(),Tu()}});Hdf=yo({"src/lib/tasks/change-working-directory.ts"(){"use strict";Tu(),bv()}});Jdf=yo({"src/lib/tasks/checkout.ts"(){"use strict";Tu(),bv()}});Zdf=yo({"src/lib/tasks/count-objects.ts"(){"use strict";Tu(),Zja=new Sl(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=fja(t);Object.hasOwn(e,n)&&(e[n]=ry(r))})}});emf=yo({"src/lib/parsers/parse-commit.ts"(){"use strict";Tu(),$ja=[new Sl(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new Sl(/\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 Sl(/(\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 Sl(/^(\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)})]}});nmf=yo({"src/lib/tasks/commit.ts"(){"use strict";emf(),Tu(),bv()}});omf=yo({"src/lib/tasks/first-commit.ts"(){"use strict";Tu(),bv()}});amf=yo({"src/lib/tasks/hash-object.ts"(){"use strict";bv()}});umf=yo({"src/lib/responses/InitSummary.ts"(){"use strict";mAr=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},eQa=/^Init.+ repository in (.+)$/,tQa=/^Rein.+ in (.+)$/}});fmf=yo({"src/lib/tasks/init.ts"(){"use strict";umf(),f5i="--bare"}});HDt=yo({"src/lib/args/log-format.ts"(){"use strict";m5i=/^--(stat|numstat|name-only|name-status)(=|$)/}}),mmf=yo({"src/lib/responses/DiffSummary.ts"(){"use strict";rQa=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});oQa=yo({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";HDt(),mmf(),Mja(),Tu(),N_i=[new Sl(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:ry(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new Sl(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:ry(r),after:ry(n),binary:!0})}),new Sl(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=ry(t),e.insertions=ry(n?.[1]),e.deletions=ry(i?.[1])})],DNa=[new Sl(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let i=ry(t),o=ry(r);e.changed++,e.insertions+=i,e.deletions+=o,e.files.push({file:n,changes:i+o,insertions:i,deletions:o,binary:!1})}),new Sl(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],RNa=[new Sl(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],kNa=[new Sl(/([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:M_i(Rdf(t)&&t),from:M_i(!!o&&n!==o&&n),similarity:ry(r)})})],iQa={"":N_i,"--stat":N_i,"--numstat":DNa,"--name-status":kNa,"--name-only":RNa}}});cQa=yo({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";Tu(),oQa(),HDt(),h5i="\xF2\xF2\xF2\xF2\xF2\xF2 ",g5i=" \xF2\xF2",A5i=" \xF2 ",aQa=["hash","date","message","refs","author_name","author_email"]}}),uQa={};Nx(uQa,{diffSummaryTask:()=>gmf,validateLogFormatConfig:()=>TAr});y5i=yo({"src/lib/tasks/diff.ts"(){"use strict";HDt(),oQa(),bv()}});pQa=yo({"src/lib/tasks/log.ts"(){"use strict";HDt(),cQa(),Tu(),bv(),y5i(),K_i=(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))(K_i||{})}}),Imf=yo({"src/lib/responses/MergeSummary.ts"(){"use strict";hAr=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},fQa=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"}}}}),vmf=yo({"src/lib/responses/PullSummary.ts"(){"use strict";J_i=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},dQa=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});xmf=yo({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";Tu(),mQa=[new xye(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=j_i(e.remoteMessages);Object.assign(i,{[n]:ry(r)})}),new xye(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=j_i(e.remoteMessages);Object.assign(i,{[n]:ry(r)})}),new xye(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let i=j_i(e.remoteMessages);i.total=FNa(t),i.reused=FNa(r),i.packReused=ry(n)})]}});yQa=yo({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";Tu(),xmf(),gQa=[new xye(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...mQa,new xye([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new xye([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:ry(t),summary:r,url:n}})],AQa=class{constructor(){this.all=[]}}}});EQa=yo({"src/lib/parsers/parse-pull.ts"(){"use strict";vmf(),Tu(),yQa(),NNa=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,jNa=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,QNa=/^(create|delete) mode \d+ (.+)/,zNa=[new Sl(NNa,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new Sl(jNa,(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 Sl(QNa,(e,[t,r])=>{jU(e.files,r),jU(t==="create"?e.created:e.deleted,r)})],bQa=[new Sl(/^from\s(.+)$/i,(e,[t])=>{e.remote=t}),new Sl(/^fatal:\s(.+)$/,(e,[t])=>{e.message=t}),new Sl(/([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})],MNa=(e,t)=>xj(new J_i,zNa,[e,t]),b5i=(e,t)=>Object.assign(new J_i,MNa(e,t),hQa(e,t))}}),wmf=yo({"src/lib/parsers/parse-merge.ts"(){"use strict";Imf(),Tu(),EQa(),LNa=[new Sl(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new Sl(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new hAr(t,r))}),new Sl(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new hAr(t,r,{deleteRef:n}))}),new Sl(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new hAr(t,null))}),new Sl(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],IQa=(e,t)=>Object.assign(UNa(e,t),b5i(e,t)),UNa=e=>xj(new fQa,LNa,e)}});Smf=yo({"src/lib/tasks/merge.ts"(){"use strict";OHe(),wmf(),bv()}});Omf=yo({"src/lib/parsers/parse-push.ts"(){"use strict";Tu(),yQa(),_Na=[new Sl(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new Sl(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new Sl(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(Tmf(t,r,n))}),new Sl(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:n}}),new Sl(/^([^:]+):(\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}}})],vQa=(e,t)=>{let r=GNa(e,t),n=hQa(e,t);return{...r,...n}},GNa=(e,t)=>xj({pushed:[]},_Na,[e,t])}}),xQa={};Nx(xQa,{pushTagsTask:()=>Bmf,pushTask:()=>E5i});CQa=yo({"src/lib/tasks/push.ts"(){"use strict";Omf(),Tu()}});Dmf=yo({"src/lib/tasks/show.ts"(){"use strict";Tu(),bv()}}),Rmf=yo({"src/lib/responses/FileStatusSummary.ts"(){"use strict";qNa=/^(.+)\0(.+)$/,wQa=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=qNa.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});Fmf=yo({"src/lib/responses/StatusSummary.ts"(){"use strict";Tu(),Rmf(),HNa=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}},SQa=new Map([X6(" ","A",(e,t)=>e.created.push(t)),X6(" ","D",(e,t)=>e.deleted.push(t)),X6(" ","M",(e,t)=>e.modified.push(t)),X6("A"," ",(e,t)=>{e.created.push(t),e.staged.push(t)}),X6("A","M",(e,t)=>{e.created.push(t),e.staged.push(t),e.modified.push(t)}),X6("D"," ",(e,t)=>{e.deleted.push(t),e.staged.push(t)}),X6("M"," ",(e,t)=>{e.modified.push(t),e.staged.push(t)}),X6("M","M",(e,t)=>{e.modified.push(t),e.staged.push(t)}),X6("R"," ",(e,t)=>{e.renamed.push(WNa(t))}),X6("R","M",(e,t)=>{let r=WNa(t);e.renamed.push(r),e.modified.push(r.to)}),X6("!","!",(e,t)=>{(e.ignored=e.ignored||[]).push(t)}),X6("?","?",(e,t)=>e.not_added.push(t)),...Q_i("A","A","U"),...Q_i("D","D","U"),...Q_i("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=zP(a?.[1],gI,null),a=o.exec(t),e.tracking=zP(a?.[1],gI,null),a=s.exec(t),a&&(e.current=zP(a?.[1],gI,e.current)),e.detached=/\(no branch\)/.test(t)}]]),TQa=function(e){let t=e.split(SHe),r=new HNa;for(let n=0,i=t.length;n<i;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=SHe+(t[n++]||"")),kmf(r,o))}return r}}});jmf=yo({"src/lib/tasks/status.ts"(){"use strict";Fmf(),OQa=["--null","-z"]}});Lmf=yo({"src/lib/tasks/version.ts"(){"use strict";Tu(),I5i="installed=false",BQa=[new Sl(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,i=""])=>{Object.assign(e,bAr(ry(t),ry(r),ry(n),i))}),new Sl(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,i=""])=>{Object.assign(e,bAr(ry(t),ry(r),n,i))})]}});Vmf=yo({"src/lib/tasks/clone.ts"(){"use strict";bv(),Tu(),Y_i=(e,t,r)=>{let n=["clone",...r];return gI(e)&&n.push(vHe(e)),gI(t)&&n.push(vHe(t)),Xk(n)},PQa=(e,t,r)=>(jU(r,"--mirror"),Y_i(e,t,r))}}),DQa={};Nx(DQa,{SimpleGitApi:()=>X_i});_mf=yo({"src/lib/simple-git-api.ts"(){"use strict";Wdf(),Hdf(),Jdf(),Zdf(),nmf(),Qja(),omf(),Vja(),amf(),fmf(),pQa(),Smf(),CQa(),Dmf(),jmf(),bv(),Lmf(),Tu(),Vmf(),X_i=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&Gdf(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(Xk(["add",...TY(e)]),l0(arguments))}cwd(e){let t=l0(arguments);return typeof e=="string"?this._runTask(PNa(e,this._executor),t):typeof e?.path=="string"?this._runTask(PNa(e.path,e.root&&this._executor||void 0),t):this._runTask(vj("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(smf(e,t===!0),l0(arguments))}init(e){return this._runTask(pmf(e===!0,this._executor.cwd,Yk(arguments)),l0(arguments))}merge(){return this._runTask(VNa(Yk(arguments)),l0(arguments))}mergeFromTo(e,t){return gI(e)&&gI(t)?this._runTask(VNa([e,t,...Yk(arguments)]),l0(arguments,!1)):this._runTask(vj("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=E5i({remote:zP(arguments[0],gI),branch:zP(arguments[1],gI)},Yk(arguments));return this._runTask(e,l0(arguments))}stash(){return this._runTask(Xk(["stash",...Yk(arguments)]),l0(arguments))}status(){return this._runTask(Nmf(Yk(arguments)),l0(arguments))}},Object.assign(X_i.prototype,Kdf(),Umf(),rmf(),Ddf(),Xdf(),imf(),Ndf(),Emf(),Pmf(),zmf())}}),RQa={};Nx(RQa,{Scheduler:()=>FQa});Gmf=yo({"src/lib/runners/scheduler.ts"(){"use strict";Tu(),Hja(),JNa=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,kQa.createDeferred)();return{promise:t,done:r,id:e}}})(),FQa=class{constructor(e=2){this.concurrency=e,this.logger=p5i("","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=jU(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),IAr(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=jU(this.pending,JNa());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),NQa={};Nx(NQa,{applyPatchTask:()=>qmf});Wmf=yo({"src/lib/tasks/apply-patch.ts"(){"use strict";bv()}});Jmf=yo({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";jQa=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});Ymf=yo({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";Jmf(),Tu(),YNa=/(\S+)\s+\(\S+\s([^)]+)\)/,Z_i=/^error[^']+'([^']+)'/m,XNa=[new Sl(YNa,(e,[t,r])=>{let n=Hmf(t,r);e.all.push(n),e.branches[t]=n}),new Sl(Z_i,(e,[t])=>{let r=Kmf(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],OAr=(e,t)=>xj(new jQa,XNa,[e,t])}}),Xmf=yo({"src/lib/responses/BranchSummary.ts"(){"use strict";zQa=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}}}}});Zmf=yo({"src/lib/parsers/parse-branch.ts"(){"use strict";Xmf(),Tu(),LQa=[new Sl(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,i])=>{e.push(ZNa(t),!0,r,n,i)}),new Sl(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,n,i])=>{e.push(ZNa(t),!1,r,n,i)})],UQa=new Sl(/^(\S+)$/s,(e,[t])=>{e.push("*",!1,t,"","")})}}),VQa={};Nx(VQa,{branchLocalTask:()=>ehf,branchTask:()=>$mf,containsDeleteBranchCommand:()=>_Qa,deleteBranchTask:()=>rhf,deleteBranchesTask:()=>thf});nhf=yo({"src/lib/tasks/branch.ts"(){"use strict";OHe(),Ymf(),Zmf(),Tu()}});ohf=yo({"src/lib/responses/CheckIgnore.ts"(){"use strict";qQa=e=>e.split(/\n/g).map(ihf).filter(Boolean)}}),WQa={};Nx(WQa,{checkIgnoreTask:()=>shf});ahf=yo({"src/lib/tasks/check-ignore.ts"(){"use strict";ohf()}});uhf=yo({"src/lib/parsers/parse-fetch.ts"(){"use strict";Tu(),HQa=[new Sl(/From (.+)$/,(e,[t])=>{e.remote=t}),new Sl(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new Sl(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new Sl(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new Sl(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,i])=>{e.updated.push({name:n,tracking:i,to:r,from:t})})]}}),KQa={};Nx(KQa,{fetchTask:()=>phf});fhf=yo({"src/lib/tasks/fetch.ts"(){"use strict";uhf(),bv()}});mhf=yo({"src/lib/parsers/parse-move.ts"(){"use strict";Tu(),JQa=[new Sl(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),YQa={};Nx(YQa,{moveTask:()=>hhf});ghf=yo({"src/lib/tasks/move.ts"(){"use strict";mhf(),Tu()}}),XQa={};Nx(XQa,{pullTask:()=>Ahf});yhf=yo({"src/lib/tasks/pull.ts"(){"use strict";OHe(),EQa(),Tu()}});Ihf=yo({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";Tu()}}),$Qa={};Nx($Qa,{addRemoteTask:()=>vhf,getRemotesTask:()=>xhf,listRemotesTask:()=>Chf,remoteTask:()=>whf,removeRemoteTask:()=>Shf});Thf=yo({"src/lib/tasks/remote.ts"(){"use strict";Ihf(),bv()}}),eza={};Nx(eza,{stashListTask:()=>Ohf});Bhf=yo({"src/lib/tasks/stash-list.ts"(){"use strict";HDt(),cQa(),y5i(),pQa()}}),tza={};Nx(tza,{addSubModuleTask:()=>Phf,initSubModuleTask:()=>Dhf,subModuleTask:()=>BAr,updateSubModuleTask:()=>Rhf});khf=yo({"src/lib/tasks/sub-module.ts"(){"use strict";bv()}});jhf=yo({"src/lib/responses/TagList.ts"(){"use strict";$Na=class{constructor(e,t){this.all=e,this.latest=t}},nza=function(e,t=!1){let r=e.split(`
|
|
@@ -3081,7 +3081,7 @@ ${uPu.default.cursorShow}`)}releaseCursor(){this.extraLinesUnderPrompt>0&&g2o(th
|
|
|
3081
3081
|
`+aLe.default.red(">> ")+t),this.screen.render(r,n)}getMaskedValue(t){return this.status==="answered"?this.opt.mask?aLe.default.cyan(yPu(t,this.opt.mask)):aLe.default.italic(aLe.default.dim("[hidden]")):this.opt.mask?yPu(t,this.opt.mask):aLe.default.italic(aLe.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 $9r=be(kw(),1);var ADu=be(X2o(),1),X9r=require("child_process"),Ynt=require("fs"),Y9r=be(require("path"),1),yDu=be(require("os"),1),bDu=require("crypto"),NNo=be(hDu(),1);var H9r=class extends Error{originalError;constructor(t){super(`Failed to create temporary file. ${t.message}`),this.originalError=t}};var bUt=class extends Error{originalError;constructor(t){super(`Failed to launch editor. ${t.message}`),this.originalError=t}};var K9r=class extends Error{originalError;constructor(t){super(`Failed to read temporary file. ${t.message}`),this.originalError=t}};var J9r=class extends Error{originalError;constructor(t){super(`Failed to remove temporary file. ${t.message}`),this.originalError=t}};function Z9r(e="",t,r){let n=new jNo(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 gDu(e){return e?e.replace(/[^a-zA-Z0-9_.-]/g,"_"):""}function mdm(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 jNo=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=mdm(t).map(i=>i.replace("\\ "," ")),n=r.shift();this.editor={args:r,bin:n}}createTemporaryFile(){try{let t=this.fileOptions.dir??yDu.default.tmpdir(),r=(0,bDu.randomUUID)(),n=gDu(this.fileOptions.prefix),i=gDu(this.fileOptions.postfix),o=`${n}${r}${i}`,s=Y9r.default.resolve(t,o),a=Y9r.default.resolve(t)+Y9r.default.sep;if(!s.startsWith(a))throw new Error("Resolved temporary file escaped the base directory");this.tempFile=s;let c={encoding:"utf8",flag:"wx"};Object.prototype.hasOwnProperty.call(this.fileOptions,"mode")&&(c.mode=this.fileOptions.mode),(0,Ynt.writeFileSync)(this.tempFile,this.text,c)}catch(t){throw new H9r(t)}}readTemporaryFile(){try{let t=(0,Ynt.readFileSync)(this.tempFile);if(t.length===0)this.text="";else{let r=(0,ADu.detect)(t)??"utf8";NNo.default.encodingExists(r)||(r="utf8"),this.text=NNo.default.decode(t,r)}}catch(t){throw new K9r(t)}}removeTemporaryFile(){try{(0,Ynt.unlinkSync)(this.tempFile)}catch(t){throw new J9r(t)}}launchEditor(){try{let t=(0,X9r.spawnSync)(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"});this.lastExitStatus=t.status??0}catch(t){throw new bUt(t)}}launchEditorAsync(t){try{(0,X9r.spawn)(this.editor.bin,this.editor.args.concat([this.tempFile]),{stdio:"inherit"}).on("exit",n=>{this.lastExitStatus=n,setImmediate(t)})}catch(r){throw new bUt(r)}}};var EDu=be(JL(),1);var EUt=class extends Fw{_run(t){this.done=t,this.editorResult=new EDu.Subject;let r=IB(this.rl);this.lineSubscription=r.line.subscribe(this.startExternalEditor.bind(this));let n=this.opt.waitUserInput===void 0?!0:this.opt.waitUserInput,i=this.handleSubmitEvents(this.editorResult);return i.success.forEach(this.onEnd.bind(this)),i.error.forEach(this.onError.bind(this)),this.currentText=this.opt.default,this.opt.default=null,n?this.render():this.startExternalEditor(),this}render(t){let r="",n=this.getQuestion();n+=this.status==="answered"?$9r.default.dim("Received"):$9r.default.dim("Press <enter> to launch your preferred editor."),t&&(r=$9r.default.red(">> ")+t),this.screen.render(n,r)}startExternalEditor(){this.rl.pause(),Z9r(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 wDu=require("stream");var xDu=be(require("readline"),1),CDu=be(vDu(),1),pLe=class{constructor(t){this.rl||=xDu.default.createInterface(gdm(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 gdm(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 CDu.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}var IUt=class extends pLe{constructor(t={}){super(t),this.log=new wDu.Writable({write:(r,n,i)=>{this.writeLog(r),i()}}),this.bottomBar=t.bottomBar||"",this.render()}render(){return this.write(this.bottomBar),this}clean(){return iUt(this.rl,this.bottomBar.split(`
|
|
3082
3082
|
`).length),this}updateBottomBar(t){return iUt(this.rl,1),this.rl.output.unmute(),this.clean(),this.bottomBar=t,this.render(),this.rl.output.mute(),this}writeLog(t){return this.rl.output.unmute(),this.clean(),this.rl.output.write(this.enforceLF(t.toString())),this.render(),this.rl.output.mute(),this}enforceLF(t){return/[\n\r]$/.test(t)?t:t+`
|
|
3083
3083
|
`}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&&I9r(this.rl,t.length+this.rl.line.length),this.rl.output.write(t)}};var Td=be(JL(),1),ODu=be(N4t(),1);var eGr=be(JL(),1),SDu=be(N4t(),1),tGr=function(e,t,r){return typeof e[t]!="function"?(0,eGr.of)(e):(0,eGr.from)((0,SDu.default)(e[t])(r).then(n=>(e[t]=n,e)))};var TDu={set:(e,t="",r)=>{let n=e;t.split(".").forEach((i,o,s)=>{i==="__proto__"||i==="constructor"||(o===s.length-1?n[i]=r:(!(i in n)||typeof n[i]!="object")&&(n[i]={}),n=n[i])})},get:(e,t="",r)=>{let n=o=>String.prototype.split.call(t,o).filter(Boolean).reduce((s,a)=>s!=null?s[a]:s,e),i=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return i===void 0||i===e?r:i}},Xnt=class extends pLe{constructor(t,r){super(r),this.prompts=t}run(t,r){this.answers=typeof r=="object"?{...r}:{};let n;return Array.isArray(t)?n=(0,Td.from)(t):(0,Td.isObservable)(t)?n=t:Object.values(t).every(i=>typeof i=="object"&&!Array.isArray(i)&&i!=null)?n=(0,Td.from)(Object.entries(t).map(([i,o])=>({name:i,...o}))):n=(0,Td.from)([t]),this.process=n.pipe((0,Td.concatMap)(this.processQuestion.bind(this)),(0,Td.publish)()),this.process.connect(),this.process.pipe((0,Td.reduce)((i,o)=>(TDu.set(i,o.name,o.answer),i),this.answers)).toPromise(Promise).then(this.onCompletion.bind(this),this.onError.bind(this))}onCompletion(){return this.close(),this.answers}onError(t){return this.close(),Promise.reject(t)}processQuestion(t){return t={...t},(0,Td.defer)(()=>(0,Td.of)(t).pipe((0,Td.concatMap)(this.setDefaultType.bind(this)),(0,Td.concatMap)(this.filterIfRunnable.bind(this)),(0,Td.concatMap)(()=>tGr(t,"message",this.answers)),(0,Td.concatMap)(()=>tGr(t,"default",this.answers)),(0,Td.concatMap)(()=>tGr(t,"choices",this.answers)),(0,Td.concatMap)(this.fetchAnswer.bind(this))))}fetchAnswer(t){let r=this.prompts[t.type];return this.activePrompt=new r(t,this.rl,this.answers),(0,Td.defer)(()=>(0,Td.from)(this.activePrompt.run().then(n=>({name:t.name,answer:n}))))}setDefaultType(t){return this.prompts[t.type]||(t.type="input"),(0,Td.defer)(()=>(0,Td.of)(t))}filterIfRunnable(t){if(t.askAnswered!==!0&&TDu.get(this.answers,t.name)!==void 0)return Td.EMPTY;if(t.when===!1)return Td.EMPTY;if(typeof t.when!="function")return(0,Td.of)(t);let{answers:r}=this;return(0,Td.defer)(()=>(0,Td.from)((0,ODu.default)(t.when)(r).then(n=>{if(n)return t})).pipe((0,Td.filter)(n=>n!=null)))}};function BDu(e){let t=function(r,n){let i;try{i=new Xnt(t.prompts,e)}catch(s){return Promise.reject(s)}let o=i.run(r,n);return o.ui=i,o};return t.prompts={},t.registerPrompt=function(r,n){return t.prompts[r]=n,this},t.restoreDefaultPrompts=function(){this.registerPrompt("list",sUt),this.registerPrompt("input",sLe),this.registerPrompt("number",aUt),this.registerPrompt("confirm",cUt),this.registerPrompt("rawlist",uUt),this.registerPrompt("expand",lUt),this.registerPrompt("checkbox",pUt),this.registerPrompt("password",fUt),this.registerPrompt("editor",EUt)},t.restoreDefaultPrompts(),t}var zNo=BDu();function ydm(e,t){zNo.registerPrompt(e,t)}function bdm(){zNo.restoreDefaultPrompts()}var Edm={prompt:zNo,ui:{BottomBar:IUt,Prompt:Xnt},createPromptModule:BDu,registerPrompt:ydm,restoreDefaultPrompts:bdm,Separator:QQ},cu=Edm;var Znt=require("path");function DDu(){let e=Idm();return async t=>{for(let r of t)r.module=e(r.filename);return t}}function Idm(e=process.argv[1]?(0,Znt.dirname)(process.argv[1]):process.cwd(),t=Znt.sep==="\\"){let r=t?PDu(e):e;return n=>{if(!n)return;let i=t?PDu(n):n,{dir:o,base:s,ext:a}=Znt.posix.parse(i);(a===".js"||a===".mjs"||a===".cjs")&&(s=s.slice(0,-1*a.length));let c=decodeURIComponent(s);o||(o=".");let u=o.lastIndexOf("/node_modules");if(u>-1)return`${o.slice(u+14).replace(/\//g,".")}:${c}`;if(o.startsWith(r)){let l=o.slice(r.length+1).replace(/\//g,".");return l?`${l}:${c}`:c}return c}}function PDu(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}var MNo=e=>{if("flags"in e){let t=RDu(e.flags),r=kDu(e.flags);return{...e,featureFlags:t,featureFlagPayloads:r}}{let t=e.featureFlags??{},r=Object.fromEntries(Object.entries(e.featureFlagPayloads||{}).map(([i,o])=>[i,LNo(o)])),n=Object.fromEntries(Object.entries(t).map(([i,o])=>[i,vdm(i,o,r[i])]));return{...e,featureFlags:t,featureFlagPayloads:r,flags:n}}};function vdm(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 RDu=e=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>[t,vUt(r)]).filter(([,t])=>t!==void 0)),kDu=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?LNo(n):void 0]}))};var vUt=e=>e===void 0?void 0:e.variant??e.enabled,LNo=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};var KF=(function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.LogsQueue="logs_queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e})({});function UNo(){return"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function"}var Cdm="NativeGzipValidationError",wdm=31,Sdm=139,Tdm=8,Odm=e=>e.length>=2&&e[0]===wdm&&e[1]===Sdm;var xUt,Bdm=()=>{if(xUt)return xUt;xUt=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;xUt[e]=t>>>0}return xUt},Pdm=e=>{let t=Bdm(),r=4294967295;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return(4294967295^r)>>>0},rGr=e=>{let t=new Error(`Native gzip produced invalid output: ${e}`);throw t.name=Cdm,t},Ddm=async(e,t)=>{e.size<18&&rGr("too-short");let r=new Uint8Array(await e.slice(0,10).arrayBuffer());(!Odm(r)||r[2]!==Tdm)&&rGr("invalid-header");let n=new DataView(await e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==Pdm(t)&&rGr("invalid-crc");let i=t.length>>>0;n.getUint32(4,!0)!==i&&rGr("invalid-size")};async function CUt(e,t=!0,r){try{let n=new TextEncoder().encode(e),i=new CompressionStream("gzip"),o=i.writable.getWriter(),s=o.write(n).then(()=>o.close()).catch(async u=>{try{await o.abort(u)}catch{}throw u}),a=new Response(i.readable).blob(),[c]=await Promise.all([a,s]);return await Ddm(c,n),c}catch(n){if(r?.rethrow)throw n;return t&&console.error("Failed to gzip compress data",n),null}}var Rdm=["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"],FDu=function(e,t=[]){if(!e)return!1;let r=e.toLowerCase();return Rdm.concat(t).some(n=>{let i=n.toLowerCase();return r.indexOf(i)!==-1})};var Fdm=Array.isArray,NDu=Object.prototype,TbI=NDu.hasOwnProperty,VNo=NDu.toString,$nt=Fdm||function(e){return VNo.call(e)==="[object Array]"};var wUt=e=>e===Object(e)&&!$nt(e);var eit=e=>e===void 0,Rve=e=>VNo.call(e)=="[object String]",jDu=e=>Rve(e)&&e.trim().length===0;var SUt=e=>VNo.call(e)=="[object Number]"&&e===e;var _No=e=>e instanceof Error;function nGr(e){return e===null||typeof e!="object"}function fLe(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function QDu(e){return fLe(e,"ErrorEvent")}function tit(e){return typeof Event<"u"&&Ndm(e,Event)}function zDu(e){return fLe(e,"Object")}function Ndm(e,t){try{return e instanceof t}catch{return!1}}function TUt(e,t,r,n,i){return t>r&&(n.warn("min cannot be greater than max."),t=r),SUt(e)?e>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e<t?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+i),TUt(i||r,t,r,n))}var jdm=864e5,iGr=class{constructor(t){this._buckets={},this._onBucketRateLimited=t._onBucketRateLimited,this._bucketSize=TUt(t.bucketSize,0,100,t._logger),this._refillRate=TUt(t.refillRate,0,this._bucketSize,t._logger),this._refillInterval=TUt(t.refillInterval,0,jdm,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 oGr="0123456789abcdef",sGr=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+=oGr.charAt(this.bytes[r]>>>4),t+=oGr.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+=oGr.charAt(this.bytes[r]>>>4),t+=oGr.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}},GNo=class{constructor(t){this.timestamp=0,this.counter=0,this.random=t??Qdm()}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 sGr.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,sGr.ofInner(t)}},Qdm=()=>({nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())}),MDu,fee=()=>zdm().toString(),zdm=()=>(MDu||(MDu=new GNo)).generate();var aGr=class{add(t){let r=fee();return this.promiseByIds[r]=t,t.catch(()=>{}).finally(()=>{delete this.promiseByIds[r]}),t}async join(){let t=Object.values(this.promiseByIds),r=t.length;for(;r>0;)await Promise.all(t),t=Object.values(this.promiseByIds),r=t.length}get length(){return Object.keys(this.promiseByIds).length}constructor(){this.promiseByIds={}}};function Mdm(e=console){return{log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e),debug:e.debug.bind(e)}}var LDu=(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=>LDu(`${e} ${o}`,t,r)}},Ldm=e=>e();function UDu(e,t=Ldm){return LDu(e,t,Mdm())}var nit="Mobile",uGr="iOS",rit="Android",VDu="Tablet",MbI=rit+" "+VDu;var Vdm="Apple",LbI=Vdm+" Watch",_Du="Safari",lGr="BlackBerry",GDu="Samsung",_dm=GDu+"Browser",Gdm=GDu+" Internet",pGr="Chrome",qdm=pGr+" OS",Wdm=pGr+" "+uGr,qDu="Internet Explorer",Hdm=qDu+" "+nit,WNo="Opera",UbI=WNo+" Mini",WDu="Edge",Kdm="Microsoft "+WDu,HNo="Firefox",Jdm=HNo+" "+uGr,KNo="Nintendo",JNo="PlayStation",cGr="Xbox",Ydm=rit+" "+nit,Xdm=nit+" "+_Du,OUt="Windows",Zdm=OUt+" Phone";var HDu="Generic",VbI=HDu+" "+nit.toLowerCase(),_bI=HDu+" "+VDu.toLowerCase(),$dm="Konqueror",emm="Oculus Browser",TD="(\\d+(\\.\\d+)?)",qNo=new RegExp("Version/"+TD),GbI=new RegExp(cGr,"i"),qbI=new RegExp(JNo+" \\w+","i"),WbI=new RegExp(KNo+" \\w+","i"),tmm=new RegExp(lGr+"|PlayBook|BB10","i"),rmm={"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 HbI={[Hdm]:[new RegExp("rv:"+TD)],[Kdm]:[new RegExp(WDu+"?\\/"+TD)],[pGr]:[new RegExp("("+pGr+"|CrMo)\\/"+TD)],[Wdm]:[new RegExp("CriOS\\/"+TD)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+TD)],[_Du]:[qNo],[Xdm]:[qNo],[WNo]:[new RegExp("("+WNo+"|OPR)\\/"+TD)],[HNo]:[new RegExp(HNo+"\\/"+TD)],[Jdm]:[new RegExp("FxiOS\\/"+TD)],[$dm]:[new RegExp("Konqueror[:/]?"+TD,"i")],[lGr]:[new RegExp(lGr+" "+TD),qNo],[Ydm]:[new RegExp("android\\s"+TD,"i")],[Gdm]:[new RegExp(_dm+"\\/"+TD)],[emm]:[new RegExp("OculusBrowser\\/"+TD)],[qDu]:[new RegExp("(rv:|MSIE )"+TD)],Mozilla:[new RegExp("rv:"+TD)]};var KbI=[[new RegExp(cGr+"; "+cGr+" (.*?)[);]","i"),e=>[cGr,e&&e[1]||""]],[new RegExp(KNo,"i"),[KNo,""]],[new RegExp(JNo,"i"),[JNo,""]],[tmm,[lGr,""]],[new RegExp(OUt,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Zdm,""];if(new RegExp(nit).test(t)&&!/IEMobile\b/.test(t))return[OUt+" "+nit,""];let r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){let n=r[1],i=rmm[n]||"";return/arm/i.test(t)&&(i="RT"),[OUt,i]}return[OUt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){let t=[e[3],e[4],e[5]||"0"];return[uGr,t.join(".")]}return[uGr,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t="";return e&&e.length>=3&&(t=eit(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+rit+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rit+")","i"),e=>{if(e&&e[2]){let t=[e[2],e[3],e[4]||"0"];return[rit,t.join(".")]}return[rit,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{let t=["Mac OS X",""];if(e&&e[1]){let r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[qdm,""]],[/Linux|debian/i,["Linux",""]]];var KDu="utf8";function JDu(e){return e?.replace(/\/+$/,"")}async function YDu(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 fGr(){return new Date().toISOString()}function dee(e,t){let r=setTimeout(e,t);return r?.unref&&r?.unref(),r}var XDu=e=>e instanceof Error;function YNo(e){return Promise.all(e.map(t=>(t??Promise.resolve()).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))}var nmm={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}},c0I=nmm.info;var dGr=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 mLe=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()}},dLe=class extends Error{constructor(t){super("Network error while fetching PostHog",t instanceof Error?{cause:t}:{}),this.error=t,this.name="PostHogFetchNetworkError"}};async function ZDu(e){if(e instanceof mLe){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 mGr(e){return typeof e=="object"&&(e instanceof mLe||e instanceof dLe)}function hGr(e){return typeof e=="object"&&e instanceof mLe&&e.status===413}var BUt=class{constructor(t,r={}){this.flushPromise=null,this.shutdownPromise=null,this.promiseQueue=new aGr,this._events=new dGr,this._isInitialized=!1;let n=typeof t=="string"?t.trim():"",i=typeof r.host=="string"?r.host.trim():"",o=!n;this._logger=UDu("[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=JDu(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:mGr},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=!UNo()||(r?.disableCompression??!1)}logMsgIfDebug(t){this.isDebug&&t()}wrap(t){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized)return t();this._initPromise.then(()=>t())}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}get optedOut(){return this.getPersistedProperty(KF.OptedOut)??!this.defaultOptIn}async optIn(){this.wrap(()=>{this.setPersistedProperty(KF.OptedOut,!1)})}async optOut(){this.wrap(()=>{this.setPersistedProperty(KF.OptedOut,!0)})}on(t,r){return this._events.on(t,r)}debug(t=!0){if(this.removeDebugCallback?.(),t){let r=this.on("*",(n,i)=>this._logger.info(n,i));this.removeDebugCallback=()=>{r(),this.removeDebugCallback=void 0}}}get isDebug(){return!!this.removeDebugCallback}get isDisabled(){return this.disabled}buildPayload(t){return{distinct_id:t.distinct_id,event:t.event,properties:{...t.properties||{},...this.getCommonEventProperties()}}}addPendingPromise(t){return this.promiseQueue.add(t)}identifyStateless(t,r,n){this.wrap(()=>{let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};this.enqueue("identify",i,n)})}async identifyStatelessImmediate(t,r,n){let i={...this.buildPayload({distinct_id:t,event:"$identify",properties:r})};await this.sendImmediate("identify",i,n)}captureStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({distinct_id:t,event:r,properties:n});this.enqueue("capture",o,i)})}async captureStatelessImmediate(t,r,n,i){let o=this.buildPayload({distinct_id:t,event:r,properties:n});await this.sendImmediate("capture",o,i)}aliasStateless(t,r,n,i){this.wrap(()=>{let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});this.enqueue("alias",o,i)})}async aliasStatelessImmediate(t,r,n,i){let o=this.buildPayload({event:"$create_alias",distinct_id:r,properties:{...n||{},distinct_id:r,alias:t}});await this.sendImmediate("alias",o,i)}groupIdentifyStateless(t,r,n,i,o,s){this.wrap(()=>{let a=this.buildPayload({distinct_id:o||`$${t}_${r}`,event:"$groupidentify",properties:{$group_type:t,$group_key:r,$group_set:n||{},...s||{}}});this.enqueue("capture",a,i)})}async getRemoteConfig(){await this._initPromise;let t=this.host;t==="https://us.i.posthog.com"?t="https://us-assets.i.posthog.com":t==="https://eu.i.posthog.com"&&(t="https://eu-assets.i.posthog.com");let r=`${t}/array/${this.apiKey}/config`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}};return this.fetchWithRetry(r,n,{retryCount:0},this.remoteConfigRequestTimeoutMs).then(i=>i.json()).catch(i=>{this._logger.error("Remote config could not be loaded",i),this._events.emit("error",i)})}async getFlags(t,r={},n={},i={},o={},s=!1){await this._initPromise;let a=s?"&config=true":"",c=`${this.host}/flags/?v=2${a}`,u={token:this.apiKey,distinct_id:t,groups:r,person_properties:n,group_properties:i,...o};n.$device_id&&(u.$device_id=n.$device_id),this.evaluationContexts&&this.evaluationContexts.length>0&&(u.evaluation_contexts=this.evaluationContexts);let l={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"},body:JSON.stringify(u)};return this._logger.info("Flags URL",c),this.fetchWithRetry(c,l,{retryCount:0},this.featureFlagsRequestTimeoutMs).then(p=>p.json()).then(p=>({success:!0,response:MNo(p)})).catch(p=>(this._events.emit("error",p),{success:!1,error:this.categorizeRequestError(p)}))}categorizeRequestError(t){if(t instanceof mLe)return{type:"api_error",statusCode:t.status};if(t instanceof dLe){let r=t.error;return r instanceof Error&&(r.name==="AbortError"||r.name==="TimeoutError")?{type:"timeout"}:{type:"connection_error"}}return{type:"unknown_error"}}async getFeatureFlagStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailStateless(t,r,n,i,o,s);if(a===void 0)return{response:void 0,requestId:void 0};let c=vUt(a.response);return c===void 0&&(c=!1),{response:c,requestId:a.requestId}}async getFeatureFlagDetailStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(r,n,i,o,s,[t]);return a===void 0?void 0:{response:a.flags[t],requestId:a.requestId,evaluatedAt:a.evaluatedAt}}async getFeatureFlagPayloadStateless(t,r,n={},i={},o={},s){await this._initPromise;let a=await this.getFeatureFlagPayloadsStateless(r,n,i,o,s,[t]);if(!a)return;let c=a[t];return c===void 0?null:c}async getFeatureFlagPayloadsStateless(t,r={},n={},i={},o,s){return await this._initPromise,(await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)).payloads}async getFeatureFlagsStateless(t,r={},n={},i={},o,s){return await this._initPromise,await this.getFeatureFlagsAndPayloadsStateless(t,r,n,i,o,s)}async getFeatureFlagsAndPayloadsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a=await this.getFeatureFlagDetailsStateless(t,r,n,i,o,s);return a?{flags:a.featureFlags,payloads:a.featureFlagPayloads,requestId:a.requestId}:{flags:void 0,payloads:void 0,requestId:void 0}}async getFeatureFlagDetailsStateless(t,r={},n={},i={},o,s){await this._initPromise;let a={};(o??this.disableGeoip)&&(a.geoip_disable=!0),s&&(a.flag_keys_to_evaluate=s);let c=await this.getFlags(t,r,n,i,a);if(!c.success)return;let u=c.response;return u.errorsWhileComputingFlags&&console.error("[FEATURE FLAGS] Error while computing feature flags, some flags may be missing or incorrect. Learn more at https://posthog.com/docs/feature-flags/best-practices"),u.quotaLimited?.includes("feature_flags")?(console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - feature flags unavailable. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),{flags:{},featureFlags:{},featureFlagPayloads:{},requestId:u?.requestId,quotaLimited:u.quotaLimited}):u}async getSurveysStateless(){if(await this._initPromise,this.disabled)return[];if(this.disableSurveys===!0)return this._logger.info("Loading surveys is disabled."),[];let t=`${this.host}/api/surveys/?token=${this.apiKey}`,r={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json"}},i=(await this.fetchWithRetry(t,r).then(o=>{if(o.status!==200||!o.json){let s=`Surveys API could not be loaded: ${o.status}`,a=new Error(s);this._logger.error(a),this._events.emit("error",new Error(s));return}return o.json()}).catch(o=>{this._logger.error("Surveys API could not be loaded",o),this._events.emit("error",o)}))?.surveys;return i&&this._logger.info("Surveys fetched from API: ",JSON.stringify(i)),i??[]}get props(){return this._props||(this._props=this.getPersistedProperty(KF.Props)),this._props||{}}set props(t){this._props=t}async register(t){this.wrap(()=>{this.props={...this.props,...t},this.setPersistedProperty(KF.Props,this.props)})}async unregister(t){this.wrap(()=>{delete this.props[t],this.setPersistedProperty(KF.Props,this.props)})}processBeforeEnqueue(t){return t}async flushStorage(){}enqueue(t,r,n){this.wrap(()=>{if(this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let i=this.prepareMessage(t,r,n);if(i=this.processBeforeEnqueue(i),i===null)return;let o=this.getPersistedProperty(KF.Queue)||[];o.length>=this.maxQueueSize&&(o.shift(),this._logger.info("Queue is full, the oldest event is dropped.")),o.push({message:i}),this.setPersistedProperty(KF.Queue,o),this._events.emit(t,i),o.length>=this.flushAt&&this.flushBackground(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=dee(()=>this.flushBackground(),this.flushInterval))})}async sendImmediate(t,r,n){if(this.disabled)return void this._logger.warn("The client is disabled");if(this._isInitialized||await this._initPromise,this.optedOut)return void this._events.emit(t,"Library is disabled. Not sending event. To re-enable, call posthog.optIn()");let i=this.prepareMessage(t,r,n);if(i=this.processBeforeEnqueue(i),i===null)return;let o={api_key:this.apiKey,batch:[i],sent_at:fGr()};this.historicalMigration&&(o.historical_migration=!0);let s=JSON.stringify(o),a=`${this.host}/batch/`,c=this.disableCompression?null:await CUt(s,this.isDebug),u={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...c!==null&&{"Content-Encoding":"gzip"}},body:c||s};try{await(await this.fetchWithRetry(a,u)).body?.cancel()?.catch(()=>{})}catch(l){this._events.emit("error",l)}}prepareMessage(t,r,n){let i={...r,type:t,library:this.getLibraryId(),library_version:this.getLibraryVersion(),timestamp:n?.timestamp?n?.timestamp:fGr(),uuid:n?.uuid?n.uuid:fee()};return(n?.disableGeoip??this.disableGeoip)&&(i.properties||(i.properties={}),i.properties.$geoip_disable=!0),i.distinctId&&(i.distinct_id=i.distinctId,delete i.distinctId),i}clearFlushTimer(){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0)}flushBackground(){this.flush().catch(async t=>{await ZDu(t)})}async flush(){if(this.disabled)return;let t=YNo([this.flushPromise]).then(()=>this._flush());return this.flushPromise=t,this.addPendingPromise(t),YNo([t]).then(()=>{this.flushPromise===t&&(this.flushPromise=null)}),t}getCustomHeaders(){let t=this.getCustomUserAgent(),r={};return t&&t!==""&&(r["User-Agent"]=t),r}async _flush(){this.clearFlushTimer(),await this._initPromise;let t=this.getPersistedProperty(KF.Queue)||[];if(!t.length)return;let r=[],n=t.length;for(;t.length>0&&r.length<n;){let i=t.slice(0,this.maxBatchSize),o=i.map(f=>f.message),s=async()=>{let m=(this.getPersistedProperty(KF.Queue)||[]).slice(i.length);this.setPersistedProperty(KF.Queue,m),t=m,await this.flushStorage()},a={api_key:this.apiKey,batch:o,sent_at:fGr()};this.historicalMigration&&(a.historical_migration=!0);let c=JSON.stringify(a),u=`${this.host}/batch/`,l=this.disableCompression?null:await CUt(c,this.isDebug),p={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...l!==null&&{"Content-Encoding":"gzip"}},body:l||c},d={retryCheck:f=>hGr(f)?!1:mGr(f)};try{await(await this.fetchWithRetry(u,p,d)).body?.cancel()?.catch(()=>{})}catch(f){if(hGr(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 dLe||await s(),this._events.emit("error",f),f}await s(),r.push(...o)}this._events.emit("flush",r)}async _sendLogsBatch(t){if(this.disabled)return{kind:"fatal",error:new Error("The client is disabled")};let r=JSON.stringify(t),n=`${this.host}/i/v1/logs?token=${encodeURIComponent(this.apiKey)}`,i=this.disableCompression?null:await CUt(r,this.isDebug),o={method:"POST",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",...i!==null&&{"Content-Encoding":"gzip"}},body:i||r};try{return await this.fetchWithRetry(n,o,{retryCheck:s=>hGr(s)?!1:mGr(s)}),{kind:"ok"}}catch(s){return hGr(s)?{kind:"too-large"}:s instanceof dLe?{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,KDu)}catch{o instanceof Blob?s=o.size:s=new TextEncoder().encode(o).length}return await YDu(async()=>{let a=new AbortController,c=i??this.requestTimeout,u=dee(()=>a.abort(),c),l=null;try{l=await this.fetch(t,{signal:a.signal,...r})}catch(d){throw new dLe(d)}finally{clearTimeout(u)}if(!(r.mode==="no-cors")&&(l.status<200||l.status>=400))throw new mLe(l,s);return l},{...this._retryOptions,...n})}async _shutdown(t=3e4){await this._initPromise;let r=!1;if(this.clearFlushTimer(),this.disabled)return;let n=async()=>{try{for(await this.promiseQueue.join();!((this.getPersistedProperty(KF.Queue)||[]).length===0||(await this.flush(),r)););}catch(o){if(!mGr(o))throw o;await ZDu(o)}},i;try{return await Promise.race([new Promise((o,s)=>{i=dee(()=>{this._logger.error("Timed out while shutting down PostHog"),r=!0,s("Timeout while shutting down PostHog. Some events may not have been sent.")},t)}),n()])}finally{clearTimeout(i)}}async shutdown(t=3e4){return this.shutdownPromise?this._logger.warn("shutdown() called while already shutting down. shutdown() is meant to be called once before process exit - use flush() for per-request cleanup"):this.shutdownPromise=this._shutdown(t).finally(()=>{this.shutdownPromise=null}),this.shutdownPromise}};var MQ={};X(MQ,{DEFAULT_EXCEPTION_STEPS_CONFIG:()=>EGr,DOMExceptionCoercer:()=>ejo,EXCEPTION_STEP_INTERNAL_FIELDS:()=>PUt,ErrorCoercer:()=>tjo,ErrorEventCoercer:()=>rjo,ErrorPropertiesBuilder:()=>XNo,EventCoercer:()=>ojo,ExceptionStepsBuffer:()=>ljo,ObjectCoercer:()=>ijo,PrimitiveCoercer:()=>sjo,PromiseRejectionEventCoercer:()=>ajo,ReduceableCache:()=>cjo,StringCoercer:()=>njo,chromeStackLineParser:()=>ZNo,createDefaultStackParser:()=>Emm,createStackParser:()=>uRu,geckoStackLineParser:()=>$No,getUtf8ByteLength:()=>pRu,nodeStackLineParser:()=>oRu,opera10StackLineParser:()=>rRu,opera11StackLineParser:()=>nRu,resolveExceptionStepsConfig:()=>ujo,reverseAndStripFrames:()=>cRu,stripReservedExceptionStepFields:()=>xmm,winjsStackLineParser:()=>tRu});var gGr,$Du,AGr;function eRu(e){let t=globalThis._posthogChunkIds;if(!t)return;let r=Object.keys(t);return AGr&&r.length===$Du||($Du=r.length,AGr=r.reduce((n,i)=>{gGr||(gGr={});let o=gGr[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,gGr[i]=[u,l];break}}}return n},{})),AGr}var amm=4,XNo=class{constructor(t,r,n=[]){this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r={}){let i=r&&r.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,r,0).apply(t),a=this.buildParsingContext(r),c=this.parseStacktrace(s,a);return{$exception_list:this.convertToExceptionList(c,i),$exception_level:"error"}}async modifyFrames(t){for(let r of t)r.stacktrace&&r.stacktrace.frames&&$nt(r.stacktrace.frames)&&(r.stacktrace.frames=await this.applyModifiers(r.stacktrace.frames));return t}coerceFallback(t){return{type:"Error",value:"Unknown error",stack:t.syntheticException?.stack,synthetic:!0}}parseStacktrace(t,r){let n;t.cause!=null&&(n=this.parseStacktrace(t.cause,r));let i;return t.stack!=""&&t.stack!=null&&(i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?r.skipFirstLines:0),r.chunkIdMap)),{...t,cause:n,stack:i}}applyChunkIds(t,r){return t.map(n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n))}applyCoercers(t,r){for(let n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}async applyModifiers(t){let r=t;for(let n of this.modifiers)r=await n(r);return r}convertToExceptionList(t,r){let n={type:t.type,value:t.value,mechanism:{type:r.type??"generic",handled:r.handled??!0,synthetic:t.synthetic??!1}};t.stack&&(n.stacktrace={type:"raw",frames:t.stack});let i=[n];return t.cause!=null&&i.push(...this.convertToExceptionList(t.cause,{...r,handled:!0})),i}buildParsingContext(t){return{chunkIdMap:eRu(this.stackParser),skipFirstLines:t.skipFirstLines??1}}buildCoercingContext(t,r,n=0){let i=(s,a)=>{if(a<=amm){let c=this.buildCoercingContext(t,r,a);return this.applyCoercers(s,c)}};return{...r,syntheticException:n==0?r.syntheticException:void 0,mechanism:t,apply:s=>i(s,n),next:s=>i(s,n+1)}}};var xB="?";function mee(e,t,r,n,i){let o={platform:e,filename:t,function:r==="<anonymous>"?xB:r,in_app:!0};return eit(n)||(o.lineno=n),eit(i)||(o.colno=i),o}var yGr=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:xB,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var cmm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,umm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,lmm=/\((\S*)(?::(\d+))(?::(\d+))\)/,ZNo=(e,t)=>{let r=cmm.exec(e);if(r){let[,i,o,s]=r;return mee(t,i,xB,+o,+s)}let n=umm.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let a=lmm.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[o,s]=yGr(n[1]||xB,n[2]);return mee(t,s,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}};var pmm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fmm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$No=(e,t)=>{let r=pmm.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){let s=fmm.exec(r[3]);s&&(r[1]=r[1]||"eval",r[3]=s[1],r[4]=s[2],r[5]="")}let i=r[3],o=r[1]||xB;return[o,i]=yGr(o,i),mee(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}};var dmm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,tRu=(e,t)=>{let r=dmm.exec(e);return r?mee(t,r[2],r[1]||xB,+r[3],r[4]?+r[4]:void 0):void 0};var mmm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,rRu=(e,t)=>{let r=mmm.exec(e);return r?mee(t,r[2],r[3]||xB,+r[1]):void 0},hmm=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,nRu=(e,t)=>{let r=hmm.exec(e);return r?mee(t,r[5],r[3]||r[4]||xB,+r[1],+r[2]):void 0};var gmm=/^\s*[-]{4,}$/,Amm=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,oRu=(e,t)=>{let r=e.match(Amm);if(r){let n,i,o,s,a;if(r[1]){o=r[1];let l=o.lastIndexOf(".");if(o[l-1]==="."&&l--,l>0){n=o.slice(0,l),i=o.slice(l+1);let p=n.indexOf(".Module");p>0&&(o=o.slice(p+1),n=n.slice(0,p))}s=void 0}i&&(s=n,a=i),i==="<anonymous>"&&(a=void 0,o=void 0),o===void 0&&(a=a||xB,o=s?`${s}.${a}`:a);let c=r[2]?.startsWith("file://")?r[2].slice(7):r[2],u=r[5]==="native";return c?.match(/\/[A-Z]:/)&&(c=c.slice(1)),!c&&r[5]&&!u&&(c=r[5]),{filename:c?decodeURI(c):void 0,module:void 0,function:o,lineno:iRu(r[3]),colno:iRu(r[4]),in_app:ymm(c||"",u),platform:t}}if(e.match(gmm))return{filename:e,platform:t}};function ymm(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 iRu(e){return parseInt(e||"",10)||void 0}var sRu=/\(error: (.*)\)/,aRu=50;function cRu(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,aRu).map(r=>({...r,filename:r.filename||bmm(t).filename,function:r.function||xB}))}function bmm(e){return e[e.length-1]||{}}function Emm(){return uRu("web:javascript",ZNo,$No)}function uRu(e,...t){return(r,n=0)=>{let i=[],o=r.split(`
|
|
3084
|
-
`);for(let s=n;s<o.length;s++){let a=o[s];if(a.length>1024)continue;let c=sRu.test(a)?a.replace(sRu,"$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>=aRu)break}}return cRu(i)}}var ejo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=Rve(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){let r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?`${r}: ${t.message}`:r}isDOMException(t){return fLe(t,"DOMException")}isDOMError(t){return fLe(t,"DOMError")}};var tjo=class{match(t){return _No(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 rjo=class{constructor(){}match(t){return QDu(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 Imm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,njo=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(Imm);return i&&(r=i[1],n=i[2]),[r,n]}};var lRu=["fatal","error","warning","log","info","debug"];function bGr(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 ijo=class{match(t){return typeof t=="object"&&t!==null}coerce(t,r){let n=this.getErrorPropertyFromObject(t);return n?r.apply(n):{type:this.getType(t),value:this.getValue(t),stack:r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return tit(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){let i=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(i+=` with message: '${t.message}'`),i}if("message"in t&&typeof t.message=="string")return t.message;let r=this.getObjectClassName(t),n=bGr(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return Rve(t)&&!jDu(t)&&lRu.indexOf(t)>=0}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(XDu(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var ojo=class{match(t){return tit(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${bGr(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var sjo=class{match(t){return nGr(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var ajo=class{match(t){return fLe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!tit(t))return!1;try{let r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){let n=this.getUnhandledRejectionReason(t);return nGr(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 cjo=class{constructor(t){this._maxSize=t,this._cache=new Map}get(t){let r=this._cache.get(t);if(r!==void 0)return this._cache.delete(t),this._cache.set(t,r),r}set(t,r){this._cache.set(t,r)}reduce(){for(;this._cache.size>=this._maxSize;){let t=this._cache.keys().next().value;t&&this._cache.delete(t)}}};var PUt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},vmm=new Set([PUt.MESSAGE,PUt.TIMESTAMP]),EGr={enabled:!0,max_bytes:32768};function ujo(e){return e?{enabled:e.enabled??EGr.enabled,max_bytes:Cmm(e.max_bytes,EGr.max_bytes)}:{...EGr}}function xmm(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>vmm.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var ljo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=ujo(t)}setConfig(t){this._config=ujo(t),this._trimToMaxBytes()}add(t){let r=wmm(t);if(!r)return;let n=pRu(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 Cmm(e,t){if(!SUt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function wmm(e){let t=Smm(e);if(t)try{let r=JSON.parse(t);if(!wUt(r))return;let n=r,i=n[PUt.MESSAGE],o=n[PUt.TIMESTAMP];return!Rve(i)||i.trim().length===0||!Rve(o)&&!SUt(o)?void 0:{step:n,json:t}}catch{return}}function Smm(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 pRu(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 mRu=require("fs"),hRu=require("readline"),IGr=new MQ.ReduceableCache(25),gRu=new MQ.ReduceableCache(20),pjo=7,Tmm=1e3,Omm=1e4;async function ARu(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"||Rmm(s)||kmm(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(gRu.get(i))continue;let o=t[i];if(!o)continue;o.sort((c,u)=>c-u);let s=Nmm(o);if(s.every(c=>Fmm(i,c)))continue;let a=jmm(IGr,i,{});n.push(Bmm(i,s,a))}return await Promise.all(n).catch(()=>{}),e&&e.length>0&&Pmm(e,IGr),IGr.reduce(),e}function Bmm(e,t,r){return new Promise(n=>{let i=(0,mRu.createReadStream)(e),o=(0,hRu.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(){gRu.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]=Qmm(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 Pmm(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;Dmm(r.lineno,r,n)}}function Dmm(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=yRu(e);i<e;i++){let o=r[i];if(o===void 0)return void fRu(t);t.pre_context.push(o)}if(r[e]===void 0)return void fRu(t);t.context_line=r[e];let n=bRu(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 fRu(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Rmm(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function kmm(e){return e.lineno!==void 0&&e.lineno>Omm||e.colno!==void 0&&e.colno>Tmm}function Fmm(e,t){let r=IGr.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 Nmm(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=dRu(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+pjo:(i.push(n),n=dRu(o)),t++}return i}function dRu(e){return[yRu(e),bRu(e)]}function yRu(e){return Math.max(1,e-pjo)}function bRu(e){return e+pjo}function jmm(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function Qmm(e,t){let r=e,n=r.length;if(n<=150)return r;t>n&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`...${r}`),o<n&&(r+="..."),r}var iit=require("path");function ERu(e=process.cwd()){let t=iit.sep==="\\",r=i=>t?i.replace(/\\/g,"/"):i,n=r(e);return async i=>{for(let o of i)!o.filename||o.filename.startsWith("node:")||o.filename.startsWith("data:")||(0,iit.isAbsolute)(o.filename)&&(o.filename=r((0,iit.relative)(n,r(o.filename))));return i}}function zmm(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 IRu(e,t){globalThis.process?.on("uncaughtException",zmm(e,t))}function vRu(e){globalThis.process?.on("unhandledRejection",t=>e(t,{mechanism:{type:"onunhandledrejection",handled:!1}}))}var Mmm=2e3,sH=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new iGr({refillRate:1,bucketSize:10,refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return wUt(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i){let o={...i},s=this.errorPropertiesBuilder.buildFromUnknown(t,r);return s.$exception_list=await this.errorPropertiesBuilder.modifyFrames(s.$exception_list),{event:"$exception",distinctId:n,properties:{...s,...o},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(IRu(this.onException.bind(this),this.onFatalError.bind(this)),vRu(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(Mmm),process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}};var xRu="5.35.1";var dfe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var oit=class e{constructor(t){this._host=t.host,this._distinctId=t.distinctId,this._groups=t.groups,this._disableGeoip=t.disableGeoip,this._flags=t.flags,this._requestId=t.requestId,this._evaluatedAt=t.evaluatedAt,this._flagDefinitionsLoadedAt=t.flagDefinitionsLoadedAt,this._errorsWhileComputing=t.errorsWhileComputing??!1,this._quotaLimited=t.quotaLimited??!1,this._accessed=t.accessed??new Set,this._isSlice=t.isSlice??!1}isEnabled(t){let r=this._flags[t];return this._recordAccess(t),r?.enabled??!1}getFlag(t){let r=this._flags[t];if(this._recordAccess(t),!!r)return r.enabled?r.variant??!0:!1}getFlagPayload(t){return this._flags[t]?.payload}onlyAccessed(){let t={};for(let r of this._accessed){let n=this._flags[r];n&&(t[r]=n)}return this._cloneWith(t)}only(t){let r={},n=[];for(let i of t){let o=this._flags[i];o?r[i]=o:n.push(i)}return n.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${n.join(", ")}`),this._cloneWith(r)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let t={},r=[];for(let[n,i]of Object.entries(this._flags)){let o=i.enabled===!1?!1:i.variant??!0;t[`$feature/${n}`]=o,i.enabled&&r.push(n)}return r.length>0&&(r.sort(),t.$active_feature_flags=r),t}_cloneWith(t){return new e({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:t,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(t){if(this._accessed.add(t),this._distinctId===""||this._isSlice&&!(t in this._flags))return;let r=this._flags[t],n=r===void 0?void 0:r.enabled===!1?!1:r.variant??!0,i={$feature_flag:t,$feature_flag_response:n,$feature_flag_id:r?.id,$feature_flag_version:r?.version,$feature_flag_reason:r?.reason,locally_evaluated:r?.locallyEvaluated??!1,[`$feature/${t}`]:n,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:r?.locallyEvaluated?Date.now():this._evaluatedAt};r?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(dfe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(dfe.QUOTA_LIMITED),r===void 0&&o.push(dfe.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:t,response:n,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}};async function CRu(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 Lmm=6e4,Umm=1152921504606847e3,Vmm=["is_not","is_set"],sit=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},Od=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},hee=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},vGr=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:n,timeout:i,host:o,customHeaders:s,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=n,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=s,this.onLoad=a.onLoad,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}createEvaluationContext(t,r={},n={},i={},o={}){return{distinctId:t,groups:r,personProperties:n,groupProperties:i,evaluationCache:o}}async getFeatureFlag(t,r,n={},i={},o={}){await this.loadFeatureFlags();let s,a;if(!this.loadedSuccessfullyOnce)return s;if(a=this.featureFlagsByKey[t],a!==void 0){let c=this.createEvaluationContext(r,n,i,o);try{s=(await this.computeFlagAndPayloadLocally(a,c)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${s}`))}catch(u){u instanceof hee||u instanceof Od?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${t}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${u}`))}}return s}async getAllFlagsAndPayloads(t,r){await this.loadFeatureFlags();let n={},i={},o=this.featureFlags.length==0,s=r?r.map(c=>this.featureFlagsByKey[c]).filter(Boolean):this.featureFlags,a={...t,evaluationCache:t.evaluationCache??{}};return await Promise.all(s.map(async c=>{try{let{value:u,payload:l}=await this.computeFlagAndPayloadLocally(c,a);n[c.key]=u,l&&(i[c.key]=l)}catch(u){u instanceof hee||u instanceof Od?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${c.key}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${c.key}: ${u}`)),o=!0}})),{response:n,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(t,r,n={}){let{matchValue:i,skipLoadCheck:o=!1}=n;if(o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=this.getFeatureFlagPayload(t.key,s);return{value:s,payload:a}}async computeFlagValueLocally(t,r){let{distinctId:n,groups:i,personProperties:o,groupProperties:s}=r;if(!t.active)return!1;if(t.ensure_experience_continuity)throw new Od("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let u=this.groupTypeMapping[String(c)];if(!u)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Od("Flag has unknown group type index");if(!(u in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;t.bucketing_identifier==="device_id"&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${t.key}`));let l=s[u];return await this.matchFeatureFlagProperties(t,i[u],l,r)}{let u=this.getBucketingValueForFlag(t,n,o);if(u===void 0)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${t.key} without $device_id, falling back to server evaluation`)),new Od(`Can't compute feature flag: ${t.key} without $device_id`);return await this.matchFeatureFlagProperties(t,u,o,r)}}getBucketingValueForFlag(t,r,n){if(t.filters?.aggregation_group_type_index!=null)return r;if(t.bucketing_identifier==="device_id"){let i=n?.$device_id;return i==null||i===""?void 0:i}return r}getFeatureFlagPayload(t,r){let n=null;if(r!==!1&&r!=null&&(typeof r=="boolean"?n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]||null:typeof r=="string"&&(n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]||null),n!=null)){if(typeof n=="object")return n;if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}return null}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!this.featureFlagsByKey)throw new Od("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Od(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Od(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Od(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let l=this.featureFlagsByKey[c];if(l)if(l.active)try{let p=await this.computeFlagValueLocally(l,n);i[c]=p}catch(p){throw new Od(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else throw new Od(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Od(`Dependency '${c}' could not be evaluated`)}let a=i[o];return this.flagEvaluatesToExpectedValue(t.value,a)}flagEvaluatesToExpectedValue(t,r){return typeof t=="boolean"?t===r||typeof r=="string"&&r!==""&&t===!0:typeof t=="string"?r===t:!1}async matchFeatureFlagProperties(t,r,n,i){let o=t.filters||{},s=o.groups||[],a=o.aggregation_group_type_index,{groups:c,groupProperties:u}=i,l=!1,p;for(let d of s)try{let f=d.aggregation_group_type_index!==void 0?d.aggregation_group_type_index:a,m=n,g=r;if(f!==a&&f!=null){let A=this.groupTypeMapping[String(f)];if(!A||!(A in c)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${f} not available`));continue}if(!(A in u)){l=!0;continue}m=u[A],g=c[A]}if(await this.isConditionMatch(t,g,d,m,i)){let A=d.variant,y=o.multivariate?.variants||[];p=A&&y.some(E=>E.key===A)?A:await this.getMatchingVariant(t,g)||!0;break}}catch(f){if(f instanceof hee)throw f;if(f instanceof Od)l=!0;else throw f}if(p!==void 0)return p;if(l)throw new Od("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){let s=n.rollout_percentage,a=c=>{this.logMsgIfDebug(()=>console.warn(c))};if((n.properties||[]).length>0){for(let c of n.properties){let u=c.type,l=!1;if(l=u==="cohort"?await BRu(c,i,this.cohorts,this.debugMode,p=>this.evaluateFlagDependency(p,i,o)):u==="flag"?await this.evaluateFlagDependency(c,i,o):ORu(c,i,a),!l)return!1}if(s==null)return!0}return!(s!=null&&await wRu(t.key,r)>s/100)}async getMatchingVariant(t,r){let n=await wRu(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(Lmm,this.pollingInterval*2**this.backOffCount):this.pollingInterval}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0),this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval());try{let t=!0;if(this.cacheProvider)try{t=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(n){this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${n}`))}if(!t&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let r=await this._requestFeatureFlagDefinitions();if(!r)return;switch(r.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=r.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new sit(`Your project key or personal API key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 402:console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={};return;case 403:throw this.beginBackoff(),new sit(`Your personal API key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new sit(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 200:{let n=await r.json()??{};if(!("flags"in n))return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(n)}`));this.flagsEtag=r.headers?.get("ETag")??void 0;let i={flags:n.flags??[],groupTypeMapping:n.group_type_mapping||{},cohorts:n.cohorts||{}};if(this.updateFlagState(i),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(i)}catch(o){this.onError?.(new Error(`Failed to store in cache: ${o}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(i.flags);break}default:return}}catch(t){t instanceof sit&&this.onError?.(t)}}getPersonalApiKeyRequestOptions(t="GET",r){let n={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return r&&(n["If-None-Match"]=r),{method:t,headers:n}}_requestFeatureFlagDefinitions(){let t=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),n=null;if(this.timeout&&typeof this.timeout=="number"){let i=new AbortController;n=dee(()=>{i.abort()},this.timeout),r.signal=i.signal}try{let i=this.fetch;return i(t,r)}finally{clearTimeout(n)}}async stopPoller(t=3e4){if(clearTimeout(this.poller),this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await Promise.race([r,new Promise((n,i)=>setTimeout(()=>i(new Error(`Cache shutdown timeout after ${t}ms`)),t))])}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};async function wRu(e,t,r=""){let n=await CRu(`${e}.${t}${r}`);return parseInt(n.slice(0,15),16)/Umm}function ORu(e,t,r){let n=e.key,i=e.value,o=e.operator||"exact";if(n in t){if(o==="is_not_set")return!1}else{if(o==="is_not_set")return!0;throw new Od(`Property ${n} not found in propertyValues`)}let s=t[n];if(s==null&&!Vmm.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 SRu(String(i))&&String(s).match(String(i))!==null;case"not_regex":return SRu(String(i))&&String(s).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let u=typeof i=="number"?i:parseFloat(String(i)),l;return l=typeof s=="number"?s:s!=null?parseFloat(String(s)):NaN,Number.isFinite(u)&&Number.isFinite(l)?c(l,u,o):c(String(s),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Od("Date operations cannot be performed on boolean values");let u=Hmm(String(i));if(u==null&&(u=TRu(i)),u==null)throw new Od(`Invalid date: ${i}`);let l=TRu(s);return["is_date_before"].includes(o)?l<u:l>u}case"semver_eq":return w_(CB(String(s)),CB(String(i)))===0;case"semver_neq":return w_(CB(String(s)),CB(String(i)))!==0;case"semver_gt":return w_(CB(String(s)),CB(String(i)))>0;case"semver_gte":return w_(CB(String(s)),CB(String(i)))>=0;case"semver_lt":return w_(CB(String(s)),CB(String(i)))<0;case"semver_lte":return w_(CB(String(s)),CB(String(i)))<=0;case"semver_tilde":{let u=CB(String(s)),{lower:l,upper:p}=Gmm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_caret":{let u=CB(String(s)),{lower:l,upper:p}=qmm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_wildcard":{let u=CB(String(s)),{lower:l,upper:p}=Wmm(String(i));return w_(u,l)>=0&&w_(u,p)<0}default:throw new Od(`Unknown operator: ${o}`)}}function _mm(e,t){if(!(e in t))throw new hee(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function BRu(e,t,r,n=!1,i){let o=String(e.value);_mm(o,r);let s=r[o];return PRu(s,t,r,n,i)}async function PRu(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 PRu(c,t,r,n,i);if(o==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("Can't match cohort without a given cohort property value");return o==="AND"}for(let c of s)try{let u;if(c.type==="cohort")u=await BRu(c,t,r,n,i);else if(c.type==="flag"){if(!i)throw new Od(`Flag dependency '${c.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(c)}else u=ORu(c,t);let l=c.negation||!1;if(o==="AND"){if(!u&&!l||u&&l)return!1}else if(u&&!l||!u&&l)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("can't match cohort without a given cohort property value");return o==="AND"}function SRu(e){try{return new RegExp(e),!0}catch{return!1}}function DRu(e,t){if(!/^\d+$/.test(e))throw new Od(`Invalid semver: ${t}`);if(e.length>1&&e[0]==="0")throw new Od(`Invalid semver: ${t}`);return parseInt(e,10)}function CB(e){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new Od(`Invalid semver: ${e}`);let n=r.split("."),i=c=>c===void 0||c===""?0:DRu(c,e),o=i(n[0]),s=i(n[1]),a=i(n[2]);return[o,s,a]}function w_(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}function Gmm(e){let t=CB(e),r=[t[0],t[1],t[2]],n=[t[0],t[1]+1,0];return{lower:r,upper:n}}function qmm(e){let t=CB(e),[r,n,i]=t,o=[r,n,i],s;return s=r>0?[r+1,0,0]:n>0?[0,n+1,0]:[0,0,i+1],{lower:o,upper:s}}function Wmm(e){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new Od(`Invalid wildcard semver: ${e}`);let n=r.split("."),i=c=>{try{return DRu(c,e)}catch{throw new Od(`Invalid wildcard semver: ${e}`)}},o=i(n[0]),s,a;if(n.length===1)s=[o,0,0],a=[o+1,0,0];else{let c=i(n[1]);s=[o,c,0],a=[o,c+1,0]}return{lower:s,upper:a}}function TRu(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new Od(`${e} is in an invalid date format`)}throw new Od(`The date provided ${e} must be a string, number, or date object`)}function Hmm(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 xGr=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};var Kmm=100,RRu=3e4,Jmm=5e4,Ymm=50,Xmm=500,Zmm="https://us.i.posthog.com",kRu=new Set;function CGr(e,t){kRu.has(e)||(kRu.add(e),console.warn(`[PostHog] ${t}`))}function $mm(e){return typeof e=="string"?e.trim():""}function ehm(e){return(typeof e=="string"?e.trim():"")||void 0}function thm(e){return(typeof e=="string"?e.trim():"")||Zmm}function rhm(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 wGr=class extends BUt{constructor(t,r={}){let n=$mm(t),i={...r,host:thm(r.host),personalApiKey:ehm(r.personalApiKey)};if(super(n,i),this._memoryStorage=new xGr,this.options=i,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Kmm):RRu,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 vGr({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:n,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:s=>{this._events.emit("error",s)},onLoad:s=>{this._events.emit("localEvaluationFlagsLoaded",s)},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation}))}this.errorTracking=new sH(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||Jmm}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??Xmm,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??Ymm;this._waitUntilCycle.timer=dee(()=>{this.resolveWaitUntilFlush()},o)}_consumeWaitUntilCycle(){let t=this._waitUntilCycle;return t&&(clearTimeout(t.timer),this._waitUntilCycle=void 0),t?.resolve}async resolveWaitUntilFlush(){let t=this._consumeWaitUntilCycle();try{await super.flush()}catch{}finally{t?.()}}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):fetch(t,r)}getLibraryVersion(){return xRu}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=RRu){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let n=setTimeout(()=>{i(),r(!1)},t),i=this._events.on("localEvaluationFlagsLoaded",o=>{clearTimeout(n),i(),r(o>0)})})}_resolveDistinctId(t,r){return typeof t=="string"?{distinctId:t,options:r}:{distinctId:this.context?.get()?.distinctId,options:t}}async _getFeatureFlagResult(t,r,n={},i){let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let w=this._flagOverrides[t];if(w===void 0)return;let O=this._payloadOverrides?.[t];return{key:t,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O}}let{groups:s,disableGeoip:a}=n,{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=n,p=this.addLocalPersonAndGroupProperties(r,s,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(r,s,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,y,E,x,I;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let w=this.featureFlagsPoller?.featureFlagsByKey[t];if(w)try{let O=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(w,d,{matchValue:i});if(O){m=!0;let B=O.value;E=w.id,I="Evaluated locally",f={key:t,enabled:B!==!1,variant:typeof B=="string"?B:void 0,payload:O.payload??void 0}}}catch(O){if(O instanceof hee||O instanceof Od)this._logger?.info(`${O.name} when computing flag locally: ${t}: ${O.message}`);else throw O}}if(!m&&!c){let w=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,a,[t]);if(w===void 0)y=dfe.UNKNOWN_ERROR;else{g=w.requestId,A=w.evaluatedAt;let O=[];w.errorsWhileComputingFlags&&O.push(dfe.ERRORS_WHILE_COMPUTING),w.quotaLimited?.includes("feature_flags")&&O.push(dfe.QUOTA_LIMITED);let B=w.flags[t];if(B===void 0)O.push(dfe.FLAG_MISSING);else{E=B.metadata?.id,x=B.metadata?.version,I=B.reason?.description??B.reason?.code;let T;if(B.metadata?.payload!==void 0)try{T=JSON.parse(B.metadata.payload)}catch{T=B.metadata.payload}f={key:t,enabled:B.enabled,variant:B.variant,payload:T}}O.length>0&&(y=O.join(","))}}if(o){let w=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,O={$feature_flag:t,$feature_flag_response:w,$feature_flag_id:E,$feature_flag_version:x,$feature_flag_reason:I,locally_evaluated:m,[`$feature/${t}`]:w,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(m&&this.featureFlagsPoller){let B=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();B!==void 0&&(O.$feature_flag_definitions_loaded_at=B)}y&&(O.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:w,groups:s,disableGeoip:a,properties:O})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){CGr("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(CGr("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){CGr("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return i===void 0?void 0:i.enabled===!1?!1:!!(i.variant??!0)||!1}async getAllFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);return n?(await this.getAllFlagsAndPayloads(n,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags \u2014 pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads \u2014 pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),m={},g={},A=!0;if(f&&(m=f.response,g=f.payloads,A=f.fallbackToFlags),A&&!c){let y=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,s,a);m={...m,...y.flags||{}},g={...g,...y.payloads||{}}}return this._flagOverrides!==void 0&&(m={...m,...this._flagOverrides}),this._payloadOverrides!==void 0&&(g={...g,...this._payloadOverrides}),{featureFlags:m,featureFlagPayloads:g}}async evaluateFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags \u2014 pass it explicitly or use withContext()"),new oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f={},m,g,A=!1,y=!1,E=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),x=new Set;if(E)for(let[C,w]of Object.entries(E.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:E.payloads[C],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0},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[w,O]of Object.entries(C.flags)){if(x.has(w))continue;let B;if(O.metadata?.payload!==void 0)try{B=JSON.parse(O.metadata.payload)}catch{B=O.metadata.payload}f[w]={key:w,enabled:O.enabled,variant:O.variant,payload:B,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1}}}}if(this._flagOverrides!==void 0)for(let[C,w]of Object.entries(this._flagOverrides)){if(w===void 0){delete f[C];continue}let O=f[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1}}if(this._payloadOverrides!==void 0)for(let[C,w]of Object.entries(this._payloadOverrides)){let O=f[C];O&&(f[C]={...O,payload:w})}return new oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:f,requestId:m,evaluatedAt:g,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:A,quotaLimited:y})}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=`${n}_${i}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].includes(c)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(c):this.distinctIdHasSentFlagCalls[r]=[c],this.capture({distinctId:r,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:s}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:t=>this._captureFlagCalledEventIfNeeded(t),logWarning:t=>{this.options.featureFlagsLogWarnings!==!1&&console.warn(`[PostHog] ${t}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){super.groupIdentifyStateless(t,r,n,{disableGeoip:o},i)}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(t){let r=n=>Object.fromEntries(n.map(i=>[i,!0]));if(t===!1){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(t)){this._flagOverrides=r(t);return}if(this._isFeatureFlagOverrideOptions(t)){"flags"in t&&(t.flags===!1?this._flagOverrides=void 0:Array.isArray(t.flags)?this._flagOverrides=r(t.flags):t.flags!==void 0&&(this._flagOverrides={...t.flags})),"payloads"in t&&(t.payloads===!1?this._payloadOverrides=void 0:t.payloads!==void 0&&(this._payloadOverrides={...t.payloads}));return}this._flagOverrides={...t}}_isFeatureFlagOverrideOptions(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let r=t;if("flags"in r){let n=r.flags;if(n===!1||Array.isArray(n)||typeof n=="object"&&n!==null)return!0}if("payloads"in r){let n=r.payloads;if(n===!1||typeof n=="object"&&n!==null)return!0}return!1}withContext(t,r,n){return this.context?this.context.run(t,r,n):r()}getContext(){return this.context?.get()}enterContext(t,r){this.context?.enter(t,r)}async _shutdown(t){let r=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown();try{return await super._shutdown(t)}finally{r?.()}}async _requestRemoteConfigPayload(t){if(!this.options.personalApiKey)return;let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config?token=${encodeURIComponent(this.apiKey)}`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&typeof this.options.requestTimeout=="number"){let o=new AbortController;i=dee(()=>{o.abort()},this.options.requestTimeout),n.signal=o.signal}try{return await this.fetch(r,n)}catch(o){this._events.emit("error",o);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(t,r){if(!t)return{personProperties:{},groupProperties:{}};let n={},i={};for(let[o,s]of Object.entries(t))if(zDu(s)&&r&&o in r){let a={};for(let[c,u]of Object.entries(s))a[String(c)]=String(u);i[String(o)]=a}else n[String(o)]=String(s);return{personProperties:n,groupProperties:i}}async getFeatureFlagsForEvent(t,r,n,i){let o=i?.personProperties||{},s=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation??!1)if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}else return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(t,r,o,s,n)).flags}addLocalPersonAndGroupProperties(t,r,n,i){let o={distinct_id:t,...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!sH.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:s},r,n).then(a=>this.capture({...a,uuid:i,flags:o})))}}async captureExceptionImmediate(t,r,n,i){if(!sH.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){let{distinctId:r,event:n,properties:i,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l}=t,p=this.context?.get(),d=r||p?.distinctId,f={...this.props,...p?.properties||{},...i||{}};d||(d=fee(),f.$process_person_profile=!1),p?.sessionId&&!f.$session_id&&(f.$session_id=p.sessionId);let m=this._runBeforeSend({distinctId:d,event:n,properties:f,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l});if(!m)return Promise.reject(null);let g=await Promise.resolve().then(async()=>{if(s)return a&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),s._getEventProperties();if(a){CGr("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 rhm(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"&&FDu(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 FRu=require("async_hooks"),SGr=class{constructor(){this.storage=new FRu.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 NRu="posthog-node";function nhm(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[fjo.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 fjo=class{static#e=this.POSTHOG_ID_TAG="posthog_distinct_id";constructor(t,r,n,i,o){this.name=NRu,this.name=NRu,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(nhm(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};sH.errorPropertiesBuilder=new MQ.ErrorPropertiesBuilder([new MQ.EventCoercer,new MQ.ErrorCoercer,new MQ.ObjectCoercer,new MQ.StringCoercer,new MQ.PrimitiveCoercer],MQ.createStackParser("node:javascript",MQ.nodeStackLineParser),[DDu(),ARu,ERu()]);var kve=class extends wGr{getLibraryId(){return"posthog-node"}initializeContext(){return new SGr}};var TGr=class{posthog;constructor({posthogApiKey:t}){this.posthog=new kve(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.75.5",usingAccessToken:!0,...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var DUt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};om();Zt();var ait=require("fs/promises"),jRu=require("os"),QRu=require("path");Wtt();var ihm="id",ohm=".fern",RUt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new kve(r),this.userId=t==null?void 0:NPo(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.75.5",...t,...t.properties,usingAccessToken:!1,...r!=null?{userEmail:r}:{},...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}userEmail;async getUserEmail(){if(this.userEmail!==null){if(this.userEmail!=null)return this.userEmail;if(this.token==null){this.userEmail=null;return}try{let t=await xf({token:this.token.value}).user.getMyself();if(t.ok&&t.body.email!=null)return this.userEmail=t.body.email,this.userEmail}catch{}this.userEmail=null}}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=vD(),r=We(Vt.of((0,jRu.homedir)()),we.of(ohm),we.of(ihm));try{await rr(r)?this.persistedDistinctId=(await(0,ait.readFile)(r)).toString():(await(0,ait.mkdir)((0,QRu.dirname)(r),{recursive:!0}),await(0,ait.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var djo;async function kUt(){return djo==null&&(djo=await shm()),djo}async function shm(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new DUt;let r=await vrt();return r!=null?new RUt({token:r,posthogApiKey:e}):await u_()!=null?new TGr({posthogApiKey:e}):new RUt({token:void 0,posthogApiKey:e})}catch{return new DUt}}En();Dt();Qt();OW();var FUt=be(require("process"),1);fqe();var LRu=be(cvo(),1),URu=be(MRu(),1);function N1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Qq(e),e.length===0))return 0;e=e.replace((0,URu.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(LRu.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}En();function OGr(e){let t=0;for(let r of e.split(`
|
|
3084
|
+
`);for(let s=n;s<o.length;s++){let a=o[s];if(a.length>1024)continue;let c=sRu.test(a)?a.replace(sRu,"$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>=aRu)break}}return cRu(i)}}var ejo=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){let n=Rve(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){let r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?`${r}: ${t.message}`:r}isDOMException(t){return fLe(t,"DOMException")}isDOMError(t){return fLe(t,"DOMError")}};var tjo=class{match(t){return _No(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 rjo=class{constructor(){}match(t){return QDu(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 Imm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,njo=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(Imm);return i&&(r=i[1],n=i[2]),[r,n]}};var lRu=["fatal","error","warning","log","info","debug"];function bGr(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 ijo=class{match(t){return typeof t=="object"&&t!==null}coerce(t,r){let n=this.getErrorPropertyFromObject(t);return n?r.apply(n):{type:this.getType(t),value:this.getValue(t),stack:r.syntheticException?.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return tit(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){let i=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(i+=` with message: '${t.message}'`),i}if("message"in t&&typeof t.message=="string")return t.message;let r=this.getObjectClassName(t),n=bGr(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${n}`}isSeverityLevel(t){return Rve(t)&&!jDu(t)&&lRu.indexOf(t)>=0}getErrorPropertyFromObject(t){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];if(XDu(n))return n}}getObjectClassName(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}};var ojo=class{match(t){return tit(t)}coerce(t,r){let n=t.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${bGr(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var sjo=class{match(t){return nGr(t)}coerce(t,r){return{type:"Error",value:`Primitive value captured as exception: ${String(t)}`,stack:r.syntheticException?.stack,synthetic:!0}}};var ajo=class{match(t){return fLe(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!tit(t))return!1;try{let r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){let n=this.getUnhandledRejectionReason(t);return nGr(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 cjo=class{constructor(t){this._maxSize=t,this._cache=new Map}get(t){let r=this._cache.get(t);if(r!==void 0)return this._cache.delete(t),this._cache.set(t,r),r}set(t,r){this._cache.set(t,r)}reduce(){for(;this._cache.size>=this._maxSize;){let t=this._cache.keys().next().value;t&&this._cache.delete(t)}}};var PUt={MESSAGE:"$message",TIMESTAMP:"$timestamp"},vmm=new Set([PUt.MESSAGE,PUt.TIMESTAMP]),EGr={enabled:!0,max_bytes:32768};function ujo(e){return e?{enabled:e.enabled??EGr.enabled,max_bytes:Cmm(e.max_bytes,EGr.max_bytes)}:{...EGr}}function xmm(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,i)=>vmm.has(i)?(t.push(i),n):(n[i]=e[i],n),{}),droppedKeys:t}}var ljo=class{constructor(t){this._entries=[],this._totalBytes=0,this._config=ujo(t)}setConfig(t){this._config=ujo(t),this._trimToMaxBytes()}add(t){let r=wmm(t);if(!r)return;let n=pRu(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 Cmm(e,t){if(!SUt(e)||e===1/0||e===-1/0)return t;let r=Math.floor(e);return r<0?t:r}function wmm(e){let t=Smm(e);if(t)try{let r=JSON.parse(t);if(!wUt(r))return;let n=r,i=n[PUt.MESSAGE],o=n[PUt.TIMESTAMP];return!Rve(i)||i.trim().length===0||!Rve(o)&&!SUt(o)?void 0:{step:n,json:t}}catch{return}}function Smm(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 pRu(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 mRu=require("fs"),hRu=require("readline"),IGr=new MQ.ReduceableCache(25),gRu=new MQ.ReduceableCache(20),pjo=7,Tmm=1e3,Omm=1e4;async function ARu(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"||Rmm(s)||kmm(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(gRu.get(i))continue;let o=t[i];if(!o)continue;o.sort((c,u)=>c-u);let s=Nmm(o);if(s.every(c=>Fmm(i,c)))continue;let a=jmm(IGr,i,{});n.push(Bmm(i,s,a))}return await Promise.all(n).catch(()=>{}),e&&e.length>0&&Pmm(e,IGr),IGr.reduce(),e}function Bmm(e,t,r){return new Promise(n=>{let i=(0,mRu.createReadStream)(e),o=(0,hRu.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(){gRu.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]=Qmm(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 Pmm(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;Dmm(r.lineno,r,n)}}function Dmm(e,t,r){if(t.lineno===void 0||r===void 0)return;t.pre_context=[];for(let i=yRu(e);i<e;i++){let o=r[i];if(o===void 0)return void fRu(t);t.pre_context.push(o)}if(r[e]===void 0)return void fRu(t);t.context_line=r[e];let n=bRu(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 fRu(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Rmm(e){return e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:")}function kmm(e){return e.lineno!==void 0&&e.lineno>Omm||e.colno!==void 0&&e.colno>Tmm}function Fmm(e,t){let r=IGr.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 Nmm(e){if(!e.length)return[];let t=0,r=e[0];if(typeof r!="number")return[];let n=dRu(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+pjo:(i.push(n),n=dRu(o)),t++}return i}function dRu(e){return[yRu(e),bRu(e)]}function yRu(e){return Math.max(1,e-pjo)}function bRu(e){return e+pjo}function jmm(e,t,r){let n=e.get(t);return n===void 0?(e.set(t,r),r):n}function Qmm(e,t){let r=e,n=r.length;if(n<=150)return r;t>n&&(t=n);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,n);return o>n-5&&(o=n),o===n&&(i=Math.max(o-140,0)),r=r.slice(i,o),i>0&&(r=`...${r}`),o<n&&(r+="..."),r}var iit=require("path");function ERu(e=process.cwd()){let t=iit.sep==="\\",r=i=>t?i.replace(/\\/g,"/"):i,n=r(e);return async i=>{for(let o of i)!o.filename||o.filename.startsWith("node:")||o.filename.startsWith("data:")||(0,iit.isAbsolute)(o.filename)&&(o.filename=r((0,iit.relative)(n,r(o.filename))));return i}}function zmm(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 IRu(e,t){globalThis.process?.on("uncaughtException",zmm(e,t))}function vRu(e){globalThis.process?.on("unhandledRejection",t=>e(t,{mechanism:{type:"onunhandledrejection",handled:!1}}))}var Mmm=2e3,sH=class e{constructor(t,r,n){this.client=t,this._exceptionAutocaptureEnabled=r.enableExceptionAutocapture||!1,this._logger=n,this._rateLimiter=new iGr({refillRate:1,bucketSize:10,refillInterval:1e4,_logger:this._logger}),this.startAutocaptureIfEnabled()}static isPreviouslyCapturedError(t){return wUt(t)&&"__posthog_previously_captured_error"in t&&t.__posthog_previously_captured_error===!0}static async buildEventMessage(t,r,n,i){let o={...i},s=this.errorPropertiesBuilder.buildFromUnknown(t,r);return s.$exception_list=await this.errorPropertiesBuilder.modifyFrames(s.$exception_list),{event:"$exception",distinctId:n,properties:{...s,...o},_originatedFromCaptureException:!0}}startAutocaptureIfEnabled(){this.isEnabled()&&(IRu(this.onException.bind(this),this.onFatalError.bind(this)),vRu(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(Mmm),process.exit(1)}isEnabled(){return!this.client.isDisabled&&this._exceptionAutocaptureEnabled}shutdown(){this._rateLimiter.stop()}};var xRu="5.35.1";var dfe={ERRORS_WHILE_COMPUTING:"errors_while_computing_flags",FLAG_MISSING:"flag_missing",QUOTA_LIMITED:"quota_limited",UNKNOWN_ERROR:"unknown_error"};var oit=class e{constructor(t){this._host=t.host,this._distinctId=t.distinctId,this._groups=t.groups,this._disableGeoip=t.disableGeoip,this._flags=t.flags,this._requestId=t.requestId,this._evaluatedAt=t.evaluatedAt,this._flagDefinitionsLoadedAt=t.flagDefinitionsLoadedAt,this._errorsWhileComputing=t.errorsWhileComputing??!1,this._quotaLimited=t.quotaLimited??!1,this._accessed=t.accessed??new Set,this._isSlice=t.isSlice??!1}isEnabled(t){let r=this._flags[t];return this._recordAccess(t),r?.enabled??!1}getFlag(t){let r=this._flags[t];if(this._recordAccess(t),!!r)return r.enabled?r.variant??!0:!1}getFlagPayload(t){return this._flags[t]?.payload}onlyAccessed(){let t={};for(let r of this._accessed){let n=this._flags[r];n&&(t[r]=n)}return this._cloneWith(t)}only(t){let r={},n=[];for(let i of t){let o=this._flags[i];o?r[i]=o:n.push(i)}return n.length>0&&this._host.logWarning(`FeatureFlagEvaluations.only() was called with flag keys that are not in the evaluation set and will be dropped: ${n.join(", ")}`),this._cloneWith(r)}get keys(){return Object.keys(this._flags)}_getEventProperties(){let t={},r=[];for(let[n,i]of Object.entries(this._flags)){let o=i.enabled===!1?!1:i.variant??!0;t[`$feature/${n}`]=o,i.enabled&&r.push(n)}return r.length>0&&(r.sort(),t.$active_feature_flags=r),t}_cloneWith(t){return new e({host:this._host,distinctId:this._distinctId,groups:this._groups,disableGeoip:this._disableGeoip,flags:t,requestId:this._requestId,evaluatedAt:this._evaluatedAt,flagDefinitionsLoadedAt:this._flagDefinitionsLoadedAt,errorsWhileComputing:this._errorsWhileComputing,quotaLimited:this._quotaLimited,accessed:new Set(this._accessed),isSlice:!0})}_recordAccess(t){if(this._accessed.add(t),this._distinctId===""||this._isSlice&&!(t in this._flags))return;let r=this._flags[t],n=r===void 0?void 0:r.enabled===!1?!1:r.variant??!0,i={$feature_flag:t,$feature_flag_response:n,$feature_flag_id:r?.id,$feature_flag_version:r?.version,$feature_flag_reason:r?.reason,locally_evaluated:r?.locallyEvaluated??!1,[`$feature/${t}`]:n,$feature_flag_request_id:this._requestId,$feature_flag_evaluated_at:r?.locallyEvaluated?Date.now():this._evaluatedAt};r?.locallyEvaluated&&this._flagDefinitionsLoadedAt!==void 0&&(i.$feature_flag_definitions_loaded_at=this._flagDefinitionsLoadedAt);let o=[];this._errorsWhileComputing&&o.push(dfe.ERRORS_WHILE_COMPUTING),this._quotaLimited&&o.push(dfe.QUOTA_LIMITED),r===void 0&&o.push(dfe.FLAG_MISSING),o.length>0&&(i.$feature_flag_error=o.join(",")),this._host.captureFlagCalledEventIfNeeded({distinctId:this._distinctId,key:t,response:n,groups:this._groups,disableGeoip:this._disableGeoip,properties:i})}};async function CRu(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 Lmm=6e4,Umm=1152921504606847e3,Vmm=["is_not","is_set"],sit=class e extends Error{constructor(t){super(),Error.captureStackTrace(this,this.constructor),this.name="ClientError",this.message=t,Object.setPrototypeOf(this,e.prototype)}},Od=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},hee=class e extends Error{constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor),Object.setPrototypeOf(this,e.prototype)}},vGr=class{constructor({pollingInterval:t,personalApiKey:r,projectApiKey:n,timeout:i,host:o,customHeaders:s,...a}){this.debugMode=!1,this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.pollingInterval=t,this.personalApiKey=r,this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={},this.loadedSuccessfullyOnce=!1,this.timeout=i,this.projectApiKey=n,this.host=o,this.poller=void 0,this.fetch=a.fetch||fetch,this.onError=a.onError,this.customHeaders=s,this.onLoad=a.onLoad,this.cacheProvider=a.cacheProvider,this.strictLocalEvaluation=a.strictLocalEvaluation??!1,this.loadFeatureFlags()}debug(t=!0){this.debugMode=t}logMsgIfDebug(t){this.debugMode&&t()}createEvaluationContext(t,r={},n={},i={},o={}){return{distinctId:t,groups:r,personProperties:n,groupProperties:i,evaluationCache:o}}async getFeatureFlag(t,r,n={},i={},o={}){await this.loadFeatureFlags();let s,a;if(!this.loadedSuccessfullyOnce)return s;if(a=this.featureFlagsByKey[t],a!==void 0){let c=this.createEvaluationContext(r,n,i,o);try{s=(await this.computeFlagAndPayloadLocally(a,c)).value,this.logMsgIfDebug(()=>console.debug(`Successfully computed flag locally: ${t} -> ${s}`))}catch(u){u instanceof hee||u instanceof Od?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${t}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${t}: ${u}`))}}return s}async getAllFlagsAndPayloads(t,r){await this.loadFeatureFlags();let n={},i={},o=this.featureFlags.length==0,s=r?r.map(c=>this.featureFlagsByKey[c]).filter(Boolean):this.featureFlags,a={...t,evaluationCache:t.evaluationCache??{}};return await Promise.all(s.map(async c=>{try{let{value:u,payload:l}=await this.computeFlagAndPayloadLocally(c,a);n[c.key]=u,l&&(i[c.key]=l)}catch(u){u instanceof hee||u instanceof Od?this.logMsgIfDebug(()=>console.debug(`${u.name} when computing flag locally: ${c.key}: ${u.message}`)):u instanceof Error&&this.onError?.(new Error(`Error computing flag locally: ${c.key}: ${u}`)),o=!0}})),{response:n,payloads:i,fallbackToFlags:o}}async computeFlagAndPayloadLocally(t,r,n={}){let{matchValue:i,skipLoadCheck:o=!1}=n;if(o||await this.loadFeatureFlags(),!this.loadedSuccessfullyOnce)return{value:!1,payload:null};let s;s=i!==void 0?i:await this.computeFlagValueLocally(t,r);let a=this.getFeatureFlagPayload(t.key,s);return{value:s,payload:a}}async computeFlagValueLocally(t,r){let{distinctId:n,groups:i,personProperties:o,groupProperties:s}=r;if(!t.active)return!1;if(t.ensure_experience_continuity)throw new Od("Flag has experience continuity enabled");let c=(t.filters||{}).aggregation_group_type_index;if(c!=null){let u=this.groupTypeMapping[String(c)];if(!u)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Unknown group type index ${c} for feature flag ${t.key}`)),new Od("Flag has unknown group type index");if(!(u in i))return this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute group feature flag: ${t.key} without group names passed in`)),!1;t.bucketing_identifier==="device_id"&&(o?.$device_id===void 0||o?.$device_id===null||o?.$device_id==="")&&this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Ignoring bucketing_identifier for group flag: ${t.key}`));let l=s[u];return await this.matchFeatureFlagProperties(t,i[u],l,r)}{let u=this.getBucketingValueForFlag(t,n,o);if(u===void 0)throw this.logMsgIfDebug(()=>console.warn(`[FEATURE FLAGS] Can't compute feature flag: ${t.key} without $device_id, falling back to server evaluation`)),new Od(`Can't compute feature flag: ${t.key} without $device_id`);return await this.matchFeatureFlagProperties(t,u,o,r)}}getBucketingValueForFlag(t,r,n){if(t.filters?.aggregation_group_type_index!=null)return r;if(t.bucketing_identifier==="device_id"){let i=n?.$device_id;return i==null||i===""?void 0:i}return r}getFeatureFlagPayload(t,r){let n=null;if(r!==!1&&r!=null&&(typeof r=="boolean"?n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r.toString()]||null:typeof r=="string"&&(n=this.featureFlagsByKey?.[t]?.filters?.payloads?.[r]||null),n!=null)){if(typeof n=="object")return n;if(typeof n=="string")try{return JSON.parse(n)}catch{}return n}return null}async evaluateFlagDependency(t,r,n){let{evaluationCache:i}=n,o=t.key;if(!this.featureFlagsByKey)throw new Od("Feature flags not available for dependency evaluation");if(!("dependency_chain"in t))throw new Od(`Flag dependency property for '${o}' is missing required 'dependency_chain' field`);let s=t.dependency_chain;if(!Array.isArray(s))throw new Od(`Flag dependency property for '${o}' has an invalid 'dependency_chain' (expected array, got ${typeof s})`);if(s.length===0)throw new Od(`Circular dependency detected for flag '${o}' (empty dependency chain)`);for(let c of s){if(!(c in i)){let l=this.featureFlagsByKey[c];if(l)if(l.active)try{let p=await this.computeFlagValueLocally(l,n);i[c]=p}catch(p){throw new Od(`Error evaluating flag dependency '${c}' for flag '${o}': ${p}`)}else i[c]=!1;else throw new Od(`Missing flag dependency '${c}' for flag '${o}'`)}if(i[c]==null)throw new Od(`Dependency '${c}' could not be evaluated`)}let a=i[o];return this.flagEvaluatesToExpectedValue(t.value,a)}flagEvaluatesToExpectedValue(t,r){return typeof t=="boolean"?t===r||typeof r=="string"&&r!==""&&t===!0:typeof t=="string"?r===t:!1}async matchFeatureFlagProperties(t,r,n,i){let o=t.filters||{},s=o.groups||[],a=o.aggregation_group_type_index,{groups:c,groupProperties:u}=i,l=!1,p;for(let d of s)try{let f=d.aggregation_group_type_index!==void 0?d.aggregation_group_type_index:a,m=n,g=r;if(f!==a&&f!=null){let A=this.groupTypeMapping[String(f)];if(!A||!(A in c)){this.logMsgIfDebug(()=>console.debug(`[FEATURE FLAGS] Skipping group condition for flag '${t.key}': group type index ${f} not available`));continue}if(!(A in u)){l=!0;continue}m=u[A],g=c[A]}if(await this.isConditionMatch(t,g,d,m,i)){let A=d.variant,y=o.multivariate?.variants||[];p=A&&y.some(E=>E.key===A)?A:await this.getMatchingVariant(t,g)||!0;break}}catch(f){if(f instanceof hee)throw f;if(f instanceof Od)l=!0;else throw f}if(p!==void 0)return p;if(l)throw new Od("Can't determine if feature flag is enabled or not with given properties");return!1}async isConditionMatch(t,r,n,i,o){let s=n.rollout_percentage,a=c=>{this.logMsgIfDebug(()=>console.warn(c))};if((n.properties||[]).length>0){for(let c of n.properties){let u=c.type,l=!1;if(l=u==="cohort"?await BRu(c,i,this.cohorts,this.debugMode,p=>this.evaluateFlagDependency(p,i,o)):u==="flag"?await this.evaluateFlagDependency(c,i,o):ORu(c,i,a),!l)return!1}if(s==null)return!0}return!(s!=null&&await wRu(t.key,r)>s/100)}async getMatchingVariant(t,r){let n=await wRu(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(Lmm,this.pollingInterval*2**this.backOffCount):this.pollingInterval}beginBackoff(){this.shouldBeginExponentialBackoff=!0,this.backOffCount+=1,this.nextFetchAllowedAt=Date.now()+this.getPollingInterval()}clearBackoff(){this.shouldBeginExponentialBackoff=!1,this.backOffCount=0,this.nextFetchAllowedAt=void 0}async _loadFeatureFlags(){this.poller&&(clearTimeout(this.poller),this.poller=void 0),this.poller=setTimeout(()=>this.loadFeatureFlags(!0),this.getPollingInterval());try{let t=!0;if(this.cacheProvider)try{t=await this.cacheProvider.shouldFetchFlagDefinitions()}catch(n){this.onError?.(new Error(`Error in shouldFetchFlagDefinitions: ${n}`))}if(!t&&(await this.loadFromCache("Loaded flags from cache (skipped fetch)")||this.loadedSuccessfullyOnce))return;let r=await this._requestFeatureFlagDefinitions();if(!r)return;switch(r.status){case 304:this.logMsgIfDebug(()=>console.debug("[FEATURE FLAGS] Flags not modified (304), using cached data")),this.flagsEtag=r.headers?.get("ETag")??this.flagsEtag,this.loadedSuccessfullyOnce=!0,this.clearBackoff();return;case 401:throw this.beginBackoff(),new sit(`Your project key or personal API key is invalid. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 402:console.warn("[FEATURE FLAGS] Feature flags quota limit exceeded - unsetting all local flags. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"),this.featureFlags=[],this.featureFlagsByKey={},this.groupTypeMapping={},this.cohorts={};return;case 403:throw this.beginBackoff(),new sit(`Your personal API key does not have permission to fetch feature flag definitions for local evaluation. Setting next polling interval to ${this.getPollingInterval()}ms. Are you sure you're using the correct personal and Project API key pair? More information: https://posthog.com/docs/api/overview`);case 429:throw this.beginBackoff(),new sit(`You are being rate limited. Setting next polling interval to ${this.getPollingInterval()}ms. More information: https://posthog.com/docs/api#rate-limiting`);case 200:{let n=await r.json()??{};if(!("flags"in n))return void this.onError?.(new Error(`Invalid response when getting feature flags: ${JSON.stringify(n)}`));this.flagsEtag=r.headers?.get("ETag")??void 0;let i={flags:n.flags??[],groupTypeMapping:n.group_type_mapping||{},cohorts:n.cohorts||{}};if(this.updateFlagState(i),this.flagDefinitionsLoadedAt=Date.now(),this.clearBackoff(),this.cacheProvider&&t)try{await this.cacheProvider.onFlagDefinitionsReceived(i)}catch(o){this.onError?.(new Error(`Failed to store in cache: ${o}`))}this.onLoad?.(this.featureFlags.length),this.warnAboutExperienceContinuityFlags(i.flags);break}default:return}}catch(t){t instanceof sit&&this.onError?.(t)}}getPersonalApiKeyRequestOptions(t="GET",r){let n={...this.customHeaders,"Content-Type":"application/json",Authorization:`Bearer ${this.personalApiKey}`};return r&&(n["If-None-Match"]=r),{method:t,headers:n}}_requestFeatureFlagDefinitions(){let t=`${this.host}/flags/definitions?token=${this.projectApiKey}&send_cohorts`,r=this.getPersonalApiKeyRequestOptions("GET",this.flagsEtag),n=null;if(this.timeout&&typeof this.timeout=="number"){let i=new AbortController;n=dee(()=>{i.abort()},this.timeout),r.signal=i.signal}try{let i=this.fetch;return i(t,r)}finally{clearTimeout(n)}}async stopPoller(t=3e4){if(clearTimeout(this.poller),this.cacheProvider)try{let r=this.cacheProvider.shutdown();r instanceof Promise&&await Promise.race([r,new Promise((n,i)=>setTimeout(()=>i(new Error(`Cache shutdown timeout after ${t}ms`)),t))])}catch(r){this.onError?.(new Error(`Error during cache shutdown: ${r}`))}}};async function wRu(e,t,r=""){let n=await CRu(`${e}.${t}${r}`);return parseInt(n.slice(0,15),16)/Umm}function ORu(e,t,r){let n=e.key,i=e.value,o=e.operator||"exact";if(n in t){if(o==="is_not_set")return!1}else{if(o==="is_not_set")return!0;throw new Od(`Property ${n} not found in propertyValues`)}let s=t[n];if(s==null&&!Vmm.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 SRu(String(i))&&String(s).match(String(i))!==null;case"not_regex":return SRu(String(i))&&String(s).match(String(i))===null;case"gt":case"gte":case"lt":case"lte":{let u=typeof i=="number"?i:parseFloat(String(i)),l;return l=typeof s=="number"?s:s!=null?parseFloat(String(s)):NaN,Number.isFinite(u)&&Number.isFinite(l)?c(l,u,o):c(String(s),String(i),o)}case"is_date_after":case"is_date_before":{if(typeof i=="boolean")throw new Od("Date operations cannot be performed on boolean values");let u=Hmm(String(i));if(u==null&&(u=TRu(i)),u==null)throw new Od(`Invalid date: ${i}`);let l=TRu(s);return["is_date_before"].includes(o)?l<u:l>u}case"semver_eq":return w_(CB(String(s)),CB(String(i)))===0;case"semver_neq":return w_(CB(String(s)),CB(String(i)))!==0;case"semver_gt":return w_(CB(String(s)),CB(String(i)))>0;case"semver_gte":return w_(CB(String(s)),CB(String(i)))>=0;case"semver_lt":return w_(CB(String(s)),CB(String(i)))<0;case"semver_lte":return w_(CB(String(s)),CB(String(i)))<=0;case"semver_tilde":{let u=CB(String(s)),{lower:l,upper:p}=Gmm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_caret":{let u=CB(String(s)),{lower:l,upper:p}=qmm(String(i));return w_(u,l)>=0&&w_(u,p)<0}case"semver_wildcard":{let u=CB(String(s)),{lower:l,upper:p}=Wmm(String(i));return w_(u,l)>=0&&w_(u,p)<0}default:throw new Od(`Unknown operator: ${o}`)}}function _mm(e,t){if(!(e in t))throw new hee(`cohort ${e} not found in local cohorts - likely a static cohort that requires server evaluation`)}async function BRu(e,t,r,n=!1,i){let o=String(e.value);_mm(o,r);let s=r[o];return PRu(s,t,r,n,i)}async function PRu(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 PRu(c,t,r,n,i);if(o==="AND"){if(!u)return!1}else if(u)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("Can't match cohort without a given cohort property value");return o==="AND"}for(let c of s)try{let u;if(c.type==="cohort")u=await BRu(c,t,r,n,i);else if(c.type==="flag"){if(!i)throw new Od(`Flag dependency '${c.key||"unknown"}' cannot be evaluated without a flag dependency evaluator`);u=await i(c)}else u=ORu(c,t);let l=c.negation||!1;if(o==="AND"){if(!u&&!l||u&&l)return!1}else if(u&&!l||!u&&l)return!0}catch(u){if(u instanceof hee)throw u;if(u instanceof Od)n&&console.debug(`Failed to compute property ${c} locally: ${u}`),a=!0;else throw u}if(a)throw new Od("can't match cohort without a given cohort property value");return o==="AND"}function SRu(e){try{return new RegExp(e),!0}catch{return!1}}function DRu(e,t){if(!/^\d+$/.test(e))throw new Od(`Invalid semver: ${t}`);if(e.length>1&&e[0]==="0")throw new Od(`Invalid semver: ${t}`);return parseInt(e,10)}function CB(e){let r=String(e).trim().replace(/^[vV]/,"").split("-")[0].split("+")[0];if(!r||r.startsWith("."))throw new Od(`Invalid semver: ${e}`);let n=r.split("."),i=c=>c===void 0||c===""?0:DRu(c,e),o=i(n[0]),s=i(n[1]),a=i(n[2]);return[o,s,a]}function w_(e,t){for(let r=0;r<3;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}function Gmm(e){let t=CB(e),r=[t[0],t[1],t[2]],n=[t[0],t[1]+1,0];return{lower:r,upper:n}}function qmm(e){let t=CB(e),[r,n,i]=t,o=[r,n,i],s;return s=r>0?[r+1,0,0]:n>0?[0,n+1,0]:[0,0,i+1],{lower:o,upper:s}}function Wmm(e){let r=String(e).trim().replace(/^[vV]/,"").replace(/\.\*$/,"").replace(/\*$/,"");if(!r)throw new Od(`Invalid wildcard semver: ${e}`);let n=r.split("."),i=c=>{try{return DRu(c,e)}catch{throw new Od(`Invalid wildcard semver: ${e}`)}},o=i(n[0]),s,a;if(n.length===1)s=[o,0,0],a=[o+1,0,0];else{let c=i(n[1]);s=[o,c,0],a=[o,c+1,0]}return{lower:s,upper:a}}function TRu(e){if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(!isNaN(t.valueOf()))return t;throw new Od(`${e} is in an invalid date format`)}throw new Od(`The date provided ${e} must be a string, number, or date object`)}function Hmm(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 xGr=class{getProperty(t){return this._memoryStorage[t]}setProperty(t,r){this._memoryStorage[t]=r!==null?r:void 0}constructor(){this._memoryStorage={}}};var Kmm=100,RRu=3e4,Jmm=5e4,Ymm=50,Xmm=500,Zmm="https://us.i.posthog.com",kRu=new Set;function CGr(e,t){kRu.has(e)||(kRu.add(e),console.warn(`[PostHog] ${t}`))}function $mm(e){return typeof e=="string"?e.trim():""}function ehm(e){return(typeof e=="string"?e.trim():"")||void 0}function thm(e){return(typeof e=="string"?e.trim():"")||Zmm}function rhm(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 wGr=class extends BUt{constructor(t,r={}){let n=$mm(t),i={...r,host:thm(r.host),personalApiKey:ehm(r.personalApiKey)};if(super(n,i),this._memoryStorage=new xGr,this.options=i,this.context=this.initializeContext(),this.options.featureFlagsPollingInterval=typeof i.featureFlagsPollingInterval=="number"?Math.max(i.featureFlagsPollingInterval,Kmm):RRu,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 vGr({pollingInterval:this.options.featureFlagsPollingInterval,personalApiKey:i.personalApiKey,projectApiKey:n,timeout:i.requestTimeout??1e4,host:this.host,fetch:i.fetch,onError:s=>{this._events.emit("error",s)},onLoad:s=>{this._events.emit("localEvaluationFlagsLoaded",s)},customHeaders:this.getCustomHeaders(),cacheProvider:i.flagDefinitionCacheProvider,strictLocalEvaluation:i.strictLocalEvaluation}))}this.errorTracking=new sH(this,i,this._logger),this.distinctIdHasSentFlagCalls={},this.maxCacheSize=i.maxCacheSize||Jmm}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??Xmm,i=r>=n;if(this._waitUntilCycle.timer!==void 0&&clearTimeout(this._waitUntilCycle.timer),i)return void this.resolveWaitUntilFlush();let o=this.options.waitUntilDebounceMs??Ymm;this._waitUntilCycle.timer=dee(()=>{this.resolveWaitUntilFlush()},o)}_consumeWaitUntilCycle(){let t=this._waitUntilCycle;return t&&(clearTimeout(t.timer),this._waitUntilCycle=void 0),t?.resolve}async resolveWaitUntilFlush(){let t=this._consumeWaitUntilCycle();try{await super.flush()}catch{}finally{t?.()}}getPersistedProperty(t){return this._memoryStorage.getProperty(t)}setPersistedProperty(t,r){return this._memoryStorage.setProperty(t,r)}fetch(t,r){return this.options.fetch?this.options.fetch(t,r):fetch(t,r)}getLibraryVersion(){return xRu}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=RRu){return this.isLocalEvaluationReady()?!0:this.featureFlagsPoller===void 0?!1:new Promise(r=>{let n=setTimeout(()=>{i(),r(!1)},t),i=this._events.on("localEvaluationFlagsLoaded",o=>{clearTimeout(n),i(),r(o>0)})})}_resolveDistinctId(t,r){return typeof t=="string"?{distinctId:t,options:r}:{distinctId:this.context?.get()?.distinctId,options:t}}async _getFeatureFlagResult(t,r,n={},i){let o=n.sendFeatureFlagEvents??!0;if(this._flagOverrides!==void 0&&t in this._flagOverrides){let w=this._flagOverrides[t];if(w===void 0)return;let O=this._payloadOverrides?.[t];return{key:t,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O}}let{groups:s,disableGeoip:a}=n,{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=n,p=this.addLocalPersonAndGroupProperties(r,s,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(r,s,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f,m=!1,g,A,y,E,x,I;if(this.featureFlagsPoller!==void 0){await this.featureFlagsPoller?.loadFeatureFlags();let w=this.featureFlagsPoller?.featureFlagsByKey[t];if(w)try{let O=await this.featureFlagsPoller?.computeFlagAndPayloadLocally(w,d,{matchValue:i});if(O){m=!0;let B=O.value;E=w.id,I="Evaluated locally",f={key:t,enabled:B!==!1,variant:typeof B=="string"?B:void 0,payload:O.payload??void 0}}}catch(O){if(O instanceof hee||O instanceof Od)this._logger?.info(`${O.name} when computing flag locally: ${t}: ${O.message}`);else throw O}}if(!m&&!c){let w=await super.getFeatureFlagDetailsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,a,[t]);if(w===void 0)y=dfe.UNKNOWN_ERROR;else{g=w.requestId,A=w.evaluatedAt;let O=[];w.errorsWhileComputingFlags&&O.push(dfe.ERRORS_WHILE_COMPUTING),w.quotaLimited?.includes("feature_flags")&&O.push(dfe.QUOTA_LIMITED);let B=w.flags[t];if(B===void 0)O.push(dfe.FLAG_MISSING);else{E=B.metadata?.id,x=B.metadata?.version,I=B.reason?.description??B.reason?.code;let T;if(B.metadata?.payload!==void 0)try{T=JSON.parse(B.metadata.payload)}catch{T=B.metadata.payload}f={key:t,enabled:B.enabled,variant:B.variant,payload:T}}O.length>0&&(y=O.join(","))}}if(o){let w=f===void 0?void 0:f.enabled===!1?!1:f.variant??!0,O={$feature_flag:t,$feature_flag_response:w,$feature_flag_id:E,$feature_flag_version:x,$feature_flag_reason:I,locally_evaluated:m,[`$feature/${t}`]:w,$feature_flag_request_id:g,$feature_flag_evaluated_at:m?Date.now():A};if(m&&this.featureFlagsPoller){let B=this.featureFlagsPoller.getFlagDefinitionsLoadedAt();B!==void 0&&(O.$feature_flag_definitions_loaded_at=B)}y&&(O.$feature_flag_error=y),this._captureFlagCalledEventIfNeeded({distinctId:r,key:t,response:w,groups:s,disableGeoip:a,properties:O})}return f!==void 0&&this._payloadOverrides!==void 0&&t in this._payloadOverrides&&(f={...f,payload:this._payloadOverrides[t]}),f}async getFeatureFlag(t,r,n){CGr("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(CGr("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){CGr("isFeatureEnabled","`isFeatureEnabled` is deprecated and will be removed in a future major version. Use `posthog.evaluateFlags(distinctId, ...)` and call `flags.isEnabled(key)` instead \u2014 this consolidates flag evaluation into a single `/flags` request per incoming request.");let i=await this._getFeatureFlagResult(t,r,{...n,sendFeatureFlagEvents:n?.sendFeatureFlagEvents??this.options.sendFeatureFlagEvent??!0});return i===void 0?void 0:i.enabled===!1?!1:!!(i.variant??!0)||!1}async getAllFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);return n?(await this.getAllFlagsAndPayloads(n,i)).featureFlags||{}:(this._logger.warn("[PostHog] distinctId is required to get feature flags \u2014 pass it explicitly or use withContext()"),{})}async getAllFlagsAndPayloads(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to get feature flags and payloads \u2014 pass it explicitly or use withContext()"),{featureFlags:{},featureFlagPayloads:{}};let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),m={},g={},A=!0;if(f&&(m=f.response,g=f.payloads,A=f.fallbackToFlags),A&&!c){let y=await super.getFeatureFlagsAndPayloadsStateless(d.distinctId,d.groups,d.personProperties,d.groupProperties,s,a);m={...m,...y.flags||{}},g={...g,...y.payloads||{}}}return this._flagOverrides!==void 0&&(m={...m,...this._flagOverrides}),this._payloadOverrides!==void 0&&(g={...g,...this._payloadOverrides}),{featureFlags:m,featureFlagPayloads:g}}async evaluateFlags(t,r){let{distinctId:n,options:i}=this._resolveDistinctId(t,r);if(!n)return this._logger.warn("[PostHog] distinctId is required to evaluate feature flags \u2014 pass it explicitly or use withContext()"),new oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:"",flags:{}});let{groups:o,disableGeoip:s,flagKeys:a}=i||{},{onlyEvaluateLocally:c,personProperties:u,groupProperties:l}=i||{},p=this.addLocalPersonAndGroupProperties(n,o,u,l);u=p.allPersonProperties,l=p.allGroupProperties;let d=this.createFeatureFlagEvaluationContext(n,o,u,l);c==null&&(c=this.options.strictLocalEvaluation??!1);let f={},m,g,A=!1,y=!1,E=await this.featureFlagsPoller?.getAllFlagsAndPayloads(d,a),x=new Set;if(E)for(let[C,w]of Object.entries(E.response)){let O=this.featureFlagsPoller?.featureFlagsByKey[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:E.payloads[C],id:O?.id,version:void 0,reason:"Evaluated locally",locallyEvaluated:!0},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[w,O]of Object.entries(C.flags)){if(x.has(w))continue;let B;if(O.metadata?.payload!==void 0)try{B=JSON.parse(O.metadata.payload)}catch{B=O.metadata.payload}f[w]={key:w,enabled:O.enabled,variant:O.variant,payload:B,id:O.metadata?.id,version:O.metadata?.version,reason:O.reason?.description??O.reason?.code,locallyEvaluated:!1}}}}if(this._flagOverrides!==void 0)for(let[C,w]of Object.entries(this._flagOverrides)){if(w===void 0){delete f[C];continue}let O=f[C];f[C]={key:C,enabled:w!==!1,variant:typeof w=="string"?w:void 0,payload:O?.payload,id:O?.id,version:O?.version,reason:O?.reason,locallyEvaluated:O?.locallyEvaluated??!1}}if(this._payloadOverrides!==void 0)for(let[C,w]of Object.entries(this._payloadOverrides)){let O=f[C];O&&(f[C]={...O,payload:w})}return new oit({host:this._getFeatureFlagEvaluationsHost(),distinctId:n,groups:o,disableGeoip:s,flags:f,requestId:m,evaluatedAt:g,flagDefinitionsLoadedAt:this.featureFlagsPoller?.getFlagDefinitionsLoadedAt(),errorsWhileComputing:A,quotaLimited:y})}_captureFlagCalledEventIfNeeded(t){let{distinctId:r,key:n,response:i,groups:o,disableGeoip:s,properties:a}=t,c=`${n}_${i}`;r in this.distinctIdHasSentFlagCalls&&this.distinctIdHasSentFlagCalls[r].includes(c)||(Object.keys(this.distinctIdHasSentFlagCalls).length>=this.maxCacheSize&&(this.distinctIdHasSentFlagCalls={}),Array.isArray(this.distinctIdHasSentFlagCalls[r])?this.distinctIdHasSentFlagCalls[r].push(c):this.distinctIdHasSentFlagCalls[r]=[c],this.capture({distinctId:r,event:"$feature_flag_called",properties:a,groups:o,disableGeoip:s}))}_getFeatureFlagEvaluationsHost(){return this._featureFlagEvaluationsHost||(this._featureFlagEvaluationsHost={captureFlagCalledEventIfNeeded:t=>this._captureFlagCalledEventIfNeeded(t),logWarning:t=>{this.options.featureFlagsLogWarnings!==!1&&console.warn(`[PostHog] ${t}`)}}),this._featureFlagEvaluationsHost}groupIdentify({groupType:t,groupKey:r,properties:n,distinctId:i,disableGeoip:o}){super.groupIdentifyStateless(t,r,n,{disableGeoip:o},i)}async reloadFeatureFlags(){await this.featureFlagsPoller?.loadFeatureFlags(!0)}overrideFeatureFlags(t){let r=n=>Object.fromEntries(n.map(i=>[i,!0]));if(t===!1){this._flagOverrides=void 0,this._payloadOverrides=void 0;return}if(Array.isArray(t)){this._flagOverrides=r(t);return}if(this._isFeatureFlagOverrideOptions(t)){"flags"in t&&(t.flags===!1?this._flagOverrides=void 0:Array.isArray(t.flags)?this._flagOverrides=r(t.flags):t.flags!==void 0&&(this._flagOverrides={...t.flags})),"payloads"in t&&(t.payloads===!1?this._payloadOverrides=void 0:t.payloads!==void 0&&(this._payloadOverrides={...t.payloads}));return}this._flagOverrides={...t}}_isFeatureFlagOverrideOptions(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let r=t;if("flags"in r){let n=r.flags;if(n===!1||Array.isArray(n)||typeof n=="object"&&n!==null)return!0}if("payloads"in r){let n=r.payloads;if(n===!1||typeof n=="object"&&n!==null)return!0}return!1}withContext(t,r,n){return this.context?this.context.run(t,r,n):r()}getContext(){return this.context?.get()}enterContext(t,r){this.context?.enter(t,r)}async _shutdown(t){let r=this._consumeWaitUntilCycle();await this.featureFlagsPoller?.stopPoller(t),this.errorTracking.shutdown();try{return await super._shutdown(t)}finally{r?.()}}async _requestRemoteConfigPayload(t){if(!this.options.personalApiKey)return;let r=`${this.host}/api/projects/@current/feature_flags/${t}/remote_config?token=${encodeURIComponent(this.apiKey)}`,n={method:"GET",headers:{...this.getCustomHeaders(),"Content-Type":"application/json",Authorization:`Bearer ${this.options.personalApiKey}`}},i=null;if(this.options.requestTimeout&&typeof this.options.requestTimeout=="number"){let o=new AbortController;i=dee(()=>{o.abort()},this.options.requestTimeout),n.signal=o.signal}try{return await this.fetch(r,n)}catch(o){this._events.emit("error",o);return}finally{i&&clearTimeout(i)}}extractPropertiesFromEvent(t,r){if(!t)return{personProperties:{},groupProperties:{}};let n={},i={};for(let[o,s]of Object.entries(t))if(zDu(s)&&r&&o in r){let a={};for(let[c,u]of Object.entries(s))a[String(c)]=String(u);i[String(o)]=a}else n[String(o)]=String(s);return{personProperties:n,groupProperties:i}}async getFeatureFlagsForEvent(t,r,n,i){let o=i?.personProperties||{},s=i?.groupProperties||{},a=i?.flagKeys;if(i?.onlyEvaluateLocally??this.options.strictLocalEvaluation??!1)if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}else return{};if((this.featureFlagsPoller?.featureFlags?.length||0)>0){let u={};for(let[l,p]of Object.entries(r||{}))u[l]=String(p);return await this.getAllFlags(t,{groups:u,personProperties:o,groupProperties:s,disableGeoip:n,onlyEvaluateLocally:!0,flagKeys:a})}return(await super.getFeatureFlagsStateless(t,r,o,s,n)).flags}addLocalPersonAndGroupProperties(t,r,n,i){let o={distinct_id:t,...n||{}},s={};if(r)for(let a of Object.keys(r))s[a]={$group_key:r[a],...i?.[a]||{}};return{allPersonProperties:o,allGroupProperties:s}}createFeatureFlagEvaluationContext(t,r,n,i){return{distinctId:t,groups:r||{},personProperties:n||{},groupProperties:i||{},evaluationCache:{}}}captureException(t,r,n,i,o){if(!sH.isPreviouslyCapturedError(t)){let s=new Error("PostHog syntheticException");this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:s},r,n).then(a=>this.capture({...a,uuid:i,flags:o})))}}async captureExceptionImmediate(t,r,n,i){if(!sH.isPreviouslyCapturedError(t)){let o=new Error("PostHog syntheticException");return this.addPendingPromise(sH.buildEventMessage(t,{syntheticException:o},r,n).then(s=>this.captureImmediate({...s,flags:i})))}}async prepareEventMessage(t){let{distinctId:r,event:n,properties:i,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l}=t,p=this.context?.get(),d=r||p?.distinctId,f={...this.props,...p?.properties||{},...i||{}};d||(d=fee(),f.$process_person_profile=!1),p?.sessionId&&!f.$session_id&&(f.$session_id=p.sessionId);let m=this._runBeforeSend({distinctId:d,event:n,properties:f,groups:o,flags:s,sendFeatureFlags:a,timestamp:c,disableGeoip:u,uuid:l});if(!m)return Promise.reject(null);let g=await Promise.resolve().then(async()=>{if(s)return a&&console.warn("[PostHog] Both `flags` and `sendFeatureFlags` were passed to capture(); using `flags` and ignoring `sendFeatureFlags`."),s._getEventProperties();if(a){CGr("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 rhm(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"&&FDu(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 FRu=require("async_hooks"),SGr=class{constructor(){this.storage=new FRu.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 NRu="posthog-node";function nhm(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[fjo.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 fjo=class{static#e=this.POSTHOG_ID_TAG="posthog_distinct_id";constructor(t,r,n,i,o){this.name=NRu,this.name=NRu,this.setupOnce=function(s,a){let c=a()?.getClient()?.getDsn()?.projectId;s(nhm(t,{organization:r,projectId:c,prefix:n,severityAllowList:i,sendExceptionsToPostHog:o??!0}))}}};sH.errorPropertiesBuilder=new MQ.ErrorPropertiesBuilder([new MQ.EventCoercer,new MQ.ErrorCoercer,new MQ.ObjectCoercer,new MQ.StringCoercer,new MQ.PrimitiveCoercer],MQ.createStackParser("node:javascript",MQ.nodeStackLineParser),[DDu(),ARu,ERu()]);var kve=class extends wGr{getLibraryId(){return"posthog-node"}initializeContext(){return new SGr}};var TGr=class{posthog;constructor({posthogApiKey:t}){this.posthog=new kve(t)}async identify(){}async sendEvent(t){t.orgId!=null&&this.posthog.capture({distinctId:t.orgId,event:"CLI",properties:{...t,...t.properties,version:"5.75.6",usingAccessToken:!0,...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}};var DUt=class{async sendEvent(){}async sendAutomationEvent(){}async identify(){}async flush(){}};om();Zt();var ait=require("fs/promises"),jRu=require("os"),QRu=require("path");Wtt();var ihm="id",ohm=".fern",RUt=class{posthog;userId;token;constructor({token:t,posthogApiKey:r}){this.posthog=new kve(r),this.userId=t==null?void 0:NPo(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.75.6",...t,...t.properties,usingAccessToken:!1,...r!=null?{userEmail:r}:{},...ece()}})}sendAutomationEvent(t){this.posthog.capture({distinctId:t.distinctId,event:t.event,properties:t.properties})}async flush(){try{await Promise.race([this.posthog.flush(),new Promise(t=>setTimeout(t,3e3))])}catch{}}userEmail;async getUserEmail(){if(this.userEmail!==null){if(this.userEmail!=null)return this.userEmail;if(this.token==null){this.userEmail=null;return}try{let t=await xf({token:this.token.value}).user.getMyself();if(t.ok&&t.body.email!=null)return this.userEmail=t.body.email,this.userEmail}catch{}this.userEmail=null}}persistedDistinctId;async getPersistedDistinctId(){if(this.persistedDistinctId==null){let t=vD(),r=We(Vt.of((0,jRu.homedir)()),we.of(ohm),we.of(ihm));try{await rr(r)?this.persistedDistinctId=(await(0,ait.readFile)(r)).toString():(await(0,ait.mkdir)((0,QRu.dirname)(r),{recursive:!0}),await(0,ait.writeFile)(r,t),this.persistedDistinctId=t)}catch{this.persistedDistinctId=t}}return this.persistedDistinctId}};var djo;async function kUt(){return djo==null&&(djo=await shm()),djo}async function shm(){try{let e="phc_yQgAEdJJkVpI24NdSRID2mor1x1leRpDoC9yZ9mfXal",t=process.env.FERN_DISABLE_TELEMETRY==="true";if(e==null||t)return new DUt;let r=await vrt();return r!=null?new RUt({token:r,posthogApiKey:e}):await u_()!=null?new TGr({posthogApiKey:e}):new RUt({token:void 0,posthogApiKey:e})}catch{return new DUt}}En();Dt();Qt();OW();var FUt=be(require("process"),1);fqe();var LRu=be(cvo(),1),URu=be(MRu(),1);function N1(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Qq(e),e.length===0))return 0;e=e.replace((0,URu.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(LRu.default.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}En();function OGr(e){let t=0;for(let r of e.split(`
|
|
3085
3085
|
`))t=Math.max(t,N1(r));return t}var aku=be(hjo(),1);var chm=/[\p{Lu}]/u,uhm=/[\p{Ll}]/u,GRu=/^[\p{Lu}](?![\p{Lu}])/gu,HRu=/([\p{Alpha}\p{N}_]|$)/u,gjo=/[_.\- ]+/,lhm=new RegExp("^"+gjo.source),qRu=new RegExp(gjo.source+HRu.source,"gu"),WRu=new RegExp("\\d+"+HRu.source,"gu"),phm=(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&&chm.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),i=!1,s=o,o=!0,c++):o&&s&&uhm.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},fhm=(e,t)=>(GRu.lastIndex=0,e.replace(GRu,r=>t(r))),dhm=(e,t)=>(qRu.lastIndex=0,WRu.lastIndex=0,e.replace(qRu,(r,n)=>t(n)).replace(WRu,r=>t(r)));function Ajo(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?gjo.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=phm(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(lhm,""),e=t.preserveConsecutiveUppercase?fhm(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),dhm(e,n))}var Ijo=be(JRu(),1);fqe();var YRu=(e=0)=>t=>`\x1B[${t+e}m`,XRu=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,ZRu=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,P0={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},exI=Object.keys(P0.modifier),Ahm=Object.keys(P0.color),yhm=Object.keys(P0.bgColor),txI=[...Ahm,...yhm];function bhm(){let e=new Map;for(let[t,r]of Object.entries(P0)){for(let[n,i]of Object.entries(r))P0[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=P0[n],e.set(i[0],i[1]);Object.defineProperty(P0,t,{value:r,enumerable:!1})}return Object.defineProperty(P0,"codes",{value:e,enumerable:!1}),P0.color.close="\x1B[39m",P0.bgColor.close="\x1B[49m",P0.color.ansi=YRu(),P0.color.ansi256=XRu(),P0.color.ansi16m=ZRu(),P0.bgColor.ansi=YRu(10),P0.bgColor.ansi256=XRu(10),P0.bgColor.ansi16m=ZRu(10),Object.defineProperties(P0,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>P0.rgbToAnsi256(...P0.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>P0.ansi256ToAnsi(P0.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>P0.ansi256ToAnsi(P0.hexToAnsi256(t)),enumerable:!1}}),P0}var Ehm=bhm(),$Ru=Ehm;var BGr=new Set(["\x1B","\x9B"]),Ihm=39,bjo="\x07",rku="[",vhm="]",nku="m",Ejo=`${vhm}8;;`,eku=e=>`${BGr.values().next().value}${rku}${e}${nku}`,tku=e=>`${BGr.values().next().value}${Ejo}${e}${bjo}`,xhm=e=>e.split(" ").map(t=>N1(t)),yjo=(e,t,r)=>{let n=[...t],i=!1,o=!1,s=N1(Qq(e[e.length-1]));for(let[a,c]of n.entries()){let u=N1(c);if(s+u<=r?e[e.length-1]+=c:(e.push(c),s=0),BGr.has(c)&&(i=!0,o=n.slice(a+1).join("").startsWith(Ejo)),i){o?c===bjo&&(i=!1,o=!1):c===nku&&(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())},Chm=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(N1(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},whm=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,o,s=xhm(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=N1(a[a.length-1]);if(u!==0&&(p>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),p=0),(p>0||r.trim===!1)&&(a[a.length-1]+=" ",p++)),r.hard&&s[u]>t){let d=t-p,f=1+Math.floor((s[u]-d-1)/t);Math.floor((s[u]-1)/t)<f&&a.push(""),yjo(a,l,t);continue}if(p+s[u]>t&&p>0&&s[u]>0){if(r.wordWrap===!1&&p<t){yjo(a,l,t);continue}a.push("")}if(p+s[u]>t&&r.wordWrap===!1){yjo(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Chm(u)));let c=[...a.join(`
|
|
3086
3086
|
`)];for(let[u,l]of c.entries()){if(n+=l,BGr.has(l)){let{groups:d}=new RegExp(`(?:\\${rku}(?<code>\\d+)m|\\${Ejo}(?<uri>.*)${bjo})`).exec(c.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let f=Number.parseFloat(d.code);i=f===Ihm?void 0:f}else d.uri!==void 0&&(o=d.uri.length===0?void 0:d.uri)}let p=$Ru.codes.get(Number(i));c[u+1]===`
|
|
3087
3087
|
`?(o&&(n+=tku("")),i&&p&&(n+=eku(p))):l===`
|
|
@@ -3653,7 +3653,7 @@ Hint: Values starting with "@" (such as scoped npm packages) must be wrapped in
|
|
|
3653
3653
|
Add a 'docs:' section to your fern.yml to get started.`,code:P.Code.ConfigError});let o=await new iPe({context:t}).check({workspace:n,strict:r.strict}),s=new Set(o.mdxParseErrors.map(p=>p.displayRelativeFilepath)),a=new Set(o.mdxParseErrors.map(p=>p.rawMessage)),c=o.violations.filter(p=>!(s.size>0&&$$m(p,s,a))),u=o.hasErrors||r.strict&&o.hasWarnings;if(r.json){let p=this.buildJsonResponse({result:o,filteredViolations:c,hasErrors:u});if(t.stdout.info(JSON.stringify(p,null,2)),u)throw new P({code:P.Code.ValidationError});return}if(c.length>0)for(let p of c){let d=p.severity==="warning"?fe.yellow:fe.red;process.stderr.write(`${d(`${p.displayRelativeFilepath}:${p.line}:${p.column}: ${p.message}`)}
|
|
3654
3654
|
`)}let l=0;if(o.mdxParseErrors.length>0){for(let p of o.mdxParseErrors)t.stderr.info(`
|
|
3655
3655
|
${p.toString()}
|
|
3656
|
-
`);r.fix?l+=await Kei(t,o.mdxParseErrors):process.stdout.isTTY===!0&&!bXn()&&await Jei(t,o.mdxParseErrors)}if(r.fix&&c.length>0){let d=await new fbt({context:t}).fix({workspace:n,violations:c});l+=d.fixedCount}if(u&&(!r.fix||l===0))throw new P({code:P.Code.ValidationError});if(o.warningCount>0){t.stderr.info(`${Pr.warning} ${fe.yellow(`Found ${o.warningCount} warnings`)}`),t.stderr.info(fe.dim(" Run 'fern docs check --strict' to treat warnings as errors"));return}t.stderr.info(`${Pr.success} ${fe.green("All checks passed")}`)}buildJsonResponse({result:t,filteredViolations:r,hasErrors:n}){let i={};return(r.length>0||t.mdxParseErrors.length>0)&&(i.docs=[...r.map(o=>Eee(o)),...t.mdxParseErrors.map(o=>({severity:"error",rule:o.code.code,filepath:o.displayRelativeFilepath,...o.line!=null?{line:o.line}:{},...o.column!=null?{column:o.column}:{},message:`[${o.code.code}] ${o.code.title}: ${o.rawMessage}`}))]),{success:!n,results:i}}};function $$m(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 BYo(e){let t=new OYo;Zn(e,"check","Validate docs configuration",(r,n)=>t.handle(r,n),r=>r.option("strict",{type:"boolean",description:"Treat warnings as errors",default:!1}).option("json",{type:"boolean",description:"Output results as JSON to stdout",default:!1}).option("fix",{type:"boolean",description:"Automatically fix issues that have a known resolution",default:!1}))}Ab();Qt();var Yil=be(require("net"),1),Xil=be(require("os"),1),Zei=class extends Error{constructor(t){super(`${t} is locked`)}},gbt={old:new Set,young:new Set},eeh=1e3*15,Zil=new Set;var v9t,teh=()=>{let e=Xil.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},Kil=e=>new Promise((t,r)=>{let n=Yil.default.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),Jil=async(e,t)=>{if(e.host||e.port===0)return Kil(e);for(let r of t)try{await Kil({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},reh=e=>gbt.old.has(e)||gbt.young.has(e)||Zil.has(e),neh=function*(e){e&&(yield*e),yield 0};async function sPe(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){let s=e.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let a of s){if(typeof a!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(a))throw new TypeError(`Number ${a} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}let{reserve:n,...i}=e??{};v9t===void 0&&(v9t=setTimeout(()=>{v9t=void 0,gbt.old=gbt.young,gbt.young=new Set},eeh),v9t.unref&&v9t.unref());let o=teh();for(let s of neh(t))try{if(r.has(s))continue;let a=await Jil({...i,port:s},o);for(;reh(a);){if(s!==0)throw new Zei(s);a=await Jil({...i,port:s},o)}return n?Zil.add(a):gbt.young.add(a),a}catch(a){if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof Zei))throw a}throw new Error("No available ports found")}Qt();var tol=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,$il="docs.buildwithfern.com",eol=62;function I4e(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)),tol.test(t)}function rol(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function x9t({orgId:e,previewId:t}){let r=rol(t),n=`${e}-preview-${r}.${$il}`;if(n.length<=eol)return n;let i=`${e}-preview-`,o=eol-i.length;if(o<8)throw new P({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:P.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${$il}`}Dt();SC();Lm();Zt();iC();Qt();En();var hes=require("child_process"),SAl=be(RYo(),1),ges=be(zti(),1),Aes=be(require("fs"),1),SPe=require("fs/promises"),TAl=be(require("http"),1),OAl=be(require("os"),1),Tni=be(require("path"),1);$ti();Zt();var B9=require("fs/promises"),Lll=require("os"),bZo=be(require("path"),1),Gch=".fern",qch="logs",yZo=100*1024*1024;function Wch(){return"cli@5.75.
|
|
3656
|
+
`);r.fix?l+=await Kei(t,o.mdxParseErrors):process.stdout.isTTY===!0&&!bXn()&&await Jei(t,o.mdxParseErrors)}if(r.fix&&c.length>0){let d=await new fbt({context:t}).fix({workspace:n,violations:c});l+=d.fixedCount}if(u&&(!r.fix||l===0))throw new P({code:P.Code.ValidationError});if(o.warningCount>0){t.stderr.info(`${Pr.warning} ${fe.yellow(`Found ${o.warningCount} warnings`)}`),t.stderr.info(fe.dim(" Run 'fern docs check --strict' to treat warnings as errors"));return}t.stderr.info(`${Pr.success} ${fe.green("All checks passed")}`)}buildJsonResponse({result:t,filteredViolations:r,hasErrors:n}){let i={};return(r.length>0||t.mdxParseErrors.length>0)&&(i.docs=[...r.map(o=>Eee(o)),...t.mdxParseErrors.map(o=>({severity:"error",rule:o.code.code,filepath:o.displayRelativeFilepath,...o.line!=null?{line:o.line}:{},...o.column!=null?{column:o.column}:{},message:`[${o.code.code}] ${o.code.title}: ${o.rawMessage}`}))]),{success:!n,results:i}}};function $$m(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 BYo(e){let t=new OYo;Zn(e,"check","Validate docs configuration",(r,n)=>t.handle(r,n),r=>r.option("strict",{type:"boolean",description:"Treat warnings as errors",default:!1}).option("json",{type:"boolean",description:"Output results as JSON to stdout",default:!1}).option("fix",{type:"boolean",description:"Automatically fix issues that have a known resolution",default:!1}))}Ab();Qt();var Yil=be(require("net"),1),Xil=be(require("os"),1),Zei=class extends Error{constructor(t){super(`${t} is locked`)}},gbt={old:new Set,young:new Set},eeh=1e3*15,Zil=new Set;var v9t,teh=()=>{let e=Xil.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},Kil=e=>new Promise((t,r)=>{let n=Yil.default.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),Jil=async(e,t)=>{if(e.host||e.port===0)return Kil(e);for(let r of t)try{await Kil({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},reh=e=>gbt.old.has(e)||gbt.young.has(e)||Zil.has(e),neh=function*(e){e&&(yield*e),yield 0};async function sPe(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){let s=e.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let a of s){if(typeof a!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(a))throw new TypeError(`Number ${a} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}let{reserve:n,...i}=e??{};v9t===void 0&&(v9t=setTimeout(()=>{v9t=void 0,gbt.old=gbt.young,gbt.young=new Set},eeh),v9t.unref&&v9t.unref());let o=teh();for(let s of neh(t))try{if(r.has(s))continue;let a=await Jil({...i,port:s},o);for(;reh(a);){if(s!==0)throw new Zei(s);a=await Jil({...i,port:s},o)}return n?Zil.add(a):gbt.young.add(a),a}catch(a){if(!["EADDRINUSE","EACCES"].includes(a.code)&&!(a instanceof Zei))throw a}throw new Error("No available ports found")}Qt();var tol=/^[a-z0-9-]+-preview-[a-z0-9-]+\.docs\.buildwithfern\.com$/i,$il="docs.buildwithfern.com",eol=62;function I4e(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)),tol.test(t)}function rol(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"");return t.length===0?"default":t}function x9t({orgId:e,previewId:t}){let r=rol(t),n=`${e}-preview-${r}.${$il}`;if(n.length<=eol)return n;let i=`${e}-preview-`,o=eol-i.length;if(o<8)throw new P({message:`Organization name "${e}" is too long to generate a valid preview URL`,code:P.Code.ValidationError});let a=r.slice(0,o).replace(/-+$/,"");return`${i}${a}.${$il}`}Dt();SC();Lm();Zt();iC();Qt();En();var hes=require("child_process"),SAl=be(RYo(),1),ges=be(zti(),1),Aes=be(require("fs"),1),SPe=require("fs/promises"),TAl=be(require("http"),1),OAl=be(require("os"),1),Tni=be(require("path"),1);$ti();Zt();var B9=require("fs/promises"),Lll=require("os"),bZo=be(require("path"),1),Gch=".fern",qch="logs",yZo=100*1024*1024;function Wch(){return"cli@5.75.6"}var N4e=class{logFilePath=null;initialized=!1;sessionStartTime;consoleLogger;constructor(){this.sessionStartTime=Date.now()}async initialize(t,r){if(this.initialized)return;this.consoleLogger=t;let n=r??We(We(Vt.of((0,Lll.homedir)()),we.of(Gch)),we.of(qch));await rr(n)||await(0,B9.mkdir)(n,{recursive:!0});let o=`${new Date().toISOString().replace(/[:.]/g,"-")}.debug.log`;this.logFilePath=We(n,we.of(o));let s=["================================================================================","Fern Docs Dev Debug Log",`Session started: ${new Date().toISOString()}`,`Log file: ${bZo.default.basename(this.logFilePath)}`,"================================================================================",""].join(`
|
|
3657
3657
|
`);await(0,B9.writeFile)(this.logFilePath,s,"utf-8"),this.initialized=!0,this.enforceLogSizeLimit(n)}getLogFilePath(){return this.logFilePath}async writeEntry(t){if(!this.initialized||!this.logFilePath)return;let r=JSON.stringify(t)+`
|
|
3658
3658
|
`;try{await(0,B9.appendFile)(this.logFilePath,r,"utf-8")}catch{}}async logFrontendMetrics(t){let r={timestamp:t.timestamp,source:t.source,level:t.level,eventType:this.getEventType(t.payload,t.isAggregate),isAggregate:t.isAggregate,data:t.payload};await this.writeEntry(r)}async logCliMetric(t,r="info"){let n={timestamp:t.timestamp,source:Wch(),level:r,eventType:t.type,data:{durationMs:t.durationMs,metadata:t.metadata}};await this.writeEntry(n)}async logCliMemory(){let t=process.memoryUsage(),r={type:"cli_memory",timestamp:new Date().toISOString(),metadata:{heapUsed:t.heapUsed,heapTotal:t.heapTotal,external:t.external,rss:t.rss,heapUsedMB:Math.round(t.heapUsed/1024/1024*100)/100,heapTotalMB:Math.round(t.heapTotal/1024/1024*100)/100,rssMB:Math.round(t.rss/1024/1024*100)/100}};await this.logCliMetric(r)}async logCliReloadStart(){let t={type:"cli_reload_start",timestamp:new Date().toISOString()};await this.logCliMetric(t)}async logCliReloadFinish(t,r){let n={type:"cli_reload_finish",timestamp:new Date().toISOString(),durationMs:t,metadata:r};await this.logCliMetric(n)}async logCliDocsGeneration(t,r){let n={type:"cli_docs_generation",timestamp:new Date().toISOString(),durationMs:t,metadata:r};await this.logCliMetric(n)}async logCliValidation(t,r){let n={type:"cli_validation",timestamp:new Date().toISOString(),durationMs:t,metadata:{success:r}};await this.logCliMetric(n)}async enforceLogSizeLimit(t){try{let n=(await(0,B9.readdir)(t)).filter(c=>c.endsWith(".log")),i=[];for(let c of n){let u=bZo.default.join(t,c);try{let l=await(0,B9.stat)(u);i.push({name:c,fullPath:u,size:l.size,mtimeMs:l.mtimeMs})}catch{}}let o=i.reduce((c,u)=>c+u.size,0),s=Math.round(o/1024/1024*100)/100,a=yZo/1024/1024;if(o<=yZo){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<=yZo)break;if(!(this.logFilePath!=null&&c.fullPath===this.logFilePath))try{await(0,B9.unlink)(c.fullPath),o-=c.size}catch{}}}catch{}}getEventType(t,r){return r?"aggregate_summary":"type"in t&&typeof t.type=="string"?t.type:"unknown"}static isMetricsMessage(t){if(typeof t!="object"||t===null)return!1;let r=t;return r.type==="metrics"&&typeof r.timestamp=="string"&&typeof r.source=="string"}};var eri={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"};function Ull(e){let t=Hch();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:eri});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",...eri}})}catch{return new Response(JSON.stringify(i()),{headers:{"Content-Type":"application/json",...eri}})}let d=/^\/_local\/(.*)/.exec(p.pathname);return u.method==="GET"&&d!=null?new Response(t.file(`/${d[1]}`),{headers:eri}):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 N4e.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 Hch(){return globalThis.Bun}Qt();var spl=require("events"),ori=be(require("fs"),1),Q4e=be(require("path"),1);var Vll=be(require("os"),1),_ll=300,hPe=20,rGt=1e7,Gll=Vll.default.platform();var Kch=Gll==="darwin",EZo=Gll==="win32",gPe=Kch||EZo,qll=3e3,Wll=2e4,IZo=1250;var Cie;(function(e){e[e.DIR=1]="DIR",e[e.FILE=2]="FILE"})(Cie||(Cie={}));var j4e;(function(e){e.CHANGE="change",e.RENAME="rename"})(j4e||(j4e={}));var nGt;(function(e){e.CHANGE="change",e.ERROR="error"})(nGt||(nGt={}));var Sc;(function(e){e.ADD="add",e.ADD_DIR="addDir",e.CHANGE="change",e.RENAME="rename",e.RENAME_DIR="renameDir",e.UNLINK="unlink",e.UNLINK_DIR="unlinkDir"})(Sc||(Sc={}));var rN;(function(e){e.ALL="all",e.CLOSE="close",e.ERROR="error",e.READY="ready"})(rN||(rN={}));var Jch=(e,t=1,r)=>{t=Math.max(1,t);let n=r?.leading??!1,i=r?.trailing??!0,o=Math.max(r?.maxWait??1/0,t),s,a,c=0,u=0,l=()=>{let I=Date.now(),C=I-c,w=I-u,O=C>=t||w>=o;return[I,O]},p=I=>{if(u=I,!s)return;let C=s;s=void 0,e.apply(void 0,C)},d=()=>{E(0)},f=()=>{a&&(d(),p(Date.now()))},m=I=>{if(u=I,n)return p(I)},g=I=>{if(i&&s)return p(I);s=void 0},A=()=>{a=void 0;let[I,C]=l();return C?g(I):y(I)},y=I=>{let C=I-c,w=I-u,O=t-C,B=o-w,T=Math.min(O,B);return E(T)},E=I=>{a&&clearTimeout(a),!(I<=0)&&(a=setTimeout(A,I))},x=(...I)=>{let[C,w]=l(),O=!!a;if(s=I,c=C,(w||!a)&&E(t),w)return O?p(C):m(C)};return x.cancel=d,x.flush=f,x},tri=Jch;var wZo=be(require("fs"),1),nri=be(require("path"),1);var Dd=be(require("fs"),1),LB=require("util");var Wde=(e,t)=>function(...n){return e.apply(void 0,n).catch(t)},wie=(e,t)=>function(...n){try{return e.apply(void 0,n)}catch(i){return t(i)}};var vZo=be(require("process"),1),Hll=vZo.default.getuid?!vZo.default.getuid():!1,Kll=1e4,iM=()=>{};var iGt={isChangeErrorOk:e=>{if(!iGt.isNodeError(e))return!1;let{code:t}=e;return t==="ENOSYS"||!Hll&&(t==="EINVAL"||t==="EPERM")},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!iGt.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(!iGt.isNodeError(e))throw e;if(!iGt.isChangeErrorOk(e))throw e}},Zv=iGt;var xZo=class{constructor(){this.interval=25,this.intervalId=void 0,this.limit=Kll,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()}}}}},Jll=new xZo;var Hde=(e,t)=>function(n){return function i(...o){return Jll.schedule().then(s=>{let a=u=>(s(),u),c=u=>{if(s(),Date.now()>=n)throw u;if(t(u)){let l=Math.round(100*Math.random());return new Promise(d=>setTimeout(d,l)).then(()=>i.apply(void 0,o))}throw u};return e.apply(void 0,o).then(a,c)})}},Kde=(e,t)=>function(n){return function i(...o){try{return e.apply(void 0,o)}catch(s){if(Date.now()>n)throw s;if(t(s))return i.apply(void 0,o);throw s}}};var Ych={attempt:{chmod:Wde((0,LB.promisify)(Dd.default.chmod),Zv.onChangeError),chown:Wde((0,LB.promisify)(Dd.default.chown),Zv.onChangeError),close:Wde((0,LB.promisify)(Dd.default.close),iM),fsync:Wde((0,LB.promisify)(Dd.default.fsync),iM),mkdir:Wde((0,LB.promisify)(Dd.default.mkdir),iM),realpath:Wde((0,LB.promisify)(Dd.default.realpath),iM),stat:Wde((0,LB.promisify)(Dd.default.stat),iM),unlink:Wde((0,LB.promisify)(Dd.default.unlink),iM),chmodSync:wie(Dd.default.chmodSync,Zv.onChangeError),chownSync:wie(Dd.default.chownSync,Zv.onChangeError),closeSync:wie(Dd.default.closeSync,iM),existsSync:wie(Dd.default.existsSync,iM),fsyncSync:wie(Dd.default.fsync,iM),mkdirSync:wie(Dd.default.mkdirSync,iM),realpathSync:wie(Dd.default.realpathSync,iM),statSync:wie(Dd.default.statSync,iM),unlinkSync:wie(Dd.default.unlinkSync,iM)},retry:{close:Hde((0,LB.promisify)(Dd.default.close),Zv.isRetriableError),fsync:Hde((0,LB.promisify)(Dd.default.fsync),Zv.isRetriableError),open:Hde((0,LB.promisify)(Dd.default.open),Zv.isRetriableError),readFile:Hde((0,LB.promisify)(Dd.default.readFile),Zv.isRetriableError),rename:Hde((0,LB.promisify)(Dd.default.rename),Zv.isRetriableError),stat:Hde((0,LB.promisify)(Dd.default.stat),Zv.isRetriableError),write:Hde((0,LB.promisify)(Dd.default.write),Zv.isRetriableError),writeFile:Hde((0,LB.promisify)(Dd.default.writeFile),Zv.isRetriableError),closeSync:Kde(Dd.default.closeSync,Zv.isRetriableError),fsyncSync:Kde(Dd.default.fsyncSync,Zv.isRetriableError),openSync:Kde(Dd.default.openSync,Zv.isRetriableError),readFileSync:Kde(Dd.default.readFileSync,Zv.isRetriableError),renameSync:Kde(Dd.default.renameSync,Zv.isRetriableError),statSync:Kde(Dd.default.statSync,Zv.isRetriableError),writeSync:Kde(Dd.default.writeSync,Zv.isRetriableError),writeFileSync:Kde(Dd.default.writeFileSync,Zv.isRetriableError)}},Yll=Ych;var rri=be(require("fs"),1),oGt=be(require("path"),1);var CZo=()=>{};var Xch=()=>{let e=CZo,t=CZo,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}},Xll=Xch;var Zch=()=>{let{promise:e,resolve:t,isPending:r}=Xll(),n=0,i=()=>{n+=1},o=()=>{n-=1,!n&&t()};return i(),queueMicrotask(o),{promise:e,isPending:r,increment:i,decrement:o}},Zll=Zch;var $ll={then:e=>{e()}};var epl=e=>Array.isArray(e)?e:[e],tpl=e=>typeof e=="function";var $ch=(e,t)=>{let r=t?.followSymlinks??!1,n=t?.depth??1/0,i=t?.limit??1/0,o=t?.ignore??[],s=epl(o).map(oe=>tpl(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:{}},w={directories:l,directoriesNames:p,directoriesNamesToPaths:d,files:f,filesNames:m,filesNamesToPaths:g,symlinks:A,symlinksNames:y,symlinksNamesToPaths:E,map:x},{promise:O,increment:B,decrement:T}=Zll(),M=0,K=(oe,de,Oe,ve)=>{I.has(de)||M>=i||(M+=1,oe.directories.push(de),oe.directoriesNames.add(Oe),l.push(de),p.add(Oe),d.propertyIsEnumerable(Oe)||(d[Oe]=[]),d[Oe].push(de),I.add(de),!(ve>=n)&&(M>=i||le(de,ve+1)))},Y=(oe,de,Oe)=>{I.has(de)||M>=i||(M+=1,oe.files.push(de),oe.filesNames.add(Oe),f.push(de),m.add(Oe),g.propertyIsEnumerable(Oe)||(g[Oe]=[]),g[Oe].push(de),I.add(de))},Z=(oe,de,Oe,ve)=>{I.has(de)||M>=i||(M+=1,oe.symlinks.push(de),oe.symlinksNames.add(Oe),A.push(de),y.add(Oe),E.propertyIsEnumerable(Oe)||(E[Oe]=[]),E[Oe].push(de),I.add(de),r&&(ve>=n||M>=i||Ce(de,ve+1)))},ae=(oe,de,Oe,ve,ze)=>{c.aborted||a(de)||(ve.isDirectory()?K(oe,de,Oe,ze):ve.isFile()?Y(oe,de,Oe):ve.isSymbolicLink()&&Z(oe,de,Oe,ze))},ue=(oe,de,Oe,ve)=>{if(c.aborted)return;let ze=de===oGt.default.sep?"":oGt.default.sep,tt=Oe.name,ot=`${de}${ze}${tt}`;a(ot)||(Oe.isDirectory()?K(oe,ot,tt,ve):Oe.isFile()?Y(oe,ot,tt):Oe.isSymbolicLink()&&Z(oe,ot,tt,ve))},re=(oe,de,Oe,ve)=>{for(let ze=0,tt=Oe.length;ze<tt;ze++)ue(oe,de,Oe[ze],ve)},le=(oe,de)=>{c.aborted||de>n||M>=i||(B(),rri.default.readdir(oe,{withFileTypes:!0},(Oe,ve)=>{if(Oe||c.aborted||!ve.length)return T();(u(ve)||$ll).then(()=>{let tt=x[oe]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};re(tt,oe,ve,de),T()})}))},Ce=(oe,de)=>{B(),rri.default.realpath(oe,(Oe,ve)=>{if(Oe||c.aborted)return T();rri.default.stat(ve,(ze,tt)=>{if(ze||c.aborted)return T();let ot=oGt.default.basename(ve),mt=x[oe]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};ae(mt,ve,ot,tt,de),T()})})};return(async(oe,de=1)=>(oe=oGt.default.normalize(oe),I.add(oe),le(oe,de),await O,c.aborted?C:w))(e)},rpl=$ch;var Sie={lang:{debounce:tri,attempt:e=>{try{return e()}catch(t){return Sie.lang.castError(t)}},castArray:e=>Sie.lang.isArray(e)?e:[e],castError:e=>Sie.lang.isError(e)?e:Sie.lang.isString(e)?new Error(e):new Error("Unknown error"),defer:e=>setTimeout(e,0),isArray:e=>Array.isArray(e),isError:e=>e instanceof Error,isFunction:e=>typeof e=="function",isNaN:e=>Number.isNaN(e),isNumber:e=>typeof e=="number",isPrimitive:e=>{if(e===null)return!0;let t=typeof e;return t!=="object"&&t!=="function"},isShallowEqual:(e,t)=>{if(e===t)return!0;if(Sie.lang.isNaN(e))return Sie.lang.isNaN(t);if(Sie.lang.isPrimitive(e)||Sie.lang.isPrimitive(t))return e===t;for(let r in e)if(!(r in t))return!1;for(let r in t)if(e[r]!==t[r])return!1;return!0},isSet:e=>e instanceof Set,isString:e=>typeof e=="string",isUndefined:e=>e===void 0,noop:()=>{},uniq:e=>e.length<2?e:Array.from(new Set(e))},fs:{getDepth:e=>Math.max(0,e.split(nri.default.sep).length-1),getRealPath:(e,t)=>{try{return t?wZo.default.realpathSync.native(e):wZo.default.realpathSync(e)}catch{return}},isSubPath:(e,t)=>t.startsWith(e)&&t[e.length]===nri.default.sep&&t.length-e.length>nri.default.sep.length,poll:(e,t=Wll)=>Yll.retry.stat(t)(e,{bigint:!0}).catch(Sie.lang.noop),readdir:async(e,t,r=1/0,n=1/0,i,o)=>{if(o&&r===1&&e in o){let s=o[e];return[s.directories,s.files]}else{let s=await rpl(e,{depth:r,limit:n,ignore:t,signal:i});return[s.directories,s.files]}}}},Zl=Sie;var iri=be(require("path"),1);var SZo=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=_ll){return(()=>{let r=this.watcher._readyWait,n=[],i=new Set,o=async(a,c)=>{let u=this.options.ignoreInitial?[]:a,l=await this.eventsPopulate([...c]),p=this.eventsDeduplicate([...u,...l]);this.onTargetEvents(p)},s=Zl.lang.debounce(()=>{this.watcher.isClosed()||(r=o(n,i),n=[],i=new Set)},t);return async(a,c="",u=!1)=>{u?await this.eventsPopulate([c],n,!0):i.add(c),r.then(s)}})()}eventsDeduplicate(t){if(t.length<2)return t;let r={};return t.reduce((n,i)=>{let[o,s]=i,a=r[s];return o===a||o===Sc.CHANGE&&a===Sc.ADD||(r[s]=o,n.push(i)),n},[])}async eventsPopulate(t,r=[],n=!1){return await Promise.all(t.map(async i=>{let o=await this.watcher._poller.update(i,this.options.pollingTimeout);await Promise.all(o.map(async s=>{r.push([s,i]),s===Sc.ADD_DIR?await this.eventsPopulateAddDir(t,i,r,n):s===Sc.UNLINK_DIR&&await this.eventsPopulateUnlinkDir(t,i,r,n)}))})),r}async eventsPopulateAddDir(t,r,n=[],i=!1){if(i)return n;let o=this.options.recursive?this.options.depth??hPe:Math.min(1,this.options.depth??hPe),s=this.options.limit??rGt,[a,c]=await Zl.fs.readdir(r,this.options.ignore,o,s,this.watcher._closeSignal),u=[...a,...c];return await Promise.all(u.map(l=>{if(!this.watcher.isIgnored(l,this.options.ignore)&&!t.includes(l))return this.eventsPopulate([l],n,!0)})),n}async eventsPopulateUnlinkDir(t,r,n=[],i=!1){if(i)return n;for(let o of this.watcher._poller.stats.keys())Zl.fs.isSubPath(r,o)&&(t.includes(o)||await this.eventsPopulate([o],n,!0));return n}onTargetAdd(t){this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetAdd(t,this.options.renameTimeout):this.watcher.event(Sc.ADD,t))}onTargetAddDir(t){t!==this.folderPath&&this.options.recursive&&!gPe&&this.options.native!==!1&&this.watcher.watchDirectory(t,this.options,this.handler,void 0,this.base||this),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetAddDir(t,this.options.renameTimeout):this.watcher.event(Sc.ADD_DIR,t))}onTargetChange(t){this._isSubRoot(t)&&this.watcher.event(Sc.CHANGE,t)}onTargetUnlink(t){this.watcher.watchersClose(iri.default.dirname(t),t,!1),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlink(t,this.options.renameTimeout):this.watcher.event(Sc.UNLINK,t))}onTargetUnlinkDir(t){this.watcher.watchersClose(iri.default.dirname(t),t,!1),this.watcher.watchersClose(t),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlinkDir(t,this.options.renameTimeout):this.watcher.event(Sc.UNLINK_DIR,t))}onTargetEvent(t){let[r,n]=t;r===Sc.ADD?this.onTargetAdd(n):r===Sc.ADD_DIR?this.onTargetAddDir(n):r===Sc.CHANGE?this.onTargetChange(n):r===Sc.UNLINK?this.onTargetUnlink(n):r===Sc.UNLINK_DIR&&this.onTargetUnlinkDir(n)}onTargetEvents(t){for(let r of t)this.onTargetEvent(r)}onWatcherEvent(t,r,n=!1){return this.handlerBatched(t,r,n)}onWatcherChange(t=j4e.CHANGE,r){if(this.watcher.isClosed())return;let n=iri.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){EZo&&t.code==="EPERM"?this.onWatcherChange(j4e.CHANGE,""):this.watcher.error(t)}async init(){await this.initWatcherEvents(),await this.initInitialEvents()}async initWatcherEvents(){let t=this.onWatcherChange.bind(this);this.fswatcher.on(nGt.CHANGE,t);let r=this.onWatcherError.bind(this);this.fswatcher.on(nGt.ERROR,r)}async initInitialEvents(){let t=!this.watcher.isReady();if(this.filePath){if(this.watcher._poller.stats.has(this.filePath))return;await this.onWatcherEvent(j4e.CHANGE,this.filePath,t)}else{let r=this.options.recursive&&gPe&&this.options.native!==!1?this.options.depth??hPe:Math.min(1,this.options.depth??hPe),n=this.options.limit??rGt,[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(j4e.CHANGE,a,t)}))}}},npl=SZo;var nN={interval:100,intervalId:void 0,fns:new Map,init:()=>{nN.intervalId||(nN.intervalId=setInterval(nN.resolve,nN.interval))},reset:()=>{nN.intervalId&&(clearInterval(nN.intervalId),delete nN.intervalId)},add:(e,t)=>{nN.fns.set(e,Date.now()+t),nN.init()},remove:e=>{nN.fns.delete(e)},resolve:()=>{if(!nN.fns.size)return nN.reset();let e=Date.now();for(let[t,r]of nN.fns)r>=e||(nN.remove(t),t())}},sGt=nN;var aGt=class e{constructor(t){this._watcher=t,this.reset()}getLockAdd(t,r=IZo){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),sGt.remove(u)},u=()=>{c(),a()};sGt.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=IZo){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),sGt.remove(u)},u=()=>{c(),a()};sGt.add(u,r);let l=()=>(c(),i);s.unlink.set(n,l),s.add.get(n)?.()}getLockTargetAdd(t,r){let n=this._watcher._poller.getIno(t,Sc.ADD,Cie.FILE);return this.getLockAdd({ino:n,targetPath:t,events:e.FILE_EVENTS,locks:this._locksFile},r)}getLockTargetAddDir(t,r){let n=this._watcher._poller.getIno(t,Sc.ADD_DIR,Cie.DIR);return this.getLockAdd({ino:n,targetPath:t,events:e.DIR_EVENTS,locks:this._locksDir},r)}getLockTargetUnlink(t,r){let n=this._watcher._poller.getIno(t,Sc.UNLINK,Cie.FILE);return this.getLockUnlink({ino:n,targetPath:t,events:e.FILE_EVENTS,locks:this._locksFile},r)}getLockTargetUnlinkDir(t,r){let n=this._watcher._poller.getIno(t,Sc.UNLINK_DIR,Cie.DIR);return this.getLockUnlink({ino:n,targetPath:t,events:e.DIR_EVENTS,locks:this._locksDir},r)}reset(){this._locksAdd=new Map,this._locksAddDir=new Map,this._locksUnlink=new Map,this._locksUnlinkDir=new Map,this._locksDir={add:this._locksAddDir,unlink:this._locksUnlinkDir},this._locksFile={add:this._locksAdd,unlink:this._locksUnlink}}};aGt.DIR_EVENTS={add:Sc.ADD_DIR,rename:Sc.RENAME_DIR,unlink:Sc.UNLINK_DIR};aGt.FILE_EVENTS={add:Sc.ADD,change:Sc.CHANGE,rename:Sc.RENAME,unlink:Sc.UNLINK};var ipl=aGt;var TZo=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}},OZo=TZo;var BZo=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}},opl=BZo;var PZo=class{constructor(){this.inos={},this.paths=new OZo,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 opl(n)}reset(){this.inos={},this.paths=new OZo,this.stats=new Map}async update(t,r){let n=this.getStats(t),i=await this.poll(t,r);if(this.updateStats(t,i),!n&&i){if(i.isFile())return this.updateIno(t,Sc.ADD,i),[Sc.ADD];if(i.isDirectory())return this.updateIno(t,Sc.ADD_DIR,i),[Sc.ADD_DIR]}else if(n&&!i){if(n.isFile())return this.updateIno(t,Sc.UNLINK,n),[Sc.UNLINK];if(n.isDirectory())return this.updateIno(t,Sc.UNLINK_DIR,n),[Sc.UNLINK_DIR]}else if(n&&i){if(n.isFile()){if(i.isFile())return n.ino===i.ino&&!n.size&&!i.size?[]:(this.updateIno(t,Sc.CHANGE,i),[Sc.CHANGE]);if(i.isDirectory())return this.updateIno(t,Sc.UNLINK,n),this.updateIno(t,Sc.ADD_DIR,i),[Sc.UNLINK,Sc.ADD_DIR]}else if(n.isDirectory()){if(i.isFile())return this.updateIno(t,Sc.UNLINK_DIR,n),this.updateIno(t,Sc.ADD,i),[Sc.UNLINK_DIR,Sc.ADD];if(i.isDirectory())return n.ino===i.ino?[]:(this.updateIno(t,Sc.UNLINK_DIR,n),this.updateIno(t,Sc.ADD_DIR,i),[Sc.UNLINK_DIR,Sc.ADD_DIR])}}return[]}updateIno(t,r,n){let i=this.inos[r]=this.inos[r]||(this.inos[r]={}),o=n.isFile()?Cie.FILE:Cie.DIR;i[t]=[n.ino,o]}updateStats(t,r){if(r)this.paths.set(r.ino,t),this.stats.set(t,r);else{let n=this.stats.get(t)?.ino||-1;this.paths.delete(n,t),this.stats.delete(t)}}},DZo=PZo;var RZo=class e extends spl.EventEmitter{constructor(t,r,n){super(),this._closed=!1,this._ready=!1,this._closeAborter=new AbortController,this._closeSignal=this._closeAborter.signal,this.on(rN.CLOSE,()=>this._closeAborter.abort()),this._closeWait=new Promise(i=>this.on(rN.CLOSE,i)),this._readyWait=new Promise(i=>this.on(rN.READY,i)),this._locker=new ipl(this),this._roots=new Set,this._poller=new DZo,this._pollers=new Set,this._subwatchers=new Set,this._watchers={},this._watchersLock=Promise.resolve(),this._watchersRestorable={},this.watch(t,r,n)}isClosed(){return this._closed}isIgnored(t,r){return!!r&&(Zl.lang.isFunction(r)?!!r(t):r.test(t))}isReady(){return this._ready}close(){return this._locker.reset(),this._poller.reset(),this._roots.clear(),this.watchersClose(),this.isClosed()?!1:(this._closed=!0,this.emit(rN.CLOSE))}error(t){if(this.isClosed())return!1;let r=Zl.lang.castError(t);return this.emit(rN.ERROR,r)}event(t,r,n){return this.isClosed()?!1:(this.emit(rN.ALL,t,r,n),this.emit(t,r,n))}ready(){return this.isClosed()||this.isReady()?!1:(this._ready=!0,this.emit(rN.READY))}pollerExists(t,r){for(let n of this._pollers)if(n.targetPath===t&&Zl.lang.isShallowEqual(n.options,r))return!0;return!1}subwatcherExists(t,r){for(let n of this._subwatchers)if(n.targetPath===t&&Zl.lang.isShallowEqual(n.options,r))return!0;return!1}watchersClose(t,r,n=!0){if(t){let i=this._watchers[t];if(i)for(let o of[...i])r&&o.filePath!==r||this.watcherClose(o);if(n)for(let o in this._watchers)Zl.fs.isSubPath(t,o)&&this.watchersClose(o,r,!1)}else for(let i in this._watchers)this.watchersClose(i,r,!1)}watchersLock(t){return this._watchersLock.then(()=>this._watchersLock=new Promise(async r=>{await t(),r()}))}watchersRestore(){delete this._watchersRestoreTimeout;let t=Object.entries(this._watchersRestorable);this._watchersRestorable={};for(let[r,n]of t)this.watchPath(r,n.options,n.handler)}async watcherAdd(t,r){let{folderPath:n}=t;(this._watchers[n]=this._watchers[n]||[]).push(t);let o=new npl(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=Q4e.default.dirname(t);for(let a=1;a<1/0;a++){if(this._watchers[s]?.find(l=>(a===1||l.options.recursive&&a<=(l.options.depth??hPe))&&l.handler===n&&(!l.filePath||l.filePath===i)&&l.options.ignore===r.ignore&&!!l.options.native==!!r.native&&(!r.recursive||l.options.recursive&&gPe&&l.options.native!==!1)))return!0;if(!gPe)break;let u=Q4e.default.dirname(t);if(s===u)break;s=u}return!1}async watchDirectories(t,r,n,i,o){if(this.isClosed())return;t=Zl.lang.uniq(t).sort();let s;for(let a of t)if(!this.isIgnored(a,r.ignore)&&!this.watcherExists(a,r,n,i))try{let c=!r.recursive||gPe&&r.native!==!1?r:{...r,recursive:!1},l={watcher:ori.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=Q4e.default.dirname(a),g=a;await this.watchDirectories([m],f,n,g,p)}}catch(c){this.error(c)}return s}async watchDirectory(t,r,n,i,o){if(!this.isClosed()&&!this.isIgnored(t,r.ignore)){if(!r.recursive||gPe&&r.native!==!1)return this.watchersLock(()=>this.watchDirectories([t],r,n,i,o));{r={...r,recursive:!0};let s=r.depth??hPe,a=r.limit??rGt,[c]=await Zl.fs.readdir(t,r.ignore,s,a,this._closeSignal,r.readdirMap);return this.watchersLock(async()=>{let u=await this.watchDirectories([t],r,n,i,o);if(c.length){let l=Zl.fs.getDepth(t);for(let p of c){let d=Zl.fs.getDepth(p),f=Math.max(0,s-(d-l)),m={...r,depth:f};await this.watchDirectories([p],m,n,i,o||u)}}})}}}async watchFileOnce(t,r,n){if(this.isClosed()||(r={...r,ignoreInitial:!1},this.subwatcherExists(t,r)))return;let i={targetPath:t,options:r},o=(u,l)=>{l===t&&(c(),n())},s=new e(o),a=()=>{this._subwatchers.add(i),this.on(rN.CLOSE,c),s.watchFile(t,r,o)},c=()=>{this._subwatchers.delete(i),this.removeListener(rN.CLOSE,c),s.close()};return a()}async watchFile(t,r,n){if(this.isClosed()||this.isIgnored(t,r.ignore))return;r={...r,recursive:!1};let i=Q4e.default.dirname(t);return this.watchDirectory(i,r,n,t)}async watchPollingOnce(t,r,n){if(this.isClosed())return;let i=!1,o=new DZo,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??qll},o={targetPath:t,options:r},s=()=>{this._pollers.add(o),this.on(rN.CLOSE,a),ori.default.watchFile(t,i,n)},a=()=>{this._pollers.delete(o),this.removeListener(rN.CLOSE,a),ori.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=Q4e.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=Q4e.default.dirname(t);return(await Zl.fs.poll(o,r.pollingTimeout))?.isDirectory()?this.watchUnknownChild(t,r,n):this.watchUnknownTarget(t,r,n)}}async watch(t,r,n=Zl.lang.noop){if(Zl.lang.isFunction(t))return this.watch([],{},t);if(Zl.lang.isUndefined(t))return this.watch([],r,n);if(Zl.lang.isFunction(r))return this.watch(t,{},r);if(Zl.lang.isUndefined(r))return this.watch(t,{},n);if(this.isClosed())return;this.isReady()&&(r.readdirMap=void 0);let i=Zl.lang.castArray(t);i.forEach(o=>this._roots.add(o)),await this.watchPaths(i,r,n),!this.isClosed()&&(n!==Zl.lang.noop&&this.on(rN.ALL,n),r.readdirMap=void 0,this.ready())}},apl=RZo;function euh(e){return"code"in e&&typeof e.code=="string"}function cpl(e){return e instanceof Error?e:new Error(String(e))}function upl(e){return euh(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 sri({absoluteFilePathToFern:e,additionalFilepaths:t,context:r}){let n=new apl([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(cpl(c))};n.once("ready",s),n.once("error",a)});return i!=null&&(n.close(),r.failAndThrow(upl(i),i,{code:P.Code.EnvironmentError})),n.on("error",o=>{let s=cpl(o);r.failWithoutThrowing(upl(s),s,{code:P.Code.EnvironmentError}),n.close()}),n}Zt();iC();Qt();En();var pAl=require("child_process"),bni=be(UZo(),1),fAl=be(ees(),1),qE=require("fs"),qB=require("fs/promises"),dAl=require("os"),oN=be(require("path"),1),mAl=be(lE(),1),hAl=be(lAl(),1),W4e=process.platform==="win32",yni=fe.cyan("[docs]:"),Pdh="etag",Ddh=23,pes=e=>e.padEnd(Ddh," "),Rdh="preview",kdh="app-preview",Fdh="bundle",Ndh=".next",jdh="standalone",Qdh=".fern",zdh="packages/fern-docs/bundle/.next/server/instrumentation.js",Mdh='Cannot find matching keyid: {"signatures":',Ldh="ERR_PNPM_IGNORED_BUILDS";function Udh(e){try{let r=(0,pAl.execSync)('reg query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem" /v LongPathsEnabled',{encoding:"utf-8",timeout:5e3}).match(/LongPathsEnabled\s+REG_DWORD\s+0x(\d+)/i);if(r!=null&&r[1]==="1")return}catch(t){e.debug(`Registry query for LongPathsEnabled failed: ${t}`)}throw new P({message:`Windows long path support is not enabled. The docs bundle contains deeply nested .pnpm paths that exceed the 260-character MAX_PATH limit.
|
|
3659
3659
|
|
|
@@ -4236,7 +4236,7 @@ Please ensure you have membership at https://dashboard.buildwithfern.com, and as
|
|
|
4236
4236
|
`);i.failAndThrow(s!=null?`No docs instance found matching '${s}'.
|
|
4237
4237
|
|
|
4238
4238
|
Available instances:
|
|
4239
|
-
${I}`:"No docs instance found. Failed to register.",void 0,{code:P.Code.ConfigError});return}let E=(typeof y.customDomain=="string"?[y.customDomain]:y.customDomain??[]).map(Ijl);vjl(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=()=>jUl({docsWorkspace:n,customDomains:E,domain:y.url,token:o,organization:e,context:i,apiWorkspaces:t,ossWorkspaces:r,preview:a,previewId:c,editThisPage:y.editThisPage,disableTemplates:u,skipUpload:l,withAiExamples:n.config.aiExamples?.enabled??n.config.experimental?.aiExamples??!0,excludeApis:n.config.experimental?.excludeApis??!1,targetAudiences:y.audiences?Array.isArray(y.audiences)?y.audiences:[y.audiences]:void 0,docsUrl:y.url,cliVersion:p,ciSource:d,deployerAuthor:f,loginCommand:m,multiSource:y.multiSource??!1});for(let O=0;;O++)try{x=await C();break}catch(B){if(!(B instanceof Dvt)||O>=LWt.length){if(B instanceof Dvt)return i.failAndThrow("Another docs publish is currently in progress. Please try again once the other publish is complete.",void 0,{code:P.Code.NetworkError});throw B}let T=LWt[O]??LWt[LWt.length-1]??6e4,M=T/6e4;i.logger.warn(`Another docs publish is in progress. Retrying in ${M} minute${M===1?"":"s"} (attempt ${O+1}/${LWt.length})...`),await new Promise(K=>setTimeout(K,T))}let w=performance.now()-I;i.logger.debug(`Docs publishing completed in ${w.toFixed(0)}ms`)}),x}Qt();var Sfi=class{context;task;project;docsWorkspace;ossWorkspaces;token;constructor({context:t,task:r,project:n,docsWorkspace:i,ossWorkspaces:o,token:s}){this.context=t,this.task=r,this.project=n,this.docsWorkspace=i,this.ossWorkspaces=o,this.token=s}async publish({instanceUrl:t,preview:r,previewId:n,skipUpload:i}){let o=new sd({context:this.context,task:this.task});try{let s=await UWt({organization:this.project.config.organization,apiWorkspaces:this.project.apiWorkspaces,ossWorkspaces:this.ossWorkspaces,docsWorkspace:this.docsWorkspace,context:o,token:this.token,instanceUrl:t,preview:r,previewId:n,disableTemplates:void 0,skipUpload:i,cliVersion:"5.75.
|
|
4239
|
+
${I}`:"No docs instance found. Failed to register.",void 0,{code:P.Code.ConfigError});return}let E=(typeof y.customDomain=="string"?[y.customDomain]:y.customDomain??[]).map(Ijl);vjl(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=()=>jUl({docsWorkspace:n,customDomains:E,domain:y.url,token:o,organization:e,context:i,apiWorkspaces:t,ossWorkspaces:r,preview:a,previewId:c,editThisPage:y.editThisPage,disableTemplates:u,skipUpload:l,withAiExamples:n.config.aiExamples?.enabled??n.config.experimental?.aiExamples??!0,excludeApis:n.config.experimental?.excludeApis??!1,targetAudiences:y.audiences?Array.isArray(y.audiences)?y.audiences:[y.audiences]:void 0,docsUrl:y.url,cliVersion:p,ciSource:d,deployerAuthor:f,loginCommand:m,multiSource:y.multiSource??!1});for(let O=0;;O++)try{x=await C();break}catch(B){if(!(B instanceof Dvt)||O>=LWt.length){if(B instanceof Dvt)return i.failAndThrow("Another docs publish is currently in progress. Please try again once the other publish is complete.",void 0,{code:P.Code.NetworkError});throw B}let T=LWt[O]??LWt[LWt.length-1]??6e4,M=T/6e4;i.logger.warn(`Another docs publish is in progress. Retrying in ${M} minute${M===1?"":"s"} (attempt ${O+1}/${LWt.length})...`),await new Promise(K=>setTimeout(K,T))}let w=performance.now()-I;i.logger.debug(`Docs publishing completed in ${w.toFixed(0)}ms`)}),x}Qt();var Sfi=class{context;task;project;docsWorkspace;ossWorkspaces;token;constructor({context:t,task:r,project:n,docsWorkspace:i,ossWorkspaces:o,token:s}){this.context=t,this.task=r,this.project=n,this.docsWorkspace=i,this.ossWorkspaces=o,this.token=s}async publish({instanceUrl:t,preview:r,previewId:n,skipUpload:i}){let o=new sd({context:this.context,task:this.task});try{let s=await UWt({organization:this.project.config.organization,apiWorkspaces:this.project.apiWorkspaces,ossWorkspaces:this.ossWorkspaces,docsWorkspace:this.docsWorkspace,context:o,token:this.token,instanceUrl:t,preview:r,previewId:n,disableTemplates:void 0,skipUpload:i,cliVersion:"5.75.6",loginCommand:"fern auth login"});return o.getResult()===Rf.Failure?{success:!1}:{success:!0,url:s}}catch(s){return{success:!1,error:Mn(s)}}}};Dt();En();var Rvt=class e{static MAX_DISPLAYED_LOGS_TTY=10;static URL_PATTERN=/https?:\/\/[^\s]+/;context;stream;tasks={};taskOrder=[];startTime;isRegistered=!1;constructor(t){this.context=t.context,this.stream=t.stream??process.stderr}addTask(t){let r={...t,status:t.status??"pending"};return this.tasks[t.id]=r,this.taskOrder.push(t.id),this}async start(t){return this.startTime=Date.now(),t!=null&&await this.context.ttyAwareLogger.takeOverTerminal(()=>{this.stream.write(`
|
|
4240
4240
|
`),this.stream.write(`${fe.cyan("\u25C6")} ${fe.bold(t.title)}
|
|
4241
4241
|
`),t.subtitle!=null&&this.stream.write(` ${fe.dim(t.subtitle)}
|
|
4242
4242
|
`),this.stream.write(`
|
|
@@ -4890,7 +4890,7 @@ ${r}`}function lbi(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
4890
4890
|
`),g="";return c&&(g=l.style.error(c)),[`${p} ${f} ${s}`,[m,g].filter(Boolean).join(`
|
|
4891
4891
|
`)]});var dUg=yx((e,t)=>{let{validate:r=()=>!0}=e,n=oI(e.theme),[i,o]=Zc("idle"),[s,a]=Zc(),[c,u]=Zc(""),l=gx({status:i,theme:n});Ax(async(g,A)=>{if(i==="idle")if(hx(g)){let y=c;o("loading");let E=await r(y);E===!0?(u(y),o("done"),t(y)):(A.write(c),a(E||"You must provide a valid value"),o("idle"))}else u(A.line),a(void 0)});let p=n.style.message(e.message,i),d="",f;e.mask?d=(typeof e.mask=="string"?e.mask:"*").repeat(c.length):i!=="done"&&(f=`${n.style.help("[input is masked]")}${Kwt}`),i==="done"&&(d=n.style.answer(d));let m="";return s&&(m=n.style.error(s)),[[l,p,e.mask?d:f].join(" "),m]});var $5e=be(kw(),1);var mUg={icon:{cursor:cC.pointer},style:{disabled:e=>$5e.default.dim(`- ${e}`),searchTerm:e=>$5e.default.cyan(e),description:e=>$5e.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${$5e.default.bold(t)} ${$5e.default.dim(r)}`).join($5e.default.dim(" \u2022 "))},helpMode:"always"};function DFs(e){return!dd.isSeparator(e)&&!e.disabled}function hUg(e){return e.map(t=>{if(dd.isSeparator(t))return t;if(typeof t=="string")return{value:t,name:t,short:t,disabled:!1};let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var gUg=yx((e,t)=>{let{pageSize:r=7,validate:n=()=>!0}=e,i=oI(mUg,e.theme),[o,s]=Zc("loading"),[a,c]=Zc(""),[u,l]=Zc([]),[p,d]=Zc(),f=gx({status:o,theme:i}),m=r6(()=>{let M=u.findIndex(DFs),K=u.findLastIndex(DFs);return{first:M,last:K}},[u]),[g=m.first,A]=Zc();t4(()=>{let M=new AbortController;return s("loading"),d(void 0),(async()=>{try{let Y=await e.source(a||void 0,{signal:M.signal});M.signal.aborted||(A(void 0),d(void 0),l(hUg(Y)),s("idle"))}catch(Y){!M.signal.aborted&&Y instanceof Error&&d(Y.message)}})(),()=>{M.abort()}},[a]);let y=u[g];Ax(async(M,K)=>{if(hx(M))if(y){s("loading");let Y=await n(y.value);s("idle"),Y===!0?(s("done"),t(y.value)):y.name===a?d(Y||"You must provide a valid value"):(K.write(y.name),c(y.name))}else K.write(a);else if(Nhe(M)&&y)K.clearLine(0),K.write(y.name),c(y.name);else if(o!=="loading"&&(oP(M)||t6(M))){if(K.clearLine(0),oP(M)&&g!==m.first||t6(M)&&g!==m.last){let Y=oP(M)?-1:1,Z=g;do Z=(Z+Y+u.length)%u.length;while(!DFs(u[Z]));A(Z)}}else c(K.line)});let E=i.style.message(e.message,o),x;if(i.helpMode!=="never")if(e.instructions){let{pager:M,navigation:K}=e.instructions;x=i.style.help(u.length>r?M:K)}else x=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let I=J5e({items:u,active:g,renderItem({item:M,isActive:K}){if(dd.isSeparator(M))return` ${M.separator}`;if(M.disabled){let ae=typeof M.disabled=="string"?M.disabled:"(disabled)";return i.style.disabled(`${M.name} ${ae}`)}let Y=K?i.style.highlight:ae=>ae,Z=K?i.icon.cursor:" ";return Y(`${Z} ${M.name}`)},pageSize:r,loop:!1}),C;p?C=i.style.error(p):u.length===0&&a!==""&&o==="idle"&&(C=i.style.error("No results found"));let w;if(o==="done"&&y)return[f,E,i.style.answer(y.short)].filter(Boolean).join(" ").trimEnd();w=i.style.searchTerm(a);let O=y?.description,B=[f,E,w].filter(Boolean).join(" ").trimEnd(),T=[C??I," ",O?i.style.description(O):"",x].filter(Boolean).join(`
|
|
4892
4892
|
`).trimEnd();return[B,T]});var Ywt=be(kw(),1);var AUg={icon:{cursor:cC.pointer},style:{disabled:e=>Ywt.default.dim(`- ${e}`),description:e=>Ywt.default.cyan(e),keysHelpTip:e=>e.map(([t,r])=>`${Ywt.default.bold(t)} ${Ywt.default.dim(r)}`).join(Ywt.default.dim(" \u2022 "))},helpMode:"always",indexMode:"hidden",keybindings:[]};function Jwt(e){return!dd.isSeparator(e)&&!e.disabled}function yUg(e){return e.map(t=>{if(dd.isSeparator(t))return t;if(typeof t=="string")return{value:t,name:t,short:t,disabled:!1};let r=t.name??String(t.value),n={value:t.value,name:r,short:t.short??r,disabled:t.disabled??!1};return t.description&&(n.description=t.description),n})}var RFs=yx((e,t)=>{let{loop:r=!0,pageSize:n=7}=e,i=oI(AUg,e.theme),{keybindings:o}=i,[s,a]=Zc("idle"),c=gx({status:s,theme:i}),u=K5e(),l=!o.includes("vim"),p=r6(()=>yUg(e.choices),[e.choices]),d=r6(()=>{let O=p.findIndex(Jwt),B=p.findLastIndex(Jwt);if(O===-1)throw new vae("[select prompt] No selectable choices. All choices are disabled.");return{first:O,last:B}},[p]),f=r6(()=>"default"in e?p.findIndex(O=>Jwt(O)&&O.value===e.default):-1,[e.default,p]),[m,g]=Zc(f===-1?d.first:f),A=p[m];Ax((O,B)=>{if(clearTimeout(u.current),hx(O))a("done"),t(A.value);else if(oP(O,o)||t6(O,o)){if(B.clearLine(0),r||oP(O,o)&&m!==d.first||t6(O,o)&&m!==d.last){let T=oP(O,o)?-1:1,M=m;do M=(M+T+p.length)%p.length;while(!Jwt(p[M]));g(M)}}else if(dYt(O)&&!Number.isNaN(Number(B.line))){let T=Number(B.line)-1,M=-1,K=p.findIndex(Z=>dd.isSeparator(Z)?!1:(M++,M===T)),Y=p[K];Y!=null&&Jwt(Y)&&g(K),u.current=setTimeout(()=>{B.clearLine(0)},700)}else if(q5e(O))B.clearLine(0);else if(l){let T=B.line.toLowerCase(),M=p.findIndex(K=>dd.isSeparator(K)||!Jwt(K)?!1:K.name.toLowerCase().startsWith(T));M!==-1&&g(M),u.current=setTimeout(()=>{B.clearLine(0)},700)}}),t4(()=>()=>{clearTimeout(u.current)},[]);let y=i.style.message(e.message,s),E;if(i.helpMode!=="never")if(e.instructions){let{pager:O,navigation:B}=e.instructions;E=i.style.help(p.length>n?O:B)}else E=i.style.keysHelpTip([["\u2191\u2193","navigate"],["\u23CE","select"]]);let x=0,I=J5e({items:p,active:m,renderItem({item:O,isActive:B,index:T}){if(dd.isSeparator(O))return x++,` ${O.separator}`;let M=i.indexMode==="number"?`${T+1-x}. `:"";if(O.disabled){let Z=typeof O.disabled=="string"?O.disabled:"(disabled)";return i.style.disabled(`${M}${O.name} ${Z}`)}let K=B?i.style.highlight:Z=>Z,Y=B?i.icon.cursor:" ";return K(`${Y} ${M}${O.name}`)},pageSize:n,loop:r});if(s==="done")return[c,y,i.style.answer(A.short)].filter(Boolean).join(" ");let{description:C}=A;return`${[[c,y].filter(Boolean).join(" "),I," ",C?i.style.description(C):"",E].filter(Boolean).join(`
|
|
4893
|
-
`).trimEnd()}${Kwt}`});En();Gi();var xae={GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",VERIFICATION_FAILED:"verification_failed",SDK_PR_CREATED:"sdk_pr_created",UPGRADE_APPLIED:"upgrade_applied",MAJOR_VERSION_BUMP:"major_version_bump"},bUg={[xae.GENERATION_STARTED]:!1,[xae.GENERATION_COMPLETED]:!1,[xae.GENERATION_FAILED]:!0,[xae.VERIFICATION_FAILED]:!0,[xae.SDK_PR_CREATED]:!1,[xae.UPGRADE_APPLIED]:!1,[xae.MAJOR_VERSION_BUMP]:!1};function nap(e){return bUg[e]}function iap(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 oap(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 sap(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 aap(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 cap(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?xae.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?xae.VERIFICATION_FAILED:xae.GENERATION_FAILED}var EUg="",IUg="FERN_AUTOMATION_EVENTS_ORIGIN",vUg=3e3,Wbi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[IUg]??EUg)),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(),vUg);try{let s={"content-type":"application/json"},a=await u_();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(aap(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function uap(){let{fern_run_id:e,github_run_id:t}=ece();return{action:process.env.FERN_ACTION,run_id:e,github_run_id:t,github_run_url:process.env.FERN_GITHUB_RUN_URL,org:void 0,config_repo:process.env.FERN_CONFIG_REPO,config_commit_sha:process.env.FERN_CONFIG_COMMIT_SHA,config_branch:process.env.FERN_CONFIG_BRANCH,config_pr_number:process.env.FERN_CONFIG_PR_NUMBER,trigger:process.env.GITHUB_EVENT_NAME,cli_version:"5.75.
|
|
4893
|
+
`).trimEnd()}${Kwt}`});En();Gi();var xae={GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",VERIFICATION_FAILED:"verification_failed",SDK_PR_CREATED:"sdk_pr_created",UPGRADE_APPLIED:"upgrade_applied",MAJOR_VERSION_BUMP:"major_version_bump"},bUg={[xae.GENERATION_STARTED]:!1,[xae.GENERATION_COMPLETED]:!1,[xae.GENERATION_FAILED]:!0,[xae.VERIFICATION_FAILED]:!0,[xae.SDK_PR_CREATED]:!1,[xae.UPGRADE_APPLIED]:!1,[xae.MAJOR_VERSION_BUMP]:!1};function nap(e){return bUg[e]}function iap(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 oap(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 sap(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 aap(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 cap(e){let t=e.join(" ");return/\bautomations\s+generate\b/.test(t)?xae.GENERATION_FAILED:/\bautomations\s+preview\b/.test(t)?xae.VERIFICATION_FAILED:xae.GENERATION_FAILED}var EUg="",IUg="FERN_AUTOMATION_EVENTS_ORIGIN",vUg=3e3,Wbi=class e{static instance;origin;inflight=[];static getInstance(){return e.instance==null&&(e.instance=new e(process.env[IUg]??EUg)),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(),vUg);try{let s={"content-type":"application/json"},a=await u_();a!=null&&a.value.length>0&&(s.Authorization=`Bearer ${a.value}`);let c=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(aap(t,r)),signal:i.signal})}catch{return}finally{clearTimeout(o)}}};function uap(){let{fern_run_id:e,github_run_id:t}=ece();return{action:process.env.FERN_ACTION,run_id:e,github_run_id:t,github_run_url:process.env.FERN_GITHUB_RUN_URL,org:void 0,config_repo:process.env.FERN_CONFIG_REPO,config_commit_sha:process.env.FERN_CONFIG_COMMIT_SHA,config_branch:process.env.FERN_CONFIG_BRANCH,config_pr_number:process.env.FERN_CONFIG_PR_NUMBER,trigger:process.env.GITHUB_EVENT_NAME,cli_version:"5.75.6"}}function lap(){return process.env.FERN_AUTOMATION==="true"}var Hbi=class{constructor(t,r=Wbi.getInstance()){this.reporter=t;this.automationEventApiClient=r;this.context=uap()}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:iap(t,r)})}captureSentryForFailure({event:t,context:r,error:n}){if(!(!nap(t.event)||t.errorCode==null))return this.reporter.captureException(n,{tags:oap(t,r),context:{automation:sap(t,r)}})}captureAutomationEventApiEvent(t,r){this.automationEventApiClient.post(t,r)}};Qt();function Kbi(e,t,r){if(t instanceof tu)return;let n=WFe(t,r?.code),i=r?.argv??process.argv,o=i.join(" "),s=r?.message??(t instanceof Error?t.message:void 0)??"",a=t??new P({message:s,code:n});lap()?CUg(i,e,n,s,a):xUg(e,o,n,a)}function xUg(e,t,r,n){e.instrumentPostHogEvent({command:t,properties:{failed:!0,errorCode:r}}),gBt(r)&&e.captureException(n,{tags:{"error.code":r}})}function CUg(e,t,r,n,i){let o=cap(e);t.emitAutomationTelemetryEvent({event:o,errorCode:r,attributes:{error_message:n}},{error:i})}Qt();function e8e(){return process.env.FERN_DISABLE_TELEMETRY==="true"}function Jbi({cliName:e,packageVersion:t,isLocal:r}){return e8e()||r?!1:!(t==="0.0.0")&&(e==="fern"&&!0)}var Ybi=class{sentry;constructor({release:t,telemetry:r}){let n="https://84f58b5e457f06999d92f11ce4b79158@o4509504076185600.ingest.us.sentry.io/4511021546602496";if(Jbi(r)&&n!=null&&n.length>0){let i="production";if(i==null||i.length===0)throw new P({message:"SENTRY_ENVIRONMENT must be set when SENTRY_DSN is configured",code:P.Code.ConfigError});this.sentry=uBt({dsn:n,release:t,environment:i,defaultIntegrations:!1,integrations:[W9e(),Mge(),Lge(),xge(),zge()],tracesSampleRate:0,attachStacktrace:!0,sendClientReports:!1}),lBt()}}captureException(t,r){if(this.sentry!=null)try{let n=r?.tags,i=r?.context,o=n!=null&&Object.keys(n).length>0,s=i!=null&&Object.values(i).some(a=>a!=null);return!o&&!s?this.sentry.captureException(t):lO(a=>{if(o&&a.setTags(n),i!=null)for(let[c,u]of Object.entries(i))u!=null&&a.setContext(c,u);return this.sentry?.captureException(t,void 0,a)})}catch{return}}async flush(){this.sentry!=null&&await Promise.resolve(this.sentry.flush(2e3)).catch(()=>{})}};Qt();var Xbi=class{originalWrite;redirected=!1;redirect(){if(this.redirected)throw new P({message:"StdoutRedirector: already redirected \u2014 did you forget to restore()?",code:P.Code.InternalError});this.originalWrite=process.stdout.write,process.stdout.write=process.stderr.write.bind(process.stderr),this.redirected=!0}restore(){!this.redirected||this.originalWrite==null||(process.stdout.write=this.originalWrite,this.originalWrite=void 0,this.redirected=!1)}async withRedirect(t){this.redirect();try{return await t()}finally{this.restore()}}};Ape();Dt();Ab();Qt();En();var AYt=class{result=Rf.Success;lastFailureMessage=void 0;logImmediately;logPrefix;title;subtasks=[];shouldBufferLogs;bufferedLogs=[];status="notStarted";onResult;instrumentPostHogEventImpl;captureExceptionImpl;emitAutomationTelemetryEventImpl;constructor({logImmediately:t,logPrefix:r,title:n,takeOverTerminal:i,onResult:o,shouldBufferLogs:s,instrumentPostHogEvent:a,captureException:c,emitAutomationTelemetryEvent:u}){this.logImmediately=t,this.logPrefix=r??"",this.title=n,this.takeOverTerminal=i,this.onResult=o,this.shouldBufferLogs=s,this.instrumentPostHogEventImpl=a,this.captureExceptionImpl=c,this.emitAutomationTelemetryEventImpl=u}start(){return this.status="running",this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.status="finished",this.flushLogs(),this.onResult?.(this.getResult()))}isFinished(){return this.status==="finished"}takeOverTerminal;failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),this.finish(),new tu}failWithoutThrowing(t,r,n){this.result=Rf.Failure,!(r instanceof tu)&&(t!=null&&(this.lastFailureMessage=t),UMt({message:t,error:r,logger:this.logger}),Kbi(this,r,{...n,message:t}))}getLastFailureMessage(){return this.lastFailureMessage}captureException(t,r){return this.captureExceptionImpl?.(t,r)}emitAutomationTelemetryEvent(t,r){this.emitAutomationTelemetryEventImpl(t,r)}getResult(){return this.result}instrumentPostHogEvent(t){this.instrumentPostHogEventImpl(t)}logAtLevel(t,...r){this.logAtLevelWithOverrides(t,r)}logAtLevelWithOverrides(t,r,n={}){this.log({parts:r,level:t,time:new Date,...n})}log(t){this.bufferedLogs.push({...t,prefix:this.logPrefix}),this.shouldBufferLogs||this.flushLogs()}flushLogs(){this.logImmediately(this.bufferedLogs),this.bufferedLogs=[]}logger=lv(this.logAtLevel.bind(this));addInteractiveTask({name:t,subtitle:r}){let n=new kFs({name:t,subtitle:r,logImmediately:i=>this.logImmediately(i),logPrefix:`${this.logPrefix}${fe.blackBright(t)} `,takeOverTerminal:this.takeOverTerminal,onResult:this.onResult,shouldBufferLogs:this.shouldBufferLogs,instrumentPostHogEvent:i=>this.instrumentPostHogEventImpl(i),captureException:this.captureExceptionImpl,emitAutomationTelemetryEvent:this.emitAutomationTelemetryEventImpl});return this.subtasks.push(n),n}async runInteractiveTask(t,r){let n=this.addInteractiveTask(t).start();try{await r(n)}catch(i){n.failWithoutThrowing(void 0,i)}finally{n.finish()}return n.getResult()===Rf.Success}printInteractiveTasks({spinner:t}){return this.subtasks.map(r=>r.print({spinner:t})).join(`
|
|
4894
4894
|
`)}},kFs=class extends AYt{name;subtitle;constructor({name:t,subtitle:r,...n}){super(n),this.name=t,this.subtitle=r}start(){return super.start(),this.logAtLevelWithOverrides(Un.Info,["Started."],{omitOnTTY:!0}),this.flushLogs(),this}isStarted(){return this.status!=="notStarted"}finish(){this.status!=="finished"&&(this.result===Rf.Success?this.logAtLevelWithOverrides(Un.Info,["Finished."],{omitOnTTY:!0}):this.logAtLevelWithOverrides(Un.Error,["Failed."],{omitOnTTY:!0}),super.finish())}setSubtitle(t){this.subtitle=t}print({spinner:t}){let r=[this.name];return this.subtitle!=null&&r.push(fe.dim(this.subtitle)),r.push(...this.subtasks.map(n=>n.print({spinner:t}))),ej({prefix:this.getIcon({spinner:t}),content:r.join(`
|
|
4895
4895
|
`)})}printInteractiveTasks({spinner:t}){return this.print({spinner:t})}getIcon({spinner:t}){let r=this.subtasks.length>0;switch(this.status){case"notStarted":return r?fe.dim("\u25B8 "):fe.dim("\u25E6 ");case"running":return r?fe.cyan("\u25BE "):t;case"finished":switch(this.getResult()){case Rf.Success:return r?fe.green("\u25BE "):fe.green("\u2713 ");case Rf.Failure:return r?fe.red("\u25BE "):fe.red("x ")}}}getResult(){if(this.result===Rf.Failure)return Rf.Failure;for(let t of this.subtasks)if(t.getResult()===Rf.Failure)return Rf.Failure;return Rf.Success}};Qt();var pap=be(Dze(),1);En();function fap(e){return e.filter(t=>t.isUpgradeAvailable).length>0}function wUg(e){return(e.cliUpgradeInfo?.isUpgradeAvailable??!1)||fap(e.generatorUpgradeInfo)}async function dap({cliEnvironment:e,upgradeInfo:t}){if(!wUg(t)||e.packageVersion==t.cliUpgradeInfo?.latestVersion)return;let r=`${fe.underline("Upgrades available")}
|
|
4896
4896
|
|
|
@@ -4899,7 +4899,7 @@ ${r}`}function lbi(e){let t=this,{emitParseErrors:r,...n}={...t.data("settings")
|
|
|
4899
4899
|
Run ${fe.cyan("fern generator upgrade")} to upgrade your generators.`),i.length>2&&(r+=`
|
|
4900
4900
|
Run ${fe.cyan("fern generator upgrade --list")} to see the full list of generator upgrades available.`),cit(r,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"})}async function FFs({generatorUpgradeInfo:e,header:t,limit:r,includeBoxen:n=!0}){if(!fap(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+=`
|
|
4901
4901
|
${await SUg(a.generatorName)} (${a.apiName!=null?"API: "+a.apiName+", ":""}Group: ${a.generatorGroup}) `+fe.dim(a.currentVersion)+fe.reset(" \u2192 ")+fe.green(a.latestVersion);return i+=`
|
|
4902
|
-
`,n?cit(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function SUg(e){let r=await new pap.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new P({message:`Generator ${e} not found`,code:P.Code.ConfigError});return r.body.displayName}Qo();rIe();Qt();async function TUg({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){if(t.length===1){let a={type:"singleApi",versions:{}};return await map({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(c,u,l,p)=>{a.versions[u]==null&&(a.versions[u]={});let d=Ize(l.name);if(d==null){p.logger.debug(`Skipping unknown generator: ${l.name}`);return}let f=await a1({generatorName:d,cliVersion:e.environment.packageVersion,currentGeneratorVersion:l.version,channel:i,includeMajor:o,context:p});f!=null&&(a.versions[u][l.name]={previousVersion:l.version,latestVersion:f})},generatorFilter:r,groupFilter:n}),a}let s={type:"multiApi",versions:{}};return await map({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=Ize(u.name);if(p==null){l.logger.debug(`Skipping unknown generator: ${u.name}`);return}let d=await a1({generatorName:p,cliVersion:e.environment.packageVersion,currentGeneratorVersion:u.version,channel:i,includeMajor:o,context:l});d!=null&&(s.versions[a][c][u.name]={previousVersion:u.version,latestVersion:d})},generatorFilter:r,groupFilter:n}),s}async function map({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:n,groupFilter:i}){await Promise.all(t.map(async o=>{await e.runTaskForWorkspace(o,async s=>{let a=await bL({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?BA(n):void 0;for(let u of a.groups)if(!(i!=null&&u.groupName!==i))for(let l of u.generators)c!=null&&l.name!==c||await r(o.workspaceName,u.groupName,l,s)})}))}function hap(e,t,r){let n=[];for(let[i,o]of Object.entries(e))for(let[s,a]of Object.entries(o)){r.debug(`Checking if ${s} in group ${i} has an upgrade available...`);let c;try{c=bQ(a.latestVersion,a.previousVersion)}catch{throw new P({message:`Generator "${s}" has an invalid version "${a.previousVersion}" in generators.yml. Use an exact version like 1.2.3.`,code:P.Code.ConfigError})}r.debug(`Latest version: ${a.latestVersion}. `+(c?"Upgrade available.":"No upgrade available.")),n.push({generatorName:s,generatorGroup:i,apiName:t,isUpgradeAvailable:c,currentVersion:a.previousVersion,latestVersion:a.latestVersion})}return n}async function Zbi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){let s=[];if(e!=null){let a=await TUg({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(...hap(u,c,t.logger));else s.push(...hap(a.versions,void 0,t.logger))}return s}Qt();R8i();async function jhe({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await dRt(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new P({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:P.Code.NetworkError})}}var gap=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],$bi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Un.Info;isLocal;stdoutRedirector=new Xbi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await kUt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new i6t(t,r),this.isLocal=n??!1,this.posthogManager=i;let o=this.getPackageName(),s=this.getPackageVersion(),a=this.getCliName();(o==null||s==null||a==null)&&this.exitProgram(),this.environment={packageName:o,packageVersion:s,cliName:a},this.sentryClient=new Ybi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Hbi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.75.
|
|
4902
|
+
`,n?cit(i,{padding:1,float:"center",textAlignment:"center",borderColor:"yellow",borderStyle:"round"}):i}async function SUg(e){let r=await new pap.FernRegistryClient({environment:"https://registry.buildwithfern.com"}).generators.getGeneratorByImage({dockerImage:e});if(!r.ok||r.body==null)throw new P({message:`Generator ${e} not found`,code:P.Code.ConfigError});return r.body.displayName}Qo();rIe();Qt();async function TUg({cliContext:e,project:{apiWorkspaces:t},generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){if(t.length===1){let a={type:"singleApi",versions:{}};return await map({cliContext:e,apiWorkspaces:t,perGeneratorAction:async(c,u,l,p)=>{a.versions[u]==null&&(a.versions[u]={});let d=Ize(l.name);if(d==null){p.logger.debug(`Skipping unknown generator: ${l.name}`);return}let f=await a1({generatorName:d,cliVersion:e.environment.packageVersion,currentGeneratorVersion:l.version,channel:i,includeMajor:o,context:p});f!=null&&(a.versions[u][l.name]={previousVersion:l.version,latestVersion:f})},generatorFilter:r,groupFilter:n}),a}let s={type:"multiApi",versions:{}};return await map({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=Ize(u.name);if(p==null){l.logger.debug(`Skipping unknown generator: ${u.name}`);return}let d=await a1({generatorName:p,cliVersion:e.environment.packageVersion,currentGeneratorVersion:u.version,channel:i,includeMajor:o,context:l});d!=null&&(s.versions[a][c][u.name]={previousVersion:u.version,latestVersion:d})},generatorFilter:r,groupFilter:n}),s}async function map({cliContext:e,apiWorkspaces:t,perGeneratorAction:r,generatorFilter:n,groupFilter:i}){await Promise.all(t.map(async o=>{await e.runTaskForWorkspace(o,async s=>{let a=await bL({absolutePathToWorkspace:o.absoluteFilePath,context:s});if(a==null||a.groups==null)return;let c=n!=null?BA(n):void 0;for(let u of a.groups)if(!(i!=null&&u.groupName!==i))for(let l of u.generators)c!=null&&l.name!==c||await r(o.workspaceName,u.groupName,l,s)})}))}function hap(e,t,r){let n=[];for(let[i,o]of Object.entries(e))for(let[s,a]of Object.entries(o)){r.debug(`Checking if ${s} in group ${i} has an upgrade available...`);let c;try{c=bQ(a.latestVersion,a.previousVersion)}catch{throw new P({message:`Generator "${s}" has an invalid version "${a.previousVersion}" in generators.yml. Use an exact version like 1.2.3.`,code:P.Code.ConfigError})}r.debug(`Latest version: ${a.latestVersion}. `+(c?"Upgrade available.":"No upgrade available.")),n.push({generatorName:s,generatorGroup:i,apiName:t,isUpgradeAvailable:c,currentVersion:a.previousVersion,latestVersion:a.latestVersion})}return n}async function Zbi({project:e,cliContext:t,generatorFilter:r,groupFilter:n,channel:i,includeMajor:o}){let s=[];if(e!=null){let a=await TUg({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(...hap(u,c,t.logger));else s.push(...hap(a.versions,void 0,t.logger))}return s}Qt();R8i();async function jhe({cliEnvironment:e,includePreReleases:t=!1}){if(e.packageName!=="fern-api"||e.packageVersion==="0.0.0")return e.packageVersion;try{return await dRt(e.packageName,{version:t?"prerelease":"latest"})}catch(r){throw new P({message:`Failed to resolve latest CLI version: ${r instanceof Error?r.message:String(r)}`,code:P.Code.NetworkError})}}var gap=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],$bi=class e{environment;sentryClient;posthogManager;automationTelemetryManager;didSucceed=!0;numTasks=0;ttyAwareLogger;logLevel=Un.Info;isLocal;stdoutRedirector=new Xbi;jsonMode=!1;static async create(t,r,{isLocal:n}){let i=await kUt();return new e(t,r,{isLocal:n,posthogManager:i})}constructor(t,r,{isLocal:n,posthogManager:i}){this.ttyAwareLogger=new i6t(t,r),this.isLocal=n??!1,this.posthogManager=i;let o=this.getPackageName(),s=this.getPackageVersion(),a=this.getCliName();(o==null||s==null||a==null)&&this.exitProgram(),this.environment={packageName:o,packageVersion:s,cliName:a},this.sentryClient=new Ybi({release:`cli@${this.environment.packageVersion}`,telemetry:{cliName:this.environment.cliName,packageVersion:this.environment.packageVersion,isLocal:this.isLocal}}),this.automationTelemetryManager=new Hbi(this)}getPackageName(){return"fern-api"}getPackageVersion(){return"5.75.6"}getCliName(){return"fern"}setLogLevel(t){this.logLevel=t}logFernVersionDebug(){this.logger.debug(`Running ${fe.bold(`${this.environment.cliName}`)} (${this.environment.packageName}@${this.environment.packageVersion})`)}failAndThrow(t,r,n){throw this.failWithoutThrowing(t,r,n),new tu}failWithoutThrowing(t,r,n){this.didSucceed=!1,!(r instanceof tu)&&(UMt({message:t,error:r,logger:this.logger}),Kbi(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)+`
|
|
4903
4903
|
`),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 dap({cliEnvironment:this.environment,upgradeInfo:t});r!=null&&(r.endsWith(`
|
|
4904
4904
|
`)||(r+=`
|
|
4905
4905
|
`),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=bDi(t.map(n=>n.type==="docs"?"docs":n.workspaceName??"api"),n=>n.length);r!=null&&(this.longestWorkspaceName=r)}project;registerProject(t){this.project=t,this.automationTelemetryManager.setOrganization(t.config.organization)}runTask(t){return this.runTaskWithInit(this.constructTaskInit(),t)}addTask(){return this.addTaskWithInit(this.constructTaskInit())}async runTaskForWorkspace(t,r){await this.runTaskWithInit(this.constructTaskInitForWorkspace(t),r)}addTaskWithInit(t){let r=new AYt(t);return this.ttyAwareLogger.registerTask(r),r}USE_NODE_18_OR_ABOVE_MESSAGE="The Fern CLI requires Node 18+ or above.";async runTaskWithInit(t,r){let n=this.addTaskWithInit(t).start(),i;try{i=await r(n)}catch(o){throw n.failWithoutThrowing(void 0,o),new tu}finally{n.finish()}return i}instrumentPostHogEvent(t){this.isLocal||this.posthogManager.sendEvent(t)}instrumentPostHogAutomationEvent(t){this.isLocal||this.posthogManager.sendAutomationEvent(t)}captureException(t,r){return this.sentryClient.captureException(t,r)}emitAutomationTelemetryEvent(t,r){this.automationTelemetryManager.emit(t,r)}logger=lv((t,...r)=>this.log(t,...r));stderr=lv((t,...r)=>this.logStderr(t,...r));constructTaskInitForWorkspace(t){let r=t.type==="docs"?"docs":t.workspaceName??"api",n=Aap(r),i=1+(this.longestWorkspaceName!=null?Aap(this.longestWorkspaceName):n).length,o=n.padEnd(i),s=gap[this.numTasks++%gap.length],a=fe.hex(s)(o);return{...this.constructTaskInit(),logPrefix:a,title:fe.hex(s).bold(r)}}constructTaskInit(){return{logImmediately:t=>this.logImmediately(t),takeOverTerminal:t=>this.ttyAwareLogger.takeOverTerminal(t),onResult:t=>{t===Rf.Failure&&(this.didSucceed=!1)},instrumentPostHogEvent:t=>{this.instrumentPostHogEvent(t)},shouldBufferLogs:!1,captureException:(t,r)=>this.sentryClient.captureException(t,r),emitAutomationTelemetryEvent:(t,r)=>this.emitAutomationTelemetryEvent(t,r)}}log(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}])}logStderr(t,...r){this.logImmediately([{parts:r,level:t,time:new Date}],{stderr:!0})}logImmediately(t,{stderr:r=!1}={}){let n=t.filter(i=>nw.indexOf(i.level)>=nw.indexOf(this.logLevel));this.ttyAwareLogger.log(n,{includeDebugInfo:this.logLevel===Un.Debug,stderr:r||this.jsonMode})}_suppressUpgradeMessage=!1;suppressUpgradeMessage(){this._suppressUpgradeMessage=!0}_isUpgradeAvailable;async isUpgradeAvailable({includePreReleases:t=!1}={}){if(this._isUpgradeAvailable==null){this.logger.debug(`Checking if ${this.environment.packageName} upgrade is available...`);let r=await jhe({cliEnvironment:this.environment,includePreReleases:t}),n=bQ(r,this.environment.packageVersion);this.logger.debug(`Latest version: ${r}. `+(n?"Upgrade available.":"No upgrade available."));let i={isUpgradeAvailable:n,latestVersion:r},o=await Zbi({project:this.project,cliContext:this});this._isUpgradeAvailable={cliUpgradeInfo:i,generatorUpgradeInfo:o}}return this._isUpgradeAvailable}async confirmPrompt(t,r=!1){try{return await RFs({message:t,choices:[{name:"No",value:!1},{name:"Yes",value:!0}],default:r,theme:{prefix:fe.yellow("?"),style:{answer:i=>fe.cyan(i),message:i=>fe.bold(i),highlight:i=>fe.cyan(i)}}})}catch(n){throw n?.name==="ExitPromptError"?(this.logger.info(`
|