@fern-api/typescript-dynamic-snippets 3.37.1-rc0 → 3.38.2

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.
Files changed (57) hide show
  1. package/dist/index.cjs +41 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/{esm/DynamicSnippetsGeneratorContext-ql0RJeI9.d.ts → dist/index.d.cts} +62 -3
  4. package/{cjs/DynamicSnippetsGeneratorContext-ql0RJeI9.d.cts → dist/index.d.ts} +62 -3
  5. package/dist/index.js +41 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +9 -10
  8. package/cjs/DynamicSnippetsGenerator.cjs +0 -46
  9. package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
  10. package/cjs/DynamicSnippetsGenerator.d.cts +0 -18
  11. package/cjs/EndpointSnippetGenerator.cjs +0 -35
  12. package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
  13. package/cjs/EndpointSnippetGenerator.d.cts +0 -54
  14. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -46
  15. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
  16. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
  17. package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -35
  18. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
  19. package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -4
  20. package/cjs/context/FilePropertyMapper.cjs +0 -35
  21. package/cjs/context/FilePropertyMapper.cjs.map +0 -1
  22. package/cjs/context/FilePropertyMapper.d.cts +0 -4
  23. package/cjs/index.cjs +0 -46
  24. package/cjs/index.cjs.map +0 -1
  25. package/cjs/index.d.cts +0 -6
  26. package/esm/DynamicSnippetsGenerator.d.ts +0 -18
  27. package/esm/DynamicSnippetsGenerator.js +0 -2
  28. package/esm/DynamicSnippetsGenerator.js.map +0 -1
  29. package/esm/EndpointSnippetGenerator.d.ts +0 -54
  30. package/esm/EndpointSnippetGenerator.js +0 -2
  31. package/esm/EndpointSnippetGenerator.js.map +0 -1
  32. package/esm/chunk-7YNOMYIY.js +0 -2
  33. package/esm/chunk-7YNOMYIY.js.map +0 -1
  34. package/esm/chunk-GCLEFX73.js +0 -15
  35. package/esm/chunk-GCLEFX73.js.map +0 -1
  36. package/esm/chunk-HXSH7OPV.js +0 -2
  37. package/esm/chunk-HXSH7OPV.js.map +0 -1
  38. package/esm/chunk-NNO323RB.js +0 -2
  39. package/esm/chunk-NNO323RB.js.map +0 -1
  40. package/esm/chunk-R73BYUJU.js +0 -2
  41. package/esm/chunk-R73BYUJU.js.map +0 -1
  42. package/esm/chunk-WFHV7AZS.js +0 -35
  43. package/esm/chunk-WFHV7AZS.js.map +0 -1
  44. package/esm/chunk-X6S2ZXYW.js +0 -2
  45. package/esm/chunk-X6S2ZXYW.js.map +0 -1
  46. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
  47. package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
  48. package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
  49. package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -4
  50. package/esm/context/DynamicTypeLiteralMapper.js +0 -2
  51. package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
  52. package/esm/context/FilePropertyMapper.d.ts +0 -4
  53. package/esm/context/FilePropertyMapper.js +0 -2
  54. package/esm/context/FilePropertyMapper.js.map +0 -1
  55. package/esm/index.d.ts +0 -6
  56. package/esm/index.js +0 -2
  57. package/esm/index.js.map +0 -1
@@ -1,4 +0,0 @@
1
- import '@fern-api/dynamic-ir-sdk';
2
- import '@fern-api/typescript-ast';
3
- export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-ql0RJeI9.cjs';
4
- import '@fern-api/browser-compatible-base-generator';
@@ -1,35 +0,0 @@
1
- "use strict";var nt=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var Zt=Object.getOwnPropertyNames;var te=Object.prototype.hasOwnProperty;var ee=(r,e,t)=>e in r?nt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var dt=(r,e)=>()=>(r&&(e=r(r=0)),e);var vt=(r,e)=>{for(var t in e)nt(r,t,{get:e[t],enumerable:!0})},re=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Zt(e))!te.call(r,n)&&n!==t&&nt(r,n,{get:()=>e[n],enumerable:!(i=Xt(e,n))||i.enumerable});return r};var ie=r=>re(nt({},"__esModule",{value:!0}),r);var l=(r,e,t)=>ee(r,typeof e!="symbol"?e+"":e,t);function bt(){throw new Error("setTimeout has not been defined")}function It(){throw new Error("clearTimeout has not been defined")}function St(r){if(_===setTimeout)return setTimeout(r,0);if((_===bt||!_)&&setTimeout)return _=setTimeout,setTimeout(r,0);try{return _(r,0)}catch(e){try{return _.call(null,r,0)}catch(t){return _.call(this,r,0)}}}function ne(r){if(C===clearTimeout)return clearTimeout(r);if((C===It||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(r);try{return C(r)}catch(e){try{return C.call(null,r)}catch(t){return C.call(this,r)}}}function oe(){!G||!P||(G=!1,P.length?F=P.concat(F):ot=-1,F.length&&Nt())}function Nt(){if(!G){var r=St(oe);G=!0;for(var e=F.length;e;){for(P=F,F=[];++ot<e;)P&&P[ot].run();ot=-1,e=F.length}P=null,G=!1,ne(r)}}function se(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];F.push(new Ft(r,e)),F.length===1&&!G&&St(Nt)}function Ft(r,e){this.fun=r,this.array=e}function $(){}function ve(r){throw new Error("process.binding is not supported")}function ke(){return"/"}function be(r){throw new Error("process.chdir is not supported")}function Ie(){return 0}function Ne(r){var e=Se.call(V)*.001,t=Math.floor(e),i=Math.floor(e%1*1e9);return r&&(t=t-r[0],i=i-r[1],i<0&&(t--,i+=1e9)),[t,i]}function Re(){var r=new Date,e=r-Fe;return e/1e3}var _,C,F,G,P,ot,ae,ue,fe,le,ce,he,pe,me,de,we,xe,ye,ge,Te,Ae,Ee,V,Se,Fe,x,kt,c=dt(()=>{"use strict";_=bt,C=It;typeof globalThis.setTimeout=="function"&&(_=setTimeout);typeof globalThis.clearTimeout=="function"&&(C=clearTimeout);F=[],G=!1,ot=-1;Ft.prototype.run=function(){this.fun.apply(null,this.array)};ae="browser",ue="browser",fe=!0,le={},ce=[],he="",pe={},me={},de={};we=$,xe=$,ye=$,ge=$,Te=$,Ae=$,Ee=$;V=globalThis.performance||{},Se=V.now||V.mozNow||V.msNow||V.oNow||V.webkitNow||function(){return new Date().getTime()};Fe=new Date;x={nextTick:se,title:ae,browser:fe,env:le,argv:ce,version:he,versions:pe,on:we,addListener:xe,once:ye,off:ge,removeListener:Te,removeAllListeners:Ae,emit:Ee,binding:ve,cwd:ke,chdir:be,umask:Ie,hrtime:Ne,platform:ue,release:me,config:de,uptime:Re},kt={};Object.keys(kt).forEach(r=>{let e=r.split("."),t=x;for(let i=0;i<e.length;i++){let n=e[i];i===e.length-1?t[n]=kt[r]:t=t[n]||(t[n]={})}})});function _t(){xt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)k[e]=r[e],E[r.charCodeAt(e)]=e;E[45]=62,E[95]=63}function Be(r){xt||_t();var e,t,i,n,o,s,u=r.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[u-2]==="="?2:r[u-1]==="="?1:0,s=new Le(u*3/4-o),i=o>0?u-4:u;var f=0;for(e=0,t=0;e<i;e+=4,t+=3)n=E[r.charCodeAt(e)]<<18|E[r.charCodeAt(e+1)]<<12|E[r.charCodeAt(e+2)]<<6|E[r.charCodeAt(e+3)],s[f++]=n>>16&255,s[f++]=n>>8&255,s[f++]=n&255;return o===2?(n=E[r.charCodeAt(e)]<<2|E[r.charCodeAt(e+1)]>>4,s[f++]=n&255):o===1&&(n=E[r.charCodeAt(e)]<<10|E[r.charCodeAt(e+1)]<<4|E[r.charCodeAt(e+2)]>>2,s[f++]=n>>8&255,s[f++]=n&255),s}function _e(r){return k[r>>18&63]+k[r>>12&63]+k[r>>6&63]+k[r&63]}function Ce(r,e,t){for(var i,n=[],o=e;o<t;o+=3)i=(r[o]<<16)+(r[o+1]<<8)+r[o+2],n.push(_e(i));return n.join("")}function Rt(r){xt||_t();for(var e,t=r.length,i=t%3,n="",o=[],s=16383,u=0,f=t-i;u<f;u+=s)o.push(Ce(r,u,u+s>f?f:u+s));return i===1?(e=r[t-1],n+=k[e>>2],n+=k[e<<4&63],n+="=="):i===2&&(e=(r[t-2]<<8)+r[t-1],n+=k[e>>10],n+=k[e>>4&63],n+=k[e<<2&63],n+="="),o.push(n),o.join("")}function st(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function R(r,e){if(st()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=a.prototype):(r===null&&(r=new a(e)),r.length=e),r}function a(r,e,t){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return yt(this,r)}return Ct(this,r,e,t)}function Ct(r,e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?$e(r,e,t,i):typeof e=="string"?Pe(r,e,t):Me(r,e)}function Ut(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Ue(r,e,t,i){return Ut(e),e<=0?R(r,e):t!==void 0?typeof i=="string"?R(r,e).fill(t,i):R(r,e).fill(t):R(r,e)}function yt(r,e){if(Ut(e),r=R(r,e<0?0:gt(e)|0),!a.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Pe(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!a.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var i=Pt(e,t)|0;r=R(r,i);var n=r.write(e,t);return n!==i&&(r=r.slice(0,n)),r}function wt(r,e){var t=e.length<0?0:gt(e.length)|0;r=R(r,t);for(var i=0;i<t;i+=1)r[i]=e[i]&255;return r}function $e(r,e,t,i){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");return t===void 0&&i===void 0?e=new Uint8Array(e):i===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,i),a.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=a.prototype):r=wt(r,e),r}function Me(r,e){if(b(e)){var t=gt(e.length)|0;return r=R(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||ir(e.length)?R(r,0):wt(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return wt(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function gt(r){if(r>=st())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+st().toString(16)+" bytes");return r|0}function b(r){return!!(r!=null&&r._isBuffer)}function Pt(r,e){if(b(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return at(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Wt(r).length;default:if(i)return at(r).length;e=(""+e).toLowerCase(),i=!0}}function Oe(r,e,t){var i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Ke(this,e,t);case"utf8":case"utf-8":return Ot(this,e,t);case"ascii":return ze(this,e,t);case"latin1":case"binary":return qe(this,e,t);case"base64":return Ge(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function M(r,e,t){var i=r[e];r[e]=r[t],r[t]=i}function $t(r,e,t,i,n){if(r.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=n?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(n)return-1;t=r.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof e=="string"&&(e=a.from(e,i)),b(e))return e.length===0?-1:Lt(r,e,t,i,n);if(typeof e=="number")return e=e&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Lt(r,[e],t,i,n);throw new TypeError("val must be string, number or Buffer")}function Lt(r,e,t,i,n){var o=1,s=r.length,u=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return-1;o=2,s/=2,u/=2,t/=2}function f(g,N){return o===1?g[N]:g.readUInt16BE(N*o)}var m;if(n){var d=-1;for(m=t;m<s;m++)if(f(r,m)===f(e,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(t+u>s&&(t=s-u),m=t;m>=0;m--){for(var p=!0,w=0;w<u;w++)if(f(r,m+w)!==f(e,w)){p=!1;break}if(p)return m}return-1}function Ye(r,e,t,i){t=Number(t)||0;var n=r.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var u=parseInt(e.substr(s*2,2),16);if(isNaN(u))return s;r[t+s]=u}return s}function De(r,e,t,i){return lt(at(e,r.length-t),r,t,i)}function Mt(r,e,t,i){return lt(er(e),r,t,i)}function je(r,e,t,i){return Mt(r,e,t,i)}function We(r,e,t,i){return lt(Wt(e),r,t,i)}function Ve(r,e,t,i){return lt(rr(e,r.length-t),r,t,i)}function Ge(r,e,t){return e===0&&t===r.length?Rt(r):Rt(r.slice(e,t))}function Ot(r,e,t){t=Math.min(r.length,t);for(var i=[],n=e;n<t;){var o=r[n],s=null,u=o>239?4:o>223?3:o>191?2:1;if(n+u<=t){var f,m,d,p;switch(u){case 1:o<128&&(s=o);break;case 2:f=r[n+1],(f&192)===128&&(p=(o&31)<<6|f&63,p>127&&(s=p));break;case 3:f=r[n+1],m=r[n+2],(f&192)===128&&(m&192)===128&&(p=(o&15)<<12|(f&63)<<6|m&63,p>2047&&(p<55296||p>57343)&&(s=p));break;case 4:f=r[n+1],m=r[n+2],d=r[n+3],(f&192)===128&&(m&192)===128&&(d&192)===128&&(p=(o&15)<<18|(f&63)<<12|(m&63)<<6|d&63,p>65535&&p<1114112&&(s=p))}}s===null?(s=65533,u=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),n+=u}return Je(i)}function Je(r){var e=r.length;if(e<=Bt)return String.fromCharCode.apply(String,r);for(var t="",i=0;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=Bt));return t}function ze(r,e,t){var i="";t=Math.min(r.length,t);for(var n=e;n<t;++n)i+=String.fromCharCode(r[n]&127);return i}function qe(r,e,t){var i="";t=Math.min(r.length,t);for(var n=e;n<t;++n)i+=String.fromCharCode(r[n]);return i}function Ke(r,e,t){var i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);for(var n="",o=e;o<t;++o)n+=tr(r[o]);return n}function He(r,e,t){for(var i=r.slice(e,t),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}function T(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}function A(r,e,t,i,n,o){if(!b(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(t+i>r.length)throw new RangeError("Index out of range")}function ut(r,e,t,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(r.length-t,2);n<o;++n)r[t+n]=(e&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}function ft(r,e,t,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(r.length-t,4);n<o;++n)r[t+n]=e>>>(i?n:3-n)*8&255}function Yt(r,e,t,i,n,o){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Dt(r,e,t,i,n){return n||Yt(r,e,t,4,34028234663852886e22,-34028234663852886e22),Gt(r,e,t,i,23,4),t+4}function jt(r,e,t,i,n){return n||Yt(r,e,t,8,17976931348623157e292,-17976931348623157e292),Gt(r,e,t,i,52,8),t+8}function Xe(r){if(r=Ze(r).replace(Qe,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ze(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function tr(r){return r<16?"0"+r.toString(16):r.toString(16)}function at(r,e){e=e||1/0;for(var t,i=r.length,n=null,o=[],s=0;s<i;++s){if(t=r.charCodeAt(s),t>55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&o.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;o.push(t)}else if(t<2048){if((e-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function er(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function rr(r,e){for(var t,i,n,o=[],s=0;s<r.length&&!((e-=2)<0);++s)t=r.charCodeAt(s),i=t>>8,n=t%256,o.push(n),o.push(i);return o}function Wt(r){return Be(Xe(r))}function lt(r,e,t,i){for(var n=0;n<i&&!(n+t>=e.length||n>=r.length);++n)e[n+t]=r[n];return n}function ir(r){return r!==r}function nr(r){return r!=null&&(!!r._isBuffer||Vt(r)||or(r))}function Vt(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function or(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Vt(r.slice(0,0))}function ct(r,e,t,i,n){var o,s,u=n*8-i-1,f=(1<<u)-1,m=f>>1,d=-7,p=t?n-1:0,w=t?-1:1,g=r[e+p];for(p+=w,o=g&(1<<-d)-1,g>>=-d,d+=u;d>0;o=o*256+r[e+p],p+=w,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=i;d>0;s=s*256+r[e+p],p+=w,d-=8);if(o===0)o=1-m;else{if(o===f)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-m}return(g?-1:1)*s*Math.pow(2,o-i)}function Gt(r,e,t,i,n,o){var s,u,f,m=o*8-n-1,d=(1<<m)-1,p=d>>1,w=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:o-1,N=i?1:-1,it=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+p>=1?e+=w/f:e+=w*Math.pow(2,1-p),e*f>=2&&(s++,f/=2),s+p>=d?(u=0,s=d):s+p>=1?(u=(e*f-1)*Math.pow(2,n),s=s+p):(u=e*Math.pow(2,p-1)*Math.pow(2,n),s=0));n>=8;r[t+g]=u&255,g+=N,u/=256,n-=8);for(s=s<<n|u,m+=n;m>0;r[t+g]=s&255,g+=N,s/=256,m-=8);r[t+g-N]|=it*128}var k,E,Le,xt,Bt,Qe,Jt=dt(()=>{"use strict";c();h();k=[],E=[],Le=typeof Uint8Array!="undefined"?Uint8Array:Array,xt=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(r){return r.__proto__=a.prototype,r};a.from=function(r,e,t){return Ct(null,r,e,t)};a.kMaxLength=st();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,e,t){return Ue(null,r,e,t)};a.allocUnsafe=function(r){return yt(null,r)};a.allocUnsafeSlow=function(r){return yt(null,r)};a.isBuffer=nr;a.compare=function(e,t){if(!b(e)||!b(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,o=0,s=Math.min(i,n);o<s;++o)if(e[o]!==t[o]){i=e[o],n=t[o];break}return i<n?-1:n<i?1:0};a.isEncoding=function(e){switch(String(e).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(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return a.alloc(0);var i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=a.allocUnsafe(t),o=0;for(i=0;i<e.length;++i){var s=e[i];if(!b(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n};a.byteLength=Pt;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)M(this,t,t+1);return this};a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)M(this,t,t+3),M(this,t+1,t+2);return this};a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)M(this,t,t+7),M(this,t+1,t+6),M(this,t+2,t+5),M(this,t+3,t+4);return this};a.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ot(this,0,e):Oe.apply(this,arguments)};a.prototype.equals=function(e){if(!b(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:a.compare(this,e)===0};a.prototype.compare=function(e,t,i,n,o){if(!b(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),t<0||i>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var s=o-n,u=i-t,f=Math.min(s,u),m=this.slice(n,o),d=e.slice(t,i),p=0;p<f;++p)if(m[p]!==d[p]){s=m[p],u=d[p];break}return s<u?-1:u<s?1:0};a.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1};a.prototype.indexOf=function(e,t,i){return $t(this,e,t,i,!0)};a.prototype.lastIndexOf=function(e,t,i){return $t(this,e,t,i,!1)};a.prototype.write=function(e,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(i)?(i=i|0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((i===void 0||i>o)&&(i=o),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return Ye(this,e,t,i);case"utf8":case"utf-8":return De(this,e,t,i);case"ascii":return Mt(this,e,t,i);case"latin1":case"binary":return je(this,e,t,i);case"base64":return We(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ve(this,e,t,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Bt=4096;a.prototype.slice=function(e,t){var i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=a.prototype;else{var o=t-e;n=new a(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+e]}return n};a.prototype.readUIntLE=function(e,t,i){e=e|0,t=t|0,i||T(e,t,this.length);for(var n=this[e],o=1,s=0;++s<t&&(o*=256);)n+=this[e+s]*o;return n};a.prototype.readUIntBE=function(e,t,i){e=e|0,t=t|0,i||T(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n};a.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]};a.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8};a.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]};a.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};a.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};a.prototype.readIntLE=function(e,t,i){e=e|0,t=t|0,i||T(e,t,this.length);for(var n=this[e],o=1,s=0;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n};a.prototype.readIntBE=function(e,t,i){e=e|0,t=t|0,i||T(e,t,this.length);for(var n=t,o=1,s=this[e+--n];n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s};a.prototype.readInt8=function(e,t){return t||T(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};a.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};a.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};a.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};a.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};a.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),ct(this,e,!0,23,4)};a.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),ct(this,e,!1,23,4)};a.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),ct(this,e,!0,52,8)};a.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),ct(this,e,!1,52,8)};a.prototype.writeUIntLE=function(e,t,i,n){if(e=+e,t=t|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;A(this,e,t,i,o,0)}var s=1,u=0;for(this[t]=e&255;++u<i&&(s*=256);)this[t+u]=e/s&255;return t+i};a.prototype.writeUIntBE=function(e,t,i,n){if(e=+e,t=t|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;A(this,e,t,i,o,0)}var s=i-1,u=1;for(this[t+s]=e&255;--s>=0&&(u*=256);)this[t+s]=e/u&255;return t+i};a.prototype.writeUInt8=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};a.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):ut(this,e,t,!0),t+2};a.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):ut(this,e,t,!1),t+2};a.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):ft(this,e,t,!0),t+4};a.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):ft(this,e,t,!1),t+4};a.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t=t|0,!n){var o=Math.pow(2,8*i-1);A(this,e,t,i,o-1,-o)}var s=0,u=1,f=0;for(this[t]=e&255;++s<i&&(u*=256);)e<0&&f===0&&this[t+s-1]!==0&&(f=1),this[t+s]=(e/u>>0)-f&255;return t+i};a.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t=t|0,!n){var o=Math.pow(2,8*i-1);A(this,e,t,i,o-1,-o)}var s=i-1,u=1,f=0;for(this[t+s]=e&255;--s>=0&&(u*=256);)e<0&&f===0&&this[t+s+1]!==0&&(f=1),this[t+s]=(e/u>>0)-f&255;return t+i};a.prototype.writeInt8=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};a.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):ut(this,e,t,!0),t+2};a.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):ut(this,e,t,!1),t+2};a.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ft(this,e,t,!0),t+4};a.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t|0,i||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):ft(this,e,t,!1),t+4};a.prototype.writeFloatLE=function(e,t,i){return Dt(this,e,t,!0,i)};a.prototype.writeFloatBE=function(e,t,i){return Dt(this,e,t,!1,i)};a.prototype.writeDoubleLE=function(e,t,i){return jt(this,e,t,!0,i)};a.prototype.writeDoubleBE=function(e,t,i){return jt(this,e,t,!1,i)};a.prototype.copy=function(e,t,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var o=n-i,s;if(this===e&&i<t&&t<n)for(s=o-1;s>=0;--s)e[s+t]=this[s+i];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+o),t);return o};a.prototype.fill=function(e,t,i,n){if(typeof e=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=t;s<i;++s)this[s]=e;else{var u=b(e)?e:at(new a(e,n).toString()),f=u.length;for(s=0;s<i-t;++s)this[s+t]=u[s%f]}return this};Qe=/[^+\/0-9A-Za-z-_]/g});var h=dt(()=>{"use strict";Jt()});var Ar={};vt(Ar,{FilePropertyMapper:()=>Et});module.exports=ie(Ar);c();h();c();h();c();h();function O(r){throw new Error("Unexpected value: "+JSON.stringify(r))}c();h();c();h();c();h();c();h();c();h();c();h();var zt,qt,Z=(qt=(zt=x.env.FERN_STACK_TRACK)==null?void 0:zt.toLowerCase())!=null?qt:"",I=Z!==""&&Z!=="0"&&Z!=="false",Tt=["single","multiline","box"].includes(Z)?Z:"single";I&&(Error.stackTraceLimit=50);var sr=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),ar=new Set(["stacktrace"]);function pt({maxFrames:r=50,skip:e=0,filterPaths:t=[],filterFunctions:i=[],stopOn:n=[],filterNode:o=!0,filterJs:s=!0,formatFilename:u=f=>f}={}){var m;if(!I)return[];i=[...i,...sr],t=[...t,...ar],n=[...n,"runInteractiveTask"];let f=!1;return((m=new Error().stack)!=null?m:"").split(`
2
- `).map(d=>{let p=d.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(p&&p.length===5){let[,w,g,N,it]=p;if(!w||!g||!N||!it)return;if(f||n.some(Qt=>w==null?void 0:w.includes(Qt))){f=!0;return}switch(w){case"Object.<anonymous>":w="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":w=`${w.substring(w.indexOf(".")+1)}()=> { ... }`;break}return{fn:w,path:u(g),position:`${N}:${it}`}}}).filter(d=>{var p,w;return d&&!i.some(g=>d.fn.includes(g))&&!(o&&((p=d.path)!=null&&p.startsWith("node:")))&&!(s&&((w=d.path)!=null&&w.endsWith(".js")))&&!t.some(g=>d.path.includes(g))}).slice(e,e+r)}var ht=class{constructor({maxFrames:e=50,skip:t=0,filterPaths:i=[],filterFunctions:n=[],stopOn:o=[],filterNode:s=!0,filterJs:u=!0,multiline:f=!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=e,this.skip=t,this.filterPaths=i,this.filterFunctions=n,this.stopOn=o,this.filterNode=s,this.filterJs=u,this.multiline=f,this.formatFilename=m}tag(e){let t=this.tracking.get(e)||new Set;pt({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(i=>t.add(i)),this.tracking.set(e,t)}trace(e){if(!I)return"";let t=this.tracking.get(e);return t?[...t].map(i=>`${this.multiline?`
3
- `:""}${i.fn} - ${i.path}:${i.position}`).join(""):""}frames(e){let t=this.tracking.get(e);return t?[...t]:[]}free(e){this.tracking.delete(e)}clear(){this.tracking=new WeakMap}},L;function Kt({maxFrames:r=50,skip:e=0,filterPaths:t=[],filterFunctions:i=[],stopOn:n=[],filterNode:o=!0,filterJs:s=!0,multiline:u=!1,formatFilename:f=m=>m}={}){I&&(L!=null||(L=new ht({maxFrames:r,skip:e,filterPaths:t,filterFunctions:i,stopOn:n,filterNode:o,filterJs:s,multiline:u,formatFilename:f})))}function Ht(r){L==null||L.tag(r)}function At(r){var e;return(e=L==null?void 0:L.frames(r))!=null?e:[]}var Y=class{constructor(){Ht(this)}};c();h();var mt=class{formatMultiple(e){return Promise.all(e.map(t=>this.format(t)))}formatMultipleSync(e){return e.map(t=>this.formatSync(t))}},tt=class extends mt{async format(e){return e}formatSync(e){return e}};c();h();c();h();c();h();var v=class extends Y{constructor(t){super();l(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):typeof this.value=="function"?this.value(t):this.value.write(t)}};var ur=4;Kt({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var et=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 I&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
- `),this.lineBuffer.join(`
5
- `)+(this.lastCharacterIsNewline?`
6
- `:"")}write(...e){for(let t of e)if(t!=null)if(typeof t=="string"){let i=t.length>0&&t.endsWith(`
7
- `),n=i?t.substring(0,t.length-1):t,o=this.getIndentString(),s=n.replaceAll(`
8
- `,`
9
- ${o}`);this.isAtStartOfLine()&&(s=o+s),i&&(s+=`
10
- `),this.writeInternal(s)}else this.writeNode(t)}writeStatement(...e){this.write(...e),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(e){let t=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=t}writeNode(e){I&&this.nodeStackFrames.push(...At(e)),e.write(this),I&&Tt!=="single"&&this.writeInternal(`
11
- `)}writeNodeOrString(e){if(typeof e=="string"){this.write(e);return}this.writeNode(e)}writeNodeStatement(e){this.writeNode(e),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new v(e).write(this),e.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,t){new v(e).write(this),this.write(" (",t,")"),this.pushScope()}controlFlowWithoutStatement(e){new v(e).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(e,t){this.dedent(),this.write("} "),new v(e).write(this),this.write(" (",t,")"),this.pushScope()}alternativeControlFlow(e){this.dedent(),this.write("} "),new v(e).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(e=!0){this.dedent(),this.writeNewLineIfLastLineNot(),e?this.writeLine("}"):this.write("}")}writeLine(...e){this.write(...e.length===0?[""]:e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
12
- `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
13
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:t,writeFunction:i}){if(e.length>0){let n=e[0];n!=null&&i(n);for(let o=1;o<e.length;o++){this.write(t);let s=e[o];s!=null&&i(s)}}}toString(){return this.buffer}writeInternal(e){if(e.length===0)return;let t=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
14
- `),this.lastCharacterIsSemicolon=e.endsWith(";");let i=e.split(`
15
- `),n=I&&!this.shouldSkipTracking(i)&&this.lastCharacterIsNewline;t&&(this.lastLine=`${this.lastLine}${i.shift()||""}`),this.lastCharacterIsNewline&&i.pop(),this.lineBuffer.push(...i),n&&this.appendTrackingComment()}set lastLine(e){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=e:this.lineBuffer.push(e)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(e){return!1}formatStack(e,t=""){return e.map(i=>`${t?`(${t}) `:""} ${i.fn} - ${i.path} : ${i.position}`)}filterStack(e){return e.filter(t=>!t.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let e=[...this.formatStack(this.filterStack(pt({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,Tt){case"single":return this.singleLineTrackingComment(e);case"multiline":return this.multiLineTrackingComment(e);case"box":return this.boxTrackingComment(e)}}singleLineTrackingComment(e){this.lastLine=`${this.lastLine} // ${e.join(" ")}`}multiLineTrackingComment(e){this.lineBuffer.push(...e.map(t=>` // ${t}`))}boxTrackingComment(e){this.lineBuffer.push("/*",...e.map(t=>` ${t}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return ur}};c();h();c();h();var D=class extends et{constructor({customConfig:t,formatter:i}){super();l(this,"customConfig");l(this,"formatter");l(this,"imports",{});l(this,"defaultImports",{});l(this,"starImportAliases",{});l(this,"starImportAliasesInverse",{});this.customConfig=t,this.formatter=i!=null?i:new tt}addImport(t){var i,n,o;if(t.importFrom!=null){switch(t.importFrom.type){case"default":{this.validateDefault(t);break}case"named":{this.validateNamed(t);break}case"star":{this.validateStar(t);break}}let s=(o=(i=this.imports)[n=t.importFrom.moduleName])!=null?o:i[n]=[];s.map(f=>f.name).includes(t.name)||s.push(t)}}validateDefault(t){var n,o,s,u;if(((n=t.importFrom)==null?void 0:n.type)!=="default")return;let i=(u=(o=this.defaultImports)[s=t.importFrom.moduleName])!=null?u:o[s]=t;if(i.name!==t.name)throw new Error(`Cannot have multiple default imports for module ${t.importFrom.moduleName}: got ${t.name} but already had ${i.name}`)}validateNamed(t){var s,u,f,m,d;if(((s=t.importFrom)==null?void 0:s.type)!=="named")return;let n=((u=this.imports[t.importFrom.moduleName])!=null?u:[]).filter(p=>{var w;return((w=p.importFrom)==null?void 0:w.type)==="star"});if(n.length>0)throw new Error(`Cannot add named import ${t.name} because non-named imports ${n.map(p=>p.name)} already exist`);let o=[];for(let p of Object.values(this.imports))for(let w of p)((f=w.importFrom)==null?void 0:f.type)==="named"&&w.importFrom.moduleName!==t.importFrom.moduleName&&w.name===t.name&&o.push(w);if(o.length>0)throw new Error(`Cannot add named import from module ${t.importFrom.moduleName} because it is already imported from ${(d=(m=o[0])==null?void 0:m.importFrom)==null?void 0:d.moduleName}`)}validateStar(t){var o,s,u,f,m,d,p;if(((o=t.importFrom)==null?void 0:o.type)!=="star")return;let i=(f=(s=this.starImportAliases)[u=t.importFrom.moduleName])!=null?f:s[u]=t.importFrom.starImportAlias;if(i!==t.importFrom.starImportAlias)throw new Error(`Cannot have more than one alias for non-named imports from a module: got ${t.importFrom.starImportAlias} but already have ${i}.`);if(((p=(m=this.starImportAliasesInverse)[d=t.importFrom.starImportAlias])!=null?p:m[d]=t.importFrom.moduleName)!==t.importFrom.moduleName)throw new Error(`Attempted to use alias ${t.importFrom.starImportAlias} for more than one module in the same file`)}};var rt=class extends D{constructor({customConfig:e,formatter:t}){super({customConfig:e,formatter:t})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(t){throw new Error(`Failed to format TypeScript file: ${t}
16
- ${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(t){throw new Error(`Failed to format TypeScript file: ${t}
17
- ${e}`)}return e}getContent(){let e=this.stringifyImports();return e.length>0?e+`
18
- `+this.buffer:this.buffer}stringifyImports(){let e="";for(let[t,i]of Object.entries(this.imports)){let n=this.defaultImports[t],o="",s=i.filter(f=>{var m;return((m=f.importFrom)==null?void 0:m.type)==="named"}),u=this.starImportAliases[t];if(s.length>0||n!=null||u!=null){if(e+="import",n!=null&&(e+=` ${n.name}`),s.length>0){for(let m of s.slice(0,-1))o+=`${m.name}, `;let f=s[s.length-1];f!=null&&(o+=`${f.name}`),n!=null&&(e+=","),e+=` { ${o} }`}u!=null&&((n!=null||s.length>0)&&(e+=", "),e+=` * as ${u}`),e+=` from "${t}";
19
- `}}return e}};var y=class extends Y{async toStringAsync({customConfig:e,formatter:t}){let i=new rt({customConfig:e,formatter:t});return this.write(i),await i.toStringAsync()}toString({customConfig:e,formatter:t}){let i=new rt({customConfig:e,formatter:t});return this.write(i),i.toString()}};var S={};vt(S,{AstNode:()=>y,ClassInstantiation:()=>J,CodeBlock:()=>z,Comment:()=>U,Function:()=>q,FunctionInvocation:()=>K,MethodInvocation:()=>H,Parameter:()=>Q,Reference:()=>W,Type:()=>j,TypeLiteral:()=>B,Types:()=>j,Variable:()=>X,Writer:()=>D,codeblock:()=>pr,function_:()=>mr,instantiateClass:()=>dr,invokeFunction:()=>wr,invokeMethod:()=>xr,parameter:()=>yr,reference:()=>gr,variable:()=>Tr});c();h();c();h();c();h();var J=class extends y{constructor({class_:t,arguments_:i}){super();l(this,"class_");l(this,"arguments_");this.class_=t,this.arguments_=i}write(t){t.write("new "),t.writeNode(this.class_),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:i=>i.write(t)}),t.write(")")}};c();h();var z=class extends y{constructor(t){super();l(this,"args");this.args=t}write(t){return new v(this.args).write(t)}};c();h();var U=class extends y{constructor({docs:t}={docs:void 0}){super();l(this,"docs");this.docs=t}write(t){this.docs!=null&&(t.writeLine("/**"),this.docs.split(`
20
- `).forEach(i=>{t.writeLine(` * ${i}`)}),t.writeLine("*/"))}};c();h();c();h();var j=class extends y{constructor(t){super();l(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"string":t.write("string");break;case"number":t.write("number");break;case"bigint":t.write("bigint");break;case"boolean":t.write("boolean");break;case"array":this.internalType.valueType.write(t),t.write("[]");break;case"map":t.write("Record<"),this.internalType.keyType.write(t),t.write(", "),this.internalType.valueType.write(t),t.write(">");break;case"object":t.write("{"),t.indent();for(let[i,n]of Object.entries(this.internalType.fields))t.write(`${i}: `),n.write(t),t.writeLine(",");t.dedent(),t.write("}");break;case"enum":t.write("enum");break;case"any":t.write("any");break;case"promise":t.write("Promise<"),this.internalType.value.write(t),t.write(">");break;case"unknown":t.write("unknown");break;case"void":t.write("void");break;case"undefined":t.write("undefined");break;case"null":t.write("null");break;case"never":t.write("never");break;case"nop":break;default:O(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(t){return new this({type:"array",valueType:t})}static object(t){return new this({type:"object",fields:t})}static enum(t){return new this({type:"enum",values:t})}static any(){return new this({type:"any"})}static promise(t){return t.internalType.type==="promise"?t:new this({type:"promise",value:t})}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 q=class extends y{constructor({name:t,parameters:i,async:n,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=t,this.parameters=i,this.async=n!=null?n:!1,this.body=o,this.return_=s,this.docs=u}write(t){var i;t.writeNode(new U({docs:this.docs})),this.async&&t.write("async "),t.write("function "),t.write(`${this.name}`),this.writeParameters(t),this.return_!=null&&(t.write(": "),t.writeNode(this.async?j.promise(this.return_):this.return_)),t.writeLine(" {"),t.indent(),(i=this.body)==null||i.write(t),t.dedent(),t.writeNewLineIfLastLineNot(),t.writeLine("}")}writeParameters(t){if(this.parameters.length===0){t.write("()");return}t.indent(),t.writeLine("(");for(let i of this.parameters)t.writeNode(i),t.writeLine(",");t.dedent(),t.write(")")}};c();h();var K=class extends y{constructor({function_:t,arguments_:i}){super();l(this,"function_");l(this,"arguments_");this.function_=t,this.arguments_=i}write(t){t.writeNode(this.function_),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:i=>i.write(t)}),t.write(")")}};c();h();var H=class extends y{constructor({on:t,method:i,arguments_:n,async:o}){super();l(this,"on");l(this,"method");l(this,"arguments_");l(this,"async");this.on=t,this.method=i,this.arguments_=n,this.async=o}write(t){this.async&&t.write("await "),this.on.write(t),t.write("."),t.write(this.method),t.write("("),t.delimit({nodes:this.arguments_,delimiter:", ",writeFunction:i=>i.write(t)}),t.write(")")}};c();h();var Q=class extends y{constructor({name:t,type:i,docs:n}){super();l(this,"name");l(this,"type");l(this,"docs");this.name=t,this.type=i,this.docs=n}write(t){this.docs!=null&&t.writeNode(new U({docs:this.docs})),t.write(`${this.name}: `),this.type.write(t)}};c();h();var W=class extends y{constructor({name:t,importFrom:i,memberName:n}){super();l(this,"name");l(this,"importFrom");l(this,"memberName");this.name=t,this.importFrom=i,this.memberName=n}write(t){var o;this.importFrom!=null&&t.addImport(this);let i=((o=this.importFrom)==null?void 0:o.type)==="star"?`${this.importFrom.starImportAlias}.`:"",n=this.memberName!=null?`.${this.memberName}`:"";t.write(`${i}${this.name}${n}`)}};c();h();var B=class r extends y{constructor(t){super();l(this,"internalType");this.internalType=t}write(t){var o,s;let i=!!((o=t.customConfig)!=null&&o.noSerdeLayer),n=!!((s=t.customConfig)!=null&&s.useBigInt);switch(this.internalType.type){case"array":{this.writeIterable({writer:t,iterable:this.internalType});break}case"blob":{if(i){t.writeNode(r.string(this.internalType.value));return}t.write("new Blob(["),t.writeNode(r.string(this.internalType.value)),t.write("])");break}case"boolean":{t.write(this.internalType.value.toString());break}case"bigint":{if(n){t.write(`BigInt("${this.internalType.value.toString()}")`);return}t.write(`"${this.internalType.value.toString()}"`);return}case"datetime":{if(i){t.writeNode(r.string(this.internalType.value));return}t.write("new Date("),t.writeNode(r.string(this.internalType.value)),t.write(")");break}case"number":{t.write(this.internalType.value.toString());break}case"object":{this.writeObject({writer:t,object:this.internalType});break}case"record":{this.writeRecord({writer:t,record:this.internalType});break}case"reference":{t.writeNode(this.internalType.value);break}case"set":{if(i||this.isSetOfObjects()){t.writeNode(r.array({values:this.internalType.values}));return}t.write("new Set("),this.writeIterable({writer:t,iterable:this.internalType}),t.write(")");break}case"string":{this.internalType.value.includes(`
21
- `)?this.writeStringWithBackticks({writer:t,value:this.internalType.value}):t.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}case"tuple":{this.writeIterable({writer:t,iterable:this.internalType});break}case"unknown":{this.writeUnknown({writer:t,value:this.internalType.value});break}case"null":{t.write("null");break}case"nop":break;default:O(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(t=>t.isObject())}writeStringWithBackticks({writer:t,value:i}){t.write("`");let n=i.split(`
22
- `),o=n[0]+`
23
- `,s=n.slice(1).join(`
24
- `);t.write(o.replaceAll("`","\\`")),t.writeNoIndent(s.replaceAll("`","\\`")),t.write("`")}writeIterable({writer:t,iterable:i}){let n=cr({values:i.values});if(n.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let o of n)o.write(t),t.writeLine(",");t.dedent(),t.write("]")}writeRecord({writer:t,record:i}){let n=lr({entries:i.entries});if(n.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of n)o.key.write(t),t.write(": "),o.value.write(t),t.writeLine(",");t.dedent(),t.write("}")}writeObject({writer:t,object:i}){let n=fr({fields:i.fields});if(n.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of n)t.write(`${o.name}: `),o.value.write(t),t.writeLine(",");t.dedent(),t.write("}")}static array({values:t}){return new this({type:"array",values:t})}static bigint(t){return new this({type:"bigint",value:t})}static blob(t){return new this({type:"blob",value:t})}static boolean(t){return new this({type:"boolean",value:t})}static datetime(t){return new this({type:"datetime",value:t})}static number(t){return new this({type:"number",value:t})}static object({fields:t}){return new this({type:"object",fields:t})}static record({entries:t}){return new this({type:"record",entries:t})}static reference(t){return new this({type:"reference",value:t})}static set({values:t}){return new this({type:"set",values:t})}static string(t){return new this({type:"string",value:t})}static tuple({values:t}){return new this({type:"tuple",values:t})}static unknown(t){return new this({type:"unknown",value:t})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(t){return t.internalType.type==="nop"}writeUnknown({writer:t,value:i}){switch(typeof i){case"boolean":t.write(i.toString());return;case"string":t.write(i.includes('"')?`\`${i}\``:`"${i}"`);return;case"number":t.write(i.toString());return;case"object":if(i==null){t.write("null");return}if(Array.isArray(i)){this.writeUnknownArray({writer:t,value:i});return}this.writeUnknownObject({writer:t,value:i});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof i}`)}}writeUnknownArray({writer:t,value:i}){if(i.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let n of i)t.writeNode(r.unknown(n)),t.writeLine(",");t.dedent(),t.write("]")}writeUnknownObject({writer:t,value:i}){let n=Object.entries(i);if(n.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let[o,s]of n)t.write(`${o}: `),t.writeNode(r.unknown(s)),t.writeLine(",");t.dedent(),t.write("}")}};function fr({fields:r}){return r.filter(e=>!B.isNop(e.value))}function lr({entries:r}){return r.filter(e=>!B.isNop(e.key)&&!B.isNop(e.value))}function cr({values:r}){return r.filter(e=>!B.isNop(e))}c();h();var X=class extends y{constructor(t){super();l(this,"args");this.args=t}write(t){this.args.export&&t.write("export "),this.args.const?t.write("const "):t.write("let "),t.write(`${this.args.name} = `),t.writeNode(this.args.initializer)}};function pr(r){return new z(r)}function mr(r){return new q(r)}function dr(r){return new J(r)}function wr(r){return new K(r)}function xr(r){return new H(r)}function yr(r){return new Q(r)}function gr(r){return new W(r)}function Tr(r){return new X(r)}var Et=class{constructor({context:e}){l(this,"context");this.context=e}getFilePropertyInfo({body:e,value:t}){var o;let i={fileFields:[],bodyPropertyFields:[]},n=(o=this.context.getRecord(t))!=null?o:{};for(let s of e.properties)switch(s.type){case"file":i.fileFields.push({name:this.context.getPropertyName(s.name),value:this.getSingleFileProperty({property:s,record:n})});break;case"fileArray":i.fileFields.push({name:this.context.getPropertyName(s.name),value:this.getArrayFileProperty({property:s,record:n})});break;case"bodyProperty":i.bodyPropertyFields.push({name:this.context.getPropertyName(s.name.name),value:this.getBodyProperty({property:s,record:n})});break;default:O(s)}return i}getSingleFileProperty({property:e,record:t}){let i=this.context.getSingleFileValue({property:e,record:t});return i==null?S.TypeLiteral.nop():S.TypeLiteral.blob(i)}getArrayFileProperty({property:e,record:t}){let i=this.context.getFileArrayValues({property:e,record:t});return i==null?S.TypeLiteral.nop():S.TypeLiteral.array({values:i.map(n=>S.TypeLiteral.blob(n))})}getBodyProperty({property:e,record:t}){let i=t[e.name.wireValue];return i==null?S.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:i})}};0&&(module.exports={FilePropertyMapper});
25
- /*! Bundled license information:
26
-
27
- @esbuild-plugins/node-globals-polyfill/Buffer.js:
28
- (*!
29
- * The buffer module from node.js, for the browser.
30
- *
31
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
32
- * @license MIT
33
- *)
34
- */
35
- //# sourceMappingURL=FilePropertyMapper.cjs.map