@fern-api/typescript-dynamic-snippets 0.0.10 → 3.35.9
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/cjs/DynamicSnippetsGenerator.cjs +2 -2
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
- package/cjs/EndpointSnippetGenerator.cjs +3 -3
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
- package/cjs/context/DynamicTypeLiteralMapper.cjs +6 -6
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
- package/cjs/context/FilePropertyMapper.cjs +5 -5
- package/cjs/context/FilePropertyMapper.cjs.map +1 -1
- package/cjs/index.cjs +2 -2
- package/cjs/index.cjs.map +1 -1
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-FHTEY42V.js → chunk-7YNOMYIY.js} +2 -2
- package/esm/{chunk-6XSGLZSQ.js → chunk-GCLEFX73.js} +2 -2
- package/esm/{chunk-JWWD2UKR.js → chunk-HXSH7OPV.js} +2 -2
- package/esm/{chunk-BNKHNYGA.js → chunk-NNO323RB.js} +2 -2
- package/esm/{chunk-5NPELJVJ.js → chunk-R73BYUJU.js} +2 -2
- package/esm/{chunk-XCBZNNLA.js → chunk-WFHV7AZS.js} +4 -4
- package/esm/chunk-WFHV7AZS.js.map +1 -0
- package/esm/{chunk-EBBQY3NK.js → chunk-X6S2ZXYW.js} +2 -2
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeLiteralMapper.js +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/esm/chunk-XCBZNNLA.js.map +0 -1
- /package/esm/{chunk-FHTEY42V.js.map → chunk-7YNOMYIY.js.map} +0 -0
- /package/esm/{chunk-6XSGLZSQ.js.map → chunk-GCLEFX73.js.map} +0 -0
- /package/esm/{chunk-JWWD2UKR.js.map → chunk-HXSH7OPV.js.map} +0 -0
- /package/esm/{chunk-BNKHNYGA.js.map → chunk-NNO323RB.js.map} +0 -0
- /package/esm/{chunk-5NPELJVJ.js.map → chunk-R73BYUJU.js.map} +0 -0
- /package/esm/{chunk-EBBQY3NK.js.map → chunk-X6S2ZXYW.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ue=Object.defineProperty,at=Object.defineProperties,ut=Object.getOwnPropertyDescriptor,ct=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertyNames,Ne=Object.getOwnPropertySymbols;var Re=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var ge=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,G=(n,t)=>{for(var e in t||(t={}))Re.call(t,e)&&ge(n,e,t[e]);if(Ne)for(var e of Ne(t))pt.call(t,e)&&ge(n,e,t[e]);return n},H=(n,t)=>at(n,ct(t));var ve=(n,t)=>()=>(n&&(t=n(n=0)),t);var ke=(n,t)=>{for(var e in t)ue(n,e,{get:t[e],enumerable:!0})},ht=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lt(t))!Re.call(n,i)&&i!==e&&ue(n,i,{get:()=>t[i],enumerable:!(r=ut(t,i))||r.enumerable});return n};var ft=n=>ht(ue({},"__esModule",{value:!0}),n);var l=(n,t,e)=>ge(n,typeof t!="symbol"?t+"":t,e);function Be(){throw new Error("setTimeout has not been defined")}function Le(){throw new Error("clearTimeout has not been defined")}function Ce(n){if(_===setTimeout)return setTimeout(n,0);if((_===Be||!_)&&setTimeout)return _=setTimeout,setTimeout(n,0);try{return _(n,0)}catch(t){try{return _.call(null,n,0)}catch(e){return _.call(this,n,0)}}}function mt(n){if(U===clearTimeout)return clearTimeout(n);if((U===Le||!U)&&clearTimeout)return U=clearTimeout,clearTimeout(n);try{return U(n)}catch(t){try{return U.call(null,n)}catch(e){return U.call(this,n)}}}function dt(){!z||!$||(z=!1,$.length?P=$.concat(P):ce=-1,P.length&&_e())}function _e(){if(!z){var n=Ce(dt);z=!0;for(var t=P.length;t;){for($=P,P=[];++ce<t;)$&&$[ce].run();ce=-1,t=P.length}$=null,z=!1,mt(n)}}function yt(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];P.push(new Ue(n,t)),P.length===1&&!z&&Ce(_e)}function Ue(n,t){this.fun=n,this.array=t}function q(){}function Lt(n){throw new Error("process.binding is not supported")}function Ct(){return"/"}function _t(n){throw new Error("process.chdir is not supported")}function Ut(){return 0}function Ot(n){var t=Mt.call(J)*.001,e=Math.floor(t),r=Math.floor(t%1*1e9);return n&&(e=e-n[0],r=r-n[1],r<0&&(e--,r+=1e9)),[e,r]}function qt(){var n=new Date,t=n-$t;return t/1e3}var _,U,P,z,$,ce,wt,xt,gt,vt,At,Tt,It,bt,Et,Ft,St,Nt,Rt,kt,Pt,Bt,J,Mt,$t,w,Pe,p=ve(()=>{"use strict";_=Be,U=Le;typeof globalThis.setTimeout=="function"&&(_=setTimeout);typeof globalThis.clearTimeout=="function"&&(U=clearTimeout);P=[],z=!1,ce=-1;Ue.prototype.run=function(){this.fun.apply(null,this.array)};wt="browser",xt="browser",gt=!0,vt={},At=[],Tt="",It={},bt={},Et={};Ft=q,St=q,Nt=q,Rt=q,kt=q,Pt=q,Bt=q;J=globalThis.performance||{},Mt=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};$t=new Date;w={nextTick:yt,title:wt,browser:gt,env:vt,argv:At,version:Tt,versions:It,on:Ft,addListener:St,once:Nt,off:Rt,removeListener:kt,removeAllListeners:Pt,emit:Bt,binding:Lt,cwd:Ct,chdir:_t,umask:Ut,hrtime:Ot,platform:xt,release:bt,config:Et,uptime:qt},Pe={};Object.keys(Pe).forEach(n=>{let t=n.split("."),e=w;for(let r=0;r<t.length;r++){let i=t[r];r===t.length-1?e[i]=Pe[n]:e=e[i]||(e[i]={})}})});function qe(){Te=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=n.length;t<e;++t)N[t]=n[t],b[n.charCodeAt(t)]=t;b[45]=62,b[95]=63}function Dt(n){Te||qe();var t,e,r,i,o,s,u=n.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=n[u-2]==="="?2:n[u-1]==="="?1:0,s=new jt(u*3/4-o),r=o>0?u-4:u;var c=0;for(t=0,e=0;t<r;t+=4,e+=3)i=b[n.charCodeAt(t)]<<18|b[n.charCodeAt(t+1)]<<12|b[n.charCodeAt(t+2)]<<6|b[n.charCodeAt(t+3)],s[c++]=i>>16&255,s[c++]=i>>8&255,s[c++]=i&255;return o===2?(i=b[n.charCodeAt(t)]<<2|b[n.charCodeAt(t+1)]>>4,s[c++]=i&255):o===1&&(i=b[n.charCodeAt(t)]<<10|b[n.charCodeAt(t+1)]<<4|b[n.charCodeAt(t+2)]>>2,s[c++]=i>>8&255,s[c++]=i&255),s}function Yt(n){return N[n>>18&63]+N[n>>12&63]+N[n>>6&63]+N[n&63]}function Wt(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16)+(n[o+1]<<8)+n[o+2],i.push(Yt(r));return i.join("")}function Me(n){Te||qe();for(var t,e=n.length,r=e%3,i="",o=[],s=16383,u=0,c=e-r;u<c;u+=s)o.push(Wt(n,u,u+s>c?c:u+s));return r===1?(t=n[e-1],i+=N[t>>2],i+=N[t<<4&63],i+="=="):r===2&&(t=(n[e-2]<<8)+n[e-1],i+=N[t>>10],i+=N[t>>4&63],i+=N[t<<2&63],i+="="),o.push(i),o.join("")}function le(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function B(n,t){if(le()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=a.prototype):(n===null&&(n=new a(t)),n.length=t),n}function a(n,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(n,t,e);if(typeof n=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Ie(this,n)}return je(this,n,t,e)}function je(n,t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Ht(n,t,e,r):typeof t=="string"?Gt(n,t,e):Jt(n,t)}function De(n){if(typeof n!="number")throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function Vt(n,t,e,r){return De(t),t<=0?B(n,t):e!==void 0?typeof r=="string"?B(n,t).fill(e,r):B(n,t).fill(e):B(n,t)}function Ie(n,t){if(De(t),n=B(n,t<0?0:be(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function Gt(n,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=Ye(t,e)|0;n=B(n,r);var i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function Ae(n,t){var e=t.length<0?0:be(t.length)|0;n=B(n,e);for(var r=0;r<e;r+=1)n[r]=t[r]&255;return n}function Ht(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return e===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,r),a.TYPED_ARRAY_SUPPORT?(n=t,n.__proto__=a.prototype):n=Ae(n,t),n}function Jt(n,t){if(R(t)){var e=be(t.length)|0;return n=B(n,e),n.length===0||t.copy(n,0,0,e),n}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||fr(t.length)?B(n,0):Ae(n,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Ae(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function be(n){if(n>=le())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+le().toString(16)+" bytes");return n|0}function R(n){return!!(n!=null&&n._isBuffer)}function Ye(n,t){if(R(n))return n.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var e=n.length;if(e===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return pe(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Qe(n).length;default:if(r)return pe(n).length;t=(""+t).toLowerCase(),r=!0}}function zt(n,t,e){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(n||(n="utf8");;)switch(n){case"hex":return or(this,t,e);case"utf8":case"utf-8":return Ge(this,t,e);case"ascii":return nr(this,t,e);case"latin1":case"binary":return ir(this,t,e);case"base64":return tr(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sr(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}function j(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function We(n,t,e,r,i){if(n.length===0)return-1;if(typeof e=="string"?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,r)),R(t))return t.length===0?-1:Oe(n,t,e,r,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):Oe(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function Oe(n,t,e,r,i){var o=1,s=n.length,u=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(n.length<2||t.length<2)return-1;o=2,s/=2,u/=2,e/=2}function c(v,T){return o===1?v[T]:v.readUInt16BE(T*o)}var m;if(i){var d=-1;for(m=e;m<s;m++)if(c(n,m)===c(t,d===-1?0:m-d)){if(d===-1&&(d=m),m-d+1===u)return d*o}else d!==-1&&(m-=m-d),d=-1}else for(e+u>s&&(e=s-u),m=e;m>=0;m--){for(var f=!0,y=0;y<u;y++)if(c(n,m+y)!==c(t,y)){f=!1;break}if(f)return m}return-1}function Qt(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var u=parseInt(t.substr(s*2,2),16);if(isNaN(u))return s;n[e+s]=u}return s}function Kt(n,t,e,r){return me(pe(t,n.length-e),n,e,r)}function Ve(n,t,e,r){return me(pr(t),n,e,r)}function Xt(n,t,e,r){return Ve(n,t,e,r)}function Zt(n,t,e,r){return me(Qe(t),n,e,r)}function er(n,t,e,r){return me(hr(t,n.length-e),n,e,r)}function tr(n,t,e){return t===0&&e===n.length?Me(n):Me(n.slice(t,e))}function Ge(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o=n[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=e){var c,m,d,f;switch(u){case 1:o<128&&(s=o);break;case 2:c=n[i+1],(c&192)===128&&(f=(o&31)<<6|c&63,f>127&&(s=f));break;case 3:c=n[i+1],m=n[i+2],(c&192)===128&&(m&192)===128&&(f=(o&15)<<12|(c&63)<<6|m&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=n[i+1],m=n[i+2],d=n[i+3],(c&192)===128&&(m&192)===128&&(d&192)===128&&(f=(o&15)<<18|(c&63)<<12|(m&63)<<6|d&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,u=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|s&1023),r.push(s),i+=u}return rr(r)}function rr(n){var t=n.length;if(t<=$e)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=$e));return e}function nr(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]&127);return r}function ir(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function or(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=lr(n[o]);return i}function sr(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+r[o+1]*256);return i}function A(n,t,e){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function I(n,t,e,r,i,o){if(!R(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function he(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}function fe(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>(r?i:3-i)*8&255}function He(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Je(n,t,e,r,i){return i||He(n,t,e,4,34028234663852886e22,-34028234663852886e22),Xe(n,t,e,r,23,4),e+4}function ze(n,t,e,r,i){return i||He(n,t,e,8,17976931348623157e292,-17976931348623157e292),Xe(n,t,e,r,52,8),e+8}function ur(n){if(n=cr(n).replace(ar,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function cr(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function lr(n){return n<16?"0"+n.toString(16):n.toString(16)}function pe(n,t){t=t||1/0;for(var e,r=n.length,i=null,o=[],s=0;s<r;++s){if(e=n.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function pr(n){for(var t=[],e=0;e<n.length;++e)t.push(n.charCodeAt(e)&255);return t}function hr(n,t){for(var e,r,i,o=[],s=0;s<n.length&&!((t-=2)<0);++s)e=n.charCodeAt(s),r=e>>8,i=e%256,o.push(i),o.push(r);return o}function Qe(n){return Dt(ur(n))}function me(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}function fr(n){return n!==n}function mr(n){return n!=null&&(!!n._isBuffer||Ke(n)||dr(n))}function Ke(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function dr(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Ke(n.slice(0,0))}function de(n,t,e,r,i){var o,s,u=i*8-r-1,c=(1<<u)-1,m=c>>1,d=-7,f=e?i-1:0,y=e?-1:1,v=n[t+f];for(f+=y,o=v&(1<<-d)-1,v>>=-d,d+=u;d>0;o=o*256+n[t+f],f+=y,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=s*256+n[t+f],f+=y,d-=8);if(o===0)o=1-m;else{if(o===c)return s?NaN:(v?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-m}return(v?-1:1)*s*Math.pow(2,o-r)}function Xe(n,t,e,r,i,o){var s,u,c,m=o*8-i-1,d=(1<<m)-1,f=d>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,T=r?1:-1,ae=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=y/c:t+=y*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=d?(u=0,s=d):s+f>=1?(u=(t*c-1)*Math.pow(2,i),s=s+f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;n[e+v]=u&255,v+=T,u/=256,i-=8);for(s=s<<i|u,m+=i;m>0;n[e+v]=s&255,v+=T,s/=256,m-=8);n[e+v-T]|=ae*128}var N,b,jt,Te,$e,ar,Ze=ve(()=>{"use strict";p();h();N=[],b=[],jt=typeof Uint8Array!="undefined"?Uint8Array:Array,Te=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(n){return n.__proto__=a.prototype,n};a.from=function(n,t,e){return je(null,n,t,e)};a.kMaxLength=le();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(n,t,e){return Vt(null,n,t,e)};a.allocUnsafe=function(n){return Ie(null,n)};a.allocUnsafeSlow=function(n){return Ie(null,n)};a.isBuffer=mr;a.compare=function(t,e){if(!R(t)||!R(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,s=Math.min(r,i);o<s;++o)if(t[o]!==e[o]){r=t[o],i=e[o];break}return r<i?-1:i<r?1:0};a.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}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!R(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Ye;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)j(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)j(this,e,e+3),j(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)j(this,e,e+7),j(this,e+1,e+6),j(this,e+2,e+5),j(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Ge(this,0,t):zt.apply(this,arguments)};a.prototype.equals=function(t){if(!R(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,r,i,o){if(!R(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=r)return 0;if(i>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,u=r-e,c=Math.min(s,u),m=this.slice(i,o),d=t.slice(e,r),f=0;f<c;++f)if(m[f]!==d[f]){s=m[f],u=d[f];break}return s<u?-1:u<s?1:0};a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1};a.prototype.indexOf=function(t,e,r){return We(this,t,e,r,!0)};a.prototype.lastIndexOf=function(t,e,r){return We(this,t,e,r,!1)};a.prototype.write=function(t,e,r,i){if(e===void 0)i="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")i=e,r=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(r)?(r=r|0,i===void 0&&(i="utf8")):(i=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Qt(this,t,e,r);case"utf8":case"utf-8":return Kt(this,t,e,r);case"ascii":return Ve(this,t,e,r);case"latin1":case"binary":return Xt(this,t,e,r);case"base64":return Zt(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return er(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};$e=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||A(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};a.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};a.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),de(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),de(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),de(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),de(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;I(this,t,e,r,o,0)}var s=1,u=0;for(this[e]=t&255;++u<r&&(s*=256);)this[e+u]=t/s&255;return e+r};a.prototype.writeUIntBE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;I(this,t,e,r,o,0)}var s=r-1,u=1;for(this[e+s]=t&255;--s>=0&&(u*=256);)this[e+s]=t/u&255;return e+r};a.prototype.writeUInt8=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):he(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):he(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):fe(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):fe(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var s=0,u=1,c=0;for(this[e]=t&255;++s<r&&(u*=256);)t<0&&c===0&&this[e+s-1]!==0&&(c=1),this[e+s]=(t/u>>0)-c&255;return e+r};a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var s=r-1,u=1,c=0;for(this[e+s]=t&255;--s>=0&&(u*=256);)t<0&&c===0&&this[e+s+1]!==0&&(c=1),this[e+s]=(t/u>>0)-c&255;return e+r};a.prototype.writeInt8=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):he(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):he(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):fe(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):fe(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,r){return Je(this,t,e,!0,r)};a.prototype.writeFloatBE=function(t,e,r){return Je(this,t,e,!1,r)};a.prototype.writeDoubleLE=function(t,e,r){return ze(this,t,e,!0,r)};a.prototype.writeDoubleBE=function(t,e,r){return ze(this,t,e,!1,r)};a.prototype.copy=function(t,e,r,i){if(r||(r=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var o=i-r,s;if(this===t&&r<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o};a.prototype.fill=function(t,e,r,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,r=this.length):typeof r=="string"&&(i=r,r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<r;++s)this[s]=t;else{var u=R(t)?t:pe(new a(t,i).toString()),c=u.length;for(s=0;s<r-e;++s)this[s+e]=u[s%c]}return this};ar=/[^+\/0-9A-Za-z-_]/g});var h=ve(()=>{"use strict";Ze()});var Br={};ke(Br,{EndpointSnippetGenerator:()=>Se});module.exports=ft(Br);p();h();p();h();p();h();function E(n){throw new Error("Unexpected value: "+JSON.stringify(n))}p();h();p();h();p();h();var et,tt,ne=(tt=(et=w.env.FERN_STACK_TRACK)==null?void 0:et.toLowerCase())!=null?tt:"",k=ne!==""&&ne!=="0"&&ne!=="false",Ee=["single","multiline","box"].includes(ne)?ne:"single";k&&(Error.stackTraceLimit=50);var yr=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),wr=new Set(["stacktrace"]);function we({maxFrames:n=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:i=[],filterNode:o=!0,filterJs:s=!0,formatFilename:u=c=>c}={}){var m;if(!k)return[];r=[...r,...yr],e=[...e,...wr],i=[...i,"runInteractiveTask"];let c=!1;return((m=new Error().stack)!=null?m:"").split(`
|
|
1
|
+
"use strict";var ue=Object.defineProperty,at=Object.defineProperties,ut=Object.getOwnPropertyDescriptor,ct=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertyNames,Ne=Object.getOwnPropertySymbols;var Re=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var ge=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,G=(n,t)=>{for(var e in t||(t={}))Re.call(t,e)&&ge(n,e,t[e]);if(Ne)for(var e of Ne(t))pt.call(t,e)&&ge(n,e,t[e]);return n},H=(n,t)=>at(n,ct(t));var ve=(n,t)=>()=>(n&&(t=n(n=0)),t);var ke=(n,t)=>{for(var e in t)ue(n,e,{get:t[e],enumerable:!0})},ht=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lt(t))!Re.call(n,i)&&i!==e&&ue(n,i,{get:()=>t[i],enumerable:!(r=ut(t,i))||r.enumerable});return n};var ft=n=>ht(ue({},"__esModule",{value:!0}),n);var l=(n,t,e)=>ge(n,typeof t!="symbol"?t+"":t,e);function Be(){throw new Error("setTimeout has not been defined")}function Le(){throw new Error("clearTimeout has not been defined")}function Ce(n){if(_===setTimeout)return setTimeout(n,0);if((_===Be||!_)&&setTimeout)return _=setTimeout,setTimeout(n,0);try{return _(n,0)}catch(t){try{return _.call(null,n,0)}catch(e){return _.call(this,n,0)}}}function mt(n){if(U===clearTimeout)return clearTimeout(n);if((U===Le||!U)&&clearTimeout)return U=clearTimeout,clearTimeout(n);try{return U(n)}catch(t){try{return U.call(null,n)}catch(e){return U.call(this,n)}}}function dt(){!z||!$||(z=!1,$.length?P=$.concat(P):ce=-1,P.length&&_e())}function _e(){if(!z){var n=Ce(dt);z=!0;for(var t=P.length;t;){for($=P,P=[];++ce<t;)$&&$[ce].run();ce=-1,t=P.length}$=null,z=!1,mt(n)}}function yt(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];P.push(new Ue(n,t)),P.length===1&&!z&&Ce(_e)}function Ue(n,t){this.fun=n,this.array=t}function q(){}function Lt(n){throw new Error("process.binding is not supported")}function Ct(){return"/"}function _t(n){throw new Error("process.chdir is not supported")}function Ut(){return 0}function Ot(n){var t=Mt.call(J)*.001,e=Math.floor(t),r=Math.floor(t%1*1e9);return n&&(e=e-n[0],r=r-n[1],r<0&&(e--,r+=1e9)),[e,r]}function qt(){var n=new Date,t=n-$t;return t/1e3}var _,U,P,z,$,ce,wt,xt,gt,vt,At,Tt,It,bt,Et,Ft,St,Nt,Rt,kt,Pt,Bt,J,Mt,$t,w,Pe,p=ve(()=>{"use strict";_=Be,U=Le;typeof globalThis.setTimeout=="function"&&(_=setTimeout);typeof globalThis.clearTimeout=="function"&&(U=clearTimeout);P=[],z=!1,ce=-1;Ue.prototype.run=function(){this.fun.apply(null,this.array)};wt="browser",xt="browser",gt=!0,vt={},At=[],Tt="",It={},bt={},Et={};Ft=q,St=q,Nt=q,Rt=q,kt=q,Pt=q,Bt=q;J=globalThis.performance||{},Mt=J.now||J.mozNow||J.msNow||J.oNow||J.webkitNow||function(){return new Date().getTime()};$t=new Date;w={nextTick:yt,title:wt,browser:gt,env:vt,argv:At,version:Tt,versions:It,on:Ft,addListener:St,once:Nt,off:Rt,removeListener:kt,removeAllListeners:Pt,emit:Bt,binding:Lt,cwd:Ct,chdir:_t,umask:Ut,hrtime:Ot,platform:xt,release:bt,config:Et,uptime:qt},Pe={};Object.keys(Pe).forEach(n=>{let t=n.split("."),e=w;for(let r=0;r<t.length;r++){let i=t[r];r===t.length-1?e[i]=Pe[n]:e=e[i]||(e[i]={})}})});function qe(){Te=!0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=n.length;t<e;++t)N[t]=n[t],b[n.charCodeAt(t)]=t;b[45]=62,b[95]=63}function Dt(n){Te||qe();var t,e,r,i,o,s,u=n.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=n[u-2]==="="?2:n[u-1]==="="?1:0,s=new jt(u*3/4-o),r=o>0?u-4:u;var c=0;for(t=0,e=0;t<r;t+=4,e+=3)i=b[n.charCodeAt(t)]<<18|b[n.charCodeAt(t+1)]<<12|b[n.charCodeAt(t+2)]<<6|b[n.charCodeAt(t+3)],s[c++]=i>>16&255,s[c++]=i>>8&255,s[c++]=i&255;return o===2?(i=b[n.charCodeAt(t)]<<2|b[n.charCodeAt(t+1)]>>4,s[c++]=i&255):o===1&&(i=b[n.charCodeAt(t)]<<10|b[n.charCodeAt(t+1)]<<4|b[n.charCodeAt(t+2)]>>2,s[c++]=i>>8&255,s[c++]=i&255),s}function Yt(n){return N[n>>18&63]+N[n>>12&63]+N[n>>6&63]+N[n&63]}function Wt(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16)+(n[o+1]<<8)+n[o+2],i.push(Yt(r));return i.join("")}function Me(n){Te||qe();for(var t,e=n.length,r=e%3,i="",o=[],s=16383,u=0,c=e-r;u<c;u+=s)o.push(Wt(n,u,u+s>c?c:u+s));return r===1?(t=n[e-1],i+=N[t>>2],i+=N[t<<4&63],i+="=="):r===2&&(t=(n[e-2]<<8)+n[e-1],i+=N[t>>10],i+=N[t>>4&63],i+=N[t<<2&63],i+="="),o.push(i),o.join("")}function le(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function B(n,t){if(le()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=a.prototype):(n===null&&(n=new a(t)),n.length=t),n}function a(n,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(n,t,e);if(typeof n=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Ie(this,n)}return je(this,n,t,e)}function je(n,t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Ht(n,t,e,r):typeof t=="string"?Gt(n,t,e):Jt(n,t)}function De(n){if(typeof n!="number")throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative')}function Vt(n,t,e,r){return De(t),t<=0?B(n,t):e!==void 0?typeof r=="string"?B(n,t).fill(e,r):B(n,t).fill(e):B(n,t)}function Ie(n,t){if(De(t),n=B(n,t<0?0:be(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)n[e]=0;return n}function Gt(n,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=Ye(t,e)|0;n=B(n,r);var i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function Ae(n,t){var e=t.length<0?0:be(t.length)|0;n=B(n,e);for(var r=0;r<e;r+=1)n[r]=t[r]&255;return n}function Ht(n,t,e,r){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return e===void 0&&r===void 0?t=new Uint8Array(t):r===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,r),a.TYPED_ARRAY_SUPPORT?(n=t,n.__proto__=a.prototype):n=Ae(n,t),n}function Jt(n,t){if(R(t)){var e=be(t.length)|0;return n=B(n,e),n.length===0||t.copy(n,0,0,e),n}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||fr(t.length)?B(n,0):Ae(n,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Ae(n,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function be(n){if(n>=le())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+le().toString(16)+" bytes");return n|0}function R(n){return!!(n!=null&&n._isBuffer)}function Ye(n,t){if(R(n))return n.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(n)||n instanceof ArrayBuffer))return n.byteLength;typeof n!="string"&&(n=""+n);var e=n.length;if(e===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return pe(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Ke(n).length;default:if(r)return pe(n).length;t=(""+t).toLowerCase(),r=!0}}function zt(n,t,e){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(n||(n="utf8");;)switch(n){case"hex":return or(this,t,e);case"utf8":case"utf-8":return Ge(this,t,e);case"ascii":return nr(this,t,e);case"latin1":case"binary":return ir(this,t,e);case"base64":return tr(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sr(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),r=!0}}function j(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function We(n,t,e,r,i){if(n.length===0)return-1;if(typeof e=="string"?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(i)return-1;e=n.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,r)),R(t))return t.length===0?-1:Oe(n,t,e,r,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):Oe(n,[t],e,r,i);throw new TypeError("val must be string, number or Buffer")}function Oe(n,t,e,r,i){var o=1,s=n.length,u=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(n.length<2||t.length<2)return-1;o=2,s/=2,u/=2,e/=2}function c(v,T){return o===1?v[T]:v.readUInt16BE(T*o)}var m;if(i){var d=-1;for(m=e;m<s;m++)if(c(n,m)===c(t,d===-1?0:m-d)){if(d===-1&&(d=m),m-d+1===u)return d*o}else d!==-1&&(m-=m-d),d=-1}else for(e+u>s&&(e=s-u),m=e;m>=0;m--){for(var f=!0,y=0;y<u;y++)if(c(n,m+y)!==c(t,y)){f=!1;break}if(f)return m}return-1}function Kt(n,t,e,r){e=Number(e)||0;var i=n.length-e;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var u=parseInt(t.substr(s*2,2),16);if(isNaN(u))return s;n[e+s]=u}return s}function Qt(n,t,e,r){return me(pe(t,n.length-e),n,e,r)}function Ve(n,t,e,r){return me(pr(t),n,e,r)}function Xt(n,t,e,r){return Ve(n,t,e,r)}function Zt(n,t,e,r){return me(Ke(t),n,e,r)}function er(n,t,e,r){return me(hr(t,n.length-e),n,e,r)}function tr(n,t,e){return t===0&&e===n.length?Me(n):Me(n.slice(t,e))}function Ge(n,t,e){e=Math.min(n.length,e);for(var r=[],i=t;i<e;){var o=n[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=e){var c,m,d,f;switch(u){case 1:o<128&&(s=o);break;case 2:c=n[i+1],(c&192)===128&&(f=(o&31)<<6|c&63,f>127&&(s=f));break;case 3:c=n[i+1],m=n[i+2],(c&192)===128&&(m&192)===128&&(f=(o&15)<<12|(c&63)<<6|m&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=n[i+1],m=n[i+2],d=n[i+3],(c&192)===128&&(m&192)===128&&(d&192)===128&&(f=(o&15)<<18|(c&63)<<12|(m&63)<<6|d&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,u=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|s&1023),r.push(s),i+=u}return rr(r)}function rr(n){var t=n.length;if(t<=$e)return String.fromCharCode.apply(String,n);for(var e="",r=0;r<t;)e+=String.fromCharCode.apply(String,n.slice(r,r+=$e));return e}function nr(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]&127);return r}function ir(n,t,e){var r="";e=Math.min(n.length,e);for(var i=t;i<e;++i)r+=String.fromCharCode(n[i]);return r}function or(n,t,e){var r=n.length;(!t||t<0)&&(t=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=t;o<e;++o)i+=lr(n[o]);return i}function sr(n,t,e){for(var r=n.slice(t,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+r[o+1]*256);return i}function A(n,t,e){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+t>e)throw new RangeError("Trying to access beyond buffer length")}function I(n,t,e,r,i,o){if(!R(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+r>n.length)throw new RangeError("Index out of range")}function he(n,t,e,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(n.length-e,2);i<o;++i)n[e+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}function fe(n,t,e,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(n.length-e,4);i<o;++i)n[e+i]=t>>>(r?i:3-i)*8&255}function He(n,t,e,r,i,o){if(e+r>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Je(n,t,e,r,i){return i||He(n,t,e,4,34028234663852886e22,-34028234663852886e22),Xe(n,t,e,r,23,4),e+4}function ze(n,t,e,r,i){return i||He(n,t,e,8,17976931348623157e292,-17976931348623157e292),Xe(n,t,e,r,52,8),e+8}function ur(n){if(n=cr(n).replace(ar,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function cr(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function lr(n){return n<16?"0"+n.toString(16):n.toString(16)}function pe(n,t){t=t||1/0;for(var e,r=n.length,i=null,o=[],s=0;s<r;++s){if(e=n.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function pr(n){for(var t=[],e=0;e<n.length;++e)t.push(n.charCodeAt(e)&255);return t}function hr(n,t){for(var e,r,i,o=[],s=0;s<n.length&&!((t-=2)<0);++s)e=n.charCodeAt(s),r=e>>8,i=e%256,o.push(i),o.push(r);return o}function Ke(n){return Dt(ur(n))}function me(n,t,e,r){for(var i=0;i<r&&!(i+e>=t.length||i>=n.length);++i)t[i+e]=n[i];return i}function fr(n){return n!==n}function mr(n){return n!=null&&(!!n._isBuffer||Qe(n)||dr(n))}function Qe(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function dr(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Qe(n.slice(0,0))}function de(n,t,e,r,i){var o,s,u=i*8-r-1,c=(1<<u)-1,m=c>>1,d=-7,f=e?i-1:0,y=e?-1:1,v=n[t+f];for(f+=y,o=v&(1<<-d)-1,v>>=-d,d+=u;d>0;o=o*256+n[t+f],f+=y,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=s*256+n[t+f],f+=y,d-=8);if(o===0)o=1-m;else{if(o===c)return s?NaN:(v?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-m}return(v?-1:1)*s*Math.pow(2,o-r)}function Xe(n,t,e,r,i,o){var s,u,c,m=o*8-i-1,d=(1<<m)-1,f=d>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,T=r?1:-1,ae=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=y/c:t+=y*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=d?(u=0,s=d):s+f>=1?(u=(t*c-1)*Math.pow(2,i),s=s+f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;n[e+v]=u&255,v+=T,u/=256,i-=8);for(s=s<<i|u,m+=i;m>0;n[e+v]=s&255,v+=T,s/=256,m-=8);n[e+v-T]|=ae*128}var N,b,jt,Te,$e,ar,Ze=ve(()=>{"use strict";p();h();N=[],b=[],jt=typeof Uint8Array!="undefined"?Uint8Array:Array,Te=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(n){return n.__proto__=a.prototype,n};a.from=function(n,t,e){return je(null,n,t,e)};a.kMaxLength=le();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(n,t,e){return Vt(null,n,t,e)};a.allocUnsafe=function(n){return Ie(null,n)};a.allocUnsafeSlow=function(n){return Ie(null,n)};a.isBuffer=mr;a.compare=function(t,e){if(!R(t)||!R(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,s=Math.min(r,i);o<s;++o)if(t[o]!==e[o]){r=t[o],i=e[o];break}return r<i?-1:i<r?1:0};a.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}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var r;if(e===void 0)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!R(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Ye;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)j(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)j(this,e,e+3),j(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)j(this,e,e+7),j(this,e+1,e+6),j(this,e+2,e+5),j(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Ge(this,0,t):zt.apply(this,arguments)};a.prototype.equals=function(t){if(!R(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,r,i,o){if(!R(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=r)return 0;if(i>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,u=r-e,c=Math.min(s,u),m=this.slice(i,o),d=t.slice(e,r),f=0;f<c;++f)if(m[f]!==d[f]){s=m[f],u=d[f];break}return s<u?-1:u<s?1:0};a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1};a.prototype.indexOf=function(t,e,r){return We(this,t,e,r,!0)};a.prototype.lastIndexOf=function(t,e,r){return We(this,t,e,r,!1)};a.prototype.write=function(t,e,r,i){if(e===void 0)i="utf8",r=this.length,e=0;else if(r===void 0&&typeof e=="string")i=e,r=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(r)?(r=r|0,i===void 0&&(i="utf8")):(i=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Kt(this,t,e,r);case"utf8":case"utf-8":return Qt(this,t,e,r);case"ascii":return Ve(this,t,e,r);case"latin1":case"binary":return Xt(this,t,e,r);case"base64":return Zt(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return er(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};$e=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=e===void 0?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,r){t=t|0,e=e|0,r||A(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||A(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};a.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};a.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),de(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),de(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),de(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),de(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;I(this,t,e,r,o,0)}var s=1,u=0;for(this[e]=t&255;++u<r&&(s*=256);)this[e+u]=t/s&255;return e+r};a.prototype.writeUIntBE=function(t,e,r,i){if(t=+t,e=e|0,r=r|0,!i){var o=Math.pow(2,8*r)-1;I(this,t,e,r,o,0)}var s=r-1,u=1;for(this[e+s]=t&255;--s>=0&&(u*=256);)this[e+s]=t/u&255;return e+r};a.prototype.writeUInt8=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):he(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):he(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):fe(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):fe(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var s=0,u=1,c=0;for(this[e]=t&255;++s<r&&(u*=256);)t<0&&c===0&&this[e+s-1]!==0&&(c=1),this[e+s]=(t/u>>0)-c&255;return e+r};a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var s=r-1,u=1,c=0;for(this[e+s]=t&255;--s>=0&&(u*=256);)t<0&&c===0&&this[e+s+1]!==0&&(c=1),this[e+s]=(t/u>>0)-c&255;return e+r};a.prototype.writeInt8=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):he(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):he(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):fe(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e|0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):fe(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,r){return Je(this,t,e,!0,r)};a.prototype.writeFloatBE=function(t,e,r){return Je(this,t,e,!1,r)};a.prototype.writeDoubleLE=function(t,e,r){return ze(this,t,e,!0,r)};a.prototype.writeDoubleBE=function(t,e,r){return ze(this,t,e,!1,r)};a.prototype.copy=function(t,e,r,i){if(r||(r=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var o=i-r,s;if(this===t&&r<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o};a.prototype.fill=function(t,e,r,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,r=this.length):typeof r=="string"&&(i=r,r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e=e>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<r;++s)this[s]=t;else{var u=R(t)?t:pe(new a(t,i).toString()),c=u.length;for(s=0;s<r-e;++s)this[s+e]=u[s%c]}return this};ar=/[^+\/0-9A-Za-z-_]/g});var h=ve(()=>{"use strict";Ze()});var Br={};ke(Br,{EndpointSnippetGenerator:()=>Se});module.exports=ft(Br);p();h();p();h();p();h();function E(n){throw new Error("Unexpected value: "+JSON.stringify(n))}p();h();p();h();p();h();var et,tt,ne=(tt=(et=w.env.FERN_STACK_TRACK)==null?void 0:et.toLowerCase())!=null?tt:"",k=ne!==""&&ne!=="0"&&ne!=="false",Ee=["single","multiline","box"].includes(ne)?ne:"single";k&&(Error.stackTraceLimit=50);var yr=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),wr=new Set(["stacktrace"]);function we({maxFrames:n=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:i=[],filterNode:o=!0,filterJs:s=!0,formatFilename:u=c=>c}={}){var m;if(!k)return[];r=[...r,...yr],e=[...e,...wr],i=[...i,"runInteractiveTask"];let c=!1;return((m=new Error().stack)!=null?m:"").split(`
|
|
2
2
|
`).map(d=>{let f=d.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(f&&f.length===5){let[,y,v,T,ae]=f;if(!y||!v||!T||!ae)return;if(c||i.some(st=>y==null?void 0:y.includes(st))){c=!0;return}switch(y){case"Object.<anonymous>":y="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":y=`${y.substring(y.indexOf(".")+1)}()=> { ... }`;break}return{fn:y,path:u(v),position:`${T}:${ae}`}}}).filter(d=>{var f,y;return d&&!r.some(v=>d.fn.includes(v))&&!(o&&((f=d.path)!=null&&f.startsWith("node:")))&&!(s&&((y=d.path)!=null&&y.endsWith(".js")))&&!e.some(v=>d.path.includes(v))}).slice(t,t+n)}var ye=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:r=[],filterFunctions:i=[],stopOn:o=[],filterNode:s=!0,filterJs:u=!0,multiline:c=!1,formatFilename:m=d=>d}={}){l(this,"maxFrames");l(this,"skip");l(this,"filterPaths");l(this,"filterFunctions");l(this,"stopOn");l(this,"filterNode");l(this,"filterJs");l(this,"multiline");l(this,"formatFilename");l(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=r,this.filterFunctions=i,this.stopOn=o,this.filterNode=s,this.filterJs=u,this.multiline=c,this.formatFilename=m}tag(t){let e=this.tracking.get(t)||new Set;we({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(r=>e.add(r)),this.tracking.set(t,e)}trace(t){if(!k)return"";let e=this.tracking.get(t);return e?[...e].map(r=>`${this.multiline?`
|
|
3
3
|
`:""}${r.fn} - ${r.path}:${r.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},L;function rt({maxFrames:n=50,skip:t=0,filterPaths:e=[],filterFunctions:r=[],stopOn:i=[],filterNode:o=!0,filterJs:s=!0,multiline:u=!1,formatFilename:c=m=>m}={}){k&&(L!=null||(L=new ye({maxFrames:n,skip:t,filterPaths:e,filterFunctions:r,stopOn:i,filterNode:o,filterJs:s,multiline:u,formatFilename:c})))}function nt(n){L==null||L.tag(n)}function Fe(n){var t;return(t=L==null?void 0:L.frames(n))!=null?t:[]}var D=class{constructor(){nt(this)}};p();h();var xe=class{formatMultiple(t){return Promise.all(t.map(e=>this.format(e)))}formatMultipleSync(t){return t.map(e=>this.formatSync(e))}},ie=class extends xe{async format(t){return t}formatSync(t){return t}};p();h();p();h();p();h();var F=class extends D{constructor(e){super();l(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 xr=4;rt({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var oe=class{constructor(){l(this,"lineBuffer",[]);l(this,"indentLevel",0);l(this,"hasWrittenAnything",!1);l(this,"lastCharacterIsSemicolon",!1);l(this,"lastCharacterIsNewline",!1);l(this,"nodeStackFrames",[])}get buffer(){return k&&this.nodeStackFrames.length>0&&this.writeInternal(`
|
|
4
4
|
`),this.lineBuffer.join(`
|
|
@@ -16,12 +16,12 @@ ${o}`);this.isAtStartOfLine()&&(s=o+s),r&&(s+=`
|
|
|
16
16
|
${t}`)}return t}toString(){let t=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(t)}catch(e){throw new Error(`Failed to format TypeScript file: ${e}
|
|
17
17
|
${t}`)}return t}getContent(){let t=this.stringifyImports();return t.length>0?t+`
|
|
18
18
|
`+this.buffer:this.buffer}stringifyImports(){let t="";for(let[e,r]of Object.entries(this.imports)){let i=this.defaultImports[e],o="",s=r.filter(c=>{var m;return((m=c.importFrom)==null?void 0:m.type)==="named"}),u=this.starImportAliases[e];if(s.length>0||i!=null||u!=null){if(t+="import",i!=null&&(t+=` ${i.name}`),s.length>0){for(let m of s.slice(0,-1))o+=`${m.name}, `;let c=s[s.length-1];c!=null&&(o+=`${c.name}`),i!=null&&(t+=","),t+=` { ${o} }`}u!=null&&((i!=null||s.length>0)&&(t+=", "),t+=` * as ${u}`),t+=` from "${e}";
|
|
19
|
-
`}}return t}};var g=class extends D{async toStringAsync({customConfig:t,formatter:e}){let r=new se({customConfig:t,formatter:e});return this.write(r),await r.toStringAsync()}toString({customConfig:t,formatter:e}){let r=new se({customConfig:t,formatter:e});return this.write(r),r.toString()}};var x={};ke(x,{AstNode:()=>g,ClassInstantiation:()=>
|
|
19
|
+
`}}return t}};var g=class extends D{async toStringAsync({customConfig:t,formatter:e}){let r=new se({customConfig:t,formatter:e});return this.write(r),await r.toStringAsync()}toString({customConfig:t,formatter:e}){let r=new se({customConfig:t,formatter:e});return this.write(r),r.toString()}};var x={};ke(x,{AstNode:()=>g,ClassInstantiation:()=>K,CodeBlock:()=>Q,Comment:()=>O,Function:()=>X,FunctionInvocation:()=>Z,MethodInvocation:()=>ee,Parameter:()=>te,Reference:()=>V,Type:()=>W,TypeLiteral:()=>C,Types:()=>W,Variable:()=>re,Writer:()=>Y,codeblock:()=>Ir,function_:()=>br,instantiateClass:()=>Er,invokeFunction:()=>Fr,invokeMethod:()=>Sr,parameter:()=>Nr,reference:()=>Rr,variable:()=>kr});p();h();p();h();p();h();var K=class extends g{constructor({class_:e,arguments_:r}){super();l(this,"class_");l(this,"arguments_");this.class_=e,this.arguments_=r}write(e){e.write("new "),e.writeNode(this.class_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};p();h();var Q=class extends g{constructor(e){super();l(this,"args");this.args=e}write(e){return new F(this.args).write(e)}};p();h();var O=class extends g{constructor({docs:e}={docs:void 0}){super();l(this,"docs");this.docs=e}write(e){this.docs!=null&&(e.writeLine("/**"),this.docs.split(`
|
|
20
20
|
`).forEach(r=>{e.writeLine(` * ${r}`)}),e.writeLine("*/"))}};p();h();p();h();var W=class extends g{constructor(e){super();l(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"string":e.write("string");break;case"number":e.write("number");break;case"bigint":e.write("bigint");break;case"boolean":e.write("boolean");break;case"array":this.internalType.valueType.write(e),e.write("[]");break;case"map":e.write("Record<"),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write(">");break;case"object":e.write("{"),e.indent();for(let[r,i]of Object.entries(this.internalType.fields))e.write(`${r}: `),i.write(e),e.writeLine(",");e.dedent(),e.write("}");break;case"enum":e.write("enum");break;case"any":e.write("any");break;case"promise":e.write("Promise<"),this.internalType.value.write(e),e.write(">");break;case"unknown":e.write("unknown");break;case"void":e.write("void");break;case"undefined":e.write("undefined");break;case"null":e.write("null");break;case"never":e.write("never");break;case"nop":break;default:E(this.internalType)}}static string(){return new this({type:"string"})}static number(){return new this({type:"number"})}static bigint(){return new this({type:"bigint"})}static boolean(){return new this({type:"boolean"})}static array(e){return new this({type:"array",valueType:e})}static object(e){return new this({type:"object",fields:e})}static enum(e){return new this({type:"enum",values:e})}static any(){return new this({type:"any"})}static promise(e){return e.internalType.type==="promise"?e:new this({type:"promise",value:e})}static unknown(){return new this({type:"unknown"})}static void(){return new this({type:"void"})}static undefined(){return new this({type:"undefined"})}static null(){return new this({type:"null"})}static never(){return new this({type:"never"})}static nop(){return new this({type:"nop"})}};var X=class extends g{constructor({name:e,parameters:r,async:i,body:o,return_:s,docs:u}){super();l(this,"name");l(this,"parameters");l(this,"async");l(this,"body");l(this,"return_");l(this,"docs");this.name=e,this.parameters=r,this.async=i!=null?i:!1,this.body=o,this.return_=s,this.docs=u}write(e){var r;e.writeNode(new O({docs:this.docs})),this.async&&e.write("async "),e.write("function "),e.write(`${this.name}`),this.writeParameters(e),this.return_!=null&&(e.write(": "),e.writeNode(this.async?W.promise(this.return_):this.return_)),e.writeLine(" {"),e.indent(),(r=this.body)==null||r.write(e),e.dedent(),e.writeNewLineIfLastLineNot(),e.writeLine("}")}writeParameters(e){if(this.parameters.length===0){e.write("()");return}e.indent(),e.writeLine("(");for(let r of this.parameters)e.writeNode(r),e.writeLine(",");e.dedent(),e.write(")")}};p();h();var Z=class extends g{constructor({function_:e,arguments_:r}){super();l(this,"function_");l(this,"arguments_");this.function_=e,this.arguments_=r}write(e){e.writeNode(this.function_),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};p();h();var ee=class extends g{constructor({on:e,method:r,arguments_:i,async:o}){super();l(this,"on");l(this,"method");l(this,"arguments_");l(this,"async");this.on=e,this.method=r,this.arguments_=i,this.async=o}write(e){this.async&&e.write("await "),this.on.write(e),e.write("."),e.write(this.method),e.write("("),e.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:r=>r.write(e)}),e.write(")")}};p();h();var te=class extends g{constructor({name:e,type:r,docs:i}){super();l(this,"name");l(this,"type");l(this,"docs");this.name=e,this.type=r,this.docs=i}write(e){this.docs!=null&&e.writeNode(new O({docs:this.docs})),e.write(`${this.name}: `),this.type.write(e)}};p();h();var V=class extends g{constructor({name:e,importFrom:r,memberName:i}){super();l(this,"name");l(this,"importFrom");l(this,"memberName");this.name=e,this.importFrom=r,this.memberName=i}write(e){var o;this.importFrom!=null&&e.addImport(this);let r=((o=this.importFrom)==null?void 0:o.type)==="star"?`${this.importFrom.starImportAlias}.`:"",i=this.memberName!=null?`.${this.memberName}`:"";e.write(`${r}${this.name}${i}`)}};p();h();var C=class n extends g{constructor(e){super();l(this,"internalType");this.internalType=e}write(e){var o,s;let r=!!((o=e.customConfig)!=null&&o.noSerdeLayer),i=!!((s=e.customConfig)!=null&&s.useBigInt);switch(this.internalType.type){case"array":{this.writeIterable({writer:e,iterable:this.internalType});break}case"blob":{if(r){e.writeNode(n.string(this.internalType.value));return}e.write("new Blob(["),e.writeNode(n.string(this.internalType.value)),e.write("])");break}case"boolean":{e.write(this.internalType.value.toString());break}case"bigint":{if(i){e.write(`BigInt("${this.internalType.value.toString()}")`);return}e.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(r){e.writeNode(n.string(this.internalType.value));return}e.write("new Date("),e.writeNode(n.string(this.internalType.value)),e.write(")");break}case"number":{e.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:e,object:this.internalType});break}case"record":{this.writeRecord({writer:e,record:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"set":{if(r||this.isSetOfObjects()){e.writeNode(n.array({values:this.internalType.values}));return}e.write("new Set("),this.writeIterable({writer:e,iterable:this.internalType}),e.write(")");break}case"string":{this.internalType.value.includes(`
|
|
21
21
|
`)?this.writeStringWithBackticks({writer:e,value:this.internalType.value}):e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:e,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:E(this.internalType)}}isObject(){return this.internalType.type==="object"}asObjectOrThrow(){if(this.isObject())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not an object")}isSet(){return this.internalType.type==="set"}asSetOrThrow(){if(this.isSet())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a set")}isSetOfObjects(){return this.isSet()&&this.asSetOrThrow().values.every(e=>e.isObject())}writeStringWithBackticks({writer:e,value:r}){e.write("`");let i=r.split(`
|
|
22
22
|
`),o=i[0]+`
|
|
23
23
|
`,s=i.slice(1).join(`
|
|
24
|
-
`);e.write(o.replaceAll("`","\\`")),e.writeNoIndent(s.replaceAll("`","\\`")),e.write("`")}writeIterable({writer:e,iterable:r}){let i=Ar({values:r.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeRecord({writer:e,record:r}){let i=vr({entries:r.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeObject({writer:e,object:r}){let i=gr({fields:r.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}static array({values:e}){return new this({type:"array",values:e})}static bigint(e){return new this({type:"bigint",value:e})}static blob(e){return new this({type:"blob",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static object({fields:e}){return new this({type:"object",fields:e})}static record({entries:e}){return new this({type:"record",entries:e})}static reference(e){return new this({type:"reference",value:e})}static set({values:e}){return new this({type:"set",values:e})}static string(e){return new this({type:"string",value:e})}static tuple({values:e}){return new this({type:"tuple",values:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(r.includes('"')?`\`${r}\``:`"${r}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of r)e.writeNode(n.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let i=Object.entries(r);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`${o}: `),e.writeNode(n.unknown(s)),e.writeLine(",");e.dedent(),e.write("}")}};function gr({fields:n}){return n.filter(t=>!C.isNop(t.value))}function vr({entries:n}){return n.filter(t=>!C.isNop(t.key)&&!C.isNop(t.value))}function Ar({values:n}){return n.filter(t=>!C.isNop(t))}p();h();var re=class extends g{constructor(e){super();l(this,"args");this.args=e}write(e){this.args.export&&e.write("export "),this.args.const?e.write("const "):e.write("let "),e.write(`${this.args.name} = `),e.writeNode(this.args.initializer)}};function Ir(n){return new K(n)}function br(n){return new X(n)}function Er(n){return new Q(n)}function Fr(n){return new Z(n)}function Sr(n){return new ee(n)}function Nr(n){return new te(n)}function Rr(n){return new V(n)}function kr(n){return new re(n)}var it="client",ot="main",Pr={type:"primitive",value:"STRING"},Se=class{constructor({context:t}){l(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return await this.buildCodeBlock({endpoint:t,snippet:e}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e}).toString({customConfig:this.context.customConfig})}async generateSnippetAst({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return x.codeblock(r=>{r.writeNode(x.function_({name:ot,async:!0,parameters:[],body:x.codeblock(i=>{i.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),i.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})})),r.writeNodeStatement(x.invokeFunction({function_:x.reference({name:ot}),arguments_:[]}))})}constructClient({endpoint:t,snippet:e}){return x.variable({name:it,const:!0,initializer:x.instantiateClass({class_:x.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:t,snippet:e})]})})}getConstructorArgs({endpoint:t,snippet:e}){let r=[],i=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&r.push(...i),t.auth!=null&&(e.auth!=null?r.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:M.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(S.PathParameters),this.context.ir.pathParameters!=null&&r.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(S.Headers),this.context.ir.headers!=null&&e.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),r.length===0?x.TypeLiteral.nop():x.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let r=this.getEnvironmentValue({baseUrl:t,environment:e});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:M.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return x.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let r=this.context.getEnvironmentTypeReferenceFromID(e);if(r==null){this.context.errors.add({severity:M.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return x.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?x.TypeLiteral.object({fields:Object.entries(e).map(([r,i])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:Pr,value:i})}))}):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The TypeScript SDK v2 Generator does not support Inferred auth scheme yet"),[]);default:E(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:M.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:M.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:x.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),value:x.TypeLiteral.string(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:x.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:x.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:x.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let r=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&r.push(o)}return r}getConstructorHeaderArg({header:t,value:e}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!x.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(t.name.name),value:r}}callMethod({endpoint:t,snippet:e}){return x.invokeMethod({on:x.reference({name:it}),method:this.getMethod({endpoint:t}),async:!0,arguments_:this.getMethodArgs({endpoint:t,snippet:e})})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:E(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,s;let r=[];this.context.errors.scope(S.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(s=t.pathParameters)!=null?s:[]];return i.length>0&&r.push(...this.getPathParameters({namedParameters:i,snippet:e}).map(u=>u.value)),this.context.errors.unscope(),this.context.errors.scope(S.RequestBody),t.body!=null&&r.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:E(t)}}getBytesBodyRequestArg({value:t}){return typeof t!="string"?(this.context.errors.add({severity:M.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),x.TypeLiteral.nop()):x.TypeLiteral.blob(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){var c,m,d,f;let r=[],{inlinePathParameters:i,inlineFileProperties:o}={inlinePathParameters:(m=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?m:!1,inlineFileProperties:(f=(d=this.context.customConfig)==null?void 0:d.inlineFileProperties)!=null?f:!1};this.context.errors.scope(S.PathParameters);let s=[];t.pathParameters!=null&&s.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(S.RequestBody);let u=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||r.push(...s.map(y=>y.value)),o||r.push(...u.fileFields.map(y=>y.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:o})&&r.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?s:[],filePropertyInfo:u})),r}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:r,filePropertyInfo:i}){var d,f,y,v;this.context.errors.scope(S.QueryParameters);let s=this.context.associateQueryParametersByWireValue({parameters:(d=t.queryParameters)!=null?d:[],values:(f=e.queryParameters)!=null?f:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},T),{convertOpts:{isForRequest:!0}}))}));this.context.errors.unscope(),this.context.errors.scope(S.Headers);let c=this.context.associateByWireValue({parameters:(y=t.headers)!=null?y:[],values:(v=e.headers)!=null?v:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},T),{convertOpts:{isForRequest:!0}}))}));this.context.errors.unscope(),this.context.errors.scope(S.RequestBody);let m=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),x.TypeLiteral.object({fields:[...r,...s,...c,...m]})}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:r}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:E(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){var e;return(e=this.context.customConfig)!=null&&e.inlineFileProperties?[...t.fileFields,...t.bodyPropertyFields]:t.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:E(t)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){var o;let r=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let s of i)r.push({name:this.context.getPropertyName(s.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},s),{convertOpts:{isForRequest:!0}}))});return r}getPathParameters({namedParameters:t,snippet:e}){var o;let r=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{},ignoreMissingParameters:!0});for(let s of i)r.push({name:this.context.getPropertyName(s.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},s),{convertOpts:{isForRequest:!0}}))});return r}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}};0&&(module.exports={EndpointSnippetGenerator});
|
|
24
|
+
`);e.write(o.replaceAll("`","\\`")),e.writeNoIndent(s.replaceAll("`","\\`")),e.write("`")}writeIterable({writer:e,iterable:r}){let i=Ar({values:r.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeRecord({writer:e,record:r}){let i=vr({entries:r.entries});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)o.key.write(e),e.write(": "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}writeObject({writer:e,object:r}){let i=gr({fields:r.fields});if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let o of i)e.write(`${o.name}: `),o.value.write(e),e.writeLine(",");e.dedent(),e.write("}")}static array({values:e}){return new this({type:"array",values:e})}static bigint(e){return new this({type:"bigint",value:e})}static blob(e){return new this({type:"blob",value:e})}static boolean(e){return new this({type:"boolean",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static object({fields:e}){return new this({type:"object",fields:e})}static record({entries:e}){return new this({type:"record",entries:e})}static reference(e){return new this({type:"reference",value:e})}static set({values:e}){return new this({type:"set",values:e})}static string(e){return new this({type:"string",value:e})}static tuple({values:e}){return new this({type:"tuple",values:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:r}){switch(typeof r){case"boolean":e.write(r.toString());return;case"string":e.write(r.includes('"')?`\`${r}\``:`"${r}"`);return;case"number":e.write(r.toString());return;case"object":if(r==null){e.write("null");return}if(Array.isArray(r)){this.writeUnknownArray({writer:e,value:r});return}this.writeUnknownObject({writer:e,value:r});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof r}`)}}writeUnknownArray({writer:e,value:r}){if(r.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of r)e.writeNode(n.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:r}){let i=Object.entries(r);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,s]of i)e.write(`${o}: `),e.writeNode(n.unknown(s)),e.writeLine(",");e.dedent(),e.write("}")}};function gr({fields:n}){return n.filter(t=>!C.isNop(t.value))}function vr({entries:n}){return n.filter(t=>!C.isNop(t.key)&&!C.isNop(t.value))}function Ar({values:n}){return n.filter(t=>!C.isNop(t))}p();h();var re=class extends g{constructor(e){super();l(this,"args");this.args=e}write(e){this.args.export&&e.write("export "),this.args.const?e.write("const "):e.write("let "),e.write(`${this.args.name} = `),e.writeNode(this.args.initializer)}};function Ir(n){return new Q(n)}function br(n){return new X(n)}function Er(n){return new K(n)}function Fr(n){return new Z(n)}function Sr(n){return new ee(n)}function Nr(n){return new te(n)}function Rr(n){return new V(n)}function kr(n){return new re(n)}var it="client",ot="main",Pr={type:"primitive",value:"STRING"},Se=class{constructor({context:t}){l(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return await this.buildCodeBlock({endpoint:t,snippet:e}).toStringAsync({customConfig:this.context.customConfig})}generateSnippetSync({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e}).toString({customConfig:this.context.customConfig})}async generateSnippetAst({endpoint:t,request:e}){return this.buildCodeBlock({endpoint:t,snippet:e})}buildCodeBlock({endpoint:t,snippet:e}){return x.codeblock(r=>{r.writeNode(x.function_({name:ot,async:!0,parameters:[],body:x.codeblock(i=>{i.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),i.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})})),r.writeNodeStatement(x.invokeFunction({function_:x.reference({name:ot}),arguments_:[]}))})}constructClient({endpoint:t,snippet:e}){return x.variable({name:it,const:!0,initializer:x.instantiateClass({class_:x.reference({name:this.context.getRootClientName(),importFrom:this.context.getModuleImport()}),arguments_:[this.getConstructorArgs({endpoint:t,snippet:e})]})})}getConstructorArgs({endpoint:t,snippet:e}){let r=[],i=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&r.push(...i),t.auth!=null&&(e.auth!=null?r.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:M.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(S.PathParameters),this.context.ir.pathParameters!=null&&r.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(S.Headers),this.context.ir.headers!=null&&e.headers!=null&&r.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),r.length===0?x.TypeLiteral.nop():x.TypeLiteral.object({fields:r})}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let r=this.getEnvironmentValue({baseUrl:t,environment:e});return r==null?[]:[{name:"environment",value:r}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:M.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return x.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let r=this.context.getEnvironmentTypeReferenceFromID(e);if(r==null){this.context.errors.add({severity:M.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return x.TypeLiteral.reference(r)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?x.TypeLiteral.object({fields:Object.entries(e).map(([r,i])=>({name:r,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:Pr,value:i})}))}):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The TypeScript SDK v2 Generator does not support Inferred auth scheme yet"),[]);default:E(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:M.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:M.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:x.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),value:x.TypeLiteral.string(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:x.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:x.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:x.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let r=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&r.push(o)}return r}getConstructorHeaderArg({header:t,value:e}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!x.TypeLiteral.isNop(r))return{name:this.context.getPropertyName(t.name.name),value:r}}callMethod({endpoint:t,snippet:e}){return x.invokeMethod({on:x.reference({name:it}),method:this.getMethod({endpoint:t}),async:!0,arguments_:this.getMethodArgs({endpoint:t,snippet:e})})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:E(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,s;let r=[];this.context.errors.scope(S.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(s=t.pathParameters)!=null?s:[]];return i.length>0&&r.push(...this.getPathParameters({namedParameters:i,snippet:e}).map(u=>u.value)),this.context.errors.unscope(),this.context.errors.scope(S.RequestBody),t.body!=null&&r.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:E(t)}}getBytesBodyRequestArg({value:t}){return typeof t!="string"?(this.context.errors.add({severity:M.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),x.TypeLiteral.nop()):x.TypeLiteral.blob(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){var c,m,d,f;let r=[],{inlinePathParameters:i,inlineFileProperties:o}={inlinePathParameters:(m=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?m:!1,inlineFileProperties:(f=(d=this.context.customConfig)==null?void 0:d.inlineFileProperties)!=null?f:!1};this.context.errors.scope(S.PathParameters);let s=[];t.pathParameters!=null&&s.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(S.RequestBody);let u=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||r.push(...s.map(y=>y.value)),o||r.push(...u.fileFields.map(y=>y.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:o})&&r.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?s:[],filePropertyInfo:u})),r}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:r,filePropertyInfo:i}){var d,f,y,v;this.context.errors.scope(S.QueryParameters);let s=this.context.associateQueryParametersByWireValue({parameters:(d=t.queryParameters)!=null?d:[],values:(f=e.queryParameters)!=null?f:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},T),{convertOpts:{isForRequest:!0}}))}));this.context.errors.unscope(),this.context.errors.scope(S.Headers);let c=this.context.associateByWireValue({parameters:(y=t.headers)!=null?y:[],values:(v=e.headers)!=null?v:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},T),{convertOpts:{isForRequest:!0}}))}));this.context.errors.unscope(),this.context.errors.scope(S.RequestBody);let m=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),x.TypeLiteral.object({fields:[...r,...s,...c,...m]})}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:r}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:r});default:E(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){var e;return(e=this.context.customConfig)!=null&&e.inlineFileProperties?[...t.fileFields,...t.bodyPropertyFields]:t.bodyPropertyFields}getReferencedRequestBodyPropertyObjectField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e,convertOpts:{isForRequest:!0}});default:E(t)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){var o;let r=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let s of i)r.push({name:this.context.getPropertyName(s.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},s),{convertOpts:{isForRequest:!0}}))});return r}getPathParameters({namedParameters:t,snippet:e}){var o;let r=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{},ignoreMissingParameters:!0});for(let s of i)r.push({name:this.context.getPropertyName(s.name.name),value:this.context.dynamicTypeLiteralMapper.convert(H(G({},s),{convertOpts:{isForRequest:!0}}))});return r}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}};0&&(module.exports={EndpointSnippetGenerator});
|
|
25
25
|
/*! Bundled license information:
|
|
26
26
|
|
|
27
27
|
@esbuild-plugins/node-globals-polyfill/Buffer.js:
|