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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +8 -8
  2. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  3. package/cjs/{DynamicSnippetsGeneratorContext-jAUczdEu.d.cts → DynamicSnippetsGeneratorContext-7JXlOyjB.d.cts} +3 -0
  4. package/cjs/EndpointSnippetGenerator.cjs +8 -8
  5. package/cjs/EndpointSnippetGenerator.d.cts +1 -1
  6. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +7 -7
  7. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  8. package/cjs/context/DynamicTypeLiteralMapper.cjs +10 -10
  9. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  10. package/cjs/context/FilePropertyMapper.cjs +11 -11
  11. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  12. package/cjs/index.cjs +22 -22
  13. package/cjs/index.d.cts +1 -1
  14. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  15. package/esm/DynamicSnippetsGenerator.js +1 -1
  16. package/esm/{DynamicSnippetsGeneratorContext-jAUczdEu.d.ts → DynamicSnippetsGeneratorContext-7JXlOyjB.d.ts} +3 -0
  17. package/esm/EndpointSnippetGenerator.d.ts +1 -1
  18. package/esm/EndpointSnippetGenerator.js +1 -1
  19. package/esm/{chunk-HHDXN7HB.js → chunk-2MVLIJOX.js} +1 -1
  20. package/esm/{chunk-ZDJ3DR2Z.js → chunk-6U4ZJ2VA.js} +1 -1
  21. package/esm/{chunk-HG5P4KWD.js → chunk-AEXR2D5H.js} +1 -1
  22. package/esm/chunk-ESPGWZRY.js +3 -0
  23. package/esm/{chunk-NXDI62IP.js → chunk-H4KXMOP7.js} +1 -1
  24. package/esm/chunk-JCUQ3FQP.js +28 -0
  25. package/esm/chunk-NXBUWG6C.js +1 -0
  26. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  27. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  28. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  29. package/esm/context/DynamicTypeLiteralMapper.js +1 -1
  30. package/esm/context/FilePropertyMapper.d.ts +1 -1
  31. package/esm/context/FilePropertyMapper.js +1 -1
  32. package/esm/index.d.ts +1 -1
  33. package/esm/index.js +1 -1
  34. package/package.json +2 -2
  35. package/esm/chunk-JFJ3XGKL.js +0 -1
  36. package/esm/chunk-KYYOS3EX.js +0 -3
  37. package/esm/chunk-LHXTVBUM.js +0 -28
package/cjs/index.cjs CHANGED
@@ -1,35 +1,35 @@
1
- "use strict";var Np=Object.create;var cr=Object.defineProperty,Fp=Object.defineProperties,Cp=Object.getOwnPropertyDescriptor,Op=Object.getOwnPropertyDescriptors,Lp=Object.getOwnPropertyNames,jr=Object.getOwnPropertySymbols,Bp=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable;var zt=(t,e,r)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))Vt.call(e,r)&&zt(t,r,e[r]);if(jr)for(var r of jr(e))To.call(e,r)&&zt(t,r,e[r]);return t},Ge=(t,e)=>Fp(t,Op(e));var Ro=t=>typeof t=="symbol"?t:t+"",Po=(t,e)=>{var r={};for(var n in t)Vt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&jr)for(var n of jr(t))e.indexOf(n)<0&&To.call(t,n)&&(r[n]=t[n]);return r};var ze=(t,e)=>()=>(t&&(e=t(t=0)),e);var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yt=(t,e)=>{for(var r in e)cr(t,r,{get:e[r],enumerable:!0})},Io=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Lp(e))!Vt.call(t,o)&&o!==r&&cr(t,o,{get:()=>e[o],enumerable:!(n=Cp(e,o))||n.enumerable});return t};var Up=(t,e,r)=>(r=t!=null?Np(Bp(t)):{},Io(e||!t||!t.__esModule?cr(r,"default",{value:t,enumerable:!0}):r,t)),No=t=>Io(cr({},"__esModule",{value:!0}),t);var d=(t,e,r)=>zt(t,typeof e!="symbol"?e+"":e,r);function Co(){throw new Error("setTimeout has not been defined")}function Oo(){throw new Error("clearTimeout has not been defined")}function Lo(t){if(fe===setTimeout)return setTimeout(t,0);if((fe===Co||!fe)&&setTimeout)return fe=setTimeout,setTimeout(t,0);try{return fe(t,0)}catch(e){try{return fe.call(null,t,0)}catch(r){return fe.call(this,t,0)}}}function qp(t){if(pe===clearTimeout)return clearTimeout(t);if((pe===Oo||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(t);try{return pe(t)}catch(e){try{return pe.call(null,t)}catch(r){return pe.call(this,t)}}}function $p(){!Ye||!Se||(Ye=!1,Se.length?Z=Se.concat(Z):Gr=-1,Z.length&&Bo())}function Bo(){if(!Ye){var t=Lo($p);Ye=!0;for(var e=Z.length;e;){for(Se=Z,Z=[];++Gr<e;)Se&&Se[Gr].run();Gr=-1,e=Z.length}Se=null,Ye=!1,qp(t)}}function kp(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Z.push(new Uo(t,e)),Z.length===1&&!Ye&&Lo(Bo)}function Uo(t,e){this.fun=t,this.array=e}function Ee(){}function rl(t){throw new Error("process.binding is not supported")}function tl(){return"/"}function nl(t){throw new Error("process.chdir is not supported")}function ol(){return 0}function al(t){var e=il.call(Ve)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function ul(){var t=new Date,e=t-sl;return e/1e3}var fe,pe,Z,Ye,Se,Gr,_p,Mp,Dp,Wp,jp,Gp,zp,Vp,Yp,Hp,Jp,Kp,Zp,Qp,Xp,el,Ve,il,sl,l,Fo,a=ze(()=>{"use strict";fe=Co,pe=Oo;typeof globalThis.setTimeout=="function"&&(fe=setTimeout);typeof globalThis.clearTimeout=="function"&&(pe=clearTimeout);Z=[],Ye=!1,Gr=-1;Uo.prototype.run=function(){this.fun.apply(null,this.array)};_p="browser",Mp="browser",Dp=!0,Wp={},jp=[],Gp="",zp={},Vp={},Yp={};Hp=Ee,Jp=Ee,Kp=Ee,Zp=Ee,Qp=Ee,Xp=Ee,el=Ee;Ve=globalThis.performance||{},il=Ve.now||Ve.mozNow||Ve.msNow||Ve.oNow||Ve.webkitNow||function(){return new Date().getTime()};sl=new Date;l={nextTick:kp,title:_p,browser:Dp,env:Wp,argv:jp,version:Gp,versions:zp,on:Hp,addListener:Jp,once:Kp,off:Zp,removeListener:Qp,removeAllListeners:Xp,emit:el,binding:rl,cwd:tl,chdir:nl,umask:ol,hrtime:al,platform:Mp,release:Vp,config:Yp,uptime:ul},Fo={};Object.keys(Fo).forEach(t=>{let e=t.split("."),r=l;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?r[o]=Fo[t]:r=r[o]||(r[o]={})}})});function _o(){Jt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)W[e]=t[e],_[t.charCodeAt(e)]=e;_[45]=62,_[95]=63}function pl(t){Jt||_o();var e,r,n,o,i,u,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[p-2]==="="?2:t[p-1]==="="?1:0,u=new fl(p*3/4-i),n=i>0?p-4:p;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)o=_[t.charCodeAt(e)]<<18|_[t.charCodeAt(e+1)]<<12|_[t.charCodeAt(e+2)]<<6|_[t.charCodeAt(e+3)],u[c++]=o>>16&255,u[c++]=o>>8&255,u[c++]=o&255;return i===2?(o=_[t.charCodeAt(e)]<<2|_[t.charCodeAt(e+1)]>>4,u[c++]=o&255):i===1&&(o=_[t.charCodeAt(e)]<<10|_[t.charCodeAt(e+1)]<<4|_[t.charCodeAt(e+2)]>>2,u[c++]=o>>8&255,u[c++]=o&255),u}function ll(t){return W[t>>18&63]+W[t>>12&63]+W[t>>6&63]+W[t&63]}function cl(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(ll(n));return o.join("")}function qo(t){Jt||_o();for(var e,r=t.length,n=r%3,o="",i=[],u=16383,p=0,c=r-n;p<c;p+=u)i.push(cl(t,p,p+u>c?c:p+u));return n===1?(e=t[r-1],o+=W[e>>2],o+=W[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=W[e>>10],o+=W[e>>4&63],o+=W[e<<2&63],o+="="),i.push(o),i.join("")}function zr(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Q(t,e){if(zr()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(t===null&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Kt(this,t)}return Mo(this,t,e,r)}function Mo(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?ml(t,e,r,n):typeof e=="string"?yl(t,e,r):hl(t,e)}function Do(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function dl(t,e,r,n){return Do(e),e<=0?Q(t,e):r!==void 0?typeof n=="string"?Q(t,e).fill(r,n):Q(t,e).fill(r):Q(t,e)}function Kt(t,e){if(Do(e),t=Q(t,e<0?0:Zt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function yl(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Wo(e,r)|0;t=Q(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function Ht(t,e){var r=e.length<0?0:Zt(e.length)|0;t=Q(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function ml(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=Ht(t,e),t}function hl(t,e){if(j(e)){var r=Zt(e.length)|0;return t=Q(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Ul(e.length)?Q(t,0):Ht(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ht(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Zt(t){if(t>=zr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zr().toString(16)+" bytes");return t|0}function j(t){return!!(t!=null&&t._isBuffer)}function Wo(t,e){if(j(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Vr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Jo(t).length;default:if(n)return Vr(t).length;e=(""+e).toLowerCase(),n=!0}}function gl(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return Pl(this,e,r);case"utf8":case"utf-8":return zo(this,e,r);case"ascii":return Tl(this,e,r);case"latin1":case"binary":return Rl(this,e,r);case"base64":return Sl(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Il(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Te(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function jo(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),j(e))return e.length===0?-1:$o(t,e,r,n,o);if(typeof e=="number")return e=e&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):$o(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function $o(t,e,r,n,o){var i=1,u=t.length,p=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,u/=2,p/=2,r/=2}function c(b,T){return i===1?b[T]:b.readUInt16BE(T*i)}var y;if(o){var h=-1;for(y=r;y<u;y++)if(c(t,y)===c(e,h===-1?0:y-h)){if(h===-1&&(h=y),y-h+1===p)return h*i}else h!==-1&&(y-=y-h),h=-1}else for(r+p>u&&(r=u-p),y=r;y>=0;y--){for(var g=!0,v=0;v<p;v++)if(c(t,y+v)!==c(e,v)){g=!1;break}if(g)return y}return-1}function xl(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var p=parseInt(e.substr(u*2,2),16);if(isNaN(p))return u;t[r+u]=p}return u}function vl(t,e,r,n){return Jr(Vr(e,t.length-r),t,r,n)}function Go(t,e,r,n){return Jr(Ll(e),t,r,n)}function wl(t,e,r,n){return Go(t,e,r,n)}function bl(t,e,r,n){return Jr(Jo(e),t,r,n)}function Al(t,e,r,n){return Jr(Bl(e,t.length-r),t,r,n)}function Sl(t,e,r){return e===0&&r===t.length?qo(t):qo(t.slice(e,r))}function zo(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],u=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var c,y,h,g;switch(p){case 1:i<128&&(u=i);break;case 2:c=t[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(u=g));break;case 3:c=t[o+1],y=t[o+2],(c&192)===128&&(y&192)===128&&(g=(i&15)<<12|(c&63)<<6|y&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=t[o+1],y=t[o+2],h=t[o+3],(c&192)===128&&(y&192)===128&&(h&192)===128&&(g=(i&15)<<18|(c&63)<<12|(y&63)<<6|h&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=p}return El(n)}function El(t){var e=t.length;if(e<=ko)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=ko));return r}function Tl(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function Rl(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function Pl(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=Ol(t[i]);return o}function Il(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function N(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,r,n,o,i){if(!j(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Yr(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function Hr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>(n?o:3-o)*8&255}function Vo(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Yo(t,e,r,n,o){return o||Vo(t,e,r,4,34028234663852886e22,-34028234663852886e22),Zo(t,e,r,n,23,4),r+4}function Ho(t,e,r,n,o){return o||Vo(t,e,r,8,17976931348623157e292,-17976931348623157e292),Zo(t,e,r,n,52,8),r+8}function Fl(t){if(t=Cl(t).replace(Nl,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Cl(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ol(t){return t<16?"0"+t.toString(16):t.toString(16)}function Vr(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(u+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function Ll(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Bl(t,e){for(var r,n,o,i=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function Jo(t){return pl(Fl(t))}function Jr(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Ul(t){return t!==t}function ql(t){return t!=null&&(!!t._isBuffer||Ko(t)||$l(t))}function Ko(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function $l(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Ko(t.slice(0,0))}function Kr(t,e,r,n,o){var i,u,p=o*8-n-1,c=(1<<p)-1,y=c>>1,h=-7,g=r?o-1:0,v=r?-1:1,b=t[e+g];for(g+=v,i=b&(1<<-h)-1,b>>=-h,h+=p;h>0;i=i*256+t[e+g],g+=v,h-=8);for(u=i&(1<<-h)-1,i>>=-h,h+=n;h>0;u=u*256+t[e+g],g+=v,h-=8);if(i===0)i=1-y;else{if(i===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-y}return(b?-1:1)*u*Math.pow(2,i-n)}function Zo(t,e,r,n,o,i){var u,p,c,y=i*8-o-1,h=(1<<y)-1,g=h>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,T=n?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?e+=v/c:e+=v*Math.pow(2,1-g),e*c>=2&&(u++,c/=2),u+g>=h?(p=0,u=h):u+g>=1?(p=(e*c-1)*Math.pow(2,o),u=u+g):(p=e*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;t[r+b]=p&255,b+=T,p/=256,o-=8);for(u=u<<o|p,y+=o;y>0;t[r+b]=u&255,b+=T,u/=256,y-=8);t[r+b-T]|=R*128}var W,_,fl,Jt,ko,Nl,Qo=ze(()=>{"use strict";a();s();W=[],_=[],fl=typeof Uint8Array!="undefined"?Uint8Array:Array,Jt=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(t){return t.__proto__=f.prototype,t};f.from=function(t,e,r){return Mo(null,t,e,r)};f.kMaxLength=zr();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(t,e,r){return dl(null,t,e,r)};f.allocUnsafe=function(t){return Kt(null,t)};f.allocUnsafeSlow=function(t){return Kt(null,t)};f.isBuffer=ql;f.compare=function(e,r){if(!j(e)||!j(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,u=Math.min(n,o);i<u;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=f.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var u=e[n];if(!j(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,i),i+=u.length}return o};f.byteLength=Wo;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)Te(this,r,r+1);return this};f.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)Te(this,r,r+3),Te(this,r+1,r+2);return this};f.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)Te(this,r,r+7),Te(this,r+1,r+6),Te(this,r+2,r+5),Te(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?zo(this,0,e):gl.apply(this,arguments)};f.prototype.equals=function(e){if(!j(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.compare=function(e,r,n,o,i){if(!j(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var u=i-o,p=n-r,c=Math.min(u,p),y=this.slice(o,i),h=e.slice(r,n),g=0;g<c;++g)if(y[g]!==h[g]){u=y[g],p=h[g];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return jo(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return jo(this,e,r,n,!1)};f.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return xl(this,e,r,n);case"utf8":case"utf-8":return vl(this,e,r,n);case"ascii":return Go(this,e,r,n);case"latin1":case"binary":return wl(this,e,r,n);case"base64":return bl(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Al(this,e,r,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ko=4096;f.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(f.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=f.prototype;else{var i=r-e;o=new f(i,void 0);for(var u=0;u<i;++u)o[u]=this[u+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||N(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||N(e,r,this.length);for(var o=this[e+--r],i=1;r>0&&(i*=256);)o+=this[e+--r]*i;return o};f.prototype.readUInt8=function(e,r){return r||N(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||N(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||N(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUInt32BE=function(e,r){return r||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||N(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};f.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||N(e,r,this.length);for(var o=r,i=1,u=this[e+--o];o>0&&(i*=256);)u+=this[e+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*r)),u};f.prototype.readInt8=function(e,r){return r||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,r){r||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,r){return r||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,r){return r||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readFloatLE=function(e,r){return r||N(e,4,this.length),Kr(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||N(e,4,this.length),Kr(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||N(e,8,this.length),Kr(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||N(e,8,this.length),Kr(this,e,!1,52,8)};f.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;q(this,e,r,n,i,0)}var u=1,p=0;for(this[r]=e&255;++p<n&&(u*=256);)this[r+p]=e/u&255;return r+n};f.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;q(this,e,r,n,i,0)}var u=n-1,p=1;for(this[r+u]=e&255;--u>=0&&(p*=256);)this[r+u]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};f.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Yr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Yr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):Hr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Hr(this,e,r,!1),r+4};f.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);q(this,e,r,n,i-1,-i)}var u=0,p=1,c=0;for(this[r]=e&255;++u<n&&(p*=256);)e<0&&c===0&&this[r+u-1]!==0&&(c=1),this[r+u]=(e/p>>0)-c&255;return r+n};f.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);q(this,e,r,n,i-1,-i)}var u=n-1,p=1,c=0;for(this[r+u]=e&255;--u>=0&&(p*=256);)e<0&&c===0&&this[r+u+1]!==0&&(c=1),this[r+u]=(e/p>>0)-c&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};f.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):Yr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):Yr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):Hr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||q(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):Hr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return Yo(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return Yo(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return Ho(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return Ho(this,e,r,!1,n)};f.prototype.copy=function(e,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n,u;if(this===e&&n<r&&r<o)for(u=i-1;u>=0;--u)e[u+r]=this[u+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<i;++u)e[u+r]=this[u+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i};f.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!f.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var u;if(typeof e=="number")for(u=r;u<n;++u)this[u]=e;else{var p=j(e)?e:Vr(new f(e,o).toString()),c=p.length;for(u=0;u<n-r;++u)this[u+r]=p[u%c]}return this};Nl=/[^+\/0-9A-Za-z-_]/g});var s=ze(()=>{"use strict";Qo()});var ri=m((Gx,ei)=>{"use strict";a();s();var kl="Function.prototype.bind called on incompatible ",_l=Object.prototype.toString,Ml=Math.max,Dl="[object Function]",Xo=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},Wl=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},jl=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};ei.exports=function(e){var r=this;if(typeof r!="function"||_l.apply(r)!==Dl)throw new TypeError(kl+r);for(var n=Wl(arguments,1),o,i=function(){if(this instanceof o){var h=r.apply(this,Xo(n,arguments));return Object(h)===h?h:this}return r.apply(e,Xo(n,arguments))},u=Ml(0,r.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(o=Function("binder","return function ("+jl(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var y=function(){};y.prototype=r.prototype,o.prototype=new y,y.prototype=null}return o}});var Re=m((Yx,ti)=>{"use strict";a();s();var Gl=ri();ti.exports=Function.prototype.bind||Gl});var Qt=m((Kx,ni)=>{"use strict";a();s();ni.exports=Error});var Xt=m((Xx,oi)=>{"use strict";a();s();oi.exports=EvalError});var en=m((t0,ii)=>{"use strict";a();s();ii.exports=RangeError});var rn=m((i0,ai)=>{"use strict";a();s();ai.exports=ReferenceError});var Zr=m((u0,si)=>{"use strict";a();s();si.exports=SyntaxError});var I=m((l0,ui)=>{"use strict";a();s();ui.exports=TypeError});var tn=m((y0,fi)=>{"use strict";a();s();fi.exports=URIError});var li=m((g0,pi)=>{"use strict";a();s();pi.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0}});var nn=m((w0,di)=>{"use strict";a();s();var ci=typeof Symbol!="undefined"&&Symbol,zl=li();di.exports=function(){return typeof ci!="function"||typeof Symbol!="function"||typeof ci("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zl()}});var mi=m((S0,yi)=>{"use strict";a();s();var on={__proto__:null,foo:{}},Vl=Object;yi.exports=function(){return{__proto__:on}.foo===on.foo&&!(on instanceof Vl)}});var an=m((R0,hi)=>{"use strict";a();s();var Yl=Function.prototype.call,Hl=Object.prototype.hasOwnProperty,Jl=Re();hi.exports=Jl.call(Yl,Hl)});var G=m((N0,bi)=>{"use strict";a();s();var A,Kl=Qt(),Zl=Xt(),Ql=en(),Xl=rn(),Ze=Zr(),Ke=I(),ec=tn(),wi=Function,sn=function(t){try{return wi('"use strict"; return ('+t+").constructor;")()}catch(e){}},Pe=Object.getOwnPropertyDescriptor;if(Pe)try{Pe({},"")}catch(t){Pe=null}var un=function(){throw new Ke},rc=Pe?function(){try{return arguments.callee,un}catch(t){try{return Pe(arguments,"callee").get}catch(e){return un}}}():un,He=nn()(),tc=mi()(),F=Object.getPrototypeOf||(tc?function(t){return t.__proto__}:null),Je={},nc=typeof Uint8Array=="undefined"||!F?A:F(Uint8Array),Ie={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":He&&F?F([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%Atomics%":typeof Atomics=="undefined"?A:Atomics,"%BigInt%":typeof BigInt=="undefined"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Kl,"%eval%":eval,"%EvalError%":Zl,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":wi,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&F?F(F([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!He||!F?A:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":Ql,"%ReferenceError%":Xl,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!He||!F?A:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&F?F(""[Symbol.iterator]()):A,"%Symbol%":He?Symbol:A,"%SyntaxError%":Ze,"%ThrowTypeError%":rc,"%TypedArray%":nc,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array=="undefined"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?A:Uint32Array,"%URIError%":ec,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet};if(F)try{null.error}catch(t){gi=F(F(t)),Ie["%Error.prototype%"]=gi}var gi,oc=function t(e){var r;if(e==="%AsyncFunction%")r=sn("async function () {}");else if(e==="%GeneratorFunction%")r=sn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=sn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(r=F(o.prototype))}return Ie[e]=r,r},xi={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},dr=Re(),Qr=an(),ic=dr.call(Function.call,Array.prototype.concat),ac=dr.call(Function.apply,Array.prototype.splice),vi=dr.call(Function.call,String.prototype.replace),Xr=dr.call(Function.call,String.prototype.slice),sc=dr.call(Function.call,RegExp.prototype.exec),uc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fc=/\\(\\)?/g,pc=function(e){var r=Xr(e,0,1),n=Xr(e,-1);if(r==="%"&&n!=="%")throw new Ze("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ze("invalid intrinsic syntax, expected opening `%`");var o=[];return vi(e,uc,function(i,u,p,c){o[o.length]=p?vi(c,fc,"$1"):u||i}),o},lc=function(e,r){var n=e,o;if(Qr(xi,n)&&(o=xi[n],n="%"+o[0]+"%"),Qr(Ie,n)){var i=Ie[n];if(i===Je&&(i=oc(n)),typeof i=="undefined"&&!r)throw new Ke("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ze("intrinsic "+e+" does not exist!")};bi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(sc(/^%?[^%]*%?$/,e)===null)throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=pc(e),o=n.length>0?n[0]:"",i=lc("%"+o+"%",r),u=i.name,p=i.value,c=!1,y=i.alias;y&&(o=y[0],ac(n,ic([0,1],y)));for(var h=1,g=!0;h<n.length;h+=1){var v=n[h],b=Xr(v,0,1),T=Xr(v,-1);if((b==='"'||b==="'"||b==="`"||T==='"'||T==="'"||T==="`")&&b!==T)throw new Ze("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",Qr(Ie,u))p=Ie[u];else if(p!=null){if(!(v in p)){if(!r)throw new Ke("base intrinsic for "+e+" exists, but the property is not available.");return}if(Pe&&h+1>=n.length){var R=Pe(p,v);g=!!R,g&&"get"in R&&!("originalValue"in R.get)?p=R.get:p=p[v]}else g=Qr(p,v),p=p[v];g&&!c&&(Ie[u]=p)}}return p}});var fn=m((O0,Ai)=>{"use strict";a();s();Ai.exports=Object});var Ei=m((U0,Si)=>{"use strict";a();s();Si.exports=Math.abs});var Ri=m((k0,Ti)=>{"use strict";a();s();Ti.exports=Math.floor});var Ii=m((D0,Pi)=>{"use strict";a();s();Pi.exports=Math.max});var Fi=m((G0,Ni)=>{"use strict";a();s();Ni.exports=Math.min});var Oi=m((Y0,Ci)=>{"use strict";a();s();Ci.exports=Math.pow});var Bi=m((K0,Li)=>{"use strict";a();s();Li.exports=Math.round});var qi=m((X0,Ui)=>{"use strict";a();s();Ui.exports=Number.isNaN||function(e){return e!==e}});var ki=m((tv,$i)=>{"use strict";a();s();var cc=qi();$i.exports=function(e){return cc(e)||e===0?e:e<0?-1:1}});var Mi=m((iv,_i)=>{"use strict";a();s();_i.exports=Object.getOwnPropertyDescriptor});var yr=m((uv,Di)=>{"use strict";a();s();var et=Mi();if(et)try{et([],"length")}catch(t){et=null}Di.exports=et});var tt=m((lv,Wi)=>{"use strict";a();s();var rt=Object.defineProperty||!1;if(rt)try{rt({},"a",{value:1})}catch(t){rt=!1}Wi.exports=rt});var pn=m((yv,ji)=>{"use strict";a();s();ji.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0}});var Vi=m((gv,zi)=>{"use strict";a();s();var Gi=typeof Symbol!="undefined"&&Symbol,dc=pn();zi.exports=function(){return typeof Gi!="function"||typeof Symbol!="function"||typeof Gi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:dc()}});var ln=m((wv,Yi)=>{"use strict";a();s();Yi.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var cn=m((Sv,Hi)=>{"use strict";a();s();var yc=fn();Hi.exports=yc.getPrototypeOf||null});var nt=m((Rv,Ji)=>{"use strict";a();s();Ji.exports=Function.prototype.call});var dn=m((Nv,Ki)=>{"use strict";a();s();Ki.exports=Function.prototype.apply});var Qi=m((Ov,Zi)=>{"use strict";a();s();Zi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var ea=m((Uv,Xi)=>{"use strict";a();s();var mc=Re(),hc=dn(),gc=nt(),xc=Qi();Xi.exports=xc||mc.call(gc,hc)});var ta=m((kv,ra)=>{"use strict";a();s();var vc=Re(),wc=I(),bc=nt(),Ac=ea();ra.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new wc("a function is required");return Ac(vc,bc,e)}});var ua=m((Dv,sa)=>{"use strict";a();s();var Sc=ta(),na=yr(),ia;try{ia=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var yn=!!ia&&na&&na(Object.prototype,"__proto__"),aa=Object,oa=aa.getPrototypeOf;sa.exports=yn&&typeof yn.get=="function"?Sc([yn.get]):typeof oa=="function"?function(e){return oa(e==null?e:aa(e))}:!1});var da=m((Gv,ca)=>{"use strict";a();s();var fa=ln(),pa=cn(),la=ua();ca.exports=fa?function(e){return fa(e)}:pa?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return pa(e)}:la?function(e){return la(e)}:null});var gn=m((Yv,va)=>{"use strict";a();s();var S,Ec=fn(),Tc=Qt(),Rc=Xt(),Pc=en(),Ic=rn(),rr=Zr(),er=I(),Nc=tn(),Fc=Ei(),Cc=Ri(),Oc=Ii(),Lc=Fi(),Bc=Oi(),Uc=Bi(),qc=ki(),ga=Function,mn=function(t){try{return ga('"use strict"; return ('+t+").constructor;")()}catch(e){}},mr=yr(),$c=tt(),hn=function(){throw new er},kc=mr?function(){try{return arguments.callee,hn}catch(t){try{return mr(arguments,"callee").get}catch(e){return hn}}}():hn,Qe=Vi()(),C=da(),_c=cn(),Mc=ln(),xa=dn(),hr=nt(),Xe={},Dc=typeof Uint8Array=="undefined"||!C?S:C(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":Qe&&C?C([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":Xe,"%AsyncGenerator%":Xe,"%AsyncGeneratorFunction%":Xe,"%AsyncIteratorPrototype%":Xe,"%Atomics%":typeof Atomics=="undefined"?S:Atomics,"%BigInt%":typeof BigInt=="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Tc,"%eval%":eval,"%EvalError%":Rc,"%Float32Array%":typeof Float32Array=="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?S:FinalizationRegistry,"%Function%":ga,"%GeneratorFunction%":Xe,"%Int8Array%":typeof Int8Array=="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Qe&&C?C(C([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map=="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Qe||!C?S:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ec,"%Object.getOwnPropertyDescriptor%":mr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?S:Promise,"%Proxy%":typeof Proxy=="undefined"?S:Proxy,"%RangeError%":Pc,"%ReferenceError%":Ic,"%Reflect%":typeof Reflect=="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Qe||!C?S:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Qe&&C?C(""[Symbol.iterator]()):S,"%Symbol%":Qe?Symbol:S,"%SyntaxError%":rr,"%ThrowTypeError%":kc,"%TypedArray%":Dc,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?S:Uint32Array,"%URIError%":Nc,"%WeakMap%":typeof WeakMap=="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?S:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":xa,"%Object.defineProperty%":$c,"%Object.getPrototypeOf%":_c,"%Math.abs%":Fc,"%Math.floor%":Cc,"%Math.max%":Oc,"%Math.min%":Lc,"%Math.pow%":Bc,"%Math.round%":Uc,"%Math.sign%":qc,"%Reflect.getPrototypeOf%":Mc};if(C)try{null.error}catch(t){ya=C(C(t)),Ne["%Error.prototype%"]=ya}var ya,Wc=function t(e){var r;if(e==="%AsyncFunction%")r=mn("async function () {}");else if(e==="%GeneratorFunction%")r=mn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=mn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&C&&(r=C(o.prototype))}return Ne[e]=r,r},ma={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},gr=Re(),ot=an(),jc=gr.call(hr,Array.prototype.concat),Gc=gr.call(xa,Array.prototype.splice),ha=gr.call(hr,String.prototype.replace),it=gr.call(hr,String.prototype.slice),zc=gr.call(hr,RegExp.prototype.exec),Vc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Yc=/\\(\\)?/g,Hc=function(e){var r=it(e,0,1),n=it(e,-1);if(r==="%"&&n!=="%")throw new rr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new rr("invalid intrinsic syntax, expected opening `%`");var o=[];return ha(e,Vc,function(i,u,p,c){o[o.length]=p?ha(c,Yc,"$1"):u||i}),o},Jc=function(e,r){var n=e,o;if(ot(ma,n)&&(o=ma[n],n="%"+o[0]+"%"),ot(Ne,n)){var i=Ne[n];if(i===Xe&&(i=Wc(n)),typeof i=="undefined"&&!r)throw new er("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new rr("intrinsic "+e+" does not exist!")};va.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new er('"allowMissing" argument must be a boolean');if(zc(/^%?[^%]*%?$/,e)===null)throw new rr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Hc(e),o=n.length>0?n[0]:"",i=Jc("%"+o+"%",r),u=i.name,p=i.value,c=!1,y=i.alias;y&&(o=y[0],Gc(n,jc([0,1],y)));for(var h=1,g=!0;h<n.length;h+=1){var v=n[h],b=it(v,0,1),T=it(v,-1);if((b==='"'||b==="'"||b==="`"||T==='"'||T==="'"||T==="`")&&b!==T)throw new rr("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",ot(Ne,u))p=Ne[u];else if(p!=null){if(!(v in p)){if(!r)throw new er("base intrinsic for "+e+" exists, but the property is not available.");return}if(mr&&h+1>=n.length){var R=mr(p,v);g=!!R,g&&"get"in R&&!("originalValue"in R.get)?p=R.get:p=p[v]}else g=ot(p,v),p=p[v];g&&!c&&(Ne[u]=p)}}return p}});var xn=m((Kv,Aa)=>{"use strict";a();s();var wa=tt(),Kc=Zr(),tr=I(),ba=yr();Aa.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new tr("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new tr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!ba&&ba(e,r);if(wa)wa(e,r,{configurable:u===null&&c?c.configurable:!u,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(p||!o&&!i&&!u)e[r]=n;else throw new Kc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var wn=m((Xv,Ea)=>{"use strict";a();s();var vn=tt(),Sa=function(){return!!vn};Sa.hasArrayLengthDefineBug=function(){if(!vn)return null;try{return vn([],"length",{value:1}).length!==1}catch(e){return!0}};Ea.exports=Sa});var Na=m((tw,Ia)=>{"use strict";a();s();var Zc=gn(),Ta=xn(),Qc=wn()(),Ra=yr(),Pa=I(),Xc=Zc("%Math.floor%");Ia.exports=function(e,r){if(typeof e!="function")throw new Pa("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Xc(r)!==r)throw new Pa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Ra){var u=Ra(e,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(i=!1)}return(o||i||!n)&&(Qc?Ta(e,"length",r,!0,!0):Ta(e,"length",r)),e}});var Ca=m((iw,Fa)=>{"use strict";a();s();var ed=gn(),at=ed("%Object.defineProperty%",!0)||!1;if(at)try{at({},"a",{value:1})}catch(t){at=!1}Fa.exports=at});var ft=m((uw,st)=>{"use strict";a();s();var bn=Re(),ut=G(),rd=Na(),td=I(),Ba=ut("%Function.prototype.apply%"),Ua=ut("%Function.prototype.call%"),qa=ut("%Reflect.apply%",!0)||bn.call(Ua,Ba),Oa=Ca(),nd=ut("%Math.max%");st.exports=function(e){if(typeof e!="function")throw new td("a function is required");var r=qa(bn,Ua,arguments);return rd(r,1+nd(0,e.length-(arguments.length-1)),!0)};var La=function(){return qa(bn,Ba,arguments)};Oa?Oa(st.exports,"apply",{value:La}):st.exports.apply=La});var An=m((lw,ka)=>{"use strict";a();s();var $a=Object.prototype.toString;ka.exports=function(e){var r=$a.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&$a.call(e.callee)==="[object Function]"),n}});var Ya=m((yw,Va)=>{"use strict";a();s();var za;Object.keys||(xr=Object.prototype.hasOwnProperty,Sn=Object.prototype.toString,_a=An(),En=Object.prototype.propertyIsEnumerable,Ma=!En.call({toString:null},"toString"),Da=En.call(function(){},"prototype"),vr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],pt=function(t){var e=t.constructor;return e&&e.prototype===t},Wa={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},ja=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Wa["$"+t]&&xr.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{pt(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),Ga=function(t){if(typeof window=="undefined"||!ja)return pt(t);try{return pt(t)}catch(e){return!1}},za=function(e){var r=e!==null&&typeof e=="object",n=Sn.call(e)==="[object Function]",o=_a(e),i=r&&Sn.call(e)==="[object String]",u=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Da&&n;if(i&&e.length>0&&!xr.call(e,0))for(var c=0;c<e.length;++c)u.push(String(c));if(o&&e.length>0)for(var y=0;y<e.length;++y)u.push(String(y));else for(var h in e)!(p&&h==="prototype")&&xr.call(e,h)&&u.push(String(h));if(Ma)for(var g=Ga(e),v=0;v<vr.length;++v)!(g&&vr[v]==="constructor")&&xr.call(e,vr[v])&&u.push(vr[v]);return u});var xr,Sn,_a,En,Ma,Da,vr,pt,Wa,ja,Ga;Va.exports=za});var Za=m((gw,Ka)=>{"use strict";a();s();var od=Array.prototype.slice,id=An(),Ha=Object.keys,lt=Ha?function(e){return Ha(e)}:Ya(),Ja=Object.keys;lt.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return id(n)?Ja(od.call(n)):Ja(n)})}else Object.keys=lt;return Object.keys||lt};Ka.exports=lt});var wr=m((ww,rs)=>{"use strict";a();s();var ad=Za(),sd=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ud=Object.prototype.toString,fd=Array.prototype.concat,Qa=xn(),pd=function(t){return typeof t=="function"&&ud.call(t)==="[object Function]"},Xa=wn()(),ld=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!pd(n)||!n())return}Xa?Qa(t,e,r,!0):Qa(t,e,r)},es=function(t,e){var r=arguments.length>2?arguments[2]:{},n=ad(e);sd&&(n=fd.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)ld(t,n[o],e[n[o]],r[n[o]])};es.supportsDescriptors=!!Xa;rs.exports=es});var M=m((Sw,os)=>{"use strict";a();s();var ts=G(),ns=ft(),cd=ns(ts("String.prototype.indexOf"));os.exports=function(e,r){var n=ts(e,!!r);return typeof n=="function"&&cd(e,".prototype.")>-1?ns(n):n}});var ss=m((Rw,as)=>{"use strict";a();s();var dd=G(),is=dd("%Array%"),yd=!is.isArray&&M()("Object.prototype.toString");as.exports=is.isArray||function(e){return yd(e)==="[object Array]"}});var Tn=m((Nw,us)=>{"use strict";a();s();us.exports=ss()});var ps=m((Ow,fs)=>{"use strict";a();s();var md=G(),hd=M(),gd=I(),xd=Tn(),vd=md("%Reflect.apply%",!0)||hd("Function.prototype.apply");fs.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!xd(n))throw new gd("Assertion failed: optional `argumentsList`, if provided, must be a List");return vd(e,r,n)}});function ls(){throw new Error("setTimeout has not been defined")}function cs(){throw new Error("clearTimeout has not been defined")}function ds(t){if(le===setTimeout)return setTimeout(t,0);if((le===ls||!le)&&setTimeout)return le=setTimeout,setTimeout(t,0);try{return le(t,0)}catch(e){try{return le.call(null,t,0)}catch(r){return le.call(this,t,0)}}}function wd(t){if(ce===clearTimeout)return clearTimeout(t);if((ce===cs||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(t);try{return ce(t)}catch(e){try{return ce.call(null,t)}catch(r){return ce.call(this,t)}}}function bd(){!or||!Fe||(or=!1,Fe.length?X=Fe.concat(X):ct=-1,X.length&&ys())}function ys(){if(!or){var t=ds(bd);or=!0;for(var e=X.length;e;){for(Fe=X,X=[];++ct<e;)Fe&&Fe[ct].run();ct=-1,e=X.length}Fe=null,or=!1,wd(t)}}function Ad(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];X.push(new ms(t,e)),X.length===1&&!or&&ds(ys)}function ms(t,e){this.fun=t,this.array=e}function Ce(){}function _d(t){throw new Error("process.binding is not supported")}function Md(){return"/"}function Dd(t){throw new Error("process.chdir is not supported")}function Wd(){return 0}function Gd(t){var e=jd.call(nr)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Vd(){var t=new Date,e=t-zd;return e/1e3}var le,ce,X,or,Fe,ct,Sd,Ed,Td,Rd,Pd,Id,Nd,Fd,Cd,Od,Ld,Bd,Ud,qd,$d,kd,nr,jd,zd,Yd,br,hs=ze(()=>{"use strict";a();s();le=ls,ce=cs;typeof globalThis.setTimeout=="function"&&(le=setTimeout);typeof globalThis.clearTimeout=="function"&&(ce=clearTimeout);X=[],or=!1,ct=-1;ms.prototype.run=function(){this.fun.apply(null,this.array)};Sd="browser",Ed="browser",Td=!0,Rd={},Pd=[],Id="",Nd={},Fd={},Cd={};Od=Ce,Ld=Ce,Bd=Ce,Ud=Ce,qd=Ce,$d=Ce,kd=Ce;nr=globalThis.performance||{},jd=nr.now||nr.mozNow||nr.msNow||nr.oNow||nr.webkitNow||function(){return new Date().getTime()};zd=new Date;Yd={nextTick:Ad,title:Sd,browser:Td,env:Rd,argv:Pd,version:Id,versions:Nd,on:Od,addListener:Ld,once:Bd,off:Ud,removeListener:qd,removeAllListeners:$d,emit:kd,binding:_d,cwd:Md,chdir:Dd,umask:Wd,hrtime:Gd,platform:Ed,release:Fd,config:Cd,uptime:Vd},br=Yd});var Rn,Pn,gs=ze(()=>{"use strict";a();s();typeof Object.create=="function"?Rn=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Rn=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};Pn=Rn});var Ts={};Yt(Ts,{_extend:()=>qn,debuglog:()=>xs,default:()=>ny,deprecate:()=>On,format:()=>ht,inherits:()=>Pn,inspect:()=>V,isArray:()=>Ln,isBoolean:()=>gt,isBuffer:()=>As,isDate:()=>mt,isError:()=>Sr,isFunction:()=>Er,isNull:()=>Tr,isNullOrUndefined:()=>vs,isNumber:()=>Bn,isObject:()=>Oe,isPrimitive:()=>bs,isRegExp:()=>Ar,isString:()=>Rr,isSymbol:()=>ws,isUndefined:()=>z,log:()=>Ss});function ht(t){if(!Rr(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(V(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(Hd,function(p){if(p==="%%")return"%";if(r>=o)return p;switch(p){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(c){return"[Circular]"}default:return p}}),u=n[r];r<o;u=n[++r])Tr(u)||!Oe(u)?i+=" "+u:i+=" "+V(u);return i}function On(t,e){if(z(globalThis.process))return function(){return On(t,e).apply(this,arguments)};if(br.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(br.throwDeprecation)throw new Error(e);br.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function xs(t){if(z(In)&&(In=br.env.NODE_DEBUG||""),t=t.toUpperCase(),!dt[t])if(new RegExp("\\b"+t+"\\b","i").test(In)){var e=0;dt[t]=function(){var r=ht.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else dt[t]=function(){};return dt[t]}function V(t,e){var r={seen:[],stylize:Kd};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),gt(e)?r.showHidden=e:e&&qn(r,e),z(r.showHidden)&&(r.showHidden=!1),z(r.depth)&&(r.depth=2),z(r.colors)&&(r.colors=!1),z(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Jd),yt(r,t,r.depth)}function Jd(t,e){var r=V.styles[e];return r?"\x1B["+V.colors[r][0]+"m"+t+"\x1B["+V.colors[r][1]+"m":t}function Kd(t,e){return t}function Zd(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function yt(t,e,r){if(t.customInspect&&e&&Er(e.inspect)&&e.inspect!==V&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return Rr(n)||(n=yt(t,n,r)),n}var o=Qd(t,e);if(o)return o;var i=Object.keys(e),u=Zd(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),Sr(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Nn(e);if(i.length===0){if(Er(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(Ar(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(mt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Sr(e))return Nn(e)}var c="",y=!1,h=["{","}"];if(Ln(e)&&(y=!0,h=["[","]"]),Er(e)){var g=e.name?": "+e.name:"";c=" [Function"+g+"]"}if(Ar(e)&&(c=" "+RegExp.prototype.toString.call(e)),mt(e)&&(c=" "+Date.prototype.toUTCString.call(e)),Sr(e)&&(c=" "+Nn(e)),i.length===0&&(!y||e.length==0))return h[0]+c+h[1];if(r<0)return Ar(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var v;return y?v=Xd(t,e,r,u,i):v=i.map(function(b){return Cn(t,e,r,u,b,y)}),t.seen.pop(),ey(v,c,h)}function Qd(t,e){if(z(e))return t.stylize("undefined","undefined");if(Rr(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Bn(e))return t.stylize(""+e,"number");if(gt(e))return t.stylize(""+e,"boolean");if(Tr(e))return t.stylize("null","null")}function Nn(t){return"["+Error.prototype.toString.call(t)+"]"}function Xd(t,e,r,n,o){for(var i=[],u=0,p=e.length;u<p;++u)Es(e,String(u))?i.push(Cn(t,e,r,n,String(u),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(Cn(t,e,r,n,c,!0))}),i}function Cn(t,e,r,n,o,i){var u,p,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?c.set?p=t.stylize("[Getter/Setter]","special"):p=t.stylize("[Getter]","special"):c.set&&(p=t.stylize("[Setter]","special")),Es(n,o)||(u="["+o+"]"),p||(t.seen.indexOf(c.value)<0?(Tr(r)?p=yt(t,c.value,null):p=yt(t,c.value,r-1),p.indexOf(`
2
- `)>-1&&(i?p=p.split(`
1
+ "use strict";var Cf=Object.create;var cr=Object.defineProperty,Ff=Object.defineProperties,Of=Object.getOwnPropertyDescriptor,Lf=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertyNames,Gr=Object.getOwnPropertySymbols,Uf=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable;var Vt=(t,r,e)=>r in t?cr(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,je=(t,r)=>{for(var e in r||(r={}))zt.call(r,e)&&Vt(t,e,r[e]);if(Gr)for(var e of Gr(r))Eo.call(r,e)&&Vt(t,e,r[e]);return t},Ge=(t,r)=>Ff(t,Lf(r));var Ro=t=>typeof t=="symbol"?t:t+"",Po=(t,r)=>{var e={};for(var n in t)zt.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&Gr)for(var n of Gr(t))r.indexOf(n)<0&&Eo.call(t,n)&&(e[n]=t[n]);return e};var Ve=(t,r)=>()=>(t&&(r=t(t=0)),r);var h=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Yt=(t,r)=>{for(var e in r)cr(t,e,{get:r[e],enumerable:!0})},Io=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Bf(r))!zt.call(t,o)&&o!==e&&cr(t,o,{get:()=>r[o],enumerable:!(n=Of(r,o))||n.enumerable});return t};var qf=(t,r,e)=>(e=t!=null?Cf(Uf(t)):{},Io(r||!t||!t.__esModule?cr(e,"default",{value:t,enumerable:!0}):e,t)),No=t=>Io(cr({},"__esModule",{value:!0}),t);var d=(t,r,e)=>Vt(t,typeof r!="symbol"?r+"":r,e);function Fo(){throw new Error("setTimeout has not been defined")}function Oo(){throw new Error("clearTimeout has not been defined")}function Lo(t){if(ce===setTimeout)return setTimeout(t,0);if((ce===Fo||!ce)&&setTimeout)return ce=setTimeout,setTimeout(t,0);try{return ce(t,0)}catch(r){try{return ce.call(null,t,0)}catch(e){return ce.call(this,t,0)}}}function $f(t){if(de===clearTimeout)return clearTimeout(t);if((de===Oo||!de)&&clearTimeout)return de=clearTimeout,clearTimeout(t);try{return de(t)}catch(r){try{return de.call(null,t)}catch(e){return de.call(this,t)}}}function kf(){!Ye||!Se||(Ye=!1,Se.length?ee=Se.concat(ee):Vr=-1,ee.length&&Bo())}function Bo(){if(!Ye){var t=Lo(kf);Ye=!0;for(var r=ee.length;r;){for(Se=ee,ee=[];++Vr<r;)Se&&Se[Vr].run();Vr=-1,r=ee.length}Se=null,Ye=!1,$f(t)}}function _f(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];ee.push(new Uo(t,r)),ee.length===1&&!Ye&&Lo(Bo)}function Uo(t,r){this.fun=t,this.array=r}function Te(){}function tl(t){throw new Error("process.binding is not supported")}function nl(){return"/"}function ol(t){throw new Error("process.chdir is not supported")}function il(){return 0}function sl(t){var r=al.call(ze)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}function pl(){var t=new Date,r=t-ul;return r/1e3}var ce,de,ee,Ye,Se,Vr,Mf,Df,Wf,jf,Gf,Vf,zf,Yf,Hf,Jf,Kf,Zf,Qf,Xf,el,rl,ze,al,ul,l,Co,a=Ve(()=>{"use strict";ce=Fo,de=Oo;typeof globalThis.setTimeout=="function"&&(ce=setTimeout);typeof globalThis.clearTimeout=="function"&&(de=clearTimeout);ee=[],Ye=!1,Vr=-1;Uo.prototype.run=function(){this.fun.apply(null,this.array)};Mf="browser",Df="browser",Wf=!0,jf={},Gf=[],Vf="",zf={},Yf={},Hf={};Jf=Te,Kf=Te,Zf=Te,Qf=Te,Xf=Te,el=Te,rl=Te;ze=globalThis.performance||{},al=ze.now||ze.mozNow||ze.msNow||ze.oNow||ze.webkitNow||function(){return new Date().getTime()};ul=new Date;l={nextTick:_f,title:Mf,browser:Wf,env:jf,argv:Gf,version:Vf,versions:zf,on:Jf,addListener:Kf,once:Zf,off:Qf,removeListener:Xf,removeAllListeners:el,emit:rl,binding:tl,cwd:nl,chdir:ol,umask:il,hrtime:sl,platform:Df,release:Yf,config:Hf,uptime:pl},Co={};Object.keys(Co).forEach(t=>{let r=t.split("."),e=l;for(let n=0;n<r.length;n++){let o=r[n];n===r.length-1?e[o]=Co[t]:e=e[o]||(e[o]={})}})});function _o(){Jt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)j[r]=t[r],_[t.charCodeAt(r)]=r;_[45]=62,_[95]=63}function ll(t){Jt||_o();var r,e,n,o,i,u,f=t.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[f-2]==="="?2:t[f-1]==="="?1:0,u=new fl(f*3/4-i),n=i>0?f-4:f;var c=0;for(r=0,e=0;r<n;r+=4,e+=3)o=_[t.charCodeAt(r)]<<18|_[t.charCodeAt(r+1)]<<12|_[t.charCodeAt(r+2)]<<6|_[t.charCodeAt(r+3)],u[c++]=o>>16&255,u[c++]=o>>8&255,u[c++]=o&255;return i===2?(o=_[t.charCodeAt(r)]<<2|_[t.charCodeAt(r+1)]>>4,u[c++]=o&255):i===1&&(o=_[t.charCodeAt(r)]<<10|_[t.charCodeAt(r+1)]<<4|_[t.charCodeAt(r+2)]>>2,u[c++]=o>>8&255,u[c++]=o&255),u}function cl(t){return j[t>>18&63]+j[t>>12&63]+j[t>>6&63]+j[t&63]}function dl(t,r,e){for(var n,o=[],i=r;i<e;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(cl(n));return o.join("")}function qo(t){Jt||_o();for(var r,e=t.length,n=e%3,o="",i=[],u=16383,f=0,c=e-n;f<c;f+=u)i.push(dl(t,f,f+u>c?c:f+u));return n===1?(r=t[e-1],o+=j[r>>2],o+=j[r<<4&63],o+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],o+=j[r>>10],o+=j[r>>4&63],o+=j[r<<2&63],o+="="),i.push(o),i.join("")}function zr(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function re(t,r){if(zr()<r)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=p.prototype):(t===null&&(t=new p(r)),t.length=r),t}function p(t,r,e){if(!p.TYPED_ARRAY_SUPPORT&&!(this instanceof p))return new p(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return Kt(this,t)}return Mo(this,t,r,e)}function Mo(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&r instanceof ArrayBuffer?hl(t,r,e,n):typeof r=="string"?ml(t,r,e):gl(t,r)}function Do(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function yl(t,r,e,n){return Do(r),r<=0?re(t,r):e!==void 0?typeof n=="string"?re(t,r).fill(e,n):re(t,r).fill(e):re(t,r)}function Kt(t,r){if(Do(r),t=re(t,r<0?0:Zt(r)|0),!p.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function ml(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!p.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Wo(r,e)|0;t=re(t,n);var o=t.write(r,e);return o!==n&&(t=t.slice(0,o)),t}function Ht(t,r){var e=r.length<0?0:Zt(r.length)|0;t=re(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function hl(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),p.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=p.prototype):t=Ht(t,r),t}function gl(t,r){if(G(r)){var e=Zt(r.length)|0;return t=re(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer!="undefined"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||ql(r.length)?re(t,0):Ht(t,r);if(r.type==="Buffer"&&Array.isArray(r.data))return Ht(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Zt(t){if(t>=zr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zr().toString(16)+" bytes");return t|0}function G(t){return!!(t!=null&&t._isBuffer)}function Wo(t,r){if(G(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Yr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Jo(t).length;default:if(n)return Yr(t).length;r=(""+r).toLowerCase(),n=!0}}function xl(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return Il(this,r,e);case"utf8":case"utf-8":return Vo(this,r,e);case"ascii":return Rl(this,r,e);case"latin1":case"binary":return Pl(this,r,e);case"base64":return Tl(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nl(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Ee(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function jo(t,r,e,n,o){if(t.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=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof r=="string"&&(r=p.from(r,n)),G(r))return r.length===0?-1:$o(t,r,e,n,o);if(typeof r=="number")return r=r&255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):$o(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function $o(t,r,e,n,o){var i=1,u=t.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;i=2,u/=2,f/=2,e/=2}function c(b,E){return i===1?b[E]:b.readUInt16BE(E*i)}var y;if(o){var m=-1;for(y=e;y<u;y++)if(c(t,y)===c(r,m===-1?0:y-m)){if(m===-1&&(m=y),y-m+1===f)return m*i}else m!==-1&&(y-=y-m),m=-1}else for(e+f>u&&(e=u-f),y=e;y>=0;y--){for(var g=!0,v=0;v<f;v++)if(c(t,y+v)!==c(r,v)){g=!1;break}if(g)return y}return-1}function vl(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n),n>o&&(n=o)):n=o;var i=r.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(u*2,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function wl(t,r,e,n){return Kr(Yr(r,t.length-e),t,e,n)}function Go(t,r,e,n){return Kr(Bl(r),t,e,n)}function bl(t,r,e,n){return Go(t,r,e,n)}function Al(t,r,e,n){return Kr(Jo(r),t,e,n)}function Sl(t,r,e,n){return Kr(Ul(r,t.length-e),t,e,n)}function Tl(t,r,e){return r===0&&e===t.length?qo(t):qo(t.slice(r,e))}function Vo(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i=t[o],u=null,f=i>239?4:i>223?3:i>191?2:1;if(o+f<=e){var c,y,m,g;switch(f){case 1:i<128&&(u=i);break;case 2:c=t[o+1],(c&192)===128&&(g=(i&31)<<6|c&63,g>127&&(u=g));break;case 3:c=t[o+1],y=t[o+2],(c&192)===128&&(y&192)===128&&(g=(i&15)<<12|(c&63)<<6|y&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=t[o+1],y=t[o+2],m=t[o+3],(c&192)===128&&(y&192)===128&&(m&192)===128&&(g=(i&15)<<18|(c&63)<<12|(y&63)<<6|m&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=f}return El(n)}function El(t){var r=t.length;if(r<=ko)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=ko));return e}function Rl(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]&127);return n}function Pl(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function Il(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=Ll(t[i]);return o}function Nl(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function N(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function q(t,r,e,n,o,i){if(!G(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function Hr(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function Jr(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>(n?o:3-o)*8&255}function zo(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Yo(t,r,e,n,o){return o||zo(t,r,e,4,34028234663852886e22,-34028234663852886e22),Zo(t,r,e,n,23,4),e+4}function Ho(t,r,e,n,o){return o||zo(t,r,e,8,17976931348623157e292,-17976931348623157e292),Zo(t,r,e,n,52,8),e+8}function Fl(t){if(t=Ol(t).replace(Cl,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Ol(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ll(t){return t<16?"0"+t.toString(16):t.toString(16)}function Yr(t,r){r=r||1/0;for(var e,n=t.length,o=null,i=[],u=0;u<n;++u){if(e=t.charCodeAt(u),e>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return i}function Bl(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function Ul(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,o=e%256,i.push(o),i.push(n);return i}function Jo(t){return ll(Fl(t))}function Kr(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function ql(t){return t!==t}function $l(t){return t!=null&&(!!t._isBuffer||Ko(t)||kl(t))}function Ko(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function kl(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Ko(t.slice(0,0))}function Zr(t,r,e,n,o){var i,u,f=o*8-n-1,c=(1<<f)-1,y=c>>1,m=-7,g=e?o-1:0,v=e?-1:1,b=t[r+g];for(g+=v,i=b&(1<<-m)-1,b>>=-m,m+=f;m>0;i=i*256+t[r+g],g+=v,m-=8);for(u=i&(1<<-m)-1,i>>=-m,m+=n;m>0;u=u*256+t[r+g],g+=v,m-=8);if(i===0)i=1-y;else{if(i===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-y}return(b?-1:1)*u*Math.pow(2,i-n)}function Zo(t,r,e,n,o,i){var u,f,c,y=i*8-o-1,m=(1<<y)-1,g=m>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,E=n?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=m):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?r+=v/c:r+=v*Math.pow(2,1-g),r*c>=2&&(u++,c/=2),u+g>=m?(f=0,u=m):u+g>=1?(f=(r*c-1)*Math.pow(2,o),u=u+g):(f=r*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;t[e+b]=f&255,b+=E,f/=256,o-=8);for(u=u<<o|f,y+=o;y>0;t[e+b]=u&255,b+=E,u/=256,y-=8);t[e+b-E]|=P*128}var j,_,fl,Jt,ko,Cl,Qo=Ve(()=>{"use strict";a();s();j=[],_=[],fl=typeof Uint8Array!="undefined"?Uint8Array:Array,Jt=!1;p.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;p.poolSize=8192;p._augment=function(t){return t.__proto__=p.prototype,t};p.from=function(t,r,e){return Mo(null,t,r,e)};p.kMaxLength=zr();p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]);p.alloc=function(t,r,e){return yl(null,t,r,e)};p.allocUnsafe=function(t){return Kt(null,t)};p.allocUnsafeSlow=function(t){return Kt(null,t)};p.isBuffer=$l;p.compare=function(r,e){if(!G(r)||!G(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,o=e.length,i=0,u=Math.min(n,o);i<u;++i)if(r[i]!==e[i]){n=r[i],o=e[i];break}return n<o?-1:o<n?1:0};p.isEncoding=function(r){switch(String(r).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}};p.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return p.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var o=p.allocUnsafe(e),i=0;for(n=0;n<r.length;++n){var u=r[n];if(!G(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,i),i+=u.length}return o};p.byteLength=Wo;p.prototype._isBuffer=!0;p.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)Ee(this,e,e+1);return this};p.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)Ee(this,e,e+3),Ee(this,e+1,e+2);return this};p.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)Ee(this,e,e+7),Ee(this,e+1,e+6),Ee(this,e+2,e+5),Ee(this,e+3,e+4);return this};p.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?Vo(this,0,r):xl.apply(this,arguments)};p.prototype.equals=function(r){if(!G(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:p.compare(this,r)===0};p.prototype.compare=function(r,e,n,o,i){if(!G(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),e<0||n>r.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&e>=n)return 0;if(o>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,i>>>=0,this===r)return 0;for(var u=i-o,f=n-e,c=Math.min(u,f),y=this.slice(o,i),m=r.slice(e,n),g=0;g<c;++g)if(y[g]!==m[g]){u=y[g],f=m[g];break}return u<f?-1:f<u?1:0};p.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};p.prototype.indexOf=function(r,e,n){return jo(this,r,e,n,!0)};p.prototype.lastIndexOf=function(r,e,n){return jo(this,r,e,n,!1)};p.prototype.write=function(r,e,n,o){if(e===void 0)o="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")o=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-e;if((n===void 0||n>i)&&(n=i),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return vl(this,r,e,n);case"utf8":case"utf-8":return wl(this,r,e,n);case"ascii":return Go(this,r,e,n);case"latin1":case"binary":return bl(this,r,e,n);case"base64":return Al(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sl(this,r,e,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ko=4096;p.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var o;if(p.TYPED_ARRAY_SUPPORT)o=this.subarray(r,e),o.__proto__=p.prototype;else{var i=e-r;o=new p(i,void 0);for(var u=0;u<i;++u)o[u]=this[u+r]}return o};p.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=this[r],i=1,u=0;++u<e&&(i*=256);)o+=this[r+u]*i;return o};p.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=this[r+--e],i=1;e>0&&(i*=256);)o+=this[r+--e]*i;return o};p.prototype.readUInt8=function(r,e){return e||N(r,1,this.length),this[r]};p.prototype.readUInt16LE=function(r,e){return e||N(r,2,this.length),this[r]|this[r+1]<<8};p.prototype.readUInt16BE=function(r,e){return e||N(r,2,this.length),this[r]<<8|this[r+1]};p.prototype.readUInt32LE=function(r,e){return e||N(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};p.prototype.readUInt32BE=function(r,e){return e||N(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};p.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=this[r],i=1,u=0;++u<e&&(i*=256);)o+=this[r+u]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o};p.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||N(r,e,this.length);for(var o=e,i=1,u=this[r+--o];o>0&&(i*=256);)u+=this[r+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*e)),u};p.prototype.readInt8=function(r,e){return e||N(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};p.prototype.readInt16LE=function(r,e){e||N(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};p.prototype.readInt16BE=function(r,e){e||N(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};p.prototype.readInt32LE=function(r,e){return e||N(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};p.prototype.readInt32BE=function(r,e){return e||N(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};p.prototype.readFloatLE=function(r,e){return e||N(r,4,this.length),Zr(this,r,!0,23,4)};p.prototype.readFloatBE=function(r,e){return e||N(r,4,this.length),Zr(this,r,!1,23,4)};p.prototype.readDoubleLE=function(r,e){return e||N(r,8,this.length),Zr(this,r,!0,52,8)};p.prototype.readDoubleBE=function(r,e){return e||N(r,8,this.length),Zr(this,r,!1,52,8)};p.prototype.writeUIntLE=function(r,e,n,o){if(r=+r,e=e|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;q(this,r,e,n,i,0)}var u=1,f=0;for(this[e]=r&255;++f<n&&(u*=256);)this[e+f]=r/u&255;return e+n};p.prototype.writeUIntBE=function(r,e,n,o){if(r=+r,e=e|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;q(this,r,e,n,i,0)}var u=n-1,f=1;for(this[e+u]=r&255;--u>=0&&(f*=256);)this[e+u]=r/f&255;return e+n};p.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,1,255,0),p.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};p.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):Hr(this,r,e,!0),e+2};p.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):Hr(this,r,e,!1),e+2};p.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):Jr(this,r,e,!0),e+4};p.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Jr(this,r,e,!1),e+4};p.prototype.writeIntLE=function(r,e,n,o){if(r=+r,e=e|0,!o){var i=Math.pow(2,8*n-1);q(this,r,e,n,i-1,-i)}var u=0,f=1,c=0;for(this[e]=r&255;++u<n&&(f*=256);)r<0&&c===0&&this[e+u-1]!==0&&(c=1),this[e+u]=(r/f>>0)-c&255;return e+n};p.prototype.writeIntBE=function(r,e,n,o){if(r=+r,e=e|0,!o){var i=Math.pow(2,8*n-1);q(this,r,e,n,i-1,-i)}var u=n-1,f=1,c=0;for(this[e+u]=r&255;--u>=0&&(f*=256);)r<0&&c===0&&this[e+u+1]!==0&&(c=1),this[e+u]=(r/f>>0)-c&255;return e+n};p.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,1,127,-128),p.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};p.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):Hr(this,r,e,!0),e+2};p.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):Hr(this,r,e,!1),e+2};p.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):Jr(this,r,e,!0),e+4};p.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||q(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),p.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Jr(this,r,e,!1),e+4};p.prototype.writeFloatLE=function(r,e,n){return Yo(this,r,e,!0,n)};p.prototype.writeFloatBE=function(r,e,n){return Yo(this,r,e,!1,n)};p.prototype.writeDoubleLE=function(r,e,n){return Ho(this,r,e,!0,n)};p.prototype.writeDoubleBE=function(r,e,n){return Ho(this,r,e,!1,n)};p.prototype.copy=function(r,e,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),e>=r.length&&(e=r.length),e||(e=0),o>0&&o<n&&(o=n),o===n||r.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(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-e<o-n&&(o=r.length-e+n);var i=o-n,u;if(this===r&&n<e&&e<o)for(u=i-1;u>=0;--u)r[u+e]=this[u+n];else if(i<1e3||!p.TYPED_ARRAY_SUPPORT)for(u=0;u<i;++u)r[u+e]=this[u+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+i),e);return i};p.prototype.fill=function(r,e,n,o){if(typeof r=="string"){if(typeof e=="string"?(o=e,e=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),r.length===1){var i=r.charCodeAt(0);i<256&&(r=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!p.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof r=="number"&&(r=r&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,r||(r=0);var u;if(typeof r=="number")for(u=e;u<n;++u)this[u]=r;else{var f=G(r)?r:Yr(new p(r,o).toString()),c=f.length;for(u=0;u<n-e;++u)this[u+e]=f[u%c]}return this};Cl=/[^+\/0-9A-Za-z-_]/g});var s=Ve(()=>{"use strict";Qo()});var ri=h((Vx,ei)=>{"use strict";a();s();var _l="Function.prototype.bind called on incompatible ",Ml=Object.prototype.toString,Dl=Math.max,Wl="[object Function]",Xo=function(r,e){for(var n=[],o=0;o<r.length;o+=1)n[o]=r[o];for(var i=0;i<e.length;i+=1)n[i+r.length]=e[i];return n},jl=function(r,e){for(var n=[],o=e||0,i=0;o<r.length;o+=1,i+=1)n[i]=r[o];return n},Gl=function(t,r){for(var e="",n=0;n<t.length;n+=1)e+=t[n],n+1<t.length&&(e+=r);return e};ei.exports=function(r){var e=this;if(typeof e!="function"||Ml.apply(e)!==Wl)throw new TypeError(_l+e);for(var n=jl(arguments,1),o,i=function(){if(this instanceof o){var m=e.apply(this,Xo(n,arguments));return Object(m)===m?m:this}return e.apply(r,Xo(n,arguments))},u=Dl(0,e.length-n.length),f=[],c=0;c<u;c++)f[c]="$"+c;if(o=Function("binder","return function ("+Gl(f,",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var y=function(){};y.prototype=e.prototype,o.prototype=new y,y.prototype=null}return o}});var Re=h((Hx,ti)=>{"use strict";a();s();var Vl=ri();ti.exports=Function.prototype.bind||Vl});var Qt=h((Zx,ni)=>{"use strict";a();s();ni.exports=Error});var Xt=h((e0,oi)=>{"use strict";a();s();oi.exports=EvalError});var en=h((n0,ii)=>{"use strict";a();s();ii.exports=RangeError});var rn=h((a0,ai)=>{"use strict";a();s();ai.exports=ReferenceError});var Qr=h((p0,si)=>{"use strict";a();s();si.exports=SyntaxError});var I=h((c0,ui)=>{"use strict";a();s();ui.exports=TypeError});var tn=h((m0,pi)=>{"use strict";a();s();pi.exports=URIError});var li=h((x0,fi)=>{"use strict";a();s();fi.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;r[e]=o;for(e in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(r,e);if(u.value!==o||u.enumerable!==!0)return!1}return!0}});var nn=h((b0,di)=>{"use strict";a();s();var ci=typeof Symbol!="undefined"&&Symbol,zl=li();di.exports=function(){return typeof ci!="function"||typeof Symbol!="function"||typeof ci("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zl()}});var mi=h((T0,yi)=>{"use strict";a();s();var on={__proto__:null,foo:{}},Yl=Object;yi.exports=function(){return{__proto__:on}.foo===on.foo&&!(on instanceof Yl)}});var an=h((P0,hi)=>{"use strict";a();s();var Hl=Function.prototype.call,Jl=Object.prototype.hasOwnProperty,Kl=Re();hi.exports=Kl.call(Hl,Jl)});var V=h((C0,bi)=>{"use strict";a();s();var S,Zl=Qt(),Ql=Xt(),Xl=en(),ec=rn(),Ze=Qr(),Ke=I(),rc=tn(),wi=Function,sn=function(t){try{return wi('"use strict"; return ('+t+").constructor;")()}catch(r){}},Pe=Object.getOwnPropertyDescriptor;if(Pe)try{Pe({},"")}catch(t){Pe=null}var un=function(){throw new Ke},tc=Pe?function(){try{return arguments.callee,un}catch(t){try{return Pe(arguments,"callee").get}catch(r){return un}}}():un,He=nn()(),nc=mi()(),C=Object.getPrototypeOf||(nc?function(t){return t.__proto__}:null),Je={},oc=typeof Uint8Array=="undefined"||!C?S:C(Uint8Array),Ie={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?S:ArrayBuffer,"%ArrayIteratorPrototype%":He&&C?C([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%Atomics%":typeof Atomics=="undefined"?S:Atomics,"%BigInt%":typeof BigInt=="undefined"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Zl,"%eval%":eval,"%EvalError%":Ql,"%Float32Array%":typeof Float32Array=="undefined"?S:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?S:FinalizationRegistry,"%Function%":wi,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array=="undefined"?S:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?S:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&C?C(C([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map=="undefined"?S:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!He||!C?S:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?S:Promise,"%Proxy%":typeof Proxy=="undefined"?S:Proxy,"%RangeError%":Xl,"%ReferenceError%":ec,"%Reflect%":typeof Reflect=="undefined"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?S:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!He||!C?S:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&C?C(""[Symbol.iterator]()):S,"%Symbol%":He?Symbol:S,"%SyntaxError%":Ze,"%ThrowTypeError%":tc,"%TypedArray%":oc,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array=="undefined"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?S:Uint32Array,"%URIError%":rc,"%WeakMap%":typeof WeakMap=="undefined"?S:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?S:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?S:WeakSet};if(C)try{null.error}catch(t){gi=C(C(t)),Ie["%Error.prototype%"]=gi}var gi,ic=function t(r){var e;if(r==="%AsyncFunction%")e=sn("async function () {}");else if(r==="%GeneratorFunction%")e=sn("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=sn("async function* () {}");else if(r==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&C&&(e=C(o.prototype))}return Ie[r]=e,e},xi={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},dr=Re(),Xr=an(),ac=dr.call(Function.call,Array.prototype.concat),sc=dr.call(Function.apply,Array.prototype.splice),vi=dr.call(Function.call,String.prototype.replace),et=dr.call(Function.call,String.prototype.slice),uc=dr.call(Function.call,RegExp.prototype.exec),pc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fc=/\\(\\)?/g,lc=function(r){var e=et(r,0,1),n=et(r,-1);if(e==="%"&&n!=="%")throw new Ze("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new Ze("invalid intrinsic syntax, expected opening `%`");var o=[];return vi(r,pc,function(i,u,f,c){o[o.length]=f?vi(c,fc,"$1"):u||i}),o},cc=function(r,e){var n=r,o;if(Xr(xi,n)&&(o=xi[n],n="%"+o[0]+"%"),Xr(Ie,n)){var i=Ie[n];if(i===Je&&(i=ic(n)),typeof i=="undefined"&&!e)throw new Ke("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ze("intrinsic "+r+" does not exist!")};bi.exports=function(r,e){if(typeof r!="string"||r.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(uc(/^%?[^%]*%?$/,r)===null)throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=lc(r),o=n.length>0?n[0]:"",i=cc("%"+o+"%",e),u=i.name,f=i.value,c=!1,y=i.alias;y&&(o=y[0],sc(n,ac([0,1],y)));for(var m=1,g=!0;m<n.length;m+=1){var v=n[m],b=et(v,0,1),E=et(v,-1);if((b==='"'||b==="'"||b==="`"||E==='"'||E==="'"||E==="`")&&b!==E)throw new Ze("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",Xr(Ie,u))f=Ie[u];else if(f!=null){if(!(v in f)){if(!e)throw new Ke("base intrinsic for "+r+" exists, but the property is not available.");return}if(Pe&&m+1>=n.length){var P=Pe(f,v);g=!!P,g&&"get"in P&&!("originalValue"in P.get)?f=P.get:f=f[v]}else g=Xr(f,v),f=f[v];g&&!c&&(Ie[u]=f)}}return f}});var pn=h((L0,Ai)=>{"use strict";a();s();Ai.exports=Object});var Ti=h((q0,Si)=>{"use strict";a();s();Si.exports=Math.abs});var Ri=h((_0,Ei)=>{"use strict";a();s();Ei.exports=Math.floor});var Ii=h((W0,Pi)=>{"use strict";a();s();Pi.exports=Math.max});var Ci=h((V0,Ni)=>{"use strict";a();s();Ni.exports=Math.min});var Oi=h((H0,Fi)=>{"use strict";a();s();Fi.exports=Math.pow});var Bi=h((Z0,Li)=>{"use strict";a();s();Li.exports=Math.round});var qi=h((ev,Ui)=>{"use strict";a();s();Ui.exports=Number.isNaN||function(r){return r!==r}});var ki=h((nv,$i)=>{"use strict";a();s();var dc=qi();$i.exports=function(r){return dc(r)||r===0?r:r<0?-1:1}});var Mi=h((av,_i)=>{"use strict";a();s();_i.exports=Object.getOwnPropertyDescriptor});var yr=h((pv,Di)=>{"use strict";a();s();var rt=Mi();if(rt)try{rt([],"length")}catch(t){rt=null}Di.exports=rt});var nt=h((cv,Wi)=>{"use strict";a();s();var tt=Object.defineProperty||!1;if(tt)try{tt({},"a",{value:1})}catch(t){tt=!1}Wi.exports=tt});var fn=h((mv,ji)=>{"use strict";a();s();ji.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;r[e]=o;for(var i in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var u=Object.getOwnPropertySymbols(r);if(u.length!==1||u[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,e);if(f.value!==o||f.enumerable!==!0)return!1}return!0}});var zi=h((xv,Vi)=>{"use strict";a();s();var Gi=typeof Symbol!="undefined"&&Symbol,yc=fn();Vi.exports=function(){return typeof Gi!="function"||typeof Symbol!="function"||typeof Gi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:yc()}});var ln=h((bv,Yi)=>{"use strict";a();s();Yi.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var cn=h((Tv,Hi)=>{"use strict";a();s();var mc=pn();Hi.exports=mc.getPrototypeOf||null});var ot=h((Pv,Ji)=>{"use strict";a();s();Ji.exports=Function.prototype.call});var dn=h((Cv,Ki)=>{"use strict";a();s();Ki.exports=Function.prototype.apply});var Qi=h((Lv,Zi)=>{"use strict";a();s();Zi.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var ea=h((qv,Xi)=>{"use strict";a();s();var hc=Re(),gc=dn(),xc=ot(),vc=Qi();Xi.exports=vc||hc.call(xc,gc)});var ta=h((_v,ra)=>{"use strict";a();s();var wc=Re(),bc=I(),Ac=ot(),Sc=ea();ra.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new bc("a function is required");return Sc(wc,Ac,r)}});var ua=h((Wv,sa)=>{"use strict";a();s();var Tc=ta(),na=yr(),ia;try{ia=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var yn=!!ia&&na&&na(Object.prototype,"__proto__"),aa=Object,oa=aa.getPrototypeOf;sa.exports=yn&&typeof yn.get=="function"?Tc([yn.get]):typeof oa=="function"?function(r){return oa(r==null?r:aa(r))}:!1});var da=h((Vv,ca)=>{"use strict";a();s();var pa=ln(),fa=cn(),la=ua();ca.exports=pa?function(r){return pa(r)}:fa?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return fa(r)}:la?function(r){return la(r)}:null});var gn=h((Hv,va)=>{"use strict";a();s();var T,Ec=pn(),Rc=Qt(),Pc=Xt(),Ic=en(),Nc=rn(),rr=Qr(),er=I(),Cc=tn(),Fc=Ti(),Oc=Ri(),Lc=Ii(),Bc=Ci(),Uc=Oi(),qc=Bi(),$c=ki(),ga=Function,mn=function(t){try{return ga('"use strict"; return ('+t+").constructor;")()}catch(r){}},mr=yr(),kc=nt(),hn=function(){throw new er},_c=mr?function(){try{return arguments.callee,hn}catch(t){try{return mr(arguments,"callee").get}catch(r){return hn}}}():hn,Qe=zi()(),F=da(),Mc=cn(),Dc=ln(),xa=dn(),hr=ot(),Xe={},Wc=typeof Uint8Array=="undefined"||!F?T:F(Uint8Array),Ne={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?T:ArrayBuffer,"%ArrayIteratorPrototype%":Qe&&F?F([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Xe,"%AsyncGenerator%":Xe,"%AsyncGeneratorFunction%":Xe,"%AsyncIteratorPrototype%":Xe,"%Atomics%":typeof Atomics=="undefined"?T:Atomics,"%BigInt%":typeof BigInt=="undefined"?T:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?T:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?T:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?T:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Rc,"%eval%":eval,"%EvalError%":Pc,"%Float32Array%":typeof Float32Array=="undefined"?T:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?T:FinalizationRegistry,"%Function%":ga,"%GeneratorFunction%":Xe,"%Int8Array%":typeof Int8Array=="undefined"?T:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?T:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Qe&&F?F(F([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map=="undefined"?T:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Qe||!F?T:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ec,"%Object.getOwnPropertyDescriptor%":mr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?T:Promise,"%Proxy%":typeof Proxy=="undefined"?T:Proxy,"%RangeError%":Ic,"%ReferenceError%":Nc,"%Reflect%":typeof Reflect=="undefined"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?T:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Qe||!F?T:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Qe&&F?F(""[Symbol.iterator]()):T,"%Symbol%":Qe?Symbol:T,"%SyntaxError%":rr,"%ThrowTypeError%":_c,"%TypedArray%":Wc,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?T:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?T:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?T:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?T:Uint32Array,"%URIError%":Cc,"%WeakMap%":typeof WeakMap=="undefined"?T:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?T:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?T:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":xa,"%Object.defineProperty%":kc,"%Object.getPrototypeOf%":Mc,"%Math.abs%":Fc,"%Math.floor%":Oc,"%Math.max%":Lc,"%Math.min%":Bc,"%Math.pow%":Uc,"%Math.round%":qc,"%Math.sign%":$c,"%Reflect.getPrototypeOf%":Dc};if(F)try{null.error}catch(t){ya=F(F(t)),Ne["%Error.prototype%"]=ya}var ya,jc=function t(r){var e;if(r==="%AsyncFunction%")e=mn("async function () {}");else if(r==="%GeneratorFunction%")e=mn("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=mn("async function* () {}");else if(r==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(e=F(o.prototype))}return Ne[r]=e,e},ma={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},gr=Re(),it=an(),Gc=gr.call(hr,Array.prototype.concat),Vc=gr.call(xa,Array.prototype.splice),ha=gr.call(hr,String.prototype.replace),at=gr.call(hr,String.prototype.slice),zc=gr.call(hr,RegExp.prototype.exec),Yc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Hc=/\\(\\)?/g,Jc=function(r){var e=at(r,0,1),n=at(r,-1);if(e==="%"&&n!=="%")throw new rr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new rr("invalid intrinsic syntax, expected opening `%`");var o=[];return ha(r,Yc,function(i,u,f,c){o[o.length]=f?ha(c,Hc,"$1"):u||i}),o},Kc=function(r,e){var n=r,o;if(it(ma,n)&&(o=ma[n],n="%"+o[0]+"%"),it(Ne,n)){var i=Ne[n];if(i===Xe&&(i=jc(n)),typeof i=="undefined"&&!e)throw new er("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new rr("intrinsic "+r+" does not exist!")};va.exports=function(r,e){if(typeof r!="string"||r.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new er('"allowMissing" argument must be a boolean');if(zc(/^%?[^%]*%?$/,r)===null)throw new rr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Jc(r),o=n.length>0?n[0]:"",i=Kc("%"+o+"%",e),u=i.name,f=i.value,c=!1,y=i.alias;y&&(o=y[0],Vc(n,Gc([0,1],y)));for(var m=1,g=!0;m<n.length;m+=1){var v=n[m],b=at(v,0,1),E=at(v,-1);if((b==='"'||b==="'"||b==="`"||E==='"'||E==="'"||E==="`")&&b!==E)throw new rr("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),o+="."+v,u="%"+o+"%",it(Ne,u))f=Ne[u];else if(f!=null){if(!(v in f)){if(!e)throw new er("base intrinsic for "+r+" exists, but the property is not available.");return}if(mr&&m+1>=n.length){var P=mr(f,v);g=!!P,g&&"get"in P&&!("originalValue"in P.get)?f=P.get:f=f[v]}else g=it(f,v),f=f[v];g&&!c&&(Ne[u]=f)}}return f}});var xn=h((Zv,Aa)=>{"use strict";a();s();var wa=nt(),Zc=Qr(),tr=I(),ba=yr();Aa.exports=function(r,e,n){if(!r||typeof r!="object"&&typeof r!="function")throw new tr("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new tr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,c=!!ba&&ba(r,e);if(wa)wa(r,e,{configurable:u===null&&c?c.configurable:!u,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(f||!o&&!i&&!u)r[e]=n;else throw new Zc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var wn=h((ew,Ta)=>{"use strict";a();s();var vn=nt(),Sa=function(){return!!vn};Sa.hasArrayLengthDefineBug=function(){if(!vn)return null;try{return vn([],"length",{value:1}).length!==1}catch(r){return!0}};Ta.exports=Sa});var Na=h((nw,Ia)=>{"use strict";a();s();var Qc=gn(),Ea=xn(),Xc=wn()(),Ra=yr(),Pa=I(),ed=Qc("%Math.floor%");Ia.exports=function(r,e){if(typeof r!="function")throw new Pa("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||ed(e)!==e)throw new Pa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&Ra){var u=Ra(r,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(i=!1)}return(o||i||!n)&&(Xc?Ea(r,"length",e,!0,!0):Ea(r,"length",e)),r}});var Fa=h((aw,Ca)=>{"use strict";a();s();var rd=gn(),st=rd("%Object.defineProperty%",!0)||!1;if(st)try{st({},"a",{value:1})}catch(t){st=!1}Ca.exports=st});var ft=h((pw,ut)=>{"use strict";a();s();var bn=Re(),pt=V(),td=Na(),nd=I(),Ba=pt("%Function.prototype.apply%"),Ua=pt("%Function.prototype.call%"),qa=pt("%Reflect.apply%",!0)||bn.call(Ua,Ba),Oa=Fa(),od=pt("%Math.max%");ut.exports=function(r){if(typeof r!="function")throw new nd("a function is required");var e=qa(bn,Ua,arguments);return td(e,1+od(0,r.length-(arguments.length-1)),!0)};var La=function(){return qa(bn,Ba,arguments)};Oa?Oa(ut.exports,"apply",{value:La}):ut.exports.apply=La});var An=h((cw,ka)=>{"use strict";a();s();var $a=Object.prototype.toString;ka.exports=function(r){var e=$a.call(r),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&$a.call(r.callee)==="[object Function]"),n}});var Ya=h((mw,za)=>{"use strict";a();s();var Va;Object.keys||(xr=Object.prototype.hasOwnProperty,Sn=Object.prototype.toString,_a=An(),Tn=Object.prototype.propertyIsEnumerable,Ma=!Tn.call({toString:null},"toString"),Da=Tn.call(function(){},"prototype"),vr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],lt=function(t){var r=t.constructor;return r&&r.prototype===t},Wa={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},ja=function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Wa["$"+t]&&xr.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{lt(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),Ga=function(t){if(typeof window=="undefined"||!ja)return lt(t);try{return lt(t)}catch(r){return!1}},Va=function(r){var e=r!==null&&typeof r=="object",n=Sn.call(r)==="[object Function]",o=_a(r),i=e&&Sn.call(r)==="[object String]",u=[];if(!e&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var f=Da&&n;if(i&&r.length>0&&!xr.call(r,0))for(var c=0;c<r.length;++c)u.push(String(c));if(o&&r.length>0)for(var y=0;y<r.length;++y)u.push(String(y));else for(var m in r)!(f&&m==="prototype")&&xr.call(r,m)&&u.push(String(m));if(Ma)for(var g=Ga(r),v=0;v<vr.length;++v)!(g&&vr[v]==="constructor")&&xr.call(r,vr[v])&&u.push(vr[v]);return u});var xr,Sn,_a,Tn,Ma,Da,vr,lt,Wa,ja,Ga;za.exports=Va});var Za=h((xw,Ka)=>{"use strict";a();s();var id=Array.prototype.slice,ad=An(),Ha=Object.keys,ct=Ha?function(r){return Ha(r)}:Ya(),Ja=Object.keys;ct.shim=function(){if(Object.keys){var r=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);r||(Object.keys=function(n){return ad(n)?Ja(id.call(n)):Ja(n)})}else Object.keys=ct;return Object.keys||ct};Ka.exports=ct});var wr=h((bw,rs)=>{"use strict";a();s();var sd=Za(),ud=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",pd=Object.prototype.toString,fd=Array.prototype.concat,Qa=xn(),ld=function(t){return typeof t=="function"&&pd.call(t)==="[object Function]"},Xa=wn()(),cd=function(t,r,e,n){if(r in t){if(n===!0){if(t[r]===e)return}else if(!ld(n)||!n())return}Xa?Qa(t,r,e,!0):Qa(t,r,e)},es=function(t,r){var e=arguments.length>2?arguments[2]:{},n=sd(r);ud&&(n=fd.call(n,Object.getOwnPropertySymbols(r)));for(var o=0;o<n.length;o+=1)cd(t,n[o],r[n[o]],e[n[o]])};es.supportsDescriptors=!!Xa;rs.exports=es});var M=h((Tw,os)=>{"use strict";a();s();var ts=V(),ns=ft(),dd=ns(ts("String.prototype.indexOf"));os.exports=function(r,e){var n=ts(r,!!e);return typeof n=="function"&&dd(r,".prototype.")>-1?ns(n):n}});var ss=h((Pw,as)=>{"use strict";a();s();var yd=V(),is=yd("%Array%"),md=!is.isArray&&M()("Object.prototype.toString");as.exports=is.isArray||function(r){return md(r)==="[object Array]"}});var En=h((Cw,us)=>{"use strict";a();s();us.exports=ss()});var fs=h((Lw,ps)=>{"use strict";a();s();var hd=V(),gd=M(),xd=I(),vd=En(),wd=hd("%Reflect.apply%",!0)||gd("Function.prototype.apply");ps.exports=function(r,e){var n=arguments.length>2?arguments[2]:[];if(!vd(n))throw new xd("Assertion failed: optional `argumentsList`, if provided, must be a List");return wd(r,e,n)}});function ls(){throw new Error("setTimeout has not been defined")}function cs(){throw new Error("clearTimeout has not been defined")}function ds(t){if(ye===setTimeout)return setTimeout(t,0);if((ye===ls||!ye)&&setTimeout)return ye=setTimeout,setTimeout(t,0);try{return ye(t,0)}catch(r){try{return ye.call(null,t,0)}catch(e){return ye.call(this,t,0)}}}function bd(t){if(me===clearTimeout)return clearTimeout(t);if((me===cs||!me)&&clearTimeout)return me=clearTimeout,clearTimeout(t);try{return me(t)}catch(r){try{return me.call(null,t)}catch(e){return me.call(this,t)}}}function Ad(){!or||!Ce||(or=!1,Ce.length?te=Ce.concat(te):dt=-1,te.length&&ys())}function ys(){if(!or){var t=ds(Ad);or=!0;for(var r=te.length;r;){for(Ce=te,te=[];++dt<r;)Ce&&Ce[dt].run();dt=-1,r=te.length}Ce=null,or=!1,bd(t)}}function Sd(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];te.push(new ms(t,r)),te.length===1&&!or&&ds(ys)}function ms(t,r){this.fun=t,this.array=r}function Fe(){}function Md(t){throw new Error("process.binding is not supported")}function Dd(){return"/"}function Wd(t){throw new Error("process.chdir is not supported")}function jd(){return 0}function Vd(t){var r=Gd.call(nr)*.001,e=Math.floor(r),n=Math.floor(r%1*1e9);return t&&(e=e-t[0],n=n-t[1],n<0&&(e--,n+=1e9)),[e,n]}function Yd(){var t=new Date,r=t-zd;return r/1e3}var ye,me,te,or,Ce,dt,Td,Ed,Rd,Pd,Id,Nd,Cd,Fd,Od,Ld,Bd,Ud,qd,$d,kd,_d,nr,Gd,zd,Hd,br,hs=Ve(()=>{"use strict";a();s();ye=ls,me=cs;typeof globalThis.setTimeout=="function"&&(ye=setTimeout);typeof globalThis.clearTimeout=="function"&&(me=clearTimeout);te=[],or=!1,dt=-1;ms.prototype.run=function(){this.fun.apply(null,this.array)};Td="browser",Ed="browser",Rd=!0,Pd={},Id=[],Nd="",Cd={},Fd={},Od={};Ld=Fe,Bd=Fe,Ud=Fe,qd=Fe,$d=Fe,kd=Fe,_d=Fe;nr=globalThis.performance||{},Gd=nr.now||nr.mozNow||nr.msNow||nr.oNow||nr.webkitNow||function(){return new Date().getTime()};zd=new Date;Hd={nextTick:Sd,title:Td,browser:Rd,env:Pd,argv:Id,version:Nd,versions:Cd,on:Ld,addListener:Bd,once:Ud,off:qd,removeListener:$d,removeAllListeners:kd,emit:_d,binding:Md,cwd:Dd,chdir:Wd,umask:jd,hrtime:Vd,platform:Ed,release:Fd,config:Od,uptime:Yd},br=Hd});var Rn,Pn,gs=Ve(()=>{"use strict";a();s();typeof Object.create=="function"?Rn=function(r,e){r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:Rn=function(r,e){r.super_=e;var n=function(){};n.prototype=e.prototype,r.prototype=new n,r.prototype.constructor=r};Pn=Rn});var Es={};Yt(Es,{_extend:()=>qn,debuglog:()=>xs,default:()=>oy,deprecate:()=>On,format:()=>gt,inherits:()=>Pn,inspect:()=>Y,isArray:()=>Ln,isBoolean:()=>xt,isBuffer:()=>As,isDate:()=>ht,isError:()=>Sr,isFunction:()=>Tr,isNull:()=>Er,isNullOrUndefined:()=>vs,isNumber:()=>Bn,isObject:()=>Oe,isPrimitive:()=>bs,isRegExp:()=>Ar,isString:()=>Rr,isSymbol:()=>ws,isUndefined:()=>z,log:()=>Ss});function gt(t){if(!Rr(t)){for(var r=[],e=0;e<arguments.length;e++)r.push(Y(arguments[e]));return r.join(" ")}for(var e=1,n=arguments,o=n.length,i=String(t).replace(Jd,function(f){if(f==="%%")return"%";if(e>=o)return f;switch(f){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(c){return"[Circular]"}default:return f}}),u=n[e];e<o;u=n[++e])Er(u)||!Oe(u)?i+=" "+u:i+=" "+Y(u);return i}function On(t,r){if(z(globalThis.process))return function(){return On(t,r).apply(this,arguments)};if(br.noDeprecation===!0)return t;var e=!1;function n(){if(!e){if(br.throwDeprecation)throw new Error(r);br.traceDeprecation?console.trace(r):console.error(r),e=!0}return t.apply(this,arguments)}return n}function xs(t){if(z(In)&&(In=br.env.NODE_DEBUG||""),t=t.toUpperCase(),!yt[t])if(new RegExp("\\b"+t+"\\b","i").test(In)){var r=0;yt[t]=function(){var e=gt.apply(null,arguments);console.error("%s %d: %s",t,r,e)}}else yt[t]=function(){};return yt[t]}function Y(t,r){var e={seen:[],stylize:Zd};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),xt(r)?e.showHidden=r:r&&qn(e,r),z(e.showHidden)&&(e.showHidden=!1),z(e.depth)&&(e.depth=2),z(e.colors)&&(e.colors=!1),z(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=Kd),mt(e,t,e.depth)}function Kd(t,r){var e=Y.styles[r];return e?"\x1B["+Y.colors[e][0]+"m"+t+"\x1B["+Y.colors[e][1]+"m":t}function Zd(t,r){return t}function Qd(t){var r={};return t.forEach(function(e,n){r[e]=!0}),r}function mt(t,r,e){if(t.customInspect&&r&&Tr(r.inspect)&&r.inspect!==Y&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(e,t);return Rr(n)||(n=mt(t,n,e)),n}var o=Xd(t,r);if(o)return o;var i=Object.keys(r),u=Qd(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(r)),Sr(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Nn(r);if(i.length===0){if(Tr(r)){var f=r.name?": "+r.name:"";return t.stylize("[Function"+f+"]","special")}if(Ar(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(ht(r))return t.stylize(Date.prototype.toString.call(r),"date");if(Sr(r))return Nn(r)}var c="",y=!1,m=["{","}"];if(Ln(r)&&(y=!0,m=["[","]"]),Tr(r)){var g=r.name?": "+r.name:"";c=" [Function"+g+"]"}if(Ar(r)&&(c=" "+RegExp.prototype.toString.call(r)),ht(r)&&(c=" "+Date.prototype.toUTCString.call(r)),Sr(r)&&(c=" "+Nn(r)),i.length===0&&(!y||r.length==0))return m[0]+c+m[1];if(e<0)return Ar(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var v;return y?v=ey(t,r,e,u,i):v=i.map(function(b){return Fn(t,r,e,u,b,y)}),t.seen.pop(),ry(v,c,m)}function Xd(t,r){if(z(r))return t.stylize("undefined","undefined");if(Rr(r)){var e="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(e,"string")}if(Bn(r))return t.stylize(""+r,"number");if(xt(r))return t.stylize(""+r,"boolean");if(Er(r))return t.stylize("null","null")}function Nn(t){return"["+Error.prototype.toString.call(t)+"]"}function ey(t,r,e,n,o){for(var i=[],u=0,f=r.length;u<f;++u)Ts(r,String(u))?i.push(Fn(t,r,e,n,String(u),!0)):i.push("");return o.forEach(function(c){c.match(/^\d+$/)||i.push(Fn(t,r,e,n,c,!0))}),i}function Fn(t,r,e,n,o,i){var u,f,c;if(c=Object.getOwnPropertyDescriptor(r,o)||{value:r[o]},c.get?c.set?f=t.stylize("[Getter/Setter]","special"):f=t.stylize("[Getter]","special"):c.set&&(f=t.stylize("[Setter]","special")),Ts(n,o)||(u="["+o+"]"),f||(t.seen.indexOf(c.value)<0?(Er(e)?f=mt(t,c.value,null):f=mt(t,c.value,e-1),f.indexOf(`
2
+ `)>-1&&(i?f=f.split(`
3
3
  `).map(function(y){return" "+y}).join(`
4
- `).substr(2):p=`
5
- `+p.split(`
4
+ `).substr(2):f=`
5
+ `+f.split(`
6
6
  `).map(function(y){return" "+y}).join(`
7
- `))):p=t.stylize("[Circular]","special")),z(u)){if(i&&o.match(/^\d+$/))return p;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+p}function ey(t,e,r){var n=0,o=t.reduce(function(i,u){return n++,u.indexOf(`
8
- `)>=0&&n++,i+u.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(e===""?"":e+`
7
+ `))):f=t.stylize("[Circular]","special")),z(u)){if(i&&o.match(/^\d+$/))return f;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+f}function ry(t,r,e){var n=0,o=t.reduce(function(i,u){return n++,u.indexOf(`
8
+ `)>=0&&n++,i+u.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?e[0]+(r===""?"":r+`
9
9
  `)+" "+t.join(`,
10
- `)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function Ln(t){return Array.isArray(t)}function gt(t){return typeof t=="boolean"}function Tr(t){return t===null}function vs(t){return t==null}function Bn(t){return typeof t=="number"}function Rr(t){return typeof t=="string"}function ws(t){return typeof t=="symbol"}function z(t){return t===void 0}function Ar(t){return Oe(t)&&Un(t)==="[object RegExp]"}function Oe(t){return typeof t=="object"&&t!==null}function mt(t){return Oe(t)&&Un(t)==="[object Date]"}function Sr(t){return Oe(t)&&(Un(t)==="[object Error]"||t instanceof Error)}function Er(t){return typeof t=="function"}function bs(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function As(t){return f.isBuffer(t)}function Un(t){return Object.prototype.toString.call(t)}function Fn(t){return t<10?"0"+t.toString(10):t.toString(10)}function ty(){var t=new Date,e=[Fn(t.getHours()),Fn(t.getMinutes()),Fn(t.getSeconds())].join(":");return[t.getDate(),ry[t.getMonth()],e].join(" ")}function Ss(){console.log("%s - %s",ty(),ht.apply(null,arguments))}function qn(t,e){if(!e||!Oe(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function Es(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Hd,dt,In,ry,ny,Rs=ze(()=>{"use strict";a();s();hs();gs();Hd=/%[sdj%]/g;dt={};V.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};V.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};ry=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ny={inherits:Pn,_extend:qn,log:Ss,isBuffer:As,isPrimitive:bs,isFunction:Er,isError:Sr,isDate:mt,isObject:Oe,isRegExp:Ar,isUndefined:z,isSymbol:ws,isString:Rr,isNumber:Bn,isNullOrUndefined:vs,isNull:Tr,isBoolean:gt,isArray:Ln,inspect:V,deprecate:On,format:ht,debuglog:xs}});var Ps=m((zw,xt)=>{"use strict";a();s();var Le=(Rs(),No(Ts));if(Le&&Le.default){xt.exports=Le.default;for(let t in Le)xt.exports[t]=Le[t]}else Le&&(xt.exports=Le)});var Ns=m((Hw,Is)=>{"use strict";a();s();Is.exports=Ps().inspect});var Fr=m((Zw,Js)=>{"use strict";a();s();var Vn=typeof Map=="function"&&Map.prototype,$n=Object.getOwnPropertyDescriptor&&Vn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wt=Vn&&$n&&typeof $n.get=="function"?$n.get:null,Fs=Vn&&Map.prototype.forEach,Yn=typeof Set=="function"&&Set.prototype,kn=Object.getOwnPropertyDescriptor&&Yn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bt=Yn&&kn&&typeof kn.get=="function"?kn.get:null,Cs=Yn&&Set.prototype.forEach,oy=typeof WeakMap=="function"&&WeakMap.prototype,Ir=oy?WeakMap.prototype.has:null,iy=typeof WeakSet=="function"&&WeakSet.prototype,Nr=iy?WeakSet.prototype.has:null,ay=typeof WeakRef=="function"&&WeakRef.prototype,Os=ay?WeakRef.prototype.deref:null,sy=Boolean.prototype.valueOf,uy=Object.prototype.toString,fy=Function.prototype.toString,py=String.prototype.match,Hn=String.prototype.slice,de=String.prototype.replace,ly=String.prototype.toUpperCase,Ls=String.prototype.toLowerCase,Ws=RegExp.prototype.test,Bs=Array.prototype.concat,Y=Array.prototype.join,cy=Array.prototype.slice,Us=Math.floor,Dn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_n=Object.getOwnPropertySymbols,Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ir=typeof Symbol=="function"&&typeof Symbol.iterator=="object",O=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ir||!0)?Symbol.toStringTag:null,js=Object.prototype.propertyIsEnumerable,qs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $s(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ws.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Us(-t):Us(t);if(n!==t){var o=String(n),i=Hn.call(e,o.length+1);return de.call(o,r,"$&_")+"."+de.call(de.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,r,"$&_")}var jn=Ns(),ks=jn.custom,_s=Vs(ks)?ks:null,Gs={__proto__:null,double:'"',single:"'"},dy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Js.exports=function t(e,r,n,o){var i=r||{};if(ee(i,"quoteStyle")&&!ee(Gs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ee(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=ee(i,"customInspect")?i.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ee(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ee(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Hs(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return p?$s(e,c):c}if(typeof e=="bigint"){var y=String(e)+"n";return p?$s(e,y):y}var h=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return Gn(e)?"[Array]":"[Object]";var g=Cy(i,n);if(typeof o=="undefined")o=[];else if(Ys(o,e)>=0)return"[Circular]";function v(We,Wr,Ip){if(Wr&&(o=cy.call(o),o.push(Wr)),Ip){var Eo={depth:i.depth};return ee(i,"quoteStyle")&&(Eo.quoteStyle=i.quoteStyle),t(We,Eo,n+1,o)}return t(We,i,n+1,o)}if(typeof e=="function"&&!Ms(e)){var b=Ay(e),T=vt(e,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(T.length>0?" { "+Y.call(T,", ")+" }":"")}if(Vs(e)){var R=ir?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wn.call(e);return typeof e=="object"&&!ir?Pr(R):R}if(Iy(e)){for(var U="<"+Ls.call(String(e.nodeName)),$=e.attributes||[],K=0;K<$.length;K++)U+=" "+$[K].name+"="+zs(yy($[K].value),"double",i);return U+=">",e.childNodes&&e.childNodes.length&&(U+="..."),U+="</"+Ls.call(String(e.nodeName))+">",U}if(Gn(e)){if(e.length===0)return"[]";var Ae=vt(e,v);return g&&!Fy(Ae)?"["+zn(Ae,g)+"]":"[ "+Y.call(Ae,", ")+" ]"}if(hy(e)){var lr=vt(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!js.call(e,"cause")?"{ ["+String(e)+"] "+Y.call(Bs.call("[cause]: "+v(e.cause),lr),", ")+" }":lr.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Y.call(lr,", ")+" }"}if(typeof e=="object"&&u){if(_s&&typeof e[_s]=="function"&&jn)return jn(e,{depth:h-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Sy(e)){var Dr=[];return Fs&&Fs.call(e,function(We,Wr){Dr.push(v(Wr,e,!0)+" => "+v(We,e))}),Ds("Map",wt.call(e),Dr,g)}if(Ry(e)){var bo=[];return Cs&&Cs.call(e,function(We){bo.push(v(We,e))}),Ds("Set",bt.call(e),bo,g)}if(Ey(e))return Mn("WeakMap");if(Py(e))return Mn("WeakSet");if(Ty(e))return Mn("WeakRef");if(xy(e))return Pr(v(Number(e)));if(wy(e))return Pr(v(Dn.call(e)));if(vy(e))return Pr(sy.call(e));if(gy(e))return Pr(v(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!my(e)&&!Ms(e)){var Wt=vt(e,v),Ao=qs?qs(e)===Object.prototype:e instanceof Object||e.constructor===Object,jt=e instanceof Object?"":"null prototype",So=!Ao&&O&&Object(e)===e&&O in e?Hn.call(ye(e),8,-1):jt?"Object":"",Pp=Ao||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Gt=Pp+(So||jt?"["+Y.call(Bs.call([],So||[],jt||[]),": ")+"] ":"");return Wt.length===0?Gt+"{}":g?Gt+"{"+zn(Wt,g)+"}":Gt+"{ "+Y.call(Wt,", ")+" }"}return String(e)};function zs(t,e,r){var n=r.quoteStyle||e,o=Gs[n];return o+t+o}function yy(t){return de.call(String(t),/"/g,"&quot;")}function Gn(t){return ye(t)==="[object Array]"&&(!O||!(typeof t=="object"&&O in t))}function my(t){return ye(t)==="[object Date]"&&(!O||!(typeof t=="object"&&O in t))}function Ms(t){return ye(t)==="[object RegExp]"&&(!O||!(typeof t=="object"&&O in t))}function hy(t){return ye(t)==="[object Error]"&&(!O||!(typeof t=="object"&&O in t))}function gy(t){return ye(t)==="[object String]"&&(!O||!(typeof t=="object"&&O in t))}function xy(t){return ye(t)==="[object Number]"&&(!O||!(typeof t=="object"&&O in t))}function vy(t){return ye(t)==="[object Boolean]"&&(!O||!(typeof t=="object"&&O in t))}function Vs(t){if(ir)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Wn)return!1;try{return Wn.call(t),!0}catch(e){}return!1}function wy(t){if(!t||typeof t!="object"||!Dn)return!1;try{return Dn.call(t),!0}catch(e){}return!1}var by=Object.prototype.hasOwnProperty||function(t){return t in this};function ee(t,e){return by.call(t,e)}function ye(t){return uy.call(t)}function Ay(t){if(t.name)return t.name;var e=py.call(fy.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Ys(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Sy(t){if(!wt||!t||typeof t!="object")return!1;try{wt.call(t);try{bt.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function Ey(t){if(!Ir||!t||typeof t!="object")return!1;try{Ir.call(t,Ir);try{Nr.call(t,Nr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function Ty(t){if(!Os||!t||typeof t!="object")return!1;try{return Os.call(t),!0}catch(e){}return!1}function Ry(t){if(!bt||!t||typeof t!="object")return!1;try{bt.call(t);try{wt.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function Py(t){if(!Nr||!t||typeof t!="object")return!1;try{Nr.call(t,Nr);try{Ir.call(t,Ir)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function Iy(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Hs(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Hs(Hn.call(t,0,e.maxStringLength),e)+n}var o=dy[e.quoteStyle||"single"];o.lastIndex=0;var i=de.call(de.call(t,o,"\\$1"),/[\x00-\x1f]/g,Ny);return zs(i,"single",e)}function Ny(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+ly.call(e.toString(16))}function Pr(t){return"Object("+t+")"}function Mn(t){return t+" { ? }"}function Ds(t,e,r,n){var o=n?zn(r,n):Y.call(r,", ");return t+" ("+e+") {"+o+"}"}function Fy(t){for(var e=0;e<t.length;e++)if(Ys(t[e],`
11
- `)>=0)return!1;return!0}function Cy(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Y.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Y.call(Array(e+1),r)}}function zn(t,e){if(t.length===0)return"";var r=`
12
- `+e.prev+e.base;return r+Y.call(t,","+r)+`
13
- `+e.prev}function vt(t,e){var r=Gn(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ee(t,o)?e(t[o],t):""}var i=typeof _n=="function"?_n(t):[],u;if(ir){u={};for(var p=0;p<i.length;p++)u["$"+i[p]]=i[p]}for(var c in t)ee(t,c)&&(r&&String(Number(c))===c&&c<t.length||ir&&u["$"+c]instanceof Symbol||(Ws.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof _n=="function")for(var y=0;y<i.length;y++)js.call(t,i[y])&&n.push("["+e(i[y])+"]: "+e(t[i[y]],t));return n}});var At=m((eb,Ks)=>{"use strict";a();s();Ks.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Qs=m((nb,Zs)=>{"use strict";a();s();var Oy=I(),Ly=Fr(),By=At();Zs.exports=function(e,r){if(!By(r))throw new Oy("Assertion failed: IsPropertyKey(P) is not true, got "+Ly(r));return e[r]}});var tu=m((ab,ru)=>{"use strict";a();s();var eu=Function.prototype.toString,ar=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Kn,St;if(typeof ar=="function"&&typeof Object.defineProperty=="function")try{Kn=Object.defineProperty({},"length",{get:function(){throw St}}),St={},ar(function(){throw 42},null,Kn)}catch(t){t!==St&&(ar=null)}else ar=null;var Uy=/^\s*class\b/,Zn=function(e){try{var r=eu.call(e);return Uy.test(r)}catch(n){return!1}},Jn=function(e){try{return Zn(e)?!1:(eu.call(e),!0)}catch(r){return!1}},Et=Object.prototype.toString,qy="[object Object]",$y="[object Function]",ky="[object GeneratorFunction]",_y="[object HTMLAllCollection]",My="[object HTML document.all class]",Dy="[object HTMLCollection]",Wy=typeof Symbol=="function"&&!!Symbol.toStringTag,jy=!(0 in[,]),Qn=function(){return!1};typeof document=="object"&&(Xs=document.all,Et.call(Xs)===Et.call(document.all)&&(Qn=function(e){if((jy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=Et.call(e);return(r===_y||r===My||r===Dy||r===qy)&&e("")==null}catch(n){}return!1}));var Xs;ru.exports=ar?function(e){if(Qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ar(e,null,Kn)}catch(r){if(r!==St)return!1}return!Zn(e)&&Jn(e)}:function(e){if(Qn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Wy)return Jn(e);if(Zn(e))return!1;var r=Et.call(e);return r!==$y&&r!==ky&&!/^\[object HTML/.test(r)?!1:Jn(e)}});var Xn=m((fb,nu)=>{"use strict";a();s();nu.exports=tu()});var su=m((cb,au)=>{"use strict";a();s();var ou=I(),Gy=Qs(),zy=Xn(),Vy=At(),iu=Fr();au.exports=function(e,r){if(!Vy(r))throw new ou("Assertion failed: IsPropertyKey(P) is not true");var n=Gy(e,r);if(n!=null){if(!zy(n))throw new ou(iu(r)+" is not a function: "+iu(n));return n}}});var fu=m((mb,uu)=>{"use strict";a();s();var Yy=pn();uu.exports=function(){return Yy()&&!!Symbol.toStringTag}});var no=m((xb,du)=>{"use strict";a();s();var eo=M(),pu=fu()(),lu,cu,ro,to;pu&&(lu=eo("Object.prototype.hasOwnProperty"),cu=eo("RegExp.prototype.exec"),ro={},Tt=function(){throw ro},to={toString:Tt,valueOf:Tt},typeof Symbol.toPrimitive=="symbol"&&(to[Symbol.toPrimitive]=Tt));var Tt,Hy=eo("Object.prototype.toString"),Jy=Object.getOwnPropertyDescriptor,Ky="[object RegExp]";du.exports=pu?function(e){if(!e||typeof e!="object")return!1;var r=Jy(e,"lastIndex"),n=r&&lu(r,"value");if(!n)return!1;try{cu(e,to)}catch(o){return o===ro}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Hy(e)===Ky}});var oo=m((bb,yu)=>{"use strict";a();s();var Zy=M(),Qy=no(),Xy=Zy("RegExp.prototype.exec"),em=I();yu.exports=function(e){if(!Qy(e))throw new em("`regex` must be a RegExp");return function(n){return Xy(e,n)!==null}}});var hu=m((Eb,mu)=>{"use strict";a();s();mu.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var xu=m((Pb,gu)=>{"use strict";a();s();gu.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var io=m((Fb,vu)=>{"use strict";a();s();var rm=xu();vu.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":rm(e)}});var Au=m((Lb,bu)=>{"use strict";a();s();var wu=I(),tm=Fr(),nm=At(),om=io();bu.exports=function(e,r){if(om(e)!=="Object")throw new wu("Assertion failed: Type(O) is not Object");if(!nm(r))throw new wu("Assertion failed: IsPropertyKey(P) is not true, got "+tm(r));return e[r]}});var Eu=m((qb,Su)=>{"use strict";a();s();var im=G();Su.exports=im("%Math.min%")});var ao=m((_b,Tu)=>{"use strict";a();s();Tu.exports=Number.isNaN||function(e){return e!==e}});var Pu=m((Wb,Ru)=>{"use strict";a();s();var am=ao();Ru.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!am(t)&&t!==1/0&&t!==-1/0}});var Rt=m((zb,Nu)=>{"use strict";a();s();var Iu=G(),sm=Iu("%Math.abs%"),um=Iu("%Math.floor%"),fm=ao(),pm=Pu();Nu.exports=function(e){if(typeof e!="number"||fm(e)||!pm(e))return!1;var r=sm(e);return um(r)===r}});var uo=m((Hb,Fu)=>{"use strict";a();s();var lm=M(),so=I(),cm=Rt(),dm=lm("String.prototype.slice");Fu.exports=function(e,r,n){if(typeof e!="string")throw new so("Assertion failed: `string` must be a String");if(typeof r!="string")throw new so("Assertion failed: `searchValue` must be a String");if(!cm(n)||n<0)throw new so("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,u=n;u<=o-i;u+=1){var p=dm(e,u,u+i);if(p===r)return u}return-1}});var Pt=m((Zb,Cu)=>{"use strict";a();s();var ym=I();Cu.exports=function(e){if(e==null)throw new ym(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var It=m((eA,Ou)=>{"use strict";a();s();var mm=G(),hm=mm("%String%"),gm=I();Ou.exports=function(e){if(typeof e=="symbol")throw new gm("Cannot convert a Symbol value to a string");return hm(e)}});var fo=m((nA,Uu)=>{"use strict";a();s();var xm=Pt(),vm=It(),wm=M(),Lu=wm("String.prototype.replace"),Bu=/^\s$/.test("\u180E"),bm=Bu?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Am=Bu?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Uu.exports=function(){var e=vm(xm(this));return Lu(Lu(e,bm,""),Am,"")}});var po=m((aA,$u)=>{"use strict";a();s();var Sm=fo(),qu="\u200B",sr="\u180E";$u.exports=function(){return String.prototype.trim&&qu.trim()===qu&&sr.trim()===sr&&("_"+sr).trim()==="_"+sr&&(sr+"_").trim()===sr+"_"?String.prototype.trim:Sm}});var _u=m((fA,ku)=>{"use strict";a();s();var Em=wr(),Tm=po();ku.exports=function(){var e=Tm();return Em(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var ju=m((cA,Wu)=>{"use strict";a();s();var Rm=ft(),Pm=wr(),Im=Pt(),Nm=fo(),Mu=po(),Fm=_u(),Cm=Rm(Mu()),Du=function(e){return Im(e),Cm(e)};Pm(Du,{getPolyfill:Mu,implementation:Nm,shim:Fm});Wu.exports=Du});var Yu=m((mA,Vu)=>{"use strict";a();s();var co=G(),lo=co("%Number%"),Om=co("%RegExp%"),Lm=I(),Gu=co("%parseInt%"),Bm=M(),Nt=oo(),zu=Bm("String.prototype.slice"),Um=Nt(/^0b[01]+$/i),qm=Nt(/^0o[0-7]+$/i),$m=Nt(/^[-+]0x[0-9a-f]+$/i),km=["\x85","\u200B","\uFFFE"].join(""),_m=new Om("["+km+"]","g"),Mm=Nt(_m),Dm=ju();Vu.exports=function t(e){if(typeof e!="string")throw new Lm("Assertion failed: `argument` is not a String");if(Um(e))return lo(Gu(zu(e,2),2));if(qm(e))return lo(Gu(zu(e,2),8));if(Mm(e)||$m(e))return NaN;var r=Dm(e);return r!==e?t(r):lo(e)}});var Ku=m((xA,Ju)=>{"use strict";a();s();var Wm=I(),Hu=Rt(),jm=M(),Gm=jm("String.prototype.slice");Ju.exports=function(e,r,n){if(typeof e!="string"||!Hu(r)||arguments.length>2&&!Hu(n))throw new Wm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Gm(e,r,arguments.length>2?n:e.length)}});var Qu=m((bA,Zu)=>{"use strict";a();s();Zu.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var ef=m((EA,Xu)=>{"use strict";a();s();var zm=M()("String.prototype.slice");Xu.exports=function(e,r){return e===r?!0:e.length>r.length?!1:zm(r,0,e.length)===e}});var af=m((PA,of)=>{"use strict";a();s();var re=I(),nf=oo(),Vm=hu(),yo=Fr(),Ym=Au(),Hm=Tn(),Jm=Eu(),Km=uo(),rf=Yu(),te=Ku(),Zm=It(),tf=io(),Qm=Rt(),Xm=Qu(),Cr=ef(),eh=nf(/^\$[0-9]/),rh=nf(/^\$[0-9][0-9]/);of.exports=function(e,r,n,o,i,u){if(typeof e!="string")throw new re("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new re("Assertion failed: `str` must be a String");if(!Qm(n)||n<0)throw new re("Assertion failed: `position` must be a nonnegative integer, got "+yo(n));if(!Hm(o)||!Vm(o,Xm))throw new re("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+yo(o));if(typeof i!="undefined"&&tf(i)!=="Object")throw new re("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new re("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new re("Assertion failed: position > stringLength, got "+yo(n));for(var c=u,y="";c!=="";){var h,g,v;if(Cr("$$",c))h="$$",g="$";else if(Cr("$`",c))h="$`",g=te(r,0,n);else if(Cr("$&",c))h="$&",g=e;else if(Cr("$'",c)){h="$'";var b=e.length,T=n+b;g=te(r,Jm(T,p))}else if(eh(c)){var R=rh(c)?2:1,U=te(c,1,1+R),$=rf(U);if($<0||$>99)throw new re("Assertion failed: `index` must be >= 0 and <= 99");var K=o.length;$>K&&R===2&&(R=1,U=te(U,0,1),$=rf(U)),h=te(c,0,1+R),1<=$&&$<=K?(v=o[$-1],typeof v=="undefined"?g="":g=v):g=h}else if(Cr("$<",c)){var Ae=Km(c,">",0);if(Ae===-1||typeof i=="undefined")h="$<",g=h;else{h=te(c,0,Ae+1);var lr=te(c,2,Ae);if(tf(i)!=="Object")throw new re("Assertion failed: Type(namedCaptures) is not Object");v=Ym(i,lr),typeof v=="undefined"?g="":g=Zm(v)}}else h=te(c,0,1),g=h;var Dr=h.length;c=te(c,Dr),y+=g}return y}});var ho=m((FA,pf)=>{"use strict";a();s();var sf=ps(),th=su(),nh=af(),oh=Xn(),ih=Pt(),Ft=It(),uf=uo(),ah=G(),Ct=M(),sh=nn()(),uh=no(),fh=ah("%Math.max%"),ff=I(),ph=Ct("Array.prototype.push"),mo=Ct("String.prototype.slice"),lh=Ct("String.prototype.indexOf"),ch=Ct("String.prototype.replace");pf.exports=function(e,r){var n=ih(this),o=uh(e);if(o&&lh(mo(e,e.source.length+2),"g")===-1)throw new ff("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(sh&&Symbol.replace){if(e!=null){var i=th(e,Symbol.replace);if(typeof i!="undefined")return sf(i,e,[n,r])}}else if(o)return ch(n,e,r);var u=Ft(n),p=Ft(e),c=oh(r);c||(r=Ft(r));for(var y=p.length,h=fh(1,y),g=[],v=uf(u,p,0);v!==-1;)ph(g,v),v=uf(u,p,v+h);for(var b=0,T="",R=0;R<g.length;R+=1){var U;if(c)U=Ft(sf(r,void 0,[p,g[R],u]));else{if(typeof r!="string")throw new ff("Assertion failed: `replaceValue` should be a string at this point");var $=[];U=nh(p,u,g[R],$,void 0,r)}var K=mo(u,b,g[R]);T+=K+U,b=g[R]+y}return b<u.length&&(T+=mo(u,b)),T}});var go=m((LA,lf)=>{"use strict";a();s();var dh=ho();lf.exports=function(){return String.prototype.replaceAll||dh}});var df=m((qA,cf)=>{"use strict";a();s();var yh=wr(),mh=go();cf.exports=function(){var e=mh();return yh(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var gf=m((_A,hf)=>{"use strict";a();s();var hh=ft(),gh=wr(),yf=ho(),xh=go(),vh=df(),mf=hh(yf);gh(mf,{getPolyfill:xh,implementation:yf,shim:vh});hf.exports=mf});var qx={};Yt(qx,{DynamicSnippetsGenerator:()=>Dt});module.exports=No(qx);a();s();var aF=Up(gf(),1);a();s();a();s();a();s();function P(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();function Or(t){return Object.keys(t)}a();s();a();s();a();s();a();s();a();s();a();s();var wh=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,xf=wh;var bh=typeof self=="object"&&self&&self.Object===Object&&self,Ah=xf||bh||Function("return this")(),vf=Ah;var Sh=vf.Symbol,ne=Sh;a();s();var wf=Object.prototype,Eh=wf.hasOwnProperty,Th=wf.toString,Lr=ne?ne.toStringTag:void 0;function Rh(t){var e=Eh.call(t,Lr),r=t[Lr];try{t[Lr]=void 0;var n=!0}catch(i){}var o=Th.call(t);return n&&(e?t[Lr]=r:delete t[Lr]),o}var bf=Rh;a();s();var Ph=Object.prototype,Ih=Ph.toString;function Nh(t){return Ih.call(t)}var Af=Nh;var Fh="[object Null]",Ch="[object Undefined]",Sf=ne?ne.toStringTag:void 0;function Oh(t){return t==null?t===void 0?Ch:Fh:Sf&&Sf in Object(t)?bf(t):Af(t)}var Ef=Oh;a();s();function Lh(t){return t!=null&&typeof t=="object"}var Tf=Lh;var Bh="[object Symbol]";function Uh(t){return typeof t=="symbol"||Tf(t)&&Ef(t)==Bh}var Rf=Uh;a();s();a();s();function qh(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Pf=qh;a();s();var $h=Array.isArray,If=$h;var kh=1/0,Nf=ne?ne.prototype:void 0,Ff=Nf?Nf.toString:void 0;function Cf(t){if(typeof t=="string")return t;if(If(t))return Pf(t,Cf)+"";if(Rf(t))return Ff?Ff.call(t):"";var e=t+"";return e=="0"&&1/t==-kh?"-0":e}var Of=Cf;a();s();function _h(t){return t==null?"":Of(t)}var me=_h;a();s();a();s();a();s();a();s();a();s();a();s();function Mh(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var Lf=Mh;function Dh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Lf(t,e,r)}var Bf=Dh;a();s();var Wh="\\ud800-\\udfff",jh="\\u0300-\\u036f",Gh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Vh=jh+Gh+zh,Yh="\\ufe0e\\ufe0f",Hh="\\u200d",Jh=RegExp("["+Hh+Wh+Vh+Yh+"]");function Kh(t){return Jh.test(t)}var Ot=Kh;a();s();a();s();function Zh(t){return t.split("")}var Uf=Zh;a();s();var qf="\\ud800-\\udfff",Qh="\\u0300-\\u036f",Xh="\\ufe20-\\ufe2f",eg="\\u20d0-\\u20ff",rg=Qh+Xh+eg,tg="\\ufe0e\\ufe0f",ng="["+qf+"]",xo="["+rg+"]",vo="\\ud83c[\\udffb-\\udfff]",og="(?:"+xo+"|"+vo+")",$f="[^"+qf+"]",kf="(?:\\ud83c[\\udde6-\\uddff]){2}",_f="[\\ud800-\\udbff][\\udc00-\\udfff]",ig="\\u200d",Mf=og+"?",Df="["+tg+"]?",ag="(?:"+ig+"(?:"+[$f,kf,_f].join("|")+")"+Df+Mf+")*",sg=Df+Mf+ag,ug="(?:"+[$f+xo+"?",xo,kf,_f,ng].join("|")+")",fg=RegExp(vo+"(?="+vo+")|"+ug+sg,"g");function pg(t){return t.match(fg)||[]}var Wf=pg;function lg(t){return Ot(t)?Wf(t):Uf(t)}var jf=lg;function cg(t){return function(e){e=me(e);var r=Ot(e)?jf(e):void 0,n=r?r[0]:e.charAt(0),o=r?Bf(r,1).join(""):e.slice(1);return n[t]()+o}}var Gf=cg;var dg=Gf("toUpperCase"),ur=dg;function yg(t){return ur(me(t).toLowerCase())}var zf=yg;a();s();a();s();function mg(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}var Vf=mg;a();s();a();s();a();s();function hg(t){return function(e){return t==null?void 0:t[e]}}var Yf=hg;var gg={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},xg=Yf(gg),Hf=xg;var vg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wg="\\u0300-\\u036f",bg="\\ufe20-\\ufe2f",Ag="\\u20d0-\\u20ff",Sg=wg+bg+Ag,Eg="["+Sg+"]",Tg=RegExp(Eg,"g");function Rg(t){return t=me(t),t&&t.replace(vg,Hf).replace(Tg,"")}var Jf=Rg;a();s();a();s();var Pg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ig(t){return t.match(Pg)||[]}var Kf=Ig;a();s();var Ng=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Fg(t){return Ng.test(t)}var Zf=Fg;a();s();var tp="\\ud800-\\udfff",Cg="\\u0300-\\u036f",Og="\\ufe20-\\ufe2f",Lg="\\u20d0-\\u20ff",Bg=Cg+Og+Lg,np="\\u2700-\\u27bf",op="a-z\\xdf-\\xf6\\xf8-\\xff",Ug="\\xac\\xb1\\xd7\\xf7",qg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$g="\\u2000-\\u206f",kg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ip="A-Z\\xc0-\\xd6\\xd8-\\xde",_g="\\ufe0e\\ufe0f",ap=Ug+qg+$g+kg,sp="['\u2019]",Qf="["+ap+"]",Mg="["+Bg+"]",up="\\d+",Dg="["+np+"]",fp="["+op+"]",pp="[^"+tp+ap+up+np+op+ip+"]",Wg="\\ud83c[\\udffb-\\udfff]",jg="(?:"+Mg+"|"+Wg+")",Gg="[^"+tp+"]",lp="(?:\\ud83c[\\udde6-\\uddff]){2}",cp="[\\ud800-\\udbff][\\udc00-\\udfff]",fr="["+ip+"]",zg="\\u200d",Xf="(?:"+fp+"|"+pp+")",Vg="(?:"+fr+"|"+pp+")",ep="(?:"+sp+"(?:d|ll|m|re|s|t|ve))?",rp="(?:"+sp+"(?:D|LL|M|RE|S|T|VE))?",dp=jg+"?",yp="["+_g+"]?",Yg="(?:"+zg+"(?:"+[Gg,lp,cp].join("|")+")"+yp+dp+")*",Hg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kg=yp+dp+Yg,Zg="(?:"+[Dg,lp,cp].join("|")+")"+Kg,Qg=RegExp([fr+"?"+fp+"+"+ep+"(?="+[Qf,fr,"$"].join("|")+")",Vg+"+"+rp+"(?="+[Qf,fr+Xf,"$"].join("|")+")",fr+"?"+Xf+"+"+ep,fr+"+"+rp,Jg,Hg,up,Zg].join("|"),"g");function Xg(t){return t.match(Qg)||[]}var mp=Xg;function ex(t,e,r){return t=me(t),e=r?void 0:e,e===void 0?Zf(t)?mp(t):Kf(t):t.match(e)||[]}var hp=ex;var rx="['\u2019]",tx=RegExp(rx,"g");function nx(t){return function(e){return Vf(hp(Jf(e).replace(tx,"")),t,"")}}var gp=nx;var ox=gp(function(t,e,r){return e=e.toLowerCase(),t+(r?zf(e):e)}),Lt=ox;a();s();a();s();var oe=class{};a();s();a();s();var he=class extends oe{constructor(r){super();d(this,"value");this.value=r}write(r){typeof this.value=="string"?r.write(this.value):this.value(r)}};var ix=4,Br=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsNewline",!1)}write(e){let r=e.length>0&&e.endsWith(`
14
- `),n=r?e.substring(0,e.length-1):e,o=this.getIndentString(),i=n.replaceAll(`
10
+ `)+" "+e[1]:e[0]+r+" "+t.join(", ")+" "+e[1]}function Ln(t){return Array.isArray(t)}function xt(t){return typeof t=="boolean"}function Er(t){return t===null}function vs(t){return t==null}function Bn(t){return typeof t=="number"}function Rr(t){return typeof t=="string"}function ws(t){return typeof t=="symbol"}function z(t){return t===void 0}function Ar(t){return Oe(t)&&Un(t)==="[object RegExp]"}function Oe(t){return typeof t=="object"&&t!==null}function ht(t){return Oe(t)&&Un(t)==="[object Date]"}function Sr(t){return Oe(t)&&(Un(t)==="[object Error]"||t instanceof Error)}function Tr(t){return typeof t=="function"}function bs(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function As(t){return p.isBuffer(t)}function Un(t){return Object.prototype.toString.call(t)}function Cn(t){return t<10?"0"+t.toString(10):t.toString(10)}function ny(){var t=new Date,r=[Cn(t.getHours()),Cn(t.getMinutes()),Cn(t.getSeconds())].join(":");return[t.getDate(),ty[t.getMonth()],r].join(" ")}function Ss(){console.log("%s - %s",ny(),gt.apply(null,arguments))}function qn(t,r){if(!r||!Oe(r))return t;for(var e=Object.keys(r),n=e.length;n--;)t[e[n]]=r[e[n]];return t}function Ts(t,r){return Object.prototype.hasOwnProperty.call(t,r)}var Jd,yt,In,ty,oy,Rs=Ve(()=>{"use strict";a();s();hs();gs();Jd=/%[sdj%]/g;yt={};Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};ty=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];oy={inherits:Pn,_extend:qn,log:Ss,isBuffer:As,isPrimitive:bs,isFunction:Tr,isError:Sr,isDate:ht,isObject:Oe,isRegExp:Ar,isUndefined:z,isSymbol:ws,isString:Rr,isNumber:Bn,isNullOrUndefined:vs,isNull:Er,isBoolean:xt,isArray:Ln,inspect:Y,deprecate:On,format:gt,debuglog:xs}});var Ps=h((zw,vt)=>{"use strict";a();s();var Le=(Rs(),No(Es));if(Le&&Le.default){vt.exports=Le.default;for(let t in Le)vt.exports[t]=Le[t]}else Le&&(vt.exports=Le)});var Ns=h((Jw,Is)=>{"use strict";a();s();Is.exports=Ps().inspect});var Cr=h((Qw,Js)=>{"use strict";a();s();var zn=typeof Map=="function"&&Map.prototype,$n=Object.getOwnPropertyDescriptor&&zn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,bt=zn&&$n&&typeof $n.get=="function"?$n.get:null,Cs=zn&&Map.prototype.forEach,Yn=typeof Set=="function"&&Set.prototype,kn=Object.getOwnPropertyDescriptor&&Yn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,At=Yn&&kn&&typeof kn.get=="function"?kn.get:null,Fs=Yn&&Set.prototype.forEach,iy=typeof WeakMap=="function"&&WeakMap.prototype,Ir=iy?WeakMap.prototype.has:null,ay=typeof WeakSet=="function"&&WeakSet.prototype,Nr=ay?WeakSet.prototype.has:null,sy=typeof WeakRef=="function"&&WeakRef.prototype,Os=sy?WeakRef.prototype.deref:null,uy=Boolean.prototype.valueOf,py=Object.prototype.toString,fy=Function.prototype.toString,ly=String.prototype.match,Hn=String.prototype.slice,he=String.prototype.replace,cy=String.prototype.toUpperCase,Ls=String.prototype.toLowerCase,Ws=RegExp.prototype.test,Bs=Array.prototype.concat,H=Array.prototype.join,dy=Array.prototype.slice,Us=Math.floor,Dn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_n=Object.getOwnPropertySymbols,Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ir=typeof Symbol=="function"&&typeof Symbol.iterator=="object",L=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ir||!0)?Symbol.toStringTag:null,js=Object.prototype.propertyIsEnumerable,qs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function $s(t,r){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ws.call(/e/,r))return r;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Us(-t):Us(t);if(n!==t){var o=String(n),i=Hn.call(r,o.length+1);return he.call(o,e,"$&_")+"."+he.call(he.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(r,e,"$&_")}var jn=Ns(),ks=jn.custom,_s=zs(ks)?ks:null,Gs={__proto__:null,double:'"',single:"'"},yy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Js.exports=function t(r,e,n,o){var i=e||{};if(ne(i,"quoteStyle")&&!ne(Gs,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ne(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=ne(i,"customInspect")?i.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ne(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ne(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=i.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Hs(r,i);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var c=String(r);return f?$s(r,c):c}if(typeof r=="bigint"){var y=String(r)+"n";return f?$s(r,y):y}var m=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=m&&m>0&&typeof r=="object")return Gn(r)?"[Array]":"[Object]";var g=Oy(i,n);if(typeof o=="undefined")o=[];else if(Ys(o,r)>=0)return"[Circular]";function v(We,jr,Nf){if(jr&&(o=dy.call(o),o.push(jr)),Nf){var To={depth:i.depth};return ne(i,"quoteStyle")&&(To.quoteStyle=i.quoteStyle),t(We,To,n+1,o)}return t(We,i,n+1,o)}if(typeof r=="function"&&!Ms(r)){var b=Sy(r),E=wt(r,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(E.length>0?" { "+H.call(E,", ")+" }":"")}if(zs(r)){var P=ir?he.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wn.call(r);return typeof r=="object"&&!ir?Pr(P):P}if(Ny(r)){for(var U="<"+Ls.call(String(r.nodeName)),$=r.attributes||[],X=0;X<$.length;X++)U+=" "+$[X].name+"="+Vs(my($[X].value),"double",i);return U+=">",r.childNodes&&r.childNodes.length&&(U+="..."),U+="</"+Ls.call(String(r.nodeName))+">",U}if(Gn(r)){if(r.length===0)return"[]";var Ae=wt(r,v);return g&&!Fy(Ae)?"["+Vn(Ae,g)+"]":"[ "+H.call(Ae,", ")+" ]"}if(gy(r)){var lr=wt(r,v);return!("cause"in Error.prototype)&&"cause"in r&&!js.call(r,"cause")?"{ ["+String(r)+"] "+H.call(Bs.call("[cause]: "+v(r.cause),lr),", ")+" }":lr.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+H.call(lr,", ")+" }"}if(typeof r=="object"&&u){if(_s&&typeof r[_s]=="function"&&jn)return jn(r,{depth:m-n});if(u!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Ty(r)){var Wr=[];return Cs&&Cs.call(r,function(We,jr){Wr.push(v(jr,r,!0)+" => "+v(We,r))}),Ds("Map",bt.call(r),Wr,g)}if(Py(r)){var bo=[];return Fs&&Fs.call(r,function(We){bo.push(v(We,r))}),Ds("Set",At.call(r),bo,g)}if(Ey(r))return Mn("WeakMap");if(Iy(r))return Mn("WeakSet");if(Ry(r))return Mn("WeakRef");if(vy(r))return Pr(v(Number(r)));if(by(r))return Pr(v(Dn.call(r)));if(wy(r))return Pr(uy.call(r));if(xy(r))return Pr(v(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!hy(r)&&!Ms(r)){var Wt=wt(r,v),Ao=qs?qs(r)===Object.prototype:r instanceof Object||r.constructor===Object,jt=r instanceof Object?"":"null prototype",So=!Ao&&L&&Object(r)===r&&L in r?Hn.call(ge(r),8,-1):jt?"Object":"",If=Ao||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",Gt=If+(So||jt?"["+H.call(Bs.call([],So||[],jt||[]),": ")+"] ":"");return Wt.length===0?Gt+"{}":g?Gt+"{"+Vn(Wt,g)+"}":Gt+"{ "+H.call(Wt,", ")+" }"}return String(r)};function Vs(t,r,e){var n=e.quoteStyle||r,o=Gs[n];return o+t+o}function my(t){return he.call(String(t),/"/g,"&quot;")}function Gn(t){return ge(t)==="[object Array]"&&(!L||!(typeof t=="object"&&L in t))}function hy(t){return ge(t)==="[object Date]"&&(!L||!(typeof t=="object"&&L in t))}function Ms(t){return ge(t)==="[object RegExp]"&&(!L||!(typeof t=="object"&&L in t))}function gy(t){return ge(t)==="[object Error]"&&(!L||!(typeof t=="object"&&L in t))}function xy(t){return ge(t)==="[object String]"&&(!L||!(typeof t=="object"&&L in t))}function vy(t){return ge(t)==="[object Number]"&&(!L||!(typeof t=="object"&&L in t))}function wy(t){return ge(t)==="[object Boolean]"&&(!L||!(typeof t=="object"&&L in t))}function zs(t){if(ir)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Wn)return!1;try{return Wn.call(t),!0}catch(r){}return!1}function by(t){if(!t||typeof t!="object"||!Dn)return!1;try{return Dn.call(t),!0}catch(r){}return!1}var Ay=Object.prototype.hasOwnProperty||function(t){return t in this};function ne(t,r){return Ay.call(t,r)}function ge(t){return py.call(t)}function Sy(t){if(t.name)return t.name;var r=ly.call(fy.call(t),/^function\s*([\w$]+)/);return r?r[1]:null}function Ys(t,r){if(t.indexOf)return t.indexOf(r);for(var e=0,n=t.length;e<n;e++)if(t[e]===r)return e;return-1}function Ty(t){if(!bt||!t||typeof t!="object")return!1;try{bt.call(t);try{At.call(t)}catch(r){return!0}return t instanceof Map}catch(r){}return!1}function Ey(t){if(!Ir||!t||typeof t!="object")return!1;try{Ir.call(t,Ir);try{Nr.call(t,Nr)}catch(r){return!0}return t instanceof WeakMap}catch(r){}return!1}function Ry(t){if(!Os||!t||typeof t!="object")return!1;try{return Os.call(t),!0}catch(r){}return!1}function Py(t){if(!At||!t||typeof t!="object")return!1;try{At.call(t);try{bt.call(t)}catch(r){return!0}return t instanceof Set}catch(r){}return!1}function Iy(t){if(!Nr||!t||typeof t!="object")return!1;try{Nr.call(t,Nr);try{Ir.call(t,Ir)}catch(r){return!0}return t instanceof WeakSet}catch(r){}return!1}function Ny(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Hs(t,r){if(t.length>r.maxStringLength){var e=t.length-r.maxStringLength,n="... "+e+" more character"+(e>1?"s":"");return Hs(Hn.call(t,0,r.maxStringLength),r)+n}var o=yy[r.quoteStyle||"single"];o.lastIndex=0;var i=he.call(he.call(t,o,"\\$1"),/[\x00-\x1f]/g,Cy);return Vs(i,"single",r)}function Cy(t){var r=t.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return e?"\\"+e:"\\x"+(r<16?"0":"")+cy.call(r.toString(16))}function Pr(t){return"Object("+t+")"}function Mn(t){return t+" { ? }"}function Ds(t,r,e,n){var o=n?Vn(e,n):H.call(e,", ");return t+" ("+r+") {"+o+"}"}function Fy(t){for(var r=0;r<t.length;r++)if(Ys(t[r],`
11
+ `)>=0)return!1;return!0}function Oy(t,r){var e;if(t.indent===" ")e=" ";else if(typeof t.indent=="number"&&t.indent>0)e=H.call(Array(t.indent+1)," ");else return null;return{base:e,prev:H.call(Array(r+1),e)}}function Vn(t,r){if(t.length===0)return"";var e=`
12
+ `+r.prev+r.base;return e+H.call(t,","+e)+`
13
+ `+r.prev}function wt(t,r){var e=Gn(t),n=[];if(e){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ne(t,o)?r(t[o],t):""}var i=typeof _n=="function"?_n(t):[],u;if(ir){u={};for(var f=0;f<i.length;f++)u["$"+i[f]]=i[f]}for(var c in t)ne(t,c)&&(e&&String(Number(c))===c&&c<t.length||ir&&u["$"+c]instanceof Symbol||(Ws.call(/[^\w$]/,c)?n.push(r(c,t)+": "+r(t[c],t)):n.push(c+": "+r(t[c],t))));if(typeof _n=="function")for(var y=0;y<i.length;y++)js.call(t,i[y])&&n.push("["+r(i[y])+"]: "+r(t[i[y]],t));return n}});var St=h((rb,Ks)=>{"use strict";a();s();Ks.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var Qs=h((ob,Zs)=>{"use strict";a();s();var Ly=I(),By=Cr(),Uy=St();Zs.exports=function(r,e){if(!Uy(e))throw new Ly("Assertion failed: IsPropertyKey(P) is not true, got "+By(e));return r[e]}});var tu=h((sb,ru)=>{"use strict";a();s();var eu=Function.prototype.toString,ar=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Kn,Tt;if(typeof ar=="function"&&typeof Object.defineProperty=="function")try{Kn=Object.defineProperty({},"length",{get:function(){throw Tt}}),Tt={},ar(function(){throw 42},null,Kn)}catch(t){t!==Tt&&(ar=null)}else ar=null;var qy=/^\s*class\b/,Zn=function(r){try{var e=eu.call(r);return qy.test(e)}catch(n){return!1}},Jn=function(r){try{return Zn(r)?!1:(eu.call(r),!0)}catch(e){return!1}},Et=Object.prototype.toString,$y="[object Object]",ky="[object Function]",_y="[object GeneratorFunction]",My="[object HTMLAllCollection]",Dy="[object HTML document.all class]",Wy="[object HTMLCollection]",jy=typeof Symbol=="function"&&!!Symbol.toStringTag,Gy=!(0 in[,]),Qn=function(){return!1};typeof document=="object"&&(Xs=document.all,Et.call(Xs)===Et.call(document.all)&&(Qn=function(r){if((Gy||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var e=Et.call(r);return(e===My||e===Dy||e===Wy||e===$y)&&r("")==null}catch(n){}return!1}));var Xs;ru.exports=ar?function(r){if(Qn(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{ar(r,null,Kn)}catch(e){if(e!==Tt)return!1}return!Zn(r)&&Jn(r)}:function(r){if(Qn(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(jy)return Jn(r);if(Zn(r))return!1;var e=Et.call(r);return e!==ky&&e!==_y&&!/^\[object HTML/.test(e)?!1:Jn(r)}});var Xn=h((fb,nu)=>{"use strict";a();s();nu.exports=tu()});var su=h((db,au)=>{"use strict";a();s();var ou=I(),Vy=Qs(),zy=Xn(),Yy=St(),iu=Cr();au.exports=function(r,e){if(!Yy(e))throw new ou("Assertion failed: IsPropertyKey(P) is not true");var n=Vy(r,e);if(n!=null){if(!zy(n))throw new ou(iu(e)+" is not a function: "+iu(n));return n}}});var pu=h((hb,uu)=>{"use strict";a();s();var Hy=fn();uu.exports=function(){return Hy()&&!!Symbol.toStringTag}});var no=h((vb,du)=>{"use strict";a();s();var eo=M(),fu=pu()(),lu,cu,ro,to;fu&&(lu=eo("Object.prototype.hasOwnProperty"),cu=eo("RegExp.prototype.exec"),ro={},Rt=function(){throw ro},to={toString:Rt,valueOf:Rt},typeof Symbol.toPrimitive=="symbol"&&(to[Symbol.toPrimitive]=Rt));var Rt,Jy=eo("Object.prototype.toString"),Ky=Object.getOwnPropertyDescriptor,Zy="[object RegExp]";du.exports=fu?function(r){if(!r||typeof r!="object")return!1;var e=Ky(r,"lastIndex"),n=e&&lu(e,"value");if(!n)return!1;try{cu(r,to)}catch(o){return o===ro}}:function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Jy(r)===Zy}});var oo=h((Ab,yu)=>{"use strict";a();s();var Qy=M(),Xy=no(),em=Qy("RegExp.prototype.exec"),rm=I();yu.exports=function(r){if(!Xy(r))throw new rm("`regex` must be a RegExp");return function(n){return em(r,n)!==null}}});var hu=h((Eb,mu)=>{"use strict";a();s();mu.exports=function(r,e){for(var n=0;n<r.length;n+=1)if(!e(r[n],n,r))return!1;return!0}});var xu=h((Ib,gu)=>{"use strict";a();s();gu.exports=function(r){if(r===null)return"Null";if(typeof r=="undefined")return"Undefined";if(typeof r=="function"||typeof r=="object")return"Object";if(typeof r=="number")return"Number";if(typeof r=="boolean")return"Boolean";if(typeof r=="string")return"String"}});var io=h((Fb,vu)=>{"use strict";a();s();var tm=xu();vu.exports=function(r){return typeof r=="symbol"?"Symbol":typeof r=="bigint"?"BigInt":tm(r)}});var Au=h((Bb,bu)=>{"use strict";a();s();var wu=I(),nm=Cr(),om=St(),im=io();bu.exports=function(r,e){if(im(r)!=="Object")throw new wu("Assertion failed: Type(O) is not Object");if(!om(e))throw new wu("Assertion failed: IsPropertyKey(P) is not true, got "+nm(e));return r[e]}});var Tu=h(($b,Su)=>{"use strict";a();s();var am=V();Su.exports=am("%Math.min%")});var ao=h((Mb,Eu)=>{"use strict";a();s();Eu.exports=Number.isNaN||function(r){return r!==r}});var Pu=h((jb,Ru)=>{"use strict";a();s();var sm=ao();Ru.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!sm(t)&&t!==1/0&&t!==-1/0}});var Pt=h((zb,Nu)=>{"use strict";a();s();var Iu=V(),um=Iu("%Math.abs%"),pm=Iu("%Math.floor%"),fm=ao(),lm=Pu();Nu.exports=function(r){if(typeof r!="number"||fm(r)||!lm(r))return!1;var e=um(r);return pm(e)===e}});var uo=h((Jb,Cu)=>{"use strict";a();s();var cm=M(),so=I(),dm=Pt(),ym=cm("String.prototype.slice");Cu.exports=function(r,e,n){if(typeof r!="string")throw new so("Assertion failed: `string` must be a String");if(typeof e!="string")throw new so("Assertion failed: `searchValue` must be a String");if(!dm(n)||n<0)throw new so("Assertion failed: `fromIndex` must be a non-negative integer");var o=r.length;if(e===""&&n<=o)return n;for(var i=e.length,u=n;u<=o-i;u+=1){var f=ym(r,u,u+i);if(f===e)return u}return-1}});var It=h((Qb,Fu)=>{"use strict";a();s();var mm=I();Fu.exports=function(r){if(r==null)throw new mm(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var Nt=h((rA,Ou)=>{"use strict";a();s();var hm=V(),gm=hm("%String%"),xm=I();Ou.exports=function(r){if(typeof r=="symbol")throw new xm("Cannot convert a Symbol value to a string");return gm(r)}});var po=h((oA,Uu)=>{"use strict";a();s();var vm=It(),wm=Nt(),bm=M(),Lu=bm("String.prototype.replace"),Bu=/^\s$/.test("\u180E"),Am=Bu?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Sm=Bu?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Uu.exports=function(){var r=wm(vm(this));return Lu(Lu(r,Am,""),Sm,"")}});var fo=h((sA,$u)=>{"use strict";a();s();var Tm=po(),qu="\u200B",sr="\u180E";$u.exports=function(){return String.prototype.trim&&qu.trim()===qu&&sr.trim()===sr&&("_"+sr).trim()==="_"+sr&&(sr+"_").trim()===sr+"_"?String.prototype.trim:Tm}});var _u=h((fA,ku)=>{"use strict";a();s();var Em=wr(),Rm=fo();ku.exports=function(){var r=Rm();return Em(String.prototype,{trim:r},{trim:function(){return String.prototype.trim!==r}}),r}});var ju=h((dA,Wu)=>{"use strict";a();s();var Pm=ft(),Im=wr(),Nm=It(),Cm=po(),Mu=fo(),Fm=_u(),Om=Pm(Mu()),Du=function(r){return Nm(r),Om(r)};Im(Du,{getPolyfill:Mu,implementation:Cm,shim:Fm});Wu.exports=Du});var Yu=h((hA,zu)=>{"use strict";a();s();var co=V(),lo=co("%Number%"),Lm=co("%RegExp%"),Bm=I(),Gu=co("%parseInt%"),Um=M(),Ct=oo(),Vu=Um("String.prototype.slice"),qm=Ct(/^0b[01]+$/i),$m=Ct(/^0o[0-7]+$/i),km=Ct(/^[-+]0x[0-9a-f]+$/i),_m=["\x85","\u200B","\uFFFE"].join(""),Mm=new Lm("["+_m+"]","g"),Dm=Ct(Mm),Wm=ju();zu.exports=function t(r){if(typeof r!="string")throw new Bm("Assertion failed: `argument` is not a String");if(qm(r))return lo(Gu(Vu(r,2),2));if($m(r))return lo(Gu(Vu(r,2),8));if(Dm(r)||km(r))return NaN;var e=Wm(r);return e!==r?t(e):lo(r)}});var Ku=h((vA,Ju)=>{"use strict";a();s();var jm=I(),Hu=Pt(),Gm=M(),Vm=Gm("String.prototype.slice");Ju.exports=function(r,e,n){if(typeof r!="string"||!Hu(e)||arguments.length>2&&!Hu(n))throw new jm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Vm(r,e,arguments.length>2?n:r.length)}});var Qu=h((AA,Zu)=>{"use strict";a();s();Zu.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var ep=h((EA,Xu)=>{"use strict";a();s();var zm=M()("String.prototype.slice");Xu.exports=function(r,e){return r===e?!0:r.length>e.length?!1:zm(e,0,r.length)===r}});var ip=h((IA,op)=>{"use strict";a();s();var oe=I(),np=oo(),Ym=hu(),yo=Cr(),Hm=Au(),Jm=En(),Km=Tu(),Zm=uo(),rp=Yu(),ie=Ku(),Qm=Nt(),tp=io(),Xm=Pt(),eh=Qu(),Fr=ep(),rh=np(/^\$[0-9]/),th=np(/^\$[0-9][0-9]/);op.exports=function(r,e,n,o,i,u){if(typeof r!="string")throw new oe("Assertion failed: `matched` must be a String");if(typeof e!="string")throw new oe("Assertion failed: `str` must be a String");if(!Xm(n)||n<0)throw new oe("Assertion failed: `position` must be a nonnegative integer, got "+yo(n));if(!Jm(o)||!Ym(o,eh))throw new oe("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+yo(o));if(typeof i!="undefined"&&tp(i)!=="Object")throw new oe("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new oe("Assertion failed: `replacementTemplate` must be a String");var f=e.length;if(n>f)throw new oe("Assertion failed: position > stringLength, got "+yo(n));for(var c=u,y="";c!=="";){var m,g,v;if(Fr("$$",c))m="$$",g="$";else if(Fr("$`",c))m="$`",g=ie(e,0,n);else if(Fr("$&",c))m="$&",g=r;else if(Fr("$'",c)){m="$'";var b=r.length,E=n+b;g=ie(e,Km(E,f))}else if(rh(c)){var P=th(c)?2:1,U=ie(c,1,1+P),$=rp(U);if($<0||$>99)throw new oe("Assertion failed: `index` must be >= 0 and <= 99");var X=o.length;$>X&&P===2&&(P=1,U=ie(U,0,1),$=rp(U)),m=ie(c,0,1+P),1<=$&&$<=X?(v=o[$-1],typeof v=="undefined"?g="":g=v):g=m}else if(Fr("$<",c)){var Ae=Zm(c,">",0);if(Ae===-1||typeof i=="undefined")m="$<",g=m;else{m=ie(c,0,Ae+1);var lr=ie(c,2,Ae);if(tp(i)!=="Object")throw new oe("Assertion failed: Type(namedCaptures) is not Object");v=Hm(i,lr),typeof v=="undefined"?g="":g=Qm(v)}}else m=ie(c,0,1),g=m;var Wr=m.length;c=ie(c,Wr),y+=g}return y}});var ho=h((FA,pp)=>{"use strict";a();s();var ap=fs(),nh=su(),oh=ip(),ih=Xn(),ah=It(),Ft=Nt(),sp=uo(),sh=V(),Ot=M(),uh=nn()(),ph=no(),fh=sh("%Math.max%"),up=I(),lh=Ot("Array.prototype.push"),mo=Ot("String.prototype.slice"),ch=Ot("String.prototype.indexOf"),dh=Ot("String.prototype.replace");pp.exports=function(r,e){var n=ah(this),o=ph(r);if(o&&ch(mo(r,r.source.length+2),"g")===-1)throw new up("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(uh&&Symbol.replace){if(r!=null){var i=nh(r,Symbol.replace);if(typeof i!="undefined")return ap(i,r,[n,e])}}else if(o)return dh(n,r,e);var u=Ft(n),f=Ft(r),c=ih(e);c||(e=Ft(e));for(var y=f.length,m=fh(1,y),g=[],v=sp(u,f,0);v!==-1;)lh(g,v),v=sp(u,f,v+m);for(var b=0,E="",P=0;P<g.length;P+=1){var U;if(c)U=Ft(ap(e,void 0,[f,g[P],u]));else{if(typeof e!="string")throw new up("Assertion failed: `replaceValue` should be a string at this point");var $=[];U=oh(f,u,g[P],$,void 0,e)}var X=mo(u,b,g[P]);E+=X+U,b=g[P]+y}return b<u.length&&(E+=mo(u,b)),E}});var go=h((BA,fp)=>{"use strict";a();s();var yh=ho();fp.exports=function(){return String.prototype.replaceAll||yh}});var cp=h(($A,lp)=>{"use strict";a();s();var mh=wr(),hh=go();lp.exports=function(){var r=hh();return mh(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var hp=h((MA,mp)=>{"use strict";a();s();var gh=ft(),xh=wr(),dp=ho(),vh=go(),wh=cp(),yp=gh(dp);xh(yp,{getPolyfill:vh,implementation:dp,shim:wh});mp.exports=yp});var $x={};Yt($x,{DynamicSnippetsGenerator:()=>Dt});module.exports=No($x);a();s();var lC=qf(hp(),1);a();s();a();s();a();s();function R(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();function Or(t){return Object.keys(t)}a();s();a();s();a();s();a();s();a();s();a();s();var bh=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,gp=bh;var Ah=typeof self=="object"&&self&&self.Object===Object&&self,Sh=gp||Ah||Function("return this")(),xp=Sh;var Th=xp.Symbol,ae=Th;a();s();var vp=Object.prototype,Eh=vp.hasOwnProperty,Rh=vp.toString,Lr=ae?ae.toStringTag:void 0;function Ph(t){var r=Eh.call(t,Lr),e=t[Lr];try{t[Lr]=void 0;var n=!0}catch(i){}var o=Rh.call(t);return n&&(r?t[Lr]=e:delete t[Lr]),o}var wp=Ph;a();s();var Ih=Object.prototype,Nh=Ih.toString;function Ch(t){return Nh.call(t)}var bp=Ch;var Fh="[object Null]",Oh="[object Undefined]",Ap=ae?ae.toStringTag:void 0;function Lh(t){return t==null?t===void 0?Oh:Fh:Ap&&Ap in Object(t)?wp(t):bp(t)}var Sp=Lh;a();s();function Bh(t){return t!=null&&typeof t=="object"}var Tp=Bh;var Uh="[object Symbol]";function qh(t){return typeof t=="symbol"||Tp(t)&&Sp(t)==Uh}var Ep=qh;a();s();a();s();function $h(t,r){for(var e=-1,n=t==null?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o}var Rp=$h;a();s();var kh=Array.isArray,Pp=kh;var _h=1/0,Ip=ae?ae.prototype:void 0,Np=Ip?Ip.toString:void 0;function Cp(t){if(typeof t=="string")return t;if(Pp(t))return Rp(t,Cp)+"";if(Ep(t))return Np?Np.call(t):"";var r=t+"";return r=="0"&&1/t==-_h?"-0":r}var Fp=Cp;a();s();function Mh(t){return t==null?"":Fp(t)}var xe=Mh;a();s();a();s();a();s();a();s();a();s();a();s();function Dh(t,r,e){var n=-1,o=t.length;r<0&&(r=-r>o?0:o+r),e=e>o?o:e,e<0&&(e+=o),o=r>e?0:e-r>>>0,r>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+r];return i}var Op=Dh;function Wh(t,r,e){var n=t.length;return e=e===void 0?n:e,!r&&e>=n?t:Op(t,r,e)}var Lp=Wh;a();s();var jh="\\ud800-\\udfff",Gh="\\u0300-\\u036f",Vh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Yh=Gh+Vh+zh,Hh="\\ufe0e\\ufe0f",Jh="\\u200d",Kh=RegExp("["+Jh+jh+Yh+Hh+"]");function Zh(t){return Kh.test(t)}var Lt=Zh;a();s();a();s();function Qh(t){return t.split("")}var Bp=Qh;a();s();var Up="\\ud800-\\udfff",Xh="\\u0300-\\u036f",eg="\\ufe20-\\ufe2f",rg="\\u20d0-\\u20ff",tg=Xh+eg+rg,ng="\\ufe0e\\ufe0f",og="["+Up+"]",xo="["+tg+"]",vo="\\ud83c[\\udffb-\\udfff]",ig="(?:"+xo+"|"+vo+")",qp="[^"+Up+"]",$p="(?:\\ud83c[\\udde6-\\uddff]){2}",kp="[\\ud800-\\udbff][\\udc00-\\udfff]",ag="\\u200d",_p=ig+"?",Mp="["+ng+"]?",sg="(?:"+ag+"(?:"+[qp,$p,kp].join("|")+")"+Mp+_p+")*",ug=Mp+_p+sg,pg="(?:"+[qp+xo+"?",xo,$p,kp,og].join("|")+")",fg=RegExp(vo+"(?="+vo+")|"+pg+ug,"g");function lg(t){return t.match(fg)||[]}var Dp=lg;function cg(t){return Lt(t)?Dp(t):Bp(t)}var Wp=cg;function dg(t){return function(r){r=xe(r);var e=Lt(r)?Wp(r):void 0,n=e?e[0]:r.charAt(0),o=e?Lp(e,1).join(""):r.slice(1);return n[t]()+o}}var jp=dg;var yg=jp("toUpperCase"),ur=yg;function mg(t){return ur(xe(t).toLowerCase())}var Gp=mg;a();s();a();s();function hg(t,r,e,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(e=t[++o]);++o<i;)e=r(e,t[o],o,t);return e}var Vp=hg;a();s();a();s();a();s();function gg(t){return function(r){return t==null?void 0:t[r]}}var zp=gg;var xg={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},vg=zp(xg),Yp=vg;var wg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bg="\\u0300-\\u036f",Ag="\\ufe20-\\ufe2f",Sg="\\u20d0-\\u20ff",Tg=bg+Ag+Sg,Eg="["+Tg+"]",Rg=RegExp(Eg,"g");function Pg(t){return t=xe(t),t&&t.replace(wg,Yp).replace(Rg,"")}var Hp=Pg;a();s();a();s();var Ig=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ng(t){return t.match(Ig)||[]}var Jp=Ng;a();s();var Cg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Fg(t){return Cg.test(t)}var Kp=Fg;a();s();var rf="\\ud800-\\udfff",Og="\\u0300-\\u036f",Lg="\\ufe20-\\ufe2f",Bg="\\u20d0-\\u20ff",Ug=Og+Lg+Bg,tf="\\u2700-\\u27bf",nf="a-z\\xdf-\\xf6\\xf8-\\xff",qg="\\xac\\xb1\\xd7\\xf7",$g="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kg="\\u2000-\\u206f",_g=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",of="A-Z\\xc0-\\xd6\\xd8-\\xde",Mg="\\ufe0e\\ufe0f",af=qg+$g+kg+_g,sf="['\u2019]",Zp="["+af+"]",Dg="["+Ug+"]",uf="\\d+",Wg="["+tf+"]",pf="["+nf+"]",ff="[^"+rf+af+uf+tf+nf+of+"]",jg="\\ud83c[\\udffb-\\udfff]",Gg="(?:"+Dg+"|"+jg+")",Vg="[^"+rf+"]",lf="(?:\\ud83c[\\udde6-\\uddff]){2}",cf="[\\ud800-\\udbff][\\udc00-\\udfff]",pr="["+of+"]",zg="\\u200d",Qp="(?:"+pf+"|"+ff+")",Yg="(?:"+pr+"|"+ff+")",Xp="(?:"+sf+"(?:d|ll|m|re|s|t|ve))?",ef="(?:"+sf+"(?:D|LL|M|RE|S|T|VE))?",df=Gg+"?",yf="["+Mg+"]?",Hg="(?:"+zg+"(?:"+[Vg,lf,cf].join("|")+")"+yf+df+")*",Jg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Kg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zg=yf+df+Hg,Qg="(?:"+[Wg,lf,cf].join("|")+")"+Zg,Xg=RegExp([pr+"?"+pf+"+"+Xp+"(?="+[Zp,pr,"$"].join("|")+")",Yg+"+"+ef+"(?="+[Zp,pr+Qp,"$"].join("|")+")",pr+"?"+Qp+"+"+Xp,pr+"+"+ef,Kg,Jg,uf,Qg].join("|"),"g");function ex(t){return t.match(Xg)||[]}var mf=ex;function rx(t,r,e){return t=xe(t),r=e?void 0:r,r===void 0?Kp(t)?mf(t):Jp(t):t.match(r)||[]}var hf=rx;var tx="['\u2019]",nx=RegExp(tx,"g");function ox(t){return function(r){return Vp(hf(Hp(r).replace(nx,"")),t,"")}}var gf=ox;var ix=gf(function(t,r,e){return r=r.toLowerCase(),t+(e?Gp(r):r)}),Bt=ix;a();s();a();s();var se=class{};a();s();a();s();var J=class extends se{constructor(e){super();d(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var ax=4,Br=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsNewline",!1)}write(r){let e=r.length>0&&r.endsWith(`
14
+ `),n=e?r.substring(0,r.length-1):r,o=this.getIndentString(),i=n.replaceAll(`
15
15
  `,`
16
- ${o}`);this.isAtStartOfLine()&&(i=o+i),r&&(i+=`
17
- `),this.writeInternal(i)}writeNoIndent(e){let r=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=r}writeNode(e){e.write(this)}writeNodeOrString(e){if(typeof e=="string"){this.write(e);return}this.writeNode(e)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new he(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,r){new he(e).write(this),this.write(" ("),this.writeNode(r),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(e,r="{",n,o="}"){let i=e.filter(u=>u!==void 0).join(" ");i?this.write(`${i} ${r!=null?r:""}`):this.write(r!=null?r:"");try{this.indent(),n(),this.dedent()}finally{this.write(o!=null?o:"")}}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
16
+ ${o}`);this.isAtStartOfLine()&&(i=o+i),e&&(i+=`
17
+ `),this.writeInternal(i)}writeNoIndent(r){let e=this.indentLevel;this.indentLevel=0,this.write(r),this.indentLevel=e}writeNode(r){r.write(this)}writeNodeOrString(r){if(typeof r=="string"){this.write(r);return}this.writeNode(r)}writeNodeStatement(r){r.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(r){new J(r).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(r,e){new J(r).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(r,e){this.dedent(),this.write("} "),new J(r).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(r){this.dedent(),this.write("} "),new J(r).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}openBlock(r,e="{",n,o="}"){let i=r.filter(u=>u!==void 0).join(" ");i?this.write(`${i} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(o!=null?o:"")}}writeLine(r=""){this.write(r),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
18
18
  `)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
19
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:r,writeFunction:n}){if(e.length>0){let o=e[0];o!=null&&n(o);for(let i=1;i<e.length;i++){this.write(r);let u=e[i];u!=null&&n(u)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
20
- `)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*ix)}};a();s();function wo(t){return(t==null?void 0:t.name)!=null}a();s();var Ur=class extends oe{constructor({condition:r,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=r,this.true_=n,this.false_=o}write(r){r.writeNode(this.condition),r.write(" ? "),r.writeNode(this.true_),r.write(" : "),r.writeNode(this.false_)}};a();s();a();s();a();s();var qr=class{constructor(){d(this,"reporter");d(this,"snippet");d(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};var $r=class{constructor(e){d(this,"context");this.context=e}async generate(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new qr;for(let o of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let p=await u.generateSnippet({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new qr;for(let o of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let p=u.generateSnippetSync({endpoint:o,request:e});if(i.errors.empty())return{snippet:p,errors:void 0};n.update({context:i,snippet:p})}catch(p){n.err==null&&(n.err=p)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};a();s();a();s();a();s();var kr=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};a();s();var E={Critical:"CRITICAL",Warning:"WARNING"},_r=class t{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(Ge(je({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new t;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let n of e){if(typeof n=="string"){r.push(n);continue}r[r.length-1]+=`[${n.index}]`}return r}};var Mr=class{constructor({ir:e,config:r}){d(this,"config");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new _r,this.httpEndpointReferenceParser=new kr}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let u=e.find(c=>c.name.wireValue===o);if(u==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:u.name,typeReference:u.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,u]of Object.entries(r)){this.errors.scope(i);try{let p=e.find(c=>c.name.wireValue===i);if(p==null){if(n)continue;this.errors.add({severity:E.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:u})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:E.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:E.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:E.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:E.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:E.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let o=e.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:E.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:E.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=e.types[i];if(u==null){this.errors.add({severity:E.Critical,message:`No type found for discriminant value "${i}"`});return}let y=n,{[o]:p}=y,c=Po(y,[Ro(o)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:c}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&r.push(n);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,o;return r&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:P(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:P(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:E.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:E.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:E.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Or(n.urls));for(let i of Or(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:E.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${Or(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:E.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:P(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:P(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:P(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};a();s();var H={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();a();s();var Bt="",xp="self";var x={};Yt(x,{Access:()=>ge,Array:()=>Be,AstNode:()=>w,Attribute:()=>Ue,Class:()=>ie,ClassInstantiation:()=>J,ClassReference:()=>L,CodeBlock:()=>B,DataClass:()=>$e,Enum:()=>ke,Field:()=>_e,Map:()=>Me,Method:()=>se,MethodInvocation:()=>ue,Parameter:()=>ae,Trait:()=>qe,Type:()=>D,TypeLiteral:()=>be,Writer:()=>xe,array:()=>dx,assignVariable:()=>Px,attribute:()=>yx,classReference:()=>gx,class_:()=>mx,codeblock:()=>De,dataClass:()=>xx,enum_:()=>vx,field:()=>wx,instantiateClass:()=>Ep,invokeMethod:()=>bx,map:()=>Sx,mergeArrays:()=>Fx,method:()=>Ex,parameter:()=>Tx,string:()=>Nx,ternary:()=>Rx,this_:()=>Cx,throwException:()=>Ax,trait:()=>hx,variable:()=>Ix});a();s();a();s();a();s();var ge={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function vp(t){return{namespace:t.substring(0,t.lastIndexOf("\\")),name:t.substring(t.lastIndexOf("\\")+1)}}var xe=class extends Br{constructor({namespace:r,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=r,this.rootNamespace=n,this.customConfig=o}addReference(r){var u,p;if(r.namespace==null)return;if(Object.keys(this.references).filter(c=>{let y=vp(c);return y.namespace!==r.namespace&&y.name===r.name}).length>0){r.requireFullyQualified();return}let o=r.namespace===Bt?r.name:`${r.namespace}\\${r.name}`;((p=(u=this.references)[o])!=null?p:u[o]=[]).push(r)}toString(){let r=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${r}
19
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:r,delimiter:e,writeFunction:n}){if(r.length>0){let o=r[0];o!=null&&n(o);for(let i=1;i<r.length;i++){this.write(e);let u=r[i];u!=null&&n(u)}}}toString(){return this.buffer}writeInternal(r){return r.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=r.endsWith(`
20
+ `)),this.buffer+=r}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*ax)}};a();s();function wo(t){return(t==null?void 0:t.name)!=null}a();s();var Ur=class extends se{constructor({condition:e,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=e,this.true_=n,this.false_=o}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();a();s();var qr=class{constructor(){d(this,"reporter");d(this,"snippet");d(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:r,snippet:e}){(this.reporter==null||this.reporter.size()>r.errors.size())&&(this.reporter=r.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:r}){var e;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(e=this.err)!=null?e:new Error(`Failed to generate snippet for endpoint "${r.method} ${r.path}"`)}};var $r=class{constructor(r){d(this,"context");this.context=r}async generate(r){let e=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(e.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let n=new qr;for(let o of e){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let f=await u.generateSnippet({endpoint:o,request:r});if(i.errors.empty())return{snippet:f,errors:void 0};n.update({context:i,snippet:f})}catch(f){n.err==null&&(n.err=f)}}return n.getResponseOrThrow({endpoint:r.endpoint})}generateSync(r){let e=this.context.resolveEndpointLocationOrThrow(r.endpoint);if(e.length===0)throw new Error(`No endpoints found that match "${r.endpoint.method} ${r.endpoint.path}"`);let n=new qr;for(let o of e){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let f=u.generateSnippetSync({endpoint:o,request:r});if(i.errors.empty())return{snippet:f,errors:void 0};n.update({context:i,snippet:f})}catch(f){n.err==null&&(n.err=f)}}return n.getResponseOrThrow({endpoint:r.endpoint})}};a();s();a();s();a();s();var kr=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(r){return this.REFERENCE_REGEX.test(r)?{type:"valid"}:{type:"invalid"}}tryParse(r){if(this.validate(r).type==="invalid")return;let n=r.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};a();s();var A={Critical:"CRITICAL",Warning:"WARNING"},_r=class t{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(r){this.errors.push(Ge(je({},r),{path:[...this.path]}))}scope(r){this.path.push(r)}unscope(){this.path.pop()}getBySeverity(r){return this.errors.filter(e=>e.severity===r)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let r=new t;return r.errors=[...this.errors],r.path=[...this.path],r}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(r=>({severity:r.severity,path:r.path!=null?this.pathToStringArray(r.path):void 0,message:r.message}))}pathToStringArray(r){let e=[];for(let n of r){if(typeof n=="string"){e.push(n);continue}e[e.length-1]+=`[${n.index}]`}return e}};var Mr=class{constructor({ir:r,config:e}){d(this,"config");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=r,this.config=e,this.errors=new _r,this.httpEndpointReferenceParser=new kr}associateQueryParametersByWireValue({parameters:r,values:e}){let n=[];for(let[o,i]of Object.entries(e)){this.errors.scope(o);try{let u=r.find(c=>c.name.wireValue===o);if(u==null)throw this.newParameterNotRecognizedError(o);let f=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:u.name,typeReference:u.typeReference,value:f})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:r,values:e,ignoreMissingParameters:n}){let o=[];for(let[i,u]of Object.entries(e)){this.errors.scope(i);try{let f=r.find(c=>c.name.wireValue===i);if(f==null){if(n)continue;this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:f.name,typeReference:f.typeReference,value:u})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:r,record:e}){let n=e[r.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:A.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:r,record:e}){let n=e[r.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:A.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(r){if(typeof r!="object"||Array.isArray(r)){this.errors.add({severity:A.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(r)?"array":typeof r}`});return}return r==null?{}:r}resolveNamedType({typeId:r}){let e=this._ir.types[r];if(e==null){this.errors.add({severity:A.Critical,message:`Type identified by "${r}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:r,value:e}){let n=this.getRecord(e);if(n==null)return;let o=r.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:A.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:A.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=r.types[i];if(u==null){this.errors.add({severity:A.Critical,message:`No type found for discriminant value "${i}"`});return}let y=n,{[o]:f}=y,c=Po(y,[Ro(o)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:c}}resolveEndpointOrThrow(r){let e=this.httpEndpointReferenceParser.tryParse(r);if(e==null)throw new Error(`Failed to parse endpoint reference "${r}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocationOrThrow(r){let e=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:r})&&e.push(n);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${r.method} ${r.path}"`);return e}needsRequestParameter({request:r,inlinePathParameters:e,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:r,inlinePathParameters:e})||r.queryParameters!=null&&r.queryParameters.length>0||r.headers!=null&&r.headers.length>0?!0:r.body!=null?this.includeRequestBodyInWrappedRequest({body:r.body,inlineFileProperties:n}):!((o=r.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:r,inlinePathParameters:e}){var n,o;return e&&((o=(n=r.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(r){switch(r.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:R(r)}}resolveEnvironmentName(r){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let n=e.environments.find(o=>o.id===r);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=e.environments.find(o=>o.id===r);return n==null?void 0:n.name}default:R(e)}}isSingleEnvironmentID(r){return typeof r=="string"}isMultiEnvironmentValues(r){return typeof r=="object"}validateMultiEnvironmentUrlValues(r){if(this._ir.environments==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=e.environments[0];if(n==null)return this.errors.add({severity:A.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Or(n.urls));for(let i of Or(r))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:A.Critical,message:`The provided environments are invalid; got: [${Object.keys(r).join(", ")}], expected: [${Or(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:r}){if(typeof r!="number"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"number",value:r}).message});return}return r}getValueAsBoolean({value:r}){if(typeof r!="boolean"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"boolean",value:r}).message});return}return r}getValueAsString({value:r}){if(typeof r!="string"){this.errors.add({severity:A.Critical,message:this.newTypeMismatchError({expected:"string",value:r}).message});return}return r}isOptional(r){switch(r.type){case"nullable":return this.isOptional(r.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:r.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(r){switch(r.type){case"nullable":return!0;case"optional":return this.isNullable(r.value);case"named":{let e=this.resolveNamedType({typeId:r.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:r,values:e}){return new Error(`Expected auth type ${r.type}, got ${e.type}`)}newParameterNotRecognizedError(r){return new Error(`"${r}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:r,value:e}){return new Error(`Expected ${r}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:r,inlineFileProperties:e}){switch(r.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:r,inlineFileProperties:e});default:R(r)}}includeFileUploadBodyInWrappedRequest({fileUpload:r,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:r})||e&&this.fileUploadHasFileProperties({fileUpload:r})}fileUploadHasBodyProperties({fileUpload:r}){return r.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(e)}})}fileUploadHasFileProperties({fileUpload:r}){return r.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(e)}})}isListTypeReference(r){return r.type==="optional"?this.isListTypeReference(r.value):r.type==="list"||r.type==="set"}parsedEndpointMatches({endpoint:r,parsedEndpoint:e}){return r.location.method===e.method&&r.location.path===e.path}};a();s();var K={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();a();s();var Dr="",xf="self",vf="static";var x={};Yt(x,{Access:()=>ve,Array:()=>Be,AstNode:()=>w,Attribute:()=>Ue,Class:()=>ue,ClassInstantiation:()=>Q,ClassReference:()=>O,CodeBlock:()=>B,DataClass:()=>$e,Enum:()=>ke,Field:()=>_e,Map:()=>Me,Method:()=>le,MethodInvocation:()=>fe,Parameter:()=>pe,Trait:()=>qe,Type:()=>W,TypeLiteral:()=>D,Writer:()=>Z,array:()=>yx,assignVariable:()=>Ix,attribute:()=>mx,classReference:()=>xx,class_:()=>hx,codeblock:()=>De,dataClass:()=>vx,enum_:()=>wx,field:()=>bx,instantiateClass:()=>Ef,invokeMethod:()=>Ax,map:()=>Tx,mergeArrays:()=>Fx,method:()=>Ex,parameter:()=>Rx,string:()=>Cx,ternary:()=>Px,this_:()=>Ox,throwException:()=>Sx,trait:()=>gx,variable:()=>Nx});a();s();a();s();a();s();var ve={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function wf(t){return{namespace:t.substring(0,t.lastIndexOf("\\")),name:t.substring(t.lastIndexOf("\\")+1)}}var Z=class extends Br{constructor({namespace:e,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=o}addReference(e){var u,f;if(e.namespace==null)return;if(Object.keys(this.references).filter(c=>{let y=wf(c);return y.namespace!==e.namespace&&y.name===e.name}).length>0){e.requireFullyQualified();return}let o=e.namespace===Dr?e.name:`${e.namespace}\\${e.name}`;((f=(u=this.references)[o])!=null?f:u[o]=[]).push(e)}toString(){let e=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${e}
21
21
 
22
22
  ${n}
23
23
 
24
- ${this.buffer}`:r+`
24
+ ${this.buffer}`:e+`
25
25
 
26
- `+this.buffer}stringifyImports(){let r=Object.keys(this.references);return r.length===0?"":r.filter(n=>vp(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
27
- `)}};var w=class extends oe{toString(e){if(e==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:r,rootNamespace:n,customConfig:o}=e,i=new xe({namespace:r,rootNamespace:n,customConfig:o});return this.write(i),i.toString()}async toStringAsync({namespace:e,rootNamespace:r,customConfig:n}){let o=new xe({namespace:e,rootNamespace:r,customConfig:n});return this.write(o),o.toString()}};var Be=class extends w{constructor({entries:r}){super();d(this,"entries");this.entries=r!=null?r:[]}write(r){r.write("["),this.entries.forEach((n,o)=>{o>0&&r.write(", "),n.write(r)}),r.write("]")}};a();s();var Ue=class extends w{constructor(r){var n;super();d(this,"reference");d(this,"arguments");this.reference=r.reference,this.arguments=(n=r.arguments)!=null?n:[]}write(r){r.addReference(this.reference),r.write(`${this.reference.name}`),this.arguments.length>0&&(r.write("("),this.arguments.forEach((n,o)=>{o>0&&r.write(","),typeof n=="string"?r.write(n):n.write(r)}),r.write(")"))}};a();s();a();s();var L=class extends w{constructor({name:r,namespace:n}){super();d(this,"name");d(this,"namespace");d(this,"fullyQualified");this.name=r,this.namespace=n,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(r){r.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;r.write(`${n}`)}};a();s();a();s();function ve(t){return t.startsWith("$")?t:`$${t}`}var k=class extends w{constructor({docs:r}={}){super();d(this,"docs");d(this,"tags",[]);this.docs=r}addTag(r){this.tags.push(Ge(je({},r),{name:r.name!=null?ve(r.name):void 0}))}write(r){r.writeLine("/**"),this.docs!=null&&(this.docs.split(`
28
- `).forEach(n=>{r.writeLine(` * ${n}`)}),this.tags.length>0&&r.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:r,tag:n});r.writeLine(" */")}writeTag({writer:r,tag:n}){let o=n.docs!=null?n.docs.split(`
29
- `):void 0;o!=null&&o.length>1&&(o.forEach(i=>{r.writeLine(` * ${i}`)}),r.writeLine(" *")),r.write(` * @${n.tagType} `),n.type.write(r,{comment:!0}),n.name!=null&&r.write(` ${n.name}`),o!=null&&o.length===1&&r.write(` ${o[0]}`),r.newLine()}};a();s();function we(t){return ax(t,[ge.Public,ge.PublicReadonly,ge.Protected,ge.Private])}function ax(t,e){return e.reduce((r,n)=>[...r,...t.filter(o=>o.access===n)],[])}var ie=class extends w{constructor({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p}){super();d(this,"name");d(this,"namespace");d(this,"abstract");d(this,"docs");d(this,"parentClassReference");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);d(this,"constructor_");this.name=r,this.namespace=n,this.abstract=o!=null?o:!1,this.docs=i,this.parentClassReference=u,this.traits=p!=null?p:[]}addConstructor(r){this.constructor_=r}addField(r){this.fields.push(r)}addMethod(r){this.methods.push(r)}addTrait(r){this.traits.push(r)}write(r){r.addReference(new L({name:this.name,namespace:this.namespace})),this.abstract&&r.write("abstract "),this.writeComment(r),r.write(`class ${this.name} `),this.parentClassReference!=null&&(r.write("extends "),this.parentClassReference.write(r)),r.newLine(),r.writeLine("{"),r.indent(),this.traits.length>0&&(r.write("use "),this.traits.forEach((n,o)=>{o>0&&r.write(","),r.writeNode(n)}),r.writeTextStatement(""),r.newLine()),this.writeFields({writer:r,fields:we(this.fields)}),(this.constructor!=null||this.methods.length>0)&&r.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:r,constructor:this.constructor_}),this.methods.length>0&&r.newLine()),this.writeMethods({writer:r,methods:we(this.methods)}),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}writeConstructor({writer:r,constructor:n}){var o;this.writeConstructorComment({writer:r,constructor:n}),n.access!=null&&r.write(`${n.access} `),r.write("function __construct("),r.indent(),n.parameters.forEach((i,u)=>{u===0&&r.newLine(),i.write(r),r.writeLine(",")}),r.dedent(),r.writeLine(")"),r.writeLine("{"),r.indent(),(o=n.body)==null||o.write(r),r.writeNewLineIfLastLineNot(),r.dedent(),r.writeLine("}")}writeConstructorComment({writer:r,constructor:n}){if(n.parameters.length===0)return;let o=new k;for(let i of n.parameters)o.addTag(i.getCommentTag());o.write(r)}writeFields({writer:r,fields:n}){n.filter(o=>!o.inherited).forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}writeMethods({writer:r,methods:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}};a();s();var qe=class extends w{constructor({name:r,namespace:n,docs:o,traits:i}){super();d(this,"name");d(this,"namespace");d(this,"docs");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);this.name=r,this.namespace=n,this.docs=o,this.traits=i!=null?i:[]}addField(r){this.fields.push(r)}addMethod(r){this.methods.push(r)}write(r){this.writeComment(r),r.write(`trait ${this.name} `),r.newLine(),r.writeLine("{"),r.indent(),this.traits.length>0&&(r.write("use "),this.traits.forEach((n,o)=>{o>0&&r.write(","),r.writeNode(n)}),r.writeTextStatement(""),r.newLine()),this.writeFields({writer:r,fields:we(this.fields)}),this.fields.length>0&&this.methods.length>0&&r.newLine(),this.writeMethods({writer:r,methods:we(this.methods)}),r.dedent(),r.writeLine("}")}writeComment(r){let n=new k({docs:this.docs});for(let o of this.fields)n.addTag({tagType:"property",type:o.type,name:o.name});n.write(r)}writeFields({writer:r,fields:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}writeMethods({writer:r,methods:n}){n.forEach((o,i)=>{i>0&&r.newLine(),o.write(r),r.writeNewLineIfLastLineNot()})}};a();s();a();s();function pr({writer:t,arguments_:e,multiline:r}){if(e.length===0){t.write("()");return}if(r){sx({writer:t,arguments_:e});return}ux({writer:t,arguments_:e})}function sx({writer:t,arguments_:e}){t.writeLine("("),t.indent();for(let r of e)wp({writer:t,argument:r}),t.writeLine(",");t.dedent(),t.write(")")}function ux({writer:t,arguments_:e}){t.write("("),e.forEach((r,n)=>{n>0&&t.write(", "),wp({writer:t,argument:r})}),t.write(")")}function wp({writer:t,argument:e}){wo(e)?(t.write(`${e.name}: `),t.writeNodeOrString(e.assignment)):e.write(t)}var J=class extends w{constructor({classReference:r,arguments_:n,multiline:o}){super();d(this,"classReference");d(this,"arguments_");d(this,"multiline");this.classReference=r,this.arguments_=n,this.multiline=o!=null?o:!1}write(r){r.write("new "),r.writeNode(this.classReference),pr({writer:r,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var B=class extends w{constructor(r){super();d(this,"arg");this.arg=r}write(r){return new he(this.arg).write(r)}};a();s();a();s();var ae=class extends w{constructor({name:r,type:n,docs:o,initializer:i,access:u,readonly_:p}){super();d(this,"name");d(this,"type");d(this,"docs");d(this,"initializer");d(this,"access");d(this,"readonly_");this.name=ve(r),this.type=n,this.docs=o,this.initializer=i,this.access=u,this.readonly_=p!=null?p:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(r){this.access!=null&&r.write(`${this.access} `),this.readonly_&&r.write("readonly "),this.type.write(r),r.write(` ${this.name}`),this.initializer!=null?(r.write(" = "),this.initializer.write(r)):this.type.isOptional()&&r.write(" = null")}};a();s();var D=class t extends w{constructor(r){super();d(this,"internalType");this.internalType=r}write(r,{comment:n}={}){switch(this.internalType.type){case"int":r.write("int");break;case"string":r.write("string");break;case"bool":r.write("bool");break;case"float":r.write("float");break;case"date":r.addReference(bp),r.write("DateTime");break;case"dateTime":r.addReference(bp),r.write("DateTime");break;case"mixed":r.write("mixed");break;case"object":r.write("object");break;case"array":if(!n){r.write("array");break}r.write("array<"),this.internalType.value.write(r,{comment:n}),r.write(">");break;case"map":{if(!n){r.write("array");break}r.write("array<"),this.internalType.keyType.write(r,{comment:n}),r.write(", "),this.internalType.valueType.write(r,{comment:n}),r.write(">");break}case"null":{r.write("null");break}case"typeDict":{if(!n){r.write("array");break}if(this.internalType.multiline){r.writeLine("array{");for(let o of this.internalType.entries)r.write(" * "),this.writeTypeDictEntry({writer:r,entry:o,comment:n}),r.writeLine(",");r.write(" * }");break}r.write("array{"),this.internalType.entries.forEach((o,i)=>{i>0&&r.write(", "),this.writeTypeDictEntry({writer:r,entry:o,comment:n})}),r.write("}");break}case"union":{this.getUniqueTypes({types:this.internalType.types,comment:n,writer:r}).forEach((i,u)=>{u>0&&r.write("|"),i.write(r,{comment:n}),u++});break}case"optional":{let o=this.internalType.value.internalType.type==="mixed",i=this.internalType.value.internalType.type==="union";!i&&!o&&r.write("?"),this.internalType.value.write(r,{comment:n}),i&&(r.write("|"),r.writeNode(t.null()));break}case"reference":r.writeNode(this.internalType.value);break;case"enumString":n?(r.write("value-of<"),r.writeNode(this.internalType.value),r.write(">")):r.write("string");break;default:P(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:t.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var r;return(r=this.underlyingTypeIfOptional())!=null?r: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(r){return new this({type:"array",value:r})}static map(r,n){return new this({type:"map",keyType:r,valueType:n})}static typeDict(r,{multiline:n}={}){return new this({type:"typeDict",entries:r,multiline:n})}static union(r){return new this({type:"union",types:r})}static optional(r){return this.isAlreadyOptional(r)?r:new this({type:"optional",value:r})}static null(){return new this({type:"null"})}static reference(r){return new this({type:"reference",value:r})}static enumString(r){return new this({type:"enumString",value:r})}static isAlreadyOptional(r){return r.internalType.type==="optional"}writeTypeDictEntry({writer:r,entry:n,comment:o}){r.write(n.key),n.optional&&r.write("?"),r.write(": "),n.valueType.write(r,{comment:o})}getUniqueTypes({writer:r,types:n,comment:o}){let i=new Set;return n.filter(u=>{if(o)return!0;let p=u.toString({namespace:r.namespace,rootNamespace:r.rootNamespace,customConfig:r.customConfig});return i.has(p)?!1:(i.add(p),!0)})}},bp=new L({namespace:Bt,name:"DateTime"});a();s();function Ap(t){return t.startsWith("$")?t.slice(1):t}var Sp="values",$e=class extends w{constructor({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p}){super();d(this,"name");d(this,"namespace");d(this,"class_");this.name=r,this.namespace=n,this.class_=new ie({name:r,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:p})}addField(r){this.class_.addField(r)}addMethod(r){this.class_.addMethod(r)}addTrait(r){this.class_.addTrait(r)}write(r){let n=we(this.class_.fields).map(o=>Ge(je({},o),{name:Ap(o.name)}));n.length>0&&this.class_.addConstructor({access:"public",parameters:this.getConstructorParameters({orderedFields:n}),body:x.codeblock(o=>{for(let i of n)o.write(`$this->${i.name} = $${Sp}['${i.name}']`),i.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(r)}allFieldsAreOptional(){return this.class_.fields.every(r=>r.type.isOptional())}getConstructorParameters({orderedFields:r}){return[new ae({name:Sp,type:D.typeDict(r.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new B("[]"):void 0})]}};a();s();a();s();var se=class extends w{constructor({name:r,access:n,parameters:o,throws:i,return_:u,body:p,docs:c,classReference:y}){super();d(this,"name");d(this,"access");d(this,"parameters");d(this,"throws");d(this,"return_");d(this,"body");d(this,"docs");d(this,"classReference");this.name=r,this.access=n,this.parameters=o,this.throws=i!=null?i:[],this.return_=u,this.body=p,this.docs=c,this.classReference=y}write(r){var n;this.writeComment(r),r.write(`${this.access} function ${this.name}(`),this.parameters.forEach((o,i)=>{i>0&&r.write(", "),o.write(r)}),r.write("): "),this.return_!=null?r.writeNodeOrString(this.return_):r.write("void"),r.writeLine(" {"),r.indent(),(n=this.body)==null||n.write(r),r.dedent(),r.writeLine("}")}writeComment(r){let n=new k({docs:this.docs});for(let o of this.parameters)n.addTag({tagType:"param",type:o.type,name:o.name,docs:o.docs});this.return_!=null&&this.return_!==xp&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:D.reference(o)});r.writeNode(n)}};var ke=class extends w{constructor({name:r,namespace:n,backing:o,docs:i,serializable:u}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=r,this.namespace=n,this.backing=o,this.docs=i,this.serializable=u!=null?u:!1}addMember(r){this.members.push(r)}write(r){this.writeComment(r),r.write("enum "),r.writeLine(`${this.name}`),this.backing!=null&&r.write(` : ${this.backing}`),this.serializable&&(r.addReference(new L({name:"JsonSerializable",namespace:""})),r.writeLine(" implements JsonSerializable")),r.writeLine(" {"),r.indent();for(let n of this.members)r.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?r.write(` = "${n.value}"`):r.write(` = ${n.value}`)),r.writeTextStatement("");this.serializable&&(r.newLine(),r.writeNode(new se({name:"jsonSerialize",return_:D.string(),access:"public",parameters:[],body:new B("return $this->value;")}))),r.writeNewLineIfLastLineNot(),r.dedent(),r.writeLine("}")}writeComment(r){if(this.docs==null)return;new k({docs:this.docs}).write(r)}};a();s();var _e=class extends w{constructor({name:r,type:n,access:o,readonly_:i,initializer:u,docs:p,inlineDocs:c,attributes:y,inherited:h}){super();d(this,"name");d(this,"type");d(this,"access");d(this,"readonly_");d(this,"initializer");d(this,"docs");d(this,"inlineDocs");d(this,"attributes");d(this,"inherited");this.name=ve(r),this.type=n,this.access=o,this.readonly_=i!=null?i:!1,this.initializer=u,this.docs=p,this.inlineDocs=c,this.attributes=y!=null?y:[],this.inherited=h!=null?h:!1}write(r){this.writeComment(r),this.writeAttributesIfPresent(r),r.write(`${this.access} `),this.readonly_&&r.write("readonly "),this.type.write(r),r.write(` ${this.name}`),this.initializer!=null&&(r.write(" = "),this.initializer.write(r)),r.write(";"),this.inlineDocs!=null&&r.write(` // ${this.inlineDocs}`),r.newLine()}writeComment(r){let n=new k;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(r)}writeAttributesIfPresent(r){this.attributes.length>0&&(r.write("#["),this.attributes.forEach((n,o)=>{o>0&&r.write(", "),n.write(r)}),r.writeLine("]"))}};a();s();var Me=class extends w{constructor({entries:r,multiline:n}){super();d(this,"entries");d(this,"multiline");this.entries=r!=null?r:[],this.multiline=n!=null?n:!1}write(r){if(this.multiline){this.writeMultiline(r);return}this.writeCompact(r)}writeMultiline(r){r.writeLine("["),r.indent();for(let{key:n,value:o}of this.entries)n.write(r),r.write(" => "),o.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeCompact(r){r.write("[");for(let[n,{key:o,value:i}]of this.entries.entries())n>0&&r.write(", "),o.write(r),r.write(" => "),i.write(r);r.write("]")}};a();s();var ue=class extends w{constructor({method:r,arguments_:n,static_:o,multiline:i,on:u}){super();d(this,"method");d(this,"arguments_");d(this,"multiline");d(this,"static_");d(this,"on");this.method=r,this.arguments_=n,this.static_=o!=null?o:!1,this.multiline=i!=null?i:!1,this.on=u}write(r){this.on!=null&&(this.on.write(r),r.write(this.getMethodAccessor())),r.write(this.method),pr({writer:r,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};a();s();a();s();var be=class t extends w{constructor(r){super();d(this,"internalType");this.internalType=r}write(r){switch(this.internalType.type){case"list":{this.writeList({writer:r,list:this.internalType});break}case"boolean":{r.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:r,class_:this.internalType});break}case"file":{r.writeNode(px({writer:r,value:this.internalType.value}));break}case"float":{r.write(this.internalType.value.toString());break}case"number":{r.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:r,map:this.internalType});break}case"reference":{r.writeNode(this.internalType.value);break}case"datetime":{r.writeNode(fx({writer:r,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
30
- `)){this.writeStringWithHeredoc({writer:r,value:this.internalType.value});break}r.write(`'${this.internalType.value.replaceAll("'","\\'")}'`);break}case"unknown":{this.writeUnknown({writer:r,value:this.internalType.value});break}case"null":{r.write("null");break}case"nop":break;default:P(this.internalType)}}writeStringWithHeredoc({writer:r,value:n}){r.writeLine("<<<EOT"),r.writeNoIndent(n),r.newLine(),r.writeNoIndent("EOT")}writeClass({writer:r,class_:n}){r.writeNode(new J({classReference:n.reference,arguments_:[t.map({entries:n.fields.map(o=>({key:t.string(o.name),value:o.value}))})]}))}writeList({writer:r,list:n}){let o=cx({values:n.values});if(o.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let i of o)i.write(r),r.writeLine(",");r.dedent(),r.write("]")}writeMap({writer:r,map:n}){let o=lx({entries:n.entries});if(o.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let i of o)i.key.write(r),r.write(" => "),i.value.write(r),r.writeLine(",");r.dedent(),r.write("]")}static list({values:r}){return new this({type:"list",values:r})}static boolean(r){return new this({type:"boolean",value:r})}static class_({reference:r,fields:n}){return new this({type:"class",reference:r,fields:n})}static file(r){return new this({type:"file",value:r})}static float(r){return new this({type:"float",value:r})}static datetime(r){return new this({type:"datetime",value:r})}static number(r){return new this({type:"number",value:r})}static map({entries:r}){return new this({type:"map",entries:r})}static reference(r){return new this({type:"reference",value:r})}static string(r){return new this({type:"string",value:r})}static unknown(r){return new this({type:"unknown",value:r})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(r){return r.internalType.type==="nop"}writeUnknown({writer:r,value:n}){switch(typeof n){case"boolean":r.write(n.toString());return;case"string":r.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":r.write(n.toString());return;case"object":if(n==null){r.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:r,value:n});return}this.writeUnknownMap({writer:r,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:r,value:n}){if(n.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let o of n)r.writeNode(t.unknown(o)),r.writeLine(",");r.dedent(),r.write("]")}writeUnknownMap({writer:r,value:n}){let o=Object.entries(n);if(o.length===0){r.write("[]");return}r.writeLine("["),r.indent();for(let[i,u]of o)r.write(`'${i}' => `),r.writeNode(t.unknown(u)),r.writeLine(",");r.dedent(),r.write("]")}};function fx({writer:t,value:e}){return new J({classReference:new L({name:"DateTime",namespace:""}),arguments_:[new B(`'${e}'`)]})}function px({writer:t,value:e}){return new ue({on:new L({name:"File",namespace:`${t.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new B(`"${e}"`)]})}function lx({entries:t}){return t.filter(e=>!be.isNop(e.key)&&!be.isNop(e.value))}function cx({values:t}){return t.filter(e=>!be.isNop(e))}a();s();var Ut=class extends w{constructor(r){super();d(this,"arrays");this.arrays=r}write(r){r.write("array_merge"),pr({writer:r,arguments_:this.arrays.map(n=>De(o=>{if(typeof n=="string"||n instanceof w){o.writeNodeOrString(n);return}o.writeNodeOrString(n.ref),n.fallback&&(o.write(" ?? "),o.writeNodeOrString(n.fallback))}))})}};function dx(t){return new Be(t)}function yx(t){return new Ue(t)}function mx(t){return new ie(t)}function hx(t){return new qe(t)}function gx(t){return new L(t)}function De(t){return new B(t)}function xx(t){return new $e(t)}function vx(t){return new ke(t)}function wx(t){return new _e(t)}function Ep(t){return new J(t)}function bx(t){return new ue(t)}function Ax(t){return De(e=>{e.write("throw "),e.writeNode(Ep(t))})}function Sx(t){return new Me(t)}function Ex(t){return new se(t)}function Tx(t){return new ae(t)}function Rx(t){return new Ur(t)}function Px(t,e){return De(r=>{r.writeNodeOrString(t),r.write(" = "),r.writeNodeOrString(e)})}function Ix(t){return De(ve(t))}function Nx(t){return De(`"${t}"`)}function Fx(...t){return new Ut(t)}function Cx(){return new B(t=>{t.write("$this")})}var Tp="$client",qt="Example",Rp=`<?php
26
+ `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>wf(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
27
+ `)}};var w=class extends se{toString(r){if(r==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:o}=r,i=new Z({namespace:e,rootNamespace:n,customConfig:o});return this.write(i),i.toString()}async toStringAsync({namespace:r,rootNamespace:e,customConfig:n}){let o=new Z({namespace:r,rootNamespace:e,customConfig:n});return this.write(o),o.toString()}};var Be=class extends w{constructor({entries:e}){super();d(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((n,o)=>{o>0&&e.write(", "),n.write(e)}),e.write("]")}};a();s();var Ue=class extends w{constructor(e){var n;super();d(this,"reference");d(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,o)=>{o>0&&e.write(","),typeof n=="string"?e.write(n):n.write(e)}),e.write(")"))}};a();s();a();s();var O=class extends w{constructor({name:e,namespace:n,generics:o}){super();d(this,"name");d(this,"namespace");d(this,"generics");d(this,"fullyQualified");this.name=e,this.namespace=n,this.generics=o,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${n}`)}};a();s();a();s();function we(t){return t.startsWith("$")?t:`$${t}`}var k=class extends w{constructor({docs:e}={}){super();d(this,"docs");d(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(Ge(je({},e),{name:e.name!=null?we(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
28
+ `).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 o=n.docs!=null?n.docs.split(`
29
+ `):void 0;o!=null&&o.length>1&&(o.forEach(i=>{e.writeLine(` * ${i}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),o!=null&&o.length===1&&e.write(` ${o[0]}`),e.newLine()}};a();s();function be(t){return sx(t,[ve.Public,ve.PublicReadonly,ve.Protected,ve.Private])}function sx(t,r){return r.reduce((e,n)=>[...e,...t.filter(o=>o.access===n)],[])}var ue=class extends w{constructor({name:e,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:f}){super();d(this,"name");d(this,"namespace");d(this,"abstract");d(this,"docs");d(this,"parentClassReference");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);d(this,"constructor_");this.name=e,this.namespace=n,this.abstract=o!=null?o:!1,this.docs=i,this.parentClassReference=u,this.traits=f!=null?f:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addMethods(e){this.methods.push(...e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new O({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,o)=>{o>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:be(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:be(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new k({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var o;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((i,u)=>{u===0&&e.newLine(),i.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(o=n.body)==null||o.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let o=new k;for(let i of n.parameters)o.addTag(i.getCommentTag());o.write(e)}writeFields({writer:e,fields:n}){n.filter(o=>!o.inherited).forEach((o,i)=>{i>0&&e.newLine(),o.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((o,i)=>{i>0&&e.newLine(),o.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var qe=class extends w{constructor({name:e,namespace:n,docs:o,traits:i}){super();d(this,"name");d(this,"namespace");d(this,"docs");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);this.name=e,this.namespace=n,this.docs=o,this.traits=i!=null?i:[]}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,o)=>{o>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:be(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:be(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new k({docs:this.docs});for(let o of this.fields)n.addTag({tagType:"property",type:o.type,name:o.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((o,i)=>{i>0&&e.newLine(),o.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((o,i)=>{i>0&&e.newLine(),o.write(e),e.writeNewLineIfLastLineNot()})}};a();s();a();s();function fr({writer:t,arguments_:r,multiline:e}){if(r.length===0){t.write("()");return}if(e){ux({writer:t,arguments_:r});return}px({writer:t,arguments_:r})}function ux({writer:t,arguments_:r}){t.writeLine("("),t.indent();for(let e of r)bf({writer:t,argument:e,writeCompact:!1}),t.writeLine(",");t.dedent(),t.write(")")}function px({writer:t,arguments_:r}){t.write("("),r.forEach((e,n)=>{n>0&&t.write(", "),bf({writer:t,argument:e,writeCompact:!0})}),t.write(")")}function bf({writer:t,argument:r,writeCompact:e}){wo(r)?(r.docs&&(e?t.write(`/* ${r.docs} */ `):t.writeLine(`/* ${r.docs} */`)),t.write(`${r.name}: `),t.writeNodeOrString(r.assignment)):r.write(t)}var Q=class extends w{constructor({classReference:e,arguments_:n,multiline:o}){super();d(this,"classReference");d(this,"arguments_");d(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=o!=null?o:!1}write(e){e.write("new "),e.writeNode(this.classReference),fr({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var B=class extends w{constructor(e){super();d(this,"arg");this.arg=e}write(e){return new J(this.arg).write(e)}};a();s();a();s();var pe=class extends w{constructor({name:e,type:n,docs:o,initializer:i,access:u,readonly_:f}){super();d(this,"name");d(this,"type");d(this,"docs");d(this,"initializer");d(this,"access");d(this,"readonly_");this.name=we(e),this.type=n,this.docs=o,this.initializer=i,this.access=u,this.readonly_=f!=null?f:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};a();s();a();s();a();s();var fe=class extends w{constructor({method:e,arguments_:n,static_:o,multiline:i,on:u}){super();d(this,"method");d(this,"arguments_");d(this,"multiline");d(this,"static_");d(this,"on");this.method=e,this.arguments_=n,this.static_=o!=null?o:!1,this.multiline=i!=null?i:!1,this.on=u}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),fr({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};a();s();var D=class t extends w{constructor(e){super();d(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(lx({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(fx({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
30
+ `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:R(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new Q({classReference:n.reference,arguments_:[t.map({entries:n.fields.map(o=>({key:t.string(o.name),value:o.value}))})]}))}writeList({writer:e,list:n}){let o=dx({values:n.values});if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of o)i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let o=cx({entries:n.entries});if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of o)i.key.write(e),e.write(" => "),i.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 o of n)e.writeNode(t.unknown(o)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let o=Object.entries(n);if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[i,u]of o)e.write(`'${i}' => `),e.writeNode(t.unknown(u)),e.writeLine(",");e.dedent(),e.write("]")}};function fx({writer:t,value:r}){return new Q({classReference:new O({name:"DateTime",namespace:""}),arguments_:[new B(`'${r}'`)]})}function lx({writer:t,value:r}){return new fe({on:new O({name:"File",namespace:`${t.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new B(`"${r}"`)]})}function cx({entries:t}){return t.filter(r=>!D.isNop(r.key)&&!D.isNop(r.value))}function dx({values:t}){return t.filter(r=>!D.isNop(r))}var W=class t extends w{constructor(e){super();d(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(Af),e.write("DateTime");break;case"dateTime":e.addReference(Af),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let o=this.internalType.entries.filter(f=>!f.valueType.isOptional()),i=this.internalType.entries.filter(f=>f.valueType.isOptional()),u=[...o,...i];for(let f of u)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:f,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((o,i)=>{i>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:o,comment:n})}),e.write("}");break}case"union":{let o=this.getUniqueTypes({types:this.internalType.types,comment:n,writer:e}),i=o.filter(u=>u.underlyingType().internalType.type==="mixed").length>0;if(i&&!n){e.write("mixed");break}o.length>0&&n?(e.writeLine("("),o.forEach((u,f)=>{f>0?e.write(" * |"):e.write(" * "),i&&(u=u.underlyingType()),u.write(e,{comment:n}),e.writeLine(),f++}),e.write(" * )")):o.forEach((u,f)=>{f>0&&e.write("|"),i&&(u=u.underlyingType()),u.write(e,{comment:n}),f++});break}case"optional":{let o=this.internalType.value.internalType.type==="mixed",i=this.internalType.value.internalType.type==="union";!i&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),i&&(e.write("|"),e.writeNode(t.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let o=this.internalType.value.generics;o&&o.length>0&&(e.write("<"),o.forEach((i,u)=>{u>0&&e.write(", "),i.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:R(this.internalType.value.internalType)}break;default:R(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:t.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new O({name:"DateTime",namespace:Dr});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:R(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){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 literalString(e){return new this({type:"literal",value:D.string(e)})}static literalBoolean(e){return new this({type:"literal",value:D.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeTypeDictEntry({writer:e,entry:n,comment:o}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:o})}getUniqueTypes({writer:e,types:n,comment:o}){let i=new Set;return n.filter(u=>{let f=u.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:o});return i.has(f)?!1:(i.add(f),!0)})}toString({namespace:e,rootNamespace:n,customConfig:o,comment:i}){let u=new Z({namespace:e,rootNamespace:n,customConfig:o});return this.write(u,{comment:i!=null?i:!1}),u.toString()}},Af=new O({namespace:Dr,name:"DateTime"});a();s();function Sf(t){return t.startsWith("$")?t.slice(1):t}var Tf="values",$e=class extends w{constructor({name:e,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:f,constructorAccess:c}){super();d(this,"name");d(this,"namespace");d(this,"constructorAccess");d(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=c!=null?c:"public",this.class_=new ue({name:e,namespace:n,abstract:o,docs:i,parentClassReference:u,traits:f})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=be(this.class_.fields).map(o=>Ge(je({},o),{name:Sf(o.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:x.codeblock(o=>{for(let i of n)o.write(`$this->${i.name} = $${Tf}['${i.name}']`),i.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new pe({name:Tf,type:W.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new B("[]"):void 0})]}};a();s();a();s();var le=class extends w{constructor({name:e,access:n,parameters:o,throws:i,return_:u,body:f,docs:c,classReference:y,static_:m}){super();d(this,"name");d(this,"access");d(this,"parameters");d(this,"throws");d(this,"return_");d(this,"body");d(this,"docs");d(this,"classReference");d(this,"static_");this.name=e,this.access=n,this.parameters=o,this.throws=i!=null?i:[],this.return_=u,this.body=f,this.docs=c,this.classReference=y,this.static_=m!=null?m:!1}write(e){var u;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(f=>!f.type.isOptional()),o=this.parameters.filter(f=>f.type.isOptional());[...n,...o].forEach((f,c)=>{c>0&&e.write(", "),f.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(u=this.body)==null||u.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new k({docs:this.docs});for(let o of this.parameters)n.addTag({tagType:"param",type:o.type,name:o.name,docs:o.docs});this.return_!=null&&this.return_!==xf&&this.return_!==vf&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:W.reference(o)});e.writeNode(n)}};var ke=class extends w{constructor({name:e,namespace:n,backing:o,docs:i,serializable:u}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=e,this.namespace=n,this.backing=o,this.docs=i,this.serializable=u!=null?u:!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 O({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 le({name:"jsonSerialize",return_:W.string(),access:"public",parameters:[],body:new B("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new k({docs:this.docs}).write(e)}};a();s();var _e=class extends w{constructor({name:e,type:n,access:o,readonly_:i,initializer:u,docs:f,inlineDocs:c,attributes:y,inherited:m}){super();d(this,"name");d(this,"type");d(this,"access");d(this,"readonly_");d(this,"initializer");d(this,"docs");d(this,"inlineDocs");d(this,"attributes");d(this,"inherited");this.name=we(e),this.type=n,this.access=o,this.readonly_=i!=null?i:!1,this.initializer=u,this.docs=f,this.inlineDocs=c,this.attributes=y!=null?y:[],this.inherited=m!=null?m:!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 k;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,o)=>{o>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Me=class extends w{constructor({entries:e,multiline:n}){super();d(this,"entries");d(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:o}of this.entries)n.write(e),e.write(" => "),o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:o,value:i}]of this.entries.entries())n>0&&e.write(", "),o.write(e),e.write(" => "),i.write(e);e.write("]")}};a();s();var Ut=class extends w{constructor(e){super();d(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),fr({writer:e,arguments_:this.arrays.map(n=>De(o=>{if(typeof n=="string"||n instanceof w){o.writeNodeOrString(n);return}o.writeNodeOrString(n.ref),n.fallback&&(o.write(" ?? "),o.writeNodeOrString(n.fallback))}))})}};function yx(t){return new Be(t)}function mx(t){return new Ue(t)}function hx(t){return new ue(t)}function gx(t){return new qe(t)}function xx(t){return new O(t)}function De(t){return new B(t)}function vx(t){return new $e(t)}function wx(t){return new ke(t)}function bx(t){return new _e(t)}function Ef(t){return new Q(t)}function Ax(t){return new fe(t)}function Sx(t){return De(r=>{r.write("throw "),r.writeNode(Ef(t))})}function Tx(t){return new Me(t)}function Ex(t){return new le(t)}function Rx(t){return new pe(t)}function Px(t){return new Ur(t)}function Ix(t,r){return De(e=>{e.writeNodeOrString(t),e.write(" = "),e.writeNodeOrString(r)})}function Nx(t){return De(we(t))}function Cx(t){return De(`"${t}"`)}function Fx(...t){return new Ut(t)}function Ox(){return new B(t=>{t.write("$this")})}var Rf="$client",qt="Example",Pf=`<?php
31
31
 
32
- `,$t=class{constructor({context:e}){d(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:r});return Rp+await n.toStringAsync({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:e,request:r}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:r});return Rp+n.toString({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:e,snippet:r}){return x.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:e,snippet:r})),n.writeNodeStatement(this.callMethod({endpoint:e,snippet:r}))})}constructClient({endpoint:e,snippet:r}){return x.codeblock(n=>{n.write(`${Tp} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:e,snippet:r})))})}callMethod({endpoint:e,snippet:r}){return x.invokeMethod({on:x.codeblock(Tp),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:r}),multiline:!0})}getConstructorArgs({endpoint:e,snippet:r}){let n=[];e.auth!=null&&(r.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:r.auth})):this.context.errors.add({severity:E.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let o=[],i=this.getConstructorBaseUrlArgs({baseUrl:r.baseURL,environment:r.environment});return i.length>0&&o.push(...i),this.context.errors.scope(H.Headers),this.context.ir.headers!=null&&r.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:r.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:x.TypeLiteral.map({entries:o.map(u=>({key:x.TypeLiteral.string(u.name),value:u.value}))})}]}getConstructorAuthArgs({auth:e,values:r}){switch(e.type){case"basic":return r.type!=="basic"?(this.context.errors.add({severity:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBasicAuthArgs({auth:e,values:r});case"bearer":return r.type!=="bearer"?(this.context.errors.add({severity:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:r});case"header":return r.type!=="header"?(this.context.errors.add({severity:E.Critical,message:this.context.newAuthMismatchError({auth:e,values:r}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:r});default:P(e)}}getConstructorBasicAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.username),assignment:x.TypeLiteral.string(r.username)},{name:this.context.getPropertyName(e.password),assignment:x.TypeLiteral.string(r.password)}]}getConstructorBaseUrlArgs({baseUrl:e,environment:r}){let n=this.getBaseUrlArg({baseUrl:e,environment:r});return x.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:e,environment:r}){if(e!=null&&r!=null)return this.context.errors.add({severity:E.Critical,message:"Cannot specify both baseUrl and environment options"}),x.TypeLiteral.nop();if(e!=null)return x.TypeLiteral.string(e);if(r!=null){if(this.context.isSingleEnvironmentID(r)){let n=this.context.getEnvironmentClassAccessFromID(r);return n==null?(this.context.errors.add({severity:E.Warning,message:`Environment ${JSON.stringify(r)} was not found`}),x.TypeLiteral.nop()):x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(r)&&this.context.errors.add({severity:E.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return x.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.token),assignment:x.TypeLiteral.string(r.token)}]}getConstructorHeaderAuthArgs({auth:e,values:r}){return[{name:this.context.getPropertyName(e.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:r.value})}]}getConstructorHeaderArgs({headers:e,values:r}){let n=[];for(let o of e){let i=this.getConstructorHeaderArg({header:o,value:r.value});i!=null&&n.push({name:this.context.getPropertyName(o.name.name),value:i})}return n}getConstructorHeaderArg({header:e,value:r}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:r});if(!x.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:P(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:r}){let n=[];if(this.context.errors.scope(H.PathParameters),e.pathParameters!=null){let o=this.getPathParameters({namedParameters:e.pathParameters,snippet:r});n.push(...o.map(i=>i.value))}return this.context.errors.unscope(),this.context.errors.scope(H.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:r.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:P(e)}}getBytesBodyRequestArg({value:e}){return this.context.errors.add({severity:E.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),x.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:e,snippet:r}){var p,c;let n=[],o=(c=(p=this.context.customConfig)==null?void 0:p.inlinePathParameters)!=null?c:!1;this.context.errors.scope(H.PathParameters);let i=[];e.pathParameters!=null&&i.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(H.RequestBody);let u=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...i.map(y=>y.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:e,snippet:r,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?i:[],filePropertyInfo:u})),n}getFilePropertyInfo({request:e,snippet:r}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:r.requestBody})}getInlinedRequestArg({request:e,snippet:r,pathParameterFields:n,filePropertyInfo:o}){var h,g,v,b;this.context.errors.scope(H.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(g=r.queryParameters)!=null?g:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(H.Headers);let c=this.context.associateByWireValue({parameters:(v=e.headers)!=null?v:[],values:(b=r.headers)!=null?b:{}}).map(T=>({name:this.context.getPropertyName(T.name.name),value:this.context.dynamicTypeLiteralMapper.convert(T)}));this.context.errors.unscope(),this.context.errors.scope(H.RequestBody);let y=e.body!=null?this.getInlinedRequestBodyConstructorFields({body:e.body,value:r.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getRequestNamespace(e.declaration.fernFilepath)}),fields:[...n,...u,...c,...y]})}getInlinedRequestBodyConstructorFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:e,value:r})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:P(e)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:e}){return[...e.fileFields,...e.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:e,value:r}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:r})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:P(e)}}getInlinedRequestBodyPropertyConstructorFields({parameters:e,value:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=this.context.getRecord(r))!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:e,snippet:r}){var i;let n=[],o=this.context.associateByWireValue({parameters:e,values:(i=r.pathParameters)!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(r=>this.context.getPropertyName(r)).join("->")}->${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientClassInstantiation(e){return x.instantiateClass({classReference:x.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:e,multiline:!0})}};a();s();a();s();var kt=class{constructor({context:e}){d(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?x.TypeLiteral.null():(this.context.errors.add({severity:E.Critical,message:"Expected non-null value, but got null"}),x.TypeLiteral.nop());if(e.value===void 0)return x.TypeLiteral.nop();switch(e.typeReference.type){case"list":case"set":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?x.TypeLiteral.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"unknown":return this.convertUnknown({value:e.value});default:P(e.typeReference)}}convertLiteral({literalType:e,value:r}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.string(n)}default:P(e)}}convertList({list:e,value:r}){return Array.isArray(r)?x.TypeLiteral.list({values:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:E.Critical,message:`Expected array but got: ${typeof r}`}),x.TypeLiteral.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:E.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),x.TypeLiteral.nop()):x.TypeLiteral.map({entries:Object.entries(r).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:r,as:n}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:r,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:r});case"enum":return this.convertEnum({enum_:e,value:r});case"object":return this.convertObject({object_:e,value:r});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r});default:P(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){return x.TypeLiteral.string("todo")}convertObject({object_:e,value:r}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(r))!=null?o:{}});return x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:r}){let n=this.getEnumValueName({enum_:e,value:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(x.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)})),o.write("::"),o.write(n),o.write("->value")}))}getEnumValueName({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:E.Critical,message:`Expected enum value string, got: ${typeof r}`});return}let n=e.values.find(o=>o.wireValue===r);if(n==null){this.context.errors.add({severity:E.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?x.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r}){for(let n of e.types)try{return this.convert({typeReference:n,value:r})}catch(o){continue}this.context.errors.add({severity:E.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown({value:e}){return x.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:r,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:r,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:r,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:r});return o==null?x.TypeLiteral.nop():x.TypeLiteral.string(o)}default:P(e)}}getValueAsNumber({value:e,as:r}){let n=r==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=r==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};a();s();var _t=class{constructor({context:e}){d(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(r))!=null?i:{};for(let u of e.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getSingleFileProperty({property:u,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getArrayFileProperty({property:u,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:this.getBodyProperty({property:u,record:o})});break;default:P(u)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.file(n)}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return n==null?x.TypeLiteral.nop():x.TypeLiteral.list({values:n.map(o=>x.TypeLiteral.file(o))})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?x.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var Ox=["use","clone","list"],Lx="Requests",Bx="Types",Mt=class t extends Mr{constructor({ir:r,config:n}){var o;super({ir:r,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new kt({context:this}),this.filePropertyMapper=new _t({context:this}),this.rootNamespace=Ux({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new t({ir:this.ir,config:this.config})}getParameterName(r){return this.prependUnderscoreIfNeeded(r.camelCase.unsafeName)}getPropertyName(r){return this.prependUnderscoreIfNeeded(r.camelCase.unsafeName)}getMethodName(r){let n=r.camelCase.unsafeName;return Ox.includes(n)?n:r.camelCase.safeName}getClassName(r){return r.pascalCase.safeName}getRootClientClassName(){var r,n,o;return((r=this.customConfig)==null?void 0:r.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(o=this.customConfig)==null?void 0:o["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return x.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(r){return this.getNamespace(r,Lx)}getTypesNamespace(r){return this.getNamespace(r,Bx)}getNamespace(r,n){let o=r.allParts.map(i=>i.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(r){let n=this.resolveEnvironmentName(r);if(n!=null)return x.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(r){return x.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(r){return/^[a-zA-Z_]/.test(r)?r:`_${r}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${ur(Lt(this.config.organization))}`}};function Ux({organization:t,namespaceOverride:e}){return e!=null?e:`${ur(Lt(t))}`}var Dt=class extends $r{constructor({ir:e,config:r}){super(new Mt({ir:e,config:r}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new $t({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
32
+ `,$t=class{constructor({context:r}){d(this,"context");this.context=r}async generateSnippet({endpoint:r,request:e}){var o;let n=this.buildCodeBlock({endpoint:r,snippet:e});return Pf+await n.toStringAsync({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:r,request:e}){var o;let n=this.buildCodeBlock({endpoint:r,snippet:e});return Pf+n.toString({namespace:qt,rootNamespace:qt,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:r,snippet:e}){return x.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:r,snippet:e})),n.writeNodeStatement(this.callMethod({endpoint:r,snippet:e}))})}constructClient({endpoint:r,snippet:e}){return x.codeblock(n=>{n.write(`${Rf} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:r,snippet:e})))})}callMethod({endpoint:r,snippet:e}){return x.invokeMethod({on:x.codeblock(Rf),method:this.getMethod({endpoint:r}),arguments_:this.getMethodArgs({endpoint:r,snippet:e}),multiline:!0})}getConstructorArgs({endpoint:r,snippet:e}){let n=[];r.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:r.auth,values:e.auth})):this.context.errors.add({severity:A.Warning,message:`Auth with ${r.auth.type} configuration is required for this endpoint`}));let o=[],i=this.getConstructorBaseUrlArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&o.push(...i),this.context.errors.scope(K.Headers),this.context.ir.headers!=null&&e.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:x.TypeLiteral.map({entries:o.map(u=>({key:x.TypeLiteral.string(u.name),value:u.value}))})}]}getConstructorAuthArgs({auth:r,values:e}){switch(r.type){case"basic":return e.type!=="basic"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):this.getConstructorBasicAuthArgs({auth:r,values:e});case"bearer":return e.type!=="bearer"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):this.getConstructorBearerAuthArgs({auth:r,values:e});case"header":return e.type!=="header"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):this.getConstructorHeaderAuthArgs({auth:r,values:e});case"oauth":return e.type!=="oauth"?(this.context.errors.add({severity:A.Critical,message:this.context.newAuthMismatchError({auth:r,values:e}).message}),[]):(this.context.errors.add({severity:A.Warning,message:"The PHP SDK doesn't support OAuth client credentials yet"}),[]);default:R(r)}}getConstructorBasicAuthArgs({auth:r,values:e}){return[{name:this.context.getPropertyName(r.username),assignment:x.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(r.password),assignment:x.TypeLiteral.string(e.password)}]}getConstructorBaseUrlArgs({baseUrl:r,environment:e}){let n=this.getBaseUrlArg({baseUrl:r,environment:e});return x.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:r,environment:e}){if(r!=null&&e!=null)return this.context.errors.add({severity:A.Critical,message:"Cannot specify both baseUrl and environment options"}),x.TypeLiteral.nop();if(r!=null)return x.TypeLiteral.string(r);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let n=this.context.getEnvironmentClassAccessFromID(e);return n==null?(this.context.errors.add({severity:A.Warning,message:`Environment ${JSON.stringify(e)} was not found`}),x.TypeLiteral.nop()):x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(e)&&this.context.errors.add({severity:A.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return x.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:r,values:e}){return[{name:this.context.getPropertyName(r.token),assignment:x.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:r,values:e}){return[{name:this.context.getPropertyName(r.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:r.header.typeReference,value:e.value})}]}getConstructorHeaderArgs({headers:r,values:e}){let n=[];for(let o of r){let i=this.getConstructorHeaderArg({header:o,value:e.value});i!=null&&n.push({name:this.context.getPropertyName(o.name.name),value:i})}return n}getConstructorHeaderArg({header:r,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:e});if(!x.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:r,snippet:e}){switch(r.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:r.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:r.request,snippet:e});default:R(r.request)}}getMethodArgsForBodyRequest({request:r,snippet:e}){var i,u;let n=[];this.context.errors.scope(K.PathParameters);let o=[...(i=this.context.ir.pathParameters)!=null?i:[],...(u=r.pathParameters)!=null?u:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:e}).map(f=>f.value)),this.context.errors.unscope(),this.context.errors.scope(K.RequestBody),r.body!=null&&n.push(this.getBodyRequestArg({body:r.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:r,value:e}){switch(r.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:r.value,value:e});default:R(r)}}getBytesBodyRequestArg({value:r}){return this.context.errors.add({severity:A.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),x.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:r,snippet:e}){var c,y,m,g;let n=[],o=(y=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?y:!1;this.context.errors.scope(K.PathParameters);let i=[],u=[...(m=this.context.ir.pathParameters)!=null?m:[],...(g=r.pathParameters)!=null?g:[]];u.length>0&&i.push(...this.getPathParameters({namedParameters:u,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(K.RequestBody);let f=this.getFilePropertyInfo({request:r,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:r,inlinePathParameters:o})||n.push(...i.map(v=>v.value)),this.context.needsRequestParameter({request:r,inlinePathParameters:o,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:r,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:r,inlinePathParameters:o})?i:[],filePropertyInfo:f})),n}getFilePropertyInfo({request:r,snippet:e}){return r.body==null||!this.context.isFileUploadRequestBody(r.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:r.body,value:e.requestBody})}getInlinedRequestArg({request:r,snippet:e,pathParameterFields:n,filePropertyInfo:o}){var m,g,v,b;this.context.errors.scope(K.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(m=r.queryParameters)!=null?m:[],values:(g=e.queryParameters)!=null?g:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope(K.Headers);let c=this.context.associateByWireValue({parameters:(v=r.headers)!=null?v:[],values:(b=e.headers)!=null?b:{}}).map(E=>({name:this.context.getPropertyName(E.name.name),value:this.context.dynamicTypeLiteralMapper.convert(E)}));this.context.errors.unscope(),this.context.errors.scope(K.RequestBody);let y=r.body!=null?this.getInlinedRequestBodyConstructorFields({body:r.body,value:e.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getRequestNamespace(r.declaration.fernFilepath)}),fields:[...n,...u,...c,...y]})}getInlinedRequestBodyConstructorFields({body:r,value:e,filePropertyInfo:n}){switch(r.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:r.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:r,value:e})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:R(r)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:r}){return[...r.fileFields,...r.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:r,value:e}){return{name:this.context.getPropertyName(r.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:r.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:r,value:e}){switch(r.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:r.value,value:e});default:R(r)}}getInlinedRequestBodyPropertyConstructorFields({parameters:r,value:e}){var i;let n=[],o=this.context.associateByWireValue({parameters:r,values:(i=this.context.getRecord(e))!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:r,snippet:e}){var i;let n=[],o=this.context.associateByWireValue({parameters:r,values:(i=e.pathParameters)!=null?i:{}});for(let u of o)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:r}){return r.declaration.fernFilepath.allParts.length>0?`${r.declaration.fernFilepath.allParts.map(e=>this.context.getPropertyName(e)).join("->")}->${this.context.getMethodName(r.declaration.name)}`:this.context.getMethodName(r.declaration.name)}getRootClientClassInstantiation(r){return x.instantiateClass({classReference:x.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:r,multiline:!0})}};a();s();a();s();var kt=class{constructor({context:r}){d(this,"context");this.context=r}convert(r){if(r.value===null)return this.context.isNullable(r.typeReference)?x.TypeLiteral.null():(this.context.errors.add({severity:A.Critical,message:"Expected non-null value, but got null"}),x.TypeLiteral.nop());if(r.value===void 0)return x.TypeLiteral.nop();switch(r.typeReference.type){case"list":case"set":return this.convertList({list:r.typeReference.value,value:r.value});case"literal":return this.convertLiteral({literalType:r.typeReference.value,value:r.value});case"map":return this.convertMap({map:r.typeReference,value:r.value});case"named":{let e=this.context.resolveNamedType({typeId:r.typeReference.value});return e==null?x.TypeLiteral.nop():this.convertNamed({named:e,value:r.value,as:r.as})}case"optional":return this.convert({typeReference:r.typeReference.value,value:r.value,as:r.as});case"nullable":return this.convert({typeReference:r.typeReference.value,value:r.value,as:r.as});case"primitive":return this.convertPrimitive({primitive:r.typeReference.value,value:r.value,as:r.as});case"unknown":return this.convertUnknown({value:r.value});default:R(r.typeReference)}}convertLiteral({literalType:r,value:e}){switch(r.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.string(n)}default:R(r)}}convertList({list:r,value:e}){return Array.isArray(e)?x.TypeLiteral.list({values:e.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:r,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:A.Critical,message:`Expected array but got: ${typeof e}`}),x.TypeLiteral.nop())}convertMap({map:r,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:A.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),x.TypeLiteral.nop()):x.TypeLiteral.map({entries:Object.entries(e).map(([n,o])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:r.key,value:n,as:"key"}),value:this.convert({typeReference:r.value,value:o})}}finally{this.context.errors.unscope()}})})}convertNamed({named:r,value:e,as:n}){switch(r.type){case"alias":return this.convert({typeReference:r.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:r,value:e});case"enum":return this.convertEnum({enum_:r,value:e});case"object":return this.convertObject({object_:r,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:r,value:e});default:R(r)}}convertDiscriminatedUnion({discriminatedUnion:r,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:r,value:e});if(n==null)return x.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});return i==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(u=>{u.writeNode(x.invokeMethod({on:x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getTypesNamespace(r.declaration.fernFilepath)}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:i}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:r,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:e.typeId});if(n==null)return;let o=this.convertNamed({named:n,value:r.value});if(!o.isClass()){this.context.errors.add({severity:A.Critical,message:"Internal error; expected union value to be an object"});return}return o.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let n=this.context.getRecord(r.value);return n==null?[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:r.value})}]:[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:n[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:R(e)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:r,unionVariant:e,unionProperties:n}){let o=this.getBaseFields({discriminatedUnionTypeInstance:r,singleDiscriminatedUnionType:e});if(e.type==="singleProperty"&&this.context.getRecord(r.value)==null&&n.length===1)return[...o,this.convert({typeReference:e.typeReference,value:r.value})];if(e.type==="samePropertiesAsObject"){let i=this.context.resolveNamedType({typeId:e.typeId});return i==null?[]:[...o,x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(i.declaration.name),namespace:this.context.getTypesNamespace(i.declaration.fernFilepath)}),fields:n})]}return o}getBaseFields({discriminatedUnionTypeInstance:r,singleDiscriminatedUnionType:e}){var o,i;return this.context.associateByWireValue({parameters:(o=e.properties)!=null?o:[],values:(i=this.context.getRecord(r.value))!=null?i:{},ignoreMissingParameters:!0}).map(u=>{this.context.errors.scope(u.name.wireValue);try{return this.convert(u)}finally{this.context.errors.unscope()}})}convertObject({object_:r,value:e}){var o;let n=this.context.associateByWireValue({parameters:r.properties,values:(o=this.context.getRecord(e))!=null?o:{}});return x.TypeLiteral.class_({reference:x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getTypesNamespace(r.declaration.fernFilepath)}),fields:n.map(i=>{this.context.errors.scope(i.name.wireValue);try{return{name:this.context.getPropertyName(i.name.name),value:this.convert(i)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:r,value:e}){let n=this.getEnumValueName({enum_:r,value:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.reference(x.codeblock(o=>{o.writeNode(x.classReference({name:this.context.getClassName(r.declaration.name),namespace:this.context.getTypesNamespace(r.declaration.fernFilepath)})),o.write("::"),o.write(n),o.write("->value")}))}getEnumValueName({enum_:r,value:e}){if(typeof e!="string"){this.context.errors.add({severity:A.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let n=r.values.find(o=>o.wireValue===e);if(n==null){this.context.errors.add({severity:A.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:r,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:r,value:e});return n==null?x.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:r,value:e}){for(let n of r.types)try{return this.convert({typeReference:n,value:e})}catch(o){continue}this.context.errors.add({severity:A.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:r}){return x.TypeLiteral.unknown(r)}convertPrimitive({primitive:r,value:e,as:n}){switch(r){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:e,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:e});return o==null?x.TypeLiteral.nop():x.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:e,as:n});return o==null?x.TypeLiteral.nop():x.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:e});return o==null?x.TypeLiteral.nop():x.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:e});return o==null?x.TypeLiteral.nop():x.TypeLiteral.string(o)}default:R(r)}}getValueAsNumber({value:r,as:e}){let n=e==="key"&&typeof r=="string"?Number(r):r;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:r,as:e}){let n=e==="key"?typeof r=="string"?r==="true":r==="false"?!1:r:r;return this.context.getValueAsBoolean({value:n})}};a();s();var _t=class{constructor({context:r}){d(this,"context");this.context=r}getFilePropertyInfo({body:r,value:e}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(e))!=null?i:{};for(let u of r.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getSingleFileProperty({property:u,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getArrayFileProperty({property:u,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:this.getBodyProperty({property:u,record:o})});break;default:R(u)}return n}getSingleFileProperty({property:r,record:e}){let n=this.context.getSingleFileValue({property:r,record:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.file(n)}getArrayFileProperty({property:r,record:e}){let n=this.context.getFileArrayValues({property:r,record:e});return n==null?x.TypeLiteral.nop():x.TypeLiteral.list({values:n.map(o=>x.TypeLiteral.file(o))})}getBodyProperty({property:r,record:e}){let n=e[r.name.wireValue];return n==null?x.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:n})}};var Lx=["use","clone","list"],Bx="Requests",Ux="Types",Mt=class t extends Mr{constructor({ir:e,config:n}){var o;super({ir:e,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=e,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new kt({context:this}),this.filePropertyMapper=new _t({context:this}),this.rootNamespace=qx({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new t({ir:this.ir,config:this.config})}getParameterName(e){return this.prependUnderscoreIfNeeded(e.camelCase.unsafeName)}getPropertyName(e){return this.prependUnderscoreIfNeeded(e.camelCase.unsafeName)}getMethodName(e){let n=e.camelCase.unsafeName;return Lx.includes(n)?n:e.camelCase.safeName}getClassName(e){return e.pascalCase.safeName}getRootClientClassName(){var e,n,o;return((e=this.customConfig)==null?void 0:e.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(o=this.customConfig)==null?void 0:o["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return x.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(e){return this.getNamespace(e,Bx)}getTypesNamespace(e){return this.getNamespace(e,Ux)}getNamespace(e,n){let o=e.allParts.map(i=>i.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return x.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(e){return x.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(e){return/^[a-zA-Z_]/.test(e)?e:`_${e}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${ur(Bt(this.config.organization))}`}};function qx({organization:t,namespaceOverride:r}){return r!=null?r:`${ur(Bt(t))}`}var Dt=class extends $r{constructor({ir:r,config:e}){super(new Mt({ir:r,config:e}))}async generate(r){return super.generate(r)}generateSync(r){return super.generateSync(r)}createSnippetGenerator(r){return new $t({context:r})}};0&&(module.exports={DynamicSnippetsGenerator});
33
33
  /*! Bundled license information:
34
34
 
35
35
  @esbuild-plugins/node-globals-polyfill/Buffer.js: