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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +15 -10
  2. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -0
  3. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  4. package/cjs/{DynamicSnippetsGeneratorContext-aXWxVpwD.d.cts → DynamicSnippetsGeneratorContext-4_I0JAlU.d.cts} +1 -0
  5. package/cjs/EndpointSnippetGenerator.cjs +15 -10
  6. package/cjs/EndpointSnippetGenerator.cjs.map +1 -0
  7. package/cjs/EndpointSnippetGenerator.d.cts +3 -1
  8. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +15 -10
  9. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -0
  10. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  11. package/cjs/context/DynamicTypeLiteralMapper.cjs +15 -10
  12. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -0
  13. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  14. package/cjs/context/FilePropertyMapper.cjs +14 -9
  15. package/cjs/context/FilePropertyMapper.cjs.map +1 -0
  16. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  17. package/cjs/index.cjs +24 -19
  18. package/cjs/index.cjs.map +1 -0
  19. package/cjs/index.d.cts +2 -2
  20. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  21. package/esm/DynamicSnippetsGenerator.js +2 -1
  22. package/esm/DynamicSnippetsGenerator.js.map +1 -0
  23. package/esm/{DynamicSnippetsGeneratorContext-aXWxVpwD.d.ts → DynamicSnippetsGeneratorContext-4_I0JAlU.d.ts} +1 -0
  24. package/esm/EndpointSnippetGenerator.d.ts +3 -1
  25. package/esm/EndpointSnippetGenerator.js +2 -1
  26. package/esm/EndpointSnippetGenerator.js.map +1 -0
  27. package/esm/{chunk-BVS32MTY.js → chunk-3LXSVXLG.js} +2 -1
  28. package/esm/chunk-3LXSVXLG.js.map +1 -0
  29. package/esm/chunk-7DC5LAKR.js +28 -0
  30. package/esm/chunk-7DC5LAKR.js.map +1 -0
  31. package/esm/{chunk-OCJMJMBV.js → chunk-A2A6Z7VZ.js} +2 -1
  32. package/esm/chunk-A2A6Z7VZ.js.map +1 -0
  33. package/esm/{chunk-LKHXBDU2.js → chunk-QZ6H2KCF.js} +2 -1
  34. package/esm/chunk-QZ6H2KCF.js.map +1 -0
  35. package/esm/chunk-RZQMRQM5.js +2 -0
  36. package/esm/chunk-RZQMRQM5.js.map +1 -0
  37. package/esm/chunk-UU6KFSXM.js +2 -0
  38. package/esm/chunk-UU6KFSXM.js.map +1 -0
  39. package/esm/chunk-VDFQDR2Q.js +2 -0
  40. package/esm/chunk-VDFQDR2Q.js.map +1 -0
  41. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  42. package/esm/context/DynamicSnippetsGeneratorContext.js +2 -1
  43. package/esm/context/DynamicSnippetsGeneratorContext.js.map +1 -0
  44. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  45. package/esm/context/DynamicTypeLiteralMapper.js +2 -1
  46. package/esm/context/DynamicTypeLiteralMapper.js.map +1 -0
  47. package/esm/context/FilePropertyMapper.d.ts +1 -1
  48. package/esm/context/FilePropertyMapper.js +2 -1
  49. package/esm/context/FilePropertyMapper.js.map +1 -0
  50. package/esm/index.d.ts +2 -2
  51. package/esm/index.js +12 -11
  52. package/esm/index.js.map +1 -0
  53. package/package.json +2 -2
  54. package/esm/chunk-EX7EKKG4.js +0 -1
  55. package/esm/chunk-IM4ZUKD4.js +0 -1
  56. package/esm/chunk-NPWTXI2T.js +0 -23
  57. package/esm/chunk-ZMJ4WKFB.js +0 -1
package/cjs/index.cjs CHANGED
@@ -1,28 +1,32 @@
1
- "use strict";var bp=Object.create;var st=Object.defineProperty,Ap=Object.defineProperties,Sp=Object.getOwnPropertyDescriptor,Ep=Object.getOwnPropertyDescriptors,Ip=Object.getOwnPropertyNames,Mt=Object.getOwnPropertySymbols,Rp=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable;var Dr=(r,t,e)=>t in r?st(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_t=(r,t)=>{for(var e in t||(t={}))Wr.call(t,e)&&Dr(r,e,t[e]);if(Mt)for(var e of Mt(t))Si.call(t,e)&&Dr(r,e,t[e]);return r},Ei=(r,t)=>Ap(r,Ep(t));var Ii=r=>typeof r=="symbol"?r:r+"",$t=(r,t)=>{var e={};for(var n in r)Wr.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&Mt)for(var n of Mt(r))t.indexOf(n)<0&&Si.call(r,n)&&(e[n]=r[n]);return e};var Fe=(r,t)=>()=>(r&&(t=r(r=0)),t);var x=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),jr=(r,t)=>{for(var e in t)st(r,e,{get:t[e],enumerable:!0})},Ri=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ip(t))!Wr.call(r,i)&&i!==e&&st(r,i,{get:()=>t[i],enumerable:!(n=Sp(t,i))||n.enumerable});return r};var Tp=(r,t,e)=>(e=r!=null?bp(Rp(r)):{},Ri(t||!r||!r.__esModule?st(e,"default",{value:r,enumerable:!0}):e,r)),Ti=r=>Ri(st({},"__esModule",{value:!0}),r);var d=(r,t,e)=>Dr(r,typeof t!="symbol"?t+"":t,e);function Ni(){throw new Error("setTimeout has not been defined")}function Fi(){throw new Error("clearTimeout has not been defined")}function Oi(r){if(ie===setTimeout)return setTimeout(r,0);if((ie===Ni||!ie)&&setTimeout)return ie=setTimeout,setTimeout(r,0);try{return ie(r,0)}catch(t){try{return ie.call(null,r,0)}catch(e){return ie.call(this,r,0)}}}function Pp(r){if(oe===clearTimeout)return clearTimeout(r);if((oe===Fi||!oe)&&clearTimeout)return oe=clearTimeout,clearTimeout(r);try{return oe(r)}catch(t){try{return oe.call(null,r)}catch(e){return oe.call(this,r)}}}function Np(){!Ce||!ge||(Ce=!1,ge.length?Q=ge.concat(Q):Dt=-1,Q.length&&Ci())}function Ci(){if(!Ce){var r=Oi(Np);Ce=!0;for(var t=Q.length;t;){for(ge=Q,Q=[];++Dt<t;)ge&&ge[Dt].run();Dt=-1,t=Q.length}ge=null,Ce=!1,Pp(r)}}function Fp(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Q.push(new Ui(r,t)),Q.length===1&&!Ce&&Oi(Ci)}function Ui(r,t){this.fun=r,this.array=t}function xe(){}function Yp(r){throw new Error("process.binding is not supported")}function Hp(){return"/"}function Jp(r){throw new Error("process.chdir is not supported")}function Qp(){return 0}function Kp(r){var t=Zp.call(Oe)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function el(){var r=new Date,t=r-Xp;return t/1e3}var ie,oe,Q,Ce,ge,Dt,Op,Cp,Up,Bp,qp,kp,Lp,Mp,_p,$p,Dp,Wp,jp,Vp,Gp,zp,Oe,Zp,Xp,l,Pi,a=Fe(()=>{"use strict";ie=Ni,oe=Fi;typeof globalThis.setTimeout=="function"&&(ie=setTimeout);typeof globalThis.clearTimeout=="function"&&(oe=clearTimeout);Q=[],Ce=!1,Dt=-1;Ui.prototype.run=function(){this.fun.apply(null,this.array)};Op="browser",Cp="browser",Up=!0,Bp={},qp=[],kp="",Lp={},Mp={},_p={};$p=xe,Dp=xe,Wp=xe,jp=xe,Vp=xe,Gp=xe,zp=xe;Oe=globalThis.performance||{},Zp=Oe.now||Oe.mozNow||Oe.msNow||Oe.oNow||Oe.webkitNow||function(){return new Date().getTime()};Xp=new Date;l={nextTick:Fp,title:Op,browser:Up,env:Bp,argv:qp,version:kp,versions:Lp,on:$p,addListener:Dp,once:Wp,off:jp,removeListener:Vp,removeAllListeners:Gp,emit:zp,binding:Yp,cwd:Hp,chdir:Jp,umask:Qp,hrtime:Kp,platform:Cp,release:Mp,config:_p,uptime:el},Pi={};Object.keys(Pi).forEach(r=>{let t=r.split("."),e=l;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Pi[r]:e=e[i]||(e[i]={})}})});function Li(){Gr=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)j[t]=r[t],M[r.charCodeAt(t)]=t;M[45]=62,M[95]=63}function rl(r){Gr||Li();var t,e,n,i,o,u,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,u=new tl(p*3/4-o),n=o>0?p-4:p;var c=0;for(t=0,e=0;t<n;t+=4,e+=3)i=M[r.charCodeAt(t)]<<18|M[r.charCodeAt(t+1)]<<12|M[r.charCodeAt(t+2)]<<6|M[r.charCodeAt(t+3)],u[c++]=i>>16&255,u[c++]=i>>8&255,u[c++]=i&255;return o===2?(i=M[r.charCodeAt(t)]<<2|M[r.charCodeAt(t+1)]>>4,u[c++]=i&255):o===1&&(i=M[r.charCodeAt(t)]<<10|M[r.charCodeAt(t+1)]<<4|M[r.charCodeAt(t+2)]>>2,u[c++]=i>>8&255,u[c++]=i&255),u}function nl(r){return j[r>>18&63]+j[r>>12&63]+j[r>>6&63]+j[r&63]}function il(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(nl(n));return i.join("")}function Bi(r){Gr||Li();for(var t,e=r.length,n=e%3,i="",o=[],u=16383,p=0,c=e-n;p<c;p+=u)o.push(il(r,p,p+u>c?c:p+u));return n===1?(t=r[e-1],i+=j[t>>2],i+=j[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=j[t>>10],i+=j[t>>4&63],i+=j[t<<2&63],i+="="),o.push(i),o.join("")}function Wt(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Z(r,t){if(Wt()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return zr(this,r)}return Mi(this,r,t,e)}function Mi(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?sl(r,t,e,n):typeof t=="string"?al(r,t,e):ul(r,t)}function _i(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 ol(r,t,e,n){return _i(t),t<=0?Z(r,t):e!==void 0?typeof n=="string"?Z(r,t).fill(e,n):Z(r,t).fill(e):Z(r,t)}function zr(r,t){if(_i(t),r=Z(r,t<0?0:Yr(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function al(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=$i(t,e)|0;r=Z(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function Vr(r,t){var e=t.length<0?0:Yr(t.length)|0;r=Z(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function sl(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=Vr(r,t),r}function ul(r,t){if(V(t)){var e=Yr(t.length)|0;return r=Z(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Tl(t.length)?Z(r,0):Vr(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Vr(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Yr(r){if(r>=Wt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Wt().toString(16)+" bytes");return r|0}function V(r){return!!(r!=null&&r._isBuffer)}function $i(r,t){if(V(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return jt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Yi(r).length;default:if(n)return jt(r).length;t=(""+t).toLowerCase(),n=!0}}function fl(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return vl(this,t,e);case"utf8":case"utf-8":return ji(this,t,e);case"ascii":return gl(this,t,e);case"latin1":case"binary":return xl(this,t,e);case"base64":return ml(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wl(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ve(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Di(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),V(t))return t.length===0?-1:qi(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):qi(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function qi(r,t,e,n,i){var o=1,u=r.length,p=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,u/=2,p/=2,e/=2}function c(b,w){return o===1?b[w]:b.readUInt16BE(w*o)}var h;if(i){var y=-1;for(h=e;h<u;h++)if(c(r,h)===c(t,y===-1?0:h-y)){if(y===-1&&(y=h),h-y+1===p)return y*o}else y!==-1&&(h-=h-y),y=-1}else for(e+p>u&&(e=u-p),h=e;h>=0;h--){for(var g=!0,v=0;v<p;v++)if(c(r,h+v)!==c(t,v)){g=!1;break}if(g)return h}return-1}function pl(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var p=parseInt(t.substr(u*2,2),16);if(isNaN(p))return u;r[e+u]=p}return u}function ll(r,t,e,n){return zt(jt(t,r.length-e),r,e,n)}function Wi(r,t,e,n){return zt(Il(t),r,e,n)}function cl(r,t,e,n){return Wi(r,t,e,n)}function dl(r,t,e,n){return zt(Yi(t),r,e,n)}function yl(r,t,e,n){return zt(Rl(t,r.length-e),r,e,n)}function ml(r,t,e){return t===0&&e===r.length?Bi(r):Bi(r.slice(t,e))}function ji(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],u=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=e){var c,h,y,g;switch(p){case 1:o<128&&(u=o);break;case 2:c=r[i+1],(c&192)===128&&(g=(o&31)<<6|c&63,g>127&&(u=g));break;case 3:c=r[i+1],h=r[i+2],(c&192)===128&&(h&192)===128&&(g=(o&15)<<12|(c&63)<<6|h&63,g>2047&&(g<55296||g>57343)&&(u=g));break;case 4:c=r[i+1],h=r[i+2],y=r[i+3],(c&192)===128&&(h&192)===128&&(y&192)===128&&(g=(o&15)<<18|(c&63)<<12|(h&63)<<6|y&63,g>65535&&g<1114112&&(u=g))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=p}return hl(n)}function hl(r){var t=r.length;if(t<=ki)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=ki));return e}function gl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function xl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function vl(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=El(r[o]);return i}function wl(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function U(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function L(r,t,e,n,i,o){if(!V(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Vt(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function Gt(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Vi(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Gi(r,t,e,n,i){return i||Vi(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ji(r,t,e,n,23,4),e+4}function zi(r,t,e,n,i){return i||Vi(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ji(r,t,e,n,52,8),e+8}function Al(r){if(r=Sl(r).replace(bl,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Sl(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function El(r){return r<16?"0"+r.toString(16):r.toString(16)}function jt(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],u=0;u<n;++u){if(e=r.charCodeAt(u),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Il(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Rl(r,t){for(var e,n,i,o=[],u=0;u<r.length&&!((t-=2)<0);++u)e=r.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Yi(r){return rl(Al(r))}function zt(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Tl(r){return r!==r}function Pl(r){return r!=null&&(!!r._isBuffer||Hi(r)||Nl(r))}function Hi(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Nl(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Hi(r.slice(0,0))}function Yt(r,t,e,n,i){var o,u,p=i*8-n-1,c=(1<<p)-1,h=c>>1,y=-7,g=e?i-1:0,v=e?-1:1,b=r[t+g];for(g+=v,o=b&(1<<-y)-1,b>>=-y,y+=p;y>0;o=o*256+r[t+g],g+=v,y-=8);for(u=o&(1<<-y)-1,o>>=-y,y+=n;y>0;u=u*256+r[t+g],g+=v,y-=8);if(o===0)o=1-h;else{if(o===c)return u?NaN:(b?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(b?-1:1)*u*Math.pow(2,o-n)}function Ji(r,t,e,n,i,o){var u,p,c,h=o*8-i-1,y=(1<<h)-1,g=y>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:o-1,w=n?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,u=y):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+g>=1?t+=v/c:t+=v*Math.pow(2,1-g),t*c>=2&&(u++,c/=2),u+g>=y?(p=0,u=y):u+g>=1?(p=(t*c-1)*Math.pow(2,i),u=u+g):(p=t*Math.pow(2,g-1)*Math.pow(2,i),u=0));i>=8;r[e+b]=p&255,b+=w,p/=256,i-=8);for(u=u<<i|p,h+=i;h>0;r[e+b]=u&255,b+=w,u/=256,h-=8);r[e+b-w]|=A*128}var j,M,tl,Gr,ki,bl,Qi=Fe(()=>{"use strict";a();s();j=[],M=[],tl=typeof Uint8Array!="undefined"?Uint8Array:Array,Gr=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return Mi(null,r,t,e)};f.kMaxLength=Wt();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return ol(null,r,t,e)};f.allocUnsafe=function(r){return zr(null,r)};f.allocUnsafeSlow=function(r){return zr(null,r)};f.isBuffer=Pl;f.compare=function(t,e){if(!V(t)||!V(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,u=Math.min(n,i);o<u;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var u=t[n];if(!V(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i};f.byteLength=$i;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ve(this,e,e+1);return this};f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ve(this,e,e+3),ve(this,e+1,e+2);return this};f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ve(this,e,e+7),ve(this,e+1,e+6),ve(this,e+2,e+5),ve(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?ji(this,0,t):fl.apply(this,arguments)};f.prototype.equals=function(t){if(!V(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!V(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var u=o-i,p=n-e,c=Math.min(u,p),h=this.slice(i,o),y=t.slice(e,n),g=0;g<c;++g)if(h[g]!==y[g]){u=h[g],p=y[g];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return Di(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return Di(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return pl(this,t,e,n);case"utf8":case"utf-8":return ll(this,t,e,n);case"ascii":return Wi(this,t,e,n);case"latin1":case"binary":return cl(this,t,e,n);case"base64":return dl(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yl(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};ki=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=this[t],o=1,u=0;++u<e&&(o*=256);)i+=this[t+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||U(t,e,this.length);for(var i=e,o=1,u=this[t+--i];i>0&&(o*=256);)u+=this[t+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*e)),u};f.prototype.readInt8=function(t,e){return e||U(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),Yt(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),Yt(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),Yt(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),Yt(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=1,p=0;for(this[e]=t&255;++p<n&&(u*=256);)this[e+p]=t/u&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;L(this,t,e,n,o,0)}var u=n-1,p=1;for(this[e+u]=t&255;--u>=0&&(p*=256);)this[e+u]=t/p&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Vt(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Gt(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Gt(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=0,p=1,c=0;for(this[e]=t&255;++u<n&&(p*=256);)t<0&&c===0&&this[e+u-1]!==0&&(c=1),this[e+u]=(t/p>>0)-c&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var u=n-1,p=1,c=0;for(this[e+u]=t&255;--u>=0&&(p*=256);)t<0&&c===0&&this[e+u+1]!==0&&(c=1),this[e+u]=(t/p>>0)-c&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Vt(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Gt(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Gt(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return Gi(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return Gi(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return zi(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return zi(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,u;if(this===t&&n<e&&e<i)for(u=o-1;u>=0;--u)t[u+e]=this[u+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<o;++u)t[u+e]=this[u+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var u;if(typeof t=="number")for(u=e;u<n;++u)this[u]=t;else{var p=V(t)?t:jt(new f(t,i).toString()),c=p.length;for(u=0;u<n-e;++u)this[u+e]=p[u%c]}return this};bl=/[^+\/0-9A-Za-z-_]/g});var s=Fe(()=>{"use strict";Qi()});var Xi=x((Cx,Ki)=>{"use strict";a();s();var Fl="Function.prototype.bind called on incompatible ",Ol=Object.prototype.toString,Cl=Math.max,Ul="[object Function]",Zi=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n},Bl=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},ql=function(r,t){for(var e="",n=0;n<r.length;n+=1)e+=r[n],n+1<r.length&&(e+=t);return e};Ki.exports=function(t){var e=this;if(typeof e!="function"||Ol.apply(e)!==Ul)throw new TypeError(Fl+e);for(var n=Bl(arguments,1),i,o=function(){if(this instanceof i){var y=e.apply(this,Zi(n,arguments));return Object(y)===y?y:this}return e.apply(t,Zi(n,arguments))},u=Cl(0,e.length-n.length),p=[],c=0;c<u;c++)p[c]="$"+c;if(i=Function("binder","return function ("+ql(p,",")+"){ return binder.apply(this,arguments); }")(o),e.prototype){var h=function(){};h.prototype=e.prototype,i.prototype=new h,h.prototype=null}return i}});var we=x((qx,eo)=>{"use strict";a();s();var kl=Xi();eo.exports=Function.prototype.bind||kl});var Hr=x((Mx,to)=>{"use strict";a();s();to.exports=Error});var Jr=x((Dx,ro)=>{"use strict";a();s();ro.exports=EvalError});var Qr=x((Vx,no)=>{"use strict";a();s();no.exports=RangeError});var Zr=x((Yx,io)=>{"use strict";a();s();io.exports=ReferenceError});var Ht=x((Qx,oo)=>{"use strict";a();s();oo.exports=SyntaxError});var C=x((Xx,ao)=>{"use strict";a();s();ao.exports=TypeError});var Kr=x((r0,so)=>{"use strict";a();s();so.exports=URIError});var fo=x((o0,uo)=>{"use strict";a();s();uo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,e);if(u.value!==i||u.enumerable!==!0)return!1}return!0}});var Xr=x((u0,lo)=>{"use strict";a();s();var po=typeof Symbol!="undefined"&&Symbol,Ll=fo();lo.exports=function(){return typeof po!="function"||typeof Symbol!="function"||typeof po("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ll()}});var yo=x((l0,co)=>{"use strict";a();s();var en={__proto__:null,foo:{}},Ml=Object;co.exports=function(){return{__proto__:en}.foo===en.foo&&!(en instanceof Ml)}});var tn=x((y0,mo)=>{"use strict";a();s();var _l=Function.prototype.call,$l=Object.prototype.hasOwnProperty,Dl=we();mo.exports=Dl.call(_l,$l)});var G=x((g0,wo)=>{"use strict";a();s();var I,Wl=Hr(),jl=Jr(),Vl=Qr(),Gl=Zr(),ke=Ht(),qe=C(),zl=Kr(),vo=Function,rn=function(r){try{return vo('"use strict"; return ('+r+").constructor;")()}catch(t){}},be=Object.getOwnPropertyDescriptor;if(be)try{be({},"")}catch(r){be=null}var nn=function(){throw new qe},Yl=be?function(){try{return arguments.callee,nn}catch(r){try{return be(arguments,"callee").get}catch(t){return nn}}}():nn,Ue=Xr()(),Hl=yo()(),B=Object.getPrototypeOf||(Hl?function(r){return r.__proto__}:null),Be={},Jl=typeof Uint8Array=="undefined"||!B?I:B(Uint8Array),Ae={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Ue&&B?B([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%Atomics%":typeof Atomics=="undefined"?I:Atomics,"%BigInt%":typeof BigInt=="undefined"?I:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?I:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?I:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wl,"%eval%":eval,"%EvalError%":jl,"%Float32Array%":typeof Float32Array=="undefined"?I:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?I:FinalizationRegistry,"%Function%":vo,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array=="undefined"?I:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?I:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ue&&B?B(B([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map=="undefined"?I:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ue||!B?I:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?I:Promise,"%Proxy%":typeof Proxy=="undefined"?I:Proxy,"%RangeError%":Vl,"%ReferenceError%":Gl,"%Reflect%":typeof Reflect=="undefined"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?I:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ue||!B?I:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ue&&B?B(""[Symbol.iterator]()):I,"%Symbol%":Ue?Symbol:I,"%SyntaxError%":ke,"%ThrowTypeError%":Yl,"%TypedArray%":Jl,"%TypeError%":qe,"%Uint8Array%":typeof Uint8Array=="undefined"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?I:Uint32Array,"%URIError%":zl,"%WeakMap%":typeof WeakMap=="undefined"?I:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?I:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?I:WeakSet};if(B)try{null.error}catch(r){ho=B(B(r)),Ae["%Error.prototype%"]=ho}var ho,Ql=function r(t){var e;if(t==="%AsyncFunction%")e=rn("async function () {}");else if(t==="%GeneratorFunction%")e=rn("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=rn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&B&&(e=B(i.prototype))}return Ae[t]=e,e},go={__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"]},ut=we(),Jt=tn(),Zl=ut.call(Function.call,Array.prototype.concat),Kl=ut.call(Function.apply,Array.prototype.splice),xo=ut.call(Function.call,String.prototype.replace),Qt=ut.call(Function.call,String.prototype.slice),Xl=ut.call(Function.call,RegExp.prototype.exec),ec=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tc=/\\(\\)?/g,rc=function(t){var e=Qt(t,0,1),n=Qt(t,-1);if(e==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var i=[];return xo(t,ec,function(o,u,p,c){i[i.length]=p?xo(c,tc,"$1"):u||o}),i},nc=function(t,e){var n=t,i;if(Jt(go,n)&&(i=go[n],n="%"+i[0]+"%"),Jt(Ae,n)){var o=Ae[n];if(o===Be&&(o=Ql(n)),typeof o=="undefined"&&!e)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new ke("intrinsic "+t+" does not exist!")};wo.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Xl(/^%?[^%]*%?$/,t)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=rc(t),i=n.length>0?n[0]:"",o=nc("%"+i+"%",e),u=o.name,p=o.value,c=!1,h=o.alias;h&&(i=h[0],Kl(n,Zl([0,1],h)));for(var y=1,g=!0;y<n.length;y+=1){var v=n[y],b=Qt(v,0,1),w=Qt(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new ke("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),i+="."+v,u="%"+i+"%",Jt(Ae,u))p=Ae[u];else if(p!=null){if(!(v in p)){if(!e)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(be&&y+1>=n.length){var A=be(p,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[v]}else g=Jt(p,v),p=p[v];g&&!c&&(Ae[u]=p)}}return p}});var on=x((w0,bo)=>{"use strict";a();s();bo.exports=Object});var So=x((S0,Ao)=>{"use strict";a();s();Ao.exports=Math.abs});var Io=x((R0,Eo)=>{"use strict";a();s();Eo.exports=Math.floor});var To=x((N0,Ro)=>{"use strict";a();s();Ro.exports=Math.max});var No=x((C0,Po)=>{"use strict";a();s();Po.exports=Math.min});var Oo=x((q0,Fo)=>{"use strict";a();s();Fo.exports=Math.pow});var Uo=x((M0,Co)=>{"use strict";a();s();Co.exports=Math.round});var qo=x((D0,Bo)=>{"use strict";a();s();Bo.exports=Number.isNaN||function(t){return t!==t}});var Lo=x((V0,ko)=>{"use strict";a();s();var ic=qo();ko.exports=function(t){return ic(t)||t===0?t:t<0?-1:1}});var _o=x((Y0,Mo)=>{"use strict";a();s();Mo.exports=Object.getOwnPropertyDescriptor});var ft=x((Q0,$o)=>{"use strict";a();s();var Zt=_o();if(Zt)try{Zt([],"length")}catch(r){Zt=null}$o.exports=Zt});var Xt=x((X0,Do)=>{"use strict";a();s();var Kt=Object.defineProperty||!1;if(Kt)try{Kt({},"a",{value:1})}catch(r){Kt=!1}Do.exports=Kt});var an=x((rv,Wo)=>{"use strict";a();s();Wo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(t,e);if(p.value!==i||p.enumerable!==!0)return!1}return!0}});var Go=x((ov,Vo)=>{"use strict";a();s();var jo=typeof Symbol!="undefined"&&Symbol,oc=an();Vo.exports=function(){return typeof jo!="function"||typeof Symbol!="function"||typeof jo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oc()}});var sn=x((uv,zo)=>{"use strict";a();s();zo.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var un=x((lv,Yo)=>{"use strict";a();s();var ac=on();Yo.exports=ac.getPrototypeOf||null});var er=x((yv,Ho)=>{"use strict";a();s();Ho.exports=Function.prototype.call});var fn=x((gv,Jo)=>{"use strict";a();s();Jo.exports=Function.prototype.apply});var Zo=x((wv,Qo)=>{"use strict";a();s();Qo.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Xo=x((Sv,Ko)=>{"use strict";a();s();var sc=we(),uc=fn(),fc=er(),pc=Zo();Ko.exports=pc||sc.call(fc,uc)});var ta=x((Rv,ea)=>{"use strict";a();s();var lc=we(),cc=C(),dc=er(),yc=Xo();ea.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new cc("a function is required");return yc(lc,dc,t)}});var sa=x((Nv,aa)=>{"use strict";a();s();var mc=ta(),ra=ft(),ia;try{ia=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var pn=!!ia&&ra&&ra(Object.prototype,"__proto__"),oa=Object,na=oa.getPrototypeOf;aa.exports=pn&&typeof pn.get=="function"?mc([pn.get]):typeof na=="function"?function(t){return na(t==null?t:oa(t))}:!1});var ca=x((Cv,la)=>{"use strict";a();s();var ua=sn(),fa=un(),pa=sa();la.exports=ua?function(t){return ua(t)}:fa?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return fa(t)}:pa?function(t){return pa(t)}:null});var dn=x((qv,xa)=>{"use strict";a();s();var E,hc=on(),gc=Hr(),xc=Jr(),vc=Qr(),wc=Zr(),$e=Ht(),_e=C(),bc=Kr(),Ac=So(),Sc=Io(),Ec=To(),Ic=No(),Rc=Oo(),Tc=Uo(),Pc=Lo(),ha=Function,ln=function(r){try{return ha('"use strict"; return ('+r+").constructor;")()}catch(t){}},pt=ft(),Nc=Xt(),cn=function(){throw new _e},Fc=pt?function(){try{return arguments.callee,cn}catch(r){try{return pt(arguments,"callee").get}catch(t){return cn}}}():cn,Le=Go()(),q=ca(),Oc=un(),Cc=sn(),ga=fn(),lt=er(),Me={},Uc=typeof Uint8Array=="undefined"||!q?E:q(Uint8Array),Se={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?E:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?E:ArrayBuffer,"%ArrayIteratorPrototype%":Le&&q?q([][Symbol.iterator]()):E,"%AsyncFromSyncIteratorPrototype%":E,"%AsyncFunction%":Me,"%AsyncGenerator%":Me,"%AsyncGeneratorFunction%":Me,"%AsyncIteratorPrototype%":Me,"%Atomics%":typeof Atomics=="undefined"?E:Atomics,"%BigInt%":typeof BigInt=="undefined"?E:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?E:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?E:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?E:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":gc,"%eval%":eval,"%EvalError%":xc,"%Float16Array%":typeof Float16Array=="undefined"?E:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?E:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?E:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?E:FinalizationRegistry,"%Function%":ha,"%GeneratorFunction%":Me,"%Int8Array%":typeof Int8Array=="undefined"?E:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?E:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?E:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Le&&q?q(q([][Symbol.iterator]())):E,"%JSON%":typeof JSON=="object"?JSON:E,"%Map%":typeof Map=="undefined"?E:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Le||!q?E:q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":hc,"%Object.getOwnPropertyDescriptor%":pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?E:Promise,"%Proxy%":typeof Proxy=="undefined"?E:Proxy,"%RangeError%":vc,"%ReferenceError%":wc,"%Reflect%":typeof Reflect=="undefined"?E:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?E:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Le||!q?E:q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?E:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Le&&q?q(""[Symbol.iterator]()):E,"%Symbol%":Le?Symbol:E,"%SyntaxError%":$e,"%ThrowTypeError%":Fc,"%TypedArray%":Uc,"%TypeError%":_e,"%Uint8Array%":typeof Uint8Array=="undefined"?E:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?E:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?E:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?E:Uint32Array,"%URIError%":bc,"%WeakMap%":typeof WeakMap=="undefined"?E:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?E:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?E:WeakSet,"%Function.prototype.call%":lt,"%Function.prototype.apply%":ga,"%Object.defineProperty%":Nc,"%Object.getPrototypeOf%":Oc,"%Math.abs%":Ac,"%Math.floor%":Sc,"%Math.max%":Ec,"%Math.min%":Ic,"%Math.pow%":Rc,"%Math.round%":Tc,"%Math.sign%":Pc,"%Reflect.getPrototypeOf%":Cc};if(q)try{null.error}catch(r){da=q(q(r)),Se["%Error.prototype%"]=da}var da,Bc=function r(t){var e;if(t==="%AsyncFunction%")e=ln("async function () {}");else if(t==="%GeneratorFunction%")e=ln("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=ln("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&q&&(e=q(i.prototype))}return Se[t]=e,e},ya={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ct=we(),tr=tn(),qc=ct.call(lt,Array.prototype.concat),kc=ct.call(ga,Array.prototype.splice),ma=ct.call(lt,String.prototype.replace),rr=ct.call(lt,String.prototype.slice),Lc=ct.call(lt,RegExp.prototype.exec),Mc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_c=/\\(\\)?/g,$c=function(t){var e=rr(t,0,1),n=rr(t,-1);if(e==="%"&&n!=="%")throw new $e("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new $e("invalid intrinsic syntax, expected opening `%`");var i=[];return ma(t,Mc,function(o,u,p,c){i[i.length]=p?ma(c,_c,"$1"):u||o}),i},Dc=function(t,e){var n=t,i;if(tr(ya,n)&&(i=ya[n],n="%"+i[0]+"%"),tr(Se,n)){var o=Se[n];if(o===Me&&(o=Bc(n)),typeof o=="undefined"&&!e)throw new _e("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new $e("intrinsic "+t+" does not exist!")};xa.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new _e("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new _e('"allowMissing" argument must be a boolean');if(Lc(/^%?[^%]*%?$/,t)===null)throw new $e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=$c(t),i=n.length>0?n[0]:"",o=Dc("%"+i+"%",e),u=o.name,p=o.value,c=!1,h=o.alias;h&&(i=h[0],kc(n,qc([0,1],h)));for(var y=1,g=!0;y<n.length;y+=1){var v=n[y],b=rr(v,0,1),w=rr(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new $e("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(c=!0),i+="."+v,u="%"+i+"%",tr(Se,u))p=Se[u];else if(p!=null){if(!(v in p)){if(!e)throw new _e("base intrinsic for "+t+" exists, but the property is not available.");return}if(pt&&y+1>=n.length){var A=pt(p,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[v]}else g=tr(p,v),p=p[v];g&&!c&&(Se[u]=p)}}return p}});var yn=x((Mv,ba)=>{"use strict";a();s();var va=Xt(),Wc=Ht(),De=C(),wa=ft();ba.exports=function(t,e,n){if(!t||typeof t!="object"&&typeof t!="function")throw new De("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new De("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new De("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new De("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new De("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new De("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,c=!!wa&&wa(t,e);if(va)va(t,e,{configurable:u===null&&c?c.configurable:!u,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:o===null&&c?c.writable:!o});else if(p||!i&&!o&&!u)t[e]=n;else throw new Wc("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var hn=x((Dv,Sa)=>{"use strict";a();s();var mn=Xt(),Aa=function(){return!!mn};Aa.hasArrayLengthDefineBug=function(){if(!mn)return null;try{return mn([],"length",{value:1}).length!==1}catch(t){return!0}};Sa.exports=Aa});var Pa=x((Vv,Ta)=>{"use strict";a();s();var jc=dn(),Ea=yn(),Vc=hn()(),Ia=ft(),Ra=C(),Gc=jc("%Math.floor%");Ta.exports=function(t,e){if(typeof t!="function")throw new Ra("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||Gc(e)!==e)throw new Ra("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&Ia){var u=Ia(t,"length");u&&!u.configurable&&(i=!1),u&&!u.writable&&(o=!1)}return(i||o||!n)&&(Vc?Ea(t,"length",e,!0,!0):Ea(t,"length",e)),t}});var Fa=x((Yv,Na)=>{"use strict";a();s();var zc=dn(),nr=zc("%Object.defineProperty%",!0)||!1;if(nr)try{nr({},"a",{value:1})}catch(r){nr=!1}Na.exports=nr});var ar=x((Qv,ir)=>{"use strict";a();s();var gn=we(),or=G(),Yc=Pa(),Hc=C(),Ua=or("%Function.prototype.apply%"),Ba=or("%Function.prototype.call%"),qa=or("%Reflect.apply%",!0)||gn.call(Ba,Ua),Oa=Fa(),Jc=or("%Math.max%");ir.exports=function(t){if(typeof t!="function")throw new Hc("a function is required");var e=qa(gn,Ba,arguments);return Yc(e,1+Jc(0,t.length-(arguments.length-1)),!0)};var Ca=function(){return qa(gn,Ua,arguments)};Oa?Oa(ir.exports,"apply",{value:Ca}):ir.exports.apply=Ca});var xn=x((Xv,La)=>{"use strict";a();s();var ka=Object.prototype.toString;La.exports=function(t){var e=ka.call(t),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&ka.call(t.callee)==="[object Function]"),n}});var za=x((rw,Ga)=>{"use strict";a();s();var Va;Object.keys||(dt=Object.prototype.hasOwnProperty,vn=Object.prototype.toString,Ma=xn(),wn=Object.prototype.propertyIsEnumerable,_a=!wn.call({toString:null},"toString"),$a=wn.call(function(){},"prototype"),yt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],sr=function(r){var t=r.constructor;return t&&t.prototype===r},Da={$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},Wa=function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!Da["$"+r]&&dt.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{sr(window[r])}catch(t){return!0}}catch(t){return!0}return!1}(),ja=function(r){if(typeof window=="undefined"||!Wa)return sr(r);try{return sr(r)}catch(t){return!1}},Va=function(t){var e=t!==null&&typeof t=="object",n=vn.call(t)==="[object Function]",i=Ma(t),o=e&&vn.call(t)==="[object String]",u=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=$a&&n;if(o&&t.length>0&&!dt.call(t,0))for(var c=0;c<t.length;++c)u.push(String(c));if(i&&t.length>0)for(var h=0;h<t.length;++h)u.push(String(h));else for(var y in t)!(p&&y==="prototype")&&dt.call(t,y)&&u.push(String(y));if(_a)for(var g=ja(t),v=0;v<yt.length;++v)!(g&&yt[v]==="constructor")&&dt.call(t,yt[v])&&u.push(yt[v]);return u});var dt,vn,Ma,wn,_a,$a,yt,sr,Da,Wa,ja;Ga.exports=Va});var Qa=x((ow,Ja)=>{"use strict";a();s();var Qc=Array.prototype.slice,Zc=xn(),Ya=Object.keys,ur=Ya?function(t){return Ya(t)}:za(),Ha=Object.keys;ur.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(n){return Zc(n)?Ha(Qc.call(n)):Ha(n)})}else Object.keys=ur;return Object.keys||ur};Ja.exports=ur});var mt=x((uw,es)=>{"use strict";a();s();var Kc=Qa(),Xc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",ed=Object.prototype.toString,td=Array.prototype.concat,Za=yn(),rd=function(r){return typeof r=="function"&&ed.call(r)==="[object Function]"},Ka=hn()(),nd=function(r,t,e,n){if(t in r){if(n===!0){if(r[t]===e)return}else if(!rd(n)||!n())return}Ka?Za(r,t,e,!0):Za(r,t,e)},Xa=function(r,t){var e=arguments.length>2?arguments[2]:{},n=Kc(t);Xc&&(n=td.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)nd(r,n[i],t[n[i]],e[n[i]])};Xa.supportsDescriptors=!!Ka;es.exports=Xa});var $=x((lw,ns)=>{"use strict";a();s();var ts=G(),rs=ar(),id=rs(ts("String.prototype.indexOf"));ns.exports=function(t,e){var n=ts(t,!!e);return typeof n=="function"&&id(t,".prototype.")>-1?rs(n):n}});var as=x((yw,os)=>{"use strict";a();s();var od=G(),is=od("%Array%"),ad=!is.isArray&&$()("Object.prototype.toString");os.exports=is.isArray||function(t){return ad(t)==="[object Array]"}});var bn=x((gw,ss)=>{"use strict";a();s();ss.exports=as()});var fs=x((ww,us)=>{"use strict";a();s();var sd=G(),ud=$(),fd=C(),pd=bn(),ld=sd("%Reflect.apply%",!0)||ud("Function.prototype.apply");us.exports=function(t,e){var n=arguments.length>2?arguments[2]:[];if(!pd(n))throw new fd("Assertion failed: optional `argumentsList`, if provided, must be a List");return ld(t,e,n)}});function ps(){throw new Error("setTimeout has not been defined")}function ls(){throw new Error("clearTimeout has not been defined")}function cs(r){if(ae===setTimeout)return setTimeout(r,0);if((ae===ps||!ae)&&setTimeout)return ae=setTimeout,setTimeout(r,0);try{return ae(r,0)}catch(t){try{return ae.call(null,r,0)}catch(e){return ae.call(this,r,0)}}}function cd(r){if(se===clearTimeout)return clearTimeout(r);if((se===ls||!se)&&clearTimeout)return se=clearTimeout,clearTimeout(r);try{return se(r)}catch(t){try{return se.call(null,r)}catch(e){return se.call(this,r)}}}function dd(){!je||!Ee||(je=!1,Ee.length?K=Ee.concat(K):fr=-1,K.length&&ds())}function ds(){if(!je){var r=cs(dd);je=!0;for(var t=K.length;t;){for(Ee=K,K=[];++fr<t;)Ee&&Ee[fr].run();fr=-1,t=K.length}Ee=null,je=!1,cd(r)}}function yd(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];K.push(new ys(r,t)),K.length===1&&!je&&cs(ds)}function ys(r,t){this.fun=r,this.array=t}function Ie(){}function Od(r){throw new Error("process.binding is not supported")}function Cd(){return"/"}function Ud(r){throw new Error("process.chdir is not supported")}function Bd(){return 0}function kd(r){var t=qd.call(We)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Md(){var r=new Date,t=r-Ld;return t/1e3}var ae,se,K,je,Ee,fr,md,hd,gd,xd,vd,wd,bd,Ad,Sd,Ed,Id,Rd,Td,Pd,Nd,Fd,We,qd,Ld,_d,ht,ms=Fe(()=>{"use strict";a();s();ae=ps,se=ls;typeof globalThis.setTimeout=="function"&&(ae=setTimeout);typeof globalThis.clearTimeout=="function"&&(se=clearTimeout);K=[],je=!1,fr=-1;ys.prototype.run=function(){this.fun.apply(null,this.array)};md="browser",hd="browser",gd=!0,xd={},vd=[],wd="",bd={},Ad={},Sd={};Ed=Ie,Id=Ie,Rd=Ie,Td=Ie,Pd=Ie,Nd=Ie,Fd=Ie;We=globalThis.performance||{},qd=We.now||We.mozNow||We.msNow||We.oNow||We.webkitNow||function(){return new Date().getTime()};Ld=new Date;_d={nextTick:yd,title:md,browser:gd,env:xd,argv:vd,version:wd,versions:bd,on:Ed,addListener:Id,once:Rd,off:Td,removeListener:Pd,removeAllListeners:Nd,emit:Fd,binding:Od,cwd:Cd,chdir:Ud,umask:Bd,hrtime:kd,platform:hd,release:Ad,config:Sd,uptime:Md},ht=_d});var An,Sn,hs=Fe(()=>{"use strict";a();s();typeof Object.create=="function"?An=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:An=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t};Sn=An});var Es={};jr(Es,{_extend:()=>Cn,debuglog:()=>gs,default:()=>Jd,deprecate:()=>Pn,format:()=>dr,inherits:()=>Sn,inspect:()=>Y,isArray:()=>Nn,isBoolean:()=>yr,isBuffer:()=>bs,isDate:()=>cr,isError:()=>xt,isFunction:()=>vt,isNull:()=>wt,isNullOrUndefined:()=>xs,isNumber:()=>Fn,isObject:()=>Re,isPrimitive:()=>ws,isRegExp:()=>gt,isString:()=>bt,isSymbol:()=>vs,isUndefined:()=>z,log:()=>As});function dr(r){if(!bt(r)){for(var t=[],e=0;e<arguments.length;e++)t.push(Y(arguments[e]));return t.join(" ")}for(var e=1,n=arguments,i=n.length,o=String(r).replace($d,function(p){if(p==="%%")return"%";if(e>=i)return p;switch(p){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(c){return"[Circular]"}default:return p}}),u=n[e];e<i;u=n[++e])wt(u)||!Re(u)?o+=" "+u:o+=" "+Y(u);return o}function Pn(r,t){if(z(globalThis.process))return function(){return Pn(r,t).apply(this,arguments)};if(ht.noDeprecation===!0)return r;var e=!1;function n(){if(!e){if(ht.throwDeprecation)throw new Error(t);ht.traceDeprecation?console.trace(t):console.error(t),e=!0}return r.apply(this,arguments)}return n}function gs(r){if(z(En)&&(En=ht.env.NODE_DEBUG||""),r=r.toUpperCase(),!pr[r])if(new RegExp("\\b"+r+"\\b","i").test(En)){var t=0;pr[r]=function(){var e=dr.apply(null,arguments);console.error("%s %d: %s",r,t,e)}}else pr[r]=function(){};return pr[r]}function Y(r,t){var e={seen:[],stylize:Wd};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),yr(t)?e.showHidden=t:t&&Cn(e,t),z(e.showHidden)&&(e.showHidden=!1),z(e.depth)&&(e.depth=2),z(e.colors)&&(e.colors=!1),z(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=Dd),lr(e,r,e.depth)}function Dd(r,t){var e=Y.styles[t];return e?"\x1B["+Y.colors[e][0]+"m"+r+"\x1B["+Y.colors[e][1]+"m":r}function Wd(r,t){return r}function jd(r){var t={};return r.forEach(function(e,n){t[e]=!0}),t}function lr(r,t,e){if(r.customInspect&&t&&vt(t.inspect)&&t.inspect!==Y&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(e,r);return bt(n)||(n=lr(r,n,e)),n}var i=Vd(r,t);if(i)return i;var o=Object.keys(t),u=jd(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(t)),xt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return In(t);if(o.length===0){if(vt(t)){var p=t.name?": "+t.name:"";return r.stylize("[Function"+p+"]","special")}if(gt(t))return r.stylize(RegExp.prototype.toString.call(t),"regexp");if(cr(t))return r.stylize(Date.prototype.toString.call(t),"date");if(xt(t))return In(t)}var c="",h=!1,y=["{","}"];if(Nn(t)&&(h=!0,y=["[","]"]),vt(t)){var g=t.name?": "+t.name:"";c=" [Function"+g+"]"}if(gt(t)&&(c=" "+RegExp.prototype.toString.call(t)),cr(t)&&(c=" "+Date.prototype.toUTCString.call(t)),xt(t)&&(c=" "+In(t)),o.length===0&&(!h||t.length==0))return y[0]+c+y[1];if(e<0)return gt(t)?r.stylize(RegExp.prototype.toString.call(t),"regexp"):r.stylize("[Object]","special");r.seen.push(t);var v;return h?v=Gd(r,t,e,u,o):v=o.map(function(b){return Tn(r,t,e,u,b,h)}),r.seen.pop(),zd(v,c,y)}function Vd(r,t){if(z(t))return r.stylize("undefined","undefined");if(bt(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(e,"string")}if(Fn(t))return r.stylize(""+t,"number");if(yr(t))return r.stylize(""+t,"boolean");if(wt(t))return r.stylize("null","null")}function In(r){return"["+Error.prototype.toString.call(r)+"]"}function Gd(r,t,e,n,i){for(var o=[],u=0,p=t.length;u<p;++u)Ss(t,String(u))?o.push(Tn(r,t,e,n,String(u),!0)):o.push("");return i.forEach(function(c){c.match(/^\d+$/)||o.push(Tn(r,t,e,n,c,!0))}),o}function Tn(r,t,e,n,i,o){var u,p,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?c.set?p=r.stylize("[Getter/Setter]","special"):p=r.stylize("[Getter]","special"):c.set&&(p=r.stylize("[Setter]","special")),Ss(n,i)||(u="["+i+"]"),p||(r.seen.indexOf(c.value)<0?(wt(e)?p=lr(r,c.value,null):p=lr(r,c.value,e-1),p.indexOf(`
2
- `)>-1&&(o?p=p.split(`
1
+ "use strict";var zf=Object.create;var et=Object.defineProperty,Yf=Object.defineProperties,Hf=Object.getOwnPropertyDescriptor,Jf=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertyNames,Ft=Object.getOwnPropertySymbols,Zf=Object.getPrototypeOf,Br=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable;var Cr=(r,t,e)=>t in r?et(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ot=(r,t)=>{for(var e in t||(t={}))Br.call(t,e)&&Cr(r,e,t[e]);if(Ft)for(var e of Ft(t))ii.call(t,e)&&Cr(r,e,t[e]);return r},oi=(r,t)=>Yf(r,Jf(t));var ai=r=>typeof r=="symbol"?r:r+"",Ct=(r,t)=>{var e={};for(var n in r)Br.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&Ft)for(var n of Ft(r))t.indexOf(n)<0&&ii.call(r,n)&&(e[n]=r[n]);return e};var Re=(r,t)=>()=>(r&&(t=r(r=0)),t);var x=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),qr=(r,t)=>{for(var e in t)et(r,e,{get:t[e],enumerable:!0})},si=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Qf(t))!Br.call(r,i)&&i!==e&&et(r,i,{get:()=>t[i],enumerable:!(n=Hf(t,i))||n.enumerable});return r};var Kf=(r,t,e)=>(e=r!=null?zf(Zf(r)):{},si(t||!r||!r.__esModule?et(e,"default",{value:r,enumerable:!0}):e,r)),ui=r=>si(et({},"__esModule",{value:!0}),r);var d=(r,t,e)=>Cr(r,typeof t!="symbol"?t+"":t,e);function li(){throw new Error("setTimeout has not been defined")}function pi(){throw new Error("clearTimeout has not been defined")}function ci(r){if(te===setTimeout)return setTimeout(r,0);if((te===li||!te)&&setTimeout)return te=setTimeout,setTimeout(r,0);try{return te(r,0)}catch(t){try{return te.call(null,r,0)}catch(e){return te.call(this,r,0)}}}function Xf(r){if(re===clearTimeout)return clearTimeout(r);if((re===pi||!re)&&clearTimeout)return re=clearTimeout,clearTimeout(r);try{return re(r)}catch(t){try{return re.call(null,r)}catch(e){return re.call(this,r)}}}function el(){!Ie||!me||(Ie=!1,me.length?Y=me.concat(Y):Bt=-1,Y.length&&di())}function di(){if(!Ie){var r=ci(el);Ie=!0;for(var t=Y.length;t;){for(me=Y,Y=[];++Bt<t;)me&&me[Bt].run();Bt=-1,t=Y.length}me=null,Ie=!1,Xf(r)}}function tl(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Y.push(new mi(r,t)),Y.length===1&&!Ie&&ci(di)}function mi(r,t){this.fun=r,this.array=t}function he(){}function xl(r){throw new Error("process.binding is not supported")}function vl(){return"/"}function wl(r){throw new Error("process.chdir is not supported")}function bl(){return 0}function Sl(r){var t=Al.call(Ee)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Rl(){var r=new Date,t=r-Tl;return t/1e3}var te,re,Y,Ie,me,Bt,rl,nl,il,ol,al,sl,ul,fl,ll,pl,cl,dl,ml,hl,yl,gl,Ee,Al,Tl,c,fi,s=Re(()=>{"use strict";te=li,re=pi;typeof globalThis.setTimeout=="function"&&(te=setTimeout);typeof globalThis.clearTimeout=="function"&&(re=clearTimeout);Y=[],Ie=!1,Bt=-1;mi.prototype.run=function(){this.fun.apply(null,this.array)};rl="browser",nl="browser",il=!0,ol={},al=[],sl="",ul={},fl={},ll={};pl=he,cl=he,dl=he,ml=he,hl=he,yl=he,gl=he;Ee=globalThis.performance||{},Al=Ee.now||Ee.mozNow||Ee.msNow||Ee.oNow||Ee.webkitNow||function(){return new Date().getTime()};Tl=new Date;c={nextTick:tl,title:rl,browser:il,env:ol,argv:al,version:sl,versions:ul,on:pl,addListener:cl,once:dl,off:ml,removeListener:hl,removeAllListeners:yl,emit:gl,binding:xl,cwd:vl,chdir:wl,umask:bl,hrtime:Sl,platform:nl,release:fl,config:ll,uptime:Rl},fi={};Object.keys(fi).forEach(r=>{let t=r.split("."),e=c;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=fi[r]:e=e[i]||(e[i]={})}})});function xi(){Ur=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)$[t]=r[t],L[r.charCodeAt(t)]=t;L[45]=62,L[95]=63}function Il(r){Ur||xi();var t,e,n,i,o,a,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[l-2]==="="?2:r[l-1]==="="?1:0,a=new El(l*3/4-o),n=o>0?l-4:l;var p=0;for(t=0,e=0;t<n;t+=4,e+=3)i=L[r.charCodeAt(t)]<<18|L[r.charCodeAt(t+1)]<<12|L[r.charCodeAt(t+2)]<<6|L[r.charCodeAt(t+3)],a[p++]=i>>16&255,a[p++]=i>>8&255,a[p++]=i&255;return o===2?(i=L[r.charCodeAt(t)]<<2|L[r.charCodeAt(t+1)]>>4,a[p++]=i&255):o===1&&(i=L[r.charCodeAt(t)]<<10|L[r.charCodeAt(t+1)]<<4|L[r.charCodeAt(t+2)]>>2,a[p++]=i>>8&255,a[p++]=i&255),a}function Pl(r){return $[r>>18&63]+$[r>>12&63]+$[r>>6&63]+$[r&63]}function Nl(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Pl(n));return i.join("")}function hi(r){Ur||xi();for(var t,e=r.length,n=e%3,i="",o=[],a=16383,l=0,p=e-n;l<p;l+=a)o.push(Nl(r,l,l+a>p?p:l+a));return n===1?(t=r[e-1],i+=$[t>>2],i+=$[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=$[t>>10],i+=$[t>>4&63],i+=$[t<<2&63],i+="="),o.push(i),o.join("")}function qt(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function H(r,t){if(qt()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return kr(this,r)}return vi(this,r,t,e)}function vi(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Cl(r,t,e,n):typeof t=="string"?Ol(r,t,e):Bl(r,t)}function wi(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 Fl(r,t,e,n){return wi(t),t<=0?H(r,t):e!==void 0?typeof n=="string"?H(r,t).fill(e,n):H(r,t).fill(e):H(r,t)}function kr(r,t){if(wi(t),r=H(r,t<0?0:Mr(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Ol(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=bi(t,e)|0;r=H(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function Lr(r,t){var e=t.length<0?0:Mr(t.length)|0;r=H(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Cl(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=Lr(r,t),r}function Bl(r,t){if(D(t)){var e=Mr(t.length)|0;return r=H(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Kl(t.length)?H(r,0):Lr(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Lr(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Mr(r){if(r>=qt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qt().toString(16)+" bytes");return r|0}function D(r){return!!(r!=null&&r._isBuffer)}function bi(r,t){if(D(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Lt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Pi(r).length;default:if(n)return Lt(r).length;t=(""+t).toLowerCase(),n=!0}}function ql(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return jl(this,t,e);case"utf8":case"utf-8":return Ti(this,t,e);case"ascii":return Wl(this,t,e);case"latin1":case"binary":return Vl(this,t,e);case"base64":return Dl(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Gl(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function ye(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Ai(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,n)),D(t))return t.length===0?-1:yi(r,t,e,n,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):yi(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function yi(r,t,e,n,i){var o=1,a=r.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,a/=2,l/=2,e/=2}function p(b,w){return o===1?b[w]:b.readUInt16BE(w*o)}var h;if(i){var m=-1;for(h=e;h<a;h++)if(p(r,h)===p(t,m===-1?0:h-m)){if(m===-1&&(m=h),h-m+1===l)return m*o}else m!==-1&&(h-=h-m),m=-1}else for(e+l>a&&(e=a-l),h=e;h>=0;h--){for(var g=!0,v=0;v<l;v++)if(p(r,h+v)!==p(t,v)){g=!1;break}if(g)return h}return-1}function Ll(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var l=parseInt(t.substr(a*2,2),16);if(isNaN(l))return a;r[e+a]=l}return a}function Ul(r,t,e,n){return Mt(Lt(t,r.length-e),r,e,n)}function Si(r,t,e,n){return Mt(Ql(t),r,e,n)}function kl(r,t,e,n){return Si(r,t,e,n)}function Ml(r,t,e,n){return Mt(Pi(t),r,e,n)}function $l(r,t,e,n){return Mt(Zl(t,r.length-e),r,e,n)}function Dl(r,t,e){return t===0&&e===r.length?hi(r):hi(r.slice(t,e))}function Ti(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],a=null,l=o>239?4:o>223?3:o>191?2:1;if(i+l<=e){var p,h,m,g;switch(l){case 1:o<128&&(a=o);break;case 2:p=r[i+1],(p&192)===128&&(g=(o&31)<<6|p&63,g>127&&(a=g));break;case 3:p=r[i+1],h=r[i+2],(p&192)===128&&(h&192)===128&&(g=(o&15)<<12|(p&63)<<6|h&63,g>2047&&(g<55296||g>57343)&&(a=g));break;case 4:p=r[i+1],h=r[i+2],m=r[i+3],(p&192)===128&&(h&192)===128&&(m&192)===128&&(g=(o&15)<<18|(p&63)<<12|(h&63)<<6|m&63,g>65535&&g<1114112&&(a=g))}}a===null?(a=65533,l=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=l}return _l(n)}function _l(r){var t=r.length;if(t<=gi)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=gi));return e}function Wl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function Vl(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function jl(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=Jl(r[o]);return i}function Gl(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function O(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function q(r,t,e,n,i,o){if(!D(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function Ut(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function kt(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Ri(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Ei(r,t,e,n,i){return i||Ri(r,t,e,4,34028234663852886e22,-34028234663852886e22),Fi(r,t,e,n,23,4),e+4}function Ii(r,t,e,n,i){return i||Ri(r,t,e,8,17976931348623157e292,-17976931348623157e292),Fi(r,t,e,n,52,8),e+8}function Yl(r){if(r=Hl(r).replace(zl,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Hl(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Jl(r){return r<16?"0"+r.toString(16):r.toString(16)}function Lt(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],a=0;a<n;++a){if(e=r.charCodeAt(a),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function Ql(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Zl(r,t){for(var e,n,i,o=[],a=0;a<r.length&&!((t-=2)<0);++a)e=r.charCodeAt(a),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Pi(r){return Il(Yl(r))}function Mt(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Kl(r){return r!==r}function Xl(r){return r!=null&&(!!r._isBuffer||Ni(r)||ep(r))}function Ni(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function ep(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ni(r.slice(0,0))}function $t(r,t,e,n,i){var o,a,l=i*8-n-1,p=(1<<l)-1,h=p>>1,m=-7,g=e?i-1:0,v=e?-1:1,b=r[t+g];for(g+=v,o=b&(1<<-m)-1,b>>=-m,m+=l;m>0;o=o*256+r[t+g],g+=v,m-=8);for(a=o&(1<<-m)-1,o>>=-m,m+=n;m>0;a=a*256+r[t+g],g+=v,m-=8);if(o===0)o=1-h;else{if(o===p)return a?NaN:(b?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-h}return(b?-1:1)*a*Math.pow(2,o-n)}function Fi(r,t,e,n,i,o){var a,l,p,h=o*8-i-1,m=(1<<h)-1,g=m>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:o-1,w=n?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=m):(a=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+g>=1?t+=v/p:t+=v*Math.pow(2,1-g),t*p>=2&&(a++,p/=2),a+g>=m?(l=0,a=m):a+g>=1?(l=(t*p-1)*Math.pow(2,i),a=a+g):(l=t*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;r[e+b]=l&255,b+=w,l/=256,i-=8);for(a=a<<i|l,h+=i;h>0;r[e+b]=a&255,b+=w,a/=256,h-=8);r[e+b-w]|=A*128}var $,L,El,Ur,gi,zl,Oi=Re(()=>{"use strict";s();u();$=[],L=[],El=typeof Uint8Array!="undefined"?Uint8Array:Array,Ur=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return vi(null,r,t,e)};f.kMaxLength=qt();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return Fl(null,r,t,e)};f.allocUnsafe=function(r){return kr(null,r)};f.allocUnsafeSlow=function(r){return kr(null,r)};f.isBuffer=Xl;f.compare=function(t,e){if(!D(t)||!D(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,a=Math.min(n,i);o<a;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=f.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!D(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i};f.byteLength=bi;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ye(this,e,e+1);return this};f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ye(this,e,e+3),ye(this,e+1,e+2);return this};f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ye(this,e,e+7),ye(this,e+1,e+6),ye(this,e+2,e+5),ye(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?Ti(this,0,t):ql.apply(this,arguments)};f.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,n,i,o){if(!D(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var a=o-i,l=n-e,p=Math.min(a,l),h=this.slice(i,o),m=t.slice(e,n),g=0;g<p;++g)if(h[g]!==m[g]){a=h[g],l=m[g];break}return a<l?-1:l<a?1:0};f.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};f.prototype.indexOf=function(t,e,n){return Ai(this,t,e,n,!0)};f.prototype.lastIndexOf=function(t,e,n){return Ai(this,t,e,n,!1)};f.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return Ll(this,t,e,n);case"utf8":case"utf-8":return Ul(this,t,e,n);case"ascii":return Si(this,t,e,n);case"latin1":case"binary":return kl(this,t,e,n);case"base64":return Ml(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $l(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};gi=4096;f.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var o=e-t;i=new f(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+t]}return i};f.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||O(t,e,this.length);for(var i=this[t],o=1,a=0;++a<e&&(o*=256);)i+=this[t+a]*o;return i};f.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||O(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};f.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||O(t,e,this.length);for(var i=this[t],o=1,a=0;++a<e&&(o*=256);)i+=this[t+a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||O(t,e,this.length);for(var i=e,o=1,a=this[t+--i];i>0&&(o*=256);)a+=this[t+--i]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*e)),a};f.prototype.readInt8=function(t,e){return e||O(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),$t(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),$t(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),$t(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),$t(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;q(this,t,e,n,o,0)}var a=1,l=0;for(this[e]=t&255;++l<n&&(a*=256);)this[e+l]=t/a&255;return e+n};f.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;q(this,t,e,n,o,0)}var a=n-1,l=1;for(this[e+a]=t&255;--a>=0&&(l*=256);)this[e+a]=t/l&255;return e+n};f.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ut(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ut(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):kt(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):kt(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);q(this,t,e,n,o-1,-o)}var a=0,l=1,p=0;for(this[e]=t&255;++a<n&&(l*=256);)t<0&&p===0&&this[e+a-1]!==0&&(p=1),this[e+a]=(t/l>>0)-p&255;return e+n};f.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);q(this,t,e,n,o-1,-o)}var a=n-1,l=1,p=0;for(this[e+a]=t&255;--a>=0&&(l*=256);)t<0&&p===0&&this[e+a+1]!==0&&(p=1),this[e+a]=(t/l>>0)-p&255;return e+n};f.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ut(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ut(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):kt(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):kt(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,n){return Ei(this,t,e,!0,n)};f.prototype.writeFloatBE=function(t,e,n){return Ei(this,t,e,!1,n)};f.prototype.writeDoubleLE=function(t,e,n){return Ii(this,t,e,!0,n)};f.prototype.writeDoubleBE=function(t,e,n){return Ii(this,t,e,!1,n)};f.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,a;if(this===t&&n<e&&e<i)for(a=o-1;a>=0;--a)t[a+e]=this[a+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)t[a+e]=this[a+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};f.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var a;if(typeof t=="number")for(a=e;a<n;++a)this[a]=t;else{var l=D(t)?t:Lt(new f(t,i).toString()),p=l.length;for(a=0;a<n-e;++a)this[a+e]=l[a%p]}return this};zl=/[^+\/0-9A-Za-z-_]/g});var u=Re(()=>{"use strict";Oi()});var $r=x((Wg,Ci)=>{"use strict";s();u();Ci.exports=Object});var qi=x((Gg,Bi)=>{"use strict";s();u();Bi.exports=Error});var Ui=x((Hg,Li)=>{"use strict";s();u();Li.exports=EvalError});var Mi=x((Zg,ki)=>{"use strict";s();u();ki.exports=RangeError});var Di=x((ex,$i)=>{"use strict";s();u();$i.exports=ReferenceError});var Dr=x((nx,_i)=>{"use strict";s();u();_i.exports=SyntaxError});var C=x((ax,Wi)=>{"use strict";s();u();Wi.exports=TypeError});var ji=x((fx,Vi)=>{"use strict";s();u();Vi.exports=URIError});var _r=x((cx,Gi)=>{"use strict";s();u();Gi.exports=Math.abs});var Wr=x((hx,zi)=>{"use strict";s();u();zi.exports=Math.floor});var Hi=x((xx,Yi)=>{"use strict";s();u();Yi.exports=Math.max});var Vr=x((bx,Ji)=>{"use strict";s();u();Ji.exports=Math.min});var Zi=x((Tx,Qi)=>{"use strict";s();u();Qi.exports=Math.pow});var Xi=x((Ix,Ki)=>{"use strict";s();u();Ki.exports=Math.round});var Dt=x((Fx,eo)=>{"use strict";s();u();eo.exports=Number.isNaN||function(t){return t!==t}});var ro=x((Bx,to)=>{"use strict";s();u();var tp=Dt();to.exports=function(t){return tp(t)||t===0?t:t<0?-1:1}});var io=x((Ux,no)=>{"use strict";s();u();no.exports=Object.getOwnPropertyDescriptor});var Pe=x(($x,oo)=>{"use strict";s();u();var _t=io();if(_t)try{_t([],"length")}catch(r){_t=null}oo.exports=_t});var tt=x((Wx,ao)=>{"use strict";s();u();var Wt=Object.defineProperty||!1;if(Wt)try{Wt({},"a",{value:1})}catch(r){Wt=!1}ao.exports=Wt});var jr=x((Gx,so)=>{"use strict";s();u();so.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,e);if(l.value!==i||l.enumerable!==!0)return!1}return!0}});var Gr=x((Hx,fo)=>{"use strict";s();u();var uo=typeof Symbol!="undefined"&&Symbol,rp=jr();fo.exports=function(){return typeof uo!="function"||typeof Symbol!="function"||typeof uo("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:rp()}});var zr=x((Zx,lo)=>{"use strict";s();u();lo.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Yr=x((e0,po)=>{"use strict";s();u();var np=$r();po.exports=np.getPrototypeOf||null});var ho=x((n0,mo)=>{"use strict";s();u();var ip="Function.prototype.bind called on incompatible ",op=Object.prototype.toString,ap=Math.max,sp="[object Function]",co=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n},up=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},fp=function(r,t){for(var e="",n=0;n<r.length;n+=1)e+=r[n],n+1<r.length&&(e+=t);return e};mo.exports=function(t){var e=this;if(typeof e!="function"||op.apply(e)!==sp)throw new TypeError(ip+e);for(var n=up(arguments,1),i,o=function(){if(this instanceof i){var m=e.apply(this,co(n,arguments));return Object(m)===m?m:this}return e.apply(t,co(n,arguments))},a=ap(0,e.length-n.length),l=[],p=0;p<a;p++)l[p]="$"+p;if(i=Function("binder","return function ("+fp(l,",")+"){ return binder.apply(this,arguments); }")(o),e.prototype){var h=function(){};h.prototype=e.prototype,i.prototype=new h,h.prototype=null}return i}});var Ne=x((a0,yo)=>{"use strict";s();u();var lp=ho();yo.exports=Function.prototype.bind||lp});var Vt=x((f0,go)=>{"use strict";s();u();go.exports=Function.prototype.call});var jt=x((c0,xo)=>{"use strict";s();u();xo.exports=Function.prototype.apply});var wo=x((h0,vo)=>{"use strict";s();u();vo.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Hr=x((x0,bo)=>{"use strict";s();u();var pp=Ne(),cp=jt(),dp=Vt(),mp=wo();bo.exports=mp||pp.call(dp,cp)});var Gt=x((b0,Ao)=>{"use strict";s();u();var hp=Ne(),yp=C(),gp=Vt(),xp=Hr();Ao.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new yp("a function is required");return xp(hp,gp,t)}});var Po=x((T0,Io)=>{"use strict";s();u();var vp=Gt(),So=Pe(),Ro;try{Ro=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var Jr=!!Ro&&So&&So(Object.prototype,"__proto__"),Eo=Object,To=Eo.getPrototypeOf;Io.exports=Jr&&typeof Jr.get=="function"?vp([Jr.get]):typeof To=="function"?function(t){return To(t==null?t:Eo(t))}:!1});var Bo=x((I0,Co)=>{"use strict";s();u();var No=zr(),Fo=Yr(),Oo=Po();Co.exports=No?function(t){return No(t)}:Fo?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Fo(t)}:Oo?function(t){return Oo(t)}:null});var Qr=x((F0,qo)=>{"use strict";s();u();var wp=Function.prototype.call,bp=Object.prototype.hasOwnProperty,Ap=Ne();qo.exports=Ap.call(wp,bp)});var _=x((B0,Do)=>{"use strict";s();u();var T,Sp=$r(),Tp=qi(),Rp=Ui(),Ep=Mi(),Ip=Di(),Be=Dr(),Ce=C(),Pp=ji(),Np=_r(),Fp=Wr(),Op=Hi(),Cp=Vr(),Bp=Zi(),qp=Xi(),Lp=ro(),Mo=Function,Zr=function(r){try{return Mo('"use strict"; return ('+r+").constructor;")()}catch(t){}},rt=Pe(),Up=tt(),Kr=function(){throw new Ce},kp=rt?(function(){try{return arguments.callee,Kr}catch(r){try{return rt(arguments,"callee").get}catch(t){return Kr}}})():Kr,Fe=Gr()(),B=Bo(),Mp=Yr(),$p=zr(),$o=jt(),nt=Vt(),Oe={},Dp=typeof Uint8Array=="undefined"||!B?T:B(Uint8Array),ge={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?T:ArrayBuffer,"%ArrayIteratorPrototype%":Fe&&B?B([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Oe,"%AsyncGenerator%":Oe,"%AsyncGeneratorFunction%":Oe,"%AsyncIteratorPrototype%":Oe,"%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%":Tp,"%eval%":eval,"%EvalError%":Rp,"%Float16Array%":typeof Float16Array=="undefined"?T:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?T:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?T:FinalizationRegistry,"%Function%":Mo,"%GeneratorFunction%":Oe,"%Int8Array%":typeof Int8Array=="undefined"?T:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?T:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fe&&B?B(B([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map=="undefined"?T:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Fe||!B?T:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Sp,"%Object.getOwnPropertyDescriptor%":rt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?T:Promise,"%Proxy%":typeof Proxy=="undefined"?T:Proxy,"%RangeError%":Ep,"%ReferenceError%":Ip,"%Reflect%":typeof Reflect=="undefined"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?T:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Fe||!B?T:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fe&&B?B(""[Symbol.iterator]()):T,"%Symbol%":Fe?Symbol:T,"%SyntaxError%":Be,"%ThrowTypeError%":kp,"%TypedArray%":Dp,"%TypeError%":Ce,"%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%":Pp,"%WeakMap%":typeof WeakMap=="undefined"?T:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?T:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?T:WeakSet,"%Function.prototype.call%":nt,"%Function.prototype.apply%":$o,"%Object.defineProperty%":Up,"%Object.getPrototypeOf%":Mp,"%Math.abs%":Np,"%Math.floor%":Fp,"%Math.max%":Op,"%Math.min%":Cp,"%Math.pow%":Bp,"%Math.round%":qp,"%Math.sign%":Lp,"%Reflect.getPrototypeOf%":$p};if(B)try{null.error}catch(r){Lo=B(B(r)),ge["%Error.prototype%"]=Lo}var Lo,_p=function r(t){var e;if(t==="%AsyncFunction%")e=Zr("async function () {}");else if(t==="%GeneratorFunction%")e=Zr("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Zr("async function* () {}");else if(t==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(e=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&B&&(e=B(i.prototype))}return ge[t]=e,e},Uo={__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"]},it=Ne(),zt=Qr(),Wp=it.call(nt,Array.prototype.concat),Vp=it.call($o,Array.prototype.splice),ko=it.call(nt,String.prototype.replace),Yt=it.call(nt,String.prototype.slice),jp=it.call(nt,RegExp.prototype.exec),Gp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zp=/\\(\\)?/g,Yp=function(t){var e=Yt(t,0,1),n=Yt(t,-1);if(e==="%"&&n!=="%")throw new Be("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&e!=="%")throw new Be("invalid intrinsic syntax, expected opening `%`");var i=[];return ko(t,Gp,function(o,a,l,p){i[i.length]=l?ko(p,zp,"$1"):a||o}),i},Hp=function(t,e){var n=t,i;if(zt(Uo,n)&&(i=Uo[n],n="%"+i[0]+"%"),zt(ge,n)){var o=ge[n];if(o===Oe&&(o=_p(n)),typeof o=="undefined"&&!e)throw new Ce("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Be("intrinsic "+t+" does not exist!")};Do.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(jp(/^%?[^%]*%?$/,t)===null)throw new Be("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Yp(t),i=n.length>0?n[0]:"",o=Hp("%"+i+"%",e),a=o.name,l=o.value,p=!1,h=o.alias;h&&(i=h[0],Vp(n,Wp([0,1],h)));for(var m=1,g=!0;m<n.length;m+=1){var v=n[m],b=Yt(v,0,1),w=Yt(v,-1);if((b==='"'||b==="'"||b==="`"||w==='"'||w==="'"||w==="`")&&b!==w)throw new Be("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(p=!0),i+="."+v,a="%"+i+"%",zt(ge,a))l=ge[a];else if(l!=null){if(!(v in l)){if(!e)throw new Ce("base intrinsic for "+t+" exists, but the property is not available.");return}if(rt&&m+1>=n.length){var A=rt(l,v);g=!!A,g&&"get"in A&&!("originalValue"in A.get)?l=A.get:l=l[v]}else g=zt(l,v),l=l[v];g&&!p&&(ge[a]=l)}}return l}});var Ht=x((U0,Vo)=>{"use strict";s();u();var _o=tt(),Jp=Dr(),qe=C(),Wo=Pe();Vo.exports=function(t,e,n){if(!t||typeof t!="object"&&typeof t!="function")throw new qe("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new qe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new qe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new qe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new qe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new qe("`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,l=arguments.length>6?arguments[6]:!1,p=!!Wo&&Wo(t,e);if(_o)_o(t,e,{configurable:a===null&&p?p.configurable:!a,enumerable:i===null&&p?p.enumerable:!i,value:n,writable:o===null&&p?p.writable:!o});else if(l||!i&&!o&&!a)t[e]=n;else throw new Jp("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Jt=x(($0,Go)=>{"use strict";s();u();var Xr=tt(),jo=function(){return!!Xr};jo.hasArrayLengthDefineBug=function(){if(!Xr)return null;try{return Xr([],"length",{value:1}).length!==1}catch(t){return!0}};Go.exports=jo});var Qo=x((W0,Jo)=>{"use strict";s();u();var Qp=_(),zo=Ht(),Zp=Jt()(),Yo=Pe(),Ho=C(),Kp=Qp("%Math.floor%");Jo.exports=function(t,e){if(typeof t!="function")throw new Ho("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||Kp(e)!==e)throw new Ho("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&Yo){var a=Yo(t,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(Zp?zo(t,"length",e,!0,!0):zo(t,"length",e)),t}});var Ko=x((G0,Zo)=>{"use strict";s();u();var Xp=Ne(),ec=jt(),tc=Hr();Zo.exports=function(){return tc(Xp,ec,arguments)}});var Zt=x((H0,Qt)=>{"use strict";s();u();var rc=Qo(),Xo=tt(),nc=Gt(),ea=Ko();Qt.exports=function(t){var e=nc(arguments),n=t.length-(arguments.length-1);return rc(e,1+(n>0?n:0),!0)};Xo?Xo(Qt.exports,"apply",{value:ea}):Qt.exports.apply=ea});var en=x((Z0,ra)=>{"use strict";s();u();var ta=Object.prototype.toString;ra.exports=function(t){var e=ta.call(t),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&ta.call(t.callee)==="[object Function]"),n}});var pa=x((ev,la)=>{"use strict";s();u();var fa;Object.keys||(ot=Object.prototype.hasOwnProperty,tn=Object.prototype.toString,na=en(),rn=Object.prototype.propertyIsEnumerable,ia=!rn.call({toString:null},"toString"),oa=rn.call(function(){},"prototype"),at=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Kt=function(r){var t=r.constructor;return t&&t.prototype===r},aa={$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},sa=(function(){if(typeof window=="undefined")return!1;for(var r in window)try{if(!aa["$"+r]&&ot.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Kt(window[r])}catch(t){return!0}}catch(t){return!0}return!1})(),ua=function(r){if(typeof window=="undefined"||!sa)return Kt(r);try{return Kt(r)}catch(t){return!1}},fa=function(t){var e=t!==null&&typeof t=="object",n=tn.call(t)==="[object Function]",i=na(t),o=e&&tn.call(t)==="[object String]",a=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var l=oa&&n;if(o&&t.length>0&&!ot.call(t,0))for(var p=0;p<t.length;++p)a.push(String(p));if(i&&t.length>0)for(var h=0;h<t.length;++h)a.push(String(h));else for(var m in t)!(l&&m==="prototype")&&ot.call(t,m)&&a.push(String(m));if(ia)for(var g=ua(t),v=0;v<at.length;++v)!(g&&at[v]==="constructor")&&ot.call(t,at[v])&&a.push(at[v]);return a});var ot,tn,na,rn,ia,oa,at,Kt,aa,sa,ua;la.exports=fa});var ha=x((nv,ma)=>{"use strict";s();u();var ic=Array.prototype.slice,oc=en(),ca=Object.keys,Xt=ca?function(t){return ca(t)}:pa(),da=Object.keys;Xt.shim=function(){if(Object.keys){var t=(function(){var e=Object.keys(arguments);return e&&e.length===arguments.length})(1,2);t||(Object.keys=function(n){return oc(n)?da(ic.call(n)):da(n)})}else Object.keys=Xt;return Object.keys||Xt};ma.exports=Xt});var er=x((av,va)=>{"use strict";s();u();var ac=ha(),sc=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",uc=Object.prototype.toString,fc=Array.prototype.concat,ya=Ht(),lc=function(r){return typeof r=="function"&&uc.call(r)==="[object Function]"},ga=Jt()(),pc=function(r,t,e,n){if(t in r){if(n===!0){if(r[t]===e)return}else if(!lc(n)||!n())return}ga?ya(r,t,e,!0):ya(r,t,e)},xa=function(r,t){var e=arguments.length>2?arguments[2]:{},n=ac(t);sc&&(n=fc.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)pc(r,n[i],t[n[i]],e[n[i]])};xa.supportsDescriptors=!!ga;va.exports=xa});var W=x((fv,Aa)=>{"use strict";s();u();var wa=_(),ba=Gt(),cc=ba([wa("%String.prototype.indexOf%")]);Aa.exports=function(t,e){var n=wa(t,!!e);return typeof n=="function"&&cc(t,".prototype.")>-1?ba([n]):n}});var Ra=x((cv,Ta)=>{"use strict";s();u();var dc=_(),Sa=dc("%Array%"),mc=!Sa.isArray&&W()("Object.prototype.toString");Ta.exports=Sa.isArray||function(t){return mc(t)==="[object Array]"}});var nn=x((hv,Ea)=>{"use strict";s();u();Ea.exports=Ra()});var Pa=x((xv,Ia)=>{"use strict";s();u();var hc=_(),yc=W(),gc=C(),xc=nn(),vc=hc("%Reflect.apply%",!0)||yc("Function.prototype.apply");Ia.exports=function(t,e){var n=arguments.length>2?arguments[2]:[];if(!xc(n))throw new gc("Assertion failed: optional `argumentsList`, if provided, must be a List");return vc(t,e,n)}});function Na(){throw new Error("setTimeout has not been defined")}function Fa(){throw new Error("clearTimeout has not been defined")}function Oa(r){if(ne===setTimeout)return setTimeout(r,0);if((ne===Na||!ne)&&setTimeout)return ne=setTimeout,setTimeout(r,0);try{return ne(r,0)}catch(t){try{return ne.call(null,r,0)}catch(e){return ne.call(this,r,0)}}}function wc(r){if(ie===clearTimeout)return clearTimeout(r);if((ie===Fa||!ie)&&clearTimeout)return ie=clearTimeout,clearTimeout(r);try{return ie(r)}catch(t){try{return ie.call(null,r)}catch(e){return ie.call(this,r)}}}function bc(){!Ue||!xe||(Ue=!1,xe.length?J=xe.concat(J):tr=-1,J.length&&Ca())}function Ca(){if(!Ue){var r=Oa(bc);Ue=!0;for(var t=J.length;t;){for(xe=J,J=[];++tr<t;)xe&&xe[tr].run();tr=-1,t=J.length}xe=null,Ue=!1,wc(r)}}function Ac(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];J.push(new Ba(r,t)),J.length===1&&!Ue&&Oa(Ca)}function Ba(r,t){this.fun=r,this.array=t}function ve(){}function $c(r){throw new Error("process.binding is not supported")}function Dc(){return"/"}function _c(r){throw new Error("process.chdir is not supported")}function Wc(){return 0}function jc(r){var t=Vc.call(Le)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function zc(){var r=new Date,t=r-Gc;return t/1e3}var ne,ie,J,Ue,xe,tr,Sc,Tc,Rc,Ec,Ic,Pc,Nc,Fc,Oc,Cc,Bc,qc,Lc,Uc,kc,Mc,Le,Vc,Gc,Yc,st,qa=Re(()=>{"use strict";s();u();ne=Na,ie=Fa;typeof globalThis.setTimeout=="function"&&(ne=setTimeout);typeof globalThis.clearTimeout=="function"&&(ie=clearTimeout);J=[],Ue=!1,tr=-1;Ba.prototype.run=function(){this.fun.apply(null,this.array)};Sc="browser",Tc="browser",Rc=!0,Ec={},Ic=[],Pc="",Nc={},Fc={},Oc={};Cc=ve,Bc=ve,qc=ve,Lc=ve,Uc=ve,kc=ve,Mc=ve;Le=globalThis.performance||{},Vc=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};Gc=new Date;Yc={nextTick:Ac,title:Sc,browser:Rc,env:Ec,argv:Ic,version:Pc,versions:Nc,on:Cc,addListener:Bc,once:qc,off:Lc,removeListener:Uc,removeAllListeners:kc,emit:Mc,binding:$c,cwd:Dc,chdir:_c,umask:Wc,hrtime:jc,platform:Tc,release:Fc,config:Oc,uptime:zc},st=Yc});var on,an,La=Re(()=>{"use strict";s();u();typeof Object.create=="function"?on=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:on=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t};an=on});var Va={};qr(Va,{_extend:()=>hn,debuglog:()=>Ua,default:()=>nd,deprecate:()=>pn,format:()=>or,inherits:()=>an,inspect:()=>j,isArray:()=>cn,isBoolean:()=>ar,isBuffer:()=>Da,isDate:()=>ir,isError:()=>ft,isFunction:()=>lt,isNull:()=>pt,isNullOrUndefined:()=>ka,isNumber:()=>dn,isObject:()=>we,isPrimitive:()=>$a,isRegExp:()=>ut,isString:()=>ct,isSymbol:()=>Ma,isUndefined:()=>V,log:()=>_a});function or(r){if(!ct(r)){for(var t=[],e=0;e<arguments.length;e++)t.push(j(arguments[e]));return t.join(" ")}for(var e=1,n=arguments,i=n.length,o=String(r).replace(Hc,function(l){if(l==="%%")return"%";if(e>=i)return l;switch(l){case"%s":return String(n[e++]);case"%d":return Number(n[e++]);case"%j":try{return JSON.stringify(n[e++])}catch(p){return"[Circular]"}default:return l}}),a=n[e];e<i;a=n[++e])pt(a)||!we(a)?o+=" "+a:o+=" "+j(a);return o}function pn(r,t){if(V(globalThis.process))return function(){return pn(r,t).apply(this,arguments)};if(st.noDeprecation===!0)return r;var e=!1;function n(){if(!e){if(st.throwDeprecation)throw new Error(t);st.traceDeprecation?console.trace(t):console.error(t),e=!0}return r.apply(this,arguments)}return n}function Ua(r){if(V(sn)&&(sn=st.env.NODE_DEBUG||""),r=r.toUpperCase(),!rr[r])if(new RegExp("\\b"+r+"\\b","i").test(sn)){var t=0;rr[r]=function(){var e=or.apply(null,arguments);console.error("%s %d: %s",r,t,e)}}else rr[r]=function(){};return rr[r]}function j(r,t){var e={seen:[],stylize:Qc};return arguments.length>=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),ar(t)?e.showHidden=t:t&&hn(e,t),V(e.showHidden)&&(e.showHidden=!1),V(e.depth)&&(e.depth=2),V(e.colors)&&(e.colors=!1),V(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=Jc),nr(e,r,e.depth)}function Jc(r,t){var e=j.styles[t];return e?"\x1B["+j.colors[e][0]+"m"+r+"\x1B["+j.colors[e][1]+"m":r}function Qc(r,t){return r}function Zc(r){var t={};return r.forEach(function(e,n){t[e]=!0}),t}function nr(r,t,e){if(r.customInspect&&t&&lt(t.inspect)&&t.inspect!==j&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(e,r);return ct(n)||(n=nr(r,n,e)),n}var i=Kc(r,t);if(i)return i;var o=Object.keys(t),a=Zc(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(t)),ft(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return un(t);if(o.length===0){if(lt(t)){var l=t.name?": "+t.name:"";return r.stylize("[Function"+l+"]","special")}if(ut(t))return r.stylize(RegExp.prototype.toString.call(t),"regexp");if(ir(t))return r.stylize(Date.prototype.toString.call(t),"date");if(ft(t))return un(t)}var p="",h=!1,m=["{","}"];if(cn(t)&&(h=!0,m=["[","]"]),lt(t)){var g=t.name?": "+t.name:"";p=" [Function"+g+"]"}if(ut(t)&&(p=" "+RegExp.prototype.toString.call(t)),ir(t)&&(p=" "+Date.prototype.toUTCString.call(t)),ft(t)&&(p=" "+un(t)),o.length===0&&(!h||t.length==0))return m[0]+p+m[1];if(e<0)return ut(t)?r.stylize(RegExp.prototype.toString.call(t),"regexp"):r.stylize("[Object]","special");r.seen.push(t);var v;return h?v=Xc(r,t,e,a,o):v=o.map(function(b){return ln(r,t,e,a,b,h)}),r.seen.pop(),ed(v,p,m)}function Kc(r,t){if(V(t))return r.stylize("undefined","undefined");if(ct(t)){var e="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(e,"string")}if(dn(t))return r.stylize(""+t,"number");if(ar(t))return r.stylize(""+t,"boolean");if(pt(t))return r.stylize("null","null")}function un(r){return"["+Error.prototype.toString.call(r)+"]"}function Xc(r,t,e,n,i){for(var o=[],a=0,l=t.length;a<l;++a)Wa(t,String(a))?o.push(ln(r,t,e,n,String(a),!0)):o.push("");return i.forEach(function(p){p.match(/^\d+$/)||o.push(ln(r,t,e,n,p,!0))}),o}function ln(r,t,e,n,i,o){var a,l,p;if(p=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},p.get?p.set?l=r.stylize("[Getter/Setter]","special"):l=r.stylize("[Getter]","special"):p.set&&(l=r.stylize("[Setter]","special")),Wa(n,i)||(a="["+i+"]"),l||(r.seen.indexOf(p.value)<0?(pt(e)?l=nr(r,p.value,null):l=nr(r,p.value,e-1),l.indexOf(`
2
+ `)>-1&&(o?l=l.split(`
3
3
  `).map(function(h){return" "+h}).join(`
4
- `).substr(2):p=`
5
- `+p.split(`
4
+ `).substr(2):l=`
5
+ `+l.split(`
6
6
  `).map(function(h){return" "+h}).join(`
7
- `))):p=r.stylize("[Circular]","special")),z(u)){if(o&&i.match(/^\d+$/))return p;u=JSON.stringify(""+i),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=r.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=r.stylize(u,"string"))}return u+": "+p}function zd(r,t,e){var n=0,i=r.reduce(function(o,u){return n++,u.indexOf(`
8
- `)>=0&&n++,o+u.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?e[0]+(t===""?"":t+`
7
+ `))):l=r.stylize("[Circular]","special")),V(a)){if(o&&i.match(/^\d+$/))return l;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+": "+l}function ed(r,t,e){var n=0,i=r.reduce(function(o,a){return n++,a.indexOf(`
8
+ `)>=0&&n++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?e[0]+(t===""?"":t+`
9
9
  `)+" "+r.join(`,
10
- `)+" "+e[1]:e[0]+t+" "+r.join(", ")+" "+e[1]}function Nn(r){return Array.isArray(r)}function yr(r){return typeof r=="boolean"}function wt(r){return r===null}function xs(r){return r==null}function Fn(r){return typeof r=="number"}function bt(r){return typeof r=="string"}function vs(r){return typeof r=="symbol"}function z(r){return r===void 0}function gt(r){return Re(r)&&On(r)==="[object RegExp]"}function Re(r){return typeof r=="object"&&r!==null}function cr(r){return Re(r)&&On(r)==="[object Date]"}function xt(r){return Re(r)&&(On(r)==="[object Error]"||r instanceof Error)}function vt(r){return typeof r=="function"}function ws(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function bs(r){return f.isBuffer(r)}function On(r){return Object.prototype.toString.call(r)}function Rn(r){return r<10?"0"+r.toString(10):r.toString(10)}function Hd(){var r=new Date,t=[Rn(r.getHours()),Rn(r.getMinutes()),Rn(r.getSeconds())].join(":");return[r.getDate(),Yd[r.getMonth()],t].join(" ")}function As(){console.log("%s - %s",Hd(),dr.apply(null,arguments))}function Cn(r,t){if(!t||!Re(t))return r;for(var e=Object.keys(t),n=e.length;n--;)r[e[n]]=t[e[n]];return r}function Ss(r,t){return Object.prototype.hasOwnProperty.call(r,t)}var $d,pr,En,Yd,Jd,Is=Fe(()=>{"use strict";a();s();ms();hs();$d=/%[sdj%]/g;pr={};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"};Yd=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Jd={inherits:Sn,_extend:Cn,log:As,isBuffer:bs,isPrimitive:ws,isFunction:vt,isError:xt,isDate:cr,isObject:Re,isRegExp:gt,isUndefined:z,isSymbol:vs,isString:bt,isNumber:Fn,isNullOrUndefined:xs,isNull:wt,isBoolean:yr,isArray:Nn,inspect:Y,deprecate:Pn,format:dr,debuglog:gs}});var Rs=x((Uw,mr)=>{"use strict";a();s();var Te=(Is(),Ti(Es));if(Te&&Te.default){mr.exports=Te.default;for(let r in Te)mr.exports[r]=Te[r]}else Te&&(mr.exports=Te)});var Ps=x((kw,Ts)=>{"use strict";a();s();Ts.exports=Rs().inspect});var It=x((_w,Hs)=>{"use strict";a();s();var Wn=typeof Map=="function"&&Map.prototype,Un=Object.getOwnPropertyDescriptor&&Wn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,gr=Wn&&Un&&typeof Un.get=="function"?Un.get:null,Ns=Wn&&Map.prototype.forEach,jn=typeof Set=="function"&&Set.prototype,Bn=Object.getOwnPropertyDescriptor&&jn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xr=jn&&Bn&&typeof Bn.get=="function"?Bn.get:null,Fs=jn&&Set.prototype.forEach,Qd=typeof WeakMap=="function"&&WeakMap.prototype,St=Qd?WeakMap.prototype.has:null,Zd=typeof WeakSet=="function"&&WeakSet.prototype,Et=Zd?WeakSet.prototype.has:null,Kd=typeof WeakRef=="function"&&WeakRef.prototype,Os=Kd?WeakRef.prototype.deref:null,Xd=Boolean.prototype.valueOf,ey=Object.prototype.toString,ty=Function.prototype.toString,ry=String.prototype.match,Vn=String.prototype.slice,ue=String.prototype.replace,ny=String.prototype.toUpperCase,Cs=String.prototype.toLowerCase,Ds=RegExp.prototype.test,Us=Array.prototype.concat,H=Array.prototype.join,iy=Array.prototype.slice,Bs=Math.floor,Ln=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qn=Object.getOwnPropertySymbols,Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="object",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ve||!0)?Symbol.toStringTag:null,Ws=Object.prototype.propertyIsEnumerable,qs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ks(r,t){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Ds.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Bs(-r):Bs(r);if(n!==r){var i=String(n),o=Vn.call(t,i.length+1);return ue.call(i,e,"$&_")+"."+ue.call(ue.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ue.call(t,e,"$&_")}var _n=Ps(),Ls=_n.custom,Ms=Gs(Ls)?Ls:null,js={__proto__:null,double:'"',single:"'"},oy={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Hs.exports=function r(t,e,n,i){var o=e||{};if(X(o,"quoteStyle")&&!X(js,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 u=X(o,"customInspect")?o.customInspect:!0;if(typeof u!="boolean"&&u!=="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 t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ys(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return p?ks(t,c):c}if(typeof t=="bigint"){var h=String(t)+"n";return p?ks(t,h):h}var y=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=y&&y>0&&typeof t=="object")return $n(t)?"[Array]":"[Object]";var g=Sy(o,n);if(typeof i=="undefined")i=[];else if(zs(i,t)>=0)return"[Circular]";function v(Ne,Lt,wp){if(Lt&&(i=iy.call(i),i.push(Lt)),wp){var Ai={depth:o.depth};return X(o,"quoteStyle")&&(Ai.quoteStyle=o.quoteStyle),r(Ne,Ai,n+1,i)}return r(Ne,o,n+1,i)}if(typeof t=="function"&&!_s(t)){var b=yy(t),w=hr(t,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(w.length>0?" { "+H.call(w,", ")+" }":"")}if(Gs(t)){var A=Ve?ue.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Mn.call(t);return typeof t=="object"&&!Ve?At(A):A}if(wy(t)){for(var N="<"+Cs.call(String(t.nodeName)),P=t.attributes||[],F=0;F<P.length;F++)N+=" "+P[F].name+"="+Vs(ay(P[F].value),"double",o);return N+=">",t.childNodes&&t.childNodes.length&&(N+="..."),N+="</"+Cs.call(String(t.nodeName))+">",N}if($n(t)){if(t.length===0)return"[]";var O=hr(t,v);return g&&!Ay(O)?"["+Dn(O,g)+"]":"[ "+H.call(O,", ")+" ]"}if(uy(t)){var at=hr(t,v);return!("cause"in Error.prototype)&&"cause"in t&&!Ws.call(t,"cause")?"{ ["+String(t)+"] "+H.call(Us.call("[cause]: "+v(t.cause),at),", ")+" }":at.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+H.call(at,", ")+" }"}if(typeof t=="object"&&u){if(Ms&&typeof t[Ms]=="function"&&_n)return _n(t,{depth:y-n});if(u!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(my(t)){var kt=[];return Ns&&Ns.call(t,function(Ne,Lt){kt.push(v(Lt,t,!0)+" => "+v(Ne,t))}),$s("Map",gr.call(t),kt,g)}if(xy(t)){var vi=[];return Fs&&Fs.call(t,function(Ne){vi.push(v(Ne,t))}),$s("Set",xr.call(t),vi,g)}if(hy(t))return kn("WeakMap");if(vy(t))return kn("WeakSet");if(gy(t))return kn("WeakRef");if(py(t))return At(v(Number(t)));if(cy(t))return At(v(Ln.call(t)));if(ly(t))return At(Xd.call(t));if(fy(t))return At(v(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof globalThis!="undefined"&&t===globalThis)return"{ [object globalThis] }";if(!sy(t)&&!_s(t)){var Mr=hr(t,v),wi=qs?qs(t)===Object.prototype:t instanceof Object||t.constructor===Object,_r=t instanceof Object?"":"null prototype",bi=!wi&&k&&Object(t)===t&&k in t?Vn.call(fe(t),8,-1):_r?"Object":"",vp=wi||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$r=vp+(bi||_r?"["+H.call(Us.call([],bi||[],_r||[]),": ")+"] ":"");return Mr.length===0?$r+"{}":g?$r+"{"+Dn(Mr,g)+"}":$r+"{ "+H.call(Mr,", ")+" }"}return String(t)};function Vs(r,t,e){var n=e.quoteStyle||t,i=js[n];return i+r+i}function ay(r){return ue.call(String(r),/"/g,"&quot;")}function $n(r){return fe(r)==="[object Array]"&&(!k||!(typeof r=="object"&&k in r))}function sy(r){return fe(r)==="[object Date]"&&(!k||!(typeof r=="object"&&k in r))}function _s(r){return fe(r)==="[object RegExp]"&&(!k||!(typeof r=="object"&&k in r))}function uy(r){return fe(r)==="[object Error]"&&(!k||!(typeof r=="object"&&k in r))}function fy(r){return fe(r)==="[object String]"&&(!k||!(typeof r=="object"&&k in r))}function py(r){return fe(r)==="[object Number]"&&(!k||!(typeof r=="object"&&k in r))}function ly(r){return fe(r)==="[object Boolean]"&&(!k||!(typeof r=="object"&&k in r))}function Gs(r){if(Ve)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Mn)return!1;try{return Mn.call(r),!0}catch(t){}return!1}function cy(r){if(!r||typeof r!="object"||!Ln)return!1;try{return Ln.call(r),!0}catch(t){}return!1}var dy=Object.prototype.hasOwnProperty||function(r){return r in this};function X(r,t){return dy.call(r,t)}function fe(r){return ey.call(r)}function yy(r){if(r.name)return r.name;var t=ry.call(ty.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}function zs(r,t){if(r.indexOf)return r.indexOf(t);for(var e=0,n=r.length;e<n;e++)if(r[e]===t)return e;return-1}function my(r){if(!gr||!r||typeof r!="object")return!1;try{gr.call(r);try{xr.call(r)}catch(t){return!0}return r instanceof Map}catch(t){}return!1}function hy(r){if(!St||!r||typeof r!="object")return!1;try{St.call(r,St);try{Et.call(r,Et)}catch(t){return!0}return r instanceof WeakMap}catch(t){}return!1}function gy(r){if(!Os||!r||typeof r!="object")return!1;try{return Os.call(r),!0}catch(t){}return!1}function xy(r){if(!xr||!r||typeof r!="object")return!1;try{xr.call(r);try{gr.call(r)}catch(t){return!0}return r instanceof Set}catch(t){}return!1}function vy(r){if(!Et||!r||typeof r!="object")return!1;try{Et.call(r,Et);try{St.call(r,St)}catch(t){return!0}return r instanceof WeakSet}catch(t){}return!1}function wy(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Ys(r,t){if(r.length>t.maxStringLength){var e=r.length-t.maxStringLength,n="... "+e+" more character"+(e>1?"s":"");return Ys(Vn.call(r,0,t.maxStringLength),t)+n}var i=oy[t.quoteStyle||"single"];i.lastIndex=0;var o=ue.call(ue.call(r,i,"\\$1"),/[\x00-\x1f]/g,by);return Vs(o,"single",t)}function by(r){var t=r.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+ny.call(t.toString(16))}function At(r){return"Object("+r+")"}function kn(r){return r+" { ? }"}function $s(r,t,e,n){var i=n?Dn(e,n):H.call(e,", ");return r+" ("+t+") {"+i+"}"}function Ay(r){for(var t=0;t<r.length;t++)if(zs(r[t],`
11
- `)>=0)return!1;return!0}function Sy(r,t){var e;if(r.indent===" ")e=" ";else if(typeof r.indent=="number"&&r.indent>0)e=H.call(Array(r.indent+1)," ");else return null;return{base:e,prev:H.call(Array(t+1),e)}}function Dn(r,t){if(r.length===0)return"";var e=`
12
- `+t.prev+t.base;return e+H.call(r,","+e)+`
13
- `+t.prev}function hr(r,t){var e=$n(r),n=[];if(e){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=X(r,i)?t(r[i],r):""}var o=typeof qn=="function"?qn(r):[],u;if(Ve){u={};for(var p=0;p<o.length;p++)u["$"+o[p]]=o[p]}for(var c in r)X(r,c)&&(e&&String(Number(c))===c&&c<r.length||Ve&&u["$"+c]instanceof Symbol||(Ds.call(/[^\w$]/,c)?n.push(t(c,r)+": "+t(r[c],r)):n.push(c+": "+t(r[c],r))));if(typeof qn=="function")for(var h=0;h<o.length;h++)Ws.call(r,o[h])&&n.push("["+t(o[h])+"]: "+t(r[o[h]],r));return n}});var vr=x((Ww,Js)=>{"use strict";a();s();Js.exports=function(t){return typeof t=="string"||typeof t=="symbol"}});var Zs=x((Gw,Qs)=>{"use strict";a();s();var Ey=C(),Iy=It(),Ry=vr();Qs.exports=function(t,e){if(!Ry(e))throw new Ey("Assertion failed: IsPropertyKey(P) is not true, got "+Iy(e));return t[e]}});var tu=x((Hw,eu)=>{"use strict";a();s();var Xs=Function.prototype.toString,Ge=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,zn,wr;if(typeof Ge=="function"&&typeof Object.defineProperty=="function")try{zn=Object.defineProperty({},"length",{get:function(){throw wr}}),wr={},Ge(function(){throw 42},null,zn)}catch(r){r!==wr&&(Ge=null)}else Ge=null;var Ty=/^\s*class\b/,Yn=function(t){try{var e=Xs.call(t);return Ty.test(e)}catch(n){return!1}},Gn=function(t){try{return Yn(t)?!1:(Xs.call(t),!0)}catch(e){return!1}},br=Object.prototype.toString,Py="[object Object]",Ny="[object Function]",Fy="[object GeneratorFunction]",Oy="[object HTMLAllCollection]",Cy="[object HTML document.all class]",Uy="[object HTMLCollection]",By=typeof Symbol=="function"&&!!Symbol.toStringTag,qy=!(0 in[,]),Hn=function(){return!1};typeof document=="object"&&(Ks=document.all,br.call(Ks)===br.call(document.all)&&(Hn=function(t){if((qy||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var e=br.call(t);return(e===Oy||e===Cy||e===Uy||e===Py)&&t("")==null}catch(n){}return!1}));var Ks;eu.exports=Ge?function(t){if(Hn(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Ge(t,null,zn)}catch(e){if(e!==wr)return!1}return!Yn(t)&&Gn(t)}:function(t){if(Hn(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(By)return Gn(t);if(Yn(t))return!1;var e=br.call(t);return e!==Ny&&e!==Fy&&!/^\[object HTML/.test(e)?!1:Gn(t)}});var Jn=x((Zw,ru)=>{"use strict";a();s();ru.exports=tu()});var au=x((eb,ou)=>{"use strict";a();s();var nu=C(),ky=Zs(),Ly=Jn(),My=vr(),iu=It();ou.exports=function(t,e){if(!My(e))throw new nu("Assertion failed: IsPropertyKey(P) is not true");var n=ky(t,e);if(n!=null){if(!Ly(n))throw new nu(iu(e)+" is not a function: "+iu(n));return n}}});var uu=x((nb,su)=>{"use strict";a();s();var _y=an();su.exports=function(){return _y()&&!!Symbol.toStringTag}});var Xn=x((ab,cu)=>{"use strict";a();s();var Qn=$(),fu=uu()(),pu,lu,Zn,Kn;fu&&(pu=Qn("Object.prototype.hasOwnProperty"),lu=Qn("RegExp.prototype.exec"),Zn={},Ar=function(){throw Zn},Kn={toString:Ar,valueOf:Ar},typeof Symbol.toPrimitive=="symbol"&&(Kn[Symbol.toPrimitive]=Ar));var Ar,$y=Qn("Object.prototype.toString"),Dy=Object.getOwnPropertyDescriptor,Wy="[object RegExp]";cu.exports=fu?function(t){if(!t||typeof t!="object")return!1;var e=Dy(t,"lastIndex"),n=e&&pu(e,"value");if(!n)return!1;try{lu(t,Kn)}catch(i){return i===Zn}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:$y(t)===Wy}});var ei=x((fb,du)=>{"use strict";a();s();var jy=$(),Vy=Xn(),Gy=jy("RegExp.prototype.exec"),zy=C();du.exports=function(t){if(!Vy(t))throw new zy("`regex` must be a RegExp");return function(n){return Gy(t,n)!==null}}});var mu=x((cb,yu)=>{"use strict";a();s();yu.exports=function(t,e){for(var n=0;n<t.length;n+=1)if(!e(t[n],n,t))return!1;return!0}});var gu=x((mb,hu)=>{"use strict";a();s();hu.exports=function(t){if(t===null)return"Null";if(typeof t=="undefined")return"Undefined";if(typeof t=="function"||typeof t=="object")return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"}});var ti=x((xb,xu)=>{"use strict";a();s();var Yy=gu();xu.exports=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":Yy(t)}});var bu=x((bb,wu)=>{"use strict";a();s();var vu=C(),Hy=It(),Jy=vr(),Qy=ti();wu.exports=function(t,e){if(Qy(t)!=="Object")throw new vu("Assertion failed: Type(O) is not Object");if(!Jy(e))throw new vu("Assertion failed: IsPropertyKey(P) is not true, got "+Hy(e));return t[e]}});var Su=x((Eb,Au)=>{"use strict";a();s();var Zy=G();Au.exports=Zy("%Math.min%")});var ri=x((Tb,Eu)=>{"use strict";a();s();Eu.exports=Number.isNaN||function(t){return t!==t}});var Ru=x((Fb,Iu)=>{"use strict";a();s();var Ky=ri();Iu.exports=function(r){return(typeof r=="number"||typeof r=="bigint")&&!Ky(r)&&r!==1/0&&r!==-1/0}});var Sr=x((Ub,Pu)=>{"use strict";a();s();var Tu=G(),Xy=Tu("%Math.abs%"),em=Tu("%Math.floor%"),tm=ri(),rm=Ru();Pu.exports=function(t){if(typeof t!="number"||tm(t)||!rm(t))return!1;var e=Xy(t);return em(e)===e}});var ii=x((kb,Nu)=>{"use strict";a();s();var nm=$(),ni=C(),im=Sr(),om=nm("String.prototype.slice");Nu.exports=function(t,e,n){if(typeof t!="string")throw new ni("Assertion failed: `string` must be a String");if(typeof e!="string")throw new ni("Assertion failed: `searchValue` must be a String");if(!im(n)||n<0)throw new ni("Assertion failed: `fromIndex` must be a non-negative integer");var i=t.length;if(e===""&&n<=i)return n;for(var o=e.length,u=n;u<=i-o;u+=1){var p=om(t,u,u+o);if(p===e)return u}return-1}});var Er=x((_b,Fu)=>{"use strict";a();s();var am=C();Fu.exports=function(t){if(t==null)throw new am(arguments.length>0&&arguments[1]||"Cannot call method on "+t);return t}});var Ir=x((Wb,Ou)=>{"use strict";a();s();var sm=G(),um=sm("%String%"),fm=C();Ou.exports=function(t){if(typeof t=="symbol")throw new fm("Cannot convert a Symbol value to a string");return um(t)}});var oi=x((Gb,Bu)=>{"use strict";a();s();var pm=Er(),lm=Ir(),cm=$(),Cu=cm("String.prototype.replace"),Uu=/^\s$/.test("\u180E"),dm=Uu?/^[\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]+/,ym=Uu?/[\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]+$/;Bu.exports=function(){var t=lm(pm(this));return Cu(Cu(t,dm,""),ym,"")}});var ai=x((Hb,ku)=>{"use strict";a();s();var mm=oi(),qu="\u200B",ze="\u180E";ku.exports=function(){return String.prototype.trim&&qu.trim()===qu&&ze.trim()===ze&&("_"+ze).trim()==="_"+ze&&(ze+"_").trim()===ze+"_"?String.prototype.trim:mm}});var Mu=x((Zb,Lu)=>{"use strict";a();s();var hm=mt(),gm=ai();Lu.exports=function(){var t=gm();return hm(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}});var Wu=x((eA,Du)=>{"use strict";a();s();var xm=ar(),vm=mt(),wm=Er(),bm=oi(),_u=ai(),Am=Mu(),Sm=xm(_u()),$u=function(t){return wm(t),Sm(t)};vm($u,{getPolyfill:_u,implementation:bm,shim:Am});Du.exports=$u});var zu=x((nA,Gu)=>{"use strict";a();s();var ui=G(),si=ui("%Number%"),Em=ui("%RegExp%"),Im=C(),ju=ui("%parseInt%"),Rm=$(),Rr=ei(),Vu=Rm("String.prototype.slice"),Tm=Rr(/^0b[01]+$/i),Pm=Rr(/^0o[0-7]+$/i),Nm=Rr(/^[-+]0x[0-9a-f]+$/i),Fm=["\x85","\u200B","\uFFFE"].join(""),Om=new Em("["+Fm+"]","g"),Cm=Rr(Om),Um=Wu();Gu.exports=function r(t){if(typeof t!="string")throw new Im("Assertion failed: `argument` is not a String");if(Tm(t))return si(ju(Vu(t,2),2));if(Pm(t))return si(ju(Vu(t,2),8));if(Cm(t)||Nm(t))return NaN;var e=Um(t);return e!==t?r(e):si(t)}});var Ju=x((aA,Hu)=>{"use strict";a();s();var Bm=C(),Yu=Sr(),qm=$(),km=qm("String.prototype.slice");Hu.exports=function(t,e,n){if(typeof t!="string"||!Yu(e)||arguments.length>2&&!Yu(n))throw new Bm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return km(t,e,arguments.length>2?n:t.length)}});var Zu=x((fA,Qu)=>{"use strict";a();s();Qu.exports=function(t){return typeof t=="string"||typeof t=="undefined"}});var Xu=x((cA,Ku)=>{"use strict";a();s();var Lm=$()("String.prototype.slice");Ku.exports=function(t,e){return t===e?!0:t.length>e.length?!1:Lm(e,0,t.length)===t}});var of=x((mA,nf)=>{"use strict";a();s();var ee=C(),rf=ei(),Mm=mu(),fi=It(),_m=bu(),$m=bn(),Dm=Su(),Wm=ii(),ef=zu(),te=Ju(),jm=Ir(),tf=ti(),Vm=Sr(),Gm=Zu(),Rt=Xu(),zm=rf(/^\$[0-9]/),Ym=rf(/^\$[0-9][0-9]/);nf.exports=function(t,e,n,i,o,u){if(typeof t!="string")throw new ee("Assertion failed: `matched` must be a String");if(typeof e!="string")throw new ee("Assertion failed: `str` must be a String");if(!Vm(n)||n<0)throw new ee("Assertion failed: `position` must be a nonnegative integer, got "+fi(n));if(!$m(i)||!Mm(i,Gm))throw new ee("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+fi(i));if(typeof o!="undefined"&&tf(o)!=="Object")throw new ee("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new ee("Assertion failed: `replacementTemplate` must be a String");var p=e.length;if(n>p)throw new ee("Assertion failed: position > stringLength, got "+fi(n));for(var c=u,h="";c!=="";){var y,g,v;if(Rt("$$",c))y="$$",g="$";else if(Rt("$`",c))y="$`",g=te(e,0,n);else if(Rt("$&",c))y="$&",g=t;else if(Rt("$'",c)){y="$'";var b=t.length,w=n+b;g=te(e,Dm(w,p))}else if(zm(c)){var A=Ym(c)?2:1,N=te(c,1,1+A),P=ef(N);if(P<0||P>99)throw new ee("Assertion failed: `index` must be >= 0 and <= 99");var F=i.length;P>F&&A===2&&(A=1,N=te(N,0,1),P=ef(N)),y=te(c,0,1+A),1<=P&&P<=F?(v=i[P-1],typeof v=="undefined"?g="":g=v):g=y}else if(Rt("$<",c)){var O=Wm(c,">",0);if(O===-1||typeof o=="undefined")y="$<",g=y;else{y=te(c,0,O+1);var at=te(c,2,O);if(tf(o)!=="Object")throw new ee("Assertion failed: Type(namedCaptures) is not Object");v=_m(o,at),typeof v=="undefined"?g="":g=jm(v)}}else y=te(c,0,1),g=y;var kt=y.length;c=te(c,kt),h+=g}return h}});var li=x((xA,ff)=>{"use strict";a();s();var af=fs(),Hm=au(),Jm=of(),Qm=Jn(),Zm=Er(),Tr=Ir(),sf=ii(),Km=G(),Pr=$(),Xm=Xr()(),eh=Xn(),th=Km("%Math.max%"),uf=C(),rh=Pr("Array.prototype.push"),pi=Pr("String.prototype.slice"),nh=Pr("String.prototype.indexOf"),ih=Pr("String.prototype.replace");ff.exports=function(t,e){var n=Zm(this),i=eh(t);if(i&&nh(pi(t,t.source.length+2),"g")===-1)throw new uf("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Xm&&Symbol.replace){if(t!=null){var o=Hm(t,Symbol.replace);if(typeof o!="undefined")return af(o,t,[n,e])}}else if(i)return ih(n,t,e);var u=Tr(n),p=Tr(t),c=Qm(e);c||(e=Tr(e));for(var h=p.length,y=th(1,h),g=[],v=sf(u,p,0);v!==-1;)rh(g,v),v=sf(u,p,v+y);for(var b=0,w="",A=0;A<g.length;A+=1){var N;if(c)N=Tr(af(e,void 0,[p,g[A],u]));else{if(typeof e!="string")throw new uf("Assertion failed: `replaceValue` should be a string at this point");var P=[];N=Jm(p,u,g[A],P,void 0,e)}var F=pi(u,b,g[A]);w+=F+N,b=g[A]+h}return b<u.length&&(w+=pi(u,b)),w}});var ci=x((bA,pf)=>{"use strict";a();s();var oh=li();pf.exports=function(){return String.prototype.replaceAll||oh}});var cf=x((EA,lf)=>{"use strict";a();s();var ah=mt(),sh=ci();lf.exports=function(){var t=sh();return ah(String.prototype,{replaceAll:t},{replaceAll:function(){return String.prototype.replaceAll!==t}}),t}});var hf=x((TA,mf)=>{"use strict";a();s();var uh=ar(),fh=mt(),df=li(),ph=ci(),lh=cf(),yf=uh(df);fh(yf,{getPolyfill:ph,implementation:df,shim:lh});mf.exports=yf});var Ex={};jr(Ex,{DynamicSnippetsGenerator:()=>Lr});module.exports=Ti(Ex);a();s();var RN=Tp(hf(),1);a();s();a();s();a();s();function T(r){throw new Error("Unexpected value: "+JSON.stringify(r))}a();s();function Tt(r){return Object.keys(r)}a();s();a();s();a();s();a();s();a();s();a();s();var ch=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,gf=ch;var dh=typeof self=="object"&&self&&self.Object===Object&&self,yh=gf||dh||Function("return this")(),xf=yh;var mh=xf.Symbol,re=mh;a();s();var vf=Object.prototype,hh=vf.hasOwnProperty,gh=vf.toString,Pt=re?re.toStringTag:void 0;function xh(r){var t=hh.call(r,Pt),e=r[Pt];try{r[Pt]=void 0;var n=!0}catch(o){}var i=gh.call(r);return n&&(t?r[Pt]=e:delete r[Pt]),i}var wf=xh;a();s();var vh=Object.prototype,wh=vh.toString;function bh(r){return wh.call(r)}var bf=bh;var Ah="[object Null]",Sh="[object Undefined]",Af=re?re.toStringTag:void 0;function Eh(r){return r==null?r===void 0?Sh:Ah:Af&&Af in Object(r)?wf(r):bf(r)}var Sf=Eh;a();s();function Ih(r){return r!=null&&typeof r=="object"}var Ef=Ih;var Rh="[object Symbol]";function Th(r){return typeof r=="symbol"||Ef(r)&&Sf(r)==Rh}var If=Th;a();s();a();s();function Ph(r,t){for(var e=-1,n=r==null?0:r.length,i=Array(n);++e<n;)i[e]=t(r[e],e,r);return i}var Rf=Ph;a();s();var Nh=Array.isArray,Tf=Nh;var Fh=1/0,Pf=re?re.prototype:void 0,Nf=Pf?Pf.toString:void 0;function Ff(r){if(typeof r=="string")return r;if(Tf(r))return Rf(r,Ff)+"";if(If(r))return Nf?Nf.call(r):"";var t=r+"";return t=="0"&&1/r==-Fh?"-0":t}var Of=Ff;a();s();function Oh(r){return r==null?"":Of(r)}var pe=Oh;a();s();a();s();a();s();a();s();a();s();a();s();function Ch(r,t,e){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=r[n+t];return o}var Cf=Ch;function Uh(r,t,e){var n=r.length;return e=e===void 0?n:e,!t&&e>=n?r:Cf(r,t,e)}var Uf=Uh;a();s();var Bh="\\ud800-\\udfff",qh="\\u0300-\\u036f",kh="\\ufe20-\\ufe2f",Lh="\\u20d0-\\u20ff",Mh=qh+kh+Lh,_h="\\ufe0e\\ufe0f",$h="\\u200d",Dh=RegExp("["+$h+Bh+Mh+_h+"]");function Wh(r){return Dh.test(r)}var Nr=Wh;a();s();a();s();function jh(r){return r.split("")}var Bf=jh;a();s();var qf="\\ud800-\\udfff",Vh="\\u0300-\\u036f",Gh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Yh=Vh+Gh+zh,Hh="\\ufe0e\\ufe0f",Jh="["+qf+"]",di="["+Yh+"]",yi="\\ud83c[\\udffb-\\udfff]",Qh="(?:"+di+"|"+yi+")",kf="[^"+qf+"]",Lf="(?:\\ud83c[\\udde6-\\uddff]){2}",Mf="[\\ud800-\\udbff][\\udc00-\\udfff]",Zh="\\u200d",_f=Qh+"?",$f="["+Hh+"]?",Kh="(?:"+Zh+"(?:"+[kf,Lf,Mf].join("|")+")"+$f+_f+")*",Xh=$f+_f+Kh,eg="(?:"+[kf+di+"?",di,Lf,Mf,Jh].join("|")+")",tg=RegExp(yi+"(?="+yi+")|"+eg+Xh,"g");function rg(r){return r.match(tg)||[]}var Df=rg;function ng(r){return Nr(r)?Df(r):Bf(r)}var Wf=ng;function ig(r){return function(t){t=pe(t);var e=Nr(t)?Wf(t):void 0,n=e?e[0]:t.charAt(0),i=e?Uf(e,1).join(""):t.slice(1);return n[r]()+i}}var jf=ig;var og=jf("toUpperCase"),Vf=og;function ag(r){return Vf(pe(r).toLowerCase())}var Gf=ag;a();s();a();s();function sg(r,t,e,n){var i=-1,o=r==null?0:r.length;for(n&&o&&(e=r[++i]);++i<o;)e=t(e,r[i],i,r);return e}var zf=sg;a();s();a();s();a();s();function ug(r){return function(t){return r==null?void 0:r[t]}}var Yf=ug;var fg={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},pg=Yf(fg),Hf=pg;var lg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cg="\\u0300-\\u036f",dg="\\ufe20-\\ufe2f",yg="\\u20d0-\\u20ff",mg=cg+dg+yg,hg="["+mg+"]",gg=RegExp(hg,"g");function xg(r){return r=pe(r),r&&r.replace(lg,Hf).replace(gg,"")}var Jf=xg;a();s();a();s();var vg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wg(r){return r.match(vg)||[]}var Qf=wg;a();s();var bg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ag(r){return bg.test(r)}var Zf=Ag;a();s();var rp="\\ud800-\\udfff",Sg="\\u0300-\\u036f",Eg="\\ufe20-\\ufe2f",Ig="\\u20d0-\\u20ff",Rg=Sg+Eg+Ig,np="\\u2700-\\u27bf",ip="a-z\\xdf-\\xf6\\xf8-\\xff",Tg="\\xac\\xb1\\xd7\\xf7",Pg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ng="\\u2000-\\u206f",Fg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",op="A-Z\\xc0-\\xd6\\xd8-\\xde",Og="\\ufe0e\\ufe0f",ap=Tg+Pg+Ng+Fg,sp="['\u2019]",Kf="["+ap+"]",Cg="["+Rg+"]",up="\\d+",Ug="["+np+"]",fp="["+ip+"]",pp="[^"+rp+ap+up+np+ip+op+"]",Bg="\\ud83c[\\udffb-\\udfff]",qg="(?:"+Cg+"|"+Bg+")",kg="[^"+rp+"]",lp="(?:\\ud83c[\\udde6-\\uddff]){2}",cp="[\\ud800-\\udbff][\\udc00-\\udfff]",Ye="["+op+"]",Lg="\\u200d",Xf="(?:"+fp+"|"+pp+")",Mg="(?:"+Ye+"|"+pp+")",ep="(?:"+sp+"(?:d|ll|m|re|s|t|ve))?",tp="(?:"+sp+"(?:D|LL|M|RE|S|T|VE))?",dp=qg+"?",yp="["+Og+"]?",_g="(?:"+Lg+"(?:"+[kg,lp,cp].join("|")+")"+yp+dp+")*",$g="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wg=yp+dp+_g,jg="(?:"+[Ug,lp,cp].join("|")+")"+Wg,Vg=RegExp([Ye+"?"+fp+"+"+ep+"(?="+[Kf,Ye,"$"].join("|")+")",Mg+"+"+tp+"(?="+[Kf,Ye+Xf,"$"].join("|")+")",Ye+"?"+Xf+"+"+ep,Ye+"+"+tp,Dg,$g,up,jg].join("|"),"g");function Gg(r){return r.match(Vg)||[]}var mp=Gg;function zg(r,t,e){return r=pe(r),t=e?void 0:t,t===void 0?Zf(r)?mp(r):Qf(r):r.match(t)||[]}var hp=zg;var Yg="['\u2019]",Hg=RegExp(Yg,"g");function Jg(r){return function(t){return zf(hp(Jf(t).replace(Hg,"")),r,"")}}var Fr=Jg;var Qg=Fr(function(r,t,e){return t=t.toLowerCase(),r+(e?Gf(t):t)}),mi=Qg;a();s();var Zg=Fr(function(r,t,e){return r+(e?"_":"")+t.toLowerCase()}),hi=Zg;a();s();a();s();var Pe=class{};a();s();a();s();var D=class extends Pe{constructor(e){super();d(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var Kg=4,Nt=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsSemicolon",!1);d(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
14
- `),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
10
+ `)+" "+e[1]:e[0]+t+" "+r.join(", ")+" "+e[1]}function cn(r){return Array.isArray(r)}function ar(r){return typeof r=="boolean"}function pt(r){return r===null}function ka(r){return r==null}function dn(r){return typeof r=="number"}function ct(r){return typeof r=="string"}function Ma(r){return typeof r=="symbol"}function V(r){return r===void 0}function ut(r){return we(r)&&mn(r)==="[object RegExp]"}function we(r){return typeof r=="object"&&r!==null}function ir(r){return we(r)&&mn(r)==="[object Date]"}function ft(r){return we(r)&&(mn(r)==="[object Error]"||r instanceof Error)}function lt(r){return typeof r=="function"}function $a(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r=="undefined"}function Da(r){return f.isBuffer(r)}function mn(r){return Object.prototype.toString.call(r)}function fn(r){return r<10?"0"+r.toString(10):r.toString(10)}function rd(){var r=new Date,t=[fn(r.getHours()),fn(r.getMinutes()),fn(r.getSeconds())].join(":");return[r.getDate(),td[r.getMonth()],t].join(" ")}function _a(){console.log("%s - %s",rd(),or.apply(null,arguments))}function hn(r,t){if(!t||!we(t))return r;for(var e=Object.keys(t),n=e.length;n--;)r[e[n]]=t[e[n]];return r}function Wa(r,t){return Object.prototype.hasOwnProperty.call(r,t)}var Hc,rr,sn,td,nd,ja=Re(()=>{"use strict";s();u();qa();La();Hc=/%[sdj%]/g;rr={};j.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]};j.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};td=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];nd={inherits:an,_extend:hn,log:_a,isBuffer:Da,isPrimitive:$a,isFunction:lt,isError:ft,isDate:ir,isObject:we,isRegExp:ut,isUndefined:V,isSymbol:Ma,isString:ct,isNumber:dn,isNullOrUndefined:ka,isNull:pt,isBoolean:ar,isArray:cn,inspect:j,deprecate:pn,format:or,debuglog:Ua}});var Ga=x((Ov,sr)=>{"use strict";s();u();var be=(ja(),ui(Va));if(be&&be.default){sr.exports=be.default;for(let r in be)sr.exports[r]=be[r]}else be&&(sr.exports=be)});var Ya=x((qv,za)=>{"use strict";s();u();za.exports=Ga().inspect});var gt=x((kv,ds)=>{"use strict";s();u();var Rn=typeof Map=="function"&&Map.prototype,yn=Object.getOwnPropertyDescriptor&&Rn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,fr=Rn&&yn&&typeof yn.get=="function"?yn.get:null,Ha=Rn&&Map.prototype.forEach,En=typeof Set=="function"&&Set.prototype,gn=Object.getOwnPropertyDescriptor&&En?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,lr=En&&gn&&typeof gn.get=="function"?gn.get:null,Ja=En&&Set.prototype.forEach,id=typeof WeakMap=="function"&&WeakMap.prototype,mt=id?WeakMap.prototype.has:null,od=typeof WeakSet=="function"&&WeakSet.prototype,ht=od?WeakSet.prototype.has:null,ad=typeof WeakRef=="function"&&WeakRef.prototype,Qa=ad?WeakRef.prototype.deref:null,sd=Boolean.prototype.valueOf,ud=Object.prototype.toString,fd=Function.prototype.toString,ld=String.prototype.match,In=String.prototype.slice,oe=String.prototype.replace,pd=String.prototype.toUpperCase,Za=String.prototype.toLowerCase,as=RegExp.prototype.test,Ka=Array.prototype.concat,G=Array.prototype.join,cd=Array.prototype.slice,Xa=Math.floor,wn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xn=Object.getOwnPropertySymbols,bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ke=typeof Symbol=="function"&&typeof Symbol.iterator=="object",yt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ke||!0)?Symbol.toStringTag:null,ss=Object.prototype.propertyIsEnumerable,es=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ts(r,t){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||as.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Xa(-r):Xa(r);if(n!==r){var i=String(n),o=In.call(t,i.length+1);return oe.call(i,e,"$&_")+"."+oe.call(oe.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return oe.call(t,e,"$&_")}var An=Ya(),rs=An.custom,ns=ls(rs)?rs:null,us={__proto__:null,double:'"',single:"'"},dd={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ds.exports=function r(t,e,n,i){var o=e||{};if(Q(o,"quoteStyle")&&!Q(us,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(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=Q(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(Q(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(Q(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return cs(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var p=String(t);return l?ts(t,p):p}if(typeof t=="bigint"){var h=String(t)+"n";return l?ts(t,h):h}var m=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=m&&m>0&&typeof t=="object")return Sn(t)?"[Array]":"[Object]";var g=Od(o,n);if(typeof i=="undefined")i=[];else if(ps(i,t)>=0)return"[Circular]";function v(Te,Nt,Gf){if(Nt&&(i=cd.call(i),i.push(Nt)),Gf){var ni={depth:o.depth};return Q(o,"quoteStyle")&&(ni.quoteStyle=o.quoteStyle),r(Te,ni,n+1,i)}return r(Te,o,n+1,i)}if(typeof t=="function"&&!is(t)){var b=Ad(t),w=ur(t,v);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(w.length>0?" { "+G.call(w,", ")+" }":"")}if(ls(t)){var A=ke?oe.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):bn.call(t);return typeof t=="object"&&!ke?dt(A):A}if(Pd(t)){for(var P="<"+Za.call(String(t.nodeName)),I=t.attributes||[],N=0;N<I.length;N++)P+=" "+I[N].name+"="+fs(md(I[N].value),"double",o);return P+=">",t.childNodes&&t.childNodes.length&&(P+="..."),P+="</"+Za.call(String(t.nodeName))+">",P}if(Sn(t)){if(t.length===0)return"[]";var F=ur(t,v);return g&&!Fd(F)?"["+Tn(F,g)+"]":"[ "+G.call(F,", ")+" ]"}if(yd(t)){var Xe=ur(t,v);return!("cause"in Error.prototype)&&"cause"in t&&!ss.call(t,"cause")?"{ ["+String(t)+"] "+G.call(Ka.call("[cause]: "+v(t.cause),Xe),", ")+" }":Xe.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+G.call(Xe,", ")+" }"}if(typeof t=="object"&&a){if(ns&&typeof t[ns]=="function"&&An)return An(t,{depth:m-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Sd(t)){var Pt=[];return Ha&&Ha.call(t,function(Te,Nt){Pt.push(v(Nt,t,!0)+" => "+v(Te,t))}),os("Map",fr.call(t),Pt,g)}if(Ed(t)){var ei=[];return Ja&&Ja.call(t,function(Te){ei.push(v(Te,t))}),os("Set",lr.call(t),ei,g)}if(Td(t))return vn("WeakMap");if(Id(t))return vn("WeakSet");if(Rd(t))return vn("WeakRef");if(xd(t))return dt(v(Number(t)));if(wd(t))return dt(v(wn.call(t)));if(vd(t))return dt(sd.call(t));if(gd(t))return dt(v(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof globalThis!="undefined"&&t===globalThis)return"{ [object globalThis] }";if(!hd(t)&&!is(t)){var Nr=ur(t,v),ti=es?es(t)===Object.prototype:t instanceof Object||t.constructor===Object,Fr=t instanceof Object?"":"null prototype",ri=!ti&&yt&&Object(t)===t&&yt in t?In.call(ae(t),8,-1):Fr?"Object":"",jf=ti||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Or=jf+(ri||Fr?"["+G.call(Ka.call([],ri||[],Fr||[]),": ")+"] ":"");return Nr.length===0?Or+"{}":g?Or+"{"+Tn(Nr,g)+"}":Or+"{ "+G.call(Nr,", ")+" }"}return String(t)};function fs(r,t,e){var n=e.quoteStyle||t,i=us[n];return i+r+i}function md(r){return oe.call(String(r),/"/g,"&quot;")}function Ae(r){return!yt||!(typeof r=="object"&&(yt in r||typeof r[yt]!="undefined"))}function Sn(r){return ae(r)==="[object Array]"&&Ae(r)}function hd(r){return ae(r)==="[object Date]"&&Ae(r)}function is(r){return ae(r)==="[object RegExp]"&&Ae(r)}function yd(r){return ae(r)==="[object Error]"&&Ae(r)}function gd(r){return ae(r)==="[object String]"&&Ae(r)}function xd(r){return ae(r)==="[object Number]"&&Ae(r)}function vd(r){return ae(r)==="[object Boolean]"&&Ae(r)}function ls(r){if(ke)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!bn)return!1;try{return bn.call(r),!0}catch(t){}return!1}function wd(r){if(!r||typeof r!="object"||!wn)return!1;try{return wn.call(r),!0}catch(t){}return!1}var bd=Object.prototype.hasOwnProperty||function(r){return r in this};function Q(r,t){return bd.call(r,t)}function ae(r){return ud.call(r)}function Ad(r){if(r.name)return r.name;var t=ld.call(fd.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}function ps(r,t){if(r.indexOf)return r.indexOf(t);for(var e=0,n=r.length;e<n;e++)if(r[e]===t)return e;return-1}function Sd(r){if(!fr||!r||typeof r!="object")return!1;try{fr.call(r);try{lr.call(r)}catch(t){return!0}return r instanceof Map}catch(t){}return!1}function Td(r){if(!mt||!r||typeof r!="object")return!1;try{mt.call(r,mt);try{ht.call(r,ht)}catch(t){return!0}return r instanceof WeakMap}catch(t){}return!1}function Rd(r){if(!Qa||!r||typeof r!="object")return!1;try{return Qa.call(r),!0}catch(t){}return!1}function Ed(r){if(!lr||!r||typeof r!="object")return!1;try{lr.call(r);try{fr.call(r)}catch(t){return!0}return r instanceof Set}catch(t){}return!1}function Id(r){if(!ht||!r||typeof r!="object")return!1;try{ht.call(r,ht);try{mt.call(r,mt)}catch(t){return!0}return r instanceof WeakSet}catch(t){}return!1}function Pd(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function cs(r,t){if(r.length>t.maxStringLength){var e=r.length-t.maxStringLength,n="... "+e+" more character"+(e>1?"s":"");return cs(In.call(r,0,t.maxStringLength),t)+n}var i=dd[t.quoteStyle||"single"];i.lastIndex=0;var o=oe.call(oe.call(r,i,"\\$1"),/[\x00-\x1f]/g,Nd);return fs(o,"single",t)}function Nd(r){var t=r.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+pd.call(t.toString(16))}function dt(r){return"Object("+r+")"}function vn(r){return r+" { ? }"}function os(r,t,e,n){var i=n?Tn(e,n):G.call(e,", ");return r+" ("+t+") {"+i+"}"}function Fd(r){for(var t=0;t<r.length;t++)if(ps(r[t],`
11
+ `)>=0)return!1;return!0}function Od(r,t){var e;if(r.indent===" ")e=" ";else if(typeof r.indent=="number"&&r.indent>0)e=G.call(Array(r.indent+1)," ");else return null;return{base:e,prev:G.call(Array(t+1),e)}}function Tn(r,t){if(r.length===0)return"";var e=`
12
+ `+t.prev+t.base;return e+G.call(r,","+e)+`
13
+ `+t.prev}function ur(r,t){var e=Sn(r),n=[];if(e){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=Q(r,i)?t(r[i],r):""}var o=typeof xn=="function"?xn(r):[],a;if(ke){a={};for(var l=0;l<o.length;l++)a["$"+o[l]]=o[l]}for(var p in r)Q(r,p)&&(e&&String(Number(p))===p&&p<r.length||ke&&a["$"+p]instanceof Symbol||(as.call(/[^\w$]/,p)?n.push(t(p,r)+": "+t(r[p],r)):n.push(p+": "+t(r[p],r))));if(typeof xn=="function")for(var h=0;h<o.length;h++)ss.call(r,o[h])&&n.push("["+t(o[h])+"]: "+t(r[o[h]],r));return n}});var pr=x((Dv,ms)=>{"use strict";s();u();ms.exports=function(t){return typeof t=="string"||typeof t=="symbol"}});var ys=x((Vv,hs)=>{"use strict";s();u();var Cd=C(),Bd=gt(),qd=pr();hs.exports=function(t,e){if(!qd(e))throw new Cd("Assertion failed: P is not a Property Key, got "+Bd(e));return t[e]}});var ws=x((zv,vs)=>{"use strict";s();u();var xs=Function.prototype.toString,Me=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Nn,cr;if(typeof Me=="function"&&typeof Object.defineProperty=="function")try{Nn=Object.defineProperty({},"length",{get:function(){throw cr}}),cr={},Me(function(){throw 42},null,Nn)}catch(r){r!==cr&&(Me=null)}else Me=null;var Ld=/^\s*class\b/,Fn=function(t){try{var e=xs.call(t);return Ld.test(e)}catch(n){return!1}},Pn=function(t){try{return Fn(t)?!1:(xs.call(t),!0)}catch(e){return!1}},dr=Object.prototype.toString,Ud="[object Object]",kd="[object Function]",Md="[object GeneratorFunction]",$d="[object HTMLAllCollection]",Dd="[object HTML document.all class]",_d="[object HTMLCollection]",Wd=typeof Symbol=="function"&&!!Symbol.toStringTag,Vd=!(0 in[,]),On=function(){return!1};typeof document=="object"&&(gs=document.all,dr.call(gs)===dr.call(document.all)&&(On=function(t){if((Vd||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var e=dr.call(t);return(e===$d||e===Dd||e===_d||e===Ud)&&t("")==null}catch(n){}return!1}));var gs;vs.exports=Me?function(t){if(On(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Me(t,null,Nn)}catch(e){if(e!==cr)return!1}return!Fn(t)&&Pn(t)}:function(t){if(On(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(Wd)return Pn(t);if(Fn(t))return!1;var e=dr.call(t);return e!==kd&&e!==Md&&!/^\[object HTML/.test(e)?!1:Pn(t)}});var Cn=x((Jv,bs)=>{"use strict";s();u();bs.exports=ws()});var Rs=x((Kv,Ts)=>{"use strict";s();u();var As=C(),jd=ys(),Gd=Cn(),zd=pr(),Ss=gt();Ts.exports=function(t,e){if(!zd(e))throw new As("Assertion failed: P is not a Property Key");var n=jd(t,e);if(n!=null){if(!Gd(n))throw new As(Ss(e)+" is not a function: "+Ss(n));return n}}});var Is=x((tw,Es)=>{"use strict";s();u();var Yd=Dt();Es.exports=function(t){return(typeof t=="number"||typeof t=="bigint")&&!Yd(t)&&t!==1/0&&t!==-1/0}});var mr=x((iw,Ps)=>{"use strict";s();u();var Hd=_r(),Jd=Wr(),Qd=Dt(),Zd=Is();Ps.exports=function(t){if(typeof t!="number"||Qd(t)||!Zd(t))return!1;var e=Hd(t);return Jd(e)===e}});var Bn=x((sw,Ns)=>{"use strict";s();u();Ns.exports=function(t){return!!t&&(typeof t=="function"||typeof t=="object")}});var Os=x((lw,Fs)=>{"use strict";s();u();var Kd=jr();Fs.exports=function(){return Kd()&&!!Symbol.toStringTag}});var kn=x((dw,Us)=>{"use strict";s();u();var Cs=W(),Xd=Os()(),em=Qr(),tm=Pe(),Un;Xd?(Bs=Cs("RegExp.prototype.exec"),qn={},hr=function(){throw qn},Ln={toString:hr,valueOf:hr},typeof Symbol.toPrimitive=="symbol"&&(Ln[Symbol.toPrimitive]=hr),Un=function(t){if(!t||typeof t!="object")return!1;var e=tm(t,"lastIndex"),n=e&&em(e,"value");if(!n)return!1;try{Bs(t,Ln)}catch(i){return i===qn}}):(qs=Cs("Object.prototype.toString"),Ls="[object RegExp]",Un=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:qs(t)===Ls});var Bs,qn,hr,Ln,qs,Ls;Us.exports=Un});var Mn=x((yw,ks)=>{"use strict";s();u();var rm=W(),nm=kn(),im=rm("RegExp.prototype.exec"),om=C();ks.exports=function(t){if(!nm(t))throw new om("`regex` must be a RegExp");return function(n){return im(t,n)!==null}}});var Ds=x((vw,$s)=>{"use strict";s();u();var Ms=C(),am=gt(),sm=pr(),um=Bn();$s.exports=function(t,e){if(!um(t))throw new Ms("Assertion failed: Type(O) is not Object");if(!sm(e))throw new Ms("Assertion failed: P is not a Property Key, got "+am(e));return t[e]}});var Ws=x((Aw,_s)=>{"use strict";s();u();_s.exports=Vr()});var Dn=x((Rw,Vs)=>{"use strict";s();u();var fm=W(),$n=C(),lm=mr(),pm=fm("String.prototype.slice");Vs.exports=function(t,e,n){if(typeof t!="string")throw new $n("Assertion failed: `string` must be a String");if(typeof e!="string")throw new $n("Assertion failed: `searchValue` must be a String");if(!lm(n)||n<0)throw new $n("Assertion failed: `fromIndex` must be a non-negative integer");var i=t.length;if(e===""&&n<=i)return n;for(var o=e.length,a=n;a<=i-o;a+=1){var l=pm(t,a,a+o);if(l===e)return a}return"NOT-FOUND"}});var yr=x((Pw,js)=>{"use strict";s();u();var cm=C();js.exports=function(t){if(t==null)throw new cm(arguments.length>0&&arguments[1]||"Cannot call method on "+t);return t}});var zs=x((Ow,Gs)=>{"use strict";s();u();var dm=_(),mm=dm("%String%"),hm=C();Gs.exports=function(t){if(typeof t=="symbol")throw new hm("Cannot convert a Symbol value to a string");return mm(t)}});var _n=x((qw,Js)=>{"use strict";s();u();var ym=yr(),gm=zs(),xm=W(),Ys=xm("String.prototype.replace"),Hs=/^\s$/.test("\u180E"),vm=Hs?/^[\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]+/,wm=Hs?/[\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]+$/;Js.exports=function(){var t=gm(ym(this));return Ys(Ys(t,vm,""),wm,"")}});var Wn=x((kw,Zs)=>{"use strict";s();u();var bm=_n(),Qs="\u200B",$e="\u180E";Zs.exports=function(){return String.prototype.trim&&Qs.trim()===Qs&&$e.trim()===$e&&("_"+$e).trim()==="_"+$e&&($e+"_").trim()===$e+"_"?String.prototype.trim:bm}});var eu=x((Dw,Xs)=>{"use strict";s();u();var Am=Jt()(),Ks=Ht(),Sm=Wn();Xs.exports=function(){var t=Sm();return String.prototype.trim!==t&&(Am?Ks(String.prototype,"trim",t,!0):Ks(String.prototype,"trim",t)),t}});var iu=x((Vw,nu)=>{"use strict";s();u();var Tm=Zt(),Rm=er(),Em=yr(),Im=_n(),tu=Wn(),Pm=eu(),Nm=Tm(tu()),ru=function(t){return Em(t),Nm(t)};Rm(ru,{getPolyfill:tu,implementation:Im,shim:Pm});nu.exports=ru});var fu=x((zw,uu)=>{"use strict";s();u();var su=_(),Fm=su("%RegExp%"),Om=C(),ou=su("%parseInt%"),Cm=W(),gr=Mn(),au=Cm("String.prototype.slice"),Bm=gr(/^0b[01]+$/i),qm=gr(/^0o[0-7]+$/i),Lm=gr(/^[-+]0x[0-9a-f]+$/i),Um=["\x85","\u200B","\uFFFE"].join(""),km=new Fm("["+Um+"]","g"),Mm=gr(km),$m=iu();uu.exports=function r(t){if(typeof t!="string")throw new Om("Assertion failed: `argument` is not a String");if(Bm(t))return+ou(au(t,2),2);if(qm(t))return+ou(au(t,2),8);if(Mm(t)||Lm(t))return NaN;var e=$m(t);return e!==t?r(e):+t}});var cu=x((Jw,pu)=>{"use strict";s();u();var Dm=C(),lu=mr(),_m=W(),Wm=_m("String.prototype.slice");pu.exports=function(t,e,n){if(typeof t!="string"||!lu(e)||arguments.length>2&&!lu(n))throw new Dm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Wm(t,e,arguments.length>2?n:t.length)}});var Vn=x((Kw,du)=>{"use strict";s();u();var Vm=_(),jm=Vm("%String%"),Gm=C();du.exports=function(t){if(typeof t=="symbol")throw new Gm("Cannot convert a Symbol value to a string");return jm(t)}});var hu=x((tb,mu)=>{"use strict";s();u();mu.exports=function(t,e){for(var n=0;n<t.length;n+=1)if(!e(t[n],n,t))return!1;return!0}});var gu=x((ib,yu)=>{"use strict";s();u();var zm=W()("String.prototype.slice");yu.exports=function(t,e){return t===e?!0:t.length>e.length?!1:zm(e,0,t.length)===t}});var vu=x((sb,xu)=>{"use strict";s();u();xu.exports=function(t){return typeof t=="string"||typeof t=="undefined"}});var Tu=x((lb,Su)=>{"use strict";s();u();var Z=C(),jn=gt(),Ym=mr(),wu=Bn(),Au=Mn(),Hm=Ds(),Jm=nn(),Qm=Ws(),Zm=Dn(),bu=fu(),K=cu(),Km=Vn(),Xm=hu(),xt=gu(),eh=vu(),th=Au(/^\$[0-9]/),rh=Au(/^\$[0-9][0-9]/);Su.exports=function(t,e,n,i,o,a){if(typeof t!="string")throw new Z("Assertion failed: `matched` must be a String");if(typeof e!="string")throw new Z("Assertion failed: `str` must be a String");if(!Ym(n)||n<0)throw new Z("Assertion failed: `position` must be a nonnegative integer, got "+jn(n));if(!Jm(i)||!Xm(i,eh))throw new Z("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+jn(i));if(typeof o!="undefined"&&!wu(o))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 l=e.length;if(n>l)throw new Z("Assertion failed: position > stringLength, got "+jn(n));for(var p=a,h="";p!=="";){var m,g,v;if(xt("$$",p))m="$$",g="$";else if(xt("$`",p))m="$`",g=K(e,0,n);else if(xt("$&",p))m="$&",g=t;else if(xt("$'",p)){m="$'";var b=t.length,w=n+b;g=K(e,Qm(w,l))}else if(th(p)){var A=rh(p)?2:1,P=K(p,1,1+A),I=bu(P);if(I<0||I>99)throw new Z("Assertion failed: `index` must be >= 0 and <= 99");var N=i.length;I>N&&A===2&&(A=1,P=K(P,0,1),I=bu(P)),m=K(p,0,1+A),1<=I&&I<=N?(v=i[I-1],typeof v=="undefined"?g="":g=v):g=m}else if(xt("$<",p)){var F=Zm(p,">",0);if(!(F>-1)||typeof o=="undefined")m="$<",g=m;else{m=K(p,0,F+1);var Xe=K(p,2,F);if(!wu(o))throw new Z("Assertion failed: Type(namedCaptures) is not Object");v=Hm(o,Xe),typeof v=="undefined"?g="":g=Km(v)}}else m=K(p,0,1),g=m;var Pt=m.length;p=K(p,Pt),h+=g}return h}});var Pu=x((db,Iu)=>{"use strict";s();u();var Ru=_(),Eu=Zt(),nh=Eu(Ru("String.prototype.indexOf"));Iu.exports=function(t,e){var n=Ru(t,!!e);return typeof n=="function"&&nh(t,".prototype.")>-1?Eu(n):n}});var zn=x((yb,Cu)=>{"use strict";s();u();var Nu=Pa(),ih=Rs(),oh=Tu(),ah=Cn(),sh=yr(),xr=Vn(),Fu=Dn(),uh=_(),vr=Pu(),fh=Gr()(),lh=kn(),ph=uh("%Math.max%"),Ou=C(),ch=vr("Array.prototype.push"),Gn=vr("String.prototype.slice"),dh=vr("String.prototype.indexOf"),mh=vr("String.prototype.replace");Cu.exports=function(t,e){var n=sh(this),i=lh(t);if(i&&dh(Gn(t,t.source.length+2),"g")===-1)throw new Ou("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(fh&&Symbol.replace){if(t!=null){var o=ih(t,Symbol.replace);if(typeof o!="undefined")return Nu(o,t,[n,e])}}else if(i)return mh(n,t,e);var a=xr(n),l=xr(t),p=ah(e);p||(e=xr(e));for(var h=l.length,m=ph(1,h),g=[],v=Fu(a,l,0);v!=="NOT-FOUND";)ch(g,v),v=Fu(a,l,v+m);for(var b=0,w="",A=0;A<g.length;A+=1){var P;if(p)P=xr(Nu(e,void 0,[l,g[A],a]));else{if(typeof e!="string")throw new Ou("Assertion failed: `replaceValue` should be a string at this point");var I=[];P=oh(l,a,g[A],I,void 0,e)}var N=Gn(a,b,g[A]);w+=N+P,b=g[A]+h}return b<a.length&&(w+=Gn(a,b)),w}});var Yn=x((vb,Bu)=>{"use strict";s();u();var hh=zn();Bu.exports=function(){return String.prototype.replaceAll||hh}});var Lu=x((Ab,qu)=>{"use strict";s();u();var yh=er(),gh=Yn();qu.exports=function(){var t=gh();return yh(String.prototype,{replaceAll:t},{replaceAll:function(){return String.prototype.replaceAll!==t}}),t}});var $u=x((Rb,Mu)=>{"use strict";s();u();var xh=Zt(),vh=er(),Uu=zn(),wh=Yn(),bh=Lu(),ku=xh(Uu);vh(ku,{getPolyfill:wh,implementation:Uu,shim:bh});Mu.exports=ku});var qg={};qr(qg,{DynamicSnippetsGenerator:()=>Pr});module.exports=ui(qg);s();u();var SP=Kf($u(),1);s();u();s();u();s();u();function E(r){throw new Error("Unexpected value: "+JSON.stringify(r))}s();u();s();u();s();u();s();u();s();u();s();u();var Ah=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Du=Ah;var Sh=typeof self=="object"&&self&&self.Object===Object&&self,Th=Du||Sh||Function("return this")(),_u=Th;var Rh=_u.Symbol,X=Rh;s();u();var Wu=Object.prototype,Eh=Wu.hasOwnProperty,Ih=Wu.toString,vt=X?X.toStringTag:void 0;function Ph(r){var t=Eh.call(r,vt),e=r[vt];try{r[vt]=void 0;var n=!0}catch(o){}var i=Ih.call(r);return n&&(t?r[vt]=e:delete r[vt]),i}var Vu=Ph;s();u();var Nh=Object.prototype,Fh=Nh.toString;function Oh(r){return Fh.call(r)}var ju=Oh;var Ch="[object Null]",Bh="[object Undefined]",Gu=X?X.toStringTag:void 0;function qh(r){return r==null?r===void 0?Bh:Ch:Gu&&Gu in Object(r)?Vu(r):ju(r)}var zu=qh;s();u();function Lh(r){return r!=null&&typeof r=="object"}var Yu=Lh;var Uh="[object Symbol]";function kh(r){return typeof r=="symbol"||Yu(r)&&zu(r)==Uh}var Hu=kh;s();u();s();u();function Mh(r,t){for(var e=-1,n=r==null?0:r.length,i=Array(n);++e<n;)i[e]=t(r[e],e,r);return i}var Ju=Mh;s();u();var $h=Array.isArray,Qu=$h;var Dh=1/0,Zu=X?X.prototype:void 0,Ku=Zu?Zu.toString:void 0;function Xu(r){if(typeof r=="string")return r;if(Qu(r))return Ju(r,Xu)+"";if(Hu(r))return Ku?Ku.call(r):"";var t=r+"";return t=="0"&&1/r==-Dh?"-0":t}var ef=Xu;s();u();function _h(r){return r==null?"":ef(r)}var se=_h;s();u();s();u();s();u();s();u();s();u();s();u();function Wh(r,t,e){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=r[n+t];return o}var tf=Wh;function Vh(r,t,e){var n=r.length;return e=e===void 0?n:e,!t&&e>=n?r:tf(r,t,e)}var rf=Vh;s();u();var jh="\\ud800-\\udfff",Gh="\\u0300-\\u036f",zh="\\ufe20-\\ufe2f",Yh="\\u20d0-\\u20ff",Hh=Gh+zh+Yh,Jh="\\ufe0e\\ufe0f",Qh="\\u200d",Zh=RegExp("["+Qh+jh+Hh+Jh+"]");function Kh(r){return Zh.test(r)}var wr=Kh;s();u();s();u();function Xh(r){return r.split("")}var nf=Xh;s();u();var of="\\ud800-\\udfff",ey="\\u0300-\\u036f",ty="\\ufe20-\\ufe2f",ry="\\u20d0-\\u20ff",ny=ey+ty+ry,iy="\\ufe0e\\ufe0f",oy="["+of+"]",Hn="["+ny+"]",Jn="\\ud83c[\\udffb-\\udfff]",ay="(?:"+Hn+"|"+Jn+")",af="[^"+of+"]",sf="(?:\\ud83c[\\udde6-\\uddff]){2}",uf="[\\ud800-\\udbff][\\udc00-\\udfff]",sy="\\u200d",ff=ay+"?",lf="["+iy+"]?",uy="(?:"+sy+"(?:"+[af,sf,uf].join("|")+")"+lf+ff+")*",fy=lf+ff+uy,ly="(?:"+[af+Hn+"?",Hn,sf,uf,oy].join("|")+")",py=RegExp(Jn+"(?="+Jn+")|"+ly+fy,"g");function cy(r){return r.match(py)||[]}var pf=cy;function dy(r){return wr(r)?pf(r):nf(r)}var cf=dy;function my(r){return function(t){t=se(t);var e=wr(t)?cf(t):void 0,n=e?e[0]:t.charAt(0),i=e?rf(e,1).join(""):t.slice(1);return n[r]()+i}}var df=my;var hy=df("toUpperCase"),mf=hy;function yy(r){return mf(se(r).toLowerCase())}var hf=yy;s();u();s();u();function gy(r,t,e,n){var i=-1,o=r==null?0:r.length;for(n&&o&&(e=r[++i]);++i<o;)e=t(e,r[i],i,r);return e}var yf=gy;s();u();s();u();s();u();function xy(r){return function(t){return r==null?void 0:r[t]}}var gf=xy;var vy={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},wy=gf(vy),xf=wy;var by=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ay="\\u0300-\\u036f",Sy="\\ufe20-\\ufe2f",Ty="\\u20d0-\\u20ff",Ry=Ay+Sy+Ty,Ey="["+Ry+"]",Iy=RegExp(Ey,"g");function Py(r){return r=se(r),r&&r.replace(by,xf).replace(Iy,"")}var vf=Py;s();u();s();u();var Ny=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Fy(r){return r.match(Ny)||[]}var wf=Fy;s();u();var Oy=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Cy(r){return Oy.test(r)}var bf=Cy;s();u();var Ef="\\ud800-\\udfff",By="\\u0300-\\u036f",qy="\\ufe20-\\ufe2f",Ly="\\u20d0-\\u20ff",Uy=By+qy+Ly,If="\\u2700-\\u27bf",Pf="a-z\\xdf-\\xf6\\xf8-\\xff",ky="\\xac\\xb1\\xd7\\xf7",My="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$y="\\u2000-\\u206f",Dy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Nf="A-Z\\xc0-\\xd6\\xd8-\\xde",_y="\\ufe0e\\ufe0f",Ff=ky+My+$y+Dy,Of="['\u2019]",Af="["+Ff+"]",Wy="["+Uy+"]",Cf="\\d+",Vy="["+If+"]",Bf="["+Pf+"]",qf="[^"+Ef+Ff+Cf+If+Pf+Nf+"]",jy="\\ud83c[\\udffb-\\udfff]",Gy="(?:"+Wy+"|"+jy+")",zy="[^"+Ef+"]",Lf="(?:\\ud83c[\\udde6-\\uddff]){2}",Uf="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+Nf+"]",Yy="\\u200d",Sf="(?:"+Bf+"|"+qf+")",Hy="(?:"+De+"|"+qf+")",Tf="(?:"+Of+"(?:d|ll|m|re|s|t|ve))?",Rf="(?:"+Of+"(?:D|LL|M|RE|S|T|VE))?",kf=Gy+"?",Mf="["+_y+"]?",Jy="(?:"+Yy+"(?:"+[zy,Lf,Uf].join("|")+")"+Mf+kf+")*",Qy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ky=Mf+kf+Jy,Xy="(?:"+[Vy,Lf,Uf].join("|")+")"+Ky,eg=RegExp([De+"?"+Bf+"+"+Tf+"(?="+[Af,De,"$"].join("|")+")",Hy+"+"+Rf+"(?="+[Af,De+Sf,"$"].join("|")+")",De+"?"+Sf+"+"+Tf,De+"+"+Rf,Zy,Qy,Cf,Xy].join("|"),"g");function tg(r){return r.match(eg)||[]}var $f=tg;function rg(r,t,e){return r=se(r),t=e?void 0:t,t===void 0?bf(r)?$f(r):wf(r):r.match(t)||[]}var Df=rg;var ng="['\u2019]",ig=RegExp(ng,"g");function og(r){return function(t){return yf(Df(vf(t).replace(ig,"")),r,"")}}var br=og;var ag=br(function(r,t,e){return t=t.toLowerCase(),r+(e?hf(t):t)}),Qn=ag;s();u();var sg=br(function(r,t,e){return r+(e?"_":"")+t.toLowerCase()}),Zn=sg;s();u();function wt(r){return Object.keys(r)}s();u();s();u();var Se=class{};s();u();s();u();var k=class extends Se{constructor(e){super();d(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var ug=4,_f=!!c.env.FERN_STACK_TRACK;_f&&(Error.stackTraceLimit=50);var bt=class{constructor(){d(this,"buffer","");d(this,"indentLevel",0);d(this,"hasWrittenAnything",!1);d(this,"lastCharacterIsSemicolon",!1);d(this,"lastCharacterIsNewline",!1)}write(...t){for(let e of t)if(e!=null)if(typeof e=="string"){let n=e.length>0&&e.endsWith(`
14
+ `),i=n?e.substring(0,e.length-1):e,o=this.getIndentString(),a=i.replaceAll(`
15
15
  `,`
16
- ${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
17
- `),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new D(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new D(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}controlFlowWithoutStatement(t){new D(t).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new D(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(t){this.dedent(),this.write("} "),new D(t).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}openBlock(t,e="{",n,i="}"){let o=t.filter(u=>u!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
16
+ ${o}`);this.isAtStartOfLine()&&(a=o+a),n&&(a+=`
17
+ `),this.writeInternal(a)}else this.writeNode(e)}writeStatement(...t){this.write(...t),this.write(";"),this.writeNewLineIfLastLineNot()}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new k(t).write(this),t.endsWith(";")||this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new k(t).write(this),this.write(" (",e,")"),this.pushScope()}controlFlowWithoutStatement(t){new k(t).write(this),this.pushScope()}endControlFlow(){this.popScope()}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new k(t).write(this),this.write(" (",e,")"),this.pushScope()}alternativeControlFlow(t){this.dedent(),this.write("} "),new k(t).write(this),this.pushScope()}pushScope(){this.writeLine("{"),this.indent()}popScope(t=!0){this.dedent(),this.writeNewLineIfLastLineNot(),t?this.writeLine("}"):this.write("}")}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
18
18
  `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
19
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let u=t[o];u!=null&&n(u)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
20
- `),this.lastCharacterIsSemicolon=t.endsWith(";")),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*Kg)}};a();s();a();s();a();s();var Ft=class{constructor(){d(this,"reporter");d(this,"snippet");d(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){var e;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(e=this.err)!=null?e:new Error(`Failed to generate snippet for endpoint "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){var n,i;return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>((i=(n=this.snippet)==null?void 0:n.length)!=null?i:0)}};var Ot=class{constructor(t){d(this,"context");this.context=t}async generate(t,e={}){let n=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let i=new Ft;for(let o of n){let u=this.context.clone(),p=this.createSnippetGenerator(u);try{let c=await p.generateSnippet({endpoint:o,request:t,options:e});if(u.errors.empty())return{snippet:c,errors:void 0};i.update({context:u,snippet:c})}catch(c){i.err==null&&(i.err=c)}}return i.getResponseOrThrow({endpoint:t.endpoint})}generateSync(t,e={}){let n=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let i=new Ft;for(let o of n){let u=this.context.clone(),p=this.createSnippetGenerator(u);try{let c=p.generateSnippetSync({endpoint:o,request:t,options:e});if(u.errors.empty())return{snippet:c,errors:void 0};i.update({context:u,snippet:c})}catch(c){i.err==null&&(i.err=c)}}return i.getResponseOrThrow({endpoint:t.endpoint})}};a();s();a();s();a();s();var Ct=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let n=t.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};a();s();var R={Critical:"CRITICAL",Warning:"WARNING"},Ut=class r{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push(Ei(_t({},t),{path:[...this.path]}))}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new r;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let n of t){if(typeof n=="string"){e.push(n);continue}e[e.length-1]+=`[${n.index}]`}return e}};var Bt=class{constructor({ir:t,config:e,options:n={}}){d(this,"config");d(this,"options");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=n,this.errors=new Ut,this.httpEndpointReferenceParser=new Ct}associateQueryParametersByWireValue({parameters:t,values:e}){let n=[];for(let[i,o]of Object.entries(e)){this.errors.scope(i);try{let u=t.find(c=>c.name.wireValue===i);if(u==null)throw this.newParameterNotRecognizedError(i);let p=this.isListTypeReference(u.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:u.name,typeReference:u.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:n}){let i=[];for(let[o,u]of Object.entries(e)){this.errors.scope(o);try{let p=t.find(c=>c.name.wireValue===o);if(p==null){if(n)continue;this.errors.add({severity:R.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:p.name,typeReference:p.typeReference,value:u})}finally{this.errors.unscope()}}return i}getSingleFileValue({property:t,record:e}){let n=e[t.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:R.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:t,record:e}){let n=e[t.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:R.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:R.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:R.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t==null?{}:t}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:R.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let n=this.getRecord(e);if(n==null)return;let i=t.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:R.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:R.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let u=t.types[o];if(u==null){this.errors.add({severity:R.Critical,message:`No type found for discriminant value "${o}"`});return}let h=n,{[i]:p}=h,c=$t(h,[Ii(i)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:c}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocationOrThrow(t){let e=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:t})&&e.push(n);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:n}){var i;return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:n}):!((i=t.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){var n,i;return e&&((i=(n=t.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:T(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let n=e.environments.find(i=>i.id===t);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=e.environments.find(i=>i.id===t);return n==null?void 0:n.name}default:T(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:R.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:R.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=e.environments[0];if(n==null)return this.errors.add({severity:R.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(Tt(n.urls));for(let o of Tt(t))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:R.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${Tt(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:R.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:R.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:R.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:T(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:T(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:T(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};a();s();var W={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();var m={};jr(m,{AccessAttribute:()=>He,AstNode:()=>S,Class:()=>le,ClassInstantiation:()=>Qe,CodeBlock:()=>ne,Comment:()=>Ze,Decorator:()=>Ke,Field:()=>ce,Lambda:()=>Xe,LambdaParameter:()=>et,Method:()=>ye,MethodArgument:()=>rt,MethodInvocation:()=>nt,Operator:()=>it,Parameter:()=>de,PythonFile:()=>ot,Reference:()=>_,StarImport:()=>me,Type:()=>Cr,TypeInstantiation:()=>he,accessAttribute:()=>tx,assign:()=>rx,class_:()=>ix,codeBlock:()=>px,comment:()=>lx,decorator:()=>ax,field:()=>fx,file:()=>nx,instantiateClass:()=>ox,invokeFunction:()=>mx,invokeMethod:()=>hx,lambda:()=>cx,lambdaParameter:()=>dx,method:()=>yx,methodArgument:()=>xx,operator:()=>vx,parameter:()=>gx,reference:()=>sx,starImport:()=>ux});a();s();a();s();a();s();a();s();var qt=class extends Nt{constructor(){super(...arguments);d(this,"fullyQualifiedModulePathsToImportedNames",{})}setRefNameOverrides(e){this.fullyQualifiedModulePathsToImportedNames=e}unsetRefNameOverrides(){this.fullyQualifiedModulePathsToImportedNames={}}getRefNameOverride(e){var i;let n=this.fullyQualifiedModulePathsToImportedNames[e.getFullyQualifiedModulePath()];return n||{name:(i=e.alias)!=null?i:e.name,isAlias:!!e.alias}}toString(){return this.buffer}async toStringFormatted(e){return e.format(this.buffer)}};var S=class extends Pe{constructor(){super(...arguments);d(this,"references",[])}addReference(e){this.references.push(e)}inheritReferences(e){e!==void 0&&e.references.forEach(n=>{this.references.includes(n)||this.addReference(n)})}getReferences(){return this.references}toString(){let e=new qt;return this.write(e),e.toString()}async toStringFormatted(e){let n=new qt;return this.write(n),n.toStringFormatted(e)}};var He=class extends S{constructor({lhs:e,rhs:n}){super();d(this,"lhs");d(this,"rhs");this.lhs=e,this.inheritReferences(e),this.rhs=n,this.inheritReferences(n)}write(e){this.lhs.write(e),e.write("."),this.rhs.write(e)}};a();s();var Or=class extends S{constructor({lhs:e,rhs:n}){super();d(this,"lhs");d(this,"rhs");this.lhs=e,this.inheritReferences(e),this.rhs=n,this.inheritReferences(n)}write(e){this.lhs.write(e),e.write(" = "),this.rhs.write(e)}};a();s();var Je=class extends S{constructor({reference:e,arguments_:n,multiline:i}){super();d(this,"reference");d(this,"arguments");d(this,"multiline");this.reference=e,this.arguments=n,this.multiline=i!=null?i:!1,this.inheritReferences(e),this.arguments.forEach(o=>{this.inheritReferences(o)})}write(e){if(this.reference.write(e),this.arguments.length===0){e.write("()");return}e.write("("),this.multiline&&(e.newLine(),e.indent()),this.arguments.forEach((n,i)=>{n.write(e),i<this.arguments.length-1&&(e.write(","),this.multiline?e.newLine():e.write(" "))}),this.multiline&&(e.newLine(),e.dedent()),e.write(")")}};a();s();var le=class extends S{constructor({docs:e,name:n,extends_:i,decorators:o}){super();d(this,"name");d(this,"extends_");d(this,"decorators");d(this,"fields",[]);d(this,"docs");d(this,"statements",[]);this.name=n,this.extends_=i!=null?i:[],this.decorators=o!=null?o:[],this.docs=e,this.extends_.forEach(u=>{this.inheritReferences(u)}),this.decorators.forEach(u=>{this.inheritReferences(u)})}write(e){this.decorators.forEach(n=>{n.write(e)}),e.write(`class ${this.name}`),this.extends_.length>0&&(e.write("("),this.extends_.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write(")")),e.write(":"),e.newLine(),e.indent(),this.docs!=null&&(e.write('"""'),e.write(this.docs),e.write('"""')),e.writeNewLineIfLastLineNot(),this.fields.forEach(n=>{n.write(e),e.writeNewLineIfLastLineNot()}),e.dedent(),e.indent(),this.statements.length?this.writeStatements({writer:e}):e.write("pass"),e.dedent()}add(e){this.statements.push(e),this.inheritReferences(e)}writeStatements({writer:e}){this.statements.forEach((n,i)=>{n.write(e),e.writeNewLineIfLastLineNot()})}addField(e){this.add(e)}};a();s();var Qe=class extends Je{constructor(n){var i=n,{classReference:t}=i,e=$t(i,["classReference"]);super(_t({reference:t},e))}};a();s();var ne=class extends S{constructor(e){super();d(this,"arg");this.arg=e}write(e){return new D(this.arg).write(e)}};a();s();var Ze=class extends S{constructor({docs:e}){super();d(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
21
- `).forEach(n=>{e.writeLine(`# ${n}`)})}};a();s();var Ke=class extends S{constructor({callable:e}){super();d(this,"callable");this.callable=e,this.inheritReferences(e)}write(e){e.write("@"),this.callable.write(e),e.newLine()}};a();s();var ce=class extends S{constructor({name:e,type:n,initializer:i,docs:o}){super();d(this,"name");d(this,"type");d(this,"initializer");d(this,"docs");this.name=e,this.type=n,this.initializer=i,this.docs=o,this.inheritReferences(this.type),this.inheritReferences(this.initializer)}write(e){e.write(this.name),this.type!==void 0&&(e.write(": "),this.type.write(e)),this.initializer!==void 0&&(e.write(" = "),this.initializer.write(e)),this.docs!=null&&(e.newLine(),e.write('"""'),e.newLine(),e.write(this.docs),e.newLine(),e.write('"""'))}};a();s();var Xe=class extends S{constructor({parameters:e,body:n}){super();d(this,"parameters");d(this,"body");this.parameters=e!=null?e:[],this.body=n,this.inheritReferences(n)}write(e){e.write("lambda"),this.parameters&&this.parameters.length&&(e.write(" "),this.parameters.forEach((n,i)=>{n.write(e),i<this.parameters.length-1&&e.write(", ")})),e.write(": "),this.body.write(e)}};a();s();a();s();var de=class extends S{constructor({name:e,type:n,initializer:i}){super();d(this,"name");d(this,"initializer");d(this,"type");this.name=e,this.type=n,this.initializer=i}write(e){e.write(this.name),this.type&&(e.write(": "),this.type.write(e)),this.initializer!==void 0&&(e.write(" = "),this.initializer.write(e))}};var et=class extends de{constructor({name:t,initializer:e}){super({name:t,initializer:e,type:void 0})}};a();s();var tt;(function(r){r[r.STATIC=0]="STATIC",r[r.INSTANCE=1]="INSTANCE",r[r.CLASS=2]="CLASS"})(tt||(tt={}));var ye=class extends S{constructor({static_:e,name:n,parameters:i,return_:o,docstring:u,type:p,decorators:c}){super();d(this,"name");d(this,"return");d(this,"docstring");d(this,"type");d(this,"parameters");d(this,"decorators");d(this,"statements",[]);d(this,"static_");this.name=n,this.parameters=i!=null?i:[],this.return=o,this.docstring=u,this.type=p,this.decorators=c!=null?c:[],this.static_=e!=null?e:!1,this.parameters.forEach(h=>{this.inheritReferences(h)}),this.inheritReferences(this.return),this.decorators.forEach(h=>{this.inheritReferences(h)}),this.statements.forEach(h=>{this.inheritReferences(h)})}addStatement(e){this.statements.push(e),this.inheritReferences(e)}write(e){this.static_&&this.decorators.push(m.decorator({callable:m.codeBlock("staticmethod")})),this.decorators.forEach(n=>{n.write(e)}),this.type===tt.CLASS?m.decorator({callable:new ne("classmethod")}).write(e):this.type===tt.STATIC&&m.decorator({callable:new ne("staticmethod")}).write(e),e.write(`def ${this.name}(`),this.type===tt.INSTANCE?(e.write("self"),this.parameters.length>0&&e.write(", ")):this.type===tt.CLASS&&(e.write("cls"),this.parameters.length>0&&e.write(", ")),this.parameters.forEach((n,i)=>{n.write(e),i<this.parameters.length-1&&e.write(", ")}),e.write(")"),this.return&&(e.write(" -> "),this.return.write(e)),e.write(":"),e.newLine(),this.docstring&&(e.indent(),e.write('"""'),e.write(this.docstring),e.write('"""'),e.newLine(),e.dedent()),this.statements.length?(e.indent(),this.statements.forEach((n,i)=>{n.write(e),i<this.statements.length-1&&e.newLine()}),e.dedent()):(e.indent(),e.write("pass"),e.dedent()),e.newLine()}};a();s();var rt=class extends S{constructor({name:e,value:n}){super();d(this,"name");d(this,"value");this.name=e,this.value=n,this.inheritReferences(this.value)}write(e){this.name!==void 0&&(e.write(this.name),e.write("=")),this.value.write(e)}};a();s();var nt=class extends S{constructor({on:e,method:n,arguments_:i,multiline:o}){super();d(this,"on");d(this,"method");d(this,"arguments");d(this,"multiline");this.on=e,this.method=n,this.arguments=i,this.multiline=o!=null?o:!1,this.inheritReferences(e),this.arguments.forEach(u=>{this.inheritReferences(u)})}write(e){if(this.on.write(e),e.write("."),e.write(this.method),this.arguments.length===0){e.write("()");return}e.write("("),this.multiline&&(e.newLine(),e.indent()),this.arguments.forEach((n,i)=>{n.write(e),i<this.arguments.length-1&&(e.write(","),this.multiline?e.newLine():e.write(" "))}),this.multiline&&(e.newLine(),e.dedent()),e.write(")")}};a();s();a();s();var J={Or:"or",And:"and",Add:"add",Subtract:"subtract",Multiply:"multiple",Divide:"divide",Modulo:"modulo",LeftShift:"leftShift",RightShift:"rightShift"};var it=class extends S{constructor({operator:e,lhs:n,rhs:i}){super();d(this,"operator");d(this,"lhs");d(this,"rhs");this.operator=e,this.lhs=n,this.inheritReferences(n),this.rhs=i,this.inheritReferences(i)}getOperatorString(){switch(this.operator){case J.Or:return"or";case J.And:return"and";case J.Add:return"+";case J.Subtract:return"-";case J.Multiply:return"*";case J.Divide:return"/";case J.Modulo:return"%";case J.LeftShift:return"<<";case J.RightShift:return">>";default:T(this.operator)}}write(e){this.lhs.write(e),e.write(" "),e.write(this.getOperatorString()),e.write(" "),this.rhs.write(e)}};a();s();a();s();a();s();var _=class extends S{constructor({name:e,modulePath:n,genericTypes:i,alias:o,attribute:u}){super();d(this,"name");d(this,"modulePath");d(this,"genericTypes");d(this,"alias");d(this,"attribute");this.name=e,this.modulePath=n!=null?n:[],this.genericTypes=i!=null?i:[],this.alias=o,this.attribute=u!=null?u:[],this.references.push(this),this.genericTypes.forEach(p=>{this.inheritReferences(p)})}write(e){let n=e.getRefNameOverride(this);e.write(n.name),this.genericTypes.length>0&&(e.write("["),this.genericTypes.forEach((i,o)=>{o>0&&e.write(", "),i.write(e)}),e.write("]")),this.attribute.length>0&&(e.write("."),this.attribute.forEach((i,o)=>{o>0&&e.write("."),e.write(i)}))}getFullyQualifiedPath(){return this.modulePath.join(".")}getFullyQualifiedModulePath(){return`${this.getFullyQualifiedPath()}.${this.name}`}};var me=class extends _{constructor({modulePath:e}){super({name:"*",modulePath:e});d(this,"docs")}write(e){throw new Error("Not intended to be written outside the context of a PythonFile.")}};a();s();function gp(r){if(!r)return"Class";let t=r.replace(/[^a-zA-Z0-9\s_-]/g," ").replace(/[-_\s]+/g," ").trim();return!t||/^\d+$/.test(t)?"Class"+(t||""):(/^\d/.test(t)&&(t="Class"+t),t.split(/(?=[A-Z])|[-_\s]+/).filter(n=>n.length>0).map(n=>n.split(new RegExp("(?<=\\d)(?=[a-zA-Z])|(?<=[a-zA-Z])(?=\\d)")).filter(i=>i.length>0)).flat().map((n,i)=>i===0&&/^\d/.test(n)?"Class"+n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.length>1&&n===n.toUpperCase()&&!/^\d+$/.test(n)?n:n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(""))}var ot=class extends S{constructor({path:e,statements:n,isInitFile:i=!1,comments:o,imports:u}){super();d(this,"path");d(this,"isInitFile");d(this,"statements",[]);d(this,"comments");this.path=e,this.isInitFile=i,n==null||n.forEach(p=>this.addStatement(p)),this.comments=o!=null?o:[],u==null||u.forEach(p=>this.addReference(p))}addStatement(e){this.statements.push(e),this.inheritReferences(e)}write(e){let n=this.deduplicateReferences();this.updateWriterRefNameOverrides({writer:e,uniqueReferences:n}),this.writeComments(e),this.writeImports({writer:e,uniqueReferences:n}),this.statements.forEach((i,o)=>{i.write(e),e.newLine(),o<this.statements.length-1&&e.newLine()}),e.unsetRefNameOverrides()}updateWriterRefNameOverrides({writer:e,uniqueReferences:n}){let i=new Map(n),o={},u=this.getInitialUsedNames(),p=this.path.join("."),c=n.get(p);if(c){let{references:y}=c;y.forEach(g=>{let v=g.getFullyQualifiedModulePath(),b=g.name;o[v]={name:b,isAlias:!1},u.add(g.name)}),i.delete(p)}Array.from(i.values()).flatMap(({references:y})=>y).forEach(y=>{var N;if(y instanceof me)return;let g=(N=y.alias)!=null?N:y.name,v=y.getFullyQualifiedModulePath(),b=g,w=y.modulePath.length-1,A=!!y.alias;for(;u.has(b);){A=!0;let P=y.modulePath[w];w<0||!P?b=`_${b}`:b=`${gp(P)}${b}`,w--}u.add(b),o[v]={name:b,isAlias:A}}),e.setRefNameOverrides(o)}getInitialUsedNames(){let e=new Set;return this.statements.forEach(n=>{(n instanceof le||n instanceof ye||n instanceof ce)&&e.add(n.name)}),e}deduplicateReferences(){let e=new Map;for(let n of this.references){let i=n.name,o=n.getFullyQualifiedPath();if(o==="")continue;let u=e.get(o);u?u.referenceNames.has(i)||(u.references.push(n),u.referenceNames.add(i)):e.set(o,{modulePath:n.modulePath,references:[n],referenceNames:new Set([i])})}return e}writeComments(e){this.comments.forEach(n=>{n.write(e)}),this.comments.length>0&&e.newLine()}getImportName({writer:e,reference:n}){let i=e.getRefNameOverride(n),o=n.name,u=i.isAlias?i.name:void 0;return`${o}${u?` as ${u}`:""}`}writeImports({writer:e,uniqueReferences:n}){if(n.size!==0){for(let[i,{modulePath:o,references:u}]of n){let p=o;if(!this.isDefinedInFile(p)){if(p[0]===this.path[0]){let c=0;for(;c<this.path.length&&c<p.length&&this.path[c]===p[c];)c++;let h=this.path.length-c;this.isInitFile&&h++;let y=h>0?".".repeat(h):".";y+=p.slice(c).join("."),e.write(`from ${y} import ${u.map(g=>this.getImportName({writer:e,reference:g})).join(", ")}`)}else e.write(`from ${i} import ${u.map(c=>this.getImportName({writer:e,reference:c})).join(", ")}`);e.newLine()}}e.newLine()}}isDefinedInFile(e){return e.length===this.path.length&&e.every((n,i)=>n===this.path[i])}};a();s();var Cr=class extends S{constructor(e){super();d(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"int":e.write("int");break;case"float":e.write("float");break;case"bool":e.write("bool");break;case"str":e.write("str");break;case"bytes":e.write("bytes");break;case"list":e.write("List["),this.internalType.value.write(e),e.write("]");break;case"set":e.write("Set["),this.internalType.value.write(e),e.write("]");break;case"tuple":e.write("Tuple["),this.internalType.values.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]");break;case"dict":e.write("Dict["),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write("]");break;case"none":e.write("None");break;case"uuid":e.write("UUID");break;case"optional":e.write("Optional["),this.internalType.value.write(e),e.write("]");break;case"union":e.write("Union["),this.internalType.values.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]");break;case"any":e.write("Any");break;case"reference":this.internalType.value.write(e);break;case"datetime":e.write("datetime");break;case"literal":typeof this.internalType.value=="string"?e.write(`Literal["${this.internalType.value}"]`):e.write(`Literal[${this.internalType.value}]`);break;default:T(this.internalType)}}static int(){return new this({type:"int"})}static float(){return new this({type:"float"})}static bool(){return new this({type:"bool"})}static str(){return new this({type:"str"})}static bytes(){return new this({type:"bytes"})}static list(e){let n=new this({type:"list",value:e});return n.addReference(m.reference({name:"List",modulePath:["typing"]})),n.inheritReferences(e),n}static set(e){let n=new this({type:"set",value:e});return n.addReference(m.reference({name:"Set",modulePath:["typing"]})),n.inheritReferences(e),n}static tuple(e){let n=new this({type:"tuple",values:e});return n.addReference(m.reference({name:"Tuple",modulePath:["typing"]})),e.forEach(i=>n.inheritReferences(i)),n}static dict(e,n){let i=new this({type:"dict",keyType:e,valueType:n});return i.addReference(m.reference({name:"Dict",modulePath:["typing"]})),i.inheritReferences(e),i.inheritReferences(n),i}static none(){return new this({type:"none"})}static uuid(){let e=new this({type:"uuid"});return e.addReference(m.reference({name:"UUID",modulePath:["uuid"]})),e}static optional(e){if(this.isAlreadyOptional(e))return e;let n=new this({type:"optional",value:e});return n.addReference(m.reference({name:"Optional",modulePath:["typing"]})),n.inheritReferences(e),n}static union(e){let n=new this({type:"union",values:e});return n.addReference(m.reference({name:"Union",modulePath:["typing"]})),e.forEach(i=>n.inheritReferences(i)),n}static any(){let e=new this({type:"any"});return e.addReference(m.reference({name:"Any",modulePath:["typing"]})),e}static datetime(){let e=new this({type:"datetime"});return e.addReference(m.reference({name:"datetime",modulePath:["datetime"]})),e}static reference(e){let n=new this({type:"reference",value:e});return n.addReference(e),n}static literal(e){let n=new this({type:"literal",value:e});return n.addReference(m.reference({name:"Literal",modulePath:["typing"]})),n}static isAlreadyOptional(e){return e.internalType.type==="optional"}};a();s();var he=class r extends S{constructor(e){super();d(this,"internalType");this.internalType=e}static int(e){return new this({type:"int",value:e})}static float(e){return new this({type:"float",value:e})}static bool(e){return new this({type:"bool",value:e})}static str(e,n={multiline:!1,startOnNewLine:!1,endWithNewLine:!1}){return new this({type:"str",value:e,config:n})}static bytes(e){return new this({type:"bytes",value:e})}static list(e,n={endWithComma:!1}){let i=new this({type:"list",values:e,config:n});return e.forEach(o=>i.inheritReferences(o)),i}static set(e,n={endWithComma:!1}){let i=new this({type:"set",values:e,config:n});return e.forEach(o=>i.inheritReferences(o)),i}static tuple(e,n={endWithComma:!1}){let i=new this({type:"tuple",values:e,config:n});return e.forEach(o=>i.inheritReferences(o)),i}static typedDict(e,n={endWithComma:!1}){let i=new this({type:"typedDict",entries:e,config:n});return e.forEach(o=>i.inheritReferences(o.value)),i}static date(e){let n=new this({type:"date",value:e});return n.addReference(new _({name:"date",modulePath:["datetime"]})),n}static datetime(e){let n=new this({type:"datetime",value:e});return n.addReference(new _({name:"datetime",modulePath:["datetime"]})),n}static dict(e,n={endWithComma:!1}){let i=new this({type:"dict",entries:e,config:n});return e.forEach(o=>{i.inheritReferences(o.key),i.inheritReferences(o.value)}),i}static reference(e){let n=new this({type:"reference",value:e});return n.inheritReferences(e),n}static none(){return new this({type:"none"})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){let n=new this({type:"uuid",value:e});return n.addReference(new _({name:"UUID",modulePath:["uuid"]})),n}static nop(){return new this({type:"nop"})}static isNop(e){return e instanceof r&&e.internalType.type==="nop"}isTypedDict(){return this.internalType.type==="typedDict"}asTypedDictOrThrow(){if(this.isTypedDict())return this.internalType;throw new Error("Internal error; python.TypeInstantiation is not a TypedDict")}write(e){var n,i,o,u,p,c,h,y,g,v,b;switch(this.internalType.type){case"int":e.write(this.internalType.value.toString());break;case"float":e.write(this.internalType.value.toString());break;case"bool":this.internalType.value?e.write("True"):e.write("False");break;case"str":if((n=this.internalType.config)!=null&&n.multiline){let{startOnNewLine:w,endWithNewLine:A}=this.internalType.config;this.writeStringWithTripleQuotes({writer:e,value:this.internalType.value,startOnNewLine:w,endWithNewLine:A})}else e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"date":e.write(`date.fromisoformat("${this.internalType.value}")`);break;case"datetime":e.write(`datetime.fromisoformat("${this.internalType.value}")`);break;case"bytes":e.write(`b"${this.internalType.value}"`);break;case"list":{let w=this.internalType,A=gi({values:w.values});if(A.length===0){e.write("[]");break}e.write("["),(i=w.config)!=null&&i.multiline&&(e.newLine(),e.indent()),A.forEach((N,P)=>{var F,O;P>0&&(e.write(","),(F=w.config)!=null&&F.multiline?e.newLine():e.write(" ")),N.write(e),P===A.length-1&&((O=w.config)!=null&&O.endWithComma)&&e.write(",")}),(o=w.config)!=null&&o.multiline&&(e.newLine(),e.dedent()),e.write("]");break}case"set":{let w=this.internalType,A=gi({values:w.values});if(A.length===0){e.write("{}");break}e.write("{"),(u=w.config)!=null&&u.multiline&&(e.newLine(),e.indent()),A.forEach((N,P)=>{var F,O;P>0&&(e.write(","),(F=w.config)!=null&&F.multiline?e.newLine():e.write(" ")),N.write(e),P===A.length-1&&((O=w.config)!=null&&O.endWithComma)&&e.write(",")}),(p=w.config)!=null&&p.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"tuple":{let w=this.internalType,A=gi({values:w.values});if(A.length===0){e.write("()");break}e.write("("),(c=w.config)!=null&&c.multiline&&(e.newLine(),e.indent()),A.forEach((N,P)=>{var F,O;P>0&&(e.write(","),(F=w.config)!=null&&F.multiline?e.newLine():e.write(" ")),N.write(e),(A.length===1||P===A.length-1&&((O=w.config)!=null&&O.endWithComma))&&e.write(",")}),(h=w.config)!=null&&h.multiline&&(e.newLine(),e.dedent()),e.write(")");break}case"dict":{let w=this.internalType,A=Xg({entries:w.entries});if(A.length===0){e.write("{}");break}e.write("{"),(y=w.config)!=null&&y.multiline&&(e.newLine(),e.indent()),A.forEach((N,P)=>{var F,O;P>0&&(e.write(","),(F=w.config)!=null&&F.multiline?e.newLine():e.write(" ")),N.key.write(e),e.write(": "),N.value.write(e),P===A.length-1&&((O=w.config)!=null&&O.endWithComma)&&e.write(",")}),(g=w.config)!=null&&g.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"typedDict":{let w=this.internalType,A=ex({entries:w.entries});if(A.length===0){e.write("{}");break}e.write("{"),(v=w.config)!=null&&v.multiline&&(e.writeLine(),e.indent()),A.forEach((N,P)=>{var F;P>0&&(e.write(","),(F=w.config)!=null&&F.multiline?e.newLine():e.write(" ")),e.write(`"${N.name}": `),N.value.write(e)}),(b=w.config)!=null&&b.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"reference":{this.internalType.value.write(e);break}case"none":e.write("None");break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":e.write(`UUID("${this.internalType.value}")`);break;case"nop":break;default:T(this.internalType)}}writeStringWithTripleQuotes({writer:e,value:n,startOnNewLine:i,endWithNewLine:o}){var p;e.write('"""');let u=n.split(`
22
- `);if(u.length<=1){e.write(this.escapeString((p=u[0])!=null?p:"")),e.write('"""');return}i&&e.writeNoIndent(`\\
23
- `),u.forEach((c,h)=>{e.writeNoIndent(this.escapeString(c)),h===u.length-1?o&&e.writeNoIndent(`\\
19
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let a=t[o];a!=null&&n(a)}}}toString(){return this.buffer}writeInternal(t){if(t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
20
+ `),this.lastCharacterIsSemicolon=t.endsWith(";")),this.buffer+=t,_f&&this.buffer.endsWith(`
21
+ `)&&!this.buffer.endsWith(`"""
22
+ `)){let e=this.stacktrace(15).map(n=>`${n.fn} - ${n.path}:${n.position}`).join(" ");e&&(this.buffer=this.buffer.slice(0,-1),this.buffer+=`//@@ ${e}
23
+ `)}return this.buffer}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return ug}stacktrace(t=50){var n;let e=!1;return((n=new Error().stack)!=null?n:"").split(`
24
+ `).map(i=>{var a;let o=i.match(/at\s+(.*)\s+\((.*):(\d+):(\d+)\)/);if(o&&o.length===5){let[,l,p,h,m]=o;if(e||l!=null&&l.includes("runInteractiveTask")){e=!0;return}switch(l){case"Object.<anonymous>":l="";break;case"Object.object":case"Object.alias":case"Object.union":case"Object.enum":case"Object.undiscriminatedUnion":l=`${l.substring(l.indexOf(".")+1)}()=> { ... }`;break}return{fn:l,path:(a=p==null?void 0:p.replace(/^.*?fern.*?\//,""))!=null?a:"",position:`${h}:${m}`}}}).filter(i=>{var o,a,l,p,h,m,g;return i&&!((o=i.path)!=null&&o.startsWith("node:"))&&!((a=i.path)!=null&&a.endsWith(".js"))&&!((l=i.path)!=null&&l.includes("AbstractWriter"))&&!((p=i.fn)!=null&&p.includes("stacktrace"))&&!((h=i.fn)!=null&&h.includes("stackLine"))&&!((m=i.fn)!=null&&m.includes("SdkGeneratorCLI"))&&!((g=i.fn)!=null&&g.includes("runCli"))}).slice(0,t)}};s();u();s();u();s();u();var At=class{constructor(){d(this,"reporter");d(this,"snippet");d(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:t,snippet:e}){this.shouldUpdate({snippet:e,reporter:t.errors})&&(this.reporter=t.errors.clone(),this.snippet=e)}getResponseOrThrow({endpoint:t}){var e;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(e=this.err)!=null?e:new Error(`Failed to generate snippet for endpoint "${t.method} ${t.path}"`)}shouldUpdate({snippet:t,reporter:e}){var n,i;return this.reporter==null||this.reporter.size()>0&&e.size()===0?!0:t.length>((i=(n=this.snippet)==null?void 0:n.length)!=null?i:0)}};var St=class{constructor(t){d(this,"context");this.context=t}async generate(t,e={}){let n=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let i=new At;for(let o of n){let a=this.context.clone(),l=this.createSnippetGenerator(a);try{let p=await l.generateSnippet({endpoint:o,request:t,options:e});if(a.errors.empty())return{snippet:p,errors:void 0};i.update({context:a,snippet:p})}catch(p){i.err==null&&(i.err=p)}}return i.getResponseOrThrow({endpoint:t.endpoint})}generateSync(t,e={}){let n=this.context.resolveEndpointLocationOrThrow(t.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${t.endpoint.method} ${t.endpoint.path}"`);let i=new At;for(let o of n){let a=this.context.clone(),l=this.createSnippetGenerator(a);try{let p=l.generateSnippetSync({endpoint:o,request:t,options:e});if(a.errors.empty())return{snippet:p,errors:void 0};i.update({context:a,snippet:p})}catch(p){i.err==null&&(i.err=p)}}return i.getResponseOrThrow({endpoint:t.endpoint})}};s();u();s();u();s();u();var Tt=class{constructor(){d(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(t){return this.REFERENCE_REGEX.test(t)?{type:"valid"}:{type:"invalid"}}tryParse(t){if(this.validate(t).type==="invalid")return;let n=t.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};s();u();var R={Critical:"CRITICAL",Warning:"WARNING"},Rt=class r{constructor(){d(this,"errors");d(this,"path");this.errors=[],this.path=[]}add(t){this.errors.push(oi(Ot({},t),{path:[...this.path]}))}scope(t){this.path.push(t)}unscope(){this.path.pop()}getBySeverity(t){return this.errors.filter(e=>e.severity===t)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let t=new r;return t.errors=[...this.errors],t.path=[...this.path],t}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(t=>({severity:t.severity,path:t.path!=null?this.pathToStringArray(t.path):void 0,message:t.message}))}pathToStringArray(t){let e=[];for(let n of t){if(typeof n=="string"){e.push(n);continue}e[e.length-1]+=`[${n.index}]`}return e}};var Et=class{constructor({ir:t,config:e,options:n={}}){d(this,"config");d(this,"options");d(this,"errors");d(this,"_ir");d(this,"httpEndpointReferenceParser");this._ir=t,this.config=e,this.options=n,this.errors=new Rt,this.httpEndpointReferenceParser=new Tt}associateQueryParametersByWireValue({parameters:t,values:e}){let n=[];for(let[i,o]of Object.entries(e)){this.errors.scope(i);try{let a=t.find(p=>p.name.wireValue===i);if(a==null)throw this.newParameterNotRecognizedError(i);let l=this.isListTypeReference(a.typeReference)&&!Array.isArray(o)?[o]:o;n.push({name:a.name,typeReference:a.typeReference,value:l})}finally{this.errors.unscope()}}return n}associateByWireValueOrDefault({parameters:t,values:e}){let n=[];for(let i of t){this.errors.scope(i.name.wireValue);try{let o=e[i.name.wireValue];if(o==null)if(i.typeReference.type==="primitive"&&i.typeReference.value==="STRING")o=`<${i.name.wireValue}>`;else{this.errors.add({severity:R.Critical,message:this.newParameterNotRecognizedError(i.name.wireValue).message});continue}n.push({name:i.name,typeReference:i.typeReference,value:o})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:t,values:e,ignoreMissingParameters:n}){let i=[];for(let[o,a]of Object.entries(e)){this.errors.scope(o);try{let l=t.find(p=>p.name.wireValue===o);if(l==null){if(n)continue;this.errors.add({severity:R.Critical,message:this.newParameterNotRecognizedError(o).message});continue}i.push({name:l.name,typeReference:l.typeReference,value:a})}finally{this.errors.unscope()}}return i}getExampleObjectProperties({parameters:t,snippetObject:e}){let n=typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{},i=[];for(let o of t){let a=n[o.name.wireValue];a==null?o.typeReference.type==="nullable"&&i.push({name:o.name,typeReference:o.typeReference,value:null}):i.push({name:o.name,typeReference:o.typeReference,value:a})}return i}getSingleFileValue({property:t,record:e}){let n=e[t.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:R.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:t,record:e}){let n=e[t.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:R.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:R.Critical,message:`Expected file array value to be an array of strings, got ${typeof o}`});return}i.push(o)}return i}getRecord(t){if(typeof t!="object"||Array.isArray(t)){this.errors.add({severity:R.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(t)?"array":typeof t}`});return}return t==null?{}:t}resolveNamedType({typeId:t}){let e=this._ir.types[t];if(e==null){this.errors.add({severity:R.Critical,message:`Type identified by "${t}" could not be found`});return}return e}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e}){let n=this.getRecord(e);if(n==null)return;let i=t.discriminant.wireValue,o=n[i];if(o==null){this.errors.add({severity:R.Critical,message:this.newParameterNotRecognizedError(i).message});return}if(typeof o!="string"){this.errors.add({severity:R.Critical,message:`Expected discriminant value to be a string but got: ${typeof o}`});return}let a=t.types[o];if(a==null){this.errors.add({severity:R.Critical,message:`No type found for discriminant value "${o}"`});return}let h=n,{[i]:l}=h,p=Ct(h,[ai(i)]);return{singleDiscriminatedUnionType:a,discriminantValue:a.discriminantValue,value:p}}resolveEndpointOrThrow(t){let e=this.httpEndpointReferenceParser.tryParse(t);if(e==null)throw new Error(`Failed to parse endpoint reference "${t}"`);return this.resolveEndpointLocationOrThrow(e)}resolveEndpointLocation(t){let e=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:t})&&e.push(n);return e}resolveEndpointLocationOrThrow(t){let e=this.resolveEndpointLocation(t);if(e.length===0)throw new Error(`Failed to find endpoint identified by "${t.method} ${t.path}"`);return e}needsRequestParameter({request:t,inlinePathParameters:e,inlineFileProperties:n}){var i;return this.includePathParametersInWrappedRequest({request:t,inlinePathParameters:e})||t.queryParameters!=null&&t.queryParameters.length>0||t.headers!=null&&t.headers.length>0?!0:t.body!=null?this.includeRequestBodyInWrappedRequest({body:t.body,inlineFileProperties:n}):!((i=t.metadata)!=null&&i.onlyPathParameters)}includePathParametersInWrappedRequest({request:t,inlinePathParameters:e}){var n,i;return e&&((i=(n=t.metadata)==null?void 0:n.includePathParameters)!=null?i:!1)}isFileUploadRequestBody(t){switch(t.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:E(t)}}resolveEnvironmentName(t){if(this._ir.environments==null)return;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":{let n=e.environments.find(i=>i.id===t);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=e.environments.find(i=>i.id===t);return n==null?void 0:n.name}default:E(e)}}isSingleEnvironmentID(t){return typeof t=="string"}isMultiEnvironmentValues(t){return typeof t=="object"}validateMultiEnvironmentUrlValues(t){if(this._ir.environments==null)return this.errors.add({severity:R.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let e=this._ir.environments.environments;switch(e.type){case"singleBaseUrl":return this.errors.add({severity:R.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=e.environments[0];if(n==null)return this.errors.add({severity:R.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let i=new Set(wt(n.urls));for(let o of wt(t))i.has(o)&&i.delete(o);return i.size>0?(this.errors.add({severity:R.Critical,message:`The provided environments are invalid; got: [${Object.keys(t).join(", ")}], expected: [${wt(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:t}){if(typeof t!="number"){this.errors.add({severity:R.Critical,message:this.newTypeMismatchError({expected:"number",value:t}).message});return}return t}getValueAsBoolean({value:t}){if(typeof t!="boolean"){this.errors.add({severity:R.Critical,message:this.newTypeMismatchError({expected:"boolean",value:t}).message});return}return t}getValueAsString({value:t}){if(typeof t!="string"){this.errors.add({severity:R.Critical,message:this.newTypeMismatchError({expected:"string",value:t}).message});return}return t}isOptional(t){switch(t.type){case"nullable":return this.isOptional(t.value);case"optional":return!0;case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}isNullable(t){switch(t.type){case"nullable":return!0;case"optional":return this.isNullable(t.value);case"named":{let e=this.resolveNamedType({typeId:t.value});return e==null?!1:e.type==="alias"?this.isNullable(e.typeReference):!1}}return!1}newAuthMismatchError({auth:t,values:e}){return new Error(`Expected auth type ${t.type}, got ${e.type}`)}newParameterNotRecognizedError(t){return new Error(`"${t}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:t,value:e}){return new Error(`Expected ${t}, got ${typeof e}`)}includeRequestBodyInWrappedRequest({body:t,inlineFileProperties:e}){switch(t.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e});default:E(t)}}includeFileUploadBodyInWrappedRequest({fileUpload:t,inlineFileProperties:e}){return this.fileUploadHasBodyProperties({fileUpload:t})||e&&this.fileUploadHasFileProperties({fileUpload:t})}fileUploadHasBodyProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:E(e)}})}fileUploadHasFileProperties({fileUpload:t}){return t.properties.some(e=>{switch(e.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:E(e)}})}isListTypeReference(t){return t.type==="optional"?this.isListTypeReference(t.value):t.type==="list"||t.type==="set"}parsedEndpointMatches({endpoint:t,parsedEndpoint:e}){return t.location.method===e.method&&t.location.path===e.path}};s();u();var M={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};s();u();s();u();var y={};qr(y,{AccessAttribute:()=>_e,AstNode:()=>S,Class:()=>ue,ClassInstantiation:()=>Ve,CodeBlock:()=>ee,Comment:()=>je,Decorator:()=>Ge,Field:()=>fe,Lambda:()=>ze,LambdaParameter:()=>Ye,Method:()=>pe,MethodArgument:()=>Je,MethodInvocation:()=>Qe,Operator:()=>Ze,Parameter:()=>le,PythonFile:()=>Ke,Reference:()=>U,StarImport:()=>ce,Type:()=>Sr,TypeInstantiation:()=>de,accessAttribute:()=>pg,assign:()=>cg,class_:()=>mg,codeBlock:()=>wg,comment:()=>bg,decorator:()=>yg,field:()=>vg,file:()=>dg,instantiateClass:()=>hg,invokeFunction:()=>Rg,invokeMethod:()=>Eg,lambda:()=>Ag,lambdaParameter:()=>Sg,method:()=>Tg,methodArgument:()=>Pg,operator:()=>Ng,parameter:()=>Ig,reference:()=>gg,starImport:()=>xg});s();u();s();u();s();u();s();u();var It=class extends bt{constructor(){super(...arguments);d(this,"fullyQualifiedModulePathsToImportedNames",{})}setRefNameOverrides(e){this.fullyQualifiedModulePathsToImportedNames=e}unsetRefNameOverrides(){this.fullyQualifiedModulePathsToImportedNames={}}getRefNameOverride(e){var i;let n=this.fullyQualifiedModulePathsToImportedNames[e.getFullyQualifiedModulePath()];return n||{name:(i=e.alias)!=null?i:e.name,isAlias:!!e.alias}}toString(){return this.buffer}async toStringFormatted(e){return e.format(this.buffer)}};var S=class extends Se{constructor(){super(...arguments);d(this,"references",[])}addReference(e){this.references.push(e)}inheritReferences(e){e!==void 0&&e.references.forEach(n=>{this.references.includes(n)||this.addReference(n)})}getReferences(){return this.references}toString(){let e=new It;return this.write(e),e.toString()}async toStringFormatted(e){let n=new It;return this.write(n),n.toStringFormatted(e)}};var _e=class extends S{constructor({lhs:e,rhs:n}){super();d(this,"lhs");d(this,"rhs");this.lhs=e,this.inheritReferences(e),this.rhs=n,this.inheritReferences(n)}write(e){this.lhs.write(e),e.write("."),this.rhs.write(e)}};s();u();var Ar=class extends S{constructor({lhs:e,rhs:n}){super();d(this,"lhs");d(this,"rhs");this.lhs=e,this.inheritReferences(e),this.rhs=n,this.inheritReferences(n)}write(e){this.lhs.write(e),e.write(" = "),this.rhs.write(e)}};s();u();var We=class extends S{constructor({reference:e,arguments_:n,multiline:i}){super();d(this,"reference");d(this,"arguments");d(this,"multiline");this.reference=e,this.arguments=n,this.multiline=i!=null?i:!1,this.inheritReferences(e),this.arguments.forEach(o=>{this.inheritReferences(o)})}write(e){if(this.reference.write(e),this.arguments.length===0){e.write("()");return}e.write("("),this.multiline&&(e.newLine(),e.indent()),this.arguments.forEach((n,i)=>{n.write(e),i<this.arguments.length-1&&(e.write(","),this.multiline?e.newLine():e.write(" "))}),this.multiline&&(e.newLine(),e.dedent()),e.write(")")}};s();u();var ue=class extends S{constructor({docs:e,name:n,extends_:i,decorators:o}){super();d(this,"name");d(this,"extends_");d(this,"decorators");d(this,"fields",[]);d(this,"docs");d(this,"statements",[]);this.name=n,this.extends_=i!=null?i:[],this.decorators=o!=null?o:[],this.docs=e,this.extends_.forEach(a=>{this.inheritReferences(a)}),this.decorators.forEach(a=>{this.inheritReferences(a)})}write(e){this.decorators.forEach(n=>{n.write(e)}),e.write(`class ${this.name}`),this.extends_.length>0&&(e.write("("),this.extends_.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write(")")),e.write(":"),e.newLine(),e.indent(),this.docs!=null&&(e.write('"""'),e.write(this.docs),e.write('"""')),e.writeNewLineIfLastLineNot(),this.fields.forEach(n=>{n.write(e),e.writeNewLineIfLastLineNot()}),e.dedent(),e.indent(),this.statements.length?this.writeStatements({writer:e}):e.write("pass"),e.dedent()}add(e){this.statements.push(e),this.inheritReferences(e)}writeStatements({writer:e}){this.statements.forEach((n,i)=>{n.write(e),e.writeNewLineIfLastLineNot()})}addField(e){this.add(e)}};s();u();var Ve=class extends We{constructor(n){var i=n,{classReference:t}=i,e=Ct(i,["classReference"]);super(Ot({reference:t},e))}};s();u();var ee=class extends S{constructor(e){super();d(this,"arg");this.arg=e}write(e){return new k(this.arg).write(e)}};s();u();var je=class extends S{constructor({docs:e}){super();d(this,"docs");this.docs=e}write(e){this.docs!=null&&this.docs.split(`
25
+ `).forEach(n=>{e.writeLine(`# ${n}`)})}};s();u();var Ge=class extends S{constructor({callable:e}){super();d(this,"callable");this.callable=e,this.inheritReferences(e)}write(e){e.write("@"),this.callable.write(e),e.newLine()}};s();u();var fe=class extends S{constructor({name:e,type:n,initializer:i,docs:o}){super();d(this,"name");d(this,"type");d(this,"initializer");d(this,"docs");this.name=e,this.type=n,this.initializer=i,this.docs=o,this.inheritReferences(this.type),this.inheritReferences(this.initializer)}write(e){e.write(this.name),this.type!==void 0&&(e.write(": "),this.type.write(e)),this.initializer!==void 0&&(e.write(" = "),this.initializer.write(e)),this.docs!=null&&(e.newLine(),e.write('"""'),e.newLine(),e.write(this.docs),e.newLine(),e.write('"""'))}};s();u();var ze=class extends S{constructor({parameters:e,body:n}){super();d(this,"parameters");d(this,"body");this.parameters=e!=null?e:[],this.body=n,this.inheritReferences(n)}write(e){e.write("lambda"),this.parameters&&this.parameters.length&&(e.write(" "),this.parameters.forEach((n,i)=>{n.write(e),i<this.parameters.length-1&&e.write(", ")})),e.write(": "),this.body.write(e)}};s();u();s();u();var le=class extends S{constructor({name:e,type:n,initializer:i}){super();d(this,"name");d(this,"initializer");d(this,"type");this.name=e,this.type=n,this.initializer=i}write(e){e.write(this.name),this.type&&(e.write(": "),this.type.write(e)),this.initializer!==void 0&&(e.write(" = "),this.initializer.write(e))}};var Ye=class extends le{constructor({name:t,initializer:e}){super({name:t,initializer:e,type:void 0})}};s();u();var He;(function(r){r[r.STATIC=0]="STATIC",r[r.INSTANCE=1]="INSTANCE",r[r.CLASS=2]="CLASS"})(He||(He={}));var pe=class extends S{constructor({static_:e,name:n,parameters:i,return_:o,docstring:a,type:l,decorators:p}){super();d(this,"name");d(this,"return");d(this,"docstring");d(this,"type");d(this,"parameters");d(this,"decorators");d(this,"statements",[]);d(this,"static_");this.name=n,this.parameters=i!=null?i:[],this.return=o,this.docstring=a,this.type=l,this.decorators=p!=null?p:[],this.static_=e!=null?e:!1,this.parameters.forEach(h=>{this.inheritReferences(h)}),this.inheritReferences(this.return),this.decorators.forEach(h=>{this.inheritReferences(h)}),this.statements.forEach(h=>{this.inheritReferences(h)})}addStatement(e){this.statements.push(e),this.inheritReferences(e)}write(e){this.static_&&this.decorators.push(y.decorator({callable:y.codeBlock("staticmethod")})),this.decorators.forEach(o=>{o.write(e)}),this.type===He.CLASS?y.decorator({callable:new ee("classmethod")}).write(e):this.type===He.STATIC&&y.decorator({callable:new ee("staticmethod")}).write(e),e.write(`def ${this.name}(`);let i=this.parameters.length>3;i&&(e.newLine(),e.indent()),this.type===He.INSTANCE?(e.write("self"),this.parameters.length>0&&(e.write(i?",":", "),i&&e.newLine())):this.type===He.CLASS&&(e.write("cls"),this.parameters.length>0&&(e.write(i?",":", "),i&&e.newLine())),this.parameters.forEach((o,a)=>{o.write(e),a<this.parameters.length-1&&(e.write(i?",":", "),i&&e.newLine())}),i&&(e.write(","),e.dedent(),e.newLine()),e.write(")"),this.return&&(e.write(" -> "),this.return.write(e)),e.write(":"),e.newLine(),this.docstring&&(e.indent(),e.write('"""'),e.write(this.docstring),e.write('"""'),e.newLine(),e.dedent()),this.statements.length?(e.indent(),this.statements.forEach((o,a)=>{o.write(e),a<this.statements.length-1&&e.newLine()}),e.dedent()):(e.indent(),e.write("pass"),e.dedent()),e.newLine()}};s();u();var Je=class extends S{constructor({name:e,value:n}){super();d(this,"name");d(this,"value");this.name=e,this.value=n,this.inheritReferences(this.value)}write(e){this.name!==void 0&&(e.write(this.name),e.write("=")),this.value.write(e)}};s();u();var Qe=class extends S{constructor({on:e,method:n,arguments_:i,multiline:o}){super();d(this,"on");d(this,"method");d(this,"arguments");d(this,"multiline");this.on=e,this.method=n,this.arguments=i,this.multiline=o!=null?o:!1,this.inheritReferences(e),this.arguments.forEach(a=>{this.inheritReferences(a)})}write(e){if(this.on.write(e),e.write("."),e.write(this.method),this.arguments.length===0){e.write("()");return}e.write("("),this.multiline&&(e.newLine(),e.indent()),this.arguments.forEach((n,i)=>{n.write(e),i<this.arguments.length-1&&(e.write(","),this.multiline?e.newLine():e.write(" "))}),this.multiline&&(e.newLine(),e.dedent()),e.write(")")}};s();u();s();u();var z={Or:"or",And:"and",Add:"add",Subtract:"subtract",Multiply:"multiple",Divide:"divide",Modulo:"modulo",LeftShift:"leftShift",RightShift:"rightShift"};var Ze=class extends S{constructor({operator:e,lhs:n,rhs:i}){super();d(this,"operator");d(this,"lhs");d(this,"rhs");this.operator=e,this.lhs=n,this.inheritReferences(n),this.rhs=i,this.inheritReferences(i)}getOperatorString(){switch(this.operator){case z.Or:return"or";case z.And:return"and";case z.Add:return"+";case z.Subtract:return"-";case z.Multiply:return"*";case z.Divide:return"/";case z.Modulo:return"%";case z.LeftShift:return"<<";case z.RightShift:return">>";default:E(this.operator)}}write(e){this.lhs.write(e),e.write(" "),e.write(this.getOperatorString()),e.write(" "),this.rhs.write(e)}};s();u();s();u();function Wf(r){if(!r)return"Class";let t=r.replace(/[^a-zA-Z0-9\s_-]/g," ").replace(/[-_\s]+/g," ").trim();return!t||/^\d+$/.test(t)?"Class"+(t||""):(/^\d/.test(t)&&(t="Class"+t),t.split(/(?=[A-Z])|[-_\s]+/).filter(n=>n.length>0).map(n=>n.split(new RegExp("(?<=\\d)(?=[a-zA-Z])|(?<=[a-zA-Z])(?=\\d)")).filter(i=>i.length>0)).flat().map((n,i)=>i===0&&/^\d/.test(n)?"Class"+n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.length>1&&n===n.toUpperCase()&&!/^\d+$/.test(n)?n:n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(""))}s();u();s();u();var U=class extends S{constructor({name:e,modulePath:n,genericTypes:i,alias:o,attribute:a}){super();d(this,"name");d(this,"modulePath");d(this,"genericTypes");d(this,"alias");d(this,"attribute");this.name=e,this.modulePath=n!=null?n:[],this.genericTypes=i!=null?i:[],this.alias=o,this.attribute=a!=null?a:[],this.references.push(this),this.genericTypes.forEach(l=>{this.inheritReferences(l)})}write(e){let n=e.getRefNameOverride(this);e.write(n.name),this.genericTypes.length>0&&(e.write("["),this.genericTypes.forEach((i,o)=>{o>0&&e.write(", "),i.write(e)}),e.write("]")),this.attribute.length>0&&(e.write("."),this.attribute.forEach((i,o)=>{o>0&&e.write("."),e.write(i)}))}getFullyQualifiedPath(){return this.modulePath.join(".")}getFullyQualifiedModulePath(){return`${this.getFullyQualifiedPath()}.${this.name}`}};var ce=class extends U{constructor({modulePath:e}){super({name:"*",modulePath:e});d(this,"docs")}write(e){throw new Error("Not intended to be written outside the context of a PythonFile.")}};var Ke=class extends S{constructor({path:e,statements:n,isInitFile:i=!1,comments:o,imports:a}){super();d(this,"path");d(this,"isInitFile");d(this,"statements",[]);d(this,"comments");this.path=e,this.isInitFile=i,n==null||n.forEach(l=>this.addStatement(l)),this.comments=o!=null?o:[],a==null||a.forEach(l=>this.addReference(l))}addStatement(e){this.statements.push(e),this.inheritReferences(e)}write(e){let n=this.deduplicateReferences();this.updateWriterRefNameOverrides({writer:e,uniqueReferences:n}),this.writeComments(e),this.writeImports({writer:e,uniqueReferences:n}),this.statements.forEach((i,o)=>{i.write(e),e.newLine(),o<this.statements.length-1&&e.newLine()}),e.unsetRefNameOverrides()}updateWriterRefNameOverrides({writer:e,uniqueReferences:n}){let i=new Map(n),o={},a=this.getInitialUsedNames(),l=this.path.join("."),p=n.get(l);if(p){let{references:m}=p;m.forEach(g=>{let v=g.getFullyQualifiedModulePath(),b=g.name;o[v]={name:b,isAlias:!1},a.add(g.name)}),i.delete(l)}Array.from(i.values()).flatMap(({references:m})=>m).forEach(m=>{var P;if(m instanceof ce)return;let g=(P=m.alias)!=null?P:m.name,v=m.getFullyQualifiedModulePath(),b=g,w=m.modulePath.length-1,A=!!m.alias;for(;a.has(b);){A=!0;let I=m.modulePath[w];w<0||!I?b=`_${b}`:b=`${Wf(I)}${b}`,w--}a.add(b),o[v]={name:b,isAlias:A}}),e.setRefNameOverrides(o)}getInitialUsedNames(){let e=new Set;return this.statements.forEach(n=>{(n instanceof ue||n instanceof pe||n instanceof fe)&&e.add(n.name)}),e}deduplicateReferences(){let e=new Map;for(let n of this.references){let i=n.name,o=n.getFullyQualifiedPath();if(o==="")continue;let a=e.get(o);a?a.referenceNames.has(i)||(a.references.push(n),a.referenceNames.add(i)):e.set(o,{modulePath:n.modulePath,references:[n],referenceNames:new Set([i])})}return e}writeComments(e){this.comments.forEach(n=>{n.write(e)}),this.comments.length>0&&e.newLine()}getImportName({writer:e,reference:n}){let i=e.getRefNameOverride(n),o=n.name,a=i.isAlias?i.name:void 0;return`${o}${a?` as ${a}`:""}`}writeImports({writer:e,uniqueReferences:n}){if(n.size!==0){for(let[i,{modulePath:o,references:a}]of n){let l=o;if(!this.isDefinedInFile(l)){if(l[0]===this.path[0]){let p=0;for(;p<this.path.length&&p<l.length&&this.path[p]===l[p];)p++;let h=this.path.length-p;this.isInitFile&&h++;let m=h>0?".".repeat(h):".";m+=l.slice(p).join("."),e.write(`from ${m} import ${a.map(g=>this.getImportName({writer:e,reference:g})).join(", ")}`)}else e.write(`from ${i} import ${a.map(p=>this.getImportName({writer:e,reference:p})).join(", ")}`);e.newLine()}}e.newLine()}}isDefinedInFile(e){return e.length===this.path.length&&e.every((n,i)=>n===this.path[i])}};s();u();var Sr=class extends S{constructor(e){super();d(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"int":e.write("int");break;case"float":e.write("float");break;case"bool":e.write("bool");break;case"str":e.write("str");break;case"bytes":e.write("bytes");break;case"list":e.write("List["),this.internalType.value.write(e),e.write("]");break;case"set":e.write("Set["),this.internalType.value.write(e),e.write("]");break;case"tuple":e.write("Tuple["),this.internalType.values.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]");break;case"dict":e.write("Dict["),this.internalType.keyType.write(e),e.write(", "),this.internalType.valueType.write(e),e.write("]");break;case"none":e.write("None");break;case"uuid":e.write("UUID");break;case"optional":e.write("Optional["),this.internalType.value.write(e),e.write("]");break;case"union":e.write("Union["),this.internalType.values.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]");break;case"any":e.write("Any");break;case"reference":this.internalType.value.write(e);break;case"datetime":e.write("datetime");break;case"literal":typeof this.internalType.value=="string"?e.write(`Literal["${this.internalType.value}"]`):e.write(`Literal[${this.internalType.value}]`);break;default:E(this.internalType)}}static int(){return new this({type:"int"})}static float(){return new this({type:"float"})}static bool(){return new this({type:"bool"})}static str(){return new this({type:"str"})}static bytes(){return new this({type:"bytes"})}static list(e){let n=new this({type:"list",value:e});return n.addReference(y.reference({name:"List",modulePath:["typing"]})),n.inheritReferences(e),n}static set(e){let n=new this({type:"set",value:e});return n.addReference(y.reference({name:"Set",modulePath:["typing"]})),n.inheritReferences(e),n}static tuple(e){let n=new this({type:"tuple",values:e});return n.addReference(y.reference({name:"Tuple",modulePath:["typing"]})),e.forEach(i=>n.inheritReferences(i)),n}static dict(e,n){let i=new this({type:"dict",keyType:e,valueType:n});return i.addReference(y.reference({name:"Dict",modulePath:["typing"]})),i.inheritReferences(e),i.inheritReferences(n),i}static none(){return new this({type:"none"})}static uuid(){let e=new this({type:"uuid"});return e.addReference(y.reference({name:"UUID",modulePath:["uuid"]})),e}static optional(e){if(this.isAlreadyOptional(e))return e;let n=new this({type:"optional",value:e});return n.addReference(y.reference({name:"Optional",modulePath:["typing"]})),n.inheritReferences(e),n}static union(e){let n=new this({type:"union",values:e});return n.addReference(y.reference({name:"Union",modulePath:["typing"]})),e.forEach(i=>n.inheritReferences(i)),n}static any(){let e=new this({type:"any"});return e.addReference(y.reference({name:"Any",modulePath:["typing"]})),e}static datetime(){let e=new this({type:"datetime"});return e.addReference(y.reference({name:"datetime",modulePath:["datetime"]})),e}static reference(e){let n=new this({type:"reference",value:e});return n.addReference(e),n}static literal(e){let n=new this({type:"literal",value:e});return n.addReference(y.reference({name:"Literal",modulePath:["typing"]})),n}static isAlreadyOptional(e){return e.internalType.type==="optional"}};s();u();var de=class r extends S{constructor(e){super();d(this,"internalType");this.internalType=e}static int(e){return new this({type:"int",value:e})}static float(e){return new this({type:"float",value:e})}static bool(e){return new this({type:"bool",value:e})}static str(e,n={multiline:!1,startOnNewLine:!1,endWithNewLine:!1}){return new this({type:"str",value:e,config:n})}static bytes(e){return new this({type:"bytes",value:e})}static list(e,n={endWithComma:!1}){let i=new this({type:"list",values:e,config:n});return e.forEach(o=>i.inheritReferences(o)),i}static set(e,n={endWithComma:!1}){let i=new this({type:"set",values:e,config:n});return e.forEach(o=>i.inheritReferences(o)),i}static tuple(e,n={endWithComma:!1}){let i=new this({type:"tuple",values:e,config:n});return e.forEach(o=>i.inheritReferences(o)),i}static typedDict(e,n={endWithComma:!1}){let i=new this({type:"typedDict",entries:e,config:n});return e.forEach(o=>i.inheritReferences(o.value)),i}static date(e){let n=new this({type:"date",value:e});return n.addReference(new U({name:"date",modulePath:["datetime"]})),n}static datetime(e){let n=new this({type:"datetime",value:e});return n.addReference(new U({name:"datetime",modulePath:["datetime"]})),n}static dict(e,n={endWithComma:!1}){let i=new this({type:"dict",entries:e,config:n});return e.forEach(o=>{i.inheritReferences(o.key),i.inheritReferences(o.value)}),i}static reference(e){let n=new this({type:"reference",value:e});return n.inheritReferences(e),n}static none(){return new this({type:"none"})}static unknown(e){return new this({type:"unknown",value:e})}static uuid(e){let n=new this({type:"uuid",value:e});return n.addReference(new U({name:"UUID",modulePath:["uuid"]})),n}static nop(){return new this({type:"nop"})}static isNop(e){return e instanceof r&&e.internalType.type==="nop"}isTypedDict(){return this.internalType.type==="typedDict"}asTypedDictOrThrow(){if(this.isTypedDict())return this.internalType;throw new Error("Internal error; python.TypeInstantiation is not a TypedDict")}write(e){var n,i,o,a,l,p,h,m,g,v,b;switch(this.internalType.type){case"int":e.write(this.internalType.value.toString());break;case"float":e.write(this.internalType.value.toString());break;case"bool":this.internalType.value?e.write("True"):e.write("False");break;case"str":if((n=this.internalType.config)!=null&&n.multiline){let{startOnNewLine:w,endWithNewLine:A}=this.internalType.config;this.writeStringWithTripleQuotes({writer:e,value:this.internalType.value,startOnNewLine:w,endWithNewLine:A})}else e.write(`"${this.escapeString(this.internalType.value)}"`);break;case"date":e.write(`date.fromisoformat("${this.internalType.value}")`);break;case"datetime":e.write(`datetime.fromisoformat("${this.internalType.value}")`);break;case"bytes":e.write(`b"${this.internalType.value}"`);break;case"list":{let w=this.internalType,A=Kn({values:w.values});if(A.length===0){e.write("[]");break}e.write("["),(i=w.config)!=null&&i.multiline&&(e.newLine(),e.indent()),A.forEach((P,I)=>{var N,F;I>0&&(e.write(","),(N=w.config)!=null&&N.multiline?e.newLine():e.write(" ")),P.write(e),I===A.length-1&&((F=w.config)!=null&&F.endWithComma)&&e.write(",")}),(o=w.config)!=null&&o.multiline&&(e.newLine(),e.dedent()),e.write("]");break}case"set":{let w=this.internalType,A=Kn({values:w.values});if(A.length===0){e.write("{}");break}e.write("{"),(a=w.config)!=null&&a.multiline&&(e.newLine(),e.indent()),A.forEach((P,I)=>{var N,F;I>0&&(e.write(","),(N=w.config)!=null&&N.multiline?e.newLine():e.write(" ")),P.write(e),I===A.length-1&&((F=w.config)!=null&&F.endWithComma)&&e.write(",")}),(l=w.config)!=null&&l.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"tuple":{let w=this.internalType,A=Kn({values:w.values});if(A.length===0){e.write("()");break}e.write("("),(p=w.config)!=null&&p.multiline&&(e.newLine(),e.indent()),A.forEach((P,I)=>{var N,F;I>0&&(e.write(","),(N=w.config)!=null&&N.multiline?e.newLine():e.write(" ")),P.write(e),(A.length===1||I===A.length-1&&((F=w.config)!=null&&F.endWithComma))&&e.write(",")}),(h=w.config)!=null&&h.multiline&&(e.newLine(),e.dedent()),e.write(")");break}case"dict":{let w=this.internalType,A=fg({entries:w.entries});if(A.length===0){e.write("{}");break}e.write("{"),(m=w.config)!=null&&m.multiline&&(e.newLine(),e.indent()),A.forEach((P,I)=>{var N,F;I>0&&(e.write(","),(N=w.config)!=null&&N.multiline?e.newLine():e.write(" ")),P.key.write(e),e.write(": "),P.value.write(e),I===A.length-1&&((F=w.config)!=null&&F.endWithComma)&&e.write(",")}),(g=w.config)!=null&&g.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"typedDict":{let w=this.internalType,A=lg({entries:w.entries});if(A.length===0){e.write("{}");break}e.write("{"),(v=w.config)!=null&&v.multiline&&(e.writeLine(),e.indent()),A.forEach((P,I)=>{var N;I>0&&(e.write(","),(N=w.config)!=null&&N.multiline?e.newLine():e.write(" ")),e.write(`"${P.name}": `),P.value.write(e)}),(b=w.config)!=null&&b.multiline&&(e.newLine(),e.dedent()),e.write("}");break}case"reference":{this.internalType.value.write(e);break}case"none":e.write("None");break;case"unknown":this.writeUnknown({writer:e,value:this.internalType.value});break;case"uuid":e.write(`UUID("${this.internalType.value}")`);break;case"nop":break;default:E(this.internalType)}}writeStringWithTripleQuotes({writer:e,value:n,startOnNewLine:i,endWithNewLine:o}){var l;e.write('"""');let a=n.split(`
26
+ `);if(a.length<=1){e.write(this.escapeString((l=a[0])!=null?l:"")),e.write('"""');return}i&&e.writeNoIndent(`\\
27
+ `),a.forEach((p,h)=>{e.writeNoIndent(this.escapeString(p)),h===a.length-1?o&&e.writeNoIndent(`\\
24
28
  `):e.writeNoIndent(`
25
- `)}),e.writeNoIndent('"""')}escapeString(e){let n=new RegExp(`(?<!\\\\)(["'\\\\\\t\\n\\r])`,"g"),i={'"':'\\"',"'":"\\'","\\":"\\\\"," ":"\\t","\n":"\\n","\r":"\\r"};return e.replace(n,o=>{var u;return(u=i[o])!=null?u:o})}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n?"True":"False");return;case"string":e.write(`"${this.escapeString(n)}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("None");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,u]of i)e.write(`"${o}": `),e.writeNode(r.unknown(u)),e.writeLine(",");e.dedent(),e.write("}")}};function Xg({entries:r}){return r.filter(t=>!he.isNop(t.key)&&!he.isNop(t.value))}function ex({entries:r}){return r.filter(t=>!he.isNop(t.value))}function gi({values:r}){return r.filter(t=>!he.isNop(t))}function tx(r){return new He(r)}function rx(r){return new Or(r)}function nx(r){return new ot(r)}function ix(r){return new le(r)}function ox(r){return new Qe(r)}function ax(r){return new Ke(r)}function sx(r){return new _(r)}function ux(r){return new me(r)}function fx(r){return new ce(r)}function px(r){return new ne(r)}function lx(r){return new Ze(r)}function cx(r){return new Xe(r)}function dx(r){return new et(r)}function yx(r){return new ye(r)}function mx(r){return new Je(r)}function hx(r){return new nt(r)}function gx(r){return new de(r)}function xx(r){return new rt(r)}function vx(r){return new it(r)}var wx={type:"primitive",value:"STRING"},bx=["example"],xp="client",xi="request",Ur=class{constructor({context:t}){d(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}generateSnippetSync({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}buildPythonFile({endpoint:t,snippet:e}){return m.file({path:bx,statements:[this.constructClient({endpoint:t,snippet:e}),this.callMethod({endpoint:t,snippet:e})]})}constructClient({endpoint:t,snippet:e}){return m.assign({lhs:m.reference({name:xp}),rhs:m.instantiateClass({classReference:this.context.getRootClientClassReference(),arguments_:this.getConstructorArgs({endpoint:t,snippet:e}).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})})}getConstructorArgs({endpoint:t,snippet:e}){let n=[],i=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&n.push(...i),t.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:R.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(W.PathParameters),this.context.ir.pathParameters!=null&&n.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.Headers),this.context.ir.headers!=null&&e.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),n}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let n=this.getEnvironmentValue({baseUrl:t,environment:e});return n==null?[]:[{name:this.getEnvironmentOptionName({environment:e}),value:n}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:R.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return m.TypeInstantiation.str(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let n=this.context.getEnvironmentTypeReferenceFromID(e);if(n==null){this.context.errors.add({severity:R.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return m.TypeInstantiation.reference(n)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?m.TypeInstantiation.reference(m.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.entries(e).map(([n,i])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:wx,value:i})})).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message}),[]):this.getConstructorOAuthArgs({auth:t,values:e});default:T(t)}}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:m.TypeInstantiation.str(e.username)},{name:this.context.getPropertyName(t.password),value:m.TypeInstantiation.str(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:m.TypeInstantiation.str(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:m.TypeInstantiation.str(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:m.TypeInstantiation.str(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push(o)}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!m.TypeInstantiation.isNop(n))return{name:this.context.getPropertyName(t.name.name),value:n}}callMethod({endpoint:t,snippet:e}){return m.invokeMethod({on:m.reference({name:xp}),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}).map(n=>m.methodArgument({name:n.name,value:n.value})),multiline:!0})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:T(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,u;let n=[];this.context.errors.scope(W.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(u=t.pathParameters)!=null?u:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.RequestBody),t.body!=null&&n.push(...this.getBodyRequestArgs({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArgs({body:t,value:e}){switch(t.type){case"bytes":return[{name:xi,value:this.getBytesBodyRequestTypeInstantiation({value:e})}];case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});default:T(t)}}getBodyRequestArgsForTypeReference({typeReference:t,value:e}){switch(t.type){case"named":{let n=this.context.resolveNamedType({typeId:t.value});return n==null?[]:this.getBodyRequestArgsForNamedTypeReference({typeReference:t,named:n,value:e})}case"nullable":case"optional":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});case"list":case"map":case"set":case"literal":case"primitive":case"unknown":return[{name:xi,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:e})}];default:T(t)}}getBodyRequestArgsForNamedTypeReference({typeReference:t,named:e,value:n}){var i;switch(e.type){case"alias":return this.getBodyRequestArgsForTypeReference({typeReference:e.typeReference,value:n});case"enum":case"discriminatedUnion":case"undiscriminatedUnion":return[{name:xi,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:n})}];case"object":return this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(n))!=null?i:{}}).map(u=>({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)}));default:T(e)}}getBodyRequestArgsForBytes({body:t,value:e}){let n=this.getBytesBodyRequestTypeInstantiation({value:e});return m.TypeInstantiation.isNop(n)?[]:[{name:this.context.getPropertyName(t.bodyKey),value:n}]}getBytesBodyRequestTypeInstantiation({value:t}){return typeof t!="string"?(this.context.errors.add({severity:R.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),m.TypeInstantiation.nop()):m.TypeInstantiation.bytes(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let n=[],i=this.context.shouldInlinePathParameters();this.context.errors.scope(W.PathParameters);let o=[];t.pathParameters!=null&&o.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(W.RequestBody);let u=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(...this.getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:u})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var y,g,v,b;this.context.errors.scope(W.QueryParameters);let u=this.context.associateQueryParametersByWireValue({parameters:(y=t.queryParameters)!=null?y:[],values:(g=e.queryParameters)!=null?g:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(W.Headers);let c=this.context.associateByWireValue({parameters:(v=t.headers)!=null?v:[],values:(b=e.headers)!=null?b:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(W.RequestBody);let h=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),[...n,...u,...c,...h]}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return this.getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e});case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:T(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e}){let n=t.bodyType;switch(n.type){case"bytes":return this.getBodyRequestArgsForBytes({body:t,value:e});case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:n.value,value:e});default:T(n)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{},ignoreMissingParameters:!0});for(let u of i)n.push({name:this.context.getPropertyName(u.name.name),value:this.context.dynamicTypeLiteralMapper.convert(u)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getEnvironmentOptionName({environment:t}){return t!=null?"environment":"base_url"}};a();s();a();s();var Ax="value",Br=class{constructor({context:t}){d(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?m.TypeInstantiation.none():(this.context.errors.add({severity:R.Critical,message:"Expected non-null value, but got null"}),m.TypeInstantiation.nop());if(t.value===void 0)return m.TypeInstantiation.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?m.TypeInstantiation.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"set":return this.convertSet({set:t.typeReference.value,value:t.value});case"unknown":return m.TypeInstantiation.unknown(t.value);default:T(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.bool(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(n)}default:T(t)}}convertList({list:t,value:e}){return Array.isArray(e)?m.TypeInstantiation.list(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),m.TypeInstantiation.nop())}convertSet({set:t,value:e}){return Array.isArray(e)?m.TypeInstantiation.set(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),m.TypeInstantiation.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:R.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),m.TypeInstantiation.nop()):m.TypeInstantiation.dict(Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:T(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return m.TypeInstantiation.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});if(o==null)return m.TypeInstantiation.nop();let u={name:this.context.getPropertyName(t.discriminant.name),value:m.TypeInstantiation.str(i.discriminantValue.wireValue)};return m.TypeInstantiation.typedDict([u,...o],{multiline:!0})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){let n=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:e.typeId});if(i==null)return;let o=this.convertNamed({named:i,value:t.value});if(!o.isTypedDict()){this.context.errors.add({severity:R.Critical,message:"Internal error; expected union value to be an object"});return}let u=o.asTypedDictOrThrow();return[...n,...u.entries]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let i=this.context.getRecord(t.value);return i==null?[...n,{name:Ax,value:this.convert({typeReference:e.typeReference,value:t.value})}]:[...n,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:i[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:T(e)}}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(u=>{this.context.errors.scope(u.name.wireValue);try{return{name:this.context.getPropertyName(u.name.name),value:this.convert(u)}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return m.TypeInstantiation.typedDict(n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertEnum({enum_:t,value:e}){let n=this.getEnumValue({enum_:t,value:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(n)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:R.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(i=>i.wireValue===e)==null){this.context.errors.add({severity:R.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?m.TypeInstantiation.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:R.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.int(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.bool(i)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.str(i)}case"UUID":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.uuid(i)}case"DATE":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?m.TypeInstantiation.nop():m.TypeInstantiation.datetime(i)}default:T(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};a();s();var qr=class{constructor({context:t}){d(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let u of t.properties)switch(u.type){case"file":{let p=this.getSingleFileProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.fileFields.push({name:this.context.getPropertyName(u.name),value:p});break}case"fileArray":{let p=this.getArrayFileProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.fileFields.push({name:this.context.getPropertyName(u.name),value:p});break}case"bodyProperty":{let p=this.getBodyProperty({property:u,record:i});if(m.TypeInstantiation.isNop(p))break;n.bodyPropertyFields.push({name:this.context.getPropertyName(u.name.name),value:p});break}default:T(u)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?m.TypeInstantiation.nop():this.context.getFileFromString(n)}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return n==null?m.TypeInstantiation.nop():m.TypeInstantiation.list(n.map(i=>this.context.getFileFromString(i)))}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?m.TypeInstantiation.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var Sx=["list","set"],kr=class r extends Bt{constructor({ir:e,config:n}){var i;super({ir:e,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");this.ir=e,this.customConfig=(i=n.customConfig)!=null?i:{},this.dynamicTypeLiteralMapper=new Br({context:this}),this.filePropertyMapper=new qr({context:this})}clone(){return new r({ir:this.ir,config:this.config})}getClassName(e){let n=e.pascalCase.safeName,i=this.getRootClientClassName();return n===i?`${i}Model`:n}getTypedDictClassName(e){return`${this.getClassName(e)}Params`}getPropertyName(e){let n=e.snakeCase.safeName;return n.startsWith("_")?"f_"+n.substring(n.lastIndexOf("_")+1):n}getMethodName(e){return Sx.includes(e.snakeCase.unsafeName)?e.snakeCase.unsafeName:e.snakeCase.safeName}getRootClientClassReference(){return m.reference({name:this.getRootClientClassName(),modulePath:this.getRootModulePath()})}getRootClientClassName(){var e,n;return((e=this.customConfig.client)==null?void 0:e.exported_class_name)!=null?this.customConfig.client.exported_class_name:this.customConfig.client_class_name!=null?this.customConfig.client_class_name:((n=this.customConfig.client)==null?void 0:n.class_name)!=null?this.customConfig.client.class_name:this.pascalCase(this.config.organization)+this.pascalCase(this.config.workspaceName)}getEnvironmentClassName(){return`${this.getRootClientClassName()}Environment`}getEnvironmentTypeReferenceFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return m.accessAttribute({lhs:this.getEnvironmentClassReference(),rhs:m.codeBlock(this.getEnvironmentEnumName(n))})}getEnvironmentClassReference(){return m.reference({name:this.getEnvironmentClassName(),modulePath:this.getRootModulePath()})}getEnvironmentEnumName(e){return e.screamingSnakeCase.safeName}isPrimitive(e){switch(e.type){case"primitive":return!0;case"optional":case"nullable":return this.isPrimitive(e.value);case"named":{let n=this.resolveNamedType({typeId:e.value});if(n==null)return!1;switch(n.type){case"alias":return this.isPrimitive(n.typeReference);case"discriminatedUnion":case"undiscriminatedUnion":case"object":case"enum":return!1;default:T(n)}break}case"list":case"set":case"map":case"literal":case"unknown":return!1;default:T(e)}}getFileFromString(e){return m.TypeInstantiation.str(e)}getRootModulePath(){if(this.customConfig.package_name!=null)return[this.customConfig.package_name];let e=this.cleanOrganizationName();return this.customConfig.use_api_name_in_package?[e,this.getApiName()]:[e]}getCoreModulePath(){return this.getRootModulePath().concat("core")}shouldInlinePathParameters(){return!0}cleanOrganizationName(){return this.config.organization.replace(/[^a-zA-Z0-9]/g,"_")}getApiName(){return hi(this.config.workspaceName)}pascalCase(e){let n=mi(e);return n.charAt(0).toUpperCase()+n.slice(1)}};var Lr=class extends Ot{constructor({ir:t,config:e}){super(new kr({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}createSnippetGenerator(t){return new Ur({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
29
+ `)}),e.writeNoIndent('"""')}escapeString(e){let n=new RegExp(`(?<!\\\\)(["'\\\\\\t\\n\\r])`,"g"),i={'"':'\\"',"'":"\\'","\\":"\\\\"," ":"\\t","\n":"\\n","\r":"\\r"};return e.replace(n,o=>{var a;return(a=i[o])!=null?a:o})}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n?"True":"False");return;case"string":e.write(`"${this.escapeString(n)}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("None");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownObject({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownObject({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("{}");return}e.writeLine("{"),e.indent();for(let[o,a]of i)e.write(`"${o}": `),e.writeNode(r.unknown(a)),e.writeLine(",");e.dedent(),e.write("}")}};function fg({entries:r}){return r.filter(t=>!de.isNop(t.key)&&!de.isNop(t.value))}function lg({entries:r}){return r.filter(t=>!de.isNop(t.value))}function Kn({values:r}){return r.filter(t=>!de.isNop(t))}function pg(r){return new _e(r)}function cg(r){return new Ar(r)}function dg(r){return new Ke(r)}function mg(r){return new ue(r)}function hg(r){return new Ve(r)}function yg(r){return new Ge(r)}function gg(r){return new U(r)}function xg(r){return new ce(r)}function vg(r){return new fe(r)}function wg(r){return new ee(r)}function bg(r){return new je(r)}function Ag(r){return new ze(r)}function Sg(r){return new Ye(r)}function Tg(r){return new pe(r)}function Rg(r){return new We(r)}function Eg(r){return new Qe(r)}function Ig(r){return new le(r)}function Pg(r){return new Je(r)}function Ng(r){return new Ze(r)}s();u();var Fg="value",Tr=class{constructor({context:t}){d(this,"context");this.context=t}convert(t){if(t.value===null)return this.context.isNullable(t.typeReference)?y.TypeInstantiation.none():(this.context.errors.add({severity:R.Critical,message:"Expected non-null value, but got null"}),y.TypeInstantiation.nop());if(t.value===void 0)return y.TypeInstantiation.nop();switch(t.typeReference.type){case"list":return this.convertList({list:t.typeReference.value,value:t.value});case"literal":return this.convertLiteral({literalType:t.typeReference.value,value:t.value});case"map":return this.convertMap({map:t.typeReference,value:t.value});case"named":{let e=this.context.resolveNamedType({typeId:t.typeReference.value});return e==null?y.TypeInstantiation.nop():this.convertNamed({named:e,value:t.value,as:t.as})}case"optional":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"nullable":return this.convert({typeReference:t.typeReference.value,value:t.value,as:t.as});case"primitive":return this.convertPrimitive({primitive:t.typeReference.value,value:t.value,as:t.as});case"set":return this.convertSet({set:t.typeReference.value,value:t.value});case"unknown":return y.TypeInstantiation.unknown(t.value);default:E(t.typeReference)}}convertLiteral({literalType:t,value:e}){switch(t.type){case"boolean":{let n=this.context.getValueAsBoolean({value:e});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.bool(n)}case"string":{let n=this.context.getValueAsString({value:e});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.str(n)}default:E(t)}}convertList({list:t,value:e}){return Array.isArray(e)?y.TypeInstantiation.list(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),y.TypeInstantiation.nop())}convertSet({set:t,value:e}){return Array.isArray(e)?y.TypeInstantiation.set(e.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:t,value:n})}finally{this.context.errors.unscope()}}),{multiline:!0}):(this.context.errors.add({severity:R.Critical,message:`Expected array but got: ${typeof e}`}),y.TypeInstantiation.nop())}convertMap({map:t,value:e}){return typeof e!="object"||e==null?(this.context.errors.add({severity:R.Critical,message:`Expected object but got: ${e==null?"null":typeof e}`}),y.TypeInstantiation.nop()):y.TypeInstantiation.dict(Object.entries(e).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:t.key,value:n,as:"key"}),value:this.convert({typeReference:t.value,value:i})}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertNamed({named:t,value:e,as:n}){switch(t.type){case"alias":return this.convert({typeReference:t.typeReference,value:e,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:t,value:e});case"enum":return this.convertEnum({enum_:t,value:e});case"object":return this.convertObject({object_:t,value:e});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e});default:E(t)}}convertDiscriminatedUnion({discriminatedUnion:t,value:e}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:t,value:e});if(n==null)return y.TypeInstantiation.nop();let i=n.singleDiscriminatedUnionType,o=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:i});if(o==null)return y.TypeInstantiation.nop();let a={name:this.context.getPropertyName(t.discriminant.name),value:y.TypeInstantiation.str(i.discriminantValue.wireValue)};return y.TypeInstantiation.typedDict([a,...o],{multiline:!0})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:t,unionVariant:e}){let n=this.getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e});switch(e.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:e.typeId});if(i==null)return;let o=this.convertNamed({named:i,value:t.value});if(!o.isTypedDict()){this.context.errors.add({severity:R.Critical,message:"Internal error; expected union value to be an object"});return}let a=o.asTypedDictOrThrow();return[...n,...a.entries]}case"singleProperty":try{this.context.errors.scope(e.discriminantValue.wireValue);let i=this.context.getRecord(t.value);return i==null?[...n,{name:Fg,value:this.convert({typeReference:e.typeReference,value:t.value})}]:[...n,{name:this.context.getPropertyName(e.discriminantValue.name),value:this.convert({typeReference:e.typeReference,value:i[e.discriminantValue.wireValue]})}]}finally{this.context.errors.unscope()}case"noProperties":return n;default:E(e)}}getBaseFields({discriminatedUnionTypeInstance:t,singleDiscriminatedUnionType:e}){var i,o;return this.context.associateByWireValue({parameters:(i=e.properties)!=null?i:[],values:(o=this.context.getRecord(t.value))!=null?o:{},ignoreMissingParameters:!0}).map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getPropertyName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})}convertObject({object_:t,value:e}){var i;let n=this.context.associateByWireValue({parameters:t.properties,values:(i=this.context.getRecord(e))!=null?i:{}});return y.TypeInstantiation.typedDict(n.map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getPropertyName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}}),{multiline:!0})}convertEnum({enum_:t,value:e}){let n=this.getEnumValue({enum_:t,value:e});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.str(n)}getEnumValue({enum_:t,value:e}){if(typeof e!="string"){this.context.errors.add({severity:R.Critical,message:`Expected enum value string, got: ${typeof e}`});return}if(t.values.find(i=>i.wireValue===e)==null){this.context.errors.add({severity:R.Critical,message:`An enum value named "${e}" does not exist in this context`});return}return e}convertUndiscriminatedUnion({undiscriminatedUnion:t,value:e}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e});return n==null?y.TypeInstantiation.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:t,value:e}){for(let n of t.types)try{return this.convert({typeReference:n,value:e})}catch(i){continue}this.context.errors.add({severity:R.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof e}" value`})}convertPrimitive({primitive:t,value:e,as:n}){switch(t){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:e,as:n});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.int(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:e});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:e,as:n});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.bool(i)}case"BASE_64":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:e});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.str(i)}case"UUID":{let i=this.context.getValueAsString({value:e});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.uuid(i)}case"DATE":{let i=this.context.getValueAsString({value:e});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:e});return i==null?y.TypeInstantiation.nop():y.TypeInstantiation.datetime(i)}default:E(t)}}getValueAsNumber({value:t,as:e}){let n=e==="key"&&typeof t=="string"?Number(t):t;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:t,as:e}){let n=e==="key"?typeof t=="string"?t==="true":t==="false"?!1:t:t;return this.context.getValueAsBoolean({value:n})}};s();u();var Rr=class{constructor({context:t}){d(this,"context");this.context=t}getFilePropertyInfo({body:t,value:e}){var o;let n={fileFields:[],bodyPropertyFields:[]},i=(o=this.context.getRecord(e))!=null?o:{};for(let a of t.properties)switch(a.type){case"file":{let l=this.getSingleFileProperty({property:a,record:i});if(y.TypeInstantiation.isNop(l))break;n.fileFields.push({name:this.context.getPropertyName(a.name),value:l});break}case"fileArray":{let l=this.getArrayFileProperty({property:a,record:i});if(y.TypeInstantiation.isNop(l))break;n.fileFields.push({name:this.context.getPropertyName(a.name),value:l});break}case"bodyProperty":{let l=this.getBodyProperty({property:a,record:i});if(y.TypeInstantiation.isNop(l))break;n.bodyPropertyFields.push({name:this.context.getPropertyName(a.name.name),value:l});break}default:E(a)}return n}getSingleFileProperty({property:t,record:e}){let n=this.context.getSingleFileValue({property:t,record:e});return n==null?y.TypeInstantiation.nop():this.context.getFileFromString(n)}getArrayFileProperty({property:t,record:e}){let n=this.context.getFileArrayValues({property:t,record:e});return n==null?y.TypeInstantiation.nop():y.TypeInstantiation.list(n.map(i=>this.context.getFileFromString(i)))}getBodyProperty({property:t,record:e}){let n=e[t.name.wireValue];return n==null?y.TypeInstantiation.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:n})}};var Og=["list","set"],Er=class r extends Et{constructor({ir:e,config:n}){var i;super({ir:e,config:n});d(this,"ir");d(this,"customConfig");d(this,"dynamicTypeLiteralMapper");d(this,"filePropertyMapper");this.ir=e,this.customConfig=(i=n.customConfig)!=null?i:{},this.dynamicTypeLiteralMapper=new Tr({context:this}),this.filePropertyMapper=new Rr({context:this})}clone(){return new r({ir:this.ir,config:this.config})}getClassName(e){let n=e.pascalCase.safeName,i=this.getRootClientClassName();return n===i?`${i}Model`:n}getTypedDictClassName(e){return`${this.getClassName(e)}Params`}getPropertyName(e){let n=e.snakeCase.safeName;return n.startsWith("_")?"f_"+n.substring(n.lastIndexOf("_")+1):n}getMethodName(e){return Og.includes(e.snakeCase.unsafeName)?e.snakeCase.unsafeName:e.snakeCase.safeName}getRootClientClassReference(){return y.reference({name:this.getRootClientClassName(),modulePath:this.getRootModulePath()})}getRootClientClassName(){var e,n;return((e=this.customConfig.client)==null?void 0:e.exported_class_name)!=null?this.customConfig.client.exported_class_name:this.customConfig.client_class_name!=null?this.customConfig.client_class_name:((n=this.customConfig.client)==null?void 0:n.class_name)!=null?this.customConfig.client.class_name:this.pascalCase(this.config.organization)+this.pascalCase(this.config.workspaceName)}getEnvironmentClassName(){return`${this.getRootClientClassName()}Environment`}getEnvironmentTypeReferenceFromID(e){let n=this.resolveEnvironmentName(e);if(n!=null)return y.accessAttribute({lhs:this.getEnvironmentClassReference(),rhs:y.codeBlock(this.getEnvironmentEnumName(n))})}getEnvironmentClassReference(){return y.reference({name:this.getEnvironmentClassName(),modulePath:this.getEnvironmentModulePath()})}getEnvironmentEnumName(e){return e.screamingSnakeCase.safeName}isPrimitive(e){switch(e.type){case"primitive":return!0;case"optional":case"nullable":return this.isPrimitive(e.value);case"named":{let n=this.resolveNamedType({typeId:e.value});if(n==null)return!1;switch(n.type){case"alias":return this.isPrimitive(n.typeReference);case"discriminatedUnion":case"undiscriminatedUnion":case"object":case"enum":return!1;default:E(n)}break}case"list":case"set":case"map":case"literal":case"unknown":return!1;default:E(e)}}getFileFromString(e){return y.TypeInstantiation.str(e)}getRootModulePath(){if(this.customConfig.package_name!=null)return[this.customConfig.package_name];let e=this.cleanOrganizationName();return this.customConfig.use_api_name_in_package?[e,this.getApiName()]:[e]}getCoreModulePath(){return this.getRootModulePath().concat("core")}getEnvironmentModulePath(){return this.getRootModulePath().concat("environment")}shouldInlinePathParameters(){return!0}cleanOrganizationName(){return this.config.organization.replace(/[^a-zA-Z0-9]/g,"_")}getApiName(){return Zn(this.config.workspaceName)}pascalCase(e){let n=Qn(e);return n.charAt(0).toUpperCase()+n.slice(1)}};s();u();var Cg={type:"primitive",value:"STRING"},Bg=["example"],Vf="client",Xn="request",Ir=class{constructor({context:t}){d(this,"context");this.context=t}async generateSnippet({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}generateSnippetSync({endpoint:t,request:e}){return this.buildPythonFile({endpoint:t,snippet:e}).toString()}buildPythonFile({endpoint:t,snippet:e}){return y.file({path:Bg,statements:[this.constructClient({endpoint:t,snippet:e}),this.callMethod({endpoint:t,snippet:e})]})}constructClient({endpoint:t,snippet:e}){return y.assign({lhs:y.reference({name:Vf}),rhs:y.instantiateClass({classReference:this.context.getRootClientClassReference(),arguments_:this.getConstructorArgs({endpoint:t,snippet:e}).map(n=>y.methodArgument({name:n.name,value:n.value})),multiline:!0})})}getConstructorArgs({endpoint:t,snippet:e}){let n=[],i=this.getConstructorEnvironmentArgs({baseUrl:e.baseURL,environment:e.environment});return i.length>0&&n.push(...i),t.auth!=null&&(e.auth!=null?n.push(...this.getConstructorAuthArgs({auth:t.auth,values:e.auth})):this.context.errors.add({severity:R.Warning,message:`Auth with ${t.auth.type} configuration is required for this endpoint`})),this.context.errors.scope(M.PathParameters),this.context.ir.pathParameters!=null&&n.push(...this.getPathParameters({namedParameters:this.context.ir.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(M.Headers),this.context.ir.headers!=null&&e.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:e.headers})),this.context.errors.unscope(),n}getConstructorEnvironmentArgs({baseUrl:t,environment:e}){let n=this.getEnvironmentValue({baseUrl:t,environment:e});return n==null?[]:e!=null&&this.context.isMultiEnvironmentValues(e)?[{name:"environment",value:n}]:[{name:this.getEnvironmentOptionName({environment:e}),value:n}]}getEnvironmentValue({baseUrl:t,environment:e}){if(t!=null&&e!=null){this.context.errors.add({severity:R.Critical,message:"Cannot specify both baseUrl and environment options"});return}if(t!=null)return y.TypeInstantiation.str(t);if(e!=null){if(this.context.isSingleEnvironmentID(e)){let n=this.context.getEnvironmentTypeReferenceFromID(e);if(n==null){this.context.errors.add({severity:R.Warning,message:`Environment ${JSON.stringify(e)} was not found`});return}return y.TypeInstantiation.reference(n)}if(this.context.isMultiEnvironmentValues(e))return this.context.validateMultiEnvironmentUrlValues(e)?y.TypeInstantiation.reference(y.instantiateClass({classReference:this.context.getEnvironmentClassReference(),arguments_:Object.entries(e).map(([n,i])=>({name:n,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:Cg,value:i})})).map(n=>y.methodArgument({name:n.name,value:n.value})),multiline:!0})):void 0}}getConstructorAuthArgs({auth:t,values:e}){switch(t.type){case"basic":return e.type!=="basic"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBasicAuthArg({auth:t,values:e});case"bearer":return e.type!=="bearer"?(this.addAuthMismatchError(t,e),[]):this.getConstructorBearerAuthArgs({auth:t,values:e});case"header":return e.type!=="header"?(this.addAuthMismatchError(t,e),[]):this.getConstructorHeaderAuthArgs({auth:t,values:e});case"oauth":return e.type!=="oauth"?(this.addAuthMismatchError(t,e),[]):this.getConstructorOAuthArgs({auth:t,values:e});case"inferred":return e.type!=="inferred"?(this.addAuthMismatchError(t,e),[]):(this.addWarning("The Python SDK Generator does not support Inferred auth scheme yet"),[]);default:E(t)}}addAuthMismatchError(t,e){this.context.errors.add({severity:R.Critical,message:this.context.newAuthMismatchError({auth:t,values:e}).message})}addWarning(t){this.context.errors.add({severity:R.Warning,message:t})}getConstructorBasicAuthArg({auth:t,values:e}){return[{name:this.context.getPropertyName(t.username),value:y.TypeInstantiation.str(e.username)},{name:this.context.getPropertyName(t.password),value:y.TypeInstantiation.str(e.password)}]}getConstructorBearerAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.token),value:y.TypeInstantiation.str(e.token)}]}getConstructorHeaderAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.header.name.name),value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t.header.typeReference,value:e.value})}]}getConstructorOAuthArgs({auth:t,values:e}){return[{name:this.context.getPropertyName(t.clientId),value:y.TypeInstantiation.str(e.clientId)},{name:this.context.getPropertyName(t.clientSecret),value:y.TypeInstantiation.str(e.clientSecret)}]}getConstructorHeaderArgs({headers:t,values:e}){let n=[];for(let i of t){let o=this.getConstructorHeaderArg({header:i,value:e.value});o!=null&&n.push(o)}return n}getConstructorHeaderArg({header:t,value:e}){let n=this.context.dynamicTypeLiteralMapper.convert({typeReference:t.typeReference,value:e});if(!y.TypeInstantiation.isNop(n))return{name:this.context.getPropertyName(t.name.name),value:n}}callMethod({endpoint:t,snippet:e}){return y.invokeMethod({on:y.reference({name:Vf}),method:this.getMethod({endpoint:t}),arguments_:this.getMethodArgs({endpoint:t,snippet:e}).map(n=>y.methodArgument({name:n.name,value:n.value})),multiline:!0})}getMethodArgs({endpoint:t,snippet:e}){switch(t.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:t.request,snippet:e});case"body":return this.getMethodArgsForBodyRequest({request:t.request,snippet:e});default:E(t.request)}}getMethodArgsForBodyRequest({request:t,snippet:e}){var o,a;let n=[];this.context.errors.scope(M.PathParameters);let i=[...(o=this.context.ir.pathParameters)!=null?o:[],...(a=t.pathParameters)!=null?a:[]];return i.length>0&&n.push(...this.getPathParameters({namedParameters:i,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(M.RequestBody),t.body!=null&&n.push(...this.getBodyRequestArgs({body:t.body,value:e.requestBody})),this.context.errors.unscope(),n}getBodyRequestArgs({body:t,value:e}){switch(t.type){case"bytes":return[{name:Xn,value:this.getBytesBodyRequestTypeInstantiation({value:e})}];case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});default:E(t)}}getBodyRequestArgsForTypeReference({typeReference:t,value:e}){switch(t.type){case"named":{let n=this.context.resolveNamedType({typeId:t.value});return n==null?[]:this.getBodyRequestArgsForNamedTypeReference({typeReference:t,named:n,value:e})}case"nullable":case"optional":return this.getBodyRequestArgsForTypeReference({typeReference:t.value,value:e});case"list":case"map":case"set":case"literal":case"primitive":case"unknown":return[{name:Xn,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:e})}];default:E(t)}}getBodyRequestArgsForNamedTypeReference({typeReference:t,named:e,value:n}){var i;switch(e.type){case"alias":return this.getBodyRequestArgsForTypeReference({typeReference:e.typeReference,value:n});case"enum":case"discriminatedUnion":case"undiscriminatedUnion":return[{name:Xn,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:t,value:n})}];case"object":return this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(n))!=null?i:{}}).map(a=>({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)}));default:E(e)}}getBodyRequestArgsForBytes({body:t,value:e}){let n=this.getBytesBodyRequestTypeInstantiation({value:e});return y.TypeInstantiation.isNop(n)?[]:[{name:this.context.getPropertyName(t.bodyKey),value:n}]}getBytesBodyRequestTypeInstantiation({value:t}){return typeof t!="string"?(this.context.errors.add({severity:R.Critical,message:`Expected bytes value to be a string, got ${typeof t}`}),y.TypeInstantiation.nop()):y.TypeInstantiation.bytes(t)}getMethodArgsForInlinedRequest({request:t,snippet:e}){let n=[],i=this.context.shouldInlinePathParameters();this.context.errors.scope(M.PathParameters);let o=[];t.pathParameters!=null&&o.push(...this.getPathParameters({namedParameters:t.pathParameters,snippet:e})),this.context.errors.unscope(),this.context.errors.scope(M.RequestBody);let a=this.getFilePropertyInfo({request:t,snippet:e});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})||n.push(...o),this.context.needsRequestParameter({request:t,inlinePathParameters:i,inlineFileProperties:!0})&&n.push(...this.getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:t,inlinePathParameters:i})?o:[],filePropertyInfo:a})),n}getFilePropertyInfo({request:t,snippet:e}){return t.body==null||!this.context.isFileUploadRequestBody(t.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:t.body,value:e.requestBody})}getInlinedRequestArgs({request:t,snippet:e,pathParameterFields:n,filePropertyInfo:i}){var m,g,v,b;this.context.errors.scope(M.QueryParameters);let a=this.context.associateQueryParametersByWireValue({parameters:(m=t.queryParameters)!=null?m:[],values:(g=e.queryParameters)!=null?g:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(M.Headers);let p=this.context.associateByWireValue({parameters:(v=t.headers)!=null?v:[],values:(b=e.headers)!=null?b:{}}).map(w=>({name:this.context.getPropertyName(w.name.name),value:this.context.dynamicTypeLiteralMapper.convert(w)}));this.context.errors.unscope(),this.context.errors.scope(M.RequestBody);let h=t.body!=null?this.getInlinedRequestBodyObjectFields({body:t.body,value:e.requestBody,filePropertyInfo:i}):[];return this.context.errors.unscope(),[...n,...a,...p,...h]}getInlinedRequestBodyObjectFields({body:t,value:e,filePropertyInfo:n}){switch(t.type){case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:t.value,value:e});case"referenced":return this.getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e});case"fileUpload":return this.getFileUploadRequestBodyObjectFields({filePropertyInfo:n});default:E(t)}}getFileUploadRequestBodyObjectFields({filePropertyInfo:t}){return[...t.fileFields,...t.bodyPropertyFields]}getReferencedRequestBodyPropertyTypeInstantiation({body:t,value:e}){let n=t.bodyType;switch(n.type){case"bytes":return this.getBodyRequestArgsForBytes({body:t,value:e});case"typeReference":return this.getBodyRequestArgsForTypeReference({typeReference:n.value,value:e});default:E(n)}}getInlinedRequestBodyPropertyObjectFields({parameters:t,value:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=this.context.getRecord(e))!=null?o:{}});for(let a of i)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getPathParameters({namedParameters:t,snippet:e}){var o;let n=[],i=this.context.associateByWireValue({parameters:t,values:(o=e.pathParameters)!=null?o:{},ignoreMissingParameters:!0});for(let a of i)n.push({name:this.context.getPropertyName(a.name.name),value:this.context.dynamicTypeLiteralMapper.convert(a)});return n}getMethod({endpoint:t}){return t.declaration.fernFilepath.allParts.length>0?`${t.declaration.fernFilepath.allParts.map(e=>this.context.getMethodName(e)).join(".")}.${this.context.getMethodName(t.declaration.name)}`:this.context.getMethodName(t.declaration.name)}getEnvironmentOptionName({environment:t}){return t!=null?"environment":"base_url"}};var Pr=class extends St{constructor({ir:t,config:e}){super(new Er({ir:t,config:e}))}async generate(t){return super.generate(t)}generateSync(t){return super.generateSync(t)}createSnippetGenerator(t){return new Ir({context:t})}};0&&(module.exports={DynamicSnippetsGenerator});
26
30
  /*! Bundled license information:
27
31
 
28
32
  @esbuild-plugins/node-globals-polyfill/Buffer.js:
@@ -44,3 +48,4 @@ lodash-es/lodash.js:
44
48
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
45
49
  *)
46
50
  */
51
+ //# sourceMappingURL=index.cjs.map