@fern-api/ruby-dynamic-snippets 1.0.0-rc61 → 1.0.0-rc63
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 +40 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +121 -0
- package/dist/index.d.ts +121 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/package.json +9 -10
- package/cjs/DynamicSnippetsGenerator.cjs +0 -45
- package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
- package/cjs/DynamicSnippetsGenerator.d.cts +0 -20
- package/cjs/DynamicSnippetsGeneratorContext-Kt0XtRvQ.d.cts +0 -52
- package/cjs/EndpointSnippetGenerator.cjs +0 -34
- package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
- package/cjs/EndpointSnippetGenerator.d.cts +0 -54
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -45
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
- package/cjs/context/DynamicToLiteralMapper.cjs +0 -34
- package/cjs/context/DynamicToLiteralMapper.cjs.map +0 -1
- package/cjs/context/DynamicToLiteralMapper.d.cts +0 -4
- package/cjs/index.cjs +0 -45
- package/cjs/index.cjs.map +0 -1
- package/cjs/index.d.cts +0 -6
- package/esm/DynamicSnippetsGenerator.d.ts +0 -20
- package/esm/DynamicSnippetsGenerator.js +0 -2
- package/esm/DynamicSnippetsGenerator.js.map +0 -1
- package/esm/DynamicSnippetsGeneratorContext-Kt0XtRvQ.d.ts +0 -52
- package/esm/EndpointSnippetGenerator.d.ts +0 -54
- package/esm/EndpointSnippetGenerator.js +0 -2
- package/esm/EndpointSnippetGenerator.js.map +0 -1
- package/esm/chunk-E7XDZIKI.js +0 -2
- package/esm/chunk-E7XDZIKI.js.map +0 -1
- package/esm/chunk-FWYXQB4R.js +0 -15
- package/esm/chunk-FWYXQB4R.js.map +0 -1
- package/esm/chunk-NB75HQID.js +0 -2
- package/esm/chunk-NB75HQID.js.map +0 -1
- package/esm/chunk-SWWYKNFW.js +0 -2
- package/esm/chunk-SWWYKNFW.js.map +0 -1
- package/esm/chunk-TGWLAKQC.js +0 -34
- package/esm/chunk-TGWLAKQC.js.map +0 -1
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
- package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
- package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
- package/esm/context/DynamicToLiteralMapper.d.ts +0 -4
- package/esm/context/DynamicToLiteralMapper.js +0 -2
- package/esm/context/DynamicToLiteralMapper.js.map +0 -1
- package/esm/index.d.ts +0 -6
- package/esm/index.js +0 -2
- package/esm/index.js.map +0 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";var Ge=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ri=Object.prototype.hasOwnProperty;var ni=(l,r,e)=>r in l?Ge(l,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[r]=e;var Te=(l,r)=>()=>(l&&(r=l(l=0)),r);var ct=(l,r)=>{for(var e in r)Ge(l,e,{get:r[e],enumerable:!0})},ii=(l,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of ti(r))!ri.call(l,s)&&s!==e&&Ge(l,s,{get:()=>r[s],enumerable:!(i=ei(r,s))||i.enumerable});return l};var oi=l=>ii(Ge({},"__esModule",{value:!0}),l);var y=(l,r,e)=>ni(l,typeof r!="symbol"?r+"":r,e);var c=Te(()=>{"use strict"});var w={};ct(w,{_debugEnd:()=>vr,_debugProcess:()=>br,_events:()=>$r,_eventsCount:()=>Dr,_exiting:()=>tr,_fatalExceptions:()=>yr,_getActiveHandles:()=>or,_getActiveRequests:()=>ir,_kill:()=>ar,_linkedBinding:()=>Zt,_maxListeners:()=>Mr,_preload_modules:()=>Fr,_rawDebug:()=>Xt,_startProfilerIdleNotifier:()=>Ar,_stopProfilerIdleNotifier:()=>Tr,_tickCallback:()=>wr,abort:()=>Rr,addListener:()=>_r,allowedNodeEnvironmentFlags:()=>dr,arch:()=>$t,argv:()=>Ot,argv0:()=>Cr,assert:()=>mr,binding:()=>Gt,browser:()=>Jt,chdir:()=>Ht,config:()=>rr,cpuUsage:()=>He,cwd:()=>zt,debugPort:()=>Lr,default:()=>Hr,dlopen:()=>nr,domain:()=>er,emit:()=>qr,emitWarning:()=>qt,env:()=>_t,execArgv:()=>jt,execPath:()=>Nr,exit:()=>fr,features:()=>hr,hasUncaughtExceptionCaptureCallback:()=>xr,hrtime:()=>ze,kill:()=>pr,listeners:()=>zr,memoryUsage:()=>lr,moduleLoadList:()=>Qt,nextTick:()=>Pt,off:()=>jr,on:()=>te,once:()=>Or,openStdin:()=>cr,pid:()=>Br,platform:()=>Dt,ppid:()=>Sr,prependListener:()=>Gr,prependOnceListener:()=>Kr,reallyExit:()=>sr,release:()=>Yt,removeAllListeners:()=>Wr,removeListener:()=>Vr,resourceUsage:()=>ur,setSourceMapsEnabled:()=>Pr,setUncaughtExceptionCaptureCallback:()=>gr,stderr:()=>Ir,stdin:()=>kr,stdout:()=>Er,title:()=>Mt,umask:()=>Kt,uptime:()=>Ur,version:()=>Vt,versions:()=>Wt});function ht(l){throw new Error("Node.js process "+l+" is not supported by JSPM core outside of Node.js")}function si(){!Ee||!fe||(Ee=!1,fe.length?ee=fe.concat(ee):Ke=-1,ee.length&&Ft())}function Ft(){if(!Ee){var l=setTimeout(si,0);Ee=!0;for(var r=ee.length;r;){for(fe=ee,ee=[];++Ke<r;)fe&&fe[Ke].run();Ke=-1,r=ee.length}fe=null,Ee=!1,clearTimeout(l)}}function Pt(l){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];ee.push(new Ut(l,r)),ee.length===1&&!Ee&&setTimeout(Ft,0)}function Ut(l,r){this.fun=l,this.array=r}function V(){}function Zt(l){ht("_linkedBinding")}function nr(l){ht("dlopen")}function ir(){return[]}function or(){return[]}function mr(l,r){if(!l)throw new Error(r||"assertion error")}function xr(){return!1}function Ur(){return pe.now()/1e3}function ze(l){var r=Math.floor((Date.now()-pe.now())*.001),e=pe.now()*.001,i=Math.floor(e)+r,s=Math.floor(e%1*1e9);return l&&(i=i-l[0],s=s-l[1],s<0&&(i--,s+=mt)),[i,s]}function te(){return Hr}function zr(l){return[]}var ee,Ee,fe,Ke,Mt,$t,Dt,_t,Ot,jt,Vt,Wt,qt,Gt,Kt,zt,Ht,Yt,Jt,Xt,Qt,er,tr,rr,sr,ar,He,ur,lr,pr,fr,cr,dr,hr,yr,gr,wr,br,vr,Ar,Tr,Er,Ir,kr,Rr,Br,Sr,Nr,Lr,Cr,Fr,Pr,pe,dt,mt,Mr,$r,Dr,_r,Or,jr,Vr,Wr,qr,Gr,Kr,Hr,Yr=Te(()=>{"use strict";c();m();d();ee=[],Ee=!1,Ke=-1;Ut.prototype.run=function(){this.fun.apply(null,this.array)};Mt="browser",$t="x64",Dt="browser",_t={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Ot=["/usr/bin/node"],jt=[],Vt="v16.8.0",Wt={},qt=function(l,r){console.warn((r?r+": ":"")+l)},Gt=function(l){ht("binding")},Kt=function(l){return 0},zt=function(){return"/"},Ht=function(l){},Yt={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Jt=!0,Xt=V,Qt=[];er={},tr=!1,rr={};sr=V,ar=V,He=function(){return{}},ur=He,lr=He,pr=V,fr=V,cr=V,dr={};hr={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},yr=V,gr=V;wr=V,br=V,vr=V,Ar=V,Tr=V,Er=void 0,Ir=void 0,kr=void 0,Rr=V,Br=2,Sr=1,Nr="/bin/usr/node",Lr=9229,Cr="node",Fr=[],Pr=V,pe={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};pe.now===void 0&&(dt=Date.now(),pe.timing&&pe.timing.navigationStart&&(dt=pe.timing.navigationStart),pe.now=()=>Date.now()-dt);mt=1e9;ze.bigint=function(l){var r=ze(l);return typeof BigInt>"u"?r[0]*mt+r[1]:BigInt(r[0]*mt)+BigInt(r[1])};Mr=10,$r={},Dr=0;_r=te,Or=te,jr=te,Vr=te,Wr=te,qr=V,Gr=te,Kr=te;Hr={version:Vt,versions:Wt,arch:$t,platform:Dt,browser:Jt,release:Yt,_rawDebug:Xt,moduleLoadList:Qt,binding:Gt,_linkedBinding:Zt,_events:$r,_eventsCount:Dr,_maxListeners:Mr,on:te,addListener:_r,once:Or,off:jr,removeListener:Vr,removeAllListeners:Wr,emit:qr,prependListener:Gr,prependOnceListener:Kr,listeners:zr,domain:er,_exiting:tr,config:rr,dlopen:nr,uptime:Ur,_getActiveRequests:ir,_getActiveHandles:or,reallyExit:sr,_kill:ar,cpuUsage:He,resourceUsage:ur,memoryUsage:lr,kill:pr,exit:fr,openStdin:cr,allowedNodeEnvironmentFlags:dr,assert:mr,features:hr,_fatalExceptions:yr,setUncaughtExceptionCaptureCallback:gr,hasUncaughtExceptionCaptureCallback:xr,emitWarning:qt,nextTick:Pt,_tickCallback:wr,_debugProcess:br,_debugEnd:vr,_startProfilerIdleNotifier:Ar,_stopProfilerIdleNotifier:Tr,stdout:Er,stdin:kr,stderr:Ir,abort:Rr,umask:Kt,chdir:Ht,cwd:zt,env:_t,title:Mt,argv:Ot,execArgv:jt,pid:Br,ppid:Sr,execPath:Nr,debugPort:Lr,hrtime:ze,argv0:Cr,_preload_modules:Fr,setSourceMapsEnabled:Pr}});var d=Te(()=>{"use strict";Yr()});function ai(){if(Jr)return Re;Jr=!0,Re.byteLength=T,Re.toByteArray=k,Re.fromByteArray=D;for(var l=[],r=[],e=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=i.length;s<f;++s)l[s]=i[s],r[i.charCodeAt(s)]=s;r[45]=62,r[95]=63;function u(E){var I=E.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=E.indexOf("=");C===-1&&(C=I);var O=C===I?0:4-C%4;return[C,O]}function T(E){var I=u(E),C=I[0],O=I[1];return(C+O)*3/4-O}function b(E,I,C){return(I+C)*3/4-C}function k(E){var I,C=u(E),O=C[0],G=C[1],_=new e(b(E,O,G)),K=0,H=G>0?O-4:O,W;for(W=0;W<H;W+=4)I=r[E.charCodeAt(W)]<<18|r[E.charCodeAt(W+1)]<<12|r[E.charCodeAt(W+2)]<<6|r[E.charCodeAt(W+3)],_[K++]=I>>16&255,_[K++]=I>>8&255,_[K++]=I&255;return G===2&&(I=r[E.charCodeAt(W)]<<2|r[E.charCodeAt(W+1)]>>4,_[K++]=I&255),G===1&&(I=r[E.charCodeAt(W)]<<10|r[E.charCodeAt(W+1)]<<4|r[E.charCodeAt(W+2)]>>2,_[K++]=I>>8&255,_[K++]=I&255),_}function R(E){return l[E>>18&63]+l[E>>12&63]+l[E>>6&63]+l[E&63]}function L(E,I,C){for(var O,G=[],_=I;_<C;_+=3)O=(E[_]<<16&16711680)+(E[_+1]<<8&65280)+(E[_+2]&255),G.push(R(O));return G.join("")}function D(E){for(var I,C=E.length,O=C%3,G=[],_=16383,K=0,H=C-O;K<H;K+=_)G.push(L(E,K,K+_>H?H:K+_));return O===1?(I=E[C-1],G.push(l[I>>2]+l[I<<4&63]+"==")):O===2&&(I=(E[C-2]<<8)+E[C-1],G.push(l[I>>10]+l[I>>4&63]+l[I<<2&63]+"=")),G.join("")}return Re}function ui(){if(Xr)return Ye;Xr=!0;return Ye.read=function(l,r,e,i,s){var f,u,T=s*8-i-1,b=(1<<T)-1,k=b>>1,R=-7,L=e?s-1:0,D=e?-1:1,E=l[r+L];for(L+=D,f=E&(1<<-R)-1,E>>=-R,R+=T;R>0;f=f*256+l[r+L],L+=D,R-=8);for(u=f&(1<<-R)-1,f>>=-R,R+=i;R>0;u=u*256+l[r+L],L+=D,R-=8);if(f===0)f=1-k;else{if(f===b)return u?NaN:(E?-1:1)*(1/0);u=u+Math.pow(2,i),f=f-k}return(E?-1:1)*u*Math.pow(2,f-i)},Ye.write=function(l,r,e,i,s,f){var u,T,b,k=f*8-s-1,R=(1<<k)-1,L=R>>1,D=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=i?0:f-1,I=i?1:-1,C=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(T=isNaN(r)?1:0,u=R):(u=Math.floor(Math.log(r)/Math.LN2),r*(b=Math.pow(2,-u))<1&&(u--,b*=2),u+L>=1?r+=D/b:r+=D*Math.pow(2,1-L),r*b>=2&&(u++,b/=2),u+L>=R?(T=0,u=R):u+L>=1?(T=(r*b-1)*Math.pow(2,s),u=u+L):(T=r*Math.pow(2,L-1)*Math.pow(2,s),u=0));s>=8;l[e+E]=T&255,E+=I,T/=256,s-=8);for(u=u<<s|T,k+=s;k>0;l[e+E]=u&255,E+=I,u/=256,k-=8);l[e+E-I]|=C*128},Ye}function Zr(){if(Qr)return ce;Qr=!0;let l=ai(),r=ui(),e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ce.Buffer=u,ce.SlowBuffer=G,ce.INSPECT_MAX_BYTES=50;let i=2147483647;ce.kMaxLength=i,u.TYPED_ARRAY_SUPPORT=s(),!u.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 s(){try{let o=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(o,t),o.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function f(o){if(o>i)throw new RangeError('The value "'+o+'" is invalid for option "size"');let t=new Uint8Array(o);return Object.setPrototypeOf(t,u.prototype),t}function u(o,t,n){if(typeof o=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(o)}return T(o,t,n)}u.poolSize=8192;function T(o,t,n){if(typeof o=="string")return L(o,t);if(ArrayBuffer.isView(o))return E(o);if(o==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(Q(o,ArrayBuffer)||o&&Q(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Q(o,SharedArrayBuffer)||o&&Q(o.buffer,SharedArrayBuffer)))return I(o,t,n);if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let a=o.valueOf&&o.valueOf();if(a!=null&&a!==o)return u.from(a,t,n);let p=C(o);if(p)return p;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof o[Symbol.toPrimitive]=="function")return u.from(o[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}u.from=function(o,t,n){return T(o,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function b(o){if(typeof o!="number")throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function k(o,t,n){return b(o),o<=0?f(o):t!==void 0?typeof n=="string"?f(o).fill(t,n):f(o).fill(t):f(o)}u.alloc=function(o,t,n){return k(o,t,n)};function R(o){return b(o),f(o<0?0:O(o)|0)}u.allocUnsafe=function(o){return R(o)},u.allocUnsafeSlow=function(o){return R(o)};function L(o,t){if((typeof t!="string"||t==="")&&(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let n=_(o,t)|0,a=f(n),p=a.write(o,t);return p!==n&&(a=a.slice(0,p)),a}function D(o){let t=o.length<0?0:O(o.length)|0,n=f(t);for(let a=0;a<t;a+=1)n[a]=o[a]&255;return n}function E(o){if(Q(o,Uint8Array)){let t=new Uint8Array(o);return I(t.buffer,t.byteOffset,t.byteLength)}return D(o)}function I(o,t,n){if(t<0||o.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(o.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let a;return t===void 0&&n===void 0?a=new Uint8Array(o):n===void 0?a=new Uint8Array(o,t):a=new Uint8Array(o,t,n),Object.setPrototypeOf(a,u.prototype),a}function C(o){if(u.isBuffer(o)){let t=O(o.length)|0,n=f(t);return n.length===0||o.copy(n,0,0,t),n}if(o.length!==void 0)return typeof o.length!="number"||ft(o.length)?f(0):D(o);if(o.type==="Buffer"&&Array.isArray(o.data))return D(o.data)}function O(o){if(o>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return o|0}function G(o){return+o!=o&&(o=0),u.alloc(+o)}u.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==u.prototype},u.compare=function(t,n){if(Q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),Q(n,Uint8Array)&&(n=u.from(n,n.offset,n.byteLength)),!u.isBuffer(t)||!u.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let a=t.length,p=n.length;for(let h=0,g=Math.min(a,p);h<g;++h)if(t[h]!==n[h]){a=t[h],p=n[h];break}return a<p?-1:p<a?1:0},u.isEncoding=function(t){switch(String(t).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}},u.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return u.alloc(0);let a;if(n===void 0)for(n=0,a=0;a<t.length;++a)n+=t[a].length;let p=u.allocUnsafe(n),h=0;for(a=0;a<t.length;++a){let g=t[a];if(Q(g,Uint8Array))h+g.length>p.length?(u.isBuffer(g)||(g=u.from(g)),g.copy(p,h)):Uint8Array.prototype.set.call(p,g,h);else if(u.isBuffer(g))g.copy(p,h);else throw new TypeError('"list" argument must be an Array of Buffers');h+=g.length}return p};function _(o,t){if(u.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||Q(o,ArrayBuffer))return o.byteLength;if(typeof o!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);let n=o.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&n===0)return 0;let p=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return pt(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Ct(o).length;default:if(p)return a?-1:pt(o).length;t=(""+t).toLowerCase(),p=!0}}u.byteLength=_;function K(o,t,n){let a=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(o||(o="utf8");;)switch(o){case"hex":return Gn(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return Wn(this,t,n);case"latin1":case"binary":return qn(this,t,n);case"base64":return jn(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Kn(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),a=!0}}u.prototype._isBuffer=!0;function H(o,t,n){let a=o[t];o[t]=o[n],o[n]=a}u.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)H(this,n,n+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)H(this,n,n+3),H(this,n+1,n+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)H(this,n,n+7),H(this,n+1,n+6),H(this,n+2,n+5),H(this,n+3,n+4);return this},u.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?Tt(this,0,t):K.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:u.compare(this,t)===0},u.prototype.inspect=function(){let t="",n=ce.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},e&&(u.prototype[e]=u.prototype.inspect),u.prototype.compare=function(t,n,a,p,h){if(Q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(n===void 0&&(n=0),a===void 0&&(a=t?t.length:0),p===void 0&&(p=0),h===void 0&&(h=this.length),n<0||a>t.length||p<0||h>this.length)throw new RangeError("out of range index");if(p>=h&&n>=a)return 0;if(p>=h)return-1;if(n>=a)return 1;if(n>>>=0,a>>>=0,p>>>=0,h>>>=0,this===t)return 0;let g=h-p,B=a-n,M=Math.min(g,B),U=this.slice(p,h),$=t.slice(n,a);for(let F=0;F<M;++F)if(U[F]!==$[F]){g=U[F],B=$[F];break}return g<B?-1:B<g?1:0};function W(o,t,n,a,p){if(o.length===0)return-1;if(typeof n=="string"?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,ft(n)&&(n=p?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(p)return-1;n=o.length-1}else if(n<0)if(p)n=0;else return-1;if(typeof t=="string"&&(t=u.from(t,a)),u.isBuffer(t))return t.length===0?-1:At(o,t,n,a,p);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?p?Uint8Array.prototype.indexOf.call(o,t,n):Uint8Array.prototype.lastIndexOf.call(o,t,n):At(o,[t],n,a,p);throw new TypeError("val must be string, number or Buffer")}function At(o,t,n,a,p){let h=1,g=o.length,B=t.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(o.length<2||t.length<2)return-1;h=2,g/=2,B/=2,n/=2}function M($,F){return h===1?$[F]:$.readUInt16BE(F*h)}let U;if(p){let $=-1;for(U=n;U<g;U++)if(M(o,U)===M(t,$===-1?0:U-$)){if($===-1&&($=U),U-$+1===B)return $*h}else $!==-1&&(U-=U-$),$=-1}else for(n+B>g&&(n=g-B),U=n;U>=0;U--){let $=!0;for(let F=0;F<B;F++)if(M(o,U+F)!==M(t,F)){$=!1;break}if($)return U}return-1}u.prototype.includes=function(t,n,a){return this.indexOf(t,n,a)!==-1},u.prototype.indexOf=function(t,n,a){return W(this,t,n,a,!0)},u.prototype.lastIndexOf=function(t,n,a){return W(this,t,n,a,!1)};function Mn(o,t,n,a){n=Number(n)||0;let p=o.length-n;a?(a=Number(a),a>p&&(a=p)):a=p;let h=t.length;a>h/2&&(a=h/2);let g;for(g=0;g<a;++g){let B=parseInt(t.substr(g*2,2),16);if(ft(B))return g;o[n+g]=B}return g}function $n(o,t,n,a){return qe(pt(t,o.length-n),o,n,a)}function Dn(o,t,n,a){return qe(Jn(t),o,n,a)}function _n(o,t,n,a){return qe(Ct(t),o,n,a)}function On(o,t,n,a){return qe(Xn(t,o.length-n),o,n,a)}u.prototype.write=function(t,n,a,p){if(n===void 0)p="utf8",a=this.length,n=0;else if(a===void 0&&typeof n=="string")p=n,a=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(a)?(a=a>>>0,p===void 0&&(p="utf8")):(p=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-n;if((a===void 0||a>h)&&(a=h),t.length>0&&(a<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");p||(p="utf8");let g=!1;for(;;)switch(p){case"hex":return Mn(this,t,n,a);case"utf8":case"utf-8":return $n(this,t,n,a);case"ascii":case"latin1":case"binary":return Dn(this,t,n,a);case"base64":return _n(this,t,n,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return On(this,t,n,a);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(""+p).toLowerCase(),g=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jn(o,t,n){return t===0&&n===o.length?l.fromByteArray(o):l.fromByteArray(o.slice(t,n))}function Tt(o,t,n){n=Math.min(o.length,n);let a=[],p=t;for(;p<n;){let h=o[p],g=null,B=h>239?4:h>223?3:h>191?2:1;if(p+B<=n){let M,U,$,F;switch(B){case 1:h<128&&(g=h);break;case 2:M=o[p+1],(M&192)===128&&(F=(h&31)<<6|M&63,F>127&&(g=F));break;case 3:M=o[p+1],U=o[p+2],(M&192)===128&&(U&192)===128&&(F=(h&15)<<12|(M&63)<<6|U&63,F>2047&&(F<55296||F>57343)&&(g=F));break;case 4:M=o[p+1],U=o[p+2],$=o[p+3],(M&192)===128&&(U&192)===128&&($&192)===128&&(F=(h&15)<<18|(M&63)<<12|(U&63)<<6|$&63,F>65535&&F<1114112&&(g=F))}}g===null?(g=65533,B=1):g>65535&&(g-=65536,a.push(g>>>10&1023|55296),g=56320|g&1023),a.push(g),p+=B}return Vn(a)}let Et=4096;function Vn(o){let t=o.length;if(t<=Et)return String.fromCharCode.apply(String,o);let n="",a=0;for(;a<t;)n+=String.fromCharCode.apply(String,o.slice(a,a+=Et));return n}function Wn(o,t,n){let a="";n=Math.min(o.length,n);for(let p=t;p<n;++p)a+=String.fromCharCode(o[p]&127);return a}function qn(o,t,n){let a="";n=Math.min(o.length,n);for(let p=t;p<n;++p)a+=String.fromCharCode(o[p]);return a}function Gn(o,t,n){let a=o.length;(!t||t<0)&&(t=0),(!n||n<0||n>a)&&(n=a);let p="";for(let h=t;h<n;++h)p+=Qn[o[h]];return p}function Kn(o,t,n){let a=o.slice(t,n),p="";for(let h=0;h<a.length-1;h+=2)p+=String.fromCharCode(a[h]+a[h+1]*256);return p}u.prototype.slice=function(t,n){let a=this.length;t=~~t,n=n===void 0?a:~~n,t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),n<0?(n+=a,n<0&&(n=0)):n>a&&(n=a),n<t&&(n=t);let p=this.subarray(t,n);return Object.setPrototypeOf(p,u.prototype),p};function j(o,t,n){if(o%1!==0||o<0)throw new RangeError("offset is not uint");if(o+t>n)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(t,n,a){t=t>>>0,n=n>>>0,a||j(t,n,this.length);let p=this[t],h=1,g=0;for(;++g<n&&(h*=256);)p+=this[t+g]*h;return p},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,n,a){t=t>>>0,n=n>>>0,a||j(t,n,this.length);let p=this[t+--n],h=1;for(;n>0&&(h*=256);)p+=this[t+--n]*h;return p},u.prototype.readUint8=u.prototype.readUInt8=function(t,n){return t=t>>>0,n||j(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,n){return t=t>>>0,n||j(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,n){return t=t>>>0,n||j(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,n){return t=t>>>0,n||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,n){return t=t>>>0,n||j(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=le(function(t){t=t>>>0,Ae(t,"offset");let n=this[t],a=this[t+7];(n===void 0||a===void 0)&&ke(t,this.length-8);let p=n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,h=this[++t]+this[++t]*2**8+this[++t]*2**16+a*2**24;return BigInt(p)+(BigInt(h)<<BigInt(32))}),u.prototype.readBigUInt64BE=le(function(t){t=t>>>0,Ae(t,"offset");let n=this[t],a=this[t+7];(n===void 0||a===void 0)&&ke(t,this.length-8);let p=n*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],h=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+a;return(BigInt(p)<<BigInt(32))+BigInt(h)}),u.prototype.readIntLE=function(t,n,a){t=t>>>0,n=n>>>0,a||j(t,n,this.length);let p=this[t],h=1,g=0;for(;++g<n&&(h*=256);)p+=this[t+g]*h;return h*=128,p>=h&&(p-=Math.pow(2,8*n)),p},u.prototype.readIntBE=function(t,n,a){t=t>>>0,n=n>>>0,a||j(t,n,this.length);let p=n,h=1,g=this[t+--p];for(;p>0&&(h*=256);)g+=this[t+--p]*h;return h*=128,g>=h&&(g-=Math.pow(2,8*n)),g},u.prototype.readInt8=function(t,n){return t=t>>>0,n||j(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},u.prototype.readInt16LE=function(t,n){t=t>>>0,n||j(t,2,this.length);let a=this[t]|this[t+1]<<8;return a&32768?a|4294901760:a},u.prototype.readInt16BE=function(t,n){t=t>>>0,n||j(t,2,this.length);let a=this[t+1]|this[t]<<8;return a&32768?a|4294901760:a},u.prototype.readInt32LE=function(t,n){return t=t>>>0,n||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,n){return t=t>>>0,n||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=le(function(t){t=t>>>0,Ae(t,"offset");let n=this[t],a=this[t+7];(n===void 0||a===void 0)&&ke(t,this.length-8);let p=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(a<<24);return(BigInt(p)<<BigInt(32))+BigInt(n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)}),u.prototype.readBigInt64BE=le(function(t){t=t>>>0,Ae(t,"offset");let n=this[t],a=this[t+7];(n===void 0||a===void 0)&&ke(t,this.length-8);let p=(n<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(p)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+a)}),u.prototype.readFloatLE=function(t,n){return t=t>>>0,n||j(t,4,this.length),r.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,n){return t=t>>>0,n||j(t,4,this.length),r.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,n){return t=t>>>0,n||j(t,8,this.length),r.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,n){return t=t>>>0,n||j(t,8,this.length),r.read(this,t,!1,52,8)};function z(o,t,n,a,p,h){if(!u.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>p||t<h)throw new RangeError('"value" argument is out of bounds');if(n+a>o.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,n,a,p){if(t=+t,n=n>>>0,a=a>>>0,!p){let B=Math.pow(2,8*a)-1;z(this,t,n,a,B,0)}let h=1,g=0;for(this[n]=t&255;++g<a&&(h*=256);)this[n+g]=t/h&255;return n+a},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,n,a,p){if(t=+t,n=n>>>0,a=a>>>0,!p){let B=Math.pow(2,8*a)-1;z(this,t,n,a,B,0)}let h=a-1,g=1;for(this[n+h]=t&255;--h>=0&&(g*=256);)this[n+h]=t/g&255;return n+a},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,1,255,0),this[n]=t&255,n+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,2,65535,0),this[n]=t&255,this[n+1]=t>>>8,n+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=t&255,n+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255,n+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};function It(o,t,n,a,p){Lt(t,a,p,o,n,7);let h=Number(t&BigInt(4294967295));o[n++]=h,h=h>>8,o[n++]=h,h=h>>8,o[n++]=h,h=h>>8,o[n++]=h;let g=Number(t>>BigInt(32)&BigInt(4294967295));return o[n++]=g,g=g>>8,o[n++]=g,g=g>>8,o[n++]=g,g=g>>8,o[n++]=g,n}function kt(o,t,n,a,p){Lt(t,a,p,o,n,7);let h=Number(t&BigInt(4294967295));o[n+7]=h,h=h>>8,o[n+6]=h,h=h>>8,o[n+5]=h,h=h>>8,o[n+4]=h;let g=Number(t>>BigInt(32)&BigInt(4294967295));return o[n+3]=g,g=g>>8,o[n+2]=g,g=g>>8,o[n+1]=g,g=g>>8,o[n]=g,n+8}u.prototype.writeBigUInt64LE=le(function(t,n=0){return It(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=le(function(t,n=0){return kt(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,n,a,p){if(t=+t,n=n>>>0,!p){let M=Math.pow(2,8*a-1);z(this,t,n,a,M-1,-M)}let h=0,g=1,B=0;for(this[n]=t&255;++h<a&&(g*=256);)t<0&&B===0&&this[n+h-1]!==0&&(B=1),this[n+h]=(t/g>>0)-B&255;return n+a},u.prototype.writeIntBE=function(t,n,a,p){if(t=+t,n=n>>>0,!p){let M=Math.pow(2,8*a-1);z(this,t,n,a,M-1,-M)}let h=a-1,g=1,B=0;for(this[n+h]=t&255;--h>=0&&(g*=256);)t<0&&B===0&&this[n+h+1]!==0&&(B=1),this[n+h]=(t/g>>0)-B&255;return n+a},u.prototype.writeInt8=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=t&255,n+1},u.prototype.writeInt16LE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,2,32767,-32768),this[n]=t&255,this[n+1]=t>>>8,n+2},u.prototype.writeInt16BE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=t&255,n+2},u.prototype.writeInt32LE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,4,2147483647,-2147483648),this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4},u.prototype.writeInt32BE=function(t,n,a){return t=+t,n=n>>>0,a||z(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4},u.prototype.writeBigInt64LE=le(function(t,n=0){return It(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=le(function(t,n=0){return kt(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rt(o,t,n,a,p,h){if(n+a>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Bt(o,t,n,a,p){return t=+t,n=n>>>0,p||Rt(o,t,n,4),r.write(o,t,n,a,23,4),n+4}u.prototype.writeFloatLE=function(t,n,a){return Bt(this,t,n,!0,a)},u.prototype.writeFloatBE=function(t,n,a){return Bt(this,t,n,!1,a)};function St(o,t,n,a,p){return t=+t,n=n>>>0,p||Rt(o,t,n,8),r.write(o,t,n,a,52,8),n+8}u.prototype.writeDoubleLE=function(t,n,a){return St(this,t,n,!0,a)},u.prototype.writeDoubleBE=function(t,n,a){return St(this,t,n,!1,a)},u.prototype.copy=function(t,n,a,p){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(a||(a=0),!p&&p!==0&&(p=this.length),n>=t.length&&(n=t.length),n||(n=0),p>0&&p<a&&(p=a),p===a||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("sourceEnd out of bounds");p>this.length&&(p=this.length),t.length-n<p-a&&(p=t.length-n+a);let h=p-a;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(n,a,p):Uint8Array.prototype.set.call(t,this.subarray(a,p),n),h},u.prototype.fill=function(t,n,a,p){if(typeof t=="string"){if(typeof n=="string"?(p=n,n=0,a=this.length):typeof a=="string"&&(p=a,a=this.length),p!==void 0&&typeof p!="string")throw new TypeError("encoding must be a string");if(typeof p=="string"&&!u.isEncoding(p))throw new TypeError("Unknown encoding: "+p);if(t.length===1){let g=t.charCodeAt(0);(p==="utf8"&&g<128||p==="latin1")&&(t=g)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(n<0||this.length<n||this.length<a)throw new RangeError("Out of range index");if(a<=n)return this;n=n>>>0,a=a===void 0?this.length:a>>>0,t||(t=0);let h;if(typeof t=="number")for(h=n;h<a;++h)this[h]=t;else{let g=u.isBuffer(t)?t:u.from(t,p),B=g.length;if(B===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(h=0;h<a-n;++h)this[h+n]=g[h%B]}return this};let ve={};function lt(o,t,n){ve[o]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${o}]`,this.stack,delete this.name}get code(){return o}set code(p){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:p,writable:!0})}toString(){return`${this.name} [${o}]: ${this.message}`}}}lt("ERR_BUFFER_OUT_OF_BOUNDS",function(o){return o?`${o} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),lt("ERR_INVALID_ARG_TYPE",function(o,t){return`The "${o}" argument must be of type number. Received type ${typeof t}`},TypeError),lt("ERR_OUT_OF_RANGE",function(o,t,n){let a=`The value of "${o}" is out of range.`,p=n;return Number.isInteger(n)&&Math.abs(n)>2**32?p=Nt(String(n)):typeof n=="bigint"&&(p=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(p=Nt(p)),p+="n"),a+=` It must be ${t}. Received ${p}`,a},RangeError);function Nt(o){let t="",n=o.length,a=o[0]==="-"?1:0;for(;n>=a+4;n-=3)t=`_${o.slice(n-3,n)}${t}`;return`${o.slice(0,n)}${t}`}function zn(o,t,n){Ae(t,"offset"),(o[t]===void 0||o[t+n]===void 0)&&ke(t,o.length-(n+1))}function Lt(o,t,n,a,p,h){if(o>n||o<t){let g=typeof t=="bigint"?"n":"",B;throw t===0||t===BigInt(0)?B=`>= 0${g} and < 2${g} ** ${(h+1)*8}${g}`:B=`>= -(2${g} ** ${(h+1)*8-1}${g}) and < 2 ** ${(h+1)*8-1}${g}`,new ve.ERR_OUT_OF_RANGE("value",B,o)}zn(a,p,h)}function Ae(o,t){if(typeof o!="number")throw new ve.ERR_INVALID_ARG_TYPE(t,"number",o)}function ke(o,t,n){throw Math.floor(o)!==o?(Ae(o,n),new ve.ERR_OUT_OF_RANGE("offset","an integer",o)):t<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,o)}let Hn=/[^+/0-9A-Za-z-_]/g;function Yn(o){if(o=o.split("=")[0],o=o.trim().replace(Hn,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function pt(o,t){t=t||1/0;let n,a=o.length,p=null,h=[];for(let g=0;g<a;++g){if(n=o.charCodeAt(g),n>55295&&n<57344){if(!p){if(n>56319){(t-=3)>-1&&h.push(239,191,189);continue}else if(g+1===a){(t-=3)>-1&&h.push(239,191,189);continue}p=n;continue}if(n<56320){(t-=3)>-1&&h.push(239,191,189),p=n;continue}n=(p-55296<<10|n-56320)+65536}else p&&(t-=3)>-1&&h.push(239,191,189);if(p=null,n<128){if((t-=1)<0)break;h.push(n)}else if(n<2048){if((t-=2)<0)break;h.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;h.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;h.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return h}function Jn(o){let t=[];for(let n=0;n<o.length;++n)t.push(o.charCodeAt(n)&255);return t}function Xn(o,t){let n,a,p,h=[];for(let g=0;g<o.length&&!((t-=2)<0);++g)n=o.charCodeAt(g),a=n>>8,p=n%256,h.push(p),h.push(a);return h}function Ct(o){return l.toByteArray(Yn(o))}function qe(o,t,n,a){let p;for(p=0;p<a&&!(p+n>=t.length||p>=o.length);++p)t[p+n]=o[p];return p}function Q(o,t){return o instanceof t||o!=null&&o.constructor!=null&&o.constructor.name!=null&&o.constructor.name===t.name}function ft(o){return o!==o}let Qn=(function(){let o="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){let a=n*16;for(let p=0;p<16;++p)t[a+p]=o[n]+o[p]}return t})();function le(o){return typeof BigInt>"u"?Zn:o}function Zn(){throw new Error("BigInt not supported")}return ce}var Re,Jr,Ye,Xr,ce,Qr,en=Te(()=>{"use strict";c();m();d();Re={},Jr=!1;Ye={},Xr=!1;ce={},Qr=!1});var de,v,jo,Vo,tn=Te(()=>{"use strict";c();m();d();en();de=Zr();de.Buffer;de.SlowBuffer;de.INSPECT_MAX_BYTES;de.kMaxLength;v=de.Buffer,jo=de.INSPECT_MAX_BYTES,Vo=de.kMaxLength});var m=Te(()=>{"use strict";tn()});var Bo={};ct(Bo,{DynamicSnippetsGenerator:()=>ut});module.exports=oi(Bo);c();m();d();c();m();d();c();m();d();c();m();d();function P(l){throw new Error("Unexpected value: "+JSON.stringify(l))}c();m();d();c();m();d();c();m();d();c();m();d();c();m();d();c();m();d();var li=typeof global=="object"&&global&&global.Object===Object&&global,rn=li;var pi=typeof self=="object"&&self&&self.Object===Object&&self,fi=rn||pi||Function("return this")(),nn=fi;var ci=nn.Symbol,re=ci;c();m();d();var on=Object.prototype,di=on.hasOwnProperty,mi=on.toString,Be=re?re.toStringTag:void 0;function hi(l){var r=di.call(l,Be),e=l[Be];try{l[Be]=void 0;var i=!0}catch{}var s=mi.call(l);return i&&(r?l[Be]=e:delete l[Be]),s}var sn=hi;c();m();d();var yi=Object.prototype,gi=yi.toString;function xi(l){return gi.call(l)}var an=xi;var wi="[object Null]",bi="[object Undefined]",un=re?re.toStringTag:void 0;function vi(l){return l==null?l===void 0?bi:wi:un&&un in Object(l)?sn(l):an(l)}var ln=vi;c();m();d();function Ai(l){return l!=null&&typeof l=="object"}var pn=Ai;var Ti="[object Symbol]";function Ei(l){return typeof l=="symbol"||pn(l)&&ln(l)==Ti}var fn=Ei;c();m();d();c();m();d();function Ii(l,r){for(var e=-1,i=l==null?0:l.length,s=Array(i);++e<i;)s[e]=r(l[e],e,l);return s}var cn=Ii;c();m();d();var ki=Array.isArray,dn=ki;var Ri=1/0,mn=re?re.prototype:void 0,hn=mn?mn.toString:void 0;function yn(l){if(typeof l=="string")return l;if(dn(l))return cn(l,yn)+"";if(fn(l))return hn?hn.call(l):"";var r=l+"";return r=="0"&&1/l==-Ri?"-0":r}var gn=yn;c();m();d();function Bi(l){return l==null?"":gn(l)}var xn=Bi;c();m();d();c();m();d();c();m();d();c();m();d();function Si(l,r,e){var i=-1,s=l.length;r<0&&(r=-r>s?0:s+r),e=e>s?s:e,e<0&&(e+=s),s=r>e?0:e-r>>>0,r>>>=0;for(var f=Array(s);++i<s;)f[i]=l[i+r];return f}var wn=Si;function Ni(l,r,e){var i=l.length;return e=e===void 0?i:e,!r&&e>=i?l:wn(l,r,e)}var bn=Ni;c();m();d();var Li="\\ud800-\\udfff",Ci="\\u0300-\\u036f",Fi="\\ufe20-\\ufe2f",Pi="\\u20d0-\\u20ff",Ui=Ci+Fi+Pi,Mi="\\ufe0e\\ufe0f",$i="\\u200d",Di=RegExp("["+$i+Li+Ui+Mi+"]");function _i(l){return Di.test(l)}var Je=_i;c();m();d();c();m();d();function Oi(l){return l.split("")}var vn=Oi;c();m();d();var An="\\ud800-\\udfff",ji="\\u0300-\\u036f",Vi="\\ufe20-\\ufe2f",Wi="\\u20d0-\\u20ff",qi=ji+Vi+Wi,Gi="\\ufe0e\\ufe0f",Ki="["+An+"]",yt="["+qi+"]",gt="\\ud83c[\\udffb-\\udfff]",zi="(?:"+yt+"|"+gt+")",Tn="[^"+An+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",In="[\\ud800-\\udbff][\\udc00-\\udfff]",Hi="\\u200d",kn=zi+"?",Rn="["+Gi+"]?",Yi="(?:"+Hi+"(?:"+[Tn,En,In].join("|")+")"+Rn+kn+")*",Ji=Rn+kn+Yi,Xi="(?:"+[Tn+yt+"?",yt,En,In,Ki].join("|")+")",Qi=RegExp(gt+"(?="+gt+")|"+Xi+Ji,"g");function Zi(l){return l.match(Qi)||[]}var Bn=Zi;function eo(l){return Je(l)?Bn(l):vn(l)}var Sn=eo;function to(l){return function(r){r=xn(r);var e=Je(r)?Sn(r):void 0,i=e?e[0]:r.charAt(0),s=e?bn(e,1).join(""):r.slice(1);return i[l]()+s}}var Nn=to;var ro=Nn("toUpperCase"),xt=ro;c();m();d();function Se(l){return Object.keys(l)}c();m();d();c();m();d();c();m();d();var Ne=w.env.FERN_STACK_TRACK?.toLowerCase()??"",Z=Ne!==""&&Ne!=="0"&&Ne!=="false",wt=["single","multiline","box"].includes(Ne)?Ne:"single";Z&&(Error.stackTraceLimit=50);var no=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),io=new Set(["stacktrace"]);function Qe({maxFrames:l=50,skip:r=0,filterPaths:e=[],filterFunctions:i=[],stopOn:s=[],filterNode:f=!0,filterJs:u=!0,formatFilename:T=b=>b}={}){if(!Z)return[];i=[...i,...no],e=[...e,...io],s=[...s,"runInteractiveTask"];let b=!1;return(new Error().stack??"").split(`
|
|
2
|
+
`).map(k=>{let R=k.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(R&&R.length===5){let[,L,D,E,I]=R;if(!L||!D||!E||!I)return;if(b||s.some(C=>L?.includes(C))){b=!0;return}switch(L){case"Object.<anonymous>":L="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":L=`${L.substring(L.indexOf(".")+1)}()=> { ... }`;break}return{fn:L,path:T(D),position:`${E}:${I}`}}}).filter(k=>k&&!i.some(R=>k.fn.includes(R))&&!(f&&k.path?.startsWith("node:"))&&!(u&&k.path?.endsWith(".js"))&&!e.some(R=>k.path.includes(R))).slice(r,r+l)}var Xe=class{constructor({maxFrames:r=50,skip:e=0,filterPaths:i=[],filterFunctions:s=[],stopOn:f=[],filterNode:u=!0,filterJs:T=!0,multiline:b=!1,formatFilename:k=R=>R}={}){y(this,"maxFrames");y(this,"skip");y(this,"filterPaths");y(this,"filterFunctions");y(this,"stopOn");y(this,"filterNode");y(this,"filterJs");y(this,"multiline");y(this,"formatFilename");y(this,"tracking",new WeakMap);this.maxFrames=r,this.skip=e,this.filterPaths=i,this.filterFunctions=s,this.stopOn=f,this.filterNode=u,this.filterJs=T,this.multiline=b,this.formatFilename=k}tag(r){let e=this.tracking.get(r)||new Set;Qe({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(i=>e.add(i)),this.tracking.set(r,e)}trace(r){if(!Z)return"";let e=this.tracking.get(r);return e?[...e].map(i=>`${this.multiline?`
|
|
3
|
+
`:""}${i.fn} - ${i.path}:${i.position}`).join(""):""}frames(r){let e=this.tracking.get(r);return e?[...e]:[]}free(r){this.tracking.delete(r)}clear(){this.tracking=new WeakMap}},bt;function Ln({maxFrames:l=50,skip:r=0,filterPaths:e=[],filterFunctions:i=[],stopOn:s=[],filterNode:f=!0,filterJs:u=!0,multiline:T=!1,formatFilename:b=k=>k}={}){Z&&(bt??(bt=new Xe({maxFrames:l,skip:r,filterPaths:e,filterFunctions:i,stopOn:s,filterNode:f,filterJs:u,multiline:T,formatFilename:b})))}function Cn(l){bt?.tag(l)}function vt(l){return bt?.frames(l)??[]}var me=class{constructor(){Cn(this)}};c();m();d();var Ze=class{formatMultiple(r){return Promise.all(r.map(e=>this.format(e)))}formatMultipleSync(r){return r.map(e=>this.formatSync(e))}},Le=class extends Ze{async format(r){return r}formatSync(r){return r}};c();m();d();c();m();d();c();m();d();var J=class extends me{constructor(e){super();y(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 oo=4;Ln({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var Ce=class{constructor(){y(this,"lineBuffer",[]);y(this,"indentLevel",0);y(this,"hasWrittenAnything",!1);y(this,"lastCharacterIsSemicolon",!1);y(this,"lastCharacterIsNewline",!1);y(this,"nodeStackFrames",[])}get buffer(){return Z&&this.nodeStackFrames.length>0&&this.writeInternal(`
|
|
4
|
+
`),this.lineBuffer.join(`
|
|
5
|
+
`)+(this.lastCharacterIsNewline?`
|
|
6
|
+
`:"")}write(...r){for(let e of r)if(e!=null)if(typeof e=="string"){let i=e.length>0&&e.endsWith(`
|
|
7
|
+
`),s=i?e.substring(0,e.length-1):e,f=this.getIndentString(),u=s.replaceAll(`
|
|
8
|
+
`,`
|
|
9
|
+
${f}`);this.isAtStartOfLine()&&(u=f+u),i&&(u+=`
|
|
10
|
+
`),this.writeInternal(u)}else this.writeNode(e)}writeStatement(...r){this.write(...r),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(r){let e=this.indentLevel;this.indentLevel=0,this.write(r),this.indentLevel=e}writeNode(r){Z&&this.nodeStackFrames.push(...vt(r)),r.write(this),Z&&wt!=="single"&&this.writeInternal(`
|
|
11
|
+
`)}writeNodeOrString(r){if(typeof r=="string"){this.write(r);return}this.writeNode(r)}writeNodeStatement(r){this.writeNode(r),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(r){new J(r).write(this),r.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(r,e){new J(r).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(r){new J(r).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(r,e){this.dedent(),this.write("} "),new J(r).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(r){this.dedent(),this.write("} "),new J(r).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(r=!0){this.dedent(),this.writeNewLineIfLastLineNot(),r?this.writeLine("}"):this.write("}")}writeLine(...r){this.write(...r.length===0?[""]:r),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
|
|
12
|
+
`)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
|
|
13
|
+
`)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:r,delimiter:e,writeFunction:i}){if(r.length>0){let s=r[0];s!=null&&i(s);for(let f=1;f<r.length;f++){this.write(e);let u=r[f];u!=null&&i(u)}}}toString(){return this.buffer}writeInternal(r){if(r.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=r.endsWith(`
|
|
14
|
+
`),this.lastCharacterIsSemicolon=r.endsWith(";");let i=r.split(`
|
|
15
|
+
`),s=Z&&!this.shouldSkipTracking(i)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${i.shift()||""}`),this.lastCharacterIsNewline&&i.pop(),this.lineBuffer.push(...i),s&&this.appendTrackingComment()}set lastLine(r){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=r:this.lineBuffer.push(r)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(r){return!1}formatStack(r,e=""){return r.map(i=>`${e?`(${e}) `:""} ${i.fn} - ${i.path} : ${i.position}`)}filterStack(r){return r.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let r=[...this.formatStack(this.filterStack(Qe({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,wt){case"single":return this.singleLineTrackingComment(r);case"multiline":return this.multiLineTrackingComment(r);case"box":return this.boxTrackingComment(r)}}singleLineTrackingComment(r){this.lastLine=`${this.lastLine} // ${r.join(" ")}`}multiLineTrackingComment(r){this.lineBuffer.push(...r.map(e=>` // ${e}`))}boxTrackingComment(r){this.lineBuffer.push("/*",...r.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return oo}};c();m();d();c();m();d();c();m();d();var Fe=class{constructor(){y(this,"reporter");y(this,"snippet");y(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:r,snippet:e}){this.shouldUpdate({snippet:e,reporter:r.errors})&&(this.reporter=r.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:r}){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 "${r.method} ${r.path}"`)}shouldUpdate({snippet:r,reporter:e}){return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:r.length>(this.snippet?.length??0)}};var Pe=class{constructor(r){y(this,"context");this.context=r}async generate(r,e={}){let i=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(i.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let s=new Fe;for(let f of i){let u=this.context.clone(),T=this.createSnippetGenerator(u);try{let b=await T.generateSnippet({endpoint:f,request:r,options:e});if(u.errors.empty())return{snippet:b,errors:void 0};s.update({context:u,snippet:b})}catch(b){s.err==null&&(s.err=b)}}return s.getResponseOrThrow({endpoint:r.endpoint})}async generateSnippetAst(r,e={}){let i=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(i.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let s;for(let f of i){let u=this.context.clone(),T=this.createSnippetGenerator(u);try{return await T.generateSnippetAst({endpoint:f,request:r,options:e})}catch(b){s=b}}throw s??new Error(`Failed to generate snippet AST for endpoint: ${r.endpoint.method} ${r.endpoint.path}`)}generateSync(r,e={}){let i=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(i.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let s=new Fe;for(let f of i){let u=this.context.clone(),T=this.createSnippetGenerator(u);try{let b=T.generateSnippetSync({endpoint:f,request:r,options:e});if(u.errors.empty())return{snippet:b,errors:void 0};s.update({context:u,snippet:b})}catch(b){s.err==null&&(s.err=b)}}return s.getResponseOrThrow({endpoint:r.endpoint})}};c();m();d();c();m();d();c();m();d();var Ue=class{constructor(){y(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(r){return this.REFERENCE_REGEX.test(r)?{type:"valid"}:{type:"invalid"}}tryParse(r){if(this.validate(r).type==="invalid")return;let i=r.match(this.REFERENCE_REGEX);if(!(i==null||i[1]==null||i[2]==null))return{method:i[1],path:i[2]}}};c();m();d();var N={Critical:"CRITICAL",Warning:"WARNING"},Me=class l{constructor(){y(this,"errors");y(this,"path");this.errors=[],this.path=[]}add(r){this.errors.push({...r,path:[...this.path]})}scope(r){this.path.push(r)}unscope(){this.path.pop()}getBySeverity(r){return this.errors.filter(e=>e.severity===r)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let r=new l;return r.errors=[...this.errors],r.path=[...this.path],r}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(r=>({severity:r.severity,path:r.path!=null?this.pathToStringArray(r.path):void 0,message:r.message}))}pathToStringArray(r){let e=[];for(let i of r){if(typeof i=="string"){e.push(i);continue}e[e.length-1]+=`[${i.index}]`}return e}};var $e=class{constructor({ir:r,config:e,options:i={}}){y(this,"config");y(this,"options");y(this,"errors");y(this,"_ir");y(this,"httpEndpointReferenceParser");this._ir=r,this.config=e,this.options=i,this.errors=new Me,this.httpEndpointReferenceParser=new Ue}associateQueryParametersByWireValue({parameters:r,values:e}){let i=[];for(let[s,f]of Object.entries(e)){this.errors.scope(s);try{let u=r.find(b=>b.name.wireValue===s);if(u==null)throw this.newParameterNotRecognizedError(s);let T=this.isListTypeReference(u.typeReference)&&!Array.isArray(f)?[f]:f;i.push({name:u.name,typeReference:u.typeReference,value:T})}finally{this.errors.unscope()}}return i}associateByWireValueOrDefault({parameters:r,values:e}){let i=[];for(let s of r){this.errors.scope(s.name.wireValue);try{let f=e[s.name.wireValue];if(f==null)if(s.typeReference.type==="primitive"&&s.typeReference.value==="STRING")f=`<${s.name.wireValue}>`;else{this.errors.add({severity:N.Critical,message:this.newParameterNotRecognizedError(s.name.wireValue).message});continue}i.push({name:s.name,typeReference:s.typeReference,value:f})}finally{this.errors.unscope()}}return i}associateByWireValue({parameters:r,values:e,ignoreMissingParameters:i}){let s=[];for(let[f,u]of Object.entries(e)){this.errors.scope(f);try{let T=r.find(b=>b.name.wireValue===f);if(T==null){if(i)continue;this.errors.add({severity:N.Critical,message:this.newParameterNotRecognizedError(f).message});continue}s.push({name:T.name,typeReference:T.typeReference,value:u})}finally{this.errors.unscope()}}return s}getExampleObjectProperties({parameters:r,snippetObject:e}){let i=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},s=[];for(let f of r){let u=i[f.name.wireValue];u==null?f.typeReference.type==="nullable"&&s.push({name:f.name,typeReference:f.typeReference,value:null}):s.push({name:f.name,typeReference:f.typeReference,value:u})}return s}getSingleFileValue({property:r,record:e}){let i=e[r.wireValue];if(i!=null){if(typeof i!="string"){this.errors.add({severity:N.Critical,message:`Expected file value to be a string, got ${typeof i}`});return}return i}}getFileArrayValues({property:r,record:e}){let i=e[r.wireValue];if(i==null)return;if(!Array.isArray(i)){this.errors.add({severity:N.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}let s=[];for(let f of i){if(typeof f!="string"){this.errors.add({severity:N.Critical,message:`Expected file array value to be an array of strings, got ${typeof f}`});return}s.push(f)}return s}getRecord(r){if(typeof r!="object"||Array.isArray(r)){this.errors.add({severity:N.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(r)?"array":typeof r}`});return}return r??{}}resolveNamedType({typeId:r}){let e=this._ir.types[r];if(e==null){this.errors.add({severity:N.Critical,message:`Type identified by "${r}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:r,value:e}){let i=this.getRecord(e);if(i==null)return;let s=r.discriminant.wireValue,f=i[s];if(f==null){this.errors.add({severity:N.Critical,message:this.newParameterNotRecognizedError(s).message});return}if(typeof f!="string"){this.errors.add({severity:N.Critical,message:`Expected discriminant value to be a string but got: ${typeof f}`});return}let u=r.types[f];if(u==null){this.errors.add({severity:N.Critical,message:`No type found for discriminant value "${f}"`});return}let{[s]:T,...b}=i;return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:b}}resolveEndpointOrThrow(r){let e=this.httpEndpointReferenceParser.tryParse(r);if(e==null)throw new Error(`Failed to parse endpoint reference "${r}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(r){let e=[];for(let i of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:i,parsedEndpoint:r})&&e.push(i);return e}resolveEndpointLocationOrThrow(r){let e=this.resolveEndpointLocation(r);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${r.method} ${r.path}"`);return e}needsRequestParameter({request:r,inlinePathParameters:e,inlineFileProperties:i}){return this.includePathParametersInWrappedRequest({request:r,inlinePathParameters:e})||r.queryParameters!=null&&r.queryParameters.length>0||r.headers!=null&&r.headers.length>0?!0:r.body!=null?this.includeRequestBodyInWrappedRequest({body:r.body,inlineFileProperties:i}):!r.metadata?.onlyPathParameters}includePathParametersInWrappedRequest({request:r,inlinePathParameters:e}){return e&&(r.metadata?.includePathParameters??!1)}isFileUploadRequestBody(r){switch(r.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:P(r)}}resolveEnvironmentName(r){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let i=e.environments.find(s=>s.id===r);return i?.name}case"multipleBaseUrls":{let i=e.environments.find(s=>s.id===r);return i?.name}default:P(e)}}isSingleEnvironmentID(r){return typeof r=="string"}isMultiEnvironmentValues(r){return typeof r=="object"}validateMultiEnvironmentUrlValues(r){if(this._ir.environments==null)return this.errors.add({severity:N.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:N.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let i=e.environments[0];if(i==null)return this.errors.add({severity:N.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let s=new Set(Se(i.urls));for(let f of Se(r))s.has(f)&&s.delete(f);return s.size>0?(this.errors.add({severity:N.Critical,message:`The provided environments are invalid; got: [${Object.keys(r).join(", ")}], expected: [${Se(i.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:r}){if(typeof r!="number"){this.errors.add({severity:N.Critical,message:this.newTypeMismatchError({expected:"number",value:r}).message});return}return r}getValueAsBoolean({value:r}){if(typeof r!="boolean"){this.errors.add({severity:N.Critical,message:this.newTypeMismatchError({expected:"boolean",value:r}).message});return}return r}getValueAsString({value:r}){if(typeof r!="string"){this.errors.add({severity:N.Critical,message:this.newTypeMismatchError({expected:"string",value:r}).message});return}return r}isOptional(r){switch(r.type){case"nullable":return this.isOptional(r.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:r.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(r){switch(r.type){case"nullable":return!0;case"optional":return this.isNullable(r.value);case"named":{let e=this.resolveNamedType({typeId:r.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:r,values:e}){return new Error(`Expected auth type ${r.type}, got ${e.type}`)}newParameterNotRecognizedError(r){return new Error(`"${r}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:r,value:e}){return new Error(`Expected ${r}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:r,inlineFileProperties:e}){switch(r.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:r,inlineFileProperties:e});default:P(r)}}includeFileUploadBodyInWrappedRequest({fileUpload:r,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:r})||e&&this.fileUploadHasFileProperties({fileUpload:r})}fileUploadHasBodyProperties({fileUpload:r}){return r.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:P(e)}})}fileUploadHasFileProperties({fileUpload:r}){return r.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:P(e)}})}isListTypeReference(r){return r.type==="optional"?this.isListTypeReference(r.value):r.type==="list"||r.type==="set"}parsedEndpointMatches({endpoint:r,parsedEndpoint:e}){return r.location.method===e.method&&r.location.path===e.path}};c();m();d();c();m();d();c();m();d();c();m();d();var so=2,Y=class extends Ce{constructor({customConfig:e,formatter:i}){super();y(this,"customConfig");y(this,"formatter");y(this,"requires",new Set);y(this,"_indentLevel",0);this.customConfig=e,this.formatter=i??new Le}addRequire(e){this.requires.add(e)}get currentIndentLevel(){return this._indentLevel}indent(){this._indentLevel++,super.indent()}dedent(){this._indentLevel--,super.dedent()}getTabSize(){return so}};var Ie=class extends Y{constructor({customConfig:r,formatter:e}){super({customConfig:r,formatter:e})}async toStringAsync(){let r=this.getContent();if(this.formatter!=null)try{return this.formatter.format(r)}catch(e){throw new Error(`Failed to format Ruby file: ${e}
|
|
16
|
+
${r}`)}return r}toString(){let r=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(r)}catch(e){throw new Error(`Failed to format Ruby file: ${e}
|
|
17
|
+
${r}`)}return r}getContent(){let r=this.stringifyRequires();return r.length>0?`${r}
|
|
18
|
+
|
|
19
|
+
${this.buffer}`:this.buffer}stringifyRequires(){return Array.from(this.requires).map(r=>`require "${r}"`).join(`
|
|
20
|
+
`)}};var x={};ct(x,{AstNode:()=>S,ClassInstantiation:()=>he,ClassReference:()=>ne,Class_:()=>ue,CodeBlock:()=>ye,KeywordArgument:()=>ge,KeywordParameter:()=>xe,Method:()=>se,MethodInvocation:()=>we,MethodKind:()=>oe,Module_:()=>ae,Parameter:()=>q,Type:()=>ie,TypeLiteral:()=>Ve,TypeParameter:()=>be,Writer:()=>Y,begin:()=>Io,classReference:()=>wo,class_:()=>mo,codeblock:()=>it,comment:()=>go,falseValue:()=>po,ifElse:()=>Eo,instantiateClass:()=>bo,invokeMethod:()=>Ao,keywordArgument:()=>vo,method:()=>yo,module:()=>ho,nilValue:()=>fo,parameters:()=>co,positionalArgument:()=>To,raise:()=>ko,trueValue:()=>lo,typeParameter:()=>xo,wrapInModules:()=>Ro});c();m();d();c();m();d();c();m();d();c();m();d();c();m();d();var S=class extends me{async toStringAsync({customConfig:r,formatter:e}={}){let i=new Ie({customConfig:r??{},formatter:e});return this.write(i),i.toStringAsync()}toString({customConfig:r,formatter:e}={}){let i=new Ie({customConfig:r??{},formatter:e});return this.write(i),i.toString()}typeDefinitionToString({customConfig:r,formatter:e}={}){let i=new Ie({customConfig:r??{},formatter:e});return this.writeTypeDefinition(i),i.toString()}writeTypeDefinition(r){}};var ao=120,uo=2,X=class extends S{constructor({docs:e}){super();y(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
|
|
21
|
+
`).forEach(i=>{this.wrapLine(i,e).forEach(f=>{e.writeLine(`# ${f}`)})})}wrapLine(e,i){let s=i.currentIndentLevel*2,f=ao-s-uo;if(e.length<=f)return[e];if(f<20)return[e];let u=e.split(/(\s+)/),T=[],b="";for(let k of u){if(k===""||b===""&&/^\s+$/.test(k))continue;let R=b+k;R.length<=f?b=R:(b.trim()!==""&&T.push(b.trimEnd()),b=k.trimStart(),b.length>f&&(T.push(b),b=""))}return b.trim()!==""&&T.push(b.trimEnd()),T.length===0?[e]:T}};c();m();d();c();m();d();c();m();d();var ne=class extends S{constructor({name:e,modules:i,fullyQualified:s}){super();y(this,"name");y(this,"modules");y(this,"fullyQualified");this.name=e,this.modules=i??[],this.fullyQualified=s??!1}write(e){if(this.fullyQualified||this.modules.length>0){let i=[...this.modules,this.name].join("::");e.write(i);return}e.write(this.name)}};var ie=class l extends S{constructor(e){super();y(this,"internalType");this.internalType=e}write(e){if(this.internalType)switch(this.internalType?.type){case"integer":e.write("Integer");return;case"string":e.write("String");return;case"class":e.writeNode(this.internalType.reference);return;case"instance":break;case"boolean":e.write("Internal::Types::Boolean");return;case"nil":break;case"top":break;case"bot":break;case"void":break;case"boolish":break;case"union":if(this.internalType.elems.length===2&&this.internalType.elems[1]?.internalType?.type==="nil"){let i=this.internalType.elems[0];i?.write(e)}break;case"intersection":break;case"array":e.write("Internal::Types::Array["),this.internalType.elem.write(e),e.write("]");return;case"hash":e.write("Internal::Types::Hash["),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write("]");return;case"object":e.write("Object");break;case"singleton":break;case"generic":break;case"self":break;case"tuple":break;default:P(this.internalType)}}writeTypeDefinition(e){if(this.internalType)switch(this.internalType.type){case"self":e.write("self");break;case"class":e.write(this.internalType.reference.toString(e));break;case"instance":e.write("instance");break;case"boolean":e.write("bool");break;case"nil":e.write("nil");break;case"top":e.write("top");break;case"bot":e.write("bot");break;case"void":e.write("void");break;case"boolish":e.write("boolish");break;case"string":e.write("String");break;case"integer":e.write("Integer");break;case"union":e.delimit({nodes:this.internalType.elems,delimiter:" | ",writeFunction:i=>i.writeTypeDefinition(e)});break;case"intersection":e.delimit({nodes:this.internalType.elems,delimiter:" & ",writeFunction:i=>i.writeTypeDefinition(e)});break;case"array":e.write("Array["),this.internalType.elem.writeTypeDefinition(e),e.write("]");break;case"hash":e.write("Hash["),this.internalType.keyType.writeTypeDefinition(e),e.write(", "),this.internalType.valueType.writeTypeDefinition(e),e.write("]");break;case"object":e.write(this.internalType.klass);break;case"singleton":e.write("singleton("),e.write(this.internalType.klass),e.write(")");break;case"tuple":e.write("["),e.delimit({nodes:this.internalType.elems,delimiter:", ",writeFunction:i=>i.write(e)}),e.write("]");break;case"generic":e.write(`${this.internalType.baseKlass}[`),e.delimit({nodes:this.internalType.parameters,delimiter:", ",writeFunction:i=>i.writeTypeDefinition(e)}),e.write("]");break;default:P(this.internalType)}else e.write("untyped")}static untyped(){return new this(void 0)}static self(){return new this({type:"self"})}static class_(e){return new this({type:"class",reference:new ne({name:e.name,modules:e.modules,fullyQualified:!0})})}static instance(){return new this({type:"instance"})}static boolean(){return new this({type:"boolean"})}static nil(){return new this({type:"nil"})}static top(){return new this({type:"top"})}static bot(){return new this({type:"bot"})}static void(){return new this({type:"void"})}static boolish(){return new this({type:"boolish"})}static string(){return new this({type:"string"})}static integer(){return new this({type:"integer"})}static union(e){return new this({type:"union",elems:e})}static intersection(e){return new this({type:"intersection",elems:e})}static array(e){return new this({type:"array",elem:e})}static hash(e,i){return new this({type:"hash",keyType:e,valueType:i})}static object(e){return new this({type:"object",klass:e})}static singleton(e){return new this({type:"singleton",klass:e})}static tuple(e){return new this({type:"tuple",elems:e})}static generic(e,i){return new this({type:"generic",baseKlass:e,parameters:i})}static nilable(e){return l.union([e,l.nil()])}nilable(){return l.nilable(this)}};var oe={Instance:"instance",Class_:"class"},Fn={Public:"public",Private:"private",Protected:"protected"},se=class extends S{constructor({name:e,docstring:i,kind:s,visibility:f,parameters:u,returnType:T,statements:b,splatOptionDocs:k}){super();y(this,"name");y(this,"docstring");y(this,"kind");y(this,"positionalParameters");y(this,"keywordParameters");y(this,"positionalSplatParameter");y(this,"keywordSplatParameter");y(this,"yieldParameter");y(this,"visibility");y(this,"statements");y(this,"returnType");y(this,"splatOptionDocs");this.name=e,this.docstring=i,this.kind=s??oe.Instance,this.visibility=f??Fn.Public,this.positionalParameters=u?.positional??[],this.keywordParameters=u?.keyword??[],this.positionalSplatParameter=u?.positionalSplat,this.keywordSplatParameter=u?.keywordSplat,this.yieldParameter=u?.yield,this.returnType=T??ie.untyped(),this.statements=b??[],this.splatOptionDocs=k??[]}addStatement(e){this.statements.push(e)}write(e){this.docstring&&new X({docs:this.docstring}).write(e);let i=this.positionalParameters.length>0||this.keywordParameters.length>0||this.keywordSplatParameter!=null;this.docstring&&i&&e.writeLine("#");for(let s of this.positionalParameters){e.write(`# @option ${s.name} [`);let f=new Y({customConfig:e.customConfig});s.type.writeTypeDefinition(f),e.write(this.normalizeForYard(f.toString())),e.write("]"),e.newLine()}for(let s of this.keywordParameters){e.write(`# @param ${s.name} [`);let f=new Y({customConfig:e.customConfig});s.type.writeTypeDefinition(f),e.write(this.normalizeForYard(f.toString())),e.write("]"),s.docs&&e.write(` ${s.docs}`),e.newLine()}if(this.keywordSplatParameter!=null){e.write(`# @param ${this.keywordSplatParameter.name} [`);let s=new Y({customConfig:e.customConfig});this.keywordSplatParameter.type.writeTypeDefinition(s),e.write(this.normalizeForYard(s.toString())),e.write("]"),this.keywordSplatParameter.docs&&e.write(` ${this.keywordSplatParameter.docs}`),e.newLine()}for(let s of this.splatOptionDocs)e.writeLine(`# ${s}`);if(this.returnType!=null){(i||this.docstring)&&e.writeLine("#"),e.write("# @return [");let s=new Y({customConfig:e.customConfig});this.returnType.writeTypeDefinition(s),e.write(this.normalizeForYard(s.toString())),e.write("]"),e.newLine()}switch(this.visibility!==Fn.Public&&(e.write(this.visibility),this.kind===oe.Class_&&e.write("_class_method"),e.write(" ")),this.kind){case oe.Instance:e.write(`def ${this.name}`);break;case oe.Class_:e.write(`def self.${this.name}`);break}this.parameters.length&&(e.write("("),e.delimit({nodes:this.parameters,delimiter:", ",writeFunction:s=>s.write(e)}),e.write(")")),this.statements.length?(e.newLine(),e.indent(),this.statements.forEach((s,f)=>{s.write(e),f<this.statements.length-1&&e.newLine()}),e.writeNewLineIfLastLineNot(),e.dedent(),e.write("end")):e.write("; end"),e.newLine()}writeTypeDefinition(e){e.write(`def ${this.name}: (`),this.parameters.forEach((i,s)=>{i.writeTypeDefinition(e),s<this.parameters.length-1&&e.write(", ")}),e.write(") -> "),this.returnType.writeTypeDefinition(e)}normalizeForYard(e){let i=e.replace(/\s*\|\s*/g,", ");return i=i.replace(/\bbool\b/g,"Boolean"),i=i.replace(/(^|,\s*)nil(?:,\s*nil)+(?=,|\]|$)/g,"$1nil"),i=i.replace(/Hash\[untyped,\s*untyped\]/g,"Hash"),i}get parameters(){return[...this.positionalParameters,...this.keywordParameters,this.positionalSplatParameter,this.keywordSplatParameter,this.yieldParameter].flatMap(e=>e!==void 0?e:[])}};c();m();d();var ae=class l extends S{constructor({name:e,namespace:i,typeParameters:s,docstring:f,statements:u}){super();y(this,"name");y(this,"namespace");y(this,"typeParameters");y(this,"docstring");y(this,"statements");this.name=e,this.namespace=i??new Set,this.typeParameters=s??[],this.docstring=f,this.statements=u??[],this.populateChildNamespaces()}addStatement(e){this.statements.push(e)}write(e){this.docstring&&new X({docs:this.docstring}).write(e),e.write(`module ${this.name}`),this.statements.length?(e.newLine(),e.indent(),this.statements.forEach((i,s)=>{i.write(e),s<this.statements.length-1&&e.newLine()}),e.dedent(),e.write("end")):e.write("; end"),e.newLine()}writeTypeDefinition(e){e.write(`module ${this.name}`),this.typeParameters.length&&(e.write("["),e.delimit({nodes:this.typeParameters,delimiter:", ",writeFunction:i=>i.writeTypeDefinition(e)}),e.write("]")),e.newLine(),this.statements.length&&(e.indent(),this.statements.forEach(i=>{i.writeTypeDefinition(e),e.newLine()}),e.dedent()),e.write("end")}populateChildNamespaces(){this.statements.filter(e=>e instanceof l||e instanceof ue).forEach(e=>{e.namespace=new Set([...this.namespace,this]),e.populateChildNamespaces()})}get fullyQualifiedNamespace(){return[...this.namespace,this].map(e=>e.name).join("::")}};var ue=class extends ae{constructor({name:e,superclass:i,typeParameters:s,docstring:f,statements:u}){super({name:e,docstring:f,typeParameters:s});y(this,"superclass");y(this,"statements");y(this,"methods",[]);this.superclass=i,this.statements=u??[]}addStatement(e){this.statements.push(e)}addStatements(e){this.statements.push(...e)}addInstanceMethod(e,i,s){let f=new se({name:e,kind:oe.Instance,returnType:i,statements:s});this.addMethod(f)}addMethod(e){this.methods.push(e)}addMethods(e){e.forEach(i=>this.addMethod(i))}write(e){if(this.docstring&&new X({docs:this.docstring}).write(e),e.write(`class ${this.name}`),this.superclass&&(e.write(" < "),this.superclass.write(e)),!this.hasBody()){e.writeLine("; end");return}this.statements.length&&(e.newLine(),e.indent(),this.statements.forEach((i,s)=>{i.write(e),e.newLine()}),e.dedent()),this.methods.length&&(e.newLine(),e.indent(),this.methods.forEach(i=>{i.write(e)}),e.dedent()),e.writeLine("end")}hasBody(){return this.statements.length>0||this.methods.length>0}writeTypeDefinition(e){e.write(`class ${this.name}`),this.typeParameters.length&&(e.write("["),e.delimit({nodes:this.typeParameters,delimiter:", ",writeFunction:i=>i.writeTypeDefinition(e)}),e.write("]")),this.superclass&&(e.write(" < "),this.superclass.write(e)),e.newLine(),this.statements.length&&(e.indent(),this.statements.forEach(i=>{i.writeTypeDefinition(e),e.newLine()}),e.dedent()),e.write("end")}};c();m();d();var he=class extends S{constructor({classReference:e,arguments_:i}){super();y(this,"classReference");y(this,"arguments_");this.classReference=e,this.arguments_=i}write(e){e.writeNode(this.classReference),e.write("."),e.write("new"),e.write("("),this.arguments_.length>1?(e.indent(),e.newLine(),this.arguments_.forEach((i,s)=>{s>0&&(e.write(","),e.newLine()),i.write(e)}),e.newLine(),e.dedent()):this.arguments_.forEach((i,s)=>{s>0&&e.write(", "),i.write(e)}),e.write(")")}};c();m();d();var ye=class extends S{constructor(e){super();y(this,"arg");this.arg=e}write(e){return new J(this.arg).write(e)}};c();m();d();var ge=class extends S{constructor({name:e,value:i}){super();y(this,"name");y(this,"value");this.name=e,this.value=i}write(e){e.write(`${this.name}: `),this.value.write(e)}};c();m();d();c();m();d();var q=class extends S{constructor({name:e,type:i,optional:s,docs:f}){super();y(this,"name");y(this,"type");y(this,"optional");y(this,"docs");this.name=e,this.type=i??ie.untyped(),this.optional=s??!1,this.docs=f}};var xe=class extends q{constructor({name:e,type:i,initializer:s,optional:f}){super({name:e,type:i,optional:f});y(this,"initializer");this.initializer=s}write(e){e.write(`${this.name}:`),this.initializer&&(e.write(" "),e.writeNode(this.initializer))}writeTypeDefinition(e){this.optional&&e.write("?"),e.write(`${this.name}: `),this.type.writeTypeDefinition(e)}};c();m();d();var De=class extends q{constructor(){super(...arguments);y(this,"initializer")}write(e){e.write(`**${this.name}`)}writeTypeDefinition(e){e.write("**"),this.type.writeTypeDefinition(e)}};c();m();d();var we=class extends S{constructor({on:e,method:i,arguments_:s,keywordArguments:f,block:u}){super();y(this,"on");y(this,"method");y(this,"arguments_");y(this,"keywordArguments");y(this,"block");this.on=e,this.method=i,this.arguments_=s,this.keywordArguments=f,this.block=u}write(e){this.on.write(e),e.write("."),e.write(this.method),e.write("(");let i=[];for(let s of this.arguments_)i.push({kind:"positional",node:s});for(let s of this.keywordArguments||[])i.push({kind:"keyword",arg:s});if(i.length>1?(e.indent(),e.newLine(),i.forEach((s,f)=>{f>0&&(e.write(","),e.newLine()),Pn(e,s)}),e.newLine(),e.dedent()):i.forEach((s,f)=>{f>0&&e.write(", "),Pn(e,s)}),e.write(")"),this.block){let[s,f]=this.block;e.write(" do"),s.length>0&&(e.write(" |"),s.forEach((u,T)=>{T>0&&e.write(", "),e.write(u)}),e.write("|")),e.newLine(),e.indent();for(let u of f)u.write(e),e.writeNewLineIfLastLineNot();e.dedent(),e.write("end")}}};function Pn(l,r){switch(r.kind){case"positional":r.node.write(l);break;case"keyword":r.arg.write(l);break;default:P(r)}}c();m();d();var _e=class extends S{constructor({value:e}){super();y(this,"value");this.value=e}write(e){this.value.write(e)}};c();m();d();var Oe=class extends q{constructor({name:e,type:i,optional:s,initializer:f}){super({name:e,type:i,optional:s});y(this,"initializer");this.initializer=f}write(e){e.write(this.name),this.initializer&&e.write(` = ${this.initializer.write(e)}`)}writeTypeDefinition(e){this.optional&&e.write("?"),this.type.writeTypeDefinition(e)}};c();m();d();var je=class extends q{write(r){r.write(`*${this.name}`)}writeTypeDefinition(r){r.write("*"),this.type.writeTypeDefinition(r)}};c();m();d();var Ve=class l extends S{constructor(e){super();y(this,"internalType");this.internalType=e}static string(e){return new this({type:"str",value:e})}static integer(e){return new this({type:"int",value:e})}static float(e){return new this({type:"float",value:e})}static boolean(e){return new this({type:"bool",value:e})}static hash(e){return new this({type:"hash",entries:e})}static set(e){return new this({type:"set",values:e})}static list(e){return new this({type:"list",values:e})}static nop(){return new this({type:"nop"})}static nil(){return new this({type:"nil"})}static isNop(e){return e instanceof l&&e.internalType.type==="nop"}static isNil(e){return e instanceof l&&e.internalType.type==="nil"}write(e){switch(this.internalType.type){case"str":{this.internalType.value.includes("'")||this.internalType.value.includes("#")?e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`):e.write(`'${this.internalType.value}'`);break}case"int":{e.write(this.internalType.value.toString());break}case"float":{e.write(this.internalType.value.toString());break}case"bool":{e.write(this.internalType.value?"true":"false");break}case"hash":{let i=this.internalType.entries.filter(s=>!l.isNop(s.key)&&!l.isNop(s.value));if(i.length===0){e.write("{}");break}e.write(`{
|
|
22
|
+
`),i.forEach((s,f)=>{f>0&&e.writeLine(","),e.indent();let u=!1;if(s.key instanceof l&&s.key.internalType.type==="str"){let T=s.key.internalType.value;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(T)&&(e.write(`${T}:`),u=!0)}u||(s.key.write(e),e.write(" =>")),e.write(" "),s.value.write(e),e.dedent()}),e.write(`
|
|
23
|
+
}`);break}case"set":{let i=this.internalType.values.filter(s=>!l.isNop(s));if(i.length===0){e.write("Set.new([])");break}e.write("Set.new(["),i.forEach((s,f)=>{f>0&&e.write(", "),s.write(e)}),e.write("])");break}case"list":{let i=this.internalType.values.filter(s=>!l.isNop(s));if(i.length===0){e.write("[]");break}e.write("["),i.forEach((s,f)=>{f>0&&e.write(", "),s.write(e)}),e.write("]");break}case"nop":break;case"nil":e.write("nil");break;default:P(this.internalType)}}};c();m();d();var et;(function(l){l[l.Invariant=0]="Invariant",l.Covariant="out",l.Contravariant="in"})(et||(et={}));var be=class extends S{constructor({name:e,unchecked:i,bound:s,variance:f,defaultType:u}){super();y(this,"name");y(this,"unchecked");y(this,"bound");y(this,"variance");y(this,"defaultType");this.name=e,this.unchecked=i??!1,this.bound=s,this.variance=f??et.Invariant,this.defaultType=u}write(e){}writeTypeDefinition(e){this.unchecked&&e.write("unchecked "),this.variance!=et.Invariant&&e.write(`${this.variance} `),e.write(this.name),this.bound&&(e.write(" < "),this.bound.writeTypeDefinition(e)),this.defaultType&&(e.write(" = "),this.defaultType.writeTypeDefinition(e))}};c();m();d();var We=class extends q{constructor(){super(...arguments);y(this,"initializer")}write(e){e.write(`&${this.name}`)}};c();m();d();var tt=class extends S{constructor({body:e,rescues:i}){super();y(this,"body");y(this,"rescues");this.body=e,this.rescues=i}write(e){e.write("begin"),e.writeLine(),this.body&&(e.indent(),this.body.write(e),e.writeNewLineIfLastLineNot(),e.dedent());for(let{errorClass:i,errorVariable:s,body:f}of this.rescues)e.write("rescue"),i&&(e.write(" "),i.write(e)),s&&(e.write(" => "),e.write(s)),e.writeLine(),f&&(e.indent(),f.write(e),e.writeNewLineIfLastLineNot(),e.dedent());e.write("end")}};c();m();d();var rt=class extends S{constructor({if:e,elseIf:i,elseBody:s}){super();y(this,"ifBranch");y(this,"elseIfs");y(this,"elseBody");this.ifBranch=e,this.elseIfs=i??[],this.elseBody=s?Array.isArray(s)?s:[s]:void 0}write(e){e.write("if "),this.ifBranch.condition.write(e),e.writeLine(),e.indent();for(let i of this.ifBranch.thenBody)i.write(e),e.writeNewLineIfLastLineNot();e.dedent();for(let i of this.elseIfs){e.write("elsif "),i.condition.write(e),e.writeLine(),e.indent();for(let s of i.thenBody)s.write(e),e.writeNewLineIfLastLineNot();e.dedent()}if(this.elseBody&&this.elseBody.length>0){e.writeLine("else"),e.indent();for(let i of this.elseBody)i.write(e),e.writeNewLineIfLastLineNot();e.dedent()}e.write("end"),e.writeNewLineIfLastLineNot()}};c();m();d();var nt=class extends S{constructor({errorClass:e,message:i}){super();y(this,"errorClass");y(this,"message");this.errorClass=e,this.message=i}write(e){e.write("raise"),this.errorClass&&(e.write(" "),this.errorClass.write(e)),this.message&&(this.errorClass&&e.write(", "),this.message.write(e))}};function it(l){return new ye(l)}function lo(){return it("true")}function po(){return it("false")}function fo(){return it("nil")}var co={positional(l){return new Oe(l)},keyword(l){return new xe(l)},positionalSplat(l){return new je(l)},keywordSplat(l){return new De(l)},yield(l){return new We(l)}};function mo(l){return new ue(l)}function ho(l){return new ae(l)}function yo(l){return new se(l)}function go(l){return new X(l)}function xo(l){return new be(l)}function wo(l){return new ne(l)}function bo(l){return new he(l)}function vo(l){return new ge(l)}function Ao(l){return new we(l)}function To(l){return new _e(l)}function Eo(l){return new rt(l)}function Io(l){return new tt(l)}function ko(l){return new nt(l)}function Ro(l,r){let e=l;for(let i of r.toReversed())i.addStatement(e),e=i;return e}c();m();d();var ot=class l{constructor({context:r}){y(this,"context");this.context=r}convert(r){if(r.value===null)return this.context.isNullable(r.typeReference)?x.TypeLiteral.nil():(this.context.errors.add({severity:N.Critical,message:"Expected non-null value, but got null"}),x.TypeLiteral.nop());if(r.value===void 0)return x.TypeLiteral.nop();switch(r.typeReference.type){case"list":return this.convertList({list:r.typeReference.value,value:r.value});case"literal":return this.convertLiteral({literalType:r.typeReference.value,value:r.value});case"map":return this.convertMap({map:r.typeReference,value:r.value});case"named":{let e=this.context.resolveNamedType({typeId:r.typeReference.value});return e==null?x.TypeLiteral.nop():this.convertNamed({named:e,value:r.value,as:r.as})}case"optional":return this.convert({typeReference:r.typeReference.value,value:r.value,as:r.as});case"nullable":return this.convert({typeReference:r.typeReference.value,value:r.value,as:r.as});case"primitive":return this.convertPrimitive({primitive:r.typeReference.value,value:r.value,as:r.as});case"set":return this.convertSet({set:r.typeReference.value,value:r.value});case"unknown":return x.TypeLiteral.nop();default:P(r.typeReference)}}convertLiteral({literalType:r,value:e}){switch(r.type){case"boolean":{let i=this.context.getValueAsBoolean({value:e});return i==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(i)}case"string":{let i=this.context.getValueAsString({value:e});return i==null?x.TypeLiteral.nop():x.TypeLiteral.string(i)}default:P(r)}}convertList({list:r,value:e}){return Array.isArray(e)?x.TypeLiteral.list(e.map((i,s)=>{this.context.errors.scope({index:s});try{return this.convert({typeReference:r,value:i})}finally{this.context.errors.unscope()}})):(this.context.errors.add({severity:N.Critical,message:`Expected array but got: ${typeof e}`}),x.TypeLiteral.nop())}convertSet({set:r,value:e}){return Array.isArray(e)?x.TypeLiteral.set(e.map((i,s)=>{this.context.errors.scope({index:s});try{return this.convert({typeReference:r,value:i})}finally{this.context.errors.unscope()}})):(this.context.errors.add({severity:N.Critical,message:`Expected array but got: ${typeof e}`}),x.TypeLiteral.nop())}convertMap({map:r,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:N.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),x.TypeLiteral.nop()):x.TypeLiteral.hash(Object.entries(e).map(([i,s])=>{this.context.errors.scope(i);try{return{key:this.convert({typeReference:r.key,value:i,as:"key"}),value:this.convert({typeReference:r.value,value:s})}}finally{this.context.errors.unscope()}}))}convertNamed({named:r,value:e,as:i}){switch(r.type){case"alias":return this.convert({typeReference:r.typeReference,value:e,as:i});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:r,value:e});case"object":return this.convertObject({object:r,value:e});case"enum":return this.convertEnum({enum_:r,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:r,value:e});default:P(r)}}convertDiscriminatedUnion({discriminatedUnion:r,value:e}){let i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:r,value:e});if(i==null)return x.TypeLiteral.nop();let s=i.singleDiscriminatedUnionType,f=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:i,unionVariant:s});return f==null?x.TypeLiteral.nop():x.TypeLiteral.hash(f)}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:r,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:e.typeId});if(i==null)return;let s=this.convertNamed({named:i,value:r.value});return this.extractHashEntries(s)}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let i=this.context.getRecord(r.value);return i==null?[{key:x.TypeLiteral.string(this.context.getPropertyName(e.discriminantValue.name)),value:this.convert({typeReference:e.typeReference,value:r.value})}]:[{key:x.TypeLiteral.string(this.context.getPropertyName(e.discriminantValue.name)),value:this.convert({typeReference:e.typeReference,value:i[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:P(e)}}extractHashEntries(r){r instanceof x.TypeLiteral}convertEnum({enum_:r,value:e}){let i=this.getEnumValueName({enum_:r,value:e});return i==null?x.TypeLiteral.nop():x.TypeLiteral.string(i)}getEnumValueName({enum_:r,value:e}){if(typeof e!="string"){this.context.errors.add({severity:N.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let i=r.values.find(s=>s.wireValue===e);if(i==null){this.context.errors.add({severity:N.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return i.wireValue}convertUndiscriminatedUnion({undiscriminatedUnion:r,value:e}){let i=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:r,value:e});return i??x.TypeLiteral.nop()}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:r,value:e}){for(let i of r.types){let s=this.context.clone(),u=new l({context:s}).convert({typeReference:i,value:e});if(s.errors.empty())return u}this.context.errors.add({severity:N.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertPrimitive({primitive:r,value:e,as:i}){switch(r){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let s=this.getValueAsNumber({value:e,as:i});return s==null?x.TypeLiteral.nop():x.TypeLiteral.integer(s)}case"FLOAT":case"DOUBLE":{let s=this.getValueAsNumber({value:e});return s==null?x.TypeLiteral.nop():x.TypeLiteral.float(s)}case"BOOLEAN":{let s=this.getValueAsBoolean({value:e,as:i});return s==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(s)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let s=this.context.getValueAsString({value:e});return s==null?x.TypeLiteral.nop():x.TypeLiteral.string(s)}case"UUID":{let s=this.context.getValueAsString({value:e});return s==null?x.TypeLiteral.nop():x.TypeLiteral.string(s)}case"DATE":{let s=this.context.getValueAsString({value:e});return s==null?x.TypeLiteral.nop():x.TypeLiteral.string(s)}case"DATE_TIME":{let s=this.context.getValueAsString({value:e});return s==null?x.TypeLiteral.nop():x.TypeLiteral.string(s)}default:P(r)}}convertObject({object:r,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:N.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),x.TypeLiteral.nop()):x.TypeLiteral.hash(Object.entries(e).map(([i,s])=>{this.context.errors.scope(i);let f=r.properties.find(k=>k.name.wireValue===i),u=f?.typeReference??{type:"unknown"},T=f?.name.name.snakeCase.safeName??i,b={key:x.TypeLiteral.string(T),value:this.convert({typeReference:u,value:s})};return this.context.errors.unscope(),b}))}getValueAsNumber({value:r,as:e}){let i=e==="key"&&typeof r=="string"?Number(r):r;return this.context.getValueAsNumber({value:i})}getValueAsBoolean({value:r,as:e}){let i=e==="key"?typeof r=="string"?r==="true":!!r:r;return this.context.getValueAsBoolean({value:i})}};var st=class l extends $e{constructor({ir:e,config:i}){super({ir:e,config:i});y(this,"ir");y(this,"customConfig");y(this,"dynamicTypeLiteralMapper");this.ir=e,this.customConfig=i.customConfig!=null?i.customConfig:void 0,this.dynamicTypeLiteralMapper=new ot({context:this})}clone(){return new l({ir:this.ir,config:this.config})}getRootClientClassReference(){return x.classReference({name:this.getRootClientClassName(),modules:[this.getRootModuleName()]})}getRootClientClassName(){return"Client"}getRootModuleName(){return xt(this.customConfig?.clientModuleName??this.config.organization)}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}getEnvironmentTypeReferenceFromID(e){let i=this.resolveEnvironmentName(e);if(i!=null)return x.codeblock(s=>{s.writeNode(this.getEnvironmentClassReference()),s.write("::"),s.write(this.getEnumName(i))})}getEnvironmentClassReference(){return x.classReference({name:"Environment",modules:[this.getRootModuleName()]})}getEnumName(e){return this.getName(e.screamingSnakeCase.safeName)}getMethodName(e){return this.getName(e.snakeCase.safeName)}getPropertyName(e){return this.getName(e.snakeCase.safeName)}getName(e){return e}};c();m();d();var Un="client",at=class{constructor({context:r,formatter:e}){y(this,"context");y(this,"formatter");this.context=r,this.formatter=e}async generateSnippet({endpoint:r,request:e}){return await this.buildCodeBlock({endpoint:r,snippet:e}).toStringAsync({customConfig:this.context.customConfig??{},formatter:this.formatter})}generateSnippetSync({endpoint:r,request:e}){return this.buildCodeBlock({endpoint:r,snippet:e}).toString({customConfig:this.context.customConfig??{},formatter:this.formatter})}async generateSnippetAst({endpoint:r,request:e,options:i}){return this.buildCodeBlock({endpoint:r,snippet:e})}buildCodeBlock({endpoint:r,snippet:e}){return x.codeblock(i=>{i.writeNodeStatement(this.constructClient({endpoint:r,snippet:e})),i.newLine(),i.writeNodeStatement(this.callMethod({endpoint:r,snippet:e}))})}constructClient({endpoint:r,snippet:e}){return x.codeblock(i=>{i.addRequire(this.context.getRootModuleName().toLowerCase());let s=this.context.getRootClientClassReference(),f=this.getRootClientBuilderArgs({endpoint:r,snippet:e});i.write(`${Un} = `),i.writeNode(x.instantiateClass({classReference:s,arguments_:f}))})}getRootClientBaseUrlArg({baseUrl:r,environment:e}){if(r!=null&&e!=null)return this.context.errors.add({severity:"CRITICAL",message:"Cannot specify both baseUrl and environment options"}),[];if(r!=null)return[x.keywordArgument({name:"base_url",value:x.TypeLiteral.string(r)})];if(e!=null){if(this.context.isSingleEnvironmentID(e)){let i=this.context.getEnvironmentTypeReferenceFromID(e);return i==null?(this.context.errors.add({severity:"CRITICAL",message:`Environment ID ${e} not found`}),[]):[x.keywordArgument({name:"environment",value:i})]}if(this.context.isMultiEnvironmentValues(e))return this.context.errors.add({severity:"CRITICAL",message:"Multi-environment values are not supported in Ruby snippets yet"}),[]}return[]}getRootClientAuthArgs({auth:r,values:e}){if(e.type!==r.type)return this.addError(this.context.newAuthMismatchError({auth:r,values:e}).message),[];switch(r.type){case"basic":return e.type==="basic"?this.getRootClientBasicAuthArgs({auth:r,values:e}):[];case"bearer":return e.type==="bearer"?this.getRootClientBearerAuthArgs({auth:r,values:e}):[];case"header":return e.type==="header"?this.getRootClientHeaderAuthArgs({auth:r,values:e}):[];case"oauth":return e.type==="oauth"?this.getRootClientOAuthArgs({auth:r,values:e}):[];case"inferred":return[];default:P(r)}}addError(r){this.context.errors.add({severity:N.Critical,message:r})}addWarning(r){this.context.errors.add({severity:N.Warning,message:r})}getRootClientBasicAuthArgs({auth:r,values:e}){return[x.keywordArgument({name:r.username.snakeCase.safeName,value:x.TypeLiteral.string(e.username)}),x.keywordArgument({name:r.password.snakeCase.safeName,value:x.TypeLiteral.string(e.password)})]}getRootClientBearerAuthArgs({auth:r,values:e}){return[x.keywordArgument({name:r.token.snakeCase.safeName,value:x.TypeLiteral.string(e.token)})]}getRootClientHeaderAuthArgs({auth:r,values:e}){return[x.keywordArgument({name:r.header.name.name.snakeCase.safeName,value:x.TypeLiteral.string(e.value)})]}getRootClientOAuthArgs({auth:r,values:e}){return[x.keywordArgument({name:r.clientId.snakeCase.safeName,value:x.TypeLiteral.string(e.clientId)}),x.keywordArgument({name:r.clientSecret.snakeCase.safeName,value:x.TypeLiteral.string(e.clientSecret)})]}getRootClientHeaderArgs({headers:r,values:e}){let i=[];for(let s of r){let f=e[s.name.name.originalName];f!=null&&typeof f=="string"&&i.push(x.keywordArgument({name:s.name.name.snakeCase.safeName,value:x.TypeLiteral.string(f)}))}return i}getRootClientBuilderArgs({endpoint:r,snippet:e}){let i=[];r.auth!=null&&(e.auth!=null?i.push(...this.getRootClientAuthArgs({auth:r.auth,values:e.auth})):this.context.errors.add({severity:"WARNING",message:`Auth with ${r.auth.type} configuration is required for this endpoint`}));let s=this.getRootClientBaseUrlArg({baseUrl:e.baseURL,environment:e.environment});return s.length>0&&i.push(...s),this.context.errors.scope("Headers"),this.context.ir.headers!=null&&e.headers!=null&&i.push(...this.getRootClientHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),i}callMethod({endpoint:r,snippet:e}){let i={on:x.codeblock(Un),method:this.getMethod({endpoint:r}),arguments_:[]};switch(r.request.type){case"inlined":i.keywordArguments=this.getMethodArgsForInlinedRequest({request:r.request,snippet:e});break;case"body":i.keywordArguments=this.getMethodArgsForBodyRequest({request:r.request,snippet:e});break;default:P(r.request)}let s=this.getRequestOptions({endpoint:r,snippet:e});return s!=null&&(i.keywordArguments=i.keywordArguments??[],i.keywordArguments.push(s)),x.invokeMethod(i)}getRequestOptions({endpoint:r,snippet:e}){let i=e.headers??{},s=Object.entries(i);if(s.length===0)return;let f=new Set;if(this.context.ir.headers!=null)for(let b of this.context.ir.headers)f.add(b.name.wireValue.toLowerCase());if(r.request.type==="inlined"&&r.request.headers!=null)for(let b of r.request.headers)f.add(b.name.wireValue.toLowerCase());let u=s.filter(([b])=>!f.has(b.toLowerCase()));if(u.length===0)return;let T=u.map(([b,k])=>({key:x.TypeLiteral.string(b),value:x.TypeLiteral.string(String(k))}));return x.keywordArgument({name:"request_options",value:x.TypeLiteral.hash([{key:x.TypeLiteral.string("additional_headers"),value:x.TypeLiteral.hash(T)}])})}getMethodArgsForInlinedRequest({request:r,snippet:e}){let i=[];if(i.push(...this.getNamedParameterArgs({kind:"PathParameters",namedParameters:r.pathParameters,values:e.pathParameters})),i.push(...this.getNamedParameterArgs({kind:"QueryParameters",namedParameters:r.queryParameters,values:e.queryParameters})),i.push(...this.getNamedParameterArgs({kind:"Headers",namedParameters:r.headers,values:e.headers})),r.body!=null)switch(r.body.type){case"properties":i.push(...this.getMethodArgsForPropertiesRequest({request:r.body,snippet:e}));break;case"referenced":case"fileUpload":break;default:P(r.body)}return i}getNamedParameterArgs({kind:r,namedParameters:e,values:i}){let s=[];if(this.context.errors.scope(r),e!=null){let f=this.context.associateByWireValue({parameters:e,values:i??{},ignoreMissingParameters:!0});for(let u of f){let T=this.context.dynamicTypeLiteralMapper.convert(u);x.TypeLiteral.isNop(T)||s.push(x.keywordArgument({name:this.context.getPropertyName(u.name.name),value:T}))}}return this.context.errors.unscope(),s}getMethodArgsForPropertiesRequest({request:r,snippet:e}){let i=[],s=this.context.associateByWireValue({parameters:r.value,values:this.context.getRecord(e.requestBody)??{}});for(let f of s){let u=this.context.dynamicTypeLiteralMapper.convert(f);x.TypeLiteral.isNop(u)||i.push(x.keywordArgument({name:this.context.getPropertyName(f.name.name),value:u}))}return i}getMethodArgsForBodyRequest({request:r,snippet:e}){let i=[];if(i.push(...this.getNamedParameterArgs({kind:"PathParameters",namedParameters:r.pathParameters,values:e.pathParameters})),r.body!=null&&e.requestBody!=null)switch(r.body.type){case"bytes":this.context.errors.add({severity:"CRITICAL",message:"Bytes request body is not supported in Ruby snippets yet"});break;case"typeReference":{let s=r.body.value;if(s.type==="named"){let f=this.context.resolveNamedType({typeId:s.value});if(f!=null&&f.type==="object"){let u=this.context.getRecord(e.requestBody);if(u!=null){let T=this.getBodyFieldsAsKeywordArgs({namedType:f,bodyRecord:u});i.push(...T)}}else if(f!=null){let u=this.getBodyArgsForNonObjectType({namedType:f,typeRef:s,bodyValue:e.requestBody});i.push(...u)}}else{let f=this.context.dynamicTypeLiteralMapper.convert({typeReference:s,value:e.requestBody});x.TypeLiteral.isNop(f)||i.push(x.keywordArgument({name:"request",value:f}))}break}default:P(r.body)}return i}getBodyArgsForNonObjectType({namedType:r,typeRef:e,bodyValue:i}){let s=[];switch(r.type){case"undiscriminatedUnion":{let f=this.context.getRecord(i);if(f!=null){for(let T of r.types)if(T.type==="named"){let b=this.context.resolveNamedType({typeId:T.value});if(b!=null&&b.type==="object"){let k=new Set(b.properties.map(D=>D.name.wireValue)),R=Object.keys(f);if(R.every(D=>k.has(D))&&R.length>0){let D=this.getBodyFieldsAsKeywordArgs({namedType:b,bodyRecord:f});return s.push(...D),s}}}}let u=this.context.dynamicTypeLiteralMapper.convert({typeReference:e,value:i});x.TypeLiteral.isNop(u)||s.push(x.keywordArgument({name:"request",value:u}));break}case"alias":{let f=r.typeReference;if(f.type==="named"){let T=this.context.resolveNamedType({typeId:f.value});if(T!=null&&T.type==="object"){let b=this.context.getRecord(i);if(b!=null){let k=this.getBodyFieldsAsKeywordArgs({namedType:T,bodyRecord:b});return s.push(...k),s}}}let u=this.context.dynamicTypeLiteralMapper.convert({typeReference:e,value:i});x.TypeLiteral.isNop(u)||s.push(x.keywordArgument({name:"request",value:u}));break}case"discriminatedUnion":case"enum":{let f=this.context.dynamicTypeLiteralMapper.convert({typeReference:e,value:i});x.TypeLiteral.isNop(f)||s.push(x.keywordArgument({name:"request",value:f}));break}case"object":break;default:P(r)}return s}getBodyFieldsAsKeywordArgs({namedType:r,bodyRecord:e}){let i=[];switch(r.type){case"object":{for(let s of r.properties){let f=s.name.wireValue,u=e[f];if(u!==void 0){this.context.errors.scope(f);let T=this.context.dynamicTypeLiteralMapper.convert({typeReference:s.typeReference,value:u});this.context.errors.unscope(),x.TypeLiteral.isNop(T)||i.push(x.keywordArgument({name:this.context.getPropertyName(s.name.name),value:T}))}}break}case"alias":case"discriminatedUnion":case"undiscriminatedUnion":case"enum":break;default:P(r)}return i}getMethod({endpoint:r}){return r.declaration.fernFilepath.allParts.length>0?`${r.declaration.fernFilepath.allParts.map(e=>`${this.context.getMethodName(e)}`).join(".")}.${this.context.getMethodName(r.declaration.name)}`:this.context.getMethodName(r.declaration.name)}};var ut=class extends Pe{constructor({ir:e,config:i,formatter:s}){super(new st({ir:e,config:i}));y(this,"formatter");this.formatter=s}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}async generateSnippetAst(e){return super.generateSnippetAst(e)}createSnippetGenerator(e){return new at({context:e,formatter:this.formatter})}};0&&(module.exports={DynamicSnippetsGenerator});
|
|
24
|
+
/*! Bundled license information:
|
|
25
|
+
|
|
26
|
+
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
27
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
28
|
+
|
|
29
|
+
lodash-es/lodash.js:
|
|
30
|
+
(**
|
|
31
|
+
* @license
|
|
32
|
+
* Lodash (Custom Build) <https://lodash.com/>
|
|
33
|
+
* Build: `lodash modularize exports="es" -o ./`
|
|
34
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
35
|
+
* Released under MIT license <https://lodash.com/license>
|
|
36
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
37
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
38
|
+
*)
|
|
39
|
+
*/
|
|
40
|
+
//# sourceMappingURL=index.cjs.map
|