@fern-api/go-dynamic-snippets 0.0.14 → 0.0.15

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 (45) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +6 -6
  2. package/cjs/DynamicSnippetsGenerator.d.cts +4 -2
  3. package/cjs/{DynamicSnippetsGeneratorContext-lz2pTZw3.d.cts → DynamicSnippetsGeneratorContext-CpOvS1wA.d.cts} +2 -1
  4. package/cjs/EndpointSnippetGenerator.cjs +6 -6
  5. package/cjs/EndpointSnippetGenerator.d.cts +1 -1
  6. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +6 -6
  7. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  8. package/cjs/context/DynamicTypeInstantiationMapper.cjs +6 -6
  9. package/cjs/context/DynamicTypeInstantiationMapper.d.cts +1 -1
  10. package/cjs/context/DynamicTypeMapper.cjs +6 -6
  11. package/cjs/context/DynamicTypeMapper.d.cts +1 -1
  12. package/cjs/context/FilePropertyMapper.cjs +6 -6
  13. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  14. package/cjs/index.cjs +16 -16
  15. package/cjs/index.d.cts +2 -1
  16. package/esm/DynamicSnippetsGenerator.d.ts +4 -2
  17. package/esm/DynamicSnippetsGenerator.js +1 -1
  18. package/esm/{DynamicSnippetsGeneratorContext-lz2pTZw3.d.ts → DynamicSnippetsGeneratorContext-CpOvS1wA.d.ts} +2 -1
  19. package/esm/EndpointSnippetGenerator.d.ts +1 -1
  20. package/esm/EndpointSnippetGenerator.js +1 -1
  21. package/esm/{chunk-I3VUX77R.js → chunk-55JFNSPF.js} +1 -1
  22. package/esm/chunk-EQTG6W6V.js +1 -0
  23. package/esm/chunk-H7X5SHRQ.js +1 -0
  24. package/esm/chunk-IYOA724T.js +1 -0
  25. package/esm/chunk-LZIEHSJ7.js +1 -0
  26. package/esm/{chunk-D3UUM672.js → chunk-RX5QSNXP.js} +1 -1
  27. package/esm/chunk-SX53R7DQ.js +1 -0
  28. package/esm/chunk-XL5OWIY6.js +29 -0
  29. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  30. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  31. package/esm/context/DynamicTypeInstantiationMapper.d.ts +1 -1
  32. package/esm/context/DynamicTypeInstantiationMapper.js +1 -1
  33. package/esm/context/DynamicTypeMapper.d.ts +1 -1
  34. package/esm/context/DynamicTypeMapper.js +1 -1
  35. package/esm/context/FilePropertyMapper.d.ts +1 -1
  36. package/esm/context/FilePropertyMapper.js +1 -1
  37. package/esm/index.d.ts +2 -1
  38. package/esm/index.js +10 -10
  39. package/package.json +1 -1
  40. package/esm/chunk-5HP3T45N.js +0 -1
  41. package/esm/chunk-J745U74Q.js +0 -1
  42. package/esm/chunk-SS6XZXHU.js +0 -1
  43. package/esm/chunk-TUE3DOHS.js +0 -29
  44. package/esm/chunk-X7QP3WH3.js +0 -1
  45. package/esm/chunk-YAGEU3HO.js +0 -1
package/cjs/index.cjs CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";var Ls=Object.create;var We=Object.defineProperty,Gs=Object.defineProperties,Ws=Object.getOwnPropertyDescriptor,Vs=Object.getOwnPropertyDescriptors,Ys=Object.getOwnPropertyNames,vt=Object.getOwnPropertySymbols,js=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable;var yr=(r,e,t)=>e in r?We(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,$n=(r,e)=>{for(var t in e||(e={}))hr.call(e,t)&&yr(r,t,e[t]);if(vt)for(var t of vt(e))Bn.call(e,t)&&yr(r,t,e[t]);return r},Cn=(r,e)=>Gs(r,Vs(e));var _n=r=>typeof r=="symbol"?r:r+"",qn=(r,e)=>{var t={};for(var n in r)hr.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&vt)for(var n of vt(r))e.indexOf(n)<0&&Bn.call(r,n)&&(t[n]=r[n]);return t};var Pe=(r,e)=>()=>(r&&(e=r(r=0)),e);var v=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),dr=(r,e)=>{for(var t in e)We(r,t,{get:e[t],enumerable:!0})},kn=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ys(e))!hr.call(r,i)&&i!==t&&We(r,i,{get:()=>e[i],enumerable:!(n=Ws(e,i))||n.enumerable});return r};var zs=(r,e,t)=>(t=r!=null?Ls(js(r)):{},kn(e||!r||!r.__esModule?We(t,"default",{value:r,enumerable:!0}):t,r)),Mn=r=>kn(We({},"__esModule",{value:!0}),r);var h=(r,e,t)=>yr(r,typeof e!="symbol"?e+"":e,t);function Ln(){throw new Error("setTimeout has not been defined")}function Gn(){throw new Error("clearTimeout has not been defined")}function Wn(r){if(ne===setTimeout)return setTimeout(r,0);if((ne===Ln||!ne)&&setTimeout)return ne=setTimeout,setTimeout(r,0);try{return ne(r,0)}catch(e){try{return ne.call(null,r,0)}catch(t){return ne.call(this,r,0)}}}function Hs(r){if(ie===clearTimeout)return clearTimeout(r);if((ie===Gn||!ie)&&clearTimeout)return ie=clearTimeout,clearTimeout(r);try{return ie(r)}catch(e){try{return ie.call(null,r)}catch(t){return ie.call(this,r)}}}function Js(){!Ne||!le||(Ne=!1,le.length?J=le.concat(J):wt=-1,J.length&&Vn())}function Vn(){if(!Ne){var r=Wn(Js);Ne=!0;for(var e=J.length;e;){for(le=J,J=[];++wt<e;)le&&le[wt].run();wt=-1,e=J.length}le=null,Ne=!1,Hs(r)}}function Ks(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];J.push(new Yn(r,e)),J.length===1&&!Ne&&Wn(Vn)}function Yn(r,e){this.fun=r,this.array=e}function fe(){}function yu(r){throw new Error("process.binding is not supported")}function hu(){return"/"}function du(r){throw new Error("process.chdir is not supported")}function mu(){return 0}function vu(r){var e=gu.call(Fe)*.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 xu(){var r=new Date,e=r-wu;return e/1e3}var ne,ie,J,Ne,le,wt,Qs,Xs,Zs,eu,tu,ru,nu,iu,ou,au,su,uu,cu,pu,lu,fu,Fe,gu,wu,y,Dn,s=Pe(()=>{"use strict";ne=Ln,ie=Gn;typeof globalThis.setTimeout=="function"&&(ne=setTimeout);typeof globalThis.clearTimeout=="function"&&(ie=clearTimeout);J=[],Ne=!1,wt=-1;Yn.prototype.run=function(){this.fun.apply(null,this.array)};Qs="browser",Xs="browser",Zs=!0,eu={},tu=[],ru="",nu={},iu={},ou={};au=fe,su=fe,uu=fe,cu=fe,pu=fe,lu=fe,fu=fe;Fe=globalThis.performance||{},gu=Fe.now||Fe.mozNow||Fe.msNow||Fe.oNow||Fe.webkitNow||function(){return new Date().getTime()};wu=new Date;y={nextTick:Ks,title:Qs,browser:Zs,env:eu,argv:tu,version:ru,versions:nu,on:au,addListener:su,once:uu,off:cu,removeListener:pu,removeAllListeners:lu,emit:fu,binding:yu,cwd:hu,chdir:du,umask:mu,hrtime:vu,platform:Xs,release:iu,config:ou,uptime:xu},Dn={};Object.keys(Dn).forEach(r=>{let e=r.split("."),t=y;for(let n=0;n<e.length;n++){let i=e[n];n===e.length-1?t[i]=Dn[r]:t=t[i]||(t[i]={})}})});function Jn(){gr=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)L[e]=r[e],_[r.charCodeAt(e)]=e;_[45]=62,_[95]=63}function Iu(r){gr||Jn();var e,t,n,i,o,a,p=r.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[p-2]==="="?2:r[p-1]==="="?1:0,a=new Tu(p*3/4-o),n=o>0?p-4:p;var l=0;for(e=0,t=0;e<n;e+=4,t+=3)i=_[r.charCodeAt(e)]<<18|_[r.charCodeAt(e+1)]<<12|_[r.charCodeAt(e+2)]<<6|_[r.charCodeAt(e+3)],a[l++]=i>>16&255,a[l++]=i>>8&255,a[l++]=i&255;return o===2?(i=_[r.charCodeAt(e)]<<2|_[r.charCodeAt(e+1)]>>4,a[l++]=i&255):o===1&&(i=_[r.charCodeAt(e)]<<10|_[r.charCodeAt(e+1)]<<4|_[r.charCodeAt(e+2)]>>2,a[l++]=i>>8&255,a[l++]=i&255),a}function Au(r){return L[r>>18&63]+L[r>>12&63]+L[r>>6&63]+L[r&63]}function bu(r,e,t){for(var n,i=[],o=e;o<t;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Au(n));return i.join("")}function jn(r){gr||Jn();for(var e,t=r.length,n=t%3,i="",o=[],a=16383,p=0,l=t-n;p<l;p+=a)o.push(bu(r,p,p+a>l?l:p+a));return n===1?(e=r[t-1],i+=L[e>>2],i+=L[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=L[e>>10],i+=L[e>>4&63],i+=L[e<<2&63],i+="="),o.push(i),o.join("")}function xt(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function K(r,e){if(xt()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=c.prototype):(r===null&&(r=new c(e)),r.length=e),r}function c(r,e,t){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(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 vr(this,r)}return Kn(this,r,e,t)}function Kn(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?Ru(r,e,t,n):typeof e=="string"?Eu(r,e,t):Pu(r,e)}function Qn(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 Su(r,e,t,n){return Qn(e),e<=0?K(r,e):t!==void 0?typeof n=="string"?K(r,e).fill(t,n):K(r,e).fill(t):K(r,e)}function vr(r,e){if(Qn(e),r=K(r,e<0?0:wr(e)|0),!c.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Eu(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!c.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Xn(e,t)|0;r=K(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function mr(r,e){var t=e.length<0?0:wr(e.length)|0;r=K(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Ru(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),c.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=c.prototype):r=mr(r,e),r}function Pu(r,e){if(G(e)){var t=wr(e.length)|0;return r=K(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"||zu(e.length)?K(r,0):mr(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return mr(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function wr(r){if(r>=xt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xt().toString(16)+" bytes");return r|0}function G(r){return!!(r!=null&&r._isBuffer)}function Xn(r,e){if(G(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 Tt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return oi(r).length;default:if(n)return Tt(r).length;e=(""+e).toLowerCase(),n=!0}}function Fu(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 Mu(this,e,t);case"utf8":case"utf-8":return ti(this,e,t);case"ascii":return qu(this,e,t);case"latin1":case"binary":return ku(this,e,t);case"base64":return Cu(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Du(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ye(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function Zn(r,e,t,n,i){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=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=c.from(e,n)),G(e))return e.length===0?-1:zn(r,e,t,n,i);if(typeof e=="number")return e=e&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):zn(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function zn(r,e,t,n,i){var o=1,a=r.length,p=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;o=2,a/=2,p/=2,t/=2}function l(I,S){return o===1?I[S]:I.readUInt16BE(S*o)}var m;if(i){var g=-1;for(m=t;m<a;m++)if(l(r,m)===l(e,g===-1?0:m-g)){if(g===-1&&(g=m),m-g+1===p)return g*o}else g!==-1&&(m-=m-g),g=-1}else for(t+p>a&&(t=a-p),m=t;m>=0;m--){for(var d=!0,w=0;w<p;w++)if(l(r,m+w)!==l(e,w)){d=!1;break}if(d)return m}return-1}function Nu(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var p=parseInt(e.substr(a*2,2),16);if(isNaN(p))return a;r[t+a]=p}return a}function Uu(r,e,t,n){return bt(Tt(e,r.length-t),r,t,n)}function ei(r,e,t,n){return bt(Yu(e),r,t,n)}function Ou(r,e,t,n){return ei(r,e,t,n)}function Bu(r,e,t,n){return bt(oi(e),r,t,n)}function $u(r,e,t,n){return bt(ju(e,r.length-t),r,t,n)}function Cu(r,e,t){return e===0&&t===r.length?jn(r):jn(r.slice(e,t))}function ti(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var o=r[i],a=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=t){var l,m,g,d;switch(p){case 1:o<128&&(a=o);break;case 2:l=r[i+1],(l&192)===128&&(d=(o&31)<<6|l&63,d>127&&(a=d));break;case 3:l=r[i+1],m=r[i+2],(l&192)===128&&(m&192)===128&&(d=(o&15)<<12|(l&63)<<6|m&63,d>2047&&(d<55296||d>57343)&&(a=d));break;case 4:l=r[i+1],m=r[i+2],g=r[i+3],(l&192)===128&&(m&192)===128&&(g&192)===128&&(d=(o&15)<<18|(l&63)<<12|(m&63)<<6|g&63,d>65535&&d<1114112&&(a=d))}}a===null?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=p}return _u(n)}function _u(r){var e=r.length;if(e<=Hn)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Hn));return t}function qu(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function ku(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function Mu(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=e;o<t;++o)i+=Vu(r[o]);return i}function Du(r,e,t){for(var n=r.slice(e,t),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function R(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 O(r,e,t,n,i,o){if(!G(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}function It(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(r.length-t,2);i<o;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function At(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(r.length-t,4);i<o;++i)r[t+i]=e>>>(n?i:3-i)*8&255}function ri(r,e,t,n,i,o){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ni(r,e,t,n,i){return i||ri(r,e,t,4,34028234663852886e22,-34028234663852886e22),si(r,e,t,n,23,4),t+4}function ii(r,e,t,n,i){return i||ri(r,e,t,8,17976931348623157e292,-17976931348623157e292),si(r,e,t,n,52,8),t+8}function Gu(r){if(r=Wu(r).replace(Lu,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Wu(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Vu(r){return r<16?"0"+r.toString(16):r.toString(16)}function Tt(r,e){e=e||1/0;for(var t,n=r.length,i=null,o=[],a=0;a<n;++a){if(t=r.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;o.push(t)}else if(t<2048){if((e-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Yu(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function ju(r,e){for(var t,n,i,o=[],a=0;a<r.length&&!((e-=2)<0);++a)t=r.charCodeAt(a),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function oi(r){return Iu(Gu(r))}function bt(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function zu(r){return r!==r}function Hu(r){return r!=null&&(!!r._isBuffer||ai(r)||Ju(r))}function ai(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Ju(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&ai(r.slice(0,0))}function St(r,e,t,n,i){var o,a,p=i*8-n-1,l=(1<<p)-1,m=l>>1,g=-7,d=t?i-1:0,w=t?-1:1,I=r[e+d];for(d+=w,o=I&(1<<-g)-1,I>>=-g,g+=p;g>0;o=o*256+r[e+d],d+=w,g-=8);for(a=o&(1<<-g)-1,o>>=-g,g+=n;g>0;a=a*256+r[e+d],d+=w,g-=8);if(o===0)o=1-m;else{if(o===l)return a?NaN:(I?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-m}return(I?-1:1)*a*Math.pow(2,o-n)}function si(r,e,t,n,i,o){var a,p,l,m=o*8-i-1,g=(1<<m)-1,d=g>>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=n?0:o-1,S=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,a=g):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?e+=w/l:e+=w*Math.pow(2,1-d),e*l>=2&&(a++,l/=2),a+d>=g?(p=0,a=g):a+d>=1?(p=(e*l-1)*Math.pow(2,i),a=a+d):(p=e*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;r[t+I]=p&255,I+=S,p/=256,i-=8);for(a=a<<i|p,m+=i;m>0;r[t+I]=a&255,I+=S,a/=256,m-=8);r[t+I-S]|=E*128}var L,_,Tu,gr,Hn,Lu,ui=Pe(()=>{"use strict";s();u();L=[],_=[],Tu=typeof Uint8Array!="undefined"?Uint8Array:Array,gr=!1;c.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;c.poolSize=8192;c._augment=function(r){return r.__proto__=c.prototype,r};c.from=function(r,e,t){return Kn(null,r,e,t)};c.kMaxLength=xt();c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&c[Symbol.species]);c.alloc=function(r,e,t){return Su(null,r,e,t)};c.allocUnsafe=function(r){return vr(null,r)};c.allocUnsafeSlow=function(r){return vr(null,r)};c.isBuffer=Hu;c.compare=function(e,t){if(!G(e)||!G(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0};c.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}};c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return c.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!G(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};c.byteLength=Xn;c.prototype._isBuffer=!0;c.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)ye(this,t,t+1);return this};c.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)ye(this,t,t+3),ye(this,t+1,t+2);return this};c.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)ye(this,t,t+7),ye(this,t+1,t+6),ye(this,t+2,t+5),ye(this,t+3,t+4);return this};c.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?ti(this,0,e):Fu.apply(this,arguments)};c.prototype.equals=function(e){if(!G(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:c.compare(this,e)===0};c.prototype.compare=function(e,t,n,i,o){if(!G(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,p=n-t,l=Math.min(a,p),m=this.slice(i,o),g=e.slice(t,n),d=0;d<l;++d)if(m[d]!==g[d]){a=m[d],p=g[d];break}return a<p?-1:p<a?1:0};c.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};c.prototype.indexOf=function(e,t,n){return Zn(this,e,t,n,!0)};c.prototype.lastIndexOf=function(e,t,n){return Zn(this,e,t,n,!1)};c.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|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-t;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return Nu(this,e,t,n);case"utf8":case"utf-8":return Uu(this,e,t,n);case"ascii":return ei(this,e,t,n);case"latin1":case"binary":return Ou(this,e,t,n);case"base64":return Bu(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $u(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Hn=4096;c.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 i;if(c.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=c.prototype;else{var o=t-e;i=new c(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+e]}return i};c.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||R(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i};c.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||R(e,t,this.length);for(var i=this[e+--t],o=1;t>0&&(o*=256);)i+=this[e+--t]*o;return i};c.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]};c.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8};c.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]};c.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};c.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};c.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||R(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};c.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||R(e,t,this.length);for(var i=t,o=1,a=this[e+--i];i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a};c.prototype.readInt8=function(e,t){return t||R(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};c.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};c.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};c.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};c.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};c.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),St(this,e,!0,23,4)};c.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),St(this,e,!1,23,4)};c.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),St(this,e,!0,52,8)};c.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),St(this,e,!1,52,8)};c.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;O(this,e,t,n,o,0)}var a=1,p=0;for(this[t]=e&255;++p<n&&(a*=256);)this[t+p]=e/a&255;return t+n};c.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;O(this,e,t,n,o,0)}var a=n-1,p=1;for(this[t+a]=e&255;--a>=0&&(p*=256);)this[t+a]=e/p&255;return t+n};c.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):It(this,e,t,!0),t+2};c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):It(this,e,t,!1),t+2};c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):At(this,e,t,!0),t+4};c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):At(this,e,t,!1),t+4};c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var a=0,p=1,l=0;for(this[t]=e&255;++a<n&&(p*=256);)e<0&&l===0&&this[t+a-1]!==0&&(l=1),this[t+a]=(e/p>>0)-l&255;return t+n};c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var a=n-1,p=1,l=0;for(this[t+a]=e&255;--a>=0&&(p*=256);)e<0&&l===0&&this[t+a+1]!==0&&(l=1),this[t+a]=(e/p>>0)-l&255;return t+n};c.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};c.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):It(this,e,t,!0),t+2};c.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):It(this,e,t,!1),t+2};c.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):At(this,e,t,!0),t+4};c.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):At(this,e,t,!1),t+4};c.prototype.writeFloatLE=function(e,t,n){return ni(this,e,t,!0,n)};c.prototype.writeFloatBE=function(e,t,n){return ni(this,e,t,!1,n)};c.prototype.writeDoubleLE=function(e,t,n){return ii(this,e,t,!0,n)};c.prototype.writeDoubleBE=function(e,t,n){return ii(this,e,t,!1,n)};c.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===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(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o=i-n,a;if(this===e&&n<t&&t<i)for(a=o-1;a>=0;--a)e[a+t]=this[a+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o};c.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}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 a;if(typeof e=="number")for(a=t;a<n;++a)this[a]=e;else{var p=G(e)?e:Tt(new c(e,i).toString()),l=p.length;for(a=0;a<n-t;++a)this[a+t]=p[a%l]}return this};Lu=/[^+\/0-9A-Za-z-_]/g});var u=Pe(()=>{"use strict";ui()});var li=v((qy,pi)=>{"use strict";s();u();var Ku="Function.prototype.bind called on incompatible ",Qu=Object.prototype.toString,Xu=Math.max,Zu="[object Function]",ci=function(e,t){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},ec=function(e,t){for(var n=[],i=t||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},tc=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t};pi.exports=function(e){var t=this;if(typeof t!="function"||Qu.apply(t)!==Zu)throw new TypeError(Ku+t);for(var n=ec(arguments,1),i,o=function(){if(this instanceof i){var g=t.apply(this,ci(n,arguments));return Object(g)===g?g:this}return t.apply(e,ci(n,arguments))},a=Xu(0,t.length-n.length),p=[],l=0;l<a;l++)p[l]="$"+l;if(i=Function("binder","return function ("+tc(p,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var m=function(){};m.prototype=t.prototype,i.prototype=new m,m.prototype=null}return i}});var Et=v((Dy,fi)=>{"use strict";s();u();var rc=li();fi.exports=Function.prototype.bind||rc});var hi=v((Wy,yi)=>{"use strict";s();u();yi.exports=Error});var mi=v((jy,di)=>{"use strict";s();u();di.exports=EvalError});var vi=v((Jy,gi)=>{"use strict";s();u();gi.exports=RangeError});var xi=v((Xy,wi)=>{"use strict";s();u();wi.exports=ReferenceError});var xr=v((th,Ti)=>{"use strict";s();u();Ti.exports=SyntaxError});var F=v((ih,Ii)=>{"use strict";s();u();Ii.exports=TypeError});var bi=v((sh,Ai)=>{"use strict";s();u();Ai.exports=URIError});var Tr=v((ph,Si)=>{"use strict";s();u();Si.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 i=42;e[t]=i;for(t 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 o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}});var Ir=v((yh,Ri)=>{"use strict";s();u();var Ei=typeof Symbol!="undefined"&&Symbol,nc=Tr();Ri.exports=function(){return typeof Ei!="function"||typeof Symbol!="function"||typeof Ei("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:nc()}});var Fi=v((mh,Pi)=>{"use strict";s();u();var Ar={__proto__:null,foo:{}},ic=Object;Pi.exports=function(){return{__proto__:Ar}.foo===Ar.foo&&!(Ar instanceof ic)}});var Ui=v((wh,Ni)=>{"use strict";s();u();var oc=Function.prototype.call,ac=Object.prototype.hasOwnProperty,sc=Et();Ni.exports=sc.call(oc,ac)});var C=v((Ih,_i)=>{"use strict";s();u();var x,uc=hi(),cc=mi(),pc=vi(),lc=xi(),$e=xr(),Be=F(),fc=bi(),Ci=Function,br=function(r){try{return Ci('"use strict"; return ('+r+").constructor;")()}catch(e){}},he=Object.getOwnPropertyDescriptor;if(he)try{he({},"")}catch(r){he=null}var Sr=function(){throw new Be},yc=he?function(){try{return arguments.callee,Sr}catch(r){try{return he(arguments,"callee").get}catch(e){return Sr}}}():Sr,Ue=Ir()(),hc=Fi()(),P=Object.getPrototypeOf||(hc?function(r){return r.__proto__}:null),Oe={},dc=typeof Uint8Array=="undefined"||!P?x:P(Uint8Array),de={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?x:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?x:ArrayBuffer,"%ArrayIteratorPrototype%":Ue&&P?P([][Symbol.iterator]()):x,"%AsyncFromSyncIteratorPrototype%":x,"%AsyncFunction%":Oe,"%AsyncGenerator%":Oe,"%AsyncGeneratorFunction%":Oe,"%AsyncIteratorPrototype%":Oe,"%Atomics%":typeof Atomics=="undefined"?x:Atomics,"%BigInt%":typeof BigInt=="undefined"?x:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?x:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?x:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?x:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":uc,"%eval%":eval,"%EvalError%":cc,"%Float32Array%":typeof Float32Array=="undefined"?x:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?x:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?x:FinalizationRegistry,"%Function%":Ci,"%GeneratorFunction%":Oe,"%Int8Array%":typeof Int8Array=="undefined"?x:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?x:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?x:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ue&&P?P(P([][Symbol.iterator]())):x,"%JSON%":typeof JSON=="object"?JSON:x,"%Map%":typeof Map=="undefined"?x:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ue||!P?x:P(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?x:Promise,"%Proxy%":typeof Proxy=="undefined"?x:Proxy,"%RangeError%":pc,"%ReferenceError%":lc,"%Reflect%":typeof Reflect=="undefined"?x:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?x:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ue||!P?x:P(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?x:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ue&&P?P(""[Symbol.iterator]()):x,"%Symbol%":Ue?Symbol:x,"%SyntaxError%":$e,"%ThrowTypeError%":yc,"%TypedArray%":dc,"%TypeError%":Be,"%Uint8Array%":typeof Uint8Array=="undefined"?x:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?x:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?x:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?x:Uint32Array,"%URIError%":fc,"%WeakMap%":typeof WeakMap=="undefined"?x:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?x:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?x:WeakSet};if(P)try{null.error}catch(r){Oi=P(P(r)),de["%Error.prototype%"]=Oi}var Oi,mc=function r(e){var t;if(e==="%AsyncFunction%")t=br("async function () {}");else if(e==="%GeneratorFunction%")t=br("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=br("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&P&&(t=P(i.prototype))}return de[e]=t,t},Bi={__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"]},Ve=Et(),Rt=Ui(),gc=Ve.call(Function.call,Array.prototype.concat),vc=Ve.call(Function.apply,Array.prototype.splice),$i=Ve.call(Function.call,String.prototype.replace),Pt=Ve.call(Function.call,String.prototype.slice),wc=Ve.call(Function.call,RegExp.prototype.exec),xc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tc=/\\(\\)?/g,Ic=function(e){var t=Pt(e,0,1),n=Pt(e,-1);if(t==="%"&&n!=="%")throw new $e("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new $e("invalid intrinsic syntax, expected opening `%`");var i=[];return $i(e,xc,function(o,a,p,l){i[i.length]=p?$i(l,Tc,"$1"):a||o}),i},Ac=function(e,t){var n=e,i;if(Rt(Bi,n)&&(i=Bi[n],n="%"+i[0]+"%"),Rt(de,n)){var o=de[n];if(o===Oe&&(o=mc(n)),typeof o=="undefined"&&!t)throw new Be("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new $e("intrinsic "+e+" does not exist!")};_i.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new Be("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Be('"allowMissing" argument must be a boolean');if(wc(/^%?[^%]*%?$/,e)===null)throw new $e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ic(e),i=n.length>0?n[0]:"",o=Ac("%"+i+"%",t),a=o.name,p=o.value,l=!1,m=o.alias;m&&(i=m[0],vc(n,gc([0,1],m)));for(var g=1,d=!0;g<n.length;g+=1){var w=n[g],I=Pt(w,0,1),S=Pt(w,-1);if((I==='"'||I==="'"||I==="`"||S==='"'||S==="'"||S==="`")&&I!==S)throw new $e("property names with quotes must have matching quotes");if((w==="constructor"||!d)&&(l=!0),i+="."+w,a="%"+i+"%",Rt(de,a))p=de[a];else if(p!=null){if(!(w in p)){if(!t)throw new Be("base intrinsic for "+e+" exists, but the property is not available.");return}if(he&&g+1>=n.length){var E=he(p,w);d=!!E,d&&"get"in E&&!("originalValue"in E.get)?p=E.get:p=p[w]}else d=Rt(p,w),p=p[w];d&&!l&&(de[a]=p)}}return p}});var Nt=v((Sh,qi)=>{"use strict";s();u();var bc=C(),Ft=bc("%Object.defineProperty%",!0)||!1;if(Ft)try{Ft({},"a",{value:1})}catch(r){Ft=!1}qi.exports=Ft});var Er=v((Ph,ki)=>{"use strict";s();u();var Sc=C(),Ut=Sc("%Object.getOwnPropertyDescriptor%",!0);if(Ut)try{Ut([],"length")}catch(r){Ut=null}ki.exports=Ut});var Rr=v((Uh,Li)=>{"use strict";s();u();var Mi=Nt(),Ec=xr(),Ce=F(),Di=Er();Li.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ce("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Ce("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ce("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ce("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ce("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ce("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,l=!!Di&&Di(e,t);if(Mi)Mi(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:o===null&&l?l.writable:!o});else if(p||!i&&!o&&!a)e[t]=n;else throw new Ec("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Fr=v(($h,Wi)=>{"use strict";s();u();var Pr=Nt(),Gi=function(){return!!Pr};Gi.hasArrayLengthDefineBug=function(){if(!Pr)return null;try{return Pr([],"length",{value:1}).length!==1}catch(e){return!0}};Wi.exports=Gi});var Hi=v((qh,zi)=>{"use strict";s();u();var Rc=C(),Vi=Rr(),Pc=Fr()(),Yi=Er(),ji=F(),Fc=Rc("%Math.floor%");zi.exports=function(e,t){if(typeof e!="function")throw new ji("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Fc(t)!==t)throw new ji("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Yi){var a=Yi(e,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(Pc?Vi(e,"length",t,!0,!0):Vi(e,"length",t)),e}});var $t=v((Dh,Ot)=>{"use strict";s();u();var Nr=Et(),Bt=C(),Nc=Hi(),Uc=F(),Qi=Bt("%Function.prototype.apply%"),Xi=Bt("%Function.prototype.call%"),Zi=Bt("%Reflect.apply%",!0)||Nr.call(Xi,Qi),Ji=Nt(),Oc=Bt("%Math.max%");Ot.exports=function(e){if(typeof e!="function")throw new Uc("a function is required");var t=Zi(Nr,Xi,arguments);return Nc(t,1+Oc(0,e.length-(arguments.length-1)),!0)};var Ki=function(){return Zi(Nr,Qi,arguments)};Ji?Ji(Ot.exports,"apply",{value:Ki}):Ot.exports.apply=Ki});var Ur=v((Wh,to)=>{"use strict";s();u();var eo=Object.prototype.toString;to.exports=function(e){var t=eo.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&eo.call(e.callee)==="[object Function]"),n}});var po=v((jh,co)=>{"use strict";s();u();var uo;Object.keys||(Ye=Object.prototype.hasOwnProperty,Or=Object.prototype.toString,ro=Ur(),Br=Object.prototype.propertyIsEnumerable,no=!Br.call({toString:null},"toString"),io=Br.call(function(){},"prototype"),je=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ct=function(r){var e=r.constructor;return e&&e.prototype===r},oo={$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},ao=function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!oo["$"+r]&&Ye.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Ct(window[r])}catch(e){return!0}}catch(e){return!0}return!1}(),so=function(r){if(typeof window=="undefined"||!ao)return Ct(r);try{return Ct(r)}catch(e){return!1}},uo=function(e){var t=e!==null&&typeof e=="object",n=Or.call(e)==="[object Function]",i=ro(e),o=t&&Or.call(e)==="[object String]",a=[];if(!t&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=io&&n;if(o&&e.length>0&&!Ye.call(e,0))for(var l=0;l<e.length;++l)a.push(String(l));if(i&&e.length>0)for(var m=0;m<e.length;++m)a.push(String(m));else for(var g in e)!(p&&g==="prototype")&&Ye.call(e,g)&&a.push(String(g));if(no)for(var d=so(e),w=0;w<je.length;++w)!(d&&je[w]==="constructor")&&Ye.call(e,je[w])&&a.push(je[w]);return a});var Ye,Or,ro,Br,no,io,je,Ct,oo,ao,so;co.exports=uo});var ho=v((Jh,yo)=>{"use strict";s();u();var Bc=Array.prototype.slice,$c=Ur(),lo=Object.keys,_t=lo?function(e){return lo(e)}:po(),fo=Object.keys;_t.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 $c(n)?fo(Bc.call(n)):fo(n)})}else Object.keys=_t;return Object.keys||_t};yo.exports=_t});var ze=v((Xh,wo)=>{"use strict";s();u();var Cc=ho(),_c=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",qc=Object.prototype.toString,kc=Array.prototype.concat,mo=Rr(),Mc=function(r){return typeof r=="function"&&qc.call(r)==="[object Function]"},go=Fr()(),Dc=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!Mc(n)||!n())return}go?mo(r,e,t,!0):mo(r,e,t)},vo=function(r,e){var t=arguments.length>2?arguments[2]:{},n=Cc(e);_c&&(n=kc.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)Dc(r,n[i],e[n[i]],t[n[i]])};vo.supportsDescriptors=!!go;wo.exports=vo});var M=v((td,Io)=>{"use strict";s();u();var xo=C(),To=$t(),Lc=To(xo("String.prototype.indexOf"));Io.exports=function(e,t){var n=xo(e,!!t);return typeof n=="function"&&Lc(e,".prototype.")>-1?To(n):n}});var So=v((id,bo)=>{"use strict";s();u();var Gc=C(),Ao=Gc("%Array%"),Wc=!Ao.isArray&&M()("Object.prototype.toString");bo.exports=Ao.isArray||function(e){return Wc(e)==="[object Array]"}});var $r=v((sd,Eo)=>{"use strict";s();u();Eo.exports=So()});var Po=v((pd,Ro)=>{"use strict";s();u();var Vc=C(),Yc=M(),jc=F(),zc=$r(),Hc=Vc("%Reflect.apply%",!0)||Yc("Function.prototype.apply");Ro.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!zc(n))throw new jc("Assertion failed: optional `argumentsList`, if provided, must be a List");return Hc(e,t,n)}});function Fo(){throw new Error("setTimeout has not been defined")}function No(){throw new Error("clearTimeout has not been defined")}function Uo(r){if(oe===setTimeout)return setTimeout(r,0);if((oe===Fo||!oe)&&setTimeout)return oe=setTimeout,setTimeout(r,0);try{return oe(r,0)}catch(e){try{return oe.call(null,r,0)}catch(t){return oe.call(this,r,0)}}}function Jc(r){if(ae===clearTimeout)return clearTimeout(r);if((ae===No||!ae)&&clearTimeout)return ae=clearTimeout,clearTimeout(r);try{return ae(r)}catch(e){try{return ae.call(null,r)}catch(t){return ae.call(this,r)}}}function Kc(){!qe||!me||(qe=!1,me.length?Q=me.concat(Q):qt=-1,Q.length&&Oo())}function Oo(){if(!qe){var r=Uo(Kc);qe=!0;for(var e=Q.length;e;){for(me=Q,Q=[];++qt<e;)me&&me[qt].run();qt=-1,e=Q.length}me=null,qe=!1,Jc(r)}}function Qc(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];Q.push(new Bo(r,e)),Q.length===1&&!qe&&Uo(Oo)}function Bo(r,e){this.fun=r,this.array=e}function ge(){}function hp(r){throw new Error("process.binding is not supported")}function dp(){return"/"}function mp(r){throw new Error("process.chdir is not supported")}function gp(){return 0}function wp(r){var e=vp.call(_e)*.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 Tp(){var r=new Date,e=r-xp;return e/1e3}var oe,ae,Q,qe,me,qt,Xc,Zc,ep,tp,rp,np,ip,op,ap,sp,up,cp,pp,lp,fp,yp,_e,vp,xp,Ip,He,$o=Pe(()=>{"use strict";s();u();oe=Fo,ae=No;typeof globalThis.setTimeout=="function"&&(oe=setTimeout);typeof globalThis.clearTimeout=="function"&&(ae=clearTimeout);Q=[],qe=!1,qt=-1;Bo.prototype.run=function(){this.fun.apply(null,this.array)};Xc="browser",Zc="browser",ep=!0,tp={},rp=[],np="",ip={},op={},ap={};sp=ge,up=ge,cp=ge,pp=ge,lp=ge,fp=ge,yp=ge;_e=globalThis.performance||{},vp=_e.now||_e.mozNow||_e.msNow||_e.oNow||_e.webkitNow||function(){return new Date().getTime()};xp=new Date;Ip={nextTick:Qc,title:Xc,browser:ep,env:tp,argv:rp,version:np,versions:ip,on:sp,addListener:up,once:cp,off:pp,removeListener:lp,removeAllListeners:fp,emit:yp,binding:hp,cwd:dp,chdir:mp,umask:gp,hrtime:wp,platform:Zc,release:op,config:ap,uptime:Tp},He=Ip});var Cr,_r,Co=Pe(()=>{"use strict";s();u();typeof Object.create=="function"?Cr=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Cr=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};_r=Cr});var Wo={};dr(Wo,{_extend:()=>Yr,debuglog:()=>_o,default:()=>Op,deprecate:()=>Lr,format:()=>Lt,inherits:()=>_r,inspect:()=>V,isArray:()=>Gr,isBoolean:()=>Gt,isBuffer:()=>Do,isDate:()=>Dt,isError:()=>Ke,isFunction:()=>Qe,isNull:()=>Xe,isNullOrUndefined:()=>qo,isNumber:()=>Wr,isObject:()=>ve,isPrimitive:()=>Mo,isRegExp:()=>Je,isString:()=>Ze,isSymbol:()=>ko,isUndefined:()=>W,log:()=>Lo});function Lt(r){if(!Ze(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(V(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(r).replace(Ap,function(p){if(p==="%%")return"%";if(t>=i)return p;switch(p){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(l){return"[Circular]"}default:return p}}),a=n[t];t<i;a=n[++t])Xe(a)||!ve(a)?o+=" "+a:o+=" "+V(a);return o}function Lr(r,e){if(W(globalThis.process))return function(){return Lr(r,e).apply(this,arguments)};if(He.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(He.throwDeprecation)throw new Error(e);He.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}function _o(r){if(W(qr)&&(qr=He.env.NODE_DEBUG||""),r=r.toUpperCase(),!kt[r])if(new RegExp("\\b"+r+"\\b","i").test(qr)){var e=0;kt[r]=function(){var t=Lt.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else kt[r]=function(){};return kt[r]}function V(r,e){var t={seen:[],stylize:Sp};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Gt(e)?t.showHidden=e:e&&Yr(t,e),W(t.showHidden)&&(t.showHidden=!1),W(t.depth)&&(t.depth=2),W(t.colors)&&(t.colors=!1),W(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=bp),Mt(t,r,t.depth)}function bp(r,e){var t=V.styles[e];return t?"\x1B["+V.colors[t][0]+"m"+r+"\x1B["+V.colors[t][1]+"m":r}function Sp(r,e){return r}function Ep(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function Mt(r,e,t){if(r.customInspect&&e&&Qe(e.inspect)&&e.inspect!==V&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return Ze(n)||(n=Mt(r,n,t)),n}var i=Rp(r,e);if(i)return i;var o=Object.keys(e),a=Ep(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(e)),Ke(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return kr(e);if(o.length===0){if(Qe(e)){var p=e.name?": "+e.name:"";return r.stylize("[Function"+p+"]","special")}if(Je(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Dt(e))return r.stylize(Date.prototype.toString.call(e),"date");if(Ke(e))return kr(e)}var l="",m=!1,g=["{","}"];if(Gr(e)&&(m=!0,g=["[","]"]),Qe(e)){var d=e.name?": "+e.name:"";l=" [Function"+d+"]"}if(Je(e)&&(l=" "+RegExp.prototype.toString.call(e)),Dt(e)&&(l=" "+Date.prototype.toUTCString.call(e)),Ke(e)&&(l=" "+kr(e)),o.length===0&&(!m||e.length==0))return g[0]+l+g[1];if(t<0)return Je(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var w;return m?w=Pp(r,e,t,a,o):w=o.map(function(I){return Dr(r,e,t,a,I,m)}),r.seen.pop(),Fp(w,l,g)}function Rp(r,e){if(W(e))return r.stylize("undefined","undefined");if(Ze(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(Wr(e))return r.stylize(""+e,"number");if(Gt(e))return r.stylize(""+e,"boolean");if(Xe(e))return r.stylize("null","null")}function kr(r){return"["+Error.prototype.toString.call(r)+"]"}function Pp(r,e,t,n,i){for(var o=[],a=0,p=e.length;a<p;++a)Go(e,String(a))?o.push(Dr(r,e,t,n,String(a),!0)):o.push("");return i.forEach(function(l){l.match(/^\d+$/)||o.push(Dr(r,e,t,n,l,!0))}),o}function Dr(r,e,t,n,i,o){var a,p,l;if(l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},l.get?l.set?p=r.stylize("[Getter/Setter]","special"):p=r.stylize("[Getter]","special"):l.set&&(p=r.stylize("[Setter]","special")),Go(n,i)||(a="["+i+"]"),p||(r.seen.indexOf(l.value)<0?(Xe(t)?p=Mt(r,l.value,null):p=Mt(r,l.value,t-1),p.indexOf(`
2
- `)>-1&&(o?p=p.split(`
3
- `).map(function(m){return" "+m}).join(`
4
- `).substr(2):p=`
5
- `+p.split(`
6
- `).map(function(m){return" "+m}).join(`
7
- `))):p=r.stylize("[Circular]","special")),W(a)){if(o&&i.match(/^\d+$/))return p;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=r.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=r.stylize(a,"string"))}return a+": "+p}function Fp(r,e,t){var n=0,i=r.reduce(function(o,a){return n++,a.indexOf(`
1
+ "use strict";var pp=Object.create;var Qe=Object.defineProperty,cp=Object.defineProperties,lp=Object.getOwnPropertyDescriptor,fp=Object.getOwnPropertyDescriptors,yp=Object.getOwnPropertyNames,Nt=Object.getOwnPropertySymbols,hp=Object.getPrototypeOf,Or=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable;var Nr=(r,e,t)=>e in r?Qe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pi=(r,e)=>{for(var t in e||(e={}))Or.call(e,t)&&Nr(r,t,e[t]);if(Nt)for(var t of Nt(e))ui.call(e,t)&&Nr(r,t,e[t]);return r},ci=(r,e)=>cp(r,fp(e));var li=r=>typeof r=="symbol"?r:r+"",fi=(r,e)=>{var t={};for(var n in r)Or.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Nt)for(var n of Nt(r))e.indexOf(n)<0&&ui.call(r,n)&&(t[n]=r[n]);return t};var Be=(r,e)=>()=>(r&&(e=r(r=0)),e);var d=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ur=(r,e)=>{for(var t in e)Qe(r,t,{get:e[t],enumerable:!0})},yi=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yp(e))!Or.call(r,i)&&i!==t&&Qe(r,i,{get:()=>e[i],enumerable:!(n=lp(e,i))||n.enumerable});return r};var dp=(r,e,t)=>(t=r!=null?pp(hp(r)):{},yi(e||!r||!r.__esModule?Qe(t,"default",{value:r,enumerable:!0}):t,r)),hi=r=>yi(Qe({},"__esModule",{value:!0}),r);var h=(r,e,t)=>Nr(r,typeof e!="symbol"?e+"":e,t);function mi(){throw new Error("setTimeout has not been defined")}function gi(){throw new Error("clearTimeout has not been defined")}function vi(r){if(ae===setTimeout)return setTimeout(r,0);if((ae===mi||!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 mp(r){if(se===clearTimeout)return clearTimeout(r);if((se===gi||!se)&&clearTimeout)return se=clearTimeout,clearTimeout(r);try{return se(r)}catch(e){try{return se.call(null,r)}catch(t){return se.call(this,r)}}}function gp(){!qe||!ye||(qe=!1,ye.length?X=ye.concat(X):Ot=-1,X.length&&wi())}function wi(){if(!qe){var r=vi(gp);qe=!0;for(var e=X.length;e;){for(ye=X,X=[];++Ot<e;)ye&&ye[Ot].run();Ot=-1,e=X.length}ye=null,qe=!1,mp(r)}}function vp(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];X.push(new xi(r,e)),X.length===1&&!qe&&vi(wi)}function xi(r,e){this.fun=r,this.array=e}function he(){}function qp(r){throw new Error("process.binding is not supported")}function Cp(){return"/"}function _p(r){throw new Error("process.chdir is not supported")}function kp(){return 0}function Dp(r){var e=Mp.call($e)*.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 Gp(){var r=new Date,e=r-Lp;return e/1e3}var ae,se,X,qe,ye,Ot,wp,xp,Ap,Tp,bp,Ip,Sp,Ep,Pp,Rp,Fp,Np,Op,Up,Bp,$p,$e,Mp,Lp,l,di,s=Be(()=>{"use strict";ae=mi,se=gi;typeof globalThis.setTimeout=="function"&&(ae=setTimeout);typeof globalThis.clearTimeout=="function"&&(se=clearTimeout);X=[],qe=!1,Ot=-1;xi.prototype.run=function(){this.fun.apply(null,this.array)};wp="browser",xp="browser",Ap=!0,Tp={},bp=[],Ip="",Sp={},Ep={},Pp={};Rp=he,Fp=he,Np=he,Op=he,Up=he,Bp=he,$p=he;$e=globalThis.performance||{},Mp=$e.now||$e.mozNow||$e.msNow||$e.oNow||$e.webkitNow||function(){return new Date().getTime()};Lp=new Date;l={nextTick:vp,title:wp,browser:Ap,env:Tp,argv:bp,version:Ip,versions:Sp,on:Rp,addListener:Fp,once:Np,off:Op,removeListener:Up,removeAllListeners:Bp,emit:$p,binding:qp,cwd:Cp,chdir:_p,umask:kp,hrtime:Dp,platform:xp,release:Ep,config:Pp,uptime:Gp},di={};Object.keys(di).forEach(r=>{let e=r.split("."),t=l;for(let n=0;n<e.length;n++){let i=e[n];n===e.length-1?t[i]=di[r]:t=t[i]||(t[i]={})}})});function Ii(){$r=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)G[e]=r[e],_[r.charCodeAt(e)]=e;_[45]=62,_[95]=63}function Vp(r){$r||Ii();var e,t,n,i,o,a,c=r.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[c-2]==="="?2:r[c-1]==="="?1:0,a=new Wp(c*3/4-o),n=o>0?c-4:c;var f=0;for(e=0,t=0;e<n;e+=4,t+=3)i=_[r.charCodeAt(e)]<<18|_[r.charCodeAt(e+1)]<<12|_[r.charCodeAt(e+2)]<<6|_[r.charCodeAt(e+3)],a[f++]=i>>16&255,a[f++]=i>>8&255,a[f++]=i&255;return o===2?(i=_[r.charCodeAt(e)]<<2|_[r.charCodeAt(e+1)]>>4,a[f++]=i&255):o===1&&(i=_[r.charCodeAt(e)]<<10|_[r.charCodeAt(e+1)]<<4|_[r.charCodeAt(e+2)]>>2,a[f++]=i>>8&255,a[f++]=i&255),a}function jp(r){return G[r>>18&63]+G[r>>12&63]+G[r>>6&63]+G[r&63]}function Yp(r,e,t){for(var n,i=[],o=e;o<t;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(jp(n));return i.join("")}function Ai(r){$r||Ii();for(var e,t=r.length,n=t%3,i="",o=[],a=16383,c=0,f=t-n;c<f;c+=a)o.push(Yp(r,c,c+a>f?f:c+a));return n===1?(e=r[t-1],i+=G[e>>2],i+=G[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=G[e>>10],i+=G[e>>4&63],i+=G[e<<2&63],i+="="),o.push(i),o.join("")}function Ut(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Z(r,e){if(Ut()<e)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=p.prototype):(r===null&&(r=new p(e)),r.length=e),r}function p(r,e,t){if(!p.TYPED_ARRAY_SUPPORT&&!(this instanceof p))return new p(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 qr(this,r)}return Si(this,r,e,t)}function Si(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?Jp(r,e,t,n):typeof e=="string"?Hp(r,e,t):Kp(r,e)}function Ei(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 zp(r,e,t,n){return Ei(e),e<=0?Z(r,e):t!==void 0?typeof n=="string"?Z(r,e).fill(t,n):Z(r,e).fill(t):Z(r,e)}function qr(r,e){if(Ei(e),r=Z(r,e<0?0:Cr(e)|0),!p.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}function Hp(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!p.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Pi(e,t)|0;r=Z(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function Br(r,e){var t=e.length<0?0:Cr(e.length)|0;r=Z(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Jp(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),p.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=p.prototype):r=Br(r,e),r}function Kp(r,e){if(W(e)){var t=Cr(e.length)|0;return r=Z(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"||dc(e.length)?Z(r,0):Br(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Br(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Cr(r){if(r>=Ut())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ut().toString(16)+" bytes");return r|0}function W(r){return!!(r!=null&&r._isBuffer)}function Pi(r,e){if(W(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 Bt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return $i(r).length;default:if(n)return Bt(r).length;e=(""+e).toLowerCase(),n=!0}}function Qp(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 sc(this,e,t);case"utf8":case"utf-8":return Ni(this,e,t);case"ascii":return oc(this,e,t);case"latin1":case"binary":return ac(this,e,t);case"base64":return nc(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return uc(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function de(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function Ri(r,e,t,n,i){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=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=p.from(e,n)),W(e))return e.length===0?-1:Ti(r,e,t,n,i);if(typeof e=="number")return e=e&255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Ti(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Ti(r,e,t,n,i){var o=1,a=r.length,c=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;o=2,a/=2,c/=2,t/=2}function f(x,I){return o===1?x[I]:x.readUInt16BE(I*o)}var v;if(i){var g=-1;for(v=t;v<a;v++)if(f(r,v)===f(e,g===-1?0:v-g)){if(g===-1&&(g=v),v-g+1===c)return g*o}else g!==-1&&(v-=v-g),g=-1}else for(t+c>a&&(t=a-c),v=t;v>=0;v--){for(var m=!0,w=0;w<c;w++)if(f(r,v+w)!==f(e,w)){m=!1;break}if(m)return v}return-1}function Xp(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var c=parseInt(e.substr(a*2,2),16);if(isNaN(c))return a;r[t+a]=c}return a}function Zp(r,e,t,n){return Ct(Bt(e,r.length-t),r,t,n)}function Fi(r,e,t,n){return Ct(yc(e),r,t,n)}function ec(r,e,t,n){return Fi(r,e,t,n)}function tc(r,e,t,n){return Ct($i(e),r,t,n)}function rc(r,e,t,n){return Ct(hc(e,r.length-t),r,t,n)}function nc(r,e,t){return e===0&&t===r.length?Ai(r):Ai(r.slice(e,t))}function Ni(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var o=r[i],a=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=t){var f,v,g,m;switch(c){case 1:o<128&&(a=o);break;case 2:f=r[i+1],(f&192)===128&&(m=(o&31)<<6|f&63,m>127&&(a=m));break;case 3:f=r[i+1],v=r[i+2],(f&192)===128&&(v&192)===128&&(m=(o&15)<<12|(f&63)<<6|v&63,m>2047&&(m<55296||m>57343)&&(a=m));break;case 4:f=r[i+1],v=r[i+2],g=r[i+3],(f&192)===128&&(v&192)===128&&(g&192)===128&&(m=(o&15)<<18|(f&63)<<12|(v&63)<<6|g&63,m>65535&&m<1114112&&(a=m))}}a===null?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=c}return ic(n)}function ic(r){var e=r.length;if(e<=bi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=bi));return t}function oc(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function ac(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function sc(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=e;o<t;++o)i+=fc(r[o]);return i}function uc(r,e,t){for(var n=r.slice(e,t),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function F(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 $(r,e,t,n,i,o){if(!W(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}function $t(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(r.length-t,2);i<o;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function qt(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(r.length-t,4);i<o;++i)r[t+i]=e>>>(n?i:3-i)*8&255}function Oi(r,e,t,n,i,o){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ui(r,e,t,n,i){return i||Oi(r,e,t,4,34028234663852886e22,-34028234663852886e22),Ci(r,e,t,n,23,4),t+4}function Bi(r,e,t,n,i){return i||Oi(r,e,t,8,17976931348623157e292,-17976931348623157e292),Ci(r,e,t,n,52,8),t+8}function cc(r){if(r=lc(r).replace(pc,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function lc(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function fc(r){return r<16?"0"+r.toString(16):r.toString(16)}function Bt(r,e){e=e||1/0;for(var t,n=r.length,i=null,o=[],a=0;a<n;++a){if(t=r.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;o.push(t)}else if(t<2048){if((e-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function yc(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function hc(r,e){for(var t,n,i,o=[],a=0;a<r.length&&!((e-=2)<0);++a)t=r.charCodeAt(a),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function $i(r){return Vp(cc(r))}function Ct(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function dc(r){return r!==r}function mc(r){return r!=null&&(!!r._isBuffer||qi(r)||gc(r))}function qi(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function gc(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&qi(r.slice(0,0))}function _t(r,e,t,n,i){var o,a,c=i*8-n-1,f=(1<<c)-1,v=f>>1,g=-7,m=t?i-1:0,w=t?-1:1,x=r[e+m];for(m+=w,o=x&(1<<-g)-1,x>>=-g,g+=c;g>0;o=o*256+r[e+m],m+=w,g-=8);for(a=o&(1<<-g)-1,o>>=-g,g+=n;g>0;a=a*256+r[e+m],m+=w,g-=8);if(o===0)o=1-v;else{if(o===f)return a?NaN:(x?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-v}return(x?-1:1)*a*Math.pow(2,o-n)}function Ci(r,e,t,n,i,o){var a,c,f,v=o*8-i-1,g=(1<<v)-1,m=g>>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,I=n?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=g):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+m>=1?e+=w/f:e+=w*Math.pow(2,1-m),e*f>=2&&(a++,f/=2),a+m>=g?(c=0,a=g):a+m>=1?(c=(e*f-1)*Math.pow(2,i),a=a+m):(c=e*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;r[t+x]=c&255,x+=I,c/=256,i-=8);for(a=a<<i|c,v+=i;v>0;r[t+x]=a&255,x+=I,a/=256,v-=8);r[t+x-I]|=P*128}var G,_,Wp,$r,bi,pc,_i=Be(()=>{"use strict";s();u();G=[],_=[],Wp=typeof Uint8Array!="undefined"?Uint8Array:Array,$r=!1;p.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;p.poolSize=8192;p._augment=function(r){return r.__proto__=p.prototype,r};p.from=function(r,e,t){return Si(null,r,e,t)};p.kMaxLength=Ut();p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]);p.alloc=function(r,e,t){return zp(null,r,e,t)};p.allocUnsafe=function(r){return qr(null,r)};p.allocUnsafeSlow=function(r){return qr(null,r)};p.isBuffer=mc;p.compare=function(e,t){if(!W(e)||!W(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0};p.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}};p.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return p.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=p.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!W(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};p.byteLength=Pi;p.prototype._isBuffer=!0;p.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)de(this,t,t+1);return this};p.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)de(this,t,t+3),de(this,t+1,t+2);return this};p.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)de(this,t,t+7),de(this,t+1,t+6),de(this,t+2,t+5),de(this,t+3,t+4);return this};p.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ni(this,0,e):Qp.apply(this,arguments)};p.prototype.equals=function(e){if(!W(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:p.compare(this,e)===0};p.prototype.compare=function(e,t,n,i,o){if(!W(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,c=n-t,f=Math.min(a,c),v=this.slice(i,o),g=e.slice(t,n),m=0;m<f;++m)if(v[m]!==g[m]){a=v[m],c=g[m];break}return a<c?-1:c<a?1:0};p.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};p.prototype.indexOf=function(e,t,n){return Ri(this,e,t,n,!0)};p.prototype.lastIndexOf=function(e,t,n){return Ri(this,e,t,n,!1)};p.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|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-t;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return Xp(this,e,t,n);case"utf8":case"utf-8":return Zp(this,e,t,n);case"ascii":return Fi(this,e,t,n);case"latin1":case"binary":return ec(this,e,t,n);case"base64":return tc(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rc(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};bi=4096;p.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 i;if(p.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=p.prototype;else{var o=t-e;i=new p(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+e]}return i};p.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||F(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i};p.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||F(e,t,this.length);for(var i=this[e+--t],o=1;t>0&&(o*=256);)i+=this[e+--t]*o;return i};p.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]};p.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8};p.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]};p.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};p.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};p.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||F(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};p.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||F(e,t,this.length);for(var i=t,o=1,a=this[e+--i];i>0&&(o*=256);)a+=this[e+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a};p.prototype.readInt8=function(e,t){return t||F(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};p.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};p.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};p.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};p.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};p.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),_t(this,e,!0,23,4)};p.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),_t(this,e,!1,23,4)};p.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),_t(this,e,!0,52,8)};p.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),_t(this,e,!1,52,8)};p.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;$(this,e,t,n,o,0)}var a=1,c=0;for(this[t]=e&255;++c<n&&(a*=256);)this[t+c]=e/a&255;return t+n};p.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;$(this,e,t,n,o,0)}var a=n-1,c=1;for(this[t+a]=e&255;--a>=0&&(c*=256);)this[t+a]=e/c&255;return t+n};p.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,1,255,0),p.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):$t(this,e,t,!0),t+2};p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):$t(this,e,t,!1),t+2};p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):qt(this,e,t,!0),t+4};p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):qt(this,e,t,!1),t+4};p.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var o=Math.pow(2,8*n-1);$(this,e,t,n,o-1,-o)}var a=0,c=1,f=0;for(this[t]=e&255;++a<n&&(c*=256);)e<0&&f===0&&this[t+a-1]!==0&&(f=1),this[t+a]=(e/c>>0)-f&255;return t+n};p.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var o=Math.pow(2,8*n-1);$(this,e,t,n,o-1,-o)}var a=n-1,c=1,f=0;for(this[t+a]=e&255;--a>=0&&(c*=256);)e<0&&f===0&&this[t+a+1]!==0&&(f=1),this[t+a]=(e/c>>0)-f&255;return t+n};p.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,1,127,-128),p.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1};p.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):$t(this,e,t,!0),t+2};p.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):$t(this,e,t,!1),t+2};p.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):qt(this,e,t,!0),t+4};p.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):qt(this,e,t,!1),t+4};p.prototype.writeFloatLE=function(e,t,n){return Ui(this,e,t,!0,n)};p.prototype.writeFloatBE=function(e,t,n){return Ui(this,e,t,!1,n)};p.prototype.writeDoubleLE=function(e,t,n){return Bi(this,e,t,!0,n)};p.prototype.writeDoubleBE=function(e,t,n){return Bi(this,e,t,!1,n)};p.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===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(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o=i-n,a;if(this===e&&n<t&&t<i)for(a=o-1;a>=0;--a)e[a+t]=this[a+n];else if(o<1e3||!p.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o};p.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!p.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}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 a;if(typeof e=="number")for(a=t;a<n;++a)this[a]=e;else{var c=W(e)?e:Bt(new p(e,i).toString()),f=c.length;for(a=0;a<n-t;++a)this[a+t]=c[a%f]}return this};pc=/[^+\/0-9A-Za-z-_]/g});var u=Be(()=>{"use strict";_i()});var Di=d((Wd,Mi)=>{"use strict";s();u();var vc="Function.prototype.bind called on incompatible ",wc=Object.prototype.toString,xc=Math.max,Ac="[object Function]",ki=function(e,t){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},Tc=function(e,t){for(var n=[],i=t||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},bc=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t};Mi.exports=function(e){var t=this;if(typeof t!="function"||wc.apply(t)!==Ac)throw new TypeError(vc+t);for(var n=Tc(arguments,1),i,o=function(){if(this instanceof i){var g=t.apply(this,ki(n,arguments));return Object(g)===g?g:this}return t.apply(e,ki(n,arguments))},a=xc(0,t.length-n.length),c=[],f=0;f<a;f++)c[f]="$"+f;if(i=Function("binder","return function ("+bc(c,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var v=function(){};v.prototype=t.prototype,i.prototype=new v,v.prototype=null}return i}});var me=d((Yd,Li)=>{"use strict";s();u();var Ic=Di();Li.exports=Function.prototype.bind||Ic});var _r=d((Jd,Gi)=>{"use strict";s();u();Gi.exports=Error});var kr=d((Xd,Wi)=>{"use strict";s();u();Wi.exports=EvalError});var Mr=d((tm,Vi)=>{"use strict";s();u();Vi.exports=RangeError});var Dr=d((im,ji)=>{"use strict";s();u();ji.exports=ReferenceError});var kt=d((sm,Yi)=>{"use strict";s();u();Yi.exports=SyntaxError});var R=d((cm,zi)=>{"use strict";s();u();zi.exports=TypeError});var Lr=d((ym,Hi)=>{"use strict";s();u();Hi.exports=URIError});var Ki=d((mm,Ji)=>{"use strict";s();u();Ji.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 i=42;e[t]=i;for(t 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 o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}});var Gr=d((wm,Xi)=>{"use strict";s();u();var Qi=typeof Symbol!="undefined"&&Symbol,Sc=Ki();Xi.exports=function(){return typeof Qi!="function"||typeof Symbol!="function"||typeof Qi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Sc()}});var eo=d((Tm,Zi)=>{"use strict";s();u();var Wr={__proto__:null,foo:{}},Ec=Object;Zi.exports=function(){return{__proto__:Wr}.foo===Wr.foo&&!(Wr instanceof Ec)}});var Vr=d((Sm,to)=>{"use strict";s();u();var Pc=Function.prototype.call,Rc=Object.prototype.hasOwnProperty,Fc=me();to.exports=Fc.call(Pc,Rc)});var V=d((Rm,ao)=>{"use strict";s();u();var A,Nc=_r(),Oc=kr(),Uc=Mr(),Bc=Dr(),Me=kt(),ke=R(),$c=Lr(),oo=Function,jr=function(r){try{return oo('"use strict"; return ('+r+").constructor;")()}catch(e){}},ge=Object.getOwnPropertyDescriptor;if(ge)try{ge({},"")}catch(r){ge=null}var Yr=function(){throw new ke},qc=ge?function(){try{return arguments.callee,Yr}catch(r){try{return ge(arguments,"callee").get}catch(e){return Yr}}}():Yr,Ce=Gr()(),Cc=eo()(),N=Object.getPrototypeOf||(Cc?function(r){return r.__proto__}:null),_e={},_c=typeof Uint8Array=="undefined"||!N?A:N(Uint8Array),ve={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?A:ArrayBuffer,"%ArrayIteratorPrototype%":Ce&&N?N([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":_e,"%AsyncGenerator%":_e,"%AsyncGeneratorFunction%":_e,"%AsyncIteratorPrototype%":_e,"%Atomics%":typeof Atomics=="undefined"?A:Atomics,"%BigInt%":typeof BigInt=="undefined"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Nc,"%eval%":eval,"%EvalError%":Oc,"%Float32Array%":typeof Float32Array=="undefined"?A:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?A:FinalizationRegistry,"%Function%":oo,"%GeneratorFunction%":_e,"%Int8Array%":typeof Int8Array=="undefined"?A:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?A:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ce&&N?N(N([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map=="undefined"?A:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ce||!N?A:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?A:Promise,"%Proxy%":typeof Proxy=="undefined"?A:Proxy,"%RangeError%":Uc,"%ReferenceError%":Bc,"%Reflect%":typeof Reflect=="undefined"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?A:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ce||!N?A:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ce&&N?N(""[Symbol.iterator]()):A,"%Symbol%":Ce?Symbol:A,"%SyntaxError%":Me,"%ThrowTypeError%":qc,"%TypedArray%":_c,"%TypeError%":ke,"%Uint8Array%":typeof Uint8Array=="undefined"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?A:Uint32Array,"%URIError%":$c,"%WeakMap%":typeof WeakMap=="undefined"?A:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?A:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?A:WeakSet};if(N)try{null.error}catch(r){ro=N(N(r)),ve["%Error.prototype%"]=ro}var ro,kc=function r(e){var t;if(e==="%AsyncFunction%")t=jr("async function () {}");else if(e==="%GeneratorFunction%")t=jr("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=jr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&N&&(t=N(i.prototype))}return ve[e]=t,t},no={__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"]},Xe=me(),Mt=Vr(),Mc=Xe.call(Function.call,Array.prototype.concat),Dc=Xe.call(Function.apply,Array.prototype.splice),io=Xe.call(Function.call,String.prototype.replace),Dt=Xe.call(Function.call,String.prototype.slice),Lc=Xe.call(Function.call,RegExp.prototype.exec),Gc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Wc=/\\(\\)?/g,Vc=function(e){var t=Dt(e,0,1),n=Dt(e,-1);if(t==="%"&&n!=="%")throw new Me("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Me("invalid intrinsic syntax, expected opening `%`");var i=[];return io(e,Gc,function(o,a,c,f){i[i.length]=c?io(f,Wc,"$1"):a||o}),i},jc=function(e,t){var n=e,i;if(Mt(no,n)&&(i=no[n],n="%"+i[0]+"%"),Mt(ve,n)){var o=ve[n];if(o===_e&&(o=kc(n)),typeof o=="undefined"&&!t)throw new ke("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Me("intrinsic "+e+" does not exist!")};ao.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ke('"allowMissing" argument must be a boolean');if(Lc(/^%?[^%]*%?$/,e)===null)throw new Me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Vc(e),i=n.length>0?n[0]:"",o=jc("%"+i+"%",t),a=o.name,c=o.value,f=!1,v=o.alias;v&&(i=v[0],Dc(n,Mc([0,1],v)));for(var g=1,m=!0;g<n.length;g+=1){var w=n[g],x=Dt(w,0,1),I=Dt(w,-1);if((x==='"'||x==="'"||x==="`"||I==='"'||I==="'"||I==="`")&&x!==I)throw new Me("property names with quotes must have matching quotes");if((w==="constructor"||!m)&&(f=!0),i+="."+w,a="%"+i+"%",Mt(ve,a))c=ve[a];else if(c!=null){if(!(w in c)){if(!t)throw new ke("base intrinsic for "+e+" exists, but the property is not available.");return}if(ge&&g+1>=n.length){var P=ge(c,w);m=!!P,m&&"get"in P&&!("originalValue"in P.get)?c=P.get:c=c[w]}else m=Mt(c,w),c=c[w];m&&!f&&(ve[a]=c)}}return c}});var zr=d((Om,so)=>{"use strict";s();u();so.exports=Object});var po=d(($m,uo)=>{"use strict";s();u();uo.exports=Math.abs});var lo=d((_m,co)=>{"use strict";s();u();co.exports=Math.floor});var yo=d((Dm,fo)=>{"use strict";s();u();fo.exports=Math.max});var mo=d((Wm,ho)=>{"use strict";s();u();ho.exports=Math.min});var vo=d((Ym,go)=>{"use strict";s();u();go.exports=Math.pow});var xo=d((Jm,wo)=>{"use strict";s();u();wo.exports=Math.round});var To=d((Xm,Ao)=>{"use strict";s();u();Ao.exports=Number.isNaN||function(e){return e!==e}});var Io=d((tg,bo)=>{"use strict";s();u();var Yc=To();bo.exports=function(e){return Yc(e)||e===0?e:e<0?-1:1}});var Eo=d((ig,So)=>{"use strict";s();u();So.exports=Object.getOwnPropertyDescriptor});var Ze=d((sg,Po)=>{"use strict";s();u();var Lt=Eo();if(Lt)try{Lt([],"length")}catch(r){Lt=null}Po.exports=Lt});var Wt=d((cg,Ro)=>{"use strict";s();u();var Gt=Object.defineProperty||!1;if(Gt)try{Gt({},"a",{value:1})}catch(r){Gt=!1}Ro.exports=Gt});var Hr=d((yg,Fo)=>{"use strict";s();u();Fo.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 i=42;e[t]=i;for(var o 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 a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,t);if(c.value!==i||c.enumerable!==!0)return!1}return!0}});var Uo=d((mg,Oo)=>{"use strict";s();u();var No=typeof Symbol!="undefined"&&Symbol,zc=Hr();Oo.exports=function(){return typeof No!="function"||typeof Symbol!="function"||typeof No("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zc()}});var Jr=d((wg,Bo)=>{"use strict";s();u();Bo.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Kr=d((Tg,$o)=>{"use strict";s();u();var Hc=zr();$o.exports=Hc.getPrototypeOf||null});var Vt=d((Sg,qo)=>{"use strict";s();u();qo.exports=Function.prototype.call});var Qr=d((Rg,Co)=>{"use strict";s();u();Co.exports=Function.prototype.apply});var ko=d((Og,_o)=>{"use strict";s();u();_o.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Do=d(($g,Mo)=>{"use strict";s();u();var Jc=me(),Kc=Qr(),Qc=Vt(),Xc=ko();Mo.exports=Xc||Jc.call(Qc,Kc)});var Go=d((_g,Lo)=>{"use strict";s();u();var Zc=me(),el=R(),tl=Vt(),rl=Do();Lo.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new el("a function is required");return rl(Zc,tl,e)}});var Ho=d((Dg,zo)=>{"use strict";s();u();var nl=Go(),Wo=Ze(),jo;try{jo=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var Xr=!!jo&&Wo&&Wo(Object.prototype,"__proto__"),Yo=Object,Vo=Yo.getPrototypeOf;zo.exports=Xr&&typeof Xr.get=="function"?nl([Xr.get]):typeof Vo=="function"?function(e){return Vo(e==null?e:Yo(e))}:!1});var Zo=d((Wg,Xo)=>{"use strict";s();u();var Jo=Jr(),Ko=Kr(),Qo=Ho();Xo.exports=Jo?function(e){return Jo(e)}:Ko?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Ko(e)}:Qo?function(e){return Qo(e)}:null});var tn=d((Yg,oa)=>{"use strict";s();u();var T,il=zr(),ol=_r(),al=kr(),sl=Mr(),ul=Dr(),We=kt(),Ge=R(),pl=Lr(),cl=po(),ll=lo(),fl=yo(),yl=mo(),hl=vo(),dl=xo(),ml=Io(),na=Function,Zr=function(r){try{return na('"use strict"; return ('+r+").constructor;")()}catch(e){}},et=Ze(),gl=Wt(),en=function(){throw new Ge},vl=et?function(){try{return arguments.callee,en}catch(r){try{return et(arguments,"callee").get}catch(e){return en}}}():en,De=Uo()(),O=Zo(),wl=Kr(),xl=Jr(),ia=Qr(),tt=Vt(),Le={},Al=typeof Uint8Array=="undefined"||!O?T:O(Uint8Array),we={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?T:ArrayBuffer,"%ArrayIteratorPrototype%":De&&O?O([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Le,"%AsyncGenerator%":Le,"%AsyncGeneratorFunction%":Le,"%AsyncIteratorPrototype%":Le,"%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%":ol,"%eval%":eval,"%EvalError%":al,"%Float32Array%":typeof Float32Array=="undefined"?T:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?T:FinalizationRegistry,"%Function%":na,"%GeneratorFunction%":Le,"%Int8Array%":typeof Int8Array=="undefined"?T:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?T:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":De&&O?O(O([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map=="undefined"?T:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!De||!O?T:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":il,"%Object.getOwnPropertyDescriptor%":et,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?T:Promise,"%Proxy%":typeof Proxy=="undefined"?T:Proxy,"%RangeError%":sl,"%ReferenceError%":ul,"%Reflect%":typeof Reflect=="undefined"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?T:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!De||!O?T:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":De&&O?O(""[Symbol.iterator]()):T,"%Symbol%":De?Symbol:T,"%SyntaxError%":We,"%ThrowTypeError%":vl,"%TypedArray%":Al,"%TypeError%":Ge,"%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%":pl,"%WeakMap%":typeof WeakMap=="undefined"?T:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?T:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?T:WeakSet,"%Function.prototype.call%":tt,"%Function.prototype.apply%":ia,"%Object.defineProperty%":gl,"%Object.getPrototypeOf%":wl,"%Math.abs%":cl,"%Math.floor%":ll,"%Math.max%":fl,"%Math.min%":yl,"%Math.pow%":hl,"%Math.round%":dl,"%Math.sign%":ml,"%Reflect.getPrototypeOf%":xl};if(O)try{null.error}catch(r){ea=O(O(r)),we["%Error.prototype%"]=ea}var ea,Tl=function r(e){var t;if(e==="%AsyncFunction%")t=Zr("async function () {}");else if(e==="%GeneratorFunction%")t=Zr("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Zr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&O&&(t=O(i.prototype))}return we[e]=t,t},ta={__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"]},rt=me(),jt=Vr(),bl=rt.call(tt,Array.prototype.concat),Il=rt.call(ia,Array.prototype.splice),ra=rt.call(tt,String.prototype.replace),Yt=rt.call(tt,String.prototype.slice),Sl=rt.call(tt,RegExp.prototype.exec),El=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pl=/\\(\\)?/g,Rl=function(e){var t=Yt(e,0,1),n=Yt(e,-1);if(t==="%"&&n!=="%")throw new We("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new We("invalid intrinsic syntax, expected opening `%`");var i=[];return ra(e,El,function(o,a,c,f){i[i.length]=c?ra(f,Pl,"$1"):a||o}),i},Fl=function(e,t){var n=e,i;if(jt(ta,n)&&(i=ta[n],n="%"+i[0]+"%"),jt(we,n)){var o=we[n];if(o===Le&&(o=Tl(n)),typeof o=="undefined"&&!t)throw new Ge("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new We("intrinsic "+e+" does not exist!")};oa.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(Sl(/^%?[^%]*%?$/,e)===null)throw new We("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Rl(e),i=n.length>0?n[0]:"",o=Fl("%"+i+"%",t),a=o.name,c=o.value,f=!1,v=o.alias;v&&(i=v[0],Il(n,bl([0,1],v)));for(var g=1,m=!0;g<n.length;g+=1){var w=n[g],x=Yt(w,0,1),I=Yt(w,-1);if((x==='"'||x==="'"||x==="`"||I==='"'||I==="'"||I==="`")&&x!==I)throw new We("property names with quotes must have matching quotes");if((w==="constructor"||!m)&&(f=!0),i+="."+w,a="%"+i+"%",jt(we,a))c=we[a];else if(c!=null){if(!(w in c)){if(!t)throw new Ge("base intrinsic for "+e+" exists, but the property is not available.");return}if(et&&g+1>=n.length){var P=et(c,w);m=!!P,m&&"get"in P&&!("originalValue"in P.get)?c=P.get:c=c[w]}else m=jt(c,w),c=c[w];m&&!f&&(we[a]=c)}}return c}});var rn=d((Jg,ua)=>{"use strict";s();u();var aa=Wt(),Nl=kt(),Ve=R(),sa=Ze();ua.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ve("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Ve("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ve("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ve("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ve("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,f=!!sa&&sa(e,t);if(aa)aa(e,t,{configurable:a===null&&f?f.configurable:!a,enumerable:i===null&&f?f.enumerable:!i,value:n,writable:o===null&&f?f.writable:!o});else if(c||!i&&!o&&!a)e[t]=n;else throw new Nl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var on=d((Xg,ca)=>{"use strict";s();u();var nn=Wt(),pa=function(){return!!nn};pa.hasArrayLengthDefineBug=function(){if(!nn)return null;try{return nn([],"length",{value:1}).length!==1}catch(e){return!0}};ca.exports=pa});var da=d((tv,ha)=>{"use strict";s();u();var Ol=tn(),la=rn(),Ul=on()(),fa=Ze(),ya=R(),Bl=Ol("%Math.floor%");ha.exports=function(e,t){if(typeof e!="function")throw new ya("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Bl(t)!==t)throw new ya("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&fa){var a=fa(e,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(Ul?la(e,"length",t,!0,!0):la(e,"length",t)),e}});var ga=d((iv,ma)=>{"use strict";s();u();var $l=tn(),zt=$l("%Object.defineProperty%",!0)||!1;if(zt)try{zt({},"a",{value:1})}catch(r){zt=!1}ma.exports=zt});var Kt=d((sv,Ht)=>{"use strict";s();u();var an=me(),Jt=V(),ql=da(),Cl=R(),xa=Jt("%Function.prototype.apply%"),Aa=Jt("%Function.prototype.call%"),Ta=Jt("%Reflect.apply%",!0)||an.call(Aa,xa),va=ga(),_l=Jt("%Math.max%");Ht.exports=function(e){if(typeof e!="function")throw new Cl("a function is required");var t=Ta(an,Aa,arguments);return ql(t,1+_l(0,e.length-(arguments.length-1)),!0)};var wa=function(){return Ta(an,xa,arguments)};va?va(Ht.exports,"apply",{value:wa}):Ht.exports.apply=wa});var sn=d((cv,Ia)=>{"use strict";s();u();var ba=Object.prototype.toString;Ia.exports=function(e){var t=ba.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&ba.call(e.callee)==="[object Function]"),n}});var Ba=d((yv,Ua)=>{"use strict";s();u();var Oa;Object.keys||(nt=Object.prototype.hasOwnProperty,un=Object.prototype.toString,Sa=sn(),pn=Object.prototype.propertyIsEnumerable,Ea=!pn.call({toString:null},"toString"),Pa=pn.call(function(){},"prototype"),it=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Qt=function(r){var e=r.constructor;return e&&e.prototype===r},Ra={$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},Fa=function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!Ra["$"+r]&&nt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Qt(window[r])}catch(e){return!0}}catch(e){return!0}return!1}(),Na=function(r){if(typeof window=="undefined"||!Fa)return Qt(r);try{return Qt(r)}catch(e){return!1}},Oa=function(e){var t=e!==null&&typeof e=="object",n=un.call(e)==="[object Function]",i=Sa(e),o=t&&un.call(e)==="[object String]",a=[];if(!t&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var c=Pa&&n;if(o&&e.length>0&&!nt.call(e,0))for(var f=0;f<e.length;++f)a.push(String(f));if(i&&e.length>0)for(var v=0;v<e.length;++v)a.push(String(v));else for(var g in e)!(c&&g==="prototype")&&nt.call(e,g)&&a.push(String(g));if(Ea)for(var m=Na(e),w=0;w<it.length;++w)!(m&&it[w]==="constructor")&&nt.call(e,it[w])&&a.push(it[w]);return a});var nt,un,Sa,pn,Ea,Pa,it,Qt,Ra,Fa,Na;Ua.exports=Oa});var _a=d((mv,Ca)=>{"use strict";s();u();var kl=Array.prototype.slice,Ml=sn(),$a=Object.keys,Xt=$a?function(e){return $a(e)}:Ba(),qa=Object.keys;Xt.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 Ml(n)?qa(kl.call(n)):qa(n)})}else Object.keys=Xt;return Object.keys||Xt};Ca.exports=Xt});var ot=d((wv,La)=>{"use strict";s();u();var Dl=_a(),Ll=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Gl=Object.prototype.toString,Wl=Array.prototype.concat,ka=rn(),Vl=function(r){return typeof r=="function"&&Gl.call(r)==="[object Function]"},Ma=on()(),jl=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!Vl(n)||!n())return}Ma?ka(r,e,t,!0):ka(r,e,t)},Da=function(r,e){var t=arguments.length>2?arguments[2]:{},n=Dl(e);Ll&&(n=Wl.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)jl(r,n[i],e[n[i]],t[n[i]])};Da.supportsDescriptors=!!Ma;La.exports=Da});var D=d((Tv,Va)=>{"use strict";s();u();var Ga=V(),Wa=Kt(),Yl=Wa(Ga("String.prototype.indexOf"));Va.exports=function(e,t){var n=Ga(e,!!t);return typeof n=="function"&&Yl(e,".prototype.")>-1?Wa(n):n}});var za=d((Sv,Ya)=>{"use strict";s();u();var zl=V(),ja=zl("%Array%"),Hl=!ja.isArray&&D()("Object.prototype.toString");Ya.exports=ja.isArray||function(e){return Hl(e)==="[object Array]"}});var cn=d((Rv,Ha)=>{"use strict";s();u();Ha.exports=za()});var Ka=d((Ov,Ja)=>{"use strict";s();u();var Jl=V(),Kl=D(),Ql=R(),Xl=cn(),Zl=Jl("%Reflect.apply%",!0)||Kl("Function.prototype.apply");Ja.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!Xl(n))throw new Ql("Assertion failed: optional `argumentsList`, if provided, must be a List");return Zl(e,t,n)}});function Qa(){throw new Error("setTimeout has not been defined")}function Xa(){throw new Error("clearTimeout has not been defined")}function Za(r){if(ue===setTimeout)return setTimeout(r,0);if((ue===Qa||!ue)&&setTimeout)return ue=setTimeout,setTimeout(r,0);try{return ue(r,0)}catch(e){try{return ue.call(null,r,0)}catch(t){return ue.call(this,r,0)}}}function ef(r){if(pe===clearTimeout)return clearTimeout(r);if((pe===Xa||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(r);try{return pe(r)}catch(e){try{return pe.call(null,r)}catch(t){return pe.call(this,r)}}}function tf(){!Ye||!xe||(Ye=!1,xe.length?ee=xe.concat(ee):Zt=-1,ee.length&&es())}function es(){if(!Ye){var r=Za(tf);Ye=!0;for(var e=ee.length;e;){for(xe=ee,ee=[];++Zt<e;)xe&&xe[Zt].run();Zt=-1,e=ee.length}xe=null,Ye=!1,ef(r)}}function rf(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];ee.push(new ts(r,e)),ee.length===1&&!Ye&&Za(es)}function ts(r,e){this.fun=r,this.array=e}function Ae(){}function xf(r){throw new Error("process.binding is not supported")}function Af(){return"/"}function Tf(r){throw new Error("process.chdir is not supported")}function bf(){return 0}function Sf(r){var e=If.call(je)*.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 Pf(){var r=new Date,e=r-Ef;return e/1e3}var ue,pe,ee,Ye,xe,Zt,nf,of,af,sf,uf,pf,cf,lf,ff,yf,hf,df,mf,gf,vf,wf,je,If,Ef,Rf,at,rs=Be(()=>{"use strict";s();u();ue=Qa,pe=Xa;typeof globalThis.setTimeout=="function"&&(ue=setTimeout);typeof globalThis.clearTimeout=="function"&&(pe=clearTimeout);ee=[],Ye=!1,Zt=-1;ts.prototype.run=function(){this.fun.apply(null,this.array)};nf="browser",of="browser",af=!0,sf={},uf=[],pf="",cf={},lf={},ff={};yf=Ae,hf=Ae,df=Ae,mf=Ae,gf=Ae,vf=Ae,wf=Ae;je=globalThis.performance||{},If=je.now||je.mozNow||je.msNow||je.oNow||je.webkitNow||function(){return new Date().getTime()};Ef=new Date;Rf={nextTick:rf,title:nf,browser:af,env:sf,argv:uf,version:pf,versions:cf,on:yf,addListener:hf,once:df,off:mf,removeListener:gf,removeAllListeners:vf,emit:wf,binding:xf,cwd:Af,chdir:Tf,umask:bf,hrtime:Sf,platform:of,release:lf,config:ff,uptime:Pf},at=Rf});var ln,fn,ns=Be(()=>{"use strict";s();u();typeof Object.create=="function"?ln=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:ln=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};fn=ln});var ls={};Ur(ls,{_extend:()=>An,debuglog:()=>is,default:()=>kf,deprecate:()=>gn,format:()=>nr,inherits:()=>fn,inspect:()=>Y,isArray:()=>vn,isBoolean:()=>ir,isBuffer:()=>us,isDate:()=>rr,isError:()=>ut,isFunction:()=>pt,isNull:()=>ct,isNullOrUndefined:()=>os,isNumber:()=>wn,isObject:()=>Te,isPrimitive:()=>ss,isRegExp:()=>st,isString:()=>lt,isSymbol:()=>as,isUndefined:()=>j,log:()=>ps});function nr(r){if(!lt(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(r).replace(Ff,function(c){if(c==="%%")return"%";if(t>=i)return c;switch(c){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(f){return"[Circular]"}default:return c}}),a=n[t];t<i;a=n[++t])ct(a)||!Te(a)?o+=" "+a:o+=" "+Y(a);return o}function gn(r,e){if(j(globalThis.process))return function(){return gn(r,e).apply(this,arguments)};if(at.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(at.throwDeprecation)throw new Error(e);at.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}function is(r){if(j(yn)&&(yn=at.env.NODE_DEBUG||""),r=r.toUpperCase(),!er[r])if(new RegExp("\\b"+r+"\\b","i").test(yn)){var e=0;er[r]=function(){var t=nr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else er[r]=function(){};return er[r]}function Y(r,e){var t={seen:[],stylize:Of};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),ir(e)?t.showHidden=e:e&&An(t,e),j(t.showHidden)&&(t.showHidden=!1),j(t.depth)&&(t.depth=2),j(t.colors)&&(t.colors=!1),j(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Nf),tr(t,r,t.depth)}function Nf(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Of(r,e){return r}function Uf(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function tr(r,e,t){if(r.customInspect&&e&&pt(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return lt(n)||(n=tr(r,n,t)),n}var i=Bf(r,e);if(i)return i;var o=Object.keys(e),a=Uf(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(e)),ut(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return hn(e);if(o.length===0){if(pt(e)){var c=e.name?": "+e.name:"";return r.stylize("[Function"+c+"]","special")}if(st(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(rr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(ut(e))return hn(e)}var f="",v=!1,g=["{","}"];if(vn(e)&&(v=!0,g=["[","]"]),pt(e)){var m=e.name?": "+e.name:"";f=" [Function"+m+"]"}if(st(e)&&(f=" "+RegExp.prototype.toString.call(e)),rr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),ut(e)&&(f=" "+hn(e)),o.length===0&&(!v||e.length==0))return g[0]+f+g[1];if(t<0)return st(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var w;return v?w=$f(r,e,t,a,o):w=o.map(function(x){return mn(r,e,t,a,x,v)}),r.seen.pop(),qf(w,f,g)}function Bf(r,e){if(j(e))return r.stylize("undefined","undefined");if(lt(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(wn(e))return r.stylize(""+e,"number");if(ir(e))return r.stylize(""+e,"boolean");if(ct(e))return r.stylize("null","null")}function hn(r){return"["+Error.prototype.toString.call(r)+"]"}function $f(r,e,t,n,i){for(var o=[],a=0,c=e.length;a<c;++a)cs(e,String(a))?o.push(mn(r,e,t,n,String(a),!0)):o.push("");return i.forEach(function(f){f.match(/^\d+$/)||o.push(mn(r,e,t,n,f,!0))}),o}function mn(r,e,t,n,i,o){var a,c,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?f.set?c=r.stylize("[Getter/Setter]","special"):c=r.stylize("[Getter]","special"):f.set&&(c=r.stylize("[Setter]","special")),cs(n,i)||(a="["+i+"]"),c||(r.seen.indexOf(f.value)<0?(ct(t)?c=tr(r,f.value,null):c=tr(r,f.value,t-1),c.indexOf(`
2
+ `)>-1&&(o?c=c.split(`
3
+ `).map(function(v){return" "+v}).join(`
4
+ `).substr(2):c=`
5
+ `+c.split(`
6
+ `).map(function(v){return" "+v}).join(`
7
+ `))):c=r.stylize("[Circular]","special")),j(a)){if(o&&i.match(/^\d+$/))return c;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=r.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=r.stylize(a,"string"))}return a+": "+c}function qf(r,e,t){var n=0,i=r.reduce(function(o,a){return n++,a.indexOf(`
8
8
  `)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?t[0]+(e===""?"":e+`
9
9
  `)+" "+r.join(`,
10
- `)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function Gr(r){return Array.isArray(r)}function Gt(r){return typeof r=="boolean"}function Xe(r){return r===null}function qo(r){return r==null}function Wr(r){return typeof r=="number"}function Ze(r){return typeof r=="string"}function ko(r){return typeof r=="symbol"}function W(r){return r===void 0}function Je(r){return ve(r)&&Vr(r)==="[object RegExp]"}function ve(r){return typeof r=="object"&&r!==null}function Dt(r){return ve(r)&&Vr(r)==="[object Date]"}function Ke(r){return ve(r)&&(Vr(r)==="[object Error]"||r instanceof Error)}function Qe(r){return typeof r=="function"}function Mo(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function Do(r){return c.isBuffer(r)}function Vr(r){return Object.prototype.toString.call(r)}function Mr(r){return r<10?"0"+r.toString(10):r.toString(10)}function Up(){var r=new Date,e=[Mr(r.getHours()),Mr(r.getMinutes()),Mr(r.getSeconds())].join(":");return[r.getDate(),Np[r.getMonth()],e].join(" ")}function Lo(){console.log("%s - %s",Up(),Lt.apply(null,arguments))}function Yr(r,e){if(!e||!ve(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function Go(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Ap,kt,qr,Np,Op,Vo=Pe(()=>{"use strict";s();u();$o();Co();Ap=/%[sdj%]/g;kt={};V.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};V.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Np=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Op={inherits:_r,_extend:Yr,log:Lo,isBuffer:Do,isPrimitive:Mo,isFunction:Qe,isError:Ke,isDate:Dt,isObject:ve,isRegExp:Je,isUndefined:W,isSymbol:ko,isString:Ze,isNumber:Wr,isNullOrUndefined:qo,isNull:Xe,isBoolean:Gt,isArray:Gr,inspect:V,deprecate:Lr,format:Lt,debuglog:_o}});var Yo=v((Ad,Wt)=>{"use strict";s();u();var we=(Vo(),Mn(Wo));if(we&&we.default){Wt.exports=we.default;for(let r in we)Wt.exports[r]=we[r]}else we&&(Wt.exports=we)});var zo=v((Ed,jo)=>{"use strict";s();u();jo.exports=Yo().inspect});var nt=v((Fd,ya)=>{"use strict";s();u();var tn=typeof Map=="function"&&Map.prototype,jr=Object.getOwnPropertyDescriptor&&tn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Yt=tn&&jr&&typeof jr.get=="function"?jr.get:null,Ho=tn&&Map.prototype.forEach,rn=typeof Set=="function"&&Set.prototype,zr=Object.getOwnPropertyDescriptor&&rn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,jt=rn&&zr&&typeof zr.get=="function"?zr.get:null,Jo=rn&&Set.prototype.forEach,Bp=typeof WeakMap=="function"&&WeakMap.prototype,tt=Bp?WeakMap.prototype.has:null,$p=typeof WeakSet=="function"&&WeakSet.prototype,rt=$p?WeakSet.prototype.has:null,Cp=typeof WeakRef=="function"&&WeakRef.prototype,Ko=Cp?WeakRef.prototype.deref:null,_p=Boolean.prototype.valueOf,qp=Object.prototype.toString,kp=Function.prototype.toString,Mp=String.prototype.match,nn=String.prototype.slice,se=String.prototype.replace,Dp=String.prototype.toUpperCase,Qo=String.prototype.toLowerCase,aa=RegExp.prototype.test,Xo=Array.prototype.concat,Y=Array.prototype.join,Lp=Array.prototype.slice,Zo=Math.floor,Kr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Hr=Object.getOwnPropertySymbols,Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ke=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ke||!0)?Symbol.toStringTag:null,sa=Object.prototype.propertyIsEnumerable,ea=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ta(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||aa.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Zo(-r):Zo(r);if(n!==r){var i=String(n),o=nn.call(e,i.length+1);return se.call(i,t,"$&_")+"."+se.call(se.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return se.call(e,t,"$&_")}var Xr=zo(),ra=Xr.custom,na=pa(ra)?ra:null,ua={__proto__:null,double:'"',single:"'"},Gp={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ya.exports=function r(e,t,n,i){var o=t||{};if(X(o,"quoteStyle")&&!X(ua,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=X(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=o.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 fa(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return p?ta(e,l):l}if(typeof e=="bigint"){var m=String(e)+"n";return p?ta(e,m):m}var g=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=g&&g>0&&typeof e=="object")return Zr(e)?"[Array]":"[Object]";var d=al(o,n);if(typeof i=="undefined")i=[];else if(la(i,e)>=0)return"[Circular]";function w(Re,gt,Ds){if(gt&&(i=Lp.call(i),i.push(gt)),Ds){var On={depth:o.depth};return X(o,"quoteStyle")&&(On.quoteStyle=o.quoteStyle),r(Re,On,n+1,i)}return r(Re,o,n+1,i)}if(typeof e=="function"&&!ia(e)){var I=Qp(e),S=Vt(e,w);return"[Function"+(I?": "+I:" (anonymous)")+"]"+(S.length>0?" { "+Y.call(S,", ")+" }":"")}if(pa(e)){var E=ke?se.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Qr.call(e);return typeof e=="object"&&!ke?et(E):E}if(nl(e)){for(var U="<"+Qo.call(String(e.nodeName)),$=e.attributes||[],H=0;H<$.length;H++)U+=" "+$[H].name+"="+ca(Wp($[H].value),"double",o);return U+=">",e.childNodes&&e.childNodes.length&&(U+="..."),U+="</"+Qo.call(String(e.nodeName))+">",U}if(Zr(e)){if(e.length===0)return"[]";var pe=Vt(e,w);return d&&!ol(pe)?"["+en(pe,d)+"]":"[ "+Y.call(pe,", ")+" ]"}if(Yp(e)){var Ge=Vt(e,w);return!("cause"in Error.prototype)&&"cause"in e&&!sa.call(e,"cause")?"{ ["+String(e)+"] "+Y.call(Xo.call("[cause]: "+w(e.cause),Ge),", ")+" }":Ge.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Y.call(Ge,", ")+" }"}if(typeof e=="object"&&a){if(na&&typeof e[na]=="function"&&Xr)return Xr(e,{depth:g-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Xp(e)){var mt=[];return Ho&&Ho.call(e,function(Re,gt){mt.push(w(gt,e,!0)+" => "+w(Re,e))}),oa("Map",Yt.call(e),mt,d)}if(tl(e)){var Fn=[];return Jo&&Jo.call(e,function(Re){Fn.push(w(Re,e))}),oa("Set",jt.call(e),Fn,d)}if(Zp(e))return Jr("WeakMap");if(rl(e))return Jr("WeakSet");if(el(e))return Jr("WeakRef");if(zp(e))return et(w(Number(e)));if(Jp(e))return et(w(Kr.call(e)));if(Hp(e))return et(_p.call(e));if(jp(e))return et(w(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(!Vp(e)&&!ia(e)){var pr=Vt(e,w),Nn=ea?ea(e)===Object.prototype:e instanceof Object||e.constructor===Object,lr=e instanceof Object?"":"null prototype",Un=!Nn&&N&&Object(e)===e&&N in e?nn.call(ue(e),8,-1):lr?"Object":"",Ms=Nn||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",fr=Ms+(Un||lr?"["+Y.call(Xo.call([],Un||[],lr||[]),": ")+"] ":"");return pr.length===0?fr+"{}":d?fr+"{"+en(pr,d)+"}":fr+"{ "+Y.call(pr,", ")+" }"}return String(e)};function ca(r,e,t){var n=t.quoteStyle||e,i=ua[n];return i+r+i}function Wp(r){return se.call(String(r),/"/g,"&quot;")}function Zr(r){return ue(r)==="[object Array]"&&(!N||!(typeof r=="object"&&N in r))}function Vp(r){return ue(r)==="[object Date]"&&(!N||!(typeof r=="object"&&N in r))}function ia(r){return ue(r)==="[object RegExp]"&&(!N||!(typeof r=="object"&&N in r))}function Yp(r){return ue(r)==="[object Error]"&&(!N||!(typeof r=="object"&&N in r))}function jp(r){return ue(r)==="[object String]"&&(!N||!(typeof r=="object"&&N in r))}function zp(r){return ue(r)==="[object Number]"&&(!N||!(typeof r=="object"&&N in r))}function Hp(r){return ue(r)==="[object Boolean]"&&(!N||!(typeof r=="object"&&N in r))}function pa(r){if(ke)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Qr)return!1;try{return Qr.call(r),!0}catch(e){}return!1}function Jp(r){if(!r||typeof r!="object"||!Kr)return!1;try{return Kr.call(r),!0}catch(e){}return!1}var Kp=Object.prototype.hasOwnProperty||function(r){return r in this};function X(r,e){return Kp.call(r,e)}function ue(r){return qp.call(r)}function Qp(r){if(r.name)return r.name;var e=Mp.call(kp.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function la(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 Xp(r){if(!Yt||!r||typeof r!="object")return!1;try{Yt.call(r);try{jt.call(r)}catch(e){return!0}return r instanceof Map}catch(e){}return!1}function Zp(r){if(!tt||!r||typeof r!="object")return!1;try{tt.call(r,tt);try{rt.call(r,rt)}catch(e){return!0}return r instanceof WeakMap}catch(e){}return!1}function el(r){if(!Ko||!r||typeof r!="object")return!1;try{return Ko.call(r),!0}catch(e){}return!1}function tl(r){if(!jt||!r||typeof r!="object")return!1;try{jt.call(r);try{Yt.call(r)}catch(e){return!0}return r instanceof Set}catch(e){}return!1}function rl(r){if(!rt||!r||typeof r!="object")return!1;try{rt.call(r,rt);try{tt.call(r,tt)}catch(e){return!0}return r instanceof WeakSet}catch(e){}return!1}function nl(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function fa(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return fa(nn.call(r,0,e.maxStringLength),e)+n}var i=Gp[e.quoteStyle||"single"];i.lastIndex=0;var o=se.call(se.call(r,i,"\\$1"),/[\x00-\x1f]/g,il);return ca(o,"single",e)}function il(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":"")+Dp.call(e.toString(16))}function et(r){return"Object("+r+")"}function Jr(r){return r+" { ? }"}function oa(r,e,t,n){var i=n?en(t,n):Y.call(t,", ");return r+" ("+e+") {"+i+"}"}function ol(r){for(var e=0;e<r.length;e++)if(la(r[e],`
11
- `)>=0)return!1;return!0}function al(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Y.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Y.call(Array(e+1),t)}}function en(r,e){if(r.length===0)return"";var t=`
12
- `+e.prev+e.base;return t+Y.call(r,","+t)+`
13
- `+e.prev}function Vt(r,e){var t=Zr(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=X(r,i)?e(r[i],r):""}var o=typeof Hr=="function"?Hr(r):[],a;if(ke){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=o[p]}for(var l in r)X(r,l)&&(t&&String(Number(l))===l&&l<r.length||ke&&a["$"+l]instanceof Symbol||(aa.call(/[^\w$]/,l)?n.push(e(l,r)+": "+e(r[l],r)):n.push(l+": "+e(r[l],r))));if(typeof Hr=="function")for(var m=0;m<o.length;m++)sa.call(r,o[m])&&n.push("["+e(o[m])+"]: "+e(r[o[m]],r));return n}});var zt=v((Od,ha)=>{"use strict";s();u();ha.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var ma=v((Cd,da)=>{"use strict";s();u();var sl=F(),ul=nt(),cl=zt();da.exports=function(e,t){if(!cl(t))throw new sl("Assertion failed: IsPropertyKey(P) is not true, got "+ul(t));return e[t]}});var xa=v((kd,wa)=>{"use strict";s();u();var va=Function.prototype.toString,Me=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,an,Ht;if(typeof Me=="function"&&typeof Object.defineProperty=="function")try{an=Object.defineProperty({},"length",{get:function(){throw Ht}}),Ht={},Me(function(){throw 42},null,an)}catch(r){r!==Ht&&(Me=null)}else Me=null;var pl=/^\s*class\b/,sn=function(e){try{var t=va.call(e);return pl.test(t)}catch(n){return!1}},on=function(e){try{return sn(e)?!1:(va.call(e),!0)}catch(t){return!1}},Jt=Object.prototype.toString,ll="[object Object]",fl="[object Function]",yl="[object GeneratorFunction]",hl="[object HTMLAllCollection]",dl="[object HTML document.all class]",ml="[object HTMLCollection]",gl=typeof Symbol=="function"&&!!Symbol.toStringTag,vl=!(0 in[,]),un=function(){return!1};typeof document=="object"&&(ga=document.all,Jt.call(ga)===Jt.call(document.all)&&(un=function(e){if((vl||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var t=Jt.call(e);return(t===hl||t===dl||t===ml||t===ll)&&e("")==null}catch(n){}return!1}));var ga;wa.exports=Me?function(e){if(un(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Me(e,null,an)}catch(t){if(t!==Ht)return!1}return!sn(e)&&on(e)}:function(e){if(un(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(gl)return on(e);if(sn(e))return!1;var t=Jt.call(e);return t!==fl&&t!==yl&&!/^\[object HTML/.test(t)?!1:on(e)}});var cn=v((Ld,Ta)=>{"use strict";s();u();Ta.exports=xa()});var Sa=v((Vd,ba)=>{"use strict";s();u();var Ia=F(),wl=ma(),xl=cn(),Tl=zt(),Aa=nt();ba.exports=function(e,t){if(!Tl(t))throw new Ia("Assertion failed: IsPropertyKey(P) is not true");var n=wl(e,t);if(n!=null){if(!xl(n))throw new Ia(Aa(t)+" is not a function: "+Aa(n));return n}}});var Ra=v((zd,Ea)=>{"use strict";s();u();var Il=Tr();Ea.exports=function(){return Il()&&!!Symbol.toStringTag}});var yn=v((Kd,Ua)=>{"use strict";s();u();var pn=M(),Pa=Ra()(),Fa,Na,ln,fn;Pa&&(Fa=pn("Object.prototype.hasOwnProperty"),Na=pn("RegExp.prototype.exec"),ln={},Kt=function(){throw ln},fn={toString:Kt,valueOf:Kt},typeof Symbol.toPrimitive=="symbol"&&(fn[Symbol.toPrimitive]=Kt));var Kt,Al=pn("Object.prototype.toString"),bl=Object.getOwnPropertyDescriptor,Sl="[object RegExp]";Ua.exports=Pa?function(e){if(!e||typeof e!="object")return!1;var t=bl(e,"lastIndex"),n=t&&Fa(t,"value");if(!n)return!1;try{Na(e,fn)}catch(i){return i===ln}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Al(e)===Sl}});var hn=v((Zd,Oa)=>{"use strict";s();u();var El=M(),Rl=yn(),Pl=El("RegExp.prototype.exec"),Fl=F();Oa.exports=function(e){if(!Rl(e))throw new Fl("`regex` must be a RegExp");return function(n){return Pl(e,n)!==null}}});var $a=v((rm,Ba)=>{"use strict";s();u();Ba.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}});var _a=v((om,Ca)=>{"use strict";s();u();Ca.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var dn=v((um,qa)=>{"use strict";s();u();var Nl=_a();qa.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":Nl(e)}});var Da=v((lm,Ma)=>{"use strict";s();u();var ka=F(),Ul=nt(),Ol=zt(),Bl=dn();Ma.exports=function(e,t){if(Bl(e)!=="Object")throw new ka("Assertion failed: Type(O) is not Object");if(!Ol(t))throw new ka("Assertion failed: IsPropertyKey(P) is not true, got "+Ul(t));return e[t]}});var Ga=v((hm,La)=>{"use strict";s();u();var $l=C();La.exports=$l("%Math.min%")});var mn=v((gm,Wa)=>{"use strict";s();u();Wa.exports=Number.isNaN||function(e){return e!==e}});var Ya=v((xm,Va)=>{"use strict";s();u();var Cl=mn();Va.exports=function(r){return(typeof r=="number"||typeof r=="bigint")&&!Cl(r)&&r!==1/0&&r!==-1/0}});var Qt=v((Am,za)=>{"use strict";s();u();var ja=C(),_l=ja("%Math.abs%"),ql=ja("%Math.floor%"),kl=mn(),Ml=Ya();za.exports=function(e){if(typeof e!="number"||kl(e)||!Ml(e))return!1;var t=_l(e);return ql(t)===t}});var vn=v((Em,Ha)=>{"use strict";s();u();var Dl=M(),gn=F(),Ll=Qt(),Gl=Dl("String.prototype.slice");Ha.exports=function(e,t,n){if(typeof e!="string")throw new gn("Assertion failed: `string` must be a String");if(typeof t!="string")throw new gn("Assertion failed: `searchValue` must be a String");if(!Ll(n)||n<0)throw new gn("Assertion failed: `fromIndex` must be a non-negative integer");var i=e.length;if(t===""&&n<=i)return n;for(var o=t.length,a=n;a<=i-o;a+=1){var p=Gl(e,a,a+o);if(p===t)return a}return-1}});var Xt=v((Fm,Ja)=>{"use strict";s();u();var Wl=F();Ja.exports=function(e){if(e==null)throw new Wl(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var Zt=v((Om,Ka)=>{"use strict";s();u();var Vl=C(),Yl=Vl("%String%"),jl=F();Ka.exports=function(e){if(typeof e=="symbol")throw new jl("Cannot convert a Symbol value to a string");return Yl(e)}});var wn=v((Cm,Za)=>{"use strict";s();u();var zl=Xt(),Hl=Zt(),Jl=M(),Qa=Jl("String.prototype.replace"),Xa=/^\s$/.test("\u180E"),Kl=Xa?/^[\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]+/,Ql=Xa?/[\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]+$/;Za.exports=function(){var e=Hl(zl(this));return Qa(Qa(e,Kl,""),Ql,"")}});var xn=v((km,ts)=>{"use strict";s();u();var Xl=wn(),es="\u200B",De="\u180E";ts.exports=function(){return String.prototype.trim&&es.trim()===es&&De.trim()===De&&("_"+De).trim()==="_"+De&&(De+"_").trim()===De+"_"?String.prototype.trim:Xl}});var ns=v((Lm,rs)=>{"use strict";s();u();var Zl=ze(),ef=xn();rs.exports=function(){var e=ef();return Zl(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var ss=v((Vm,as)=>{"use strict";s();u();var tf=$t(),rf=ze(),nf=Xt(),of=wn(),is=xn(),af=ns(),sf=tf(is()),os=function(e){return nf(e),sf(e)};rf(os,{getPolyfill:is,implementation:of,shim:af});as.exports=os});var ls=v((zm,ps)=>{"use strict";s();u();var In=C(),Tn=In("%Number%"),uf=In("%RegExp%"),cf=F(),us=In("%parseInt%"),pf=M(),er=hn(),cs=pf("String.prototype.slice"),lf=er(/^0b[01]+$/i),ff=er(/^0o[0-7]+$/i),yf=er(/^[-+]0x[0-9a-f]+$/i),hf=["\x85","\u200B","\uFFFE"].join(""),df=new uf("["+hf+"]","g"),mf=er(df),gf=ss();ps.exports=function r(e){if(typeof e!="string")throw new cf("Assertion failed: `argument` is not a String");if(lf(e))return Tn(us(cs(e,2),2));if(ff(e))return Tn(us(cs(e,2),8));if(mf(e)||yf(e))return NaN;var t=gf(e);return t!==e?r(t):Tn(e)}});var hs=v((Km,ys)=>{"use strict";s();u();var vf=F(),fs=Qt(),wf=M(),xf=wf("String.prototype.slice");ys.exports=function(e,t,n){if(typeof e!="string"||!fs(t)||arguments.length>2&&!fs(n))throw new vf("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return xf(e,t,arguments.length>2?n:e.length)}});var ms=v((Zm,ds)=>{"use strict";s();u();ds.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var vs=v((rg,gs)=>{"use strict";s();u();var Tf=M()("String.prototype.slice");gs.exports=function(e,t){return e===t?!0:e.length>t.length?!1:Tf(t,0,e.length)===e}});var As=v((og,Is)=>{"use strict";s();u();var Z=F(),Ts=hn(),If=$a(),An=nt(),Af=Da(),bf=$r(),Sf=Ga(),Ef=vn(),ws=ls(),ee=hs(),Rf=Zt(),xs=dn(),Pf=Qt(),Ff=ms(),it=vs(),Nf=Ts(/^\$[0-9]/),Uf=Ts(/^\$[0-9][0-9]/);Is.exports=function(e,t,n,i,o,a){if(typeof e!="string")throw new Z("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new Z("Assertion failed: `str` must be a String");if(!Pf(n)||n<0)throw new Z("Assertion failed: `position` must be a nonnegative integer, got "+An(n));if(!bf(i)||!If(i,Ff))throw new Z("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+An(i));if(typeof o!="undefined"&&xs(o)!=="Object")throw new Z("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new Z("Assertion failed: `replacementTemplate` must be a String");var p=t.length;if(n>p)throw new Z("Assertion failed: position > stringLength, got "+An(n));for(var l=a,m="";l!=="";){var g,d,w;if(it("$$",l))g="$$",d="$";else if(it("$`",l))g="$`",d=ee(t,0,n);else if(it("$&",l))g="$&",d=e;else if(it("$'",l)){g="$'";var I=e.length,S=n+I;d=ee(t,Sf(S,p))}else if(Nf(l)){var E=Uf(l)?2:1,U=ee(l,1,1+E),$=ws(U);if($<0||$>99)throw new Z("Assertion failed: `index` must be >= 0 and <= 99");var H=i.length;$>H&&E===2&&(E=1,U=ee(U,0,1),$=ws(U)),g=ee(l,0,1+E),1<=$&&$<=H?(w=i[$-1],typeof w=="undefined"?d="":d=w):d=g}else if(it("$<",l)){var pe=Ef(l,">",0);if(pe===-1||typeof o=="undefined")g="$<",d=g;else{g=ee(l,0,pe+1);var Ge=ee(l,2,pe);if(xs(o)!=="Object")throw new Z("Assertion failed: Type(namedCaptures) is not Object");w=Af(o,Ge),typeof w=="undefined"?d="":d=Rf(w)}}else g=ee(l,0,1),d=g;var mt=g.length;l=ee(l,mt),m+=d}return m}});var Sn=v((ug,Rs)=>{"use strict";s();u();var bs=Po(),Of=Sa(),Bf=As(),$f=cn(),Cf=Xt(),tr=Zt(),Ss=vn(),_f=C(),rr=M(),qf=Ir()(),kf=yn(),Mf=_f("%Math.max%"),Es=F(),Df=rr("Array.prototype.push"),bn=rr("String.prototype.slice"),Lf=rr("String.prototype.indexOf"),Gf=rr("String.prototype.replace");Rs.exports=function(e,t){var n=Cf(this),i=kf(e);if(i&&Lf(bn(e,e.source.length+2),"g")===-1)throw new Es("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(qf&&Symbol.replace){if(e!=null){var o=Of(e,Symbol.replace);if(typeof o!="undefined")return bs(o,e,[n,t])}}else if(i)return Gf(n,e,t);var a=tr(n),p=tr(e),l=$f(t);l||(t=tr(t));for(var m=p.length,g=Mf(1,m),d=[],w=Ss(a,p,0);w!==-1;)Df(d,w),w=Ss(a,p,w+g);for(var I=0,S="",E=0;E<d.length;E+=1){var U;if(l)U=tr(bs(t,void 0,[p,d[E],a]));else{if(typeof t!="string")throw new Es("Assertion failed: `replaceValue` should be a string at this point");var $=[];U=Bf(p,a,d[E],$,void 0,t)}var H=bn(a,I,d[E]);S+=H+U,I=d[E]+m}return I<a.length&&(S+=bn(a,I)),S}});var En=v((lg,Ps)=>{"use strict";s();u();var Wf=Sn();Ps.exports=function(){return String.prototype.replaceAll||Wf}});var Ns=v((hg,Fs)=>{"use strict";s();u();var Vf=ze(),Yf=En();Fs.exports=function(){var e=Yf();return Vf(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var $s=v((gg,Bs)=>{"use strict";s();u();var jf=$t(),zf=ze(),Us=Sn(),Hf=En(),Jf=Ns(),Os=jf(Us);zf(Os,{getPolyfill:Hf,implementation:Us,shim:Jf});Bs.exports=Os});var Fy={};dr(Fy,{DynamicSnippetsGenerator:()=>cr});module.exports=Mn(Fy);s();u();var mT=zs($s(),1);s();u();s();u();s();u();function A(r){throw new Error("Unexpected value: "+JSON.stringify(r))}s();u();function ot(r){return Object.keys(r)}s();u();s();u();var xe=class{};s();u();s();u();var ce=class extends xe{constructor(t){super();h(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):this.value(t)}};var Kf=4,at=class{constructor(){h(this,"buffer","");h(this,"indentLevel",0);h(this,"hasWrittenAnything",!1);h(this,"lastCharacterIsNewline",!1)}write(e){let t=e.length>0&&e.endsWith(`
10
+ `)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function vn(r){return Array.isArray(r)}function ir(r){return typeof r=="boolean"}function ct(r){return r===null}function os(r){return r==null}function wn(r){return typeof r=="number"}function lt(r){return typeof r=="string"}function as(r){return typeof r=="symbol"}function j(r){return r===void 0}function st(r){return Te(r)&&xn(r)==="[object RegExp]"}function Te(r){return typeof r=="object"&&r!==null}function rr(r){return Te(r)&&xn(r)==="[object Date]"}function ut(r){return Te(r)&&(xn(r)==="[object Error]"||r instanceof Error)}function pt(r){return typeof r=="function"}function ss(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function us(r){return p.isBuffer(r)}function xn(r){return Object.prototype.toString.call(r)}function dn(r){return r<10?"0"+r.toString(10):r.toString(10)}function _f(){var r=new Date,e=[dn(r.getHours()),dn(r.getMinutes()),dn(r.getSeconds())].join(":");return[r.getDate(),Cf[r.getMonth()],e].join(" ")}function ps(){console.log("%s - %s",_f(),nr.apply(null,arguments))}function An(r,e){if(!e||!Te(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function cs(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Ff,er,yn,Cf,kf,fs=Be(()=>{"use strict";s();u();rs();ns();Ff=/%[sdj%]/g;er={};Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Cf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];kf={inherits:fn,_extend:An,log:ps,isBuffer:us,isPrimitive:ss,isFunction:pt,isError:ut,isDate:rr,isObject:Te,isRegExp:st,isUndefined:j,isSymbol:as,isString:lt,isNumber:wn,isNullOrUndefined:os,isNull:ct,isBoolean:ir,isArray:vn,inspect:Y,deprecate:gn,format:nr,debuglog:is}});var ys=d((Vv,or)=>{"use strict";s();u();var be=(fs(),hi(ls));if(be&&be.default){or.exports=be.default;for(let r in be)or.exports[r]=be[r]}else be&&(or.exports=be)});var ds=d((zv,hs)=>{"use strict";s();u();hs.exports=ys().inspect});var dt=d((Kv,qs)=>{"use strict";s();u();var On=typeof Map=="function"&&Map.prototype,Tn=Object.getOwnPropertyDescriptor&&On?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,sr=On&&Tn&&typeof Tn.get=="function"?Tn.get:null,ms=On&&Map.prototype.forEach,Un=typeof Set=="function"&&Set.prototype,bn=Object.getOwnPropertyDescriptor&&Un?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ur=Un&&bn&&typeof bn.get=="function"?bn.get:null,gs=Un&&Set.prototype.forEach,Mf=typeof WeakMap=="function"&&WeakMap.prototype,yt=Mf?WeakMap.prototype.has:null,Df=typeof WeakSet=="function"&&WeakSet.prototype,ht=Df?WeakSet.prototype.has:null,Lf=typeof WeakRef=="function"&&WeakRef.prototype,vs=Lf?WeakRef.prototype.deref:null,Gf=Boolean.prototype.valueOf,Wf=Object.prototype.toString,Vf=Function.prototype.toString,jf=String.prototype.match,Bn=String.prototype.slice,ce=String.prototype.replace,Yf=String.prototype.toUpperCase,ws=String.prototype.toLowerCase,Rs=RegExp.prototype.test,xs=Array.prototype.concat,z=Array.prototype.join,zf=Array.prototype.slice,As=Math.floor,En=typeof BigInt=="function"?BigInt.prototype.valueOf:null,In=Object.getOwnPropertySymbols,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ze=typeof Symbol=="function"&&typeof Symbol.iterator=="object",U=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ze||!0)?Symbol.toStringTag:null,Fs=Object.prototype.propertyIsEnumerable,Ts=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function bs(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Rs.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-As(-r):As(r);if(n!==r){var i=String(n),o=Bn.call(e,i.length+1);return ce.call(i,t,"$&_")+"."+ce.call(ce.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ce.call(e,t,"$&_")}var Rn=ds(),Is=Rn.custom,Ss=Us(Is)?Is:null,Ns={__proto__:null,double:'"',single:"'"},Hf={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};qs.exports=function r(e,t,n,i){var o=t||{};if(te(o,"quoteStyle")&&!te(Ns,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=te(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=o.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 $s(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return c?bs(e,f):f}if(typeof e=="bigint"){var v=String(e)+"n";return c?bs(e,v):v}var g=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=g&&g>0&&typeof e=="object")return Fn(e)?"[Array]":"[Object]";var m=fy(o,n);if(typeof i=="undefined")i=[];else if(Bs(i,e)>=0)return"[Circular]";function w(Ue,Ft,up){if(Ft&&(i=zf.call(i),i.push(Ft)),up){var si={depth:o.depth};return te(o,"quoteStyle")&&(si.quoteStyle=o.quoteStyle),r(Ue,si,n+1,i)}return r(Ue,o,n+1,i)}if(typeof e=="function"&&!Es(e)){var x=ny(e),I=ar(e,w);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(I.length>0?" { "+z.call(I,", ")+" }":"")}if(Us(e)){var P=ze?ce.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Pn.call(e);return typeof e=="object"&&!ze?ft(P):P}if(py(e)){for(var B="<"+ws.call(String(e.nodeName)),C=e.attributes||[],Q=0;Q<C.length;Q++)B+=" "+C[Q].name+"="+Os(Jf(C[Q].value),"double",o);return B+=">",e.childNodes&&e.childNodes.length&&(B+="..."),B+="</"+ws.call(String(e.nodeName))+">",B}if(Fn(e)){if(e.length===0)return"[]";var fe=ar(e,w);return m&&!ly(fe)?"["+Nn(fe,m)+"]":"[ "+z.call(fe,", ")+" ]"}if(Qf(e)){var Ke=ar(e,w);return!("cause"in Error.prototype)&&"cause"in e&&!Fs.call(e,"cause")?"{ ["+String(e)+"] "+z.call(xs.call("[cause]: "+w(e.cause),Ke),", ")+" }":Ke.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+z.call(Ke,", ")+" }"}if(typeof e=="object"&&a){if(Ss&&typeof e[Ss]=="function"&&Rn)return Rn(e,{depth:g-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(iy(e)){var Rt=[];return ms&&ms.call(e,function(Ue,Ft){Rt.push(w(Ft,e,!0)+" => "+w(Ue,e))}),Ps("Map",sr.call(e),Rt,m)}if(sy(e)){var ii=[];return gs&&gs.call(e,function(Ue){ii.push(w(Ue,e))}),Ps("Set",ur.call(e),ii,m)}if(oy(e))return Sn("WeakMap");if(uy(e))return Sn("WeakSet");if(ay(e))return Sn("WeakRef");if(Zf(e))return ft(w(Number(e)));if(ty(e))return ft(w(En.call(e)));if(ey(e))return ft(Gf.call(e));if(Xf(e))return ft(w(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(!Kf(e)&&!Es(e)){var Pr=ar(e,w),oi=Ts?Ts(e)===Object.prototype:e instanceof Object||e.constructor===Object,Rr=e instanceof Object?"":"null prototype",ai=!oi&&U&&Object(e)===e&&U in e?Bn.call(le(e),8,-1):Rr?"Object":"",sp=oi||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Fr=sp+(ai||Rr?"["+z.call(xs.call([],ai||[],Rr||[]),": ")+"] ":"");return Pr.length===0?Fr+"{}":m?Fr+"{"+Nn(Pr,m)+"}":Fr+"{ "+z.call(Pr,", ")+" }"}return String(e)};function Os(r,e,t){var n=t.quoteStyle||e,i=Ns[n];return i+r+i}function Jf(r){return ce.call(String(r),/"/g,"&quot;")}function Fn(r){return le(r)==="[object Array]"&&(!U||!(typeof r=="object"&&U in r))}function Kf(r){return le(r)==="[object Date]"&&(!U||!(typeof r=="object"&&U in r))}function Es(r){return le(r)==="[object RegExp]"&&(!U||!(typeof r=="object"&&U in r))}function Qf(r){return le(r)==="[object Error]"&&(!U||!(typeof r=="object"&&U in r))}function Xf(r){return le(r)==="[object String]"&&(!U||!(typeof r=="object"&&U in r))}function Zf(r){return le(r)==="[object Number]"&&(!U||!(typeof r=="object"&&U in r))}function ey(r){return le(r)==="[object Boolean]"&&(!U||!(typeof r=="object"&&U in r))}function Us(r){if(ze)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Pn)return!1;try{return Pn.call(r),!0}catch(e){}return!1}function ty(r){if(!r||typeof r!="object"||!En)return!1;try{return En.call(r),!0}catch(e){}return!1}var ry=Object.prototype.hasOwnProperty||function(r){return r in this};function te(r,e){return ry.call(r,e)}function le(r){return Wf.call(r)}function ny(r){if(r.name)return r.name;var e=jf.call(Vf.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Bs(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 iy(r){if(!sr||!r||typeof r!="object")return!1;try{sr.call(r);try{ur.call(r)}catch(e){return!0}return r instanceof Map}catch(e){}return!1}function oy(r){if(!yt||!r||typeof r!="object")return!1;try{yt.call(r,yt);try{ht.call(r,ht)}catch(e){return!0}return r instanceof WeakMap}catch(e){}return!1}function ay(r){if(!vs||!r||typeof r!="object")return!1;try{return vs.call(r),!0}catch(e){}return!1}function sy(r){if(!ur||!r||typeof r!="object")return!1;try{ur.call(r);try{sr.call(r)}catch(e){return!0}return r instanceof Set}catch(e){}return!1}function uy(r){if(!ht||!r||typeof r!="object")return!1;try{ht.call(r,ht);try{yt.call(r,yt)}catch(e){return!0}return r instanceof WeakSet}catch(e){}return!1}function py(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function $s(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return $s(Bn.call(r,0,e.maxStringLength),e)+n}var i=Hf[e.quoteStyle||"single"];i.lastIndex=0;var o=ce.call(ce.call(r,i,"\\$1"),/[\x00-\x1f]/g,cy);return Os(o,"single",e)}function cy(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":"")+Yf.call(e.toString(16))}function ft(r){return"Object("+r+")"}function Sn(r){return r+" { ? }"}function Ps(r,e,t,n){var i=n?Nn(t,n):z.call(t,", ");return r+" ("+e+") {"+i+"}"}function ly(r){for(var e=0;e<r.length;e++)if(Bs(r[e],`
11
+ `)>=0)return!1;return!0}function fy(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=z.call(Array(r.indent+1)," ");else return null;return{base:t,prev:z.call(Array(e+1),t)}}function Nn(r,e){if(r.length===0)return"";var t=`
12
+ `+e.prev+e.base;return t+z.call(r,","+t)+`
13
+ `+e.prev}function ar(r,e){var t=Fn(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=te(r,i)?e(r[i],r):""}var o=typeof In=="function"?In(r):[],a;if(ze){a={};for(var c=0;c<o.length;c++)a["$"+o[c]]=o[c]}for(var f in r)te(r,f)&&(t&&String(Number(f))===f&&f<r.length||ze&&a["$"+f]instanceof Symbol||(Rs.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r))));if(typeof In=="function")for(var v=0;v<o.length;v++)Fs.call(r,o[v])&&n.push("["+e(o[v])+"]: "+e(r[o[v]],r));return n}});var pr=d((Zv,Cs)=>{"use strict";s();u();Cs.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var ks=d((r0,_s)=>{"use strict";s();u();var yy=R(),hy=dt(),dy=pr();_s.exports=function(e,t){if(!dy(t))throw new yy("Assertion failed: IsPropertyKey(P) is not true, got "+hy(t));return e[t]}});var Gs=d((o0,Ls)=>{"use strict";s();u();var Ds=Function.prototype.toString,He=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qn,cr;if(typeof He=="function"&&typeof Object.defineProperty=="function")try{qn=Object.defineProperty({},"length",{get:function(){throw cr}}),cr={},He(function(){throw 42},null,qn)}catch(r){r!==cr&&(He=null)}else He=null;var my=/^\s*class\b/,Cn=function(e){try{var t=Ds.call(e);return my.test(t)}catch(n){return!1}},$n=function(e){try{return Cn(e)?!1:(Ds.call(e),!0)}catch(t){return!1}},lr=Object.prototype.toString,gy="[object Object]",vy="[object Function]",wy="[object GeneratorFunction]",xy="[object HTMLAllCollection]",Ay="[object HTML document.all class]",Ty="[object HTMLCollection]",by=typeof Symbol=="function"&&!!Symbol.toStringTag,Iy=!(0 in[,]),_n=function(){return!1};typeof document=="object"&&(Ms=document.all,lr.call(Ms)===lr.call(document.all)&&(_n=function(e){if((Iy||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var t=lr.call(e);return(t===xy||t===Ay||t===Ty||t===gy)&&e("")==null}catch(n){}return!1}));var Ms;Ls.exports=He?function(e){if(_n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{He(e,null,qn)}catch(t){if(t!==cr)return!1}return!Cn(e)&&$n(e)}:function(e){if(_n(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(by)return $n(e);if(Cn(e))return!1;var t=lr.call(e);return t!==vy&&t!==wy&&!/^\[object HTML/.test(t)?!1:$n(e)}});var kn=d((u0,Ws)=>{"use strict";s();u();Ws.exports=Gs()});var zs=d((l0,Ys)=>{"use strict";s();u();var Vs=R(),Sy=ks(),Ey=kn(),Py=pr(),js=dt();Ys.exports=function(e,t){if(!Py(t))throw new Vs("Assertion failed: IsPropertyKey(P) is not true");var n=Sy(e,t);if(n!=null){if(!Ey(n))throw new Vs(js(t)+" is not a function: "+js(n));return n}}});var Js=d((h0,Hs)=>{"use strict";s();u();var Ry=Hr();Hs.exports=function(){return Ry()&&!!Symbol.toStringTag}});var Gn=d((g0,Zs)=>{"use strict";s();u();var Mn=D(),Ks=Js()(),Qs,Xs,Dn,Ln;Ks&&(Qs=Mn("Object.prototype.hasOwnProperty"),Xs=Mn("RegExp.prototype.exec"),Dn={},fr=function(){throw Dn},Ln={toString:fr,valueOf:fr},typeof Symbol.toPrimitive=="symbol"&&(Ln[Symbol.toPrimitive]=fr));var fr,Fy=Mn("Object.prototype.toString"),Ny=Object.getOwnPropertyDescriptor,Oy="[object RegExp]";Zs.exports=Ks?function(e){if(!e||typeof e!="object")return!1;var t=Ny(e,"lastIndex"),n=t&&Qs(t,"value");if(!n)return!1;try{Xs(e,Ln)}catch(i){return i===Dn}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Fy(e)===Oy}});var Wn=d((x0,eu)=>{"use strict";s();u();var Uy=D(),By=Gn(),$y=Uy("RegExp.prototype.exec"),qy=R();eu.exports=function(e){if(!By(e))throw new qy("`regex` must be a RegExp");return function(n){return $y(e,n)!==null}}});var ru=d((b0,tu)=>{"use strict";s();u();tu.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}});var iu=d((E0,nu)=>{"use strict";s();u();nu.exports=function(e){if(e===null)return"Null";if(typeof e=="undefined")return"Undefined";if(typeof e=="function"||typeof e=="object")return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var Vn=d((F0,ou)=>{"use strict";s();u();var Cy=iu();ou.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":Cy(e)}});var uu=d((U0,su)=>{"use strict";s();u();var au=R(),_y=dt(),ky=pr(),My=Vn();su.exports=function(e,t){if(My(e)!=="Object")throw new au("Assertion failed: Type(O) is not Object");if(!ky(t))throw new au("Assertion failed: IsPropertyKey(P) is not true, got "+_y(t));return e[t]}});var cu=d((q0,pu)=>{"use strict";s();u();var Dy=V();pu.exports=Dy("%Math.min%")});var jn=d((k0,lu)=>{"use strict";s();u();lu.exports=Number.isNaN||function(e){return e!==e}});var yu=d((L0,fu)=>{"use strict";s();u();var Ly=jn();fu.exports=function(r){return(typeof r=="number"||typeof r=="bigint")&&!Ly(r)&&r!==1/0&&r!==-1/0}});var yr=d((V0,du)=>{"use strict";s();u();var hu=V(),Gy=hu("%Math.abs%"),Wy=hu("%Math.floor%"),Vy=jn(),jy=yu();du.exports=function(e){if(typeof e!="number"||Vy(e)||!jy(e))return!1;var t=Gy(e);return Wy(t)===t}});var zn=d((z0,mu)=>{"use strict";s();u();var Yy=D(),Yn=R(),zy=yr(),Hy=Yy("String.prototype.slice");mu.exports=function(e,t,n){if(typeof e!="string")throw new Yn("Assertion failed: `string` must be a String");if(typeof t!="string")throw new Yn("Assertion failed: `searchValue` must be a String");if(!zy(n)||n<0)throw new Yn("Assertion failed: `fromIndex` must be a non-negative integer");var i=e.length;if(t===""&&n<=i)return n;for(var o=t.length,a=n;a<=i-o;a+=1){var c=Hy(e,a,a+o);if(c===t)return a}return-1}});var hr=d((K0,gu)=>{"use strict";s();u();var Jy=R();gu.exports=function(e){if(e==null)throw new Jy(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var dr=d((Z0,vu)=>{"use strict";s();u();var Ky=V(),Qy=Ky("%String%"),Xy=R();vu.exports=function(e){if(typeof e=="symbol")throw new Xy("Cannot convert a Symbol value to a string");return Qy(e)}});var Hn=d((rw,Au)=>{"use strict";s();u();var Zy=hr(),eh=dr(),th=D(),wu=th("String.prototype.replace"),xu=/^\s$/.test("\u180E"),rh=xu?/^[\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]+/,nh=xu?/[\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]+$/;Au.exports=function(){var e=eh(Zy(this));return wu(wu(e,rh,""),nh,"")}});var Jn=d((ow,bu)=>{"use strict";s();u();var ih=Hn(),Tu="\u200B",Je="\u180E";bu.exports=function(){return String.prototype.trim&&Tu.trim()===Tu&&Je.trim()===Je&&("_"+Je).trim()==="_"+Je&&(Je+"_").trim()===Je+"_"?String.prototype.trim:ih}});var Su=d((uw,Iu)=>{"use strict";s();u();var oh=ot(),ah=Jn();Iu.exports=function(){var e=ah();return oh(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Fu=d((lw,Ru)=>{"use strict";s();u();var sh=Kt(),uh=ot(),ph=hr(),ch=Hn(),Eu=Jn(),lh=Su(),fh=sh(Eu()),Pu=function(e){return ph(e),fh(e)};uh(Pu,{getPolyfill:Eu,implementation:ch,shim:lh});Ru.exports=Pu});var Bu=d((hw,Uu)=>{"use strict";s();u();var Qn=V(),Kn=Qn("%Number%"),yh=Qn("%RegExp%"),hh=R(),Nu=Qn("%parseInt%"),dh=D(),mr=Wn(),Ou=dh("String.prototype.slice"),mh=mr(/^0b[01]+$/i),gh=mr(/^0o[0-7]+$/i),vh=mr(/^[-+]0x[0-9a-f]+$/i),wh=["\x85","\u200B","\uFFFE"].join(""),xh=new yh("["+wh+"]","g"),Ah=mr(xh),Th=Fu();Uu.exports=function r(e){if(typeof e!="string")throw new hh("Assertion failed: `argument` is not a String");if(mh(e))return Kn(Nu(Ou(e,2),2));if(gh(e))return Kn(Nu(Ou(e,2),8));if(Ah(e)||vh(e))return NaN;var t=Th(e);return t!==e?r(t):Kn(e)}});var Cu=d((gw,qu)=>{"use strict";s();u();var bh=R(),$u=yr(),Ih=D(),Sh=Ih("String.prototype.slice");qu.exports=function(e,t,n){if(typeof e!="string"||!$u(t)||arguments.length>2&&!$u(n))throw new bh("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Sh(e,t,arguments.length>2?n:e.length)}});var ku=d((xw,_u)=>{"use strict";s();u();_u.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Du=d((bw,Mu)=>{"use strict";s();u();var Eh=D()("String.prototype.slice");Mu.exports=function(e,t){return e===t?!0:e.length>t.length?!1:Eh(t,0,e.length)===e}});var ju=d((Ew,Vu)=>{"use strict";s();u();var re=R(),Wu=Wn(),Ph=ru(),Xn=dt(),Rh=uu(),Fh=cn(),Nh=cu(),Oh=zn(),Lu=Bu(),ne=Cu(),Uh=dr(),Gu=Vn(),Bh=yr(),$h=ku(),mt=Du(),qh=Wu(/^\$[0-9]/),Ch=Wu(/^\$[0-9][0-9]/);Vu.exports=function(e,t,n,i,o,a){if(typeof e!="string")throw new re("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new re("Assertion failed: `str` must be a String");if(!Bh(n)||n<0)throw new re("Assertion failed: `position` must be a nonnegative integer, got "+Xn(n));if(!Fh(i)||!Ph(i,$h))throw new re("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+Xn(i));if(typeof o!="undefined"&&Gu(o)!=="Object")throw new re("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof a!="string")throw new re("Assertion failed: `replacementTemplate` must be a String");var c=t.length;if(n>c)throw new re("Assertion failed: position > stringLength, got "+Xn(n));for(var f=a,v="";f!=="";){var g,m,w;if(mt("$$",f))g="$$",m="$";else if(mt("$`",f))g="$`",m=ne(t,0,n);else if(mt("$&",f))g="$&",m=e;else if(mt("$'",f)){g="$'";var x=e.length,I=n+x;m=ne(t,Nh(I,c))}else if(qh(f)){var P=Ch(f)?2:1,B=ne(f,1,1+P),C=Lu(B);if(C<0||C>99)throw new re("Assertion failed: `index` must be >= 0 and <= 99");var Q=i.length;C>Q&&P===2&&(P=1,B=ne(B,0,1),C=Lu(B)),g=ne(f,0,1+P),1<=C&&C<=Q?(w=i[C-1],typeof w=="undefined"?m="":m=w):m=g}else if(mt("$<",f)){var fe=Oh(f,">",0);if(fe===-1||typeof o=="undefined")g="$<",m=g;else{g=ne(f,0,fe+1);var Ke=ne(f,2,fe);if(Gu(o)!=="Object")throw new re("Assertion failed: Type(namedCaptures) is not Object");w=Rh(o,Ke),typeof w=="undefined"?m="":m=Uh(w)}}else g=ne(f,0,1),m=g;var Rt=g.length;f=ne(f,Rt),v+=m}return v}});var ei=d((Fw,Ju)=>{"use strict";s();u();var Yu=Ka(),_h=zs(),kh=ju(),Mh=kn(),Dh=hr(),gr=dr(),zu=zn(),Lh=V(),vr=D(),Gh=Gr()(),Wh=Gn(),Vh=Lh("%Math.max%"),Hu=R(),jh=vr("Array.prototype.push"),Zn=vr("String.prototype.slice"),Yh=vr("String.prototype.indexOf"),zh=vr("String.prototype.replace");Ju.exports=function(e,t){var n=Dh(this),i=Wh(e);if(i&&Yh(Zn(e,e.source.length+2),"g")===-1)throw new Hu("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Gh&&Symbol.replace){if(e!=null){var o=_h(e,Symbol.replace);if(typeof o!="undefined")return Yu(o,e,[n,t])}}else if(i)return zh(n,e,t);var a=gr(n),c=gr(e),f=Mh(t);f||(t=gr(t));for(var v=c.length,g=Vh(1,v),m=[],w=zu(a,c,0);w!==-1;)jh(m,w),w=zu(a,c,w+g);for(var x=0,I="",P=0;P<m.length;P+=1){var B;if(f)B=gr(Yu(t,void 0,[c,m[P],a]));else{if(typeof t!="string")throw new Hu("Assertion failed: `replaceValue` should be a string at this point");var C=[];B=kh(c,a,m[P],C,void 0,t)}var Q=Zn(a,x,m[P]);I+=Q+B,x=m[P]+v}return x<a.length&&(I+=Zn(a,x)),I}});var ti=d((Uw,Ku)=>{"use strict";s();u();var Hh=ei();Ku.exports=function(){return String.prototype.replaceAll||Hh}});var Xu=d((qw,Qu)=>{"use strict";s();u();var Jh=ot(),Kh=ti();Qu.exports=function(){var e=Kh();return Jh(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var rp=d((kw,tp)=>{"use strict";s();u();var Qh=Kt(),Xh=ot(),Zu=ei(),Zh=ti(),ed=Xu(),ep=Qh(Zu);Xh(ep,{getPolyfill:Zh,implementation:Zu,shim:ed});tp.exports=ep});var qd={};Ur(qd,{DynamicSnippetsGenerator:()=>Er});module.exports=hi(qd);s();u();var WI=dp(rp(),1);s();u();s();u();s();u();function E(r){throw new Error("Unexpected value: "+JSON.stringify(r))}s();u();function gt(r){return Object.keys(r)}s();u();s();u();var Ie=class{};s();u();s();u();var H=class extends Ie{constructor(t){super();h(this,"value");this.value=t}write(t){typeof this.value=="string"?t.write(this.value):this.value(t)}};var td=4,vt=class{constructor(){h(this,"buffer","");h(this,"indentLevel",0);h(this,"hasWrittenAnything",!1);h(this,"lastCharacterIsNewline",!1)}write(e){let t=e.length>0&&e.endsWith(`
14
14
  `),n=t?e.substring(0,e.length-1):e,i=this.getIndentString(),o=n.replaceAll(`
15
15
  `,`
16
16
  ${i}`);this.isAtStartOfLine()&&(o=i+o),t&&(o+=`
17
- `),this.writeInternal(o)}writeNoIndent(e){let t=this.indentLevel;this.indentLevel=0,this.write(e),this.indentLevel=t}writeNode(e){e.write(this)}writeNodeStatement(e){e.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(e){new ce(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,t){new ce(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(e,t="{",n,i="}"){let o=e.filter(a=>a!==void 0).join(" ");o?this.write(`${o} ${t!=null?t:""}`):this.write(t!=null?t:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
17
+ `),this.writeInternal(o)}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 H(e).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(e,t){new H(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(e,t){this.dedent(),this.write("} "),new H(e).write(this),this.write(" ("),this.writeNode(t),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(e){this.dedent(),this.write("} "),new H(e).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}openBlock(e,t="{",n,i="}"){let o=e.filter(a=>a!==void 0).join(" ");o?this.write(`${o} ${t!=null?t:""}`):this.write(t!=null?t:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(e=""){this.write(e),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
18
18
  `)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
19
19
  `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:e,delimiter:t,writeFunction:n}){if(e.length>0){let i=e[0];i!=null&&n(i);for(let o=1;o<e.length;o++){this.write(t);let a=e[o];a!=null&&n(a)}}}toString(){return this.buffer}writeInternal(e){return e.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=e.endsWith(`
20
- `)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Kf)}};s();u();var nr=class{},st=class extends nr{async format(e){return e}formatSync(e){return e}};s();u();function Rn(r){return(r==null?void 0:r.name)!=null}s();u();s();u();var ut=class{constructor(e){h(this,"context");this.context=e}};s();u();s();u();s();u();var ct=class{constructor(){h(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var T={Critical:"CRITICAL",Warning:"WARNING"},pt=class r{constructor(){h(this,"errors");h(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(Cn($n({},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 lt=class{constructor({ir:e,config:t}){h(this,"config");h(this,"errors");h(this,"_ir");h(this,"httpEndpointReferenceParser");this._ir=e,this.config=t,this.errors=new pt,this.httpEndpointReferenceParser=new ct}associateQueryParametersByWireValue({parameters:e,values:t}){let n=[];for(let[i,o]of Object.entries(t)){this.errors.scope(i);try{let a=e.find(l=>l.name.wireValue===i);if(a==null)throw this.newParameterNotRecognizedError(i);let p=this.isListTypeReference(a.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:a.name,typeReference:a.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:t,ignoreMissingParameters:n}){let i=[];for(let[o,a]of Object.entries(t)){this.errors.scope(o);try{let p=e.find(l=>l.name.wireValue===o);if(p==null){if(n)continue;this.errors.add({severity:T.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:p.name,typeReference:p.typeReference,value:a})}finally{this.errors.unscope()}}return i}getSingleFileValue({property:e,record:t}){let n=t[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:T.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:T.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:T.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:T.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:T.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 i=e.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:T.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:T.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let a=e.types[o];if(a==null){this.errors.add({severity:T.Critical,message:`No type found for discriminant value "${o}"`});return}let m=n,{[i]:p}=m,l=qn(m,[_n(i)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:l}}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 i;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}):!((i=e.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:t}){var n,i;return t&&((i=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:A(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(i=>i.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=t.environments.find(i=>i.id===e);return n==null?void 0:n.name}default:A(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:T.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:T.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:T.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(ot(n.urls));for(let o of ot(e))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:T.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${ot(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:T.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:T.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:T.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:A(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:A(t)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:A(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}};s();u();var Le=class{constructor(){h(this,"reporter");h(this,"snippet");h(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:t}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(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}"`)}};s();u();var j={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();function ft(r,e){var n,i;let t=(n=r.split("/").pop())!=null?n:r;return e!=null&&e.stripExtension&&(i=t.split(".")[0])!=null?i:t}s();u();s();u();s();u();s();u();s();u();s();u();s();u();var Qf=/[^0-9a-zA-Z_]/g,Te=class extends at{constructor({packageName:t,rootImportPath:n,importPath:i,customConfig:o,formatter:a}){super();h(this,"packageName");h(this,"rootImportPath");h(this,"importPath");h(this,"customConfig");h(this,"formatter");h(this,"imports",{});this.packageName=t,this.rootImportPath=n,this.importPath=i,this.customConfig=o,this.formatter=a!=null?a:new st}addImport(t){let n=this.imports[t];if(n!=null)return n;let i=this.getValidAlias(ft(t));for(;i in this.imports;)i="_"+i;return this.imports[t]=i,i}getValidAlias(t){let n=t.split("-");return n[0]==null?t:n[0].replace(Qf,"")}};var yt=class extends Te{constructor({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o}){super({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(t){throw new Error(`Failed to format Go file: ${t}
20
+ `)),this.buffer+=e}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*td)}};s();u();var wr=class{},wt=class extends wr{async format(e){return e}formatSync(e){return e}};s();u();function ri(r){return(r==null?void 0:r.name)!=null}s();u();s();u();s();u();var xt=class{constructor(){h(this,"reporter");h(this,"snippet");h(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:t}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(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}"`)}};var At=class{constructor(e){h(this,"context");this.context=e}async generate(e){let t=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(t.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new xt;for(let i of t){let o=this.context.clone(),a=this.createSnippetGenerator(o);try{let c=await a.generateSnippet({endpoint:i,request:e});if(o.errors.empty())return{snippet:c,errors:void 0};n.update({context:o,snippet:c})}catch(c){n.err==null&&(n.err=c)}}return n.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let t=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(t.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let n=new xt;for(let i of t){let o=this.context.clone(),a=this.createSnippetGenerator(o);try{let c=a.generateSnippetSync({endpoint:i,request:e});if(o.errors.empty())return{snippet:c,errors:void 0};n.update({context:o,snippet:c})}catch(c){n.err==null&&(n.err=c)}}return n.getResponseOrThrow({endpoint:e.endpoint})}};s();u();s();u();s();u();var Tt=class{constructor(){h(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var b={Critical:"CRITICAL",Warning:"WARNING"},bt=class r{constructor(){h(this,"errors");h(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(ci(pi({},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 It=class{constructor({ir:e,config:t}){h(this,"config");h(this,"errors");h(this,"_ir");h(this,"httpEndpointReferenceParser");this._ir=e,this.config=t,this.errors=new bt,this.httpEndpointReferenceParser=new Tt}associateQueryParametersByWireValue({parameters:e,values:t}){let n=[];for(let[i,o]of Object.entries(t)){this.errors.scope(i);try{let a=e.find(f=>f.name.wireValue===i);if(a==null)throw this.newParameterNotRecognizedError(i);let c=this.isListTypeReference(a.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:a.name,typeReference:a.typeReference,value:c})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:t,ignoreMissingParameters:n}){let i=[];for(let[o,a]of Object.entries(t)){this.errors.scope(o);try{let c=e.find(f=>f.name.wireValue===o);if(c==null){if(n)continue;this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:c.name,typeReference:c.typeReference,value:a})}finally{this.errors.unscope()}}return i}getSingleFileValue({property:e,record:t}){let n=t[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:b.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:b.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:b.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:b.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:b.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 i=e.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:b.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let a=e.types[o];if(a==null){this.errors.add({severity:b.Critical,message:`No type found for discriminant value "${o}"`});return}let v=n,{[i]:c}=v,f=fi(v,[li(i)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:f}}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 i;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}):!((i=e.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:t}){var n,i;return t&&((i=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:E(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(i=>i.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=t.environments.find(i=>i.id===e);return n==null?void 0:n.name}default:E(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:b.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:b.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:b.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(gt(n.urls));for(let o of gt(e))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:b.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${gt(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:b.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:E(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:E(t)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(t=>{switch(t.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:E(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}};s();u();var J={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();function St(r,e){var n,i;let t=(n=r.split("/").pop())!=null?n:r;return e!=null&&e.stripExtension&&(i=t.split(".")[0])!=null?i:t}s();u();s();u();s();u();s();u();s();u();s();u();s();u();var rd=/[^0-9a-zA-Z_]/g,Se=class extends vt{constructor({packageName:t,rootImportPath:n,importPath:i,customConfig:o,formatter:a}){super();h(this,"packageName");h(this,"rootImportPath");h(this,"importPath");h(this,"customConfig");h(this,"formatter");h(this,"imports",{});this.packageName=t,this.rootImportPath=n,this.importPath=i,this.customConfig=o,this.formatter=a!=null?a:new wt}addImport(t){let n=this.imports[t];if(n!=null)return n;let i=new Set(Object.values(this.imports)),o=this.getValidAlias(St(t));for(;i.has(o);)o="_"+o;return this.imports[t]=o,o}getValidAlias(t){let n=t.split("-");return n[0]==null?t:n[0].replace(rd,"")}};var Et=class extends Se{constructor({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o}){super({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o})}async toStringAsync(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.format(e)}catch(t){throw new Error(`Failed to format Go file: ${t}
21
21
  ${e}`)}return e}toString(){let e=this.getContent();if(this.formatter!=null)try{return this.formatter.formatSync(e)}catch(t){throw new Error(`Failed to format Go file: ${t}
22
22
  ${e}`)}return e}getContent(){let e=`package ${this.packageName}
23
23
 
@@ -26,9 +26,9 @@ ${e}`)}return e}getContent(){let e=`package ${this.packageName}
26
26
  ${this.buffer}`:e+this.buffer}stringifyImports(){let e=Object.entries(this.imports).filter(([t,n])=>t!==this.importPath).map(([t,n])=>` ${n} "${t}"`).join(`
27
27
  `);return e?`import (
28
28
  ${e}
29
- )`:""}};var b=class extends xe{async toStringAsync({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o}){let a=new yt({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o});return this.write(a),a.toStringAsync()}toString({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o}){let a=new yt({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o});return this.write(a),a.toString()}};var B=class extends b{constructor({name:t,importPath:n}){super();h(this,"name");h(this,"importPath");this.name=t,this.importPath=n}write(t){if(t.importPath===this.importPath){t.write(this.name);return}let n=t.addImport(this.importPath);t.write(`${n}.${this.name}`)}};var Xf=new Set(["any","bytes","map","slice"]),ht=class r extends b{constructor(t){super();h(this,"internalType");this.internalType=t}write(t,{comment:n}={}){switch(this.internalType.type){case"any":t.write("interface{}");break;case"bool":t.write("bool");break;case"bytes":t.write("[]byte");break;case"date":case"dateTime":t.writeNode(Zf);break;case"float64":t.write("float64");break;case"int":t.write("int");break;case"int64":t.write("int64");break;case"map":{t.write("map["),this.internalType.keyType.write(t),t.write("]"),this.internalType.valueType.write(t);break}case"optional":{t.write("*"),this.internalType.value.write(t);break}case"reference":t.writeNode(this.internalType.value);break;case"slice":t.write("[]"),this.internalType.value.write(t);break;case"string":t.write("string");break;case"uuid":t.writeNode(ey);break;default:A(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(t,n){return new this({type:"map",keyType:t,valueType:n})}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static pointer(t){return r.optional(t)}static reference(t){return new this({type:"reference",value:t})}static slice(t){return new this({type:"slice",value:t})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(t){return t.internalType.type==="optional"||Xf.has(t.internalType.type)}},Zf=new B({importPath:"time",name:"Time"}),ey=new B({importPath:"github.com/google/uuid",name:"UUID"});s();u();var ty="sdk";function Pn({config:r,customConfig:e}){let t=ny({config:r}),n=ry({config:r,customConfig:e});return t!=null?oy({importPath:n,majorVersion:t}):n}function ry({config:r,customConfig:e}){var t,n,i;return(i=(n=e==null?void 0:e.importPath)!=null?n:(t=e==null?void 0:e.module)==null?void 0:t.path)!=null?i:r.output.mode.type==="github"?ay(r.output.mode.repoUrl,"https://"):ty}function ny({config:r}){let e=iy({config:r});if(!(e==null||e==="v0"||e==="v1"))return`${e}`}function iy({config:r}){let e=sy(r);if(e==null)return;let t=e.split(".");if(t[0]==null)return;let n=t[0];return n.startsWith("v")?n:`v${n}`}function oy({importPath:r,majorVersion:e}){return ft(r)===e?r:`${r}/${e}`}function ay(r,e){return r.startsWith(e)?r.slice(e.length):r}function sy(r){var t;let e=(t=r==null?void 0:r.output)==null?void 0:t.mode;if(e!=null)return e.type==="github"||e.type==="publish"?e.version:void 0}s();u();s();u();var z=class extends b{constructor(t){super();h(this,"arg");this.arg=t}write(t){return new ce(this.arg).write(t)}};s();u();s();u();var q=class extends b{constructor({docs:t}={}){super();h(this,"docs");this.docs=t}write(t){this.docs!=null&&this.docs.split(`
30
- `).forEach(n=>{t.writeLine(`// ${n}`)})}};var Ie=class extends b{constructor({name:t,docs:n}){super();h(this,"name");h(this,"docs");h(this,"members",[]);this.name=t,this.docs=n}addMember(t){this.members.push(t)}write(t){t.writeNode(new q({docs:this.docs})),t.write(`type ${this.name} string`)}};s();u();var Ae=class extends b{constructor({name:t,type:n,docs:i}){super();h(this,"name");h(this,"type");h(this,"docs");this.name=t,this.type=n,this.docs=i}write(t){t.writeNode(new q({docs:this.docs})),t.write(`${this.name} `),this.type.write(t)}};s();u();s();u();var te=class extends b{constructor({name:t,parameters:n,return_:i,body:o,docs:a,typeReference:p}){super();h(this,"name");h(this,"parameters");h(this,"return_");h(this,"body");h(this,"docs");h(this,"typeReference");this.name=t,this.parameters=n,this.return_=i,this.body=o,this.docs=a,this.typeReference=p}write(t){var n;if(t.writeNode(new q({docs:this.docs})),t.write("func "),this.typeReference!=null&&this.writeReceiver({writer:t,typeReference:this.typeReference}),t.write(`${this.name}`),this.parameters.length===0)t.write("() ");else{t.writeLine("(");for(let i of this.parameters)t.writeNode(i),t.writeLine(",");t.write(")")}this.return_!=null&&(t.write("("),this.return_.forEach((i,o)=>{o>0&&t.write(", "),t.writeNode(i)}),t.write(")")),t.writeLine(" {"),t.indent(),(n=this.body)==null||n.write(t),t.dedent(),t.writeNewLineIfLastLineNot(),t.writeLine("}")}writeReceiver({writer:t,typeReference:n}){t.write(`(${this.getReceiverName(n.name)} `),n.write(t),t.write(") ")}getReceiverName(t){return t.charAt(0).toLowerCase()}};var be=class extends b{constructor({name:t,parameters:n,return_:i,body:o,docs:a}){super();h(this,"func");this.func=new te({name:t,parameters:n,return_:i,body:o,docs:a})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(t){t.writeNode(this.func)}};s();u();s();u();s();u();s();u();var re=class extends b{constructor({method:t,arguments_:n,on:i}){super();h(this,"on");h(this,"method");h(this,"arguments_");this.on=i,this.method=t,this.arguments_=n}write(t){this.on.write(t),t.write("."),t.write(this.method),ir({writer:t,arguments_:this.arguments_})}};var uy=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),Cs=new Set(["any","bytes","map","slice"]),k=class r extends b{constructor(t){super();h(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"any":this.writeAny({writer:t,value:this.internalType.value});break;case"bool":t.write(this.internalType.value.toString());break;case"bytes":t.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":t.writeNode(ly({writer:t,type:this.internalType}));break;case"enum":t.writeNode(this.internalType.typeReference);break;case"float64":t.write(this.internalType.value.toString());break;case"int":case"int64":t.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:t,map:this.internalType});break;case"nil":t.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:t,type:this.internalType.value});break;case"reference":t.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:t,slice:this.internalType});break;case"string":t.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
31
- `)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:t,struct:this.internalType});break;case"uuid":t.writeNode(fy({value:this.internalType.value}));break;default:A(this.internalType)}}static any(t){return new this({type:"any",value:t})}static bool(t){return new this({type:"bool",value:t})}static bytes(t){return new this({type:"bytes",value:t})}static date(t){return new this({type:"date",value:t})}static dateTime(t){return new this({type:"dateTime",value:t})}static enum(t){return new this({type:"enum",typeReference:t})}static float64(t){return new this({type:"float64",value:t})}static int(t){return new this({type:"int",value:t})}static int64(t){return new this({type:"int64",value:t})}static map({keyType:t,valueType:n,entries:i}){return new this({type:"map",keyType:t,valueType:n,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static reference(t){return new this({type:"reference",value:t})}static slice({valueType:t,values:n}){return new this({type:"slice",valueType:t,values:n})}static string(t){return new this({type:"string",value:t})}static struct({typeReference:t,fields:n}){return new this({type:"struct",typeReference:t,fields:n})}static structPointer({typeReference:t,fields:n}){return new this({type:"optional",value:new this({type:"struct",typeReference:t,fields:n})})}static uuid(t){return new this({type:"uuid",value:t})}static isNop(t){return t.internalType.type==="optional"?this.isNop(t.internalType.value):t.internalType.type==="nop"}writeAny({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("nil");return}if(Array.isArray(n)){this.writeAnyArray({writer:t,value:n});return}this.writeAnyObject({writer:t,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeAnyArray({writer:t,value:n}){if(t.write("[]interface{}"),n.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let i of n)t.writeNode(r.any(i)),t.writeLine(",");t.dedent(),t.write("}")}writeAnyObject({writer:t,value:n}){t.write("map[string]interface{}");let i=Object.entries(n);if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let[o,a]of i)t.write(`"${o}": `),t.writeNode(r.any(a)),t.writeLine(",");t.dedent(),t.write("}")}writeMap({writer:t,map:n}){t.write("map["),t.writeNode(n.keyType),t.write("]"),t.writeNode(n.valueType);let i=yy({entries:n.entries});if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of i)o.key.write(t),t.write(": "),o.value.write(t),t.writeLine(",");t.dedent(),t.write("}")}writeOptional({writer:t,type:n}){if(uy.has(n.internalType.type)){t.writeNode(cy({writer:t,type:n}));return}if(Cs.has(n.internalType.type)){n.write(t);return}if(n.internalType.type==="enum"){t.writeNode(new re({on:n.internalType.typeReference,method:"Ptr",arguments_:[]}));return}t.write("&"),n.write(t)}static isAlreadyOptional(t){return t.internalType.type==="optional"||Cs.has(t.internalType.type)}writeSlice({writer:t,slice:n}){t.write("[]"),t.writeNode(n.valueType);let i=dy({values:n.values});if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of i)o.write(t),t.writeLine(",");t.dedent(),t.write("}")}writeStruct({writer:t,struct:n}){t.writeNode(n.typeReference);let i=hy({fields:n.fields});if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of i)t.write(`${o.name}: `),o.value.write(t),t.writeLine(",");t.dedent(),t.write("}")}};function cy({writer:r,type:e}){return new D({func:new B({name:py({type:e}),importPath:r.rootImportPath}),arguments_:[e]})}function py({type:r}){switch(r.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function ly({writer:r,type:e}){let t=e instanceof Date?"MustParseDate":"MustParseDateTime";return new D({func:new B({name:t,importPath:r.rootImportPath}),arguments_:[new z(`"${e.value}"`)]})}function fy({value:r}){return new D({func:new B({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new z(`"${r}"`)]})}function yy({entries:r}){return r.filter(e=>!k.isNop(e.key)&&!k.isNop(e.value))}function hy({fields:r}){return r.filter(e=>!k.isNop(e.value))}function dy({values:r}){return r.filter(e=>!k.isNop(e))}function ir({writer:r,arguments_:e}){let t=gy(e);if(t.length===0){r.write("()");return}r.writeLine("("),r.indent();for(let n of t)my({writer:r,argument:n}),r.writeLine(",");r.dedent(),r.write(")")}function my({writer:r,argument:e}){Rn(e)?e.assignment.write(r):e.write(r)}function gy(r){return r.filter(e=>!(e instanceof k&&k.isNop(e)))}var D=class extends b{constructor({func:t,arguments_:n}){super();h(this,"func");h(this,"arguments_");this.func=t,this.arguments_=n}write(t){t.writeNode(this.func),ir({writer:t,arguments_:this.arguments_})}};s();u();var Se=class extends b{constructor({name:t,type:n,docs:i}){super();h(this,"name");h(this,"type");h(this,"docs");this.name=t,this.type=n,this.docs=i}write(t){t.writeNode(new q({docs:this.docs})),t.write(`${this.name} `),this.type.write(t)}};s();u();var Ee=class extends b{constructor({name:t,importPath:n,docs:i}){super();h(this,"name");h(this,"importPath");h(this,"docs");h(this,"fields",[]);h(this,"methods",[]);this.name=t,this.importPath=n,this.docs=i}addField(t){this.fields.push(t)}addMethod(t){this.methods.push(t)}write(t){if(t.writeNode(new q({docs:this.docs})),t.write(`type ${this.name} struct {`),this.fields.length>0)t.writeLine("}");else{t.newLine(),t.indent();for(let n of this.fields)t.writeNode(n),t.newLine();t.dedent(),t.writeLine("}")}(this.constructor!=null||this.methods.length>0)&&t.newLine();for(let n of this.methods)t.writeNode(n),t.newLine()}};var f={};dr(f,{AstNode:()=>b,CodeBlock:()=>z,Enum:()=>Ie,Field:()=>Ae,Func:()=>be,FuncInvocation:()=>D,Method:()=>te,MethodInvocation:()=>re,Parameter:()=>Se,Struct:()=>Ee,Type:()=>ht,TypeInstantiation:()=>k,TypeReference:()=>B,Writer:()=>Te,codeblock:()=>vy,enum_:()=>wy,field:()=>xy,func:()=>Ty,invokeFunc:()=>Iy,invokeMethod:()=>Ay,method:()=>by,parameter:()=>Sy,struct:()=>Ey,typeReference:()=>Ry});s();u();function vy(r){return new z(r)}function wy(r){return new Ie(r)}function xy(r){return new Ae(r)}function Ty(r){return new be(r)}function Iy(r){return new D(r)}function Ay(r){return new re(r)}function by(r){return new te(r)}function Sy(r){return new Se(r)}function Ey(r){return new Ee(r)}function Ry(r){return new B(r)}var _s="example",qs="fern",Py="do",ks="client",dt=class{constructor({context:e,formatter:t}){h(this,"context");h(this,"formatter");this.context=e,this.formatter=t}async generateSnippet({endpoint:e,request:t}){var i;return await this.buildCodeBlock({endpoint:e,snippet:t}).toStringAsync({packageName:_s,importPath:qs,rootImportPath:this.context.rootImportPath,customConfig:(i=this.context.customConfig)!=null?i:{},formatter:this.formatter})}generateSnippetSync({endpoint:e,request:t}){var i;return this.buildCodeBlock({endpoint:e,snippet:t}).toString({packageName:_s,importPath:qs,rootImportPath:this.context.rootImportPath,customConfig:(i=this.context.customConfig)!=null?i:{},formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:t}){return f.func({name:Py,parameters:[],return_:[],body:f.codeblock(n=>{n.writeNode(this.constructClient({endpoint:e,snippet:t})),n.writeLine(),n.writeNode(this.callMethod({endpoint:e,snippet:t}))})})}constructClient({endpoint:e,snippet:t}){return f.codeblock(n=>{n.write(`${ks} := `),n.writeNode(this.getRootClientFuncInvocation(this.getConstructorArgs({endpoint:e,snippet:t})))})}callMethod({endpoint:e,snippet:t}){return f.invokeMethod({on:f.codeblock(ks),method:this.getMethod({endpoint:e}),arguments_:[this.context.getContextTodoFunctionInvocation(),...this.getMethodArgs({endpoint:e,snippet:t})]})}getConstructorArgs({endpoint:e,snippet:t}){let n=[],i=this.getConstructorBaseUrlArg({baseUrl:t.baseURL,environment:t.environment});return i!=null&&n.push(i),e.auth!=null&&(t.auth!=null?n.push(this.getConstructorAuthArg({auth:e.auth,values:t.auth})):this.context.errors.add({severity:T.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(j.Headers),this.context.ir.headers!=null&&t.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),n}getConstructorAuthArg({auth:e,values:t}){switch(e.type){case"basic":return t.type!=="basic"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),f.TypeInstantiation.nop()):this.getConstructorBasicAuthArg({auth:e,values:t});case"bearer":return t.type!=="bearer"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),f.TypeInstantiation.nop()):this.getConstructorBearerAuthArg({auth:e,values:t});case"header":return t.type!=="header"?(this.context.errors.add({severity:T.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),f.TypeInstantiation.nop()):this.getConstructorHeaderAuthArg({auth:e,values:t});default:A(e)}}getConstructorBasicAuthArg({auth:e,values:t}){return f.codeblock(n=>{n.writeNode(f.invokeFunc({func:f.typeReference({name:"WithBasicAuth",importPath:this.context.getOptionImportPath()}),arguments_:[f.TypeInstantiation.string(t.username),f.TypeInstantiation.string(t.password)]}))})}getConstructorBaseUrlArg({baseUrl:e,environment:t}){let n=this.getBaseUrlArg({baseUrl:e,environment:t});if(n!=null)return f.codeblock(i=>{i.writeNode(f.invokeFunc({func:f.typeReference({name:"WithBaseURL",importPath:this.context.getOptionImportPath()}),arguments_:[n]}))})}getBaseUrlArg({baseUrl:e,environment:t}){if(e!=null&&t!=null){this.context.errors.add({severity:T.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return f.TypeInstantiation.string(e);if(t!=null){if(this.context.isSingleEnvironmentID(t)){let n=this.context.getEnvironmentTypeReferenceFromID(t);if(n==null){this.context.errors.add({severity:T.Warning,message:`Environment ${JSON.stringify(t)} was not found`});return}return f.TypeInstantiation.reference(n)}this.context.isMultiEnvironmentValues(t)&&this.context.errors.add({severity:T.Warning,message:"The Go SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}}getConstructorBearerAuthArg({auth:e,values:t}){return f.codeblock(n=>{n.writeNode(f.invokeFunc({func:f.typeReference({name:`With${e.token.pascalCase.unsafeName}`,importPath:this.context.getOptionImportPath()}),arguments_:[f.TypeInstantiation.string(t.token)]}))})}getConstructorHeaderAuthArg({auth:e,values:t}){return f.codeblock(n=>{n.writeNode(f.invokeFunc({func:f.typeReference({name:`With${e.header.name.name.pascalCase.unsafeName}`,importPath:this.context.getOptionImportPath()}),arguments_:[this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.header.typeReference,value:t.value})]}))})}getConstructorHeaderArgs({headers:e,values:t}){let n=[];for(let i of e){let o=this.getConstructorHeaderArg({header:i,value:t.value});o!=null&&n.push(o)}return n}getConstructorHeaderArg({header:e,value:t}){let n=this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.typeReference,value:t});if(!f.TypeInstantiation.isNop(n))return f.codeblock(i=>{i.writeNode(f.invokeFunc({func:f.typeReference({name:`With${e.name.name.pascalCase.unsafeName}`,importPath:this.context.getOptionImportPath()}),arguments_:[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:A(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){let n=[];if(this.context.errors.scope(j.PathParameters),e.pathParameters!=null){let i=this.getPathParameters({namedParameters:e.pathParameters,snippet:t});n.push(...i.map(o=>o.value))}return this.context.errors.unscope(),this.context.errors.scope(j.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.dynamicTypeInstantiationMapper.convert({typeReference:e.value,value:t});default:A(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:T.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),f.TypeInstantiation.nop()):f.TypeInstantiation.bytes(e)}getMethodArgsForInlinedRequest({request:e,snippet:t}){var l,m,g,d;let n=[],{inlinePathParameters:i,inlineFileProperties:o}={inlinePathParameters:(m=(l=this.context.customConfig)==null?void 0:l.inlinePathParameters)!=null?m:!1,inlineFileProperties:(d=(g=this.context.customConfig)==null?void 0:g.inlineFileProperties)!=null?d:!1};this.context.errors.scope(j.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(j.RequestBody);let p=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})||n.push(...a.map(w=>w.value)),o||n.push(...p.fileFields.map(w=>w.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:i,inlineFileProperties:o})&&n.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})?a:[],filePropertyInfo:p})),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:i}){var g,d,w,I;this.context.errors.scope(j.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(g=e.queryParameters)!=null?g:[],values:(d=t.queryParameters)!=null?d:{}}).map(S=>({name:S.name.name.pascalCase.unsafeName,value:this.context.dynamicTypeInstantiationMapper.convert(S)}));this.context.errors.unscope(),this.context.errors.scope(j.Headers);let l=this.context.associateByWireValue({parameters:(w=e.headers)!=null?w:[],values:(I=t.headers)!=null?I:{}}).map(S=>({name:S.name.name.pascalCase.unsafeName,value:this.context.dynamicTypeInstantiationMapper.convert(S)}));this.context.errors.unscope(),this.context.errors.scope(j.RequestBody);let m=e.body!=null?this.getInlinedRequestBodyStructFields({body:e.body,value:t.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),f.TypeInstantiation.structPointer({typeReference:f.typeReference({name:this.context.getMethodName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}),fields:[...n,...a,...l,...m]})}getInlinedRequestBodyStructFields({body:e,value:t,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyStructFields({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyStructField({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyStructFields({filePropertyInfo:n});default:A(e)}}getFileUploadRequestBodyStructFields({filePropertyInfo:e}){var t;return(t=this.context.customConfig)!=null&&t.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyStructField({body:e,value:t}){return{name:this.context.getTypeName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeInstantiation({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeInstantiation({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.value,value:t});default:A(e)}}getInlinedRequestBodyPropertyStructFields({parameters:e,value:t}){var o;let n=[],i=this.context.associateByWireValue({parameters:e,values:(o=this.context.getRecord(t))!=null?o:{}});for(let a of i)n.push({name:this.context.getTypeName(a.name.name),value:this.context.dynamicTypeInstantiationMapper.convert(a)});return n}getPathParameters({namedParameters:e,snippet:t}){var o;let n=[],i=this.context.associateByWireValue({parameters:e,values:(o=t.pathParameters)!=null?o:{}});for(let a of i)n.push({name:this.context.getTypeName(a.name.name),value:this.context.dynamicTypeInstantiationMapper.convert(a)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>this.context.getMethodName(t)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientFuncInvocation(e){return f.invokeFunc({func:f.typeReference({name:this.context.getClientConstructorName(),importPath:this.context.getClientImportPath()}),arguments_:e})}};s();u();s();u();var or=class{constructor({context:e}){h(this,"context");this.context=e}convert(e){if(e.value===null&&!this.context.isNullable(e.typeReference)&&this.context.errors.add({severity:T.Critical,message:"Expected non-null value, but got null"}),e.value==null)return f.TypeInstantiation.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return f.TypeInstantiation.nop();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?f.TypeInstantiation.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"nullable":return f.TypeInstantiation.optional(this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as}));case"optional":return f.TypeInstantiation.optional(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"set":return this.convertList({list:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:A(e.typeReference)}}convertList({list:e,value:t}){return Array.isArray(t)?f.TypeInstantiation.slice({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:t.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:T.Critical,message:`Expected array but got: ${typeof t}`}),f.TypeInstantiation.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:T.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),f.TypeInstantiation.nop()):f.TypeInstantiation.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:e.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:e.value}),entries:Object.entries(t).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:i})}}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.convertUndicriminatedUnion({undicriminatedUnion:e,value:t});default:A(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){let n=this.context.getGoTypeReferenceFromDeclaration({declaration:e.declaration}),i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(i==null)return f.TypeInstantiation.nop();let o=i.singleDiscriminatedUnionType,a=this.getBaseFields({discriminatedUnionTypeInstance:i,singleDiscriminatedUnionType:o});switch(o.type){case"samePropertiesAsObject":{let p=this.context.resolveNamedType({typeId:o.typeId});return p==null?f.TypeInstantiation.nop():f.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convertNamed({named:p,value:i.value})},...a]})}case"singleProperty":{let p=this.context.getRecord(i.value);if(p==null)return f.TypeInstantiation.nop();try{return this.context.errors.scope(o.discriminantValue.wireValue),f.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convert({typeReference:o.typeReference,value:p[o.discriminantValue.wireValue]})},...a]})}finally{this.context.errors.unscope()}}case"noProperties":return f.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(i.discriminantValue.name),value:f.TypeInstantiation.string(o.discriminantValue.wireValue)},...a]});default:A(o)}}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t}){var i,o;return this.context.associateByWireValue({parameters:(i=t.properties)!=null?i:[],values:(o=this.context.getRecord(e.value))!=null?o:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getTypeName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:t}){var i;let n=this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(t))!=null?i:{}});return f.TypeInstantiation.structPointer({typeReference:f.typeReference({name:this.context.getTypeName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}),fields:n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getTypeName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?f.TypeInstantiation.nop():f.TypeInstantiation.enum(f.typeReference({name:n,importPath:this.context.getImportPath(e.declaration.fernFilepath)}))}getEnumValueName({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:T.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(i=>i.wireValue===t);if(n==null){this.context.errors.add({severity:T.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return`${this.context.getTypeName(e.declaration.name)}${this.context.getTypeName(n.name)}`}convertUndicriminatedUnion({undicriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undicriminatedUnion:e,value:t});if(n==null)return f.TypeInstantiation.nop();let i=this.getUndiscriminatedUnionFieldName({typeReference:n.valueTypeReference});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.structPointer({typeReference:this.context.getGoTypeReferenceFromDeclaration({declaration:e.declaration}),fields:[{name:i,value:n.typeInstantiation}]})}findMatchingUndiscriminatedUnionType({undicriminatedUnion:e,value:t}){for(let n of e.types)try{let i=this.convert({typeReference:n,value:t});return{valueTypeReference:n,typeInstantiation:i}}catch(i){continue}this.context.errors.add({severity:T.Critical,message:`None of the types in the undicriminated union matched the given "${typeof t}" value`})}getUndiscriminatedUnionFieldName({typeReference:e}){switch(e.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:e});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:e.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:e});case"named":{let t=this.context.resolveNamedType({typeId:e.value});return t==null?void 0:this.context.getTypeName(t.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"nullable":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:e.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:e});case"unknown":return"Unknown";default:A(e)}}getUndiscriminatedUnionFieldNameForList({list:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}List`}getUndiscriminatedUnionFieldNameForMap({map:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e.key});if(t==null)return;let n=this.getUndiscriminatedUnionFieldName({typeReference:e.value});if(n!=null)return`${t}${n}Map`}getUndiscriminatedUnionFieldNameForOptional({typeReference:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}Optional`}getUndiscriminatedUnionFieldNameForSet({set:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}Set`}getUndiscriminatedUnionFieldNameForLiteral({literal:e}){switch(e.type){case"boolean":return e.value?"TrueLiteral":"FalseLiteral";case"string":return`${e.value}StringLiteral`;default:A(e)}}getUndiscriminatedUnionFieldNameForPrimitive({primitive:e}){switch(e){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:A(e)}}convertUnknown({value:e}){return f.TypeInstantiation.any(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"UINT":{let i=this.getValueAsNumber({value:t,as:n});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.int(i)}case"LONG":case"UINT_64":{let i=this.getValueAsNumber({value:t,as:n});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.int64(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:t,as:n});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.float64(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:t,as:n});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.bool(i)}case"STRING":{let i=this.context.getValueAsString({value:t});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.string(i)}case"DATE":{let i=this.context.getValueAsString({value:t});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:t});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.dateTime(i)}case"UUID":{let i=this.context.getValueAsString({value:t});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.uuid(i)}case"BASE_64":{let i=this.context.getValueAsString({value:t});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.bytes(i)}case"BIG_INTEGER":{let i=this.context.getValueAsString({value:t});return i==null?f.TypeInstantiation.nop():f.TypeInstantiation.string(i)}default:A(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})}};s();u();var ar=class{constructor({context:e}){h(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return f.Type.slice(this.convert({typeReference:e.typeReference}));case"literal":return this.convertLiteral({literal:e.typeReference.value});case"map":return f.Type.map(this.convert({typeReference:e.typeReference.key}),this.convert({typeReference:e.typeReference.value}));case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?this.convertUnknown():this.convertNamed({named:t})}case"optional":return f.Type.optional(this.convert({typeReference:e.typeReference.value}));case"nullable":return f.Type.optional(this.convert({typeReference:e.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:e.typeReference.value});case"set":return f.Type.slice(this.convert({typeReference:e.typeReference}));case"unknown":return this.convertUnknown();default:A(e.typeReference)}}convertLiteral({literal:e}){switch(e.type){case"boolean":return f.Type.bool();case"string":return f.Type.string()}}convertNamed({named:e}){let t=f.Type.reference(f.typeReference({name:this.context.getTypeName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}));switch(e.type){case"alias":case"enum":return t;case"discriminatedUnion":case"object":case"undiscriminatedUnion":return f.Type.pointer(t);default:A(e)}}convertUnknown(){return f.Type.any()}convertPrimitive({primitive:e}){switch(e){case"INTEGER":return f.Type.int();case"UINT":return f.Type.int();case"LONG":return f.Type.int64();case"UINT_64":return f.Type.int64();case"FLOAT":return f.Type.float64();case"DOUBLE":return f.Type.float64();case"BOOLEAN":return f.Type.bool();case"STRING":return f.Type.string();case"DATE":return f.Type.date();case"DATE_TIME":return f.Type.dateTime();case"UUID":return f.Type.uuid();case"BASE_64":return f.Type.bytes();case"BIG_INTEGER":return f.Type.string();default:A(e)}}};s();u();var sr=class{constructor({context:e}){h(this,"context");this.context=e}getFilePropertyInfo({body:e,value:t}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(t))!=null?o:{};for(let a of e.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getTypeName(a.name),value:this.getSingleFileProperty({property:a,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getTypeName(a.name),value:this.getArrayFileProperty({property:a,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getTypeName(a.name.name),value:this.getBodyProperty({property:a,record:i})});break;default:A(a)}return n}getSingleFileProperty({property:e,record:t}){let n=this.context.getSingleFileValue({property:e,record:t});return n==null?f.TypeInstantiation.nop():f.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(n))}getArrayFileProperty({property:e,record:t}){let n=this.context.getFileArrayValues({property:e,record:t});return n==null?f.TypeInstantiation.nop():f.TypeInstantiation.slice({valueType:f.Type.reference(this.context.getIoReaderTypeReference()),values:n.map(i=>f.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(i)))})}getBodyProperty({property:e,record:t}){let n=t[e.name.wireValue];return n==null?f.TypeInstantiation.nop():this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.typeReference,value:n})}};var ur=class r extends lt{constructor({ir:t,config:n}){super({ir:t,config:n});h(this,"ir");h(this,"customConfig");h(this,"dynamicTypeMapper");h(this,"dynamicTypeInstantiationMapper");h(this,"filePropertyMapper");h(this,"rootImportPath");this.ir=t,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeMapper=new ar({context:this}),this.dynamicTypeInstantiationMapper=new or({context:this}),this.filePropertyMapper=new sr({context:this}),this.rootImportPath=Pn({config:n,customConfig:this.customConfig})}clone(){return new r({ir:this.ir,config:this.config})}getMethodName(t){return t.pascalCase.unsafeName}getTypeName(t){return t.pascalCase.unsafeName}getImportPath(t){let n=t.packagePath.map(i=>i.pascalCase.unsafeName.toLowerCase());return[this.rootImportPath,...n].join("/")}getContextTypeReference(){return f.typeReference({name:"Context",importPath:"context"})}getContextTodoFunctionInvocation(){return f.invokeFunc({func:f.typeReference({name:"TODO",importPath:"context"}),arguments_:[]})}getIoReaderTypeReference(){return f.typeReference({name:"Reader",importPath:"io"})}getNewStringsReaderFunctionInvocation(t){return f.invokeFunc({func:f.typeReference({name:"NewReader",importPath:"strings"}),arguments_:[f.TypeInstantiation.string(t)]})}getClientConstructorName(){var t;return((t=this.customConfig)==null?void 0:t.exportedClientName)!=null?`New${this.customConfig.exportedClientName}`:"NewClient"}getClientImportPath(){return`${this.rootImportPath}/client`}getOptionImportPath(){return`${this.rootImportPath}/option`}getGoTypeReferenceFromDeclaration({declaration:t}){return f.typeReference({name:t.name.pascalCase.unsafeName,importPath:this.getImportPath(t.fernFilepath)})}getEnvironmentTypeReferenceFromID(t){let n=this.resolveEnvironmentName(t);if(n!=null)return this.getEnvironmentTypeReference(n)}getEnvironmentTypeReference(t){return f.typeReference({name:`Environments.${this.getTypeName(t)}`,importPath:this.rootImportPath})}};var cr=class extends ut{constructor({ir:t,config:n,formatter:i}){super(new ur({ir:t,config:n}));h(this,"formatter");this.formatter=i}async generate(t){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 Le;for(let o of n){let a=this.context.clone(),p=new dt({context:a,formatter:this.formatter});try{let l=await p.generateSnippet({endpoint:o,request:t});if(a.errors.empty())return{snippet:l,errors:void 0};i.update({context:a,snippet:l})}catch(l){i.err==null&&(i.err=l)}}return i.getResponseOrThrow({endpoint:t.endpoint})}generateSync(t){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 Le;for(let o of n){let a=this.context.clone(),p=new dt({context:a,formatter:this.formatter});try{let l=p.generateSnippetSync({endpoint:o,request:t});if(a.errors.empty())return{snippet:l,errors:void 0};i.update({context:a,snippet:l})}catch(l){i.err==null&&(i.err=l)}}return i.getResponseOrThrow({endpoint:t.endpoint})}};0&&(module.exports={DynamicSnippetsGenerator});
29
+ )`:""}};var S=class extends Ie{async toStringAsync({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o}){let a=new Et({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o});return this.write(a),a.toStringAsync()}toString({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o}){let a=new Et({packageName:e,rootImportPath:t,importPath:n,customConfig:i,formatter:o});return this.write(a),a.toString()}};var q=class extends S{constructor({name:t,importPath:n}){super();h(this,"name");h(this,"importPath");this.name=t,this.importPath=n}write(t){if(t.importPath===this.importPath){t.write(this.name);return}let n=t.addImport(this.importPath);t.write(`${n}.${this.name}`)}};var nd=new Set(["any","bytes","map","slice"]),Pt=class r extends S{constructor(t){super();h(this,"internalType");this.internalType=t}write(t,{comment:n}={}){switch(this.internalType.type){case"any":t.write("interface{}");break;case"bool":t.write("bool");break;case"bytes":t.write("[]byte");break;case"date":case"dateTime":t.writeNode(id);break;case"float64":t.write("float64");break;case"int":t.write("int");break;case"int64":t.write("int64");break;case"map":{t.write("map["),this.internalType.keyType.write(t),t.write("]"),this.internalType.valueType.write(t);break}case"optional":{t.write("*"),this.internalType.value.write(t);break}case"reference":t.writeNode(this.internalType.value);break;case"slice":t.write("[]"),this.internalType.value.write(t);break;case"string":t.write("string");break;case"uuid":t.writeNode(od);break;default:E(this.internalType)}}isOptional(){return this.internalType.type==="optional"}static any(){return new this({type:"any"})}static bool(){return new this({type:"bool"})}static bytes(){return new this({type:"bytes"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static float64(){return new this({type:"float64"})}static int(){return new this({type:"int"})}static int64(){return new this({type:"int64"})}static map(t,n){return new this({type:"map",keyType:t,valueType:n})}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static pointer(t){return r.optional(t)}static reference(t){return new this({type:"reference",value:t})}static slice(t){return new this({type:"slice",value:t})}static string(){return new this({type:"string"})}static uuid(){return new this({type:"uuid"})}static isAlreadyOptional(t){return t.internalType.type==="optional"||nd.has(t.internalType.type)}},id=new q({importPath:"time",name:"Time"}),od=new q({importPath:"github.com/google/uuid",name:"UUID"});s();u();var ad="sdk";function ni({config:r,customConfig:e}){let t=ud({config:r}),n=sd({config:r,customConfig:e});return t!=null?cd({importPath:n,majorVersion:t}):n}function sd({config:r,customConfig:e}){var t,n,i;return(i=(n=e==null?void 0:e.importPath)!=null?n:(t=e==null?void 0:e.module)==null?void 0:t.path)!=null?i:r.output.mode.type==="github"?ld(r.output.mode.repoUrl,"https://"):ad}function ud({config:r}){let e=pd({config:r});if(!(e==null||e==="v0"||e==="v1"))return`${e}`}function pd({config:r}){let e=fd(r);if(e==null)return;let t=e.split(".");if(t[0]==null)return;let n=t[0];return n.startsWith("v")?n:`v${n}`}function cd({importPath:r,majorVersion:e}){return St(r)===e?r:`${r}/${e}`}function ld(r,e){return r.startsWith(e)?r.slice(e.length):r}function fd(r){var t;let e=(t=r==null?void 0:r.output)==null?void 0:t.mode;if(e!=null)return e.type==="github"||e.type==="publish"?e.version:void 0}s();u();s();u();var K=class extends S{constructor(t){super();h(this,"arg");this.arg=t}write(t){return new H(this.arg).write(t)}};s();u();s();u();var k=class extends S{constructor({docs:t}={}){super();h(this,"docs");this.docs=t}write(t){this.docs!=null&&this.docs.split(`
30
+ `).forEach(n=>{t.writeLine(`// ${n}`)})}};var Ee=class extends S{constructor({name:t,docs:n}){super();h(this,"name");h(this,"docs");h(this,"members",[]);this.name=t,this.docs=n}addMember(t){this.members.push(t)}write(t){t.writeNode(new k({docs:this.docs})),t.write(`type ${this.name} string`)}};s();u();var Pe=class extends S{constructor({name:t,type:n,docs:i}){super();h(this,"name");h(this,"type");h(this,"docs");this.name=t,this.type=n,this.docs=i}write(t){t.writeNode(new k({docs:this.docs})),t.write(`${this.name} `),this.type.write(t)}};s();u();var Re=class extends S{constructor({nodes:t}={nodes:[]}){super();h(this,"nodes");this.nodes=t!=null?t:[]}add(...t){this.nodes.push(...t)}write(t){for(let n of this.nodes)n.write(t)}};s();u();s();u();var ie=class extends S{constructor({name:t,parameters:n,return_:i,body:o,docs:a,typeReference:c}){super();h(this,"name");h(this,"parameters");h(this,"return_");h(this,"body");h(this,"docs");h(this,"typeReference");this.name=t,this.parameters=n,this.return_=i,this.body=o,this.docs=a,this.typeReference=c}write(t){var n;if(t.writeNode(new k({docs:this.docs})),t.write("func "),this.typeReference!=null&&this.writeReceiver({writer:t,typeReference:this.typeReference}),t.write(`${this.name}`),this.parameters.length===0)t.write("() ");else{t.writeLine("(");for(let i of this.parameters)t.writeNode(i),t.writeLine(",");t.write(")")}this.return_!=null&&(t.write("("),this.return_.forEach((i,o)=>{o>0&&t.write(", "),t.writeNode(i)}),t.write(")")),t.writeLine(" {"),t.indent(),(n=this.body)==null||n.write(t),t.dedent(),t.writeNewLineIfLastLineNot(),t.writeLine("}")}writeReceiver({writer:t,typeReference:n}){t.write(`(${this.getReceiverName(n.name)} `),n.write(t),t.write(") ")}getReceiverName(t){return t.charAt(0).toLowerCase()}};var Fe=class extends S{constructor({name:t,parameters:n,return_:i,body:o,docs:a}){super();h(this,"func");this.func=new ie({name:t,parameters:n,return_:i,body:o,docs:a})}get name(){return this.func.name}get parameters(){return this.func.parameters}get return_(){return this.func.return_}get body(){return this.func.body}get docs(){return this.func.docs}write(t){t.writeNode(this.func)}};s();u();s();u();s();u();s();u();var oe=class extends S{constructor({method:t,arguments_:n,on:i}){super();h(this,"on");h(this,"method");h(this,"arguments_");this.on=i,this.method=t,this.arguments_=n}write(t){this.on.write(t),t.write("."),t.write(this.method),xr({writer:t,arguments_:this.arguments_})}};var yd=new Set(["bool","date","dateTime","float64","int","int64","string","uuid"]),np=new Set(["any","bytes","map","slice"]),M=class r extends S{constructor(t){super();h(this,"internalType");this.internalType=t}write(t){switch(this.internalType.type){case"any":this.writeAny({writer:t,value:this.internalType.value});break;case"bool":t.write(this.internalType.value.toString());break;case"bytes":t.write(`[]byte("${this.internalType.value}")`);break;case"date":case"dateTime":t.writeNode(md({writer:t,type:this.internalType}));break;case"enum":t.writeNode(this.internalType.typeReference);break;case"float64":t.write(this.internalType.value.toString());break;case"int":case"int64":t.write(this.internalType.value.toString());break;case"map":this.writeMap({writer:t,map:this.internalType});break;case"nil":t.write("nil");break;case"nop":break;case"optional":this.writeOptional({writer:t,type:this.internalType.value});break;case"reference":t.writeNode(this.internalType.value);break;case"slice":this.writeSlice({writer:t,slice:this.internalType});break;case"string":t.write(this.internalType.value.includes('"')||this.internalType.value.includes(`
31
+ `)?`\`${this.internalType.value}\``:`"${this.internalType.value}"`);break;case"struct":this.writeStruct({writer:t,struct:this.internalType});break;case"uuid":t.writeNode(gd({value:this.internalType.value}));break;default:E(this.internalType)}}static any(t){return new this({type:"any",value:t})}static bool(t){return new this({type:"bool",value:t})}static bytes(t){return new this({type:"bytes",value:t})}static date(t){return new this({type:"date",value:t})}static dateTime(t){return new this({type:"dateTime",value:t})}static enum(t){return new this({type:"enum",typeReference:t})}static float64(t){return new this({type:"float64",value:t})}static int(t){return new this({type:"int",value:t})}static int64(t){return new this({type:"int64",value:t})}static map({keyType:t,valueType:n,entries:i}){return new this({type:"map",keyType:t,valueType:n,entries:i})}static nil(){return new this({type:"nil"})}static nop(){return new this({type:"nop"})}static optional(t){return this.isAlreadyOptional(t)?t:new this({type:"optional",value:t})}static reference(t){return new this({type:"reference",value:t})}static slice({valueType:t,values:n}){return new this({type:"slice",valueType:t,values:n})}static string(t){return new this({type:"string",value:t})}static struct({typeReference:t,fields:n}){return new this({type:"struct",typeReference:t,fields:n})}static structPointer({typeReference:t,fields:n}){return new this({type:"optional",value:new this({type:"struct",typeReference:t,fields:n})})}static uuid(t){return new this({type:"uuid",value:t})}static isNop(t){return t.internalType.type==="optional"?this.isNop(t.internalType.value):t.internalType.type==="nop"}writeAny({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("nil");return}if(Array.isArray(n)){this.writeAnyArray({writer:t,value:n});return}this.writeAnyObject({writer:t,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeAnyArray({writer:t,value:n}){if(t.write("[]interface{}"),n.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let i of n)t.writeNode(r.any(i)),t.writeLine(",");t.dedent(),t.write("}")}writeAnyObject({writer:t,value:n}){t.write("map[string]interface{}");let i=Object.entries(n);if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let[o,a]of i)t.write(`"${o}": `),t.writeNode(r.any(a)),t.writeLine(",");t.dedent(),t.write("}")}writeMap({writer:t,map:n}){t.write("map["),t.writeNode(n.keyType),t.write("]"),t.writeNode(n.valueType);let i=vd({entries:n.entries});if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of i)o.key.write(t),t.write(": "),o.value.write(t),t.writeLine(",");t.dedent(),t.write("}")}writeOptional({writer:t,type:n}){if(yd.has(n.internalType.type)){t.writeNode(hd({writer:t,type:n}));return}if(np.has(n.internalType.type)){n.write(t);return}if(n.internalType.type==="enum"){t.writeNode(new oe({on:n.internalType.typeReference,method:"Ptr",arguments_:[]}));return}t.write("&"),n.write(t)}static isAlreadyOptional(t){return t.internalType.type==="optional"||np.has(t.internalType.type)}writeSlice({writer:t,slice:n}){t.write("[]"),t.writeNode(n.valueType);let i=xd({values:n.values});if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of i)o.write(t),t.writeLine(",");t.dedent(),t.write("}")}writeStruct({writer:t,struct:n}){t.writeNode(n.typeReference);let i=wd({fields:n.fields});if(i.length===0){t.write("{}");return}t.writeLine("{"),t.indent();for(let o of i)t.write(`${o.name}: `),o.value.write(t),t.writeLine(",");t.dedent(),t.write("}")}};function hd({writer:r,type:e}){return new L({func:new q({name:dd({type:e}),importPath:r.rootImportPath}),arguments_:[e]})}function dd({type:r}){switch(r.internalType.type){case"bool":return"Bool";case"date":case"dateTime":return"Time";case"float64":return"Float64";case"int":return"Int";case"int64":return"Int64";case"string":return"String";case"uuid":return"UUID";default:return""}}function md({writer:r,type:e}){let t=e instanceof Date?"MustParseDate":"MustParseDateTime";return new L({func:new q({name:t,importPath:r.rootImportPath}),arguments_:[new K(`"${e.value}"`)]})}function gd({value:r}){return new L({func:new q({name:"MustParse",importPath:"github.com/google/uuid"}),arguments_:[new K(`"${r}"`)]})}function vd({entries:r}){return r.filter(e=>!M.isNop(e.key)&&!M.isNop(e.value))}function wd({fields:r}){return r.filter(e=>!M.isNop(e.value))}function xd({values:r}){return r.filter(e=>!M.isNop(e))}function xr({writer:r,arguments_:e}){let t=Td(e);if(t.length===0){r.write("()");return}r.writeLine("("),r.indent();for(let n of t)Ad({writer:r,argument:n}),r.writeLine(",");r.dedent(),r.write(")")}function Ad({writer:r,argument:e}){ri(e)?r.writeNodeOrString(e.assignment):e.write(r)}function Td(r){return r.filter(e=>!(e instanceof M&&M.isNop(e)))}var L=class extends S{constructor({func:t,arguments_:n}){super();h(this,"func");h(this,"arguments_");this.func=t,this.arguments_=n}write(t){t.writeNode(this.func),xr({writer:t,arguments_:this.arguments_})}};s();u();var Ne=class extends S{constructor({name:t,type:n,docs:i}){super();h(this,"name");h(this,"type");h(this,"docs");this.name=t,this.type=n,this.docs=i}write(t){t.writeNode(new k({docs:this.docs})),t.write(`${this.name} `),this.type.write(t)}};s();u();var Oe=class extends S{constructor({name:t,importPath:n,docs:i}){super();h(this,"name");h(this,"importPath");h(this,"docs");h(this,"fields",[]);h(this,"methods",[]);this.name=t,this.importPath=n,this.docs=i}addField(t){this.fields.push(t)}addMethod(t){this.methods.push(t)}write(t){if(t.writeNode(new k({docs:this.docs})),t.write(`type ${this.name} struct {`),this.fields.length===0)t.writeLine("}");else{t.newLine(),t.indent();for(let n of this.fields)t.writeNode(n),t.newLine();t.dedent(),t.writeLine("}")}if(this.methods.length>0){t.newLine();for(let n of this.methods)t.writeNode(n),t.newLine()}}};var y={};Ur(y,{AstNode:()=>S,CodeBlock:()=>K,Enum:()=>Ee,Field:()=>Pe,File:()=>Re,Func:()=>Fe,FuncInvocation:()=>L,Method:()=>ie,MethodInvocation:()=>oe,Parameter:()=>Ne,Struct:()=>Oe,Type:()=>Pt,TypeInstantiation:()=>M,TypeReference:()=>q,Writer:()=>Se,codeblock:()=>bd,enum_:()=>Id,field:()=>Sd,file:()=>Ed,func:()=>Pd,invokeFunc:()=>Rd,invokeMethod:()=>Fd,method:()=>Nd,parameter:()=>Od,struct:()=>Ud,typeReference:()=>Bd});s();u();function bd(r){return new K(r)}function Id(r){return new Ee(r)}function Sd(r){return new Pe(r)}function Ed(r={}){return new Re(r)}function Pd(r){return new Fe(r)}function Rd(r){return new L(r)}function Fd(r){return new oe(r)}function Nd(r){return new ie(r)}function Od(r){return new Ne(r)}function Ud(r){return new Oe(r)}function Bd(r){return new q(r)}var ip="example",op="fern",$d="do",ap="client",Ar=class{constructor({context:e,formatter:t}){h(this,"context");h(this,"formatter");this.context=e,this.formatter=t}async generateSnippet({endpoint:e,request:t}){var i;return await this.buildCodeBlock({endpoint:e,snippet:t}).toStringAsync({packageName:ip,importPath:op,rootImportPath:this.context.rootImportPath,customConfig:(i=this.context.customConfig)!=null?i:{},formatter:this.formatter})}generateSnippetSync({endpoint:e,request:t}){var i;return this.buildCodeBlock({endpoint:e,snippet:t}).toString({packageName:ip,importPath:op,rootImportPath:this.context.rootImportPath,customConfig:(i=this.context.customConfig)!=null?i:{},formatter:this.formatter})}buildCodeBlock({endpoint:e,snippet:t}){return y.func({name:$d,parameters:[],return_:[],body:y.codeblock(n=>{n.writeNode(this.constructClient({endpoint:e,snippet:t})),n.writeLine(),n.writeNode(this.callMethod({endpoint:e,snippet:t}))})})}constructClient({endpoint:e,snippet:t}){return y.codeblock(n=>{n.write(`${ap} := `),n.writeNode(this.getRootClientFuncInvocation(this.getConstructorArgs({endpoint:e,snippet:t})))})}callMethod({endpoint:e,snippet:t}){return y.invokeMethod({on:y.codeblock(ap),method:this.getMethod({endpoint:e}),arguments_:[this.context.getContextTodoFunctionInvocation(),...this.getMethodArgs({endpoint:e,snippet:t})]})}getConstructorArgs({endpoint:e,snippet:t}){let n=[],i=this.getConstructorBaseUrlArg({baseUrl:t.baseURL,environment:t.environment});return i!=null&&n.push(i),e.auth!=null&&(t.auth!=null?n.push(this.getConstructorAuthArg({auth:e.auth,values:t.auth})):this.context.errors.add({severity:b.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(J.Headers),this.context.ir.headers!=null&&t.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),n}getConstructorAuthArg({auth:e,values:t}){switch(e.type){case"basic":return t.type!=="basic"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),y.TypeInstantiation.nop()):this.getConstructorBasicAuthArg({auth:e,values:t});case"bearer":return t.type!=="bearer"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),y.TypeInstantiation.nop()):this.getConstructorBearerAuthArg({auth:e,values:t});case"header":return t.type!=="header"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),y.TypeInstantiation.nop()):this.getConstructorHeaderAuthArg({auth:e,values:t});case"oauth":return t.type!=="oauth"?(this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),y.TypeInstantiation.nop()):(this.context.errors.add({severity:b.Warning,message:"The Go SDK doesn't support OAuth client credentials yet"}),y.TypeInstantiation.nop());default:E(e)}}getConstructorBasicAuthArg({auth:e,values:t}){return y.codeblock(n=>{n.writeNode(y.invokeFunc({func:y.typeReference({name:"WithBasicAuth",importPath:this.context.getOptionImportPath()}),arguments_:[y.TypeInstantiation.string(t.username),y.TypeInstantiation.string(t.password)]}))})}getConstructorBaseUrlArg({baseUrl:e,environment:t}){let n=this.getBaseUrlArg({baseUrl:e,environment:t});if(n!=null)return y.codeblock(i=>{i.writeNode(y.invokeFunc({func:y.typeReference({name:"WithBaseURL",importPath:this.context.getOptionImportPath()}),arguments_:[n]}))})}getBaseUrlArg({baseUrl:e,environment:t}){if(e!=null&&t!=null){this.context.errors.add({severity:b.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(e!=null)return y.TypeInstantiation.string(e);if(t!=null){if(this.context.isSingleEnvironmentID(t)){let n=this.context.getEnvironmentTypeReferenceFromID(t);if(n==null){this.context.errors.add({severity:b.Warning,message:`Environment ${JSON.stringify(t)} was not found`});return}return y.TypeInstantiation.reference(n)}this.context.isMultiEnvironmentValues(t)&&this.context.errors.add({severity:b.Warning,message:"The Go SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}}getConstructorBearerAuthArg({auth:e,values:t}){return y.codeblock(n=>{n.writeNode(y.invokeFunc({func:y.typeReference({name:`With${e.token.pascalCase.unsafeName}`,importPath:this.context.getOptionImportPath()}),arguments_:[y.TypeInstantiation.string(t.token)]}))})}getConstructorHeaderAuthArg({auth:e,values:t}){return y.codeblock(n=>{n.writeNode(y.invokeFunc({func:y.typeReference({name:`With${e.header.name.name.pascalCase.unsafeName}`,importPath:this.context.getOptionImportPath()}),arguments_:[this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.header.typeReference,value:t.value})]}))})}getConstructorHeaderArgs({headers:e,values:t}){let n=[];for(let i of e){let o=this.getConstructorHeaderArg({header:i,value:t.value});o!=null&&n.push(o)}return n}getConstructorHeaderArg({header:e,value:t}){let n=this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.typeReference,value:t});if(!y.TypeInstantiation.isNop(n))return y.codeblock(i=>{i.writeNode(y.invokeFunc({func:y.typeReference({name:`With${e.name.name.pascalCase.unsafeName}`,importPath:this.context.getOptionImportPath()}),arguments_:[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:E(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){var o,a;let n=[];this.context.errors.scope(J.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(a=e.pathParameters)!=null?a:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:t}).map(c=>c.value)),this.context.errors.unscope(),this.context.errors.scope(J.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.dynamicTypeInstantiationMapper.convert({typeReference:e.value,value:t});default:E(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:b.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),y.TypeInstantiation.nop()):y.TypeInstantiation.bytes(e)}getMethodArgsForInlinedRequest({request:e,snippet:t}){var v,g,m,w,x,I;let n=[],{inlinePathParameters:i,inlineFileProperties:o}={inlinePathParameters:(g=(v=this.context.customConfig)==null?void 0:v.inlinePathParameters)!=null?g:!1,inlineFileProperties:(w=(m=this.context.customConfig)==null?void 0:m.inlineFileProperties)!=null?w:!1};this.context.errors.scope(J.PathParameters);let a=[],c=[...(x=this.context.ir.pathParameters)!=null?x:[],...(I=e.pathParameters)!=null?I:[]];c.length>0&&a.push(...this.getPathParameters({namedParameters:c,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(J.RequestBody);let f=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})||n.push(...a.map(P=>P.value)),o||n.push(...f.fileFields.map(P=>P.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:i,inlineFileProperties:o})&&n.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:i})?a:[],filePropertyInfo:f})),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:i}){var g,m,w,x;this.context.errors.scope(J.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(g=e.queryParameters)!=null?g:[],values:(m=t.queryParameters)!=null?m:{}}).map(I=>({name:I.name.name.pascalCase.unsafeName,value:this.context.dynamicTypeInstantiationMapper.convert(I)}));this.context.errors.unscope(),this.context.errors.scope(J.Headers);let f=this.context.associateByWireValue({parameters:(w=e.headers)!=null?w:[],values:(x=t.headers)!=null?x:{}}).map(I=>({name:I.name.name.pascalCase.unsafeName,value:this.context.dynamicTypeInstantiationMapper.convert(I)}));this.context.errors.unscope(),this.context.errors.scope(J.RequestBody);let v=e.body!=null?this.getInlinedRequestBodyStructFields({body:e.body,value:t.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),y.TypeInstantiation.structPointer({typeReference:y.typeReference({name:this.context.getMethodName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}),fields:[...n,...a,...f,...v]})}getInlinedRequestBodyStructFields({body:e,value:t,filePropertyInfo:n}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyStructFields({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyStructField({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyStructFields({filePropertyInfo:n});default:E(e)}}getFileUploadRequestBodyStructFields({filePropertyInfo:e}){var t;return(t=this.context.customConfig)!=null&&t.inlineFileProperties?[...e.fileFields,...e.bodyPropertyFields]:e.bodyPropertyFields}getReferencedRequestBodyPropertyStructField({body:e,value:t}){return{name:this.context.getTypeName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeInstantiation({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeInstantiation({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.value,value:t});default:E(e)}}getInlinedRequestBodyPropertyStructFields({parameters:e,value:t}){var o;let n=[],i=this.context.associateByWireValue({parameters:e,values:(o=this.context.getRecord(t))!=null?o:{}});for(let a of i)n.push({name:this.context.getTypeName(a.name.name),value:this.context.dynamicTypeInstantiationMapper.convert(a)});return n}getPathParameters({namedParameters:e,snippet:t}){var o;let n=[],i=this.context.associateByWireValue({parameters:e,values:(o=t.pathParameters)!=null?o:{}});for(let a of i)n.push({name:this.context.getTypeName(a.name.name),value:this.context.dynamicTypeInstantiationMapper.convert(a)});return n}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>this.context.getMethodName(t)).join(".")}.${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientFuncInvocation(e){return y.invokeFunc({func:y.typeReference({name:this.context.getClientConstructorName(),importPath:this.context.getClientImportPath()}),arguments_:e})}};s();u();s();u();var Tr=class{constructor({context:e}){h(this,"context");this.context=e}convert(e){if(e.value===null&&!this.context.isNullable(e.typeReference)&&this.context.errors.add({severity:b.Critical,message:"Expected non-null value, but got null"}),e.value==null)return y.TypeInstantiation.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return y.TypeInstantiation.nop();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?y.TypeInstantiation.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"nullable":return y.TypeInstantiation.optional(this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as}));case"optional":return y.TypeInstantiation.optional(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"set":return this.convertList({list:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:E(e.typeReference)}}convertList({list:e,value:t}){return Array.isArray(t)?y.TypeInstantiation.slice({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:t.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:b.Critical,message:`Expected array but got: ${typeof t}`}),y.TypeInstantiation.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:b.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),y.TypeInstantiation.nop()):y.TypeInstantiation.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:e.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:e.value}),entries:Object.entries(t).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:i})}}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:E(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){let n=this.context.getGoTypeReferenceFromDeclaration({declaration:e.declaration}),i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(i==null)return y.TypeInstantiation.nop();let o=i.singleDiscriminatedUnionType,a=this.getBaseFields({discriminatedUnionTypeInstance:i,singleDiscriminatedUnionType:o});switch(o.type){case"samePropertiesAsObject":{let c=this.context.resolveNamedType({typeId:o.typeId});return c==null?y.TypeInstantiation.nop():y.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convertNamed({named:c,value:i.value})},...a]})}case"singleProperty":{let c=this.context.getRecord(i.value);if(c==null)return y.TypeInstantiation.nop();try{return this.context.errors.scope(o.discriminantValue.wireValue),y.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(o.discriminantValue.name),value:this.convert({typeReference:o.typeReference,value:c[o.discriminantValue.wireValue]})},...a]})}finally{this.context.errors.unscope()}}case"noProperties":return y.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(i.discriminantValue.name),value:y.TypeInstantiation.string(o.discriminantValue.wireValue)},...a]});default:E(o)}}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t}){var i,o;return this.context.associateByWireValue({parameters:(i=t.properties)!=null?i:[],values:(o=this.context.getRecord(e.value))!=null?o:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getTypeName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:t}){var i;let n=this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(t))!=null?i:{}});return y.TypeInstantiation.structPointer({typeReference:y.typeReference({name:this.context.getTypeName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}),fields:n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getTypeName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.enum(y.typeReference({name:n,importPath:this.context.getImportPath(e.declaration.fernFilepath)}))}getEnumValueName({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:b.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(i=>i.wireValue===t);if(n==null){this.context.errors.add({severity:b.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return`${this.context.getTypeName(e.declaration.name)}${this.context.getTypeName(n.name)}`}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t});if(n==null)return y.TypeInstantiation.nop();let i=this.getUndiscriminatedUnionFieldName({typeReference:n.valueTypeReference});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.structPointer({typeReference:this.context.getGoTypeReferenceFromDeclaration({declaration:e.declaration}),fields:[{name:i,value:n.typeInstantiation}]})}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t}){for(let n of e.types)try{let i=this.convert({typeReference:n,value:t});return{valueTypeReference:n,typeInstantiation:i}}catch(i){continue}this.context.errors.add({severity:b.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof t}" value`})}getUndiscriminatedUnionFieldName({typeReference:e}){switch(e.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:e});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:e.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:e});case"named":{let t=this.context.resolveNamedType({typeId:e.value});return t==null?void 0:this.context.getTypeName(t.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"nullable":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:e.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:e});case"unknown":return"Unknown";default:E(e)}}getUndiscriminatedUnionFieldNameForList({list:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}List`}getUndiscriminatedUnionFieldNameForMap({map:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e.key});if(t==null)return;let n=this.getUndiscriminatedUnionFieldName({typeReference:e.value});if(n!=null)return`${t}${n}Map`}getUndiscriminatedUnionFieldNameForOptional({typeReference:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}Optional`}getUndiscriminatedUnionFieldNameForSet({set:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}Set`}getUndiscriminatedUnionFieldNameForLiteral({literal:e}){switch(e.type){case"boolean":return e.value?"TrueLiteral":"FalseLiteral";case"string":return`${e.value}StringLiteral`;default:E(e)}}getUndiscriminatedUnionFieldNameForPrimitive({primitive:e}){switch(e){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:E(e)}}convertUnknown({value:e}){return y.TypeInstantiation.any(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"UINT":{let i=this.getValueAsNumber({value:t,as:n});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.int(i)}case"LONG":case"UINT_64":{let i=this.getValueAsNumber({value:t,as:n});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.int64(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:t,as:n});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.float64(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:t,as:n});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.bool(i)}case"STRING":{let i=this.context.getValueAsString({value:t});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.string(i)}case"DATE":{let i=this.context.getValueAsString({value:t});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:t});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.dateTime(i)}case"UUID":{let i=this.context.getValueAsString({value:t});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.uuid(i)}case"BASE_64":{let i=this.context.getValueAsString({value:t});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.bytes(i)}case"BIG_INTEGER":{let i=this.context.getValueAsString({value:t});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.string(i)}default:E(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})}};s();u();var br=class{constructor({context:e}){h(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return y.Type.slice(this.convert({typeReference:e.typeReference}));case"literal":return this.convertLiteral({literal:e.typeReference.value});case"map":return y.Type.map(this.convert({typeReference:e.typeReference.key}),this.convert({typeReference:e.typeReference.value}));case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?this.convertUnknown():this.convertNamed({named:t})}case"optional":return y.Type.optional(this.convert({typeReference:e.typeReference.value}));case"nullable":return y.Type.optional(this.convert({typeReference:e.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:e.typeReference.value});case"set":return y.Type.slice(this.convert({typeReference:e.typeReference}));case"unknown":return this.convertUnknown();default:E(e.typeReference)}}convertLiteral({literal:e}){switch(e.type){case"boolean":return y.Type.bool();case"string":return y.Type.string()}}convertNamed({named:e}){let t=y.Type.reference(y.typeReference({name:this.context.getTypeName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}));switch(e.type){case"alias":case"enum":return t;case"discriminatedUnion":case"object":case"undiscriminatedUnion":return y.Type.pointer(t);default:E(e)}}convertUnknown(){return y.Type.any()}convertPrimitive({primitive:e}){switch(e){case"INTEGER":return y.Type.int();case"UINT":return y.Type.int();case"LONG":return y.Type.int64();case"UINT_64":return y.Type.int64();case"FLOAT":return y.Type.float64();case"DOUBLE":return y.Type.float64();case"BOOLEAN":return y.Type.bool();case"STRING":return y.Type.string();case"DATE":return y.Type.date();case"DATE_TIME":return y.Type.dateTime();case"UUID":return y.Type.uuid();case"BASE_64":return y.Type.bytes();case"BIG_INTEGER":return y.Type.string();default:E(e)}}};s();u();var Ir=class{constructor({context:e}){h(this,"context");this.context=e}getFilePropertyInfo({body:e,value:t}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(t))!=null?o:{};for(let a of e.properties)switch(a.type){case"file":n.fileFields.push({name:this.context.getTypeName(a.name),value:this.getSingleFileProperty({property:a,record:i})});break;case"fileArray":n.fileFields.push({name:this.context.getTypeName(a.name),value:this.getArrayFileProperty({property:a,record:i})});break;case"bodyProperty":n.bodyPropertyFields.push({name:this.context.getTypeName(a.name.name),value:this.getBodyProperty({property:a,record:i})});break;default:E(a)}return n}getSingleFileProperty({property:e,record:t}){let n=this.context.getSingleFileValue({property:e,record:t});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(n))}getArrayFileProperty({property:e,record:t}){let n=this.context.getFileArrayValues({property:e,record:t});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.slice({valueType:y.Type.reference(this.context.getIoReaderTypeReference()),values:n.map(i=>y.TypeInstantiation.reference(this.context.getNewStringsReaderFunctionInvocation(i)))})}getBodyProperty({property:e,record:t}){let n=t[e.name.wireValue];return n==null?y.TypeInstantiation.nop():this.context.dynamicTypeInstantiationMapper.convert({typeReference:e.typeReference,value:n})}};var Sr=class r extends It{constructor({ir:t,config:n}){super({ir:t,config:n});h(this,"ir");h(this,"customConfig");h(this,"dynamicTypeMapper");h(this,"dynamicTypeInstantiationMapper");h(this,"filePropertyMapper");h(this,"rootImportPath");this.ir=t,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeMapper=new br({context:this}),this.dynamicTypeInstantiationMapper=new Tr({context:this}),this.filePropertyMapper=new Ir({context:this}),this.rootImportPath=ni({config:n,customConfig:this.customConfig})}clone(){return new r({ir:this.ir,config:this.config})}getMethodName(t){return t.pascalCase.unsafeName}getTypeName(t){return t.pascalCase.unsafeName}getImportPath(t){let n=t.packagePath.map(i=>i.pascalCase.unsafeName.toLowerCase());return[this.rootImportPath,...n].join("/")}getContextTypeReference(){return y.typeReference({name:"Context",importPath:"context"})}getContextTodoFunctionInvocation(){return y.invokeFunc({func:y.typeReference({name:"TODO",importPath:"context"}),arguments_:[]})}getIoReaderTypeReference(){return y.typeReference({name:"Reader",importPath:"io"})}getNewStringsReaderFunctionInvocation(t){return y.invokeFunc({func:y.typeReference({name:"NewReader",importPath:"strings"}),arguments_:[y.TypeInstantiation.string(t)]})}getClientConstructorName(){var t,n;return((t=this.customConfig)==null?void 0:t.clientConstructorName)!=null?this.customConfig.clientConstructorName:((n=this.customConfig)==null?void 0:n.exportedClientName)!=null?`New${this.customConfig.exportedClientName}`:`New${this.getClientName()}`}getClientName(){var t;return((t=this.customConfig)==null?void 0:t.clientName)!=null?this.customConfig.clientName:"Client"}getClientImportPath(){var t;return((t=this.customConfig)==null?void 0:t.packageLayout)==="flat"?this.rootImportPath:`${this.rootImportPath}/client`}getOptionImportPath(){return`${this.rootImportPath}/option`}getGoTypeReferenceFromDeclaration({declaration:t}){return y.typeReference({name:t.name.pascalCase.unsafeName,importPath:this.getImportPath(t.fernFilepath)})}getEnvironmentTypeReferenceFromID(t){let n=this.resolveEnvironmentName(t);if(n!=null)return this.getEnvironmentTypeReference(n)}getEnvironmentTypeReference(t){return y.typeReference({name:`Environments.${this.getTypeName(t)}`,importPath:this.rootImportPath})}};var Er=class extends At{constructor({ir:t,config:n,formatter:i}){super(new Sr({ir:t,config:n}));h(this,"formatter");this.formatter=i}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}createSnippetGenerator(t){return new Ar({context:t,formatter:this.formatter})}};0&&(module.exports={DynamicSnippetsGenerator});
32
32
  /*! Bundled license information:
33
33
 
34
34
  @esbuild-plugins/node-globals-polyfill/Buffer.js: