@fern-api/typescript-dynamic-snippets 3.43.4 → 3.43.5

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/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var rl=Object.create;var ht=Object.defineProperty;var nl=Object.getOwnPropertyDescriptor;var il=Object.getOwnPropertyNames;var ol=Object.getPrototypeOf,al=Object.prototype.hasOwnProperty;var sl=(o,t,e)=>t in o?ht(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var tt=(o,t)=>()=>(o&&(t=o(o=0)),t);var b=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),Qt=(o,t)=>{for(var e in t)ht(o,e,{get:t[e],enumerable:!0})},Mr=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of il(t))!al.call(o,a)&&a!==e&&ht(o,a,{get:()=>t[a],enumerable:!(r=nl(t,a))||r.enumerable});return o};var ul=(o,t,e)=>(e=o!=null?rl(ol(o)):{},Mr(t||!o||!o.__esModule?ht(e,"default",{value:o,enumerable:!0}):e,o)),cl=o=>Mr(ht({},"__esModule",{value:!0}),o);var w=(o,t,e)=>sl(o,typeof t!="symbol"?t+"":t,e);var s=tt(()=>{"use strict"});var d={};Qt(d,{_debugEnd:()=>On,_debugProcess:()=>_n,_events:()=>Un,_eventsCount:()=>Dn,_exiting:()=>rn,_fatalExceptions:()=>bn,_getActiveHandles:()=>sn,_getActiveRequests:()=>an,_kill:()=>cn,_linkedBinding:()=>en,_maxListeners:()=>qn,_preload_modules:()=>Fn,_rawDebug:()=>Xr,_startProfilerIdleNotifier:()=>Pn,_stopProfilerIdleNotifier:()=>Tn,_tickCallback:()=>wn,abort:()=>Bn,addListener:()=>$n,allowedNodeEnvironmentFlags:()=>hn,arch:()=>qr,argv:()=>$r,argv0:()=>Nn,assert:()=>yn,binding:()=>zr,browser:()=>Zr,chdir:()=>Jr,config:()=>nn,cpuUsage:()=>Rt,cwd:()=>Yr,debugPort:()=>Mn,default:()=>Kn,dlopen:()=>on,domain:()=>tn,emit:()=>zn,emitWarning:()=>Gr,env:()=>Dr,execArgv:()=>Wr,execPath:()=>Rn,exit:()=>dn,features:()=>gn,hasUncaughtExceptionCaptureCallback:()=>vn,hrtime:()=>At,kill:()=>pn,listeners:()=>Jn,memoryUsage:()=>fn,moduleLoadList:()=>Qr,nextTick:()=>Fr,off:()=>Vn,on:()=>ge,once:()=>Wn,openStdin:()=>mn,pid:()=>Sn,platform:()=>Ur,ppid:()=>An,prependListener:()=>Hn,prependOnceListener:()=>Yn,reallyExit:()=>un,release:()=>Kr,removeAllListeners:()=>Gn,removeListener:()=>kn,resourceUsage:()=>ln,setSourceMapsEnabled:()=>Ln,setUncaughtExceptionCaptureCallback:()=>xn,stderr:()=>En,stdin:()=>jn,stdout:()=>In,title:()=>Cr,umask:()=>Hr,uptime:()=>Cn,version:()=>Vr,versions:()=>kr});function rr(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function ll(){!rt||!Ie||(rt=!1,Ie.length?ye=Ie.concat(ye):St=-1,ye.length&&Nr())}function Nr(){if(!rt){var o=setTimeout(ll,0);rt=!0;for(var t=ye.length;t;){for(Ie=ye,ye=[];++St<t;)Ie&&Ie[St].run();St=-1,t=ye.length}Ie=null,rt=!1,clearTimeout(o)}}function Fr(o){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ye.push(new Lr(o,t)),ye.length===1&&!rt&&setTimeout(Nr,0)}function Lr(o,t){this.fun=o,this.array=t}function J(){}function en(o){rr("_linkedBinding")}function on(o){rr("dlopen")}function an(){return[]}function sn(){return[]}function yn(o,t){if(!o)throw new Error(t||"assertion error")}function vn(){return!1}function Cn(){return we.now()/1e3}function At(o){var t=Math.floor((Date.now()-we.now())*.001),e=we.now()*.001,r=Math.floor(e)+t,a=Math.floor(e%1*1e9);return o&&(r=r-o[0],a=a-o[1],a<0&&(r--,a+=tr)),[r,a]}function ge(){return Kn}function Jn(o){return[]}var ye,rt,Ie,St,Cr,qr,Ur,Dr,$r,Wr,Vr,kr,Gr,zr,Hr,Yr,Jr,Kr,Zr,Xr,Qr,tn,rn,nn,un,cn,Rt,ln,fn,pn,dn,mn,hn,gn,bn,xn,wn,_n,On,Pn,Tn,In,En,jn,Bn,Sn,An,Rn,Mn,Nn,Fn,Ln,we,er,tr,qn,Un,Dn,$n,Wn,Vn,kn,Gn,zn,Hn,Yn,Kn,Zn=tt(()=>{"use strict";s();c();u();ye=[],rt=!1,St=-1;Lr.prototype.run=function(){this.fun.apply(null,this.array)};Cr="browser",qr="x64",Ur="browser",Dr={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},$r=["/usr/bin/node"],Wr=[],Vr="v16.8.0",kr={},Gr=function(o,t){console.warn((t?t+": ":"")+o)},zr=function(o){rr("binding")},Hr=function(o){return 0},Yr=function(){return"/"},Jr=function(o){},Kr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Zr=!0,Xr=J,Qr=[];tn={},rn=!1,nn={};un=J,cn=J,Rt=function(){return{}},ln=Rt,fn=Rt,pn=J,dn=J,mn=J,hn={};gn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},bn=J,xn=J;wn=J,_n=J,On=J,Pn=J,Tn=J,In=void 0,En=void 0,jn=void 0,Bn=J,Sn=2,An=1,Rn="/bin/usr/node",Mn=9229,Nn="node",Fn=[],Ln=J,we={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};we.now===void 0&&(er=Date.now(),we.timing&&we.timing.navigationStart&&(er=we.timing.navigationStart),we.now=()=>Date.now()-er);tr=1e9;At.bigint=function(o){var t=At(o);return typeof BigInt>"u"?t[0]*tr+t[1]:BigInt(t[0]*tr)+BigInt(t[1])};qn=10,Un={},Dn=0;$n=ge,Wn=ge,Vn=ge,kn=ge,Gn=ge,zn=J,Hn=ge,Yn=ge;Kn={version:Vr,versions:kr,arch:qr,platform:Ur,browser:Zr,release:Kr,_rawDebug:Xr,moduleLoadList:Qr,binding:zr,_linkedBinding:en,_events:Un,_eventsCount:Dn,_maxListeners:qn,on:ge,addListener:$n,once:Wn,off:Vn,removeListener:kn,removeAllListeners:Gn,emit:zn,prependListener:Hn,prependOnceListener:Yn,listeners:Jn,domain:tn,_exiting:rn,config:nn,dlopen:on,uptime:Cn,_getActiveRequests:an,_getActiveHandles:sn,reallyExit:un,_kill:cn,cpuUsage:Rt,resourceUsage:ln,memoryUsage:fn,kill:pn,exit:dn,openStdin:mn,allowedNodeEnvironmentFlags:hn,assert:yn,features:gn,_fatalExceptions:bn,setUncaughtExceptionCaptureCallback:xn,hasUncaughtExceptionCaptureCallback:vn,emitWarning:Gr,nextTick:Fr,_tickCallback:wn,_debugProcess:_n,_debugEnd:On,_startProfilerIdleNotifier:Pn,_stopProfilerIdleNotifier:Tn,stdout:In,stdin:jn,stderr:En,abort:Bn,umask:Hr,chdir:Jr,cwd:Yr,env:Dr,title:Cr,argv:$r,execArgv:Wr,pid:Sn,ppid:An,execPath:Rn,debugPort:Mn,hrtime:At,argv0:Nn,_preload_modules:Fn,setSourceMapsEnabled:Ln}});var u=tt(()=>{"use strict";Zn()});function fl(){if(Xn)return yt;Xn=!0,yt.byteLength=O,yt.toByteArray=M,yt.fromByteArray=X;for(var o=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,y=r.length;a<y;++a)o[a]=r[a],t[r.charCodeAt(a)]=a;t[45]=62,t[95]=63;function p(T){var E=T.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=T.indexOf("=");N===-1&&(N=E);var G=N===E?0:4-N%4;return[N,G]}function O(T){var E=p(T),N=E[0],G=E[1];return(N+G)*3/4-G}function P(T,E,N){return(E+N)*3/4-N}function M(T){var E,N=p(T),G=N[0],ee=N[1],V=new e(P(T,G,ee)),te=0,ie=ee>0?G-4:G,Q;for(Q=0;Q<ie;Q+=4)E=t[T.charCodeAt(Q)]<<18|t[T.charCodeAt(Q+1)]<<12|t[T.charCodeAt(Q+2)]<<6|t[T.charCodeAt(Q+3)],V[te++]=E>>16&255,V[te++]=E>>8&255,V[te++]=E&255;return ee===2&&(E=t[T.charCodeAt(Q)]<<2|t[T.charCodeAt(Q+1)]>>4,V[te++]=E&255),ee===1&&(E=t[T.charCodeAt(Q)]<<10|t[T.charCodeAt(Q+1)]<<4|t[T.charCodeAt(Q+2)]>>2,V[te++]=E>>8&255,V[te++]=E&255),V}function j(T){return o[T>>18&63]+o[T>>12&63]+o[T>>6&63]+o[T&63]}function C(T,E,N){for(var G,ee=[],V=E;V<N;V+=3)G=(T[V]<<16&16711680)+(T[V+1]<<8&65280)+(T[V+2]&255),ee.push(j(G));return ee.join("")}function X(T){for(var E,N=T.length,G=N%3,ee=[],V=16383,te=0,ie=N-G;te<ie;te+=V)ee.push(C(T,te,te+V>ie?ie:te+V));return G===1?(E=T[N-1],ee.push(o[E>>2]+o[E<<4&63]+"==")):G===2&&(E=(T[N-2]<<8)+T[N-1],ee.push(o[E>>10]+o[E>>4&63]+o[E<<2&63]+"=")),ee.join("")}return yt}function pl(){if(Qn)return Mt;Qn=!0;return Mt.read=function(o,t,e,r,a){var y,p,O=a*8-r-1,P=(1<<O)-1,M=P>>1,j=-7,C=e?a-1:0,X=e?-1:1,T=o[t+C];for(C+=X,y=T&(1<<-j)-1,T>>=-j,j+=O;j>0;y=y*256+o[t+C],C+=X,j-=8);for(p=y&(1<<-j)-1,y>>=-j,j+=r;j>0;p=p*256+o[t+C],C+=X,j-=8);if(y===0)y=1-M;else{if(y===P)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,r),y=y-M}return(T?-1:1)*p*Math.pow(2,y-r)},Mt.write=function(o,t,e,r,a,y){var p,O,P,M=y*8-a-1,j=(1<<M)-1,C=j>>1,X=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=r?0:y-1,E=r?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(O=isNaN(t)?1:0,p=j):(p=Math.floor(Math.log(t)/Math.LN2),t*(P=Math.pow(2,-p))<1&&(p--,P*=2),p+C>=1?t+=X/P:t+=X*Math.pow(2,1-C),t*P>=2&&(p++,P/=2),p+C>=j?(O=0,p=j):p+C>=1?(O=(t*P-1)*Math.pow(2,a),p=p+C):(O=t*Math.pow(2,C-1)*Math.pow(2,a),p=0));a>=8;o[e+T]=O&255,T+=E,O/=256,a-=8);for(p=p<<a|O,M+=a;M>0;o[e+T]=p&255,T+=E,p/=256,M-=8);o[e+T-E]|=N*128},Mt}function ti(){if(ei)return Ee;ei=!0;let o=fl(),t=pl(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ee.Buffer=p,Ee.SlowBuffer=ee,Ee.INSPECT_MAX_BYTES=50;let r=2147483647;Ee.kMaxLength=r,p.TYPED_ARRAY_SUPPORT=a(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let l=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(l,n),l.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function y(l){if(l>r)throw new RangeError('The value "'+l+'" is invalid for option "size"');let n=new Uint8Array(l);return Object.setPrototypeOf(n,p.prototype),n}function p(l,n,i){if(typeof l=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(l)}return O(l,n,i)}p.poolSize=8192;function O(l,n,i){if(typeof l=="string")return C(l,n);if(ArrayBuffer.isView(l))return T(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(pe(l,ArrayBuffer)||l&&pe(l.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(l,SharedArrayBuffer)||l&&pe(l.buffer,SharedArrayBuffer)))return E(l,n,i);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let f=l.valueOf&&l.valueOf();if(f!=null&&f!==l)return p.from(f,n,i);let g=N(l);if(g)return g;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return p.from(l[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}p.from=function(l,n,i){return O(l,n,i)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function P(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function M(l,n,i){return P(l),l<=0?y(l):n!==void 0?typeof i=="string"?y(l).fill(n,i):y(l).fill(n):y(l)}p.alloc=function(l,n,i){return M(l,n,i)};function j(l){return P(l),y(l<0?0:G(l)|0)}p.allocUnsafe=function(l){return j(l)},p.allocUnsafeSlow=function(l){return j(l)};function C(l,n){if((typeof n!="string"||n==="")&&(n="utf8"),!p.isEncoding(n))throw new TypeError("Unknown encoding: "+n);let i=V(l,n)|0,f=y(i),g=f.write(l,n);return g!==i&&(f=f.slice(0,g)),f}function X(l){let n=l.length<0?0:G(l.length)|0,i=y(n);for(let f=0;f<n;f+=1)i[f]=l[f]&255;return i}function T(l){if(pe(l,Uint8Array)){let n=new Uint8Array(l);return E(n.buffer,n.byteOffset,n.byteLength)}return X(l)}function E(l,n,i){if(n<0||l.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');let f;return n===void 0&&i===void 0?f=new Uint8Array(l):i===void 0?f=new Uint8Array(l,n):f=new Uint8Array(l,n,i),Object.setPrototypeOf(f,p.prototype),f}function N(l){if(p.isBuffer(l)){let n=G(l.length)|0,i=y(n);return i.length===0||l.copy(i,0,0,n),i}if(l.length!==void 0)return typeof l.length!="number"||Xt(l.length)?y(0):X(l);if(l.type==="Buffer"&&Array.isArray(l.data))return X(l.data)}function G(l){if(l>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return l|0}function ee(l){return+l!=l&&(l=0),p.alloc(+l)}p.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==p.prototype},p.compare=function(n,i){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),pe(i,Uint8Array)&&(i=p.from(i,i.offset,i.byteLength)),!p.isBuffer(n)||!p.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===i)return 0;let f=n.length,g=i.length;for(let x=0,v=Math.min(f,g);x<v;++x)if(n[x]!==i[x]){f=n[x],g=i[x];break}return f<g?-1:g<f?1:0},p.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(n,i){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return p.alloc(0);let f;if(i===void 0)for(i=0,f=0;f<n.length;++f)i+=n[f].length;let g=p.allocUnsafe(i),x=0;for(f=0;f<n.length;++f){let v=n[f];if(pe(v,Uint8Array))x+v.length>g.length?(p.isBuffer(v)||(v=p.from(v)),v.copy(g,x)):Uint8Array.prototype.set.call(g,v,x);else if(p.isBuffer(v))v.copy(g,x);else throw new TypeError('"list" argument must be an Array of Buffers');x+=v.length}return g};function V(l,n){if(p.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||pe(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);let i=l.length,f=arguments.length>2&&arguments[2]===!0;if(!f&&i===0)return 0;let g=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return Zt(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return Rr(l).length;default:if(g)return f?-1:Zt(l).length;n=(""+n).toLowerCase(),g=!0}}p.byteLength=V;function te(l,n,i){let f=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,n>>>=0,i<=n))return"";for(l||(l="utf8");;)switch(l){case"hex":return Hc(this,n,i);case"utf8":case"utf-8":return Or(this,n,i);case"ascii":return Gc(this,n,i);case"latin1":case"binary":return zc(this,n,i);case"base64":return Vc(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yc(this,n,i);default:if(f)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),f=!0}}p.prototype._isBuffer=!0;function ie(l,n,i){let f=l[n];l[n]=l[i],l[i]=f}p.prototype.swap16=function(){let n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<n;i+=2)ie(this,i,i+1);return this},p.prototype.swap32=function(){let n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<n;i+=4)ie(this,i,i+3),ie(this,i+1,i+2);return this},p.prototype.swap64=function(){let n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<n;i+=8)ie(this,i,i+7),ie(this,i+1,i+6),ie(this,i+2,i+5),ie(this,i+3,i+4);return this},p.prototype.toString=function(){let n=this.length;return n===0?"":arguments.length===0?Or(this,0,n):te.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(n){if(!p.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:p.compare(this,n)===0},p.prototype.inspect=function(){let n="",i=Ee.INSPECT_MAX_BYTES;return n=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(n+=" ... "),"<Buffer "+n+">"},e&&(p.prototype[e]=p.prototype.inspect),p.prototype.compare=function(n,i,f,g,x){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),!p.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(i===void 0&&(i=0),f===void 0&&(f=n?n.length:0),g===void 0&&(g=0),x===void 0&&(x=this.length),i<0||f>n.length||g<0||x>this.length)throw new RangeError("out of range index");if(g>=x&&i>=f)return 0;if(g>=x)return-1;if(i>=f)return 1;if(i>>>=0,f>>>=0,g>>>=0,x>>>=0,this===n)return 0;let v=x-g,B=f-i,$=Math.min(v,B),D=this.slice(g,x),W=n.slice(i,f);for(let F=0;F<$;++F)if(D[F]!==W[F]){v=D[F],B=W[F];break}return v<B?-1:B<v?1:0};function Q(l,n,i,f,g){if(l.length===0)return-1;if(typeof i=="string"?(f=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,Xt(i)&&(i=g?0:l.length-1),i<0&&(i=l.length+i),i>=l.length){if(g)return-1;i=l.length-1}else if(i<0)if(g)i=0;else return-1;if(typeof n=="string"&&(n=p.from(n,f)),p.isBuffer(n))return n.length===0?-1:_r(l,n,i,f,g);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?g?Uint8Array.prototype.indexOf.call(l,n,i):Uint8Array.prototype.lastIndexOf.call(l,n,i):_r(l,[n],i,f,g);throw new TypeError("val must be string, number or Buffer")}function _r(l,n,i,f,g){let x=1,v=l.length,B=n.length;if(f!==void 0&&(f=String(f).toLowerCase(),f==="ucs2"||f==="ucs-2"||f==="utf16le"||f==="utf-16le")){if(l.length<2||n.length<2)return-1;x=2,v/=2,B/=2,i/=2}function $(W,F){return x===1?W[F]:W.readUInt16BE(F*x)}let D;if(g){let W=-1;for(D=i;D<v;D++)if($(l,D)===$(n,W===-1?0:D-W)){if(W===-1&&(W=D),D-W+1===B)return W*x}else W!==-1&&(D-=D-W),W=-1}else for(i+B>v&&(i=v-B),D=i;D>=0;D--){let W=!0;for(let F=0;F<B;F++)if($(l,D+F)!==$(n,F)){W=!1;break}if(W)return D}return-1}p.prototype.includes=function(n,i,f){return this.indexOf(n,i,f)!==-1},p.prototype.indexOf=function(n,i,f){return Q(this,n,i,f,!0)},p.prototype.lastIndexOf=function(n,i,f){return Q(this,n,i,f,!1)};function qc(l,n,i,f){i=Number(i)||0;let g=l.length-i;f?(f=Number(f),f>g&&(f=g)):f=g;let x=n.length;f>x/2&&(f=x/2);let v;for(v=0;v<f;++v){let B=parseInt(n.substr(v*2,2),16);if(Xt(B))return v;l[i+v]=B}return v}function Uc(l,n,i,f){return Bt(Zt(n,l.length-i),l,i,f)}function Dc(l,n,i,f){return Bt(Xc(n),l,i,f)}function $c(l,n,i,f){return Bt(Rr(n),l,i,f)}function Wc(l,n,i,f){return Bt(Qc(n,l.length-i),l,i,f)}p.prototype.write=function(n,i,f,g){if(i===void 0)g="utf8",f=this.length,i=0;else if(f===void 0&&typeof i=="string")g=i,f=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(f)?(f=f>>>0,g===void 0&&(g="utf8")):(g=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let x=this.length-i;if((f===void 0||f>x)&&(f=x),n.length>0&&(f<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");let v=!1;for(;;)switch(g){case"hex":return qc(this,n,i,f);case"utf8":case"utf-8":return Uc(this,n,i,f);case"ascii":case"latin1":case"binary":return Dc(this,n,i,f);case"base64":return $c(this,n,i,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wc(this,n,i,f);default:if(v)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),v=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Vc(l,n,i){return n===0&&i===l.length?o.fromByteArray(l):o.fromByteArray(l.slice(n,i))}function Or(l,n,i){i=Math.min(l.length,i);let f=[],g=n;for(;g<i;){let x=l[g],v=null,B=x>239?4:x>223?3:x>191?2:1;if(g+B<=i){let $,D,W,F;switch(B){case 1:x<128&&(v=x);break;case 2:$=l[g+1],($&192)===128&&(F=(x&31)<<6|$&63,F>127&&(v=F));break;case 3:$=l[g+1],D=l[g+2],($&192)===128&&(D&192)===128&&(F=(x&15)<<12|($&63)<<6|D&63,F>2047&&(F<55296||F>57343)&&(v=F));break;case 4:$=l[g+1],D=l[g+2],W=l[g+3],($&192)===128&&(D&192)===128&&(W&192)===128&&(F=(x&15)<<18|($&63)<<12|(D&63)<<6|W&63,F>65535&&F<1114112&&(v=F))}}v===null?(v=65533,B=1):v>65535&&(v-=65536,f.push(v>>>10&1023|55296),v=56320|v&1023),f.push(v),g+=B}return kc(f)}let Pr=4096;function kc(l){let n=l.length;if(n<=Pr)return String.fromCharCode.apply(String,l);let i="",f=0;for(;f<n;)i+=String.fromCharCode.apply(String,l.slice(f,f+=Pr));return i}function Gc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]&127);return f}function zc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]);return f}function Hc(l,n,i){let f=l.length;(!n||n<0)&&(n=0),(!i||i<0||i>f)&&(i=f);let g="";for(let x=n;x<i;++x)g+=el[l[x]];return g}function Yc(l,n,i){let f=l.slice(n,i),g="";for(let x=0;x<f.length-1;x+=2)g+=String.fromCharCode(f[x]+f[x+1]*256);return g}p.prototype.slice=function(n,i){let f=this.length;n=~~n,i=i===void 0?f:~~i,n<0?(n+=f,n<0&&(n=0)):n>f&&(n=f),i<0?(i+=f,i<0&&(i=0)):i>f&&(i=f),i<n&&(i=n);let g=this.subarray(n,i);return Object.setPrototypeOf(g,p.prototype),g};function H(l,n,i){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+n>i)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return g},p.prototype.readUintBE=p.prototype.readUIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n+--i],x=1;for(;i>0&&(x*=256);)g+=this[n+--i]*x;return g},p.prototype.readUint8=p.prototype.readUInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]|this[n+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]<<8|this[n+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},p.prototype.readBigUInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&mt(n,this.length-8);let g=i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,x=this[++n]+this[++n]*2**8+this[++n]*2**16+f*2**24;return BigInt(g)+(BigInt(x)<<BigInt(32))}),p.prototype.readBigUInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&mt(n,this.length-8);let g=i*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],x=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f;return(BigInt(g)<<BigInt(32))+BigInt(x)}),p.prototype.readIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return x*=128,g>=x&&(g-=Math.pow(2,8*i)),g},p.prototype.readIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=i,x=1,v=this[n+--g];for(;g>0&&(x*=256);)v+=this[n+--g]*x;return x*=128,v>=x&&(v-=Math.pow(2,8*i)),v},p.prototype.readInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},p.prototype.readInt16LE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n]|this[n+1]<<8;return f&32768?f|4294901760:f},p.prototype.readInt16BE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n+1]|this[n]<<8;return f&32768?f|4294901760:f},p.prototype.readInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},p.prototype.readInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},p.prototype.readBigInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&mt(n,this.length-8);let g=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(f<<24);return(BigInt(g)<<BigInt(32))+BigInt(i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),p.prototype.readBigInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&mt(n,this.length-8);let g=(i<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(g)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f)}),p.prototype.readFloatLE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!0,23,4)},p.prototype.readFloatBE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!1,23,4)},p.prototype.readDoubleLE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!0,52,8)},p.prototype.readDoubleBE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!1,52,8)};function re(l,n,i,f,g,x){if(!p.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>g||n<x)throw new RangeError('"value" argument is out of bounds');if(i+f>l.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=1,v=0;for(this[i]=n&255;++v<f&&(x*=256);)this[i+v]=n/x&255;return i+f},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=f-1,v=1;for(this[i+x]=n&255;--x>=0&&(v*=256);)this[i+x]=n/v&255;return i+f},p.prototype.writeUint8=p.prototype.writeUInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,255,0),this[i]=n&255,i+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i+3]=n>>>24,this[i+2]=n>>>16,this[i+1]=n>>>8,this[i]=n&255,i+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4};function Tr(l,n,i,f,g){Ar(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,i}function Ir(l,n,i,f,g){Ar(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i+7]=x,x=x>>8,l[i+6]=x,x=x>>8,l[i+5]=x,x=x>>8,l[i+4]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i+3]=v,v=v>>8,l[i+2]=v,v=v>>8,l[i+1]=v,v=v>>8,l[i]=v,i+8}p.prototype.writeBigUInt64LE=ve(function(n,i=0){return Tr(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ve(function(n,i=0){return Ir(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=0,v=1,B=0;for(this[i]=n&255;++x<f&&(v*=256);)n<0&&B===0&&this[i+x-1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=f-1,v=1,B=0;for(this[i+x]=n&255;--x>=0&&(v*=256);)n<0&&B===0&&this[i+x+1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,127,-128),n<0&&(n=255+n+1),this[i]=n&255,i+1},p.prototype.writeInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),this[i]=n&255,this[i+1]=n>>>8,this[i+2]=n>>>16,this[i+3]=n>>>24,i+4},p.prototype.writeInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4},p.prototype.writeBigInt64LE=ve(function(n,i=0){return Tr(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ve(function(n,i=0){return Ir(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Er(l,n,i,f,g,x){if(i+f>l.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function jr(l,n,i,f,g){return n=+n,i=i>>>0,g||Er(l,n,i,4),t.write(l,n,i,f,23,4),i+4}p.prototype.writeFloatLE=function(n,i,f){return jr(this,n,i,!0,f)},p.prototype.writeFloatBE=function(n,i,f){return jr(this,n,i,!1,f)};function Br(l,n,i,f,g){return n=+n,i=i>>>0,g||Er(l,n,i,8),t.write(l,n,i,f,52,8),i+8}p.prototype.writeDoubleLE=function(n,i,f){return Br(this,n,i,!0,f)},p.prototype.writeDoubleBE=function(n,i,f){return Br(this,n,i,!1,f)},p.prototype.copy=function(n,i,f,g){if(!p.isBuffer(n))throw new TypeError("argument should be a Buffer");if(f||(f=0),!g&&g!==0&&(g=this.length),i>=n.length&&(i=n.length),i||(i=0),g>0&&g<f&&(g=f),g===f||n.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),n.length-i<g-f&&(g=n.length-i+f);let x=g-f;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,f,g):Uint8Array.prototype.set.call(n,this.subarray(f,g),i),x},p.prototype.fill=function(n,i,f,g){if(typeof n=="string"){if(typeof i=="string"?(g=i,i=0,f=this.length):typeof f=="string"&&(g=f,f=this.length),g!==void 0&&typeof g!="string")throw new TypeError("encoding must be a string");if(typeof g=="string"&&!p.isEncoding(g))throw new TypeError("Unknown encoding: "+g);if(n.length===1){let v=n.charCodeAt(0);(g==="utf8"&&v<128||g==="latin1")&&(n=v)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(i<0||this.length<i||this.length<f)throw new RangeError("Out of range index");if(f<=i)return this;i=i>>>0,f=f===void 0?this.length:f>>>0,n||(n=0);let x;if(typeof n=="number")for(x=i;x<f;++x)this[x]=n;else{let v=p.isBuffer(n)?n:p.from(n,g),B=v.length;if(B===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(x=0;x<f-i;++x)this[x+i]=v[x%B]}return this};let Qe={};function Kt(l,n,i){Qe[l]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${l}]`,this.stack,delete this.name}get code(){return l}set code(g){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:g,writable:!0})}toString(){return`${this.name} [${l}]: ${this.message}`}}}Kt("ERR_BUFFER_OUT_OF_BOUNDS",function(l){return l?`${l} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Kt("ERR_INVALID_ARG_TYPE",function(l,n){return`The "${l}" argument must be of type number. Received type ${typeof n}`},TypeError),Kt("ERR_OUT_OF_RANGE",function(l,n,i){let f=`The value of "${l}" is out of range.`,g=i;return Number.isInteger(i)&&Math.abs(i)>2**32?g=Sr(String(i)):typeof i=="bigint"&&(g=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(g=Sr(g)),g+="n"),f+=` It must be ${n}. Received ${g}`,f},RangeError);function Sr(l){let n="",i=l.length,f=l[0]==="-"?1:0;for(;i>=f+4;i-=3)n=`_${l.slice(i-3,i)}${n}`;return`${l.slice(0,i)}${n}`}function Jc(l,n,i){et(n,"offset"),(l[n]===void 0||l[n+i]===void 0)&&mt(n,l.length-(i+1))}function Ar(l,n,i,f,g,x){if(l>i||l<n){let v=typeof n=="bigint"?"n":"",B;throw n===0||n===BigInt(0)?B=`>= 0${v} and < 2${v} ** ${(x+1)*8}${v}`:B=`>= -(2${v} ** ${(x+1)*8-1}${v}) and < 2 ** ${(x+1)*8-1}${v}`,new Qe.ERR_OUT_OF_RANGE("value",B,l)}Jc(f,g,x)}function et(l,n){if(typeof l!="number")throw new Qe.ERR_INVALID_ARG_TYPE(n,"number",l)}function mt(l,n,i){throw Math.floor(l)!==l?(et(l,i),new Qe.ERR_OUT_OF_RANGE("offset","an integer",l)):n<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,l)}let Kc=/[^+/0-9A-Za-z-_]/g;function Zc(l){if(l=l.split("=")[0],l=l.trim().replace(Kc,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function Zt(l,n){n=n||1/0;let i,f=l.length,g=null,x=[];for(let v=0;v<f;++v){if(i=l.charCodeAt(v),i>55295&&i<57344){if(!g){if(i>56319){(n-=3)>-1&&x.push(239,191,189);continue}else if(v+1===f){(n-=3)>-1&&x.push(239,191,189);continue}g=i;continue}if(i<56320){(n-=3)>-1&&x.push(239,191,189),g=i;continue}i=(g-55296<<10|i-56320)+65536}else g&&(n-=3)>-1&&x.push(239,191,189);if(g=null,i<128){if((n-=1)<0)break;x.push(i)}else if(i<2048){if((n-=2)<0)break;x.push(i>>6|192,i&63|128)}else if(i<65536){if((n-=3)<0)break;x.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((n-=4)<0)break;x.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return x}function Xc(l){let n=[];for(let i=0;i<l.length;++i)n.push(l.charCodeAt(i)&255);return n}function Qc(l,n){let i,f,g,x=[];for(let v=0;v<l.length&&!((n-=2)<0);++v)i=l.charCodeAt(v),f=i>>8,g=i%256,x.push(g),x.push(f);return x}function Rr(l){return o.toByteArray(Zc(l))}function Bt(l,n,i,f){let g;for(g=0;g<f&&!(g+i>=n.length||g>=l.length);++g)n[g+i]=l[g];return g}function pe(l,n){return l instanceof n||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===n.name}function Xt(l){return l!==l}let el=(function(){let l="0123456789abcdef",n=new Array(256);for(let i=0;i<16;++i){let f=i*16;for(let g=0;g<16;++g)n[f+g]=l[i]+l[g]}return n})();function ve(l){return typeof BigInt>"u"?tl:l}function tl(){throw new Error("BigInt not supported")}return Ee}var yt,Xn,Mt,Qn,Ee,ei,ri=tt(()=>{"use strict";s();c();u();yt={},Xn=!1;Mt={},Qn=!1;Ee={},ei=!1});var je,m,Id,Ed,ni=tt(()=>{"use strict";s();c();u();ri();je=ti();je.Buffer;je.SlowBuffer;je.INSPECT_MAX_BYTES;je.kMaxLength;m=je.Buffer,Id=je.INSPECT_MAX_BYTES,Ed=je.kMaxLength});var c=tt(()=>{"use strict";ni()});var uo=b(so=>{"use strict";s();c();u();Object.defineProperty(so,"__esModule",{value:!0})});var lo=b(co=>{"use strict";s();c();u();Object.defineProperty(co,"__esModule",{value:!0})});var po=b(fo=>{"use strict";s();c();u();Object.defineProperty(fo,"__esModule",{value:!0})});var ho=b(mo=>{"use strict";s();c();u();Object.defineProperty(mo,"__esModule",{value:!0})});var go=b(yo=>{"use strict";s();c();u();Object.defineProperty(yo,"__esModule",{value:!0})});var xo=b(bo=>{"use strict";s();c();u();Object.defineProperty(bo,"__esModule",{value:!0})});var wo=b(vo=>{"use strict";s();c();u();Object.defineProperty(vo,"__esModule",{value:!0})});var cr=b(oe=>{"use strict";s();c();u();var hp=oe&&oe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Me=oe&&oe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&hp(t,o,e)};Object.defineProperty(oe,"__esModule",{value:!0});Me(uo(),oe);Me(lo(),oe);Me(po(),oe);Me(ho(),oe);Me(go(),oe);Me(xo(),oe);Me(wo(),oe)});var _o=b(Ne=>{"use strict";s();c();u();var yp=Ne&&Ne.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),gp=Ne&&Ne.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&yp(t,o,e)};Object.defineProperty(Ne,"__esModule",{value:!0});gp(cr(),Ne)});var Po=b(Oo=>{"use strict";s();c();u();Object.defineProperty(Oo,"__esModule",{value:!0})});var Io=b(To=>{"use strict";s();c();u();Object.defineProperty(To,"__esModule",{value:!0})});var jo=b(Eo=>{"use strict";s();c();u();Object.defineProperty(Eo,"__esModule",{value:!0})});var So=b(Bo=>{"use strict";s();c();u();Object.defineProperty(Bo,"__esModule",{value:!0})});var Ro=b(Ao=>{"use strict";s();c();u();Object.defineProperty(Ao,"__esModule",{value:!0})});var No=b(Mo=>{"use strict";s();c();u();Object.defineProperty(Mo,"__esModule",{value:!0})});var Lo=b(Fo=>{"use strict";s();c();u();Object.defineProperty(Fo,"__esModule",{value:!0})});var qo=b(Co=>{"use strict";s();c();u();Object.defineProperty(Co,"__esModule",{value:!0})});var Do=b(Uo=>{"use strict";s();c();u();Object.defineProperty(Uo,"__esModule",{value:!0})});var Wo=b($o=>{"use strict";s();c();u();Object.defineProperty($o,"__esModule",{value:!0})});var ko=b(Vo=>{"use strict";s();c();u();Object.defineProperty(Vo,"__esModule",{value:!0})});var zo=b(Go=>{"use strict";s();c();u();Object.defineProperty(Go,"__esModule",{value:!0})});var lr=b(Y=>{"use strict";s();c();u();var bp=Y&&Y.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ue=Y&&Y.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&bp(t,o,e)};Object.defineProperty(Y,"__esModule",{value:!0});ue(Po(),Y);ue(Io(),Y);ue(jo(),Y);ue(So(),Y);ue(Ro(),Y);ue(No(),Y);ue(Lo(),Y);ue(qo(),Y);ue(Do(),Y);ue(Wo(),Y);ue(ko(),Y);ue(zo(),Y)});var Ho=b(Fe=>{"use strict";s();c();u();var xp=Fe&&Fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),vp=Fe&&Fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&xp(t,o,e)};Object.defineProperty(Fe,"__esModule",{value:!0});vp(lr(),Fe)});var Jo=b(Yo=>{"use strict";s();c();u();Object.defineProperty(Yo,"__esModule",{value:!0})});var fr=b(Le=>{"use strict";s();c();u();var wp=Le&&Le.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),_p=Le&&Le.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&wp(t,o,e)};Object.defineProperty(Le,"__esModule",{value:!0});_p(Jo(),Le)});var Ko=b(Ce=>{"use strict";s();c();u();var Op=Ce&&Ce.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Pp=Ce&&Ce.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Op(t,o,e)};Object.defineProperty(Ce,"__esModule",{value:!0});Pp(fr(),Ce)});var Xo=b(Zo=>{"use strict";s();c();u();Object.defineProperty(Zo,"__esModule",{value:!0})});var ea=b(Qo=>{"use strict";s();c();u();Object.defineProperty(Qo,"__esModule",{value:!0})});var ra=b(ta=>{"use strict";s();c();u();Object.defineProperty(ta,"__esModule",{value:!0})});var ia=b(na=>{"use strict";s();c();u();Object.defineProperty(na,"__esModule",{value:!0})});var aa=b(oa=>{"use strict";s();c();u();Object.defineProperty(oa,"__esModule",{value:!0})});var ua=b(sa=>{"use strict";s();c();u();Object.defineProperty(sa,"__esModule",{value:!0})});var la=b(ca=>{"use strict";s();c();u();Object.defineProperty(ca,"__esModule",{value:!0})});var pa=b(fa=>{"use strict";s();c();u();Object.defineProperty(fa,"__esModule",{value:!0})});var ma=b(da=>{"use strict";s();c();u();Object.defineProperty(da,"__esModule",{value:!0})});var ya=b(ha=>{"use strict";s();c();u();Object.defineProperty(ha,"__esModule",{value:!0})});var ba=b(ga=>{"use strict";s();c();u();Object.defineProperty(ga,"__esModule",{value:!0})});var va=b(xa=>{"use strict";s();c();u();Object.defineProperty(xa,"__esModule",{value:!0})});var _a=b(wa=>{"use strict";s();c();u();Object.defineProperty(wa,"__esModule",{value:!0})});var pr=b(z=>{"use strict";s();c();u();var Tp=z&&z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ae=z&&z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Tp(t,o,e)};Object.defineProperty(z,"__esModule",{value:!0});ae(Xo(),z);ae(ea(),z);ae(ra(),z);ae(ia(),z);ae(aa(),z);ae(ua(),z);ae(la(),z);ae(pa(),z);ae(ma(),z);ae(ya(),z);ae(ba(),z);ae(va(),z);ae(_a(),z)});var Oa=b(qe=>{"use strict";s();c();u();var Ip=qe&&qe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ep=qe&&qe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ip(t,o,e)};Object.defineProperty(qe,"__esModule",{value:!0});Ep(pr(),qe)});var Ta=b(Pa=>{"use strict";s();c();u();Object.defineProperty(Pa,"__esModule",{value:!0})});var Ea=b(Ia=>{"use strict";s();c();u();Object.defineProperty(Ia,"__esModule",{value:!0})});var dr=b(Pe=>{"use strict";s();c();u();var jp=Pe&&Pe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ja=Pe&&Pe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&jp(t,o,e)};Object.defineProperty(Pe,"__esModule",{value:!0});ja(Ta(),Pe);ja(Ea(),Pe)});var Ba=b(Ue=>{"use strict";s();c();u();var Bp=Ue&&Ue.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Sp=Ue&&Ue.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Bp(t,o,e)};Object.defineProperty(Ue,"__esModule",{value:!0});Sp(dr(),Ue)});var Aa=b(Sa=>{"use strict";s();c();u();Object.defineProperty(Sa,"__esModule",{value:!0})});var Ma=b(Ra=>{"use strict";s();c();u();Object.defineProperty(Ra,"__esModule",{value:!0})});var Fa=b(Na=>{"use strict";s();c();u();Object.defineProperty(Na,"__esModule",{value:!0})});var Ca=b(La=>{"use strict";s();c();u();Object.defineProperty(La,"__esModule",{value:!0})});var Ua=b(qa=>{"use strict";s();c();u();Object.defineProperty(qa,"__esModule",{value:!0})});var $a=b(Da=>{"use strict";s();c();u();Object.defineProperty(Da,"__esModule",{value:!0})});var Va=b(Wa=>{"use strict";s();c();u();Object.defineProperty(Wa,"__esModule",{value:!0})});var Ga=b(ka=>{"use strict";s();c();u();Object.defineProperty(ka,"__esModule",{value:!0})});var Ha=b(za=>{"use strict";s();c();u();Object.defineProperty(za,"__esModule",{value:!0})});var Ja=b(Ya=>{"use strict";s();c();u();Object.defineProperty(Ya,"__esModule",{value:!0})});var mr=b(K=>{"use strict";s();c();u();var Ap=K&&K.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),me=K&&K.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ap(t,o,e)};Object.defineProperty(K,"__esModule",{value:!0});me(Aa(),K);me(Ma(),K);me(Fa(),K);me(Ca(),K);me(Ua(),K);me($a(),K);me(Va(),K);me(Ga(),K);me(Ha(),K);me(Ja(),K)});var Ka=b(De=>{"use strict";s();c();u();var Rp=De&&De.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Mp=De&&De.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Rp(t,o,e)};Object.defineProperty(De,"__esModule",{value:!0});Mp(mr(),De)});var Za=b(Ut=>{"use strict";s();c();u();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ErrorSeverity=void 0;Ut.ErrorSeverity={Critical:"CRITICAL",Warning:"WARNING"}});var Qa=b(Xa=>{"use strict";s();c();u();Object.defineProperty(Xa,"__esModule",{value:!0})});var ts=b(es=>{"use strict";s();c();u();Object.defineProperty(es,"__esModule",{value:!0})});var ns=b(rs=>{"use strict";s();c();u();Object.defineProperty(rs,"__esModule",{value:!0})});var os=b(is=>{"use strict";s();c();u();Object.defineProperty(is,"__esModule",{value:!0})});var hr=b(fe=>{"use strict";s();c();u();var Np=fe&&fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),jt=fe&&fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Np(t,o,e)};Object.defineProperty(fe,"__esModule",{value:!0});jt(Za(),fe);jt(Qa(),fe);jt(ts(),fe);jt(ns(),fe);jt(os(),fe)});var as=b($e=>{"use strict";s();c();u();var Fp=$e&&$e.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Lp=$e&&$e.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Fp(t,o,e)};Object.defineProperty($e,"__esModule",{value:!0});Lp(hr(),$e)});var us=b(ss=>{"use strict";s();c();u();Object.defineProperty(ss,"__esModule",{value:!0})});var ls=b(cs=>{"use strict";s();c();u();Object.defineProperty(cs,"__esModule",{value:!0})});var ps=b(fs=>{"use strict";s();c();u();Object.defineProperty(fs,"__esModule",{value:!0})});var ms=b(ds=>{"use strict";s();c();u();Object.defineProperty(ds,"__esModule",{value:!0})});var ys=b(hs=>{"use strict";s();c();u();Object.defineProperty(hs,"__esModule",{value:!0})});var bs=b(gs=>{"use strict";s();c();u();Object.defineProperty(gs,"__esModule",{value:!0})});var vs=b(xs=>{"use strict";s();c();u();Object.defineProperty(xs,"__esModule",{value:!0})});var _s=b(ws=>{"use strict";s();c();u();Object.defineProperty(ws,"__esModule",{value:!0})});var Ps=b(Os=>{"use strict";s();c();u();Object.defineProperty(Os,"__esModule",{value:!0})});var Is=b(Ts=>{"use strict";s();c();u();Object.defineProperty(Ts,"__esModule",{value:!0})});var js=b(Es=>{"use strict";s();c();u();Object.defineProperty(Es,"__esModule",{value:!0})});var Ss=b(Bs=>{"use strict";s();c();u();Object.defineProperty(Bs,"__esModule",{value:!0})});var Rs=b(As=>{"use strict";s();c();u();Object.defineProperty(As,"__esModule",{value:!0})});var Ns=b(Ms=>{"use strict";s();c();u();Object.defineProperty(Ms,"__esModule",{value:!0})});var yr=b(k=>{"use strict";s();c();u();var Cp=k&&k.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ne=k&&k.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Cp(t,o,e)};Object.defineProperty(k,"__esModule",{value:!0});ne(us(),k);ne(ls(),k);ne(ps(),k);ne(ms(),k);ne(ys(),k);ne(bs(),k);ne(vs(),k);ne(_s(),k);ne(Ps(),k);ne(Is(),k);ne(js(),k);ne(Ss(),k);ne(Rs(),k);ne(Ns(),k)});var Fs=b(We=>{"use strict";s();c();u();var qp=We&&We.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Up=We&&We.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&qp(t,o,e)};Object.defineProperty(We,"__esModule",{value:!0});Up(yr(),We)});var Cs=b(R=>{"use strict";s();c();u();var Ls=R&&R.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Dp=R&&R.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Ve=R&&R.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Ls(e,t,r[a]);return Dp(e,t),e}})(),ke=R&&R.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ls(t,o,e)};Object.defineProperty(R,"__esModule",{value:!0});R.types=R.snippets=R.ir=R.environment=R.endpoints=R.declaration=R.auth=void 0;R.auth=Ve(Ho());ke(lr(),R);R.declaration=Ve(Ko());ke(fr(),R);R.endpoints=Ve(Oa());ke(pr(),R);R.environment=Ve(Ba());ke(dr(),R);R.ir=Ve(Ka());ke(mr(),R);R.snippets=Ve(as());ke(hr(),R);R.types=Ve(Fs());ke(yr(),R)});var qs=b(Ge=>{"use strict";s();c();u();var $p=Ge&&Ge.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Wp=Ge&&Ge.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&$p(t,o,e)};Object.defineProperty(Ge,"__esModule",{value:!0});Wp(Cs(),Ge)});var Ds=b(Us=>{"use strict";s();c();u();Object.defineProperty(Us,"__esModule",{value:!0})});var Ws=b($s=>{"use strict";s();c();u();Object.defineProperty($s,"__esModule",{value:!0})});var ks=b(Vs=>{"use strict";s();c();u();Object.defineProperty(Vs,"__esModule",{value:!0})});var zs=b(Gs=>{"use strict";s();c();u();Object.defineProperty(Gs,"__esModule",{value:!0})});var Ys=b(Hs=>{"use strict";s();c();u();Object.defineProperty(Hs,"__esModule",{value:!0})});var Ks=b(Js=>{"use strict";s();c();u();Object.defineProperty(Js,"__esModule",{value:!0})});var Xs=b(Zs=>{"use strict";s();c();u();Object.defineProperty(Zs,"__esModule",{value:!0})});var eu=b(Qs=>{"use strict";s();c();u();Object.defineProperty(Qs,"__esModule",{value:!0})});var ru=b(tu=>{"use strict";s();c();u();Object.defineProperty(tu,"__esModule",{value:!0})});var iu=b(nu=>{"use strict";s();c();u();Object.defineProperty(nu,"__esModule",{value:!0})});var gr=b(Z=>{"use strict";s();c();u();var Vp=Z&&Z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),he=Z&&Z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Vp(t,o,e)};Object.defineProperty(Z,"__esModule",{value:!0});he(Ds(),Z);he(Ws(),Z);he(ks(),Z);he(zs(),Z);he(Ys(),Z);he(Ks(),Z);he(Xs(),Z);he(eu(),Z);he(ru(),Z);he(iu(),Z)});var ou=b(ze=>{"use strict";s();c();u();var kp=ze&&ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Gp=ze&&ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&kp(t,o,e)};Object.defineProperty(ze,"__esModule",{value:!0});Gp(gr(),ze)});var su=b(au=>{"use strict";s();c();u();Object.defineProperty(au,"__esModule",{value:!0})});var cu=b(uu=>{"use strict";s();c();u();Object.defineProperty(uu,"__esModule",{value:!0})});var fu=b(lu=>{"use strict";s();c();u();Object.defineProperty(lu,"__esModule",{value:!0})});var pu=b(Dt=>{"use strict";s();c();u();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.LicenseId=void 0;Dt.LicenseId={Mit:"MIT",Apache2:"Apache-2.0"}});var mu=b(du=>{"use strict";s();c();u();Object.defineProperty(du,"__esModule",{value:!0})});var yu=b(hu=>{"use strict";s();c();u();Object.defineProperty(hu,"__esModule",{value:!0})});var bu=b(gu=>{"use strict";s();c();u();Object.defineProperty(gu,"__esModule",{value:!0})});var vu=b(xu=>{"use strict";s();c();u();Object.defineProperty(xu,"__esModule",{value:!0})});var _u=b(wu=>{"use strict";s();c();u();Object.defineProperty(wu,"__esModule",{value:!0})});var Pu=b(Ou=>{"use strict";s();c();u();Object.defineProperty(Ou,"__esModule",{value:!0})});var Iu=b(Tu=>{"use strict";s();c();u();Object.defineProperty(Tu,"__esModule",{value:!0})});var ju=b(Eu=>{"use strict";s();c();u();Object.defineProperty(Eu,"__esModule",{value:!0})});var Su=b(Bu=>{"use strict";s();c();u();Object.defineProperty(Bu,"__esModule",{value:!0})});var Ru=b(Au=>{"use strict";s();c();u();Object.defineProperty(Au,"__esModule",{value:!0})});var Nu=b(Mu=>{"use strict";s();c();u();Object.defineProperty(Mu,"__esModule",{value:!0})});var Lu=b(Fu=>{"use strict";s();c();u();Object.defineProperty(Fu,"__esModule",{value:!0})});var qu=b(Cu=>{"use strict";s();c();u();Object.defineProperty(Cu,"__esModule",{value:!0})});var Du=b(Uu=>{"use strict";s();c();u();Object.defineProperty(Uu,"__esModule",{value:!0})});var Wu=b($u=>{"use strict";s();c();u();Object.defineProperty($u,"__esModule",{value:!0})});var ku=b(Vu=>{"use strict";s();c();u();Object.defineProperty(Vu,"__esModule",{value:!0})});var zu=b(Gu=>{"use strict";s();c();u();Object.defineProperty(Gu,"__esModule",{value:!0})});var Yu=b(Hu=>{"use strict";s();c();u();Object.defineProperty(Hu,"__esModule",{value:!0})});var Ku=b(Ju=>{"use strict";s();c();u();Object.defineProperty(Ju,"__esModule",{value:!0})});var Xu=b(Zu=>{"use strict";s();c();u();Object.defineProperty(Zu,"__esModule",{value:!0})});var ec=b(Qu=>{"use strict";s();c();u();Object.defineProperty(Qu,"__esModule",{value:!0})});var rc=b(tc=>{"use strict";s();c();u();Object.defineProperty(tc,"__esModule",{value:!0})});var ic=b(nc=>{"use strict";s();c();u();Object.defineProperty(nc,"__esModule",{value:!0})});var ac=b(oc=>{"use strict";s();c();u();Object.defineProperty(oc,"__esModule",{value:!0})});var uc=b(sc=>{"use strict";s();c();u();Object.defineProperty(sc,"__esModule",{value:!0})});var lc=b(cc=>{"use strict";s();c();u();Object.defineProperty(cc,"__esModule",{value:!0})});var pc=b(fc=>{"use strict";s();c();u();Object.defineProperty(fc,"__esModule",{value:!0})});var mc=b(dc=>{"use strict";s();c();u();Object.defineProperty(dc,"__esModule",{value:!0})});var yc=b(hc=>{"use strict";s();c();u();Object.defineProperty(hc,"__esModule",{value:!0})});var bc=b(gc=>{"use strict";s();c();u();Object.defineProperty(gc,"__esModule",{value:!0})});var vc=b(xc=>{"use strict";s();c();u();Object.defineProperty(xc,"__esModule",{value:!0})});var _c=b(wc=>{"use strict";s();c();u();Object.defineProperty(wc,"__esModule",{value:!0})});var br=b(I=>{"use strict";s();c();u();var zp=I&&I.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),S=I&&I.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&zp(t,o,e)};Object.defineProperty(I,"__esModule",{value:!0});S(su(),I);S(cu(),I);S(fu(),I);S(pu(),I);S(mu(),I);S(yu(),I);S(bu(),I);S(vu(),I);S(_u(),I);S(Pu(),I);S(Iu(),I);S(ju(),I);S(Su(),I);S(Ru(),I);S(Nu(),I);S(Lu(),I);S(qu(),I);S(Du(),I);S(Wu(),I);S(ku(),I);S(zu(),I);S(Yu(),I);S(Ku(),I);S(Xu(),I);S(ec(),I);S(rc(),I);S(ic(),I);S(ac(),I);S(uc(),I);S(lc(),I);S(pc(),I);S(mc(),I);S(yc(),I);S(bc(),I);S(vc(),I);S(_c(),I)});var Oc=b(He=>{"use strict";s();c();u();var Hp=He&&He.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Yp=He&&He.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Hp(t,o,e)};Object.defineProperty(He,"__esModule",{value:!0});Yp(br(),He)});var Tc=b(se=>{"use strict";s();c();u();var Pc=se&&se.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Jp=se&&se.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Kp=se&&se.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Pc(e,t,r[a]);return Jp(e,t),e}})(),Zp=se&&se.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Pc(t,o,e)};Object.defineProperty(se,"__esModule",{value:!0});se.config=void 0;se.config=Kp(Oc());Zp(br(),se)});var Ic=b(Ye=>{"use strict";s();c();u();var Xp=Ye&&Ye.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Qp=Ye&&Ye.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Xp(t,o,e)};Object.defineProperty(Ye,"__esModule",{value:!0});Qp(Tc(),Ye)});var Ec=b($t=>{"use strict";s();c();u();Object.defineProperty($t,"__esModule",{value:!0});$t.HttpMethod=void 0;$t.HttpMethod={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"}});var xr=b(Je=>{"use strict";s();c();u();var ed=Je&&Je.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),td=Je&&Je.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&ed(t,o,e)};Object.defineProperty(Je,"__esModule",{value:!0});td(Ec(),Je)});var jc=b(Ke=>{"use strict";s();c();u();var rd=Ke&&Ke.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),nd=Ke&&Ke.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&rd(t,o,e)};Object.defineProperty(Ke,"__esModule",{value:!0});nd(xr(),Ke)});var Bc=b(Wt=>{"use strict";s();c();u();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ObjectPropertyAccess=void 0;Wt.ObjectPropertyAccess={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"}});var Sc=b(Vt=>{"use strict";s();c();u();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.PrimitiveTypeV1=void 0;Vt.PrimitiveTypeV1={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER"}});var vr=b(Te=>{"use strict";s();c();u();var id=Te&&Te.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ac=Te&&Te.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&id(t,o,e)};Object.defineProperty(Te,"__esModule",{value:!0});Ac(Bc(),Te);Ac(Sc(),Te)});var Rc=b(Ze=>{"use strict";s();c();u();var od=Ze&&Ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ad=Ze&&Ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&od(t,o,e)};Object.defineProperty(Ze,"__esModule",{value:!0});ad(vr(),Ze)});var Nc=b(q=>{"use strict";s();c();u();var Mc=q&&q.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),sd=q&&q.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),dt=q&&q.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Mc(e,t,r[a]);return sd(e,t),e}})(),kt=q&&q.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Mc(t,o,e)};Object.defineProperty(q,"__esModule",{value:!0});q.types=q.http=q.generatorExec=q.environment=q.dynamic=q.commons=void 0;q.commons=dt(_o());kt(cr(),q);q.dynamic=dt(qs());q.environment=dt(ou());kt(gr(),q);q.generatorExec=dt(Ic());q.http=dt(jc());kt(xr(),q);q.types=dt(Rc());kt(vr(),q)});var Fc=b(Xe=>{"use strict";s();c();u();var ud=Xe&&Xe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),cd=Xe&&Xe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&ud(t,o,e)};Object.defineProperty(Xe,"__esModule",{value:!0});cd(Nc(),Xe)});var dd={};Qt(dd,{DynamicSnippetsGenerator:()=>Jt});module.exports=cl(dd);s();c();u();s();c();u();s();c();u();s();c();u();function U(o){throw new Error("Unexpected value: "+JSON.stringify(o))}s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var dl=typeof global=="object"&&global&&global.Object===Object&&global,ii=dl;var ml=typeof self=="object"&&self&&self.Object===Object&&self,hl=ii||ml||Function("return this")(),oi=hl;var yl=oi.Symbol,be=yl;s();c();u();var ai=Object.prototype,gl=ai.hasOwnProperty,bl=ai.toString,gt=be?be.toStringTag:void 0;function xl(o){var t=gl.call(o,gt),e=o[gt];try{o[gt]=void 0;var r=!0}catch{}var a=bl.call(o);return r&&(t?o[gt]=e:delete o[gt]),a}var si=xl;s();c();u();var vl=Object.prototype,wl=vl.toString;function _l(o){return wl.call(o)}var ui=_l;var Ol="[object Null]",Pl="[object Undefined]",ci=be?be.toStringTag:void 0;function Tl(o){return o==null?o===void 0?Pl:Ol:ci&&ci in Object(o)?si(o):ui(o)}var li=Tl;s();c();u();function Il(o){return o!=null&&typeof o=="object"}var fi=Il;var El="[object Symbol]";function jl(o){return typeof o=="symbol"||fi(o)&&li(o)==El}var pi=jl;s();c();u();s();c();u();function Bl(o,t){for(var e=-1,r=o==null?0:o.length,a=Array(r);++e<r;)a[e]=t(o[e],e,o);return a}var di=Bl;s();c();u();var Sl=Array.isArray,mi=Sl;var Al=1/0,hi=be?be.prototype:void 0,yi=hi?hi.toString:void 0;function gi(o){if(typeof o=="string")return o;if(mi(o))return di(o,gi)+"";if(pi(o))return yi?yi.call(o):"";var t=o+"";return t=="0"&&1/o==-Al?"-0":t}var bi=gi;s();c();u();function Rl(o){return o==null?"":bi(o)}var _e=Rl;s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();function Ml(o,t,e){var r=-1,a=o.length;t<0&&(t=-t>a?0:a+t),e=e>a?a:e,e<0&&(e+=a),a=t>e?0:e-t>>>0,t>>>=0;for(var y=Array(a);++r<a;)y[r]=o[r+t];return y}var xi=Ml;function Nl(o,t,e){var r=o.length;return e=e===void 0?r:e,!t&&e>=r?o:xi(o,t,e)}var vi=Nl;s();c();u();var Fl="\\ud800-\\udfff",Ll="\\u0300-\\u036f",Cl="\\ufe20-\\ufe2f",ql="\\u20d0-\\u20ff",Ul=Ll+Cl+ql,Dl="\\ufe0e\\ufe0f",$l="\\u200d",Wl=RegExp("["+$l+Fl+Ul+Dl+"]");function Vl(o){return Wl.test(o)}var Nt=Vl;s();c();u();s();c();u();function kl(o){return o.split("")}var wi=kl;s();c();u();var _i="\\ud800-\\udfff",Gl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Hl="\\u20d0-\\u20ff",Yl=Gl+zl+Hl,Jl="\\ufe0e\\ufe0f",Kl="["+_i+"]",nr="["+Yl+"]",ir="\\ud83c[\\udffb-\\udfff]",Zl="(?:"+nr+"|"+ir+")",Oi="[^"+_i+"]",Pi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ti="[\\ud800-\\udbff][\\udc00-\\udfff]",Xl="\\u200d",Ii=Zl+"?",Ei="["+Jl+"]?",Ql="(?:"+Xl+"(?:"+[Oi,Pi,Ti].join("|")+")"+Ei+Ii+")*",ef=Ei+Ii+Ql,tf="(?:"+[Oi+nr+"?",nr,Pi,Ti,Kl].join("|")+")",rf=RegExp(ir+"(?="+ir+")|"+tf+ef,"g");function nf(o){return o.match(rf)||[]}var ji=nf;function of(o){return Nt(o)?ji(o):wi(o)}var Bi=of;function af(o){return function(t){t=_e(t);var e=Nt(t)?Bi(t):void 0,r=e?e[0]:t.charAt(0),a=e?vi(e,1).join(""):t.slice(1);return r[o]()+a}}var Si=af;var sf=Si("toUpperCase"),nt=sf;function uf(o){return nt(_e(o).toLowerCase())}var Ai=uf;s();c();u();s();c();u();function cf(o,t,e,r){var a=-1,y=o==null?0:o.length;for(r&&y&&(e=o[++a]);++a<y;)e=t(e,o[a],a,o);return e}var Ri=cf;s();c();u();s();c();u();s();c();u();function lf(o){return function(t){return o?.[t]}}var Mi=lf;var ff={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},pf=Mi(ff),Ni=pf;var df=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mf="\\u0300-\\u036f",hf="\\ufe20-\\ufe2f",yf="\\u20d0-\\u20ff",gf=mf+hf+yf,bf="["+gf+"]",xf=RegExp(bf,"g");function vf(o){return o=_e(o),o&&o.replace(df,Ni).replace(xf,"")}var Fi=vf;s();c();u();s();c();u();var wf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function _f(o){return o.match(wf)||[]}var Li=_f;s();c();u();var Of=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Pf(o){return Of.test(o)}var Ci=Pf;s();c();u();var Wi="\\ud800-\\udfff",Tf="\\u0300-\\u036f",If="\\ufe20-\\ufe2f",Ef="\\u20d0-\\u20ff",jf=Tf+If+Ef,Vi="\\u2700-\\u27bf",ki="a-z\\xdf-\\xf6\\xf8-\\xff",Bf="\\xac\\xb1\\xd7\\xf7",Sf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Af="\\u2000-\\u206f",Rf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gi="A-Z\\xc0-\\xd6\\xd8-\\xde",Mf="\\ufe0e\\ufe0f",zi=Bf+Sf+Af+Rf,Hi="['\u2019]",qi="["+zi+"]",Nf="["+jf+"]",Yi="\\d+",Ff="["+Vi+"]",Ji="["+ki+"]",Ki="[^"+Wi+zi+Yi+Vi+ki+Gi+"]",Lf="\\ud83c[\\udffb-\\udfff]",Cf="(?:"+Nf+"|"+Lf+")",qf="[^"+Wi+"]",Zi="(?:\\ud83c[\\udde6-\\uddff]){2}",Xi="[\\ud800-\\udbff][\\udc00-\\udfff]",it="["+Gi+"]",Uf="\\u200d",Ui="(?:"+Ji+"|"+Ki+")",Df="(?:"+it+"|"+Ki+")",Di="(?:"+Hi+"(?:d|ll|m|re|s|t|ve))?",$i="(?:"+Hi+"(?:D|LL|M|RE|S|T|VE))?",Qi=Cf+"?",eo="["+Mf+"]?",$f="(?:"+Uf+"(?:"+[qf,Zi,Xi].join("|")+")"+eo+Qi+")*",Wf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",kf=eo+Qi+$f,Gf="(?:"+[Ff,Zi,Xi].join("|")+")"+kf,zf=RegExp([it+"?"+Ji+"+"+Di+"(?="+[qi,it,"$"].join("|")+")",Df+"+"+$i+"(?="+[qi,it+Ui,"$"].join("|")+")",it+"?"+Ui+"+"+Di,it+"+"+$i,Vf,Wf,Yi,Gf].join("|"),"g");function Hf(o){return o.match(zf)||[]}var to=Hf;function Yf(o,t,e){return o=_e(o),t=e?void 0:t,t===void 0?Ci(o)?to(o):Li(o):o.match(t)||[]}var ro=Yf;var Jf="['\u2019]",Kf=RegExp(Jf,"g");function Zf(o){return function(t){return Ri(ro(Fi(t).replace(Kf,"")),o,"")}}var no=Zf;var Xf=no(function(o,t,e){return t=t.toLowerCase(),o+(e?Ai(t):t)}),Ft=Xf;s();c();u();function bt(o){return Object.keys(o)}s();c();u();s();c();u();s();c();u();var xt=d.env.FERN_STACK_TRACK?.toLowerCase()??"",de=xt!==""&&xt!=="0"&&xt!=="false",or=["single","multiline","box"].includes(xt)?xt:"single";de&&(Error.stackTraceLimit=50);var Qf=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),ep=new Set(["stacktrace"]);function Ct({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,formatFilename:O=P=>P}={}){if(!de)return[];r=[...r,...Qf],e=[...e,...ep],a=[...a,"runInteractiveTask"];let P=!1;return(new Error().stack??"").split(`
1
+ "use strict";var rl=Object.create;var mt=Object.defineProperty;var nl=Object.getOwnPropertyDescriptor;var il=Object.getOwnPropertyNames;var ol=Object.getPrototypeOf,al=Object.prototype.hasOwnProperty;var sl=(o,t,e)=>t in o?mt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var tt=(o,t)=>()=>(o&&(t=o(o=0)),t);var b=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),Qt=(o,t)=>{for(var e in t)mt(o,e,{get:t[e],enumerable:!0})},Mr=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of il(t))!al.call(o,a)&&a!==e&&mt(o,a,{get:()=>t[a],enumerable:!(r=nl(t,a))||r.enumerable});return o};var ul=(o,t,e)=>(e=o!=null?rl(ol(o)):{},Mr(t||!o||!o.__esModule?mt(e,"default",{value:o,enumerable:!0}):e,o)),cl=o=>Mr(mt({},"__esModule",{value:!0}),o);var w=(o,t,e)=>sl(o,typeof t!="symbol"?t+"":t,e);var s=tt(()=>{"use strict"});var d={};Qt(d,{_debugEnd:()=>On,_debugProcess:()=>_n,_events:()=>Un,_eventsCount:()=>Dn,_exiting:()=>rn,_fatalExceptions:()=>bn,_getActiveHandles:()=>sn,_getActiveRequests:()=>an,_kill:()=>cn,_linkedBinding:()=>en,_maxListeners:()=>qn,_preload_modules:()=>Fn,_rawDebug:()=>Xr,_startProfilerIdleNotifier:()=>Pn,_stopProfilerIdleNotifier:()=>Tn,_tickCallback:()=>wn,abort:()=>Bn,addListener:()=>$n,allowedNodeEnvironmentFlags:()=>hn,arch:()=>qr,argv:()=>$r,argv0:()=>Nn,assert:()=>yn,binding:()=>zr,browser:()=>Zr,chdir:()=>Jr,config:()=>nn,cpuUsage:()=>Rt,cwd:()=>Yr,debugPort:()=>Mn,default:()=>Kn,dlopen:()=>on,domain:()=>tn,emit:()=>zn,emitWarning:()=>Gr,env:()=>Dr,execArgv:()=>Wr,execPath:()=>Rn,exit:()=>dn,features:()=>gn,hasUncaughtExceptionCaptureCallback:()=>vn,hrtime:()=>At,kill:()=>pn,listeners:()=>Jn,memoryUsage:()=>fn,moduleLoadList:()=>Qr,nextTick:()=>Fr,off:()=>Vn,on:()=>ge,once:()=>Wn,openStdin:()=>mn,pid:()=>Sn,platform:()=>Ur,ppid:()=>An,prependListener:()=>Hn,prependOnceListener:()=>Yn,reallyExit:()=>un,release:()=>Kr,removeAllListeners:()=>Gn,removeListener:()=>kn,resourceUsage:()=>ln,setSourceMapsEnabled:()=>Ln,setUncaughtExceptionCaptureCallback:()=>xn,stderr:()=>En,stdin:()=>jn,stdout:()=>In,title:()=>Cr,umask:()=>Hr,uptime:()=>Cn,version:()=>Vr,versions:()=>kr});function rr(o){throw new Error("Node.js process "+o+" is not supported by JSPM core outside of Node.js")}function ll(){!rt||!Ie||(rt=!1,Ie.length?ye=Ie.concat(ye):St=-1,ye.length&&Nr())}function Nr(){if(!rt){var o=setTimeout(ll,0);rt=!0;for(var t=ye.length;t;){for(Ie=ye,ye=[];++St<t;)Ie&&Ie[St].run();St=-1,t=ye.length}Ie=null,rt=!1,clearTimeout(o)}}function Fr(o){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];ye.push(new Lr(o,t)),ye.length===1&&!rt&&setTimeout(Nr,0)}function Lr(o,t){this.fun=o,this.array=t}function J(){}function en(o){rr("_linkedBinding")}function on(o){rr("dlopen")}function an(){return[]}function sn(){return[]}function yn(o,t){if(!o)throw new Error(t||"assertion error")}function vn(){return!1}function Cn(){return we.now()/1e3}function At(o){var t=Math.floor((Date.now()-we.now())*.001),e=we.now()*.001,r=Math.floor(e)+t,a=Math.floor(e%1*1e9);return o&&(r=r-o[0],a=a-o[1],a<0&&(r--,a+=tr)),[r,a]}function ge(){return Kn}function Jn(o){return[]}var ye,rt,Ie,St,Cr,qr,Ur,Dr,$r,Wr,Vr,kr,Gr,zr,Hr,Yr,Jr,Kr,Zr,Xr,Qr,tn,rn,nn,un,cn,Rt,ln,fn,pn,dn,mn,hn,gn,bn,xn,wn,_n,On,Pn,Tn,In,En,jn,Bn,Sn,An,Rn,Mn,Nn,Fn,Ln,we,er,tr,qn,Un,Dn,$n,Wn,Vn,kn,Gn,zn,Hn,Yn,Kn,Zn=tt(()=>{"use strict";s();c();u();ye=[],rt=!1,St=-1;Lr.prototype.run=function(){this.fun.apply(null,this.array)};Cr="browser",qr="x64",Ur="browser",Dr={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},$r=["/usr/bin/node"],Wr=[],Vr="v16.8.0",kr={},Gr=function(o,t){console.warn((t?t+": ":"")+o)},zr=function(o){rr("binding")},Hr=function(o){return 0},Yr=function(){return"/"},Jr=function(o){},Kr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Zr=!0,Xr=J,Qr=[];tn={},rn=!1,nn={};un=J,cn=J,Rt=function(){return{}},ln=Rt,fn=Rt,pn=J,dn=J,mn=J,hn={};gn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},bn=J,xn=J;wn=J,_n=J,On=J,Pn=J,Tn=J,In=void 0,En=void 0,jn=void 0,Bn=J,Sn=2,An=1,Rn="/bin/usr/node",Mn=9229,Nn="node",Fn=[],Ln=J,we={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};we.now===void 0&&(er=Date.now(),we.timing&&we.timing.navigationStart&&(er=we.timing.navigationStart),we.now=()=>Date.now()-er);tr=1e9;At.bigint=function(o){var t=At(o);return typeof BigInt>"u"?t[0]*tr+t[1]:BigInt(t[0]*tr)+BigInt(t[1])};qn=10,Un={},Dn=0;$n=ge,Wn=ge,Vn=ge,kn=ge,Gn=ge,zn=J,Hn=ge,Yn=ge;Kn={version:Vr,versions:kr,arch:qr,platform:Ur,browser:Zr,release:Kr,_rawDebug:Xr,moduleLoadList:Qr,binding:zr,_linkedBinding:en,_events:Un,_eventsCount:Dn,_maxListeners:qn,on:ge,addListener:$n,once:Wn,off:Vn,removeListener:kn,removeAllListeners:Gn,emit:zn,prependListener:Hn,prependOnceListener:Yn,listeners:Jn,domain:tn,_exiting:rn,config:nn,dlopen:on,uptime:Cn,_getActiveRequests:an,_getActiveHandles:sn,reallyExit:un,_kill:cn,cpuUsage:Rt,resourceUsage:ln,memoryUsage:fn,kill:pn,exit:dn,openStdin:mn,allowedNodeEnvironmentFlags:hn,assert:yn,features:gn,_fatalExceptions:bn,setUncaughtExceptionCaptureCallback:xn,hasUncaughtExceptionCaptureCallback:vn,emitWarning:Gr,nextTick:Fr,_tickCallback:wn,_debugProcess:_n,_debugEnd:On,_startProfilerIdleNotifier:Pn,_stopProfilerIdleNotifier:Tn,stdout:In,stdin:jn,stderr:En,abort:Bn,umask:Hr,chdir:Jr,cwd:Yr,env:Dr,title:Cr,argv:$r,execArgv:Wr,pid:Sn,ppid:An,execPath:Rn,debugPort:Mn,hrtime:At,argv0:Nn,_preload_modules:Fn,setSourceMapsEnabled:Ln}});var u=tt(()=>{"use strict";Zn()});function fl(){if(Xn)return ht;Xn=!0,ht.byteLength=O,ht.toByteArray=M,ht.fromByteArray=X;for(var o=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,y=r.length;a<y;++a)o[a]=r[a],t[r.charCodeAt(a)]=a;t[45]=62,t[95]=63;function p(T){var E=T.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=T.indexOf("=");N===-1&&(N=E);var G=N===E?0:4-N%4;return[N,G]}function O(T){var E=p(T),N=E[0],G=E[1];return(N+G)*3/4-G}function P(T,E,N){return(E+N)*3/4-N}function M(T){var E,N=p(T),G=N[0],ee=N[1],V=new e(P(T,G,ee)),te=0,ie=ee>0?G-4:G,Q;for(Q=0;Q<ie;Q+=4)E=t[T.charCodeAt(Q)]<<18|t[T.charCodeAt(Q+1)]<<12|t[T.charCodeAt(Q+2)]<<6|t[T.charCodeAt(Q+3)],V[te++]=E>>16&255,V[te++]=E>>8&255,V[te++]=E&255;return ee===2&&(E=t[T.charCodeAt(Q)]<<2|t[T.charCodeAt(Q+1)]>>4,V[te++]=E&255),ee===1&&(E=t[T.charCodeAt(Q)]<<10|t[T.charCodeAt(Q+1)]<<4|t[T.charCodeAt(Q+2)]>>2,V[te++]=E>>8&255,V[te++]=E&255),V}function j(T){return o[T>>18&63]+o[T>>12&63]+o[T>>6&63]+o[T&63]}function C(T,E,N){for(var G,ee=[],V=E;V<N;V+=3)G=(T[V]<<16&16711680)+(T[V+1]<<8&65280)+(T[V+2]&255),ee.push(j(G));return ee.join("")}function X(T){for(var E,N=T.length,G=N%3,ee=[],V=16383,te=0,ie=N-G;te<ie;te+=V)ee.push(C(T,te,te+V>ie?ie:te+V));return G===1?(E=T[N-1],ee.push(o[E>>2]+o[E<<4&63]+"==")):G===2&&(E=(T[N-2]<<8)+T[N-1],ee.push(o[E>>10]+o[E>>4&63]+o[E<<2&63]+"=")),ee.join("")}return ht}function pl(){if(Qn)return Mt;Qn=!0;return Mt.read=function(o,t,e,r,a){var y,p,O=a*8-r-1,P=(1<<O)-1,M=P>>1,j=-7,C=e?a-1:0,X=e?-1:1,T=o[t+C];for(C+=X,y=T&(1<<-j)-1,T>>=-j,j+=O;j>0;y=y*256+o[t+C],C+=X,j-=8);for(p=y&(1<<-j)-1,y>>=-j,j+=r;j>0;p=p*256+o[t+C],C+=X,j-=8);if(y===0)y=1-M;else{if(y===P)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,r),y=y-M}return(T?-1:1)*p*Math.pow(2,y-r)},Mt.write=function(o,t,e,r,a,y){var p,O,P,M=y*8-a-1,j=(1<<M)-1,C=j>>1,X=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=r?0:y-1,E=r?1:-1,N=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(O=isNaN(t)?1:0,p=j):(p=Math.floor(Math.log(t)/Math.LN2),t*(P=Math.pow(2,-p))<1&&(p--,P*=2),p+C>=1?t+=X/P:t+=X*Math.pow(2,1-C),t*P>=2&&(p++,P/=2),p+C>=j?(O=0,p=j):p+C>=1?(O=(t*P-1)*Math.pow(2,a),p=p+C):(O=t*Math.pow(2,C-1)*Math.pow(2,a),p=0));a>=8;o[e+T]=O&255,T+=E,O/=256,a-=8);for(p=p<<a|O,M+=a;M>0;o[e+T]=p&255,T+=E,p/=256,M-=8);o[e+T-E]|=N*128},Mt}function ti(){if(ei)return Ee;ei=!0;let o=fl(),t=pl(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ee.Buffer=p,Ee.SlowBuffer=ee,Ee.INSPECT_MAX_BYTES=50;let r=2147483647;Ee.kMaxLength=r,p.TYPED_ARRAY_SUPPORT=a(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let l=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(l,n),l.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function y(l){if(l>r)throw new RangeError('The value "'+l+'" is invalid for option "size"');let n=new Uint8Array(l);return Object.setPrototypeOf(n,p.prototype),n}function p(l,n,i){if(typeof l=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(l)}return O(l,n,i)}p.poolSize=8192;function O(l,n,i){if(typeof l=="string")return C(l,n);if(ArrayBuffer.isView(l))return T(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(pe(l,ArrayBuffer)||l&&pe(l.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(l,SharedArrayBuffer)||l&&pe(l.buffer,SharedArrayBuffer)))return E(l,n,i);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let f=l.valueOf&&l.valueOf();if(f!=null&&f!==l)return p.from(f,n,i);let g=N(l);if(g)return g;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return p.from(l[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}p.from=function(l,n,i){return O(l,n,i)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function P(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function M(l,n,i){return P(l),l<=0?y(l):n!==void 0?typeof i=="string"?y(l).fill(n,i):y(l).fill(n):y(l)}p.alloc=function(l,n,i){return M(l,n,i)};function j(l){return P(l),y(l<0?0:G(l)|0)}p.allocUnsafe=function(l){return j(l)},p.allocUnsafeSlow=function(l){return j(l)};function C(l,n){if((typeof n!="string"||n==="")&&(n="utf8"),!p.isEncoding(n))throw new TypeError("Unknown encoding: "+n);let i=V(l,n)|0,f=y(i),g=f.write(l,n);return g!==i&&(f=f.slice(0,g)),f}function X(l){let n=l.length<0?0:G(l.length)|0,i=y(n);for(let f=0;f<n;f+=1)i[f]=l[f]&255;return i}function T(l){if(pe(l,Uint8Array)){let n=new Uint8Array(l);return E(n.buffer,n.byteOffset,n.byteLength)}return X(l)}function E(l,n,i){if(n<0||l.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');let f;return n===void 0&&i===void 0?f=new Uint8Array(l):i===void 0?f=new Uint8Array(l,n):f=new Uint8Array(l,n,i),Object.setPrototypeOf(f,p.prototype),f}function N(l){if(p.isBuffer(l)){let n=G(l.length)|0,i=y(n);return i.length===0||l.copy(i,0,0,n),i}if(l.length!==void 0)return typeof l.length!="number"||Xt(l.length)?y(0):X(l);if(l.type==="Buffer"&&Array.isArray(l.data))return X(l.data)}function G(l){if(l>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return l|0}function ee(l){return+l!=l&&(l=0),p.alloc(+l)}p.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==p.prototype},p.compare=function(n,i){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),pe(i,Uint8Array)&&(i=p.from(i,i.offset,i.byteLength)),!p.isBuffer(n)||!p.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===i)return 0;let f=n.length,g=i.length;for(let x=0,v=Math.min(f,g);x<v;++x)if(n[x]!==i[x]){f=n[x],g=i[x];break}return f<g?-1:g<f?1:0},p.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(n,i){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return p.alloc(0);let f;if(i===void 0)for(i=0,f=0;f<n.length;++f)i+=n[f].length;let g=p.allocUnsafe(i),x=0;for(f=0;f<n.length;++f){let v=n[f];if(pe(v,Uint8Array))x+v.length>g.length?(p.isBuffer(v)||(v=p.from(v)),v.copy(g,x)):Uint8Array.prototype.set.call(g,v,x);else if(p.isBuffer(v))v.copy(g,x);else throw new TypeError('"list" argument must be an Array of Buffers');x+=v.length}return g};function V(l,n){if(p.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||pe(l,ArrayBuffer))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);let i=l.length,f=arguments.length>2&&arguments[2]===!0;if(!f&&i===0)return 0;let g=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return Zt(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i*2;case"hex":return i>>>1;case"base64":return Rr(l).length;default:if(g)return f?-1:Zt(l).length;n=(""+n).toLowerCase(),g=!0}}p.byteLength=V;function te(l,n,i){let f=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((i===void 0||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,n>>>=0,i<=n))return"";for(l||(l="utf8");;)switch(l){case"hex":return Hc(this,n,i);case"utf8":case"utf-8":return Or(this,n,i);case"ascii":return Gc(this,n,i);case"latin1":case"binary":return zc(this,n,i);case"base64":return Vc(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yc(this,n,i);default:if(f)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),f=!0}}p.prototype._isBuffer=!0;function ie(l,n,i){let f=l[n];l[n]=l[i],l[i]=f}p.prototype.swap16=function(){let n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;i<n;i+=2)ie(this,i,i+1);return this},p.prototype.swap32=function(){let n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let i=0;i<n;i+=4)ie(this,i,i+3),ie(this,i+1,i+2);return this},p.prototype.swap64=function(){let n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let i=0;i<n;i+=8)ie(this,i,i+7),ie(this,i+1,i+6),ie(this,i+2,i+5),ie(this,i+3,i+4);return this},p.prototype.toString=function(){let n=this.length;return n===0?"":arguments.length===0?Or(this,0,n):te.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(n){if(!p.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:p.compare(this,n)===0},p.prototype.inspect=function(){let n="",i=Ee.INSPECT_MAX_BYTES;return n=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(n+=" ... "),"<Buffer "+n+">"},e&&(p.prototype[e]=p.prototype.inspect),p.prototype.compare=function(n,i,f,g,x){if(pe(n,Uint8Array)&&(n=p.from(n,n.offset,n.byteLength)),!p.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(i===void 0&&(i=0),f===void 0&&(f=n?n.length:0),g===void 0&&(g=0),x===void 0&&(x=this.length),i<0||f>n.length||g<0||x>this.length)throw new RangeError("out of range index");if(g>=x&&i>=f)return 0;if(g>=x)return-1;if(i>=f)return 1;if(i>>>=0,f>>>=0,g>>>=0,x>>>=0,this===n)return 0;let v=x-g,B=f-i,$=Math.min(v,B),D=this.slice(g,x),W=n.slice(i,f);for(let F=0;F<$;++F)if(D[F]!==W[F]){v=D[F],B=W[F];break}return v<B?-1:B<v?1:0};function Q(l,n,i,f,g){if(l.length===0)return-1;if(typeof i=="string"?(f=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,Xt(i)&&(i=g?0:l.length-1),i<0&&(i=l.length+i),i>=l.length){if(g)return-1;i=l.length-1}else if(i<0)if(g)i=0;else return-1;if(typeof n=="string"&&(n=p.from(n,f)),p.isBuffer(n))return n.length===0?-1:_r(l,n,i,f,g);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?g?Uint8Array.prototype.indexOf.call(l,n,i):Uint8Array.prototype.lastIndexOf.call(l,n,i):_r(l,[n],i,f,g);throw new TypeError("val must be string, number or Buffer")}function _r(l,n,i,f,g){let x=1,v=l.length,B=n.length;if(f!==void 0&&(f=String(f).toLowerCase(),f==="ucs2"||f==="ucs-2"||f==="utf16le"||f==="utf-16le")){if(l.length<2||n.length<2)return-1;x=2,v/=2,B/=2,i/=2}function $(W,F){return x===1?W[F]:W.readUInt16BE(F*x)}let D;if(g){let W=-1;for(D=i;D<v;D++)if($(l,D)===$(n,W===-1?0:D-W)){if(W===-1&&(W=D),D-W+1===B)return W*x}else W!==-1&&(D-=D-W),W=-1}else for(i+B>v&&(i=v-B),D=i;D>=0;D--){let W=!0;for(let F=0;F<B;F++)if($(l,D+F)!==$(n,F)){W=!1;break}if(W)return D}return-1}p.prototype.includes=function(n,i,f){return this.indexOf(n,i,f)!==-1},p.prototype.indexOf=function(n,i,f){return Q(this,n,i,f,!0)},p.prototype.lastIndexOf=function(n,i,f){return Q(this,n,i,f,!1)};function qc(l,n,i,f){i=Number(i)||0;let g=l.length-i;f?(f=Number(f),f>g&&(f=g)):f=g;let x=n.length;f>x/2&&(f=x/2);let v;for(v=0;v<f;++v){let B=parseInt(n.substr(v*2,2),16);if(Xt(B))return v;l[i+v]=B}return v}function Uc(l,n,i,f){return Bt(Zt(n,l.length-i),l,i,f)}function Dc(l,n,i,f){return Bt(Xc(n),l,i,f)}function $c(l,n,i,f){return Bt(Rr(n),l,i,f)}function Wc(l,n,i,f){return Bt(Qc(n,l.length-i),l,i,f)}p.prototype.write=function(n,i,f,g){if(i===void 0)g="utf8",f=this.length,i=0;else if(f===void 0&&typeof i=="string")g=i,f=this.length,i=0;else if(isFinite(i))i=i>>>0,isFinite(f)?(f=f>>>0,g===void 0&&(g="utf8")):(g=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let x=this.length-i;if((f===void 0||f>x)&&(f=x),n.length>0&&(f<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");let v=!1;for(;;)switch(g){case"hex":return qc(this,n,i,f);case"utf8":case"utf-8":return Uc(this,n,i,f);case"ascii":case"latin1":case"binary":return Dc(this,n,i,f);case"base64":return $c(this,n,i,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wc(this,n,i,f);default:if(v)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),v=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Vc(l,n,i){return n===0&&i===l.length?o.fromByteArray(l):o.fromByteArray(l.slice(n,i))}function Or(l,n,i){i=Math.min(l.length,i);let f=[],g=n;for(;g<i;){let x=l[g],v=null,B=x>239?4:x>223?3:x>191?2:1;if(g+B<=i){let $,D,W,F;switch(B){case 1:x<128&&(v=x);break;case 2:$=l[g+1],($&192)===128&&(F=(x&31)<<6|$&63,F>127&&(v=F));break;case 3:$=l[g+1],D=l[g+2],($&192)===128&&(D&192)===128&&(F=(x&15)<<12|($&63)<<6|D&63,F>2047&&(F<55296||F>57343)&&(v=F));break;case 4:$=l[g+1],D=l[g+2],W=l[g+3],($&192)===128&&(D&192)===128&&(W&192)===128&&(F=(x&15)<<18|($&63)<<12|(D&63)<<6|W&63,F>65535&&F<1114112&&(v=F))}}v===null?(v=65533,B=1):v>65535&&(v-=65536,f.push(v>>>10&1023|55296),v=56320|v&1023),f.push(v),g+=B}return kc(f)}let Pr=4096;function kc(l){let n=l.length;if(n<=Pr)return String.fromCharCode.apply(String,l);let i="",f=0;for(;f<n;)i+=String.fromCharCode.apply(String,l.slice(f,f+=Pr));return i}function Gc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]&127);return f}function zc(l,n,i){let f="";i=Math.min(l.length,i);for(let g=n;g<i;++g)f+=String.fromCharCode(l[g]);return f}function Hc(l,n,i){let f=l.length;(!n||n<0)&&(n=0),(!i||i<0||i>f)&&(i=f);let g="";for(let x=n;x<i;++x)g+=el[l[x]];return g}function Yc(l,n,i){let f=l.slice(n,i),g="";for(let x=0;x<f.length-1;x+=2)g+=String.fromCharCode(f[x]+f[x+1]*256);return g}p.prototype.slice=function(n,i){let f=this.length;n=~~n,i=i===void 0?f:~~i,n<0?(n+=f,n<0&&(n=0)):n>f&&(n=f),i<0?(i+=f,i<0&&(i=0)):i>f&&(i=f),i<n&&(i=n);let g=this.subarray(n,i);return Object.setPrototypeOf(g,p.prototype),g};function H(l,n,i){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+n>i)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return g},p.prototype.readUintBE=p.prototype.readUIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n+--i],x=1;for(;i>0&&(x*=256);)g+=this[n+--i]*x;return g},p.prototype.readUint8=p.prototype.readUInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]|this[n+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(n,i){return n=n>>>0,i||H(n,2,this.length),this[n]<<8|this[n+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},p.prototype.readBigUInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,x=this[++n]+this[++n]*2**8+this[++n]*2**16+f*2**24;return BigInt(g)+(BigInt(x)<<BigInt(32))}),p.prototype.readBigUInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=i*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],x=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f;return(BigInt(g)<<BigInt(32))+BigInt(x)}),p.prototype.readIntLE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=this[n],x=1,v=0;for(;++v<i&&(x*=256);)g+=this[n+v]*x;return x*=128,g>=x&&(g-=Math.pow(2,8*i)),g},p.prototype.readIntBE=function(n,i,f){n=n>>>0,i=i>>>0,f||H(n,i,this.length);let g=i,x=1,v=this[n+--g];for(;g>0&&(x*=256);)v+=this[n+--g]*x;return x*=128,v>=x&&(v-=Math.pow(2,8*i)),v},p.prototype.readInt8=function(n,i){return n=n>>>0,i||H(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},p.prototype.readInt16LE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n]|this[n+1]<<8;return f&32768?f|4294901760:f},p.prototype.readInt16BE=function(n,i){n=n>>>0,i||H(n,2,this.length);let f=this[n+1]|this[n]<<8;return f&32768?f|4294901760:f},p.prototype.readInt32LE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},p.prototype.readInt32BE=function(n,i){return n=n>>>0,i||H(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},p.prototype.readBigInt64LE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(f<<24);return(BigInt(g)<<BigInt(32))+BigInt(i+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),p.prototype.readBigInt64BE=ve(function(n){n=n>>>0,et(n,"offset");let i=this[n],f=this[n+7];(i===void 0||f===void 0)&&dt(n,this.length-8);let g=(i<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(g)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+f)}),p.prototype.readFloatLE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!0,23,4)},p.prototype.readFloatBE=function(n,i){return n=n>>>0,i||H(n,4,this.length),t.read(this,n,!1,23,4)},p.prototype.readDoubleLE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!0,52,8)},p.prototype.readDoubleBE=function(n,i){return n=n>>>0,i||H(n,8,this.length),t.read(this,n,!1,52,8)};function re(l,n,i,f,g,x){if(!p.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>g||n<x)throw new RangeError('"value" argument is out of bounds');if(i+f>l.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=1,v=0;for(this[i]=n&255;++v<f&&(x*=256);)this[i+v]=n/x&255;return i+f},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,f=f>>>0,!g){let B=Math.pow(2,8*f)-1;re(this,n,i,f,B,0)}let x=f-1,v=1;for(this[i+x]=n&255;--x>=0&&(v*=256);)this[i+x]=n/v&255;return i+f},p.prototype.writeUint8=p.prototype.writeUInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,255,0),this[i]=n&255,i+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,65535,0),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i+3]=n>>>24,this[i+2]=n>>>16,this[i+1]=n>>>8,this[i]=n&255,i+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,4294967295,0),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4};function Tr(l,n,i,f,g){Ar(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x,x=x>>8,l[i++]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,v=v>>8,l[i++]=v,i}function Ir(l,n,i,f,g){Ar(n,f,g,l,i,7);let x=Number(n&BigInt(4294967295));l[i+7]=x,x=x>>8,l[i+6]=x,x=x>>8,l[i+5]=x,x=x>>8,l[i+4]=x;let v=Number(n>>BigInt(32)&BigInt(4294967295));return l[i+3]=v,v=v>>8,l[i+2]=v,v=v>>8,l[i+1]=v,v=v>>8,l[i]=v,i+8}p.prototype.writeBigUInt64LE=ve(function(n,i=0){return Tr(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ve(function(n,i=0){return Ir(this,n,i,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=0,v=1,B=0;for(this[i]=n&255;++x<f&&(v*=256);)n<0&&B===0&&this[i+x-1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeIntBE=function(n,i,f,g){if(n=+n,i=i>>>0,!g){let $=Math.pow(2,8*f-1);re(this,n,i,f,$-1,-$)}let x=f-1,v=1,B=0;for(this[i+x]=n&255;--x>=0&&(v*=256);)n<0&&B===0&&this[i+x+1]!==0&&(B=1),this[i+x]=(n/v>>0)-B&255;return i+f},p.prototype.writeInt8=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,1,127,-128),n<0&&(n=255+n+1),this[i]=n&255,i+1},p.prototype.writeInt16LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n&255,this[i+1]=n>>>8,i+2},p.prototype.writeInt16BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,2,32767,-32768),this[i]=n>>>8,this[i+1]=n&255,i+2},p.prototype.writeInt32LE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),this[i]=n&255,this[i+1]=n>>>8,this[i+2]=n>>>16,this[i+3]=n>>>24,i+4},p.prototype.writeInt32BE=function(n,i,f){return n=+n,i=i>>>0,f||re(this,n,i,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[i]=n>>>24,this[i+1]=n>>>16,this[i+2]=n>>>8,this[i+3]=n&255,i+4},p.prototype.writeBigInt64LE=ve(function(n,i=0){return Tr(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ve(function(n,i=0){return Ir(this,n,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Er(l,n,i,f,g,x){if(i+f>l.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function jr(l,n,i,f,g){return n=+n,i=i>>>0,g||Er(l,n,i,4),t.write(l,n,i,f,23,4),i+4}p.prototype.writeFloatLE=function(n,i,f){return jr(this,n,i,!0,f)},p.prototype.writeFloatBE=function(n,i,f){return jr(this,n,i,!1,f)};function Br(l,n,i,f,g){return n=+n,i=i>>>0,g||Er(l,n,i,8),t.write(l,n,i,f,52,8),i+8}p.prototype.writeDoubleLE=function(n,i,f){return Br(this,n,i,!0,f)},p.prototype.writeDoubleBE=function(n,i,f){return Br(this,n,i,!1,f)},p.prototype.copy=function(n,i,f,g){if(!p.isBuffer(n))throw new TypeError("argument should be a Buffer");if(f||(f=0),!g&&g!==0&&(g=this.length),i>=n.length&&(i=n.length),i||(i=0),g>0&&g<f&&(g=f),g===f||n.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),n.length-i<g-f&&(g=n.length-i+f);let x=g-f;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(i,f,g):Uint8Array.prototype.set.call(n,this.subarray(f,g),i),x},p.prototype.fill=function(n,i,f,g){if(typeof n=="string"){if(typeof i=="string"?(g=i,i=0,f=this.length):typeof f=="string"&&(g=f,f=this.length),g!==void 0&&typeof g!="string")throw new TypeError("encoding must be a string");if(typeof g=="string"&&!p.isEncoding(g))throw new TypeError("Unknown encoding: "+g);if(n.length===1){let v=n.charCodeAt(0);(g==="utf8"&&v<128||g==="latin1")&&(n=v)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(i<0||this.length<i||this.length<f)throw new RangeError("Out of range index");if(f<=i)return this;i=i>>>0,f=f===void 0?this.length:f>>>0,n||(n=0);let x;if(typeof n=="number")for(x=i;x<f;++x)this[x]=n;else{let v=p.isBuffer(n)?n:p.from(n,g),B=v.length;if(B===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(x=0;x<f-i;++x)this[x+i]=v[x%B]}return this};let Qe={};function Kt(l,n,i){Qe[l]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${l}]`,this.stack,delete this.name}get code(){return l}set code(g){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:g,writable:!0})}toString(){return`${this.name} [${l}]: ${this.message}`}}}Kt("ERR_BUFFER_OUT_OF_BOUNDS",function(l){return l?`${l} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Kt("ERR_INVALID_ARG_TYPE",function(l,n){return`The "${l}" argument must be of type number. Received type ${typeof n}`},TypeError),Kt("ERR_OUT_OF_RANGE",function(l,n,i){let f=`The value of "${l}" is out of range.`,g=i;return Number.isInteger(i)&&Math.abs(i)>2**32?g=Sr(String(i)):typeof i=="bigint"&&(g=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(g=Sr(g)),g+="n"),f+=` It must be ${n}. Received ${g}`,f},RangeError);function Sr(l){let n="",i=l.length,f=l[0]==="-"?1:0;for(;i>=f+4;i-=3)n=`_${l.slice(i-3,i)}${n}`;return`${l.slice(0,i)}${n}`}function Jc(l,n,i){et(n,"offset"),(l[n]===void 0||l[n+i]===void 0)&&dt(n,l.length-(i+1))}function Ar(l,n,i,f,g,x){if(l>i||l<n){let v=typeof n=="bigint"?"n":"",B;throw n===0||n===BigInt(0)?B=`>= 0${v} and < 2${v} ** ${(x+1)*8}${v}`:B=`>= -(2${v} ** ${(x+1)*8-1}${v}) and < 2 ** ${(x+1)*8-1}${v}`,new Qe.ERR_OUT_OF_RANGE("value",B,l)}Jc(f,g,x)}function et(l,n){if(typeof l!="number")throw new Qe.ERR_INVALID_ARG_TYPE(n,"number",l)}function dt(l,n,i){throw Math.floor(l)!==l?(et(l,i),new Qe.ERR_OUT_OF_RANGE("offset","an integer",l)):n<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,l)}let Kc=/[^+/0-9A-Za-z-_]/g;function Zc(l){if(l=l.split("=")[0],l=l.trim().replace(Kc,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function Zt(l,n){n=n||1/0;let i,f=l.length,g=null,x=[];for(let v=0;v<f;++v){if(i=l.charCodeAt(v),i>55295&&i<57344){if(!g){if(i>56319){(n-=3)>-1&&x.push(239,191,189);continue}else if(v+1===f){(n-=3)>-1&&x.push(239,191,189);continue}g=i;continue}if(i<56320){(n-=3)>-1&&x.push(239,191,189),g=i;continue}i=(g-55296<<10|i-56320)+65536}else g&&(n-=3)>-1&&x.push(239,191,189);if(g=null,i<128){if((n-=1)<0)break;x.push(i)}else if(i<2048){if((n-=2)<0)break;x.push(i>>6|192,i&63|128)}else if(i<65536){if((n-=3)<0)break;x.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((n-=4)<0)break;x.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return x}function Xc(l){let n=[];for(let i=0;i<l.length;++i)n.push(l.charCodeAt(i)&255);return n}function Qc(l,n){let i,f,g,x=[];for(let v=0;v<l.length&&!((n-=2)<0);++v)i=l.charCodeAt(v),f=i>>8,g=i%256,x.push(g),x.push(f);return x}function Rr(l){return o.toByteArray(Zc(l))}function Bt(l,n,i,f){let g;for(g=0;g<f&&!(g+i>=n.length||g>=l.length);++g)n[g+i]=l[g];return g}function pe(l,n){return l instanceof n||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===n.name}function Xt(l){return l!==l}let el=(function(){let l="0123456789abcdef",n=new Array(256);for(let i=0;i<16;++i){let f=i*16;for(let g=0;g<16;++g)n[f+g]=l[i]+l[g]}return n})();function ve(l){return typeof BigInt>"u"?tl:l}function tl(){throw new Error("BigInt not supported")}return Ee}var ht,Xn,Mt,Qn,Ee,ei,ri=tt(()=>{"use strict";s();c();u();ht={},Xn=!1;Mt={},Qn=!1;Ee={},ei=!1});var je,m,Id,Ed,ni=tt(()=>{"use strict";s();c();u();ri();je=ti();je.Buffer;je.SlowBuffer;je.INSPECT_MAX_BYTES;je.kMaxLength;m=je.Buffer,Id=je.INSPECT_MAX_BYTES,Ed=je.kMaxLength});var c=tt(()=>{"use strict";ni()});var uo=b(so=>{"use strict";s();c();u();Object.defineProperty(so,"__esModule",{value:!0})});var lo=b(co=>{"use strict";s();c();u();Object.defineProperty(co,"__esModule",{value:!0})});var po=b(fo=>{"use strict";s();c();u();Object.defineProperty(fo,"__esModule",{value:!0})});var ho=b(mo=>{"use strict";s();c();u();Object.defineProperty(mo,"__esModule",{value:!0})});var go=b(yo=>{"use strict";s();c();u();Object.defineProperty(yo,"__esModule",{value:!0})});var xo=b(bo=>{"use strict";s();c();u();Object.defineProperty(bo,"__esModule",{value:!0})});var wo=b(vo=>{"use strict";s();c();u();Object.defineProperty(vo,"__esModule",{value:!0})});var cr=b(oe=>{"use strict";s();c();u();var hp=oe&&oe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Me=oe&&oe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&hp(t,o,e)};Object.defineProperty(oe,"__esModule",{value:!0});Me(uo(),oe);Me(lo(),oe);Me(po(),oe);Me(ho(),oe);Me(go(),oe);Me(xo(),oe);Me(wo(),oe)});var _o=b(Ne=>{"use strict";s();c();u();var yp=Ne&&Ne.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),gp=Ne&&Ne.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&yp(t,o,e)};Object.defineProperty(Ne,"__esModule",{value:!0});gp(cr(),Ne)});var Po=b(Oo=>{"use strict";s();c();u();Object.defineProperty(Oo,"__esModule",{value:!0})});var Io=b(To=>{"use strict";s();c();u();Object.defineProperty(To,"__esModule",{value:!0})});var jo=b(Eo=>{"use strict";s();c();u();Object.defineProperty(Eo,"__esModule",{value:!0})});var So=b(Bo=>{"use strict";s();c();u();Object.defineProperty(Bo,"__esModule",{value:!0})});var Ro=b(Ao=>{"use strict";s();c();u();Object.defineProperty(Ao,"__esModule",{value:!0})});var No=b(Mo=>{"use strict";s();c();u();Object.defineProperty(Mo,"__esModule",{value:!0})});var Lo=b(Fo=>{"use strict";s();c();u();Object.defineProperty(Fo,"__esModule",{value:!0})});var qo=b(Co=>{"use strict";s();c();u();Object.defineProperty(Co,"__esModule",{value:!0})});var Do=b(Uo=>{"use strict";s();c();u();Object.defineProperty(Uo,"__esModule",{value:!0})});var Wo=b($o=>{"use strict";s();c();u();Object.defineProperty($o,"__esModule",{value:!0})});var ko=b(Vo=>{"use strict";s();c();u();Object.defineProperty(Vo,"__esModule",{value:!0})});var zo=b(Go=>{"use strict";s();c();u();Object.defineProperty(Go,"__esModule",{value:!0})});var lr=b(Y=>{"use strict";s();c();u();var bp=Y&&Y.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ue=Y&&Y.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&bp(t,o,e)};Object.defineProperty(Y,"__esModule",{value:!0});ue(Po(),Y);ue(Io(),Y);ue(jo(),Y);ue(So(),Y);ue(Ro(),Y);ue(No(),Y);ue(Lo(),Y);ue(qo(),Y);ue(Do(),Y);ue(Wo(),Y);ue(ko(),Y);ue(zo(),Y)});var Ho=b(Fe=>{"use strict";s();c();u();var xp=Fe&&Fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),vp=Fe&&Fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&xp(t,o,e)};Object.defineProperty(Fe,"__esModule",{value:!0});vp(lr(),Fe)});var Jo=b(Yo=>{"use strict";s();c();u();Object.defineProperty(Yo,"__esModule",{value:!0})});var fr=b(Le=>{"use strict";s();c();u();var wp=Le&&Le.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),_p=Le&&Le.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&wp(t,o,e)};Object.defineProperty(Le,"__esModule",{value:!0});_p(Jo(),Le)});var Ko=b(Ce=>{"use strict";s();c();u();var Op=Ce&&Ce.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Pp=Ce&&Ce.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Op(t,o,e)};Object.defineProperty(Ce,"__esModule",{value:!0});Pp(fr(),Ce)});var Xo=b(Zo=>{"use strict";s();c();u();Object.defineProperty(Zo,"__esModule",{value:!0})});var ea=b(Qo=>{"use strict";s();c();u();Object.defineProperty(Qo,"__esModule",{value:!0})});var ra=b(ta=>{"use strict";s();c();u();Object.defineProperty(ta,"__esModule",{value:!0})});var ia=b(na=>{"use strict";s();c();u();Object.defineProperty(na,"__esModule",{value:!0})});var aa=b(oa=>{"use strict";s();c();u();Object.defineProperty(oa,"__esModule",{value:!0})});var ua=b(sa=>{"use strict";s();c();u();Object.defineProperty(sa,"__esModule",{value:!0})});var la=b(ca=>{"use strict";s();c();u();Object.defineProperty(ca,"__esModule",{value:!0})});var pa=b(fa=>{"use strict";s();c();u();Object.defineProperty(fa,"__esModule",{value:!0})});var ma=b(da=>{"use strict";s();c();u();Object.defineProperty(da,"__esModule",{value:!0})});var ya=b(ha=>{"use strict";s();c();u();Object.defineProperty(ha,"__esModule",{value:!0})});var ba=b(ga=>{"use strict";s();c();u();Object.defineProperty(ga,"__esModule",{value:!0})});var va=b(xa=>{"use strict";s();c();u();Object.defineProperty(xa,"__esModule",{value:!0})});var _a=b(wa=>{"use strict";s();c();u();Object.defineProperty(wa,"__esModule",{value:!0})});var pr=b(z=>{"use strict";s();c();u();var Tp=z&&z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ae=z&&z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Tp(t,o,e)};Object.defineProperty(z,"__esModule",{value:!0});ae(Xo(),z);ae(ea(),z);ae(ra(),z);ae(ia(),z);ae(aa(),z);ae(ua(),z);ae(la(),z);ae(pa(),z);ae(ma(),z);ae(ya(),z);ae(ba(),z);ae(va(),z);ae(_a(),z)});var Oa=b(qe=>{"use strict";s();c();u();var Ip=qe&&qe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ep=qe&&qe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ip(t,o,e)};Object.defineProperty(qe,"__esModule",{value:!0});Ep(pr(),qe)});var Ta=b(Pa=>{"use strict";s();c();u();Object.defineProperty(Pa,"__esModule",{value:!0})});var Ea=b(Ia=>{"use strict";s();c();u();Object.defineProperty(Ia,"__esModule",{value:!0})});var dr=b(Pe=>{"use strict";s();c();u();var jp=Pe&&Pe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ja=Pe&&Pe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&jp(t,o,e)};Object.defineProperty(Pe,"__esModule",{value:!0});ja(Ta(),Pe);ja(Ea(),Pe)});var Ba=b(Ue=>{"use strict";s();c();u();var Bp=Ue&&Ue.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Sp=Ue&&Ue.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Bp(t,o,e)};Object.defineProperty(Ue,"__esModule",{value:!0});Sp(dr(),Ue)});var Aa=b(Sa=>{"use strict";s();c();u();Object.defineProperty(Sa,"__esModule",{value:!0})});var Ma=b(Ra=>{"use strict";s();c();u();Object.defineProperty(Ra,"__esModule",{value:!0})});var Fa=b(Na=>{"use strict";s();c();u();Object.defineProperty(Na,"__esModule",{value:!0})});var Ca=b(La=>{"use strict";s();c();u();Object.defineProperty(La,"__esModule",{value:!0})});var Ua=b(qa=>{"use strict";s();c();u();Object.defineProperty(qa,"__esModule",{value:!0})});var $a=b(Da=>{"use strict";s();c();u();Object.defineProperty(Da,"__esModule",{value:!0})});var Va=b(Wa=>{"use strict";s();c();u();Object.defineProperty(Wa,"__esModule",{value:!0})});var Ga=b(ka=>{"use strict";s();c();u();Object.defineProperty(ka,"__esModule",{value:!0})});var Ha=b(za=>{"use strict";s();c();u();Object.defineProperty(za,"__esModule",{value:!0})});var Ja=b(Ya=>{"use strict";s();c();u();Object.defineProperty(Ya,"__esModule",{value:!0})});var mr=b(K=>{"use strict";s();c();u();var Ap=K&&K.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),me=K&&K.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ap(t,o,e)};Object.defineProperty(K,"__esModule",{value:!0});me(Aa(),K);me(Ma(),K);me(Fa(),K);me(Ca(),K);me(Ua(),K);me($a(),K);me(Va(),K);me(Ga(),K);me(Ha(),K);me(Ja(),K)});var Ka=b(De=>{"use strict";s();c();u();var Rp=De&&De.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Mp=De&&De.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Rp(t,o,e)};Object.defineProperty(De,"__esModule",{value:!0});Mp(mr(),De)});var Za=b(Ut=>{"use strict";s();c();u();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ErrorSeverity=void 0;Ut.ErrorSeverity={Critical:"CRITICAL",Warning:"WARNING"}});var Qa=b(Xa=>{"use strict";s();c();u();Object.defineProperty(Xa,"__esModule",{value:!0})});var ts=b(es=>{"use strict";s();c();u();Object.defineProperty(es,"__esModule",{value:!0})});var ns=b(rs=>{"use strict";s();c();u();Object.defineProperty(rs,"__esModule",{value:!0})});var os=b(is=>{"use strict";s();c();u();Object.defineProperty(is,"__esModule",{value:!0})});var hr=b(fe=>{"use strict";s();c();u();var Np=fe&&fe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),jt=fe&&fe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Np(t,o,e)};Object.defineProperty(fe,"__esModule",{value:!0});jt(Za(),fe);jt(Qa(),fe);jt(ts(),fe);jt(ns(),fe);jt(os(),fe)});var as=b($e=>{"use strict";s();c();u();var Fp=$e&&$e.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Lp=$e&&$e.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Fp(t,o,e)};Object.defineProperty($e,"__esModule",{value:!0});Lp(hr(),$e)});var us=b(ss=>{"use strict";s();c();u();Object.defineProperty(ss,"__esModule",{value:!0})});var ls=b(cs=>{"use strict";s();c();u();Object.defineProperty(cs,"__esModule",{value:!0})});var ps=b(fs=>{"use strict";s();c();u();Object.defineProperty(fs,"__esModule",{value:!0})});var ms=b(ds=>{"use strict";s();c();u();Object.defineProperty(ds,"__esModule",{value:!0})});var ys=b(hs=>{"use strict";s();c();u();Object.defineProperty(hs,"__esModule",{value:!0})});var bs=b(gs=>{"use strict";s();c();u();Object.defineProperty(gs,"__esModule",{value:!0})});var vs=b(xs=>{"use strict";s();c();u();Object.defineProperty(xs,"__esModule",{value:!0})});var _s=b(ws=>{"use strict";s();c();u();Object.defineProperty(ws,"__esModule",{value:!0})});var Ps=b(Os=>{"use strict";s();c();u();Object.defineProperty(Os,"__esModule",{value:!0})});var Is=b(Ts=>{"use strict";s();c();u();Object.defineProperty(Ts,"__esModule",{value:!0})});var js=b(Es=>{"use strict";s();c();u();Object.defineProperty(Es,"__esModule",{value:!0})});var Ss=b(Bs=>{"use strict";s();c();u();Object.defineProperty(Bs,"__esModule",{value:!0})});var Rs=b(As=>{"use strict";s();c();u();Object.defineProperty(As,"__esModule",{value:!0})});var Ns=b(Ms=>{"use strict";s();c();u();Object.defineProperty(Ms,"__esModule",{value:!0})});var yr=b(k=>{"use strict";s();c();u();var Cp=k&&k.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ne=k&&k.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Cp(t,o,e)};Object.defineProperty(k,"__esModule",{value:!0});ne(us(),k);ne(ls(),k);ne(ps(),k);ne(ms(),k);ne(ys(),k);ne(bs(),k);ne(vs(),k);ne(_s(),k);ne(Ps(),k);ne(Is(),k);ne(js(),k);ne(Ss(),k);ne(Rs(),k);ne(Ns(),k)});var Fs=b(We=>{"use strict";s();c();u();var qp=We&&We.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Up=We&&We.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&qp(t,o,e)};Object.defineProperty(We,"__esModule",{value:!0});Up(yr(),We)});var Cs=b(R=>{"use strict";s();c();u();var Ls=R&&R.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Dp=R&&R.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Ve=R&&R.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Ls(e,t,r[a]);return Dp(e,t),e}})(),ke=R&&R.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Ls(t,o,e)};Object.defineProperty(R,"__esModule",{value:!0});R.types=R.snippets=R.ir=R.environment=R.endpoints=R.declaration=R.auth=void 0;R.auth=Ve(Ho());ke(lr(),R);R.declaration=Ve(Ko());ke(fr(),R);R.endpoints=Ve(Oa());ke(pr(),R);R.environment=Ve(Ba());ke(dr(),R);R.ir=Ve(Ka());ke(mr(),R);R.snippets=Ve(as());ke(hr(),R);R.types=Ve(Fs());ke(yr(),R)});var qs=b(Ge=>{"use strict";s();c();u();var $p=Ge&&Ge.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Wp=Ge&&Ge.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&$p(t,o,e)};Object.defineProperty(Ge,"__esModule",{value:!0});Wp(Cs(),Ge)});var Ds=b(Us=>{"use strict";s();c();u();Object.defineProperty(Us,"__esModule",{value:!0})});var Ws=b($s=>{"use strict";s();c();u();Object.defineProperty($s,"__esModule",{value:!0})});var ks=b(Vs=>{"use strict";s();c();u();Object.defineProperty(Vs,"__esModule",{value:!0})});var zs=b(Gs=>{"use strict";s();c();u();Object.defineProperty(Gs,"__esModule",{value:!0})});var Ys=b(Hs=>{"use strict";s();c();u();Object.defineProperty(Hs,"__esModule",{value:!0})});var Ks=b(Js=>{"use strict";s();c();u();Object.defineProperty(Js,"__esModule",{value:!0})});var Xs=b(Zs=>{"use strict";s();c();u();Object.defineProperty(Zs,"__esModule",{value:!0})});var eu=b(Qs=>{"use strict";s();c();u();Object.defineProperty(Qs,"__esModule",{value:!0})});var ru=b(tu=>{"use strict";s();c();u();Object.defineProperty(tu,"__esModule",{value:!0})});var iu=b(nu=>{"use strict";s();c();u();Object.defineProperty(nu,"__esModule",{value:!0})});var gr=b(Z=>{"use strict";s();c();u();var Vp=Z&&Z.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),he=Z&&Z.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Vp(t,o,e)};Object.defineProperty(Z,"__esModule",{value:!0});he(Ds(),Z);he(Ws(),Z);he(ks(),Z);he(zs(),Z);he(Ys(),Z);he(Ks(),Z);he(Xs(),Z);he(eu(),Z);he(ru(),Z);he(iu(),Z)});var ou=b(ze=>{"use strict";s();c();u();var kp=ze&&ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Gp=ze&&ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&kp(t,o,e)};Object.defineProperty(ze,"__esModule",{value:!0});Gp(gr(),ze)});var su=b(au=>{"use strict";s();c();u();Object.defineProperty(au,"__esModule",{value:!0})});var cu=b(uu=>{"use strict";s();c();u();Object.defineProperty(uu,"__esModule",{value:!0})});var fu=b(lu=>{"use strict";s();c();u();Object.defineProperty(lu,"__esModule",{value:!0})});var pu=b(Dt=>{"use strict";s();c();u();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.LicenseId=void 0;Dt.LicenseId={Mit:"MIT",Apache2:"Apache-2.0"}});var mu=b(du=>{"use strict";s();c();u();Object.defineProperty(du,"__esModule",{value:!0})});var yu=b(hu=>{"use strict";s();c();u();Object.defineProperty(hu,"__esModule",{value:!0})});var bu=b(gu=>{"use strict";s();c();u();Object.defineProperty(gu,"__esModule",{value:!0})});var vu=b(xu=>{"use strict";s();c();u();Object.defineProperty(xu,"__esModule",{value:!0})});var _u=b(wu=>{"use strict";s();c();u();Object.defineProperty(wu,"__esModule",{value:!0})});var Pu=b(Ou=>{"use strict";s();c();u();Object.defineProperty(Ou,"__esModule",{value:!0})});var Iu=b(Tu=>{"use strict";s();c();u();Object.defineProperty(Tu,"__esModule",{value:!0})});var ju=b(Eu=>{"use strict";s();c();u();Object.defineProperty(Eu,"__esModule",{value:!0})});var Su=b(Bu=>{"use strict";s();c();u();Object.defineProperty(Bu,"__esModule",{value:!0})});var Ru=b(Au=>{"use strict";s();c();u();Object.defineProperty(Au,"__esModule",{value:!0})});var Nu=b(Mu=>{"use strict";s();c();u();Object.defineProperty(Mu,"__esModule",{value:!0})});var Lu=b(Fu=>{"use strict";s();c();u();Object.defineProperty(Fu,"__esModule",{value:!0})});var qu=b(Cu=>{"use strict";s();c();u();Object.defineProperty(Cu,"__esModule",{value:!0})});var Du=b(Uu=>{"use strict";s();c();u();Object.defineProperty(Uu,"__esModule",{value:!0})});var Wu=b($u=>{"use strict";s();c();u();Object.defineProperty($u,"__esModule",{value:!0})});var ku=b(Vu=>{"use strict";s();c();u();Object.defineProperty(Vu,"__esModule",{value:!0})});var zu=b(Gu=>{"use strict";s();c();u();Object.defineProperty(Gu,"__esModule",{value:!0})});var Yu=b(Hu=>{"use strict";s();c();u();Object.defineProperty(Hu,"__esModule",{value:!0})});var Ku=b(Ju=>{"use strict";s();c();u();Object.defineProperty(Ju,"__esModule",{value:!0})});var Xu=b(Zu=>{"use strict";s();c();u();Object.defineProperty(Zu,"__esModule",{value:!0})});var ec=b(Qu=>{"use strict";s();c();u();Object.defineProperty(Qu,"__esModule",{value:!0})});var rc=b(tc=>{"use strict";s();c();u();Object.defineProperty(tc,"__esModule",{value:!0})});var ic=b(nc=>{"use strict";s();c();u();Object.defineProperty(nc,"__esModule",{value:!0})});var ac=b(oc=>{"use strict";s();c();u();Object.defineProperty(oc,"__esModule",{value:!0})});var uc=b(sc=>{"use strict";s();c();u();Object.defineProperty(sc,"__esModule",{value:!0})});var lc=b(cc=>{"use strict";s();c();u();Object.defineProperty(cc,"__esModule",{value:!0})});var pc=b(fc=>{"use strict";s();c();u();Object.defineProperty(fc,"__esModule",{value:!0})});var mc=b(dc=>{"use strict";s();c();u();Object.defineProperty(dc,"__esModule",{value:!0})});var yc=b(hc=>{"use strict";s();c();u();Object.defineProperty(hc,"__esModule",{value:!0})});var bc=b(gc=>{"use strict";s();c();u();Object.defineProperty(gc,"__esModule",{value:!0})});var vc=b(xc=>{"use strict";s();c();u();Object.defineProperty(xc,"__esModule",{value:!0})});var _c=b(wc=>{"use strict";s();c();u();Object.defineProperty(wc,"__esModule",{value:!0})});var br=b(I=>{"use strict";s();c();u();var zp=I&&I.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),S=I&&I.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&zp(t,o,e)};Object.defineProperty(I,"__esModule",{value:!0});S(su(),I);S(cu(),I);S(fu(),I);S(pu(),I);S(mu(),I);S(yu(),I);S(bu(),I);S(vu(),I);S(_u(),I);S(Pu(),I);S(Iu(),I);S(ju(),I);S(Su(),I);S(Ru(),I);S(Nu(),I);S(Lu(),I);S(qu(),I);S(Du(),I);S(Wu(),I);S(ku(),I);S(zu(),I);S(Yu(),I);S(Ku(),I);S(Xu(),I);S(ec(),I);S(rc(),I);S(ic(),I);S(ac(),I);S(uc(),I);S(lc(),I);S(pc(),I);S(mc(),I);S(yc(),I);S(bc(),I);S(vc(),I);S(_c(),I)});var Oc=b(He=>{"use strict";s();c();u();var Hp=He&&He.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Yp=He&&He.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Hp(t,o,e)};Object.defineProperty(He,"__esModule",{value:!0});Yp(br(),He)});var Tc=b(se=>{"use strict";s();c();u();var Pc=se&&se.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Jp=se&&se.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),Kp=se&&se.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Pc(e,t,r[a]);return Jp(e,t),e}})(),Zp=se&&se.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Pc(t,o,e)};Object.defineProperty(se,"__esModule",{value:!0});se.config=void 0;se.config=Kp(Oc());Zp(br(),se)});var Ic=b(Ye=>{"use strict";s();c();u();var Xp=Ye&&Ye.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Qp=Ye&&Ye.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Xp(t,o,e)};Object.defineProperty(Ye,"__esModule",{value:!0});Qp(Tc(),Ye)});var Ec=b($t=>{"use strict";s();c();u();Object.defineProperty($t,"__esModule",{value:!0});$t.HttpMethod=void 0;$t.HttpMethod={Get:"GET",Post:"POST",Put:"PUT",Patch:"PATCH",Delete:"DELETE",Head:"HEAD"}});var xr=b(Je=>{"use strict";s();c();u();var ed=Je&&Je.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),td=Je&&Je.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&ed(t,o,e)};Object.defineProperty(Je,"__esModule",{value:!0});td(Ec(),Je)});var jc=b(Ke=>{"use strict";s();c();u();var rd=Ke&&Ke.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),nd=Ke&&Ke.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&rd(t,o,e)};Object.defineProperty(Ke,"__esModule",{value:!0});nd(xr(),Ke)});var Bc=b(Wt=>{"use strict";s();c();u();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ObjectPropertyAccess=void 0;Wt.ObjectPropertyAccess={ReadOnly:"READ_ONLY",WriteOnly:"WRITE_ONLY"}});var Sc=b(Vt=>{"use strict";s();c();u();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.PrimitiveTypeV1=void 0;Vt.PrimitiveTypeV1={Integer:"INTEGER",Long:"LONG",Uint:"UINT",Uint64:"UINT_64",Float:"FLOAT",Double:"DOUBLE",Boolean:"BOOLEAN",String:"STRING",Date:"DATE",DateTime:"DATE_TIME",Uuid:"UUID",Base64:"BASE_64",BigInteger:"BIG_INTEGER"}});var vr=b(Te=>{"use strict";s();c();u();var id=Te&&Te.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),Ac=Te&&Te.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&id(t,o,e)};Object.defineProperty(Te,"__esModule",{value:!0});Ac(Bc(),Te);Ac(Sc(),Te)});var Rc=b(Ze=>{"use strict";s();c();u();var od=Ze&&Ze.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),ad=Ze&&Ze.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&od(t,o,e)};Object.defineProperty(Ze,"__esModule",{value:!0});ad(vr(),Ze)});var Nc=b(q=>{"use strict";s();c();u();var Mc=q&&q.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),sd=q&&q.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),pt=q&&q.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(e){var r=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[r.length]=a);return r},o(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=o(t),a=0;a<r.length;a++)r[a]!=="default"&&Mc(e,t,r[a]);return sd(e,t),e}})(),kt=q&&q.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Mc(t,o,e)};Object.defineProperty(q,"__esModule",{value:!0});q.types=q.http=q.generatorExec=q.environment=q.dynamic=q.commons=void 0;q.commons=pt(_o());kt(cr(),q);q.dynamic=pt(qs());q.environment=pt(ou());kt(gr(),q);q.generatorExec=pt(Ic());q.http=pt(jc());kt(xr(),q);q.types=pt(Rc());kt(vr(),q)});var Fc=b(Xe=>{"use strict";s();c();u();var ud=Xe&&Xe.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var a=Object.getOwnPropertyDescriptor(t,e);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,a)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),cd=Xe&&Xe.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&ud(t,o,e)};Object.defineProperty(Xe,"__esModule",{value:!0});cd(Nc(),Xe)});var dd={};Qt(dd,{DynamicSnippetsGenerator:()=>Jt});module.exports=cl(dd);s();c();u();s();c();u();s();c();u();s();c();u();function U(o){throw new Error("Unexpected value: "+JSON.stringify(o))}s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var dl=typeof global=="object"&&global&&global.Object===Object&&global,ii=dl;var ml=typeof self=="object"&&self&&self.Object===Object&&self,hl=ii||ml||Function("return this")(),oi=hl;var yl=oi.Symbol,be=yl;s();c();u();var ai=Object.prototype,gl=ai.hasOwnProperty,bl=ai.toString,yt=be?be.toStringTag:void 0;function xl(o){var t=gl.call(o,yt),e=o[yt];try{o[yt]=void 0;var r=!0}catch{}var a=bl.call(o);return r&&(t?o[yt]=e:delete o[yt]),a}var si=xl;s();c();u();var vl=Object.prototype,wl=vl.toString;function _l(o){return wl.call(o)}var ui=_l;var Ol="[object Null]",Pl="[object Undefined]",ci=be?be.toStringTag:void 0;function Tl(o){return o==null?o===void 0?Pl:Ol:ci&&ci in Object(o)?si(o):ui(o)}var li=Tl;s();c();u();function Il(o){return o!=null&&typeof o=="object"}var fi=Il;var El="[object Symbol]";function jl(o){return typeof o=="symbol"||fi(o)&&li(o)==El}var pi=jl;s();c();u();s();c();u();function Bl(o,t){for(var e=-1,r=o==null?0:o.length,a=Array(r);++e<r;)a[e]=t(o[e],e,o);return a}var di=Bl;s();c();u();var Sl=Array.isArray,mi=Sl;var Al=1/0,hi=be?be.prototype:void 0,yi=hi?hi.toString:void 0;function gi(o){if(typeof o=="string")return o;if(mi(o))return di(o,gi)+"";if(pi(o))return yi?yi.call(o):"";var t=o+"";return t=="0"&&1/o==-Al?"-0":t}var bi=gi;s();c();u();function Rl(o){return o==null?"":bi(o)}var _e=Rl;s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();function Ml(o,t,e){var r=-1,a=o.length;t<0&&(t=-t>a?0:a+t),e=e>a?a:e,e<0&&(e+=a),a=t>e?0:e-t>>>0,t>>>=0;for(var y=Array(a);++r<a;)y[r]=o[r+t];return y}var xi=Ml;function Nl(o,t,e){var r=o.length;return e=e===void 0?r:e,!t&&e>=r?o:xi(o,t,e)}var vi=Nl;s();c();u();var Fl="\\ud800-\\udfff",Ll="\\u0300-\\u036f",Cl="\\ufe20-\\ufe2f",ql="\\u20d0-\\u20ff",Ul=Ll+Cl+ql,Dl="\\ufe0e\\ufe0f",$l="\\u200d",Wl=RegExp("["+$l+Fl+Ul+Dl+"]");function Vl(o){return Wl.test(o)}var Nt=Vl;s();c();u();s();c();u();function kl(o){return o.split("")}var wi=kl;s();c();u();var _i="\\ud800-\\udfff",Gl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Hl="\\u20d0-\\u20ff",Yl=Gl+zl+Hl,Jl="\\ufe0e\\ufe0f",Kl="["+_i+"]",nr="["+Yl+"]",ir="\\ud83c[\\udffb-\\udfff]",Zl="(?:"+nr+"|"+ir+")",Oi="[^"+_i+"]",Pi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ti="[\\ud800-\\udbff][\\udc00-\\udfff]",Xl="\\u200d",Ii=Zl+"?",Ei="["+Jl+"]?",Ql="(?:"+Xl+"(?:"+[Oi,Pi,Ti].join("|")+")"+Ei+Ii+")*",ef=Ei+Ii+Ql,tf="(?:"+[Oi+nr+"?",nr,Pi,Ti,Kl].join("|")+")",rf=RegExp(ir+"(?="+ir+")|"+tf+ef,"g");function nf(o){return o.match(rf)||[]}var ji=nf;function of(o){return Nt(o)?ji(o):wi(o)}var Bi=of;function af(o){return function(t){t=_e(t);var e=Nt(t)?Bi(t):void 0,r=e?e[0]:t.charAt(0),a=e?vi(e,1).join(""):t.slice(1);return r[o]()+a}}var Si=af;var sf=Si("toUpperCase"),nt=sf;function uf(o){return nt(_e(o).toLowerCase())}var Ai=uf;s();c();u();s();c();u();function cf(o,t,e,r){var a=-1,y=o==null?0:o.length;for(r&&y&&(e=o[++a]);++a<y;)e=t(e,o[a],a,o);return e}var Ri=cf;s();c();u();s();c();u();s();c();u();function lf(o){return function(t){return o?.[t]}}var Mi=lf;var ff={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},pf=Mi(ff),Ni=pf;var df=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mf="\\u0300-\\u036f",hf="\\ufe20-\\ufe2f",yf="\\u20d0-\\u20ff",gf=mf+hf+yf,bf="["+gf+"]",xf=RegExp(bf,"g");function vf(o){return o=_e(o),o&&o.replace(df,Ni).replace(xf,"")}var Fi=vf;s();c();u();s();c();u();var wf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function _f(o){return o.match(wf)||[]}var Li=_f;s();c();u();var Of=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Pf(o){return Of.test(o)}var Ci=Pf;s();c();u();var Wi="\\ud800-\\udfff",Tf="\\u0300-\\u036f",If="\\ufe20-\\ufe2f",Ef="\\u20d0-\\u20ff",jf=Tf+If+Ef,Vi="\\u2700-\\u27bf",ki="a-z\\xdf-\\xf6\\xf8-\\xff",Bf="\\xac\\xb1\\xd7\\xf7",Sf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Af="\\u2000-\\u206f",Rf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gi="A-Z\\xc0-\\xd6\\xd8-\\xde",Mf="\\ufe0e\\ufe0f",zi=Bf+Sf+Af+Rf,Hi="['\u2019]",qi="["+zi+"]",Nf="["+jf+"]",Yi="\\d+",Ff="["+Vi+"]",Ji="["+ki+"]",Ki="[^"+Wi+zi+Yi+Vi+ki+Gi+"]",Lf="\\ud83c[\\udffb-\\udfff]",Cf="(?:"+Nf+"|"+Lf+")",qf="[^"+Wi+"]",Zi="(?:\\ud83c[\\udde6-\\uddff]){2}",Xi="[\\ud800-\\udbff][\\udc00-\\udfff]",it="["+Gi+"]",Uf="\\u200d",Ui="(?:"+Ji+"|"+Ki+")",Df="(?:"+it+"|"+Ki+")",Di="(?:"+Hi+"(?:d|ll|m|re|s|t|ve))?",$i="(?:"+Hi+"(?:D|LL|M|RE|S|T|VE))?",Qi=Cf+"?",eo="["+Mf+"]?",$f="(?:"+Uf+"(?:"+[qf,Zi,Xi].join("|")+")"+eo+Qi+")*",Wf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",kf=eo+Qi+$f,Gf="(?:"+[Ff,Zi,Xi].join("|")+")"+kf,zf=RegExp([it+"?"+Ji+"+"+Di+"(?="+[qi,it,"$"].join("|")+")",Df+"+"+$i+"(?="+[qi,it+Ui,"$"].join("|")+")",it+"?"+Ui+"+"+Di,it+"+"+$i,Vf,Wf,Yi,Gf].join("|"),"g");function Hf(o){return o.match(zf)||[]}var to=Hf;function Yf(o,t,e){return o=_e(o),t=e?void 0:t,t===void 0?Ci(o)?to(o):Li(o):o.match(t)||[]}var ro=Yf;var Jf="['\u2019]",Kf=RegExp(Jf,"g");function Zf(o){return function(t){return Ri(ro(Fi(t).replace(Kf,"")),o,"")}}var no=Zf;var Xf=no(function(o,t,e){return t=t.toLowerCase(),o+(e?Ai(t):t)}),Ft=Xf;s();c();u();function gt(o){return Object.keys(o)}s();c();u();s();c();u();s();c();u();var bt=d.env.FERN_STACK_TRACK?.toLowerCase()??"",de=bt!==""&&bt!=="0"&&bt!=="false",or=["single","multiline","box"].includes(bt)?bt:"single";de&&(Error.stackTraceLimit=50);var Qf=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),ep=new Set(["stacktrace"]);function Ct({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,formatFilename:O=P=>P}={}){if(!de)return[];r=[...r,...Qf],e=[...e,...ep],a=[...a,"runInteractiveTask"];let P=!1;return(new Error().stack??"").split(`
2
2
  `).map(M=>{let j=M.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(j&&j.length===5){let[,C,X,T,E]=j;if(!C||!X||!T||!E)return;if(P||a.some(N=>C?.includes(N))){P=!0;return}switch(C){case"Object.<anonymous>":C="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":C=`${C.substring(C.indexOf(".")+1)}()=> { ... }`;break}return{fn:C,path:O(X),position:`${T}:${E}`}}}).filter(M=>M&&!r.some(j=>M.fn.includes(j))&&!(y&&M.path?.startsWith("node:"))&&!(p&&M.path?.endsWith(".js"))&&!e.some(j=>M.path.includes(j))).slice(t,t+o)}var Lt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:r=[],filterFunctions:a=[],stopOn:y=[],filterNode:p=!0,filterJs:O=!0,multiline:P=!1,formatFilename:M=j=>j}={}){w(this,"maxFrames");w(this,"skip");w(this,"filterPaths");w(this,"filterFunctions");w(this,"stopOn");w(this,"filterNode");w(this,"filterJs");w(this,"multiline");w(this,"formatFilename");w(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=r,this.filterFunctions=a,this.stopOn=y,this.filterNode=p,this.filterJs=O,this.multiline=P,this.formatFilename=M}tag(t){let e=this.tracking.get(t)||new Set;Ct({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>e.add(r)),this.tracking.set(t,e)}trace(t){if(!de)return"";let e=this.tracking.get(t);return e?[...e].map(r=>`${this.multiline?`
3
- `:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},ar;function io({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,multiline:O=!1,formatFilename:P=M=>M}={}){de&&(ar??(ar=new Lt({maxFrames:o,skip:t,filterPaths:e,filterFunctions:r,stopOn:a,filterNode:y,filterJs:p,multiline:O,formatFilename:P})))}function oo(o){ar?.tag(o)}function sr(o){return ar?.frames(o)??[]}var Be=class{constructor(){oo(this)}};s();c();u();var qt=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},vt=class extends qt{async format(t){return t}formatSync(t){return t}};s();c();u();s();c();u();s();c();u();var ce=class extends Be{constructor(e){super();w(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var tp=4;io({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var wt=class{constructor(){w(this,"lineBuffer",[]);w(this,"indentLevel",0);w(this,"hasWrittenAnything",!1);w(this,"lastCharacterIsSemicolon",!1);w(this,"lastCharacterIsNewline",!1);w(this,"nodeStackFrames",[])}get buffer(){return de&&this.nodeStackFrames.length>0&&this.writeInternal(`
3
+ `:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},ar;function io({maxFrames:o=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:a=[],filterNode:y=!0,filterJs:p=!0,multiline:O=!1,formatFilename:P=M=>M}={}){de&&(ar??(ar=new Lt({maxFrames:o,skip:t,filterPaths:e,filterFunctions:r,stopOn:a,filterNode:y,filterJs:p,multiline:O,formatFilename:P})))}function oo(o){ar?.tag(o)}function sr(o){return ar?.frames(o)??[]}var Be=class{constructor(){oo(this)}};s();c();u();var qt=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},xt=class extends qt{async format(t){return t}formatSync(t){return t}};s();c();u();s();c();u();s();c();u();var ce=class extends Be{constructor(e){super();w(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var tp=4;io({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var vt=class{constructor(){w(this,"lineBuffer",[]);w(this,"indentLevel",0);w(this,"hasWrittenAnything",!1);w(this,"lastCharacterIsSemicolon",!1);w(this,"lastCharacterIsNewline",!1);w(this,"nodeStackFrames",[])}get buffer(){return de&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
4
  `),this.lineBuffer.join(`
5
5
  `)+(this.lastCharacterIsNewline?`
6
6
  `:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let r=e.length>0&&e.endsWith(`
@@ -12,16 +12,16 @@ ${y}`);this.isAtStartOfLine()&&(p=y+p),r&&(p+=`
12
12
  `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
13
13
  `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:r}){if(t.length>0){let a=t[0];a!=null&&r(a);for(let y=1;y<t.length;y++){this.write(e);let p=t[y];p!=null&&r(p)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
14
  `),this.lastCharacterIsSemicolon=t.endsWith(";");let r=t.split(`
15
- `),a=de&&!this.shouldSkipTracking(r)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${r.shift()||""}`),this.lastCharacterIsNewline&&r.pop(),this.lineBuffer.push(...r),a&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(r=>`${e?`(${e}) `:""} ${r.fn} - ${r.path} : ${r.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(Ct({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,or){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return tp}};s();c();u();s();c();u();s();c();u();var _t=class{constructor(){w(this,"reporter");w(this,"snippet");w(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw this.err??new Error(`Failed to generate snippet for endpoint "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>(this.snippet?.length??0)}};var Ot=class{constructor(t){w(this,"context");this.context=t}async generate(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new _t;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=await O.generateSnippet({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}async generateSnippetAst(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{return await O.generateSnippetAst({endpoint:y,request:t,options:e})}catch(P){a=P}}throw a??new Error(`Failed to generate snippet AST for endpoint: ${t.endpoint.method} ${t.endpoint.path}`)}generateSync(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new _t;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=O.generateSnippetSync({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}};s();c();u();s();c();u();s();c();u();var Pt=class{constructor(){w(this,"REFERENCE_REGEX",/^(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 r=t.match(this.REFERENCE_REGEX);if(!(r==null||r[1]==null||r[2]==null))return{method:r[1],path:r[2]}}};s();c();u();var A={Critical:"CRITICAL",Warning:"WARNING"},Tt=class o{constructor(){w(this,"errors");w(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push({...t,path:[...this.path]})}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new o;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let r of t){if(typeof r=="string"){e.push(r);continue}e[e.length-1]+=`[${r.index}]`}return e}};var It=class{constructor({ir:t,config:e,options:r={}}){w(this,"config");w(this,"options");w(this,"errors");w(this,"_ir");w(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=r,this.errors=new Tt,this.httpEndpointReferenceParser=new Pt}associateQueryParametersByWireValue({parameters:t,values:e}){let r=[];for(let[a,y]of Object.entries(e)){this.errors.scope(a);try{let p=t.find(P=>P.name.wireValue===a);if(p==null)throw this.newParameterNotRecognizedError(a);let O=this.isListTypeReference(p.typeReference)&&!Array.isArray(y)?[y]:y;r.push({name:p.name,typeReference:p.typeReference,value:O})}finally{this.errors.unscope()}}return r}associateByWireValueOrDefault({parameters:t,values:e}){let r=[];for(let a of t){this.errors.scope(a.name.wireValue);try{let y=e[a.name.wireValue];if(y==null)if(a.typeReference.type==="primitive"&&a.typeReference.value==="STRING")y=`<${a.name.wireValue}>`;else{this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a.name.wireValue).message});continue}r.push({name:a.name,typeReference:a.typeReference,value:y})}finally{this.errors.unscope()}}return r}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:r}){let a=[];for(let[y,p]of Object.entries(e)){this.errors.scope(y);try{let O=t.find(P=>P.name.wireValue===y);if(O==null){if(r)continue;this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(y).message});continue}a.push({name:O.name,typeReference:O.typeReference,value:p})}finally{this.errors.unscope()}}return a}getExampleObjectProperties({parameters:t,snippetObject:e}){let r=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},a=[];for(let y of t){let p=r[y.name.wireValue];p==null?y.typeReference.type==="nullable"&&a.push({name:y.name,typeReference:y.typeReference,value:null}):a.push({name:y.name,typeReference:y.typeReference,value:p})}return a}getSingleFileValue({property:t,record:e}){let r=e[t.wireValue];if(r!=null){if(typeof r!="string"){this.errors.add({severity:A.Critical,message:`Expected file value to be a string, got ${typeof r}`});return}return r}}getFileArrayValues({property:t,record:e}){let r=e[t.wireValue];if(r==null)return;if(!Array.isArray(r)){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof r}`});return}let a=[];for(let y of r){if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof y}`});return}a.push(y)}return a}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:A.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t??{}}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:A.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let r=this.getRecord(e);if(r==null)return;let a=t.discriminant.wireValue,y=r[a];if(y==null){this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a).message});return}if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected discriminant value to be a string but got: ${typeof y}`});return}let p=t.types[y];if(p==null){this.errors.add({severity:A.Critical,message:`No type found for discriminant value "${y}"`});return}let{[a]:O,...P}=r;return{singleDiscriminatedUnionType:p,discriminantValue:p.discriminantValue,value:P}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(t){let e=[];for(let r of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:r,parsedEndpoint:t})&&e.push(r);return e}resolveEndpointLocationOrThrow(t){let e=this.resolveEndpointLocation(t);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:r}){return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:r}):!t.metadata?.onlyPathParameters}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){return e&&(t.metadata?.includePathParameters??!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:U(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let r=e.environments.find(a=>a.id===t);return r?.name}case"multipleBaseUrls":{let r=e.environments.find(a=>a.id===t);return r?.name}default:U(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let r=e.environments[0];if(r==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let a=new Set(bt(r.urls));for(let y of bt(t))a.has(y)&&a.delete(y);return a.size>0?(this.errors.add({severity:A.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${bt(r.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:U(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:U(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:U(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};s();c();u();var le={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var Se=class extends wt{constructor({customConfig:e,formatter:r}){super();w(this,"customConfig");w(this,"formatter");w(this,"imports",{});w(this,"defaultImports",{});w(this,"starImportAliases",{});w(this,"starImportAliasesInverse",{});this.customConfig=e,this.formatter=r??new vt}addImport(e){var r,a;if(e.importFrom!=null){switch(e.importFrom.type){case"default":{this.validateDefault(e);break}case"named":{this.validateNamed(e);break}case"star":{this.validateStar(e);break}}let y=(r=this.imports)[a=e.importFrom.moduleName]??(r[a]=[]);y.map(O=>O.name).includes(e.name)||y.push(e)}}validateDefault(e){var a,y;if(e.importFrom?.type!=="default")return;let r=(a=this.defaultImports)[y=e.importFrom.moduleName]??(a[y]=e);if(r.name!==e.name)throw new Error(`Cannot have multiple default imports for module ${e.importFrom.moduleName}: got ${e.name} but already had ${r.name}`)}validateNamed(e){if(e.importFrom?.type!=="named")return;let a=(this.imports[e.importFrom.moduleName]??[]).filter(p=>p.importFrom?.type==="star");if(a.length>0)throw new Error(`Cannot add named import ${e.name} because non-named imports ${a.map(p=>p.name)} already exist`);let y=[];for(let p of Object.values(this.imports))for(let O of p)O.importFrom?.type==="named"&&O.importFrom.moduleName!==e.importFrom.moduleName&&O.name===e.name&&y.push(O);if(y.length>0)throw new Error(`Cannot add named import from module ${e.importFrom.moduleName} because it is already imported from ${y[0]?.importFrom?.moduleName}`)}validateStar(e){var y,p,O,P;if(e.importFrom?.type!=="star")return;let r=(y=this.starImportAliases)[p=e.importFrom.moduleName]??(y[p]=e.importFrom.starImportAlias);if(r!==e.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${e.importFrom.starImportAlias} but already have ${r}.`);if(((O=this.starImportAliasesInverse)[P=e.importFrom.starImportAlias]??(O[P]=e.importFrom.moduleName))!==e.importFrom.moduleName)throw new Error(`Attempted to use alias ${e.importFrom.starImportAlias} for more than one module in the same file`)}};var Et=class extends Se{constructor({customConfig:t,formatter:e}){super({customConfig:t,formatter:e})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format TypeScript file: ${e}
15
+ `),a=de&&!this.shouldSkipTracking(r)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${r.shift()||""}`),this.lastCharacterIsNewline&&r.pop(),this.lineBuffer.push(...r),a&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(r=>`${e?`(${e}) `:""} ${r.fn} - ${r.path} : ${r.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(Ct({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,or){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return tp}};s();c();u();s();c();u();s();c();u();var wt=class{constructor(){w(this,"reporter");w(this,"snippet");w(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw this.err??new Error(`Failed to generate snippet for endpoint "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>(this.snippet?.length??0)}};var _t=class{constructor(t){w(this,"context");this.context=t}async generate(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new wt;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=await O.generateSnippet({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}async generateSnippetAst(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{return await O.generateSnippetAst({endpoint:y,request:t,options:e})}catch(P){a=P}}throw a??new Error(`Failed to generate snippet AST for endpoint: ${t.endpoint.method} ${t.endpoint.path}`)}generateSync(t,e={}){let r=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let a=new wt;for(let y of r){let p=this.context.clone(),O=this.createSnippetGenerator(p);try{let P=O.generateSnippetSync({endpoint:y,request:t,options:e});if(p.errors.empty())return{snippet:P,errors:void 0};a.update({context:p,snippet:P})}catch(P){a.err==null&&(a.err=P)}}return a.getResponseOrThrow({endpoint:t.endpoint})}};s();c();u();s();c();u();s();c();u();var Ot=class{constructor(){w(this,"REFERENCE_REGEX",/^(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 r=t.match(this.REFERENCE_REGEX);if(!(r==null||r[1]==null||r[2]==null))return{method:r[1],path:r[2]}}};s();c();u();var A={Critical:"CRITICAL",Warning:"WARNING"},Pt=class o{constructor(){w(this,"errors");w(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push({...t,path:[...this.path]})}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new o;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let r of t){if(typeof r=="string"){e.push(r);continue}e[e.length-1]+=`[${r.index}]`}return e}};var Tt=class{constructor({ir:t,config:e,options:r={}}){w(this,"config");w(this,"options");w(this,"errors");w(this,"_ir");w(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=r,this.errors=new Pt,this.httpEndpointReferenceParser=new Ot}associateQueryParametersByWireValue({parameters:t,values:e}){let r=[];for(let[a,y]of Object.entries(e)){this.errors.scope(a);try{let p=t.find(P=>P.name.wireValue===a);if(p==null)throw this.newParameterNotRecognizedError(a);let O=this.isListTypeReference(p.typeReference)&&!Array.isArray(y)?[y]:y;r.push({name:p.name,typeReference:p.typeReference,value:O})}finally{this.errors.unscope()}}return r}associateByWireValueOrDefault({parameters:t,values:e}){let r=[];for(let a of t){this.errors.scope(a.name.wireValue);try{let y=e[a.name.wireValue];if(y==null)if(a.typeReference.type==="primitive"&&a.typeReference.value==="STRING")y=`<${a.name.wireValue}>`;else{this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a.name.wireValue).message});continue}r.push({name:a.name,typeReference:a.typeReference,value:y})}finally{this.errors.unscope()}}return r}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:r}){let a=[];for(let[y,p]of Object.entries(e)){this.errors.scope(y);try{let O=t.find(P=>P.name.wireValue===y);if(O==null){if(r)continue;this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(y).message});continue}a.push({name:O.name,typeReference:O.typeReference,value:p})}finally{this.errors.unscope()}}return a}getExampleObjectProperties({parameters:t,snippetObject:e}){let r=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},a=[];for(let y of t){let p=r[y.name.wireValue];p==null?y.typeReference.type==="nullable"&&a.push({name:y.name,typeReference:y.typeReference,value:null}):a.push({name:y.name,typeReference:y.typeReference,value:p})}return a}getSingleFileValue({property:t,record:e}){let r=e[t.wireValue];if(r!=null){if(typeof r!="string"){this.errors.add({severity:A.Critical,message:`Expected file value to be a string, got ${typeof r}`});return}return r}}getFileArrayValues({property:t,record:e}){let r=e[t.wireValue];if(r==null)return;if(!Array.isArray(r)){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof r}`});return}let a=[];for(let y of r){if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof y}`});return}a.push(y)}return a}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:A.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t??{}}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:A.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let r=this.getRecord(e);if(r==null)return;let a=t.discriminant.wireValue,y=r[a];if(y==null){this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(a).message});return}if(typeof y!="string"){this.errors.add({severity:A.Critical,message:`Expected discriminant value to be a string but got: ${typeof y}`});return}let p=t.types[y];if(p==null){this.errors.add({severity:A.Critical,message:`No type found for discriminant value "${y}"`});return}let{[a]:O,...P}=r;return{singleDiscriminatedUnionType:p,discriminantValue:p.discriminantValue,value:P}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(t){let e=[];for(let r of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:r,parsedEndpoint:t})&&e.push(r);return e}resolveEndpointLocationOrThrow(t){let e=this.resolveEndpointLocation(t);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:r}){return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:r}):!t.metadata?.onlyPathParameters}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){return e&&(t.metadata?.includePathParameters??!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:U(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let r=e.environments.find(a=>a.id===t);return r?.name}case"multipleBaseUrls":{let r=e.environments.find(a=>a.id===t);return r?.name}default:U(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let r=e.environments[0];if(r==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let a=new Set(gt(r.urls));for(let y of gt(t))a.has(y)&&a.delete(y);return a.size>0?(this.errors.add({severity:A.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${gt(r.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:U(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:U(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:U(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};s();c();u();var le={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();s();c();u();var Se=class extends vt{constructor({customConfig:e,formatter:r}){super();w(this,"customConfig");w(this,"formatter");w(this,"imports",{});w(this,"defaultImports",{});w(this,"starImportAliases",{});w(this,"starImportAliasesInverse",{});this.customConfig=e,this.formatter=r??new xt}addImport(e){var r,a;if(e.importFrom!=null){switch(e.importFrom.type){case"default":{this.validateDefault(e);break}case"named":{this.validateNamed(e);break}case"star":{this.validateStar(e);break}}let y=(r=this.imports)[a=e.importFrom.moduleName]??(r[a]=[]);y.map(O=>O.name).includes(e.name)||y.push(e)}}validateDefault(e){var a,y;if(e.importFrom?.type!=="default")return;let r=(a=this.defaultImports)[y=e.importFrom.moduleName]??(a[y]=e);if(r.name!==e.name)throw new Error(`Cannot have multiple default imports for module ${e.importFrom.moduleName}: got ${e.name} but already had ${r.name}`)}validateNamed(e){if(e.importFrom?.type!=="named")return;let a=(this.imports[e.importFrom.moduleName]??[]).filter(p=>p.importFrom?.type==="star");if(a.length>0)throw new Error(`Cannot add named import ${e.name} because non-named imports ${a.map(p=>p.name)} already exist`);let y=[];for(let p of Object.values(this.imports))for(let O of p)O.importFrom?.type==="named"&&O.importFrom.moduleName!==e.importFrom.moduleName&&O.name===e.name&&y.push(O);if(y.length>0)throw new Error(`Cannot add named import from module ${e.importFrom.moduleName} because it is already imported from ${y[0]?.importFrom?.moduleName}`)}validateStar(e){var y,p,O,P;if(e.importFrom?.type!=="star")return;let r=(y=this.starImportAliases)[p=e.importFrom.moduleName]??(y[p]=e.importFrom.starImportAlias);if(r!==e.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${e.importFrom.starImportAlias} but already have ${r}.`);if(((O=this.starImportAliasesInverse)[P=e.importFrom.starImportAlias]??(O[P]=e.importFrom.moduleName))!==e.importFrom.moduleName)throw new Error(`Attempted to use alias ${e.importFrom.starImportAlias} for more than one module in the same file`)}};var It=class extends Se{constructor({customConfig:t,formatter:e}){super({customConfig:t,formatter:e})}async toStringAsync(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.format(t)}catch(e){throw new Error(`Failed to format TypeScript file: ${e}
16
16
  ${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format TypeScript file: ${e}
17
17
  ${t}`)}return t}getContent(){let t=this.stringifyImports();return t.length>0?t+`
18
18
  `+this.buffer:this.buffer}stringifyImports(){let t="";for(let[e,r]of Object.entries(this.imports)){let a=this.defaultImports[e],y="",p=r.filter(P=>P.importFrom?.type==="named"),O=this.starImportAliases[e];if(p.length>0||a!=null||O!=null){if(t+="import",a!=null&&(t+=` ${a.name}`),p.length>0){for(let M of p.slice(0,-1))y+=`${M.name}, `;let P=p[p.length-1];P!=null&&(y+=`${P.name}`),a!=null&&(t+=","),t+=` { ${y} }`}O!=null&&((a!=null||p.length>0)&&(t+=", "),t+=` * as ${O}`),t+=` from "${e}";
19
- `}}return t}};var L=class extends Be{async toStringAsync({customConfig:t,formatter:e}){let r=new Et({customConfig:t,formatter:e});return this.write(r),await r.toStringAsync()}toString({customConfig:t,formatter:e}){let r=new Et({customConfig:t,formatter:e});return this.write(r),r.toString()}};var _={};Qt(_,{AstNode:()=>L,ClassInstantiation:()=>ot,CodeBlock:()=>at,Comment:()=>Oe,Function:()=>st,FunctionInvocation:()=>ut,MethodInvocation:()=>ct,Parameter:()=>lt,Reference:()=>Re,Type:()=>Ae,TypeLiteral:()=>xe,Types:()=>Ae,Variable:()=>ft,Writer:()=>Se,codeblock:()=>ap,function_:()=>sp,instantiateClass:()=>up,invokeFunction:()=>cp,invokeMethod:()=>lp,parameter:()=>fp,reference:()=>pp,variable:()=>dp});s();c();u();s();c();u();s();c();u();var ot=class extends L{constructor({class_:e,arguments_:r}){super();w(this,"class_");w(this,"arguments_");this.class_=e,this.arguments_=r}write(e){e.write("new "),e.writeNode(this.class_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var at=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){return new ce(this.args).write(e)}};s();c();u();var Oe=class extends L{constructor({docs:e}={docs:void 0}){super();w(this,"docs");this.docs=e}write(e){this.docs!=null&&(e.writeLine("/**"),this.docs.split(`
19
+ `}}return t}};var L=class extends Be{async toStringAsync({customConfig:t,formatter:e}){let r=new It({customConfig:t,formatter:e});return this.write(r),await r.toStringAsync()}toString({customConfig:t,formatter:e}){let r=new It({customConfig:t,formatter:e});return this.write(r),r.toString()}};var _={};Qt(_,{AstNode:()=>L,ClassInstantiation:()=>ot,CodeBlock:()=>at,Comment:()=>Oe,Function:()=>st,FunctionInvocation:()=>ut,MethodInvocation:()=>ct,Parameter:()=>lt,Reference:()=>Re,Type:()=>Ae,TypeLiteral:()=>xe,Types:()=>Ae,Variable:()=>ft,Writer:()=>Se,codeblock:()=>ap,function_:()=>sp,instantiateClass:()=>up,invokeFunction:()=>cp,invokeMethod:()=>lp,parameter:()=>fp,reference:()=>pp,variable:()=>dp});s();c();u();s();c();u();s();c();u();var ot=class extends L{constructor({class_:e,arguments_:r}){super();w(this,"class_");w(this,"arguments_");this.class_=e,this.arguments_=r}write(e){e.write("new "),e.writeNode(this.class_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var at=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){return new ce(this.args).write(e)}};s();c();u();var Oe=class extends L{constructor({docs:e}={docs:void 0}){super();w(this,"docs");this.docs=e}write(e){this.docs!=null&&(e.writeLine("/**"),this.docs.split(`
20
20
  `).forEach(r=>{e.writeLine(` * ${r}`)}),e.writeLine("*/"))}};s();c();u();s();c();u();var Ae=class extends L{constructor(e){super();w(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"string":e.write("string");break;case"number":e.write("number");break;case"bigint":e.write("bigint");break;case"boolean":e.write("boolean");break;case"array":this.internalType.valueType.write(e),e.write("[]");break;case"map":e.write("Record<"),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write(">");break;case"object":e.write("{"),e.indent();for(let[r,a]of Object.entries(this.internalType.fields))e.write(`${r}: `),a.write(e),e.writeLine(",");e.dedent(),e.write("}");break;case"enum":e.write("enum");break;case"any":e.write("any");break;case"promise":e.write("Promise<"),this.internalType.value.write(e),e.write(">");break;case"unknown":e.write("unknown");break;case"void":e.write("void");break;case"undefined":e.write("undefined");break;case"null":e.write("null");break;case"never":e.write("never");break;case"nop":break;default:U(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(e){return new this({type:"array",valueType:e})}static object(e){return new this({type:"object",fields:e})}static enum(e){return new this({type:"enum",values:e})}static any(){return new this({type:"any"})}static promise(e){return e.internalType.type==="promise"?e:new this({type:"promise",value:e})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};var st=class extends L{constructor({name:e,parameters:r,async:a,body:y,return_:p,docs:O}){super();w(this,"name");w(this,"parameters");w(this,"async");w(this,"body");w(this,"return_");w(this,"docs");this.name=e,this.parameters=r,this.async=a??!1,this.body=y,this.return_=p,this.docs=O}write(e){e.writeNode(new Oe({docs:this.docs})),this.async&&e.write("async "),e.write("function "),e.write(`${this.name}`),this.writeParameters(e),this.return_!=null&&(e.write(": "),e.writeNode(this.async?Ae.promise(this.return_):this.return_)),e.writeLine(" {"),e.indent(),this.body?.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeParameters(e){if(this.parameters.length===0){e.write("()");return}e.indent(),e.writeLine("(");for(let r of this.parameters)e.writeNode(r),e.writeLine(",");e.dedent(),e.write(")")}};s();c();u();var ut=class extends L{constructor({function_:e,arguments_:r}){super();w(this,"function_");w(this,"arguments_");this.function_=e,this.arguments_=r}write(e){e.writeNode(this.function_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var ct=class extends L{constructor({on:e,method:r,arguments_:a,async:y}){super();w(this,"on");w(this,"method");w(this,"arguments_");w(this,"async");this.on=e,this.method=r,this.arguments_=a,this.async=y}write(e){this.async&&e.write("await "),this.on.write(e),e.write("."),e.write(this.method),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};s();c();u();var lt=class extends L{constructor({name:e,type:r,docs:a}){super();w(this,"name");w(this,"type");w(this,"docs");this.name=e,this.type=r,this.docs=a}write(e){this.docs!=null&&e.writeNode(new Oe({docs:this.docs})),e.write(`${this.name}: `),this.type.write(e)}};s();c();u();var Re=class extends L{constructor({name:e,importFrom:r,memberName:a}){super();w(this,"name");w(this,"importFrom");w(this,"memberName");this.name=e,this.importFrom=r,this.memberName=a}write(e){this.importFrom!=null&&e.addImport(this);let r=this.importFrom?.type==="star"?`${this.importFrom.starImportAlias}.`:"",a=this.memberName!=null?`.${this.memberName}`:"";e.write(`${r}${this.name}${a}`)}};s();c();u();var xe=class o extends L{constructor(e){super();w(this,"internalType");this.internalType=e}write(e){let r=!!e.customConfig?.noSerdeLayer,a=!!e.customConfig?.useBigInt;switch(this.internalType.type){case"array":{this.writeIterable({writer:e,iterable:this.internalType});break}case"blob":{if(r){e.writeNode(o.string(this.internalType.value));return}e.write("new Blob(["),e.writeNode(o.string(this.internalType.value)),e.write("])");break}case"boolean":{e.write(this.internalType.value.toString());break}case"bigint":{if(a){e.write(`BigInt("${this.internalType.value.toString()}")`);return}e.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(r){e.writeNode(o.string(this.internalType.value));return}e.write("new Date("),e.writeNode(o.string(this.internalType.value)),e.write(")");break}case"number":{e.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:e,object:this.internalType});break}case"record":{this.writeRecord({writer:e,record:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"set":{if(r||this.isSetOfObjects()){e.writeNode(o.array({values:this.internalType.values}));return}e.write("new Set("),this.writeIterable({writer:e,iterable:this.internalType}),e.write(")");break}case"string":{this.internalType.value.includes(`
21
21
  `)?this.writeStringWithBackticks({writer:e,value:this.internalType.value}):e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:e,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:U(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(e=>e.isObject())}writeStringWithBackticks({writer:e,value:r}){e.write("`");let a=r.split(`
22
22
  `),y=a[0]+`
23
23
  `,p=a.slice(1).join(`
24
- `);e.write(y.replaceAll("`","\\`")),e.writeNoIndent(p.replaceAll("`","\\`")),e.write("`")}writeIterable({writer:e,iterable:r}){let a=ip({values:r.values});if(a.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let y of a)y.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeRecord({writer:e,record:r}){let a=np({entries:r.entries});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)y.key.write(e),e.write(": "),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeObject({writer:e,object:r}){let a=rp({fields:r.fields});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)e.write(`${y.name}: `),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}static array({values:e}){return new this({type:"array",values:e})}static bigint(e){return new this({type:"bigint",value:e})}static blob(e){return new this({type:"blob",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static object({fields:e}){return new this({type:"object",fields:e})}static record({entries:e}){return new this({type:"record",entries:e})}static reference(e){return new this({type:"reference",value:e})}static set({values:e}){return new this({type:"set",values:e})}static string(e){return new this({type:"string",value:e})}static tuple({values:e}){return new this({type:"tuple",values:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(r.includes('"')?`\`${r}\``:`"${r}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let a of r)e.writeNode(o.unknown(a)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let a=Object.entries(r);if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[y,p]of a)e.write(`${y}: `),e.writeNode(o.unknown(p)),e.writeLine(",");e.dedent(),e.write("}")}};function rp({fields:o}){return o.filter(t=>!xe.isNop(t.value))}function np({entries:o}){return o.filter(t=>!xe.isNop(t.key)&&!xe.isNop(t.value))}function ip({values:o}){return o.filter(t=>!xe.isNop(t))}s();c();u();var ft=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){this.args.export&&e.write("export "),this.args.const?e.write("const "):e.write("let "),e.write(`${this.args.name} = `),e.writeNode(this.args.initializer)}};function ap(o){return new at(o)}function sp(o){return new st(o)}function up(o){return new ot(o)}function cp(o){return new ut(o)}function lp(o){return new ct(o)}function fp(o){return new lt(o)}function pp(o){return new Re(o)}function dp(o){return new ft(o)}s();c();u();s();c();u();function ao({generatorConfig:o,isPackagePrivate:t}){let e=o.output.mode;switch(e.type){case"downloadFiles":return;case"publish":return{packageName:e.registriesV2.npm.packageName,version:e.version,private:t,publishInfo:{registryUrl:e.registriesV2.npm.registryUrl,token:e.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(e.publishInfo!=null&&e.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${e.publishInfo.type} instead`);return{packageName:e.publishInfo!=null?e.publishInfo.packageName:"",version:e.version,private:t,publishInfo:void 0,repoUrl:mp(e.repoUrl),license:o.license?._visit({basic:r=>r.id,custom:r=>`See ${r.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${e}`)}}function mp(o){if(o!=null)return o.startsWith("https://github.com/")?`github:${pt(o).replace("https://github.com/","")}`:o.startsWith("ssh://github.com/")?`github:${pt(o).replace("ssh://github.com/","")}`:o.startsWith("https://bitbucket.org/")?`bitbucket:${pt(o).replace("https://bitbucket.org/","")}`:o.startsWith("ssh://bitbucket.org/")?`bitbucket:${pt(o).replace("ssh://bitbucket.org/","")}`:o.startsWith("https://gitlab.com/")?`gitlab:${pt(o).replace("https://gitlab.com/","")}`:o.startsWith("ssh://gitlab.com/")?`gitlab:${pt(o).replace("ssh://gitlab.com/","")}`:(o.startsWith("git+")||(o=`git+${o}`),o.endsWith(".git")||(o=`${o}.git`),o)}function pt(o){return o.endsWith(".git")?o.slice(0,-4):o}s();c();u();function ur({organization:o,workspaceName:t,namespaceExport:e}){return e??`${nt(Ft(o))}${nt(Ft(t))}`}s();c();u();var wr=ul(Fc(),1);var ld="value",Gt=class{constructor({context:t}){w(this,"context");this.context=t}convert(t){let e=t.convertOpts;if(t.value===null)return this.context.isNullable(t.typeReference)?_.TypeLiteral.null():(this.context.errors.add({severity:A.Critical,message:"Expected non-null value, but got null"}),_.TypeLiteral.nop());if(t.value===void 0)return _.TypeLiteral.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value,convertOpts:e});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value,convertOpts:e});case"map":return this.convertMap({map:t.typeReference,value:t.value,convertOpts:e});case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?_.TypeLiteral.nop():this.convertNamed({named:r,value:t.value,as:t.as,convertOpts:e})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"set":return this.convertSet({set:t.typeReference.value,value:t.value,convertOpts:e});case"unknown":return this.convertUnknown({value:t.value,convertOpts:e});default:U(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let r=this.context.getValueAsBoolean({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(r)}case"string":{let r=this.context.getValueAsString({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}default:U(t)}}convertList({list:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.array({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertSet({set:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.set({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertMap({map:t,value:e,convertOpts:r}){return typeof e!="object"||e==null?(this.context.errors.add({severity:A.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),_.TypeLiteral.nop()):_.TypeLiteral.record({entries:Object.entries(e).map(([a,y])=>{this.context.errors.scope(a);try{return{key:this.convert({typeReference:t.key,value:a,as:"key",convertOpts:r}),value:this.convert({typeReference:t.value,value:y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:r,convertOpts:a}){switch(t.type){case"alias":return this.context.customConfig?.useBrandedStringAliases?_.TypeLiteral.reference(_.codeblock(y=>{y.writeNode(_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})})),y.write("("),y.writeNode(this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a})),y.write(")")})):this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:a});case"enum":return this.convertEnum({enum_:t,value:e,convertOpts:a});case"object":return this.convertObject({object_:t,value:e,convertOpts:a});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:a});default:U(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:r}){let a=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(a==null)return _.TypeLiteral.nop();let y=a.singleDiscriminatedUnionType,p=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:a,unionVariant:y,convertOpts:r});if(p==null)return _.TypeLiteral.nop();if(this.context.customConfig?.includeUtilsOnUnionMembers)return _.TypeLiteral.reference(_.codeblock(P=>{P.writeNode(_.invokeMethod({on:_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})}),method:this.context.getMethodName(y.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:a,unionVariant:y,unionProperties:p,convertOpts:r})}))}));let O={name:this.context.getPropertyName(t.discriminant.name),value:_.TypeLiteral.string(y.discriminantValue.wireValue)};return _.TypeLiteral.object({fields:[O,...p]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e,convertOpts:r}){let a=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let y=this.context.resolveNamedType({typeId:e.typeId});if(y==null)return;let p=this.convertNamed({named:y,value:t.value,convertOpts:r});if(!p.isObject()){this.context.errors.add({severity:A.Critical,message:"Internal error; expected union value to be an object"});return}let O=p.asObjectOrThrow();return[...a,...O.fields]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let y=this.context.getRecord(t.value);return y==null?[...a,{name:ld,value:this.convert({typeReference:e.typeReference,value:t.value,convertOpts:r})}]:[...a,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:y[e.discriminantValue.wireValue],convertOpts:r})}]}finally{this.context.errors.unscope()}case"noProperties":return a;default:U(e)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:r,convertOpts:a}){return e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&r.length===1?[this.convert({typeReference:e.typeReference,value:t.value,convertOpts:a})]:r.length>0?[_.TypeLiteral.object({fields:r})]:[]}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e,convertOpts:r}){return this.context.associateByWireValue({parameters:e.properties??[],values:this.context.getRecord(t.value)??{},ignoreMissingParameters:!0}).map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e,convertOpts:r}){let a=this.context.associateByWireValue({parameters:this.filterReadWriteProperties(t.properties,r),values:this.context.getRecord(e)??{}});return _.TypeLiteral.object({fields:a.map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}filterReadWriteProperties(t,e){return this.context.customConfig?.experimentalGenerateReadWriteOnlyTypes!==!0||typeof e>"u"||(e.isForRequest&&(t=t.filter(r=>r.propertyAccess!==wr.ObjectPropertyAccess.ReadOnly)),e.isForResponse&&(t=t.filter(r=>r.propertyAccess!==wr.ObjectPropertyAccess.WriteOnly))),t}convertEnum({enum_:t,value:e}){let r=this.getEnumValue({enum_:t,value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:A.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(a=>a.wireValue===e)==null){this.context.errors.add({severity:A.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:r}){let a=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r});return a??_.TypeLiteral.nop()}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r}){for(let a of t.types)try{return this.convert({typeReference:a,value:e,convertOpts:r})}catch{continue}this.context.errors.add({severity:A.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t,convertOpts:e}){return _.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:r,convertOpts:a}){switch(t){case"INTEGER":case"UINT":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"LONG":case"UINT_64":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.number(y)}case"FLOAT":case"DOUBLE":{let y=this.getValueAsNumber({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"BOOLEAN":{let y=this.getValueAsBoolean({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(y)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.string(y)}case"DATE_TIME":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.datetime(y)}case"BIG_INTEGER":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.string(y)}default:U(t)}}getValueAsNumber({value:t,as:e}){let r=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:r})}getValueAsBoolean({value:t,as:e}){let r=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:r})}};s();c();u();var zt=class{constructor({context:t}){w(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){let r={fileFields:[],bodyPropertyFields:[]},a=this.context.getRecord(e)??{};for(let y of t.properties)switch(y.type){case"file":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getSingleFileProperty({property:y,record:a})});break;case"fileArray":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getArrayFileProperty({property:y,record:a})});break;case"bodyProperty":r.bodyPropertyFields.push({name:this.context.getPropertyName(y.name.name),value:this.getBodyProperty({property:y,record:a})});break;default:U(y)}return r}getSingleFileProperty({property:t,record:e}){let r=this.context.getSingleFileValue({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.blob(r)}getArrayFileProperty({property:t,record:e}){let r=this.context.getFileArrayValues({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.array({values:r.map(a=>_.TypeLiteral.blob(a))})}getBodyProperty({property:t,record:e}){let r=e[t.name.wireValue];return r==null?_.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:r})}};var Ht=class o extends It{constructor({ir:e,config:r}){super({ir:e,config:r});w(this,"ir");w(this,"customConfig");w(this,"dynamicTypeLiteralMapper");w(this,"filePropertyMapper");w(this,"moduleName");w(this,"namespaceExport");this.ir=e,this.customConfig=r.customConfig!=null?r.customConfig:void 0,this.dynamicTypeLiteralMapper=new Gt({context:this}),this.filePropertyMapper=new zt({context:this}),this.moduleName=fd({config:r,customConfig:this.customConfig}),this.namespaceExport=ur({organization:r.organization,workspaceName:r.workspaceName,namespaceExport:this.customConfig?.namespaceExport})}clone(){return new o({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(e){return this.customConfig?.retainOriginalCasing||this.customConfig?.noSerdeLayer?this.formatOriginalPropertyName(e.originalName):e.camelCase.unsafeName}getMethodName(e){return e.camelCase.unsafeName}getTypeName(e){return e.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(e){let r=this.resolveEnvironmentName(e);if(r!=null)return this.getEnvironmentsTypeReference(r)}getFullyQualifiedReference({declaration:e}){return e.fernFilepath.allParts.length>0?`${e.fernFilepath.allParts.map(r=>r.camelCase.unsafeName).join(".")}.${this.getTypeName(e.name)}`:`${this.getTypeName(e.name)}`}getEnvironmentsTypeReference(e){return _.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(e)})}formatOriginalPropertyName(e){return e.includes("-")?`"${e}"`:e}};function fd({config:o,customConfig:t}){return ao({generatorConfig:o,isPackagePrivate:t?.private??!1})?.packageName??o.organization}s();c();u();var Lc="client",Cc="main",pd={type:"primitive",value:"STRING"},Yt=class{constructor({context:t}){w(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return await this.buildCodeBlock({endpoint:t,snippet:e}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e}).toString({customConfig:this.context.customConfig})}async generateSnippetAst({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return _.codeblock(r=>{r.writeNode(_.function_({name:Cc,async:!0,parameters:[],body:_.codeblock(a=>{a.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),a.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})})),r.writeNodeStatement(_.invokeFunction({function_:_.reference({name:Cc}),arguments_:[]}))})}constructClient({endpoint:t,snippet:e}){return _.variable({name:Lc,const:!0,initializer:_.instantiateClass({class_:_.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:t,snippet:e})]})})}getConstructorArgs({endpoint:t,snippet:e}){let r=[],a=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return a.length>0&&r.push(...a),t.auth!=null&&(e.auth!=null?r.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:A.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(le.PathParameters),this.context.ir.pathParameters!=null&&r.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.Headers),this.context.ir.headers!=null&&e.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),r.length===0?_.TypeLiteral.nop():_.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let r=this.getEnvironmentValue({baseUrl:t,environment:e});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:A.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return _.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let r=this.context.getEnvironmentTypeReferenceFromID(e);if(r==null){this.context.errors.add({severity:A.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return _.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?_.TypeLiteral.object({fields:Object.entries(e).map(([r,a])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:pd,value:a})}))}):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The TypeScript SDK v2 Generator does not support Inferred auth scheme yet"),[]);default:U(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:A.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:_.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),value:_.TypeLiteral.string(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:_.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:_.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:_.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let r=[];for(let a of t){let y=this.getConstructorHeaderArg({header:a,value:e.value});y!=null&&r.push(y)}return r}getConstructorHeaderArg({header:t,value:e}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!_.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(t.name.name),value:r}}callMethod({endpoint:t,snippet:e}){return _.invokeMethod({on:_.reference({name:Lc}),method:this.getMethod({endpoint:t}),async:!0,arguments_:this.getMethodArgs({endpoint:t,snippet:e})})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:U(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){let r=[];this.context.errors.scope(le.PathParameters);let a=[...this.context.ir.pathParameters??[],...t.pathParameters??[]];return a.length>0&&r.push(...this.getPathParameters({namedParameters:a,snippet:e}).map(y=>y.value)),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody),t.body!=null&&r.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getBytesBodyRequestArg({value:t}){return typeof t!="string"?(this.context.errors.add({severity:A.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),_.TypeLiteral.nop()):_.TypeLiteral.blob(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let r=[],{inlinePathParameters:a,inlineFileProperties:y}={inlinePathParameters:this.context.customConfig?.inlinePathParameters??!1,inlineFileProperties:this.context.customConfig?.inlineFileProperties??!1};this.context.errors.scope(le.PathParameters);let p=[];t.pathParameters!=null&&p.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let O=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})||r.push(...p.map(P=>P.value)),y||r.push(...O.fileFields.map(P=>P.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:a,inlineFileProperties:y})&&r.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})?p:[],filePropertyInfo:O})),r}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:r,filePropertyInfo:a}){this.context.errors.scope(le.QueryParameters);let p=this.context.associateQueryParametersByWireValue({parameters:t.queryParameters??[],values:e.queryParameters??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.Headers);let P=this.context.associateByWireValue({parameters:t.headers??[],values:e.headers??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let M=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:a}):[];return this.context.errors.unscope(),_.TypeLiteral.object({fields:[...r,...p,...P,...M]})}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:r}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:U(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return this.context.customConfig?.inlineFileProperties?[...t.fileFields,...t.bodyPropertyFields]:t.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:this.context.getRecord(e)??{}});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getPathParameters({namedParameters:t,snippet:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:e.pathParameters??{},ignoreMissingParameters:!0});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}};var Jt=class extends Ot{constructor({ir:t,config:e}){super(new Ht({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}async generateSnippetAst(t){return super.generateSnippetAst(t)}createSnippetGenerator(t){return new Yt({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
24
+ `);e.write(y.replaceAll("`","\\`")),e.writeNoIndent(p.replaceAll("`","\\`")),e.write("`")}writeIterable({writer:e,iterable:r}){let a=ip({values:r.values});if(a.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let y of a)y.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeRecord({writer:e,record:r}){let a=np({entries:r.entries});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)y.key.write(e),e.write(": "),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeObject({writer:e,object:r}){let a=rp({fields:r.fields});if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let y of a)e.write(`${y.name}: `),y.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}static array({values:e}){return new this({type:"array",values:e})}static bigint(e){return new this({type:"bigint",value:e})}static blob(e){return new this({type:"blob",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static object({fields:e}){return new this({type:"object",fields:e})}static record({entries:e}){return new this({type:"record",entries:e})}static reference(e){return new this({type:"reference",value:e})}static set({values:e}){return new this({type:"set",values:e})}static string(e){return new this({type:"string",value:e})}static tuple({values:e}){return new this({type:"tuple",values:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(r.includes('"')?`\`${r}\``:`"${r}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let a of r)e.writeNode(o.unknown(a)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let a=Object.entries(r);if(a.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[y,p]of a)e.write(`${y}: `),e.writeNode(o.unknown(p)),e.writeLine(",");e.dedent(),e.write("}")}};function rp({fields:o}){return o.filter(t=>!xe.isNop(t.value))}function np({entries:o}){return o.filter(t=>!xe.isNop(t.key)&&!xe.isNop(t.value))}function ip({values:o}){return o.filter(t=>!xe.isNop(t))}s();c();u();var ft=class extends L{constructor(e){super();w(this,"args");this.args=e}write(e){this.args.export&&e.write("export "),this.args.const?e.write("const "):e.write("let "),e.write(`${this.args.name} = `),e.writeNode(this.args.initializer)}};function ap(o){return new at(o)}function sp(o){return new st(o)}function up(o){return new ot(o)}function cp(o){return new ut(o)}function lp(o){return new ct(o)}function fp(o){return new lt(o)}function pp(o){return new Re(o)}function dp(o){return new ft(o)}s();c();u();s();c();u();function ao({generatorConfig:o,isPackagePrivate:t}){let e=o.output.mode;switch(e.type){case"downloadFiles":return;case"publish":return{packageName:e.registriesV2.npm.packageName,version:e.version,private:t,publishInfo:{registryUrl:e.registriesV2.npm.registryUrl,token:e.registriesV2.npm.token},license:void 0,repoUrl:void 0};case"github":if(e.publishInfo!=null&&e.publishInfo.type!=="npm")throw new Error(`Expected to receive npm publish info but received ${e.publishInfo.type} instead`);return{packageName:e.publishInfo!=null?e.publishInfo.packageName:"",version:e.version,private:t,publishInfo:void 0,repoUrl:mp(e.repoUrl),license:o.license?._visit({basic:r=>r.id,custom:r=>`See ${r.filename}`,_other:()=>{}})};default:throw new Error(`Encountered unknown output mode: ${e}`)}}function mp(o){if(o!=null)return o.startsWith("https://github.com/")?`git+${o}`:o.startsWith("ssh://github.com/")?`github:${Et(o).replace("ssh://github.com/","")}`:o.startsWith("https://bitbucket.org/")?`bitbucket:${Et(o).replace("https://bitbucket.org/","")}`:o.startsWith("ssh://bitbucket.org/")?`bitbucket:${Et(o).replace("ssh://bitbucket.org/","")}`:o.startsWith("https://gitlab.com/")?`gitlab:${Et(o).replace("https://gitlab.com/","")}`:o.startsWith("ssh://gitlab.com/")?`gitlab:${Et(o).replace("ssh://gitlab.com/","")}`:(o.startsWith("git+")||(o=`git+${o}`),o.endsWith(".git")||(o=`${o}.git`),o)}function Et(o){return o.endsWith(".git")?o.slice(0,-4):o}s();c();u();function ur({organization:o,workspaceName:t,namespaceExport:e}){return e??`${nt(Ft(o))}${nt(Ft(t))}`}s();c();u();var wr=ul(Fc(),1);var ld="value",Gt=class{constructor({context:t}){w(this,"context");this.context=t}convert(t){let e=t.convertOpts;if(t.value===null)return this.context.isNullable(t.typeReference)?_.TypeLiteral.null():(this.context.errors.add({severity:A.Critical,message:"Expected non-null value, but got null"}),_.TypeLiteral.nop());if(t.value===void 0)return _.TypeLiteral.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value,convertOpts:e});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value,convertOpts:e});case"map":return this.convertMap({map:t.typeReference,value:t.value,convertOpts:e});case"named":{let r=this.context.resolveNamedType({typeId:t.typeReference.value});return r==null?_.TypeLiteral.nop():this.convertNamed({named:r,value:t.value,as:t.as,convertOpts:e})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as,convertOpts:e});case"set":return this.convertSet({set:t.typeReference.value,value:t.value,convertOpts:e});case"unknown":return this.convertUnknown({value:t.value,convertOpts:e});default:U(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let r=this.context.getValueAsBoolean({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(r)}case"string":{let r=this.context.getValueAsString({value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}default:U(t)}}convertList({list:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.array({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertSet({set:t,value:e,convertOpts:r}){return Array.isArray(e)?_.TypeLiteral.set({values:e.map((a,y)=>{this.context.errors.scope({index:y});try{return this.convert({typeReference:t,value:a,convertOpts:r})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),_.TypeLiteral.nop())}convertMap({map:t,value:e,convertOpts:r}){return typeof e!="object"||e==null?(this.context.errors.add({severity:A.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),_.TypeLiteral.nop()):_.TypeLiteral.record({entries:Object.entries(e).map(([a,y])=>{this.context.errors.scope(a);try{return{key:this.convert({typeReference:t.key,value:a,as:"key",convertOpts:r}),value:this.convert({typeReference:t.value,value:y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:r,convertOpts:a}){switch(t.type){case"alias":return this.context.customConfig?.useBrandedStringAliases?_.TypeLiteral.reference(_.codeblock(y=>{y.writeNode(_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})})),y.write("("),y.writeNode(this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a})),y.write(")")})):this.convert({typeReference:t.typeReference,value:e,as:r,convertOpts:a});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:a});case"enum":return this.convertEnum({enum_:t,value:e,convertOpts:a});case"object":return this.convertObject({object_:t,value:e,convertOpts:a});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:a});default:U(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e,convertOpts:r}){let a=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(a==null)return _.TypeLiteral.nop();let y=a.singleDiscriminatedUnionType,p=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:a,unionVariant:y,convertOpts:r});if(p==null)return _.TypeLiteral.nop();if(this.context.customConfig?.includeUtilsOnUnionMembers)return _.TypeLiteral.reference(_.codeblock(P=>{P.writeNode(_.invokeMethod({on:_.reference({name:this.context.namespaceExport,importFrom:this.context.getModuleImport(),memberName:this.context.getFullyQualifiedReference({declaration:t.declaration})}),method:this.context.getMethodName(y.discriminantValue.name),arguments_:this.convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:a,unionVariant:y,unionProperties:p,convertOpts:r})}))}));let O={name:this.context.getPropertyName(t.discriminant.name),value:_.TypeLiteral.string(y.discriminantValue.wireValue)};return _.TypeLiteral.object({fields:[O,...p]})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e,convertOpts:r}){let a=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let y=this.context.resolveNamedType({typeId:e.typeId});if(y==null)return;let p=this.convertNamed({named:y,value:t.value,convertOpts:r});if(!p.isObject()){this.context.errors.add({severity:A.Critical,message:"Internal error; expected union value to be an object"});return}let O=p.asObjectOrThrow();return[...a,...O.fields]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let y=this.context.getRecord(t.value);return y==null?[...a,{name:ld,value:this.convert({typeReference:e.typeReference,value:t.value,convertOpts:r})}]:[...a,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:y[e.discriminantValue.wireValue],convertOpts:r})}]}finally{this.context.errors.unscope()}case"noProperties":return a;default:U(e)}}convertDiscriminatedUnionUtilsArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:r,convertOpts:a}){return e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&r.length===1?[this.convert({typeReference:e.typeReference,value:t.value,convertOpts:a})]:r.length>0?[_.TypeLiteral.object({fields:r})]:[]}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e,convertOpts:r}){return this.context.associateByWireValue({parameters:e.properties??[],values:this.context.getRecord(t.value)??{},ignoreMissingParameters:!0}).map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e,convertOpts:r}){let a=this.context.associateByWireValue({parameters:this.filterReadWriteProperties(t.properties,r),values:this.context.getRecord(e)??{}});return _.TypeLiteral.object({fields:a.map(y=>{this.context.errors.scope(y.name.wireValue);try{return{name:this.context.getPropertyName(y.name.name),value:this.convert({...y,convertOpts:r})}}finally{this.context.errors.unscope()}})})}filterReadWriteProperties(t,e){return this.context.customConfig?.experimentalGenerateReadWriteOnlyTypes!==!0||typeof e>"u"||(e.isForRequest&&(t=t.filter(r=>r.propertyAccess!==wr.ObjectPropertyAccess.ReadOnly)),e.isForResponse&&(t=t.filter(r=>r.propertyAccess!==wr.ObjectPropertyAccess.WriteOnly))),t}convertEnum({enum_:t,value:e}){let r=this.getEnumValue({enum_:t,value:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.string(r)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:A.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(a=>a.wireValue===e)==null){this.context.errors.add({severity:A.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e,convertOpts:r}){let a=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r});return a??_.TypeLiteral.nop()}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e,convertOpts:r}){for(let a of t.types)try{return this.convert({typeReference:a,value:e,convertOpts:r})}catch{continue}this.context.errors.add({severity:A.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t,convertOpts:e}){return _.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:r,convertOpts:a}){switch(t){case"INTEGER":case"UINT":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"LONG":case"UINT_64":{let y=this.getValueAsNumber({value:e,as:r});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.number(y)}case"FLOAT":case"DOUBLE":{let y=this.getValueAsNumber({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.number(y)}case"BOOLEAN":{let y=this.getValueAsBoolean({value:e,as:r});return y==null?_.TypeLiteral.nop():_.TypeLiteral.boolean(y)}case"BASE_64":case"DATE":case"UUID":case"STRING":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.string(y)}case"DATE_TIME":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():_.TypeLiteral.datetime(y)}case"BIG_INTEGER":{let y=this.context.getValueAsString({value:e});return y==null?_.TypeLiteral.nop():this.context.customConfig?.useBigInt?_.TypeLiteral.bigint(BigInt(y)):_.TypeLiteral.string(y)}default:U(t)}}getValueAsNumber({value:t,as:e}){let r=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:r})}getValueAsBoolean({value:t,as:e}){let r=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:r})}};s();c();u();var zt=class{constructor({context:t}){w(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){let r={fileFields:[],bodyPropertyFields:[]},a=this.context.getRecord(e)??{};for(let y of t.properties)switch(y.type){case"file":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getSingleFileProperty({property:y,record:a})});break;case"fileArray":r.fileFields.push({name:this.context.getPropertyName(y.name),value:this.getArrayFileProperty({property:y,record:a})});break;case"bodyProperty":r.bodyPropertyFields.push({name:this.context.getPropertyName(y.name.name),value:this.getBodyProperty({property:y,record:a})});break;default:U(y)}return r}getSingleFileProperty({property:t,record:e}){let r=this.context.getSingleFileValue({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.blob(r)}getArrayFileProperty({property:t,record:e}){let r=this.context.getFileArrayValues({property:t,record:e});return r==null?_.TypeLiteral.nop():_.TypeLiteral.array({values:r.map(a=>_.TypeLiteral.blob(a))})}getBodyProperty({property:t,record:e}){let r=e[t.name.wireValue];return r==null?_.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:r})}};var Ht=class o extends Tt{constructor({ir:e,config:r}){super({ir:e,config:r});w(this,"ir");w(this,"customConfig");w(this,"dynamicTypeLiteralMapper");w(this,"filePropertyMapper");w(this,"moduleName");w(this,"namespaceExport");this.ir=e,this.customConfig=r.customConfig!=null?r.customConfig:void 0,this.dynamicTypeLiteralMapper=new Gt({context:this}),this.filePropertyMapper=new zt({context:this}),this.moduleName=fd({config:r,customConfig:this.customConfig}),this.namespaceExport=ur({organization:r.organization,workspaceName:r.workspaceName,namespaceExport:this.customConfig?.namespaceExport})}clone(){return new o({ir:this.ir,config:this.config})}getModuleImport(){return{type:"named",moduleName:this.moduleName}}getRootClientName(){return`${this.namespaceExport}Client`}getPropertyName(e){return this.customConfig?.retainOriginalCasing||this.customConfig?.noSerdeLayer?this.formatOriginalPropertyName(e.originalName):e.camelCase.unsafeName}getMethodName(e){return e.camelCase.unsafeName}getTypeName(e){return e.pascalCase.unsafeName}getEnvironmentTypeReferenceFromID(e){let r=this.resolveEnvironmentName(e);if(r!=null)return this.getEnvironmentsTypeReference(r)}getFullyQualifiedReference({declaration:e}){return e.fernFilepath.allParts.length>0?`${e.fernFilepath.allParts.map(r=>r.camelCase.unsafeName).join(".")}.${this.getTypeName(e.name)}`:`${this.getTypeName(e.name)}`}getEnvironmentsTypeReference(e){return _.reference({name:`${this.namespaceExport}Environment`,importFrom:this.getModuleImport(),memberName:this.getTypeName(e)})}formatOriginalPropertyName(e){return e.includes("-")?`"${e}"`:e}};function fd({config:o,customConfig:t}){return ao({generatorConfig:o,isPackagePrivate:t?.private??!1})?.packageName??o.organization}s();c();u();var Lc="client",Cc="main",pd={type:"primitive",value:"STRING"},Yt=class{constructor({context:t}){w(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return await this.buildCodeBlock({endpoint:t,snippet:e}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e}).toString({customConfig:this.context.customConfig})}async generateSnippetAst({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return _.codeblock(r=>{r.writeNode(_.function_({name:Cc,async:!0,parameters:[],body:_.codeblock(a=>{a.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),a.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})})),r.writeNodeStatement(_.invokeFunction({function_:_.reference({name:Cc}),arguments_:[]}))})}constructClient({endpoint:t,snippet:e}){return _.variable({name:Lc,const:!0,initializer:_.instantiateClass({class_:_.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:t,snippet:e})]})})}getConstructorArgs({endpoint:t,snippet:e}){let r=[],a=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return a.length>0&&r.push(...a),t.auth!=null&&(e.auth!=null?r.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:A.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(le.PathParameters),this.context.ir.pathParameters!=null&&r.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.Headers),this.context.ir.headers!=null&&e.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),r.length===0?_.TypeLiteral.nop():_.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let r=this.getEnvironmentValue({baseUrl:t,environment:e});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:A.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return _.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let r=this.context.getEnvironmentTypeReferenceFromID(e);if(r==null){this.context.errors.add({severity:A.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return _.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?_.TypeLiteral.object({fields:Object.entries(e).map(([r,a])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:pd,value:a})}))}):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The TypeScript SDK v2 Generator does not support Inferred auth scheme yet"),[]);default:U(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:A.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:_.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),value:_.TypeLiteral.string(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:_.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:_.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:_.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let r=[];for(let a of t){let y=this.getConstructorHeaderArg({header:a,value:e.value});y!=null&&r.push(y)}return r}getConstructorHeaderArg({header:t,value:e}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!_.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(t.name.name),value:r}}callMethod({endpoint:t,snippet:e}){return _.invokeMethod({on:_.reference({name:Lc}),method:this.getMethod({endpoint:t}),async:!0,arguments_:this.getMethodArgs({endpoint:t,snippet:e})})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:U(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){let r=[];this.context.errors.scope(le.PathParameters);let a=[...this.context.ir.pathParameters??[],...t.pathParameters??[]];return a.length>0&&r.push(...this.getPathParameters({namedParameters:a,snippet:e}).map(y=>y.value)),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody),t.body!=null&&r.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getBytesBodyRequestArg({value:t}){return typeof t!="string"?(this.context.errors.add({severity:A.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),_.TypeLiteral.nop()):_.TypeLiteral.blob(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let r=[],{inlinePathParameters:a,inlineFileProperties:y}={inlinePathParameters:this.context.customConfig?.inlinePathParameters??!1,inlineFileProperties:this.context.customConfig?.inlineFileProperties??!1};this.context.errors.scope(le.PathParameters);let p=[];t.pathParameters!=null&&p.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let O=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})||r.push(...p.map(P=>P.value)),y||r.push(...O.fileFields.map(P=>P.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:a,inlineFileProperties:y})&&r.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:a})?p:[],filePropertyInfo:O})),r}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:r,filePropertyInfo:a}){this.context.errors.scope(le.QueryParameters);let p=this.context.associateQueryParametersByWireValue({parameters:t.queryParameters??[],values:e.queryParameters??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.Headers);let P=this.context.associateByWireValue({parameters:t.headers??[],values:e.headers??{}}).map(j=>({name:this.context.getPropertyName(j.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...j,convertOpts:{isForRequest:!0}})}));this.context.errors.unscope(),this.context.errors.scope(le.RequestBody);let M=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:a}):[];return this.context.errors.unscope(),_.TypeLiteral.object({fields:[...r,...p,...P,...M]})}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:r}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:U(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return this.context.customConfig?.inlineFileProperties?[...t.fileFields,...t.bodyPropertyFields]:t.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:U(t)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:this.context.getRecord(e)??{}});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getPathParameters({namedParameters:t,snippet:e}){let r=[],a=this.context.associateByWireValue({parameters:t,values:e.pathParameters??{},ignoreMissingParameters:!0});for(let y of a)r.push({name:this.context.getPropertyName(y.name.name),value:this.context.dynamicTypeLiteralMapper.convert({...y,convertOpts:{isForRequest:!0}})});return r}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}};var Jt=class extends _t{constructor({ir:t,config:e}){super(new Ht({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}async generateSnippetAst(t){return super.generateSnippetAst(t)}createSnippetGenerator(t){return new Yt({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
25
25
  /*! Bundled license information:
26
26
 
27
27
  @jspm/core/nodelibs/browser/chunk-DtuTasat.js: