@fern-api/php-dynamic-snippets 0.0.1 → 0.0.3

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.
@@ -1,21 +1,21 @@
1
- "use strict";var ue=Object.defineProperty,ut=Object.defineProperties,ct=Object.getOwnPropertyDescriptor,lt=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertyNames,be=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable;var Ee=(r,t,e)=>t in r?ue(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ce=(r,t)=>{for(var e in t||(t={}))Ce.call(t,e)&&Ee(r,e,t[e]);if(be)for(var e of be(t))ht.call(t,e)&&Ee(r,e,t[e]);return r},le=(r,t)=>ut(r,lt(t));var ve=(r,t)=>()=>(r&&(t=r(r=0)),t);var Se=(r,t)=>{for(var e in t)ue(r,e,{get:t[e],enumerable:!0})},mt=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pt(t))!Ce.call(r,i)&&i!==e&&ue(r,i,{get:()=>t[i],enumerable:!(n=ct(t,i))||n.enumerable});return r};var dt=r=>mt(ue({},"__esModule",{value:!0}),r);var f=(r,t,e)=>Ee(r,typeof t!="symbol"?t+"":t,e);function Pe(){throw new Error("setTimeout has not been defined")}function Ue(){throw new Error("clearTimeout has not been defined")}function Me(r){if(D===setTimeout)return setTimeout(r,0);if((D===Pe||!D)&&setTimeout)return D=setTimeout,setTimeout(r,0);try{return D(r,0)}catch(t){try{return D.call(null,r,0)}catch(e){return D.call(this,r,0)}}}function wt(r){if($===clearTimeout)return clearTimeout(r);if(($===Ue||!$)&&clearTimeout)return $=clearTimeout,clearTimeout(r);try{return $(r)}catch(t){try{return $.call(null,r)}catch(e){return $.call(this,r)}}}function yt(){!oe||!G||(oe=!1,G.length?C=G.concat(C):pe=-1,C.length&&Fe())}function Fe(){if(!oe){var r=Me(yt);oe=!0;for(var t=C.length;t;){for(G=C,C=[];++pe<t;)G&&G[pe].run();pe=-1,t=C.length}G=null,oe=!1,wt(r)}}function xt(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];C.push(new De(r,t)),C.length===1&&!oe&&Me(Fe)}function De(r,t){this.fun=r,this.array=t}function q(){}function Ut(r){throw new Error("process.binding is not supported")}function Mt(){return"/"}function Ft(r){throw new Error("process.chdir is not supported")}function Dt(){return 0}function Yt(r){var t=$t.call(ie)*.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 Wt(){var r=new Date,t=r-Ot;return t/1e3}var D,$,C,oe,G,pe,gt,Tt,At,Et,vt,Nt,Lt,Rt,It,_t,kt,bt,Ct,St,Bt,Pt,ie,$t,Ot,d,Be,u=ve(()=>{"use strict";D=Pe,$=Ue;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&($=clearTimeout);C=[],oe=!1,pe=-1;De.prototype.run=function(){this.fun.apply(null,this.array)};gt="browser",Tt="browser",At=!0,Et={},vt=[],Nt="",Lt={},Rt={},It={};_t=q,kt=q,bt=q,Ct=q,St=q,Bt=q,Pt=q;ie=globalThis.performance||{},$t=ie.now||ie.mozNow||ie.msNow||ie.oNow||ie.webkitNow||function(){return new Date().getTime()};Ot=new Date;d={nextTick:xt,title:gt,browser:At,env:Et,argv:vt,version:Nt,versions:Lt,on:_t,addListener:kt,once:bt,off:Ct,removeListener:St,removeAllListeners:Bt,emit:Pt,binding:Ut,cwd:Mt,chdir:Ft,umask:Dt,hrtime:Yt,platform:Tt,release:Rt,config:It,uptime:Wt},Be={};Object.keys(Be).forEach(r=>{let t=r.split("."),e=d;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Be[r]:e=e[i]||(e[i]={})}})});function We(){Le=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)_[t]=r[t],N[r.charCodeAt(t)]=t;N[45]=62,N[95]=63}function zt(r){Le||We();var t,e,n,i,o,s,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[l-2]==="="?2:r[l-1]==="="?1:0,s=new Vt(l*3/4-o),n=o>0?l-4:l;var p=0;for(t=0,e=0;t<n;t+=4,e+=3)i=N[r.charCodeAt(t)]<<18|N[r.charCodeAt(t+1)]<<12|N[r.charCodeAt(t+2)]<<6|N[r.charCodeAt(t+3)],s[p++]=i>>16&255,s[p++]=i>>8&255,s[p++]=i&255;return o===2?(i=N[r.charCodeAt(t)]<<2|N[r.charCodeAt(t+1)]>>4,s[p++]=i&255):o===1&&(i=N[r.charCodeAt(t)]<<10|N[r.charCodeAt(t+1)]<<4|N[r.charCodeAt(t+2)]>>2,s[p++]=i>>8&255,s[p++]=i&255),s}function Gt(r){return _[r>>18&63]+_[r>>12&63]+_[r>>6&63]+_[r&63]}function qt(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(Gt(n));return i.join("")}function $e(r){Le||We();for(var t,e=r.length,n=e%3,i="",o=[],s=16383,l=0,p=e-n;l<p;l+=s)o.push(qt(r,l,l+s>p?p:l+s));return n===1?(t=r[e-1],i+=_[t>>2],i+=_[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=_[t>>10],i+=_[t>>4&63],i+=_[t<<2&63],i+="="),o.push(i),o.join("")}function he(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function S(r,t){if(he()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(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 Re(this,r)}return Ve(this,r,t,e)}function Ve(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?Qt(r,t,e,n):typeof t=="string"?Ht(r,t,e):Xt(r,t)}function ze(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 Jt(r,t,e,n){return ze(t),t<=0?S(r,t):e!==void 0?typeof n=="string"?S(r,t).fill(e,n):S(r,t).fill(e):S(r,t)}function Re(r,t){if(ze(t),r=S(r,t<0?0:Ie(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Ht(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Ge(t,e)|0;r=S(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function Ne(r,t){var e=t.length<0?0:Ie(t.length)|0;r=S(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Qt(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),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=Ne(r,t),r}function Xt(r,t){if(k(t)){var e=Ie(t.length)|0;return r=S(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"||dr(t.length)?S(r,0):Ne(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Ne(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Ie(r){if(r>=he())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+he().toString(16)+" bytes");return r|0}function k(r){return!!(r!=null&&r._isBuffer)}function Ge(r,t){if(k(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 me(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Ke(r).length;default:if(n)return me(r).length;t=(""+t).toLowerCase(),n=!0}}function Zt(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 ar(this,t,e);case"utf8":case"utf-8":return He(this,t,e);case"ascii":return or(this,t,e);case"latin1":case"binary":return sr(this,t,e);case"base64":return nr(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fr(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function J(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function qe(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=a.from(t,n)),k(t))return t.length===0?-1:Ye(r,t,e,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Ye(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Ye(r,t,e,n,i){var o=1,s=r.length,l=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,s/=2,l/=2,e/=2}function p(E,ne){return o===1?E[ne]:E.readUInt16BE(ne*o)}var m;if(i){var w=-1;for(m=e;m<s;m++)if(p(r,m)===p(t,w===-1?0:m-w)){if(w===-1&&(w=m),m-w+1===l)return w*o}else w!==-1&&(m-=m-w),w=-1}else for(e+l>s&&(e=s-l),m=e;m>=0;m--){for(var y=!0,R=0;R<l;R++)if(p(r,m+R)!==p(t,R)){y=!1;break}if(y)return m}return-1}function Kt(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 s=0;s<n;++s){var l=parseInt(t.substr(s*2,2),16);if(isNaN(l))return s;r[e+s]=l}return s}function jt(r,t,e,n){return ye(me(t,r.length-e),r,e,n)}function Je(r,t,e,n){return ye(hr(t),r,e,n)}function er(r,t,e,n){return Je(r,t,e,n)}function tr(r,t,e,n){return ye(Ke(t),r,e,n)}function rr(r,t,e,n){return ye(mr(t,r.length-e),r,e,n)}function nr(r,t,e){return t===0&&e===r.length?$e(r):$e(r.slice(t,e))}function He(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],s=null,l=o>239?4:o>223?3:o>191?2:1;if(i+l<=e){var p,m,w,y;switch(l){case 1:o<128&&(s=o);break;case 2:p=r[i+1],(p&192)===128&&(y=(o&31)<<6|p&63,y>127&&(s=y));break;case 3:p=r[i+1],m=r[i+2],(p&192)===128&&(m&192)===128&&(y=(o&15)<<12|(p&63)<<6|m&63,y>2047&&(y<55296||y>57343)&&(s=y));break;case 4:p=r[i+1],m=r[i+2],w=r[i+3],(p&192)===128&&(m&192)===128&&(w&192)===128&&(y=(o&15)<<18|(p&63)<<12|(m&63)<<6|w&63,y>65535&&y<1114112&&(s=y))}}s===null?(s=65533,l=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=l}return ir(n)}function ir(r){var t=r.length;if(t<=Oe)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Oe));return e}function or(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 sr(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 ar(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+=pr(r[o]);return i}function fr(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 x(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 A(r,t,e,n,i,o){if(!k(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 de(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 we(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 Qe(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 Xe(r,t,e,n,i){return i||Qe(r,t,e,4,34028234663852886e22,-34028234663852886e22),et(r,t,e,n,23,4),e+4}function Ze(r,t,e,n,i){return i||Qe(r,t,e,8,17976931348623157e292,-17976931348623157e292),et(r,t,e,n,52,8),e+8}function cr(r){if(r=lr(r).replace(ur,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function lr(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function pr(r){return r<16?"0"+r.toString(16):r.toString(16)}function me(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+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 hr(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function mr(r,t){for(var e,n,i,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Ke(r){return zt(cr(r))}function ye(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 dr(r){return r!==r}function wr(r){return r!=null&&(!!r._isBuffer||je(r)||yr(r))}function je(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function yr(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&je(r.slice(0,0))}function xe(r,t,e,n,i){var o,s,l=i*8-n-1,p=(1<<l)-1,m=p>>1,w=-7,y=e?i-1:0,R=e?-1:1,E=r[t+y];for(y+=R,o=E&(1<<-w)-1,E>>=-w,w+=l;w>0;o=o*256+r[t+y],y+=R,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=n;w>0;s=s*256+r[t+y],y+=R,w-=8);if(o===0)o=1-m;else{if(o===p)return s?NaN:(E?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-m}return(E?-1:1)*s*Math.pow(2,o-n)}function et(r,t,e,n,i,o){var s,l,p,m=o*8-i-1,w=(1<<m)-1,y=w>>1,R=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,ne=n?1:-1,ft=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-s))<1&&(s--,p*=2),s+y>=1?t+=R/p:t+=R*Math.pow(2,1-y),t*p>=2&&(s++,p/=2),s+y>=w?(l=0,s=w):s+y>=1?(l=(t*p-1)*Math.pow(2,i),s=s+y):(l=t*Math.pow(2,y-1)*Math.pow(2,i),s=0));i>=8;r[e+E]=l&255,E+=ne,l/=256,i-=8);for(s=s<<i|l,m+=i;m>0;r[e+E]=s&255,E+=ne,s/=256,m-=8);r[e+E-ne]|=ft*128}var _,N,Vt,Le,Oe,ur,tt=ve(()=>{"use strict";u();c();_=[],N=[],Vt=typeof Uint8Array!="undefined"?Uint8Array:Array,Le=!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,t,e){return Ve(null,r,t,e)};a.kMaxLength=he();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return Jt(null,r,t,e)};a.allocUnsafe=function(r){return Re(null,r)};a.allocUnsafeSlow=function(r){return Re(null,r)};a.isBuffer=wr;a.compare=function(t,e){if(!k(t)||!k(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!k(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Ge;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)J(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)J(this,e,e+3),J(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)J(this,e,e+7),J(this,e+1,e+6),J(this,e+2,e+5),J(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?He(this,0,t):Zt.apply(this,arguments)};a.prototype.equals=function(t){if(!k(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,n,i,o){if(!k(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 s=o-i,l=n-e,p=Math.min(s,l),m=this.slice(i,o),w=t.slice(e,n),y=0;y<p;++y)if(m[y]!==w[y]){s=m[y],l=w[y];break}return s<l?-1:l<s?1:0};a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};a.prototype.indexOf=function(t,e,n){return qe(this,t,e,n,!0)};a.prototype.lastIndexOf=function(t,e,n){return qe(this,t,e,n,!1)};a.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 s=!1;;)switch(i){case"hex":return Kt(this,t,e,n);case"utf8":case"utf-8":return jt(this,t,e,n);case"ascii":return Je(this,t,e,n);case"latin1":case"binary":return er(this,t,e,n);case"base64":return tr(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rr(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Oe=4096;a.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(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||x(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||x(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||x(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||x(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||x(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||x(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||x(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(t,e){e||x(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(t,e){return e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||x(t,4,this.length),xe(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||x(t,4,this.length),xe(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||x(t,8,this.length),xe(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||x(t,8,this.length),xe(this,t,!1,52,8)};a.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;A(this,t,e,n,o,0)}var s=1,l=0;for(this[e]=t&255;++l<n&&(s*=256);)this[e+l]=t/s&255;return e+n};a.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;A(this,t,e,n,o,0)}var s=n-1,l=1;for(this[e+s]=t&255;--s>=0&&(l*=256);)this[e+s]=t/l&255;return e+n};a.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):de(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):de(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):we(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):we(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);A(this,t,e,n,o-1,-o)}var s=0,l=1,p=0;for(this[e]=t&255;++s<n&&(l*=256);)t<0&&p===0&&this[e+s-1]!==0&&(p=1),this[e+s]=(t/l>>0)-p&255;return e+n};a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);A(this,t,e,n,o-1,-o)}var s=n-1,l=1,p=0;for(this[e+s]=t&255;--s>=0&&(l*=256);)t<0&&p===0&&this[e+s+1]!==0&&(p=1),this[e+s]=(t/l>>0)-p&255;return e+n};a.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):de(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):de(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):we(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):we(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,n){return Xe(this,t,e,!0,n)};a.prototype.writeFloatBE=function(t,e,n){return Xe(this,t,e,!1,n)};a.prototype.writeDoubleLE=function(t,e,n){return Ze(this,t,e,!0,n)};a.prototype.writeDoubleBE=function(t,e,n){return Ze(this,t,e,!1,n)};a.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,s;if(this===t&&n<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};a.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"&&!a.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 s;if(typeof t=="number")for(s=e;s<n;++s)this[s]=t;else{var l=k(t)?t:me(new a(t,i).toString()),p=l.length;for(s=0;s<n-e;++s)this[s+e]=l[s%p]}return this};ur=/[^+\/0-9A-Za-z-_]/g});var c=ve(()=>{"use strict";tt()});var Gr={};Se(Gr,{FilePropertyMapper:()=>ke});module.exports=dt(Gr);u();c();u();c();u();c();function H(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();c();u();c();var ge="";var L={};Se(L,{Array:()=>Q,AstNode:()=>h,Attribute:()=>X,Class:()=>P,ClassInstantiation:()=>b,ClassReference:()=>g,CodeBlock:()=>T,DataClass:()=>K,Enum:()=>j,Field:()=>ee,Map:()=>te,Method:()=>M,MethodInvocation:()=>F,Parameter:()=>U,Trait:()=>Z,Type:()=>I,TypeLiteral:()=>z,Writer:()=>O,array:()=>Rr,assignVariable:()=>Yr,attribute:()=>Ir,classReference:()=>br,class_:()=>_r,codeblock:()=>re,dataClass:()=>Cr,enum_:()=>Sr,field:()=>Br,instantiateClass:()=>at,invokeMethod:()=>Pr,map:()=>Mr,mergeArrays:()=>Vr,method:()=>Fr,parameter:()=>Dr,string:()=>Wr,ternary:()=>$r,this_:()=>zr,throwException:()=>Ur,trait:()=>kr,variable:()=>Or});u();c();u();c();u();c();var B=class{};u();c();u();c();var Y=class extends B{constructor(e){super();f(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var xr=4,ae=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
- `),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
1
+ "use strict";var ce=Object.defineProperty,ct=Object.defineProperties,lt=Object.getOwnPropertyDescriptor,pt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertyNames,be=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable;var Ee=(r,t,e)=>t in r?ce(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,le=(r,t)=>{for(var e in t||(t={}))Se.call(t,e)&&Ee(r,e,t[e]);if(be)for(var e of be(t))mt.call(t,e)&&Ee(r,e,t[e]);return r},pe=(r,t)=>ct(r,pt(t));var ve=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ce=(r,t)=>{for(var e in t)ce(r,e,{get:t[e],enumerable:!0})},dt=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ht(t))!Se.call(r,n)&&n!==e&&ce(r,n,{get:()=>t[n],enumerable:!(i=lt(t,n))||i.enumerable});return r};var wt=r=>dt(ce({},"__esModule",{value:!0}),r);var f=(r,t,e)=>Ee(r,typeof t!="symbol"?t+"":t,e);function Be(){throw new Error("setTimeout has not been defined")}function Ue(){throw new Error("clearTimeout has not been defined")}function Me(r){if(D===setTimeout)return setTimeout(r,0);if((D===Be||!D)&&setTimeout)return D=setTimeout,setTimeout(r,0);try{return D(r,0)}catch(t){try{return D.call(null,r,0)}catch(e){return D.call(this,r,0)}}}function yt(r){if($===clearTimeout)return clearTimeout(r);if(($===Ue||!$)&&clearTimeout)return $=clearTimeout,clearTimeout(r);try{return $(r)}catch(t){try{return $.call(null,r)}catch(e){return $.call(this,r)}}}function xt(){!se||!q||(se=!1,q.length?S=q.concat(S):he=-1,S.length&&Fe())}function Fe(){if(!se){var r=Me(xt);se=!0;for(var t=S.length;t;){for(q=S,S=[];++he<t;)q&&q[he].run();he=-1,t=S.length}q=null,se=!1,yt(r)}}function gt(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];S.push(new De(r,t)),S.length===1&&!se&&Me(Fe)}function De(r,t){this.fun=r,this.array=t}function J(){}function Mt(r){throw new Error("process.binding is not supported")}function Ft(){return"/"}function Dt(r){throw new Error("process.chdir is not supported")}function $t(){return 0}function Ot(r){var t=Yt.call(oe)*.001,e=Math.floor(t),i=Math.floor(t%1*1e9);return r&&(e=e-r[0],i=i-r[1],i<0&&(e--,i+=1e9)),[e,i]}function Vt(){var r=new Date,t=r-Wt;return t/1e3}var D,$,S,se,q,he,Tt,At,Et,vt,Nt,Lt,Rt,It,_t,kt,bt,St,Ct,Pt,Bt,Ut,oe,Yt,Wt,d,Pe,u=ve(()=>{"use strict";D=Be,$=Ue;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&($=clearTimeout);S=[],se=!1,he=-1;De.prototype.run=function(){this.fun.apply(null,this.array)};Tt="browser",At="browser",Et=!0,vt={},Nt=[],Lt="",Rt={},It={},_t={};kt=J,bt=J,St=J,Ct=J,Pt=J,Bt=J,Ut=J;oe=globalThis.performance||{},Yt=oe.now||oe.mozNow||oe.msNow||oe.oNow||oe.webkitNow||function(){return new Date().getTime()};Wt=new Date;d={nextTick:gt,title:Tt,browser:Et,env:vt,argv:Nt,version:Lt,versions:Rt,on:kt,addListener:bt,once:St,off:Ct,removeListener:Pt,removeAllListeners:Bt,emit:Ut,binding:Mt,cwd:Ft,chdir:Dt,umask:$t,hrtime:Ot,platform:At,release:It,config:_t,uptime:Vt},Pe={};Object.keys(Pe).forEach(r=>{let t=r.split("."),e=d;for(let i=0;i<t.length;i++){let n=t[i];i===t.length-1?e[n]=Pe[r]:e=e[n]||(e[n]={})}})});function We(){Le=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)_[t]=r[t],N[r.charCodeAt(t)]=t;N[45]=62,N[95]=63}function Gt(r){Le||We();var t,e,i,n,o,s,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[l-2]==="="?2:r[l-1]==="="?1:0,s=new zt(l*3/4-o),i=o>0?l-4:l;var p=0;for(t=0,e=0;t<i;t+=4,e+=3)n=N[r.charCodeAt(t)]<<18|N[r.charCodeAt(t+1)]<<12|N[r.charCodeAt(t+2)]<<6|N[r.charCodeAt(t+3)],s[p++]=n>>16&255,s[p++]=n>>8&255,s[p++]=n&255;return o===2?(n=N[r.charCodeAt(t)]<<2|N[r.charCodeAt(t+1)]>>4,s[p++]=n&255):o===1&&(n=N[r.charCodeAt(t)]<<10|N[r.charCodeAt(t+1)]<<4|N[r.charCodeAt(t+2)]>>2,s[p++]=n>>8&255,s[p++]=n&255),s}function qt(r){return _[r>>18&63]+_[r>>12&63]+_[r>>6&63]+_[r&63]}function Jt(r,t,e){for(var i,n=[],o=t;o<e;o+=3)i=(r[o]<<16)+(r[o+1]<<8)+r[o+2],n.push(qt(i));return n.join("")}function $e(r){Le||We();for(var t,e=r.length,i=e%3,n="",o=[],s=16383,l=0,p=e-i;l<p;l+=s)o.push(Jt(r,l,l+s>p?p:l+s));return i===1?(t=r[e-1],n+=_[t>>2],n+=_[t<<4&63],n+="=="):i===2&&(t=(r[e-2]<<8)+r[e-1],n+=_[t>>10],n+=_[t>>4&63],n+=_[t<<2&63],n+="="),o.push(n),o.join("")}function me(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function C(r,t){if(me()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(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 Re(this,r)}return Ve(this,r,t,e)}function Ve(r,t,e,i){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Xt(r,t,e,i):typeof t=="string"?Qt(r,t,e):Zt(r,t)}function ze(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 Ht(r,t,e,i){return ze(t),t<=0?C(r,t):e!==void 0?typeof i=="string"?C(r,t).fill(e,i):C(r,t).fill(e):C(r,t)}function Re(r,t){if(ze(t),r=C(r,t<0?0:Ie(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Qt(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var i=Ge(t,e)|0;r=C(r,i);var n=r.write(t,e);return n!==i&&(r=r.slice(0,n)),r}function Ne(r,t){var e=t.length<0?0:Ie(t.length)|0;r=C(r,e);for(var i=0;i<e;i+=1)r[i]=t[i]&255;return r}function Xt(r,t,e,i){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(i||0))throw new RangeError("'length' is out of bounds");return e===void 0&&i===void 0?t=new Uint8Array(t):i===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,i),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=Ne(r,t),r}function Zt(r,t){if(k(t)){var e=Ie(t.length)|0;return r=C(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"||wr(t.length)?C(r,0):Ne(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Ne(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Ie(r){if(r>=me())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+me().toString(16)+" bytes");return r|0}function k(r){return!!(r!=null&&r._isBuffer)}function Ge(r,t){if(k(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 i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return de(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Ke(r).length;default:if(i)return de(r).length;t=(""+t).toLowerCase(),i=!0}}function Kt(r,t,e){var i=!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 fr(this,t,e);case"utf8":case"utf-8":return He(this,t,e);case"ascii":return sr(this,t,e);case"latin1":case"binary":return ar(this,t,e);case"base64":return nr(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ur(this,t,e);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function H(r,t,e){var i=r[t];r[t]=r[e],r[e]=i}function qe(r,t,e,i,n){if(r.length===0)return-1;if(typeof e=="string"?(i=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=n?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(n)return-1;e=r.length-1}else if(e<0)if(n)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,i)),k(t))return t.length===0?-1:Ye(r,t,e,i,n);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Ye(r,[t],e,i,n);throw new TypeError("val must be string, number or Buffer")}function Ye(r,t,e,i,n){var o=1,s=r.length,l=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,l/=2,e/=2}function p(E,ne){return o===1?E[ne]:E.readUInt16BE(ne*o)}var m;if(n){var w=-1;for(m=e;m<s;m++)if(p(r,m)===p(t,w===-1?0:m-w)){if(w===-1&&(w=m),m-w+1===l)return w*o}else w!==-1&&(m-=m-w),w=-1}else for(e+l>s&&(e=s-l),m=e;m>=0;m--){for(var y=!0,R=0;R<l;R++)if(p(r,m+R)!==p(t,R)){y=!1;break}if(y)return m}return-1}function jt(r,t,e,i){e=Number(e)||0;var n=r.length-e;i?(i=Number(i),i>n&&(i=n)):i=n;var o=t.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 l=parseInt(t.substr(s*2,2),16);if(isNaN(l))return s;r[e+s]=l}return s}function er(r,t,e,i){return xe(de(t,r.length-e),r,e,i)}function Je(r,t,e,i){return xe(mr(t),r,e,i)}function tr(r,t,e,i){return Je(r,t,e,i)}function rr(r,t,e,i){return xe(Ke(t),r,e,i)}function ir(r,t,e,i){return xe(dr(t,r.length-e),r,e,i)}function nr(r,t,e){return t===0&&e===r.length?$e(r):$e(r.slice(t,e))}function He(r,t,e){e=Math.min(r.length,e);for(var i=[],n=t;n<e;){var o=r[n],s=null,l=o>239?4:o>223?3:o>191?2:1;if(n+l<=e){var p,m,w,y;switch(l){case 1:o<128&&(s=o);break;case 2:p=r[n+1],(p&192)===128&&(y=(o&31)<<6|p&63,y>127&&(s=y));break;case 3:p=r[n+1],m=r[n+2],(p&192)===128&&(m&192)===128&&(y=(o&15)<<12|(p&63)<<6|m&63,y>2047&&(y<55296||y>57343)&&(s=y));break;case 4:p=r[n+1],m=r[n+2],w=r[n+3],(p&192)===128&&(m&192)===128&&(w&192)===128&&(y=(o&15)<<18|(p&63)<<12|(m&63)<<6|w&63,y>65535&&y<1114112&&(s=y))}}s===null?(s=65533,l=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),n+=l}return or(i)}function or(r){var t=r.length;if(t<=Oe)return String.fromCharCode.apply(String,r);for(var e="",i=0;i<t;)e+=String.fromCharCode.apply(String,r.slice(i,i+=Oe));return e}function sr(r,t,e){var i="";e=Math.min(r.length,e);for(var n=t;n<e;++n)i+=String.fromCharCode(r[n]&127);return i}function ar(r,t,e){var i="";e=Math.min(r.length,e);for(var n=t;n<e;++n)i+=String.fromCharCode(r[n]);return i}function fr(r,t,e){var i=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>i)&&(e=i);for(var n="",o=t;o<e;++o)n+=hr(r[o]);return n}function ur(r,t,e){for(var i=r.slice(t,e),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}function x(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 A(r,t,e,i,n,o){if(!k(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(e+i>r.length)throw new RangeError("Index out of range")}function we(r,t,e,i){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(r.length-e,2);n<o;++n)r[e+n]=(t&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}function ye(r,t,e,i){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(r.length-e,4);n<o;++n)r[e+n]=t>>>(i?n:3-n)*8&255}function Qe(r,t,e,i,n,o){if(e+i>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Xe(r,t,e,i,n){return n||Qe(r,t,e,4,34028234663852886e22,-34028234663852886e22),et(r,t,e,i,23,4),e+4}function Ze(r,t,e,i,n){return n||Qe(r,t,e,8,17976931348623157e292,-17976931348623157e292),et(r,t,e,i,52,8),e+8}function lr(r){if(r=pr(r).replace(cr,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function pr(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function hr(r){return r<16?"0"+r.toString(16):r.toString(16)}function de(r,t){t=t||1/0;for(var e,i=r.length,n=null,o=[],s=0;s<i;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!n){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),n=e;continue}e=(n-55296<<10|e-56320)+65536}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=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 mr(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function dr(r,t){for(var e,i,n,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),i=e>>8,n=e%256,o.push(n),o.push(i);return o}function Ke(r){return Gt(lr(r))}function xe(r,t,e,i){for(var n=0;n<i&&!(n+e>=t.length||n>=r.length);++n)t[n+e]=r[n];return n}function wr(r){return r!==r}function yr(r){return r!=null&&(!!r._isBuffer||je(r)||xr(r))}function je(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function xr(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&je(r.slice(0,0))}function ge(r,t,e,i,n){var o,s,l=n*8-i-1,p=(1<<l)-1,m=p>>1,w=-7,y=e?n-1:0,R=e?-1:1,E=r[t+y];for(y+=R,o=E&(1<<-w)-1,E>>=-w,w+=l;w>0;o=o*256+r[t+y],y+=R,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=i;w>0;s=s*256+r[t+y],y+=R,w-=8);if(o===0)o=1-m;else{if(o===p)return s?NaN:(E?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-m}return(E?-1:1)*s*Math.pow(2,o-i)}function et(r,t,e,i,n,o){var s,l,p,m=o*8-n-1,w=(1<<m)-1,y=w>>1,R=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=i?0:o-1,ne=i?1:-1,ut=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-s))<1&&(s--,p*=2),s+y>=1?t+=R/p:t+=R*Math.pow(2,1-y),t*p>=2&&(s++,p/=2),s+y>=w?(l=0,s=w):s+y>=1?(l=(t*p-1)*Math.pow(2,n),s=s+y):(l=t*Math.pow(2,y-1)*Math.pow(2,n),s=0));n>=8;r[e+E]=l&255,E+=ne,l/=256,n-=8);for(s=s<<n|l,m+=n;m>0;r[e+E]=s&255,E+=ne,s/=256,m-=8);r[e+E-ne]|=ut*128}var _,N,zt,Le,Oe,cr,tt=ve(()=>{"use strict";u();c();_=[],N=[],zt=typeof Uint8Array!="undefined"?Uint8Array:Array,Le=!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,t,e){return Ve(null,r,t,e)};a.kMaxLength=me();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return Ht(null,r,t,e)};a.allocUnsafe=function(r){return Re(null,r)};a.allocUnsafeSlow=function(r){return Re(null,r)};a.isBuffer=yr;a.compare=function(t,e){if(!k(t)||!k(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,n=e.length,o=0,s=Math.min(i,n);o<s;++o)if(t[o]!==e[o]){i=t[o],n=e[o];break}return i<n?-1:n<i?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var i;if(e===void 0)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var n=a.allocUnsafe(e),o=0;for(i=0;i<t.length;++i){var s=t[i];if(!k(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n};a.byteLength=Ge;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)H(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)H(this,e,e+3),H(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)H(this,e,e+7),H(this,e+1,e+6),H(this,e+2,e+5),H(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?He(this,0,t):Kt.apply(this,arguments)};a.prototype.equals=function(t){if(!k(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,i,n,o){if(!k(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),e<0||i>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=i)return 0;if(n>=o)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var s=o-n,l=i-e,p=Math.min(s,l),m=this.slice(n,o),w=t.slice(e,i),y=0;y<p;++y)if(m[y]!==w[y]){s=m[y],l=w[y];break}return s<l?-1:l<s?1:0};a.prototype.includes=function(t,e,i){return this.indexOf(t,e,i)!==-1};a.prototype.indexOf=function(t,e,i){return qe(this,t,e,i,!0)};a.prototype.lastIndexOf=function(t,e,i){return qe(this,t,e,i,!1)};a.prototype.write=function(t,e,i,n){if(e===void 0)n="utf8",i=this.length,e=0;else if(i===void 0&&typeof e=="string")n=e,i=this.length,e=0;else if(isFinite(e))e=e|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-e;if((i===void 0||i>o)&&(i=o),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return jt(this,t,e,i);case"utf8":case"utf-8":return er(this,t,e,i);case"ascii":return Je(this,t,e,i);case"latin1":case"binary":return tr(this,t,e,i);case"base64":return rr(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ir(this,t,e,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)}};Oe=4096;a.prototype.slice=function(t,e){var i=this.length;t=~~t,e=e===void 0?i:~~e,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),e<t&&(e=t);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=a.prototype;else{var o=e-t;n=new a(o,void 0);for(var s=0;s<o;++s)n[s]=this[s+t]}return n};a.prototype.readUIntLE=function(t,e,i){t=t|0,e=e|0,i||x(t,e,this.length);for(var n=this[t],o=1,s=0;++s<e&&(o*=256);)n+=this[t+s]*o;return n};a.prototype.readUIntBE=function(t,e,i){t=t|0,e=e|0,i||x(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n};a.prototype.readUInt8=function(t,e){return e||x(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||x(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||x(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||x(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,i){t=t|0,e=e|0,i||x(t,e,this.length);for(var n=this[t],o=1,s=0;++s<e&&(o*=256);)n+=this[t+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n};a.prototype.readIntBE=function(t,e,i){t=t|0,e=e|0,i||x(t,e,this.length);for(var n=e,o=1,s=this[t+--n];n>0&&(o*=256);)s+=this[t+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||x(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||x(t,2,this.length);var i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};a.prototype.readInt16BE=function(t,e){e||x(t,2,this.length);var i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};a.prototype.readInt32LE=function(t,e){return e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||x(t,4,this.length),ge(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||x(t,4,this.length),ge(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||x(t,8,this.length),ge(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||x(t,8,this.length),ge(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,i,n){if(t=+t,e=e|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;A(this,t,e,i,o,0)}var s=1,l=0;for(this[e]=t&255;++l<i&&(s*=256);)this[e+l]=t/s&255;return e+i};a.prototype.writeUIntBE=function(t,e,i,n){if(t=+t,e=e|0,i=i|0,!n){var o=Math.pow(2,8*i)-1;A(this,t,e,i,o,0)}var s=i-1,l=1;for(this[e+s]=t&255;--s>=0&&(l*=256);)this[e+s]=t/l&255;return e+i};a.prototype.writeUInt8=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):we(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):we(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):ye(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ye(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e=e|0,!n){var o=Math.pow(2,8*i-1);A(this,t,e,i,o-1,-o)}var s=0,l=1,p=0;for(this[e]=t&255;++s<i&&(l*=256);)t<0&&p===0&&this[e+s-1]!==0&&(p=1),this[e+s]=(t/l>>0)-p&255;return e+i};a.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e=e|0,!n){var o=Math.pow(2,8*i-1);A(this,t,e,i,o-1,-o)}var s=i-1,l=1,p=0;for(this[e+s]=t&255;--s>=0&&(l*=256);)t<0&&p===0&&this[e+s+1]!==0&&(p=1),this[e+s]=(t/l>>0)-p&255;return e+i};a.prototype.writeInt8=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):we(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):we(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ye(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,i){return t=+t,e=e|0,i||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):ye(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,i){return Xe(this,t,e,!0,i)};a.prototype.writeFloatBE=function(t,e,i){return Xe(this,t,e,!1,i)};a.prototype.writeDoubleLE=function(t,e,i){return Ze(this,t,e,!0,i)};a.prototype.writeDoubleBE=function(t,e,i){return Ze(this,t,e,!1,i)};a.prototype.copy=function(t,e,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i||t.length===0||this.length===0)return 0;if(e<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),t.length-e<n-i&&(n=t.length-e+i);var o=n-i,s;if(this===t&&i<e&&e<n)for(s=o-1;s>=0;--s)t[s+e]=this[s+i];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+o),e);return o};a.prototype.fill=function(t,e,i,n){if(typeof t=="string"){if(typeof e=="string"?(n=e,e=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=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 t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;e=e>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<i;++s)this[s]=t;else{var l=k(t)?t:de(new a(t,n).toString()),p=l.length;for(s=0;s<i-e;++s)this[s+e]=l[s%p]}return this};cr=/[^+\/0-9A-Za-z-_]/g});var c=ve(()=>{"use strict";tt()});var qr={};Ce(qr,{FilePropertyMapper:()=>ke});module.exports=wt(qr);u();c();u();c();u();c();function Q(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();c();u();c();var Te="",rt="self";var L={};Ce(L,{Access:()=>O,Array:()=>X,AstNode:()=>h,Attribute:()=>Z,Class:()=>B,ClassInstantiation:()=>b,ClassReference:()=>g,CodeBlock:()=>T,DataClass:()=>j,Enum:()=>ee,Field:()=>te,Map:()=>re,Method:()=>M,MethodInvocation:()=>F,Parameter:()=>U,Trait:()=>K,Type:()=>I,TypeLiteral:()=>G,Writer:()=>W,array:()=>Ir,assignVariable:()=>Or,attribute:()=>_r,classReference:()=>Sr,class_:()=>kr,codeblock:()=>ie,dataClass:()=>Cr,enum_:()=>Pr,field:()=>Br,instantiateClass:()=>ft,invokeMethod:()=>Ur,map:()=>Fr,mergeArrays:()=>zr,method:()=>Dr,parameter:()=>$r,string:()=>Vr,ternary:()=>Yr,this_:()=>Gr,throwException:()=>Mr,trait:()=>br,variable:()=>Wr});u();c();u();c();u();c();var P=class{};u();c();u();c();var Y=class extends P{constructor(e){super();f(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var gr=4,fe=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
+ `),i=e?t.substring(0,t.length-1):t,n=this.getIndentString(),o=i.replaceAll(`
3
3
  `,`
4
- ${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
5
- `),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new Y(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new Y(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",n,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
4
+ ${n}`);this.isAtStartOfLine()&&(o=n+o),e&&(o+=`
5
+ `),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new Y(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new Y(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",i,n="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),i(),this.dedent()}finally{this.write(n!=null?n:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
6
  `)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
- `)}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 s=t[o];s!=null&&n(s)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
- `)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*xr)}};u();c();function _e(r){return(r==null?void 0:r.name)!=null}u();c();var fe=class extends B{constructor({condition:e,true_:n,false_:i}){super();f(this,"condition");f(this,"true_");f(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_)}};u();c();u();c();u();c();u();c();function rt(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var O=class extends ae{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();f(this,"namespace");f(this,"rootNamespace");f(this,"customConfig");f(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var s,l;if(e.namespace==null)return;if(Object.keys(this.references).filter(p=>{let m=rt(p);return m.namespace!==e.namespace&&m.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===ge?e.name:`${e.namespace}\\${e.name}`;((l=(s=this.references)[i])!=null?l:s[i]=[]).push(e)}toString(){let e=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${e}
7
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:i}){if(t.length>0){let n=t[0];n!=null&&i(n);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&i(s)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
+ `)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*gr)}};u();c();function _e(r){return(r==null?void 0:r.name)!=null}u();c();var ue=class extends P{constructor({condition:e,true_:i,false_:n}){super();f(this,"condition");f(this,"true_");f(this,"false_");this.condition=e,this.true_=i,this.false_=n}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};u();c();u();c();var O={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};u();c();u();c();u();c();function it(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var W=class extends fe{constructor({namespace:e,rootNamespace:i,customConfig:n}){super();f(this,"namespace");f(this,"rootNamespace");f(this,"customConfig");f(this,"references",{});this.namespace=e,this.rootNamespace=i,this.customConfig=n}addReference(e){var s,l;if(e.namespace==null)return;if(Object.keys(this.references).filter(p=>{let m=it(p);return m.namespace!==e.namespace&&m.name===e.name}).length>0){e.requireFullyQualified();return}let n=e.namespace===Te?e.name:`${e.namespace}\\${e.name}`;((l=(s=this.references)[n])!=null?l:s[n]=[]).push(e)}toString(){let e=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${e}
9
9
 
10
- ${n}
10
+ ${i}
11
11
 
12
12
  ${this.buffer}`:e+`
13
13
 
14
- `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>rt(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
15
- `)}};var h=class extends B{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:i}=t,o=new O({namespace:e,rootNamespace:n,customConfig:i});return this.write(o),o.toString()}async toStringAsync({namespace:t,rootNamespace:e,customConfig:n}){let i=new O({namespace:t,rootNamespace:e,customConfig:n});return this.write(i),i.toString()}};var Q=class extends h{constructor({entries:e}){super();f(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("]")}};u();c();var X=class extends h{constructor(e){var n;super();f(this,"reference");f(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(")"))}};u();c();u();c();var g=class extends h{constructor({name:e,namespace:n}){super();f(this,"name");f(this,"namespace");f(this,"fullyQualified");this.name=e,this.namespace=n,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}`)}};u();c();u();c();function W(r){return r.startsWith("$")?r:`$${r}`}var v=class extends h{constructor({docs:e}={}){super();f(this,"docs");f(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(le(ce({},e),{name:e.name!=null?W(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
16
- `).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(`
17
- `):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()}};u();c();u();c();var Te={Public:"public",Private:"private",Protected:"protected"};function V(r){return gr(r,[Te.Public,Te.Protected,Te.Private])}function gr(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var P=class extends h{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:s,traits:l}){super();f(this,"name");f(this,"namespace");f(this,"abstract");f(this,"docs");f(this,"parentClassReference");f(this,"traits");f(this,"fields",[]);f(this,"methods",[]);f(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=s,this.traits=l!=null?l:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new g({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:V(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:V(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({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,s)=>{s===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 v;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()})}};u();c();var Z=class extends h{constructor({name:e,namespace:n,docs:i,traits:o}){super();f(this,"name");f(this,"namespace");f(this,"docs");f(this,"traits");f(this,"fields",[]);f(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:V(this.fields)}),this.writeMethods({writer:e,methods:V(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).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()})}};u();c();u();c();function se({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Tr({writer:r,arguments_:t});return}Ar({writer:r,arguments_:t})}function Tr({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)nt({writer:r,argument:e}),r.writeLine(",");r.dedent(),r.write(")")}function Ar({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),nt({writer:r,argument:e})}),r.write(")")}function nt({writer:r,argument:t}){_e(t)?(r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var b=class extends h{constructor({classReference:e,arguments_:n,multiline:i}){super();f(this,"classReference");f(this,"arguments_");f(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),se({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};u();c();var T=class extends h{constructor(e){super();f(this,"arg");this.arg=e}write(e){return new Y(this.arg).write(e)}};u();c();u();c();var U=class extends h{constructor({name:e,type:n,docs:i,initializer:o,access:s,readonly_:l}){super();f(this,"name");f(this,"type");f(this,"docs");f(this,"initializer");f(this,"access");f(this,"readonly_");this.name=W(e),this.type=n,this.docs=i,this.initializer=o,this.access=s,this.readonly_=l!=null?l:!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")}};u();c();var I=class r extends h{constructor(e){super();f(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(it),e.write("DateTime");break;case"dateTime":e.addReference(it),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{");for(let i of this.internalType.entries)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:i,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.getUniqueTypes({types:this.internalType.types,comment:n,writer:e}).forEach((o,s)=>{s>0&&e.write("|"),o.write(e,{comment:n}),s++});break}case"optional":{let i=this.internalType.value.internalType.type==="mixed",o=this.internalType.value.internalType.type==="union";!o&&!i&&e.write("?"),this.internalType.value.write(e,{comment:n}),o&&(e.write("|"),e.writeNode(r.null()));break}case"reference":e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;default:H(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"}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){return new this({type:"union",types:e})}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 isAlreadyOptional(e){return e.internalType.type==="optional"}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=new Set;return n.filter(s=>{if(i)return!0;let l=s.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig});return o.has(l)?!1:(o.add(l),!0)})}},it=new g({namespace:ge,name:"DateTime"});u();c();function ot(r){return r.startsWith("$")?r.slice(1):r}var st="values",K=class extends h{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:s,traits:l}){super();f(this,"name");f(this,"namespace");f(this,"class_");this.name=e,this.namespace=n,this.class_=new P({name:e,namespace:n,abstract:i,docs:o,parentClassReference:s,traits:l})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=V(this.class_.fields).map(i=>le(ce({},i),{name:ot(i.name)}));n.length>0&&this.class_.addConstructor({access:"public",parameters:this.getConstructorParameters({orderedFields:n}),body:L.codeblock(i=>{for(let o of n)i.write(`$this->${o.name} = $${st}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new U({name:st,type:I.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new T("[]"):void 0})]}};u();c();u();c();var M=class extends h{constructor({name:e,access:n,parameters:i,throws:o,return_:s,body:l,docs:p,classReference:m}){super();f(this,"name");f(this,"access");f(this,"parameters");f(this,"throws");f(this,"return_");f(this,"body");f(this,"docs");f(this,"classReference");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=s,this.body=l,this.docs=p,this.classReference=m}write(e){var n;this.writeComment(e),e.write(`${this.access} function ${this.name}(`),this.parameters.forEach((i,o)=>{o>0&&e.write(", "),i.write(e)}),e.write("): "),this.return_!=null?this.return_.write(e):e.write("void"),e.writeLine(" {"),e.indent(),(n=this.body)==null||n.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new v({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&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:I.reference(i)});e.writeNode(n)}};var j=class extends h{constructor({name:e,namespace:n,backing:i,docs:o,serializable:s}){super();f(this,"name");f(this,"namespace");f(this,"backing");f(this,"docs");f(this,"members",[]);f(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=s!=null?s:!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 g({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members)e.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?e.write(` = "${n.value}"`):e.write(` = ${n.value}`)),e.writeTextStatement("");this.serializable&&(e.newLine(),e.writeNode(new M({name:"jsonSerialize",return_:I.string(),access:"public",parameters:[],body:new T("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).write(e)}};u();c();var ee=class extends h{constructor({name:e,type:n,access:i,readonly_:o,initializer:s,docs:l,inlineDocs:p,attributes:m,inherited:w}){super();f(this,"name");f(this,"type");f(this,"access");f(this,"readonly_");f(this,"initializer");f(this,"docs");f(this,"inlineDocs");f(this,"attributes");f(this,"inherited");this.name=W(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=s,this.docs=l,this.inlineDocs=p,this.attributes=m!=null?m:[],this.inherited=w!=null?w:!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 v;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("]"))}};u();c();var te=class extends h{constructor({entries:e,multiline:n}){super();f(this,"entries");f(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("]")}};u();c();var F=class extends h{constructor({method:e,arguments_:n,static_:i,multiline:o,on:s}){super();f(this,"method");f(this,"arguments_");f(this,"multiline");f(this,"static_");f(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=s}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),se({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};u();c();u();c();var z=class r extends h{constructor(e){super();f(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(vr({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(Er({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
18
- `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}e.write(`'${this.internalType.value.replaceAll("'","\\'")}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:H(this.internalType)}}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new b({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=Lr({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=Nr({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,s]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(s)),e.writeLine(",");e.dedent(),e.write("]")}};function Er({writer:r,value:t}){return new b({classReference:new g({name:"DateTime",namespace:""}),arguments_:[new T(`'${t}'`)]})}function vr({writer:r,value:t}){return new F({on:new g({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new T(`"${t}"`)]})}function Nr({entries:r}){return r.filter(t=>!z.isNop(t.key)&&!z.isNop(t.value))}function Lr({values:r}){return r.filter(t=>!z.isNop(t))}u();c();var Ae=class extends h{constructor(e){super();f(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),se({writer:e,arguments_:this.arrays.map(n=>re(i=>{if(typeof n=="string"||n instanceof h){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Rr(r){return new Q(r)}function Ir(r){return new X(r)}function _r(r){return new P(r)}function kr(r){return new Z(r)}function br(r){return new g(r)}function re(r){return new T(r)}function Cr(r){return new K(r)}function Sr(r){return new j(r)}function Br(r){return new ee(r)}function at(r){return new b(r)}function Pr(r){return new F(r)}function Ur(r){return re(t=>{t.write("throw "),t.writeNode(at(r))})}function Mr(r){return new te(r)}function Fr(r){return new M(r)}function Dr(r){return new U(r)}function $r(r){return new fe(r)}function Yr(r,t){return re(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function Or(r){return re(W(r))}function Wr(r){return re(`"${r}"`)}function Vr(...r){return new Ae(r)}function zr(){return new T(r=>{r.write("$this")})}var ke=class{constructor({context:t}){f(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let s of t.properties)switch(s.type){case"file":n.fileFields.push({name:this.context.getPropertyName(s.name),value:this.getSingleFileProperty({property:s,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(s.name),value:this.getArrayFileProperty({property:s,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(s.name.name),value:this.getBodyProperty({property:s,record:i})});break;default:H(s)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?L.TypeLiteral.nop():L.TypeLiteral.file(n)}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return n==null?L.TypeLiteral.nop():L.TypeLiteral.list({values:n.map(i=>L.TypeLiteral.file(i))})}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?L.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};0&&(module.exports={FilePropertyMapper});
14
+ `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(i=>it(i).namespace!==this.namespace).map(i=>`use ${i};`).join(`
15
+ `)}};var h=class extends P{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:i,customConfig:n}=t,o=new W({namespace:e,rootNamespace:i,customConfig:n});return this.write(o),o.toString()}async toStringAsync({namespace:t,rootNamespace:e,customConfig:i}){let n=new W({namespace:t,rootNamespace:e,customConfig:i});return this.write(n),n.toString()}};var X=class extends h{constructor({entries:e}){super();f(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((i,n)=>{n>0&&e.write(", "),i.write(e)}),e.write("]")}};u();c();var Z=class extends h{constructor(e){var i;super();f(this,"reference");f(this,"arguments");this.reference=e.reference,this.arguments=(i=e.arguments)!=null?i:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((i,n)=>{n>0&&e.write(","),typeof i=="string"?e.write(i):i.write(e)}),e.write(")"))}};u();c();u();c();var g=class extends h{constructor({name:e,namespace:i}){super();f(this,"name");f(this,"namespace");f(this,"fullyQualified");this.name=e,this.namespace=i,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let i=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${i}`)}};u();c();u();c();function V(r){return r.startsWith("$")?r:`$${r}`}var v=class extends h{constructor({docs:e}={}){super();f(this,"docs");f(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(pe(le({},e),{name:e.name!=null?V(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
16
+ `).forEach(i=>{e.writeLine(` * ${i}`)}),this.tags.length>0&&e.writeLine(" *"));for(let i of this.tags)this.writeTag({writer:e,tag:i});e.writeLine(" */")}writeTag({writer:e,tag:i}){let n=i.docs!=null?i.docs.split(`
17
+ `):void 0;n!=null&&n.length>1&&(n.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${i.tagType} `),i.type.write(e,{comment:!0}),i.name!=null&&e.write(` ${i.name}`),n!=null&&n.length===1&&e.write(` ${n[0]}`),e.newLine()}};u();c();function z(r){return Tr(r,[O.Public,O.PublicReadonly,O.Protected,O.Private])}function Tr(r,t){return t.reduce((e,i)=>[...e,...r.filter(n=>n.access===i)],[])}var B=class extends h{constructor({name:e,namespace:i,abstract:n,docs:o,parentClassReference:s,traits:l}){super();f(this,"name");f(this,"namespace");f(this,"abstract");f(this,"docs");f(this,"parentClassReference");f(this,"traits");f(this,"fields",[]);f(this,"methods",[]);f(this,"constructor_");this.name=e,this.namespace=i,this.abstract=n!=null?n:!1,this.docs=o,this.parentClassReference=s,this.traits=l!=null?l:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new g({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((i,n)=>{n>0&&e.write(","),e.writeNode(i)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:z(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:z(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:i}){var n;this.writeConstructorComment({writer:e,constructor:i}),i.access!=null&&e.write(`${i.access} `),e.write("function __construct("),e.indent(),i.parameters.forEach((o,s)=>{s===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(n=i.body)==null||n.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:i}){if(i.parameters.length===0)return;let n=new v;for(let o of i.parameters)n.addTag(o.getCommentTag());n.write(e)}writeFields({writer:e,fields:i}){i.filter(n=>!n.inherited).forEach((n,o)=>{o>0&&e.newLine(),n.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:i}){i.forEach((n,o)=>{o>0&&e.newLine(),n.write(e),e.writeNewLineIfLastLineNot()})}};u();c();var K=class extends h{constructor({name:e,namespace:i,docs:n,traits:o}){super();f(this,"name");f(this,"namespace");f(this,"docs");f(this,"traits");f(this,"fields",[]);f(this,"methods",[]);this.name=e,this.namespace=i,this.docs=n,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((i,n)=>{n>0&&e.write(","),e.writeNode(i)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:z(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:z(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let i=new v({docs:this.docs});for(let n of this.fields)i.addTag({tagType:"property",type:n.type,name:n.name});i.write(e)}writeFields({writer:e,fields:i}){i.forEach((n,o)=>{o>0&&e.newLine(),n.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:i}){i.forEach((n,o)=>{o>0&&e.newLine(),n.write(e),e.writeNewLineIfLastLineNot()})}};u();c();u();c();function ae({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Ar({writer:r,arguments_:t});return}Er({writer:r,arguments_:t})}function Ar({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)nt({writer:r,argument:e}),r.writeLine(",");r.dedent(),r.write(")")}function Er({writer:r,arguments_:t}){r.write("("),t.forEach((e,i)=>{i>0&&r.write(", "),nt({writer:r,argument:e})}),r.write(")")}function nt({writer:r,argument:t}){_e(t)?(r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var b=class extends h{constructor({classReference:e,arguments_:i,multiline:n}){super();f(this,"classReference");f(this,"arguments_");f(this,"multiline");this.classReference=e,this.arguments_=i,this.multiline=n!=null?n:!1}write(e){e.write("new "),e.writeNode(this.classReference),ae({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};u();c();var T=class extends h{constructor(e){super();f(this,"arg");this.arg=e}write(e){return new Y(this.arg).write(e)}};u();c();u();c();var U=class extends h{constructor({name:e,type:i,docs:n,initializer:o,access:s,readonly_:l}){super();f(this,"name");f(this,"type");f(this,"docs");f(this,"initializer");f(this,"access");f(this,"readonly_");this.name=V(e),this.type=i,this.docs=n,this.initializer=o,this.access=s,this.readonly_=l!=null?l:!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")}};u();c();var I=class r extends h{constructor(e){super();f(this,"internalType");this.internalType=e}write(e,{comment:i}={}){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(ot),e.write("DateTime");break;case"dateTime":e.addReference(ot),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!i){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:i}),e.write(">");break;case"map":{if(!i){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:i}),e.write(", "),this.internalType.valueType.write(e,{comment:i}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!i){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");for(let n of this.internalType.entries)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:n,comment:i}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((n,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:n,comment:i})}),e.write("}");break}case"union":{this.getUniqueTypes({types:this.internalType.types,comment:i,writer:e}).forEach((o,s)=>{s>0&&e.write("|"),o.write(e,{comment:i}),s++});break}case"optional":{let n=this.internalType.value.internalType.type==="mixed",o=this.internalType.value.internalType.type==="union";!o&&!n&&e.write("?"),this.internalType.value.write(e,{comment:i}),o&&(e.write("|"),e.writeNode(r.null()));break}case"reference":e.writeNode(this.internalType.value);break;case"enumString":i?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;default:Q(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"}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,i){return new this({type:"map",keyType:e,valueType:i})}static typeDict(e,{multiline:i}={}){return new this({type:"typeDict",entries:e,multiline:i})}static union(e){return new this({type:"union",types:e})}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 isAlreadyOptional(e){return e.internalType.type==="optional"}writeTypeDictEntry({writer:e,entry:i,comment:n}){e.write(i.key),i.optional&&e.write("?"),e.write(": "),i.valueType.write(e,{comment:n})}getUniqueTypes({writer:e,types:i,comment:n}){let o=new Set;return i.filter(s=>{if(n)return!0;let l=s.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig});return o.has(l)?!1:(o.add(l),!0)})}},ot=new g({namespace:Te,name:"DateTime"});u();c();function st(r){return r.startsWith("$")?r.slice(1):r}var at="values",j=class extends h{constructor({name:e,namespace:i,abstract:n,docs:o,parentClassReference:s,traits:l}){super();f(this,"name");f(this,"namespace");f(this,"class_");this.name=e,this.namespace=i,this.class_=new B({name:e,namespace:i,abstract:n,docs:o,parentClassReference:s,traits:l})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let i=z(this.class_.fields).map(n=>pe(le({},n),{name:st(n.name)}));i.length>0&&this.class_.addConstructor({access:"public",parameters:this.getConstructorParameters({orderedFields:i}),body:L.codeblock(n=>{for(let o of i)n.write(`$this->${o.name} = $${at}['${o.name}']`),o.type.isOptional()&&n.write(" ?? null"),n.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new U({name:at,type:I.typeDict(e.map(i=>({key:i.name,valueType:i.type,optional:i.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new T("[]"):void 0})]}};u();c();u();c();var M=class extends h{constructor({name:e,access:i,parameters:n,throws:o,return_:s,body:l,docs:p,classReference:m}){super();f(this,"name");f(this,"access");f(this,"parameters");f(this,"throws");f(this,"return_");f(this,"body");f(this,"docs");f(this,"classReference");this.name=e,this.access=i,this.parameters=n,this.throws=o!=null?o:[],this.return_=s,this.body=l,this.docs=p,this.classReference=m}write(e){var i;this.writeComment(e),e.write(`${this.access} function ${this.name}(`),this.parameters.forEach((n,o)=>{o>0&&e.write(", "),n.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(i=this.body)==null||i.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let i=new v({docs:this.docs});for(let n of this.parameters)i.addTag({tagType:"param",type:n.type,name:n.name,docs:n.docs});this.return_!=null&&this.return_!==rt&&i.addTag({tagType:"return",type:this.return_});for(let n of this.throws)i.addTag({tagType:"throws",type:I.reference(n)});e.writeNode(i)}};var ee=class extends h{constructor({name:e,namespace:i,backing:n,docs:o,serializable:s}){super();f(this,"name");f(this,"namespace");f(this,"backing");f(this,"docs");f(this,"members",[]);f(this,"serializable");this.name=e,this.namespace=i,this.backing=n,this.docs=o,this.serializable=s!=null?s:!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 g({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let i of this.members)e.write(`case ${i.name}`),i.value!=null&&(typeof i.value=="string"?e.write(` = "${i.value}"`):e.write(` = ${i.value}`)),e.writeTextStatement("");this.serializable&&(e.newLine(),e.writeNode(new M({name:"jsonSerialize",return_:I.string(),access:"public",parameters:[],body:new T("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).write(e)}};u();c();var te=class extends h{constructor({name:e,type:i,access:n,readonly_:o,initializer:s,docs:l,inlineDocs:p,attributes:m,inherited:w}){super();f(this,"name");f(this,"type");f(this,"access");f(this,"readonly_");f(this,"initializer");f(this,"docs");f(this,"inlineDocs");f(this,"attributes");f(this,"inherited");this.name=V(e),this.type=i,this.access=n,this.readonly_=o!=null?o:!1,this.initializer=s,this.docs=l,this.inlineDocs=p,this.attributes=m!=null?m:[],this.inherited=w!=null?w:!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 i=new v;i.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),i.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((i,n)=>{n>0&&e.write(", "),i.write(e)}),e.writeLine("]"))}};u();c();var re=class extends h{constructor({entries:e,multiline:i}){super();f(this,"entries");f(this,"multiline");this.entries=e!=null?e:[],this.multiline=i!=null?i:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:i,value:n}of this.entries)i.write(e),e.write(" => "),n.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[i,{key:n,value:o}]of this.entries.entries())i>0&&e.write(", "),n.write(e),e.write(" => "),o.write(e);e.write("]")}};u();c();var F=class extends h{constructor({method:e,arguments_:i,static_:n,multiline:o,on:s}){super();f(this,"method");f(this,"arguments_");f(this,"multiline");f(this,"static_");f(this,"on");this.method=e,this.arguments_=i,this.static_=n!=null?n:!1,this.multiline=o!=null?o:!1,this.on=s}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),ae({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};u();c();u();c();var G=class r extends h{constructor(e){super();f(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(Nr({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(vr({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
18
+ `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}e.write(`'${this.internalType.value.replaceAll("'","\\'")}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:Q(this.internalType)}}writeStringWithHeredoc({writer:e,value:i}){e.writeLine("<<<EOT"),e.writeNoIndent(i),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:i}){e.writeNode(new b({classReference:i.reference,arguments_:[r.map({entries:i.fields.map(n=>({key:r.string(n.name),value:n.value}))})]}))}writeList({writer:e,list:i}){let n=Rr({values:i.values});if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of n)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:i}){let n=Lr({entries:i.entries});if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of n)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:i}){return new this({type:"class",reference:e,fields:i})}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:i}){switch(typeof i){case"boolean":e.write(i.toString());return;case"string":e.write(i.includes('"')?`\`${i}\``:`"${i}"`);return;case"number":e.write(i.toString());return;case"object":if(i==null){e.write("null");return}if(Array.isArray(i)){this.writeUnknownArray({writer:e,value:i});return}this.writeUnknownMap({writer:e,value:i});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof i}`)}}writeUnknownArray({writer:e,value:i}){if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let n of i)e.writeNode(r.unknown(n)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:i}){let n=Object.entries(i);if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,s]of n)e.write(`'${o}' => `),e.writeNode(r.unknown(s)),e.writeLine(",");e.dedent(),e.write("]")}};function vr({writer:r,value:t}){return new b({classReference:new g({name:"DateTime",namespace:""}),arguments_:[new T(`'${t}'`)]})}function Nr({writer:r,value:t}){return new F({on:new g({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new T(`"${t}"`)]})}function Lr({entries:r}){return r.filter(t=>!G.isNop(t.key)&&!G.isNop(t.value))}function Rr({values:r}){return r.filter(t=>!G.isNop(t))}u();c();var Ae=class extends h{constructor(e){super();f(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),ae({writer:e,arguments_:this.arrays.map(i=>ie(n=>{if(typeof i=="string"||i instanceof h){n.writeNodeOrString(i);return}n.writeNodeOrString(i.ref),i.fallback&&(n.write(" ?? "),n.writeNodeOrString(i.fallback))}))})}};function Ir(r){return new X(r)}function _r(r){return new Z(r)}function kr(r){return new B(r)}function br(r){return new K(r)}function Sr(r){return new g(r)}function ie(r){return new T(r)}function Cr(r){return new j(r)}function Pr(r){return new ee(r)}function Br(r){return new te(r)}function ft(r){return new b(r)}function Ur(r){return new F(r)}function Mr(r){return ie(t=>{t.write("throw "),t.writeNode(ft(r))})}function Fr(r){return new re(r)}function Dr(r){return new M(r)}function $r(r){return new U(r)}function Yr(r){return new ue(r)}function Or(r,t){return ie(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function Wr(r){return ie(V(r))}function Vr(r){return ie(`"${r}"`)}function zr(...r){return new Ae(r)}function Gr(){return new T(r=>{r.write("$this")})}var ke=class{constructor({context:t}){f(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let i={fileFields:[],bodyPropertyFields:[]},n=(o=this.context.getRecord(e))!=null?o:{};for(let s of t.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:Q(s)}return i}getSingleFileProperty({property:t,record:e}){let i=this.context.getSingleFileValue({property:t,record:e});return i==null?L.TypeLiteral.nop():L.TypeLiteral.file(i)}getArrayFileProperty({property:t,record:e}){let i=this.context.getFileArrayValues({property:t,record:e});return i==null?L.TypeLiteral.nop():L.TypeLiteral.list({values:i.map(n=>L.TypeLiteral.file(n))})}getBodyProperty({property:t,record:e}){let i=e[t.name.wireValue];return i==null?L.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:i})}};0&&(module.exports={FilePropertyMapper});
19
19
  /*! Bundled license information:
20
20
 
21
21
  @esbuild-plugins/node-globals-polyfill/Buffer.js: