@fern-api/php-dynamic-snippets 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +18 -11
  2. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
  3. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  4. package/cjs/{DynamicSnippetsGeneratorContext-7JXlOyjB.d.cts → DynamicSnippetsGeneratorContext-CwkDTYOI.d.cts} +3 -3
  5. package/cjs/EndpointSnippetGenerator.cjs +20 -13
  6. package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
  7. package/cjs/EndpointSnippetGenerator.d.cts +6 -1
  8. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +17 -10
  9. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
  10. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  11. package/cjs/context/DynamicTypeLiteralMapper.cjs +17 -10
  12. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
  13. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  14. package/cjs/context/FilePropertyMapper.cjs +17 -10
  15. package/cjs/context/FilePropertyMapper.cjs.map +1 -1
  16. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  17. package/cjs/index.cjs +20 -25
  18. package/cjs/index.cjs.map +1 -1
  19. package/cjs/index.d.cts +1 -1
  20. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  21. package/esm/DynamicSnippetsGenerator.js +1 -1
  22. package/esm/{DynamicSnippetsGeneratorContext-7JXlOyjB.d.ts → DynamicSnippetsGeneratorContext-CwkDTYOI.d.ts} +3 -3
  23. package/esm/EndpointSnippetGenerator.d.ts +6 -1
  24. package/esm/EndpointSnippetGenerator.js +1 -1
  25. package/esm/chunk-3LG5WCZI.js +2 -0
  26. package/esm/chunk-3LG5WCZI.js.map +1 -0
  27. package/esm/{chunk-KU3OGJUU.js → chunk-3QAUV5WT.js} +2 -2
  28. package/esm/chunk-6HHK4TUF.js +4 -0
  29. package/esm/chunk-6HHK4TUF.js.map +1 -0
  30. package/esm/{chunk-625QSFAH.js → chunk-EECVWAVT.js} +2 -2
  31. package/esm/{chunk-625QSFAH.js.map → chunk-EECVWAVT.js.map} +1 -1
  32. package/esm/chunk-PYHFKEW4.js +47 -0
  33. package/esm/chunk-PYHFKEW4.js.map +1 -0
  34. package/esm/chunk-SGTIIPPK.js +2 -0
  35. package/esm/chunk-XX3MRTVI.js +2 -0
  36. package/esm/chunk-XX3MRTVI.js.map +1 -0
  37. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  38. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  39. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  40. package/esm/context/DynamicTypeLiteralMapper.js +1 -1
  41. package/esm/context/FilePropertyMapper.d.ts +1 -1
  42. package/esm/context/FilePropertyMapper.js +1 -1
  43. package/esm/index.d.ts +1 -1
  44. package/esm/index.js +1 -13
  45. package/esm/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/esm/chunk-7MI6WLZG.js +0 -2
  48. package/esm/chunk-7MI6WLZG.js.map +0 -1
  49. package/esm/chunk-BYNT7UJT.js +0 -2
  50. package/esm/chunk-BYNT7UJT.js.map +0 -1
  51. package/esm/chunk-J4Y3S6QS.js +0 -40
  52. package/esm/chunk-J4Y3S6QS.js.map +0 -1
  53. package/esm/chunk-YKXTGZL6.js +0 -4
  54. package/esm/chunk-YKXTGZL6.js.map +0 -1
  55. package/esm/chunk-ZYT6M32A.js +0 -2
  56. /package/esm/{chunk-KU3OGJUU.js.map → chunk-3QAUV5WT.js.map} +0 -0
  57. /package/esm/{chunk-ZYT6M32A.js.map → chunk-SGTIIPPK.js.map} +0 -0
package/cjs/index.cjs CHANGED
@@ -1,35 +1,30 @@
1
- "use strict";var pc=Object.create;var Et=Object.defineProperty,lc=Object.defineProperties,cc=Object.getOwnPropertyDescriptor,dc=Object.getOwnPropertyDescriptors,mc=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,hc=Object.getPrototypeOf,Sn=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable;var Tn=(r,e,t)=>e in r?Et(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,et=(r,e)=>{for(var t in e||(e={}))Sn.call(e,t)&&Tn(r,t,e[t]);if(rr)for(var t of rr(e))Xo.call(e,t)&&Tn(r,t,e[t]);return r},tt=(r,e)=>lc(r,dc(e));var ei=r=>typeof r=="symbol"?r:r+"",ti=(r,e)=>{var t={};for(var n in r)Sn.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&rr)for(var n of rr(r))e.indexOf(n)<0&&Xo.call(r,n)&&(t[n]=r[n]);return t};var rt=(r,e)=>()=>(r&&(e=r(r=0)),e);var x=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),En=(r,e)=>{for(var t in e)Et(r,t,{get:e[t],enumerable:!0})},ri=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mc(e))!Sn.call(r,o)&&o!==t&&Et(r,o,{get:()=>e[o],enumerable:!(n=cc(e,o))||n.enumerable});return r};var yc=(r,e,t)=>(t=r!=null?pc(hc(r)):{},ri(e||!r||!r.__esModule?Et(t,"default",{value:r,enumerable:!0}):t,r)),ni=r=>ri(Et({},"__esModule",{value:!0}),r);var d=(r,e,t)=>Tn(r,typeof e!="symbol"?e+"":e,t);function ii(){throw new Error("setTimeout has not been defined")}function ai(){throw new Error("clearTimeout has not been defined")}function si(r){if(we===setTimeout)return setTimeout(r,0);if((we===ii||!we)&&setTimeout)return we=setTimeout,setTimeout(r,0);try{return we(r,0)}catch(e){try{return we.call(null,r,0)}catch(t){return we.call(this,r,0)}}}function gc(r){if(be===clearTimeout)return clearTimeout(r);if((be===ai||!be)&&clearTimeout)return be=clearTimeout,clearTimeout(r);try{return be(r)}catch(e){try{return be.call(null,r)}catch(t){return be.call(this,r)}}}function xc(){!ot||!Be||(ot=!1,Be.length?ie=Be.concat(ie):nr=-1,ie.length&&ui())}function ui(){if(!ot){var r=si(xc);ot=!0;for(var e=ie.length;e;){for(Be=ie,ie=[];++nr<e;)Be&&Be[nr].run();nr=-1,e=ie.length}Be=null,ot=!1,gc(r)}}function vc(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ie.push(new fi(r,e)),ie.length===1&&!ot&&si(ui)}function fi(r,e){this.fun=r,this.array=e}function qe(){}function qc(r){throw new Error("process.binding is not supported")}function Uc(){return"/"}function Mc(r){throw new Error("process.chdir is not supported")}function Dc(){return 0}function kc(r){var e=$c.call(nt)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function Wc(){var r=new Date,e=r-jc;return e/1e3}var we,be,ie,ot,Be,nr,wc,bc,Ac,Tc,Sc,Ec,Rc,Ic,Pc,Cc,Nc,Oc,Lc,Fc,_c,Bc,nt,$c,jc,p,oi,i=rt(()=>{"use strict";we=ii,be=ai;typeof globalThis.setTimeout=="function"&&(we=setTimeout);typeof globalThis.clearTimeout=="function"&&(be=clearTimeout);ie=[],ot=!1,nr=-1;fi.prototype.run=function(){this.fun.apply(null,this.array)};wc="browser",bc="browser",Ac=!0,Tc={},Sc=[],Ec="",Rc={},Ic={},Pc={};Cc=qe,Nc=qe,Oc=qe,Lc=qe,Fc=qe,_c=qe,Bc=qe;nt=globalThis.performance||{},$c=nt.now||nt.mozNow||nt.msNow||nt.oNow||nt.webkitNow||function(){return new Date().getTime()};jc=new Date;p={nextTick:vc,title:wc,browser:Ac,env:Tc,argv:Sc,version:Ec,versions:Rc,on:Cc,addListener:Nc,once:Oc,off:Lc,removeListener:Fc,removeAllListeners:_c,emit:Bc,binding:qc,cwd:Uc,chdir:Mc,umask:Dc,hrtime:kc,platform:bc,release:Ic,config:Pc,uptime:Wc},oi={};Object.keys(oi).forEach(r=>{let e=r.split("."),t=p;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?t[o]=oi[r]:t=t[o]||(t[o]={})}})});function di(){In=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)K[e]=r[e],D[r.charCodeAt(e)]=e;D[45]=62,D[95]=63}function zc(r){In||di();var e,t,n,o,s,f,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=r[l-2]==="="?2:r[l-1]==="="?1:0,f=new Gc(l*3/4-s),n=s>0?l-4:l;var c=0;for(e=0,t=0;e<n;e+=4,t+=3)o=D[r.charCodeAt(e)]<<18|D[r.charCodeAt(e+1)]<<12|D[r.charCodeAt(e+2)]<<6|D[r.charCodeAt(e+3)],f[c++]=o>>16&255,f[c++]=o>>8&255,f[c++]=o&255;return s===2?(o=D[r.charCodeAt(e)]<<2|D[r.charCodeAt(e+1)]>>4,f[c++]=o&255):s===1&&(o=D[r.charCodeAt(e)]<<10|D[r.charCodeAt(e+1)]<<4|D[r.charCodeAt(e+2)]>>2,f[c++]=o>>8&255,f[c++]=o&255),f}function Vc(r){return K[r>>18&63]+K[r>>12&63]+K[r>>6&63]+K[r&63]}function Hc(r,e,t){for(var n,o=[],s=e;s<t;s+=3)n=(r[s]<<16)+(r[s+1]<<8)+r[s+2],o.push(Vc(n));return o.join("")}function pi(r){In||di();for(var e,t=r.length,n=t%3,o="",s=[],f=16383,l=0,c=t-n;l<c;l+=f)s.push(Hc(r,l,l+f>c?c:l+f));return n===1?(e=r[t-1],o+=K[e>>2],o+=K[e<<4&63],o+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],o+=K[e>>10],o+=K[e>>4&63],o+=K[e<<2&63],o+="="),s.push(o),s.join("")}function or(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ae(r,e){if(or()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=u.prototype):(r===null&&(r=new u(e)),r.length=e),r}function u(r,e,t){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Pn(this,r)}return mi(this,r,e,t)}function mi(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Jc(r,e,t,n):typeof e=="string"?Kc(r,e,t):Zc(r,e)}function hi(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Yc(r,e,t,n){return hi(e),e<=0?ae(r,e):t!==void 0?typeof n=="string"?ae(r,e).fill(t,n):ae(r,e).fill(t):ae(r,e)}function Pn(r,e){if(hi(e),r=ae(r,e<0?0:Cn(e)|0),!u.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Kc(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!u.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=yi(e,t)|0;r=ae(r,n);var o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Rn(r,e){var t=e.length<0?0:Cn(e.length)|0;r=ae(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Jc(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),u.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=u.prototype):r=Rn(r,e),r}function Zc(r,e){if(J(e)){var t=Cn(e.length)|0;return r=ae(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||yd(e.length)?ae(r,0):Rn(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Rn(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Cn(r){if(r>=or())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+or().toString(16)+" bytes");return r|0}function J(r){return!!(r!=null&&r._isBuffer)}function yi(r,e){if(J(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return ir(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ti(r).length;default:if(n)return ir(r).length;e=(""+e).toLowerCase(),n=!0}}function Qc(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return ud(this,e,t);case"utf8":case"utf-8":return vi(this,e,t);case"ascii":return ad(this,e,t);case"latin1":case"binary":return sd(this,e,t);case"base64":return od(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fd(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function Ue(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function gi(r,e,t,n,o){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(o)return-1;t=r.length-1}else if(t<0)if(o)t=0;else return-1;if(typeof e=="string"&&(e=u.from(e,n)),J(e))return e.length===0?-1:li(r,e,t,n,o);if(typeof e=="number")return e=e&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):li(r,[e],t,n,o);throw new TypeError("val must be string, number or Buffer")}function li(r,e,t,n,o){var s=1,f=r.length,l=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;s=2,f/=2,l/=2,t/=2}function c(w,A){return s===1?w[A]:w.readUInt16BE(A*s)}var m;if(o){var h=-1;for(m=t;m<f;m++)if(c(r,m)===c(e,h===-1?0:m-h)){if(h===-1&&(h=m),m-h+1===l)return h*s}else h!==-1&&(m-=m-h),h=-1}else for(t+l>f&&(t=f-l),m=t;m>=0;m--){for(var y=!0,g=0;g<l;g++)if(c(r,m+g)!==c(e,g)){y=!1;break}if(y)return m}return-1}function Xc(r,e,t,n){t=Number(t)||0;var o=r.length-t;n?(n=Number(n),n>o&&(n=o)):n=o;var s=e.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var f=0;f<n;++f){var l=parseInt(e.substr(f*2,2),16);if(isNaN(l))return f;r[t+f]=l}return f}function ed(r,e,t,n){return ur(ir(e,r.length-t),r,t,n)}function xi(r,e,t,n){return ur(md(e),r,t,n)}function td(r,e,t,n){return xi(r,e,t,n)}function rd(r,e,t,n){return ur(Ti(e),r,t,n)}function nd(r,e,t,n){return ur(hd(e,r.length-t),r,t,n)}function od(r,e,t){return e===0&&t===r.length?pi(r):pi(r.slice(e,t))}function vi(r,e,t){t=Math.min(r.length,t);for(var n=[],o=e;o<t;){var s=r[o],f=null,l=s>239?4:s>223?3:s>191?2:1;if(o+l<=t){var c,m,h,y;switch(l){case 1:s<128&&(f=s);break;case 2:c=r[o+1],(c&192)===128&&(y=(s&31)<<6|c&63,y>127&&(f=y));break;case 3:c=r[o+1],m=r[o+2],(c&192)===128&&(m&192)===128&&(y=(s&15)<<12|(c&63)<<6|m&63,y>2047&&(y<55296||y>57343)&&(f=y));break;case 4:c=r[o+1],m=r[o+2],h=r[o+3],(c&192)===128&&(m&192)===128&&(h&192)===128&&(y=(s&15)<<18|(c&63)<<12|(m&63)<<6|h&63,y>65535&&y<1114112&&(f=y))}}f===null?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|f&1023),n.push(f),o+=l}return id(n)}function id(r){var e=r.length;if(e<=ci)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=ci));return t}function ad(r,e,t){var n="";t=Math.min(r.length,t);for(var o=e;o<t;++o)n+=String.fromCharCode(r[o]&127);return n}function sd(r,e,t){var n="";t=Math.min(r.length,t);for(var o=e;o<t;++o)n+=String.fromCharCode(r[o]);return n}function ud(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var o="",s=e;s<t;++s)o+=dd(r[s]);return o}function fd(r,e,t){for(var n=r.slice(e,t),o="",s=0;s<n.length;s+=2)o+=String.fromCharCode(n[s]+n[s+1]*256);return o}function N(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}function U(r,e,t,n,o,s){if(!J(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<s)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}function ar(r,e,t,n){e<0&&(e=65535+e+1);for(var o=0,s=Math.min(r.length-t,2);o<s;++o)r[t+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function sr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var o=0,s=Math.min(r.length-t,4);o<s;++o)r[t+o]=e>>>(n?o:3-o)*8&255}function wi(r,e,t,n,o,s){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function bi(r,e,t,n,o){return o||wi(r,e,t,4,34028234663852886e22,-34028234663852886e22),Ei(r,e,t,n,23,4),t+4}function Ai(r,e,t,n,o){return o||wi(r,e,t,8,17976931348623157e292,-17976931348623157e292),Ei(r,e,t,n,52,8),t+8}function ld(r){if(r=cd(r).replace(pd,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function cd(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function dd(r){return r<16?"0"+r.toString(16):r.toString(16)}function ir(r,e){e=e||1/0;for(var t,n=r.length,o=null,s=[],f=0;f<n;++f){if(t=r.charCodeAt(f),t>55295&&t<57344){if(!o){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(f+1===n){(e-=3)>-1&&s.push(239,191,189);continue}o=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536}else o&&(e-=3)>-1&&s.push(239,191,189);if(o=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function md(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function hd(r,e){for(var t,n,o,s=[],f=0;f<r.length&&!((e-=2)<0);++f)t=r.charCodeAt(f),n=t>>8,o=t%256,s.push(o),s.push(n);return s}function Ti(r){return zc(ld(r))}function ur(r,e,t,n){for(var o=0;o<n&&!(o+t>=e.length||o>=r.length);++o)e[o+t]=r[o];return o}function yd(r){return r!==r}function gd(r){return r!=null&&(!!r._isBuffer||Si(r)||xd(r))}function Si(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function xd(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Si(r.slice(0,0))}function fr(r,e,t,n,o){var s,f,l=o*8-n-1,c=(1<<l)-1,m=c>>1,h=-7,y=t?o-1:0,g=t?-1:1,w=r[e+y];for(y+=g,s=w&(1<<-h)-1,w>>=-h,h+=l;h>0;s=s*256+r[e+y],y+=g,h-=8);for(f=s&(1<<-h)-1,s>>=-h,h+=n;h>0;f=f*256+r[e+y],y+=g,h-=8);if(s===0)s=1-m;else{if(s===c)return f?NaN:(w?-1:1)*(1/0);f=f+Math.pow(2,n),s=s-m}return(w?-1:1)*f*Math.pow(2,s-n)}function Ei(r,e,t,n,o,s){var f,l,c,m=s*8-o-1,h=(1<<m)-1,y=h>>1,g=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,A=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,f=h):(f=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-f))<1&&(f--,c*=2),f+y>=1?e+=g/c:e+=g*Math.pow(2,1-y),e*c>=2&&(f++,c/=2),f+y>=h?(l=0,f=h):f+y>=1?(l=(e*c-1)*Math.pow(2,o),f=f+y):(l=e*Math.pow(2,y-1)*Math.pow(2,o),f=0));o>=8;r[t+w]=l&255,w+=A,l/=256,o-=8);for(f=f<<o|l,m+=o;m>0;r[t+w]=f&255,w+=A,f/=256,m-=8);r[t+w-A]|=E*128}var K,D,Gc,In,ci,pd,Ri=rt(()=>{"use strict";i();a();K=[],D=[],Gc=typeof Uint8Array!="undefined"?Uint8Array:Array,In=!1;u.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;u.poolSize=8192;u._augment=function(r){return r.__proto__=u.prototype,r};u.from=function(r,e,t){return mi(null,r,e,t)};u.kMaxLength=or();u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]);u.alloc=function(r,e,t){return Yc(null,r,e,t)};u.allocUnsafe=function(r){return Pn(null,r)};u.allocUnsafeSlow=function(r){return Pn(null,r)};u.isBuffer=gd;u.compare=function(e,t){if(!J(e)||!J(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,o=t.length,s=0,f=Math.min(n,o);s<f;++s)if(e[s]!==t[s]){n=e[s],o=t[s];break}return n<o?-1:o<n?1:0};u.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}};u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return u.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=u.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var f=e[n];if(!J(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(o,s),s+=f.length}return o};u.byteLength=yi;u.prototype._isBuffer=!0;u.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Ue(this,t,t+1);return this};u.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Ue(this,t,t+3),Ue(this,t+1,t+2);return this};u.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Ue(this,t,t+7),Ue(this,t+1,t+6),Ue(this,t+2,t+5),Ue(this,t+3,t+4);return this};u.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?vi(this,0,e):Qc.apply(this,arguments)};u.prototype.equals=function(e){if(!J(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:u.compare(this,e)===0};u.prototype.compare=function(e,t,n,o,s){if(!J(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),s===void 0&&(s=this.length),t<0||n>e.length||o<0||s>this.length)throw new RangeError("out of range index");if(o>=s&&t>=n)return 0;if(o>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,o>>>=0,s>>>=0,this===e)return 0;for(var f=s-o,l=n-t,c=Math.min(f,l),m=this.slice(o,s),h=e.slice(t,n),y=0;y<c;++y)if(m[y]!==h[y]){f=m[y],l=h[y];break}return f<l?-1:l<f?1:0};u.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};u.prototype.indexOf=function(e,t,n){return gi(this,e,t,n,!0)};u.prototype.lastIndexOf=function(e,t,n){return gi(this,e,t,n,!1)};u.prototype.write=function(e,t,n,o){if(t===void 0)o="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")o=t,n=this.length,t=0;else if(isFinite(t))t=t|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 s=this.length-t;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var f=!1;;)switch(o){case"hex":return Xc(this,e,t,n);case"utf8":case"utf-8":return ed(this,e,t,n);case"ascii":return xi(this,e,t,n);case"latin1":case"binary":return td(this,e,t,n);case"base64":return rd(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nd(this,e,t,n);default:if(f)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),f=!0}};u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ci=4096;u.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var o;if(u.TYPED_ARRAY_SUPPORT)o=this.subarray(e,t),o.__proto__=u.prototype;else{var s=t-e;o=new u(s,void 0);for(var f=0;f<s;++f)o[f]=this[f+e]}return o};u.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=this[e],s=1,f=0;++f<t&&(s*=256);)o+=this[e+f]*s;return o};u.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=this[e+--t],s=1;t>0&&(s*=256);)o+=this[e+--t]*s;return o};u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]};u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8};u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]};u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};u.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=this[e],s=1,f=0;++f<t&&(s*=256);)o+=this[e+f]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*t)),o};u.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||N(e,t,this.length);for(var o=t,s=1,f=this[e+--o];o>0&&(s*=256);)f+=this[e+--o]*s;return s*=128,f>=s&&(f-=Math.pow(2,8*t)),f};u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),fr(this,e,!0,23,4)};u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),fr(this,e,!1,23,4)};u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),fr(this,e,!0,52,8)};u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),fr(this,e,!1,52,8)};u.prototype.writeUIntLE=function(e,t,n,o){if(e=+e,t=t|0,n=n|0,!o){var s=Math.pow(2,8*n)-1;U(this,e,t,n,s,0)}var f=1,l=0;for(this[t]=e&255;++l<n&&(f*=256);)this[t+l]=e/f&255;return t+n};u.prototype.writeUIntBE=function(e,t,n,o){if(e=+e,t=t|0,n=n|0,!o){var s=Math.pow(2,8*n)-1;U(this,e,t,n,s,0)}var f=n-1,l=1;for(this[t+f]=e&255;--f>=0&&(l*=256);)this[t+f]=e/l&255;return t+n};u.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):ar(this,e,t,!0),t+2};u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):ar(this,e,t,!1),t+2};u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):sr(this,e,t,!0),t+4};u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):sr(this,e,t,!1),t+4};u.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t=t|0,!o){var s=Math.pow(2,8*n-1);U(this,e,t,n,s-1,-s)}var f=0,l=1,c=0;for(this[t]=e&255;++f<n&&(l*=256);)e<0&&c===0&&this[t+f-1]!==0&&(c=1),this[t+f]=(e/l>>0)-c&255;return t+n};u.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t=t|0,!o){var s=Math.pow(2,8*n-1);U(this,e,t,n,s-1,-s)}var f=n-1,l=1,c=0;for(this[t+f]=e&255;--f>=0&&(l*=256);)e<0&&c===0&&this[t+f+1]!==0&&(c=1),this[t+f]=(e/l>>0)-c&255;return t+n};u.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};u.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):ar(this,e,t,!0),t+2};u.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):ar(this,e,t,!1),t+2};u.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):sr(this,e,t,!0),t+4};u.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):sr(this,e,t,!1),t+4};u.prototype.writeFloatLE=function(e,t,n){return bi(this,e,t,!0,n)};u.prototype.writeFloatBE=function(e,t,n){return bi(this,e,t,!1,n)};u.prototype.writeDoubleLE=function(e,t,n){return Ai(this,e,t,!0,n)};u.prototype.writeDoubleBE=function(e,t,n){return Ai(this,e,t,!1,n)};u.prototype.copy=function(e,t,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(t<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-t<o-n&&(o=e.length-t+n);var s=o-n,f;if(this===e&&n<t&&t<o)for(f=s-1;f>=0;--f)e[f+t]=this[f+n];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(f=0;f<s;++f)e[f+t]=this[f+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s};u.prototype.fill=function(e,t,n,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var s=e.charCodeAt(0);s<256&&(e=s)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!u.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var f;if(typeof e=="number")for(f=t;f<n;++f)this[f]=e;else{var l=J(e)?e:ir(new u(e,o).toString()),c=l.length;for(f=0;f<n-t;++f)this[f+t]=l[f%c]}return this};pd=/[^+\/0-9A-Za-z-_]/g});var a=rt(()=>{"use strict";Ri()});var Nn=x((wA,Ii)=>{"use strict";i();a();Ii.exports=Object});var Ci=x((TA,Pi)=>{"use strict";i();a();Pi.exports=Error});var Oi=x((RA,Ni)=>{"use strict";i();a();Ni.exports=EvalError});var Fi=x((CA,Li)=>{"use strict";i();a();Li.exports=RangeError});var Bi=x((LA,_i)=>{"use strict";i();a();_i.exports=ReferenceError});var On=x((BA,qi)=>{"use strict";i();a();qi.exports=SyntaxError});var _=x((MA,Ui)=>{"use strict";i();a();Ui.exports=TypeError});var Di=x((kA,Mi)=>{"use strict";i();a();Mi.exports=URIError});var Ln=x((GA,$i)=>{"use strict";i();a();$i.exports=Math.abs});var Fn=x((HA,ki)=>{"use strict";i();a();ki.exports=Math.floor});var Wi=x((JA,ji)=>{"use strict";i();a();ji.exports=Math.max});var _n=x((XA,Gi)=>{"use strict";i();a();Gi.exports=Math.min});var Vi=x((rT,zi)=>{"use strict";i();a();zi.exports=Math.pow});var Yi=x((iT,Hi)=>{"use strict";i();a();Hi.exports=Math.round});var pr=x((uT,Ki)=>{"use strict";i();a();Ki.exports=Number.isNaN||function(e){return e!==e}});var Zi=x((lT,Ji)=>{"use strict";i();a();var vd=pr();Ji.exports=function(e){return vd(e)||e===0?e:e<0?-1:1}});var Xi=x((mT,Qi)=>{"use strict";i();a();Qi.exports=Object.getOwnPropertyDescriptor});var it=x((gT,ea)=>{"use strict";i();a();var lr=Xi();if(lr)try{lr([],"length")}catch(r){lr=null}ea.exports=lr});var Rt=x((wT,ta)=>{"use strict";i();a();var cr=Object.defineProperty||!1;if(cr)try{cr({},"a",{value:1})}catch(r){cr=!1}ta.exports=cr});var Bn=x((TT,ra)=>{"use strict";i();a();ra.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(var s 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 f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0}});var qn=x((RT,oa)=>{"use strict";i();a();var na=typeof Symbol!="undefined"&&Symbol,wd=Bn();oa.exports=function(){return typeof na!="function"||typeof Symbol!="function"||typeof na("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wd()}});var Un=x((CT,ia)=>{"use strict";i();a();ia.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Mn=x((LT,aa)=>{"use strict";i();a();var bd=Nn();aa.exports=bd.getPrototypeOf||null});var fa=x((BT,ua)=>{"use strict";i();a();var Ad="Function.prototype.bind called on incompatible ",Td=Object.prototype.toString,Sd=Math.max,Ed="[object Function]",sa=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var s=0;s<t.length;s+=1)n[s+e.length]=t[s];return n},Rd=function(e,t){for(var n=[],o=t||0,s=0;o<e.length;o+=1,s+=1)n[s]=e[o];return n},Id=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t};ua.exports=function(e){var t=this;if(typeof t!="function"||Td.apply(t)!==Ed)throw new TypeError(Ad+t);for(var n=Rd(arguments,1),o,s=function(){if(this instanceof o){var h=t.apply(this,sa(n,arguments));return Object(h)===h?h:this}return t.apply(e,sa(n,arguments))},f=Sd(0,t.length-n.length),l=[],c=0;c<f;c++)l[c]="$"+c;if(o=Function("binder","return function ("+Id(l,",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var m=function(){};m.prototype=t.prototype,o.prototype=new m,m.prototype=null}return o}});var at=x((MT,pa)=>{"use strict";i();a();var Pd=fa();pa.exports=Function.prototype.bind||Pd});var dr=x((kT,la)=>{"use strict";i();a();la.exports=Function.prototype.call});var mr=x((GT,ca)=>{"use strict";i();a();ca.exports=Function.prototype.apply});var ma=x((HT,da)=>{"use strict";i();a();da.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Dn=x((JT,ha)=>{"use strict";i();a();var Cd=at(),Nd=mr(),Od=dr(),Ld=ma();ha.exports=Ld||Cd.call(Od,Nd)});var hr=x((XT,ya)=>{"use strict";i();a();var Fd=at(),_d=_(),Bd=dr(),qd=Dn();ya.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new _d("a function is required");return qd(Fd,Bd,e)}});var Aa=x((rS,ba)=>{"use strict";i();a();var Ud=hr(),ga=it(),va;try{va=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var $n=!!va&&ga&&ga(Object.prototype,"__proto__"),wa=Object,xa=wa.getPrototypeOf;ba.exports=$n&&typeof $n.get=="function"?Ud([$n.get]):typeof xa=="function"?function(e){return xa(e==null?e:wa(e))}:!1});var Ia=x((iS,Ra)=>{"use strict";i();a();var Ta=Un(),Sa=Mn(),Ea=Aa();Ra.exports=Ta?function(e){return Ta(e)}:Sa?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Sa(e)}:Ea?function(e){return Ea(e)}:null});var kn=x((uS,Pa)=>{"use strict";i();a();var Md=Function.prototype.call,Dd=Object.prototype.hasOwnProperty,$d=at();Pa.exports=$d.call(Md,Dd)});var se=x((lS,_a)=>{"use strict";i();a();var T,kd=Nn(),jd=Ci(),Wd=Oi(),Gd=Fi(),zd=Bi(),pt=On(),ft=_(),Vd=Di(),Hd=Ln(),Yd=Fn(),Kd=Wi(),Jd=_n(),Zd=Vi(),Qd=Yi(),Xd=Zi(),La=Function,jn=function(r){try{return La('"use strict"; return ('+r+").constructor;")()}catch(e){}},It=it(),em=Rt(),Wn=function(){throw new ft},tm=It?(function(){try{return arguments.callee,Wn}catch(r){try{return It(arguments,"callee").get}catch(e){return Wn}}})():Wn,st=qn()(),O=Ia(),rm=Mn(),nm=Un(),Fa=mr(),Pt=dr(),ut={},om=typeof Uint8Array=="undefined"||!O?T:O(Uint8Array),Me={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?T:ArrayBuffer,"%ArrayIteratorPrototype%":st&&O?O([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":ut,"%AsyncGenerator%":ut,"%AsyncGeneratorFunction%":ut,"%AsyncIteratorPrototype%":ut,"%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%":jd,"%eval%":eval,"%EvalError%":Wd,"%Float16Array%":typeof Float16Array=="undefined"?T:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?T:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?T:FinalizationRegistry,"%Function%":La,"%GeneratorFunction%":ut,"%Int8Array%":typeof Int8Array=="undefined"?T:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?T:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":st&&O?O(O([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map=="undefined"?T:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!st||!O?T:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":kd,"%Object.getOwnPropertyDescriptor%":It,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?T:Promise,"%Proxy%":typeof Proxy=="undefined"?T:Proxy,"%RangeError%":Gd,"%ReferenceError%":zd,"%Reflect%":typeof Reflect=="undefined"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?T:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!st||!O?T:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":st&&O?O(""[Symbol.iterator]()):T,"%Symbol%":st?Symbol:T,"%SyntaxError%":pt,"%ThrowTypeError%":tm,"%TypedArray%":om,"%TypeError%":ft,"%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%":Vd,"%WeakMap%":typeof WeakMap=="undefined"?T:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?T:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?T:WeakSet,"%Function.prototype.call%":Pt,"%Function.prototype.apply%":Fa,"%Object.defineProperty%":em,"%Object.getPrototypeOf%":rm,"%Math.abs%":Hd,"%Math.floor%":Yd,"%Math.max%":Kd,"%Math.min%":Jd,"%Math.pow%":Zd,"%Math.round%":Qd,"%Math.sign%":Xd,"%Reflect.getPrototypeOf%":nm};if(O)try{null.error}catch(r){Ca=O(O(r)),Me["%Error.prototype%"]=Ca}var Ca,im=function r(e){var t;if(e==="%AsyncFunction%")t=jn("async function () {}");else if(e==="%GeneratorFunction%")t=jn("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=jn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&O&&(t=O(o.prototype))}return Me[e]=t,t},Na={__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"]},Ct=at(),yr=kn(),am=Ct.call(Pt,Array.prototype.concat),sm=Ct.call(Fa,Array.prototype.splice),Oa=Ct.call(Pt,String.prototype.replace),gr=Ct.call(Pt,String.prototype.slice),um=Ct.call(Pt,RegExp.prototype.exec),fm=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pm=/\\(\\)?/g,lm=function(e){var t=gr(e,0,1),n=gr(e,-1);if(t==="%"&&n!=="%")throw new pt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new pt("invalid intrinsic syntax, expected opening `%`");var o=[];return Oa(e,fm,function(s,f,l,c){o[o.length]=l?Oa(c,pm,"$1"):f||s}),o},cm=function(e,t){var n=e,o;if(yr(Na,n)&&(o=Na[n],n="%"+o[0]+"%"),yr(Me,n)){var s=Me[n];if(s===ut&&(s=im(n)),typeof s=="undefined"&&!t)throw new ft("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:s}}throw new pt("intrinsic "+e+" does not exist!")};_a.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new ft("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ft('"allowMissing" argument must be a boolean');if(um(/^%?[^%]*%?$/,e)===null)throw new pt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=lm(e),o=n.length>0?n[0]:"",s=cm("%"+o+"%",t),f=s.name,l=s.value,c=!1,m=s.alias;m&&(o=m[0],sm(n,am([0,1],m)));for(var h=1,y=!0;h<n.length;h+=1){var g=n[h],w=gr(g,0,1),A=gr(g,-1);if((w==='"'||w==="'"||w==="`"||A==='"'||A==="'"||A==="`")&&w!==A)throw new pt("property names with quotes must have matching quotes");if((g==="constructor"||!y)&&(c=!0),o+="."+g,f="%"+o+"%",yr(Me,f))l=Me[f];else if(l!=null){if(!(g in l)){if(!t)throw new ft("base intrinsic for "+e+" exists, but the property is not available.");return}if(It&&h+1>=n.length){var E=It(l,g);y=!!E,y&&"get"in E&&!("originalValue"in E.get)?l=E.get:l=l[g]}else y=yr(l,g),l=l[g];y&&!c&&(Me[f]=l)}}return l}});var xr=x((mS,Ua)=>{"use strict";i();a();var Ba=Rt(),dm=On(),lt=_(),qa=it();Ua.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new lt("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new lt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new lt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new lt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new lt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new lt("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,c=!!qa&&qa(e,t);if(Ba)Ba(e,t,{configurable:f===null&&c?c.configurable:!f,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:s===null&&c?c.writable:!s});else if(l||!o&&!s&&!f)e[t]=n;else throw new dm("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var vr=x((gS,Da)=>{"use strict";i();a();var Gn=Rt(),Ma=function(){return!!Gn};Ma.hasArrayLengthDefineBug=function(){if(!Gn)return null;try{return Gn([],"length",{value:1}).length!==1}catch(e){return!0}};Da.exports=Ma});var Ga=x((wS,Wa)=>{"use strict";i();a();var mm=se(),$a=xr(),hm=vr()(),ka=it(),ja=_(),ym=mm("%Math.floor%");Wa.exports=function(e,t){if(typeof e!="function")throw new ja("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||ym(t)!==t)throw new ja("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in e&&ka){var f=ka(e,"length");f&&!f.configurable&&(o=!1),f&&!f.writable&&(s=!1)}return(o||s||!n)&&(hm?$a(e,"length",t,!0,!0):$a(e,"length",t)),e}});var Va=x((TS,za)=>{"use strict";i();a();var gm=at(),xm=mr(),vm=Dn();za.exports=function(){return vm(gm,xm,arguments)}});var br=x((RS,wr)=>{"use strict";i();a();var wm=Ga(),Ha=Rt(),bm=hr(),Ya=Va();wr.exports=function(e){var t=bm(arguments),n=e.length-(arguments.length-1);return wm(t,1+(n>0?n:0),!0)};Ha?Ha(wr.exports,"apply",{value:Ya}):wr.exports.apply=Ya});var zn=x((CS,Ja)=>{"use strict";i();a();var Ka=Object.prototype.toString;Ja.exports=function(e){var t=Ka.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ka.call(e.callee)==="[object Function]"),n}});var is=x((LS,os)=>{"use strict";i();a();var ns;Object.keys||(Nt=Object.prototype.hasOwnProperty,Vn=Object.prototype.toString,Za=zn(),Hn=Object.prototype.propertyIsEnumerable,Qa=!Hn.call({toString:null},"toString"),Xa=Hn.call(function(){},"prototype"),Ot=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ar=function(r){var e=r.constructor;return e&&e.prototype===r},es={$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},ts=(function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!es["$"+r]&&Nt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Ar(window[r])}catch(e){return!0}}catch(e){return!0}return!1})(),rs=function(r){if(typeof window=="undefined"||!ts)return Ar(r);try{return Ar(r)}catch(e){return!1}},ns=function(e){var t=e!==null&&typeof e=="object",n=Vn.call(e)==="[object Function]",o=Za(e),s=t&&Vn.call(e)==="[object String]",f=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var l=Xa&&n;if(s&&e.length>0&&!Nt.call(e,0))for(var c=0;c<e.length;++c)f.push(String(c));if(o&&e.length>0)for(var m=0;m<e.length;++m)f.push(String(m));else for(var h in e)!(l&&h==="prototype")&&Nt.call(e,h)&&f.push(String(h));if(Qa)for(var y=rs(e),g=0;g<Ot.length;++g)!(y&&Ot[g]==="constructor")&&Nt.call(e,Ot[g])&&f.push(Ot[g]);return f});var Nt,Vn,Za,Hn,Qa,Xa,Ot,Ar,es,ts,rs;os.exports=ns});var fs=x((BS,us)=>{"use strict";i();a();var Am=Array.prototype.slice,Tm=zn(),as=Object.keys,Tr=as?function(e){return as(e)}:is(),ss=Object.keys;Tr.shim=function(){if(Object.keys){var e=(function(){var t=Object.keys(arguments);return t&&t.length===arguments.length})(1,2);e||(Object.keys=function(n){return Tm(n)?ss(Am.call(n)):ss(n)})}else Object.keys=Tr;return Object.keys||Tr};us.exports=Tr});var Sr=x((MS,ds)=>{"use strict";i();a();var Sm=fs(),Em=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Rm=Object.prototype.toString,Im=Array.prototype.concat,ps=xr(),Pm=function(r){return typeof r=="function"&&Rm.call(r)==="[object Function]"},ls=vr()(),Cm=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!Pm(n)||!n())return}ls?ps(r,e,t,!0):ps(r,e,t)},cs=function(r,e){var t=arguments.length>2?arguments[2]:{},n=Sm(e);Em&&(n=Im.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Cm(r,n[o],e[n[o]],t[n[o]])};cs.supportsDescriptors=!!ls;ds.exports=cs});var Z=x((kS,ys)=>{"use strict";i();a();var ms=se(),hs=hr(),Nm=hs([ms("%String.prototype.indexOf%")]);ys.exports=function(e,t){var n=ms(e,!!t);return typeof n=="function"&&Nm(e,".prototype.")>-1?hs([n]):n}});var vs=x((GS,xs)=>{"use strict";i();a();var Om=se(),gs=Om("%Array%"),Lm=!gs.isArray&&Z()("Object.prototype.toString");xs.exports=gs.isArray||function(e){return Lm(e)==="[object Array]"}});var Yn=x((HS,ws)=>{"use strict";i();a();ws.exports=vs()});var As=x((JS,bs)=>{"use strict";i();a();var Fm=se(),_m=Z(),Bm=_(),qm=Yn(),Um=Fm("%Reflect.apply%",!0)||_m("Function.prototype.apply");bs.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!qm(n))throw new Bm("Assertion failed: optional `argumentsList`, if provided, must be a List");return Um(e,t,n)}});function Ts(){throw new Error("setTimeout has not been defined")}function Ss(){throw new Error("clearTimeout has not been defined")}function Es(r){if(Ae===setTimeout)return setTimeout(r,0);if((Ae===Ts||!Ae)&&setTimeout)return Ae=setTimeout,setTimeout(r,0);try{return Ae(r,0)}catch(e){try{return Ae.call(null,r,0)}catch(t){return Ae.call(this,r,0)}}}function Mm(r){if(Te===clearTimeout)return clearTimeout(r);if((Te===Ss||!Te)&&clearTimeout)return Te=clearTimeout,clearTimeout(r);try{return Te(r)}catch(e){try{return Te.call(null,r)}catch(t){return Te.call(this,r)}}}function Dm(){!dt||!De||(dt=!1,De.length?ue=De.concat(ue):Er=-1,ue.length&&Rs())}function Rs(){if(!dt){var r=Es(Dm);dt=!0;for(var e=ue.length;e;){for(De=ue,ue=[];++Er<e;)De&&De[Er].run();Er=-1,e=ue.length}De=null,dt=!1,Mm(r)}}function $m(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ue.push(new Is(r,e)),ue.length===1&&!dt&&Es(Rs)}function Is(r,e){this.fun=r,this.array=e}function $e(){}function nh(r){throw new Error("process.binding is not supported")}function oh(){return"/"}function ih(r){throw new Error("process.chdir is not supported")}function ah(){return 0}function uh(r){var e=sh.call(ct)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}function ph(){var r=new Date,e=r-fh;return e/1e3}var Ae,Te,ue,dt,De,Er,km,jm,Wm,Gm,zm,Vm,Hm,Ym,Km,Jm,Zm,Qm,Xm,eh,th,rh,ct,sh,fh,lh,Lt,Ps=rt(()=>{"use strict";i();a();Ae=Ts,Te=Ss;typeof globalThis.setTimeout=="function"&&(Ae=setTimeout);typeof globalThis.clearTimeout=="function"&&(Te=clearTimeout);ue=[],dt=!1,Er=-1;Is.prototype.run=function(){this.fun.apply(null,this.array)};km="browser",jm="browser",Wm=!0,Gm={},zm=[],Vm="",Hm={},Ym={},Km={};Jm=$e,Zm=$e,Qm=$e,Xm=$e,eh=$e,th=$e,rh=$e;ct=globalThis.performance||{},sh=ct.now||ct.mozNow||ct.msNow||ct.oNow||ct.webkitNow||function(){return new Date().getTime()};fh=new Date;lh={nextTick:$m,title:km,browser:Wm,env:Gm,argv:zm,version:Vm,versions:Hm,on:Jm,addListener:Zm,once:Qm,off:Xm,removeListener:eh,removeAllListeners:th,emit:rh,binding:nh,cwd:oh,chdir:ih,umask:ah,hrtime:uh,platform:jm,release:Ym,config:Km,uptime:ph},Lt=lh});var Kn,Jn,Cs=rt(()=>{"use strict";i();a();typeof Object.create=="function"?Kn=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Kn=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};Jn=Kn});var Us={};En(Us,{_extend:()=>io,debuglog:()=>Ns,default:()=>bh,deprecate:()=>to,format:()=>Cr,inherits:()=>Jn,inspect:()=>X,isArray:()=>ro,isBoolean:()=>Nr,isBuffer:()=>_s,isDate:()=>Pr,isError:()=>_t,isFunction:()=>Bt,isNull:()=>qt,isNullOrUndefined:()=>Os,isNumber:()=>no,isObject:()=>ke,isPrimitive:()=>Fs,isRegExp:()=>Ft,isString:()=>Ut,isSymbol:()=>Ls,isUndefined:()=>Q,log:()=>Bs});function Cr(r){if(!Ut(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(X(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,o=n.length,s=String(r).replace(ch,function(l){if(l==="%%")return"%";if(t>=o)return l;switch(l){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(c){return"[Circular]"}default:return l}}),f=n[t];t<o;f=n[++t])qt(f)||!ke(f)?s+=" "+f:s+=" "+X(f);return s}function to(r,e){if(Q(globalThis.process))return function(){return to(r,e).apply(this,arguments)};if(Lt.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Lt.throwDeprecation)throw new Error(e);Lt.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}function Ns(r){if(Q(Zn)&&(Zn=Lt.env.NODE_DEBUG||""),r=r.toUpperCase(),!Rr[r])if(new RegExp("\\b"+r+"\\b","i").test(Zn)){var e=0;Rr[r]=function(){var t=Cr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Rr[r]=function(){};return Rr[r]}function X(r,e){var t={seen:[],stylize:mh};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Nr(e)?t.showHidden=e:e&&io(t,e),Q(t.showHidden)&&(t.showHidden=!1),Q(t.depth)&&(t.depth=2),Q(t.colors)&&(t.colors=!1),Q(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=dh),Ir(t,r,t.depth)}function dh(r,e){var t=X.styles[e];return t?"\x1B["+X.colors[t][0]+"m"+r+"\x1B["+X.colors[t][1]+"m":r}function mh(r,e){return r}function hh(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function Ir(r,e,t){if(r.customInspect&&e&&Bt(e.inspect)&&e.inspect!==X&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return Ut(n)||(n=Ir(r,n,t)),n}var o=yh(r,e);if(o)return o;var s=Object.keys(e),f=hh(s);if(r.showHidden&&(s=Object.getOwnPropertyNames(e)),_t(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return Qn(e);if(s.length===0){if(Bt(e)){var l=e.name?": "+e.name:"";return r.stylize("[Function"+l+"]","special")}if(Ft(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Pr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(_t(e))return Qn(e)}var c="",m=!1,h=["{","}"];if(ro(e)&&(m=!0,h=["[","]"]),Bt(e)){var y=e.name?": "+e.name:"";c=" [Function"+y+"]"}if(Ft(e)&&(c=" "+RegExp.prototype.toString.call(e)),Pr(e)&&(c=" "+Date.prototype.toUTCString.call(e)),_t(e)&&(c=" "+Qn(e)),s.length===0&&(!m||e.length==0))return h[0]+c+h[1];if(t<0)return Ft(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var g;return m?g=gh(r,e,t,f,s):g=s.map(function(w){return eo(r,e,t,f,w,m)}),r.seen.pop(),xh(g,c,h)}function yh(r,e){if(Q(e))return r.stylize("undefined","undefined");if(Ut(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(no(e))return r.stylize(""+e,"number");if(Nr(e))return r.stylize(""+e,"boolean");if(qt(e))return r.stylize("null","null")}function Qn(r){return"["+Error.prototype.toString.call(r)+"]"}function gh(r,e,t,n,o){for(var s=[],f=0,l=e.length;f<l;++f)qs(e,String(f))?s.push(eo(r,e,t,n,String(f),!0)):s.push("");return o.forEach(function(c){c.match(/^\d+$/)||s.push(eo(r,e,t,n,c,!0))}),s}function eo(r,e,t,n,o,s){var f,l,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?c.set?l=r.stylize("[Getter/Setter]","special"):l=r.stylize("[Getter]","special"):c.set&&(l=r.stylize("[Setter]","special")),qs(n,o)||(f="["+o+"]"),l||(r.seen.indexOf(c.value)<0?(qt(t)?l=Ir(r,c.value,null):l=Ir(r,c.value,t-1),l.indexOf(`
2
- `)>-1&&(s?l=l.split(`
3
- `).map(function(m){return" "+m}).join(`
4
- `).substr(2):l=`
5
- `+l.split(`
6
- `).map(function(m){return" "+m}).join(`
7
- `))):l=r.stylize("[Circular]","special")),Q(f)){if(s&&o.match(/^\d+$/))return l;f=JSON.stringify(""+o),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=r.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=r.stylize(f,"string"))}return f+": "+l}function xh(r,e,t){var n=0,o=r.reduce(function(s,f){return n++,f.indexOf(`
8
- `)>=0&&n++,s+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?t[0]+(e===""?"":e+`
9
- `)+" "+r.join(`,
10
- `)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function ro(r){return Array.isArray(r)}function Nr(r){return typeof r=="boolean"}function qt(r){return r===null}function Os(r){return r==null}function no(r){return typeof r=="number"}function Ut(r){return typeof r=="string"}function Ls(r){return typeof r=="symbol"}function Q(r){return r===void 0}function Ft(r){return ke(r)&&oo(r)==="[object RegExp]"}function ke(r){return typeof r=="object"&&r!==null}function Pr(r){return ke(r)&&oo(r)==="[object Date]"}function _t(r){return ke(r)&&(oo(r)==="[object Error]"||r instanceof Error)}function Bt(r){return typeof r=="function"}function Fs(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function _s(r){return u.isBuffer(r)}function oo(r){return Object.prototype.toString.call(r)}function Xn(r){return r<10?"0"+r.toString(10):r.toString(10)}function wh(){var r=new Date,e=[Xn(r.getHours()),Xn(r.getMinutes()),Xn(r.getSeconds())].join(":");return[r.getDate(),vh[r.getMonth()],e].join(" ")}function Bs(){console.log("%s - %s",wh(),Cr.apply(null,arguments))}function io(r,e){if(!e||!ke(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function qs(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var ch,Rr,Zn,vh,bh,Ms=rt(()=>{"use strict";i();a();Ps();Cs();ch=/%[sdj%]/g;Rr={};X.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]};X.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};vh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];bh={inherits:Jn,_extend:io,log:Bs,isBuffer:_s,isPrimitive:Fs,isFunction:Bt,isError:_t,isDate:Pr,isObject:ke,isRegExp:Ft,isUndefined:Q,isSymbol:Ls,isString:Ut,isNumber:no,isNullOrUndefined:Os,isNull:qt,isBoolean:Nr,isArray:ro,inspect:X,deprecate:to,format:Cr,debuglog:Ns}});var Ds=x((f1,Or)=>{"use strict";i();a();var je=(Ms(),ni(Us));if(je&&je.default){Or.exports=je.default;for(let r in je)Or.exports[r]=je[r]}else je&&(Or.exports=je)});var ks=x((c1,$s)=>{"use strict";i();a();$s.exports=Ds().inspect});var jt=x((h1,su)=>{"use strict";i();a();var yo=typeof Map=="function"&&Map.prototype,ao=Object.getOwnPropertyDescriptor&&yo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fr=yo&&ao&&typeof ao.get=="function"?ao.get:null,js=yo&&Map.prototype.forEach,go=typeof Set=="function"&&Set.prototype,so=Object.getOwnPropertyDescriptor&&go?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_r=go&&so&&typeof so.get=="function"?so.get:null,Ws=go&&Set.prototype.forEach,Ah=typeof WeakMap=="function"&&WeakMap.prototype,Dt=Ah?WeakMap.prototype.has:null,Th=typeof WeakSet=="function"&&WeakSet.prototype,$t=Th?WeakSet.prototype.has:null,Sh=typeof WeakRef=="function"&&WeakRef.prototype,Gs=Sh?WeakRef.prototype.deref:null,Eh=Boolean.prototype.valueOf,Rh=Object.prototype.toString,Ih=Function.prototype.toString,Ph=String.prototype.match,xo=String.prototype.slice,Se=String.prototype.replace,Ch=String.prototype.toUpperCase,zs=String.prototype.toLowerCase,eu=RegExp.prototype.test,Vs=Array.prototype.concat,ee=Array.prototype.join,Nh=Array.prototype.slice,Hs=Math.floor,po=typeof BigInt=="function"?BigInt.prototype.valueOf:null,uo=Object.getOwnPropertySymbols,lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,mt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",kt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===mt||!0)?Symbol.toStringTag:null,tu=Object.prototype.propertyIsEnumerable,Ys=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Ks(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||eu.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Hs(-r):Hs(r);if(n!==r){var o=String(n),s=xo.call(e,o.length+1);return Se.call(o,t,"$&_")+"."+Se.call(Se.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Se.call(e,t,"$&_")}var co=ks(),Js=co.custom,Zs=ou(Js)?Js:null,ru={__proto__:null,double:'"',single:"'"},Oh={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};su.exports=function r(e,t,n,o){var s=t||{};if(fe(s,"quoteStyle")&&!fe(ru,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fe(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=fe(s,"customInspect")?s.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fe(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fe(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.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 au(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return l?Ks(e,c):c}if(typeof e=="bigint"){var m=String(e)+"n";return l?Ks(e,m):m}var h=typeof s.depth=="undefined"?5:s.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return mo(e)?"[Array]":"[Object]";var y=Kh(s,n);if(typeof o=="undefined")o=[];else if(iu(o,e)>=0)return"[Circular]";function g(Xe,tr,fc){if(tr&&(o=Nh.call(o),o.push(tr)),fc){var Qo={depth:s.depth};return fe(s,"quoteStyle")&&(Qo.quoteStyle=s.quoteStyle),r(Xe,Qo,n+1,o)}return r(Xe,s,n+1,o)}if(typeof e=="function"&&!Qs(e)){var w=$h(e),A=Lr(e,g);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(A.length>0?" { "+ee.call(A,", ")+" }":"")}if(ou(e)){var E=mt?Se.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lo.call(e);return typeof e=="object"&&!mt?Mt(E):E}if(Vh(e)){for(var P="<"+zs.call(String(e.nodeName)),C=e.attributes||[],F=0;F<C.length;F++)P+=" "+C[F].name+"="+nu(Lh(C[F].value),"double",s);return P+=">",e.childNodes&&e.childNodes.length&&(P+="..."),P+="</"+zs.call(String(e.nodeName))+">",P}if(mo(e)){if(e.length===0)return"[]";var H=Lr(e,g);return y&&!Yh(H)?"["+ho(H,y)+"]":"[ "+ee.call(H,", ")+" ]"}if(_h(e)){var Y=Lr(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!tu.call(e,"cause")?"{ ["+String(e)+"] "+ee.call(Vs.call("[cause]: "+g(e.cause),Y),", ")+" }":Y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ee.call(Y,", ")+" }"}if(typeof e=="object"&&f){if(Zs&&typeof e[Zs]=="function"&&co)return co(e,{depth:h-n});if(f!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(kh(e)){var oe=[];return js&&js.call(e,function(Xe,tr){oe.push(g(tr,e,!0)+" => "+g(Xe,e))}),Xs("Map",Fr.call(e),oe,y)}if(Gh(e)){var Ko=[];return Ws&&Ws.call(e,function(Xe){Ko.push(g(Xe,e))}),Xs("Set",_r.call(e),Ko,y)}if(jh(e))return fo("WeakMap");if(zh(e))return fo("WeakSet");if(Wh(e))return fo("WeakRef");if(qh(e))return Mt(g(Number(e)));if(Mh(e))return Mt(g(po.call(e)));if(Uh(e))return Mt(Eh.call(e));if(Bh(e))return Mt(g(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(!Fh(e)&&!Qs(e)){var wn=Lr(e,g),Jo=Ys?Ys(e)===Object.prototype:e instanceof Object||e.constructor===Object,bn=e instanceof Object?"":"null prototype",Zo=!Jo&&kt&&Object(e)===e&&kt in e?xo.call(Ee(e),8,-1):bn?"Object":"",uc=Jo||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",An=uc+(Zo||bn?"["+ee.call(Vs.call([],Zo||[],bn||[]),": ")+"] ":"");return wn.length===0?An+"{}":y?An+"{"+ho(wn,y)+"}":An+"{ "+ee.call(wn,", ")+" }"}return String(e)};function nu(r,e,t){var n=t.quoteStyle||e,o=ru[n];return o+r+o}function Lh(r){return Se.call(String(r),/"/g,"&quot;")}function We(r){return!kt||!(typeof r=="object"&&(kt in r||typeof r[kt]!="undefined"))}function mo(r){return Ee(r)==="[object Array]"&&We(r)}function Fh(r){return Ee(r)==="[object Date]"&&We(r)}function Qs(r){return Ee(r)==="[object RegExp]"&&We(r)}function _h(r){return Ee(r)==="[object Error]"&&We(r)}function Bh(r){return Ee(r)==="[object String]"&&We(r)}function qh(r){return Ee(r)==="[object Number]"&&We(r)}function Uh(r){return Ee(r)==="[object Boolean]"&&We(r)}function ou(r){if(mt)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!lo)return!1;try{return lo.call(r),!0}catch(e){}return!1}function Mh(r){if(!r||typeof r!="object"||!po)return!1;try{return po.call(r),!0}catch(e){}return!1}var Dh=Object.prototype.hasOwnProperty||function(r){return r in this};function fe(r,e){return Dh.call(r,e)}function Ee(r){return Rh.call(r)}function $h(r){if(r.name)return r.name;var e=Ph.call(Ih.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function iu(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function kh(r){if(!Fr||!r||typeof r!="object")return!1;try{Fr.call(r);try{_r.call(r)}catch(e){return!0}return r instanceof Map}catch(e){}return!1}function jh(r){if(!Dt||!r||typeof r!="object")return!1;try{Dt.call(r,Dt);try{$t.call(r,$t)}catch(e){return!0}return r instanceof WeakMap}catch(e){}return!1}function Wh(r){if(!Gs||!r||typeof r!="object")return!1;try{return Gs.call(r),!0}catch(e){}return!1}function Gh(r){if(!_r||!r||typeof r!="object")return!1;try{_r.call(r);try{Fr.call(r)}catch(e){return!0}return r instanceof Set}catch(e){}return!1}function zh(r){if(!$t||!r||typeof r!="object")return!1;try{$t.call(r,$t);try{Dt.call(r,Dt)}catch(e){return!0}return r instanceof WeakSet}catch(e){}return!1}function Vh(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function au(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return au(xo.call(r,0,e.maxStringLength),e)+n}var o=Oh[e.quoteStyle||"single"];o.lastIndex=0;var s=Se.call(Se.call(r,o,"\\$1"),/[\x00-\x1f]/g,Hh);return nu(s,"single",e)}function Hh(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Ch.call(e.toString(16))}function Mt(r){return"Object("+r+")"}function fo(r){return r+" { ? }"}function Xs(r,e,t,n){var o=n?ho(t,n):ee.call(t,", ");return r+" ("+e+") {"+o+"}"}function Yh(r){for(var e=0;e<r.length;e++)if(iu(r[e],`
11
- `)>=0)return!1;return!0}function Kh(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=ee.call(Array(r.indent+1)," ");else return null;return{base:t,prev:ee.call(Array(e+1),t)}}function ho(r,e){if(r.length===0)return"";var t=`
12
- `+e.prev+e.base;return t+ee.call(r,","+t)+`
13
- `+e.prev}function Lr(r,e){var t=mo(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=fe(r,o)?e(r[o],r):""}var s=typeof uo=="function"?uo(r):[],f;if(mt){f={};for(var l=0;l<s.length;l++)f["$"+s[l]]=s[l]}for(var c in r)fe(r,c)&&(t&&String(Number(c))===c&&c<r.length||mt&&f["$"+c]instanceof Symbol||(eu.call(/[^\w$]/,c)?n.push(e(c,r)+": "+e(r[c],r)):n.push(c+": "+e(r[c],r))));if(typeof uo=="function")for(var m=0;m<s.length;m++)tu.call(r,s[m])&&n.push("["+e(s[m])+"]: "+e(r[s[m]],r));return n}});var Br=x((x1,uu)=>{"use strict";i();a();uu.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var pu=x((b1,fu)=>{"use strict";i();a();var Jh=_(),Zh=jt(),Qh=Br();fu.exports=function(e,t){if(!Qh(t))throw new Jh("Assertion failed: P is not a Property Key, got "+Zh(t));return e[t]}});var mu=x((S1,du)=>{"use strict";i();a();var cu=Function.prototype.toString,ht=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,wo,qr;if(typeof ht=="function"&&typeof Object.defineProperty=="function")try{wo=Object.defineProperty({},"length",{get:function(){throw qr}}),qr={},ht(function(){throw 42},null,wo)}catch(r){r!==qr&&(ht=null)}else ht=null;var Xh=/^\s*class\b/,bo=function(e){try{var t=cu.call(e);return Xh.test(t)}catch(n){return!1}},vo=function(e){try{return bo(e)?!1:(cu.call(e),!0)}catch(t){return!1}},Ur=Object.prototype.toString,ey="[object Object]",ty="[object Function]",ry="[object GeneratorFunction]",ny="[object HTMLAllCollection]",oy="[object HTML document.all class]",iy="[object HTMLCollection]",ay=typeof Symbol=="function"&&!!Symbol.toStringTag,sy=!(0 in[,]),Ao=function(){return!1};typeof document=="object"&&(lu=document.all,Ur.call(lu)===Ur.call(document.all)&&(Ao=function(e){if((sy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var t=Ur.call(e);return(t===ny||t===oy||t===iy||t===ey)&&e("")==null}catch(n){}return!1}));var lu;du.exports=ht?function(e){if(Ao(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ht(e,null,wo)}catch(t){if(t!==qr)return!1}return!bo(e)&&vo(e)}:function(e){if(Ao(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(ay)return vo(e);if(bo(e))return!1;var t=Ur.call(e);return t!==ty&&t!==ry&&!/^\[object HTML/.test(t)?!1:vo(e)}});var To=x((I1,hu)=>{"use strict";i();a();hu.exports=mu()});var vu=x((N1,xu)=>{"use strict";i();a();var yu=_(),uy=pu(),fy=To(),py=Br(),gu=jt();xu.exports=function(e,t){if(!py(t))throw new yu("Assertion failed: P is not a Property Key");var n=uy(e,t);if(n!=null){if(!fy(n))throw new yu(gu(t)+" is not a function: "+gu(n));return n}}});var bu=x((F1,wu)=>{"use strict";i();a();var ly=pr();wu.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!ly(e)&&e!==1/0&&e!==-1/0}});var Mr=x((q1,Au)=>{"use strict";i();a();var cy=Ln(),dy=Fn(),my=pr(),hy=bu();Au.exports=function(e){if(typeof e!="number"||my(e)||!hy(e))return!1;var t=cy(e);return dy(t)===t}});var So=x((D1,Tu)=>{"use strict";i();a();Tu.exports=function(e){return!!e&&(typeof e=="function"||typeof e=="object")}});var Eu=x((j1,Su)=>{"use strict";i();a();var yy=Bn();Su.exports=function(){return yy()&&!!Symbol.toStringTag}});var Po=x((z1,Nu)=>{"use strict";i();a();var Ru=Z(),gy=Eu()(),xy=kn(),vy=it(),Io;gy?(Iu=Ru("RegExp.prototype.exec"),Eo={},Dr=function(){throw Eo},Ro={toString:Dr,valueOf:Dr},typeof Symbol.toPrimitive=="symbol"&&(Ro[Symbol.toPrimitive]=Dr),Io=function(e){if(!e||typeof e!="object")return!1;var t=vy(e,"lastIndex"),n=t&&xy(t,"value");if(!n)return!1;try{Iu(e,Ro)}catch(o){return o===Eo}}):(Pu=Ru("Object.prototype.toString"),Cu="[object RegExp]",Io=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Pu(e)===Cu});var Iu,Eo,Dr,Ro,Pu,Cu;Nu.exports=Io});var Co=x((Y1,Ou)=>{"use strict";i();a();var wy=Z(),by=Po(),Ay=wy("RegExp.prototype.exec"),Ty=_();Ou.exports=function(e){if(!by(e))throw new Ty("`regex` must be a RegExp");return function(n){return Ay(e,n)!==null}}});var _u=x((Z1,Fu)=>{"use strict";i();a();var Lu=_(),Sy=jt(),Ey=Br(),Ry=So();Fu.exports=function(e,t){if(!Ry(e))throw new Lu("Assertion failed: Type(O) is not Object");if(!Ey(t))throw new Lu("Assertion failed: P is not a Property Key, got "+Sy(t));return e[t]}});var qu=x((eE,Bu)=>{"use strict";i();a();Bu.exports=_n()});var Oo=x((nE,Uu)=>{"use strict";i();a();var Iy=Z(),No=_(),Py=Mr(),Cy=Iy("String.prototype.slice");Uu.exports=function(e,t,n){if(typeof e!="string")throw new No("Assertion failed: `string` must be a String");if(typeof t!="string")throw new No("Assertion failed: `searchValue` must be a String");if(!Py(n)||n<0)throw new No("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(t===""&&n<=o)return n;for(var s=t.length,f=n;f<=o-s;f+=1){var l=Cy(e,f,f+s);if(l===t)return f}return-1}});var $r=x((aE,Mu)=>{"use strict";i();a();var Ny=_();Mu.exports=function(e){if(e==null)throw new Ny(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var kr=x((fE,Du)=>{"use strict";i();a();var Oy=se(),Ly=Oy("%String%"),Fy=_();Du.exports=function(e){if(typeof e=="symbol")throw new Fy("Cannot convert a Symbol value to a string");return Ly(e)}});var Lo=x((cE,ju)=>{"use strict";i();a();var _y=$r(),By=kr(),qy=Z(),$u=qy("String.prototype.replace"),ku=/^\s$/.test("\u180E"),Uy=ku?/^[\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]+/,My=ku?/[\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]+$/;ju.exports=function(){var e=By(_y(this));return $u($u(e,Uy,""),My,"")}});var Fo=x((hE,Gu)=>{"use strict";i();a();var Dy=Lo(),Wu="\u200B",yt="\u180E";Gu.exports=function(){return String.prototype.trim&&Wu.trim()===Wu&&yt.trim()===yt&&("_"+yt).trim()==="_"+yt&&(yt+"_").trim()===yt+"_"?String.prototype.trim:Dy}});var Hu=x((xE,Vu)=>{"use strict";i();a();var $y=vr()(),zu=xr(),ky=Fo();Vu.exports=function(){var e=ky();return String.prototype.trim!==e&&($y?zu(String.prototype,"trim",e,!0):zu(String.prototype,"trim",e)),e}});var Zu=x((bE,Ju)=>{"use strict";i();a();var jy=br(),Wy=Sr(),Gy=$r(),zy=Lo(),Yu=Fo(),Vy=Hu(),Hy=jy(Yu()),Ku=function(e){return Gy(e),Hy(e)};Wy(Ku,{getPolyfill:Yu,implementation:zy,shim:Vy});Ju.exports=Ku});var rf=x((SE,tf)=>{"use strict";i();a();var ef=se(),Yy=ef("%RegExp%"),Ky=_(),Qu=ef("%parseInt%"),Jy=Z(),jr=Co(),Xu=Jy("String.prototype.slice"),Zy=jr(/^0b[01]+$/i),Qy=jr(/^0o[0-7]+$/i),Xy=jr(/^[-+]0x[0-9a-f]+$/i),eg=["\x85","\u200B","\uFFFE"].join(""),tg=new Yy("["+eg+"]","g"),rg=jr(tg),ng=Zu();tf.exports=function r(e){if(typeof e!="string")throw new Ky("Assertion failed: `argument` is not a String");if(Zy(e))return+Qu(Xu(e,2),2);if(Qy(e))return+Qu(Xu(e,2),8);if(rg(e)||Xy(e))return NaN;var t=ng(e);return t!==e?r(t):+e}});var af=x((IE,of)=>{"use strict";i();a();var og=_(),nf=Mr(),ig=Z(),ag=ig("String.prototype.slice");of.exports=function(e,t,n){if(typeof e!="string"||!nf(t)||arguments.length>2&&!nf(n))throw new og("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return ag(e,t,arguments.length>2?n:e.length)}});var uf=x((NE,sf)=>{"use strict";i();a();sf.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}});var pf=x((FE,ff)=>{"use strict";i();a();var sg=Z()("String.prototype.slice");ff.exports=function(e,t){return e===t?!0:e.length>t.length?!1:sg(t,0,e.length)===e}});var cf=x((qE,lf)=>{"use strict";i();a();lf.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var gf=x((DE,yf)=>{"use strict";i();a();var pe=_(),_o=jt(),ug=Mr(),df=So(),hf=Co(),fg=_u(),pg=Yn(),lg=qu(),cg=Oo(),mf=rf(),le=af(),dg=kr(),mg=uf(),Wt=pf(),hg=cf(),yg=hf(/^\$[0-9]/),gg=hf(/^\$[0-9][0-9]/);yf.exports=function(e,t,n,o,s,f){if(typeof e!="string")throw new pe("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new pe("Assertion failed: `str` must be a String");if(!ug(n)||n<0)throw new pe("Assertion failed: `position` must be a nonnegative integer, got "+_o(n));if(!pg(o)||!mg(o,hg))throw new pe("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+_o(o));if(typeof s!="undefined"&&!df(s))throw new pe("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new pe("Assertion failed: `replacementTemplate` must be a String");var l=t.length;if(n>l)throw new pe("Assertion failed: position > stringLength, got "+_o(n));for(var c=f,m="";c!=="";){var h,y,g;if(Wt("$$",c))h="$$",y="$";else if(Wt("$`",c))h="$`",y=le(t,0,n);else if(Wt("$&",c))h="$&",y=e;else if(Wt("$'",c)){h="$'";var w=e.length,A=n+w;y=le(t,lg(A,l))}else if(yg(c)){var E=gg(c)?2:1,P=le(c,1,1+E),C=mf(P);if(C<0||C>99)throw new pe("Assertion failed: `index` must be >= 0 and <= 99");var F=o.length;C>F&&E===2&&(E=1,P=le(P,0,1),C=mf(P)),h=le(c,0,1+E),1<=C&&C<=F?(g=o[C-1],typeof g=="undefined"?y="":y=g):y=h}else if(Wt("$<",c)){var H=cg(c,">",0);if(!(H>-1)||typeof s=="undefined")h="$<",y=h;else{h=le(c,0,H+1);var Y=le(c,2,H);if(!df(s))throw new pe("Assertion failed: Type(namedCaptures) is not Object");g=fg(s,Y),typeof g=="undefined"?y="":y=dg(g)}}else h=le(c,0,1),y=h;var oe=h.length;c=le(c,oe),m+=y}return m}});var bf=x((jE,wf)=>{"use strict";i();a();var xf=se(),vf=br(),xg=vf(xf("String.prototype.indexOf"));wf.exports=function(e,t){var n=xf(e,!!t);return typeof n=="function"&&xg(e,".prototype.")>-1?vf(n):n}});var qo=x((zE,Ef)=>{"use strict";i();a();var Af=As(),vg=vu(),wg=gf(),bg=To(),Ag=$r(),Wr=kr(),Tf=Oo(),Tg=se(),Gr=bf(),Sg=qn()(),Eg=Po(),Rg=Tg("%Math.max%"),Sf=_(),Ig=Gr("Array.prototype.push"),Bo=Gr("String.prototype.slice"),Pg=Gr("String.prototype.indexOf"),Cg=Gr("String.prototype.replace");Ef.exports=function(e,t){var n=Ag(this),o=Eg(e);if(o&&Pg(Bo(e,e.source.length+2),"g")===-1)throw new Sf("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Sg&&Symbol.replace){if(e!=null){var s=vg(e,Symbol.replace);if(typeof s!="undefined")return Af(s,e,[n,t])}}else if(o)return Cg(n,e,t);var f=Wr(n),l=Wr(e),c=bg(t);c||(t=Wr(t));for(var m=l.length,h=Rg(1,m),y=[],g=Tf(f,l,0);g!==-1;)Ig(y,g),g=Tf(f,l,g+h);for(var w=0,A="",E=0;E<y.length;E+=1){var P;if(c)P=Wr(Af(t,void 0,[l,y[E],f]));else{if(typeof t!="string")throw new Sf("Assertion failed: `replaceValue` should be a string at this point");var C=[];P=wg(l,f,y[E],C,void 0,t)}var F=Bo(f,w,y[E]);A+=F+P,w=y[E]+m}return w<f.length&&(A+=Bo(f,w)),A}});var Uo=x((YE,Rf)=>{"use strict";i();a();var Ng=qo();Rf.exports=function(){return String.prototype.replaceAll||Ng}});var Pf=x((ZE,If)=>{"use strict";i();a();var Og=Sr(),Lg=Uo();If.exports=function(){var e=Lg();return Og(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var Lf=x((eR,Of)=>{"use strict";i();a();var Fg=br(),_g=Sr(),Cf=qo(),Bg=Uo(),qg=Pf(),Nf=Fg(Cf);_g(Nf,{getPolyfill:Bg,implementation:Cf,shim:qg});Of.exports=Nf});var cA={};En(cA,{DynamicSnippetsGenerator:()=>vn});module.exports=ni(cA);i();a();var fk=yc(Lf(),1);i();a();i();a();i();a();function R(r){throw new Error("Unexpected value: "+JSON.stringify(r))}i();a();i();a();i();a();i();a();i();a();i();a();var Ug=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,zr=Ug;var Mg=typeof self=="object"&&self&&self.Object===Object&&self,Dg=zr||Mg||Function("return this")(),L=Dg;var $g=L.Symbol,$=$g;i();a();var Ff=Object.prototype,kg=Ff.hasOwnProperty,jg=Ff.toString,Gt=$?$.toStringTag:void 0;function Wg(r){var e=kg.call(r,Gt),t=r[Gt];try{r[Gt]=void 0;var n=!0}catch(s){}var o=jg.call(r);return n&&(e?r[Gt]=t:delete r[Gt]),o}var _f=Wg;i();a();var Gg=Object.prototype,zg=Gg.toString;function Vg(r){return zg.call(r)}var Bf=Vg;var Hg="[object Null]",Yg="[object Undefined]",qf=$?$.toStringTag:void 0;function Kg(r){return r==null?r===void 0?Yg:Hg:qf&&qf in Object(r)?_f(r):Bf(r)}var j=Kg;i();a();function Jg(r){return r!=null&&typeof r=="object"}var W=Jg;var Zg="[object Symbol]";function Qg(r){return typeof r=="symbol"||W(r)&&j(r)==Zg}var Uf=Qg;i();a();i();a();function Xg(r,e){for(var t=-1,n=r==null?0:r.length,o=Array(n);++t<n;)o[t]=e(r[t],t,r);return o}var Mf=Xg;i();a();var ex=Array.isArray,ce=ex;var tx=1/0,Df=$?$.prototype:void 0,$f=Df?Df.toString:void 0;function kf(r){if(typeof r=="string")return r;if(ce(r))return Mf(r,kf)+"";if(Uf(r))return $f?$f.call(r):"";var e=r+"";return e=="0"&&1/r==-tx?"-0":e}var jf=kf;i();a();function rx(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var Vr=rx;i();a();i();a();i();a();i();a();var nx="[object AsyncFunction]",ox="[object Function]",ix="[object GeneratorFunction]",ax="[object Proxy]";function sx(r){if(!Vr(r))return!1;var e=j(r);return e==ox||e==ix||e==nx||e==ax}var Hr=sx;i();a();i();a();var ux=L["__core-js_shared__"],Yr=ux;var Wf=(function(){var r=/[^.]+$/.exec(Yr&&Yr.keys&&Yr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function fx(r){return!!Wf&&Wf in r}var Gf=fx;i();a();var px=Function.prototype,lx=px.toString;function cx(r){if(r!=null){try{return lx.call(r)}catch(e){}try{return r+""}catch(e){}}return""}var de=cx;var dx=/[\\^$.*+?()[\]{}|]/g,mx=/^\[object .+?Constructor\]$/,hx=Function.prototype,yx=Object.prototype,gx=hx.toString,xx=yx.hasOwnProperty,vx=RegExp("^"+gx.call(xx).replace(dx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wx(r){if(!Vr(r)||Gf(r))return!1;var e=Hr(r)?vx:mx;return e.test(de(r))}var zf=wx;i();a();function bx(r,e){return r==null?void 0:r[e]}var Vf=bx;function Ax(r,e){var t=Vf(r,e);return zf(t)?t:void 0}var k=Ax;var Tx=k(L,"WeakMap"),Kr=Tx;i();a();function Sx(){}var Hf=Sx;i();a();i();a();i();a();function Ex(r,e,t,n){for(var o=r.length,s=t+(n?1:-1);n?s--:++s<o;)if(e(r[s],s,r))return s;return-1}var Yf=Ex;i();a();function Rx(r){return r!==r}var Kf=Rx;i();a();function Ix(r,e,t){for(var n=t-1,o=r.length;++n<o;)if(r[n]===e)return n;return-1}var Jf=Ix;function Px(r,e,t){return e===e?Jf(r,e,t):Yf(r,Kf,t)}var Zf=Px;function Cx(r,e){var t=r==null?0:r.length;return!!t&&Zf(r,e,0)>-1}var Qf=Cx;i();a();var Nx=9007199254740991,Ox=/^(?:0|[1-9]\d*)$/;function Lx(r,e){var t=typeof r;return e=e==null?Nx:e,!!e&&(t=="number"||t!="symbol"&&Ox.test(r))&&r>-1&&r%1==0&&r<e}var Xf=Lx;i();a();function Fx(r,e){return r===e||r!==r&&e!==e}var Jr=Fx;i();a();i();a();var _x=9007199254740991;function Bx(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=_x}var Zr=Bx;function qx(r){return r!=null&&Zr(r.length)&&!Hr(r)}var ep=qx;i();a();var Ux=Object.prototype;function Mx(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Ux;return r===t}var tp=Mx;i();a();i();a();i();a();function Dx(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var rp=Dx;i();a();i();a();var $x="[object Arguments]";function kx(r){return W(r)&&j(r)==$x}var Mo=kx;var np=Object.prototype,jx=np.hasOwnProperty,Wx=np.propertyIsEnumerable,Gx=Mo((function(){return arguments})())?Mo:function(r){return W(r)&&jx.call(r,"callee")&&!Wx.call(r,"callee")},op=Gx;i();a();i();a();function zx(){return!1}var ip=zx;var up=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ap=up&&typeof module=="object"&&module&&!module.nodeType&&module,Vx=ap&&ap.exports===up,sp=Vx?L.Buffer:void 0,Hx=sp?sp.isBuffer:void 0,Yx=Hx||ip,zt=Yx;i();a();i();a();var Kx="[object Arguments]",Jx="[object Array]",Zx="[object Boolean]",Qx="[object Date]",Xx="[object Error]",e0="[object Function]",t0="[object Map]",r0="[object Number]",n0="[object Object]",o0="[object RegExp]",i0="[object Set]",a0="[object String]",s0="[object WeakMap]",u0="[object ArrayBuffer]",f0="[object DataView]",p0="[object Float32Array]",l0="[object Float64Array]",c0="[object Int8Array]",d0="[object Int16Array]",m0="[object Int32Array]",h0="[object Uint8Array]",y0="[object Uint8ClampedArray]",g0="[object Uint16Array]",x0="[object Uint32Array]",I={};I[p0]=I[l0]=I[c0]=I[d0]=I[m0]=I[h0]=I[y0]=I[g0]=I[x0]=!0;I[Kx]=I[Jx]=I[u0]=I[Zx]=I[f0]=I[Qx]=I[Xx]=I[e0]=I[t0]=I[r0]=I[n0]=I[o0]=I[i0]=I[a0]=I[s0]=!1;function v0(r){return W(r)&&Zr(r.length)&&!!I[j(r)]}var fp=v0;i();a();function w0(r){return function(e){return r(e)}}var pp=w0;i();a();var lp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vt=lp&&typeof module=="object"&&module&&!module.nodeType&&module,b0=Vt&&Vt.exports===lp,Do=b0&&zr.process,A0=(function(){try{var r=Vt&&Vt.require&&Vt.require("util").types;return r||Do&&Do.binding&&Do.binding("util")}catch(e){}})(),$o=A0;var cp=$o&&$o.isTypedArray,T0=cp?pp(cp):fp,Qr=T0;var S0=Object.prototype,E0=S0.hasOwnProperty;function R0(r,e){var t=ce(r),n=!t&&op(r),o=!t&&!n&&zt(r),s=!t&&!n&&!o&&Qr(r),f=t||n||o||s,l=f?rp(r.length,String):[],c=l.length;for(var m in r)(e||E0.call(r,m))&&!(f&&(m=="length"||o&&(m=="offset"||m=="parent")||s&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Xf(m,c)))&&l.push(m);return l}var dp=R0;i();a();i();a();i();a();function I0(r,e){return function(t){return r(e(t))}}var mp=I0;var P0=mp(Object.keys,Object),hp=P0;var C0=Object.prototype,N0=C0.hasOwnProperty;function O0(r){if(!tp(r))return hp(r);var e=[];for(var t in Object(r))N0.call(r,t)&&t!="constructor"&&e.push(t);return e}var yp=O0;function L0(r){return ep(r)?dp(r):yp(r)}var gp=L0;i();a();i();a();i();a();i();a();i();a();var F0=k(Object,"create"),me=F0;function _0(){this.__data__=me?me(null):{},this.size=0}var xp=_0;i();a();function B0(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var vp=B0;i();a();var q0="__lodash_hash_undefined__",U0=Object.prototype,M0=U0.hasOwnProperty;function D0(r){var e=this.__data__;if(me){var t=e[r];return t===q0?void 0:t}return M0.call(e,r)?e[r]:void 0}var wp=D0;i();a();var $0=Object.prototype,k0=$0.hasOwnProperty;function j0(r){var e=this.__data__;return me?e[r]!==void 0:k0.call(e,r)}var bp=j0;i();a();var W0="__lodash_hash_undefined__";function G0(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=me&&e===void 0?W0:e,this}var Ap=G0;function gt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}gt.prototype.clear=xp;gt.prototype.delete=vp;gt.prototype.get=wp;gt.prototype.has=bp;gt.prototype.set=Ap;var ko=gt;i();a();i();a();function z0(){this.__data__=[],this.size=0}var Tp=z0;i();a();i();a();function V0(r,e){for(var t=r.length;t--;)if(Jr(r[t][0],e))return t;return-1}var Re=V0;var H0=Array.prototype,Y0=H0.splice;function K0(r){var e=this.__data__,t=Re(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Y0.call(e,t,1),--this.size,!0}var Sp=K0;i();a();function J0(r){var e=this.__data__,t=Re(e,r);return t<0?void 0:e[t][1]}var Ep=J0;i();a();function Z0(r){return Re(this.__data__,r)>-1}var Rp=Z0;i();a();function Q0(r,e){var t=this.__data__,n=Re(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Ip=Q0;function xt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}xt.prototype.clear=Tp;xt.prototype.delete=Sp;xt.prototype.get=Ep;xt.prototype.has=Rp;xt.prototype.set=Ip;var Ie=xt;i();a();var X0=k(L,"Map"),Pe=X0;function ev(){this.size=0,this.__data__={hash:new ko,map:new(Pe||Ie),string:new ko}}var Pp=ev;i();a();i();a();i();a();function tv(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var Cp=tv;function rv(r,e){var t=r.__data__;return Cp(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Ce=rv;function nv(r){var e=Ce(this,r).delete(r);return this.size-=e?1:0,e}var Np=nv;i();a();function ov(r){return Ce(this,r).get(r)}var Op=ov;i();a();function iv(r){return Ce(this,r).has(r)}var Lp=iv;i();a();function av(r,e){var t=Ce(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var Fp=av;function vt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}vt.prototype.clear=Pp;vt.prototype.delete=Np;vt.prototype.get=Op;vt.prototype.has=Lp;vt.prototype.set=Fp;var Xr=vt;i();a();function sv(r){return r==null?"":jf(r)}var Ne=sv;i();a();function uv(r,e){for(var t=-1,n=e.length,o=r.length;++t<n;)r[o+t]=e[t];return r}var _p=uv;i();a();i();a();i();a();i();a();i();a();i();a();function fv(r,e,t){var n=-1,o=r.length;e<0&&(e=-e>o?0:o+e),t=t>o?o:t,t<0&&(t+=o),o=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(o);++n<o;)s[n]=r[n+e];return s}var Bp=fv;function pv(r,e,t){var n=r.length;return t=t===void 0?n:t,!e&&t>=n?r:Bp(r,e,t)}var qp=pv;i();a();var lv="\\ud800-\\udfff",cv="\\u0300-\\u036f",dv="\\ufe20-\\ufe2f",mv="\\u20d0-\\u20ff",hv=cv+dv+mv,yv="\\ufe0e\\ufe0f",gv="\\u200d",xv=RegExp("["+gv+lv+hv+yv+"]");function vv(r){return xv.test(r)}var en=vv;i();a();i();a();function wv(r){return r.split("")}var Up=wv;i();a();var Mp="\\ud800-\\udfff",bv="\\u0300-\\u036f",Av="\\ufe20-\\ufe2f",Tv="\\u20d0-\\u20ff",Sv=bv+Av+Tv,Ev="\\ufe0e\\ufe0f",Rv="["+Mp+"]",jo="["+Sv+"]",Wo="\\ud83c[\\udffb-\\udfff]",Iv="(?:"+jo+"|"+Wo+")",Dp="[^"+Mp+"]",$p="(?:\\ud83c[\\udde6-\\uddff]){2}",kp="[\\ud800-\\udbff][\\udc00-\\udfff]",Pv="\\u200d",jp=Iv+"?",Wp="["+Ev+"]?",Cv="(?:"+Pv+"(?:"+[Dp,$p,kp].join("|")+")"+Wp+jp+")*",Nv=Wp+jp+Cv,Ov="(?:"+[Dp+jo+"?",jo,$p,kp,Rv].join("|")+")",Lv=RegExp(Wo+"(?="+Wo+")|"+Ov+Nv,"g");function Fv(r){return r.match(Lv)||[]}var Gp=Fv;function _v(r){return en(r)?Gp(r):Up(r)}var zp=_v;function Bv(r){return function(e){e=Ne(e);var t=en(e)?zp(e):void 0,n=t?t[0]:e.charAt(0),o=t?qp(t,1).join(""):e.slice(1);return n[r]()+o}}var Vp=Bv;var qv=Vp("toUpperCase"),wt=qv;function Uv(r){return wt(Ne(r).toLowerCase())}var Hp=Uv;i();a();i();a();function Mv(r,e,t,n){var o=-1,s=r==null?0:r.length;for(n&&s&&(t=r[++o]);++o<s;)t=e(t,r[o],o,r);return t}var Yp=Mv;i();a();i();a();i();a();function Dv(r){return function(e){return r==null?void 0:r[e]}}var Kp=Dv;var $v={\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"},kv=Kp($v),Jp=kv;var jv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wv="\\u0300-\\u036f",Gv="\\ufe20-\\ufe2f",zv="\\u20d0-\\u20ff",Vv=Wv+Gv+zv,Hv="["+Vv+"]",Yv=RegExp(Hv,"g");function Kv(r){return r=Ne(r),r&&r.replace(jv,Jp).replace(Yv,"")}var Zp=Kv;i();a();i();a();var Jv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Zv(r){return r.match(Jv)||[]}var Qp=Zv;i();a();var Qv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Xv(r){return Qv.test(r)}var Xp=Xv;i();a();var ol="\\ud800-\\udfff",ew="\\u0300-\\u036f",tw="\\ufe20-\\ufe2f",rw="\\u20d0-\\u20ff",nw=ew+tw+rw,il="\\u2700-\\u27bf",al="a-z\\xdf-\\xf6\\xf8-\\xff",ow="\\xac\\xb1\\xd7\\xf7",iw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",aw="\\u2000-\\u206f",sw=" \\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",sl="A-Z\\xc0-\\xd6\\xd8-\\xde",uw="\\ufe0e\\ufe0f",ul=ow+iw+aw+sw,fl="['\u2019]",el="["+ul+"]",fw="["+nw+"]",pl="\\d+",pw="["+il+"]",ll="["+al+"]",cl="[^"+ol+ul+pl+il+al+sl+"]",lw="\\ud83c[\\udffb-\\udfff]",cw="(?:"+fw+"|"+lw+")",dw="[^"+ol+"]",dl="(?:\\ud83c[\\udde6-\\uddff]){2}",ml="[\\ud800-\\udbff][\\udc00-\\udfff]",bt="["+sl+"]",mw="\\u200d",tl="(?:"+ll+"|"+cl+")",hw="(?:"+bt+"|"+cl+")",rl="(?:"+fl+"(?:d|ll|m|re|s|t|ve))?",nl="(?:"+fl+"(?:D|LL|M|RE|S|T|VE))?",hl=cw+"?",yl="["+uw+"]?",yw="(?:"+mw+"(?:"+[dw,dl,ml].join("|")+")"+yl+hl+")*",gw="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xw="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vw=yl+hl+yw,ww="(?:"+[pw,dl,ml].join("|")+")"+vw,bw=RegExp([bt+"?"+ll+"+"+rl+"(?="+[el,bt,"$"].join("|")+")",hw+"+"+nl+"(?="+[el,bt+tl,"$"].join("|")+")",bt+"?"+tl+"+"+rl,bt+"+"+nl,xw,gw,pl,ww].join("|"),"g");function Aw(r){return r.match(bw)||[]}var gl=Aw;function Tw(r,e,t){return r=Ne(r),e=t?void 0:e,e===void 0?Xp(r)?gl(r):Qp(r):r.match(e)||[]}var xl=Tw;var Sw="['\u2019]",Ew=RegExp(Sw,"g");function Rw(r){return function(e){return Yp(xl(Zp(e).replace(Ew,"")),r,"")}}var vl=Rw;var Iw=vl(function(r,e,t){return e=e.toLowerCase(),r+(t?Hp(e):e)}),tn=Iw;i();a();i();a();function Pw(){this.__data__=new Ie,this.size=0}var wl=Pw;i();a();function Cw(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var bl=Cw;i();a();function Nw(r){return this.__data__.get(r)}var Al=Nw;i();a();function Ow(r){return this.__data__.has(r)}var Tl=Ow;i();a();var Lw=200;function Fw(r,e){var t=this.__data__;if(t instanceof Ie){var n=t.__data__;if(!Pe||n.length<Lw-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Xr(n)}return t.set(r,e),this.size=t.size,this}var Sl=Fw;function At(r){var e=this.__data__=new Ie(r);this.size=e.size}At.prototype.clear=wl;At.prototype.delete=bl;At.prototype.get=Al;At.prototype.has=Tl;At.prototype.set=Sl;var rn=At;i();a();i();a();function _w(r,e){for(var t=-1,n=r==null?0:r.length,o=0,s=[];++t<n;){var f=r[t];e(f,t,r)&&(s[o++]=f)}return s}var El=_w;i();a();function Bw(){return[]}var Rl=Bw;var qw=Object.prototype,Uw=qw.propertyIsEnumerable,Il=Object.getOwnPropertySymbols,Mw=Il?function(r){return r==null?[]:(r=Object(r),El(Il(r),function(e){return Uw.call(r,e)}))}:Rl,Pl=Mw;i();a();i();a();function Dw(r,e,t){var n=e(r);return ce(r)?n:_p(n,t(r))}var Cl=Dw;function $w(r){return Cl(r,gp,Pl)}var Go=$w;i();a();i();a();var kw=k(L,"DataView"),nn=kw;i();a();var jw=k(L,"Promise"),on=jw;i();a();var Ww=k(L,"Set"),Oe=Ww;var Nl="[object Map]",Gw="[object Object]",Ol="[object Promise]",Ll="[object Set]",Fl="[object WeakMap]",_l="[object DataView]",zw=de(nn),Vw=de(Pe),Hw=de(on),Yw=de(Oe),Kw=de(Kr),Ge=j;(nn&&Ge(new nn(new ArrayBuffer(1)))!=_l||Pe&&Ge(new Pe)!=Nl||on&&Ge(on.resolve())!=Ol||Oe&&Ge(new Oe)!=Ll||Kr&&Ge(new Kr)!=Fl)&&(Ge=function(r){var e=j(r),t=e==Gw?r.constructor:void 0,n=t?de(t):"";if(n)switch(n){case zw:return _l;case Vw:return Nl;case Hw:return Ol;case Yw:return Ll;case Kw:return Fl}return e});var zo=Ge;i();a();var Jw=L.Uint8Array,Vo=Jw;i();a();i();a();i();a();i();a();i();a();var Zw="__lodash_hash_undefined__";function Qw(r){return this.__data__.set(r,Zw),this}var Bl=Qw;i();a();function Xw(r){return this.__data__.has(r)}var ql=Xw;function an(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Xr;++e<t;)this.add(r[e])}an.prototype.add=an.prototype.push=Bl;an.prototype.has=ql;var sn=an;i();a();function eb(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var Ul=eb;i();a();function tb(r,e){return r.has(e)}var un=tb;var rb=1,nb=2;function ob(r,e,t,n,o,s){var f=t&rb,l=r.length,c=e.length;if(l!=c&&!(f&&c>l))return!1;var m=s.get(r),h=s.get(e);if(m&&h)return m==e&&h==r;var y=-1,g=!0,w=t&nb?new sn:void 0;for(s.set(r,e),s.set(e,r);++y<l;){var A=r[y],E=e[y];if(n)var P=f?n(E,A,y,e,r,s):n(A,E,y,r,e,s);if(P!==void 0){if(P)continue;g=!1;break}if(w){if(!Ul(e,function(C,F){if(!un(w,F)&&(A===C||o(A,C,t,n,s)))return w.push(F)})){g=!1;break}}else if(!(A===E||o(A,E,t,n,s))){g=!1;break}}return s.delete(r),s.delete(e),g}var fn=ob;i();a();i();a();function ib(r){var e=-1,t=Array(r.size);return r.forEach(function(n,o){t[++e]=[o,n]}),t}var Ml=ib;i();a();function ab(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Tt=ab;var sb=1,ub=2,fb="[object Boolean]",pb="[object Date]",lb="[object Error]",cb="[object Map]",db="[object Number]",mb="[object RegExp]",hb="[object Set]",yb="[object String]",gb="[object Symbol]",xb="[object ArrayBuffer]",vb="[object DataView]",Dl=$?$.prototype:void 0,Ho=Dl?Dl.valueOf:void 0;function wb(r,e,t,n,o,s,f){switch(t){case vb:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case xb:return!(r.byteLength!=e.byteLength||!s(new Vo(r),new Vo(e)));case fb:case pb:case db:return Jr(+r,+e);case lb:return r.name==e.name&&r.message==e.message;case mb:case yb:return r==e+"";case cb:var l=Ml;case hb:var c=n&sb;if(l||(l=Tt),r.size!=e.size&&!c)return!1;var m=f.get(r);if(m)return m==e;n|=ub,f.set(r,e);var h=fn(l(r),l(e),n,o,s,f);return f.delete(r),h;case gb:if(Ho)return Ho.call(r)==Ho.call(e)}return!1}var $l=wb;i();a();var bb=1,Ab=Object.prototype,Tb=Ab.hasOwnProperty;function Sb(r,e,t,n,o,s){var f=t&bb,l=Go(r),c=l.length,m=Go(e),h=m.length;if(c!=h&&!f)return!1;for(var y=c;y--;){var g=l[y];if(!(f?g in e:Tb.call(e,g)))return!1}var w=s.get(r),A=s.get(e);if(w&&A)return w==e&&A==r;var E=!0;s.set(r,e),s.set(e,r);for(var P=f;++y<c;){g=l[y];var C=r[g],F=e[g];if(n)var H=f?n(F,C,g,e,r,s):n(C,F,g,r,e,s);if(!(H===void 0?C===F||o(C,F,t,n,s):H)){E=!1;break}P||(P=g=="constructor")}if(E&&!P){var Y=r.constructor,oe=e.constructor;Y!=oe&&"constructor"in r&&"constructor"in e&&!(typeof Y=="function"&&Y instanceof Y&&typeof oe=="function"&&oe instanceof oe)&&(E=!1)}return s.delete(r),s.delete(e),E}var kl=Sb;var Eb=1,jl="[object Arguments]",Wl="[object Array]",pn="[object Object]",Rb=Object.prototype,Gl=Rb.hasOwnProperty;function Ib(r,e,t,n,o,s){var f=ce(r),l=ce(e),c=f?Wl:zo(r),m=l?Wl:zo(e);c=c==jl?pn:c,m=m==jl?pn:m;var h=c==pn,y=m==pn,g=c==m;if(g&&zt(r)){if(!zt(e))return!1;f=!0,h=!1}if(g&&!h)return s||(s=new rn),f||Qr(r)?fn(r,e,t,n,o,s):$l(r,e,c,t,n,o,s);if(!(t&Eb)){var w=h&&Gl.call(r,"__wrapped__"),A=y&&Gl.call(e,"__wrapped__");if(w||A){var E=w?r.value():r,P=A?e.value():e;return s||(s=new rn),o(E,P,t,n,s)}}return g?(s||(s=new rn),kl(r,e,t,n,o,s)):!1}var zl=Ib;function Vl(r,e,t,n,o){return r===e?!0:r==null||e==null||!W(r)&&!W(e)?r!==r&&e!==e:zl(r,e,t,n,Vl,o)}var Hl=Vl;i();a();function Pb(r,e,t){for(var n=-1,o=r==null?0:r.length;++n<o;)if(t(e,r[n]))return!0;return!1}var Yl=Pb;i();a();function Cb(r,e){return Hl(r,e)}var ln=Cb;i();a();i();a();var Nb=1/0,Ob=Oe&&1/Tt(new Oe([,-0]))[1]==Nb?function(r){return new Oe(r)}:Hf,Kl=Ob;var Lb=200;function Fb(r,e,t){var n=-1,o=Qf,s=r.length,f=!0,l=[],c=l;if(t)f=!1,o=Yl;else if(s>=Lb){var m=e?null:Kl(r);if(m)return Tt(m);f=!1,o=un,c=new sn}else c=e?[]:l;e:for(;++n<s;){var h=r[n],y=e?e(h):h;if(h=t||h!==0?h:0,f&&y===y){for(var g=c.length;g--;)if(c[g]===y)continue e;e&&c.push(y),l.push(h)}else o(c,y,t)||(c!==l&&c.push(y),l.push(h))}return l}var Jl=Fb;i();a();function _b(r,e){return e=typeof e=="function"?e:void 0,r&&r.length?Jl(r,void 0,e):[]}var cn=_b;i();a();function Ht(r){return Object.keys(r)}i();a();i();a();var he=class{};i();a();i();a();var G=class extends he{constructor(t){super();d(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):typeof this.value=="function"?this.value(t):this.value.write(t)}};var Bb=4,Yt=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsSemicolon",!1);d(this,"lastCharacterIsNewline",!1)}write(e){let t=e.length>0&&e.endsWith(`
14
- `),n=t?e.substring(0,e.length-1):e,o=this.getIndentString(),s=n.replaceAll(`
1
+ "use strict";var rt=Object.defineProperty,go=Object.defineProperties,wo=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyDescriptors,To=Object.getOwnPropertyNames,tt=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable;var $t=(r,t,e)=>t in r?rt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ne=(r,t)=>{for(var e in t||(t={}))jt.call(t,e)&&$t(r,e,t[e]);if(tt)for(var e of tt(t))fr.call(t,e)&&$t(r,e,t[e]);return r},Le=(r,t)=>go(r,vo(t));var pr=r=>typeof r=="symbol"?r:r+"",lr=(r,t)=>{var e={};for(var n in r)jt.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&tt)for(var n of tt(r))t.indexOf(n)<0&&fr.call(r,n)&&(e[n]=r[n]);return e};var qt=(r,t)=>()=>(r&&(t=r(r=0)),t);var cr=(r,t)=>{for(var e in t)rt(r,e,{get:t[e],enumerable:!0})},bo=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of To(t))!jt.call(r,i)&&i!==e&&rt(r,i,{get:()=>t[i],enumerable:!(n=wo(t,i))||n.enumerable});return r};var Ao=r=>bo(rt({},"__esModule",{value:!0}),r);var c=(r,t,e)=>$t(r,typeof t!="symbol"?t+"":t,e);function dr(){throw new Error("setTimeout has not been defined")}function hr(){throw new Error("clearTimeout has not been defined")}function yr(r){if(ie===setTimeout)return setTimeout(r,0);if((ie===dr||!ie)&&setTimeout)return ie=setTimeout,setTimeout(r,0);try{return ie(r,0)}catch(t){try{return ie.call(null,r,0)}catch(e){return ie.call(this,r,0)}}}function Eo(r){if(oe===clearTimeout)return clearTimeout(r);if((oe===hr||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(r);try{return oe(r)}catch(t){try{return oe.call(null,r)}catch(e){return oe.call(this,r)}}}function Ro(){!_e||!xe||(_e=!1,xe.length?H=xe.concat(H):nt=-1,H.length&&xr())}function xr(){if(!_e){var r=yr(Ro);_e=!0;for(var t=H.length;t;){for(xe=H,H=[];++nt<t;)xe&&xe[nt].run();nt=-1,t=H.length}xe=null,_e=!1,Eo(r)}}function Co(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];H.push(new gr(r,t)),H.length===1&&!_e&&yr(xr)}function gr(r,t){this.fun=r,this.array=t}function ge(){}function Wo(r){throw new Error("process.binding is not supported")}function Vo(){return"/"}function Go(r){throw new Error("process.chdir is not supported")}function zo(){return 0}function Yo(r){var t=Ho.call(Pe)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Jo(){var r=new Date,t=r-Ko;return t/1e3}var ie,oe,H,_e,xe,nt,Io,So,No,Lo,Po,_o,Fo,Bo,ko,Uo,Oo,Mo,Do,$o,jo,qo,Pe,Ho,Ko,p,mr,a=qt(()=>{"use strict";ie=dr,oe=hr;typeof globalThis.setTimeout=="function"&&(ie=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);H=[],_e=!1,nt=-1;gr.prototype.run=function(){this.fun.apply(null,this.array)};Io="browser",So="browser",No=!0,Lo={},Po=[],_o="",Fo={},Bo={},ko={};Uo=ge,Oo=ge,Mo=ge,Do=ge,$o=ge,jo=ge,qo=ge;Pe=globalThis.performance||{},Ho=Pe.now||Pe.mozNow||Pe.msNow||Pe.oNow||Pe.webkitNow||function(){return new Date().getTime()};Ko=new Date;p={nextTick:Co,title:Io,browser:No,env:Lo,argv:Po,version:_o,versions:Fo,on:Uo,addListener:Oo,once:Mo,off:Do,removeListener:$o,removeAllListeners:jo,emit:qo,binding:Wo,cwd:Vo,chdir:Go,umask:zo,hrtime:Yo,platform:So,release:Bo,config:ko,uptime:Jo},mr={};Object.keys(mr).forEach(r=>{let t=r.split("."),e=p;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=mr[r]:e=e[i]||(e[i]={})}})});function br(){Vt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)j[t]=r[t],_[r.charCodeAt(t)]=t;_[45]=62,_[95]=63}function Qo(r){Vt||br();var t,e,n,i,o,u,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[l-2]==="="?2:r[l-1]==="="?1:0,u=new Zo(l*3/4-o),n=o>0?l-4:l;var m=0;for(t=0,e=0;t<n;t+=4,e+=3)i=_[r.charCodeAt(t)]<<18|_[r.charCodeAt(t+1)]<<12|_[r.charCodeAt(t+2)]<<6|_[r.charCodeAt(t+3)],u[m++]=i>>16&255,u[m++]=i>>8&255,u[m++]=i&255;return o===2?(i=_[r.charCodeAt(t)]<<2|_[r.charCodeAt(t+1)]>>4,u[m++]=i&255):o===1&&(i=_[r.charCodeAt(t)]<<10|_[r.charCodeAt(t+1)]<<4|_[r.charCodeAt(t+2)]>>2,u[m++]=i>>8&255,u[m++]=i&255),u}function Xo(r){return j[r>>18&63]+j[r>>12&63]+j[r>>6&63]+j[r&63]}function ea(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Xo(n));return i.join("")}function wr(r){Vt||br();for(var t,e=r.length,n=e%3,i="",o=[],u=16383,l=0,m=e-n;l<m;l+=u)o.push(ea(r,l,l+u>m?m:l+u));return n===1?(t=r[e-1],i+=j[t>>2],i+=j[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=j[t>>10],i+=j[t>>4&63],i+=j[t<<2&63],i+="="),o.push(i),o.join("")}function it(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Y(r,t){if(it()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Gt(this,r)}return Ar(this,r,t,e)}function Ar(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?na(r,t,e,n):typeof t=="string"?ra(r,t,e):ia(r,t)}function Er(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function ta(r,t,e,n){return Er(t),t<=0?Y(r,t):e!==void 0?typeof n=="string"?Y(r,t).fill(e,n):Y(r,t).fill(e):Y(r,t)}function Gt(r,t){if(Er(t),r=Y(r,t<0?0:zt(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function ra(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Rr(t,e)|0;r=Y(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function Wt(r,t){var e=t.length<0?0:zt(t.length)|0;r=Y(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function na(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=Wt(r,t),r}function ia(r,t){if(q(t)){var e=zt(t.length)|0;return r=Y(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Aa(t.length)?Y(r,0):Wt(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Wt(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function zt(r){if(r>=it())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+it().toString(16)+" bytes");return r|0}function q(r){return!!(r!=null&&r._isBuffer)}function Rr(r,t){if(q(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return ot(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return _r(r).length;default:if(n)return ot(r).length;t=(""+t).toLowerCase(),n=!0}}function oa(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return ha(this,t,e);case"utf8":case"utf-8":return Sr(this,t,e);case"ascii":return ma(this,t,e);case"latin1":case"binary":return da(this,t,e);case"base64":return la(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ya(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function we(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Cr(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),q(t))return t.length===0?-1:vr(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):vr(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function vr(r,t,e,n,i){var o=1,u=r.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,u/=2,l/=2,e/=2}function m(T,b){return o===1?T[b]:T.readUInt16BE(b*o)}var d;if(i){var y=-1;for(d=e;d<u;d++)if(m(r,d)===m(t,y===-1?0:d-y)){if(y===-1&&(y=d),d-y+1===l)return y*o}else y!==-1&&(d-=d-y),y=-1}else for(e+l>u&&(e=u-l),d=e;d>=0;d--){for(var x=!0,g=0;g<l;g++)if(m(r,d+g)!==m(t,g)){x=!1;break}if(x)return d}return-1}function aa(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var l=parseInt(t.substr(u*2,2),16);if(isNaN(l))return u;r[e+u]=l}return u}function sa(r,t,e,n){return ut(ot(t,r.length-e),r,e,n)}function Ir(r,t,e,n){return ut(Ta(t),r,e,n)}function ua(r,t,e,n){return Ir(r,t,e,n)}function fa(r,t,e,n){return ut(_r(t),r,e,n)}function pa(r,t,e,n){return ut(ba(t,r.length-e),r,e,n)}function la(r,t,e){return t===0&&e===r.length?wr(r):wr(r.slice(t,e))}function Sr(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],u=null,l=o>239?4:o>223?3:o>191?2:1;if(i+l<=e){var m,d,y,x;switch(l){case 1:o<128&&(u=o);break;case 2:m=r[i+1],(m&192)===128&&(x=(o&31)<<6|m&63,x>127&&(u=x));break;case 3:m=r[i+1],d=r[i+2],(m&192)===128&&(d&192)===128&&(x=(o&15)<<12|(m&63)<<6|d&63,x>2047&&(x<55296||x>57343)&&(u=x));break;case 4:m=r[i+1],d=r[i+2],y=r[i+3],(m&192)===128&&(d&192)===128&&(y&192)===128&&(x=(o&15)<<18|(m&63)<<12|(d&63)<<6|y&63,x>65535&&x<1114112&&(u=x))}}u===null?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=l}return ca(n)}function ca(r){var t=r.length;if(t<=Tr)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Tr));return e}function ma(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function da(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ha(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=va(r[o]);return i}function ya(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function R(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function L(r,t,e,n,i,o){if(!q(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function at(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function st(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Nr(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Lr(r,t,e,n,i){return i||Nr(r,t,e,4,34028234663852886e22,-34028234663852886e22),Br(r,t,e,n,23,4),e+4}function Pr(r,t,e,n,i){return i||Nr(r,t,e,8,17976931348623157e292,-17976931348623157e292),Br(r,t,e,n,52,8),e+8}function ga(r){if(r=wa(r).replace(xa,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function wa(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function va(r){return r<16?"0"+r.toString(16):r.toString(16)}function ot(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],u=0;u<n;++u){if(e=r.charCodeAt(u),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Ta(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function ba(r,t){for(var e,n,i,o=[],u=0;u<r.length&&!((t-=2)<0);++u)e=r.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function _r(r){return Qo(ga(r))}function ut(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Aa(r){return r!==r}function Ea(r){return r!=null&&(!!r._isBuffer||Fr(r)||Ra(r))}function Fr(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Ra(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Fr(r.slice(0,0))}function ft(r,t,e,n,i){var o,u,l=i*8-n-1,m=(1<<l)-1,d=m>>1,y=-7,x=e?i-1:0,g=e?-1:1,T=r[t+x];for(x+=g,o=T&(1<<-y)-1,T>>=-y,y+=l;y>0;o=o*256+r[t+x],x+=g,y-=8);for(u=o&(1<<-y)-1,o>>=-y,y+=n;y>0;u=u*256+r[t+x],x+=g,y-=8);if(o===0)o=1-d;else{if(o===m)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-d}return(T?-1:1)*u*Math.pow(2,o-n)}function Br(r,t,e,n,i,o){var u,l,m,d=o*8-i-1,y=(1<<d)-1,x=y>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,b=n?1:-1,S=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,u=y):(u=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-u))<1&&(u--,m*=2),u+x>=1?t+=g/m:t+=g*Math.pow(2,1-x),t*m>=2&&(u++,m/=2),u+x>=y?(l=0,u=y):u+x>=1?(l=(t*m-1)*Math.pow(2,i),u=u+x):(l=t*Math.pow(2,x-1)*Math.pow(2,i),u=0));i>=8;r[e+T]=l&255,T+=b,l/=256,i-=8);for(u=u<<i|l,d+=i;d>0;r[e+T]=u&255,T+=b,u/=256,d-=8);r[e+T-b]|=S*128}var j,_,Zo,Vt,Tr,xa,kr=qt(()=>{"use strict";a();s();j=[],_=[],Zo=typeof Uint8Array!="undefined"?Uint8Array:Array,Vt=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return Ar(null,r,t,e)};f.kMaxLength=it();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return ta(null,r,t,e)};f.allocUnsafe=function(r){return Gt(null,r)};f.allocUnsafeSlow=function(r){return Gt(null,r)};f.isBuffer=Ea;f.compare=function(t,e){if(!q(t)||!q(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,u=Math.min(n,i);o<u;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var u=t[n];if(!q(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i};f.byteLength=Rr;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)we(this,e,e+1);return this};f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)we(this,e,e+3),we(this,e+1,e+2);return this};f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)we(this,e,e+7),we(this,e+1,e+6),we(this,e+2,e+5),we(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Sr(this,0,t):oa.apply(this,arguments)};f.prototype.equals=function(t){if(!q(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!q(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var u=o-i,l=n-e,m=Math.min(u,l),d=this.slice(i,o),y=t.slice(e,n),x=0;x<m;++x)if(d[x]!==y[x]){u=d[x],l=y[x];break}return u<l?-1:l<u?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return Cr(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return Cr(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return aa(this,t,e,n);case"utf8":case"utf-8":return sa(this,t,e,n);case"ascii":return Ir(this,t,e,n);case"latin1":case"binary":return ua(this,t,e,n);case"base64":return fa(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pa(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Tr=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||R(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||R(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||R(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||R(t,e,this.length);for(var i=e,o=1,u=this[t+--i];i>0&&(o*=256);)u+=this[t+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*e)),u};f.prototype.readInt8=function(t,e){return e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),ft(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),ft(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),ft(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),ft(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=1,l=0;for(this[e]=t&255;++l<n&&(u*=256);)this[e+l]=t/u&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=n-1,l=1;for(this[e+u]=t&255;--u>=0&&(l*=256);)this[e+u]=t/l&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):at(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):at(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):st(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):st(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=0,l=1,m=0;for(this[e]=t&255;++u<n&&(l*=256);)t<0&&m===0&&this[e+u-1]!==0&&(m=1),this[e+u]=(t/l>>0)-m&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=n-1,l=1,m=0;for(this[e+u]=t&255;--u>=0&&(l*=256);)t<0&&m===0&&this[e+u+1]!==0&&(m=1),this[e+u]=(t/l>>0)-m&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):at(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):at(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):st(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):st(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return Lr(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return Lr(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return Pr(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return Pr(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,u;if(this===t&&n<e&&e<i)for(u=o-1;u>=0;--u)t[u+e]=this[u+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)t[u+e]=this[u+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var u;if(typeof t=="number")for(u=e;u<n;++u)this[u]=t;else{var l=q(t)?t:ot(new f(t,i).toString()),m=l.length;for(u=0;u<n-e;++u)this[u+e]=l[u%m]}return this};xa=/[^+\/0-9A-Za-z-_]/g});var s=qt(()=>{"use strict";kr()});var ic={};cr(ic,{DynamicSnippetsGenerator:()=>Dt});module.exports=Ao(ic);a();s();a();s();a();s();a();s();function A(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();a();s();a();s();a();s();a();s();a();s();var Ca=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,pt=Ca;var Ia=typeof self=="object"&&self&&self.Object===Object&&self,Sa=pt||Ia||Function("return this")(),C=Sa;var Na=C.Symbol,F=Na;a();s();var Ur=Object.prototype,La=Ur.hasOwnProperty,Pa=Ur.toString,je=F?F.toStringTag:void 0;function _a(r){var t=La.call(r,je),e=r[je];try{r[je]=void 0;var n=!0}catch(o){}var i=Pa.call(r);return n&&(t?r[je]=e:delete r[je]),i}var Or=_a;a();s();var Fa=Object.prototype,Ba=Fa.toString;function ka(r){return Ba.call(r)}var Mr=ka;var Ua="[object Null]",Oa="[object Undefined]",Dr=F?F.toStringTag:void 0;function Ma(r){return r==null?r===void 0?Oa:Ua:Dr&&Dr in Object(r)?Or(r):Mr(r)}var k=Ma;a();s();function Da(r){return r!=null&&typeof r=="object"}var U=Da;var $a="[object Symbol]";function ja(r){return typeof r=="symbol"||U(r)&&k(r)==$a}var $r=ja;a();s();a();s();function qa(r,t){for(var e=-1,n=r==null?0:r.length,i=Array(n);++e<n;)i[e]=t(r[e],e,r);return i}var jr=qa;a();s();var Wa=Array.isArray,K=Wa;var Va=1/0,qr=F?F.prototype:void 0,Wr=qr?qr.toString:void 0;function Vr(r){if(typeof r=="string")return r;if(K(r))return jr(r,Vr)+"";if($r(r))return Wr?Wr.call(r):"";var t=r+"";return t=="0"&&1/r==-Va?"-0":t}var Gr=Vr;a();s();function Ga(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var lt=Ga;a();s();a();s();a();s();a();s();var za="[object AsyncFunction]",Ha="[object Function]",Ya="[object GeneratorFunction]",Ka="[object Proxy]";function Ja(r){if(!lt(r))return!1;var t=k(r);return t==Ha||t==Ya||t==za||t==Ka}var ct=Ja;a();s();a();s();var Za=C["__core-js_shared__"],mt=Za;var zr=(function(){var r=/[^.]+$/.exec(mt&&mt.keys&&mt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Qa(r){return!!zr&&zr in r}var Hr=Qa;a();s();var Xa=Function.prototype,es=Xa.toString;function ts(r){if(r!=null){try{return es.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var J=ts;var rs=/[\\^$.*+?()[\]{}|]/g,ns=/^\[object .+?Constructor\]$/,is=Function.prototype,os=Object.prototype,as=is.toString,ss=os.hasOwnProperty,us=RegExp("^"+as.call(ss).replace(rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fs(r){if(!lt(r)||Hr(r))return!1;var t=ct(r)?us:ns;return t.test(J(r))}var Yr=fs;a();s();function ps(r,t){return r==null?void 0:r[t]}var Kr=ps;function ls(r,t){var e=Kr(r,t);return Yr(e)?e:void 0}var B=ls;var cs=B(C,"WeakMap"),dt=cs;a();s();function ms(){}var Jr=ms;a();s();a();s();a();s();function ds(r,t,e,n){for(var i=r.length,o=e+(n?1:-1);n?o--:++o<i;)if(t(r[o],o,r))return o;return-1}var Zr=ds;a();s();function hs(r){return r!==r}var Qr=hs;a();s();function ys(r,t,e){for(var n=e-1,i=r.length;++n<i;)if(r[n]===t)return n;return-1}var Xr=ys;function xs(r,t,e){return t===t?Xr(r,t,e):Zr(r,Qr,e)}var en=xs;function gs(r,t){var e=r==null?0:r.length;return!!e&&en(r,t,0)>-1}var tn=gs;a();s();var ws=9007199254740991,vs=/^(?:0|[1-9]\d*)$/;function Ts(r,t){var e=typeof r;return t=t==null?ws:t,!!t&&(e=="number"||e!="symbol"&&vs.test(r))&&r>-1&&r%1==0&&r<t}var rn=Ts;a();s();function bs(r,t){return r===t||r!==r&&t!==t}var ht=bs;a();s();a();s();var As=9007199254740991;function Es(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=As}var yt=Es;function Rs(r){return r!=null&&yt(r.length)&&!ct(r)}var nn=Rs;a();s();var Cs=Object.prototype;function Is(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Cs;return r===e}var on=Is;a();s();a();s();a();s();function Ss(r,t){for(var e=-1,n=Array(r);++e<r;)n[e]=t(e);return n}var an=Ss;a();s();a();s();var Ns="[object Arguments]";function Ls(r){return U(r)&&k(r)==Ns}var Ht=Ls;var sn=Object.prototype,Ps=sn.hasOwnProperty,_s=sn.propertyIsEnumerable,Fs=Ht((function(){return arguments})())?Ht:function(r){return U(r)&&Ps.call(r,"callee")&&!_s.call(r,"callee")},un=Fs;a();s();a();s();function Bs(){return!1}var fn=Bs;var cn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pn=cn&&typeof module=="object"&&module&&!module.nodeType&&module,ks=pn&&pn.exports===cn,ln=ks?C.Buffer:void 0,Us=ln?ln.isBuffer:void 0,Os=Us||fn,qe=Os;a();s();a();s();var Ms="[object Arguments]",Ds="[object Array]",$s="[object Boolean]",js="[object Date]",qs="[object Error]",Ws="[object Function]",Vs="[object Map]",Gs="[object Number]",zs="[object Object]",Hs="[object RegExp]",Ys="[object Set]",Ks="[object String]",Js="[object WeakMap]",Zs="[object ArrayBuffer]",Qs="[object DataView]",Xs="[object Float32Array]",eu="[object Float64Array]",tu="[object Int8Array]",ru="[object Int16Array]",nu="[object Int32Array]",iu="[object Uint8Array]",ou="[object Uint8ClampedArray]",au="[object Uint16Array]",su="[object Uint32Array]",E={};E[Xs]=E[eu]=E[tu]=E[ru]=E[nu]=E[iu]=E[ou]=E[au]=E[su]=!0;E[Ms]=E[Ds]=E[Zs]=E[$s]=E[Qs]=E[js]=E[qs]=E[Ws]=E[Vs]=E[Gs]=E[zs]=E[Hs]=E[Ys]=E[Ks]=E[Js]=!1;function uu(r){return U(r)&&yt(r.length)&&!!E[k(r)]}var mn=uu;a();s();function fu(r){return function(t){return r(t)}}var dn=fu;a();s();var hn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,We=hn&&typeof module=="object"&&module&&!module.nodeType&&module,pu=We&&We.exports===hn,Yt=pu&&pt.process,lu=(function(){try{var r=We&&We.require&&We.require("util").types;return r||Yt&&Yt.binding&&Yt.binding("util")}catch(t){}})(),Kt=lu;var yn=Kt&&Kt.isTypedArray,cu=yn?dn(yn):mn,xt=cu;var mu=Object.prototype,du=mu.hasOwnProperty;function hu(r,t){var e=K(r),n=!e&&un(r),i=!e&&!n&&qe(r),o=!e&&!n&&!i&&xt(r),u=e||n||i||o,l=u?an(r.length,String):[],m=l.length;for(var d in r)(t||du.call(r,d))&&!(u&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||rn(d,m)))&&l.push(d);return l}var xn=hu;a();s();a();s();a();s();function yu(r,t){return function(e){return r(t(e))}}var gn=yu;var xu=gn(Object.keys,Object),wn=xu;var gu=Object.prototype,wu=gu.hasOwnProperty;function vu(r){if(!on(r))return wn(r);var t=[];for(var e in Object(r))wu.call(r,e)&&e!="constructor"&&t.push(e);return t}var vn=vu;function Tu(r){return nn(r)?xn(r):vn(r)}var Tn=Tu;a();s();a();s();a();s();a();s();a();s();var bu=B(Object,"create"),Z=bu;function Au(){this.__data__=Z?Z(null):{},this.size=0}var bn=Au;a();s();function Eu(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var An=Eu;a();s();var Ru="__lodash_hash_undefined__",Cu=Object.prototype,Iu=Cu.hasOwnProperty;function Su(r){var t=this.__data__;if(Z){var e=t[r];return e===Ru?void 0:e}return Iu.call(t,r)?t[r]:void 0}var En=Su;a();s();var Nu=Object.prototype,Lu=Nu.hasOwnProperty;function Pu(r){var t=this.__data__;return Z?t[r]!==void 0:Lu.call(t,r)}var Rn=Pu;a();s();var _u="__lodash_hash_undefined__";function Fu(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Z&&t===void 0?_u:t,this}var Cn=Fu;function Fe(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Fe.prototype.clear=bn;Fe.prototype.delete=An;Fe.prototype.get=En;Fe.prototype.has=Rn;Fe.prototype.set=Cn;var Jt=Fe;a();s();a();s();function Bu(){this.__data__=[],this.size=0}var In=Bu;a();s();a();s();function ku(r,t){for(var e=r.length;e--;)if(ht(r[e][0],t))return e;return-1}var ae=ku;var Uu=Array.prototype,Ou=Uu.splice;function Mu(r){var t=this.__data__,e=ae(t,r);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():Ou.call(t,e,1),--this.size,!0}var Sn=Mu;a();s();function Du(r){var t=this.__data__,e=ae(t,r);return e<0?void 0:t[e][1]}var Nn=Du;a();s();function $u(r){return ae(this.__data__,r)>-1}var Ln=$u;a();s();function ju(r,t){var e=this.__data__,n=ae(e,r);return n<0?(++this.size,e.push([r,t])):e[n][1]=t,this}var Pn=ju;function Be(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}Be.prototype.clear=In;Be.prototype.delete=Sn;Be.prototype.get=Nn;Be.prototype.has=Ln;Be.prototype.set=Pn;var se=Be;a();s();var qu=B(C,"Map"),ue=qu;function Wu(){this.size=0,this.__data__={hash:new Jt,map:new(ue||se),string:new Jt}}var _n=Wu;a();s();a();s();a();s();function Vu(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Fn=Vu;function Gu(r,t){var e=r.__data__;return Fn(t)?e[typeof t=="string"?"string":"hash"]:e.map}var fe=Gu;function zu(r){var t=fe(this,r).delete(r);return this.size-=t?1:0,t}var Bn=zu;a();s();function Hu(r){return fe(this,r).get(r)}var kn=Hu;a();s();function Yu(r){return fe(this,r).has(r)}var Un=Yu;a();s();function Ku(r,t){var e=fe(this,r),n=e.size;return e.set(r,t),this.size+=e.size==n?0:1,this}var On=Ku;function ke(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}ke.prototype.clear=_n;ke.prototype.delete=Bn;ke.prototype.get=kn;ke.prototype.has=Un;ke.prototype.set=On;var gt=ke;a();s();function Ju(r){return r==null?"":Gr(r)}var pe=Ju;a();s();function Zu(r,t){for(var e=-1,n=t.length,i=r.length;++e<n;)r[i+e]=t[e];return r}var Mn=Zu;a();s();a();s();a();s();a();s();a();s();a();s();function Qu(r,t,e){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=r[n+t];return o}var Dn=Qu;function Xu(r,t,e){var n=r.length;return e=e===void 0?n:e,!t&&e>=n?r:Dn(r,t,e)}var $n=Xu;a();s();var ef="\\ud800-\\udfff",tf="\\u0300-\\u036f",rf="\\ufe20-\\ufe2f",nf="\\u20d0-\\u20ff",of=tf+rf+nf,af="\\ufe0e\\ufe0f",sf="\\u200d",uf=RegExp("["+sf+ef+of+af+"]");function ff(r){return uf.test(r)}var wt=ff;a();s();a();s();function pf(r){return r.split("")}var jn=pf;a();s();var qn="\\ud800-\\udfff",lf="\\u0300-\\u036f",cf="\\ufe20-\\ufe2f",mf="\\u20d0-\\u20ff",df=lf+cf+mf,hf="\\ufe0e\\ufe0f",yf="["+qn+"]",Zt="["+df+"]",Qt="\\ud83c[\\udffb-\\udfff]",xf="(?:"+Zt+"|"+Qt+")",Wn="[^"+qn+"]",Vn="(?:\\ud83c[\\udde6-\\uddff]){2}",Gn="[\\ud800-\\udbff][\\udc00-\\udfff]",gf="\\u200d",zn=xf+"?",Hn="["+hf+"]?",wf="(?:"+gf+"(?:"+[Wn,Vn,Gn].join("|")+")"+Hn+zn+")*",vf=Hn+zn+wf,Tf="(?:"+[Wn+Zt+"?",Zt,Vn,Gn,yf].join("|")+")",bf=RegExp(Qt+"(?="+Qt+")|"+Tf+vf,"g");function Af(r){return r.match(bf)||[]}var Yn=Af;function Ef(r){return wt(r)?Yn(r):jn(r)}var Kn=Ef;function Rf(r){return function(t){t=pe(t);var e=wt(t)?Kn(t):void 0,n=e?e[0]:t.charAt(0),i=e?$n(e,1).join(""):t.slice(1);return n[r]()+i}}var Jn=Rf;var Cf=Jn("toUpperCase"),Ue=Cf;function If(r){return Ue(pe(r).toLowerCase())}var Zn=If;a();s();a();s();function Sf(r,t,e,n){var i=-1,o=r==null?0:r.length;for(n&&o&&(e=r[++i]);++i<o;)e=t(e,r[i],i,r);return e}var Qn=Sf;a();s();a();s();a();s();function Nf(r){return function(t){return r==null?void 0:r[t]}}var Xn=Nf;var Lf={\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"},Pf=Xn(Lf),ei=Pf;var _f=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ff="\\u0300-\\u036f",Bf="\\ufe20-\\ufe2f",kf="\\u20d0-\\u20ff",Uf=Ff+Bf+kf,Of="["+Uf+"]",Mf=RegExp(Of,"g");function Df(r){return r=pe(r),r&&r.replace(_f,ei).replace(Mf,"")}var ti=Df;a();s();a();s();var $f=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function jf(r){return r.match($f)||[]}var ri=jf;a();s();var qf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Wf(r){return qf.test(r)}var ni=Wf;a();s();var ui="\\ud800-\\udfff",Vf="\\u0300-\\u036f",Gf="\\ufe20-\\ufe2f",zf="\\u20d0-\\u20ff",Hf=Vf+Gf+zf,fi="\\u2700-\\u27bf",pi="a-z\\xdf-\\xf6\\xf8-\\xff",Yf="\\xac\\xb1\\xd7\\xf7",Kf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jf="\\u2000-\\u206f",Zf=" \\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",li="A-Z\\xc0-\\xd6\\xd8-\\xde",Qf="\\ufe0e\\ufe0f",ci=Yf+Kf+Jf+Zf,mi="['\u2019]",ii="["+ci+"]",Xf="["+Hf+"]",di="\\d+",ep="["+fi+"]",hi="["+pi+"]",yi="[^"+ui+ci+di+fi+pi+li+"]",tp="\\ud83c[\\udffb-\\udfff]",rp="(?:"+Xf+"|"+tp+")",np="[^"+ui+"]",xi="(?:\\ud83c[\\udde6-\\uddff]){2}",gi="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+li+"]",ip="\\u200d",oi="(?:"+hi+"|"+yi+")",op="(?:"+Oe+"|"+yi+")",ai="(?:"+mi+"(?:d|ll|m|re|s|t|ve))?",si="(?:"+mi+"(?:D|LL|M|RE|S|T|VE))?",wi=rp+"?",vi="["+Qf+"]?",ap="(?:"+ip+"(?:"+[np,xi,gi].join("|")+")"+vi+wi+")*",sp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",up="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",fp=vi+wi+ap,pp="(?:"+[ep,xi,gi].join("|")+")"+fp,lp=RegExp([Oe+"?"+hi+"+"+ai+"(?="+[ii,Oe,"$"].join("|")+")",op+"+"+si+"(?="+[ii,Oe+oi,"$"].join("|")+")",Oe+"?"+oi+"+"+ai,Oe+"+"+si,up,sp,di,pp].join("|"),"g");function cp(r){return r.match(lp)||[]}var Ti=cp;function mp(r,t,e){return r=pe(r),t=e?void 0:t,t===void 0?ni(r)?Ti(r):ri(r):r.match(t)||[]}var bi=mp;var dp="['\u2019]",hp=RegExp(dp,"g");function yp(r){return function(t){return Qn(bi(ti(t).replace(hp,"")),r,"")}}var Ai=yp;var xp=Ai(function(r,t,e){return t=t.toLowerCase(),r+(e?Zn(t):t)}),vt=xp;a();s();a();s();function gp(){this.__data__=new se,this.size=0}var Ei=gp;a();s();function wp(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var Ri=wp;a();s();function vp(r){return this.__data__.get(r)}var Ci=vp;a();s();function Tp(r){return this.__data__.has(r)}var Ii=Tp;a();s();var bp=200;function Ap(r,t){var e=this.__data__;if(e instanceof se){var n=e.__data__;if(!ue||n.length<bp-1)return n.push([r,t]),this.size=++e.size,this;e=this.__data__=new gt(n)}return e.set(r,t),this.size=e.size,this}var Si=Ap;function Me(r){var t=this.__data__=new se(r);this.size=t.size}Me.prototype.clear=Ei;Me.prototype.delete=Ri;Me.prototype.get=Ci;Me.prototype.has=Ii;Me.prototype.set=Si;var Tt=Me;a();s();a();s();function Ep(r,t){for(var e=-1,n=r==null?0:r.length,i=0,o=[];++e<n;){var u=r[e];t(u,e,r)&&(o[i++]=u)}return o}var Ni=Ep;a();s();function Rp(){return[]}var Li=Rp;var Cp=Object.prototype,Ip=Cp.propertyIsEnumerable,Pi=Object.getOwnPropertySymbols,Sp=Pi?function(r){return r==null?[]:(r=Object(r),Ni(Pi(r),function(t){return Ip.call(r,t)}))}:Li,_i=Sp;a();s();a();s();function Np(r,t,e){var n=t(r);return K(r)?n:Mn(n,e(r))}var Fi=Np;function Lp(r){return Fi(r,Tn,_i)}var Xt=Lp;a();s();a();s();var Pp=B(C,"DataView"),bt=Pp;a();s();var _p=B(C,"Promise"),At=_p;a();s();var Fp=B(C,"Set"),le=Fp;var Bi="[object Map]",Bp="[object Object]",ki="[object Promise]",Ui="[object Set]",Oi="[object WeakMap]",Mi="[object DataView]",kp=J(bt),Up=J(ue),Op=J(At),Mp=J(le),Dp=J(dt),ve=k;(bt&&ve(new bt(new ArrayBuffer(1)))!=Mi||ue&&ve(new ue)!=Bi||At&&ve(At.resolve())!=ki||le&&ve(new le)!=Ui||dt&&ve(new dt)!=Oi)&&(ve=function(r){var t=k(r),e=t==Bp?r.constructor:void 0,n=e?J(e):"";if(n)switch(n){case kp:return Mi;case Up:return Bi;case Op:return ki;case Mp:return Ui;case Dp:return Oi}return t});var er=ve;a();s();var $p=C.Uint8Array,tr=$p;a();s();a();s();a();s();a();s();a();s();var jp="__lodash_hash_undefined__";function qp(r){return this.__data__.set(r,jp),this}var Di=qp;a();s();function Wp(r){return this.__data__.has(r)}var $i=Wp;function Et(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new gt;++t<e;)this.add(r[t])}Et.prototype.add=Et.prototype.push=Di;Et.prototype.has=$i;var Rt=Et;a();s();function Vp(r,t){for(var e=-1,n=r==null?0:r.length;++e<n;)if(t(r[e],e,r))return!0;return!1}var ji=Vp;a();s();function Gp(r,t){return r.has(t)}var Ct=Gp;var zp=1,Hp=2;function Yp(r,t,e,n,i,o){var u=e&zp,l=r.length,m=t.length;if(l!=m&&!(u&&m>l))return!1;var d=o.get(r),y=o.get(t);if(d&&y)return d==t&&y==r;var x=-1,g=!0,T=e&Hp?new Rt:void 0;for(o.set(r,t),o.set(t,r);++x<l;){var b=r[x],S=t[x];if(n)var $=u?n(S,b,x,t,r,o):n(b,S,x,r,t,o);if($!==void 0){if($)continue;g=!1;break}if(T){if(!ji(t,function(he,ye){if(!Ct(T,ye)&&(b===he||i(b,he,e,n,o)))return T.push(ye)})){g=!1;break}}else if(!(b===S||i(b,S,e,n,o))){g=!1;break}}return o.delete(r),o.delete(t),g}var It=Yp;a();s();a();s();function Kp(r){var t=-1,e=Array(r.size);return r.forEach(function(n,i){e[++t]=[i,n]}),e}var qi=Kp;a();s();function Jp(r){var t=-1,e=Array(r.size);return r.forEach(function(n){e[++t]=n}),e}var De=Jp;var Zp=1,Qp=2,Xp="[object Boolean]",el="[object Date]",tl="[object Error]",rl="[object Map]",nl="[object Number]",il="[object RegExp]",ol="[object Set]",al="[object String]",sl="[object Symbol]",ul="[object ArrayBuffer]",fl="[object DataView]",Wi=F?F.prototype:void 0,rr=Wi?Wi.valueOf:void 0;function pl(r,t,e,n,i,o,u){switch(e){case fl:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case ul:return!(r.byteLength!=t.byteLength||!o(new tr(r),new tr(t)));case Xp:case el:case nl:return ht(+r,+t);case tl:return r.name==t.name&&r.message==t.message;case il:case al:return r==t+"";case rl:var l=qi;case ol:var m=n&Zp;if(l||(l=De),r.size!=t.size&&!m)return!1;var d=u.get(r);if(d)return d==t;n|=Qp,u.set(r,t);var y=It(l(r),l(t),n,i,o,u);return u.delete(r),y;case sl:if(rr)return rr.call(r)==rr.call(t)}return!1}var Vi=pl;a();s();var ll=1,cl=Object.prototype,ml=cl.hasOwnProperty;function dl(r,t,e,n,i,o){var u=e&ll,l=Xt(r),m=l.length,d=Xt(t),y=d.length;if(m!=y&&!u)return!1;for(var x=m;x--;){var g=l[x];if(!(u?g in t:ml.call(t,g)))return!1}var T=o.get(r),b=o.get(t);if(T&&b)return T==t&&b==r;var S=!0;o.set(r,t),o.set(t,r);for(var $=u;++x<m;){g=l[x];var he=r[g],ye=t[g];if(n)var ur=u?n(ye,he,g,t,r,o):n(he,ye,g,r,t,o);if(!(ur===void 0?he===ye||i(he,ye,e,n,o):ur)){S=!1;break}$||($=g=="constructor")}if(S&&!$){var Xe=r.constructor,et=t.constructor;Xe!=et&&"constructor"in r&&"constructor"in t&&!(typeof Xe=="function"&&Xe instanceof Xe&&typeof et=="function"&&et instanceof et)&&(S=!1)}return o.delete(r),o.delete(t),S}var Gi=dl;var hl=1,zi="[object Arguments]",Hi="[object Array]",St="[object Object]",yl=Object.prototype,Yi=yl.hasOwnProperty;function xl(r,t,e,n,i,o){var u=K(r),l=K(t),m=u?Hi:er(r),d=l?Hi:er(t);m=m==zi?St:m,d=d==zi?St:d;var y=m==St,x=d==St,g=m==d;if(g&&qe(r)){if(!qe(t))return!1;u=!0,y=!1}if(g&&!y)return o||(o=new Tt),u||xt(r)?It(r,t,e,n,i,o):Vi(r,t,m,e,n,i,o);if(!(e&hl)){var T=y&&Yi.call(r,"__wrapped__"),b=x&&Yi.call(t,"__wrapped__");if(T||b){var S=T?r.value():r,$=b?t.value():t;return o||(o=new Tt),i(S,$,e,n,o)}}return g?(o||(o=new Tt),Gi(r,t,e,n,i,o)):!1}var Ki=xl;function Ji(r,t,e,n,i){return r===t?!0:r==null||t==null||!U(r)&&!U(t)?r!==r&&t!==t:Ki(r,t,e,n,Ji,i)}var Zi=Ji;a();s();function gl(r,t,e){for(var n=-1,i=r==null?0:r.length;++n<i;)if(e(t,r[n]))return!0;return!1}var Qi=gl;a();s();function wl(r,t){return Zi(r,t)}var Nt=wl;a();s();a();s();var vl=1/0,Tl=le&&1/De(new le([,-0]))[1]==vl?function(r){return new le(r)}:Jr,Xi=Tl;var bl=200;function Al(r,t,e){var n=-1,i=tn,o=r.length,u=!0,l=[],m=l;if(e)u=!1,i=Qi;else if(o>=bl){var d=t?null:Xi(r);if(d)return De(d);u=!1,i=Ct,m=new Rt}else m=t?[]:l;e:for(;++n<o;){var y=r[n],x=t?t(y):y;if(y=e||y!==0?y:0,u&&x===x){for(var g=m.length;g--;)if(m[g]===x)continue e;t&&m.push(x),l.push(y)}else i(m,x,e)||(m!==l&&m.push(x),l.push(y))}return l}var eo=Al;a();s();function El(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?eo(r,void 0,t):[]}var Lt=El;a();s();function Ve(r){return Object.keys(r)}a();s();a();s();a();s();var to,ro,Ge=(ro=(to=p.env.FERN_STACK_TRACK)==null?void 0:to.toLowerCase())!=null?ro:"",W=Ge!==""&&Ge!=="0"&&Ge!=="false",nr=["single","multiline","box"].includes(Ge)?Ge:"single";W&&(Error.stackTraceLimit=50);var Rl=new Set(["SdkGeneratorCLI","runCli","LoggerImpl","Array.forEach"]),Cl=new Set(["stacktrace"]);function _t({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:u=!0,formatFilename:l=m=>m}={}){var d;if(!W)return[];n=[...n,...Rl],e=[...e,...Cl],i=[...i,"runInteractiveTask"];let m=!1;return((d=new Error().stack)!=null?d:"").split(`
2
+ `).map(y=>{let x=y.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(x&&x.length===5){let[,g,T,b,S]=x;if(!g||!T||!b||!S)return;if(m||i.some($=>g==null?void 0:g.includes($))){m=!0;return}switch(g){case"Object.<anonymous>":g="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":g=`${g.substring(g.indexOf(".")+1)}()=> { ... }`;break}return{fn:g,path:l(T),position:`${b}:${S}`}}}).filter(y=>{var x,g;return y&&!n.some(T=>y.fn.includes(T))&&!(o&&((x=y.path)!=null&&x.startsWith("node:")))&&!(u&&((g=y.path)!=null&&g.endsWith(".js")))&&!e.some(T=>y.path.includes(T))}).slice(t,t+r)}var Pt=class{constructor({maxFrames:t=50,skip:e=0,filterPaths:n=[],filterFunctions:i=[],stopOn:o=[],filterNode:u=!0,filterJs:l=!0,multiline:m=!1,formatFilename:d=y=>y}={}){c(this,"maxFrames");c(this,"skip");c(this,"filterPaths");c(this,"filterFunctions");c(this,"stopOn");c(this,"filterNode");c(this,"filterJs");c(this,"multiline");c(this,"formatFilename");c(this,"tracking",new WeakMap);this.maxFrames=t,this.skip=e,this.filterPaths=n,this.filterFunctions=i,this.stopOn=o,this.filterNode=u,this.filterJs=l,this.multiline=m,this.formatFilename=d}tag(t){let e=this.tracking.get(t)||new Set;_t({maxFrames:this.maxFrames,skip:this.skip,filterPaths:this.filterPaths,filterFunctions:this.filterFunctions,stopOn:this.stopOn,filterNode:this.filterNode,filterJs:this.filterJs,formatFilename:this.formatFilename}).forEach(n=>e.add(n)),this.tracking.set(t,e)}trace(t){if(!W)return"";let e=this.tracking.get(t);return e?[...e].map(n=>`${this.multiline?`
3
+ `:""}${n.fn} - ${n.path}:${n.position}`).join(""):""}frames(t){let e=this.tracking.get(t);return e?[...e]:[]}free(t){this.tracking.delete(t)}clear(){this.tracking=new WeakMap}},Q;function no({maxFrames:r=50,skip:t=0,filterPaths:e=[],filterFunctions:n=[],stopOn:i=[],filterNode:o=!0,filterJs:u=!0,multiline:l=!1,formatFilename:m=d=>d}={}){W&&(Q!=null||(Q=new Pt({maxFrames:r,skip:t,filterPaths:e,filterFunctions:n,stopOn:i,filterNode:o,filterJs:u,multiline:l,formatFilename:m})))}function io(r){Q==null||Q.tag(r)}function ir(r){var t;return(t=Q==null?void 0:Q.frames(r))!=null?t:[]}var X=class{constructor(){io(this)}};a();s();a();s();a();s();var O=class extends X{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var Il=4;no({skip:0,maxFrames:15,filterFunctions:["Abstract"]});var ze=class{constructor(){c(this,"lineBuffer",[]);c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsSemicolon",!1);c(this,"lastCharacterIsNewline",!1);c(this,"nodeStackFrames",[])}get buffer(){return W&&this.nodeStackFrames.length>0&&this.writeInternal(`
4
+ `),this.lineBuffer.join(`
5
+ `)+(this.lastCharacterIsNewline?`
6
+ `:"")}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
7
+ `),i=n?e.substring(0,e.length-1):e,o=this.getIndentString(),u=i.replaceAll(`
15
8
  `,`
16
- ${o}`);this.isAtStartOfLine()&&(s=o+s),t&&(s+=`
17
- `),this.writeInternal(s)}writeNoIndent(e){let t=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=t}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 G(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,t){new G(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}controlFlowWithoutStatement(e){new G(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(e,t){this.dedent(),this.write("} "),new G(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(e){this.dedent(),this.write("} "),new G(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
9
+ ${o}`);this.isAtStartOfLine()&&(u=o+u),n&&(u+=`
10
+ `),this.writeInternal(u)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){W&&this.nodeStackFrames.push(...ir(t)),t.write(this),W&&nr!=="single"&&this.writeInternal(`
11
+ `)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){this.writeNode(t),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new O(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new O(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new O(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new O(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new O(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}writeLine(...t){this.write(...t.length===0?[""]:t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
18
12
  `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
19
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:t,writeFunction:n}){if(e.length>0){let o=e[0];o!=null&&n(o);for(let s=1;s<e.length;s++){this.write(t);let f=e[s];f!=null&&n(f)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
20
- `),this.lastCharacterIsSemicolon=e.endsWith(";")),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Bb}};i();a();function Yo(r){return(r==null?void 0:r.name)!=null}i();a();var Kt=class extends he{constructor({condition:t,true_:n,false_:o}){super();d(this,"condition");d(this,"true_");d(this,"false_");this.condition=t,this.true_=n,this.false_=o}write(t){t.writeNode(this.condition),t.write(" ? "),t.writeNode(this.true_),t.write(" : "),t.writeNode(this.false_)}};i();a();i();a();i();a();var Jt=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:t}){this.shouldUpdate({snippet:t,reporter:e.errors})&&(this.reporter=e.errors.clone(),this.snippet=t)}getResponseOrThrow({endpoint:e}){var t;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(t=this.err)!=null?t:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}shouldUpdate({snippet:e,reporter:t}){var n,o;return this.reporter==null||this.reporter.size()>0&&t.size()===0?!0:e.length>((o=(n=this.snippet)==null?void 0:n.length)!=null?o:0)}};var Zt=class{constructor(e){d(this,"context");this.context=e}async generate(e,t={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let o=new Jt;for(let s of n){let f=this.context.clone(),l=this.createSnippetGenerator(f);try{let c=await l.generateSnippet({endpoint:s,request:e,options:t});if(f.errors.empty())return{snippet:c,errors:void 0};o.update({context:f,snippet:c})}catch(c){o.err==null&&(o.err=c)}}return o.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,t={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let o=new Jt;for(let s of n){let f=this.context.clone(),l=this.createSnippetGenerator(f);try{let c=l.generateSnippetSync({endpoint:s,request:e,options:t});if(f.errors.empty())return{snippet:c,errors:void 0};o.update({context:f,snippet:c})}catch(c){o.err==null&&(o.err=c)}}return o.getResponseOrThrow({endpoint:e.endpoint})}};i();a();i();a();i();a();var Qt=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}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]}}};i();a();var S={Critical:"CRITICAL",Warning:"WARNING"},Xt=class r{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(tt(et({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(t=>t.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new r;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 t=[];for(let n of e){if(typeof n=="string"){t.push(n);continue}t[t.length-1]+=`[${n.index}]`}return t}};var er=class{constructor({ir:e,config:t,options:n={}}){d(this,"config");d(this,"options");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=e,this.config=t,this.options=n,this.errors=new Xt,this.httpEndpointReferenceParser=new Qt}associateQueryParametersByWireValue({parameters:e,values:t}){let n=[];for(let[o,s]of Object.entries(t)){this.errors.scope(o);try{let f=e.find(c=>c.name.wireValue===o);if(f==null)throw this.newParameterNotRecognizedError(o);let l=this.isListTypeReference(f.typeReference)&&!Array.isArray(s)?[s]:s;n.push({name:f.name,typeReference:f.typeReference,value:l})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:t,ignoreMissingParameters:n}){let o=[];for(let[s,f]of Object.entries(t)){this.errors.scope(s);try{let l=e.find(c=>c.name.wireValue===s);if(l==null){if(n)continue;this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(s).message});continue}o.push({name:l.name,typeReference:l.typeReference,value:f})}finally{this.errors.unscope()}}return o}getSingleFileValue({property:e,record:t}){let n=t[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:S.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:t}){let n=t[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let s of n){if(typeof s!="string"){this.errors.add({severity:S.Critical,message:`Expected file array value to be an array of strings, got ${typeof s}`});return}o.push(s)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:S.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 t=this._ir.types[e];if(t==null){this.errors.add({severity:S.Critical,message:`Type identified by "${e}" could not be found`});return}return t}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t}){let n=this.getRecord(t);if(n==null)return;let o=e.discriminant.wireValue,s=n[o];if(s==null){this.errors.add({severity:S.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof s!="string"){this.errors.add({severity:S.Critical,message:`Expected discriminant value to be a string but got: ${typeof s}`});return}let f=e.types[s];if(f==null){this.errors.add({severity:S.Critical,message:`No type found for discriminant value "${s}"`});return}let m=n,{[o]:l}=m,c=ti(m,[ei(o)]);return{singleDiscriminatedUnionType:f,discriminantValue:f.discriminantValue,value:c}}resolveEndpointOrThrow(e){let t=this.httpEndpointReferenceParser.tryParse(e);if(t==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(t)}resolveEndpointLocationOrThrow(e){let t=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&t.push(n);if(t.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return t}needsRequestParameter({request:e,inlinePathParameters:t,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:t})||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:t}){var n,o;return t&&((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:R(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":{let n=t.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=t.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:R(t)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let t=this._ir.environments.environments;switch(t.type){case"singleBaseUrl":return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=t.environments[0];if(n==null)return this.errors.add({severity:S.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(Ht(n.urls));for(let s of Ht(e))o.has(s)&&o.delete(s);return o.size>0?(this.errors.add({severity:S.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${Ht(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:S.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:S.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 t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let t=this.resolveNamedType({typeId:e.value});return t==null?!1:t.type==="alias"?this.isNullable(t.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:t}){return new Error(`Expected auth type ${e.type}, got ${t.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:t}){return new Error(`Expected ${e}, got ${typeof t}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:t}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t});default:R(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:t}){return this.fileUploadHasBodyProperties({fileUpload:e})||t&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:R(t)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:R(t)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:t}){return e.location.method===t.method&&e.location.path===t.path}};i();a();var te={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};i();a();i();a();i();a();var Zl="self",Ql="static";var v={};En(v,{Access:()=>Le,Array:()=>ze,AstNode:()=>b,Attribute:()=>Ve,Class:()=>ye,ClassInstantiation:()=>ne,ClassReference:()=>B,CodeBlock:()=>q,DataClass:()=>He,Enum:()=>Ye,Field:()=>Ke,Map:()=>Je,Method:()=>ve,MethodInvocation:()=>xe,Parameter:()=>ge,Trait:()=>Ze,Type:()=>V,TypeLiteral:()=>z,Writer:()=>re,array:()=>Wb,assignVariable:()=>nA,attribute:()=>Gb,classReference:()=>Hb,class_:()=>zb,codeblock:()=>Qe,dataClass:()=>Yb,enum_:()=>Kb,field:()=>Jb,instantiateClass:()=>ic,invokeMethod:()=>Zb,map:()=>Xb,mergeArrays:()=>aA,method:()=>eA,parameter:()=>tA,string:()=>iA,ternary:()=>rA,this_:()=>sA,throwException:()=>Qb,trait:()=>Vb,variable:()=>oA});i();a();i();a();i();a();var Le={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};i();a();i();a();i();a();function Xl(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var re=class extends Yt{constructor({namespace:t,rootNamespace:n,customConfig:o}){super();d(this,"namespace");d(this,"rootNamespace");d(this,"customConfig");d(this,"references",{});this.namespace=t,this.rootNamespace=n,this.customConfig=o}addReference(t){var f,l;if(t.namespace==null)return;if(Object.keys(this.references).filter(c=>{let m=Xl(c);return m.namespace!==t.namespace&&m.name===t.name}).length>0){t.requireFullyQualified();return}let o=t.namespace===""?t.name:`${t.namespace}\\${t.name}`;((l=(f=this.references)[o])!=null?l:f[o]=[]).push(t)}toString(t=!1){if(t)return this.buffer;let n=`namespace ${this.namespace};`,o=this.stringifyImports();return o.length>0?`${n}
13
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let u=t[o];u!=null&&n(u)}}}toString(){return this.buffer}writeInternal(t){if(t.length===0)return;let e=!this.lastCharacterIsNewline;this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
14
+ `),this.lastCharacterIsSemicolon=t.endsWith(";");let n=t.split(`
15
+ `),i=W&&!this.shouldSkipTracking(n)&&this.lastCharacterIsNewline;e&&(this.lastLine=`${this.lastLine}${n.shift()||""}`),this.lastCharacterIsNewline&&n.pop(),this.lineBuffer.push(...n),i&&this.appendTrackingComment()}set lastLine(t){this.lineBuffer.length>0?this.lineBuffer[this.lineBuffer.length-1]=t:this.lineBuffer.push(t)}get lastLine(){return this.lineBuffer[this.lineBuffer.length-1]||""}shouldSkipTracking(t){return!1}formatStack(t,e=""){return t.map(n=>`${e?`(${e}) `:""} ${n.fn} - ${n.path} : ${n.position}`)}filterStack(t){return t.filter(e=>!e.fn.startsWith(`${this.constructor.name}.`))}appendTrackingComment(){let t=[...this.formatStack(this.filterStack(_t({maxFrames:15,skip:3}))),...this.formatStack(this.filterStack(this.nodeStackFrames),"node")];switch(this.nodeStackFrames.length=0,nr){case"single":return this.singleLineTrackingComment(t);case"multiline":return this.multiLineTrackingComment(t);case"box":return this.boxTrackingComment(t)}}singleLineTrackingComment(t){this.lastLine=`${this.lastLine} // ${t.join(" ")}`}multiLineTrackingComment(t){this.lineBuffer.push(...t.map(e=>` // ${e}`))}boxTrackingComment(t){this.lineBuffer.push("/*",...t.map(e=>` ${e}`),"*/")}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Il}};a();s();function or(r){return(r==null?void 0:r.name)!=null&&(r==null?void 0:r.assignment)!=null}a();s();var He=class extends X{constructor({condition:e,true_:n,false_:i}){super();c(this,"condition");c(this,"true_");c(this,"false_");this.condition=e,this.true_=n,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};a();s();a();s();a();s();var Ye=class{constructor(){c(this,"reporter");c(this,"snippet");c(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){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 "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){var n,i;return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>((i=(n=this.snippet)==null?void 0:n.length)!=null?i:0)}};var Ke=class{constructor(t){c(this,"context");this.context=t}async generate(t,e={}){let n=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let i=new Ye;for(let o of n){let u=this.context.clone(),l=this.createSnippetGenerator(u);try{let m=await l.generateSnippet({endpoint:o,request:t,options:e});if(u.errors.empty())return{snippet:m,errors:void 0};i.update({context:u,snippet:m})}catch(m){i.err==null&&(i.err=m)}}return i.getResponseOrThrow({endpoint:t.endpoint})}generateSync(t,e={}){let n=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let i=new Ye;for(let o of n){let u=this.context.clone(),l=this.createSnippetGenerator(u);try{let m=l.generateSnippetSync({endpoint:o,request:t,options:e});if(u.errors.empty())return{snippet:m,errors:void 0};i.update({context:u,snippet:m})}catch(m){i.err==null&&(i.err=m)}}return i.getResponseOrThrow({endpoint:t.endpoint})}};a();s();a();s();a();s();var Je=class{constructor(){c(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let n=t.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};a();s();var v={Critical:"CRITICAL",Warning:"WARNING"},Ze=class r{constructor(){c(this,"errors");c(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push(Le(Ne({},t),{path:[...this.path]}))}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new r;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let n of t){if(typeof n=="string"){e.push(n);continue}e[e.length-1]+=`[${n.index}]`}return e}};var Qe=class{constructor({ir:t,config:e,options:n={}}){c(this,"config");c(this,"options");c(this,"errors");c(this,"_ir");c(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=n,this.errors=new Ze,this.httpEndpointReferenceParser=new Je}associateQueryParametersByWireValue({parameters:t,values:e}){let n=[];for(let[i,o]of Object.entries(e)){this.errors.scope(i);try{let u=t.find(m=>m.name.wireValue===i);if(u==null)throw this.newParameterNotRecognizedError(i);let l=this.isListTypeReference(u.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:u.name,typeReference:u.typeReference,value:l})}finally{this.errors.unscope()}}return n}associateByWireValueOrDefault({parameters:t,values:e}){let n=[];for(let i of t){this.errors.scope(i.name.wireValue);try{let o=e[i.name.wireValue];if(o==null)if(i.typeReference.type==="primitive"&&i.typeReference.value==="STRING")o=`<${i.name.wireValue}>`;else{this.errors.add({severity:v.Critical,message:this.newParameterNotRecognizedError(i.name.wireValue).message});continue}n.push({name:i.name,typeReference:i.typeReference,value:o})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:n}){let i=[];for(let[o,u]of Object.entries(e)){this.errors.scope(o);try{let l=t.find(m=>m.name.wireValue===o);if(l==null){if(n)continue;this.errors.add({severity:v.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:l.name,typeReference:l.typeReference,value:u})}finally{this.errors.unscope()}}return i}getExampleObjectProperties({parameters:t,snippetObject:e}){let n=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},i=[];for(let o of t){let u=n[o.name.wireValue];u==null?o.typeReference.type==="nullable"&&i.push({name:o.name,typeReference:o.typeReference,value:null}):i.push({name:o.name,typeReference:o.typeReference,value:u})}return i}getSingleFileValue({property:t,record:e}){let n=e[t.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:v.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:t,record:e}){let n=e[t.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:v.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let i=[];for(let o of n){if(typeof o!="string"){this.errors.add({severity:v.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:v.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t==null?{}:t}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:v.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let n=this.getRecord(e);if(n==null)return;let i=t.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:v.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:v.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let u=t.types[o];if(u==null){this.errors.add({severity:v.Critical,message:`No type found for discriminant value "${o}"`});return}let d=n,{[i]:l}=d,m=lr(d,[pr(i)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:m}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(t){let e=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:t})&&e.push(n);return e}resolveEndpointLocationOrThrow(t){let e=this.resolveEndpointLocation(t);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:n}){var i;return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:n}):!((i=t.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){var n,i;return e&&((i=(n=t.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:A(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let n=e.environments.find(i=>i.id===t);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=e.environments.find(i=>i.id===t);return n==null?void 0:n.name}default:A(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:v.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:v.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:v.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(Ve(n.urls));for(let o of Ve(t))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:v.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${Ve(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:v.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:v.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:v.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:A(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:A(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:A(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};a();s();var V={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();a();s();var oo="self",ao="static";a();s();var so=new Set(["abstract","and","array","as","break","callable","case","catch","class","clone","const","continue","declare","default","die","do","echo","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","eval","exit","extends","final","finally","fn","for","foreach","function","global","goto","if","implements","include","include_once","instanceof","insteadof","interface","isset","list","match","namespace","new","or","print","private","protected","public","readonly","require","require_once","return","static","switch","throw","trait","try","unset","use","var","while","xor","yield","yield_from","__halt_compiler"]);var h={};cr(h,{Access:()=>ce,Array:()=>Te,AstNode:()=>w,Attribute:()=>be,Class:()=>ee,ClassInstantiation:()=>z,ClassReference:()=>I,CodeBlock:()=>N,DataClass:()=>Ae,Enum:()=>Ee,Field:()=>Re,Map:()=>Ce,Method:()=>ne,MethodInvocation:()=>re,Parameter:()=>te,Trait:()=>Ie,Type:()=>D,TypeLiteral:()=>M,Writer:()=>G,array:()=>kl,assignVariable:()=>Kl,attribute:()=>Ul,classReference:()=>Dl,class_:()=>Ol,codeblock:()=>Se,dataClass:()=>$l,enum_:()=>jl,escapePhpString:()=>ar,field:()=>ql,instantiateClass:()=>ho,invokeMethod:()=>Wl,map:()=>Gl,mergeArrays:()=>Ql,method:()=>zl,parameter:()=>Hl,string:()=>Zl,ternary:()=>Yl,this_:()=>Xl,throwException:()=>Vl,trait:()=>Ml,variable:()=>Jl});a();s();a();s();a();s();var ce={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};a();s();a();s();a();s();function uo(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var G=class extends ze{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();c(this,"namespace");c(this,"rootNamespace");c(this,"customConfig");c(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var u,l;if(e.namespace==null)return;if(Object.keys(this.references).filter(m=>{let d=uo(m);return d.namespace!==e.namespace&&d.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===""?e.name:`${e.namespace}\\${e.name}`;((l=(u=this.references)[i])!=null?l:u[i]=[]).push(e)}toString(e=!1){if(e)return this.buffer;let n=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${n}
21
16
 
22
- ${o}
17
+ ${i}
23
18
 
24
19
  ${this.buffer}`:n+`
25
20
 
26
- `+this.buffer}stringifyImports(){let t=Object.keys(this.references);return t.length===0?"":t.filter(n=>Xl(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
27
- `)}};var b=class extends he{toString(e){if(e==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:t,rootNamespace:n,customConfig:o,skipImports:s=!1}=e,f=new re({namespace:t,rootNamespace:n,customConfig:o});return this.write(f),f.toString(s)}async toStringAsync({namespace:e,rootNamespace:t,customConfig:n}){let o=new re({namespace:e,rootNamespace:t,customConfig:n});return this.write(o),o.toString()}};var ze=class extends b{constructor({entries:t}){super();d(this,"entries");this.entries=t!=null?t:[]}write(t){t.write("["),this.entries.forEach((n,o)=>{o>0&&t.write(", "),n.write(t)}),t.write("]")}};i();a();var Ve=class extends b{constructor(t){var n;super();d(this,"reference");d(this,"arguments");this.reference=t.reference,this.arguments=(n=t.arguments)!=null?n:[]}write(t){t.addReference(this.reference),t.write(`${this.reference.name}`),this.arguments.length>0&&(t.write("("),this.arguments.forEach((n,o)=>{o>0&&t.write(","),typeof n=="string"?t.write(n):n.write(t)}),t.write(")"))}};i();a();i();a();var B=class extends b{constructor({name:t,namespace:n,generics:o}){super();d(this,"name");d(this,"namespace");d(this,"generics");d(this,"fullyQualified");this.name=t,this.namespace=n,this.generics=o,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(t){t.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;t.write(`${n}`)}};i();a();i();a();function Fe(r){return r.startsWith("$")?r:`$${r}`}var M=class extends b{constructor({docs:t}={}){super();d(this,"docs");d(this,"tags",[]);this.docs=t}addTag(t){this.tags.push(tt(et({},t),{name:t.name!=null?Fe(t.name):void 0}))}write(t){t.writeLine("/**"),this.docs!=null&&(this.docs.split(`
28
- `).forEach(n=>{t.writeLine(` * ${n}`)}),this.tags.length>0&&t.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:t,tag:n});t.writeLine(" */")}writeTag({writer:t,tag:n}){let o=n.docs!=null?n.docs.split(`
29
- `):void 0;o!=null&&o.length>1&&(o.forEach(s=>{t.writeLine(` * ${s}`)}),t.writeLine(" *")),t.write(` * @${n.tagType} `),n.type.write(t,{comment:!0}),n.name!=null&&t.write(` ${n.name}`),o!=null&&o.length===1&&t.write(` ${o[0]}`),t.newLine()}};i();a();function _e(r){return qb(r,[Le.Public,Le.PublicReadonly,Le.Protected,Le.Private])}function qb(r,e){return e.reduce((t,n)=>[...t,...r.filter(o=>o.access===n)],[])}var ye=class extends b{constructor({name:t,namespace:n,abstract:o,docs:s,parentClassReference:f,traits:l}){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=t,this.namespace=n,this.abstract=o!=null?o:!1,this.docs=s,this.parentClassReference=f,this.traits=l!=null?l:[]}addConstructor(t){this.constructor_=t}addField(t){this.fields.push(t)}addMethod(t){this.methods.push(t)}addMethods(t){this.methods.push(...t)}addTrait(t){this.traits.push(t)}write(t){t.addReference(new B({name:this.name,namespace:this.namespace})),this.abstract&&t.write("abstract "),this.writeComment(t),t.write(`class ${this.name} `),this.parentClassReference!=null&&(t.write("extends "),this.parentClassReference.write(t)),t.newLine(),t.writeLine("{"),t.indent(),this.traits.length>0&&(t.write("use "),this.traits.forEach((n,o)=>{o>0&&t.write(","),t.writeNode(n)}),t.writeTextStatement(""),t.newLine()),this.writeFields({writer:t,fields:_e(this.fields)}),(this.constructor!=null||this.methods.length>0)&&t.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:t,constructor:this.constructor_}),this.methods.length>0&&t.newLine()),this.writeMethods({writer:t,methods:_e(this.methods)}),t.dedent(),t.writeLine("}")}writeComment(t){if(this.docs==null)return;new M({docs:this.docs}).write(t)}writeConstructor({writer:t,constructor:n}){var o;this.writeConstructorComment({writer:t,constructor:n}),n.access!=null&&t.write(`${n.access} `),t.write("function __construct("),t.indent(),n.parameters.forEach((s,f)=>{f===0&&t.newLine(),s.write(t),t.writeLine(",")}),t.dedent(),t.writeLine(")"),t.writeLine("{"),t.indent(),(o=n.body)==null||o.write(t),t.writeNewLineIfLastLineNot(),t.dedent(),t.writeLine("}")}writeConstructorComment({writer:t,constructor:n}){if(n.parameters.length===0)return;let o=new M;for(let s of n.parameters)o.addTag(s.getCommentTag());o.write(t)}writeFields({writer:t,fields:n}){n.filter(o=>!o.inherited).forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}writeMethods({writer:t,methods:n}){n.forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}};i();a();i();a();function St({writer:r,arguments_:e,multiline:t}){if(e.length===0){r.write("()");return}if(t){Ub({writer:r,arguments_:e});return}Mb({writer:r,arguments_:e})}function Ub({writer:r,arguments_:e}){r.writeLine("("),r.indent();for(let t of e)tc({writer:r,argument:t,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function Mb({writer:r,arguments_:e}){r.write("("),e.forEach((t,n)=>{n>0&&r.write(", "),tc({writer:r,argument:t,writeCompact:!0})}),r.write(")")}function tc({writer:r,argument:e,writeCompact:t}){Yo(e)?(e.docs&&(t?r.write(`/* ${e.docs} */ `):r.writeLine(`/* ${e.docs} */`)),r.write(`${e.name}: `),r.writeNodeOrString(e.assignment)):e.write(r)}var ne=class extends b{constructor({classReference:t,arguments_:n,multiline:o}){super();d(this,"classReference");d(this,"arguments_");d(this,"multiline");this.classReference=t,this.arguments_=n,this.multiline=o!=null?o:!1}write(t){t.write("new "),t.writeNode(this.classReference),St({writer:t,arguments_:this.arguments_,multiline:this.multiline})}};i();a();var q=class extends b{constructor(t){super();d(this,"arg");this.arg=t}write(t){return new G(this.arg).write(t)}};i();a();i();a();var ge=class extends b{constructor({name:t,type:n,docs:o,initializer:s,access:f,readonly_:l}){super();d(this,"name");d(this,"type");d(this,"docs");d(this,"initializer");d(this,"access");d(this,"readonly_");this.name=Fe(t),this.type=n,this.docs=o,this.initializer=s,this.access=f,this.readonly_=l!=null?l:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(t){this.access!=null&&t.write(`${this.access} `),this.readonly_&&t.write("readonly "),this.type.write(t),t.write(` ${this.name}`),this.initializer!=null?(t.write(" = "),this.initializer.write(t)):this.type.isOptional()&&t.write(" = null")}};i();a();i();a();i();a();i();a();var xe=class extends b{constructor({method:t,arguments_:n,static_:o,multiline:s,on:f}){super();d(this,"method");d(this,"arguments_");d(this,"multiline");d(this,"static_");d(this,"on");this.method=t,this.arguments_=n,this.static_=o!=null?o:!1,this.multiline=s!=null?s:!1,this.on=f}write(t){this.on!=null&&(this.on.write(t),t.write(this.getMethodAccessor())),t.write(this.method),St({writer:t,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var z=class r extends b{constructor(t){super();d(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"list":{this.writeList({writer:t,list:this.internalType});break}case"boolean":{t.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:t,class_:this.internalType});break}case"file":{t.writeNode($b({writer:t,value:this.internalType.value}));break}case"float":{t.write(this.internalType.value.toString());break}case"number":{t.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:t,map:this.internalType});break}case"reference":{t.writeNode(this.internalType.value);break}case"datetime":{t.writeNode(Db({writer:t,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
30
- `)){this.writeStringWithHeredoc({writer:t,value:this.internalType.value});break}if(this.internalType.value.includes("'")){t.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}t.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:t,value:this.internalType.value});break}case"null":{t.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:t,value:n}){t.writeLine("<<<EOT"),t.writeNoIndent(n),t.newLine(),t.writeNoIndent("EOT")}writeClass({writer:t,class_:n}){t.writeNode(new ne({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(o=>({key:r.string(o.name),value:o.value}))})]}))}writeList({writer:t,list:n}){let o=jb({values:n.values});if(o.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let s of o)s.write(t),t.writeLine(",");t.dedent(),t.write("]")}writeMap({writer:t,map:n}){let o=kb({entries:n.entries});if(o.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let s of o)s.key.write(t),t.write(" => "),s.value.write(t),t.writeLine(",");t.dedent(),t.write("]")}static list({values:t}){return new this({type:"list",values:t})}static boolean(t){return new this({type:"boolean",value:t})}static class_({reference:t,fields:n}){return new this({type:"class",reference:t,fields:n})}static file(t){return new this({type:"file",value:t})}static float(t){return new this({type:"float",value:t})}static datetime(t){return new this({type:"datetime",value:t})}static number(t){return new this({type:"number",value:t})}static map({entries:t}){return new this({type:"map",entries:t})}static reference(t){return new this({type:"reference",value:t})}static string(t){return new this({type:"string",value:t})}static unknown(t){return new this({type:"unknown",value:t})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(t){return t.internalType.type==="nop"}writeUnknown({writer:t,value:n}){switch(typeof n){case"boolean":t.write(n.toString());return;case"string":t.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":t.write(n.toString());return;case"object":if(n==null){t.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:t,value:n});return}this.writeUnknownMap({writer:t,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:t,value:n}){if(n.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let o of n)t.writeNode(r.unknown(o)),t.writeLine(",");t.dedent(),t.write("]")}writeUnknownMap({writer:t,value:n}){let o=Object.entries(n);if(o.length===0){t.write("[]");return}t.writeLine("["),t.indent();for(let[s,f]of o)t.write(`'${s}' => `),t.writeNode(r.unknown(f)),t.writeLine(",");t.dedent(),t.write("]")}};function Db({writer:r,value:e}){return new ne({classReference:new B({name:"DateTime",namespace:""}),arguments_:[new q(`'${e}'`)]})}function $b({writer:r,value:e}){return new xe({on:new B({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new q(`"${e}"`)]})}function kb({entries:r}){return r.filter(e=>!z.isNop(e.key)&&!z.isNop(e.value))}function jb({values:r}){return r.filter(e=>!z.isNop(e))}var V=class r extends b{constructor(t){super();d(this,"internalType");this.internalType=t}write(t,{comment:n}={}){switch(this.internalType.type){case"int":t.write("int");break;case"string":t.write("string");break;case"bool":t.write("bool");break;case"float":t.write("float");break;case"date":t.addReference(rc),t.write("DateTime");break;case"dateTime":t.addReference(rc),t.write("DateTime");break;case"mixed":t.write("mixed");break;case"object":t.write("object");break;case"array":if(!n){t.write("array");break}t.write("array<"),this.internalType.value.write(t,{comment:n}),t.write(">");break;case"map":{if(!n){t.write("array");break}t.write("array<"),this.internalType.keyType.write(t,{comment:n}),t.write(", "),this.internalType.valueType.write(t,{comment:n}),t.write(">");break}case"null":{t.write("null");break}case"typeDict":{if(!n){t.write("array");break}if(this.internalType.multiline){t.writeLine("array{");let o=this.internalType.entries.filter(l=>!l.valueType.isOptional()),s=this.internalType.entries.filter(l=>l.valueType.isOptional()),f=[...o,...s];for(let l of f)t.write(" * "),this.writeTypeDictEntry({writer:t,entry:l,comment:n}),t.writeLine(",");t.write(" * }");break}t.write("array{"),this.internalType.entries.forEach((o,s)=>{s>0&&t.write(", "),this.writeTypeDictEntry({writer:t,entry:o,comment:n})}),t.write("}");break}case"union":{this.writeUnion({writer:t,unionTypes:this.internalType.types,comment:n});break}case"optional":{let o=this.internalType.value.internalType,s=o.type==="mixed",f=o.type==="union";!f&&!s&&t.write("?"),this.internalType.value.write(t,{comment:n}),f&&!this.unionHasOptional(o.types)&&(t.write("|"),t.writeNode(r.null()));break}case"reference":if(n){t.writeNode(this.internalType.value);let o=this.internalType.value.generics;o&&o.length>0&&(t.write("<"),o.forEach((s,f)=>{f>0&&t.write(", "),s.write(t,{comment:n})}),t.write(">"))}else t.writeNode(this.internalType.value);break;case"enumString":n?(t.write("value-of<"),t.writeNode(this.internalType.value),t.write(">")):t.write("string");break;case"literal":if(n)t.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":t.write("string");break;case"boolean":t.write("bool");break;default:R(this.internalType.value.internalType)}break;default:R(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var t;return(t=this.underlyingTypeIfOptional())!=null?t:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new B({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default: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(t){return new this({type:"array",value:t})}static map(t,n){return new this({type:"map",keyType:t,valueType:n})}static typeDict(t,{multiline:n}={}){return new this({type:"typeDict",entries:t,multiline:n})}static union(t){let n=this.flattenUnionTypes(t),o=cn(n,ln);return new this({type:"union",types:o})}static flattenUnionTypes(t){let n=[];for(let o of t)o.internalType.type==="union"?n.push(...this.flattenUnionTypes(o.internalType.types)):n.push(o);return n}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static null(){return new this({type:"null"})}static reference(t){return new this({type:"reference",value:t})}static enumString(t){return new this({type:"enumString",value:t})}static literalString(t){return new this({type:"literal",value:z.string(t)})}static literalBoolean(t){return new this({type:"literal",value:z.boolean(t)})}static isAlreadyOptional(t){return t.internalType.type==="optional"}writeUnion({writer:t,unionTypes:n,comment:o}){let s=this.getUniqueTypes({types:n,comment:o,writer:t}),f=this.unwrapOptionalTypes(s),l=f.filter(c=>c.underlyingType().internalType.type==="mixed").length>0;if(l&&!o){t.write("mixed");return}if(f.length>0&&o){t.writeLine("("),f.forEach((c,m)=>{m>0?t.write(" * |"):t.write(" * "),l&&(c=c.underlyingType()),c.write(t,{comment:o}),t.writeLine(),m++}),t.write(" * )");return}f.forEach((c,m)=>{m>0&&t.write("|"),l&&(c=c.underlyingType()),c.write(t,{comment:o}),m++})}writeTypeDictEntry({writer:t,entry:n,comment:o}){t.write(n.key),n.optional&&t.write("?"),t.write(": "),n.valueType.write(t,{comment:o})}getUniqueTypes({writer:t,types:n,comment:o}){let s=cn(n,ln),f=new Set;return s.filter(l=>{let c=l.toString({namespace:t.namespace,rootNamespace:t.rootNamespace,customConfig:t.customConfig,comment:o});return f.has(c)?!1:(f.add(c),!0)})}unwrapOptionalTypes(t){let n=!1,o=t.map(s=>s.internalType.type==="optional"?(n=!0,s.internalType.value):s);return n&&o.push(r.null()),o}unionHasOptional(t){return t.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:t,rootNamespace:n,customConfig:o,comment:s}){let f=new re({namespace:t,rootNamespace:n,customConfig:o});return this.write(f,{comment:s!=null?s:!1}),f.toString()}},rc=new B({namespace:"",name:"DateTime"});i();a();function nc(r){return r.startsWith("$")?r.slice(1):r}var oc="values",He=class extends b{constructor({name:t,namespace:n,abstract:o,docs:s,parentClassReference:f,traits:l,constructorAccess:c}){super();d(this,"name");d(this,"namespace");d(this,"constructorAccess");d(this,"class_");this.name=t,this.namespace=n,this.constructorAccess=c!=null?c:"public",this.class_=new ye({name:t,namespace:n,abstract:o,docs:s,parentClassReference:f,traits:l})}addField(t){this.class_.addField(t)}addMethod(t){this.class_.addMethod(t)}addTrait(t){this.class_.addTrait(t)}write(t){let n=_e(this.class_.fields).map(o=>tt(et({},o),{name:nc(o.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:v.codeblock(o=>{for(let s of n)o.write(`$this->${s.name} = $${oc}['${s.name}']`),s.type.isOptional()&&o.write(" ?? null"),o.write(";")})}),this.class_.write(t)}allFieldsAreOptional(){return this.class_.fields.every(t=>t.type.isOptional())}getConstructorParameters({orderedFields:t}){return[new ge({name:oc,type:V.typeDict(t.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new q("[]"):void 0})]}};i();a();i();a();var ve=class extends b{constructor({name:t,access:n,parameters:o,throws:s,return_:f,body:l,docs:c,classReference:m,static_:h}){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=t,this.access=n,this.parameters=o,this.throws=s!=null?s:[],this.return_=f,this.body=l,this.docs=c,this.classReference=m,this.static_=h!=null?h:!1}write(t){var f;this.writeComment(t),t.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(l=>!l.type.isOptional()),o=this.parameters.filter(l=>l.type.isOptional());[...n,...o].forEach((l,c)=>{c>0&&t.write(", "),l.write(t)}),t.write("): "),this.return_!=null?t.writeNodeOrString(this.return_):t.write("void"),t.writeLine(" {"),t.indent(),(f=this.body)==null||f.write(t),t.dedent(),t.writeLine("}")}writeComment(t){let n=new M({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_!==Zl&&this.return_!==Ql&&n.addTag({tagType:"return",type:this.return_});for(let o of this.throws)n.addTag({tagType:"throws",type:V.reference(o)});t.writeNode(n)}};var Ye=class extends b{constructor({name:t,namespace:n,backing:o,docs:s,serializable:f}){super();d(this,"name");d(this,"namespace");d(this,"backing");d(this,"docs");d(this,"members",[]);d(this,"serializable");this.name=t,this.namespace=n,this.backing=o,this.docs=s,this.serializable=f!=null?f:!1}addMember(t){this.members.push(t)}write(t){this.writeComment(t),t.write("enum "),t.writeLine(`${this.name}`),this.backing!=null&&t.write(` : ${this.backing}`),this.serializable&&(t.addReference(new B({name:"JsonSerializable",namespace:""})),t.writeLine(" implements JsonSerializable")),t.writeLine(" {"),t.indent();for(let n of this.members)t.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?t.write(` = "${n.value}"`):t.write(` = ${n.value}`)),t.writeTextStatement("");this.serializable&&(t.newLine(),t.writeNode(new ve({name:"jsonSerialize",return_:V.string(),access:"public",parameters:[],body:new q("return $this->value;")}))),t.writeNewLineIfLastLineNot(),t.dedent(),t.writeLine("}")}writeComment(t){if(this.docs==null)return;new M({docs:this.docs}).write(t)}};i();a();var Ke=class extends b{constructor({name:t,type:n,access:o,readonly_:s,initializer:f,docs:l,inlineDocs:c,attributes:m,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=Fe(t),this.type=n,this.access=o,this.readonly_=s!=null?s:!1,this.initializer=f,this.docs=l,this.inlineDocs=c,this.attributes=m!=null?m:[],this.inherited=h!=null?h:!1}write(t){this.writeComment(t),this.writeAttributesIfPresent(t),t.write(`${this.access} `),this.readonly_&&t.write("readonly "),this.type.write(t),t.write(` ${this.name}`),this.initializer!=null&&(t.write(" = "),this.initializer.write(t)),t.write(";"),this.inlineDocs!=null&&t.write(` // ${this.inlineDocs}`),t.newLine()}writeComment(t){let n=new M;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(t)}writeAttributesIfPresent(t){this.attributes.length>0&&(t.write("#["),this.attributes.forEach((n,o)=>{o>0&&t.write(", "),n.write(t)}),t.writeLine("]"))}};i();a();var Je=class extends b{constructor({entries:t,multiline:n}){super();d(this,"entries");d(this,"multiline");this.entries=t!=null?t:[],this.multiline=n!=null?n:!1}write(t){if(this.multiline){this.writeMultiline(t);return}this.writeCompact(t)}writeMultiline(t){t.writeLine("["),t.indent();for(let{key:n,value:o}of this.entries)n.write(t),t.write(" => "),o.write(t),t.writeLine(",");t.dedent(),t.write("]")}writeCompact(t){t.write("[");for(let[n,{key:o,value:s}]of this.entries.entries())n>0&&t.write(", "),o.write(t),t.write(" => "),s.write(t);t.write("]")}};i();a();var Ze=class extends b{constructor({name:t,namespace:n,docs:o,traits:s}){super();d(this,"name");d(this,"namespace");d(this,"docs");d(this,"traits");d(this,"fields",[]);d(this,"methods",[]);this.name=t,this.namespace=n,this.docs=o,this.traits=s!=null?s:[]}addField(t){this.fields.push(t)}addMethod(t){this.methods.push(t)}write(t){this.writeComment(t),t.write(`trait ${this.name} `),t.newLine(),t.writeLine("{"),t.indent(),this.traits.length>0&&(t.write("use "),this.traits.forEach((n,o)=>{o>0&&t.write(","),t.writeNode(n)}),t.writeTextStatement(""),t.newLine()),this.writeFields({writer:t,fields:_e(this.fields)}),this.fields.length>0&&this.methods.length>0&&t.newLine(),this.writeMethods({writer:t,methods:_e(this.methods)}),t.dedent(),t.writeLine("}")}writeComment(t){let n=new M({docs:this.docs});for(let o of this.fields)n.addTag({tagType:"property",type:o.type,name:o.name});n.write(t)}writeFields({writer:t,fields:n}){n.forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}writeMethods({writer:t,methods:n}){n.forEach((o,s)=>{s>0&&t.newLine(),o.write(t),t.writeNewLineIfLastLineNot()})}};i();a();var dn=class extends b{constructor(t){super();d(this,"arrays");this.arrays=t}write(t){t.write("array_merge"),St({writer:t,arguments_:this.arrays.map(n=>Qe(o=>{if(typeof n=="string"||n instanceof b){o.writeNodeOrString(n);return}o.writeNodeOrString(n.ref),n.fallback&&(o.write(" ?? "),o.writeNodeOrString(n.fallback))}))})}};function Wb(r){return new ze(r)}function Gb(r){return new Ve(r)}function zb(r){return new ye(r)}function Vb(r){return new Ze(r)}function Hb(r){return new B(r)}function Qe(r){return new q(r)}function Yb(r){return new He(r)}function Kb(r){return new Ye(r)}function Jb(r){return new Ke(r)}function ic(r){return new ne(r)}function Zb(r){return new xe(r)}function Qb(r){return Qe(e=>{e.write("throw "),e.writeNode(ic(r))})}function Xb(r){return new Je(r)}function eA(r){return new ve(r)}function tA(r){return new ge(r)}function rA(r){return new Kt(r)}function nA(r,e){return Qe(t=>{t.writeNodeOrString(r),t.write(" = "),t.writeNodeOrString(e)})}function oA(r){return Qe(Fe(r))}function iA(r){return Qe(`"${r}"`)}function aA(...r){return new dn(r)}function sA(){return new q(r=>{r.write("$this")})}i();a();var mn=class{constructor({context:e}){d(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?v.TypeLiteral.null():(this.context.errors.add({severity:S.Critical,message:"Expected non-null value, but got null"}),v.TypeLiteral.nop());if(e.value===void 0)return v.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 t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?v.TypeLiteral.nop():this.convertNamed({named:t,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:R(e.typeReference)}}convertLiteral({literalType:e,value:t}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.string(n)}default:R(e)}}convertList({list:e,value:t}){return Array.isArray(t)?v.TypeLiteral.list({values:t.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:S.Critical,message:`Expected array but got: ${typeof t}`}),v.TypeLiteral.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:S.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),v.TypeLiteral.nop()):v.TypeLiteral.map({entries:Object.entries(t).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:t,as:n}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:t,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:t});case"enum":return this.convertEnum({enum_:e,value:t});case"object":return this.convertObject({object_:e,value:t});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t});default:R(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(n==null)return v.TypeLiteral.nop();let o=n.singleDiscriminatedUnionType,s=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});return s==null?v.TypeLiteral.nop():v.TypeLiteral.reference(v.codeblock(f=>{f.writeNode(v.invokeMethod({on:v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),method:this.context.getMethodName(o.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:o,unionProperties:s}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:t}){switch(t.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:t.typeId});if(n==null)return;let o=this.convertNamed({named:n,value:e.value});if(!o.isClass()){this.context.errors.add({severity:S.Critical,message:"Internal error; expected union value to be an object"});return}return o.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(t.discriminantValue.wireValue);let n=this.context.getRecord(e.value);return n==null?[{name:this.context.getPropertyName(t.discriminantValue.name),value:this.convert({typeReference:t.typeReference,value:e.value})}]:[{name:this.context.getPropertyName(t.discriminantValue.name),value:this.convert({typeReference:t.typeReference,value:n[t.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:R(t)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:e,unionVariant:t,unionProperties:n}){let o=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t});if(t.type==="singleProperty"&&this.context.getRecord(e.value)==null&&n.length===1)return[...o,this.convert({typeReference:t.typeReference,value:e.value})];if(t.type==="samePropertiesAsObject"){let s=this.context.resolveNamedType({typeId:t.typeId});return s==null?[]:[...o,v.TypeLiteral.class_({reference:v.classReference({name:this.context.getClassName(s.declaration.name),namespace:this.context.getTypesNamespace(s.declaration.fernFilepath)}),fields:n})]}return o}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t}){var o,s;return this.context.associateByWireValue({parameters:(o=t.properties)!=null?o:[],values:(s=this.context.getRecord(e.value))!=null?s:{},ignoreMissingParameters:!0}).map(f=>{this.context.errors.scope(f.name.wireValue);try{return this.convert(f)}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:t}){var o;let n=this.context.associateByWireValue({parameters:e.properties,values:(o=this.context.getRecord(t))!=null?o:{}});return v.TypeLiteral.class_({reference:v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),fields:n.map(s=>{this.context.errors.scope(s.name.wireValue);try{return{name:this.context.getPropertyName(s.name.name),value:this.convert(s)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.reference(v.codeblock(o=>{o.writeNode(v.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:t}){if(typeof t!="string"){this.context.errors.add({severity:S.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(o=>o.wireValue===t);if(n==null){this.context.errors.add({severity:S.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t});return n==null?v.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t}){for(let n of e.types)try{return this.convert({typeReference:n,value:t})}catch(o){continue}this.context.errors.add({severity:S.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof t}" value`})}convertUnknown({value:e}){return v.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let o=this.getValueAsNumber({value:t,as:n});return o==null?v.TypeLiteral.nop():v.TypeLiteral.number(o)}case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:t});return o==null?v.TypeLiteral.nop():v.TypeLiteral.float(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:t,as:n});return o==null?v.TypeLiteral.nop():v.TypeLiteral.boolean(o)}case"DATE":case"DATE_TIME":{let o=this.context.getValueAsString({value:t});return o==null?v.TypeLiteral.nop():v.TypeLiteral.datetime(o)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let o=this.context.getValueAsString({value:t});return o==null?v.TypeLiteral.nop():v.TypeLiteral.string(o)}default:R(e)}}getValueAsNumber({value:e,as:t}){let n=t==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:t}){let n=t==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};i();a();var hn=class{constructor({context:e}){d(this,"context");this.context=e}getFilePropertyInfo({body:e,value:t}){var s;let n={fileFields:[],bodyPropertyFields:[]},o=(s=this.context.getRecord(t))!=null?s:{};for(let f of e.properties)switch(f.type){case"file":n.fileFields.push({name:this.context.getPropertyName(f.name),value:this.getSingleFileProperty({property:f,record:o})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(f.name),value:this.getArrayFileProperty({property:f,record:o})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(f.name.name),value:this.getBodyProperty({property:f,record:o})});break;default:R(f)}return n}getSingleFileProperty({property:e,record:t}){let n=this.context.getSingleFileValue({property:e,record:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.file(n)}getArrayFileProperty({property:e,record:t}){let n=this.context.getFileArrayValues({property:e,record:t});return n==null?v.TypeLiteral.nop():v.TypeLiteral.list({values:n.map(o=>v.TypeLiteral.file(o))})}getBodyProperty({property:e,record:t}){let n=t[e.name.wireValue];return n==null?v.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var uA=["use","clone","list"],fA="Requests",pA="Types",yn=class r extends er{constructor({ir:t,config:n}){var o;super({ir:t,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");d(this,"rootNamespace");this.ir=t,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new mn({context:this}),this.filePropertyMapper=new hn({context:this}),this.rootNamespace=lA({organization:n.organization,namespaceOverride:(o=this.customConfig)==null?void 0:o.namespace})}clone(){return new r({ir:this.ir,config:this.config})}getParameterName(t){return this.prependUnderscoreIfNeeded(t.camelCase.unsafeName)}getPropertyName(t){return this.prependUnderscoreIfNeeded(t.camelCase.unsafeName)}getMethodName(t){let n=t.camelCase.unsafeName;return uA.includes(n)?n:t.camelCase.safeName}getClassName(t){return t.pascalCase.safeName}getRootClientClassName(){var t,n,o;return((t=this.customConfig)==null?void 0:t.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 v.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(t){return this.getNamespace(t,fA)}getTypesNamespace(t){return this.getNamespace(t,pA)}getNamespace(t,n){let o=t.allParts.map(s=>s.pascalCase.safeName);return o=n!=null?[...o,n]:o,[this.rootNamespace,...o].join("\\")}getEnvironmentClassAccessFromID(t){let n=this.resolveEnvironmentName(t);if(n!=null)return v.codeblock(o=>{o.writeNode(this.getEnvironmentClassReference(n)),o.write("::"),o.write(this.getClassName(n))})}getEnvironmentClassReference(t){return v.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(t){return/^[a-zA-Z_]/.test(t)?t:`_${t}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${wt(tn(this.config.organization))}`}};function lA({organization:r,namespaceOverride:e}){return e!=null?e:`${wt(tn(r))}`}i();a();var ac="$client",gn="Example",sc=`<?php
21
+ `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>uo(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
22
+ `)}};var w=class extends X{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:i,skipImports:o=!1}=t,u=new G({namespace:e,rootNamespace:n,customConfig:i});return this.write(u),u.toString(o)}async toStringAsync({namespace:t,rootNamespace:e,customConfig:n}){let i=new G({namespace:t,rootNamespace:e,customConfig:n});return this.write(i),i.toString()}};var Te=class extends w{constructor({entries:e}){super();c(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]")}};a();s();var be=class extends w{constructor(e){var n;super();c(this,"reference");c(this,"arguments");this.reference=e.reference,this.arguments=(n=e.arguments)!=null?n:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((n,i)=>{i>0&&e.write(","),typeof n=="string"?e.write(n):n.write(e)}),e.write(")"))}};a();s();a();s();var I=class extends w{constructor({name:e,namespace:n,generics:i}){super();c(this,"name");c(this,"namespace");c(this,"generics");c(this,"fullyQualified");this.name=e,this.namespace=n,this.generics=i,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${n}`)}};a();s();a();s();function me(r){return r.startsWith("$")?r:`$${r}`}var P=class extends w{constructor({docs:e}={}){super();c(this,"docs");c(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(Le(Ne({},e),{name:e.name!=null?me(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
23
+ `).forEach(n=>{e.writeLine(` * ${n}`)}),this.tags.length>0&&e.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:e,tag:n});e.writeLine(" */")}writeTag({writer:e,tag:n}){let i=n.docs!=null?n.docs.split(`
24
+ `):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};a();s();function de(r){return Sl(r,[ce.Public,ce.PublicReadonly,ce.Protected,ce.Private])}function Sl(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var ee=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:u,traits:l}){super();c(this,"name");c(this,"namespace");c(this,"abstract");c(this,"docs");c(this,"parentClassReference");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);c(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=u,this.traits=l!=null?l:[]}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 I({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:de(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:de(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new P({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var i;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((o,u)=>{u===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=n.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let i=new P;for(let o of n.parameters)i.addTag(o.getCommentTag());i.write(e)}writeFields({writer:e,fields:n}){n.filter(i=>!i.inherited).forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();a();s();function $e({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Nl({writer:r,arguments_:t});return}Ll({writer:r,arguments_:t})}function Nl({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)po({writer:r,argument:e,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function Ll({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),po({writer:r,argument:e,writeCompact:!0})}),r.write(")")}function po({writer:r,argument:t,writeCompact:e}){or(t)?(t.docs&&(e?r.write(`/* ${t.docs} */ `):r.writeLine(`/* ${t.docs} */`)),r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var z=class extends w{constructor({classReference:e,arguments_:n,multiline:i}){super();c(this,"classReference");c(this,"arguments_");c(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),$e({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};a();s();var N=class extends w{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new O(this.arg).write(e)}};a();s();a();s();var te=class extends w{constructor({name:e,type:n,docs:i,initializer:o,access:u,readonly_:l}){super();c(this,"name");c(this,"type");c(this,"docs");c(this,"initializer");c(this,"access");c(this,"readonly_");this.name=me(e),this.type=n,this.docs=i,this.initializer=o,this.access=u,this.readonly_=l!=null?l:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};a();s();a();s();a();s();a();s();var re=class extends w{constructor({method:e,arguments_:n,static_:i,multiline:o,on:u}){super();c(this,"method");c(this,"arguments_");c(this,"multiline");c(this,"static_");c(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=u}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),$e({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var M=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(_l({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(Pl({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
25
+ `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:A(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 z({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=Bl({values:n.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let i=Fl({entries:n.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.key.write(e),e.write(" => "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,u]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(u)),e.writeLine(",");e.dedent(),e.write("]")}};function Pl({writer:r,value:t}){return new z({classReference:new I({name:"DateTime",namespace:""}),arguments_:[new N(`'${t}'`)]})}function _l({writer:r,value:t}){return new re({on:new I({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new N(`"${t}"`)]})}function Fl({entries:r}){return r.filter(t=>!M.isNop(t.key)&&!M.isNop(t.value))}function Bl({values:r}){return r.filter(t=>!M.isNop(t))}var D=class r extends w{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(lo),e.write("DateTime");break;case"dateTime":e.addReference(lo),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(l=>!l.valueType.isOptional()),o=this.internalType.entries.filter(l=>l.valueType.isOptional()),u=[...i,...o];for(let l of u)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:l,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:n});break}case"optional":{let i=this.internalType.value.internalType,o=i.type==="mixed",u=i.type==="union";!u&&!o&&e.write("?"),this.internalType.value.write(e,{comment:n}),u&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(n){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((o,u)=>{u>0&&e.write(", "),o.write(e,{comment:n})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(n)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:A(this.internalType.value.internalType)}break;default:A(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new I({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:A(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){let n=this.flattenUnionTypes(e),i=Lt(n,Nt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let n=[];for(let i of e)i.internalType.type==="union"?n.push(...this.flattenUnionTypes(i.internalType.types)):n.push(i);return n}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:M.string(e)})}static literalBoolean(e){return new this({type:"literal",value:M.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:n,comment:i}){let o=this.getUniqueTypes({types:n,comment:i,writer:e}),u=this.unwrapOptionalTypes(o),l=u.filter(m=>m.underlyingType().internalType.type==="mixed").length>0;if(l&&!i){e.write("mixed");return}if(u.length>0&&i){e.writeLine("("),u.forEach((m,d)=>{d>0?e.write(" * |"):e.write(" * "),l&&(m=m.underlyingType()),m.write(e,{comment:i}),e.writeLine(),d++}),e.write(" * )");return}u.forEach((m,d)=>{d>0&&e.write("|"),l&&(m=m.underlyingType()),m.write(e,{comment:i}),d++})}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=Lt(n,Nt),u=new Set;return o.filter(l=>{let m=l.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return u.has(m)?!1:(u.add(m),!0)})}unwrapOptionalTypes(e){let n=!1,i=e.map(o=>o.internalType.type==="optional"?(n=!0,o.internalType.value):o);return n&&i.push(r.null()),i}unionHasOptional(e){return e.filter(n=>n.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:n,customConfig:i,comment:o}){let u=new G({namespace:e,rootNamespace:n,customConfig:i});return this.write(u,{comment:o!=null?o:!1}),u.toString()}},lo=new I({namespace:"",name:"DateTime"});a();s();function co(r){return r.startsWith("$")?r.slice(1):r}var mo="values",Ae=class extends w{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:u,traits:l,constructorAccess:m}){super();c(this,"name");c(this,"namespace");c(this,"constructorAccess");c(this,"class_");this.name=e,this.namespace=n,this.constructorAccess=m!=null?m:"public",this.class_=new ee({name:e,namespace:n,abstract:i,docs:o,parentClassReference:u,traits:l})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=de(this.class_.fields).map(i=>Le(Ne({},i),{name:co(i.name)}));n.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:n}),body:h.codeblock(i=>{for(let o of n)i.write(`$this->${o.name} = $${mo}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new te({name:mo,type:D.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new N("[]"):void 0})]}};a();s();a();s();var ne=class extends w{constructor({name:e,access:n,parameters:i,throws:o,return_:u,body:l,docs:m,classReference:d,static_:y}){super();c(this,"name");c(this,"access");c(this,"parameters");c(this,"throws");c(this,"return_");c(this,"body");c(this,"docs");c(this,"classReference");c(this,"static_");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=u,this.body=l,this.docs=m,this.classReference=d,this.static_=y!=null?y:!1}write(e){var u;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let n=this.parameters.filter(l=>!l.type.isOptional()),i=this.parameters.filter(l=>l.type.isOptional());[...n,...i].forEach((l,m)=>{m>0&&e.write(", "),l.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 P({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==oo&&this.return_!==ao&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:D.reference(i)});e.writeNode(n)}};var Ee=class extends w{constructor({name:e,namespace:n,backing:i,docs:o,serializable:u}){super();c(this,"name");c(this,"namespace");c(this,"backing");c(this,"docs");c(this,"members",[]);c(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=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 I({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members){if(e.write(`case ${n.name}`),n.value!=null)if(typeof n.value=="string"){let i=ar(n.value);e.write(` = "${i}"`)}else e.write(` = ${n.value}`);e.writeTextStatement("")}this.serializable&&(e.newLine(),e.writeNode(new ne({name:"jsonSerialize",return_:D.string(),access:"public",parameters:[],body:new N("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new P({docs:this.docs}).write(e)}};a();s();var Re=class extends w{constructor({name:e,type:n,access:i,readonly_:o,initializer:u,docs:l,inlineDocs:m,attributes:d,inherited:y}){super();c(this,"name");c(this,"type");c(this,"access");c(this,"readonly_");c(this,"initializer");c(this,"docs");c(this,"inlineDocs");c(this,"attributes");c(this,"inherited");this.name=me(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=u,this.docs=l,this.inlineDocs=m,this.attributes=d!=null?d:[],this.inherited=y!=null?y:!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 P;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};a();s();var Ce=class extends w{constructor({entries:e,multiline:n}){super();c(this,"entries");c(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};a();s();var Ie=class extends w{constructor({name:e,namespace:n,docs:i,traits:o}){super();c(this,"name");c(this,"namespace");c(this,"docs");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:de(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:de(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let n=new P({docs:this.docs});for(let i of this.fields)n.addTag({tagType:"property",type:i.type,name:i.name});n.write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};a();s();var Ft=class extends w{constructor(e){super();c(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),$e({writer:e,arguments_:this.arrays.map(n=>Se(i=>{if(typeof n=="string"||n instanceof w){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function kl(r){return new Te(r)}function Ul(r){return new be(r)}function Ol(r){return new ee(r)}function Ml(r){return new Ie(r)}function Dl(r){return new I(r)}function Se(r){return new N(r)}function $l(r){return new Ae(r)}function jl(r){return new Ee(r)}function ql(r){return new Re(r)}function ho(r){return new z(r)}function Wl(r){return new re(r)}function Vl(r){return Se(t=>{t.write("throw "),t.writeNode(ho(r))})}function Gl(r){return new Ce(r)}function zl(r){return new ne(r)}function Hl(r){return new te(r)}function Yl(r){return new He(r)}function Kl(r,t){return Se(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function Jl(r){return Se(me(r))}function Zl(r){return Se(`"${r}"`)}function Ql(...r){return new Ft(r)}function ar(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\$/g,"\\$")}function Xl(){return new N(r=>{r.write("$this")})}a();s();function sr(r){return so.has(r.toLowerCase())?`${r}_`:r}a();s();var Bt=class{constructor({context:t}){c(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?h.TypeLiteral.null():(this.context.errors.add({severity:v.Critical,message:"Expected non-null value, but got null"}),h.TypeLiteral.nop());if(t.value===void 0)return h.TypeLiteral.nop();switch(t.typeReference.type){case"list":case"set":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?h.TypeLiteral.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"unknown":return this.convertUnknown({value:t.value});default:A(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?h.TypeLiteral.nop():h.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?h.TypeLiteral.nop():h.TypeLiteral.string(n)}default:A(t)}}convertList({list:t,value:e}){return Array.isArray(e)?h.TypeLiteral.list({values:e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:v.Critical,message:`Expected array but got: ${typeof e}`}),h.TypeLiteral.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:v.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),h.TypeLiteral.nop()):h.TypeLiteral.map({entries:Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:A(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return h.TypeLiteral.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});return o==null?h.TypeLiteral.nop():h.TypeLiteral.reference(h.codeblock(u=>{u.writeNode(h.invokeMethod({on:h.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),method:this.context.getMethodName(i.discriminantValue.name),arguments_:this.convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:n,unionVariant:i,unionProperties:o}),static_:!0}))}))}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){switch(e.type){case"samePropertiesAsObject":{let n=this.context.resolveNamedType({typeId:e.typeId});if(n==null)return;let i=this.convertNamed({named:n,value:t.value});if(!i.isClass()){this.context.errors.add({severity:v.Critical,message:"Internal error; expected union value to be an object"});return}return i.asClassOrThrow().fields}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let n=this.context.getRecord(t.value);return n==null?[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:t.value})}]:[{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:n[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return[];default:A(e)}}convertDiscriminatedUnionVariantArgs({discriminatedUnionTypeInstance:t,unionVariant:e,unionProperties:n}){let i=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});if(e.type==="singleProperty"&&this.context.getRecord(t.value)==null&&n.length===1)return[...i,this.convert({typeReference:e.typeReference,value:t.value})];if(e.type==="samePropertiesAsObject"){let o=this.context.resolveNamedType({typeId:e.typeId});return o==null?[]:[...i,h.TypeLiteral.class_({reference:h.classReference({name:this.context.getClassName(o.declaration.name),namespace:this.context.getTypesNamespace(o.declaration.fernFilepath)}),fields:n})]}return i}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(u=>{this.context.errors.scope(u.name.wireValue);try{return this.convert(u)}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return h.TypeLiteral.class_({reference:h.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)}),fields:n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:t,value:e}){let n=this.getEnumValueName({enum_:t,value:e});return n==null?h.TypeLiteral.nop():h.TypeLiteral.reference(h.codeblock(i=>{i.writeNode(h.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getTypesNamespace(t.declaration.fernFilepath)})),i.write("::"),i.write(n),i.write("->value")}))}getEnumValueName({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:v.Critical,message:`Expected enum value string, got: ${typeof e}`});return}let n=t.values.find(i=>i.wireValue===e);if(n==null){this.context.errors.add({severity:v.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?h.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:v.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertUnknown({value:t}){return h.TypeLiteral.unknown(t)}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?h.TypeLiteral.nop():h.TypeLiteral.number(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?h.TypeLiteral.nop():h.TypeLiteral.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?h.TypeLiteral.nop():h.TypeLiteral.boolean(i)}case"DATE":case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?h.TypeLiteral.nop():h.TypeLiteral.datetime(i)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?h.TypeLiteral.nop():h.TypeLiteral.string(i)}default:A(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};a();s();var kt=class{constructor({context:t}){c(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let u of t.properties)switch(u.type){case"file":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getSingleFileProperty({property:u,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getPropertyName(u.name),value:this.getArrayFileProperty({property:u,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:this.getBodyProperty({property:u,record:i})});break;default:A(u)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?h.TypeLiteral.nop():h.TypeLiteral.file(n)}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return n==null?h.TypeLiteral.nop():h.TypeLiteral.list({values:n.map(i=>h.TypeLiteral.file(i))})}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?h.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var ec=["use","clone","list"],tc="Requests",rc="Types",Ut=class r extends Qe{constructor({ir:e,config:n}){var i;super({ir:e,config:n});c(this,"ir");c(this,"customConfig");c(this,"dynamicTypeLiteralMapper");c(this,"filePropertyMapper");c(this,"rootNamespace");this.ir=e,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeLiteralMapper=new Bt({context:this}),this.filePropertyMapper=new kt({context:this}),this.rootNamespace=nc({organization:n.organization,namespaceOverride:(i=this.customConfig)==null?void 0:i.namespace})}clone(){return new r({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 ec.includes(n)?n:e.camelCase.safeName}getClassName(e){return sr(e.pascalCase.safeName)}getRootClientClassName(){var e,n,i;return((e=this.customConfig)==null?void 0:e.clientName)!=null?this.customConfig.clientName:((n=this.customConfig)==null?void 0:n["client-class-name"])!=null?(i=this.customConfig)==null?void 0:i["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return h.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(e){return this.getNamespace(e,tc)}getTypesNamespace(e){return this.getNamespace(e,rc)}getNamespace(e,n){let i=e.allParts.map(o=>o.pascalCase.safeName);return i=n!=null?[...i,n]:i,[this.rootNamespace,...i].join("\\")}getEnvironmentClassAccessFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return h.codeblock(i=>{i.writeNode(this.getEnvironmentClassReference(n)),i.write("::"),i.write(this.getClassName(n))})}getEnvironmentClassReference(e){return h.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(e){return/^[a-zA-Z_]/.test(e)?e:`_${e}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${Ue(vt(this.config.organization))}`}};function nc({organization:r,namespaceOverride:t}){return t!=null?t:`${Ue(vt(r))}`}a();s();var yo="$client",Ot="Example",xo=`<?php
31
26
 
32
- `,xn=class{constructor({context:e}){d(this,"context");this.context=e}async generateSnippet({endpoint:e,request:t}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:t});return sc+await n.toStringAsync({namespace:gn,rootNamespace:gn,customConfig:(o=this.context.customConfig)!=null?o:{}})}generateSnippetSync({endpoint:e,request:t}){var o;let n=this.buildCodeBlock({endpoint:e,snippet:t});return sc+n.toString({namespace:gn,rootNamespace:gn,customConfig:(o=this.context.customConfig)!=null?o:{}})}buildCodeBlock({endpoint:e,snippet:t}){return v.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),n.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))})}constructClient({endpoint:e,snippet:t}){return v.codeblock(n=>{n.write(`${ac} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:e,snippet:t})))})}callMethod({endpoint:e,snippet:t}){return v.invokeMethod({on:v.codeblock(ac),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:t}),multiline:!0})}getConstructorArgs({endpoint:e,snippet:t}){let n=[];e.auth!=null&&(t.auth!=null?n.push(...this.getConstructorAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:S.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let o=[],s=this.getConstructorBaseUrlArgs({baseUrl:t.baseURL,environment:t.environment});return s.length>0&&o.push(...s),this.context.errors.scope(te.Headers),this.context.ir.headers!=null&&t.headers!=null&&o.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),o.length===0?n:[...n,{name:"options",assignment:v.TypeLiteral.map({entries:o.map(f=>({key:v.TypeLiteral.string(f.name),value:f.value}))})}]}getConstructorAuthArgs({auth:e,values:t}){if(t.type!==e.type)return this.addError(this.context.newAuthMismatchError({auth:e,values:t}).message),[];switch(e.type){case"basic":return t.type==="basic"?this.getConstructorBasicAuthArgs({auth:e,values:t}):[];case"bearer":return t.type==="bearer"?this.getConstructorBearerAuthArgs({auth:e,values:t}):[];case"header":return t.type==="header"?this.getConstructorHeaderAuthArgs({auth:e,values:t}):[];case"oauth":return this.addWarning("The PHP SDK doesn't support OAuth client credentials yet"),[];case"inferred":return this.addWarning("The PHP SDK Generator does not support Inferred auth scheme yet"),[];default:R(e)}}addError(e){this.context.errors.add({severity:S.Critical,message:e})}addWarning(e){this.context.errors.add({severity:S.Warning,message:e})}getConstructorBasicAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.username),assignment:v.TypeLiteral.string(t.username)},{name:this.context.getPropertyName(e.password),assignment:v.TypeLiteral.string(t.password)}]}getConstructorBaseUrlArgs({baseUrl:e,environment:t}){let n=this.getBaseUrlArg({baseUrl:e,environment:t});return v.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:e,environment:t}){if(e!=null&&t!=null)return this.context.errors.add({severity:S.Critical,message:"Cannot specify both baseUrl and environment options"}),v.TypeLiteral.nop();if(e!=null)return v.TypeLiteral.string(e);if(t!=null){if(this.context.isSingleEnvironmentID(t)){let n=this.context.getEnvironmentClassAccessFromID(t);return n==null?(this.context.errors.add({severity:S.Warning,message:`Environment ${JSON.stringify(t)} was not found`}),v.TypeLiteral.nop()):v.TypeLiteral.reference(v.codeblock(o=>{o.writeNode(n),o.write("->value")}))}this.context.isMultiEnvironmentValues(t)&&this.context.errors.add({severity:S.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return v.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.token),assignment:v.TypeLiteral.string(t.token)}]}getConstructorHeaderAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:t.value})}]}getConstructorHeaderArgs({headers:e,values:t}){let n=[];for(let o of e){let s=this.getConstructorHeaderArg({header:o,value:t.value});s!=null&&n.push({name:this.context.getPropertyName(o.name.name),value:s})}return n}getConstructorHeaderArg({header:e,value:t}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:t});if(!v.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:t});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:R(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){var s,f;let n=[];this.context.errors.scope(te.PathParameters);let o=[...(s=this.context.ir.pathParameters)!=null?s:[],...(f=e.pathParameters)!=null?f:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:t}).map(l=>l.value)),this.context.errors.unscope(),this.context.errors.scope(te.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:t.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:R(e)}}getBytesBodyRequestArg({value:e}){return this.context.errors.add({severity:S.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),v.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:e,snippet:t}){var c,m,h,y;let n=[],o=(m=(c=this.context.customConfig)==null?void 0:c.inlinePathParameters)!=null?m:!1;this.context.errors.scope(te.PathParameters);let s=[],f=[...(h=this.context.ir.pathParameters)!=null?h:[],...(y=e.pathParameters)!=null?y:[]];f.length>0&&s.push(...this.getPathParameters({namedParameters:f,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(te.RequestBody);let l=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})||n.push(...s.map(g=>g.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:o,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:o})?s:[],filePropertyInfo:l})),n}getFilePropertyInfo({request:e,snippet:t}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:t.requestBody})}getInlinedRequestArg({request:e,snippet:t,pathParameterFields:n,filePropertyInfo:o}){var h,y,g,w;this.context.errors.scope(te.QueryParameters);let f=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(y=t.queryParameters)!=null?y:{}}).map(A=>({name:this.context.getPropertyName(A.name.name),value:this.context.dynamicTypeLiteralMapper.convert(A)}));this.context.errors.unscope(),this.context.errors.scope(te.Headers);let c=this.context.associateByWireValue({parameters:(g=e.headers)!=null?g:[],values:(w=t.headers)!=null?w:{}}).map(A=>({name:this.context.getPropertyName(A.name.name),value:this.context.dynamicTypeLiteralMapper.convert(A)}));this.context.errors.unscope(),this.context.errors.scope(te.RequestBody);let m=e.body!=null?this.getInlinedRequestBodyConstructorFields({body:e.body,value:t.requestBody,filePropertyInfo:o}):[];return this.context.errors.unscope(),v.TypeLiteral.class_({reference:v.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getRequestNamespace(e.declaration.fernFilepath)}),fields:[...n,...f,...c,...m]})}getInlinedRequestBodyConstructorFields({body:e,value:t,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:R(e)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:e}){return[...e.fileFields,...e.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:e,value:t}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:R(e)}}getInlinedRequestBodyPropertyConstructorFields({parameters:e,value:t}){var s;let n=[],o=this.context.associateByWireValue({parameters:e,values:(s=this.context.getRecord(t))!=null?s:{}});for(let f of o)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getPathParameters({namedParameters:e,snippet:t}){var s;let n=[],o=this.context.associateByWireValue({parameters:e,values:(s=t.pathParameters)!=null?s:{}});for(let f of o)n.push({name:this.context.getPropertyName(f.name.name),value:this.context.dynamicTypeLiteralMapper.convert(f)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>this.context.getPropertyName(t)).join("->")}->${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientClassInstantiation(e){return v.instantiateClass({classReference:v.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:e,multiline:!0})}};var vn=class extends Zt{constructor({ir:e,config:t}){super(new yn({ir:e,config:t}))}async generate(e){return super.generate(e)}generateSync(e){return super.generateSync(e)}createSnippetGenerator(e){return new xn({context:e})}};0&&(module.exports={DynamicSnippetsGenerator});
27
+ `,Mt=class{constructor({context:t}){c(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){var i;let n=this.buildCodeBlock({endpoint:t,snippet:e});return xo+await n.toStringAsync({namespace:Ot,rootNamespace:Ot,customConfig:(i=this.context.customConfig)!=null?i:{}})}generateSnippetSync({endpoint:t,request:e}){var i;let n=this.buildCodeBlock({endpoint:t,snippet:e});return xo+n.toString({namespace:Ot,rootNamespace:Ot,customConfig:(i=this.context.customConfig)!=null?i:{}})}buildCodeBlock({endpoint:t,snippet:e}){return h.codeblock(n=>{n.writeNodeStatement(this.constructClient({endpoint:t,snippet:e})),n.writeNodeStatement(this.callMethod({endpoint:t,snippet:e}))})}constructClient({endpoint:t,snippet:e}){return h.codeblock(n=>{n.write(`${yo} = `),n.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:t,snippet:e})))})}callMethod({endpoint:t,snippet:e}){return h.invokeMethod({on:h.codeblock(yo),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}),multiline:!0})}getConstructorArgs({endpoint:t,snippet:e}){var m;let n=[];t.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:v.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`}));let i=((m=this.context.ir.environments)==null?void 0:m.environments.type)==="multipleBaseUrls",o=this.getConstructorEnvironmentArg({environment:e.environment,hasMultiUrlEnvironments:i}),u=[];if(!i){let d=this.getConstructorBaseUrlArgs({baseUrl:e.baseURL,environment:e.environment});d.length>0&&u.push(...d)}this.context.errors.scope(V.Headers),this.context.ir.headers!=null&&e.headers!=null&&u.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope();let l=[...n];return o!=null&&l.push(o),u.length>0&&l.push({name:"options",assignment:h.TypeLiteral.map({entries:u.map(d=>({key:h.TypeLiteral.string(d.name),value:d.value}))})}),l}getConstructorAuthArgs({auth:t,values:e}){if(e.type!==t.type)return this.addError(this.context.newAuthMismatchError({auth:t,values:e}).message),[];switch(t.type){case"basic":return e.type==="basic"?this.getConstructorBasicAuthArgs({auth:t,values:e}):[];case"bearer":return e.type==="bearer"?this.getConstructorBearerAuthArgs({auth:t,values:e}):[];case"header":return e.type==="header"?this.getConstructorHeaderAuthArgs({auth:t,values:e}):[];case"oauth":return e.type==="oauth"?this.getConstructorOAuthArgs({auth:t,values:e}):[];case"inferred":return this.addWarning("The PHP SDK Generator does not support Inferred auth scheme yet"),[];default:A(t)}}addError(t){this.context.errors.add({severity:v.Critical,message:t})}addWarning(t){this.context.errors.add({severity:v.Warning,message:t})}getConstructorBasicAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),assignment:h.TypeLiteral.string(e.username)},{name:this.context.getPropertyName(t.password),assignment:h.TypeLiteral.string(e.password)}]}getConstructorEnvironmentArg({environment:t,hasMultiUrlEnvironments:e}){if(!e)return;let n=this.context.getEnvironmentsClassReference();if(t!=null){if(this.context.isSingleEnvironmentID(t)){let o=this.context.resolveEnvironmentName(t);if(o==null){this.addWarning(`Environment "${t}" was not found`);return}let u=this.context.getClassName(o);return{name:"environment",assignment:h.TypeLiteral.reference(h.codeblock(l=>{l.writeNode(n),l.write("::"),l.write(u),l.write("()")}))}}if(this.context.isMultiEnvironmentValues(t)){let o=this.resolveMultiEnvironmentName(t);if(o==null){this.addWarning("Invalid multi url environment");return}return o.type==="named"?{name:"environment",assignment:h.TypeLiteral.reference(h.codeblock(u=>{u.writeNode(n),u.write("::"),u.write(o.name),u.write("()")}))}:{name:"environment",assignment:h.TypeLiteral.reference(h.codeblock(u=>{u.writeNode(n),u.write("::custom(");let l=Object.entries(o.urls);l.forEach(([m,d],y)=>{u.write(`${m}: '${d}'`),y<l.length-1&&u.write(", ")}),u.write(")")}))}}}let i=this.getDefaultEnvironmentName();if(i!=null)return{name:"environment",assignment:h.TypeLiteral.reference(h.codeblock(o=>{o.writeNode(n),o.write("::"),o.write(i),o.write("()")}))}}getDefaultEnvironmentName(){var i;if(((i=this.context.ir.environments)==null?void 0:i.environments.type)!=="multipleBaseUrls")return;let t=this.context.ir.environments.environments;if(t.type!=="multipleBaseUrls")return;let e=t.environments;if(e.length===0)return;for(let o of e){let u=this.context.getClassName(o.name);if(u==="Production")return u}let n=e[0];if(n!=null)return this.context.getClassName(n.name)}resolveMultiEnvironmentName(t){let e=Object.keys(t);if(e.length===0)return;let n=e[0];if(n==null)return;let i=t[n];if(i==null)return;if(this.context.isSingleEnvironmentID(i)){let l=this.context.resolveEnvironmentName(i);if(l==null)return;if(e.every(d=>{let y=t[d];return y!=null&&this.context.isSingleEnvironmentID(y)&&y===i}))return{type:"named",name:this.context.getClassName(l)}}let o={},u=!1;for(let l of e){let m=t[l];if(m!=null&&!this.context.isSingleEnvironmentID(m)){u=!0;let d=this.getBaseUrlPropertyName(l);o[d]=m}}if(u&&Object.keys(o).length>0)return{type:"custom",urls:o}}getBaseUrlPropertyName(t){var i;if(((i=this.context.ir.environments)==null?void 0:i.environments.type)!=="multipleBaseUrls")return t;let e=this.context.ir.environments.environments;if(e.type!=="multipleBaseUrls")return t;let n=e.baseUrls.find(o=>o.id===t);return n==null?t:n.name.camelCase.safeName}getConstructorBaseUrlArgs({baseUrl:t,environment:e}){let n=this.getBaseUrlArg({baseUrl:t,environment:e});return h.TypeLiteral.isNop(n)?[]:[{name:"baseUrl",value:n}]}getBaseUrlArg({baseUrl:t,environment:e}){var n;if(t!=null&&e!=null)return this.context.errors.add({severity:v.Critical,message:"Cannot specify both baseUrl and environment options"}),h.TypeLiteral.nop();if(t!=null)return h.TypeLiteral.string(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let i=this.context.getEnvironmentClassAccessFromID(e);return i==null?(this.context.errors.add({severity:v.Warning,message:`Environment ${JSON.stringify(e)} was not found`}),h.TypeLiteral.nop()):h.TypeLiteral.reference(h.codeblock(o=>{o.writeNode(i),o.write("->value")}))}if(((n=this.context.ir.environments)==null?void 0:n.environments.type)==="multipleBaseUrls")return h.TypeLiteral.nop()}return h.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),assignment:h.TypeLiteral.string(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),assignment:h.TypeLiteral.string(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),assignment:h.TypeLiteral.string(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push({name:this.context.getPropertyName(i.name.name),value:o})}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!h.TypeLiteral.isNop(n))return n}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:A(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,u;let n=[];this.context.errors.scope(V.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(u=t.pathParameters)!=null?u:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e}).map(l=>l.value)),this.context.errors.unscope(),this.context.errors.scope(V.RequestBody),t.body!=null&&n.push(this.getBodyRequestArg({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e});default:A(t)}}getBytesBodyRequestArg({value:t}){return this.context.errors.add({severity:v.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),h.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:t,snippet:e}){var m,d,y,x;let n=[],i=(d=(m=this.context.customConfig)==null?void 0:m.inlinePathParameters)!=null?d:!1;this.context.errors.scope(V.PathParameters);let o=[],u=[...(y=this.context.ir.pathParameters)!=null?y:[],...(x=t.pathParameters)!=null?x:[]];u.length>0&&o.push(...this.getPathParameters({namedParameters:u,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(V.RequestBody);let l=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o.map(g=>g.value)),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(this.getInlinedRequestArg({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:l})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArg({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var y,x,g,T;this.context.errors.scope(V.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(y=t.queryParameters)!=null?y:[],values:(x=e.queryParameters)!=null?x:{}}).map(b=>({name:this.context.getPropertyName(b.name.name),value:this.context.dynamicTypeLiteralMapper.convert(b)}));this.context.errors.unscope(),this.context.errors.scope(V.Headers);let m=this.context.associateByWireValue({parameters:(g=t.headers)!=null?g:[],values:(T=e.headers)!=null?T:{}}).map(b=>({name:this.context.getPropertyName(b.name.name),value:this.context.dynamicTypeLiteralMapper.convert(b)}));this.context.errors.unscope(),this.context.errors.scope(V.RequestBody);let d=t.body!=null?this.getInlinedRequestBodyConstructorFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),h.TypeLiteral.class_({reference:h.classReference({name:this.context.getClassName(t.declaration.name),namespace:this.context.getRequestNamespace(t.declaration.fernFilepath)}),fields:[...n,...u,...m,...d]})}getInlinedRequestBodyConstructorFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:t.value,value:e});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:t,value:e})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:n});default:A(t)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:t,value:e}){return{name:this.context.getPropertyName(t.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:t.bodyType,value:e})}}getReferencedRequestBodyPropertyTypeLiteral({body:t,value:e}){switch(t.type){case"bytes":return this.getBytesBodyRequestArg({value:e});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:t.value,value:e});default:A(t)}}getInlinedRequestBodyPropertyConstructorFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{}});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getPropertyName(e)).join("->")}->${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getRootClientClassInstantiation(t){return h.instantiateClass({classReference:h.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:t,multiline:!0})}};var Dt=class extends Ke{constructor({ir:t,config:e}){super(new Ut({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}createSnippetGenerator(t){return new Mt({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
33
28
  /*! Bundled license information:
34
29
 
35
30
  @esbuild-plugins/node-globals-polyfill/Buffer.js: