@fern-api/php-dynamic-snippets 1.25.0 → 1.25.1

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 (59) hide show
  1. package/dist/index.cjs +44 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +164 -0
  4. package/dist/index.d.ts +164 -0
  5. package/dist/index.js +44 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +9 -10
  8. package/cjs/DynamicSnippetsGenerator.cjs +0 -49
  9. package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
  10. package/cjs/DynamicSnippetsGenerator.d.cts +0 -18
  11. package/cjs/DynamicSnippetsGeneratorContext-CwkDTYOI.d.cts +0 -83
  12. package/cjs/EndpointSnippetGenerator.cjs +0 -49
  13. package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
  14. package/cjs/EndpointSnippetGenerator.d.cts +0 -76
  15. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -47
  16. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
  17. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
  18. package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -47
  19. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
  20. package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -4
  21. package/cjs/context/FilePropertyMapper.cjs +0 -47
  22. package/cjs/context/FilePropertyMapper.cjs.map +0 -1
  23. package/cjs/context/FilePropertyMapper.d.cts +0 -4
  24. package/cjs/index.cjs +0 -49
  25. package/cjs/index.cjs.map +0 -1
  26. package/cjs/index.d.cts +0 -6
  27. package/esm/DynamicSnippetsGenerator.d.ts +0 -18
  28. package/esm/DynamicSnippetsGenerator.js +0 -2
  29. package/esm/DynamicSnippetsGenerator.js.map +0 -1
  30. package/esm/DynamicSnippetsGeneratorContext-CwkDTYOI.d.ts +0 -83
  31. package/esm/EndpointSnippetGenerator.d.ts +0 -76
  32. package/esm/EndpointSnippetGenerator.js +0 -2
  33. package/esm/EndpointSnippetGenerator.js.map +0 -1
  34. package/esm/chunk-34WVNBJS.js +0 -47
  35. package/esm/chunk-34WVNBJS.js.map +0 -1
  36. package/esm/chunk-BN32SYGE.js +0 -2
  37. package/esm/chunk-BN32SYGE.js.map +0 -1
  38. package/esm/chunk-F7LTKJMT.js +0 -2
  39. package/esm/chunk-F7LTKJMT.js.map +0 -1
  40. package/esm/chunk-MZ7AWQF7.js +0 -2
  41. package/esm/chunk-MZ7AWQF7.js.map +0 -1
  42. package/esm/chunk-P7HYTUQU.js +0 -4
  43. package/esm/chunk-P7HYTUQU.js.map +0 -1
  44. package/esm/chunk-Q7QB5SA5.js +0 -2
  45. package/esm/chunk-Q7QB5SA5.js.map +0 -1
  46. package/esm/chunk-U6JJRNQH.js +0 -2
  47. package/esm/chunk-U6JJRNQH.js.map +0 -1
  48. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
  49. package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
  50. package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
  51. package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -4
  52. package/esm/context/DynamicTypeLiteralMapper.js +0 -2
  53. package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
  54. package/esm/context/FilePropertyMapper.d.ts +0 -4
  55. package/esm/context/FilePropertyMapper.js +0 -2
  56. package/esm/context/FilePropertyMapper.js.map +0 -1
  57. package/esm/index.d.ts +0 -6
  58. package/esm/index.js +0 -2
  59. package/esm/index.js.map +0 -1
@@ -1,4 +0,0 @@
1
- import '@fern-api/browser-compatible-base-generator';
2
- import '@fern-api/dynamic-ir-sdk';
3
- import '@fern-api/php-codegen';
4
- export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-CwkDTYOI.cjs';
@@ -1,47 +0,0 @@
1
- "use strict";var ze=Object.defineProperty,ei=Object.defineProperties,ti=Object.getOwnPropertyDescriptor,ri=Object.getOwnPropertyDescriptors,ni=Object.getOwnPropertyNames,Wt=Object.getOwnPropertySymbols;var Gt=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable;var vt=(r,t,e)=>t in r?ze(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Be=(r,t)=>{for(var e in t||(t={}))Gt.call(t,e)&&vt(r,e,t[e]);if(Wt)for(var e of Wt(t))ii.call(t,e)&&vt(r,e,t[e]);return r},Ue=(r,t)=>ei(r,ri(t));var At=(r,t)=>()=>(r&&(t=r(r=0)),t);var Yt=(r,t)=>{for(var e in t)ze(r,e,{get:t[e],enumerable:!0})},oi=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ni(t))!Gt.call(r,i)&&i!==e&&ze(r,i,{get:()=>t[i],enumerable:!(n=ti(t,i))||n.enumerable});return r};var ai=r=>oi(ze({},"__esModule",{value:!0}),r);var c=(r,t,e)=>vt(r,typeof t!="symbol"?t+"":t,e);function Vt(){throw new Error("setTimeout has not been defined")}function qt(){throw new Error("clearTimeout has not been defined")}function Ht(r){if(re===setTimeout)return setTimeout(r,0);if((re===Vt||!re)&&setTimeout)return re=setTimeout,setTimeout(r,0);try{return re(r,0)}catch(t){try{return re.call(null,r,0)}catch(e){return re.call(this,r,0)}}}function si(r){if(ne===clearTimeout)return clearTimeout(r);if((ne===qt||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(r);try{return ne(r)}catch(t){try{return ne.call(null,r)}catch(e){return ne.call(this,r)}}}function fi(){!Ie||!he||(Ie=!1,he.length?W=he.concat(W):Ve=-1,W.length&&Kt())}function Kt(){if(!Ie){var r=Ht(fi);Ie=!0;for(var t=W.length;t;){for(he=W,W=[];++Ve<t;)he&&he[Ve].run();Ve=-1,t=W.length}he=null,Ie=!1,si(r)}}function pi(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];W.push(new Jt(r,t)),W.length===1&&!Ie&&Ht(Kt)}function Jt(r,t){this.fun=r,this.array=t}function de(){}function Si(r){throw new Error("process.binding is not supported")}function Li(){return"/"}function Ii(r){throw new Error("process.chdir is not supported")}function Ni(){return 0}function Ri(r){var t=Ci.call(Le)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Oi(){var r=new Date,t=r-ki;return t/1e3}var re,ne,W,Ie,he,Ve,li,ui,ci,mi,hi,di,xi,yi,gi,wi,Ti,vi,Ai,bi,Ei,_i,Le,Ci,ki,l,zt,a=At(()=>{"use strict";re=Vt,ne=qt;typeof globalThis.setTimeout=="function"&&(re=setTimeout);typeof globalThis.clearTimeout=="function"&&(ne=clearTimeout);W=[],Ie=!1,Ve=-1;Jt.prototype.run=function(){this.fun.apply(null,this.array)};li="browser",ui="browser",ci=!0,mi={},hi=[],di="",xi={},yi={},gi={};wi=de,Ti=de,vi=de,Ai=de,bi=de,Ei=de,_i=de;Le=globalThis.performance||{},Ci=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};ki=new Date;l={nextTick:pi,title:li,browser:ci,env:mi,argv:hi,version:di,versions:xi,on:wi,addListener:Ti,once:vi,off:Ai,removeListener:bi,removeAllListeners:Ei,emit:_i,binding:Si,cwd:Li,chdir:Ii,umask:Ni,hrtime:Ri,platform:ui,release:yi,config:gi,uptime:Oi},zt={};Object.keys(zt).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=zt[r]:e=e[i]||(e[i]={})}})});function er(){Et=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)M[t]=r[t],R[r.charCodeAt(t)]=t;R[45]=62,R[95]=63}function Bi(r){Et||er();var t,e,n,i,o,p,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,p=new Pi(u*3/4-o),n=o>0?u-4:u;var m=0;for(t=0,e=0;t<n;t+=4,e+=3)i=R[r.charCodeAt(t)]<<18|R[r.charCodeAt(t+1)]<<12|R[r.charCodeAt(t+2)]<<6|R[r.charCodeAt(t+3)],p[m++]=i>>16&255,p[m++]=i>>8&255,p[m++]=i&255;return o===2?(i=R[r.charCodeAt(t)]<<2|R[r.charCodeAt(t+1)]>>4,p[m++]=i&255):o===1&&(i=R[r.charCodeAt(t)]<<10|R[r.charCodeAt(t+1)]<<4|R[r.charCodeAt(t+2)]>>2,p[m++]=i>>8&255,p[m++]=i&255),p}function Ui(r){return M[r>>18&63]+M[r>>12&63]+M[r>>6&63]+M[r&63]}function Mi(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Ui(n));return i.join("")}function Qt(r){Et||er();for(var t,e=r.length,n=e%3,i="",o=[],p=16383,u=0,m=e-n;u<m;u+=p)o.push(Mi(r,u,u+p>m?m:u+p));return n===1?(t=r[e-1],i+=M[t>>2],i+=M[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=M[t>>10],i+=M[t>>4&63],i+=M[t<<2&63],i+="="),o.push(i),o.join("")}function qe(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function G(r,t){if(qe()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return _t(this,r)}return tr(this,r,t,e)}function tr(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?ji(r,t,e,n):typeof t=="string"?Fi(r,t,e):$i(r,t)}function rr(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 Di(r,t,e,n){return rr(t),t<=0?G(r,t):e!==void 0?typeof n=="string"?G(r,t).fill(e,n):G(r,t).fill(e):G(r,t)}function _t(r,t){if(rr(t),r=G(r,t<0?0:St(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Fi(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=nr(t,e)|0;r=G(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function bt(r,t){var e=t.length<0?0:St(t.length)|0;r=G(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function ji(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=bt(r,t),r}function $i(r,t){if(D(t)){var e=St(t.length)|0;return r=G(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||ao(t.length)?G(r,0):bt(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return bt(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function St(r){if(r>=qe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qe().toString(16)+" bytes");return r|0}function D(r){return!!(r!=null&&r._isBuffer)}function nr(r,t){if(D(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 e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return He(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return lr(r).length;default:if(n)return He(r).length;t=(""+t).toLowerCase(),n=!0}}function Wi(r,t,e){var n=!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(r||(r="utf8");;)switch(r){case"hex":return Xi(this,t,e);case"utf8":case"utf-8":return ar(this,t,e);case"ascii":return Ji(this,t,e);case"latin1":case"binary":return Qi(this,t,e);case"base64":return Hi(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zi(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function xe(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function ir(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),D(t))return t.length===0?-1:Xt(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Xt(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Xt(r,t,e,n,i){var o=1,p=r.length,u=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,p/=2,u/=2,e/=2}function m(T,A){return o===1?T[A]:T.readUInt16BE(A*o)}var h;if(i){var d=-1;for(h=e;h<p;h++)if(m(r,h)===m(t,d===-1?0:h-d)){if(d===-1&&(d=h),h-d+1===u)return d*o}else d!==-1&&(h-=h-d),d=-1}else for(e+u>p&&(e=p-u),h=e;h>=0;h--){for(var x=!0,y=0;y<u;y++)if(m(r,h+y)!==m(t,y)){x=!1;break}if(x)return h}return-1}function Gi(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var p=0;p<n;++p){var u=parseInt(t.substr(p*2,2),16);if(isNaN(u))return p;r[e+p]=u}return p}function Yi(r,t,e,n){return Qe(He(t,r.length-e),r,e,n)}function or(r,t,e,n){return Qe(io(t),r,e,n)}function zi(r,t,e,n){return or(r,t,e,n)}function Vi(r,t,e,n){return Qe(lr(t),r,e,n)}function qi(r,t,e,n){return Qe(oo(t,r.length-e),r,e,n)}function Hi(r,t,e){return t===0&&e===r.length?Qt(r):Qt(r.slice(t,e))}function ar(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],p=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=e){var m,h,d,x;switch(u){case 1:o<128&&(p=o);break;case 2:m=r[i+1],(m&192)===128&&(x=(o&31)<<6|m&63,x>127&&(p=x));break;case 3:m=r[i+1],h=r[i+2],(m&192)===128&&(h&192)===128&&(x=(o&15)<<12|(m&63)<<6|h&63,x>2047&&(x<55296||x>57343)&&(p=x));break;case 4:m=r[i+1],h=r[i+2],d=r[i+3],(m&192)===128&&(h&192)===128&&(d&192)===128&&(x=(o&15)<<18|(m&63)<<12|(h&63)<<6|d&63,x>65535&&x<1114112&&(p=x))}}p===null?(p=65533,u=1):p>65535&&(p-=65536,n.push(p>>>10&1023|55296),p=56320|p&1023),n.push(p),i+=u}return Ki(n)}function Ki(r){var t=r.length;if(t<=Zt)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Zt));return e}function Ji(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Qi(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function Xi(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=no(r[o]);return i}function Zi(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function b(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function I(r,t,e,n,i,o){if(!D(r))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+n>r.length)throw new RangeError("Index out of range")}function Ke(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Je(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function sr(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function fr(r,t,e,n,i){return i||sr(r,t,e,4,34028234663852886e22,-34028234663852886e22),cr(r,t,e,n,23,4),e+4}function pr(r,t,e,n,i){return i||sr(r,t,e,8,17976931348623157e292,-17976931348623157e292),cr(r,t,e,n,52,8),e+8}function to(r){if(r=ro(r).replace(eo,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function ro(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function no(r){return r<16?"0"+r.toString(16):r.toString(16)}function He(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],p=0;p<n;++p){if(e=r.charCodeAt(p),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(p+1===n){(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 io(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function oo(r,t){for(var e,n,i,o=[],p=0;p<r.length&&!((t-=2)<0);++p)e=r.charCodeAt(p),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function lr(r){return Bi(to(r))}function Qe(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function ao(r){return r!==r}function so(r){return r!=null&&(!!r._isBuffer||ur(r)||fo(r))}function ur(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function fo(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&ur(r.slice(0,0))}function Xe(r,t,e,n,i){var o,p,u=i*8-n-1,m=(1<<u)-1,h=m>>1,d=-7,x=e?i-1:0,y=e?-1:1,T=r[t+x];for(x+=y,o=T&(1<<-d)-1,T>>=-d,d+=u;d>0;o=o*256+r[t+x],x+=y,d-=8);for(p=o&(1<<-d)-1,o>>=-d,d+=n;d>0;p=p*256+r[t+x],x+=y,d-=8);if(o===0)o=1-h;else{if(o===m)return p?NaN:(T?-1:1)*(1/0);p=p+Math.pow(2,n),o=o-h}return(T?-1:1)*p*Math.pow(2,o-n)}function cr(r,t,e,n,i,o){var p,u,m,h=o*8-i-1,d=(1<<h)-1,x=d>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,A=n?1:-1,S=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,p=d):(p=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-p))<1&&(p--,m*=2),p+x>=1?t+=y/m:t+=y*Math.pow(2,1-x),t*m>=2&&(p++,m/=2),p+x>=d?(u=0,p=d):p+x>=1?(u=(t*m-1)*Math.pow(2,i),p=p+x):(u=t*Math.pow(2,x-1)*Math.pow(2,i),p=0));i>=8;r[e+T]=u&255,T+=A,u/=256,i-=8);for(p=p<<i|u,h+=i;h>0;r[e+T]=p&255,T+=A,p/=256,h-=8);r[e+T-A]|=S*128}var M,R,Pi,Et,Zt,eo,mr=At(()=>{"use strict";a();s();M=[],R=[],Pi=typeof Uint8Array!="undefined"?Uint8Array:Array,Et=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return tr(null,r,t,e)};f.kMaxLength=qe();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return Di(null,r,t,e)};f.allocUnsafe=function(r){return _t(null,r)};f.allocUnsafeSlow=function(r){return _t(null,r)};f.isBuffer=so;f.compare=function(t,e){if(!D(t)||!D(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,p=Math.min(n,i);o<p;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.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}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var p=t[n];if(!D(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(i,o),o+=p.length}return i};f.byteLength=nr;f.prototype._isBuffer=!0;f.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)xe(this,e,e+1);return this};f.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)xe(this,e,e+3),xe(this,e+1,e+2);return this};f.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)xe(this,e,e+7),xe(this,e+1,e+6),xe(this,e+2,e+5),xe(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?ar(this,0,t):Wi.apply(this,arguments)};f.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!D(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var p=o-i,u=n-e,m=Math.min(p,u),h=this.slice(i,o),d=t.slice(e,n),x=0;x<m;++x)if(h[x]!==d[x]){p=h[x],u=d[x];break}return p<u?-1:u<p?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return ir(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return ir(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return Gi(this,t,e,n);case"utf8":case"utf-8":return Yi(this,t,e,n);case"ascii":return or(this,t,e,n);case"latin1":case"binary":return zi(this,t,e,n);case"base64":return Vi(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qi(this,t,e,n);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Zt=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var p=0;p<o;++p)i[p]=this[p+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,p=0;++p<e&&(o*=256);)i+=this[t+p]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||b(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||b(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||b(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||b(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=this[t],o=1,p=0;++p<e&&(o*=256);)i+=this[t+p]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||b(t,e,this.length);for(var i=e,o=1,p=this[t+--i];i>0&&(o*=256);)p+=this[t+--i]*o;return o*=128,p>=o&&(p-=Math.pow(2,8*e)),p};f.prototype.readInt8=function(t,e){return e||b(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||b(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||b(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||b(t,4,this.length),Xe(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||b(t,4,this.length),Xe(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||b(t,8,this.length),Xe(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||b(t,8,this.length),Xe(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,t,e,n,o,0)}var p=1,u=0;for(this[e]=t&255;++u<n&&(p*=256);)this[e+u]=t/p&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,t,e,n,o,0)}var p=n-1,u=1;for(this[e+p]=t&255;--p>=0&&(u*=256);)this[e+p]=t/u&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ke(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ke(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Je(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Je(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,t,e,n,o-1,-o)}var p=0,u=1,m=0;for(this[e]=t&255;++p<n&&(u*=256);)t<0&&m===0&&this[e+p-1]!==0&&(m=1),this[e+p]=(t/u>>0)-m&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,t,e,n,o-1,-o)}var p=n-1,u=1,m=0;for(this[e+p]=t&255;--p>=0&&(u*=256);)t<0&&m===0&&this[e+p+1]!==0&&(m=1),this[e+p]=(t/u>>0)-m&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ke(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ke(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Je(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Je(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return fr(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return fr(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return pr(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return pr(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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-n&&(i=t.length-e+n);var o=i-n,p;if(this===t&&n<e&&e<i)for(p=o-1;p>=0;--p)t[p+e]=this[p+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(p=0;p<o;++p)t[p+e]=this[p+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=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"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var p;if(typeof t=="number")for(p=e;p<n;++p)this[p]=t;else{var u=D(t)?t:He(new f(t,i).toString()),m=u.length;for(p=0;p<n-e;++p)this[p+e]=u[p%m]}return this};eo=/[^+\/0-9A-Za-z-_]/g});var s=At(()=>{"use strict";mr()});var hp={};Yt(hp,{DynamicTypeLiteralMapper:()=>jt});module.exports=ai(hp);a();s();a();s();a();s();function N(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();a();s();a();s();a();s();a();s();var po=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Ze=po;var lo=typeof self=="object"&&self&&self.Object===Object&&self,uo=Ze||lo||Function("return this")(),E=uo;var co=E.Symbol,Y=co;a();s();var hr=Object.prototype,mo=hr.hasOwnProperty,ho=hr.toString,Me=Y?Y.toStringTag:void 0;function xo(r){var t=mo.call(r,Me),e=r[Me];try{r[Me]=void 0;var n=!0}catch(o){}var i=ho.call(r);return n&&(t?r[Me]=e:delete r[Me]),i}var dr=xo;a();s();var yo=Object.prototype,go=yo.toString;function wo(r){return go.call(r)}var xr=wo;var To="[object Null]",vo="[object Undefined]",yr=Y?Y.toStringTag:void 0;function Ao(r){return r==null?r===void 0?vo:To:yr&&yr in Object(r)?dr(r):xr(r)}var z=Ao;a();s();function bo(r){return r!=null&&typeof r=="object"}var V=bo;a();s();var Eo=Array.isArray,ye=Eo;a();s();function _o(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var et=_o;a();s();a();s();a();s();a();s();var So="[object AsyncFunction]",Lo="[object Function]",Io="[object GeneratorFunction]",No="[object Proxy]";function Co(r){if(!et(r))return!1;var t=z(r);return t==Lo||t==Io||t==So||t==No}var tt=Co;a();s();a();s();var Ro=E["__core-js_shared__"],rt=Ro;var gr=(function(){var r=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function ko(r){return!!gr&&gr in r}var wr=ko;a();s();var Oo=Function.prototype,Po=Oo.toString;function Bo(r){if(r!=null){try{return Po.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var q=Bo;var Uo=/[\\^$.*+?()[\]{}|]/g,Mo=/^\[object .+?Constructor\]$/,Do=Function.prototype,Fo=Object.prototype,jo=Do.toString,$o=Fo.hasOwnProperty,Wo=RegExp("^"+jo.call($o).replace(Uo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Go(r){if(!et(r)||wr(r))return!1;var t=tt(r)?Wo:Mo;return t.test(q(r))}var Tr=Go;a();s();function Yo(r,t){return r==null?void 0:r[t]}var vr=Yo;function zo(r,t){var e=vr(r,t);return Tr(e)?e:void 0}var k=zo;var Vo=k(E,"WeakMap"),nt=Vo;a();s();function qo(){}var Ar=qo;a();s();a();s();a();s();function Ho(r,t,e,n){for(var i=r.length,o=e+(n?1:-1);n?o--:++o<i;)if(t(r[o],o,r))return o;return-1}var br=Ho;a();s();function Ko(r){return r!==r}var Er=Ko;a();s();function Jo(r,t,e){for(var n=e-1,i=r.length;++n<i;)if(r[n]===t)return n;return-1}var _r=Jo;function Qo(r,t,e){return t===t?_r(r,t,e):br(r,Er,e)}var Sr=Qo;function Xo(r,t){var e=r==null?0:r.length;return!!e&&Sr(r,t,0)>-1}var Lr=Xo;a();s();var Zo=9007199254740991,ea=/^(?:0|[1-9]\d*)$/;function ta(r,t){var e=typeof r;return t=t==null?Zo:t,!!t&&(e=="number"||e!="symbol"&&ea.test(r))&&r>-1&&r%1==0&&r<t}var Ir=ta;a();s();function ra(r,t){return r===t||r!==r&&t!==t}var it=ra;a();s();a();s();var na=9007199254740991;function ia(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=na}var ot=ia;function oa(r){return r!=null&&ot(r.length)&&!tt(r)}var Nr=oa;a();s();var aa=Object.prototype;function sa(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||aa;return r===e}var Cr=sa;a();s();a();s();a();s();function fa(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var Rr=fa;a();s();a();s();var pa="[object Arguments]";function la(r){return V(r)&&z(r)==pa}var Lt=la;var kr=Object.prototype,ua=kr.hasOwnProperty,ca=kr.propertyIsEnumerable,ma=Lt((function(){return arguments})())?Lt:function(r){return V(r)&&ua.call(r,"callee")&&!ca.call(r,"callee")},Or=ma;a();s();a();s();function ha(){return!1}var Pr=ha;var Mr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Br=Mr&&typeof module=="object"&&module&&!module.nodeType&&module,da=Br&&Br.exports===Mr,Ur=da?E.Buffer:void 0,xa=Ur?Ur.isBuffer:void 0,ya=xa||Pr,De=ya;a();s();a();s();var ga="[object Arguments]",wa="[object Array]",Ta="[object Boolean]",va="[object Date]",Aa="[object Error]",ba="[object Function]",Ea="[object Map]",_a="[object Number]",Sa="[object Object]",La="[object RegExp]",Ia="[object Set]",Na="[object String]",Ca="[object WeakMap]",Ra="[object ArrayBuffer]",ka="[object DataView]",Oa="[object Float32Array]",Pa="[object Float64Array]",Ba="[object Int8Array]",Ua="[object Int16Array]",Ma="[object Int32Array]",Da="[object Uint8Array]",Fa="[object Uint8ClampedArray]",ja="[object Uint16Array]",$a="[object Uint32Array]",v={};v[Oa]=v[Pa]=v[Ba]=v[Ua]=v[Ma]=v[Da]=v[Fa]=v[ja]=v[$a]=!0;v[ga]=v[wa]=v[Ra]=v[Ta]=v[ka]=v[va]=v[Aa]=v[ba]=v[Ea]=v[_a]=v[Sa]=v[La]=v[Ia]=v[Na]=v[Ca]=!1;function Wa(r){return V(r)&&ot(r.length)&&!!v[z(r)]}var Dr=Wa;a();s();function Ga(r){return function(t){return r(t)}}var Fr=Ga;a();s();var jr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fe=jr&&typeof module=="object"&&module&&!module.nodeType&&module,Ya=Fe&&Fe.exports===jr,It=Ya&&Ze.process,za=(function(){try{var r=Fe&&Fe.require&&Fe.require("util").types;return r||It&&It.binding&&It.binding("util")}catch(t){}})(),Nt=za;var $r=Nt&&Nt.isTypedArray,Va=$r?Fr($r):Dr,at=Va;var qa=Object.prototype,Ha=qa.hasOwnProperty;function Ka(r,t){var e=ye(r),n=!e&&Or(r),i=!e&&!n&&De(r),o=!e&&!n&&!i&&at(r),p=e||n||i||o,u=p?Rr(r.length,String):[],m=u.length;for(var h in r)(t||Ha.call(r,h))&&!(p&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Ir(h,m)))&&u.push(h);return u}var Wr=Ka;a();s();a();s();a();s();function Ja(r,t){return function(e){return r(t(e))}}var Gr=Ja;var Qa=Gr(Object.keys,Object),Yr=Qa;var Xa=Object.prototype,Za=Xa.hasOwnProperty;function es(r){if(!Cr(r))return Yr(r);var t=[];for(var e in Object(r))Za.call(r,e)&&e!="constructor"&&t.push(e);return t}var zr=es;function ts(r){return Nr(r)?Wr(r):zr(r)}var Vr=ts;a();s();a();s();a();s();a();s();a();s();var rs=k(Object,"create"),H=rs;function ns(){this.__data__=H?H(null):{},this.size=0}var qr=ns;a();s();function is(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Hr=is;a();s();var os="__lodash_hash_undefined__",as=Object.prototype,ss=as.hasOwnProperty;function fs(r){var t=this.__data__;if(H){var e=t[r];return e===os?void 0:e}return ss.call(t,r)?t[r]:void 0}var Kr=fs;a();s();var ps=Object.prototype,ls=ps.hasOwnProperty;function us(r){var t=this.__data__;return H?t[r]!==void 0:ls.call(t,r)}var Jr=us;a();s();var cs="__lodash_hash_undefined__";function ms(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=H&&t===void 0?cs:t,this}var Qr=ms;function Ne(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Ne.prototype.clear=qr;Ne.prototype.delete=Hr;Ne.prototype.get=Kr;Ne.prototype.has=Jr;Ne.prototype.set=Qr;var Ct=Ne;a();s();a();s();function hs(){this.__data__=[],this.size=0}var Xr=hs;a();s();a();s();function ds(r,t){for(var e=r.length;e--;)if(it(r[e][0],t))return e;return-1}var ie=ds;var xs=Array.prototype,ys=xs.splice;function gs(r){var t=this.__data__,e=ie(t,r);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():ys.call(t,e,1),--this.size,!0}var Zr=gs;a();s();function ws(r){var t=this.__data__,e=ie(t,r);return e<0?void 0:t[e][1]}var en=ws;a();s();function Ts(r){return ie(this.__data__,r)>-1}var tn=Ts;a();s();function vs(r,t){var e=this.__data__,n=ie(e,r);return n<0?(++this.size,e.push([r,t])):e[n][1]=t,this}var rn=vs;function Ce(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Ce.prototype.clear=Xr;Ce.prototype.delete=Zr;Ce.prototype.get=en;Ce.prototype.has=tn;Ce.prototype.set=rn;var oe=Ce;a();s();var As=k(E,"Map"),ae=As;function bs(){this.size=0,this.__data__={hash:new Ct,map:new(ae||oe),string:new Ct}}var nn=bs;a();s();a();s();a();s();function Es(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var on=Es;function _s(r,t){var e=r.__data__;return on(t)?e[typeof t=="string"?"string":"hash"]:e.map}var se=_s;function Ss(r){var t=se(this,r).delete(r);return this.size-=t?1:0,t}var an=Ss;a();s();function Ls(r){return se(this,r).get(r)}var sn=Ls;a();s();function Is(r){return se(this,r).has(r)}var fn=Is;a();s();function Ns(r,t){var e=se(this,r),n=e.size;return e.set(r,t),this.size+=e.size==n?0:1,this}var pn=Ns;function Re(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Re.prototype.clear=nn;Re.prototype.delete=an;Re.prototype.get=sn;Re.prototype.has=fn;Re.prototype.set=pn;var st=Re;a();s();function Cs(r,t){for(var e=-1,n=t.length,i=r.length;++e<n;)r[i+e]=t[e];return r}var ln=Cs;a();s();a();s();function Rs(){this.__data__=new oe,this.size=0}var un=Rs;a();s();function ks(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var cn=ks;a();s();function Os(r){return this.__data__.get(r)}var mn=Os;a();s();function Ps(r){return this.__data__.has(r)}var hn=Ps;a();s();var Bs=200;function Us(r,t){var e=this.__data__;if(e instanceof oe){var n=e.__data__;if(!ae||n.length<Bs-1)return n.push([r,t]),this.size=++e.size,this;e=this.__data__=new st(n)}return e.set(r,t),this.size=e.size,this}var dn=Us;function ke(r){var t=this.__data__=new oe(r);this.size=t.size}ke.prototype.clear=un;ke.prototype.delete=cn;ke.prototype.get=mn;ke.prototype.has=hn;ke.prototype.set=dn;var ft=ke;a();s();a();s();function Ms(r,t){for(var e=-1,n=r==null?0:r.length,i=0,o=[];++e<n;){var p=r[e];t(p,e,r)&&(o[i++]=p)}return o}var xn=Ms;a();s();function Ds(){return[]}var yn=Ds;var Fs=Object.prototype,js=Fs.propertyIsEnumerable,gn=Object.getOwnPropertySymbols,$s=gn?function(r){return r==null?[]:(r=Object(r),xn(gn(r),function(t){return js.call(r,t)}))}:yn,wn=$s;a();s();a();s();function Ws(r,t,e){var n=t(r);return ye(r)?n:ln(n,e(r))}var Tn=Ws;function Gs(r){return Tn(r,Vr,wn)}var Rt=Gs;a();s();a();s();var Ys=k(E,"DataView"),pt=Ys;a();s();var zs=k(E,"Promise"),lt=zs;a();s();var Vs=k(E,"Set"),fe=Vs;var vn="[object Map]",qs="[object Object]",An="[object Promise]",bn="[object Set]",En="[object WeakMap]",_n="[object DataView]",Hs=q(pt),Ks=q(ae),Js=q(lt),Qs=q(fe),Xs=q(nt),ge=z;(pt&&ge(new pt(new ArrayBuffer(1)))!=_n||ae&&ge(new ae)!=vn||lt&&ge(lt.resolve())!=An||fe&&ge(new fe)!=bn||nt&&ge(new nt)!=En)&&(ge=function(r){var t=z(r),e=t==qs?r.constructor:void 0,n=e?q(e):"";if(n)switch(n){case Hs:return _n;case Ks:return vn;case Js:return An;case Qs:return bn;case Xs:return En}return t});var kt=ge;a();s();var Zs=E.Uint8Array,Ot=Zs;a();s();a();s();a();s();a();s();a();s();var ef="__lodash_hash_undefined__";function tf(r){return this.__data__.set(r,ef),this}var Sn=tf;a();s();function rf(r){return this.__data__.has(r)}var Ln=rf;function ut(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new st;++t<e;)this.add(r[t])}ut.prototype.add=ut.prototype.push=Sn;ut.prototype.has=Ln;var ct=ut;a();s();function nf(r,t){for(var e=-1,n=r==null?0:r.length;++e<n;)if(t(r[e],e,r))return!0;return!1}var In=nf;a();s();function of(r,t){return r.has(t)}var mt=of;var af=1,sf=2;function ff(r,t,e,n,i,o){var p=e&af,u=r.length,m=t.length;if(u!=m&&!(p&&m>u))return!1;var h=o.get(r),d=o.get(t);if(h&&d)return h==t&&d==r;var x=-1,y=!0,T=e&sf?new ct:void 0;for(o.set(r,t),o.set(t,r);++x<u;){var A=r[x],S=t[x];if(n)var U=p?n(S,A,x,t,r,o):n(A,S,x,r,t,o);if(U!==void 0){if(U)continue;y=!1;break}if(T){if(!In(t,function(ce,me){if(!mt(T,me)&&(A===ce||i(A,ce,e,n,o)))return T.push(me)})){y=!1;break}}else if(!(A===S||i(A,S,e,n,o))){y=!1;break}}return o.delete(r),o.delete(t),y}var ht=ff;a();s();a();s();function pf(r){var t=-1,e=Array(r.size);return r.forEach(function(n,i){e[++t]=[i,n]}),e}var Nn=pf;a();s();function lf(r){var t=-1,e=Array(r.size);return r.forEach(function(n){e[++t]=n}),e}var Oe=lf;var uf=1,cf=2,mf="[object Boolean]",hf="[object Date]",df="[object Error]",xf="[object Map]",yf="[object Number]",gf="[object RegExp]",wf="[object Set]",Tf="[object String]",vf="[object Symbol]",Af="[object ArrayBuffer]",bf="[object DataView]",Cn=Y?Y.prototype:void 0,Pt=Cn?Cn.valueOf:void 0;function Ef(r,t,e,n,i,o,p){switch(e){case bf:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Af:return!(r.byteLength!=t.byteLength||!o(new Ot(r),new Ot(t)));case mf:case hf:case yf:return it(+r,+t);case df:return r.name==t.name&&r.message==t.message;case gf:case Tf:return r==t+"";case xf:var u=Nn;case wf:var m=n&uf;if(u||(u=Oe),r.size!=t.size&&!m)return!1;var h=p.get(r);if(h)return h==t;n|=cf,p.set(r,t);var d=ht(u(r),u(t),n,i,o,p);return p.delete(r),d;case vf:if(Pt)return Pt.call(r)==Pt.call(t)}return!1}var Rn=Ef;a();s();var _f=1,Sf=Object.prototype,Lf=Sf.hasOwnProperty;function If(r,t,e,n,i,o){var p=e&_f,u=Rt(r),m=u.length,h=Rt(t),d=h.length;if(m!=d&&!p)return!1;for(var x=m;x--;){var y=u[x];if(!(p?y in t:Lf.call(t,y)))return!1}var T=o.get(r),A=o.get(t);if(T&&A)return T==t&&A==r;var S=!0;o.set(r,t),o.set(t,r);for(var U=p;++x<m;){y=u[x];var ce=r[y],me=t[y];if(n)var $t=p?n(me,ce,y,t,r,o):n(ce,me,y,r,t,o);if(!($t===void 0?ce===me||i(ce,me,e,n,o):$t)){S=!1;break}U||(U=y=="constructor")}if(S&&!U){var Ge=r.constructor,Ye=t.constructor;Ge!=Ye&&"constructor"in r&&"constructor"in t&&!(typeof Ge=="function"&&Ge instanceof Ge&&typeof Ye=="function"&&Ye instanceof Ye)&&(S=!1)}return o.delete(r),o.delete(t),S}var kn=If;var Nf=1,On="[object Arguments]",Pn="[object Array]",dt="[object Object]",Cf=Object.prototype,Bn=Cf.hasOwnProperty;function Rf(r,t,e,n,i,o){var p=ye(r),u=ye(t),m=p?Pn:kt(r),h=u?Pn:kt(t);m=m==On?dt:m,h=h==On?dt:h;var d=m==dt,x=h==dt,y=m==h;if(y&&De(r)){if(!De(t))return!1;p=!0,d=!1}if(y&&!d)return o||(o=new ft),p||at(r)?ht(r,t,e,n,i,o):Rn(r,t,m,e,n,i,o);if(!(e&Nf)){var T=d&&Bn.call(r,"__wrapped__"),A=x&&Bn.call(t,"__wrapped__");if(T||A){var S=T?r.value():r,U=A?t.value():t;return o||(o=new ft),i(S,U,e,n,o)}}return y?(o||(o=new ft),kn(r,t,e,n,i,o)):!1}var Un=Rf;function Mn(r,t,e,n,i){return r===t?!0:r==null||t==null||!V(r)&&!V(t)?r!==r&&t!==t:Un(r,t,e,n,Mn,i)}var Dn=Mn;a();s();function kf(r,t,e){for(var n=-1,i=r==null?0:r.length;++n<i;)if(e(t,r[n]))return!0;return!1}var Fn=kf;a();s();function Of(r,t){return Dn(r,t)}var xt=Of;a();s();a();s();var Pf=1/0,Bf=fe&&1/Oe(new fe([,-0]))[1]==Pf?function(r){return new fe(r)}:Ar,jn=Bf;var Uf=200;function Mf(r,t,e){var n=-1,i=Lr,o=r.length,p=!0,u=[],m=u;if(e)p=!1,i=Fn;else if(o>=Uf){var h=t?null:jn(r);if(h)return Oe(h);p=!1,i=mt,m=new ct}else m=t?[]:u;e:for(;++n<o;){var d=r[n],x=t?t(d):d;if(d=e||d!==0?d:0,p&&x===x){for(var y=m.length;y--;)if(m[y]===x)continue e;t&&m.push(x),u.push(d)}else i(m,x,e)||(m!==u&&m.push(x),u.push(d))}return u}var $n=Mf;a();s();function Df(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?$n(r,void 0,t):[]}var yt=Df;a();s();a();s();a();s();var Wn,Gn,je=(Gn=(Wn=l.env.FERN_STACK_TRACK)==null?void 0:Wn.toLowerCase())!=null?Gn:"",F=je!==""&&je!=="0"&&je!=="false",Bt=["single","multiline","box"].includes(je)?je:"single";F&&(Error.stackTraceLimit=50);var Ff=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),jf=new Set(["stacktrace"]);function wt({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:p=!0,formatFilename:u=m=>m}={}){var h;if(!F)return[];n=[...n,...Ff],e=[...e,...jf],i=[...i,"runInteractiveTask"];let m=!1;return((h=new Error().stack)!=null?h:"").split(`
2
- `).map(d=>{let x=d.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(x&&x.length===5){let[,y,T,A,S]=x;if(!y||!T||!A||!S)return;if(m||i.some(U=>y==null?void 0:y.includes(U))){m=!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(T),position:`${A}:${S}`}}}).filter(d=>{var x,y;return d&&!n.some(T=>d.fn.includes(T))&&!(o&&((x=d.path)!=null&&x.startsWith("node:")))&&!(p&&((y=d.path)!=null&&y.endsWith(".js")))&&!e.some(T=>d.path.includes(T))}).slice(t,t+r)}var gt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:n=[],filterFunctions:i=[],stopOn:o=[],filterNode:p=!0,filterJs:u=!0,multiline:m=!1,formatFilename:h=d=>d}={}){c(this,"maxFrames");c(this,"skip");c(this,"filterPaths");c(this,"filterFunctions");c(this,"stopOn");c(this,"filterNode");c(this,"filterJs");c(this,"multiline");c(this,"formatFilename");c(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=n,this.filterFunctions=i,this.stopOn=o,this.filterNode=p,this.filterJs=u,this.multiline=m,this.formatFilename=h}tag(t){let e=this.tracking.get(t)||new Set;wt({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(n=>e.add(n)),this.tracking.set(t,e)}trace(t){if(!F)return"";let e=this.tracking.get(t);return e?[...e].map(n=>`${this.multiline?`
3
- `:""}${n.fn} - ${n.path}:${n.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},K;function Yn({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:p=!0,multiline:u=!1,formatFilename:m=h=>h}={}){F&&(K!=null||(K=new gt({maxFrames:r,skip:t,filterPaths:e,filterFunctions:n,stopOn:i,filterNode:o,filterJs:p,multiline:u,formatFilename:m})))}function zn(r){K==null||K.tag(r)}function Ut(r){var t;return(t=K==null?void 0:K.frames(r))!=null?t:[]}var J=class{constructor(){zn(this)}};a();s();a();s();a();s();var O=class extends J{constructor(e){super();c(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 $f=4;Yn({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var $e=class{constructor(){c(this,"lineBuffer",[]);c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsSemicolon",!1);c(this,"lastCharacterIsNewline",!1);c(this,"nodeStackFrames",[])}get buffer(){return F&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
- `),this.lineBuffer.join(`
5
- `)+(this.lastCharacterIsNewline?`
6
- `:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
7
- `),i=n?e.substring(0,e.length-1):e,o=this.getIndentString(),p=i.replaceAll(`
8
- `,`
9
- ${o}`);this.isAtStartOfLine()&&(p=o+p),n&&(p+=`
10
- `),this.writeInternal(p)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){F&&this.nodeStackFrames.push(...Ut(t)),t.write(this),F&&Bt!=="single"&&this.writeInternal(`
11
- `)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){this.writeNode(t),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new O(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new O(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new O(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new O(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new O(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}writeLine(...t){this.write(...t.length===0?[""]:t),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:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let p=t[o];p!=null&&n(p)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
- `),this.lastCharacterIsSemicolon=t.endsWith(";");let n=t.split(`
15
- `),i=F&&!this.shouldSkipTracking(n)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${n.shift()||""}`),this.lastCharacterIsNewline&&n.pop(),this.lineBuffer.push(...n),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(n=>`${e?`(${e}) `:""} ${n.fn} - ${n.path} : ${n.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(wt({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,Bt){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return $f}};a();s();function Mt(r){return(r==null?void 0:r.name)!=null&&(r==null?void 0:r.assignment)!=null}a();s();var We=class extends J{constructor({condition:e,true_:n,false_:i}){super();c(this,"condition");c(this,"true_");c(this,"false_");this.condition=e,this.true_=n,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();var Q={Critical:"CRITICAL",Warning:"WARNING"};a();s();a();s();var Vn="self",qn="static";var g={};Yt(g,{Access:()=>pe,Array:()=>we,AstNode:()=>w,Attribute:()=>Te,Class:()=>X,ClassInstantiation:()=>$,ClassReference:()=>_,CodeBlock:()=>L,DataClass:()=>ve,Enum:()=>Ae,Field:()=>be,Map:()=>Ee,Method:()=>te,MethodInvocation:()=>ee,Parameter:()=>Z,Trait:()=>_e,Type:()=>B,TypeLiteral:()=>P,Writer:()=>j,array:()=>Kf,assignVariable:()=>pp,attribute:()=>Jf,classReference:()=>Zf,class_:()=>Qf,codeblock:()=>Se,dataClass:()=>ep,enum_:()=>tp,escapePhpString:()=>Ft,field:()=>rp,instantiateClass:()=>Zn,invokeMethod:()=>np,map:()=>op,mergeArrays:()=>cp,method:()=>ap,parameter:()=>sp,string:()=>up,ternary:()=>fp,this_:()=>mp,throwException:()=>ip,trait:()=>Xf,variable:()=>lp});a();s();a();s();a();s();var pe={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function Hn(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var j=class extends $e{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();c(this,"namespace");c(this,"rootNamespace");c(this,"customConfig");c(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var p,u;if(e.namespace==null)return;if(Object.keys(this.references).filter(m=>{let h=Hn(m);return h.namespace!==e.namespace&&h.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===""?e.name:`${e.namespace}\\${e.name}`;((u=(p=this.references)[i])!=null?u:p[i]=[]).push(e)}toString(e=!1){if(e)return this.buffer;let n=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${n}
16
-
17
- ${i}
18
-
19
- ${this.buffer}`:n+`
20
-
21
- `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>Hn(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
22
- `)}};var w=class extends J{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:i,skipImports:o=!1}=t,p=new j({namespace:e,rootNamespace:n,customConfig:i});return this.write(p),p.toString(o)}async toStringAsync({namespace:t,rootNamespace:e,customConfig:n}){let i=new j({namespace:t,rootNamespace:e,customConfig:n});return this.write(i),i.toString()}};var we=class extends w{constructor({entries:e}){super();c(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]")}};a();s();var Te=class extends w{constructor(e){var n;super();c(this,"reference");c(this,"arguments");this.reference=e.reference,this.arguments=(n=e.arguments)!=null?n:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((n,i)=>{i>0&&e.write(","),typeof n=="string"?e.write(n):n.write(e)}),e.write(")"))}};a();s();a();s();var _=class extends w{constructor({name:e,namespace:n,generics:i}){super();c(this,"name");c(this,"namespace");c(this,"generics");c(this,"fullyQualified");this.name=e,this.namespace=n,this.generics=i,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${n}`)}};a();s();a();s();function le(r){return r.startsWith("$")?r:`$${r}`}var C=class extends w{constructor({docs:e}={}){super();c(this,"docs");c(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(Ue(Be({},e),{name:e.name!=null?le(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
23
- `).forEach(n=>{e.writeLine(` * ${n}`)}),this.tags.length>0&&e.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:e,tag:n});e.writeLine(" */")}writeTag({writer:e,tag:n}){let i=n.docs!=null?n.docs.split(`
24
- `):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};a();s();function ue(r){return Wf(r,[pe.Public,pe.PublicReadonly,pe.Protected,pe.Private])}function Wf(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var X=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:u}){super();c(this,"name");c(this,"namespace");c(this,"abstract");c(this,"docs");c(this,"parentClassReference");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);c(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=p,this.traits=u!=null?u:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addMethods(e){this.methods.push(...e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new _({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ue(this.fields)}),(this.constructor!=null||this.methods.length>0)&&e.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:e,constructor:this.constructor_}),this.methods.length>0&&e.newLine()),this.writeMethods({writer:e,methods:ue(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new C({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var i;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((o,p)=>{p===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=n.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let i=new C;for(let o of n.parameters)i.addTag(o.getCommentTag());i.write(e)}writeFields({writer:e,fields:n}){n.filter(i=>!i.inherited).forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();a();s();function Pe({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Gf({writer:r,arguments_:t});return}Yf({writer:r,arguments_:t})}function Gf({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)Jn({writer:r,argument:e,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function Yf({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),Jn({writer:r,argument:e,writeCompact:!0})}),r.write(")")}function Jn({writer:r,argument:t,writeCompact:e}){Mt(t)?(t.docs&&(e?r.write(`/* ${t.docs} */ `):r.writeLine(`/* ${t.docs} */`)),r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var $=class extends w{constructor({classReference:e,arguments_:n,multiline:i}){super();c(this,"classReference");c(this,"arguments_");c(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),Pe({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var L=class extends w{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new O(this.arg).write(e)}};a();s();a();s();var Z=class extends w{constructor({name:e,type:n,docs:i,initializer:o,access:p,readonly_:u}){super();c(this,"name");c(this,"type");c(this,"docs");c(this,"initializer");c(this,"access");c(this,"readonly_");this.name=le(e),this.type=n,this.docs=i,this.initializer=o,this.access=p,this.readonly_=u!=null?u:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};a();s();a();s();a();s();a();s();var ee=class extends w{constructor({method:e,arguments_:n,static_:i,multiline:o,on:p}){super();c(this,"method");c(this,"arguments_");c(this,"multiline");c(this,"static_");c(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=p}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),Pe({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var P=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(Vf({writer:e,value:this.internalType.value}));break}case"float":{e.write(this.internalType.value.toString());break}case"number":{e.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"datetime":{e.writeNode(zf({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
25
- `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:N(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new $({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=Hf({values:n.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("]")}writeMap({writer:e,map:n}){let i=qf({entries:n.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("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value: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:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,p]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(p)),e.writeLine(",");e.dedent(),e.write("]")}};function zf({writer:r,value:t}){return new $({classReference:new _({name:"DateTime",namespace:""}),arguments_:[new L(`'${t}'`)]})}function Vf({writer:r,value:t}){return new ee({on:new _({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new L(`"${t}"`)]})}function qf({entries:r}){return r.filter(t=>!P.isNop(t.key)&&!P.isNop(t.value))}function Hf({values:r}){return r.filter(t=>!P.isNop(t))}var B=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Qn),e.write("DateTime");break;case"dateTime":e.addReference(Qn),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(u=>!u.valueType.isOptional()),o=this.internalType.entries.filter(u=>u.valueType.isOptional()),p=[...i,...o];for(let u of p)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:u,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:n});break}case"optional":{let i=this.internalType.value.internalType,o=i.type==="mixed",p=i.type==="union";!p&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),p&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((o,p)=>{p>0&&e.write(", "),o.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:N(this.internalType.value.internalType)}break;default:N(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new _({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:N(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){let n=this.flattenUnionTypes(e),i=yt(n,xt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let n=[];for(let i of e)i.internalType.type==="union"?n.push(...this.flattenUnionTypes(i.internalType.types)):n.push(i);return n}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:P.string(e)})}static literalBoolean(e){return new this({type:"literal",value:P.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:n,comment:i}){let o=this.getUniqueTypes({types:n,comment:i,writer:e}),p=this.unwrapOptionalTypes(o),u=p.filter(m=>m.underlyingType().internalType.type==="mixed").length>0;if(u&&!i){e.write("mixed");return}if(p.length>0&&i){e.writeLine("("),p.forEach((m,h)=>{h>0?e.write(" * |"):e.write(" * "),u&&(m=m.underlyingType()),m.write(e,{comment:i}),e.writeLine(),h++}),e.write(" * )");return}p.forEach((m,h)=>{h>0&&e.write("|"),u&&(m=m.underlyingType()),m.write(e,{comment:i}),h++})}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=yt(n,xt),p=new Set;return o.filter(u=>{let m=u.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return p.has(m)?!1:(p.add(m),!0)})}unwrapOptionalTypes(e){let n=!1,i=e.map(o=>o.internalType.type==="optional"?(n=!0,o.internalType.value):o);return n&&i.push(r.null()),i}unionHasOptional(e){return e.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:n,customConfig:i,comment:o}){let p=new j({namespace:e,rootNamespace:n,customConfig:i});return this.write(p,{comment:o!=null?o:!1}),p.toString()}},Qn=new _({namespace:"",name:"DateTime"});a();s();function Xn(r){return r.startsWith("$")?r.slice(1):r}var Dt="values",ve=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:u,constructorAccess:m}){super();c(this,"name");c(this,"namespace");c(this,"constructorAccess");c(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=m!=null?m:"public",this.class_=new X({name:e,namespace:n,abstract:i,docs:o,parentClassReference:p,traits:u})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=ue(this.class_.fields).map(i=>Ue(Be({},i),{name:Xn(i.name)}));this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:g.codeblock(i=>{if(n.length>0)for(let o of n)i.write(`$this->${o.name} = $${Dt}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";");else i.writeLine(`unset($${Dt});`)})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new Z({name:Dt,type:B.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new L("[]"):void 0})]}};a();s();a();s();var te=class extends w{constructor({name:e,access:n,parameters:i,throws:o,return_:p,body:u,docs:m,classReference:h,static_:d}){super();c(this,"name");c(this,"access");c(this,"parameters");c(this,"throws");c(this,"return_");c(this,"body");c(this,"docs");c(this,"classReference");c(this,"static_");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=p,this.body=u,this.docs=m,this.classReference=h,this.static_=d!=null?d:!1}write(e){var p;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(u=>!u.type.isOptional()),i=this.parameters.filter(u=>u.type.isOptional());[...n,...i].forEach((u,m)=>{m>0&&e.write(", "),u.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(p=this.body)==null||p.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new C({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==Vn&&this.return_!==qn&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:B.reference(i)});e.writeNode(n)}};var Ae=class extends w{constructor({name:e,namespace:n,backing:i,docs:o,serializable:p}){super();c(this,"name");c(this,"namespace");c(this,"backing");c(this,"docs");c(this,"members",[]);c(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=p!=null?p:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new _({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members){if(e.write(`case ${n.name}`),n.value!=null)if(typeof n.value=="string"){let i=Ft(n.value);e.write(` = "${i}"`)}else e.write(` = ${n.value}`);e.writeTextStatement("")}this.serializable&&(e.newLine(),e.writeNode(new te({name:"jsonSerialize",return_:B.string(),access:"public",parameters:[],body:new L("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new C({docs:this.docs}).write(e)}};a();s();var be=class extends w{constructor({name:e,type:n,access:i,readonly_:o,initializer:p,docs:u,inlineDocs:m,attributes:h,inherited:d}){super();c(this,"name");c(this,"type");c(this,"access");c(this,"readonly_");c(this,"initializer");c(this,"docs");c(this,"inlineDocs");c(this,"attributes");c(this,"inherited");this.name=le(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=p,this.docs=u,this.inlineDocs=m,this.attributes=h!=null?h:[],this.inherited=d!=null?d:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new C;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Ee=class extends w{constructor({entries:e,multiline:n}){super();c(this,"entries");c(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};a();s();var _e=class extends w{constructor({name:e,namespace:n,docs:i,traits:o}){super();c(this,"name");c(this,"namespace");c(this,"docs");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:ue(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:ue(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new C({docs:this.docs});for(let i of this.fields)n.addTag({tagType:"property",type:i.type,name:i.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var Tt=class extends w{constructor(e){super();c(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),Pe({writer:e,arguments_:this.arrays.map(n=>Se(i=>{if(typeof n=="string"||n instanceof w){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Kf(r){return new we(r)}function Jf(r){return new Te(r)}function Qf(r){return new X(r)}function Xf(r){return new _e(r)}function Zf(r){return new _(r)}function Se(r){return new L(r)}function ep(r){return new ve(r)}function tp(r){return new Ae(r)}function rp(r){return new be(r)}function Zn(r){return new $(r)}function np(r){return new ee(r)}function ip(r){return Se(t=>{t.write("throw "),t.writeNode(Zn(r))})}function op(r){return new Ee(r)}function ap(r){return new te(r)}function sp(r){return new Z(r)}function fp(r){return new We(r)}function pp(r,t){return Se(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function lp(r){return Se(le(r))}function up(r){return Se(`"${r}"`)}function cp(...r){return new Tt(r)}function Ft(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\$/g,"\\$")}function mp(){return new L(r=>{r.write("$this")})}var jt=class{constructor({context:t}){c(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?g.TypeLiteral.null():(this.context.errors.add({severity:Q.Critical,message:"Expected non-null value, but got null"}),g.TypeLiteral.nop());if(t.value===void 0)return g.TypeLiteral.nop();switch(t.typeReference.type){case"list":case"set":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?g.TypeLiteral.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"unknown":return this.convertUnknown({value:t.value});default:N(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.string(n)}default:N(t)}}convertList({list:t,value:e}){return Array.isArray(e)?g.TypeLiteral.list({values:e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:Q.Critical,message:`Expected array but got: ${typeof e}`}),g.TypeLiteral.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:Q.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),g.TypeLiteral.nop()):g.TypeLiteral.map({entries:Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:N(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return g.TypeLiteral.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});return o==null?g.TypeLiteral.nop():g.TypeLiteral.reference(g.codeblock(p=>{p.writeNode(g.invokeMethod({on:g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),method:this.context.getMethodName(i.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:i,unionProperties:o}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:e.typeId});if(n==null)return;let i=this.convertNamed({named:n,value:t.value});if(!i.isClass()){this.context.errors.add({severity:Q.Critical,message:"Internal error; expected union value to be an object"});return}return i.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let n=this.context.getRecord(t.value);return n==null?[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:t.value})}]:[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:n[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:N(e)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:n}){let i=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});if(e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&n.length===1)return[...i,this.convert({typeReference:e.typeReference,value:t.value})];if(e.type==="samePropertiesAsObject"){let o=this.context.resolveNamedType({typeId:e.typeId});return o==null?[]:[...i,g.TypeLiteral.class_({reference:g.classReference({name:this.context.getClassName(o.declaration.name),namespace:this.context.getTypesNamespace(o.declaration.fernFilepath)}),fields:n})]}return i}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(p=>{this.context.errors.scope(p.name.wireValue);try{return this.convert(p)}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return g.TypeLiteral.class_({reference:g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),fields:n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:t,value:e}){let n=this.getEnumValueName({enum_:t,value:e});return n==null?g.TypeLiteral.nop():g.TypeLiteral.reference(g.codeblock(i=>{i.writeNode(g.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)})),i.write("::"),i.write(n),i.write("->value")}))}getEnumValueName({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:Q.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let n=t.values.find(i=>i.wireValue===e);if(n==null){this.context.errors.add({severity:Q.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?g.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:Q.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t}){return g.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?g.TypeLiteral.nop():g.TypeLiteral.number(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?g.TypeLiteral.nop():g.TypeLiteral.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?g.TypeLiteral.nop():g.TypeLiteral.boolean(i)}case"DATE":case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?g.TypeLiteral.nop():g.TypeLiteral.datetime(i)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?g.TypeLiteral.nop():g.TypeLiteral.string(i)}default:N(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};0&&(module.exports={DynamicTypeLiteralMapper});
26
- /*! Bundled license information:
27
-
28
- @esbuild-plugins/node-globals-polyfill/Buffer.js:
29
- (*!
30
- * The buffer module from node.js, for the browser.
31
- *
32
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
33
- * @license MIT
34
- *)
35
-
36
- lodash-es/lodash.js:
37
- (**
38
- * @license
39
- * Lodash (Custom Build) <https://lodash.com/>
40
- * Build: `lodash modularize exports="es" -o ./`
41
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
42
- * Released under MIT license <https://lodash.com/license>
43
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
44
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
45
- *)
46
- */
47
- //# sourceMappingURL=DynamicTypeLiteralMapper.cjs.map