@elixir-playground/runtime 0.0.0-stage → 1.1.0

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 (66) hide show
  1. package/LICENSE +73 -0
  2. package/NOTICE.md +43 -0
  3. package/chunks/ansi-styles-Bkz3XA_r.js +1 -0
  4. package/chunks/browser-iHf7-8M7.js +113 -0
  5. package/chunks/dist-0mSzsNc8.js +10 -0
  6. package/chunks/fs-GnBaZCKr.js +1 -0
  7. package/chunks/git-remote-Bb9EZlDN.js +16 -0
  8. package/chunks/lookup-NMT_UyaB.js +1 -0
  9. package/chunks/manifest-DOTdOkY7.js +2 -0
  10. package/chunks/preload-helper-DHhhL8Zf.js +1 -0
  11. package/chunks/semver-CK47NiDu.js +1 -0
  12. package/chunks/slice-ansi-CtePLJj8.js +1 -0
  13. package/chunks/string-width-Dyomz-Kx.js +1 -0
  14. package/chunks/strip-ansi-B9O1Kiar.js +1 -0
  15. package/chunks/wasi-BuobPCe8.js +1 -0
  16. package/chunks/wrap-ansi-v-UhTxgf.js +9 -0
  17. package/exec.html +10 -0
  18. package/files.js +2 -0
  19. package/frames/browser-C1G3It0R.js +682 -0
  20. package/frames/esbuild-DJd0QPVm.wasm +0 -0
  21. package/frames/exec-C4uIgAUX.js +1 -0
  22. package/frames/host-f4apmOAk.js +1959 -0
  23. package/frames/relay-CFTN70Gw.js +9 -0
  24. package/frames/site-Bq_qZN66.js +1 -0
  25. package/git.js +1 -0
  26. package/licenses/abort-controller-3.0.0/LICENSE +21 -0
  27. package/licenses/ansi-regex-6.4.0/license +9 -0
  28. package/licenses/ansi-styles-6.2.3/license +9 -0
  29. package/licenses/base64-js-1.5.1/LICENSE +21 -0
  30. package/licenses/buffer-6.0.3/LICENSE +21 -0
  31. package/licenses/elixir-playground-playground/LICENSE +73 -0
  32. package/licenses/elixir-playground-playground/NOTICE +11 -0
  33. package/licenses/esbuild-wasm-0.25.4/LICENSE.md +21 -0
  34. package/licenses/events-3.3.0/LICENSE +22 -0
  35. package/licenses/fflate-0.8.2/LICENSE +21 -0
  36. package/licenses/get-east-asian-width-1.7.0/license +9 -0
  37. package/licenses/ieee754-1.2.1/LICENSE +11 -0
  38. package/licenses/index.json +295 -0
  39. package/licenses/is-fullwidth-code-point-5.1.0/license +9 -0
  40. package/licenses/jridgewell_gen-mapping-0.3.13/LICENSE +19 -0
  41. package/licenses/jridgewell_resolve-uri-3.1.2/LICENSE +19 -0
  42. package/licenses/jridgewell_sourcemap-codec-1.6.0/LICENSE +19 -0
  43. package/licenses/jridgewell_trace-mapping-0.3.31/LICENSE +19 -0
  44. package/licenses/lines-and-columns-1.2.4/LICENSE +21 -0
  45. package/licenses/noble_hashes-2.0.1/LICENSE +21 -0
  46. package/licenses/readable-stream-4.7.0/LICENSE +47 -0
  47. package/licenses/safe-buffer-5.2.1/LICENSE +21 -0
  48. package/licenses/semver-7.7.3/LICENSE +15 -0
  49. package/licenses/slice-ansi-9.0.1/license +10 -0
  50. package/licenses/smol-toml-1.9.1/LICENSE +24 -0
  51. package/licenses/string-width-8.3.0/license +9 -0
  52. package/licenses/string_decoder-1.3.0/LICENSE +48 -0
  53. package/licenses/strip-ansi-7.2.0/license +9 -0
  54. package/licenses/sucrase-3.35.0/LICENSE +21 -0
  55. package/licenses/tailwindcss-4.3.3/LICENSE +21 -0
  56. package/licenses/ts-interface-checker-0.1.13/LICENSE +201 -0
  57. package/licenses/vite-8.3.4/LICENSE.md +2265 -0
  58. package/licenses/wrap-ansi-10.0.2/license +9 -0
  59. package/licenses/yaml-2.9.1/LICENSE +13 -0
  60. package/nodejs.js +181 -0
  61. package/package.json +56 -4
  62. package/relay.html +10 -0
  63. package/root/relay.html +30 -0
  64. package/root/sw.js +1 -0
  65. package/worker.js +15 -0
  66. package/README.md +0 -3
package/nodejs.js ADDED
@@ -0,0 +1,181 @@
1
+ import{n as e,v as t}from"./chunks/fs-GnBaZCKr.js";import{c as n,d as r,l as i,n as a,o,s,t as c,u as l}from"./chunks/wasi-BuobPCe8.js";import{t as u}from"./chunks/preload-helper-DHhhL8Zf.js";var d=Object.create,f=Object.defineProperty,p=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,h=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,_=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},v=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),y=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t||f(n,Symbol.toStringTag,{value:`Module`}),n},b=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=m(t),a=0,o=i.length,s;a<o;a++)s=i[a],!g.call(e,s)&&s!==n&&f(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=p(t,s))||r.enumerable});return e},x=(e,t,n)=>(n=e==null?{}:d(h(e)),b(t||!e||!e.__esModule||!g.call(e,`default`)?f(n,`default`,{value:e,enumerable:!0}):n,e)),S=e=>g.call(e,`module.exports`)?e[`module.exports`]:b(f({},`__esModule`,{value:!0}),e),C=v((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){for(var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),w=v((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),T=v((e=>{var t=C(),n=w(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(xe(e,ArrayBuffer)||e&&xe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(xe(e,SharedArrayBuffer)||e&&xe(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);let i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){let t=e.length<0?0:_(e.length)|0,n=o(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(xe(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){let t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||Se(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(xe(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),xe(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(xe(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||xe(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return ge(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return ye(e).length;default:if(i)return r?-1:ge(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return ee(this,t,n);case`utf8`:case`utf-8`:return M(this,t,n);case`ascii`:return F(this,t,n);case`latin1`:case`binary`:return I(this,t,n);case`base64`:return j(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return te(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?M(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||s.compare(this,e)===0},s.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(xe(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<c;++e)if(l[e]!==u[e]){a=l[e],o=u[e];break}return a<o?-1:+(o<a)};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Se(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:T(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function T(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function E(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o=0;for(;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(Se(r))return o;e[n+o]=r}return o}function D(e,t,n,r){return be(ge(t,e.length-n),e,n,r)}function O(e,t,n,r){return be(_e(t),e,n,r)}function k(e,t,n,r){return be(ye(t),e,n,r)}function A(e,t,n,r){return be(ve(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return E(this,e,t,n);case`utf8`:case`utf-8`:return D(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return O(this,e,t,n);case`base64`:return k(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return A(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function j(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function M(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return P(r)}var N=4096;function P(e){let t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=N));return n}function F(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function I(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function ee(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=Ce[e[r]];return i}function te(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function L(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=we(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pe(e,this.length-8);let r=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*256+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=we(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pe(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*256+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=we(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pe(e,this.length-8);let r=this[e+4]+this[e+5]*256+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*256+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=we(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&pe(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*256+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!1,52,8)};function R(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;R(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;R(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function ne(e,t,n,r,i){de(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function re(e,t,n,r,i){de(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}s.prototype.writeBigUInt64LE=we(function(e,t=0){return ne(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeBigUInt64BE=we(function(e,t=0){return re(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);R(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);R(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=we(function(e,t=0){return ne(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),s.prototype.writeBigInt64BE=we(function(e,t=0){return re(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function ie(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function ae(e,t,r,i,a){return t=+t,r>>>=0,a||ie(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return ae(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return ae(this,e,t,!1,n)};function oe(e,t,r,i,a){return t=+t,r>>>=0,a||ie(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return oe(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return oe(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=s.isBuffer(e)?e:s.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};var se={};function ce(e,t,n){se[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}ce(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),ce(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),ce(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=le(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=le(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function le(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function ue(e,t,n){fe(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&pe(t,e.length-(n+1))}function de(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new se.ERR_OUT_OF_RANGE(`value`,i,e)}ue(r,i,a)}function fe(e,t){if(typeof e!=`number`)throw new se.ERR_INVALID_ARG_TYPE(t,`number`,e)}function pe(e,t,n){throw Math.floor(e)===e?t<0?new se.ERR_BUFFER_OUT_OF_BOUNDS:new se.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(fe(e,n),new se.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var me=/[^+/0-9A-Za-z-_]/g;function he(e){if(e=e.split(`=`)[0],e=e.trim().replace(me,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function ge(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function _e(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function ve(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function ye(e){return t.toByteArray(he(e))}function be(e,t,n,r){let i=0;for(;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function xe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Se(e){return e!==e}var Ce=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function we(e){return typeof BigInt>`u`?Te:e}function Te(){throw Error(`BigInt not supported`)}})),E=T(),D=e=>e.replace(/-/g,`+`).replace(/_/g,`/`),O=e=>e.replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``),k=e=>typeof e==`string`&&e.toLowerCase()===`base64url`,A=E.Buffer.prototype,j=A.toString;A.toString=function(e,...t){return k(e)?O(j.apply(this,[`base64`,...t])):j.apply(this,[e,...t])};var M=A.write;A.write=function(e,...t){let n=t.findIndex(k);return n===-1?M.apply(this,[e,...t]):(t[n]=`base64`,M.apply(this,[D(String(e)),...t]))};var N=E.Buffer,P=N.from;N.from=function(e,t,...n){return typeof e==`string`&&k(t)?P.call(E.Buffer,D(e),`base64`):P.apply(E.Buffer,[e,t,...n])};var F=N.byteLength;N.byteLength=function(e,t){return typeof e==`string`&&k(t)?F.call(E.Buffer,D(e),`base64`):F.call(E.Buffer,e,t)};var I=N.isEncoding;N.isEncoding=e=>k(e)||I.call(E.Buffer,e);var ee=v(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),te=v(((e,t)=>{t.exports={AggregateError:class extends Error{constructor(e){if(!Array.isArray(e))throw TypeError(`Expected input to be an Array, got ${typeof e}`);let t=``;for(let n=0;n<e.length;n++)t+=` ${e[n].stack}\n`;super(t),this.name=`AggregateError`,this.errors=e}},ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:2**53-1,NumberMIN_SAFE_INTEGER:-(2**53-1),NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol(`Symbol.dispose`),SymbolAsyncDispose:Symbol.asyncDispose||Symbol(`Symbol.asyncDispose`),TypedArrayPrototypeSet(e,t,n){return e.set(t,n)},Boolean,Uint8Array}})),L=v(((e,t)=>{t.exports={format(e,...t){return e.replace(/%([sdifj])/g,function(...[e,n]){let r=t.shift();return n===`f`?r.toFixed(6):n===`j`?JSON.stringify(r):n===`s`&&typeof r==`object`?`${r.constructor===Object?``:r.constructor.name} {}`.trim():r.toString()})},inspect(e){switch(typeof e){case`string`:if(e.includes(`'`)){if(!e.includes(`"`))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case`number`:return isNaN(e)?`NaN`:Object.is(e,-0)?String(e):e;case`bigint`:return`${String(e)}n`;case`boolean`:case`undefined`:return String(e);case`object`:return`{}`}}}})),R=v(((e,t)=>{var{format:n,inspect:r}=L(),{AggregateError:i}=te(),a=globalThis.AggregateError||i,o=Symbol(`kIsNodeError`),s=[`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`],c=/^([A-Z][a-z0-9]*)+$/,l=`__node_internal_`,u={};function d(e,t){if(!e)throw new u.ERR_INTERNAL_ASSERTION(t)}function f(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function p(e,t,r){if(typeof t==`function`)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);let i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?t:n(t,...r)}function m(e,t,n){n||=Error;class r extends n{constructor(...n){super(p(e,t,n))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[o]=!0,u[e]=r}function h(e){let t=l+e.name;return Object.defineProperty(e,"name",{value:t}),e}function g(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let n=new a([t,e],t.message);return n.code=t.code,n}return e||t}var _=class extends Error{constructor(e=`The operation was aborted`,t=void 0){if(t!==void 0&&typeof t!=`object`)throw new u.ERR_INVALID_ARG_TYPE(`options`,`Object`,t);super(e,t),this.code=`ABORT_ERR`,this.name=`AbortError`}};m(`ERR_ASSERTION`,`%s`,Error),m(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{d(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let i=`The `;e.endsWith(` argument`)?i+=`${e} `:i+=`"${e}" ${e.includes(`.`)?`property`:`argument`} `,i+=`must be `;let a=[],o=[],l=[];for(let e of t)d(typeof e==`string`,`All expected entries have to be of type string`),s.includes(e)?a.push(e.toLowerCase()):c.test(e)?o.push(e):(d(e!==`object`,`The value "object" should be written as "Object"`),l.push(e));if(o.length>0){let e=a.indexOf(`object`);e!==-1&&(a.splice(a,e,1),o.push(`Object`))}if(a.length>0){switch(a.length){case 1:i+=`of type ${a[0]}`;break;case 2:i+=`one of type ${a[0]} or ${a[1]}`;break;default:{let e=a.pop();i+=`one of type ${a.join(`, `)}, or ${e}`}}(o.length>0||l.length>0)&&(i+=` or `)}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let e=o.pop();i+=`an instance of ${o.join(`, `)}, or ${e}`}}l.length>0&&(i+=` or `)}switch(l.length){case 0:break;case 1:l[0].toLowerCase()!==l[0]&&(i+=`an `),i+=`${l[0]}`;break;case 2:i+=`one of ${l[0]} or ${l[1]}`;break;default:{let e=l.pop();i+=`one of ${l.join(`, `)}, or ${e}`}}if(n==null)i+=`. Received ${n}`;else if(typeof n==`function`&&n.name)i+=`. Received function ${n.name}`;else if(typeof n==`object`){var u;if((u=n.constructor)!=null&&u.name)i+=`. Received an instance of ${n.constructor.name}`;else{let e=r(n,{depth:-1});i+=`. Received ${e}`}}else{let e=r(n,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),i+=`. Received type ${typeof n} (${e})`}return i},TypeError),m(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let i=r(t);return i.length>128&&(i=i.slice(0,128)+`...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${i}`},TypeError),m(`ERR_INVALID_RETURN_VALUE`,(e,t,n)=>{var r;return`Expected ${e} to be returned from the "${t}" function but got ${n!=null&&(r=n.constructor)!=null&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`}.`},TypeError),m(`ERR_MISSING_ARGS`,(...e)=>{d(e.length>0,`At least one arg needs to be specified`);let t,n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(` or `),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let n=e.pop();t+=`The ${e.join(`, `)}, and ${n} arguments`}}return`${t} must be specified`},TypeError),m(`ERR_OUT_OF_RANGE`,(e,t,n)=>{d(t,`Missing "range" argument`);let i;if(Number.isInteger(n)&&Math.abs(n)>2**32)i=f(String(n));else if(typeof n==`bigint`){i=String(n);let e=BigInt(2)**BigInt(32);(n>e||n<-e)&&(i=f(i)),i+=`n`}else i=r(n);return`The value of "${e}" is out of range. It must be ${t}. Received ${i}`},RangeError),m(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`,Error),m(`ERR_METHOD_NOT_IMPLEMENTED`,`The %s method is not implemented`,Error),m(`ERR_STREAM_ALREADY_FINISHED`,`Cannot call %s after a stream was finished`,Error),m(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`,Error),m(`ERR_STREAM_DESTROYED`,`Cannot call %s after a stream was destroyed`,Error),m(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),m(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`,Error),m(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`,Error),m(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`,Error),m(`ERR_STREAM_WRITE_AFTER_END`,`write after end`,Error),m(`ERR_UNKNOWN_ENCODING`,`Unknown encoding: %s`,TypeError),t.exports={AbortError:_,aggregateTwoErrors:h(g),hideStackFrames:h,codes:u}})),ne=v(((e,t)=>{var{AbortController:n,AbortSignal:r}=typeof self<`u`?self:typeof window<`u`?window:void 0;t.exports=n,t.exports.AbortSignal=r,t.exports.default=n})),re=v(((e,t)=>{var n=T(),{format:r,inspect:i}=L(),{codes:{ERR_INVALID_ARG_TYPE:a}}=R(),{kResistStopPropagation:o,AggregateError:s,SymbolDispose:c}=te(),l=globalThis.AbortSignal||ne().AbortSignal,u=globalThis.AbortController||ne().AbortController,d=Object.getPrototypeOf(async function(){}).constructor,f=globalThis.Blob||n.Blob,p=f===void 0?function(e){return!1}:function(e){return e instanceof f},m=(e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new a(t,`AbortSignal`,e)},h=(e,t)=>{if(typeof e!=`function`)throw new a(t,`Function`,e)};t.exports={AggregateError:s,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...n){t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},promisify(e){return new Promise((t,n)=>{e((e,...r)=>e?n(e):t(...r))})},debuglog(){return function(){}},format:r,inspect:i,types:{isAsyncFunction(e){return e instanceof d},isArrayBufferView(e){return ArrayBuffer.isView(e)}},isBlob:p,deprecate(e,t){return e},addAbortListener:ee().addAbortListener||function(e,t){if(e===void 0)throw new a(`signal`,`AbortSignal`,e);m(e,`signal`),h(t,`listener`);let n;return e.aborted?queueMicrotask(()=>t()):(e.addEventListener(`abort`,t,{__proto__:null,once:!0,[o]:!0}),n=()=>{e.removeEventListener(`abort`,t)}),{__proto__:null,[c](){var e;(e=n)==null||e()}}},AbortSignalAny:l.any||function(e){if(e.length===1)return e[0];let t=new u,n=()=>t.abort();return e.forEach(e=>{m(e,`signals`),e.addEventListener(`abort`,n,{once:!0})}),t.signal.addEventListener(`abort`,()=>{e.forEach(e=>e.removeEventListener(`abort`,n))},{once:!0}),t.signal}},t.exports.promisify.custom=Symbol.for(`nodejs.util.promisify.custom`)})),ie=v(((e,t)=>{var{ArrayIsArray:n,ArrayPrototypeIncludes:r,ArrayPrototypeJoin:i,ArrayPrototypeMap:a,NumberIsInteger:o,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:f,String:p,StringPrototypeToUpperCase:m,StringPrototypeTrim:h}=te(),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:_,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:y,ERR_OUT_OF_RANGE:b,ERR_UNKNOWN_SIGNAL:x}}=R(),{normalizeEncoding:S}=re(),{isAsyncFunction:C,isArrayBufferView:w}=re().types,T={};function E(e){return e===(e|0)}function D(e){return e===e>>>0}var O=/^[0-7]+$/,k=`must be a 32-bit unsigned integer or an octal string`;function A(e,t,n){if(e===void 0&&(e=n),typeof e==`string`){if(f(O,e)===null)throw new y(t,e,k);e=u(e,8)}return N(e,t),e}var j=g((e,t,n=l,r=c)=>{if(typeof e!=`number`)throw new v(t,`number`,e);if(!o(e))throw new b(t,`an integer`,e);if(e<n||e>r)throw new b(t,`>= ${n} && <= ${r}`,e)}),M=g((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!=`number`)throw new v(t,`number`,e);if(!o(e))throw new b(t,`an integer`,e);if(e<n||e>r)throw new b(t,`>= ${n} && <= ${r}`,e)}),N=g((e,t,n=!1)=>{if(typeof e!=`number`)throw new v(t,`number`,e);if(!o(e))throw new b(t,`an integer`,e);let r=+!!n,i=4294967295;if(e<r||e>i)throw new b(t,`>= ${r} && <= ${i}`,e)});function P(e,t){if(typeof e!=`string`)throw new v(t,`string`,e)}function F(e,t,n=void 0,r){if(typeof e!=`number`)throw new v(t,`number`,e);if(n!=null&&e<n||r!=null&&e>r||(n!=null||r!=null)&&s(e))throw new b(t,`${n==null?``:`>= ${n}`}${n!=null&&r!=null?` && `:``}${r==null?``:`<= ${r}`}`,e)}var I=g((e,t,n)=>{if(!r(n,e))throw new y(t,e,`must be one of: `+i(a(n,e=>typeof e==`string`?`'${e}'`:p(e)),`, `))});function ee(e,t){if(typeof e!=`boolean`)throw new v(t,`boolean`,e)}function L(e,t,n){return e==null||!d(e,t)?n:e[t]}var ne=g((e,t,r=null)=>{let i=L(r,`allowArray`,!1),a=L(r,`allowFunction`,!1);if(!L(r,`nullable`,!1)&&e===null||!i&&n(e)||typeof e!=`object`&&(!a||typeof e!=`function`))throw new v(t,`Object`,e)}),ie=g((e,t)=>{if(e!=null&&typeof e!=`object`&&typeof e!=`function`)throw new v(t,`a dictionary`,e)}),ae=g((e,t,r=0)=>{if(!n(e))throw new v(t,`Array`,e);if(e.length<r)throw new y(t,e,`must be longer than ${r}`)});function oe(e,t){ae(e,t);for(let n=0;n<e.length;n++)P(e[n],`${t}[${n}]`)}function se(e,t){ae(e,t);for(let n=0;n<e.length;n++)ee(e[n],`${t}[${n}]`)}function ce(e,t){ae(e,t);for(let n=0;n<e.length;n++){let r=e[n],i=`${t}[${n}]`;if(r==null)throw new v(i,`AbortSignal`,r);pe(r,i)}}function le(e,t=`signal`){if(P(e,t),T[e]===void 0)throw T[m(e)]===void 0?new x(e):new x(e+` (signals must use all capital letters)`)}var ue=g((e,t=`buffer`)=>{if(!w(e))throw new v(t,[`Buffer`,`TypedArray`,`DataView`],e)});function de(e,t){let n=S(t),r=e.length;if(n===`hex`&&r%2!=0)throw new y(`encoding`,t,`is invalid for data of length ${r}`)}function fe(e,t=`Port`,n=!0){if(typeof e!=`number`&&typeof e!=`string`||typeof e==`string`&&h(e).length===0||+e!=e>>>0||e>65535||e===0&&!n)throw new _(t,e,n);return e|0}var pe=g((e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new v(t,`AbortSignal`,e)}),me=g((e,t)=>{if(typeof e!=`function`)throw new v(t,`Function`,e)}),he=g((e,t)=>{if(typeof e!=`function`||C(e))throw new v(t,`Function`,e)}),ge=g((e,t)=>{if(e!==void 0)throw new v(t,`undefined`,e)});function _e(e,t,n){if(!r(n,e))throw new v(t,`('${i(n,`|`)}')`,e)}var ve=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function ye(e,t){if(e===void 0||!f(ve,e))throw new y(t,e,`must be an array or string of format "</styles.css>; rel=preload; as=style"`)}function be(e){if(typeof e==`string`)return ye(e,`hints`),e;if(n(e)){let t=e.length,n=``;if(t===0)return n;for(let r=0;r<t;r++){let i=e[r];ye(i,`hints`),n+=i,r!==t-1&&(n+=`, `)}return n}throw new y(`hints`,e,`must be an array or string of format "</styles.css>; rel=preload; as=style"`)}t.exports={isInt32:E,isUint32:D,parseFileMode:A,validateArray:ae,validateStringArray:oe,validateBooleanArray:se,validateAbortSignalArray:ce,validateBoolean:ee,validateBuffer:ue,validateDictionary:ie,validateEncoding:de,validateFunction:me,validateInt32:M,validateInteger:j,validateNumber:F,validateObject:ne,validateOneOf:I,validatePlainFunction:he,validatePort:fe,validateSignalName:le,validateString:P,validateUint32:N,validateUndefined:ge,validateUnion:_e,validateAbortSignal:pe,validateLinkHeaderValue:be}})),ae=y({default:()=>le,env:()=>ce,nextTick:()=>oe,stderr:()=>void 0,stdout:()=>void 0});function oe(e,...t){let n=se();if(n&&n!==le&&typeof n.nextTick==`function`)return n.nextTick(e,...t);queueMicrotask(()=>e(...t))}var se,ce,le,ue=_((()=>{se=()=>globalThis.process,ce={},le={nextTick:oe,env:ce,stdout:void 0,stderr:void 0}})),de=v(((e,t)=>{var{SymbolAsyncIterator:n,SymbolIterator:r,SymbolFor:i}=te(),a=i(`nodejs.stream.destroyed`),o=i(`nodejs.stream.errored`),s=i(`nodejs.stream.readable`),c=i(`nodejs.stream.writable`),l=i(`nodejs.stream.disturbed`),u=i(`nodejs.webstream.isClosedPromise`),d=i(`nodejs.webstream.controllerErrorFunction`);function f(e,t=!1){return!(!e||typeof e.pipe!=`function`||typeof e.on!=`function`||t&&(typeof e.pause!=`function`||typeof e.resume!=`function`)||e._writableState&&e._readableState?.readable===!1||e._writableState&&!e._readableState)}function p(e){return!(!e||typeof e.write!=`function`||typeof e.on!=`function`||e._readableState&&e._writableState?.writable===!1)}function m(e){return!!(e&&typeof e.pipe==`function`&&e._readableState&&typeof e.on==`function`&&typeof e.write==`function`)}function h(e){return e&&(e._readableState||e._writableState||typeof e.write==`function`&&typeof e.on==`function`||typeof e.pipe==`function`&&typeof e.on==`function`)}function g(e){return!(!e||h(e)||typeof e.pipeThrough!=`function`||typeof e.getReader!=`function`||typeof e.cancel!=`function`)}function _(e){return!(!e||h(e)||typeof e.getWriter!=`function`||typeof e.abort!=`function`)}function v(e){return!(!e||h(e)||typeof e.readable!=`object`||typeof e.writable!=`object`)}function y(e){return g(e)||_(e)||v(e)}function b(e,t){return e==null?!1:t===!0?typeof e[n]==`function`:t===!1?typeof e[r]==`function`:typeof e[n]==`function`||typeof e[r]==`function`}function x(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[a]||r!=null&&r.destroyed)}function S(e){if(!p(e))return null;if(e.writableEnded===!0)return!0;let t=e._writableState;return t!=null&&t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function C(e,t){if(!p(e))return null;if(e.writableFinished===!0)return!0;let n=e._writableState;return n!=null&&n.errored?!1:typeof n?.finished==`boolean`?!!(n.finished||t===!1&&n.ended===!0&&n.length===0):null}function w(e){if(!f(e))return null;if(e.readableEnded===!0)return!0;let t=e._readableState;return!t||t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function T(e,t){if(!f(e))return null;let n=e._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted==`boolean`?!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0):null}function E(e){return e&&e[s]!=null?e[s]:typeof e?.readable==`boolean`?!x(e)&&f(e)&&e.readable&&!T(e):null}function D(e){return e&&e[c]!=null?e[c]:typeof e?.writable==`boolean`?!x(e)&&p(e)&&e.writable&&!S(e):null}function O(e,t){return h(e)?x(e)?!0:!(t?.readable!==!1&&E(e)||t?.writable!==!1&&D(e)):null}function k(e){return h(e)?e.writableErrored?e.writableErrored:e._writableState?.errored??null:null}function A(e){return h(e)?e.readableErrored?e.readableErrored:e._readableState?.errored??null:null}function j(e){if(!h(e))return null;if(typeof e.closed==`boolean`)return e.closed;let t=e._writableState,n=e._readableState;return typeof t?.closed==`boolean`||typeof n?.closed==`boolean`?t?.closed||n?.closed:typeof e._closed==`boolean`&&M(e)?e._closed:null}function M(e){return typeof e._closed==`boolean`&&typeof e._defaultKeepAlive==`boolean`&&typeof e._removedConnection==`boolean`&&typeof e._removedContLen==`boolean`}function N(e){return typeof e._sent100==`boolean`&&M(e)}function P(e){return typeof e._consuming==`boolean`&&typeof e._dumped==`boolean`&&e.req?.upgradeOrConnect===void 0}function F(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!r&&N(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function I(e){return!!(e&&(e[l]??(e.readableDidRead||e.readableAborted)))}function ee(e){return!!(e&&(e[o]??e.readableErrored??e.writableErrored??e._readableState?.errorEmitted??e._writableState?.errorEmitted??e._readableState?.errored??e._writableState?.errored))}t.exports={isDestroyed:x,kIsDestroyed:a,isDisturbed:I,kIsDisturbed:l,isErrored:ee,kIsErrored:o,isReadable:E,kIsReadable:s,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:c,isClosed:j,isDuplexNodeStream:m,isFinished:O,isIterable:b,isReadableNodeStream:f,isReadableStream:g,isReadableEnded:w,isReadableFinished:T,isReadableErrored:A,isNodeStream:h,isWebStream:y,isWritable:D,isWritableNodeStream:p,isWritableStream:_,isWritableEnded:S,isWritableFinished:C,isWritableErrored:k,isServerRequest:P,isServerResponse:N,willEmitClose:F,isTransformStream:v}})),fe=v(((e,t)=>{var n=(ue(),S(ae)),{AbortError:r,codes:i}=R(),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:o}=i,{kEmptyObject:s,once:c}=re(),{validateAbortSignal:l,validateFunction:u,validateObject:d,validateBoolean:f}=ie(),{Promise:p,PromisePrototypeThen:m,SymbolDispose:h}=te(),{isClosed:g,isReadable:_,isReadableNodeStream:v,isReadableStream:y,isReadableFinished:b,isReadableErrored:x,isWritable:C,isWritableNodeStream:w,isWritableStream:T,isWritableFinished:E,isWritableErrored:D,isNodeStream:O,willEmitClose:k,kIsClosedPromise:A}=de(),j;function M(e){return e.setHeader&&typeof e.abort==`function`}var N=()=>{};function P(e,t,i){if(arguments.length===2?(i=t,t=s):t==null?t=s:d(t,`options`),u(i,`callback`),l(t.signal,`options.signal`),i=c(i),y(e)||T(e))return F(e,t,i);if(!O(e))throw new a(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],e);let f=t.readable??v(e),p=t.writable??w(e),m=e._writableState,S=e._readableState,A=()=>{e.writable||ee()},P=k(e)&&v(e)===f&&w(e)===p,I=E(e,!1),ee=()=>{I=!0,e.destroyed&&(P=!1),(!P||e.readable&&!f)&&(!f||te)&&i.call(e)},te=b(e,!1),L=()=>{te=!0,e.destroyed&&(P=!1),(!P||e.writable&&!p)&&(!p||I)&&i.call(e)},R=t=>{i.call(e,t)},ne=g(e),ie=()=>{ne=!0;let t=D(e)||x(e);if(t&&typeof t!=`boolean`)return i.call(e,t);if(f&&!te&&v(e,!0)&&!b(e,!1)||p&&!I&&!E(e,!1))return i.call(e,new o);i.call(e)},ae=()=>{ne=!0;let t=D(e)||x(e);if(t&&typeof t!=`boolean`)return i.call(e,t);i.call(e)},oe=()=>{e.req.on(`finish`,ee)};M(e)?(e.on(`complete`,ee),P||e.on(`abort`,ie),e.req?oe():e.on(`request`,oe)):p&&!m&&(e.on(`end`,A),e.on(`close`,A)),!P&&typeof e.aborted==`boolean`&&e.on(`aborted`,ie),e.on(`end`,L),e.on(`finish`,ee),t.error!==!1&&e.on(`error`,R),e.on(`close`,ie),ne?n.nextTick(ie):m!=null&&m.errorEmitted||S!=null&&S.errorEmitted?P||n.nextTick(ae):(!f&&(!P||_(e))&&(I||C(e)===!1)||!p&&(!P||C(e))&&(te||_(e)===!1)||S&&e.req&&e.aborted)&&n.nextTick(ae);let se=()=>{i=N,e.removeListener(`aborted`,ie),e.removeListener(`complete`,ee),e.removeListener(`abort`,ie),e.removeListener(`request`,oe),e.req&&e.req.removeListener(`finish`,ee),e.removeListener(`end`,A),e.removeListener(`close`,A),e.removeListener(`finish`,ee),e.removeListener(`end`,L),e.removeListener(`error`,R),e.removeListener(`close`,ie)};if(t.signal&&!ne){let a=()=>{let n=i;se(),n.call(e,new r(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{j||=re().addAbortListener;let n=j(t.signal,a),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}}return se}function F(e,t,i){let a=!1,o=N;if(t.signal){if(o=()=>{a=!0,i.call(e,new r(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(o);else{j||=re().addAbortListener;let n=j(t.signal,o),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}}let s=(...t)=>{a||n.nextTick(()=>i.apply(e,t))};return m(e[A].promise,s,s),N}function I(e,t){var n;let r=!1;return t===null&&(t=s),(n=t)!=null&&n.cleanup&&(f(t.cleanup,`cleanup`),r=t.cleanup),new p((n,i)=>{let a=P(e,t,e=>{r&&a(),e?i(e):n()})})}t.exports=P,t.exports.finished=I})),pe=v(((e,t)=>{var n=(ue(),S(ae)),{aggregateTwoErrors:r,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:a}=R(),{Symbol:o}=te(),{kIsDestroyed:s,isDestroyed:c,isFinished:l,isServerRequest:u}=de(),d=o(`kDestroy`),f=o(`kConstruct`);function p(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function m(e,t){let n=this._readableState,i=this._writableState,a=i||n;return i!=null&&i.destroyed||n!=null&&n.destroyed?(typeof t==`function`&&t(),this):(p(e,i,n),i&&(i.destroyed=!0),n&&(n.destroyed=!0),a.constructed?h(this,e,t):this.once(d,function(n){h(this,r(n,e),t)}),this)}function h(e,t,r){let i=!1;function a(t){if(i)return;i=!0;let a=e._readableState,o=e._writableState;p(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),typeof r==`function`&&r(t),t?n.nextTick(g,e,t):n.nextTick(_,e)}try{e._destroy(t||null,a)}catch(e){a(e)}}function g(e,t){v(e,t),_(e)}function _(e){let t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit(`close`)}function v(e,t){let n=e._readableState,r=e._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit(`error`,t))}function y(){let e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function b(e,t,r){let i=e._readableState,a=e._writableState;if(a!=null&&a.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||a!=null&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(v,e,t):v(e,t))}function x(e,t){if(typeof e._construct!=`function`)return;let r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(f,t),!(e.listenerCount(f)>1)&&n.nextTick(C,e)}function C(e){let t=!1;function r(r){if(t){b(e,r??new i);return}t=!0;let a=e._readableState,o=e._writableState,s=o||a;a&&(a.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(d,r):r?b(e,r,!0):n.nextTick(w,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function w(e){e.emit(f)}function T(e){return e?.setHeader&&typeof e.abort==`function`}function E(e){e.emit(`close`)}function D(e,t){e.emit(`error`,t),n.nextTick(E,e)}function O(e,t){e&&!c(e)&&(!t&&!l(e)&&(t=new a),u(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():typeof e.destroy==`function`?e.destroy(t):typeof e.close==`function`?e.close():t?n.nextTick(D,e,t):n.nextTick(E,e),e.destroyed||(e[s]=!0))}t.exports={construct:x,destroyer:O,destroy:m,undestroy:y,errorOrDestroy:b}})),me=v(((e,t)=>{var{ArrayIsArray:n,ObjectSetPrototypeOf:r}=te(),{EventEmitter:i}=ee();function a(e){i.call(this,e)}r(a.prototype,i.prototype),r(a,i),a.prototype.pipe=function(e,t){let n=this;function r(t){e.writable&&e.write(t)===!1&&n.pause&&n.pause()}n.on(`data`,r);function a(){n.readable&&n.resume&&n.resume()}e.on(`drain`,a),!e._isStdio&&(!t||t.end!==!1)&&(n.on(`end`,c),n.on(`close`,l));let s=!1;function c(){s||(s=!0,e.end())}function l(){s||(s=!0,typeof e.destroy==`function`&&e.destroy())}function u(e){d(),i.listenerCount(this,`error`)===0&&this.emit(`error`,e)}o(n,`error`,u),o(e,`error`,u);function d(){n.removeListener(`data`,r),e.removeListener(`drain`,a),n.removeListener(`end`,c),n.removeListener(`close`,l),n.removeListener(`error`,u),e.removeListener(`error`,u),n.removeListener(`end`,d),n.removeListener(`close`,d),e.removeListener(`close`,d)}return n.on(`end`,d),n.on(`close`,d),e.on(`close`,d),e.emit(`pipe`,n),e};function o(e,t,r){if(typeof e.prependListener==`function`)return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}t.exports={Stream:a,prependListener:o}})),he=v(((e,t)=>{var{SymbolDispose:n}=te(),{AbortError:r,codes:i}=R(),{isNodeStream:a,isWebStream:o,kControllerErrorFunction:s}=de(),c=fe(),{ERR_INVALID_ARG_TYPE:l}=i,u,d=(e,t)=>{if(typeof e!=`object`||!(`aborted`in e))throw new l(t,`AbortSignal`,e)};t.exports.addAbortSignal=function(e,n){if(d(e,`signal`),!a(n)&&!o(n))throw new l(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],n);return t.exports.addAbortSignalNoValidate(e,n)},t.exports.addAbortSignalNoValidate=function(e,t){if(typeof e!=`object`||!(`aborted`in e))return t;let i=a(t)?()=>{t.destroy(new r(void 0,{cause:e.reason}))}:()=>{t[s](new r(void 0,{cause:e.reason}))};return e.aborted?i():(u||=re().addAbortListener,c(t,u(e,i)[n])),t}})),ge=v(((e,t)=>{var{StringPrototypeSlice:n,SymbolIterator:r,TypedArrayPrototypeSet:i,Uint8Array:a}=te(),{Buffer:o}=T(),{inspect:s}=re();t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){let t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.head=this.length===1?this.tail=null:this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return``;let t=this.head,n=``+t.data;for(;(t=t.next)!==null;)n+=e+t.data;return n}concat(e){if(this.length===0)return o.alloc(0);let t=o.allocUnsafe(e>>>0),n=this.head,r=0;for(;n;)i(t,n.data,r),r+=n.data.length,n=n.next;return t}consume(e,t){let n=this.head.data;if(e<n.length){let t=n.slice(0,e);return this.head.data=n.slice(e),t}return e===n.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[r](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t=``,r=this.head,i=0;do{let a=r.data;if(e>a.length)t+=a,e-=a.length;else{e===a.length?(t+=a,++i,this.head=r.next?r.next:this.tail=null):(t+=n(a,0,e),this.head=r,r.data=n(a,e));break}++i}while((r=r.next)!==null);return this.length-=i,t}_getBuffer(e){let t=o.allocUnsafe(e),n=e,r=this.head,s=0;do{let o=r.data;if(e>o.length)i(t,o,n-e),e-=o.length;else{e===o.length?(i(t,o,n-e),++s,this.head=r.next?r.next:this.tail=null):(i(t,new a(o.buffer,o.byteOffset,e),n-e),this.head=r,r.data=o.slice(e));break}++s}while((r=r.next)!==null);return this.length-=s,t}[Symbol.for(`nodejs.util.inspect.custom`)](e,t){return s(this,{...t,depth:0,customInspect:!1})}}})),_e=v(((e,t)=>{var{MathFloor:n,NumberIsInteger:r}=te(),{validateInteger:i}=ie(),{ERR_INVALID_ARG_VALUE:a}=R().codes,o=16384,s=16;function c(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function l(e){return e?s:o}function u(e,t){i(t,`value`,0),e?s=t:o=t}function d(e,t,i,o){let s=c(t,o,i);if(s!=null){if(!r(s)||s<0)throw new a(o?`options.${i}`:`options.highWaterMark`,s);return n(s)}return l(e.objectMode)}t.exports={getHighWaterMark:d,getDefaultHighWaterMark:l,setDefaultHighWaterMark:u}})),ve=v(((e,t)=>{var n=T(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}a.prototype=Object.create(r.prototype),i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),ye=v((e=>{var t=ve().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}})),be=v(((e,t)=>{var n=(ue(),S(ae)),{PromisePrototypeThen:r,SymbolAsyncIterator:i,SymbolIterator:a}=te(),{Buffer:o}=T(),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:c}=R().codes;function l(e,t,l){let u;if(typeof t==`string`||t instanceof o)return new e({objectMode:!0,...l,read(){this.push(t),this.push(null)}});let d;if(t&&t[i])d=!0,u=t[i]();else if(t&&t[a])d=!1,u=t[a]();else throw new s(`iterable`,[`Iterable`],t);let f=new e({objectMode:!0,highWaterMark:1,...l}),p=!1;f._read=function(){p||(p=!0,h())},f._destroy=function(e,t){r(m(e),()=>n.nextTick(t,e),r=>n.nextTick(t,r||e))};async function m(e){let t=e!=null,n=typeof u.throw==`function`;if(t&&n){let{value:t,done:n}=await u.throw(e);if(await t,n)return}if(typeof u.return==`function`){let{value:e}=await u.return();await e}}async function h(){for(;;){try{let{value:e,done:t}=d?await u.next():u.next();if(t)f.push(null);else{let t=e&&typeof e.then==`function`?await e:e;if(t===null)throw p=!1,new c;if(f.push(t))continue;p=!1}}catch(e){f.destroy(e)}break}}return f}t.exports=l})),xe=v(((e,t)=>{var n=(ue(),S(ae)),{ArrayPrototypeIndexOf:r,NumberIsInteger:i,NumberIsNaN:a,NumberParseInt:o,ObjectDefineProperties:s,ObjectKeys:c,ObjectSetPrototypeOf:l,Promise:u,SafeSet:d,SymbolAsyncDispose:f,SymbolAsyncIterator:p,Symbol:m}=te();t.exports=ze,ze.ReadableState=Re;var{EventEmitter:h}=ee(),{Stream:g,prependListener:_}=me(),{Buffer:v}=T(),{addAbortSignal:y}=he(),b=fe(),x=re().debuglog(`stream`,e=>{x=e}),C=ge(),w=pe(),{getHighWaterMark:E,getDefaultHighWaterMark:D}=_e(),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:k,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:j,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:P}=R(),{validateObject:F}=ie(),I=m(`kPaused`),{StringDecoder:L}=ye(),ne=be();l(ze.prototype,g.prototype),l(ze,g);var oe=()=>{},{errorOrDestroy:se}=w,ce=1,le=2,de=4,ve=8,xe=16,Se=32,Ce=64,Te=128,Ee=256,De=512,Oe=1024,ke=2048,Ae=4096,je=8192,Me=16384,Ne=32768,Pe=65536,Fe=1<<17,Ie=1<<18;function Le(e){return{enumerable:!1,get(){return(this.state&e)!==0},set(t){t?this.state|=e:this.state&=~e}}}s(Re.prototype,{objectMode:Le(ce),ended:Le(le),endEmitted:Le(de),reading:Le(ve),constructed:Le(xe),sync:Le(Se),needReadable:Le(Ce),emittedReadable:Le(Te),readableListening:Le(Ee),resumeScheduled:Le(De),errorEmitted:Le(Oe),emitClose:Le(ke),autoDestroy:Le(Ae),destroyed:Le(je),closed:Le(Me),closeEmitted:Le(Ne),multiAwaitDrain:Le(Pe),readingMore:Le(Fe),dataEmitted:Le(Ie)});function Re(e,t,n){typeof n!=`boolean`&&(n=t instanceof we()),this.state=6192,e&&e.objectMode&&(this.state|=ce),n&&e&&e.readableObjectMode&&(this.state|=ce),this.highWaterMark=e?E(this,e,`readableHighWaterMark`,n):D(!1),this.buffer=new C,this.length=0,this.pipes=[],this.flowing=null,this[I]=null,e&&e.emitClose===!1&&(this.state&=-2049),e&&e.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function ze(e){if(!(this instanceof ze))return new ze(e);let t=this instanceof we();this._readableState=new Re(e,this,t),e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&!t&&y(e.signal,this)),g.call(this,e),w.construct(this,()=>{this._readableState.needReadable&&Je(this,this._readableState)})}ze.prototype.destroy=w.destroy,ze.prototype._undestroy=w.undestroy,ze.prototype._destroy=function(e,t){t(e)},ze.prototype[h.captureRejectionSymbol]=function(e){this.destroy(e)},ze.prototype[f]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new P,this.destroy(e)),new u((t,n)=>b(this,r=>r&&r!==e?n(r):t(null)))},ze.prototype.push=function(e,t){return Be(this,e,t,!1)},ze.prototype.unshift=function(e,t){return Be(this,e,t,!0)};function Be(e,t,n,r){x(`readableAddChunk`,t);let i=e._readableState,a;if((i.state&ce)===0&&(typeof t==`string`?(n||=i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=v.from(t,n).toString(i.encoding):(t=v.from(t,n),n=``))):t instanceof v?n=``:g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),n=``):t!=null&&(a=new k(`chunk`,[`string`,`Buffer`,`Uint8Array`],t))),a)se(e,a);else if(t===null)i.state&=-9,Ge(e,i);else if((i.state&ce)!==0||t&&t.length>0){if(r){if((i.state&de)!==0)se(e,new N);else if(i.destroyed||i.errored)return!1;else Ve(e,i,t,!0)}else if(i.ended)se(e,new M);else if(i.destroyed||i.errored)return!1;else i.state&=-9,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?Ve(e,i,t,!1):Je(e,i)):Ve(e,i,t,!1)}else r||(i.state&=-9,Je(e,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function Ve(e,t,n,r){t.flowing&&t.length===0&&!t.sync&&e.listenerCount(`data`)>0?((t.state&Pe)===0?t.awaitDrainWriters=null:t.awaitDrainWriters.clear(),t.dataEmitted=!0,e.emit(`data`,n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),(t.state&Ce)!==0&&Ke(e)),Je(e,t)}ze.prototype.isPaused=function(){let e=this._readableState;return e[I]===!0||e.flowing===!1},ze.prototype.setEncoding=function(e){let t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r=``;for(let e of n)r+=t.write(e);return n.clear(),r!==``&&n.push(r),this._readableState.length=r.length,this};var He=1073741824;function Ue(e){if(e>He)throw new j(`size`,`<= 1GiB`,e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++,e}function We(e,t){return e<=0||t.length===0&&t.ended?0:(t.state&ce)===0?a(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0:1}ze.prototype.read=function(e){x(`read`,e),e===void 0?e=NaN:i(e)||(e=o(e,10));let t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=Ue(e)),e!==0&&(t.state&=-129),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return x(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?at(this):Ke(this),null;if(e=We(e,t),e===0&&t.ended)return t.length===0&&at(this),null;let r=(t.state&Ce)!==0;if(x(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,x(`length less than watermark`,r)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)r=!1,x(`reading, ended or constructing`,r);else if(r){x(`do read`),t.state|=40,t.length===0&&(t.state|=Ce);try{this._read(t.highWaterMark)}catch(e){se(this,e)}t.state&=-33,t.reading||(e=We(n,t))}let a;return a=e>0?it(e,t):null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&at(this)),a!==null&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit(`data`,a)),a};function Ge(e,t){if(x(`onEofChunk`),!t.ended){if(t.decoder){let e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Ke(e):(t.needReadable=!1,t.emittedReadable=!0,qe(e))}}function Ke(e){let t=e._readableState;x(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(x(`emitReadable`,t.flowing),t.emittedReadable=!0,n.nextTick(qe,e))}function qe(e){let t=e._readableState;x(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,tt(e)}function Je(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(Ye,e,t))}function Ye(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){let n=t.length;if(x(`maybeReadMore read 0`),e.read(0),n===t.length)break}t.readingMore=!1}ze.prototype._read=function(e){throw new A(`_read()`)},ze.prototype.pipe=function(e,t){let r=this,i=this._readableState;i.pipes.length===1&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new d(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),x(`pipe count=%d opts=%j`,i.pipes.length,t);let a=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr?s:v;i.endEmitted?n.nextTick(a):r.once(`end`,a),e.on(`unpipe`,o);function o(e,t){x(`onunpipe`),e===r&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,u())}function s(){x(`onend`),e.end()}let c,l=!1;function u(){x(`cleanup`),e.removeListener(`close`,h),e.removeListener(`finish`,g),c&&e.removeListener(`drain`,c),e.removeListener(`error`,m),e.removeListener(`unpipe`,o),r.removeListener(`end`,s),r.removeListener(`end`,v),r.removeListener(`data`,p),l=!0,c&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&c()}function f(){l||(i.pipes.length===1&&i.pipes[0]===e?(x(`false write response, pause`,0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(x(`false write response, pause`,i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),c||(c=Xe(r,e),e.on(`drain`,c))}r.on(`data`,p);function p(t){x(`ondata`);let n=e.write(t);x(`dest.write`,n),n===!1&&f()}function m(t){if(x(`onerror`,t),v(),e.removeListener(`error`,m),e.listenerCount(`error`)===0){let n=e._writableState||e._readableState;n&&!n.errorEmitted?se(e,t):e.emit(`error`,t)}}_(e,`error`,m);function h(){e.removeListener(`finish`,g),v()}e.once(`close`,h);function g(){x(`onfinish`),e.removeListener(`close`,h),v()}e.once(`finish`,g);function v(){x(`unpipe`),r.unpipe(e)}return e.emit(`pipe`,r),e.writableNeedDrain===!0?f():i.flowing||(x(`pipe resume`),r.resume()),e};function Xe(e,t){return function(){let n=e._readableState;n.awaitDrainWriters===t?(x(`pipeOnDrain`,1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(x(`pipeOnDrain`,n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&e.listenerCount(`data`)&&e.resume()}}ze.prototype.unpipe=function(e){let t=this._readableState,n={hasUnpiped:!1};if(t.pipes.length===0)return this;if(!e){let e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit(`unpipe`,this,{hasUnpiped:!1});return this}let i=r(t.pipes,e);return i===-1||(t.pipes.splice(i,1),t.pipes.length===0&&this.pause(),e.emit(`unpipe`,this,n)),this},ze.prototype.on=function(e,t){let r=g.prototype.on.call(this,e,t),i=this._readableState;return e===`data`?(i.readableListening=this.listenerCount(`readable`)>0,i.flowing!==!1&&this.resume()):e===`readable`&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,x(`on readable`,i.length,i.reading),i.length?Ke(this):i.reading||n.nextTick(Qe,this)),r},ze.prototype.addListener=ze.prototype.on,ze.prototype.removeListener=function(e,t){let r=g.prototype.removeListener.call(this,e,t);return e===`readable`&&n.nextTick(Ze,this),r},ze.prototype.off=ze.prototype.removeListener,ze.prototype.removeAllListeners=function(e){let t=g.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&n.nextTick(Ze,this),t};function Ze(e){let t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&t[I]===!1?t.flowing=!0:e.listenerCount(`data`)>0?e.resume():t.readableListening||(t.flowing=null)}function Qe(e){x(`readable nexttick read 0`),e.read(0)}ze.prototype.resume=function(){let e=this._readableState;return e.flowing||(x(`resume`),e.flowing=!e.readableListening,$e(this,e)),e[I]=!1,this};function $e(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(et,e,t))}function et(e,t){x(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),tt(e),t.flowing&&!t.reading&&e.read(0)}ze.prototype.pause=function(){return x(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(x(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState[I]=!0,this};function tt(e){let t=e._readableState;for(x(`flow`,t.flowing);t.flowing&&e.read()!==null;);}ze.prototype.wrap=function(e){let t=!1;e.on(`data`,n=>{!this.push(n)&&e.pause&&(t=!0,e.pause())}),e.on(`end`,()=>{this.push(null)}),e.on(`error`,e=>{se(this,e)}),e.on(`close`,()=>{this.destroy()}),e.on(`destroy`,()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let n=c(e);for(let t=1;t<n.length;t++){let r=n[t];this[r]===void 0&&typeof e[r]==`function`&&(this[r]=e[r].bind(e))}return this},ze.prototype[p]=function(){return nt(this)},ze.prototype.iterator=function(e){return e!==void 0&&F(e,`options`),nt(this,e)};function nt(e,t){typeof e.read!=`function`&&(e=ze.wrap(e,{objectMode:!0}));let n=rt(e,t);return n.stream=e,n}async function*rt(e,t){let n=oe;function r(t){this===e?(n(),n=oe):n=t}e.on(`readable`,r);let i,a=b(e,{writable:!1},e=>{i=e?O(i,e):null,n(),n=oe});try{for(;;){let t=e.destroyed?null:e.read();if(t!==null)yield t;else if(i)throw i;else if(i===null)return;else await new u(r)}}catch(e){throw i=O(i,e),i}finally{(i||t?.destroyOnReturn!==!1)&&(i===void 0||e._readableState.autoDestroy)?w.destroyer(e,null):(e.off(`readable`,r),a())}}s(ze.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&e.readable!==!1&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(this._readableState.readable===!1||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(Re.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[I]!==!1},set(e){this[I]=!!e}}}),ze._fromList=it;function it(e,t){if(t.length===0)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function at(e){let t=e._readableState;x(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ot,t,e))}function ot(e,t){if(x(`endReadableNT`,e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.emit(`end`),t.writable&&t.allowHalfOpen===!1)n.nextTick(st,t);else if(e.autoDestroy){let e=t._writableState;(!e||e.autoDestroy&&(e.finished||e.writable===!1))&&t.destroy()}}}function st(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}ze.from=function(e,t){return ne(ze,e,t)};var ct;function lt(){return ct===void 0&&(ct={}),ct}ze.fromWeb=function(e,t){return lt().newStreamReadableFromReadableStream(e,t)},ze.toWeb=function(e,t){return lt().newReadableStreamFromStreamReadable(e,t)},ze.wrap=function(e,t){return new ze({objectMode:e.readableObjectMode??e.objectMode??!0,...t,destroy(t,n){w.destroyer(e,t),n(t)}}).wrap(e)}})),Se=v(((e,t)=>{var n=(ue(),S(ae)),{ArrayPrototypeSlice:r,Error:i,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:o,ObjectDefineProperties:s,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:l,Symbol:u,SymbolHasInstance:d}=te();t.exports=F,F.WritableState=N;var{EventEmitter:f}=ee(),p=me().Stream,{Buffer:m}=T(),h=pe(),{addAbortSignal:g}=he(),{getHighWaterMark:_,getDefaultHighWaterMark:v}=_e(),{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:b,ERR_MULTIPLE_CALLBACK:x,ERR_STREAM_CANNOT_PIPE:C,ERR_STREAM_DESTROYED:w,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:D,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:k}=R().codes,{errorOrDestroy:A}=h;c(F.prototype,p.prototype),c(F,p);function j(){}var M=u(`kOnFinished`);function N(e,t,n){typeof n!=`boolean`&&(n=t instanceof we()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.writableObjectMode)),this.highWaterMark=e?_(this,e,`writableHighWaterMark`,n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let r=!!(e&&e.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=ie.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,P(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function P(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}N.prototype.getBuffer=function(){return r(this.buffered,this.bufferedIndex)},o(N.prototype,`bufferedRequestCount`,{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function F(e){let t=this instanceof we();if(!t&&!a(F,this))return new F(e);this._writableState=new N(e,this,t),e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),h.construct(this,()=>{let e=this._writableState;e.writing||le(this,e),ve(this,e)})}o(F,d,{__proto__:null,value:function(e){return a(this,e)?!0:this===F&&e&&e._writableState instanceof N}}),F.prototype.pipe=function(){A(this,new C)};function I(e,t,r,i){let a=e._writableState;if(typeof r==`function`)i=r,r=a.defaultEncoding;else{if(!r)r=a.defaultEncoding;else if(r!==`buffer`&&!m.isEncoding(r))throw new k(r);typeof i!=`function`&&(i=j)}if(t===null)throw new D;if(!a.objectMode){if(typeof t==`string`)a.decodeStrings!==!1&&(t=m.from(t,r),r=`buffer`);else if(t instanceof m)r=`buffer`;else if(p._isUint8Array(t))t=p._uint8ArrayToBuffer(t),r=`buffer`;else throw new y(`chunk`,[`string`,`Buffer`,`Uint8Array`],t)}let o;return a.ending?o=new O:a.destroyed&&(o=new w(`write`)),o?(n.nextTick(i,o),A(e,o,!0),o):(a.pendingcb++,L(e,a,t,r,i))}F.prototype.write=function(e,t,n){return I(this,e,t,n)===!0},F.prototype.cork=function(){this._writableState.corked++},F.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||le(this,e))},F.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=l(e)),!m.isEncoding(e))throw new k(e);return this._writableState.defaultEncoding=e,this};function L(e,t,n,r,i){let a=t.objectMode?1:n.length;t.length+=a;let o=t.length<t.highWaterMark;return o||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:n,encoding:r,callback:i}),t.allBuffers&&r!==`buffer`&&(t.allBuffers=!1),t.allNoop&&i!==j&&(t.allNoop=!1)):(t.writelen=a,t.writecb=i,t.writing=!0,t.sync=!0,e._write(n,r,t.onwrite),t.sync=!1),o&&!t.errored&&!t.destroyed}function ne(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new w(`write`)):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function re(e,t,n,r){--t.pendingcb,r(n),ce(t),A(e,n)}function ie(e,t){let r=e._writableState,i=r.sync,a=r.writecb;typeof a==`function`?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||=t,e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(re,e,r,t,a):re(e,r,t,a)):(r.buffered.length>r.bufferedIndex&&le(e,r),i?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===a?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:a,stream:e,state:r},n.nextTick(oe,r.afterWriteTickInfo)):se(e,r,1,a))):A(e,new x)}function oe({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,se(e,t,n,r)}function se(e,t,n,r){for(!t.ending&&!e.destroyed&&t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`));n-->0;)t.pendingcb--,r();t.destroyed&&ce(t),ve(e,t)}function ce(e){if(e.writing)return;for(let t=e.bufferedIndex;t<e.buffered.length;++t){let{chunk:n,callback:r}=e.buffered[t],i=e.objectMode?1:n.length;e.length-=i,r(e.errored??new w(`write`))}let t=e[M].splice(0);for(let n=0;n<t.length;n++)t[n](e.errored??new w(`end`));P(e)}function le(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;let{buffered:n,bufferedIndex:i,objectMode:a}=t,o=n.length-i;if(!o)return;let s=i;if(t.bufferProcessing=!0,o>1&&e._writev){t.pendingcb-=o-1;let i=t.allNoop?j:e=>{for(let t=s;t<n.length;++t)n[t].callback(e)},a=t.allNoop&&s===0?n:r(n,s);a.allBuffers=t.allBuffers,ne(e,t,!0,t.length,a,``,i),P(t)}else{do{let{chunk:r,encoding:i,callback:o}=n[s];n[s++]=null,ne(e,t,!1,a?1:r.length,r,i,o)}while(s<n.length&&!t.writing);s===n.length?P(t):s>256?(n.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}F.prototype._write=function(e,t,n){if(this._writev)this._writev([{chunk:e,encoding:t}],n);else throw new b(`_write()`)},F.prototype._writev=null,F.prototype.end=function(e,t,r){let a=this._writableState;typeof e==`function`?(r=e,e=null,t=null):typeof t==`function`&&(r=t,t=null);let o;if(e!=null){let n=I(this,e,t);n instanceof i&&(o=n)}return a.corked&&(a.corked=1,this.uncork()),o||(!a.errored&&!a.ending?(a.ending=!0,ve(this,a,!0),a.ended=!0):a.finished?o=new E(`end`):a.destroyed&&(o=new w(`end`))),typeof r==`function`&&(o||a.finished?n.nextTick(r,o):a[M].push(r)),this};function de(e){return e.ending&&!e.destroyed&&e.constructed&&e.length===0&&!e.errored&&e.buffered.length===0&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function fe(e,t){let r=!1;function i(i){if(r)A(e,i??x());else if(r=!0,t.pendingcb--,i){let n=t[M].splice(0);for(let e=0;e<n.length;e++)n[e](i);A(e,i,t.sync)}else de(t)&&(t.prefinished=!0,e.emit(`prefinish`),t.pendingcb++,n.nextTick(ye,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}function ge(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`&&!t.destroyed?(t.finalCalled=!0,fe(e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function ve(e,t,r){de(t)&&(ge(e,t),t.pendingcb===0&&(r?(t.pendingcb++,n.nextTick((e,t)=>{de(t)?ye(e,t):t.pendingcb--},e,t)):de(t)&&(t.pendingcb++,ye(e,t))))}function ye(e,t){t.pendingcb--,t.finished=!0;let n=t[M].splice(0);for(let e=0;e<n.length;e++)n[e]();if(e.emit(`finish`),t.autoDestroy){let t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))&&e.destroy()}}s(F.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){let e=this._writableState;return!!e&&e.writable!==!1&&!e.destroyed&&!e.errored&&!e.ending&&!e.ended},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let e=this._writableState;return e?!e.destroyed&&!e.ending&&e.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(this._writableState.writable===!1||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});var be=h.destroy;F.prototype.destroy=function(e,t){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[M].length)&&n.nextTick(ce,r),be.call(this,e,t),this},F.prototype._undestroy=h.undestroy,F.prototype._destroy=function(e,t){t(e)},F.prototype[f.captureRejectionSymbol]=function(e){this.destroy(e)};var xe;function Se(){return xe===void 0&&(xe={}),xe}F.fromWeb=function(e,t){return Se().newStreamWritableFromWritableStream(e,t)},F.toWeb=function(e){return Se().newWritableStreamFromStreamWritable(e)}})),Ce=v(((e,t)=>{var n=(ue(),S(ae)),r=T(),{isReadable:i,isWritable:a,isIterable:o,isNodeStream:s,isReadableNodeStream:c,isWritableNodeStream:l,isDuplexNodeStream:u,isReadableStream:d,isWritableStream:f}=de(),p=fe(),{AbortError:m,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:g}}=R(),{destroyer:_}=pe(),v=we(),y=xe(),b=Se(),{createDeferredPromise:x}=re(),C=be(),w=globalThis.Blob||r.Blob,E=w===void 0?function(e){return!1}:function(e){return e instanceof w},D=globalThis.AbortController||ne().AbortController,{FunctionPrototypeCall:O}=te(),k=class extends v{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function e(t,r){if(u(t))return t;if(c(t))return j({readable:t});if(l(t))return j({writable:t});if(s(t))return j({writable:!1,readable:!1});if(d(t))return j({readable:y.fromWeb(t)});if(f(t))return j({writable:b.fromWeb(t)});if(typeof t==`function`){let{value:e,write:i,final:a,destroy:s}=A(t);if(o(e))return C(k,e,{objectMode:!0,write:i,final:a,destroy:s});let c=e?.then;if(typeof c==`function`){let t,r=O(c,e,e=>{if(e!=null)throw new g(`nully`,`body`,e)},e=>{_(t,e)});return t=new k({objectMode:!0,readable:!1,write:i,final(e){a(async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}})},destroy:s})}throw new g(`Iterable, AsyncIterable or AsyncFunction`,r,e)}if(E(t))return e(t.arrayBuffer());if(o(t))return C(k,t,{objectMode:!0,writable:!1});if(d(t?.readable)&&f(t?.writable))return k.fromWeb(t);if(typeof t?.writable==`object`||typeof t?.readable==`object`)return j({readable:t!=null&&t.readable?c(t?.readable)?t?.readable:e(t.readable):void 0,writable:t!=null&&t.writable?l(t?.writable)?t?.writable:e(t.writable):void 0});let i=t?.then;if(typeof i==`function`){let e;return O(i,t,t=>{t!=null&&e.push(t),e.push(null)},t=>{_(e,t)}),e=new k({objectMode:!0,writable:!1,read(){}})}throw new h(r,[`Blob`,`ReadableStream`,`WritableStream`,`Stream`,`Iterable`,`AsyncIterable`,`Function`,`{ readable, writable } pair`,`Promise`],t)};function A(e){let{promise:t,resolve:r}=x(),i=new D,a=i.signal;return{value:e((async function*(){for(;;){let e=t;t=null;let{chunk:i,done:o,cb:s}=await e;if(n.nextTick(s),o)return;if(a.aborted)throw new m(void 0,{cause:a.reason});({promise:t,resolve:r}=x()),yield i}})(),{signal:a}),write(e,t,n){let i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){let t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}function j(e){let t=e.readable&&typeof e.readable.read!=`function`?y.wrap(e.readable):e.readable,n=e.writable,r=!!i(t),o=!!a(n),s,c,l,u,d;function f(e){let t=u;u=null,t?t(e):e&&d.destroy(e)}return d=new k({readableObjectMode:!!(t!=null&&t.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:o}),o&&(p(n,e=>{o=!1,e&&_(t,e),f(e)}),d._write=function(e,t,r){n.write(e,t)?r():s=r},d._final=function(e){n.end(),c=e},n.on(`drain`,function(){if(s){let e=s;s=null,e()}}),n.on(`finish`,function(){if(c){let e=c;c=null,e()}})),r&&(p(t,e=>{r=!1,e&&_(t,e),f(e)}),t.on(`readable`,function(){if(l){let e=l;l=null,e()}}),t.on(`end`,function(){d.push(null)}),d._read=function(){for(;;){let e=t.read();if(e===null){l=d._read;return}if(!d.push(e))return}}),d._destroy=function(e,r){!e&&u!==null&&(e=new m),l=null,s=null,c=null,u===null?r(e):(u=r,_(n,e),_(t,e))},d}})),we=v(((e,t)=>{var{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:r,ObjectKeys:i,ObjectSetPrototypeOf:a}=te();t.exports=c;var o=xe(),s=Se();a(c.prototype,o.prototype),a(c,o);{let e=i(s.prototype);for(let t=0;t<e.length;t++){let n=e[t];c.prototype[n]||(c.prototype[n]=s.prototype[n])}}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),s.call(this,e),e?(this.allowHalfOpen=e.allowHalfOpen!==!1,e.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}n(c.prototype,{writable:{__proto__:null,...r(s.prototype,`writable`)},writableHighWaterMark:{__proto__:null,...r(s.prototype,`writableHighWaterMark`)},writableObjectMode:{__proto__:null,...r(s.prototype,`writableObjectMode`)},writableBuffer:{__proto__:null,...r(s.prototype,`writableBuffer`)},writableLength:{__proto__:null,...r(s.prototype,`writableLength`)},writableFinished:{__proto__:null,...r(s.prototype,`writableFinished`)},writableCorked:{__proto__:null,...r(s.prototype,`writableCorked`)},writableEnded:{__proto__:null,...r(s.prototype,`writableEnded`)},writableNeedDrain:{__proto__:null,...r(s.prototype,`writableNeedDrain`)},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}});var l;function u(){return l===void 0&&(l={}),l}c.fromWeb=function(e,t){return u().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return u().newReadableWritablePairFromDuplex(e)};var d;c.from=function(e){return d||=Ce(),d(e,`body`)}})),Te=v(((e,t)=>{var{ObjectSetPrototypeOf:n,Symbol:r}=te();t.exports=c;var{ERR_METHOD_NOT_IMPLEMENTED:i}=R().codes,a=we(),{getHighWaterMark:o}=_e();n(c.prototype,a.prototype),n(c,a);var s=r(`kCallback`);function c(e){if(!(this instanceof c))return new c(e);let t=e?o(this,e,`readableHighWaterMark`,!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[s]=null,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,u)}function l(e){typeof this._flush==`function`&&!this.destroyed?this._flush((t,n)=>{t?e?e(t):this.destroy(t):(n!=null&&this.push(n),this.push(null),e&&e())}):(this.push(null),e&&e())}function u(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,n){throw new i(`_transform()`)},c.prototype._write=function(e,t,n){let r=this._readableState,i=this._writableState,a=r.length;this._transform(e,t,(e,t)=>{e?n(e):(t!=null&&this.push(t),i.ended||a===r.length||r.length<r.highWaterMark?n():this[s]=n)})},c.prototype._read=function(){if(this[s]){let e=this[s];this[s]=null,e()}}})),Ee=v(((e,t)=>{var{ObjectSetPrototypeOf:n}=te();t.exports=i;var r=Te();n(i.prototype,r.prototype),n(i,r);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),De=v(((e,t)=>{var n=(ue(),S(ae)),{ArrayIsArray:r,Promise:i,SymbolAsyncIterator:a,SymbolDispose:o}=te(),s=fe(),{once:c}=re(),l=pe(),u=we(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:h,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:_}=R(),{validateFunction:v,validateAbortSignal:y}=ie(),{isIterable:b,isReadable:x,isReadableNodeStream:C,isNodeStream:w,isTransformStream:T,isWebStream:E,isReadableStream:D,isReadableFinished:O}=de(),k=globalThis.AbortController||ne().AbortController,A,j,M;function N(e,t,n){let r=!1;return e.on(`close`,()=>{r=!0}),{destroy:t=>{r||(r=!0,l.destroyer(e,t||new h(`pipe`)))},cleanup:s(e,{readable:t,writable:n},e=>{r=!e})}}function P(e){return v(e[e.length-1],`streams[stream.length - 1]`),e.pop()}function F(e){if(b(e))return e;if(C(e))return I(e);throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`],e)}async function*I(e){j||=xe(),yield*j.prototype[a].call(e)}async function ee(e,t,n,{end:r}){let a,o=null,c=e=>{if(e&&(a=e),o){let e=o;o=null,e()}},l=()=>new i((e,t)=>{a?t(a):o=()=>{a?t(a):e()}});t.on(`drain`,c);let u=s(t,{readable:!1},c);try{t.writableNeedDrain&&await l();for await(let n of e)t.write(n)||await l();r&&(t.end(),await l()),n()}catch(e){n(a===e?e:d(a,e))}finally{u(),t.off(`drain`,c)}}async function L(e,t,n,{end:r}){T(t)&&(t=t.writable);let i=t.getWriter();try{for await(let t of e)await i.ready,i.write(t).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(e){try{await i.abort(e),n(e)}catch(e){n(e)}}}function oe(...e){return se(e,c(P(e)))}function se(e,t,i){if(e.length===1&&r(e[0])&&(e=e[0]),e.length<2)throw new m(`streams`);let a=new k,s=a.signal,c=i?.signal,l=[];y(c,`options.signal`);function d(){P(new _)}M||=re().addAbortListener;let h;c&&(h=M(c,d));let g,v,S=[],O=0;function j(e){P(e,--O===0)}function P(e,r){var i;if(e&&(!g||g.code===`ERR_STREAM_PREMATURE_CLOSE`)&&(g=e),g||r){for(;S.length;)S.shift()(g);(i=h)==null||i[o](),a.abort(),r&&(g||l.forEach(e=>e()),n.nextTick(t,g,v))}}let I;for(let t=0;t<e.length;t++){let r=e[t],a=t<e.length-1,o=t>0,c=a||i?.end!==!1,d=t===e.length-1;if(w(r)){if(c){let{destroy:e,cleanup:t}=N(r,a,o);S.push(e),x(r)&&d&&l.push(t)}function e(e){e&&e.name!==`AbortError`&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&j(e)}r.on(`error`,e),x(r)&&d&&l.push(()=>{r.removeListener(`error`,e)})}if(t===0){if(typeof r==`function`){if(I=r({signal:s}),!b(I))throw new p(`Iterable, AsyncIterable or Stream`,`source`,I)}else I=b(r)||C(r)||T(r)?r:u.from(r)}else if(typeof r==`function`){if(I=T(I)?F(I?.readable):F(I),I=r(I,{signal:s}),a){if(!b(I,!0))throw new p(`AsyncIterable`,`transform[${t-1}]`,I)}else{A||=Ee();let e=new A({objectMode:!0}),t=I?.then;if(typeof t==`function`)O++,t.call(I,t=>{v=t,t!=null&&e.write(t),c&&e.end(),n.nextTick(j)},t=>{e.destroy(t),n.nextTick(j,t)});else if(b(I,!0))O++,ee(I,e,j,{end:c});else if(D(I)||T(I)){let t=I.readable||I;O++,ee(t,e,j,{end:c})}else throw new p(`AsyncIterable or Promise`,`destination`,I);I=e;let{destroy:r,cleanup:i}=N(I,!1,!0);S.push(r),d&&l.push(i)}}else if(w(r)){if(C(I)){O+=2;let e=ce(I,r,j,{end:c});x(r)&&d&&l.push(e)}else if(T(I)||D(I)){let e=I.readable||I;O++,ee(e,r,j,{end:c})}else if(b(I))O++,ee(I,r,j,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],I);I=r}else if(E(r)){if(C(I))O++,L(F(I),r,j,{end:c});else if(D(I)||b(I))O++,L(I,r,j,{end:c});else if(T(I))O++,L(I.readable,r,j,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],I);I=r}else I=u.from(r)}return(s!=null&&s.aborted||c!=null&&c.aborted)&&n.nextTick(d),I}function ce(e,t,r,{end:i}){let a=!1;if(t.on(`close`,()=>{a||r(new g)}),e.pipe(t,{end:!1}),i){function r(){a=!0,t.end()}O(e)?n.nextTick(r):e.once(`end`,r)}else r();return s(e,{readable:!0,writable:!1},t=>{let n=e._readableState;t&&t.code===`ERR_STREAM_PREMATURE_CLOSE`&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once(`end`,r).once(`error`,r):r(t)}),s(t,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:se,pipeline:oe}})),Oe=v(((e,t)=>{var{pipeline:n}=De(),r=we(),{destroyer:i}=pe(),{isNodeStream:a,isReadable:o,isWritable:s,isWebStream:c,isTransformStream:l,isWritableStream:u,isReadableStream:d}=de(),{AbortError:f,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:m}}=R(),h=fe();t.exports=function(...e){if(e.length===0)throw new m(`streams`);if(e.length===1)return r.from(e[0]);let t=[...e];if(typeof e[0]==`function`&&(e[0]=r.from(e[0])),typeof e[e.length-1]==`function`){let t=e.length-1;e[t]=r.from(e[t])}for(let n=0;n<e.length;++n)if(a(e[n])||c(e[n])){if(n<e.length-1&&!(o(e[n])||d(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be readable`);if(n>0&&!(s(e[n])||u(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be writable`)}let g,_,v,y,b;function x(e){let t=y;y=null,t?t(e):e?b.destroy(e):!T&&!w&&b.destroy()}let S=e[0],C=n(e,x),w=!!(s(S)||u(S)||l(S)),T=!!(o(C)||d(C)||l(C));if(b=new r({writableObjectMode:!!(S!=null&&S.writableObjectMode),readableObjectMode:!!(C!=null&&C.readableObjectMode),writable:w,readable:T}),w){if(a(S))b._write=function(e,t,n){S.write(e,t)?n():g=n},b._final=function(e){S.end(),_=e},S.on(`drain`,function(){if(g){let e=g;g=null,e()}});else if(c(S)){let e=(l(S)?S.writable:S).getWriter();b._write=async function(t,n,r){try{await e.ready,e.write(t).catch(()=>{}),r()}catch(e){r(e)}},b._final=async function(t){try{await e.ready,e.close().catch(()=>{}),_=t}catch(e){t(e)}}}h(l(C)?C.readable:C,()=>{if(_){let e=_;_=null,e()}})}if(T){if(a(C))C.on(`readable`,function(){if(v){let e=v;v=null,e()}}),C.on(`end`,function(){b.push(null)}),b._read=function(){for(;;){let e=C.read();if(e===null){v=b._read;return}if(!b.push(e))return}};else if(c(C)){let e=(l(C)?C.readable:C).getReader();b._read=async function(){for(;;)try{let{value:t,done:n}=await e.read();if(!b.push(t))return;if(n){b.push(null);return}}catch{return}}}}return b._destroy=function(e,t){!e&&y!==null&&(e=new f),v=null,g=null,_=null,y===null?t(e):(y=t,a(C)&&i(C,e))},b}})),ke=v(((e,t)=>{var n=globalThis.AbortController||ne().AbortController,{codes:{ERR_INVALID_ARG_VALUE:r,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:o},AbortError:s}=R(),{validateAbortSignal:c,validateInteger:l,validateObject:u}=ie(),d=te().Symbol(`kWeak`),f=te().Symbol(`kResistStopPropagation`),{finished:p}=fe(),m=Oe(),{addAbortSignalNoValidate:h}=he(),{isWritable:g,isNodeStream:_}=de(),{deprecate:v}=re(),{ArrayPrototypePush:y,Boolean:b,MathFloor:x,Number:S,NumberIsNaN:C,Promise:w,PromiseReject:T,PromiseResolve:E,PromisePrototypeThen:D,Symbol:O}=te(),k=O(`kEmpty`),A=O(`kEof`);function j(e,t){if(t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),_(e)&&!g(e))throw new r(`stream`,e,`must be writable`);let n=m(this,e);return t!=null&&t.signal&&h(t.signal,n),n}function M(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`);let n=1;t?.concurrency!=null&&(n=x(t.concurrency));let r=n-1;return t?.highWaterMark!=null&&(r=x(t.highWaterMark)),l(n,`options.concurrency`,1),l(r,`options.highWaterMark`,0),r+=n,async function*(){let i=re().AbortSignalAny([t?.signal].filter(b)),a=this,o=[],c={signal:i},l,u,d=!1,f=0;function p(){d=!0,m()}function m(){--f,h()}function h(){u&&!d&&f<n&&o.length<r&&(u(),u=null)}async function g(){try{for await(let t of a){if(d)return;if(i.aborted)throw new s;try{if(t=e(t,c),t===k)continue;t=E(t)}catch(e){t=T(e)}f+=1,D(t,m,p),o.push(t),l&&=(l(),null),!d&&(o.length>=r||f>=n)&&await new w(e=>{u=e})}o.push(A)}catch(e){let t=T(e);D(t,m,p),o.push(t)}finally{d=!0,l&&=(l(),null)}}g();try{for(;;){for(;o.length>0;){let e=await o[0];if(e===A)return;if(i.aborted)throw new s;e!==k&&(yield e),o.shift(),h()}await new w(e=>{l=e})}}finally{d=!0,u&&=(u(),null)}}.call(this)}function N(e=void 0){return e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`),async function*(){let t=0;for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s({cause:e.signal.reason});yield[t++,r]}}.call(this)}async function P(e,t=void 0){for await(let n of L.call(this,e,t))return!0;return!1}async function F(e,t=void 0){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);return!await P.call(this,async(...t)=>!await e(...t),t)}async function I(e,t){for await(let n of L.call(this,e,t))return n}async function ee(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n),k}for await(let e of M.call(this,n,t));}function L(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n)?t:k}return M.call(this,n,t)}var ae=class extends a{constructor(){super(`reduce`),this.message=`Reduce of an empty stream requires an initial value`}};async function oe(e,t,r){var a;if(typeof e!=`function`)throw new i(`reducer`,[`Function`,`AsyncFunction`],e);r!=null&&u(r,`options`),r?.signal!=null&&c(r.signal,`options.signal`);let o=arguments.length>1;if(r!=null&&(a=r.signal)!=null&&a.aborted){let e=new s(void 0,{cause:r.signal.reason});throw this.once(`error`,()=>{}),await p(this.destroy(e)),e}let l=new n,m=l.signal;if(r!=null&&r.signal){let e={once:!0,[d]:this,[f]:!0};r.signal.addEventListener(`abort`,()=>l.abort(),e)}let h=!1;try{for await(let n of this){var g;if(h=!0,r!=null&&(g=r.signal)!=null&&g.aborted)throw new s;o?t=await e(t,n,{signal:m}):(t=n,o=!0)}if(!h&&!o)throw new ae}finally{l.abort()}return t}async function se(e){e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`);let t=[];for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s(void 0,{cause:e.signal.reason});y(t,r)}return t}function ce(e,t){let n=M.call(this,e,t);return async function*(){for await(let e of n)yield*e}.call(this)}function le(e){if(e=S(e),C(e))return 0;if(e<0)throw new o(`number`,`>= 0`,e);return e}function ue(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=le(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;e--<=0&&(yield n)}}.call(this)}function pe(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=le(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;if(e-->0&&(yield n),e<=0)return}}.call(this)}t.exports.streamReturningOperators={asIndexedPairs:v(N,`readable.asIndexedPairs will be removed in a future version.`),drop:ue,filter:L,flatMap:ce,map:M,take:pe,compose:j},t.exports.promiseReturningOperators={every:F,forEach:ee,reduce:oe,toArray:se,some:P,find:I}})),Ae=v(((e,t)=>{var{ArrayPrototypePop:n,Promise:r}=te(),{isIterable:i,isNodeStream:a,isWebStream:o}=de(),{pipelineImpl:s}=De(),{finished:c}=fe();je();function l(...e){return new r((t,r)=>{let c,l,u=e[e.length-1];if(u&&typeof u==`object`&&!a(u)&&!i(u)&&!o(u)){let t=n(e);c=t.signal,l=t.end}s(e,(e,n)=>{e?r(e):t(n)},{signal:c,end:l})})}t.exports={finished:c,pipeline:l}})),je=v(((e,t)=>{var{Buffer:n}=T(),{ObjectDefineProperty:r,ObjectKeys:i,ReflectApply:a}=te(),{promisify:{custom:o}}=re(),{streamReturningOperators:s,promiseReturningOperators:c}=ke(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=R(),u=Oe(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:f}=_e(),{pipeline:p}=De(),{destroyer:m}=pe(),h=fe(),g=Ae(),_=de(),v=t.exports=me().Stream;v.isDestroyed=_.isDestroyed,v.isDisturbed=_.isDisturbed,v.isErrored=_.isErrored,v.isReadable=_.isReadable,v.isWritable=_.isWritable,v.Readable=xe();for(let e of i(s)){let t=s[e];function n(...e){if(new.target)throw l();return v.Readable.from(a(t,this,e))}r(n,`name`,{__proto__:null,value:t.name}),r(n,`length`,{__proto__:null,value:t.length}),r(v.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let e of i(c)){let t=c[e];function n(...e){if(new.target)throw l();return a(t,this,e)}r(n,`name`,{__proto__:null,value:t.name}),r(n,`length`,{__proto__:null,value:t.length}),r(v.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}v.Writable=Se(),v.Duplex=we(),v.Transform=Te(),v.PassThrough=Ee(),v.pipeline=p;var{addAbortSignal:y}=he();v.addAbortSignal=y,v.finished=h,v.destroy=m,v.compose=u,v.setDefaultHighWaterMark=d,v.getDefaultHighWaterMark=f,r(v,`promises`,{__proto__:null,configurable:!0,enumerable:!0,get(){return g}}),r(p,o,{__proto__:null,enumerable:!0,get(){return g.pipeline}}),r(h,o,{__proto__:null,enumerable:!0,get(){return g.finished}}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}})),Me=v(((e,t)=>{var n=je(),r=Ae(),i=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=i,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get(){return r}}),t.exports.Stream=n.Stream,t.exports.default=t.exports})),Ne=ee(),Pe=ye(),Fe=x(Me(),1);function Ie(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function Le(e,t=``){if(!Number.isSafeInteger(e)||e<0){let n=t&&`"${t}" `;throw Error(`${n}expected integer >= 0, got ${e}`)}}function Re(e,t,n=``){let r=Ie(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`;throw Error(o+`expected Uint8Array`+s+`, got `+c)}return e}function ze(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash must wrapped by utils.createHasher`);Le(e.outputLen),Le(e.blockLen)}function Be(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function Ve(e,t){Re(e,void 0,`digestInto() output`);let n=t.outputLen;if(e.length<n)throw Error(`"digestInto() output" expected to be of length >=`+n)}function He(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ue(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function We(e,t){return e<<32-t|e>>>t}function Ge(e,t){return e<<t|e>>>32-t>>>0}function Ke(e,t={}){let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}var qe=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}),Je=class{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,t){if(ze(e),Re(t,void 0,`key`),this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,r=new Uint8Array(n);r.set(t.length>n?e.create().update(t).digest():t);for(let e=0;e<r.length;e++)r[e]^=54;this.iHash.update(r),this.oHash=e.create();for(let e=0;e<r.length;e++)r[e]^=106;this.oHash.update(r),He(r)}update(e){return Be(this),this.iHash.update(e),this}digestInto(e){Be(this),Re(e,this.outputLen,`output`),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Ye=(e,t,n)=>new Je(e,t).update(n).digest();Ye.create=(e,t)=>new Je(e,t);function Xe(e,t,n){return e&t^~e&n}function Ze(e,t,n){return e&t^e&n^t&n}var Qe=class{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Ue(this.buffer)}update(e){Be(this),Re(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=Ue(e);for(;r<=i-a;a+=r)this.process(t,a)}else n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Be(this),Ve(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,He(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(this.length*8),i),this.process(n,0);let o=Ue(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen must be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},$e=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),et=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),tt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),nt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),rt=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),it=new Uint32Array(80),at=class extends Qe{A=rt[0]|0;B=rt[1]|0;C=rt[2]|0;D=rt[3]|0;E=rt[4]|0;constructor(){super(64,20,8,!1)}get(){let{A:e,B:t,C:n,D:r,E:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0}process(e,t){for(let n=0;n<16;n++,t+=4)it[n]=e.getUint32(t,!1);for(let e=16;e<80;e++)it[e]=Ge(it[e-3]^it[e-8]^it[e-14]^it[e-16],1);let{A:n,B:r,C:i,D:a,E:o}=this;for(let e=0;e<80;e++){let t,s;e<20?(t=Xe(r,i,a),s=1518500249):e<40?(t=r^i^a,s=1859775393):e<60?(t=Ze(r,i,a),s=2400959708):(t=r^i^a,s=3395469782);let c=Ge(n,5)+t+o+s+it[e]|0;o=a,a=i,i=Ge(r,30),r=n,n=c}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,this.set(n,r,i,a,o)}roundClean(){He(it)}destroy(){this.set(0,0,0,0,0),He(this.buffer)}},ot=Ke(()=>new at),st=2**32,ct=Array.from({length:64},(e,t)=>Math.floor(st*Math.abs(Math.sin(t+1)))),lt=rt.slice(0,4),ut=new Uint32Array(16),dt=class extends Qe{A=lt[0]|0;B=lt[1]|0;C=lt[2]|0;D=lt[3]|0;constructor(){super(64,16,8,!0)}get(){let{A:e,B:t,C:n,D:r}=this;return[e,t,n,r]}set(e,t,n,r){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0}process(e,t){for(let n=0;n<16;n++,t+=4)ut[n]=e.getUint32(t,!0);let{A:n,B:r,C:i,D:a}=this;for(let e=0;e<64;e++){let t,o,s;e<16?(t=Xe(r,i,a),o=e,s=[7,12,17,22]):e<32?(t=Xe(a,r,i),o=(5*e+1)%16,s=[5,9,14,20]):e<48?(t=r^i^a,o=(3*e+5)%16,s=[4,11,16,23]):(t=i^(r|~a),o=7*e%16,s=[6,10,15,21]),t=t+n+ct[e]+ut[o],n=a,a=i,i=r,r+=Ge(t,s[e%4])}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,this.set(n,r,i,a)}roundClean(){He(ut)}destroy(){this.set(0,0,0,0),He(this.buffer)}},ft=Ke(()=>new dt),pt=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),mt=Uint8Array.from(Array(16).fill(0).map((e,t)=>t)),ht=mt.map(e=>(9*e+5)%16),gt=(()=>{let e=[[mt],[ht]];for(let t=0;t<4;t++)for(let n of e)n.push(n[t].map(e=>pt[e]));return e})(),_t=gt[0],vt=gt[1],yt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),bt=_t.map((e,t)=>e.map(e=>yt[t][e])),xt=vt.map((e,t)=>e.map(e=>yt[t][e])),St=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),Ct=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function wt(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}var Tt=new Uint32Array(16),Et=class extends Qe{h0=1732584193;h1=-271733879;h2=-1732584194;h3=271733878;h4=-1009589776;constructor(){super(64,20,8,!0)}get(){let{h0:e,h1:t,h2:n,h3:r,h4:i}=this;return[e,t,n,r,i]}set(e,t,n,r,i){this.h0=e|0,this.h1=t|0,this.h2=n|0,this.h3=r|0,this.h4=i|0}process(e,t){for(let n=0;n<16;n++,t+=4)Tt[n]=e.getUint32(t,!0);let n=this.h0|0,r=n,i=this.h1|0,a=i,o=this.h2|0,s=o,c=this.h3|0,l=c,u=this.h4|0,d=u;for(let e=0;e<5;e++){let t=4-e,f=St[e],p=Ct[e],m=_t[e],h=vt[e],g=bt[e],_=xt[e];for(let t=0;t<16;t++){let r=Ge(n+wt(e,i,o,c)+Tt[m[t]]+f,g[t])+u|0;n=u,u=c,c=Ge(o,10)|0,o=i,i=r}for(let e=0;e<16;e++){let n=Ge(r+wt(t,a,s,l)+Tt[h[e]]+p,_[e])+d|0;r=d,d=l,l=Ge(s,10)|0,s=a,a=n}}this.set(this.h1+o+l|0,this.h2+c+d|0,this.h3+u+r|0,this.h4+n+a|0,this.h0+i+s|0)}roundClean(){He(Tt)}destroy(){this.destroyed=!0,He(this.buffer),this.set(0,0,0,0,0)}},Dt=Ke(()=>new Et),Ot=BigInt(2**32-1),kt=BigInt(32);function At(e,t=!1){return t?{h:Number(e&Ot),l:Number(e>>kt&Ot)}:{h:Number(e>>kt&Ot)|0,l:Number(e&Ot)|0}}function jt(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=At(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}var Mt=(e,t,n)=>e>>>n,Nt=(e,t,n)=>e<<32-n|t>>>n,Pt=(e,t,n)=>e>>>n|t<<32-n,Ft=(e,t,n)=>e<<32-n|t>>>n,It=(e,t,n)=>e<<64-n|t>>>n-32,Lt=(e,t,n)=>e>>>n-32|t<<64-n;function Rt(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}var zt=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Bt=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Vt=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Ht=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,Ut=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Wt=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,Gt=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Kt=new Uint32Array(64),qt=class extends Qe{constructor(e){super(64,e,8,!1)}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)Kt[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=Kt[e-15],n=Kt[e-2],r=We(t,7)^We(t,18)^t>>>3,i=We(n,17)^We(n,19)^n>>>10;Kt[e]=i+Kt[e-7]+r+Kt[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=We(o,6)^We(o,11)^We(o,25),u=l+t+Xe(o,s,c)+Gt[e]+Kt[e]|0,d=(We(n,2)^We(n,13)^We(n,22))+Ze(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){He(Kt)}destroy(){this.set(0,0,0,0,0,0,0,0),He(this.buffer)}},Jt=class extends qt{A=$e[0]|0;B=$e[1]|0;C=$e[2]|0;D=$e[3]|0;E=$e[4]|0;F=$e[5]|0;G=$e[6]|0;H=$e[7]|0;constructor(){super(32)}},Yt=class extends qt{A=et[0]|0;B=et[1]|0;C=et[2]|0;D=et[3]|0;E=et[4]|0;F=et[5]|0;G=et[6]|0;H=et[7]|0;constructor(){super(28)}},Xt=jt(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),Zt=Xt[0],Qt=Xt[1],$t=new Uint32Array(80),en=new Uint32Array(80),tn=class extends Qe{constructor(e){super(128,e,16,!1)}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)$t[n]=e.getUint32(t),en[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=$t[e-15]|0,n=en[e-15]|0,r=Pt(t,n,1)^Pt(t,n,8)^Mt(t,n,7),i=Ft(t,n,1)^Ft(t,n,8)^Nt(t,n,7),a=$t[e-2]|0,o=en[e-2]|0,s=Pt(a,o,19)^It(a,o,61)^Mt(a,o,6),c=Vt(i,Ft(a,o,19)^Lt(a,o,61)^Nt(a,o,6),en[e-7],en[e-16]),l=Ht(c,r,s,$t[e-7],$t[e-16]);$t[e]=l|0,en[e]=c|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=Pt(u,d,14)^Pt(u,d,18)^It(u,d,41),v=Ft(u,d,14)^Ft(u,d,18)^Lt(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=Ut(_,v,b,Qt[e],en[e]),S=Wt(x,g,t,y,Zt[e],$t[e]),C=x|0,w=Pt(n,r,28)^It(n,r,34)^It(n,r,39),T=Ft(n,r,28)^Lt(n,r,34)^Lt(n,r,39),E=n&i^n&o^i&o,D=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=Rt(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let O=zt(C,T,D);n=Bt(O,S,w,E),r=O|0}({h:n,l:r}=Rt(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=Rt(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=Rt(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=Rt(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=Rt(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=Rt(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=Rt(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=Rt(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){He($t,en)}destroy(){He(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},nn=class extends tn{Ah=nt[0]|0;Al=nt[1]|0;Bh=nt[2]|0;Bl=nt[3]|0;Ch=nt[4]|0;Cl=nt[5]|0;Dh=nt[6]|0;Dl=nt[7]|0;Eh=nt[8]|0;El=nt[9]|0;Fh=nt[10]|0;Fl=nt[11]|0;Gh=nt[12]|0;Gl=nt[13]|0;Hh=nt[14]|0;Hl=nt[15]|0;constructor(){super(64)}},rn=class extends tn{Ah=tt[0]|0;Al=tt[1]|0;Bh=tt[2]|0;Bl=tt[3]|0;Ch=tt[4]|0;Cl=tt[5]|0;Dh=tt[6]|0;Dl=tt[7]|0;Eh=tt[8]|0;El=tt[9]|0;Fh=tt[10]|0;Fl=tt[11]|0;Gh=tt[12]|0;Gl=tt[13]|0;Hh=tt[14]|0;Hl=tt[15]|0;constructor(){super(48)}},an=Ke(()=>new Jt,qe(1)),on=Ke(()=>new Yt,qe(4)),sn=Ke(()=>new nn,qe(3)),cn=Ke(()=>new rn,qe(2)),{Transform:ln}=Fe,un={md5:ft,sha1:ot,ripemd160:Dt,sha224:on,sha256:an,sha384:cn,sha512:sn};function dn(e){let t=un[e.toLowerCase().replace(/^rsa-/,``).replace(/^sha-/,`sha`)];if(!t)throw Object.assign(Error(`Digest method not supported: ${e}`),{code:`ERR_CRYPTO_INVALID_DIGEST`});return t}var fn=(e,t)=>typeof e==`string`?E.Buffer.from(e,t??`utf8`):e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),pn=(e,t)=>{let n=E.Buffer.from(e);return t&&t!==`buffer`?n.toString(t):n},mn=class e extends ln{constructor(e){super(),this.state=e,this.done=!1}_transform(e,t,n){this.state.update(fn(e)),n()}_flush(e){this.push(this.digest()),e()}update(e,t){if(this.done)throw Object.assign(Error(`Digest already called`),{code:`ERR_CRYPTO_HASH_FINALIZED`});return this.state.update(fn(e,t)),this}digest(e){if(this.done&&this instanceof hn)return pn(new Uint8Array,e);if(this.done)throw Object.assign(Error(`Digest already called`),{code:`ERR_CRYPTO_HASH_FINALIZED`});return this.done=!0,pn(this.state.digest(),e)}copy(){return new e(this.state.clone())}},hn=class extends mn{},gn={createHash:e=>new mn(dn(e).create()),createHmac:(e,t)=>new hn(Ye.create(dn(e),fn(t))),hash:(e,t,n=`hex`)=>pn(dn(e)(fn(t)),n),getHashes:()=>Object.keys(un)},{Readable:_n,Writable:vn}=Fe,yn={100:`Continue`,101:`Switching Protocols`,200:`OK`,201:`Created`,202:`Accepted`,204:`No Content`,206:`Partial Content`,301:`Moved Permanently`,302:`Found`,303:`See Other`,304:`Not Modified`,307:`Temporary Redirect`,308:`Permanent Redirect`,400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,408:`Request Timeout`,409:`Conflict`,413:`Payload Too Large`,415:`Unsupported Media Type`,422:`Unprocessable Entity`,426:`Upgrade Required`,429:`Too Many Requests`,500:`Internal Server Error`,501:`Not Implemented`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`},bn=[`CONNECT`,`DELETE`,`GET`,`HEAD`,`OPTIONS`,`PATCH`,`POST`,`PUT`,`TRACE`],xn=class extends _n{constructor(e){super(),this.socket=e,this.connection=e,this.method=`GET`,this.url=`/`,this.httpVersion=`1.1`,this.httpVersionMajor=1,this.httpVersionMinor=1,this.headers={},this.headersDistinct={},this.rawHeaders=[],this.trailers={},this.rawTrailers=[],this.complete=!1,this.aborted=!1,this.statusCode=null,this.statusMessage=null}_read(){}_destroy(e,t){!this.complete&&this.socket&&!this.socket.destroyed&&this.socket.destroy(),t(e)}setTimeout(e,t){return this.socket.setTimeout(e,t),this}},Sn=class extends vn{constructor(e,t=!0){super({decodeStrings:!0,autoDestroy:t}),this.socket=this.connection=e,this.headersSent=!1,this.finished=!1,this.chunkedEncoding=!1,this.shouldKeepAlive=!0,this.fields=new Map,this.chunked=!1,this.bodiless=!1}setHeader(e,t){if(this.headersSent)throw wn(`set`);return this.fields.set(e.toLowerCase(),[e,t]),this}appendHeader(e,t){let n=this.fields.get(e.toLowerCase());if(!n)return this.setHeader(e,t);let r=[].concat(n[1],t);return this.fields.set(e.toLowerCase(),[n[0],r.map(String)]),this}setHeaders(e){for(let[t,n]of e instanceof Map?e:Object.entries(e))this.setHeader(t,n);return this}getHeader(e){return this.fields.get(e.toLowerCase())?.[1]}getHeaders(){let e=Object.create(null);for(let[t,[,n]]of this.fields)e[t]=n;return e}getHeaderNames(){return[...this.fields.keys()]}getRawHeaderNames(){return[...this.fields.values()].map(([e])=>e)}hasHeader(e){return this.fields.has(e.toLowerCase())}removeHeader(e){if(this.headersSent)throw wn(`remove`);this.fields.delete(e.toLowerCase())}flushHeaders(){this.head(!1)}setTimeout(e,t){return this.socket?.setTimeout(e,t),this}put(e,t){this.fields.set(e.toLowerCase(),[e,t])}frame(e,t,n){this.fields.has(`content-length`)||this.fields.has(`transfer-encoding`)?this.chunked=this.chunkedEncoding=/chunked/i.test(String(this.fields.get(`transfer-encoding`)?.[1]??``)):this.bodiless||(e?this.put(`Content-Length`,t):n?(this.put(`Transfer-Encoding`,`chunked`),this.chunked=this.chunkedEncoding=!0):this.shouldKeepAlive=!1)}head(e,t=0){if(this.headersSent)return;this.headersSent=!0,this.prepare(e,t);let n=[this.startLine()];for(let[e,t]of this.fields.values())for(let r of Array.isArray(t)?t:[t])n.push(`${e}: ${r}`);this.socket?.write(E.Buffer.from(`${n.join(`\r
2
+ `)}\r\n\r\n`,`latin1`))}_write(e,t,n){this.head(!1),!this.bodiless&&e.length&&this.socket&&!this.socket.destroyed&&(this.chunked&&this.socket.write(`${e.length.toString(16)}\r\n`),this.socket.write(e),this.chunked&&this.socket.write(`\r
3
+ `)),n()}_final(e){this.head(!0),this.chunked&&this.socket&&!this.socket.destroyed&&this.socket.write(`0\r
4
+ \r
5
+ `),this.finished=!0,e()}end(e,t,n){if(typeof e==`function`&&([n,e]=[e,void 0]),typeof t==`function`&&([n,t]=[t,void 0]),!this.headersSent&&this.writableLength===0&&!this.chunked){let r=e==null?E.Buffer.alloc(0):typeof e==`string`?E.Buffer.from(e,t??`utf8`):E.Buffer.from(e);return this.head(!0,r.length),r.length&&super.write(r),super.end(n)}return super.end(e,t,n)}},Cn=class extends Sn{constructor(e,t){super(e.socket),this.req=e,this.statusCode=200,this.statusMessage=``,this.sendDate=!0,this.shouldKeepAlive=t,this.bodiless=e.method===`HEAD`}writeHead(e,t,n){if(this.headersSent)throw wn(`write`);if(typeof t!=`string`&&([n,t]=[t,void 0]),this.statusCode=e,t&&(this.statusMessage=t),Array.isArray(n)){if(Array.isArray(n[0]))for(let[e,t]of n)this.appendHeader(e,t);else for(let e=0;e<n.length;e+=2)this.appendHeader(String(n[e]),n[e+1])}else if(n)for(let[e,t]of Object.entries(n))this.setHeader(e,t);return this}writeContinue(){this.socket?.write(`HTTP/1.1 100 Continue\r
6
+ \r
7
+ `)}writeEarlyHints(){}startLine(){let e=this.statusCode;return`HTTP/1.1 ${e} ${this.statusMessage||yn[e]||`unknown`}`}prepare(e,t){let n=this.statusCode;this.bodiless||=n===204||n===304||n>=100&&n<200,n===101&&(this.shouldKeepAlive=!0),this.frame(e,t,this.req.httpVersion===`1.1`),this.sendDate&&!this.fields.has(`date`)&&this.put(`Date`,new Date().toUTCString()),!this.fields.has(`connection`)&&n!==101?this.put(`Connection`,this.shouldKeepAlive?`keep-alive`:`close`):/close/i.test(String(this.fields.get(`connection`)?.[1]??``))&&(this.shouldKeepAlive=!1)}assignSocket(e){this.socket=this.connection=e}detachSocket(){this.socket=this.connection=null}},wn=e=>Object.assign(Error(`Cannot ${e} headers after they are sent to the client`),{code:`ERR_HTTP_HEADERS_SENT`});function Tn(e){for(let t=0;t+3<e.length;t++)if(e[t]===13&&e[t+1]===10&&e[t+2]===13&&e[t+3]===10)return t;return-1}function En(e,t){for(let n of t){let t=n.indexOf(`:`);if(t<=0)continue;let r=n.slice(0,t).trim(),i=n.slice(t+1).trim();e.rawHeaders.push(r,i);let a=r.toLowerCase();(e.headersDistinct[a]??=[]).push(i);let o=e.headers[a];a===`set-cookie`?e.headers[a]=[...o??[],i]:o===void 0?e.headers[a]=i:a!==`host`&&a!==`content-type`&&a!==`content-length`&&(e.headers[a]=`${o}${a===`cookie`?`; `:`, `}${i}`)}}var Dn=class{message;constructor(e,t,n=!1){this.message=e,this.chunked=/chunked/i.test(String(t[`transfer-encoding`]??``));let r=t[`content-length`];this.untilEnd=n&&!this.chunked&&r===void 0,this.remaining=this.chunked?0:Number(r??0)||0,this.chunkLeft=-1,this.done=!1,!this.chunked&&!this.untilEnd&&this.remaining===0&&this.finish()}finish(){this.done||(this.done=!0,this.message.complete=!0,this.message.push(null))}feed(e){for(;!this.done&&e.length;){if(this.untilEnd)return this.message.push(E.Buffer.from(e)),E.Buffer.alloc(0);if(!this.chunked){let t=e.subarray(0,this.remaining);e=e.subarray(t.length),this.remaining-=t.length,this.message.push(E.Buffer.from(t)),this.remaining===0&&this.finish()}else if(this.chunkLeft<0){let t=e.indexOf(`\r
8
+ `);if(t<0)return e;let n=parseInt(e.subarray(0,t).toString(`latin1`),16)||0;if(n===0){let n=e.subarray(t+2),r=n.subarray(0,2).toString(`latin1`)===`\r
9
+ `,i=n.indexOf(`\r
10
+ \r
11
+ `);return!r&&i<0?e:(this.finish(),n.subarray(r?2:i+4))}this.chunkLeft=n,e=e.subarray(t+2)}else{if(e.length<this.chunkLeft+2)return e.length>this.chunkLeft?e:(this.message.push(E.Buffer.from(e)),this.chunkLeft-=e.length,E.Buffer.alloc(0));this.message.push(E.Buffer.from(e.subarray(0,this.chunkLeft))),e=e.subarray(this.chunkLeft+2),this.chunkLeft=-1}}return e}},On=new Set([`GET`,`HEAD`,`DELETE`,`OPTIONS`,`TRACE`,`CONNECT`]),kn=e=>{let t=(e.agent||void 0)?.options??{},n=n=>e[n]??t[n];return{servername:n(`servername`),ca:n(`ca`),cert:n(`cert`),key:n(`key`),rejectUnauthorized:n(`rejectUnauthorized`),checkServerIdentity:n(`checkServerIdentity`)}};function An(e){class t extends Sn{constructor(t,r){let i=t.hostname??t.host?.replace(/:\d+$/,``)??`localhost`,a=t.protocol===`https:`,o=a?443:80,s=Number(t.port??o),c=t.createConnection?t.createConnection({host:i,port:s}):new e.Socket().connect({port:s,host:i,https:a,tls:kn(t)});super(c,!1),this.method=(t.method??`GET`).toUpperCase(),this.path=t.path??`/`,this.host=i,this.protocol=t.protocol??`http:`,this.aborted=!1,this.reusedSocket=!1,this.res=null;let l=t.headers;if(Array.isArray(l))for(let e=0;e<l.length;e+=2)this.appendHeader(String(l[e]),l[e+1]);else if(l)for(let[e,t]of Object.entries(l))this.setHeader(e,t);t.setHost!==!1&&!this.fields.has(`host`)&&this.setHeader(`Host`,s===o?i:`${i}:${s}`),t.auth&&!this.fields.has(`authorization`)&&this.setHeader(`Authorization`,`Basic ${E.Buffer.from(t.auth).toString(`base64`)}`),r&&this.once(`response`,r),t.timeout&&this.setTimeout(t.timeout),t.signal?.addEventListener(`abort`,()=>this.destroy(n()),{once:!0}),queueMicrotask(()=>this.emit(`socket`,c)),this.read(c)}startLine(){return`${this.method} ${this.path} HTTP/1.1`}prepare(e,t){e&&t===0&&On.has(this.method)||this.frame(e,t,!0),this.fields.has(`connection`)||this.put(`Connection`,`close`)}read(e){let t=E.Buffer.alloc(0),n=null,r=e=>{this.res&&!this.res.complete?this.res.destroy(e):this.res||this.emit(`error`,e)},i=a=>{for(t=t.length?E.Buffer.concat([t,a]):a;!n;){let a=Tn(t);if(a<0)return;let s=t.subarray(0,a).toString(`latin1`).split(`\r
12
+ `);t=t.subarray(a+4);let c=/^HTTP\/(\d)\.(\d) (\d{3}) ?(.*)$/.exec(s[0]);if(!c){e.destroy(),r(Object.assign(Error(`Parse Error`),{code:`HPE_INVALID_CONSTANT`}));return}let l=new xn(e);l.httpVersionMajor=Number(c[1]),l.httpVersionMinor=Number(c[2]),l.httpVersion=`${c[1]}.${c[2]}`,l.statusCode=Number(c[3]),l.statusMessage=c[4],En(l,s.slice(1));let u=l.statusCode;if(u===101){if(e.removeListener(`data`,i),this.res=l,!this.listenerCount(`upgrade`))return void e.destroy();for(let[t,n]of Object.entries(o))e.removeListener(t,n);this.emit(`upgrade`,l,e,t),this.emit(`close`);return}u>=100&&u<200?this.emit(u===100?`continue`:`information`,l):(this.res=l,l.req=this,n=this.method===`HEAD`||u===204||u===304?new Dn(l,{}):new Dn(l,l.headers,!0),l.on(`end`,()=>{e.destroyed||e.end()}),this.emit(`response`,l))}t=n.feed(t)};e.on(`data`,i);let a=e=>{if(n&&!n.done){if(n.untilEnd&&e)return n.finish();this.res.aborted=!0,this.res.emit(`aborted`),r(Object.assign(Error(`aborted`),{code:`ECONNRESET`}))}},o={end:()=>{n?a(!0):this.res||r(Object.assign(Error(`socket hang up`),{code:`ECONNRESET`}))},error:r,close:()=>{a(!1),this.emit(`close`)},timeout:()=>this.emit(`timeout`)};for(let[t,n]of Object.entries(o))e.on(t,n)}abort(){this.aborted||(this.aborted=!0,this.emit(`abort`),this.destroy())}_destroy(e,t){this.socket?.destroy(),t(e)}setNoDelay(){}setSocketKeepAlive(){}}let n=()=>Object.assign(Error(`The operation was aborted`),{code:`ABORT_ERR`,name:`AbortError`}),r=(e,...n)=>{let r=typeof n.at(-1)==`function`?n.pop():void 0,i={};if(typeof n[0]==`string`||n[0]instanceof URL){let t=new URL(String(n[0]));if(t.protocol!==e)throw Object.assign(TypeError(`Protocol "${t.protocol}" not supported. Expected "${e}"`),{code:`ERR_INVALID_PROTOCOL`});i={protocol:e,hostname:t.hostname.replace(/^\[|\]$/g,``),port:t.port||(e===`https:`?443:80),path:t.pathname+t.search,...t.username?{auth:`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`}:{},...n[1]??{}}}else i={...n[0]??{},protocol:e};return new t(i,r)};class i extends e.Server{constructor(e,t){typeof e==`function`&&([t,e]=[e,{}]),super({allowHalfOpen:!0}),this.timeout=0,this.keepAliveTimeout=5e3,this.headersTimeout=6e4,this.requestTimeout=3e5,this.maxHeadersCount=null,this.maxRequestsPerSocket=0,t&&this.on(`request`,t),this.on(`connection`,e=>this.serve(e))}setTimeout(e,t){return this.timeout=e,t&&this.on(`timeout`,t),this}closeAllConnections(){for(let e of this.connections)e.destroy()}closeIdleConnections(){for(let e of this.connections)e.busy||e.destroy()}serve(e){let t=E.Buffer.alloc(0),n=null,r=null,i=null,a=!1,o=e,s=()=>{for(;!a;){if(i&&!i.done&&(t=i.feed(t),!i.done)||o.busy)return;let u=Tn(t);if(u<0)return;let d=t.subarray(0,u).toString(`latin1`).split(`\r
13
+ `);t=t.subarray(u+4);let f=/^(\S+) (\S+) HTTP\/(\d)\.(\d)$/.exec(d[0]);if(!f){e.end(`HTTP/1.1 400 Bad Request\r
14
+ Connection: close\r
15
+ \r
16
+ `);return}let p=new xn(e);[,p.method,p.url]=f,p.httpVersionMajor=Number(f[3]),p.httpVersionMinor=Number(f[4]),p.httpVersion=`${f[3]}.${f[4]}`,En(p,d.slice(1));let m=String(p.headers.connection??``).toLowerCase();if(p.headers.upgrade&&/upgrade/.test(m)&&this.listenerCount(`upgrade`)){a=!0,p.complete=!0,p.push(null),e.removeListener(`data`,c);let n=E.Buffer.from(t);t=E.Buffer.alloc(0),this.emit(`upgrade`,p,e,n);return}let h=p.httpVersion===`1.1`?!/close/.test(m):/keep-alive/.test(m);n=p,i=new Dn(p,p.headers);let g=new Cn(p,h);if(r=g,o.busy=!0,g.on(`finish`,()=>{if(o.busy=!1,!g.shouldKeepAlive)return void e.end();s(),l&&!o.busy&&!a&&e.end()}),/100-continue/i.test(String(p.headers.expect??``))){if(this.listenerCount(`checkContinue`)){this.emit(`checkContinue`,p,g);continue}g.writeContinue()}this.emit(`request`,p,g)}},c=e=>{t=t.length?E.Buffer.concat([t,e]):e,s()};e.on(`data`,c);let l=!1;e.on(`end`,()=>{l=!0,n&&!n.complete&&(n.aborted=!0,n.destroy()),o.busy||e.end()}),e.on(`close`,()=>{n&&!n.complete&&n.emit(`aborted`),n&&r&&!r.writableFinished&&(n.destroy(),r.destroy())}),e.on(`error`,t=>{this.listenerCount(`clientError`)&&this.emit(`clientError`,t,e)}),this.timeout&&e.setTimeout(this.timeout,()=>e.destroy())}}class a{options;constructor(e={}){this.options=e}destroy(){}}let o=e=>({request:(...t)=>r(e,...t),get:(...t)=>{let n=r(e,...t);return n.end(),n}}),s={Server:i,IncomingMessage:xn,ServerResponse:Cn,OutgoingMessage:Sn,ClientRequest:t,Agent:a,globalAgent:new a,STATUS_CODES:yn,METHODS:bn,maxHeaderSize:16384,createServer:(e,t)=>new i(e,t),...o(`http:`),validateHeaderName(){},validateHeaderValue(){},setMaxIdleHTTPParsers(){}},c=e=>()=>{throw Object.assign(Error(`https.${e} is not available in the playground yet`),{code:`ERR_NOT_AVAILABLE`})};return{http:s,https:{Agent:a,globalAgent:new a({defaultPort:443}),...o(`https:`),createServer:c(`createServer`),Server:c(`Server`)}}}var jn={A:1,NS:2,CNAME:5,MX:15,TXT:16,AAAA:28,SRV:33},Mn={1:`EBADQUERY`,2:`ESERVFAIL`,3:`ENOTFOUND`,5:`EREFUSED`},Nn=(e,t,n=`ENOTFOUND`)=>Object.assign(Error(`${t} ${n} ${e}`),{code:n,errno:n===`ENOTFOUND`?-3008:void 0,syscall:t,hostname:e});function Pn(e,t,n){let r=e.replace(/\.$/,``).split(`.`).filter(Boolean),i=new TextEncoder,a=r.map(e=>i.encode(e)),o=new Uint8Array(12+a.reduce((e,t)=>e+t.length+1,0)+5);o.set([n>>8,n&255,1,0,0,1,0,0,0,0,0,0]);let s=12;for(let e of a)o[s++]=e.length,o.set(e,s),s+=e.length;return o.set([0,t>>8,t&255,0,1],s),o}function Fn(e){let t=[-1,0];for(let n=0;n<8;){let r=n;for(;r<8&&e[r]===0;)r++;r-n>t[1]&&(t=[n,r-n]),n=r>n?r:n+1}let n=e.map(e=>e.toString(16));return t[1]<2?n.join(`:`):`${n.slice(0,t[0]).join(`:`)}::${n.slice(t[0]+t[1]).join(`:`)}`}function In(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.length<12)return`EBADRESP`;let r=e[3]&15;if(r)return Mn[r]??`ESERVFAIL`;let i=new TextDecoder,a=t=>{let n=[],r=t,a=-1;for(let t=0;r<e.length&&t<64;t++){let t=e[r];if(t===0){r++;break}(t&192)==192?(a<0&&(a=r+2),r=(t&63)<<8|e[r+1]):(n.push(i.decode(e.subarray(r+1,r+1+t))),r+=t+1)}return[n.join(`.`),a<0?r:a]},o=12;for(let e=n.getUint16(4);e>0;e--)o=a(o)[1]+4;let s=[];for(let r=n.getUint16(6);r>0&&o<e.length;r--){o=a(o)[1];let r=n.getUint16(o),c=n.getUint16(o+8),l=o+10;if(o=l+c,r===t){if(r===jn.A)s.push([...e.subarray(l,l+4)].join(`.`));else if(r===jn.AAAA)s.push(Fn(Array.from({length:8},(e,t)=>n.getUint16(l+2*t))));else if(r===jn.CNAME||r===jn.NS)s.push(a(l)[0]);else if(r===jn.MX)s.push({priority:n.getUint16(l),exchange:a(l+2)[0]});else if(r===jn.SRV)s.push({priority:n.getUint16(l),weight:n.getUint16(l+2),port:n.getUint16(l+4),name:a(l+6)[0]});else if(r===jn.TXT){let t=[];for(let n=l;n<l+c;n+=e[n]+1)t.push(i.decode(e.subarray(n+1,n+1+e[n])));s.push(t)}}}return s}var Ln=(e={})=>typeof e==`number`?e:Number(String(e.family??0).replace(`IPv`,``));function Rn(e,t=0){return/^\d+\.\d+\.\d+\.\d+$/.test(e)?[{address:e,family:4}]:e.includes(`:`)?[{address:e,family:6}]:e===`localhost`||e.endsWith(`.localhost`)||!e?t===6?[{address:`::1`,family:6}]:[{address:`127.0.0.1`,family:4}]:null}function zn(e){let t=Math.floor(Math.random()*65536),n=async(n,r,i)=>{if(!e)throw Nn(n,i);t=t+1&65535;let a=In(await e(Pn(n,jn[r],t)),jn[r]);if(typeof a==`string`)throw Nn(n,i,a);if(!a.length)throw Nn(n,i,`ENODATA`);return a},r=async(e,t)=>{let r=Ln(t),i=Rn(e,r);if(i)return i;let a=(t,r)=>n(e,t,`getaddrinfo`).then(e=>e.map(e=>({address:e,family:r})),e=>e.code===`ENODATA`?[]:Promise.reject(e)),o=[...r===6?[]:await a(`A`,4),...r===4?[]:await a(`AAAA`,6).catch(()=>[])];if(!o.length)throw Nn(e,`getaddrinfo`);return o},i=async(e,t)=>{let n=await r(e,t);return typeof t==`object`&&t.all?n:n[0]},a=(e,t)=>async r=>Rn(r,e===`A`?4:6)?.map(({address:e})=>e)??await n(r,e,t),o=a(`A`,`queryA`),s=a(`AAAA`,`queryAaaa`),c=(e,t)=>r=>n(r,e,t),l={lookup:i,resolve:(e,t=`A`)=>t===`A`?o(e):t===`AAAA`?s(e):n(e,t,`query${t[0]}${t.slice(1).toLowerCase()}`),resolve4:o,resolve6:s,resolveCname:c(`CNAME`,`queryCname`),resolveMx:c(`MX`,`queryMx`),resolveNs:c(`NS`,`queryNs`),resolveSrv:c(`SRV`,`querySrv`),resolveTxt:c(`TXT`,`queryTxt`),setDefaultResultOrder(){},getDefaultResultOrder:()=>`ipv4first`,setServers(){},getServers:()=>e?[`127.0.0.53`]:[]},u=e=>(t,n,r)=>{typeof n==`function`&&([r,n]=[n,void 0]),e(t,n).then(e=>r?.(null,e),e=>r?.(e))};return{lookup:Object.assign((e,t,n)=>{typeof t==`function`&&([n,t]=[t,void 0]),i(e,t).then(e=>Array.isArray(e)?n?.(null,e):n?.(null,e.address,e.family),e=>n?.(e))},{[Symbol.for(`nodejs.util.promisify.custom`)]:i}),resolve:u(l.resolve),resolve4:u(o),resolve6:u(s),resolveCname:u(l.resolveCname),resolveMx:u(l.resolveMx),resolveNs:u(l.resolveNs),resolveSrv:u(l.resolveSrv),resolveTxt:u(l.resolveTxt),setDefaultResultOrder(){},getDefaultResultOrder:()=>`ipv4first`,setServers(){},getServers:l.getServers,ADDRCONFIG:1024,V4MAPPED:2048,ALL:256,NODATA:`ENODATA`,NOTFOUND:`ENOTFOUND`,SERVFAIL:`ESERVFAIL`,REFUSED:`EREFUSED`,promises:l}}var Bn={A:`up`,B:`down`,C:`right`,D:`left`,E:`clear`,F:`end`,H:`home`,P:`f1`,Q:`f2`,R:`f3`,S:`f4`,Z:`tab`},Vn={1:`home`,2:`insert`,3:`delete`,4:`end`,5:`pageup`,6:`pagedown`,7:`home`,8:`end`,11:`f1`,12:`f2`,13:`f3`,14:`f4`,15:`f5`,17:`f6`,18:`f7`,19:`f8`,20:`f9`,21:`f10`,23:`f11`,24:`f12`};function Hn(e){let t=[],n=0,r=(e,t,n={})=>({sequence:e,name:t,ctrl:!1,meta:!1,shift:!1,...n});for(;n<e.length;){let i=e[n];if(i===`\x1B`&&n+1<e.length&&(e[n+1]===`[`||e[n+1]===`O`)){let i=/^\x1b(\[|O)([\d;]*)([~A-Za-z])/.exec(e.slice(n));if(i){let[e,a,o,s]=i,c=o.split(`;`),l=Number(c[1]??1)-1,u=s===`~`?Vn[c[0]]:Bn[s];t.push([``,r(e,u,{code:`${a}${s===`~`?`${c[0]}~`:s}`,shift:!!(l&1)||s===`Z`,meta:!!(l&10),ctrl:!!(l&4)})]),n+=e.length;continue}}if(i===`\x1B`){let i=e[n+1];if(i===void 0||i===`\x1B`)t.push([``,r(`\x1B`,`escape`)]),n+=1;else{let[,e]=Hn(i)[0];t.push([``,{...e,sequence:`\x1b${i}`,meta:!0}]),n+=2}}else n+=1,i===`\r`?t.push([``,r(i,`return`)]):i===`
17
+ `?t.push([``,r(i,`enter`)]):i===` `?t.push([``,r(i,`tab`)]):i===``||i===`\b`?t.push([``,r(i,`backspace`)]):i===` `?t.push([i,r(i,`space`)]):i<` `?t.push([``,r(i,String.fromCharCode(i.charCodeAt(0)+96),{ctrl:!0})]):/[a-z0-9]/.test(i)?t.push([i,r(i,i)]):/[A-Z]/.test(i)?t.push([i,r(i,i.toLowerCase(),{shift:!0})]):t.push([i,r(i,void 0)])}return t}var Un=new WeakSet;function Wn(e){if(Un.has(e))return;Un.add(e);let t=new TextDecoder,n=n=>{let r=typeof n==`string`?n:t.decode(n,{stream:!0});for(let[t,n]of Hn(r))e.emit(`keypress`,t||void 0,n)},r=t=>{t===`keypress`&&(e.off(`newListener`,r),e.on(`data`,n))};e.listenerCount(`keypress`)>0?e.on(`data`,n):e.on(`newListener`,r)}var Gn=(e,t)=>e?.write?.(t);function Kn(e,t,n,r){return typeof n==`function`&&([r,n]=[n,void 0]),Gn(e,n===void 0?`\x1b[${t+1}G`:`\x1b[${n+1};${t+1}H`),r&&queueMicrotask(r),!0}function qn(e,t,n,r){let i=``;return t&&(i+=t<0?`\x1b[${-t}D`:`\x1b[${t}C`),n&&(i+=n<0?`\x1b[${-n}A`:`\x1b[${n}B`),i&&Gn(e,i),r&&queueMicrotask(r),!0}function Jn(e,t,n){return Gn(e,t<0?`\x1B[1K`:t>0?`\x1B[0K`:`\x1B[2K`),n&&queueMicrotask(n),!0}function Yn(e,t){return Gn(e,`\x1B[0J`),t&&queueMicrotask(t),!0}var Xn=class extends Ne.EventEmitter{constructor(e,t,n,r){super();let i=e&&typeof e.on!=`function`?e:{input:e,output:t,terminal:r};this.input=i.input,this.output=i.output,this.terminal=i.terminal??!!(this.input?.isTTY&&this.output?.isTTY),this.line=``,this.cursor=0,this.history=[...i.history??[]],this.historySize=i.historySize??30,this.closed=!1,this.paused=!1,this.promptText=i.prompt??`> `,this.recalled=-1,this.asked=null,this.buffer=``,this.sawReturn=!1;let a=this.input;if(!a)this.unhook=()=>{};else{if(this.terminal){Wn(a);let e=(e,t)=>this.keypress(e,t);a.on(`keypress`,e),a.setRawMode?.(!0),this.unhook=()=>{a.off(`keypress`,e),a.setRawMode?.(!1)}}else{let e=new TextDecoder,t=t=>this.lines(typeof t==`string`?t:e.decode(t,{stream:!0})),n=()=>{this.buffer&&this.emitLine(this.buffer),this.buffer=``,this.close()};a.on(`data`,t),a.on(`end`,n),this.unhook=()=>{a.off(`data`,t),a.off(`end`,n)}}a.resume?.(),i.signal?.addEventListener(`abort`,()=>this.close(),{once:!0})}}lines(e){for(this.sawReturn&&e&&(e.startsWith(`
18
+ `)&&(e=e.slice(1)),this.sawReturn=!1),this.buffer+=e;;){let e=this.buffer.search(/\r\n|\n|\r/);if(e<0)break;let t=this.buffer.slice(0,e);this.sawReturn=e===this.buffer.length-1&&this.buffer[e]===`\r`,this.buffer=this.buffer.slice(e+(this.buffer.startsWith(`\r
19
+ `,e)?2:1)),this.emitLine(t)}}emitLine(e){if(this.asked){let t=this.asked;this.asked=null,t(e)}else this.emit(`line`,e)}refresh(){Gn(this.output,`\r\x1b[0K${this.promptText}${this.line}`);let e=this.line.length-this.cursor;e>0&&Gn(this.output,`\x1b[${e}D`)}keypress(e,t){if(this.closed||this.paused)return;let n=t?.name;if(t?.ctrl&&n===`c`)this.listenerCount(`SIGINT`)>0?this.emit(`SIGINT`):(Gn(this.output,`^C\r
20
+ `),this.close());else if(t?.ctrl&&n===`d`)this.line?this.cursor<this.line.length&&(this.line=this.line.slice(0,this.cursor)+this.line.slice(this.cursor+1),this.refresh()):(Gn(this.output,`\r
21
+ `),this.close());else if(n===`return`||n===`enter`){let e=this.line;Gn(this.output,`\r
22
+ `),this.line=``,this.cursor=0,this.recalled=-1,e&&this.history[0]!==e&&(this.history.unshift(e),this.history.length>this.historySize&&this.history.pop(),this.emit(`history`,this.history)),this.emitLine(e)}else if(n===`backspace`||t?.ctrl&&n===`h`)this.cursor>0&&(this.line=this.line.slice(0,this.cursor-1)+this.line.slice(this.cursor),this.cursor--,this.refresh());else if(n===`delete`)this.line=this.line.slice(0,this.cursor)+this.line.slice(this.cursor+1),this.refresh();else if(n===`left`||t?.ctrl&&n===`b`)this.cursor>0&&(this.cursor--,Gn(this.output,`\x1B[1D`));else if(n===`right`||t?.ctrl&&n===`f`)this.cursor<this.line.length&&(this.cursor++,Gn(this.output,`\x1B[1C`));else if(n===`home`||t?.ctrl&&n===`a`)this.cursor=0,this.refresh();else if(n===`end`||t?.ctrl&&n===`e`)this.cursor=this.line.length,this.refresh();else if(t?.ctrl&&n===`u`)this.line=this.line.slice(this.cursor),this.cursor=0,this.refresh();else if(t?.ctrl&&n===`k`)this.line=this.line.slice(0,this.cursor),this.refresh();else if(n===`up`||n===`down`){let e=Math.max(-1,Math.min(this.history.length-1,this.recalled+(n===`up`?1:-1)));this.recalled=e,this.line=e<0?``:this.history[e],this.cursor=this.line.length,this.refresh()}else e&&!t?.ctrl&&!t?.meta&&(this.line=this.line.slice(0,this.cursor)+e+this.line.slice(this.cursor),this.cursor+=e.length,this.cursor===this.line.length?Gn(this.output,e):this.refresh())}setPrompt(e){this.promptText=e}getPrompt(){return this.promptText}prompt(e){this.paused&&this.resume(),this.terminal?(e||(this.cursor=this.line.length),this.refresh()):Gn(this.output,this.promptText)}question(e,t,n){if(typeof t==`function`&&(n=t),this.closed)throw Object.assign(Error(`readline was closed`),{code:`ERR_USE_AFTER_CLOSE`});let r=this.promptText;this.promptText=e,this.asked=e=>{this.promptText=r,n?.(e)},this.prompt()}write(e,t){if(this.terminal){if(e)for(let[t,n]of Hn(e))this.keypress(t||void 0,n);else t&&this.keypress(void 0,{sequence:``,name:void 0,ctrl:!1,meta:!1,shift:!1,...t})}else e&&this.lines(e)}pause(){return this.paused||(this.paused=!0,this.input?.pause?.(),this.emit(`pause`)),this}resume(){return this.paused&&(this.paused=!1,this.input?.resume?.(),this.emit(`resume`)),this}close(){this.closed||(this.closed=!0,this.unhook(),this.input?.pause?.(),this.emit(`close`))}getCursorPos(){let e=this.promptText.length+this.cursor,t=this.output?.columns??80;return{rows:Math.floor(e/t),cols:e%t}}[Symbol.asyncIterator](){let e=[],t=[],n=this.closed;return this.on(`line`,n=>{let r=t.shift();r?r({value:n,done:!1}):e.push(n)}),this.once(`close`,()=>{n=!0;for(let e of t.splice(0))e({value:void 0,done:!0})}),{next:()=>e.length?Promise.resolve({value:e.shift(),done:!1}):n?Promise.resolve({value:void 0,done:!0}):new Promise(e=>t.push(e)),return:()=>(this.close(),Promise.resolve({value:void 0,done:!0})),[Symbol.asyncIterator](){return this}}}[Symbol.dispose](){this.close()}};function Zn(){let e=(e,t,n,r)=>new Xn(e,t,n,r);class t extends Xn{question(e,t){return new Promise((n,r)=>{t?.signal?.addEventListener(`abort`,()=>r(Object.assign(Error(`The operation was aborted`),{name:`AbortError`,code:`ABORT_ERR`})),{once:!0}),super.question(e,n)})}}let n={createInterface:e,Interface:Xn,emitKeypressEvents:Wn,cursorTo:Kn,moveCursor:qn,clearLine:Jn,clearScreenDown:Yn},r={...n,Interface:t,createInterface:(e,n,r,i)=>new t(e,n,r,i),Readline:class{stream;constructor(e){this.stream=e}cursorTo(e,t){return Kn(this.stream,e,t),this}moveCursor(e,t){return qn(this.stream,e,t),this}clearLine(e){return Jn(this.stream,e),this}clearScreenDown(){return Yn(this.stream),this}commit(){return Promise.resolve()}rollback(){return this}}};return{readline:{...n,promises:r},promises:r}}var Qn={SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGKILL:9,SIGUSR1:10,SIGSEGV:11,SIGUSR2:12,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:17,SIGCONT:18,SIGSTOP:19,SIGTSTP:20,SIGWINCH:28},$n=e=>typeof e==`number`?Object.keys(Qn).find(t=>Qn[t]===e)??`SIG${e}`:e,{Duplex:er}=Fe;function tr(e){let t=()=>new DataView(e().buffer);return{random_get(t,n){for(let r=0;r<n;r+=65536)crypto.getRandomValues(new Uint8Array(e().buffer,t+r,Math.min(65536,n-r)));return 0},clock_time_get(e,n,r){return t().setBigUint64(r,BigInt(Date.now())*1000000n,!0),0},environ_sizes_get(e,n){return t().setUint32(e,0,!0),t().setUint32(n,0,!0),0},environ_get:()=>0,fd_write(e,n,r,i){let a=0;for(let e=0;e<r;e++)a+=t().getUint32(n+8*e+4,!0);return t().setUint32(i,a,!0),0},proc_exit(e){throw Error(`tls.wasm exited (${e})`)}}}var nr=null,rr=globalThis.fetch.bind(globalThis),ir=globalThis.XMLHttpRequest,ar=null;function or(e){if(ar)return ar;let t=``;try{let n=new ir;if(!e)throw Error(`no tls package`);n.open(`GET`,e.roots,!1),n.send(),n.status===200&&(t=n.responseText)}catch{}return ar=Object.freeze(t.match(/-----BEGIN CERTIFICATE-----[\s\S]*?-----END CERTIFICATE-----/g)??[]),ar}function sr(e){return nr??=(async()=>{if(!e)throw Error(`tls.wasm: this site has no tls package`);let t=await rr(e.module);if(!t.ok)throw Error(`tls.wasm: ${t.status}`);let n=await WebAssembly.compile(await t.arrayBuffer()),r;return r=(await WebAssembly.instantiate(n,{wasi_snapshot_preview1:tr(()=>r.memory)})).exports,r._initialize?.(),r})(),nr.catch(()=>nr=null),nr}var cr=new TextEncoder,lr=new TextDecoder,ur=e=>typeof e==`string`?cr.encode(e):new Uint8Array(e),dr=e=>e===void 0?new Uint8Array:ur((Array.isArray(e)?e:[e]).map(e=>lr.decode(ur(e))).join(`
23
+ `));function fr(e){return/expired/i.test(e)?[`CERT_HAS_EXPIRED`,`certificate has expired`]:/not ?valid ?yet/i.test(e)?[`CERT_NOT_YET_VALID`,`certificate is not yet valid`]:/not ?valid ?for ?name/i.test(e)?[`ERR_TLS_CERT_ALTNAME_INVALID`,`Hostname/IP does not match certificate's altnames`]:/unknown ?issuer/i.test(e)?[`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`,`unable to get local issuer certificate`]:/revoked/i.test(e)?[`CERT_REVOKED`,`certificate revoked`]:[`ERR_TLS_CERT_INVALID`,e]}var pr=class extends Error{code;constructor(e){let[t,n]=/certificate/i.test(e)?fr(e):[`ERR_SSL_`+e.replace(/[^A-Za-z0-9]+/g,`_`).toUpperCase().slice(0,60),e];super(n),this.code=t}},mr=class e{x;handle;constructor(e,t){this.x=e,this.handle=t}static async open(t,n,r){let i=await sr(t),a=(r.ALPNProtocols??[]).map(ur),o=new Uint8Array(a.reduce((e,t)=>e+t.length+1,0)),s=0;for(let e of a)o[s]=e.length,o.set(e,s+1),s+=e.length+1;let c=[cr.encode(r.servername||n),o,dr(r.ca),dr(r.cert),dr(r.key)].map(t=>e.put(i,t)),l=r.rejectUnauthorized===!1?0:1,[u,d,f,p,m]=c,h=i.tls_client(...u,...d,l,...f,...p,...m);for(let[e,t]of c)i.tls_free(e,t);if(h<0)throw new pr(e.text(i));return new e(i,h)}static put(e,t){let n=e.tls_alloc(t.length);return new Uint8Array(e.memory.buffer,n,t.length).set(t),[n,t.length]}static out(e){return new Uint8Array(e.memory.buffer,e.tls_out_ptr(),e.tls_out_len()).slice()}static text(t){return lr.decode(e.out(t))}call(t,n){let[r,i]=e.put(this.x,n);try{return t(r,i)}finally{this.x.tls_free(r,i)}}feed(t){if(this.call((e,t)=>this.x.tls_feed(this.handle,e,t),t)<0)throw new pr(e.text(this.x));let n=this.x.tls_read(this.handle);return n===-2?null:n>0?e.out(this.x):new Uint8Array}write(t){if(this.call((e,t)=>this.x.tls_write(this.handle,e,t),t)<0)throw new pr(e.text(this.x))}take(){return this.x.tls_take(this.handle)>0?e.out(this.x):new Uint8Array}close(){this.x.tls_close(this.handle)}forget(){this.x.tls_forget(this.handle)}get handshaking(){return this.x.tls_handshaking(this.handle)===1}get alpn(){return this.x.tls_alpn(this.handle)>0&&e.text(this.x)}get protocol(){let e=this.x.tls_version(this.handle);return e===772?`TLSv1.3`:e===771?`TLSv1.2`:null}get cipher(){return this.x.tls_cipher(this.handle),e.text(this.x)}get refused(){return this.x.tls_refused(this.handle)>0?e.text(this.x):null}get chain(){this.x.tls_peer(this.handle);let t=e.out(this.x),n=new DataView(t.buffer),r=[];for(let e=0;e+4<=t.length;){let i=n.getUint32(e);r.push(t.slice(e+4,e+4+i)),e+=4+i}return r}};function hr(e){if(!e.destroyed){if(e.readableEnded)return void e.destroy();e.once(`end`,()=>e.destroy()),e.push(null),e.read(0)}}function gr(e,t=0,n=e.length){let r=[];for(let i=t;i+2<=n;){let t=e[i],n=e[i+1];if(i+=2,n&128){let t=n&127;n=0;for(let r=0;r<t;r++)n=n*256+e[i++]}r.push({tag:t,start:i,end:i+n}),i+=n}return r}var _r={3:`CN`,6:`C`,7:`L`,8:`ST`,10:`O`,11:`OU`};function vr(e,t){let n={};for(let r of gr(e,t.start,t.end))for(let t of gr(e,r.start,r.end)){let[r,i]=gr(e,t.start,t.end);if(!r||!i||r.end-r.start!==3||e[r.start]!==85||e[r.start+1]!==4)continue;let a=_r[e[r.start+2]];if(!a)continue;let o=lr.decode(e.subarray(i.start,i.end)),s=n[a];n[a]=s===void 0?o:[...Array.isArray(s)?s:[s],o]}return n}function yr(e){try{return e.includes(`:`)?new URL(`http://[${e}]`).hostname.slice(1,-1):e}catch{return e}}function br(e,t){let[n]=gr(e,t.start,t.end);for(let t of n?gr(e,n.start,n.end):[]){let[n,...r]=gr(e,t.start,t.end),i=e.subarray(n.start,n.end);if(i.length!==3||i[0]!==85||i[1]!==29||i[2]!==17)continue;let a=r.at(-1),[o]=gr(e,a.start,a.end),s=[];for(let t of gr(e,o.start,o.end)){let n=e.subarray(t.start,t.end),r=()=>lr.decode(n);if(t.tag===130)s.push(`DNS:${r()}`);else if(t.tag===129)s.push(`email:${r()}`);else if(t.tag===134)s.push(`URI:${r()}`);else if(t.tag===135&&n.length===4)s.push(`IP Address:${n.join(`.`)}`);else if(t.tag===135&&n.length===16){let e=[];for(let t=0;t<16;t+=2)e.push((n[t]<<8|n[t+1]).toString(16));s.push(`IP Address:${e.join(`:`)}`)}}return s.join(`, `)}}function xr(e,t=0,n=!1){let r=e[t];if(!r)return{};let i={raw:E.Buffer.from(r),subject:{},issuer:{}};try{let[e]=gr(r),[t]=gr(r,e.start,e.end),n=gr(r,t.start,t.end),a=+(n[0].tag===160);i.issuer=vr(r,n[a+2]),i.subject=vr(r,n[a+4]);let o=n.slice(a+6).find(e=>e.tag===163),s=o&&br(r,o);s!==void 0&&(i.subjectaltname=s)}catch{}return n&&e[t+1]&&(i.issuerCertificate=xr(e,t+1,!0)),i}function Sr(e,t){let n=t.replace(/[.]$/,``).toLowerCase().split(`.`);if(!t||n.length!==e.length||n.includes(``)||n.some(e=>/[^!-\u007F]/u.test(e)))return!1;for(let t=e.length-1;t>0;t--)if(e[t]!==n[t])return!1;let r=n[0].split(`*`);if(r.length===1)return e[0]===n[0];if(r.length>2||n.length<=2)return!1;let[i,a]=r;return i.length+a.length<=e[0].length&&e[0].startsWith(i)&&e[0].endsWith(a)}function Cr(e,t,n){if(e.refused===null&&n.checkServerIdentity)return n.checkServerIdentity(n.servername||t,xr(e.chain,0,!0))}function wr(e,t){let n=t.subjectaltname,r=[],i=[];for(let e of n?n.split(`, `):[])e.startsWith(`DNS:`)?r.push(e.slice(4)):e.startsWith(`IP Address:`)&&i.push(yr(e.slice(11)));let a=String(e).replace(/[.]$/,``),o=t.subject?.CN,s;if(/^\d+\.\d+\.\d+\.\d+$/.test(a)||a.includes(`:`)){if(i.includes(yr(a)))return;s=`IP: ${a} is not in the cert's list: ${i.join(`, `)}`}else if(r.length||o){let e=a.toLowerCase().split(`.`),t=t=>Sr(e,t);if(r.length){if(r.some(t))return;s=`Host: ${a}. is not in the cert's altnames: ${n}`}else{if(Array.isArray(o)?o.some(t):t(o))return;s=`Host: ${a}. is not cert's CN: ${o}`}}else s=`Cert does not contain a DNS name`;return Object.assign(Error(`Hostname/IP does not match certificate's altnames: ${s}`),{code:`ERR_TLS_CERT_ALTNAME_INVALID`,reason:s,host:a,cert:t})}function Tr(e,t,n){class r extends er{constructor(e,r={}){super({allowHalfOpen:!1,decodeStrings:!0});let i=r.host??`localhost`;this.raw=e,this.engine=null,this.authorized=!1,this.authorizationError=null,this.encrypted=!0,this.alpnProtocol=!1,this.servername=r.servername??i,this.connecting=!0,this.pendingWrites=[],this.plain=!1,e.once(`gateway`,e=>this.plain=e===`fetch`);let a=r.rejectUnauthorized??n.NODE_TLS_REJECT_UNAUTHORIZED!==`0`;this.rejectUnauthorized=a;let o=r.checkServerIdentity;this.checkIdentity=o?()=>o(r.servername||i,this.getPeerCertificate(!0)):null;let s=[],c=()=>{if(this.plain){this.authorized=!0,this.alpnProtocol=`http/1.1`,this.secured();for(let e of s.splice(0))this.received(e)}else mr.open(t,i,{...r,rejectUnauthorized:a}).then(e=>{if(this.destroyed)return e.forget();this.engine=e,this.flush();for(let e of s.splice(0))this.received(e)},e=>this.destroy(e))};e.connecting||e.pending?e.once(`connect`,c):c(),e.on(`data`,e=>{if(!this.engine&&(!this.plain||this.connecting))return void s.push(e);this.received(e)});let l=()=>this.connecting?(this.destroy(Object.assign(Error(`Client network socket disconnected before secure TLS connection was established`),{code:`ECONNRESET`,host:i})),!0):!1;e.on(`end`,()=>l()||this.push(null)),e.on(`close`,()=>l()||hr(this)),e.on(`error`,e=>this.destroy(e))}flush(){let e=this.engine?.take();e?.length&&this.raw.write(e)}received(e){if(this.plain)return void this.push(E.Buffer.from(e));let t=this.engine,n;try{n=t.feed(e)}catch(e){this.flush(),this.raw.end(),this.destroy(e);return}this.flush(),this.connecting&&!t.handshaking&&this.secured(),!this.destroyed&&(n===null?this.push(null):n.length&&this.push(E.Buffer.from(n.buffer,n.byteOffset,n.length)))}secured(){if(this.connecting=!1,this.engine){let e=this.engine.refused;this.authorized=e===null,this.authorizationError=e&&fr(e)[0],this.alpnProtocol=this.engine.alpn;let t=this.authorized?this.checkIdentity?.():void 0;if(t&&(this.authorized=!1,this.authorizationError=t.code??t.message,this.rejectUnauthorized))return void this.destroy(t)}for(let[e,t]of this.pendingWrites.splice(0))this.send(e,t);this.emit(`secureConnect`),this.emit(`secure`),this.pendingEnd&&this.closeNotify(this.pendingEnd)}_read(){}_write(e,t,n){this.connecting?this.pendingWrites.push([new Uint8Array(e),n]):this.send(new Uint8Array(e),n)}send(e,t){if(this.plain)return this.raw.write(e),t();try{this.engine.write(e)}catch(e){return t(e)}this.flush(),t()}_final(e){this.connecting?this.pendingEnd=e:this.closeNotify(e)}closeNotify(e){this.engine?.close(),this.flush(),this.raw.end(),e()}_destroy(e,t){this.engine?.forget(),this.engine=null,this.raw.destroy(),t(e)}getPeerCertificate(e=!1){return this.engine?xr(this.engine.chain,0,e):{}}getProtocol(){return this.engine?.protocol??null}getCipher(){let e=this.engine?.cipher??``;return{name:e,standardName:e,version:this.getProtocol()}}getSession(){}isSessionReused(){return!1}get remoteAddress(){return this.raw.remoteAddress}get remotePort(){return this.raw.remotePort}get localAddress(){return this.raw.localAddress}get localPort(){return this.raw.localPort}address(){return this.raw.address?.()}setNoDelay(){return this}setKeepAlive(){return this}setTimeout(e,t){return this.raw.setTimeout?.(e),t&&this.once(`timeout`,t),this.raw.on(`timeout`,()=>this.emit(`timeout`)),this}ref(){return this.raw.ref?.(),this}unref(){return this.raw.unref?.(),this}}function i(...t){let n=typeof t.at(-1)==`function`?t.pop():null,i;if(t[0]&&typeof t[0]==`object`)i=t[0];else{let e=t.find(e=>e&&typeof e==`object`);i={...e,port:Number(t[0]),host:typeof t[1]==`string`?t[1]:e?.host}}let a=i.host??`localhost`,o=i.socket??e.module.connect({port:i.port,host:a,timeout:i.timeout,gateway:Number(i.port)===443&&!e.module.isIP(a)}),s=i.servername??(e.module.isIP(a)?``:a),c=new r(o,{...i,host:a,servername:s});return n&&c.once(`secureConnect`,n),c}let a=e=>()=>{throw Object.assign(Error(`tls.${e} is not available in the playground yet`),{code:`ERR_NOT_IMPLEMENTED`})};return{TLSSocket:r,connect:i,createSecureContext:(e={})=>({context:e}),checkServerIdentity:wr,createServer:a(`createServer`),Server:a(`Server`),getCiphers:()=>[`tls_aes_128_gcm_sha256`,`tls_aes_256_gcm_sha384`,`tls_chacha20_poly1305_sha256`,`ecdhe-ecdsa-aes128-gcm-sha256`,`ecdhe-ecdsa-aes256-gcm-sha384`,`ecdhe-rsa-aes128-gcm-sha256`,`ecdhe-rsa-aes256-gcm-sha384`],get rootCertificates(){return or(t)},getCACertificates:(e=`default`)=>e==="default"||e===`bundled`?[...or(t)]:[],DEFAULT_MIN_VERSION:`TLSv1.2`,DEFAULT_MAX_VERSION:`TLSv1.3`,DEFAULT_ECDH_CURVE:`auto`,DEFAULT_CIPHERS:`TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256`}}var Er=Uint8Array,Dr=Uint16Array,Or=Int32Array,kr=new Er([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ar=new Er([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),jr=new Er([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mr=function(e,t){for(var n=new Dr(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Or(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},Nr=Mr(kr,2),Pr=Nr.b,Fr=Nr.r;Pr[28]=258,Fr[258]=28;for(var Ir=Mr(Ar,0),Lr=Ir.b,Rr=Ir.r,zr=new Dr(32768),Br=0;Br<32768;++Br){var Vr=(Br&43690)>>1|(Br&21845)<<1;Vr=(Vr&52428)>>2|(Vr&13107)<<2,Vr=(Vr&61680)>>4|(Vr&3855)<<4,zr[Br]=((Vr&65280)>>8|(Vr&255)<<8)>>1}for(var Hr=(function(e,t,n){for(var r=e.length,i=0,a=new Dr(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new Dr(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new Dr(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[zr[d]>>c]=l}else for(s=new Dr(r),i=0;i<r;++i)e[i]&&(s[i]=zr[o[e[i]-1]++]>>15-e[i]);return s}),Ur=new Er(288),Br=0;Br<144;++Br)Ur[Br]=8;for(var Br=144;Br<256;++Br)Ur[Br]=9;for(var Br=256;Br<280;++Br)Ur[Br]=7;for(var Br=280;Br<288;++Br)Ur[Br]=8;for(var Wr=new Er(32),Br=0;Br<32;++Br)Wr[Br]=5;var Gr=Hr(Ur,9,0),Kr=Hr(Ur,9,1),qr=Hr(Wr,5,0),Jr=Hr(Wr,5,1),Yr=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Xr=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Zr=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},Qr=function(e){return(e+7)/8|0},$r=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Er(e.subarray(t,n))},ei=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],ti=function(e,t,n){var r=Error(t||ei[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ti),!n)throw r;return r},ni=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new Er(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new Er(i*3));var l=function(e){var t=n.length;if(e>t){var r=new Er(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=Xr(e,d,1);var v=Xr(e,d+1,3);if(d+=3,!v){var y=Qr(d)+4,b=e[y-4]|e[y-3]<<8,x=y+b;if(x>i){c&&ti(0);break}s&&l(f+b),n.set(e.subarray(y,x),f),t.b=f+=b,t.p=d=x*8,t.f=u;continue}if(v==1)p=Kr,m=Jr,h=9,g=5;else if(v==2){var S=Xr(e,d,31)+257,C=Xr(e,d+10,15)+4,w=S+Xr(e,d+5,31)+1;d+=14;for(var T=new Er(w),E=new Er(19),D=0;D<C;++D)E[jr[D]]=Xr(e,d+D*3,7);d+=C*3;for(var O=Yr(E),k=(1<<O)-1,A=Hr(E,O,1),D=0;D<w;){var j=A[Xr(e,d,k)];d+=j&15;var y=j>>4;if(y<16)T[D++]=y;else{var M=0,N=0;for(y==16?(N=3+Xr(e,d,3),d+=2,M=T[D-1]):y==17?(N=3+Xr(e,d,7),d+=3):y==18&&(N=11+Xr(e,d,127),d+=7);N--;)T[D++]=M}}var P=T.subarray(0,S),F=T.subarray(S);h=Yr(P),g=Yr(F),p=Hr(P,h,1),m=Hr(F,g,1)}else ti(1);if(d>_){c&&ti(0);break}}s&&l(f+131072);for(var I=(1<<h)-1,ee=(1<<g)-1,te=d;;te=d){var M=p[Zr(e,d)&I],L=M>>4;if(d+=M&15,d>_){c&&ti(0);break}if(M||ti(2),L<256)n[f++]=L;else if(L==256){te=d,p=null;break}else{var R=L-254;if(L>264){var D=L-257,ne=kr[D];R=Xr(e,d,(1<<ne)-1)+Pr[D],d+=ne}var re=m[Zr(e,d)&ee],ie=re>>4;re||ti(3),d+=re&15;var F=Lr[ie];if(ie>3){var ne=Ar[ie];F+=Zr(e,d)&(1<<ne)-1,d+=ne}if(d>_){c&&ti(0);break}s&&l(f+131072);var ae=f+R;if(f<F){var oe=a-F,se=Math.min(F,ae);for(oe+f<0&&ti(3);f<se;++f)n[f]=r[oe+f]}for(;f<ae;++f)n[f]=n[f-F]}}t.l=p,t.p=te,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?$r(n,0,f):n.subarray(0,f)},ri=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},ii=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},ai=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:fi,l:0};if(i==1){var o=new Er(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var p=new Dr(f+1),m=oi(n[u-1],p,0);if(m>t){var r=0,h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<i;++r){var v=a[r].s;if(p[v]>t)h+=_-(1<<m-p[v]),p[v]=t;else break}for(h>>=g;h>0;){var y=a[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return{t:new Er(p),l:m}},oi=function(e,t,n){return e.s==-1?Math.max(oi(e.l,t,n+1),oi(e.r,t,n+1)):t[e.s]=n},si=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Dr(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},ci=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},li=function(e,t,n){var r=n.length,i=Qr(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},ui=function(e,t,n,r,i,a,o,s,c,l,u){ri(t,u++,n),++i[256];for(var d=ai(i,15),f=d.t,p=d.l,m=ai(a,15),h=m.t,g=m.l,_=si(f),v=_.c,y=_.n,b=si(h),x=b.c,S=b.n,C=new Dr(19),w=0;w<v.length;++w)++C[v[w]&31];for(var w=0;w<x.length;++w)++C[x[w]&31];for(var T=ai(C,7),E=T.t,D=T.l,O=19;O>4&&!E[jr[O-1]];--O);var k=l+5<<3,A=ci(i,Ur)+ci(a,Wr)+o,j=ci(i,f)+ci(a,h)+o+14+3*O+ci(C,E)+2*C[16]+3*C[17]+7*C[18];if(c>=0&&k<=A&&k<=j)return li(t,u,e.subarray(c,c+l));var M,N,P,F;if(ri(t,u,1+(j<A)),u+=2,j<A){M=Hr(f,p,0),N=f,P=Hr(h,g,0),F=h;var I=Hr(E,D,0);ri(t,u,y-257),ri(t,u+5,S-1),ri(t,u+10,O-4),u+=14;for(var w=0;w<O;++w)ri(t,u+3*w,E[jr[w]]);u+=3*O;for(var ee=[v,x],te=0;te<2;++te)for(var L=ee[te],w=0;w<L.length;++w){var R=L[w]&31;ri(t,u,I[R]),u+=E[R],R>15&&(ri(t,u,L[w]>>5&127),u+=L[w]>>12)}}else M=Gr,N=Ur,P=qr,F=Wr;for(var w=0;w<s;++w){var ne=r[w];if(ne>255){var R=ne>>18&31;ii(t,u,M[R+257]),u+=N[R+257],R>7&&(ri(t,u,ne>>23&31),u+=kr[R]);var re=ne&31;ii(t,u,P[re]),u+=F[re],re>3&&(ii(t,u,ne>>5&8191),u+=Ar[re])}else ii(t,u,M[ne]),u+=N[ne]}return ii(t,u,M[256]),u+N[256]},di=new Or([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fi=new Er(0),pi=function(e,t,n,r,i,a){var o=a.z||e.length,s=new Er(r+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(r,s.length-i),l=a.l,u=(a.r||0)&7;if(t){u&&(c[0]=a.r>>3);for(var d=di[t-1],f=d>>13,p=d&8191,m=(1<<n)-1,h=a.p||new Dr(32768),g=a.h||new Dr(m+1),_=Math.ceil(n/3),v=2*_,y=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<v)&m},b=new Or(25e3),x=new Dr(288),S=new Dr(32),C=0,w=0,T=a.i||0,E=0,D=a.w||0,O=0;T+2<o;++T){var k=y(T),A=T&32767,j=g[k];if(h[A]=j,g[k]=A,D<=T){var M=o-T;if((C>7e3||E>24576)&&(M>423||!l)){u=ui(e,c,0,b,x,S,w,E,O,T-O,u),E=C=w=0,O=T;for(var N=0;N<286;++N)x[N]=0;for(var N=0;N<30;++N)S[N]=0}var P=2,F=0,I=p,ee=A-j&32767;if(M>2&&k==y(T-ee))for(var te=Math.min(f,M)-1,L=Math.min(32767,T),R=Math.min(258,M);ee<=L&&--I&&A!=j;){if(e[T+P]==e[T+P-ee]){for(var ne=0;ne<R&&e[T+ne]==e[T+ne-ee];++ne);if(ne>P){if(P=ne,F=ee,ne>te)break;for(var re=Math.min(ee,ne-2),ie=0,N=0;N<re;++N){var ae=T-ee+N&32767,oe=ae-h[ae]&32767;oe>ie&&(ie=oe,j=ae)}}}A=j,j=h[A],ee+=A-j&32767}if(F){b[E++]=268435456|Fr[P]<<18|Rr[F];var se=Fr[P]&31,ce=Rr[F]&31;w+=kr[se]+Ar[ce],++x[257+se],++S[ce],D=T+P,++C}else b[E++]=e[T],++x[e[T]]}}for(T=Math.max(T,D);T<o;++T)b[E++]=e[T],++x[e[T]];u=ui(e,c,l,b,x,S,w,E,O,T-O,u),l||(a.r=u&7|c[u/8|0]<<3,u-=7,a.h=g,a.p=h,a.i=T,a.w=D)}else{for(var T=a.w||0;T<o+l;T+=65535){var le=T+65535;le>=o&&(c[u/8|0]=l,le=o),u=li(c,u+1,e.subarray(T,le))}a.i=o}return $r(s,0,r+Qr(u)+i)},mi=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),hi=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=mi[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},gi=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},_i=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new Er(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return pi(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},vi=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},yi=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&vi(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},bi=function(e){(e[0]!=31||e[1]!=139||e[2]!=8)&&ti(6,`invalid gzip data`);var t=e[3],n=10;t&4&&(n+=(e[10]|e[11]<<8)+2);for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(t&2)},xi=function(e){return 10+(e.filename?e.filename.length+1:0)},Si=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=gi();i.p(t.dictionary),vi(e,2,i.d())}},Ci=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&ti(6,`invalid zlib data`),(e[1]>>5&1)==+!t&&ti(6,`invalid zlib data: `+(e[1]&32?`need`:`unexpected`)+` dictionary`),(e[1]>>3&4)+2};function wi(e,t){return typeof e==`function`&&(t=e,e={}),this.ondata=t,e}var Ti=function(){function e(e,t){if(typeof e==`function`&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new Er(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(_i(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||ti(5),this.s.l&&ti(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new Er(n&-32768);r.set(this.b.subarray(0,this.s.z)),this.b=r}var i=this.b.length-this.s.z;this.b.set(e.subarray(0,i),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(i),32768),this.s.z=e.length-i+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=t&1,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e.prototype.flush=function(){this.ondata||ti(5),this.s.l&&ti(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},e}();function Ei(e,t){return _i(e,t||{},0,0)}var Di=function(){function e(e,t){typeof e==`function`&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new Er(32768),this.p=new Er(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||ti(5),this.d&&ti(4),!this.p.length)this.p=e;else if(e.length){var t=new Er(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=ni(this.p,this.s,this.o);this.ondata($r(n,t,this.s.b),this.d),this.o=$r(n,this.s.b-32768),this.s.b=this.o.length,this.p=$r(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();function Oi(e,t){return ni(e,{i:2},t&&t.out,t&&t.dictionary)}var ki=function(){function e(e,t){this.c=hi(),this.l=0,this.v=1,Ti.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,Ti.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=_i(e,this.o,this.v&&xi(this.o),t&&8,this.s);this.v&&=(yi(n,this.o),0),t&&(vi(n,n.length-8,this.c.d()),vi(n,n.length-4,this.l)),this.ondata(n,t)},e.prototype.flush=function(){Ti.prototype.flush.call(this)},e}();function Ai(e,t){t||={};var n=hi(),r=e.length;n.p(e);var i=_i(e,t,xi(t),8),a=i.length;return yi(i,t),vi(i,a-8,n.d()),vi(i,a-4,r),i}var ji=function(){function e(e,t){this.v=1,this.r=0,Di.call(this,e,t)}return e.prototype.push=function(e,t){if(Di.prototype.e.call(this,e),this.r+=e.length,this.v){var n=this.p.subarray(this.v-1),r=n.length>3?bi(n):4;if(r>n.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-n.length);this.p=n.subarray(r),this.v=0}Di.prototype.c.call(this,t),this.s.f&&!this.s.l&&!t&&(this.v=Qr(this.s.p)+9,this.s={i:0},this.o=new Er(0),this.push(new Er(0),t))},e}(),Mi=function(){function e(e,t){this.c=gi(),this.v=1,Ti.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),Ti.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=_i(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&=(Si(n,this.o),0),t&&vi(n,n.length-4,this.c.d()),this.ondata(n,t)},e.prototype.flush=function(){Ti.prototype.flush.call(this)},e}();function Ni(e,t){t||={};var n=gi();n.p(e);var r=_i(e,t,t.dictionary?6:2,4);return Si(r,t),vi(r,r.length-4,n.d()),r}var Pi=function(){function e(e,t){Di.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(Di.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(Ci(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&ti(6,`invalid zlib data`),this.p=this.p.subarray(0,-4)),Di.prototype.c.call(this,t)},e}();function Fi(e,t){return ni(e.subarray(Ci(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}var Ii=function(){function e(e,t){this.o=wi.call(this,e,t)||{},this.G=ji,this.I=Di,this.Z=Pi}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,n){e.ondata(t,n)}},e.prototype.push=function(e,t){if(this.ondata||ti(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new Er(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},e}(),Li=typeof TextDecoder<`u`&&new TextDecoder;try{Li.decode(fi,{stream:!0})}catch{}var{Transform:Ri}=Fe,zi={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_DEFAULT_WINDOWBITS:15,Z_DEFAULT_MEMLEVEL:8,Z_DEFAULT_CHUNK:16384,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_PARAM_MODE:0,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_PARAM_QUALITY:1,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_SIZE_HINT:5},Bi=e=>typeof e==`string`?new TextEncoder().encode(e):e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Vi=e=>E.Buffer.from(e.buffer,e.byteOffset,e.byteLength),Hi=e=>e?.level===void 0||e.level<0?6:Math.min(9,e.level),Ui=(e,t=-3,n=`Z_DATA_ERROR`)=>Object.assign(Error(e),{errno:t,code:n}),Wi=()=>Ui(`unexpected end of file`,-5,`Z_BUF_ERROR`),Gi=e=>{let t=e.code;return typeof t==`string`?e:t===0?Wi():Ui(e.message||`invalid compressed data`)};function Ki(e){let t=[],n=0;do{let r=n+Ji(e.subarray(n)),i=Oi(e.subarray(r)),a=ia(i),o=i.length,s=[a,a>>>8,a>>>16,a>>>24,o,o>>>8,o>>>16,o>>>24],c=r;for(;c+8<=e.length&&s.some((t,n)=>e[c+n]!==(t&255));)c++;if(c+8>e.length)throw Wi();t.push(i),n=c+8}while(n<e.length&&e[n]!==0);return t.length===1?t[0]:E.Buffer.concat(t)}function qi(e){if(e.length<2)throw Wi();if((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)throw Ui(`incorrect header check`);if(e.length<8)throw Wi();return Fi(e)}function Ji(e){if([31,139].some((t,n)=>n<e.length&&e[n]!==t))throw Ui(`incorrect header check`);if(e.length>2&&e[2]!==8)throw Ui(`unknown compression method`);if(e.length<10)throw Wi();let t=e[3],n=10;if(t&4&&(n+=2+(e[10]|e[11]<<8)),t&8)for(;n<e.length&&e[n++];);if(t&16)for(;n<e.length&&e[n++];);if(t&2&&(n+=2),n>=e.length)throw Wi();return n}var Yi={gzipSync:(e,t)=>Vi(Ai(Bi(e),{level:Hi(t)})),deflateSync:(e,t)=>Vi(Ni(Bi(e),{level:Hi(t)})),deflateRawSync:(e,t)=>Vi(Ei(Bi(e),{level:Hi(t)})),gunzipSync:e=>Vi(Ki(Bi(e))),inflateSync:e=>Vi(qi(Bi(e))),inflateRawSync:e=>Vi(Oi(Bi(e))),unzipSync:e=>{let t=Bi(e);return Vi(t[0]===31&&t[1]===139?Ki(t):qi(t))}},Xi=e=>(t,n)=>{try{return e(t,n)}catch(e){throw Gi(e)}},Zi=e=>(t,n,r)=>{typeof n==`function`&&([r,n]=[n,void 0]),setTimeout(()=>{let i;try{i=e(t,n)}catch(e){return r?.(Gi(e))}r?.(null,i)},0)};function Qi(e,t){class n extends Ri{bytesWritten=0;constructor(e){super(),this.engine=t(e),this.engine.ondata=e=>{e.length&&this.push(Vi(e))}}_transform(e,t,n){try{this.engine.push(Bi(e))}catch(e){return n(Gi(e))}n()}_flush(e){try{this.engine.push(new Uint8Array,!0)}catch(t){return e(Gi(t))}e()}close(e){this.destroy(),e?.()}flush(e,t){typeof e==`function`&&(t=e);let n=()=>t?.();if(this.writableFinished)return queueMicrotask(n);if(this.writableEnded)return void this.once(`end`,n);this.write(new Uint8Array,()=>{this.engine.flush?.(),n()})}params(e,t,n){n?.()}reset(){}}return Object.defineProperty(n,"name",{value:e}),n}function $i(){let e=new ji,t=0,n=0,r=new Uint8Array,i={ondata:()=>{},push(i,a){let o=new Uint8Array(r.length+i.length);if(o.set(r),o.set(i,r.length),r=o.slice(-8),e.push(i,a),!a)return;let s=[t,t>>>8,t>>>16,t>>>24,n,n>>>8,n>>>16];if(r.length<8||[...s,n>>>24].some((e,t)=>r[t]!==(e&255)))throw Wi()}};return e.ondata=(e,r)=>{t=ia(e,t),n+=e.length,i.ondata(e,r)},e.onmember=()=>{t=0,n=0},i}var ea={Gzip:Qi(`Gzip`,e=>new ki({level:Hi(e)})),Gunzip:Qi(`Gunzip`,$i),Deflate:Qi(`Deflate`,e=>new Mi({level:Hi(e)})),Inflate:Qi(`Inflate`,()=>new Pi),DeflateRaw:Qi(`DeflateRaw`,e=>new Ti({level:Hi(e)})),InflateRaw:Qi(`InflateRaw`,()=>new Di),Unzip:Qi(`Unzip`,()=>new Ii)},ta={createGzip:e=>new ea.Gzip(e),createGunzip:e=>new ea.Gunzip(e),createDeflate:e=>new ea.Deflate(e),createInflate:e=>new ea.Inflate(e),createDeflateRaw:e=>new ea.DeflateRaw(e),createInflateRaw:e=>new ea.InflateRaw(e),createUnzip:e=>new ea.Unzip(e)},na=()=>{throw Object.assign(Error(`zlib: brotli is not available in the playground yet`),{code:`ERR_NOT_AVAILABLE`})},ra=null;function ia(e,t=0){if(!ra){ra=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=t&1?3988292384^t>>>1:t>>>1;ra[e]=t>>>0}}let n=(t^4294967295)>>>0;for(let t of Bi(e))n=ra[(n^t)&255]^n>>>8;return(n^4294967295)>>>0}function aa(){let e=Object.fromEntries(Object.entries(Yi).map(([e,t])=>[e,Xi(t)]));return{...e,gzip:Zi(e.gzipSync),gunzip:Zi(e.gunzipSync),deflate:Zi(e.deflateSync),inflate:Zi(e.inflateSync),deflateRaw:Zi(e.deflateRawSync),inflateRaw:Zi(e.inflateRawSync),unzip:Zi(e.unzipSync),...ta,...ea,brotliCompressSync:na,brotliDecompressSync:na,brotliCompress:(e,t,n)=>setTimeout(()=>{try{na()}catch(e){(typeof t==`function`?t:n)?.(e)}},0),brotliDecompress:(e,t,n)=>setTimeout(()=>{try{na()}catch(e){(typeof t==`function`?t:n)?.(e)}},0),createBrotliCompress:na,createBrotliDecompress:na,crc32:ia,constants:zi,codes:{Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5},...Object.fromEntries(Object.entries(zi).filter(([e])=>e.startsWith(`Z_`)))}}var oa=Symbol.for(`nodejs.util.inspect.custom`),sa={number:[33,39],bigint:[33,39],boolean:[33,39],string:[32,39],undefined:[90,39],null:[1,22],symbol:[32,39],special:[36,39],date:[35,39],regexp:[31,39]},ca=/^[A-Za-z_$][\w$]*$/;function la(e){let t=e.message?`${e.name}: ${e.message}`:String(e.name),n=[],r=String(e.stack??``),i=/^\s+at /m.test(r);for(let e of r.split(`
24
+ `)){let t,r=/^\s+at (.*)$/.exec(e),a=i?null:/^([^@]*)@(.*)$/.exec(e);if(r)t=r[1];else if(a&&(a[1]||a[2]))t=a[1]&&a[2]?`${a[1]} (${a[2]})`:a[1]||a[2];else continue;/\/nodejs\.js|\[native code\]|^eval \(eval at/.test(t)||n.push(` at ${t.replaceAll(`file://`,``)}`)}return[t,...n].join(`
25
+ `)}function ua(e){let t=e.includes(`'`)?e.includes(`"`)?e.includes("`")?`'`:"`":`"`:`'`;return`${t}${e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`).replace(/\t/g,`\\t`).replace(new RegExp(t,`g`),`\\${t}`)}${t}`}function da(e,t={}){let n=t.depth===null?1/0:t.depth??2,r=t.breakLength??80,i=[],a=(e,n)=>{if(!t.colors||!sa[n])return e;let[r,i]=sa[n];return`\x1b[${r}m${e}\x1b[${i}m`},o=(e,r,l)=>{switch(typeof e){case`string`:return l?a(ua(e),`string`):e;case`number`:return a(Object.is(e,-0)?`-0`:String(e),`number`);case`bigint`:return a(`${e}n`,`bigint`);case`boolean`:return a(String(e),`boolean`);case`undefined`:return a(`undefined`,`undefined`);case`symbol`:return a(e.toString(),`symbol`);case`function`:{let t=e.name?`: ${e.name}`:` (anonymous)`,i=/^class\s/.test(Function.prototype.toString.call(e))?`class`:`Function`,o=i===`class`?`[class ${e.name||`(anonymous)`}]`:`[${i}${t}]`,c=Object.keys(e);return!c.length||r>n?a(o,`special`):s(e,c,r,a(o,`special`),`{`,`}`)}}if(e===null)return a(`null`,`null`);let u=e;if(typeof u[oa]==`function`){let i=u[oa](n-r,t,da);if(i!==e)return typeof i==`string`?i:o(i,r,l)}if(i.includes(e))return a(`[Circular *1]`,`special`);if(e instanceof Error){let t=la(e),i=Object.keys(e).filter(e=>e!==`stack`&&e!==`message`);return!i.length||r>n?l?`[${t}]`:t:s(e,i,r,t,`{`,`}`)}if(e instanceof Date)return a(Number.isNaN(e.getTime())?`Invalid Date`:e.toISOString(),`date`);if(e instanceof RegExp)return a(String(e),`regexp`);if(e instanceof Promise)return`Promise { <pending> }`;if(E.Buffer.isBuffer(e)){let t=[...e.subarray(0,50)].map(e=>e.toString(16).padStart(2,`0`)).join(` `);return`<Buffer${t?` ${t}`:``}${e.length>50?` ... ${e.length-50} more bytes`:``}>`}if(r>n){if(Array.isArray(e))return a(`[Array]`,`special`);let t=e.constructor?.name;return a(`[${t&&t!==`Object`?t:`Object`}]`,`special`)}i.push(e);try{if(Array.isArray(e)){let t=[],n=0;for(;n<e.length&&t.length<100;n++){if(n in e){t.push(o(e[n],r+1,!0));continue}let i=n;for(;i+1<e.length&&!(i+1 in e);)i++;let s=i-n+1;t.push(a(`<${s} empty item${s===1?``:`s`}>`,`undefined`)),n=i}let i=e.length-n;i&&t.push(`... ${i} more item${i===1?``:`s`}`);let s=Object.keys(e).filter(e=>!/^\d+$/.test(e));for(let e of s)t.push(`${e}: ${o(u[e],r+1,!0)}`);return c(t,r,``,`[`,`]`)}if(ArrayBuffer.isView(e)){let t=e,n=Array.from({length:Math.min(t.length,100)},(e,n)=>o(t[n],r+1,!0));return c(n,r,`${e.constructor.name}(${t.length}) `,`[`,`]`)}if(e instanceof Map){let t=[...e].map(([e,t])=>`${o(e,r+1,!0)} => ${o(t,r+1,!0)}`);return c(t,r,`Map(${e.size}) `,`{`,`}`)}if(e instanceof Set){let t=[...e].map(e=>o(e,r+1,!0));return c(t,r,`Set(${e.size}) `,`{`,`}`)}let t=Object.getPrototypeOf(e),n=t===null?`[Object: null prototype]`:t.constructor?.name,i=!n||n===`Object`?``:`${n} `,l=[...Object.keys(e),...Object.getOwnPropertySymbols(e)];return s(e,l,r,i.trim(),`{`,`}`)}finally{i.pop()}},s=(e,t,n,r,i,s)=>{let l=e,u=t.map(t=>{let r=typeof t==`symbol`?`[${t.toString()}]`:ca.test(t)?t:ua(t),i=Object.getOwnPropertyDescriptor(e,t);return`${r}: ${i&&i.get&&!(`value`in i)?a(i.set?`[Getter/Setter]`:`[Getter]`,`special`):o(l[t],n+1,!0)}`});return u.length?c(u,n,r?`${r} `:``,i,s):r?`${r} ${i}${s}`:`${i}${s}`},c=(e,t,n,i,a)=>{if(!e.length)return`${n}${i}${a}`;let o=`${n}${i} ${e.join(`, `)} ${a}`,s=o.replace(/\x1b\[\d+m/g,``);if(s.length+t*2<=r&&!s.includes(`
26
+ `))return o;let c=` `.repeat(t+1);return`${n}${i}\n${e.map(e=>c+e.replace(/\n/g,`\n${c}`)).join(`,
27
+ `)}\n${` `.repeat(t)}${a}`};return o(e,0,!1)}da.custom=oa,da.defaultOptions={depth:2,colors:!1};var fa=e=>Object.is(e,-0)?`-0`:String(e);function pa(e){if(e instanceof Date)return!0;let t=e;if(typeof t[Symbol.toPrimitive]==`function`)return!1;if(typeof t.toString!=`function`)return!0;let n=e;for(;n&&!Object.prototype.hasOwnProperty.call(n,`toString`);)n=Object.getPrototypeOf(n);if(n===e)return!1;let r=n&&Object.getOwnPropertyDescriptor(n,`constructor`)?.value;return typeof r==`function`&&/^(Object|Function|Array|Number|Boolean|String|Symbol|BigInt|Date|RegExp|Promise|Map|Set|WeakMap|WeakSet|ArrayBuffer|DataView|\w*Error)$/.test(r.name)}function ma(...e){return ha({},...e)}function ha(e,...t){let n=``,r=t;if(typeof t[0]==`string`){let i=1;n=t[0].replace(/%([sdifjoOc%])/g,(n,r)=>{if(r===`%`)return`%`;if(i>=t.length)return n;let a=t[i++];switch(r){case`s`:return typeof a==`number`?fa(a):typeof a==`bigint`?`${a}n`:typeof a==`object`&&a&&pa(a)?da(a,{...e,depth:0,colors:!1}):String(a);case`d`:return typeof a==`bigint`?`${a}n`:typeof a==`symbol`?`NaN`:fa(Number(a));case`i`:return typeof a==`bigint`?`${a}n`:typeof a==`symbol`?`NaN`:String(parseInt(String(a),10));case`f`:return typeof a==`symbol`?`NaN`:String(parseFloat(String(a)));case`j`:try{return JSON.stringify(a)}catch{return`[Circular]`}case`o`:return da(a,{...e,showHidden:!0,depth:4});case`O`:return da(a,e);default:return``}}),r=t.slice(i)}else n=t.length?da(t[0],e):``,r=t.slice(1);for(let t of r)n+=` ${typeof t==`string`?t:da(t,e)}`;return n}var ga=Symbol.for(`nodejs.util.promisify.custom`);function _a(e){let t=e[ga];return typeof t==`function`?t:function(...t){return new Promise((n,r)=>{e.call(this,...t,(e,t)=>e?r(e):n(t))})}}_a.custom=ga;var va=e=>t=>Object.prototype.toString.call(t)===`[object ${e}]`,ya={isPromise:e=>e instanceof Promise,isDate:e=>e instanceof Date,isRegExp:e=>e instanceof RegExp,isMap:e=>e instanceof Map,isSet:e=>e instanceof Set,isNativeError:e=>e instanceof Error,isTypedArray:e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),isUint8Array:e=>e instanceof Uint8Array,isArrayBuffer:e=>e instanceof ArrayBuffer,isAnyArrayBuffer:e=>e instanceof ArrayBuffer||e instanceof SharedArrayBuffer,isArrayBufferView:e=>ArrayBuffer.isView(e),isAsyncFunction:va(`AsyncFunction`),isGeneratorFunction:e=>va(`GeneratorFunction`)(e)||va(`AsyncGeneratorFunction`)(e),isGeneratorObject:va(`Generator`),isBoxedPrimitive:e=>e instanceof Number||e instanceof String||e instanceof Boolean||e instanceof BigInt||e instanceof Symbol,isProxy:()=>!1,isWeakMap:e=>e instanceof WeakMap,isWeakSet:e=>e instanceof WeakSet,isDataView:e=>e instanceof DataView};function ba(e,t,n=new Map){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;let r=Object.prototype.toString.call(e);if(r!==Object.prototype.toString.call(t))return!1;if(n.get(e)?.has(t))return!0;n.has(e)||n.set(e,new Set),n.get(e).add(t);let i=(e,t)=>ba(e,t,n);if(e instanceof Date&&e.getTime()!==t.getTime())return!1;if(e instanceof RegExp){let n=t;if(String(e)!==String(n)||e.lastIndex!==n.lastIndex)return!1}if(e instanceof Error){let n=t;if(e.name!==n.name||e.message!==n.message||(`cause`in e||`cause`in n)&&!i(e.cause,n.cause))return!1}if(/^\[object (Number|String|Boolean|BigInt|Symbol)\]$/.test(r)){let n=e=>e.valueOf();if(!Object.is(n(e),n(t)))return!1}if(ArrayBuffer.isView(e)){let n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=new Uint8Array(t.buffer,t.byteOffset);if(n.length!==t.byteLength||n.some((e,t)=>e!==r[t]))return!1}let a=(e,t,n,r=i)=>{if(typeof e!=`object`||!e)return!1;for(let i of t)if(!n.has(i)&&r(e,i))return n.add(i),!0;return!1};if(e instanceof Map){let n=t;if(e.size!==n.size)return!1;let r=new Set;for(let[t,o]of e)if(n.has(t)&&(typeof t!=`object`||!t||!r.has(t))){if(!i(o,n.get(t)))return!1;r.add(t)}else if(!a(t,n.keys(),r,(e,t)=>i(e,t)&&i(o,n.get(t))))return!1}if(e instanceof Set){let n=t;if(e.size!==n.size)return!1;let r=new Set;for(let t of e)if(n.has(t))r.add(t);else if(!a(t,n,r))return!1}if(ArrayBuffer.isView(e))return!0;let o=e=>[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))],s=o(e);return s.length===o(t).length&&s.every(n=>Object.prototype.propertyIsEnumerable.call(t,n)&&i(e[n],t[n]))}var xa=(e,t)=>Object.assign(TypeError(t),{code:e});function Sa(e={}){let t=e.args??globalThis.process.argv.slice(2),n=e.options??{},r=e.strict??!0,i=e.allowPositionals??!r,a=new Map(Object.entries(n).filter(([,e])=>e.short).map(([e,t])=>[t.short,e])),o=Object.create(null),s=[],c=[],l=(e,t)=>{n[e]?.multiple?(o[e]??=[]).push(t):o[e]=t},u=(a,o,s,u)=>{let d=n[s],f=!1;if(!d&&e.allowNegative&&s.startsWith(`no-`)&&n[s.slice(3)]?.type===`boolean`&&(s=s.slice(3),d=n[s],f=!0),!d&&r)throw xa(`ERR_PARSE_ARGS_UNKNOWN_OPTION`,`Unknown option '${o}'${i?`. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- "${o}"`:``}`);let p=u,m=0;if(d?.type===`string`&&p===void 0){if(p=t[a+1],p===void 0||r&&p.startsWith(`-`))throw xa(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option '${o}${d.short&&o.startsWith(`--`)?`, -${d.short}`:``} <value>' argument missing`);m=1}else if(d?.type===`boolean`&&p!==void 0&&r)throw xa(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option '${o}' does not take an argument`);return c.push({kind:`option`,name:s,rawName:o,index:a,value:p,inlineValue:p===void 0?void 0:u!==void 0}),l(s,d?.type===`string`?p:p===void 0?!f:p),m};for(let e=0;e<t.length;e++){let o=t[e];if(o===`--`){c.push({kind:`option-terminator`,index:e});for(let n=e+1;n<t.length;n++)c.push({kind:`positional`,index:n,value:t[n]}),s.push(t[n]);break}if(o.startsWith(`--`)){let t=o.indexOf(`=`),n=t<0?o.slice(2):o.slice(2,t);e+=u(e,t<0?o:o.slice(0,t),n,t<0?void 0:o.slice(t+1))}else if(o.startsWith(`-`)&&o.length>1)for(let t=1;t<o.length;t++){let r=o[t],i=a.get(r)??r,s=o.slice(t+1);if(n[i]?.type===`string`&&s){u(e,`-${r}`,i,s);break}e+=u(e,`-${r}`,i,void 0)}else{if(r&&!i)throw xa(`ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL`,`Unexpected argument '${o}'. This command does not take positional arguments`);c.push({kind:`positional`,index:e,value:o}),s.push(o)}}for(let[e,t]of Object.entries(n))o[e]===void 0&&t.default!==void 0&&(o[e]=t.default);return e.tokens?{values:o,positionals:s,tokens:c}:{values:o,positionals:s}}function Ca(e){let t=new Set;return{format:ma,formatWithOptions:ha,inspect:da,promisify:_a,callbackify:e=>(...t)=>{let n=t.pop();e(...t).then(e=>n(null,e),e=>n(e))},inherits(e,t){e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype)},deprecate(n,r,i){return function(...a){let o=i??r;return t.has(o)||(t.add(o),e(`(node) [${i??`DEP0000`}] DeprecationWarning: ${r}\n`)),n.apply(this,a)}},debuglog:()=>Object.assign(()=>{},{enabled:!1}),debug:()=>Object.assign(()=>{},{enabled:!1}),isDeepStrictEqual:(e,t)=>ba(e,t),types:ya,isArray:Array.isArray,isError:e=>e instanceof Error,isFunction:e=>typeof e==`function`,isString:e=>typeof e==`string`,isObject:e=>typeof e==`object`&&!!e,isPrimitive:e=>e===null||typeof e!=`object`&&typeof e!=`function`,parseEnv:e=>{let t={};for(let n of e.split(/\r?\n/)){let e=/^\s*(?:export\s+)?([\w.-]+)\s*=\s*(.*?)\s*$/.exec(n);if(!e)continue;let r=e[2],i=/^(['"`])([\s\S]*)\1$/.exec(r);r=i?i[1]===`"`?i[2].replace(/\\n/g,`
28
+ `):i[2]:r.replace(/\s+#.*$/,``),t[e[1]]=r}return t},parseArgs:Sa,stripVTControlCharacters:e=>e.replace(/\x1b\[[0-9;]*[A-Za-z]/g,``),styleText:(e,t)=>{let n={bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39]};for(let r of[e].flat().reverse()){let e=n[r];e&&(t=`\x1b[${e[0]}m${t}\x1b[${e[1]}m`)}return t},toUSVString:e=>e,TextEncoder,TextDecoder}}var wa=`assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.events.fs.fs/promises.http.http2.https.inspector.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib`.split(`.`);function Ta(e,t,n={}){let r={...n};for(let n of t)r[n]=()=>{let t=Error(`${e}.${n} is not available in the playground yet`);throw t.code=`ERR_NOT_AVAILABLE`,t};return r}function Ea(e){let{process:t,timers:n}=e,r=Ca(e=>t.stderr.write(e)),i=Ba(),a=null,o=()=>e.net?a??=An(e.net):null,s={assert:()=>i,"assert/strict":()=>i.strict,async_hooks:()=>{class e{store;getStore(){return this.store}run(e,t,...n){let r=this.store;this.store=e;try{return t(...n)}finally{this.store=r}}enterWith(e){this.store=e}exit(e,...t){return this.run(void 0,e,...t)}disable(){this.store=void 0}static bind=e=>e;static snapshot=()=>(e,...t)=>e(...t)}class t{type;constructor(e){this.type=e}runInAsyncScope(e,t,...n){return e.apply(t,n)}bind(e){return e}emitDestroy(){return this}asyncId=()=>1;triggerAsyncId=()=>0;static bind=e=>e}return{AsyncLocalStorage:e,AsyncResource:t,createHook:()=>({enable(){return this},disable(){return this}}),executionAsyncId:()=>1,triggerAsyncId:()=>0,executionAsyncResource:()=>({})}},buffer:()=>({Buffer:E.Buffer,Blob,File:globalThis.File,constants:{MAX_LENGTH:2**32,MAX_STRING_LENGTH:2**29-24},kMaxLength:2**32,atob,btoa,isUtf8:e=>{try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e),!0}catch{return!1}},isAscii:e=>e.every(e=>e<128)}),child_process:()=>e.child?.module??Ta(`child_process`,[`spawn`,`exec`,`execFile`,`fork`,`spawnSync`,`execSync`,`execFileSync`]),cluster:()=>({isPrimary:!0,isMaster:!0,isWorker:!1,workers:{},...Ta(`cluster`,[`fork`,`setupPrimary`])}),console:()=>e.console,constants:()=>({...Ma.signals,...e.fs.constants}),crypto:()=>La(),dgram:()=>e.net?.dgram??Ta(`dgram`,[`createSocket`]),diagnostics_channel:()=>{let e=e=>({name:e,hasSubscribers:!1,publish(){},subscribe(){},unsubscribe:()=>!0,bindStore(){},unbindStore(){},runStores:(e,t,n,...r)=>t.apply(n,r)});return{channel:e,hasSubscribers:()=>!1,subscribe(){},unsubscribe:()=>!0,tracingChannel:t=>({start:e(`tracing:${t}:start`),end:e(`tracing:${t}:end`),asyncStart:e(`tracing:${t}:asyncStart`),asyncEnd:e(`tracing:${t}:asyncEnd`),error:e(`tracing:${t}:error`),hasSubscribers:!1,subscribe(){},unsubscribe(){},traceSync:(e,t,n,...r)=>e.apply(n,r),tracePromise:(e,t,n,...r)=>e.apply(n,r),traceCallback:(e,t,n,r,...i)=>e.apply(r,i)})}},dns:()=>e.net?.dns??zn(null),"dns/promises":()=>(e.net?.dns??zn(null)).promises,events:()=>{let e=Ne.EventEmitter;return e.EventEmitter??=Ne.EventEmitter,e.once??=Ne.once,e.on??=Aa,e.setMaxListeners??=()=>{},e.getEventListeners??=(e,t)=>e.listeners(t),e.addAbortListener??=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),{[Symbol.dispose]:()=>e.removeEventListener(`abort`,t)}),e},fs:()=>e.fs,"fs/promises":()=>e.fsPromises,http:()=>o()?.http??Ta(`http`,[`createServer`,`request`,`get`],{STATUS_CODES:yn,METHODS:bn,Agent:Ra,globalAgent:{}}),http2:()=>Ta(`http2`,[`createServer`,`createSecureServer`,`connect`],{constants:Da(),sensitiveHeaders:Symbol(`nodejs.http2.sensitiveHeaders`),getDefaultSettings:()=>({})}),https:()=>o()?.https??Ta(`https`,[`createServer`,`request`,`get`],{Agent:Ra,globalAgent:new Ra}),inspector:()=>({url:()=>void 0,open(){},close(){},Session:class{connect(){}post(){}disconnect(){}}}),module:()=>e.module(),net:()=>e.net?.module??Ta(`net`,[`createServer`,`createConnection`,`connect`],{isIP:e=>/^\d+\.\d+\.\d+\.\d+$/.test(e)?4:e.includes(`:`)?6:0,isIPv4:e=>/^\d+\.\d+\.\d+\.\d+$/.test(e),isIPv6:e=>e.includes(`:`),Socket:class extends Ne.EventEmitter{}}),os:()=>Na(e.env),path:()=>e.path,"path/posix":()=>e.path,"path/win32":()=>e.path,perf_hooks:()=>({performance:Object.assign(performance,{markResourceTiming:performance.markResourceTiming??(()=>void 0)}),PerformanceObserver:class{observe(){}disconnect(){}},monitorEventLoopDelay:()=>({enable(){},disable(){},percentile:()=>0,mean:0,max:0,min:0}),constants:{}}),process:()=>t,punycode:()=>({toASCII:e=>e,toUnicode:e=>e}),querystring:()=>ja,readline:()=>Zn().readline,"readline/promises":()=>Zn().promises,stream:()=>{let e=Fe.Stream;for(let[t,n]of Object.entries(Fe))t in e||(e[t]=n);return e},"stream/consumers":()=>{let e=async e=>{let t=[];for await(let n of e)t.push(E.Buffer.from(n));return E.Buffer.concat(t)};return{buffer:e,arrayBuffer:async t=>new Uint8Array(await e(t)).buffer,text:async t=>(await e(t)).toString(`utf8`),json:async t=>JSON.parse((await e(t)).toString(`utf8`)),blob:async t=>new Blob([await e(t)])}},"stream/promises":()=>Fe.promises,"stream/web":()=>({ReadableStream,WritableStream,TransformStream,TextEncoderStream,TextDecoderStream}),string_decoder:()=>({StringDecoder:Pe.StringDecoder}),sys:()=>r,timers:()=>n,"timers/promises":()=>ka(n),tls:()=>e.net?Tr(e.net,e.tls,e.env):Ta(`tls`,[`connect`,`createServer`,`createSecureContext`],{rootCertificates:[]}),tty:()=>({isatty:t=>t===0?e.stdinTty:e.tty&&(t===1||t===2),ReadStream:class extends Ne.EventEmitter{},WriteStream:class extends Ne.EventEmitter{}}),url:()=>Fa(t=>e.path.resolve(t)),util:()=>r,"util/types":()=>ya,v8:()=>({getHeapStatistics:()=>({total_heap_size:3e7,used_heap_size:2e7,heap_size_limit:2**31,total_available_size:2**31}),getHeapSpaceStatistics:()=>[],setFlagsFromString(){},cachedDataVersionTag:()=>0,serialize:e=>E.Buffer.from(JSON.stringify(e)),deserialize:e=>JSON.parse(E.Buffer.from(e).toString())}),vm:()=>Ia(),wasi:()=>e.wasi(),worker_threads:()=>e.threads(),zlib:()=>aa()},c=new Map;return e=>{if(!c.has(e)){let t=s[e];if(!t)throw Error(`No such built-in module: node:${e}`);c.set(e,t())}return c.get(e)}}function Da(){let e={NGHTTP2_NO_ERROR:0,NGHTTP2_PROTOCOL_ERROR:1,NGHTTP2_INTERNAL_ERROR:2,NGHTTP2_FLOW_CONTROL_ERROR:3,NGHTTP2_SETTINGS_TIMEOUT:4,NGHTTP2_STREAM_CLOSED:5,NGHTTP2_FRAME_SIZE_ERROR:6,NGHTTP2_REFUSED_STREAM:7,NGHTTP2_CANCEL:8,NGHTTP2_COMPRESSION_ERROR:9,NGHTTP2_CONNECT_ERROR:10,NGHTTP2_ENHANCE_YOUR_CALM:11,NGHTTP2_INADEQUATE_SECURITY:12,NGHTTP2_HTTP_1_1_REQUIRED:13,NGHTTP2_SESSION_CLIENT:0,NGHTTP2_SESSION_SERVER:1,NGHTTP2_DEFAULT_WEIGHT:16,NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:1,NGHTTP2_SETTINGS_ENABLE_PUSH:2,NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS:3,NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE:4,NGHTTP2_SETTINGS_MAX_FRAME_SIZE:5,NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE:6,NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL:8,DEFAULT_SETTINGS_HEADER_TABLE_SIZE:4096,DEFAULT_SETTINGS_ENABLE_PUSH:1,DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE:65535,DEFAULT_SETTINGS_MAX_FRAME_SIZE:16384,MAX_MAX_FRAME_SIZE:16777215,MIN_MAX_FRAME_SIZE:16384,MAX_INITIAL_WINDOW_SIZE:2147483647,PADDING_STRATEGY_NONE:0,PADDING_STRATEGY_ALIGNED:1,PADDING_STRATEGY_MAX:2,PADDING_STRATEGY_CALLBACK:1};for(let[t,n]of Object.entries(yn))e[`HTTP_STATUS_${String(n).toUpperCase().replace(/[^A-Z0-9]+/g,`_`).replace(/^_|_$/g,``)}`]=Number(t);let t=new Set([`AUTHORITY`,`METHOD`,`PATH`,`SCHEME`,`STATUS`,`PROTOCOL`]);return new Proxy(e,{get(e,n){if(typeof n!=`string`||n in e)return e[n];if(n.startsWith(`HTTP2_HEADER_`)){let e=n.slice(13);return t.has(e)?`:${e.toLowerCase()}`:e.toLowerCase().replace(/_/g,`-`)}if(n.startsWith(`HTTP2_METHOD_`))return n.slice(13).replace(/_/g,`-`)}})}function Oa(e){return Object.assign(Error(`The operation was aborted`),{name:`AbortError`,code:`ABORT_ERR`,cause:e?.reason})}function ka(e){let t=e,n=(e,n,r={})=>new Promise((i,a)=>{let{signal:o,ref:s=!0}=r;if(o?.aborted)return a(Oa(o));let c=()=>{t.clearTimeout(l),a(Oa(o))},l=e(()=>{o?.removeEventListener(`abort`,c),i(n)});s||l.unref?.(),o?.addEventListener(`abort`,c,{once:!0})}),r=(e,r,i)=>n(n=>t.setTimeout(n,e),r,i),i=(e,r)=>n(e=>t.setImmediate(e),e,r);async function*a(e,n,r={}){let{signal:i,ref:a=!0}=r;if(i?.aborted)throw Oa(i);let o=0,s,c=t.setInterval(()=>{o++,s?.resolve(),s=void 0},e);a||c.unref?.();let l=()=>{t.clearInterval(c),s?.reject(Oa(i)),s=void 0};i?.addEventListener(`abort`,l,{once:!0});try{for(;;){if(i?.aborted)throw Oa(i);for(o||await new Promise((e,t)=>s={resolve:e,reject:t});o>0;o--)yield n}}finally{t.clearInterval(c),i?.removeEventListener(`abort`,l)}}return{setTimeout:r,setImmediate:i,setInterval:a,scheduler:{wait:(e,t)=>r(e,void 0,t),yield:()=>i()}}}function Aa(e,t,n={}){let{signal:r}=n,i=()=>Oa(r);if(r?.aborted)throw i();let a=[],o=[],s=null,c=!1,l=(...e)=>{let t=o.shift();t?t.resolve({value:e,done:!1}):a.push(e)},u=()=>{c=!0,e.off(t,l),t!==`error`&&e.off(`error`,d),r?.removeEventListener(`abort`,f);for(let e of o.splice(0))e.resolve({value:void 0,done:!0})},d=e=>{let t=o.shift();t?t.reject(e):s=e,u()},f=()=>d(i());return e.on(t,l),t!==`error`&&e.on(`error`,d),r?.addEventListener(`abort`,f,{once:!0}),{[Symbol.asyncIterator](){return this},next:()=>{if(a.length)return Promise.resolve({value:a.shift(),done:!1});if(s){let e=Promise.reject(s);return s=null,e}return c?Promise.resolve({value:void 0,done:!0}):new Promise((e,t)=>o.push({resolve:e,reject:t}))},return:()=>(u(),Promise.resolve({value:void 0,done:!0}))}}var ja=(()=>{let e=(e,t=!1)=>{let n=E.Buffer.from(t?e.replace(/\+/g,` `):e),r=[];for(let e=0;e<n.length;e++){let t=n[e]===37?String.fromCharCode(n[e+1],n[e+2]):``;/^[0-9a-fA-F]{2}$/.test(t)?(r.push(parseInt(t,16)),e+=2):r.push(n[e])}return E.Buffer.from(r)},t=(t,n=!1)=>{try{return decodeURIComponent(t)}catch{return new TextDecoder().decode(e(t,n))}},n=e=>encodeURIComponent(String(e)),r=e=>typeof e==`string`?e:typeof e==`number`&&Number.isFinite(e)||typeof e==`bigint`||typeof e==`boolean`?String(e):``,i=(e,t,i,a)=>{if(typeof e!=`object`||!e)return``;let o=a?.encodeURIComponent??n,s=[];for(let[t,n]of Object.entries(e)){let e=o(r(t))+(i||`=`);for(let t of Array.isArray(n)?n:[n])s.push(e+o(r(t)))}return s.join(t||`&`)},a=(e,n,r,i)=>{let a=Object.create(null);if(typeof e!=`string`||!e)return a;let o=i?.decodeURIComponent??t,s=e=>{if(!/[%+]/.test(e))return e;let n=e.replace(/\+/g,`%20`);try{return o(n)}catch{return t(n,!0)}},c=typeof i?.maxKeys==`number`?i.maxKeys:1e3,l=r||`=`,u=e.split(n||`&`);c>0&&(u=u.slice(0,c));for(let e of u){if(!e)continue;let t=e.indexOf(l),n=s(t<0?e:e.slice(0,t)),r=s(t<0?``:e.slice(t+l.length)),i=a[n];i===void 0?a[n]=r:Array.isArray(i)?i.push(r):a[n]=[i,r]}return a};return{unescapeBuffer:e,unescape:t,escape:n,stringify:i,encode:i,parse:a,decode:a}})(),Ma={signals:Qn,errno:{ENOENT:2,EACCES:13,EEXIST:17,ENOTDIR:20,EISDIR:21,EINVAL:22,ENOTEMPTY:39},priority:{PRIORITY_LOW:19,PRIORITY_NORMAL:0,PRIORITY_HIGH:-14}};function Na(e){let t=navigator.hardwareConcurrency||4,n={model:`WebAssembly playground`,speed:2400,times:{user:0,nice:0,sys:0,idle:0,irq:0}};return{EOL:`
29
+ `,devNull:`/dev/null`,constants:Ma,arch:()=>`x64`,platform:()=>`linux`,type:()=>`Linux`,machine:()=>`x86_64`,release:()=>`6.12.0-playground`,version:()=>`#1 SMP`,hostname:()=>`playground`,homedir:()=>e.HOME??`/home/user`,tmpdir:()=>e.TMPDIR??`/tmp`,endianness:()=>`LE`,cpus:()=>Array.from({length:t},()=>({...n})),availableParallelism:()=>t,totalmem:()=>4*2**30,freemem:()=>2*2**30,loadavg:()=>[0,0,0],uptime:()=>Math.floor(performance.now()/1e3),networkInterfaces:()=>({}),userInfo:()=>({username:e.USER??`user`,uid:1e3,gid:1e3,shell:`/bin/sh`,homedir:e.HOME??`/home/user`}),getPriority:()=>0,setPriority:()=>{}}}var Pa=new Set([`http:`,`https:`,`ftp:`,`gopher:`,`file:`,`ws:`,`wss:`]);function Fa(e){return{URL,URLSearchParams,fileURLToPath:e=>{let t=typeof e==`string`?new URL(e):e;if(t.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return decodeURIComponent(t.pathname)},pathToFileURL:t=>{let n=e(t);t.endsWith(`/`)&&!n.endsWith(`/`)&&(n+=`/`);let r=n.replace(/%/g,`%25`).replace(/\\/g,`%5C`).replace(/\n/g,`%0A`).replace(/\r/g,`%0D`).replace(/\t/g,`%09`).replace(/#/g,`%23`).replace(/\?/g,`%3F`);return new URL(`file://${r}`)},parse:(e,t=!1)=>{try{let n=new URL(e);return{protocol:n.protocol,slashes:!0,auth:n.username?`${n.username}${n.password?`:${n.password}`:``}`:null,host:n.host,port:n.port||null,hostname:n.hostname,hash:n.hash||null,search:n.search||null,query:t?Object.fromEntries(n.searchParams):n.search.slice(1)||null,pathname:n.pathname,path:n.pathname+n.search,href:n.href}}catch{let[n,r=``]=e.split(`?`);return{protocol:null,slashes:null,host:null,hostname:null,pathname:n,search:r?`?${r}`:null,query:t?Object.fromEntries(new URLSearchParams(r)):r||null,path:e,href:e}}},format:(e,t={})=>{if(e instanceof URL){let{auth:n=!0,search:r=!0,fragment:i=!0}=t,a=e.href.startsWith(`${e.protocol}//`),o=n&&e.username?`${e.username}${e.password?`:${e.password}`:``}@`:``;return`${e.protocol}${a?`//`:``}${o}${e.host}${e.pathname}${r?e.search:``}${i?e.hash:``}`}if(typeof e==`string`)try{return new URL(e).href}catch{return e}let n=e??{},r=e=>n[e]?String(n[e]):``,i=n.auth?`${encodeURIComponent(r(`auth`)).replace(/%3A/g,`:`)}@`:``,a=r(`protocol`);a&&!a.endsWith(`:`)&&(a+=`:`);let o=``;if(n.host)o=i+r(`host`);else if(n.hostname){let e=r(`hostname`);o=i+(e.includes(`:`)&&!/^\[.*\]$/.test(e)?`[${e}]`:e),n.port&&(o+=`:${r(`port`)}`)}let s=n.query&&typeof n.query==`object`?ja.stringify(n.query):``,c=r(`search`)||s&&`?${s}`,l=r(`pathname`).replace(/#/g,`%23`).replace(/\?/g,`%3F`);(n.slashes||Pa.has(a))&&(n.slashes||o?(l&&!l.startsWith(`/`)&&(l=`/${l}`),o=`//${o}`):a===`file:`&&(o=`//`)),c=c.replace(/#/g,`%23`),c&&!c.startsWith(`?`)&&(c=`?${c}`);let u=r(`hash`);return u&&!u.startsWith(`#`)&&(u=`#${u}`),a+o+l+c+u},resolve:(e,t)=>new URL(t,new URL(e,`resolve://`)).href.replace(/^resolve:\/\//,``),domainToASCII:e=>e,domainToUnicode:e=>e,urlToHttpOptions:e=>({protocol:e.protocol,hostname:e.hostname,port:e.port,path:e.pathname+e.search})}}function Ia(){let e=(e,t={})=>{let n=Object.keys(t);return Function(...n,`return eval(${JSON.stringify(e)})`)(...n.map(e=>t[e]))};class t{code;constructor(e){this.code=e}runInThisContext=()=>(0,eval)(this.code);runInNewContext=t=>e(this.code,t);runInContext=t=>e(this.code,t);createCachedData=()=>new Uint8Array}return{Script:t,runInThisContext:e=>(0,eval)(e),runInNewContext:e,runInContext:e,createContext:(e={})=>e,isContext:()=>!0,compileFunction:(e,t=[])=>Function(...t,e)}}function La(){let e=e=>{for(let t=0;t<e.length;t+=65536)crypto.getRandomValues(e.subarray(t,t+65536))},t=(t,n)=>{let r=E.Buffer.alloc(t);return e(r),n&&queueMicrotask(()=>n(null,r)),r},n=(t,n=0,r)=>{let i=ArrayBuffer.isView(t)?t:new Uint8Array(t),a=i.BYTES_PER_ELEMENT??1,o=i.byteLength/a;return e(new Uint8Array(i.buffer,i.byteOffset+n*a,(r??o-n)*a)),t};return{webcrypto:crypto,subtle:crypto.subtle,getRandomValues:e=>crypto.getRandomValues(e),randomUUID:()=>crypto.randomUUID(),randomBytes:t,pseudoRandomBytes:t,randomFillSync:n,randomFill:(e,...t)=>{let r=t.pop();if(typeof r!=`function`)throw Object.assign(TypeError(`The "callback" argument must be of type function`),{code:`ERR_INVALID_ARG_TYPE`});n(e,...t),queueMicrotask(()=>r(null,e))},randomInt:(e,t)=>(t===void 0&&([e,t]=[0,e]),e+Math.floor(Math.random()*(t-e))),timingSafeEqual:(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),...gn,...Ta(`crypto`,[`createCipheriv`,`createDecipheriv`,`pbkdf2Sync`,`scryptSync`,`createSign`,`createVerify`,`generateKeyPairSync`])}}var Ra=class{options;constructor(e={}){this.options=e}},za=class extends Error{code=`ERR_ASSERTION`;actual;expected;operator;generatedMessage;constructor(e){let{message:t,actual:n,expected:r,operator:i}=e;super(t??`${da(n)} ${i} ${da(r)}`),this.name=`AssertionError`,this.actual=n,this.expected=r,this.operator=i,this.generatedMessage=t===void 0}};function Ba(){let e=(e,t,n,r,i)=>{if(e instanceof Error)throw e;let a=new za({message:e??t,actual:n,expected:r,operator:i});throw a.generatedMessage=e===void 0,a},t=(e,n)=>{if(e==n)return!0;if(typeof e!=`object`||typeof n!=`object`||!e||!n||Array.isArray(e)!==Array.isArray(n))return!1;for(let t of[Date,RegExp,Error,Map,Set])if(e instanceof t!=n instanceof t)return!1;if(e instanceof Date&&e.getTime()!==n.getTime()||e instanceof RegExp&&String(e)!==String(n)||e instanceof Error&&(e.name!==n.name||e.message!==n.message))return!1;if(e instanceof Map){let r=n;if(e.size!==r.size)return!1;for(let[n,i]of e)if(r.has(n)?!t(i,r.get(n)):![...r].some(([e,r])=>t(n,e)&&t(i,r)))return!1}if(e instanceof Set){let r=n;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n)&&![...r].some(e=>t(n,e)))return!1}let r=Object.keys(e);return r.length===Object.keys(n).length&&r.every(r=>t(e[r],n[r]))},n=(e,t)=>t===void 0?!0:typeof t==`function`?t.prototype!==void 0&&e instanceof t||!Error.isPrototypeOf(t)&&t(e)===!0:t instanceof RegExp?t.test(String(e)):typeof t==`object`&&t?Object.entries(t).every(([t,n])=>{let r=e[t];return n instanceof RegExp?n.test(String(r)):ba(r,n)}):!1,r=(t,n,r,i)=>{let a=typeof r==`function`?r.name:``,o=`Missing expected ${t}${a?` (${a})`:``}`;i===void 0&&e(void 0,`${o}.`,void 0,r,n),e(i instanceof Error?i:`${o}: ${i}`,``,void 0,r,n)},i=(t,n)=>{t||e(n,`The expression evaluated to a falsy value:\n\n assert.ok(${da(t)})\n`,t,!0,`==`)},a=Object.assign(i,{ok:i,AssertionError:za,fail:t=>e(t,`Failed`),equal:(t,n,r)=>{t!=n&&e(r,`${da(t)} == ${da(n)}`,t,n,`==`)},notEqual:(t,n,r)=>{t==n&&e(r,`${da(t)} != ${da(n)}`,t,n,`!=`)},strictEqual:(t,n,r)=>{Object.is(t,n)||e(r,`Expected values to be strictly equal:\n\n${da(t)} !== ${da(n)}\n`,t,n,`strictEqual`)},notStrictEqual:(t,n,r)=>{Object.is(t,n)&&e(r,`Expected "actual" to be strictly unequal to: ${da(n)}`,t,n,`notStrictEqual`)},deepEqual:(n,r,i)=>{t(n,r)||e(i,`Expected values to be loosely deep-equal:\n\n${da(n)}\n\nshould loosely deep-equal\n\n${da(r)}`,n,r,`deepEqual`)},notDeepEqual:(n,r,i)=>{t(n,r)&&e(i,`Expected values not to be loosely deep-equal:\n\n${da(n)}\n\nshould not loosely deep-equal\n\n${da(r)}`,n,r,`notDeepEqual`)},deepStrictEqual:(t,n,r)=>{ba(t,n)||e(r,`Expected values to be strictly deep-equal:\n\n${da(t)}\n\nshould equal\n\n${da(n)}`,t,n,`deepStrictEqual`)},notDeepStrictEqual:(t,n,r)=>{ba(t,n)&&e(r,`Expected "actual" not to be strictly deep-equal to "expected"`,t,n,`notDeepStrictEqual`)},match:(t,n,r)=>{n.test(t)||e(r,`The input did not match the regular expression ${n}. Input:\n\n${da(t)}\n`,t,n,`match`)},doesNotMatch:(t,n,r)=>{n.test(t)&&e(r,`The input was expected to not match the regular expression ${n}.`,t,n,`doesNotMatch`)},throws:(e,t,i)=>{typeof t==`string`&&([t,i]=[void 0,t]);try{e()}catch(e){if(!n(e,t))throw e;return}r(`exception`,`throws`,t,i)},doesNotThrow:e=>{e()},rejects:async(e,t,i)=>{typeof t==`string`&&([t,i]=[void 0,t]);try{await(typeof e==`function`?e():e)}catch(e){if(!n(e,t))throw e;return}r(`rejection`,`rejects`,t,i)},doesNotReject:async e=>{await(typeof e==`function`?e():e)},ifError:e=>{if(e!=null)throw e},strict:null});return a.strict=Object.assign((e,t)=>i(e,t),a,{equal:a.strictEqual,notEqual:a.notStrictEqual,deepEqual:a.deepStrictEqual,notDeepEqual:a.notDeepStrictEqual}),a}var Va=256,Ha=new Set([22,23,24,25,27,28,29,39,49,55,59]),Ua=10;function Wa(e){return e===0?null:e===1||e===2?22:e===3?23:e===4||e===21?24:e===5||e===6?25:e===7?27:e===8?28:e===9?29:e===53?55:e>=30&&e<=38||e>=90&&e<=97?39:e>=40&&e<=48||e>=100&&e<=107?49:e===58?59:-1}function Ga(e){let t=new Intl.Segmenter(void 0,{granularity:`grapheme`});return class{graphemes=[];sgrKeys=[``];sgrCloseKeys=[``];uris=[``];#e=new Map;#t=new Map([[``,0]]);#n=new Map([[``,0]]);#r=new Map;#i;#a;#o;constructor(e){this.#i=e.ambiguousIsNarrow??!0,this.#o=e.screen;let t=e.substitute??[];this.#a=t.length?RegExp(`[${t.map(([e,t])=>`\\u{${e.toString(16)}}-\\u{${t.toString(16)}}`).join(``)}]`,`gu`):null}#s(e){let t=this.#e.get(e);return t===void 0&&(t=this.graphemes.push(e)-1,this.#e.set(e,t)),t}#c(t){let n=this.#r.get(t);return n===void 0&&(n=Math.min(2,e(t,{ambiguousIsNarrow:this.#i})),this.#r.set(t,n)),n}#l(e){let t=e.map(e=>e.code).join(`\0`),n=e.map(e=>e.end).join(`\0`),r=`${t}\u0001${n}`,i=this.#t.get(e.length?r:``);return i===void 0&&(i=this.sgrKeys.push(t)-1,this.sgrCloseKeys.push(n),this.#t.set(r,i)),i}#u(e){let t=this.#n.get(e);return t===void 0&&(t=this.uris.push(e)-1,this.#n.set(e,t)),t}segment(e,n,r,i){let a=[],o=0,s=0,c=0,l=-1,u=-1,d=-1,f=(e,t)=>{(o!==u||s!==d)&&(l++,u=o,d=s,2*l+1<r.length&&(r[2*l]=o,r[2*l+1]=s)),2*c+1<n.length&&(n[2*c]=e,n[2*c+1]=t|l<<Ua),c++},p=e=>{let t=e===``?[`0`]:e.split(/[;:]/);for(let e=0;e<t.length;e++){let n=Number(t[e])||0,r=String(n);(n===38||n===48||n===58)&&t[e+1]===`5`?(r=`${n};5;${t[e+2]??0}`,e+=2):(n===38||n===48||n===58)&&t[e+1]===`2`&&(r=`${n};2;${t[e+2]??0};${t[e+3]??0};${t[e+4]??0}`,e+=4);let i=Wa(n);if(i===null)a.length=0;else if(Ha.has(n))for(let e=a.length-1;e>=0;e--)a[e].end===`\u001b[${n}m`&&a.splice(e,1);else if(i!==-1){let e={code:`\u001b[${r}m`,end:`\u001b[${i}m`},t=i===39||i===49||i===59?a.findIndex(t=>t.end===e.end):a.findIndex(t=>t.code===e.code);t>=0?a[t]=e:a.push(e)}}o=this.#l(a)},m=e=>{this.#a&&(e=e.replace(this.#a,``));for(let{segment:n}of t.segment(e))if(n===` `)f(this.#s(` `),Va);else if(n===`
30
+ `||n===`\r`)continue;else f(this.#s(n),this.#c(n))},h=/\u001b\[([\d;:]*)m|\u001b\]8;[^;\u0007\u001b]*;([^\u0007\u001b]*)(?:\u0007|\u001b\\)|\u001b\[[\d;?]*[ -/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-_]/g,g=0;for(let t of e.matchAll(h))t.index>g&&m(e.slice(g,t.index)),g=t.index+t[0].length,t[1]===void 0?t[2]!==void 0&&(s=t[2]?this.#u(t[2]):0):p(t[1]);return g<e.length&&m(e.slice(g)),2*c<=n.length&&2*(l+1)<=r.length?c:-c-1}#d(e,t,n){let r=this.#o,i=n*t,a=1/0,o=-1,s=t=>{let n=i+t<<1;(e[n]!==r.emptyCharIndex||e[n+1]!==r.emptyWord)&&(e[n]=r.emptyCharIndex,e[n+1]=r.emptyWord,a=Math.min(a,t),o=Math.max(o,t+1))},c=(n,c,l)=>{if(n<0||n>=t)return;let u=i+n<<1,d=e[u+1]&r.widthMask,f=l&r.widthMask;d===r.spacerTail&&f!==r.spacerTail&&n>0&&(e[(i+n-1<<1)+1]&r.widthMask)===r.wide&&s(n-1),d===r.wide&&f!==r.wide&&n+1<t&&(e[(i+n+1<<1)+1]&r.widthMask)===r.spacerTail&&s(n+1),(e[u]!==c||e[u+1]!==l)&&(e[u]=c,e[u+1]=l,a=Math.min(a,n),o=Math.max(o,n+1))};return{glyph:(e,n,i,a)=>{let o=i&~r.widthMask;return a?e+1>=t?(c(e,r.emptyCharIndex,o|r.spacerHead),e+2):(c(e,n,o|r.wide),c(e+1,r.spacerCharIndex,o|r.spacerTail),e+2):(c(e,n,o|r.narrow),e+1)},put:c,changed:e=>a>o?e:e+a*2**20+o*2**36}}paint(e,t,n,r,i,a,o,s,c){let{glyph:l,put:u,changed:d}=this.#d(e,t,r),f=this.#o.tabWidth,p=n;for(let e=0;e<a;e++){let t=i[2*e+1],n=c[t>>>Ua]??0;if(t&Va){let e=p+(f-p%f);for(;p<e;p++)u(p,this.#o.emptyCharIndex,n&~this.#o.widthMask|this.#o.narrow);continue}let r=t&255;r!==0&&(p=l(p,s[i[2*e]],n,r===2))}return d(p)}setCell(e,t,n,r,i,a){let{glyph:o,put:s,changed:c}=this.#d(e,t,r);return(a&this.#o.widthMask)===this.#o.wide?c(o(n,i,a,!0)):(s(n,i,a),c(n+1))}}}var Ka=/^\.\.?\/.*\.(txt|md|html|css|sh|py|svg)$/,qa=e=>typeof e==`string`?new TextEncoder().encode(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e),Ja=e=>new DataView(an(qa(e)).buffer).getBigUint64(0,!0);async function Ya(e){let[{default:t},{default:n},{default:r},{default:i},a,o,{compare:s,satisfies:c}]=await Promise.all([u(()=>import(`./chunks/string-width-Dyomz-Kx.js`),[]),u(()=>import(`./chunks/wrap-ansi-v-UhTxgf.js`),[]),u(()=>import(`./chunks/slice-ansi-CtePLJj8.js`),[]),u(()=>import(`./chunks/strip-ansi-B9O1Kiar.js`).then(e=>e.n),[]),u(()=>import(`./chunks/browser-iHf7-8M7.js`),[]),u(()=>import(`./chunks/dist-0mSzsNc8.js`),[]),u(()=>import(`./chunks/semver-CK47NiDu.js`).then(e=>x(e.default,1)),[])]),l=Object.assign(Ja,{crc32:t=>e.crc32(qa(t)),xxHash64:Ja,wyhash:Ja}),d=()=>{throw Error(`Bun.zstdDecompress: not in the playground`)};Object.assign(globalThis,{Bun:{version:`1.3.0`,isStandaloneExecutable:!1,hash:l,SHA256:{hash:e=>an(qa(e))},stringWidth:(e,n)=>t(e,n),wrapAnsi:(e,t,r)=>n(e,t,r),sliceAnsi:(e,t=0,n)=>r(e,t,n),stripANSI:e=>i(e),deepEquals:(e,t)=>ba(e,t),semver:{order:(e,t)=>s(e,t),satisfies:(e,t)=>c(e,t)},YAML:{parse:e=>a.parse(e),stringify:e=>a.stringify(e)},TOML:{parse:e=>o.parse(e)},which:t=>e.which(t),sleepSync:e=>Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e),gc:()=>{},zstdDecompressSync:d,zstdDecompress:d,stdin:{stream:()=>e.stdin()},unsafe:{setJITPolicy:()=>{}},ant:{CellSegmenter:Ga(t)}},__bunRequire:t=>Object.assign(n=>Ka.test(n)?e.readFile(t.resolve(n)):t(n),{resolve:t.resolve,cache:t.cache})}),delete globalThis.XMLHttpRequest}var Xa=new Set([301,302,303,307,308]),Za=new Set([101,204,205,304]),Qa=e=>Object.assign(TypeError(`fetch failed`),{cause:e}),$a=e=>e.reason??new DOMException(`This operation was aborted`,`AbortError`);function eo(e,t,n,r){let i=(n,r,i,a,o)=>new Promise((s,c)=>{if(o?.aborted)return c($a(o));let l=[];i.forEach((e,t)=>l.push(t,e));let u=n.protocol===`https:`?t:e,d=()=>{c($a(o)),f.destroy($a(o))},f=u.request(n,{method:r,headers:l},e=>{o?.removeEventListener(`abort`,d),s(e)});f.on(`error`,e=>{o?.removeEventListener(`abort`,d),c(Qa(e))}),o?.addEventListener(`abort`,d,{once:!0}),a?.length&&f.write(a),f.end()}),a=async(e,t={})=>{let n=r();try{return await o(e,t,n)}catch(e){throw n(),e}},o=async(e,t,a)=>{let o=new Request(e,{...t,signal:null}),s=new URL(o.url);if(s.protocol!==`http:`&&s.protocol!==`https:`)return n(e,t).finally(a);let c=o.method,l=new Headers(t.headers??(e instanceof Request?e.headers:void 0)),u=o.headers.get(`content-type`);u&&!l.has(`content-type`)&&l.set(`content-type`,u),l.has(`accept`)||l.set(`accept`,`*/*`),l.has(`accept-encoding`)||l.set(`accept-encoding`,`gzip, deflate`),l.has(`user-agent`)||l.set(`user-agent`,`node`);let d=c===`GET`||c===`HEAD`?null:new Uint8Array(await o.arrayBuffer());d&&!d.length&&(d=null);let f=t.signal??null,p=t.redirect??`follow`;for(let e=0;;e++){let t=await i(s,c,l,d,f),n=t.headers.location;if(Xa.has(t.statusCode)&&typeof n==`string`&&p!==`manual`){if(t.resume(),p===`error`)throw Qa(Error(`unexpected redirect`));if(e>=20)throw Qa(Error(`redirect count exceeded`));let r=new URL(n,s);(t.statusCode===303&&c!==`GET`&&c!==`HEAD`||(t.statusCode===301||t.statusCode===302)&&c===`POST`)&&(c=`GET`,d=null,l.delete(`content-type`),l.delete(`content-length`)),r.origin!==s.origin&&l.delete(`authorization`),s=r;continue}let o=new Headers;for(let e=0;e+1<t.rawHeaders.length;e+=2)o.append(t.rawHeaders[e],t.rawHeaders[e+1]);let u=null;if(c!==`HEAD`&&!Za.has(t.statusCode)){let e=()=>{},n=()=>f?.removeEventListener(`abort`,e);u=new ReadableStream({start(r){e=()=>{n(),r.error($a(f)),t.socket?.destroy()},t.on(`data`,e=>r.enqueue(new Uint8Array(e))),t.on(`end`,()=>{n(),r.close()}),t.on(`error`,e=>{n(),r.error(Qa(e))}),f?.aborted?e():f?.addEventListener(`abort`,e,{once:!0})},cancel(){n(),t.destroy()}});let r=(o.get(`content-encoding`)??``).trim().toLowerCase();(r===`gzip`||r===`x-gzip`||r===`deflate`)&&(u=u.pipeThrough(new DecompressionStream(r===`deflate`?`deflate`:`gzip`)))}else t.resume();if(u){let e=u.getReader();u=new ReadableStream({async pull(t){let n;try{n=await e.read()}catch(e){return a(),t.error(e)}n.done?(t.close(),a()):t.enqueue(n.value)},cancel(t){return a(),e.cancel(t)}})}else a();let m=new Response(u,{status:t.statusCode,statusText:t.statusMessage??``,headers:o});Object.defineProperty(m,"url",{value:s.href}),Object.defineProperty(m,"redirected",{value:e>0});for(let e of[`arrayBuffer`,`blob`,`bytes`,`formData`,`json`,`text`]){let t=m[e];typeof t==`function`&&Object.defineProperty(m,e,{value:()=>{let e=r();return t.call(m).finally(e)}})}return m}};return a}var to=Symbol.for(`nodejs.webstream.isClosedPromise`),no=new WeakMap;function ro(e){let t=no.get(e);if(!t){let n,r,i=new Promise((e,t)=>{n=e,r=t});i.catch(()=>{}),t={promise:i,resolve:n,reject:r},no.set(e,t)}return t}function io(e,t,n){let r=e,i=r?.[t];typeof i==`function`&&(r[t]=function(...e){let t=i.apply(this,e);return n(this,t),t})}var ao=(e,t)=>{t instanceof Promise&&t.then(()=>ro(e).resolve(),t=>ro(e).reject(t))};function oo(){for(let e of[globalThis.ReadableStream,globalThis.WritableStream]){let t=e?.prototype;!t||to in t||Object.defineProperty(t,to,{configurable:!0,get(){return ro(this)}})}io(globalThis.ReadableStream?.prototype,`getReader`,(e,t)=>ao(e,t.closed)),io(globalThis.WritableStream?.prototype,`getWriter`,(e,t)=>ao(e,t.closed)),io(globalThis.ReadableStream?.prototype,`pipeTo`,ao),io(globalThis.ReadableStream?.prototype,`cancel`,ao),io(globalThis.WritableStream?.prototype,`abort`,ao),io(globalThis.WritableStream?.prototype,`close`,ao)}var{Readable:so,Writable:co,finished:lo}=Fe,uo={CREAT:1,DIRECTORY:2,EXCL:4,TRUNC:8},fo=524288,po={[t.ACCES]:[`EACCES`,-13,`permission denied`],[t.BADF]:[`EBADF`,-9,`bad file descriptor`],[t.EXIST]:[`EEXIST`,-17,`file already exists`],[t.INVAL]:[`EINVAL`,-22,`invalid argument`],[t.IO]:[`EIO`,-5,`i/o error`],[t.ISDIR]:[`EISDIR`,-21,`illegal operation on a directory`],[t.LOOP]:[`ELOOP`,-40,`too many symbolic links encountered`],[t.NOENT]:[`ENOENT`,-2,`no such file or directory`],[t.NOSYS]:[`ENOSYS`,-38,`function not implemented`],[t.NOTDIR]:[`ENOTDIR`,-20,`not a directory`],[t.NOTEMPTY]:[`ENOTEMPTY`,-39,`directory not empty`],[t.NOTSUP]:[`ENOTSUP`,-95,`operation not supported on socket`],[t.PERM]:[`EPERM`,-1,`operation not permitted`]};function mo(e,t,n,r){let[i,a,o]=po[e]??[`EIO`,-5,`i/o error`],s=Error(`${i}: ${o}, ${t}${n===void 0?``:` '${n}'`}${r===void 0?``:` -> '${r}'`}`);return Object.assign(s,{code:i,errno:a,syscall:t}),n!==void 0&&(s.path=n),r!==void 0&&(s.dest=r),s}var ho=class{kind;dev=1;mode;nlink=1;uid=1e3;gid=1e3;rdev=0;blksize=4096;ino;size;blocks;atimeMs;mtimeMs;ctimeMs;birthtimeMs;atime;mtime;ctime;birthtime;constructor(e,t,n,r){this.kind=e,this.mode=e===`dir`?16877:e===`link`?41471:33188,this.size=t,this.ino=n,this.blocks=Math.ceil(t/512);let i=Number(BigInt(r||`0`)/1000000n);this.atimeMs=this.mtimeMs=this.ctimeMs=this.birthtimeMs=i,this.atime=this.mtime=this.ctime=this.birthtime=new Date(i)}isFile=()=>this.kind===`file`;isDirectory=()=>this.kind===`dir`;isSymbolicLink=()=>this.kind===`link`;isBlockDevice=()=>!1;isCharacterDevice=()=>!1;isFIFO=()=>!1;isSocket=()=>!1},go=class{name;kind;parentPath;constructor(e,t,n){this.name=e,this.kind=t,this.parentPath=n}get path(){return this.parentPath}isFile=()=>this.kind===`file`;isDirectory=()=>this.kind===`dir`;isSymbolicLink=()=>this.kind===`link`;isBlockDevice=()=>!1;isCharacterDevice=()=>!1;isFIFO=()=>!1;isSocket=()=>!1},_o=e=>typeof e==`string`?e:e?.encoding??null,vo=(e,t)=>typeof e==`string`?E.Buffer.from(e,t??`utf8`):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),yo=e=>typeof e==`bigint`?Number(e):typeof e==`number`&&e>=0?e:null,z={RDONLY:0,WRONLY:1,RDWR:2,CREAT:64,EXCL:128,TRUNC:512,APPEND:1024,DIRECTORY:65536,NOFOLLOW:131072},bo={r:z.RDONLY,"r+":z.RDWR,rs:z.RDONLY,"rs+":z.RDWR,w:z.WRONLY|z.CREAT|z.TRUNC,wx:z.WRONLY|z.CREAT|z.TRUNC|z.EXCL,"w+":z.RDWR|z.CREAT|z.TRUNC,"wx+":z.RDWR|z.CREAT|z.TRUNC|z.EXCL,a:z.WRONLY|z.CREAT|z.APPEND,ax:z.WRONLY|z.CREAT|z.APPEND|z.EXCL,"a+":z.RDWR|z.CREAT|z.APPEND,"ax+":z.RDWR|z.CREAT|z.APPEND|z.EXCL};function xo(e,n,r){let i=new Map,a=3,o=e=>{if(e instanceof URL?e=decodeURIComponent(e.pathname):e instanceof Uint8Array&&(e=E.Buffer.from(e).toString()),typeof e!=`string`){let t=TypeError(`The "path" argument must be of type string. Received ${typeof e}`);throw t.code=`ERR_INVALID_ARG_TYPE`,t}return c(r(e))},s=/^\/(?:proc\/self|dev)\/fd\/(\d+)(\/.*)?$/,c=e=>{let t=s.exec(e),n=t?i.get(Number(t[1])):void 0;return n?`${n.path}${t[2]??``}`:e},l=(t,n,r,i)=>{let a=e(r,i);if(a.answer.error)throw mo(a.answer.error,t,n);return a},u=(n,r,i,a=!0)=>{let{answer:s}=e({op:`stat`,path:o(n),follow:r});if(s.error){if(!a&&(s.error===t.NOENT||s.error===t.NOTDIR))return;throw mo(s.error,i,String(n))}return new ho(s.type,s.size,s.ino,s.mtime)},d=(e,n=`r`)=>{let r=o(e),s=typeof n==`number`?n:bo[n];if(s===void 0)throw mo(t.INVAL,`open`,String(e));if(s&(z.DIRECTORY|z.NOFOLLOW)||!(s&(z.WRONLY|z.RDWR|z.CREAT))){let n=u(e,!(s&z.NOFOLLOW),`open`,!1);if(s&z.NOFOLLOW&&n?.isSymbolicLink())throw mo(t.LOOP,`open`,String(e));if(s&z.DIRECTORY&&n&&!n.isDirectory())throw mo(t.NOTDIR,`open`,String(e));if(n?.isDirectory()){let e=a++;return i.set(e,{handle:-1,path:r,position:0,append:!1,refs:1}),e}}let c=0;s&z.CREAT&&(c|=uo.CREAT),s&z.EXCL&&(c|=uo.EXCL),s&z.TRUNC&&(c|=uo.TRUNC);let{answer:d}=l(`open`,String(e),{op:`open`,path:r,oflags:c}),f=a++;return i.set(f,{handle:d.handle,path:r,position:0,append:!!(s&z.APPEND),refs:1}),f},f=(e,n)=>{let r=i.get(e);if(!r)throw mo(t.BADF,n);return r},p=(t,n=0)=>{let r=[],i=n;for(;;){let{bytes:n}=e({op:`read`,handle:t,offset:i,length:fo});if(r.push(n),i+=n.length,n.length<fo)break}return r.length===1?r[0]:E.Buffer.concat(r)},m=(e,t,n)=>{let r=n;for(let i=0;i<t.length;i+=fo){let a={op:`write`,handle:e.handle,offset:n+i,append:e.append};r=l(`write`,e.path,a,t.subarray(i,i+fo)).answer.position}return r},h={existsSync(e){try{return u(e,!0,`stat`,!1)!==void 0}catch{return!1}},statSync:(e,t)=>u(e,!0,`stat`,t?.throwIfNoEntry??!0),lstatSync:(e,t)=>u(e,!1,`lstat`,t?.throwIfNoEntry??!0),fstatSync(e){if(e<=2)return new ho(`file`,0,e,`0`);let t=f(e,`fstat`);if(t.handle===-1)return u(t.path,!0,`fstat`);let{answer:n}=l(`fstat`,void 0,{op:`fstat`,handle:t.handle});return new ho(n.type,n.size,n.ino,n.mtime)},accessSync(e){u(e,!0,`access`)},openSync:(e,t)=>d(e,t),closeSync(t){let n=i.get(t);n&&(i.delete(t),--n.refs===0&&n.handle!==-1&&e({op:`close`,handle:n.handle}))},readSync(e,t,n,r,i){let a=0;typeof n==`object`&&n?{offset:a=0,length:r,position:i}=n:a=n??0;let o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);if(r??=o.length-a,e===0)return 0;let s=f(e,`read`),c=yo(i),u=c??s.position,{bytes:d}=l(`read`,s.path,{op:`read`,handle:s.handle,offset:u,length:Math.min(r,fo)});return o.set(d,a),c===null&&(s.position=u+d.length),d.length},writeSync(e,t,n,r,i){let a,o;if(typeof t==`string`)a=E.Buffer.from(t,r??`utf8`),o=n;else{let e=vo(t),s=n??0,c=r??e.length-s;a=e.subarray(s,s+c),o=i}if(e===1||e===2)return g(e,a),a.length;let s=f(e,`write`),c=yo(o),l=m(s,a,c??s.position);return c===null&&(s.position=l),a.length},ftruncateSync(e,t=0){let n=f(e,`ftruncate`);l(`ftruncate`,n.path,{op:`truncate`,handle:n.handle,size:t})},truncateSync(e,t=0){let n=d(e,`r+`);try{h.ftruncateSync(n,t)}finally{h.closeSync(n)}},fsyncSync(){},fdatasyncSync(){},readFileSync(n,r){let i=_o(r);if(typeof n==`number`){let e=f(n,`read`),t=p(e.handle,e.position);return e.position+=t.length,So(t,i)}let a=o(n),{answer:s}=l(`open`,String(n),{op:`open`,path:a});if(s.type===`dir`)throw e({op:`close`,handle:s.handle}),mo(t.ISDIR,`read`);try{return So(p(s.handle),i)}finally{e({op:`close`,handle:s.handle})}},writeFileSync(e,t,n){let r=typeof n==`object`&&n?.flag||`w`,i=typeof e==`number`?e:d(e,r);try{h.writeSync(i,vo(t,_o(n)))}finally{typeof e!=`number`&&h.closeSync(i)}},appendFileSync(e,t,n){h.writeFileSync(e,t,{encoding:_o(n),flag:`a`})},readdirSync(t,n){let r=o(t),i=typeof n==`object`&&n?.withFileTypes,a=typeof n==`object`&&n?.recursive,s=(n,r)=>{let{answer:o}=l(`scandir`,String(t),{op:`open`,path:n,oflags:uo.DIRECTORY}),c;try{c=l(`scandir`,String(t),{op:`readdir`,handle:o.handle}).answer.entries}finally{e({op:`close`,handle:o.handle})}let u=[];for(let[e,t]of c.sort((e,t)=>e[0]<t[0]?-1:1))u.push(i?new go(e,t,n):r+e),a&&t===`dir`&&u.push(...s(`${n}/${e}`,`${r}${e}/`));return u};return s(r,``)},mkdirSync(n,r){let i=o(n);if(typeof r==`object`&&r?.recursive){let r,a=``;for(let o of i.split(`/`).filter(Boolean)){a+=`/${o}`;let{answer:s}=e({op:`stat`,path:a,follow:!0});if(s.error)l(`mkdir`,String(n),{op:`mkdir`,path:a}),r??=a;else if(s.type!==`dir`)throw mo(a===i.replace(/\/+$/,``)?t.EXIST:t.NOTDIR,`mkdir`,String(n))}return r}l(`mkdir`,String(n),{op:`mkdir`,path:i})},mkdtempSync(e){for(;;){let t=e+Math.random().toString(36).slice(2,8);try{return h.mkdirSync(t),t}catch(e){if(e.code!==`EEXIST`)throw e}}},rmdirSync(e,t){if(t?.recursive)return h.rmSync(e,{recursive:!0,force:!0});l(`rmdir`,String(e),{op:`rmdir`,path:o(e)})},unlinkSync(e){l(`unlink`,String(e),{op:`unlink`,path:o(e)})},rmSync(e,n){let r=o(e),i=u(r,!1,`rm`,!1);if(!i){if(n?.force)return;throw mo(t.NOENT,`rm`,String(e))}if(i.isDirectory()){if(!n?.recursive)throw mo(t.ISDIR,`rm`,String(e));for(let e of h.readdirSync(r))h.rmSync(`${r}/${e}`,n);l(`rmdir`,String(e),{op:`rmdir`,path:r})}else l(`unlink`,String(e),{op:`unlink`,path:r})},renameSync(e,t){l(`rename`,String(e),{op:`rename`,path:o(e),to:o(t)})},copyFileSync(e,n,r=0){let i=h.readFileSync(e);if(r&1&&h.existsSync(n))throw mo(t.EXIST,`copyfile`,String(e),String(n));h.writeFileSync(n,i)},cpSync(e,n,r){let i=o(e),a=o(n);if(h.statSync(i).isDirectory()){if(!r?.recursive)throw mo(t.ISDIR,`cp`,String(e));h.mkdirSync(a,{recursive:!0});for(let e of h.readdirSync(i))h.cpSync(`${i}/${e}`,`${a}/${e}`,r)}else h.copyFileSync(i,a)},symlinkSync(e,t){l(`symlink`,String(t),{op:`symlink`,path:o(t),target:e})},linkSync(e,t){l(`link`,String(e),{op:`link`,path:o(e),to:o(t)})},readlinkSync(e){let t=typeof e==`string`?/^\/(?:proc\/self|dev)\/fd\/(\d+)$/.exec(e):null,n=t?i.get(Number(t[1])):void 0;return n?n.path:l(`readlink`,String(e),{op:`readlink`,path:o(e)}).answer.target},realpathSync(n){let i=o(n);for(let t=0;t<40;t++){let t=i.split(`/`).filter(Boolean),a=``,o=!1;for(let s=0;s<t.length;s++){let c=`${a}/${t[s]}`,{answer:l}=e({op:`stat`,path:c,follow:!1});if(l.error)throw mo(l.error,`realpath`,String(n));if(l.type===`link`){let n=e({op:`readlink`,path:c}).answer.target;i=r([n.startsWith(`/`)?n:`${a}/${n}`,...t.slice(s+1)].join(`/`)),o=!0;break}a=c}if(!o)return a||`/`}throw mo(t.LOOP,`realpath`,String(n))},chmodSync(){},fchmodSync(){},lchmodSync(){},chownSync(){},fchownSync(){},lchownSync(){},utimesSync(){},futimesSync(){},lutimesSync(){}};h.realpathSync.native=h.realpathSync;let g=()=>{},_={};for(let[e,t]of Object.entries(h)){if(!e.endsWith(`Sync`))continue;let n=e.slice(0,-4);_[n]=(...e)=>{let r=typeof e[e.length-1]==`function`?e.pop():null,i,a=null;try{i=t(...e)}catch(e){a=e}r&&A(()=>n===`exists`?r(i):r(a,i))}}_.realpath.native=_.realpath,_.read=(e,t,...n)=>{let r=n.pop();try{let i=h.readSync(e,t,...n);A(()=>r(null,i,t))}catch(e){A(()=>r(e))}},_.write=(e,t,...n)=>{let r=typeof n[n.length-1]==`function`?n.pop():()=>{};try{let i=h.writeSync(e,t,...n);A(()=>r(null,i,t))}catch(e){A(()=>r(e))}};let v=Symbol.for(`nodejs.util.promisify.custom`);Object.assign(_.exists,{[v]:async e=>h.existsSync(e)}),Object.assign(_.read,{[v]:async(e,t,...n)=>({bytesRead:h.readSync(e,t,...n),buffer:t})}),Object.assign(_.write,{[v]:async(e,t,...n)=>({bytesWritten:h.writeSync(e,t,...n),buffer:t})});let y={};for(let[e,t]of Object.entries(h))e.endsWith(`Sync`)&&e!==`existsSync`&&(y[e.slice(0,-4)]=async(...e)=>t(...e));y.open=async(e,t)=>b(h.openSync(e,t)),y.rm=async(e,t)=>h.rmSync(e,t);let b=e=>({fd:e,readFile:async t=>h.readFileSync(e,t),writeFile:async(t,n)=>h.writeFileSync(e,t,n),read:async(t,n,r,i)=>({bytesRead:h.readSync(e,t,n,r,i),buffer:t}),write:async(t,...n)=>({bytesWritten:h.writeSync(e,t,...n),buffer:t}),stat:async()=>h.fstatSync(e),truncate:async t=>h.ftruncateSync(e,t),sync:async()=>void 0,datasync:async()=>void 0,chmod:async()=>void 0,chown:async()=>void 0,utimes:async()=>void 0,close:async()=>h.closeSync(e),createReadStream:t=>new O(void 0,{...t,fd:e}),createWriteStream:t=>new k(void 0,{...t,fd:e}),[Symbol.asyncDispose]:async()=>h.closeSync(e)}),x=e=>typeof e==`string`?{encoding:e}:e??{},S=(e,t,n,r)=>{e.fd=n.fd===void 0||n.fd===null?null:typeof n.fd==`number`?n.fd:n.fd.fd,e.fd===null&&(e.path=t instanceof URL?decodeURIComponent(t.pathname):t),e.flags=n.flags??r,e.mode=n.mode??438,e.start=n.start,e.pos=n.start,e.autoClose=n.autoClose??!0};function C(){}function w(e){if(typeof this.fd==`number`)return e();if(this.open!==C){let t=this.emit;return this.emit=function(n,...r){return(n===`open`||n===`error`)&&(this.emit=t),n===`error`?(e(r[0]),!0):(n===`open`&&e(),t.apply(this,[n,...r]))},this.open()}let t;try{t=h.openSync(this.path,this.flags)}catch(t){return e(t)}this.fd=t,e(),this.emit(`open`,t),this.emit(`ready`)}function T(e,t){let n=this.fd;n!==null&&this.autoClose&&(this.fd=null,h.closeSync(n)),t(e)}let D={get(){return this.fd===null}};function O(e,t){if(!(this instanceof O))return new O(e,t);let n=x(t);so.call(this,{highWaterMark:n.highWaterMark??65536,encoding:n.encoding,emitClose:n.emitClose??!0,autoDestroy:n.autoClose??!0,signal:n.signal}),S(this,e,n,`r`),this.end=n.end??1/0,this.bytesRead=0}Object.setPrototypeOf(O.prototype,so.prototype),Object.setPrototypeOf(O,so),Object.defineProperty(O.prototype,"pending",D),Object.assign(O.prototype,{open:C,_construct:w,_destroy:T,_read(e){if(e=Math.min(e,(this.pos===void 0?this.end-this.bytesRead:this.end-this.pos)+1),e<=0)return void this.push(null);let t=E.Buffer.alloc(e);A(()=>{let n;try{n=h.readSync(this.fd,t,0,e,this.pos??null)}catch(e){this.destroy(e);return}if(!n)return void this.push(null);this.pos!==void 0&&(this.pos+=n),this.bytesRead+=n,this.push(n===e?t:t.subarray(0,n))})},close(e){typeof e==`function`&&lo(this,e),this.destroy()}});function k(e,t){if(!(this instanceof k))return new k(e,t);let n=x(t);co.call(this,{highWaterMark:n.highWaterMark,decodeStrings:!0,emitClose:n.emitClose??!0,autoDestroy:n.autoClose??!0,signal:n.signal}),S(this,e,n,`w`),this.bytesWritten=0,n.encoding&&this.setDefaultEncoding(n.encoding)}Object.setPrototypeOf(k.prototype,co.prototype),Object.setPrototypeOf(k,co),Object.defineProperty(k.prototype,"pending",D),Object.assign(k.prototype,{open:C,_construct:w,_destroy:T,_write(e,t,n){let r;try{r=h.writeSync(this.fd,e,0,e.length,this.pos??null)}catch(e){return n(e)}this.pos!==void 0&&(this.pos+=r),this.bytesWritten+=r,n()},close(e){if(e){if(this.closed)return void queueMicrotask(e);this.on(`close`,e)}this.autoClose||this.on(`finish`,()=>this.destroy()),this.end()},destroySoon(){return this.end()}});let A=e=>setTimeout(e,0),j=()=>()=>{},M=new Set,N=e=>{try{return h.statSync(e).isDirectory()?`dir`:`file`}catch{return null}};class P extends Ne.EventEmitter{constructor(e){super(),this.watch=e}close(){M.delete(this.watch)&&(this.watch.release?.(),this.watch.release=null,queueMicrotask(()=>this.emit(`close`)))}ref(){return this.watch.release??=j(),this}unref(){return this.watch.release?.(),this.watch.release=null,this}}let F=(e,n,r)=>{typeof n==`function`&&([r,n]=[n,void 0]);let i=typeof n==`object`&&n?n:{},a=o(e),s=N(a);if(!s)throw mo(t.NOENT,`watch`,String(e));let c={path:a,dir:s===`dir`,recursive:!!i.recursive,release:i.persistent===!1?null:j(),known:new Set(s===`dir`?h.readdirSync(a):[]),tell:()=>{}},l=new P(c);return c.tell=(e,t)=>l.emit(`change`,e,t),r&&l.on(`change`,r),i.signal?.addEventListener(`abort`,()=>l.close(),{once:!0}),M.add(c),l},I=new Map,ee=()=>new ho(`file`,0,0,`0`),te=(e,t,n)=>{typeof t==`function`&&([n,t]=[t,void 0]);let r=o(e),i=I.get(r);if(!i){let e={path:r,dir:!1,recursive:!1,release:t?.persistent===!1?null:j(),known:new Set,tell:()=>{}},n=h.statSync(r,{throwIfNoEntry:!1})??ee(),a={watcher:new P(e),listeners:new Set,last:n};e.tell=()=>{let e=h.statSync(r,{throwIfNoEntry:!1})??ee(),t=a.last;a.last=e;for(let n of a.listeners)n(e,t)},M.add(e),I.set(r,i=a)}return i.listeners.add(n),i.watcher},L=(e,t)=>{let n=o(e),r=I.get(n);r&&(t?r.listeners.delete(t):r.listeners.clear(),!r.listeners.size&&(r.watcher.close(),I.delete(n)))};y.watch=(e,t={})=>{let n=[],r=null,i=F(e,t,(e,t)=>{n.push({eventType:e,filename:t}),r?.()}),a=!1;return i.on(`close`,()=>{a=!0,r?.()}),{async next(){for(;!(n.length||a);)await new Promise(e=>r=e);return r=null,n.length?{value:n.shift(),done:!1}:{value:void 0,done:!0}},async return(){return i.close(),{value:void 0,done:!0}},[Symbol.asyncIterator](){return this}}};let R=e=>{for(let t of[...M])for(let n of e){if(n===t.path){t.tell(N(n)?`change`:`rename`,Co(n));continue}if(!(t.dir&&n.startsWith(`${t.path===`/`?``:t.path}/`)))continue;let e=n.slice(t.path.length+(t.path===`/`?0:1));if(e.includes(`/`)&&!t.recursive)continue;let r=N(n)!==null,i=e.split(`/`)[0],a=r&&t.known.has(i)?`change`:`rename`;r?t.known.add(i):e.includes(`/`)||t.known.delete(i),t.tell(a,e)}};return{module:{...h,..._,promises:y,Stats:ho,Dirent:go,constants:{F_OK:0,R_OK:4,W_OK:2,X_OK:1,O_RDONLY:z.RDONLY,O_WRONLY:z.WRONLY,O_RDWR:z.RDWR,O_CREAT:z.CREAT,O_EXCL:z.EXCL,O_TRUNC:z.TRUNC,O_APPEND:z.APPEND,O_DIRECTORY:z.DIRECTORY,O_NOFOLLOW:z.NOFOLLOW,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFLNK:40960,COPYFILE_EXCL:1},F_OK:0,R_OK:4,W_OK:2,X_OK:1,watch:F,watchFile:te,unwatchFile:L,FSWatcher:P,ReadStream:O,WriteStream:k,createReadStream:(e,t)=>new O(e,t),createWriteStream:(e,t)=>new k(e,t)},promises:y,cwd:n,throughFd:c,dup(e){let t=f(e,`dup`),n=a++;return t.refs++,i.set(n,t),n},setStdio(e){g=e},setLater(e){A=e},setHold(e){j=e},changed:R}}function So(e,t){let n=E.Buffer.from(e.buffer,e.byteOffset,e.byteLength);return t?n.toString(t):n}var Co=e=>e.slice(e.lastIndexOf(`/`)+1),B;(function(e){e[e.NONE=0]=`NONE`,e[e._abstract=1]=`_abstract`,e[e._accessor=2]=`_accessor`,e[e._as=3]=`_as`,e[e._assert=4]=`_assert`,e[e._asserts=5]=`_asserts`,e[e._async=6]=`_async`,e[e._await=7]=`_await`,e[e._checks=8]=`_checks`,e[e._constructor=9]=`_constructor`,e[e._declare=10]=`_declare`,e[e._enum=11]=`_enum`,e[e._exports=12]=`_exports`,e[e._from=13]=`_from`,e[e._get=14]=`_get`,e[e._global=15]=`_global`,e[e._implements=16]=`_implements`,e[e._infer=17]=`_infer`,e[e._interface=18]=`_interface`,e[e._is=19]=`_is`,e[e._keyof=20]=`_keyof`,e[e._mixins=21]=`_mixins`,e[e._module=22]=`_module`,e[e._namespace=23]=`_namespace`,e[e._of=24]=`_of`,e[e._opaque=25]=`_opaque`,e[e._out=26]=`_out`,e[e._override=27]=`_override`,e[e._private=28]=`_private`,e[e._protected=29]=`_protected`,e[e._proto=30]=`_proto`,e[e._public=31]=`_public`,e[e._readonly=32]=`_readonly`,e[e._require=33]=`_require`,e[e._satisfies=34]=`_satisfies`,e[e._set=35]=`_set`,e[e._static=36]=`_static`,e[e._symbol=37]=`_symbol`,e[e._type=38]=`_type`,e[e._unique=39]=`_unique`,e[e._using=40]=`_using`})(B||={});var V;(function(e){e[e.PRECEDENCE_MASK=15]=`PRECEDENCE_MASK`,e[e.IS_KEYWORD=16]=`IS_KEYWORD`,e[e.IS_ASSIGN=32]=`IS_ASSIGN`,e[e.IS_RIGHT_ASSOCIATIVE=64]=`IS_RIGHT_ASSOCIATIVE`,e[e.IS_PREFIX=128]=`IS_PREFIX`,e[e.IS_POSTFIX=256]=`IS_POSTFIX`,e[e.IS_EXPRESSION_START=512]=`IS_EXPRESSION_START`,e[e.num=512]=`num`,e[e.bigint=1536]=`bigint`,e[e.decimal=2560]=`decimal`,e[e.regexp=3584]=`regexp`,e[e.string=4608]=`string`,e[e.name=5632]=`name`,e[e.eof=6144]=`eof`,e[e.bracketL=7680]=`bracketL`,e[e.bracketR=8192]=`bracketR`,e[e.braceL=9728]=`braceL`,e[e.braceBarL=10752]=`braceBarL`,e[e.braceR=11264]=`braceR`,e[e.braceBarR=12288]=`braceBarR`,e[e.parenL=13824]=`parenL`,e[e.parenR=14336]=`parenR`,e[e.comma=15360]=`comma`,e[e.semi=16384]=`semi`,e[e.colon=17408]=`colon`,e[e.doubleColon=18432]=`doubleColon`,e[e.dot=19456]=`dot`,e[e.question=20480]=`question`,e[e.questionDot=21504]=`questionDot`,e[e.arrow=22528]=`arrow`,e[e.template=23552]=`template`,e[e.ellipsis=24576]=`ellipsis`,e[e.backQuote=25600]=`backQuote`,e[e.dollarBraceL=27136]=`dollarBraceL`,e[e.at=27648]=`at`,e[e.hash=29184]=`hash`,e[e.eq=29728]=`eq`,e[e.assign=30752]=`assign`,e[e.preIncDec=32640]=`preIncDec`,e[e.postIncDec=33664]=`postIncDec`,e[e.bang=34432]=`bang`,e[e.tilde=35456]=`tilde`,e[e.pipeline=35841]=`pipeline`,e[e.nullishCoalescing=36866]=`nullishCoalescing`,e[e.logicalOR=37890]=`logicalOR`,e[e.logicalAND=38915]=`logicalAND`,e[e.bitwiseOR=39940]=`bitwiseOR`,e[e.bitwiseXOR=40965]=`bitwiseXOR`,e[e.bitwiseAND=41990]=`bitwiseAND`,e[e.equality=43015]=`equality`,e[e.lessThan=44040]=`lessThan`,e[e.greaterThan=45064]=`greaterThan`,e[e.relationalOrEqual=46088]=`relationalOrEqual`,e[e.bitShiftL=47113]=`bitShiftL`,e[e.bitShiftR=48137]=`bitShiftR`,e[e.plus=49802]=`plus`,e[e.minus=50826]=`minus`,e[e.modulo=51723]=`modulo`,e[e.star=52235]=`star`,e[e.slash=53259]=`slash`,e[e.exponent=54348]=`exponent`,e[e.jsxName=55296]=`jsxName`,e[e.jsxText=56320]=`jsxText`,e[e.jsxEmptyText=57344]=`jsxEmptyText`,e[e.jsxTagStart=58880]=`jsxTagStart`,e[e.jsxTagEnd=59392]=`jsxTagEnd`,e[e.typeParameterStart=60928]=`typeParameterStart`,e[e.nonNullAssertion=61440]=`nonNullAssertion`,e[e._break=62480]=`_break`,e[e._case=63504]=`_case`,e[e._catch=64528]=`_catch`,e[e._continue=65552]=`_continue`,e[e._debugger=66576]=`_debugger`,e[e._default=67600]=`_default`,e[e._do=68624]=`_do`,e[e._else=69648]=`_else`,e[e._finally=70672]=`_finally`,e[e._for=71696]=`_for`,e[e._function=73232]=`_function`,e[e._if=73744]=`_if`,e[e._return=74768]=`_return`,e[e._switch=75792]=`_switch`,e[e._throw=77456]=`_throw`,e[e._try=77840]=`_try`,e[e._var=78864]=`_var`,e[e._let=79888]=`_let`,e[e._const=80912]=`_const`,e[e._while=81936]=`_while`,e[e._with=82960]=`_with`,e[e._new=84496]=`_new`,e[e._this=85520]=`_this`,e[e._super=86544]=`_super`,e[e._class=87568]=`_class`,e[e._extends=88080]=`_extends`,e[e._export=89104]=`_export`,e[e._import=90640]=`_import`,e[e._yield=91664]=`_yield`,e[e._null=92688]=`_null`,e[e._true=93712]=`_true`,e[e._false=94736]=`_false`,e[e._in=95256]=`_in`,e[e._instanceof=96280]=`_instanceof`,e[e._typeof=97936]=`_typeof`,e[e._void=98960]=`_void`,e[e._delete=99984]=`_delete`,e[e._async=100880]=`_async`,e[e._get=101904]=`_get`,e[e._set=102928]=`_set`,e[e._declare=103952]=`_declare`,e[e._readonly=104976]=`_readonly`,e[e._abstract=106e3]=`_abstract`,e[e._static=107024]=`_static`,e[e._public=107536]=`_public`,e[e._private=108560]=`_private`,e[e._protected=109584]=`_protected`,e[e._override=110608]=`_override`,e[e._as=112144]=`_as`,e[e._enum=113168]=`_enum`,e[e._type=114192]=`_type`,e[e._implements=115216]=`_implements`})(V||={});function wo(e){switch(e){case V.num:return`num`;case V.bigint:return`bigint`;case V.decimal:return`decimal`;case V.regexp:return`regexp`;case V.string:return`string`;case V.name:return`name`;case V.eof:return`eof`;case V.bracketL:return`[`;case V.bracketR:return`]`;case V.braceL:return`{`;case V.braceBarL:return`{|`;case V.braceR:return`}`;case V.braceBarR:return`|}`;case V.parenL:return`(`;case V.parenR:return`)`;case V.comma:return`,`;case V.semi:return`;`;case V.colon:return`:`;case V.doubleColon:return`::`;case V.dot:return`.`;case V.question:return`?`;case V.questionDot:return`?.`;case V.arrow:return`=>`;case V.template:return`template`;case V.ellipsis:return`...`;case V.backQuote:return"`";case V.dollarBraceL:return"${";case V.at:return`@`;case V.hash:return`#`;case V.eq:return`=`;case V.assign:return`_=`;case V.preIncDec:return`++/--`;case V.postIncDec:return`++/--`;case V.bang:return`!`;case V.tilde:return`~`;case V.pipeline:return`|>`;case V.nullishCoalescing:return`??`;case V.logicalOR:return`||`;case V.logicalAND:return`&&`;case V.bitwiseOR:return`|`;case V.bitwiseXOR:return`^`;case V.bitwiseAND:return`&`;case V.equality:return`==/!=`;case V.lessThan:return`<`;case V.greaterThan:return`>`;case V.relationalOrEqual:return`<=/>=`;case V.bitShiftL:return`<<`;case V.bitShiftR:return`>>/>>>`;case V.plus:return`+`;case V.minus:return`-`;case V.modulo:return`%`;case V.star:return`*`;case V.slash:return`/`;case V.exponent:return`**`;case V.jsxName:return`jsxName`;case V.jsxText:return`jsxText`;case V.jsxEmptyText:return`jsxEmptyText`;case V.jsxTagStart:return`jsxTagStart`;case V.jsxTagEnd:return`jsxTagEnd`;case V.typeParameterStart:return`typeParameterStart`;case V.nonNullAssertion:return`nonNullAssertion`;case V._break:return`break`;case V._case:return`case`;case V._catch:return`catch`;case V._continue:return`continue`;case V._debugger:return`debugger`;case V._default:return`default`;case V._do:return`do`;case V._else:return`else`;case V._finally:return`finally`;case V._for:return`for`;case V._function:return`function`;case V._if:return`if`;case V._return:return`return`;case V._switch:return`switch`;case V._throw:return`throw`;case V._try:return`try`;case V._var:return`var`;case V._let:return`let`;case V._const:return`const`;case V._while:return`while`;case V._with:return`with`;case V._new:return`new`;case V._this:return`this`;case V._super:return`super`;case V._class:return`class`;case V._extends:return`extends`;case V._export:return`export`;case V._import:return`import`;case V._yield:return`yield`;case V._null:return`null`;case V._true:return`true`;case V._false:return`false`;case V._in:return`in`;case V._instanceof:return`instanceof`;case V._typeof:return`typeof`;case V._void:return`void`;case V._delete:return`delete`;case V._async:return`async`;case V._get:return`get`;case V._set:return`set`;case V._declare:return`declare`;case V._readonly:return`readonly`;case V._abstract:return`abstract`;case V._static:return`static`;case V._public:return`public`;case V._private:return`private`;case V._protected:return`protected`;case V._override:return`override`;case V._as:return`as`;case V._enum:return`enum`;case V._type:return`type`;case V._implements:return`implements`;default:return``}}var To=class{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}},Eo=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=n,this.tokensLength=r,this.scopesLength=i,this.pos=a,this.type=o,this.contextualKeyword=s,this.start=c,this.end=l,this.isType=u,this.scopeDepth=d,this.error=f}},Do=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=V.eof}__init8(){this.contextualKeyword=B.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new Eo(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}},H;(function(e){e[e.backSpace=8]=`backSpace`,e[e.lineFeed=10]=`lineFeed`,e[e.tab=9]=`tab`,e[e.carriageReturn=13]=`carriageReturn`,e[e.shiftOut=14]=`shiftOut`,e[e.space=32]=`space`,e[e.exclamationMark=33]=`exclamationMark`,e[e.quotationMark=34]=`quotationMark`,e[e.numberSign=35]=`numberSign`,e[e.dollarSign=36]=`dollarSign`,e[e.percentSign=37]=`percentSign`,e[e.ampersand=38]=`ampersand`,e[e.apostrophe=39]=`apostrophe`,e[e.leftParenthesis=40]=`leftParenthesis`,e[e.rightParenthesis=41]=`rightParenthesis`,e[e.asterisk=42]=`asterisk`,e[e.plusSign=43]=`plusSign`,e[e.comma=44]=`comma`,e[e.dash=45]=`dash`,e[e.dot=46]=`dot`,e[e.slash=47]=`slash`,e[e.digit0=48]=`digit0`,e[e.digit1=49]=`digit1`,e[e.digit2=50]=`digit2`,e[e.digit3=51]=`digit3`,e[e.digit4=52]=`digit4`,e[e.digit5=53]=`digit5`,e[e.digit6=54]=`digit6`,e[e.digit7=55]=`digit7`,e[e.digit8=56]=`digit8`,e[e.digit9=57]=`digit9`,e[e.colon=58]=`colon`,e[e.semicolon=59]=`semicolon`,e[e.lessThan=60]=`lessThan`,e[e.equalsTo=61]=`equalsTo`,e[e.greaterThan=62]=`greaterThan`,e[e.questionMark=63]=`questionMark`,e[e.atSign=64]=`atSign`,e[e.uppercaseA=65]=`uppercaseA`,e[e.uppercaseB=66]=`uppercaseB`,e[e.uppercaseC=67]=`uppercaseC`,e[e.uppercaseD=68]=`uppercaseD`,e[e.uppercaseE=69]=`uppercaseE`,e[e.uppercaseF=70]=`uppercaseF`,e[e.uppercaseG=71]=`uppercaseG`,e[e.uppercaseH=72]=`uppercaseH`,e[e.uppercaseI=73]=`uppercaseI`,e[e.uppercaseJ=74]=`uppercaseJ`,e[e.uppercaseK=75]=`uppercaseK`,e[e.uppercaseL=76]=`uppercaseL`,e[e.uppercaseM=77]=`uppercaseM`,e[e.uppercaseN=78]=`uppercaseN`,e[e.uppercaseO=79]=`uppercaseO`,e[e.uppercaseP=80]=`uppercaseP`,e[e.uppercaseQ=81]=`uppercaseQ`,e[e.uppercaseR=82]=`uppercaseR`,e[e.uppercaseS=83]=`uppercaseS`,e[e.uppercaseT=84]=`uppercaseT`,e[e.uppercaseU=85]=`uppercaseU`,e[e.uppercaseV=86]=`uppercaseV`,e[e.uppercaseW=87]=`uppercaseW`,e[e.uppercaseX=88]=`uppercaseX`,e[e.uppercaseY=89]=`uppercaseY`,e[e.uppercaseZ=90]=`uppercaseZ`,e[e.leftSquareBracket=91]=`leftSquareBracket`,e[e.backslash=92]=`backslash`,e[e.rightSquareBracket=93]=`rightSquareBracket`,e[e.caret=94]=`caret`,e[e.underscore=95]=`underscore`,e[e.graveAccent=96]=`graveAccent`,e[e.lowercaseA=97]=`lowercaseA`,e[e.lowercaseB=98]=`lowercaseB`,e[e.lowercaseC=99]=`lowercaseC`,e[e.lowercaseD=100]=`lowercaseD`,e[e.lowercaseE=101]=`lowercaseE`,e[e.lowercaseF=102]=`lowercaseF`,e[e.lowercaseG=103]=`lowercaseG`,e[e.lowercaseH=104]=`lowercaseH`,e[e.lowercaseI=105]=`lowercaseI`,e[e.lowercaseJ=106]=`lowercaseJ`,e[e.lowercaseK=107]=`lowercaseK`,e[e.lowercaseL=108]=`lowercaseL`,e[e.lowercaseM=109]=`lowercaseM`,e[e.lowercaseN=110]=`lowercaseN`,e[e.lowercaseO=111]=`lowercaseO`,e[e.lowercaseP=112]=`lowercaseP`,e[e.lowercaseQ=113]=`lowercaseQ`,e[e.lowercaseR=114]=`lowercaseR`,e[e.lowercaseS=115]=`lowercaseS`,e[e.lowercaseT=116]=`lowercaseT`,e[e.lowercaseU=117]=`lowercaseU`,e[e.lowercaseV=118]=`lowercaseV`,e[e.lowercaseW=119]=`lowercaseW`,e[e.lowercaseX=120]=`lowercaseX`,e[e.lowercaseY=121]=`lowercaseY`,e[e.lowercaseZ=122]=`lowercaseZ`,e[e.leftCurlyBrace=123]=`leftCurlyBrace`,e[e.verticalBar=124]=`verticalBar`,e[e.rightCurlyBrace=125]=`rightCurlyBrace`,e[e.tilde=126]=`tilde`,e[e.nonBreakingSpace=160]=`nonBreakingSpace`,e[e.oghamSpaceMark=5760]=`oghamSpaceMark`,e[e.lineSeparator=8232]=`lineSeparator`,e[e.paragraphSeparator=8233]=`paragraphSeparator`})(H||={});var Oo,ko,Ao,U,W,jo;function Mo(){return jo++}function No(e){if(`pos`in e){let t=Fo(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}var Po=class{constructor(e,t){this.line=e,this.column=t}};function Fo(e){let t=1,n=1;for(let r=0;r<e;r++)W.charCodeAt(r)===H.lineFeed?(t++,n=1):n++;return new Po(t,n)}function Io(e,t,n,r){W=e,U=new Do,jo=1,Oo=t,ko=n,Ao=r}function G(e){return U.contextualKeyword===e}function Lo(e){let t=ps();return t.type===V.name&&t.contextualKeyword===e}function Ro(e){return U.contextualKeyword===e&&Z(V.name)}function zo(e){Ro(e)||q()}function Bo(){return Q(V.eof)||Q(V.braceR)||Vo()}function Vo(){let e=U.tokens[U.tokens.length-1],t=e?e.end:0;for(let e=t;e<U.start;e++){let t=W.charCodeAt(e);if(t===H.lineFeed||t===H.carriageReturn||t===8232||t===8233)return!0}return!1}function Ho(){let e=ms();for(let t=U.end;t<e;t++){let e=W.charCodeAt(t);if(e===H.lineFeed||e===H.carriageReturn||e===8232||e===8233)return!0}return!1}function Uo(){return Z(V.semi)||Bo()}function Wo(){Uo()||q(`Unexpected token, expected ";"`)}function K(e){Z(e)||q(`Unexpected token, expected "${wo(e)}"`)}function q(e=`Unexpected token`,t=U.start){if(U.error)return;let n=SyntaxError(e);n.pos=t,U.error=n,U.pos=W.length,Ss(V.eof)}var Go=[9,11,12,H.space,H.nonBreakingSpace,H.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],Ko=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,qo=new Uint8Array(65536);for(let e of Go)qo[e]=1;function Jo(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw Error(`Should not be called with non-ASCII char code.`)}var Yo=new Uint8Array(65536);for(let e=0;e<128;e++)Yo[e]=+!!Jo(e);for(let e=128;e<65536;e++)Yo[e]=1;for(let e of Go)Yo[e]=0;Yo[8232]=0,Yo[8233]=0;var Xo=Yo.slice();for(let e=H.digit0;e<=H.digit9;e++)Xo[e]=0;var Zo=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,B._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,B._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,B._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,B._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,B._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,B._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(V._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(V._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,B._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(V._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(V._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(V._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,B._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(V._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(V._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(V._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,B._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(V._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,B._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(V._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,B._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(V._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,B._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(V._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,B._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,B._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,B._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,B._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,B._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(V._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(V._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(V._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,B._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(V._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(V._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function Qo(){let e=0,t=0,n=U.pos;for(;n<W.length&&(t=W.charCodeAt(n),!(t<H.lowercaseA||t>H.lowercaseZ));){let r=Zo[e+(t-H.lowercaseA)+1];if(r===-1)break;e=r,n++}let r=Zo[e];if(r>-1&&!Yo[t])U.pos=n,r&1?Ss(r>>>1):Ss(V.name,r>>>1);else{for(;n<W.length;){let e=W.charCodeAt(n);if(Yo[e])n++;else if(e===H.backslash){if(n+=2,W.charCodeAt(n)===H.leftCurlyBrace){for(;n<W.length&&W.charCodeAt(n)!==H.rightCurlyBrace;)n++;n++}}else if(e===H.atSign&&W.charCodeAt(n+1)===H.atSign)n+=2;else break}U.pos=n,Ss(V.name)}}var J;(function(e){e[e.Access=0]=`Access`,e[e.ExportAccess=1]=`ExportAccess`,e[e.TopLevelDeclaration=2]=`TopLevelDeclaration`,e[e.FunctionScopedDeclaration=3]=`FunctionScopedDeclaration`,e[e.BlockScopedDeclaration=4]=`BlockScopedDeclaration`,e[e.ObjectShorthandTopLevelDeclaration=5]=`ObjectShorthandTopLevelDeclaration`,e[e.ObjectShorthandFunctionScopedDeclaration=6]=`ObjectShorthandFunctionScopedDeclaration`,e[e.ObjectShorthandBlockScopedDeclaration=7]=`ObjectShorthandBlockScopedDeclaration`,e[e.ObjectShorthand=8]=`ObjectShorthand`,e[e.ImportDeclaration=9]=`ImportDeclaration`,e[e.ObjectKey=10]=`ObjectKey`,e[e.ImportAccess=11]=`ImportAccess`})(J||={});var $o;(function(e){e[e.NoChildren=0]=`NoChildren`,e[e.OneChild=1]=`OneChild`,e[e.StaticChildren=2]=`StaticChildren`,e[e.KeyAfterPropSpread=3]=`KeyAfterPropSpread`})($o||={});function es(e){let t=e.identifierRole;return t===J.TopLevelDeclaration||t===J.FunctionScopedDeclaration||t===J.BlockScopedDeclaration||t===J.ObjectShorthandTopLevelDeclaration||t===J.ObjectShorthandFunctionScopedDeclaration||t===J.ObjectShorthandBlockScopedDeclaration}function ts(e){let t=e.identifierRole;return t===J.FunctionScopedDeclaration||t===J.BlockScopedDeclaration||t===J.ObjectShorthandFunctionScopedDeclaration||t===J.ObjectShorthandBlockScopedDeclaration}function ns(e){let t=e.identifierRole;return t===J.TopLevelDeclaration||t===J.ObjectShorthandTopLevelDeclaration||t===J.ImportDeclaration}function rs(e){let t=e.identifierRole;return t===J.TopLevelDeclaration||t===J.BlockScopedDeclaration||t===J.ObjectShorthandTopLevelDeclaration||t===J.ObjectShorthandBlockScopedDeclaration}function is(e){let t=e.identifierRole;return t===J.FunctionScopedDeclaration||t===J.ObjectShorthandFunctionScopedDeclaration}function as(e){return e.identifierRole===J.ObjectShorthandTopLevelDeclaration||e.identifierRole===J.ObjectShorthandBlockScopedDeclaration||e.identifierRole===J.ObjectShorthandFunctionScopedDeclaration}var os=class{constructor(){this.type=U.type,this.contextualKeyword=U.contextualKeyword,this.start=U.start,this.end=U.end,this.scopeDepth=U.scopeDepth,this.isType=U.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function Y(){U.tokens.push(new os),_s()}function ss(){U.tokens.push(new os),U.start=U.pos,Vs()}function cs(){U.type===V.assign&&--U.pos,Is()}function ls(e){for(let t=U.tokens.length-e;t<U.tokens.length;t++)U.tokens[t].isType=!0;let t=U.isType;return U.isType=!0,t}function X(e){U.isType=e}function Z(e){return Q(e)?(Y(),!0):!1}function us(e){let t=U.isType;U.isType=!0,Z(e),U.isType=t}function Q(e){return U.type===e}function ds(){let e=U.snapshot();Y();let t=U.type;return U.restoreFromSnapshot(e),t}var fs=class{constructor(e,t){this.type=e,this.contextualKeyword=t}};function ps(){let e=U.snapshot();Y();let t=U.type,n=U.contextualKeyword;return U.restoreFromSnapshot(e),new fs(t,n)}function ms(){return hs(U.pos)}function hs(e){return Ko.lastIndex=e,e+Ko.exec(W)[0].length}function gs(){return W.charCodeAt(ms())}function _s(){if(xs(),U.start=U.pos,U.pos>=W.length){let e=U.tokens;e.length>=2&&e[e.length-1].start>=W.length&&e[e.length-2].start>=W.length&&q(`Unexpectedly reached the end of input.`),Ss(V.eof)}else vs(W.charCodeAt(U.pos))}function vs(e){Xo[e]||e===H.backslash||e===H.atSign&&W.charCodeAt(U.pos+1)===H.atSign?Qo():Ps(e)}function ys(){for(;W.charCodeAt(U.pos)!==H.asterisk||W.charCodeAt(U.pos+1)!==H.slash;)if(U.pos++,U.pos>W.length){q(`Unterminated comment`,U.pos-2);return}U.pos+=2}function bs(e){let t=W.charCodeAt(U.pos+=e);if(U.pos<W.length)for(;t!==H.lineFeed&&t!==H.carriageReturn&&t!==H.lineSeparator&&t!==H.paragraphSeparator&&++U.pos<W.length;)t=W.charCodeAt(U.pos)}function xs(){for(;U.pos<W.length;){let e=W.charCodeAt(U.pos);switch(e){case H.carriageReturn:W.charCodeAt(U.pos+1)===H.lineFeed&&++U.pos;case H.lineFeed:case H.lineSeparator:case H.paragraphSeparator:++U.pos;break;case H.slash:switch(W.charCodeAt(U.pos+1)){case H.asterisk:U.pos+=2,ys();break;case H.slash:bs(2);break;default:return}break;default:if(qo[e])++U.pos;else return}}}function Ss(e,t=B.NONE){U.end=U.pos,U.type=e,U.contextualKeyword=t}function Cs(){let e=W.charCodeAt(U.pos+1);e>=H.digit0&&e<=H.digit9?zs(!0):e===H.dot&&W.charCodeAt(U.pos+2)===H.dot?(U.pos+=3,Ss(V.ellipsis)):(++U.pos,Ss(V.dot))}function ws(){W.charCodeAt(U.pos+1)===H.equalsTo?Fs(V.assign,2):Fs(V.slash,1)}function Ts(e){let t=e===H.asterisk?V.star:V.modulo,n=1,r=W.charCodeAt(U.pos+1);e===H.asterisk&&r===H.asterisk&&(n++,r=W.charCodeAt(U.pos+2),t=V.exponent),r===H.equalsTo&&W.charCodeAt(U.pos+2)!==H.greaterThan&&(n++,t=V.assign),Fs(t,n)}function Es(e){let t=W.charCodeAt(U.pos+1);if(t===e)W.charCodeAt(U.pos+2)===H.equalsTo?Fs(V.assign,3):Fs(e===H.verticalBar?V.logicalOR:V.logicalAND,2);else{if(e===H.verticalBar){if(t===H.greaterThan){Fs(V.pipeline,2);return}if(t===H.rightCurlyBrace&&Ao){Fs(V.braceBarR,2);return}}t===H.equalsTo?Fs(V.assign,2):Fs(e===H.verticalBar?V.bitwiseOR:V.bitwiseAND,1)}}function Ds(){W.charCodeAt(U.pos+1)===H.equalsTo?Fs(V.assign,2):Fs(V.bitwiseXOR,1)}function Os(e){let t=W.charCodeAt(U.pos+1);t===e?Fs(V.preIncDec,2):t===H.equalsTo?Fs(V.assign,2):e===H.plusSign?Fs(V.plus,1):Fs(V.minus,1)}function ks(){let e=W.charCodeAt(U.pos+1);if(e===H.lessThan){if(W.charCodeAt(U.pos+2)===H.equalsTo){Fs(V.assign,3);return}U.isType?Fs(V.lessThan,1):Fs(V.bitShiftL,2)}else e===H.equalsTo?Fs(V.relationalOrEqual,2):Fs(V.lessThan,1)}function As(){if(U.isType){Fs(V.greaterThan,1);return}let e=W.charCodeAt(U.pos+1);if(e===H.greaterThan){let e=W.charCodeAt(U.pos+2)===H.greaterThan?3:2;if(W.charCodeAt(U.pos+e)===H.equalsTo){Fs(V.assign,e+1);return}Fs(V.bitShiftR,e)}else e===H.equalsTo?Fs(V.relationalOrEqual,2):Fs(V.greaterThan,1)}function js(){U.type===V.greaterThan&&(--U.pos,As())}function Ms(e){let t=W.charCodeAt(U.pos+1);t===H.equalsTo?Fs(V.equality,W.charCodeAt(U.pos+2)===H.equalsTo?3:2):e===H.equalsTo&&t===H.greaterThan?(U.pos+=2,Ss(V.arrow)):Fs(e===H.equalsTo?V.eq:V.bang,1)}function Ns(){let e=W.charCodeAt(U.pos+1),t=W.charCodeAt(U.pos+2);e===H.questionMark&&!(Ao&&U.isType)?t===H.equalsTo?Fs(V.assign,3):Fs(V.nullishCoalescing,2):e===H.dot&&!(t>=H.digit0&&t<=H.digit9)?(U.pos+=2,Ss(V.questionDot)):(++U.pos,Ss(V.question))}function Ps(e){switch(e){case H.numberSign:++U.pos,Ss(V.hash);return;case H.dot:Cs();return;case H.leftParenthesis:++U.pos,Ss(V.parenL);return;case H.rightParenthesis:++U.pos,Ss(V.parenR);return;case H.semicolon:++U.pos,Ss(V.semi);return;case H.comma:++U.pos,Ss(V.comma);return;case H.leftSquareBracket:++U.pos,Ss(V.bracketL);return;case H.rightSquareBracket:++U.pos,Ss(V.bracketR);return;case H.leftCurlyBrace:Ao&&W.charCodeAt(U.pos+1)===H.verticalBar?Fs(V.braceBarL,2):(++U.pos,Ss(V.braceL));return;case H.rightCurlyBrace:++U.pos,Ss(V.braceR);return;case H.colon:W.charCodeAt(U.pos+1)===H.colon?Fs(V.doubleColon,2):(++U.pos,Ss(V.colon));return;case H.questionMark:Ns();return;case H.atSign:++U.pos,Ss(V.at);return;case H.graveAccent:++U.pos,Ss(V.backQuote);return;case H.digit0:{let e=W.charCodeAt(U.pos+1);if(e===H.lowercaseX||e===H.uppercaseX||e===H.lowercaseO||e===H.uppercaseO||e===H.lowercaseB||e===H.uppercaseB){Rs();return}}case H.digit1:case H.digit2:case H.digit3:case H.digit4:case H.digit5:case H.digit6:case H.digit7:case H.digit8:case H.digit9:zs(!1);return;case H.quotationMark:case H.apostrophe:Bs(e);return;case H.slash:ws();return;case H.percentSign:case H.asterisk:Ts(e);return;case H.verticalBar:case H.ampersand:Es(e);return;case H.caret:Ds();return;case H.plusSign:case H.dash:Os(e);return;case H.lessThan:ks();return;case H.greaterThan:As();return;case H.equalsTo:case H.exclamationMark:Ms(e);return;case H.tilde:Fs(V.tilde,1);return}q(`Unexpected character '${String.fromCharCode(e)}'`,U.pos)}function Fs(e,t){U.pos+=t,Ss(e)}function Is(){let e=U.pos,t=!1,n=!1;for(;;){if(U.pos>=W.length){q(`Unterminated regular expression`,e);return}let r=W.charCodeAt(U.pos);if(t)t=!1;else{if(r===H.leftSquareBracket)n=!0;else if(r===H.rightSquareBracket&&n)n=!1;else if(r===H.slash&&!n)break;t=r===H.backslash}++U.pos}++U.pos,Hs(),Ss(V.regexp)}function Ls(){for(;;){let e=W.charCodeAt(U.pos);if(e>=H.digit0&&e<=H.digit9||e===H.underscore)U.pos++;else break}}function Rs(){for(U.pos+=2;;){let e=W.charCodeAt(U.pos);if(e>=H.digit0&&e<=H.digit9||e>=H.lowercaseA&&e<=H.lowercaseF||e>=H.uppercaseA&&e<=H.uppercaseF||e===H.underscore)U.pos++;else break}W.charCodeAt(U.pos)===H.lowercaseN?(++U.pos,Ss(V.bigint)):Ss(V.num)}function zs(e){let t=!1,n=!1;e||Ls();let r=W.charCodeAt(U.pos);r===H.dot&&(++U.pos,Ls(),r=W.charCodeAt(U.pos)),(r===H.uppercaseE||r===H.lowercaseE)&&(r=W.charCodeAt(++U.pos),(r===H.plusSign||r===H.dash)&&++U.pos,Ls(),r=W.charCodeAt(U.pos)),r===H.lowercaseN?(++U.pos,t=!0):r===H.lowercaseM&&(++U.pos,n=!0),Ss(t?V.bigint:n?V.decimal:V.num)}function Bs(e){for(U.pos++;;){if(U.pos>=W.length){q(`Unterminated string constant`);return}let t=W.charCodeAt(U.pos);if(t===H.backslash)U.pos++;else if(t===e)break;U.pos++}U.pos++,Ss(V.string)}function Vs(){for(;;){if(U.pos>=W.length){q(`Unterminated template`);return}let e=W.charCodeAt(U.pos);if(e===H.graveAccent||e===H.dollarSign&&W.charCodeAt(U.pos+1)===H.leftCurlyBrace){if(U.pos===U.start&&Q(V.template)){if(e===H.dollarSign){U.pos+=2,Ss(V.dollarBraceL);return}++U.pos,Ss(V.backQuote);return}Ss(V.template);return}e===H.backslash&&U.pos++,U.pos++}}function Hs(){for(;U.pos<W.length;){let e=W.charCodeAt(U.pos);if(Yo[e])U.pos++;else if(e===H.backslash){if(U.pos+=2,W.charCodeAt(U.pos)===H.leftCurlyBrace){for(;U.pos<W.length&&W.charCodeAt(U.pos)!==H.rightCurlyBrace;)U.pos++;U.pos++}}else break}}function Us(e,t=e.currentIndex()){let n=t+1;if(Ws(e,n)){let r=e.identifierNameAtIndex(t);return{isType:!1,leftName:r,rightName:r,endIndex:n}}if(n++,Ws(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,Ws(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,Ws(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw Error(`Unexpected import/export specifier at ${t}`)}function Ws(e,t){let n=e.tokens[t];return n.type===V.braceR||n.type===V.comma}var Gs=new Map([[`quot`,`"`],[`amp`,`&`],[`apos`,`'`],[`lt`,`<`],[`gt`,`>`],[`nbsp`,`\xA0`],[`iexcl`,`¡`],[`cent`,`¢`],[`pound`,`£`],[`curren`,`¤`],[`yen`,`¥`],[`brvbar`,`¦`],[`sect`,`§`],[`uml`,`¨`],[`copy`,`©`],[`ordf`,`ª`],[`laquo`,`«`],[`not`,`¬`],[`shy`,`­`],[`reg`,`®`],[`macr`,`¯`],[`deg`,`°`],[`plusmn`,`±`],[`sup2`,`²`],[`sup3`,`³`],[`acute`,`´`],[`micro`,`µ`],[`para`,`¶`],[`middot`,`·`],[`cedil`,`¸`],[`sup1`,`¹`],[`ordm`,`º`],[`raquo`,`»`],[`frac14`,`¼`],[`frac12`,`½`],[`frac34`,`¾`],[`iquest`,`¿`],[`Agrave`,`À`],[`Aacute`,`Á`],[`Acirc`,`Â`],[`Atilde`,`Ã`],[`Auml`,`Ä`],[`Aring`,`Å`],[`AElig`,`Æ`],[`Ccedil`,`Ç`],[`Egrave`,`È`],[`Eacute`,`É`],[`Ecirc`,`Ê`],[`Euml`,`Ë`],[`Igrave`,`Ì`],[`Iacute`,`Í`],[`Icirc`,`Î`],[`Iuml`,`Ï`],[`ETH`,`Ð`],[`Ntilde`,`Ñ`],[`Ograve`,`Ò`],[`Oacute`,`Ó`],[`Ocirc`,`Ô`],[`Otilde`,`Õ`],[`Ouml`,`Ö`],[`times`,`×`],[`Oslash`,`Ø`],[`Ugrave`,`Ù`],[`Uacute`,`Ú`],[`Ucirc`,`Û`],[`Uuml`,`Ü`],[`Yacute`,`Ý`],[`THORN`,`Þ`],[`szlig`,`ß`],[`agrave`,`à`],[`aacute`,`á`],[`acirc`,`â`],[`atilde`,`ã`],[`auml`,`ä`],[`aring`,`å`],[`aelig`,`æ`],[`ccedil`,`ç`],[`egrave`,`è`],[`eacute`,`é`],[`ecirc`,`ê`],[`euml`,`ë`],[`igrave`,`ì`],[`iacute`,`í`],[`icirc`,`î`],[`iuml`,`ï`],[`eth`,`ð`],[`ntilde`,`ñ`],[`ograve`,`ò`],[`oacute`,`ó`],[`ocirc`,`ô`],[`otilde`,`õ`],[`ouml`,`ö`],[`divide`,`÷`],[`oslash`,`ø`],[`ugrave`,`ù`],[`uacute`,`ú`],[`ucirc`,`û`],[`uuml`,`ü`],[`yacute`,`ý`],[`thorn`,`þ`],[`yuml`,`ÿ`],[`OElig`,`Œ`],[`oelig`,`œ`],[`Scaron`,`Š`],[`scaron`,`š`],[`Yuml`,`Ÿ`],[`fnof`,`ƒ`],[`circ`,`ˆ`],[`tilde`,`˜`],[`Alpha`,`Α`],[`Beta`,`Β`],[`Gamma`,`Γ`],[`Delta`,`Δ`],[`Epsilon`,`Ε`],[`Zeta`,`Ζ`],[`Eta`,`Η`],[`Theta`,`Θ`],[`Iota`,`Ι`],[`Kappa`,`Κ`],[`Lambda`,`Λ`],[`Mu`,`Μ`],[`Nu`,`Ν`],[`Xi`,`Ξ`],[`Omicron`,`Ο`],[`Pi`,`Π`],[`Rho`,`Ρ`],[`Sigma`,`Σ`],[`Tau`,`Τ`],[`Upsilon`,`Υ`],[`Phi`,`Φ`],[`Chi`,`Χ`],[`Psi`,`Ψ`],[`Omega`,`Ω`],[`alpha`,`α`],[`beta`,`β`],[`gamma`,`γ`],[`delta`,`δ`],[`epsilon`,`ε`],[`zeta`,`ζ`],[`eta`,`η`],[`theta`,`θ`],[`iota`,`ι`],[`kappa`,`κ`],[`lambda`,`λ`],[`mu`,`μ`],[`nu`,`ν`],[`xi`,`ξ`],[`omicron`,`ο`],[`pi`,`π`],[`rho`,`ρ`],[`sigmaf`,`ς`],[`sigma`,`σ`],[`tau`,`τ`],[`upsilon`,`υ`],[`phi`,`φ`],[`chi`,`χ`],[`psi`,`ψ`],[`omega`,`ω`],[`thetasym`,`ϑ`],[`upsih`,`ϒ`],[`piv`,`ϖ`],[`ensp`,` `],[`emsp`,` `],[`thinsp`,` `],[`zwnj`,`‌`],[`zwj`,`‍`],[`lrm`,`‎`],[`rlm`,`‏`],[`ndash`,`–`],[`mdash`,`—`],[`lsquo`,`‘`],[`rsquo`,`’`],[`sbquo`,`‚`],[`ldquo`,`“`],[`rdquo`,`”`],[`bdquo`,`„`],[`dagger`,`†`],[`Dagger`,`‡`],[`bull`,`•`],[`hellip`,`…`],[`permil`,`‰`],[`prime`,`′`],[`Prime`,`″`],[`lsaquo`,`‹`],[`rsaquo`,`›`],[`oline`,`‾`],[`frasl`,`⁄`],[`euro`,`€`],[`image`,`ℑ`],[`weierp`,`℘`],[`real`,`ℜ`],[`trade`,`™`],[`alefsym`,`ℵ`],[`larr`,`←`],[`uarr`,`↑`],[`rarr`,`→`],[`darr`,`↓`],[`harr`,`↔`],[`crarr`,`↵`],[`lArr`,`⇐`],[`uArr`,`⇑`],[`rArr`,`⇒`],[`dArr`,`⇓`],[`hArr`,`⇔`],[`forall`,`∀`],[`part`,`∂`],[`exist`,`∃`],[`empty`,`∅`],[`nabla`,`∇`],[`isin`,`∈`],[`notin`,`∉`],[`ni`,`∋`],[`prod`,`∏`],[`sum`,`∑`],[`minus`,`−`],[`lowast`,`∗`],[`radic`,`√`],[`prop`,`∝`],[`infin`,`∞`],[`ang`,`∠`],[`and`,`∧`],[`or`,`∨`],[`cap`,`∩`],[`cup`,`∪`],[`int`,`∫`],[`there4`,`∴`],[`sim`,`∼`],[`cong`,`≅`],[`asymp`,`≈`],[`ne`,`≠`],[`equiv`,`≡`],[`le`,`≤`],[`ge`,`≥`],[`sub`,`⊂`],[`sup`,`⊃`],[`nsub`,`⊄`],[`sube`,`⊆`],[`supe`,`⊇`],[`oplus`,`⊕`],[`otimes`,`⊗`],[`perp`,`⊥`],[`sdot`,`⋅`],[`lceil`,`⌈`],[`rceil`,`⌉`],[`lfloor`,`⌊`],[`rfloor`,`⌋`],[`lang`,`〈`],[`rang`,`〉`],[`loz`,`◊`],[`spades`,`♠`],[`clubs`,`♣`],[`hearts`,`♥`],[`diams`,`♦`]]);function Ks(e){let[t,n]=qs(e.jsxPragma||`React.createElement`),[r,i]=qs(e.jsxFragmentPragma||`React.Fragment`);return{base:t,suffix:n,fragmentBase:r,fragmentSuffix:i}}function qs(e){let t=e.indexOf(`.`);return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var Js=class{getPrefixCode(){return``}getHoistedCode(){return``}getSuffixCode(){return``}},Ys=class e extends Js{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,r,i,a){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Ks(a),this.isAutomaticRuntime=a.jsxRuntime===`automatic`,this.jsxImportSource=a.jsxImportSource||`react`}process(){return this.tokens.matches1(V.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e=``;if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||``)};`),this.isAutomaticRuntime){if(this.importProcessor)for(let[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{let{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);let r=Object.entries(n).map(([e,t])=>`${e} as ${t}`).join(`, `);if(r){let t=this.jsxImportSource+(this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);e+=`import {${r}} from "${t}";`}}}return e}processJSXTag(){let{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==$o.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){let t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)t[this.lastIndex]===`
31
+ `&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){let n=t===$o.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(n));let r=null;if(this.tokens.matches1(V.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(`, {`),r=this.processProps(!0),this.tokens.matches2(V.slash,V.jsxTagEnd))this.tokens.appendCode(`}`);else if(this.tokens.matches1(V.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t);else throw Error(`Expected either /> or > at the end of the tag.`);r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(`, void 0`),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(V.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(V.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(V.slash,V.jsxTagEnd)){if(this.tokens.matches1(V.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw Error(`Expected either /> or > at the end of the tag.`)}for(this.tokens.removeInitialToken();!this.tokens.matches1(V.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation(`jsxs`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsx`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsxDEV`,`/jsx-dev-runtime`)}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation(`createElement`,``);{let{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName(`Fragment`,this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);{let{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){let n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){let n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,V.jsxName,V.jsxName)&&!this.tokens.matches2AtIndex(e-1,V.greaterThan,V.jsxName)&&!this.tokens.matches1AtIndex(e,V.braceL)&&!this.tokens.matches1AtIndex(e,V.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,V.slash,V.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){let e=this.tokens.identifierName();Xs(e)&&this.tokens.replaceToken(`'${e}'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){let t=this.options.production?``:`__self: this, __source: ${this.getDevSource(e)}`;!this.tokens.matches1(V.jsxName)&&!this.tokens.matches1(V.braceL)?t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(`, null`):(this.tokens.appendCode(`, {`),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode(`}`))}processProps(e){let t=null;for(;;){if(this.tokens.matches2(V.jsxName,V.eq)){let n=this.tokens.identifierName();if(e&&n===`key`){t!==null&&this.tokens.appendCode(t.replace(/[^\n]/g,``)),this.tokens.removeToken(),this.tokens.removeToken();let e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}this.processPropName(n),this.tokens.replaceToken(`: `),this.processPropValue()}else if(this.tokens.matches1(V.jsxName)){let e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(`: true`)}else if(this.tokens.matches1(V.braceL))this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``);else break;this.tokens.appendCode(`,`)}return t}processPropName(e){e.includes(`-`)?this.tokens.replaceToken(`'${e}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(V.braceL)?(this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``)):this.tokens.matches1(V.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Qs(t),r=$s(t);this.tokens.replaceToken(r+n)}processAutomaticChildrenAndEndProps(e){e===$o.StaticChildren?(this.tokens.appendCode(` children: [`),this.processChildren(!1),this.tokens.appendCode(`]}`)):(e===$o.OneChild&&this.tokens.appendCode(` children: `),this.processChildren(!1),this.tokens.appendCode(`}`))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(V.jsxTagStart,V.slash))return;let e=!1;if(this.tokens.matches1(V.braceL))this.tokens.matches2(V.braceL,V.braceR)?(this.tokens.replaceToken(``),this.tokens.replaceToken(``)):(this.tokens.replaceToken(t?`, `:``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``),e=!0);else if(this.tokens.matches1(V.jsxTagStart))this.tokens.appendCode(t?`, `:``),this.processJSXTag(),e=!0;else if(this.tokens.matches1(V.jsxText)||this.tokens.matches1(V.jsxEmptyText))e=this.processChildTextElement(t);else throw Error(`Unexpected token when processing JSX children.`);e&&(t=!0)}}processChildTextElement(e){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start,t.end),r=Qs(n),i=Zs(n);return i===`""`?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?`, `:``}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||=this.nameManager.claimFreeName(`_jsxFileName`),this.filenameVarName}};function Xs(e){let t=e.charCodeAt(0);return t>=H.lowercaseA&&t<=H.lowercaseZ}function Zs(e){let t=``,n=``,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===` `||o===` `||o===`\r`)r||(n+=o);else if(o===`
32
+ `)n=``,r=!0;else{if(i&&r&&(t+=` `),t+=n,n=``,o===`&`){let{entity:n,newI:r}=ec(e,a+1);a=r-1,t+=n}else t+=o;i=!0,r=!1}}return r||(t+=n),JSON.stringify(t)}function Qs(e){let t=0,n=0;for(let r of e)r===`
33
+ `?(t++,n=0):r===` `&&n++;return`
34
+ `.repeat(t)+` `.repeat(n)}function $s(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`
35
+ `){if(/\s/.test(e[n+1]))for(t+=` `;n<e.length&&/\s/.test(e[n+1]);)n++;else t+=`
36
+ `}else if(r===`&`){let{entity:r,newI:i}=ec(e,n+1);t+=r,n=i-1}else t+=r}return JSON.stringify(t)}function ec(e,t){let n=``,r=0,i,a=t;if(e[a]===`#`){let t=10;a++;let n;if(e[a]===`x`)for(t=16,a++,n=a;a<e.length&&nc(e.charCodeAt(a));)a++;else for(n=a;a<e.length&&tc(e.charCodeAt(a));)a++;if(e[a]===`;`){let r=e.slice(n,a);r&&(a++,i=String.fromCodePoint(parseInt(r,t)))}}else for(;a<e.length&&r++<10;){let t=e[a];if(a++,t===`;`){i=Gs.get(n);break}n+=t}return i?{entity:i,newI:a}:{entity:`&`,newI:t}}function tc(e){return e>=H.digit0&&e<=H.digit9}function nc(e){return e>=H.digit0&&e<=H.digit9||e>=H.lowercaseA&&e<=H.lowercaseF||e>=H.uppercaseA&&e<=H.uppercaseF}function rc(e,t){let n=Ks(t),r=new Set;for(let t=0;t<e.tokens.length;t++){let i=e.tokens[t];i.type===V.name&&!i.isType&&(i.identifierRole===J.Access||i.identifierRole===J.ObjectShorthand||i.identifierRole===J.ExportAccess)&&!i.shadowsGlobal&&r.add(e.identifierNameForToken(i)),i.type===V.jsxTagStart&&r.add(n.base),i.type===V.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===V.jsxTagEnd&&(r.add(n.base),r.add(n.fragmentBase)),i.type===V.jsxName&&i.identifierRole===J.Access&&(!Xs(e.identifierNameForToken(i))||e.tokens[t+1].type===V.dot)&&r.add(e.identifierNameForToken(i))}return r}var ic=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,r,i,a,o,s){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=r,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=o,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,V._import)&&!this.tokens.matches3AtIndex(e,V._import,V.name,V.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,V._export)&&!this.tokens.matches2AtIndex(e,V._export,V.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=rc(this.tokens,this.options);for(let[e,t]of this.importInfoByPath.entries())t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0||[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,``)}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let{defaultNames:n,wildcardNames:r,namedImports:i,namedExports:a,exportStarNames:o,hasStarExport:s}=t;if(n.length===0&&r.length===0&&i.length===0&&a.length===0&&o.length===0&&!s){this.importsToReplace.set(e,`require('${e}');`);continue}let c=this.getFreeIdentifierForPath(e),l;l=this.enableLegacyTypeScriptModuleInterop?c:r.length>0?r[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require('${e}');`;if(r.length>0)for(let e of r){let t=this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c})`;u+=` var ${e} = ${t};`}else o.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireDefault`)}(${c});`);for(let{importedName:e,localName:t}of a)u+=` ${this.helperManager.getHelperName(`createNamedExportFrom`)}(${c}, '${t}', '${e}');`;for(let e of o)u+=` exports.${e} = ${l};`;s&&(u+=` ${this.helperManager.getHelperName(`createStarExport`)}(${c});`),this.importsToReplace.set(e,u);for(let e of n)this.identifierReplacements.set(e,`${l}.default`);for(let{importedName:e,localName:t}of i)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){let t=e.split(`/`),n=t[t.length-1].replace(/\W/g,``);return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){let t=[],n=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,B._type)||this.tokens.matches1AtIndex(e,V._typeof))&&!this.tokens.matches1AtIndex(e+1,V.comma)&&!this.tokens.matchesContextualAtIndex(e+1,B._from)||this.tokens.matches1AtIndex(e,V.parenL))return;if(this.tokens.matches1AtIndex(e,V.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,V.comma)&&e++),this.tokens.matches1AtIndex(e,V.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,V.braceL)){let n=this.getNamedImports(e+1);e=n.newIndex;for(let e of n.namedImports)e.importedName==="default"?t.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,B._from)&&e++,!this.tokens.matches1AtIndex(e,V.string))throw Error(`Expected string token at the end of import statement.`);let i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...t),a.wildcardNames.push(...n),a.namedImports.push(...r),t.length===0&&n.length===0&&r.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,V._export,V._var)||this.tokens.matches2AtIndex(e,V._export,V._let)||this.tokens.matches2AtIndex(e,V._export,V._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,V._export,V._function)||this.tokens.matches2AtIndex(e,V._export,V._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,V._export,V.name,V._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,V._export,V.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,V._export,V.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,V.braceL)||this.tokens.matches1AtIndex(n,V.dollarBraceL)||this.tokens.matches1AtIndex(n,V.bracketL))t++;else if(this.tokens.matches1AtIndex(n,V.braceR)||this.tokens.matches1AtIndex(n,V.bracketR))t--;else if(t===0&&!this.tokens.matches1AtIndex(n,V.name))break;else if(this.tokens.matches1AtIndex(1,V.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);n=e-1}else{let e=this.tokens.tokens[n];if(es(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,B._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(!this.tokens.matches1AtIndex(e,V.string))throw Error(`Expected string token at the end of import statement.`);let r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,V._export,V.star,V._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,V.string))throw Error(`Expected string token at the end of star export statement.`);let n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);t===null?r.hasStarExport=!0:r.exportStarNames.push(t)}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,V.braceR)){e++;break}let n=Us(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,V.comma,V.braceR)){e+=2;break}if(this.tokens.matches1AtIndex(e,V.braceR)){e++;break}if(this.tokens.matches1AtIndex(e,V.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:t}}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,``),t||``}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return!t||t.length===0?null:t.map(e=>`exports.${e}`).join(` = `)}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}},ac=44,oc=59,sc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,cc=new Uint8Array(64),lc=new Uint8Array(128);for(let e=0;e<sc.length;e++){let t=sc.charCodeAt(e);cc[e]=t,lc[t]=e}function uc(e,t){do{let n=t&31;t>>>=5,t>0&&(n|=32),e.write(cc[n])}while(t>0)}function dc(e){return e<0?-e<<1|1:e<<1}var fc=16384,pc=typeof TextDecoder<`u`?new TextDecoder:typeof Buffer<`u`?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},mc=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(fc)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===fc&&(this.out+=pc.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+pc.decode(e.subarray(0,n)):t}};function hc(e){let t=new mc,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(oc),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(ac),uc(t,dc(o[0]-c)),c=o[0],o.length!==1&&(uc(t,dc(o[1]-n)),uc(t,dc(o[2]-r)),uc(t,dc(o[3]-i)),n=o[1],r=o[2],i=o[3],o.length!==4&&(uc(t,dc(o[4]-a)),a=o[4]))}}return t.flush()}v(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path=e.path===`/`?t.path:f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];t?(o=!1,t!==`.`&&(t===`..`?a?(o=!0,a--,i--):n&&(r[i++]=t):(r[i++]=t,a++))):o=!0}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))}))();var gc=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function _c(e){return e}function vc(e,t){return _c(e)._indexes[t]}function yc(e,t){let n=vc(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=_c(e);return i[t]=r.push(t)-1}var bc=0,xc=1,Sc=2,Cc=3,wc=4,Tc=-1,Ec=class{constructor({file:e,sourceRoot:t}={}){this._names=new gc,this._sources=new gc,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new gc}};function Dc(e){return e}var Oc=(e,t,n,r,i,a,o,s)=>jc(!0,e,t,n,r,i,a,o,s);function kc(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=Dc(e);return Fc(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function Ac(e){let t=kc(e);return Object.assign({},t,{mappings:hc(t.mappings)})}function jc(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=Dc(t),p=Mc(l,n),m=Nc(p,r);if(!i)return e&&Ic(p,m)?void 0:Pc(p,m,[r]);let h=yc(u,i),g=s?yc(f,s):Tc;if(h===d.length&&(d[h]=c??null),!(e&&Lc(p,m,h,a,o,g)))return Pc(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function Mc(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function Nc(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][bc]);n=r--);return n}function Pc(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function Fc(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function Ic(e,t){return t===0||e[t-1].length===1}function Lc(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length!==1&&n===o[xc]&&r===o[Sc]&&i===o[Cc]&&a===(o.length===5?o[wc]:Tc)}function Rc({code:e,mappings:t},n,r,i,a){let o=zc(i,a),s=new Ec({file:r.compiledFilename}),c=0,l=t[0];for(;l===void 0&&c<t.length-1;)c++,l=t[c];let u=0,d=0;l!==d&&Oc(s,u,0,n,u,0);for(let r=0;r<e.length;r++){if(r===l){let e=l-d,i=o[c];for(Oc(s,u,e,n,u,i);(l===r||l===void 0)&&c<t.length-1;)c++,l=t[c]}e.charCodeAt(r)===H.lineFeed&&(u++,d=r+1,l!==d&&Oc(s,u,0,n,u,0))}let{sourceRoot:f,sourcesContent:p,...m}=Ac(s);return m}function zc(e,t){let n=Array(t.length),r=0,i=t[r].start,a=0;for(let o=0;o<e.length;o++)o===i&&(n[r]=i-a,r++,i=t[r].start),e.charCodeAt(o)===H.lineFeed&&(a=o+1);return n}var Bc={require:`
37
+ import {createRequire as CREATE_REQUIRE_NAME} from "module";
38
+ const require = CREATE_REQUIRE_NAME(import.meta.url);
39
+ `,interopRequireWildcard:`
40
+ function interopRequireWildcard(obj) {
41
+ if (obj && obj.__esModule) {
42
+ return obj;
43
+ } else {
44
+ var newObj = {};
45
+ if (obj != null) {
46
+ for (var key in obj) {
47
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
48
+ newObj[key] = obj[key];
49
+ }
50
+ }
51
+ }
52
+ newObj.default = obj;
53
+ return newObj;
54
+ }
55
+ }
56
+ `,interopRequireDefault:`
57
+ function interopRequireDefault(obj) {
58
+ return obj && obj.__esModule ? obj : { default: obj };
59
+ }
60
+ `,createNamedExportFrom:`
61
+ function createNamedExportFrom(obj, localName, importedName) {
62
+ Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
63
+ }
64
+ `,createStarExport:`
65
+ function createStarExport(obj) {
66
+ Object.keys(obj)
67
+ .filter((key) => key !== "default" && key !== "__esModule")
68
+ .forEach((key) => {
69
+ if (exports.hasOwnProperty(key)) {
70
+ return;
71
+ }
72
+ Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
73
+ });
74
+ }
75
+ `,nullishCoalesce:`
76
+ function nullishCoalesce(lhs, rhsFn) {
77
+ if (lhs != null) {
78
+ return lhs;
79
+ } else {
80
+ return rhsFn();
81
+ }
82
+ }
83
+ `,asyncNullishCoalesce:`
84
+ async function asyncNullishCoalesce(lhs, rhsFn) {
85
+ if (lhs != null) {
86
+ return lhs;
87
+ } else {
88
+ return await rhsFn();
89
+ }
90
+ }
91
+ `,optionalChain:`
92
+ function optionalChain(ops) {
93
+ let lastAccessLHS = undefined;
94
+ let value = ops[0];
95
+ let i = 1;
96
+ while (i < ops.length) {
97
+ const op = ops[i];
98
+ const fn = ops[i + 1];
99
+ i += 2;
100
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
101
+ return undefined;
102
+ }
103
+ if (op === 'access' || op === 'optionalAccess') {
104
+ lastAccessLHS = value;
105
+ value = fn(value);
106
+ } else if (op === 'call' || op === 'optionalCall') {
107
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
108
+ lastAccessLHS = undefined;
109
+ }
110
+ }
111
+ return value;
112
+ }
113
+ `,asyncOptionalChain:`
114
+ async function asyncOptionalChain(ops) {
115
+ let lastAccessLHS = undefined;
116
+ let value = ops[0];
117
+ let i = 1;
118
+ while (i < ops.length) {
119
+ const op = ops[i];
120
+ const fn = ops[i + 1];
121
+ i += 2;
122
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
123
+ return undefined;
124
+ }
125
+ if (op === 'access' || op === 'optionalAccess') {
126
+ lastAccessLHS = value;
127
+ value = await fn(value);
128
+ } else if (op === 'call' || op === 'optionalCall') {
129
+ value = await fn((...args) => value.call(lastAccessLHS, ...args));
130
+ lastAccessLHS = undefined;
131
+ }
132
+ }
133
+ return value;
134
+ }
135
+ `,optionalChainDelete:`
136
+ function optionalChainDelete(ops) {
137
+ const result = OPTIONAL_CHAIN_NAME(ops);
138
+ return result == null ? true : result;
139
+ }
140
+ `,asyncOptionalChainDelete:`
141
+ async function asyncOptionalChainDelete(ops) {
142
+ const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
143
+ return result == null ? true : result;
144
+ }
145
+ `},Vc=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e=``;this.helperNames.optionalChainDelete&&this.getHelperName(`optionalChain`),this.helperNames.asyncOptionalChainDelete&&this.getHelperName(`asyncOptionalChain`);for(let[t,n]of Object.entries(Bc)){let r=this.helperNames[t],i=n;t===`optionalChainDelete`?i=i.replace(`OPTIONAL_CHAIN_NAME`,this.helperNames.optionalChain):t===`asyncOptionalChainDelete`?i=i.replace(`ASYNC_OPTIONAL_CHAIN_NAME`,this.helperNames.asyncOptionalChain):t===`require`&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName(`_createRequire`)),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=` `,e+=i.replace(t,r).replace(/\s+/g,` `).trim())}return e}};function Hc(e,t,n){Uc(e,n)&&Wc(e,t,n)}function Uc(e,t){for(let n of e.tokens)if(n.type===V.name&&!n.isType&&ts(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function Wc(e,t,n){let r=[],i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;r.length>0&&r[r.length-1].startTokenIndex===a+1;)r.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)r.push(t[i]),i--;if(a<0)break;let o=e.tokens[a],s=e.identifierNameForToken(o);if(r.length>1&&!o.isType&&o.type===V.name&&n.has(s)){if(rs(o))Gc(r[r.length-1],e,s);else if(is(o)){let t=r.length-1;for(;t>0&&!r[t].isFunctionScope;)t--;if(t<0)throw Error(`Did not find parent function scope.`);Gc(r[t],e,s)}}}if(r.length>0)throw Error(`Expected empty scope stack after processing file.`)}function Gc(e,t,n){for(let r=e.startTokenIndex;r<e.endTokenIndex;r++){let e=t.tokens[r];(e.type===V.name||e.type===V.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0)}}function Kc(e,t){let n=[];for(let r of t)r.type===V.name&&n.push(e.slice(r.start,r.end));return n}var qc=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(Kc(t,n))}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}},Jc=v((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.DetailContext=e.NoopContext=e.VError=void 0;var n=function(e){t(n,e);function n(t,r){var i=e.call(this,r)||this;return i.path=t,Object.setPrototypeOf(i,n.prototype),i}return n}(Error);e.VError=n,e.NoopContext=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();var r=function(){function e(){this._propNames=[``],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new i},e.prototype.resolveUnion=function(e){for(var t,n,r=e,i=null,a=0,o=r.contexts;a<o.length;a++){var s=o[a];(!i||s._score>=i._score)&&(i=s)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(n=this._messages).push.apply(n,i._messages))},e.prototype.getError=function(e){for(var t=[],r=this._propNames.length-1;r>=0;r--){var i=this._propNames[r];e+=typeof i==`number`?`[`+i+`]`:i?`.`+i:``;var a=this._messages[r];a&&t.push(e+` `+a)}return new n(e,t.join(`; `))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+=typeof r==`number`?`[`+r+`]`:r?`.`+r:``;var i=this._messages[n];i&&t.push({path:e,message:i})}for(var a=null,n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();e.DetailContext=r;var i=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new r;return this.contexts.push(e),e},e}()})),Yc=v((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var n=Jc(),r=function(){function e(){}return e}();e.TType=r;function i(e){return typeof e==`string`?o(e):e}function a(e,t){var n=e[t];if(!n)throw Error(`Unknown type `+t);return n}function o(e){return new s(e)}e.name=o;var s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.name=t,n._failMsg=`is not a `+t,n}return n.prototype.getChecker=function(e,t,r){var i=this,o=a(e,this.name),s=o.getChecker(e,t,r);return o instanceof P||o instanceof n?s:function(e,t){return s(e,t)?!0:t.fail(null,i._failMsg,0)}},n}(r);e.TName=s;function c(e){return new l(e)}e.lit=c;var l=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg=`is not `+n.name,n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},n}(r);e.TLiteral=l;function u(e){return new d(i(e))}e.array=u;var d=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<e.length;r++)if(!n(e[r],t))return t.fail(r,null,1);return!0}},n}(r);e.TArray=d;function f(){return new p([...arguments].map(function(e){return i(e)}))}e.tuple=f;var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttypes.map(function(n){return n.getChecker(e,t)}),r=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<n.length;r++)if(!n[r](e[r],t))return t.fail(r,null,1);return!0};return t?function(e,t){return r(e,t)?e.length<=n.length||t.fail(n.length,`is extraneous`,2):!1}:r},n}(r);e.TTuple=p;function m(){return new h([...arguments].map(function(e){return i(e)}))}e.union=m;var h=function(e){t(n,e);function n(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map(function(e){return e instanceof s||e instanceof l?e.name:null}).filter(function(e){return e}),i=t.length-r.length;return r.length?(i>0&&r.push(i+` more`),n._failMsg=`is none of `+r.join(`, `)):n._failMsg=`is none of `+i+` types`,n}return n.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map(function(n){return n.getChecker(e,t)});return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++)if(r[a](e,i.createContext()))return!0;return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},n}(r);e.TUnion=h;function g(){return new _([...arguments].map(function(e){return i(e)}))}e.intersection=g;var _=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=new Set,r=this.ttypes.map(function(r){return r.getChecker(e,t,n)});return function(e,t){return r.every(function(n){return n(e,t)})?!0:t.fail(null,null,0)}},n}(r);e.TIntersection=_;function v(e){return new y(e)}e.enumtype=v;var y=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg=`is not a valid enum value`,n.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validValues.has(e)?!0:t.fail(null,n._failMsg,0)}},n}(r);e.TEnumType=y;function b(e,t){return new x(e,t)}e.enumlit=b;var x=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg=`is not `+t+`.`+n,r}return n.prototype.getChecker=function(e,t){var n=this,r=a(e,this.enumName);if(!(r instanceof y))throw Error(`Type `+this.enumName+` used in enumlit is not an enum type`);var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw Error(`Unknown value `+this.enumName+`.`+this.prop+` used in enumlit`);return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},n}(r);e.TEnumLiteral=x;function S(e){return Object.keys(e).map(function(t){return C(t,e[t])})}function C(e,t){return t instanceof D?new O(e,t.ttype,!0):new O(e,i(t),!1)}function w(e,t){return new T(e,S(t))}e.iface=w;var T=function(e){t(r,e);function r(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map(function(e){return e.name})),r}return r.prototype.getChecker=function(e,t,r){var i=this,o=this.bases.map(function(n){return a(e,n).getChecker(e,t)}),s=this.props.map(function(n){return n.ttype.getChecker(e,t)}),c=new n.NoopContext,l=this.props.map(function(e,t){return!e.isOpt&&!s[t](void 0,c)}),u=function(e,t){if(typeof e!=`object`||!e)return t.fail(null,`is not an object`,0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(var n=0;n<s.length;n++){var r=i.props[n].name,a=e[r];if(a===void 0){if(l[n])return t.fail(r,`is missing`,1)}else if(!s[n](a,t))return t.fail(r,null,1)}return!0};if(!t)return u;var d=this.propSet;return r&&(this.propSet.forEach(function(e){return r.add(e)}),d=r),function(e,t){if(!u(e,t))return!1;for(var n in e)if(!d.has(n))return t.fail(n,`is extraneous`,2);return!0}},r}(r);e.TIface=T;function E(e){return new D(i(e))}e.opt=E;var D=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return e===void 0||n(e,t)}},n}(r);e.TOptional=D;var O=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TProp=O;function k(e){return new A(new N([...arguments].slice(1)),i(e))}e.func=k;var A=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n.prototype.getChecker=function(e,t){return function(e,t){return typeof e==`function`||t.fail(null,`is not a function`,0)}},n}(r);e.TFunc=A;function j(e,t,n){return new M(e,i(t),!!n)}e.param=j;var M=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TParam=M;var N=function(e){t(r,e);function r(t){var n=e.call(this)||this;return n.params=t,n}return r.prototype.getChecker=function(e,t){var r=this,i=this.params.map(function(n){return n.ttype.getChecker(e,t)}),a=new n.NoopContext,o=this.params.map(function(e,t){return!e.isOpt&&!i[t](void 0,a)}),s=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var n=0;n<i.length;n++){var a=r.params[n];if(e[n]===void 0){if(o[n])return t.fail(a.name,`is missing`,1)}else if(!i[n](e[n],t))return t.fail(a.name,null,1)}return!0};return t?function(e,t){return s(e,t)?e.length<=i.length||t.fail(i.length,`is extraneous`,2):!1}:s},r}(r);e.TParamList=N;var P=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validator(e)?!0:t.fail(null,n.message,0)}},n}(r);e.BasicType=P,e.basicTypes={any:new P(function(e){return!0},`is invalid`),number:new P(function(e){return typeof e==`number`},`is not a number`),object:new P(function(e){return typeof e==`object`&&e},`is not an object`),boolean:new P(function(e){return typeof e==`boolean`},`is not a boolean`),string:new P(function(e){return typeof e==`string`},`is not a string`),symbol:new P(function(e){return typeof e==`symbol`},`is not a symbol`),void:new P(function(e){return e==null},`is not void`),undefined:new P(function(e){return e===void 0},`is not undefined`),null:new P(function(e){return e===null},`is not null`),never:new P(function(e){return!1},`is unexpected`),Date:new P(I(`[object Date]`),`is not a Date`),RegExp:new P(I(`[object RegExp]`),`is not a RegExp`)};var F=Object.prototype.toString;function I(e){return function(t){return typeof t==`object`&&t&&F.call(t)===e}}typeof Buffer<`u`&&(e.basicTypes.Buffer=new P(function(e){return Buffer.isBuffer(e)},`is not a Buffer`));for(var ee=function(t){e.basicTypes[t.name]=new P(function(e){return e instanceof t},`is not a `+t.name)},te=0,L=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];te<L.length;te++){var R=L[te];ee(R)}})),Xc=x(v((e=>{var t=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var n=Yc(),r=Jc(),i=Yc();Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=Jc();Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function o(){for(var e=[...arguments],r=Object.assign.apply(Object,t([{},n.basicTypes],e)),i={},a=0,o=e;a<o.length;a++)for(var c=o[a],l=0,u=Object.keys(c);l<u.length;l++){var d=u[l];i[d]=new s(r,c[d])}return i}e.createCheckers=o;var s=function(){function e(e,t,r){if(r===void 0&&(r=`value`),this.suite=e,this.ttype=t,this._path=r,this.props=new Map,t instanceof n.TIface)for(var i=0,a=t.props;i<a.length;i++){var o=a[i];this.props.set(o.name,o.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new r.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new r.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw Error(`Type has no property `+t);return new e(this.suite,n,this._path+`.`+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getArgs() applied to non-function`);return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getResult() applied to non-function`);return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new r.NoopContext)){var n=new r.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new r.NoopContext))return null;var n=new r.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw Error(`Type has no property `+e);if(!(t instanceof n.TFunc))throw Error(`Property `+e+` is not a method`);return t},e}();e.Checker=s}))()),Zc={Transform:Xc.union(Xc.lit(`jsx`),Xc.lit(`typescript`),Xc.lit(`flow`),Xc.lit(`imports`),Xc.lit(`react-hot-loader`),Xc.lit(`jest`)),SourceMapOptions:Xc.iface([],{compiledFilename:`string`}),Options:Xc.iface([],{transforms:Xc.array(`Transform`),disableESTransforms:Xc.opt(`boolean`),jsxRuntime:Xc.opt(Xc.union(Xc.lit(`classic`),Xc.lit(`automatic`),Xc.lit(`preserve`))),production:Xc.opt(`boolean`),jsxImportSource:Xc.opt(`string`),jsxPragma:Xc.opt(`string`),jsxFragmentPragma:Xc.opt(`string`),keepUnusedImports:Xc.opt(`boolean`),preserveDynamicImport:Xc.opt(`boolean`),injectCreateRequireForImportRequire:Xc.opt(`boolean`),enableLegacyTypeScriptModuleInterop:Xc.opt(`boolean`),enableLegacyBabel5ModuleInterop:Xc.opt(`boolean`),sourceMapOptions:Xc.opt(`SourceMapOptions`),filePath:Xc.opt(`string`)})},{Options:Qc}=(0,Xc.createCheckers)(Zc);function $c(e){Qc.strictCheck(e)}function el(){Y(),vd(!1)}function tl(e){Y(),al(e)}function nl(e){$(),il(e)}function rl(){$(),U.tokens[U.tokens.length-1].identifierRole=J.ImportDeclaration}function il(e){let t;t=U.scopeDepth===0?J.TopLevelDeclaration:e?J.BlockScopedDeclaration:J.FunctionScopedDeclaration,U.tokens[U.tokens.length-1].identifierRole=t}function al(e){switch(U.type){case V._this:{let e=ls(0);Y(),X(e);return}case V._yield:case V.name:U.type=V.name,nl(e);return;case V.bracketL:Y(),ol(V.bracketR,e,!0);return;case V.braceL:Jd(!0,e);return;default:q()}}function ol(e,t,n=!1,r=!1,i=0){let a=!0,o=!1,s=U.tokens.length;for(;!Z(e)&&!U.error;)if(a?a=!1:(K(V.comma),U.tokens[U.tokens.length-1].contextId=i,!o&&U.tokens[s].isType&&(U.tokens[U.tokens.length-1].isType=!0,o=!0)),!(n&&Q(V.comma))){if(Z(e))break;if(Q(V.ellipsis)){tl(t),cl(),Z(V.comma),K(e);break}sl(r,t)}}function sl(e,t){e&&pl([B._public,B._protected,B._private,B._readonly,B._override]),ll(t),cl(),ll(t,!0)}function cl(){Ao?_p():ko&&Qu()}function ll(e,t=!1){if(t||al(e),!Z(V.eq))return;let n=U.tokens.length-1;vd(),U.tokens[n].rhsEndIndex=U.tokens.length}function ul(){return Q(V.name)}function dl(){return Q(V.name)||!!(U.type&V.IS_KEYWORD)||Q(V.string)||Q(V.num)||Q(V.bigint)||Q(V.decimal)}function fl(){let e=U.snapshot();return Y(),(Q(V.bracketL)||Q(V.braceL)||Q(V.star)||Q(V.ellipsis)||Q(V.hash)||dl())&&!Vo()?!0:(U.restoreFromSnapshot(e),!1)}function pl(e){for(;ml(e)!==null;);}function ml(e){if(!Q(V.name))return null;let t=U.contextualKeyword;if(e.indexOf(t)!==-1&&fl()){switch(t){case B._readonly:U.tokens[U.tokens.length-1].type=V._readonly;break;case B._abstract:U.tokens[U.tokens.length-1].type=V._abstract;break;case B._static:U.tokens[U.tokens.length-1].type=V._static;break;case B._public:U.tokens[U.tokens.length-1].type=V._public;break;case B._private:U.tokens[U.tokens.length-1].type=V._private;break;case B._protected:U.tokens[U.tokens.length-1].type=V._protected;break;case B._override:U.tokens[U.tokens.length-1].type=V._override;break;case B._declare:U.tokens[U.tokens.length-1].type=V._declare}return t}return null}function hl(){for($();Z(V.dot);)$()}function gl(){hl(),!Vo()&&Q(V.lessThan)&&ju()}function _l(){Y(),au()}function vl(){Y()}function yl(){K(V._typeof),Q(V._import)?bl():hl(),!Vo()&&Q(V.lessThan)&&ju()}function bl(){K(V._import),K(V.parenL),K(V.string),K(V.parenR),Z(V.dot)&&hl(),Q(V.lessThan)&&ju()}function xl(){Z(V._const);let e=Z(V._in),t=Ro(B._out);Z(V._const),(e||t)&&!Q(V.name)?U.tokens[U.tokens.length-1].type=V.name:$(),Z(V._extends)&&ou(),Z(V.eq)&&ou()}function Sl(){Q(V.lessThan)&&Cl()}function Cl(){let e=ls(0);for(Q(V.lessThan)||Q(V.typeParameterStart)?Y():q();!Z(V.greaterThan)&&!U.error;)xl(),Z(V.comma);X(e)}function wl(e){let t=e===V.arrow;Sl(),K(V.parenL),U.scopeDepth++,Tl(!1),U.scopeDepth--,(t||Q(e))&&eu(e)}function Tl(e){ol(V.parenR,e)}function El(){Z(V.comma)||Wo()}function Dl(){wl(V.colon),El()}function Ol(){let e=U.snapshot();Y();let t=Z(V.name)&&Q(V.colon);return U.restoreFromSnapshot(e),t}function kl(){if(!(Q(V.bracketL)&&Ol()))return!1;let e=ls(0);return K(V.bracketL),$(),au(),K(V.bracketR),nu(),El(),X(e),!0}function Al(e){Z(V.question),!e&&(Q(V.parenL)||Q(V.lessThan))?(wl(V.colon),El()):(nu(),El())}function jl(){if(Q(V.parenL)||Q(V.lessThan)){Dl();return}if(Q(V._new)){Y(),Q(V.parenL)||Q(V.lessThan)?Dl():Al(!1);return}let e=!!ml([B._readonly]);kl()||((G(B._get)||G(B._set))&&fl(),$d(-1),Al(e))}function Ml(){Nl()}function Nl(){for(K(V.braceL);!Z(V.braceR)&&!U.error;)jl()}function Pl(){let e=U.snapshot(),t=Fl();return U.restoreFromSnapshot(e),t}function Fl(){return Y(),Z(V.plus)||Z(V.minus)?G(B._readonly):(G(B._readonly)&&Y(),!Q(V.bracketL)||(Y(),!ul())?!1:(Y(),Q(V._in)))}function Il(){$(),K(V._in),ou()}function Ll(){K(V.braceL),Q(V.plus)||Q(V.minus)?(Y(),zo(B._readonly)):Ro(B._readonly),K(V.bracketL),Il(),Ro(B._as)&&ou(),K(V.bracketR),Q(V.plus)||Q(V.minus)?(Y(),K(V.question)):Z(V.question),ru(),Wo(),K(V.braceR)}function Rl(){for(K(V.bracketL);!Z(V.bracketR)&&!U.error;)zl(),Z(V.comma)}function zl(){Z(V.ellipsis)?ou():(ou(),Z(V.question)),Z(V.colon)&&ou()}function Bl(){K(V.parenL),ou(),K(V.parenR)}function Vl(){for(ss(),ss();!Q(V.backQuote)&&!U.error;)K(V.dollarBraceL),ou(),ss(),ss();Y()}var Hl;(function(e){e[e.TSFunctionType=0]=`TSFunctionType`,e[e.TSConstructorType=1]=`TSConstructorType`,e[e.TSAbstractConstructorType=2]=`TSAbstractConstructorType`})(Hl||={});function Ul(e){e===Hl.TSAbstractConstructorType&&zo(B._abstract),(e===Hl.TSConstructorType||e===Hl.TSAbstractConstructorType)&&K(V._new);let t=U.inDisallowConditionalTypesContext;U.inDisallowConditionalTypesContext=!1,wl(V.arrow),U.inDisallowConditionalTypesContext=t}function Wl(){switch(U.type){case V.name:gl();return;case V._void:case V._null:Y();return;case V.string:case V.num:case V.bigint:case V.decimal:case V._true:case V._false:zd();return;case V.minus:Y(),zd();return;case V._this:vl(),G(B._is)&&!Vo()&&_l();return;case V._typeof:yl();return;case V._import:bl();return;case V.braceL:Pl()?Ll():Ml();return;case V.bracketL:Rl();return;case V.parenL:Bl();return;case V.backQuote:Vl();return;default:if(U.type&V.IS_KEYWORD){Y(),U.tokens[U.tokens.length-1].type=V.name;return}}q()}function Gl(){for(Wl();!Vo()&&Z(V.bracketL);)Z(V.bracketR)||(ou(),K(V.bracketR))}function Kl(){if(zo(B._infer),$(),Q(V._extends)){let e=U.snapshot();K(V._extends);let t=U.inDisallowConditionalTypesContext;U.inDisallowConditionalTypesContext=!0,ou(),U.inDisallowConditionalTypesContext=t,(U.error||!U.inDisallowConditionalTypesContext&&Q(V.question))&&U.restoreFromSnapshot(e)}}function ql(){if(G(B._keyof)||G(B._unique)||G(B._readonly))Y(),ql();else if(G(B._infer))Kl();else{let e=U.inDisallowConditionalTypesContext;U.inDisallowConditionalTypesContext=!1,Gl(),U.inDisallowConditionalTypesContext=e}}function Jl(){if(Z(V.bitwiseAND),ql(),Q(V.bitwiseAND))for(;Z(V.bitwiseAND);)ql()}function Yl(){if(Z(V.bitwiseOR),Jl(),Q(V.bitwiseOR))for(;Z(V.bitwiseOR);)Jl()}function Xl(){return Q(V.lessThan)?!0:Q(V.parenL)&&Ql()}function Zl(){if(Q(V.name)||Q(V._this))return Y(),!0;if(Q(V.braceL)||Q(V.bracketL)){let e=1;for(Y();e>0&&!U.error;)Q(V.braceL)||Q(V.bracketL)?e++:(Q(V.braceR)||Q(V.bracketR))&&e--,Y();return!0}return!1}function Ql(){let e=U.snapshot(),t=$l();return U.restoreFromSnapshot(e),t}function $l(){return Y(),!!(Q(V.parenR)||Q(V.ellipsis)||Zl()&&(Q(V.colon)||Q(V.comma)||Q(V.question)||Q(V.eq)||Q(V.parenR)&&(Y(),Q(V.arrow))))}function eu(e){let t=ls(0);K(e),iu()||ou(),X(t)}function tu(){Q(V.colon)&&eu(V.colon)}function nu(){Q(V.colon)&&au()}function ru(){Z(V.colon)&&ou()}function iu(){let e=U.snapshot();return G(B._asserts)?(Y(),Ro(B._is)?(ou(),!0):ul()||Q(V._this)?(Y(),Ro(B._is)&&ou(),!0):(U.restoreFromSnapshot(e),!1)):ul()||Q(V._this)?(Y(),G(B._is)&&!Vo()?(Y(),ou(),!0):(U.restoreFromSnapshot(e),!1)):!1}function au(){let e=ls(0);K(V.colon),ou(),X(e)}function ou(){if(cu(),U.inDisallowConditionalTypesContext||Vo()||!Z(V._extends))return;let e=U.inDisallowConditionalTypesContext;U.inDisallowConditionalTypesContext=!0,cu(),U.inDisallowConditionalTypesContext=e,K(V.question),ou(),K(V.colon),ou()}function su(){return G(B._abstract)&&ds()===V._new}function cu(){Xl()?Ul(Hl.TSFunctionType):Q(V._new)?Ul(Hl.TSConstructorType):su()?Ul(Hl.TSAbstractConstructorType):Yl()}function lu(){let e=ls(1);ou(),K(V.greaterThan),X(e),Td()}function uu(){if(Z(V.jsxTagStart)){U.tokens[U.tokens.length-1].type=V.typeParameterStart;let e=ls(1);for(;!Q(V.greaterThan)&&!U.error;)ou(),Z(V.comma);fd(),X(e)}}function du(){for(;!Q(V.braceL)&&!U.error;)fu(),Z(V.comma)}function fu(){hl(),Q(V.lessThan)&&ju()}function pu(){nl(!1),Sl(),Z(V._extends)&&du(),Nl()}function mu(){nl(!1),Sl(),K(V.eq),ou(),Wo()}function hu(){if(Q(V.string)?zd():$(),Z(V.eq)){let e=U.tokens.length-1;vd(),U.tokens[e].rhsEndIndex=U.tokens.length}}function gu(){for(nl(!1),K(V.braceL);!Z(V.braceR)&&!U.error;)hu(),Z(V.comma)}function _u(){K(V.braceL),im(V.braceR)}function vu(){nl(!1),Z(V.dot)?vu():_u()}function yu(){G(B._global)?$():Q(V.string)?Id():q(),Q(V.braceL)?_u():Wo()}function bu(){rl(),K(V.eq),Su(),Wo()}function xu(){return G(B._require)&&ds()===V.parenL}function Su(){xu()?Cu():hl()}function Cu(){zo(B._require),K(V.parenL),Q(V.string)||q(),zd(),K(V.parenR)}function wu(){if(Uo())return!1;switch(U.type){case V._function:{let e=ls(1);Y();let t=U.start;return lm(t,!0),X(e),!0}case V._class:{let e=ls(1);return dm(!0,!1),X(e),!0}case V._const:if(Q(V._const)&&Lo(B._enum)){let e=ls(1);return K(V._const),zo(B._enum),U.tokens[U.tokens.length-1].type=V._enum,gu(),X(e),!0}case V._var:case V._let:{let e=ls(1);return Qp(U.type!==V._var),X(e),!0}case V.name:{let e=ls(1),t=U.contextualKeyword,n=!1;return t===B._global?(yu(),n=!0):n=Du(t,!0),X(e),n}default:return!1}}function Tu(){return Du(U.contextualKeyword,!0)}function Eu(e){switch(e){case B._declare:{let e=U.tokens.length-1;if(wu())return U.tokens[e].type=V._declare,!0;break}case B._global:if(Q(V.braceL))return _u(),!0;break;default:return Du(e,!1)}return!1}function Du(e,t){switch(e){case B._abstract:if(Ou(t)&&Q(V._class))return U.tokens[U.tokens.length-1].type=V._abstract,dm(!0,!1),!0;break;case B._enum:if(Ou(t)&&Q(V.name))return U.tokens[U.tokens.length-1].type=V._enum,gu(),!0;break;case B._interface:if(Ou(t)&&Q(V.name)){let e=ls(t?2:1);return pu(),X(e),!0}break;case B._module:if(Ou(t)){if(Q(V.string)){let e=ls(t?2:1);return yu(),X(e),!0}if(Q(V.name)){let e=ls(t?2:1);return vu(),X(e),!0}}break;case B._namespace:if(Ou(t)&&Q(V.name)){let e=ls(t?2:1);return vu(),X(e),!0}break;case B._type:if(Ou(t)&&Q(V.name)){let e=ls(t?2:1);return mu(),X(e),!0}}return!1}function Ou(e){return e?(Y(),!0):!Uo()}function ku(){let e=U.snapshot();return Cl(),um(),tu(),K(V.arrow),U.error?(U.restoreFromSnapshot(e),!1):(rf(!0),!0)}function Au(){U.type===V.bitShiftL&&(--U.pos,Ss(V.lessThan)),ju()}function ju(){let e=ls(0);for(K(V.lessThan);!Q(V.greaterThan)&&!U.error;)ou(),Z(V.comma);e?(K(V.greaterThan),X(e)):(X(e),js(),K(V.greaterThan),U.tokens[U.tokens.length-1].isType=!0)}function Mu(){if(Q(V.name))switch(U.contextualKeyword){case B._abstract:case B._declare:case B._enum:case B._interface:case B._module:case B._namespace:case B._type:return!0}return!1}function Nu(e,t){if(Q(V.colon)&&eu(V.colon),!Q(V.braceL)&&Uo()){let t=U.tokens.length-1;for(;t>=0&&(U.tokens[t].start>=e||U.tokens[t].type===V._default||U.tokens[t].type===V._export);)U.tokens[t].isType=!0,t--}else rf(!1,t)}function Pu(e,t,n){if(!Vo()&&Z(V.bang))U.tokens[U.tokens.length-1].type=V.nonNullAssertion;else{if(Q(V.lessThan)||Q(V.bitShiftL)){let n=U.snapshot();if(!t&&jd()&&ku())return;if(Au(),!t&&Z(V.parenL)?(U.tokens[U.tokens.length-1].subscriptStartIndex=e,Md()):Q(V.backQuote)?qd():(U.type===V.greaterThan||U.type!==V.parenL&&U.type&V.IS_EXPRESSION_START&&!Vo())&&q(),U.error)U.restoreFromSnapshot(n);else return}else!t&&Q(V.questionDot)&&ds()===V.lessThan&&(Y(),U.tokens[e].isOptionalChainStart=!0,U.tokens[U.tokens.length-1].subscriptStartIndex=e,ju(),K(V.parenL),Md());Ad(e,t,n)}}function Fu(){if(Z(V._import))return G(B._type)&&ds()!==V.eq&&zo(B._type),bu(),!0;if(Z(V.eq))return _d(),Wo(),!0;if(Ro(B._as))return zo(B._namespace),$(),Wo(),!0;if(G(B._type)){let e=ds();(e===V.braceL||e===V.star)&&Y()}return!1}function Iu(){$(),Q(V.comma)||Q(V.braceR)?U.tokens[U.tokens.length-1].identifierRole=J.ImportDeclaration:($(),Q(V.comma)||Q(V.braceR)?(U.tokens[U.tokens.length-1].identifierRole=J.ImportDeclaration,U.tokens[U.tokens.length-2].isType=!0,U.tokens[U.tokens.length-1].isType=!0):($(),Q(V.comma)||Q(V.braceR)?(U.tokens[U.tokens.length-3].identifierRole=J.ImportAccess,U.tokens[U.tokens.length-1].identifierRole=J.ImportDeclaration):($(),U.tokens[U.tokens.length-3].identifierRole=J.ImportAccess,U.tokens[U.tokens.length-1].identifierRole=J.ImportDeclaration,U.tokens[U.tokens.length-4].isType=!0,U.tokens[U.tokens.length-3].isType=!0,U.tokens[U.tokens.length-2].isType=!0,U.tokens[U.tokens.length-1].isType=!0)))}function Lu(){$(),Q(V.comma)||Q(V.braceR)?U.tokens[U.tokens.length-1].identifierRole=J.ExportAccess:($(),Q(V.comma)||Q(V.braceR)?(U.tokens[U.tokens.length-1].identifierRole=J.ExportAccess,U.tokens[U.tokens.length-2].isType=!0,U.tokens[U.tokens.length-1].isType=!0):($(),Q(V.comma)||Q(V.braceR)?U.tokens[U.tokens.length-3].identifierRole=J.ExportAccess:($(),U.tokens[U.tokens.length-3].identifierRole=J.ExportAccess,U.tokens[U.tokens.length-4].isType=!0,U.tokens[U.tokens.length-3].isType=!0,U.tokens[U.tokens.length-2].isType=!0,U.tokens[U.tokens.length-1].isType=!0)))}function Ru(){if(G(B._abstract)&&ds()===V._class)return U.type=V._abstract,Y(),dm(!0,!0),!0;if(G(B._interface)){let e=ls(2);return Du(B._interface,!0),X(e),!0}return!1}function zu(){if(U.type===V._const){let e=ps();if(e.type===V.name&&e.contextualKeyword===B._enum)return K(V._const),zo(B._enum),U.tokens[U.tokens.length-1].type=V._enum,gu(),!0}return!1}function Bu(e){let t=U.tokens.length;pl([B._abstract,B._readonly,B._declare,B._static,B._override]);let n=U.tokens.length;if(kl()){let r=e?t-1:t;for(let e=r;e<n;e++)U.tokens[e].isType=!0;return!0}return!1}function Vu(e){Eu(e)||Wo()}function Hu(){let e=Ro(B._declare);e&&(U.tokens[U.tokens.length-1].type=V._declare);let t=!1;if(Q(V.name)){if(e){let e=ls(2);t=Tu(),X(e)}else t=Tu()}if(!t){if(e){let e=ls(2);Mp(!0),X(e)}else Mp(!0)}}function Uu(e){if(e&&(Q(V.lessThan)||Q(V.bitShiftL))&&Au(),Ro(B._implements)){U.tokens[U.tokens.length-1].type=V._implements;let e=ls(1);du(),X(e)}}function Wu(){Sl()}function Gu(){Sl()}function Ku(){let e=ls(0);Vo()||Z(V.bang),nu(),X(e)}function qu(){Q(V.colon)&&au()}function Ju(e,t){return Oo?Yu(e,t):Xu(e,t)}function Yu(e,t){if(!Q(V.lessThan))return yd(e,t);let n=U.snapshot(),r=yd(e,t);if(U.error)U.restoreFromSnapshot(n);else return r;return U.type=V.typeParameterStart,Cl(),r=yd(e,t),r||q(),r}function Xu(e,t){if(!Q(V.lessThan))return yd(e,t);let n=U.snapshot();Cl();let r=yd(e,t);if(r||q(),U.error)U.restoreFromSnapshot(n);else return r;return yd(e,t)}function Zu(){if(Q(V.colon)){let e=U.snapshot();eu(V.colon),Bo()&&q(),Q(V.arrow)||q(),U.error&&U.restoreFromSnapshot(e)}return Z(V.arrow)}function Qu(){let e=ls(0);Z(V.question),nu(),X(e)}function $u(){(Q(V.lessThan)||Q(V.bitShiftL))&&Au(),Rp()}function ed(){let e=!1,t=!1;for(;;){if(U.pos>=W.length){q(`Unterminated JSX contents`);return}let n=W.charCodeAt(U.pos);if(n===H.lessThan||n===H.leftCurlyBrace){if(U.pos===U.start){if(n===H.lessThan){U.pos++,Ss(V.jsxTagStart);return}Ps(n);return}Ss(e&&!t?V.jsxEmptyText:V.jsxText);return}n===H.lineFeed?e=!0:n!==H.space&&n!==H.carriageReturn&&n!==H.tab&&(t=!0),U.pos++}}function td(e){for(U.pos++;;){if(U.pos>=W.length){q(`Unterminated string constant`);return}if(W.charCodeAt(U.pos)===e){U.pos++;break}U.pos++}Ss(V.string)}function nd(){let e;do{if(U.pos>W.length){q(`Unexpectedly reached the end of input.`);return}e=W.charCodeAt(++U.pos)}while(Yo[e]||e===H.dash);Ss(V.jsxName)}function rd(){fd()}function id(e){rd(),Z(V.colon)?rd():U.tokens[U.tokens.length-1].identifierRole=e}function ad(){let e=U.tokens.length;id(J.Access);let t=!1;for(;Q(V.dot);)t=!0,fd(),rd();if(!t){let t=U.tokens[e],n=W.charCodeAt(t.start);n>=H.lowercaseA&&n<=H.lowercaseZ&&(t.identifierRole=null)}}function od(){switch(U.type){case V.braceL:Y(),_d(),fd();return;case V.jsxTagStart:dd(),fd();return;case V.string:fd();return;default:q(`JSX value should be either an expression or a quoted JSX text`)}}function sd(){K(V.ellipsis),_d()}function cd(e){if(Q(V.jsxTagEnd))return!1;ad(),ko&&uu();let t=!1;for(;!Q(V.slash)&&!Q(V.jsxTagEnd)&&!U.error;)Z(V.braceL)?(t=!0,K(V.ellipsis),vd(),fd()):(t&&U.end-U.start===3&&W.charCodeAt(U.start)===H.lowercaseK&&W.charCodeAt(U.start+1)===H.lowercaseE&&W.charCodeAt(U.start+2)===H.lowercaseY&&(U.tokens[e].jsxRole=$o.KeyAfterPropSpread),id(J.ObjectKey),Q(V.eq)&&(fd(),od()));let n=Q(V.slash);return n&&fd(),n}function ld(){Q(V.jsxTagEnd)||ad()}function ud(){let e=U.tokens.length-1;U.tokens[e].jsxRole=$o.NoChildren;let t=0;if(!cd(e))for(pd();;)switch(U.type){case V.jsxTagStart:if(fd(),Q(V.slash)){fd(),ld(),U.tokens[e].jsxRole!==$o.KeyAfterPropSpread&&(t===1?U.tokens[e].jsxRole=$o.OneChild:t>1&&(U.tokens[e].jsxRole=$o.StaticChildren));return}t++,ud(),pd();break;case V.jsxText:t++,pd();break;case V.jsxEmptyText:pd();break;case V.braceL:Y(),Q(V.ellipsis)?(sd(),pd(),t+=2):(Q(V.braceR)||(t++,_d()),pd());break;default:q();return}}function dd(){fd(),ud()}function fd(){U.tokens.push(new os),xs(),U.start=U.pos;let e=W.charCodeAt(U.pos);if(Xo[e])nd();else if(e===H.quotationMark||e===H.apostrophe)td(e);else switch(++U.pos,e){case H.greaterThan:Ss(V.jsxTagEnd);break;case H.lessThan:Ss(V.jsxTagStart);break;case H.slash:Ss(V.slash);break;case H.equalsTo:Ss(V.eq);break;case H.leftCurlyBrace:Ss(V.braceL);break;case H.dot:Ss(V.dot);break;case H.colon:Ss(V.colon);break;default:q()}}function pd(){U.tokens.push(new os),U.start=U.pos,ed()}function md(e){if(Q(V.question)){let e=ds();if(e===V.colon||e===V.comma||e===V.parenR)return}Sd(e)}function hd(){us(V.question),Q(V.colon)&&(ko?au():Ao&&tp())}var gd=class{constructor(e){this.stop=e}};function _d(e=!1){if(vd(e),Q(V.comma))for(;Z(V.comma);)vd(e)}function vd(e=!1,t=!1){return ko?Ju(e,t):Ao?Cp(e,t):yd(e,t)}function yd(e,t){if(Q(V._yield))return cf(),!1;(Q(V.parenL)||Q(V.name)||Q(V._yield))&&(U.potentialArrowAt=U.start);let n=bd(e);return t&&Wd(),U.type&V.IS_ASSIGN?(Y(),vd(e),!1):n}function bd(e){return Cd(e)?!0:(xd(e),!1)}function xd(e){ko||Ao?md(e):Sd(e)}function Sd(e){Z(V.question)&&(vd(),K(V.colon),vd(e))}function Cd(e){let t=U.tokens.length;return Td()?!0:(wd(t,-1,e),!1)}function wd(e,t,n){if(ko&&(V._in&V.PRECEDENCE_MASK)>t&&!Vo()&&(Ro(B._as)||Ro(B._satisfies))){let r=ls(1);ou(),X(r),js(),wd(e,t,n);return}let r=U.type&V.PRECEDENCE_MASK;if(r>0&&(!n||!Q(V._in))&&r>t){let i=U.type;Y(),i===V.nullishCoalescing&&(U.tokens[U.tokens.length-1].nullishStartIndex=e);let a=U.tokens.length;Td(),wd(a,i&V.IS_RIGHT_ASSOCIATIVE?r-1:r,n),i===V.nullishCoalescing&&(U.tokens[e].numNullishCoalesceStarts++,U.tokens[U.tokens.length-1].numNullishCoalesceEnds++),wd(e,t,n)}}function Td(){if(ko&&!Oo&&Z(V.lessThan))return lu(),!1;if(G(B._module)&&gs()===H.leftCurlyBrace&&!Ho())return lf(),!1;if(U.type&V.IS_PREFIX)return Y(),Td(),!1;if(Ed())return!0;for(;U.type&V.IS_POSTFIX&&!Bo();)U.type===V.preIncDec&&(U.type=V.postIncDec),Y();return!1}function Ed(){let e=U.tokens.length;return Id()?!0:(Dd(e),U.tokens.length>e&&U.tokens[e].isOptionalChainStart&&(U.tokens[U.tokens.length-1].isOptionalChainEnd=!0),!1)}function Dd(e,t=!1){Ao?Tp(e,t):Od(e,t)}function Od(e,t=!1){let n=new gd(!1);do kd(e,t,n);while(!n.stop&&!U.error)}function kd(e,t,n){ko?Pu(e,t,n):Ao?ap(e,t,n):Ad(e,t,n)}function Ad(e,t,n){if(!t&&Z(V.doubleColon))Fd(),n.stop=!0,Dd(e,t);else if(Q(V.questionDot)){if(U.tokens[e].isOptionalChainStart=!0,t&&ds()===V.parenL){n.stop=!0;return}Y(),U.tokens[U.tokens.length-1].subscriptStartIndex=e,Z(V.bracketL)?(_d(),K(V.bracketR)):Z(V.parenL)?Md():Ld()}else if(Z(V.dot))U.tokens[U.tokens.length-1].subscriptStartIndex=e,Ld();else if(Z(V.bracketL))U.tokens[U.tokens.length-1].subscriptStartIndex=e,_d(),K(V.bracketR);else if(!t&&Q(V.parenL)){if(jd()){let t=U.snapshot(),r=U.tokens.length;Y(),U.tokens[U.tokens.length-1].subscriptStartIndex=e;let i=Mo();U.tokens[U.tokens.length-1].contextId=i,Md(),U.tokens[U.tokens.length-1].contextId=i,Nd()&&(U.restoreFromSnapshot(t),n.stop=!0,U.scopeDepth++,um(),Pd(r))}else{Y(),U.tokens[U.tokens.length-1].subscriptStartIndex=e;let t=Mo();U.tokens[U.tokens.length-1].contextId=t,Md(),U.tokens[U.tokens.length-1].contextId=t}}else Q(V.backQuote)?qd():n.stop=!0}function jd(){return U.tokens[U.tokens.length-1].contextualKeyword===B._async&&!Bo()}function Md(){let e=!0;for(;!Z(V.parenR)&&!U.error;){if(e)e=!1;else if(K(V.comma),Z(V.parenR))break;of(!1)}}function Nd(){return Q(V.colon)||Q(V.arrow)}function Pd(e){ko?qu():Ao&&Sp(),K(V.arrow),tf(e)}function Fd(){let e=U.tokens.length;Id(),Dd(e,!0)}function Id(){if(Z(V.modulo))return $(),!1;if(Q(V.jsxText)||Q(V.jsxEmptyText))return zd(),!1;if(Q(V.lessThan)&&Oo)return U.type=V.jsxTagStart,dd(),Y(),!1;let e=U.potentialArrowAt===U.start;switch(U.type){case V.slash:case V.assign:cs();case V._super:case V._this:case V.regexp:case V.num:case V.bigint:case V.decimal:case V.string:case V._null:case V._true:case V._false:return Y(),!1;case V._import:return Y(),Q(V.dot)&&(U.tokens[U.tokens.length-1].type=V.name,Y(),$()),!1;case V.name:{let t=U.tokens.length,n=U.start,r=U.contextualKeyword;return $(),r===B._await?(sf(),!1):r===B._async&&Q(V._function)&&!Bo()?(Y(),lm(n,!1),!1):e&&r===B._async&&!Bo()&&Q(V.name)?(U.scopeDepth++,nl(!1),K(V.arrow),tf(t),!0):Q(V._do)&&!Bo()?(Y(),rm(),!1):e&&!Bo()&&Q(V.arrow)?(U.scopeDepth++,il(!1),K(V.arrow),tf(t),!0):(U.tokens[U.tokens.length-1].identifierRole=J.Access,!1)}case V._do:return Y(),rm(),!1;case V.parenL:return Vd(e);case V.bracketL:return Y(),af(V.bracketR,!0),!1;case V.braceL:return Jd(!1,!1),!1;case V._function:return Rd(),!1;case V.at:Fp();case V._class:return dm(!1),!1;case V._new:return Gd(),!1;case V.backQuote:return qd(),!1;case V.doubleColon:return Y(),Fd(),!1;case V.hash:{let e=gs();return Xo[e]||e===H.backslash?Ld():Y(),!1}default:return q(),!1}}function Ld(){Z(V.hash),$()}function Rd(){let e=U.start;$(),Z(V.dot)&&$(),lm(e,!1)}function zd(){Y()}function Bd(){K(V.parenL),_d(),K(V.parenR)}function Vd(e){let t=U.snapshot(),n=U.tokens.length;K(V.parenL);let r=!0;for(;!Q(V.parenR)&&!U.error;){if(r)r=!1;else if(K(V.comma),Q(V.parenR))break;if(Q(V.ellipsis)){tl(!1),Wd();break}vd(!1,!0)}return K(V.parenR),e&&Hd()&&Ud()?(U.restoreFromSnapshot(t),U.scopeDepth++,um(),Ud(),tf(n),!U.error||(U.restoreFromSnapshot(t),Vd(!1),!1)):!1}function Hd(){return Q(V.colon)||!Bo()}function Ud(){return ko?Zu():Ao?wp():Z(V.arrow)}function Wd(){(ko||Ao)&&hd()}function Gd(){K(V._new),Z(V.dot)?$():(Kd(),Ao&&op(),Z(V.parenL)&&af(V.parenR))}function Kd(){Fd(),Z(V.questionDot)}function qd(){for(ss(),ss();!Q(V.backQuote)&&!U.error;)K(V.dollarBraceL),_d(),ss(),ss();Y()}function Jd(e,t){let n=Mo(),r=!0;for(Y(),U.tokens[U.tokens.length-1].contextId=n;!Z(V.braceR)&&!U.error;){if(r)r=!1;else if(K(V.comma),Z(V.braceR))break;let i=!1;if(Q(V.ellipsis)){let n=U.tokens.length;if(el(),e&&(U.tokens.length===n+2&&il(t),Z(V.braceR)))break}else e||(i=Z(V.star)),!e&&G(B._async)?(i&&q(),$(),Q(V.colon)||Q(V.parenL)||Q(V.braceR)||Q(V.eq)||Q(V.comma)||(Q(V.star)&&(Y(),i=!0),$d(n))):$d(n),Qd(e,t,n)}U.tokens[U.tokens.length-1].contextId=n}function Yd(e){return!e&&(Q(V.string)||Q(V.num)||Q(V.bracketL)||Q(V.name)||!!(U.type&V.IS_KEYWORD))}function Xd(e,t){let n=U.start;return Q(V.parenL)?(e&&q(),ef(n,!1),!0):Yd(e)?($d(t),ef(n,!1),!0):!1}function Zd(e,t){if(Z(V.colon)){e?ll(t):vd(!1);return}let n;n=e?U.scopeDepth===0?J.ObjectShorthandTopLevelDeclaration:t?J.ObjectShorthandBlockScopedDeclaration:J.ObjectShorthandFunctionScopedDeclaration:J.ObjectShorthand,U.tokens[U.tokens.length-1].identifierRole=n,ll(t,!0)}function Qd(e,t,n){ko?Wu():Ao&&gp(),Xd(e,n)||Zd(e,t)}function $d(e){Ao&&rp(),Z(V.bracketL)?(U.tokens[U.tokens.length-1].contextId=e,vd(),K(V.bracketR),U.tokens[U.tokens.length-1].contextId=e):(Q(V.num)||Q(V.string)||Q(V.bigint)||Q(V.decimal)?Id():Ld(),U.tokens[U.tokens.length-1].identifierRole=J.ObjectKey,U.tokens[U.tokens.length-1].contextId=e)}function ef(e,t){let n=Mo();U.scopeDepth++;let r=U.tokens.length;um(t,n),nf(e,n);let i=U.tokens.length;U.scopes.push(new To(r,i,!0)),U.scopeDepth--}function tf(e){rf(!0);let t=U.tokens.length;U.scopes.push(new To(e,t,!0)),U.scopeDepth--}function nf(e,t=0){ko?Nu(e,t):Ao?ip(t):rf(!1,t)}function rf(e,t=0){e&&!Q(V.braceL)?vd():rm(!0,t)}function af(e,t=!1){let n=!0;for(;!Z(e)&&!U.error;){if(n)n=!1;else if(K(V.comma),Z(e))break;of(t)}}function of(e){e&&Q(V.comma)||(Q(V.ellipsis)?(el(),Wd()):Q(V.question)?Y():vd(!1,!0))}function $(){Y(),U.tokens[U.tokens.length-1].type=V.name}function sf(){Td()}function cf(){Y(),!Q(V.semi)&&!Bo()&&(Z(V.star),vd())}function lf(){zo(B._module),K(V.braceL),im(V.braceR)}function uf(e){return(e.type===V.name||!!(e.type&V.IS_KEYWORD))&&e.contextualKeyword!==B._from}function df(e){let t=ls(0);K(e||V.colon),ep(),X(t)}function ff(){K(V.modulo),zo(B._checks),Z(V.parenL)&&(_d(),K(V.parenR))}function pf(){let e=ls(0);K(V.colon),Q(V.modulo)?ff():(ep(),Q(V.modulo)&&ff()),X(e)}function mf(){Y(),wf(!0)}function hf(){Y(),$(),Q(V.lessThan)&&jf(),K(V.parenL),qf(),K(V.parenR),pf(),Wo()}function gf(){Q(V._class)?mf():Q(V._function)?hf():Q(V._var)?_f():Ro(B._module)?Z(V.dot)?bf():vf():G(B._type)?xf():G(B._opaque)?Sf():G(B._interface)?Cf():Q(V._export)?yf():q()}function _f(){Y(),np(),Wo()}function vf(){for(Q(V.string)?Id():$(),K(V.braceL);!Q(V.braceR)&&!U.error;)Q(V._import)?(Y(),Rm()):q();K(V.braceR)}function yf(){K(V._export),Z(V._default)?Q(V._function)||Q(V._class)?gf():(ep(),Wo()):Q(V._var)||Q(V._function)||Q(V._class)||G(B._opaque)?gf():Q(V.star)||Q(V.braceL)||G(B._interface)||G(B._type)||G(B._opaque)?Cm():q()}function bf(){zo(B._exports),tp(),Wo()}function xf(){Y(),Of()}function Sf(){Y(),kf(!0)}function Cf(){Y(),wf()}function wf(e=!1){if(Df(),Q(V.lessThan)&&jf(),Z(V._extends))do Tf();while(!e&&Z(V.comma));if(G(B._mixins)){Y();do Tf();while(Z(V.comma))}if(G(B._implements)){Y();do Tf();while(Z(V.comma))}zf(e,!1,e)}function Tf(){Hf(!1),Q(V.lessThan)&&Mf()}function Ef(){wf()}function Df(){$()}function Of(){Df(),Q(V.lessThan)&&jf(),df(V.eq),Wo()}function kf(e){zo(B._type),Df(),Q(V.lessThan)&&jf(),Q(V.colon)&&df(V.colon),e||df(V.eq),Wo()}function Af(){rp(),np(),Z(V.eq)&&ep()}function jf(){let e=ls(0);Q(V.lessThan)||Q(V.typeParameterStart)?Y():q();do Af(),Q(V.greaterThan)||K(V.comma);while(!Q(V.greaterThan)&&!U.error);K(V.greaterThan),X(e)}function Mf(){let e=ls(0);for(K(V.lessThan);!Q(V.greaterThan)&&!U.error;)ep(),Q(V.greaterThan)||K(V.comma);K(V.greaterThan),X(e)}function Nf(){if(zo(B._interface),Z(V._extends))do Tf();while(Z(V.comma));zf(!1,!1,!1)}function Pf(){Q(V.num)||Q(V.string)?Id():$()}function Ff(){ds()===V.colon?(Pf(),df()):ep(),K(V.bracketR),df()}function If(){Pf(),K(V.bracketR),K(V.bracketR),Q(V.lessThan)||Q(V.parenL)?Lf():(Z(V.question),df())}function Lf(){for(Q(V.lessThan)&&jf(),K(V.parenL);!Q(V.parenR)&&!Q(V.ellipsis)&&!U.error;)Kf(),Q(V.parenR)||K(V.comma);Z(V.ellipsis)&&Kf(),K(V.parenR),df()}function Rf(){Lf()}function zf(e,t,n){let r;for(t&&Q(V.braceBarL)?(K(V.braceBarL),r=V.braceBarR):(K(V.braceL),r=V.braceR);!Q(r)&&!U.error;){if(n&&G(B._proto)){let t=ds();t!==V.colon&&t!==V.question&&(Y(),e=!1)}if(e&&G(B._static)){let e=ds();e!==V.colon&&e!==V.question&&Y()}if(rp(),Z(V.bracketL))Z(V.bracketL)?If():Ff();else if(Q(V.parenL)||Q(V.lessThan))Rf();else{if(G(B._get)||G(B._set)){let e=ds();(e===V.name||e===V.string||e===V.num)&&Y()}Bf()}Vf()}K(r)}function Bf(){if(Q(V.ellipsis)){if(K(V.ellipsis),Z(V.comma)||Z(V.semi),Q(V.braceR))return;ep()}else Pf(),Q(V.lessThan)||Q(V.parenL)?Lf():(Z(V.question),df())}function Vf(){!Z(V.semi)&&!Z(V.comma)&&!Q(V.braceR)&&!Q(V.braceBarR)&&q()}function Hf(e){for(e||$();Z(V.dot);)$()}function Uf(){Hf(!0),Q(V.lessThan)&&Mf()}function Wf(){K(V._typeof),Jf()}function Gf(){for(K(V.bracketL);U.pos<W.length&&!Q(V.bracketR)&&(ep(),!Q(V.bracketR));)K(V.comma);K(V.bracketR)}function Kf(){let e=ds();e===V.colon||e===V.question?($(),Z(V.question),df()):ep()}function qf(){for(;!Q(V.parenR)&&!Q(V.ellipsis)&&!U.error;)Kf(),Q(V.parenR)||K(V.comma);Z(V.ellipsis)&&Kf()}function Jf(){let e=!1,t=U.noAnonFunctionType;switch(U.type){case V.name:if(G(B._interface)){Nf();return}$(),Uf();return;case V.braceL:zf(!1,!1,!1);return;case V.braceBarL:zf(!1,!0,!1);return;case V.bracketL:Gf();return;case V.lessThan:jf(),K(V.parenL),qf(),K(V.parenR),K(V.arrow),ep();return;case V.parenL:if(Y(),!Q(V.parenR)&&!Q(V.ellipsis)){if(Q(V.name)){let t=ds();e=t!==V.question&&t!==V.colon}else e=!0}if(e){if(U.noAnonFunctionType=!1,ep(),U.noAnonFunctionType=t,U.noAnonFunctionType||!(Q(V.comma)||Q(V.parenR)&&ds()===V.arrow)){K(V.parenR);return}Z(V.comma)}qf(),K(V.parenR),K(V.arrow),ep();return;case V.minus:Y(),zd();return;case V.string:case V.num:case V._true:case V._false:case V._null:case V._this:case V._void:case V.star:Y();return;default:if(U.type===V._typeof){Wf();return}if(U.type&V.IS_KEYWORD){Y(),U.tokens[U.tokens.length-1].type=V.name;return}}q()}function Yf(){for(Jf();!Bo()&&(Q(V.bracketL)||Q(V.questionDot));)Z(V.questionDot),K(V.bracketL),Z(V.bracketR)||(ep(),K(V.bracketR))}function Xf(){Z(V.question)?Xf():Yf()}function Zf(){Xf(),!U.noAnonFunctionType&&Z(V.arrow)&&ep()}function Qf(){for(Z(V.bitwiseAND),Zf();Z(V.bitwiseAND);)Zf()}function $f(){for(Z(V.bitwiseOR),Qf();Z(V.bitwiseOR);)Qf()}function ep(){$f()}function tp(){df()}function np(){$(),Q(V.colon)&&tp()}function rp(){(Q(V.plus)||Q(V.minus))&&(Y(),U.tokens[U.tokens.length-1].isType=!0)}function ip(e){Q(V.colon)&&pf(),rf(!1,e)}function ap(e,t,n){if(Q(V.questionDot)&&ds()===V.lessThan){if(t){n.stop=!0;return}Y(),Mf(),K(V.parenL),Md()}else{if(!t&&Q(V.lessThan)){let e=U.snapshot();if(Mf(),K(V.parenL),Md(),U.error)U.restoreFromSnapshot(e);else return}Ad(e,t,n)}}function op(){if(Q(V.lessThan)){let e=U.snapshot();Mf(),U.error&&U.restoreFromSnapshot(e)}}function sp(){if(Q(V.name)&&U.contextualKeyword===B._interface){let e=ls(0);return Y(),Ef(),X(e),!0}return G(B._enum)?(Dp(),!0):!1}function cp(){return G(B._enum)?(Dp(),!0):!1}function lp(e){if(e===B._declare){if(Q(V._class)||Q(V.name)||Q(V._function)||Q(V._var)||Q(V._export)){let e=ls(1);gf(),X(e)}}else if(Q(V.name)){if(e===B._interface){let e=ls(1);Ef(),X(e)}else if(e===B._type){let e=ls(1);Of(),X(e)}else if(e===B._opaque){let e=ls(1);kf(!1),X(e)}}Wo()}function up(){return G(B._type)||G(B._interface)||G(B._opaque)||G(B._enum)}function dp(){return Q(V.name)&&(U.contextualKeyword===B._type||U.contextualKeyword===B._interface||U.contextualKeyword===B._opaque||U.contextualKeyword===B._enum)}function fp(){if(G(B._type)){let e=ls(1);Y(),Q(V.braceL)?(Pm(),Om()):Of(),X(e)}else if(G(B._opaque)){let e=ls(1);Y(),kf(!1),X(e)}else if(G(B._interface)){let e=ls(1);Y(),Ef(),X(e)}else Mp(!0)}function pp(){return Q(V.star)||G(B._type)&&ds()===V.star}function mp(){if(Ro(B._type)){let e=ls(2);jm(),X(e)}else jm()}function hp(e){if(e&&Q(V.lessThan)&&Mf(),G(B._implements)){let e=ls(0);Y(),U.tokens[U.tokens.length-1].type=V._implements;do Df(),Q(V.lessThan)&&Mf();while(Z(V.comma));X(e)}}function gp(){Q(V.lessThan)&&(jf(),Q(V.parenL)||q())}function _p(){let e=ls(0);Z(V.question),Q(V.colon)&&tp(),X(e)}function vp(){if(Q(V._typeof)||G(B._type)){let e=ps();(uf(e)||e.type===V.braceL||e.type===V.star)&&Y()}}function yp(){let e=U.contextualKeyword===B._type||U.type===V._typeof;e?Y():$(),G(B._as)&&!Lo(B._as)?($(),e&&!Q(V.name)&&!(U.type&V.IS_KEYWORD)||$()):(e&&(Q(V.name)||U.type&V.IS_KEYWORD)&&$(),Ro(B._as)&&$())}function bp(){if(Q(V.lessThan)){let e=ls(0);jf(),X(e)}}function xp(){Q(V.colon)&&tp()}function Sp(){if(Q(V.colon)){let e=U.noAnonFunctionType;U.noAnonFunctionType=!0,tp(),U.noAnonFunctionType=e}}function Cp(e,t){if(Q(V.lessThan)){let n=U.snapshot(),r=yd(e,t);if(U.error)U.restoreFromSnapshot(n),U.type=V.typeParameterStart;else return r;let i=ls(0);if(jf(),X(i),r=yd(e,t),r)return!0;q()}return yd(e,t)}function wp(){if(Q(V.colon)){let e=ls(0),t=U.snapshot(),n=U.noAnonFunctionType;U.noAnonFunctionType=!0,pf(),U.noAnonFunctionType=n,Bo()&&q(),Q(V.arrow)||q(),U.error&&U.restoreFromSnapshot(t),X(e)}return Z(V.arrow)}function Tp(e,t=!1){if(U.tokens[U.tokens.length-1].contextualKeyword===B._async&&Q(V.lessThan)){let e=U.snapshot();if(Ep()&&!U.error)return;U.restoreFromSnapshot(e)}Od(e,t)}function Ep(){U.scopeDepth++;let e=U.tokens.length;return um(),Ud()?(tf(e),!0):!1}function Dp(){zo(B._enum),U.tokens[U.tokens.length-1].type=V._enum,$(),Op()}function Op(){Ro(B._of)&&Y(),K(V.braceL),kp(),K(V.braceR)}function kp(){for(;!Q(V.braceR)&&!U.error&&!Z(V.ellipsis);)Ap(),Q(V.braceR)||K(V.comma)}function Ap(){$(),Z(V.eq)&&Y()}function jp(){if(im(V.eof),U.scopes.push(new To(0,U.tokens.length,!0)),U.scopeDepth!==0)throw Error(`Invalid scope depth at end of file: ${U.scopeDepth}`);return new Gm(U.tokens,U.scopes)}function Mp(e){Ao&&sp()||(Q(V.at)&&Fp(),Np(e))}function Np(e){if(ko&&zu())return;let t=U.type;switch(t){case V._break:case V._continue:zp();return;case V._debugger:Bp();return;case V._do:Vp();return;case V._for:Hp();return;case V._function:if(ds()===V.dot)break;e||q(),Gp();return;case V._class:e||q(),dm(!0);return;case V._if:Kp();return;case V._return:qp();return;case V._switch:Jp();return;case V._throw:Yp();return;case V._try:Zp();return;case V._let:case V._const:e||q();case V._var:Qp(t!==V._var);return;case V._while:$p();return;case V.braceL:rm();return;case V.semi:em();return;case V._export:case V._import:{let e=ds();if(e===V.parenL||e===V.dot)break;Y(),t===V._import?Rm():Cm();return}case V.name:if(U.contextualKeyword===B._async){let e=U.start,t=U.snapshot();if(Y(),Q(V._function)&&!Bo()){K(V._function),lm(e,!0);return}U.restoreFromSnapshot(t)}else if(U.contextualKeyword===B._using&&!Ho()&&ds()===V.name){Qp(!0);return}else if(Pp()){zo(B._await),Qp(!0);return}}let n=U.tokens.length;_d();let r=null;if(U.tokens.length===n+1){let e=U.tokens[U.tokens.length-1];e.type===V.name&&(r=e.contextualKeyword)}r==null?Wo():Z(V.colon)?tm():nm(r)}function Pp(){if(!G(B._await))return!1;let e=U.snapshot();return Y(),!G(B._using)||Vo()||(Y(),!Q(V.name)||Vo())?(U.restoreFromSnapshot(e),!1):(U.restoreFromSnapshot(e),!0)}function Fp(){for(;Q(V.at);)Ip()}function Ip(){if(Y(),Z(V.parenL))_d(),K(V.parenR);else{for($();Z(V.dot);)$();Lp()}}function Lp(){ko?$u():Rp()}function Rp(){Z(V.parenL)&&Md()}function zp(){Y(),Uo()||($(),Wo())}function Bp(){Y(),Wo()}function Vp(){Y(),Mp(!1),K(V._while),Bd(),Z(V.semi)}function Hp(){U.scopeDepth++;let e=U.tokens.length;Wp();let t=U.tokens.length;U.scopes.push(new To(e,t,!1)),U.scopeDepth--}function Up(){return!(!G(B._using)||Lo(B._of))}function Wp(){Y();let e=!1;if(G(B._await)&&(e=!0,Y()),K(V.parenL),Q(V.semi)){e&&q(),am();return}let t=Pp();if(t||Q(V._var)||Q(V._let)||Q(V._const)||Up()){if(t&&zo(B._await),Y(),sm(!0,U.type!==V._var),Q(V._in)||G(B._of)){om(e);return}am()}else _d(!0),Q(V._in)||G(B._of)?om(e):(e&&q(),am())}function Gp(){let e=U.start;Y(),lm(e,!0)}function Kp(){Y(),Bd(),Mp(!1),Z(V._else)&&Mp(!1)}function qp(){Y(),Uo()||(_d(),Wo())}function Jp(){Y(),Bd(),U.scopeDepth++;let e=U.tokens.length;for(K(V.braceL);!Q(V.braceR)&&!U.error;)if(Q(V._case)||Q(V._default)){let e=Q(V._case);Y(),e&&_d(),K(V.colon)}else Mp(!0);Y();let t=U.tokens.length;U.scopes.push(new To(e,t,!1)),U.scopeDepth--}function Yp(){Y(),_d(),Wo()}function Xp(){al(!0),ko&&nu()}function Zp(){if(Y(),rm(),Q(V._catch)){Y();let e=null;if(Q(V.parenL)&&(U.scopeDepth++,e=U.tokens.length,K(V.parenL),Xp(),K(V.parenR)),rm(),e!=null){let t=U.tokens.length;U.scopes.push(new To(e,t,!1)),U.scopeDepth--}}Z(V._finally)&&rm()}function Qp(e){Y(),sm(!1,e),Wo()}function $p(){Y(),Bd(),Mp(!1)}function em(){Y()}function tm(){Mp(!0)}function nm(e){ko?Vu(e):Ao?lp(e):Wo()}function rm(e=!1,t=0){let n=U.tokens.length;U.scopeDepth++,K(V.braceL),t&&(U.tokens[U.tokens.length-1].contextId=t),im(V.braceR),t&&(U.tokens[U.tokens.length-1].contextId=t);let r=U.tokens.length;U.scopes.push(new To(n,r,e)),U.scopeDepth--}function im(e){for(;!Z(e)&&!U.error;)Mp(!0)}function am(){K(V.semi),Q(V.semi)||_d(),K(V.semi),Q(V.parenR)||_d(),K(V.parenR),Mp(!1)}function om(e){e?Ro(B._of):Y(),_d(),K(V.parenR),Mp(!1)}function sm(e,t){for(;;){if(cm(t),Z(V.eq)){let t=U.tokens.length-1;vd(e),U.tokens[t].rhsEndIndex=U.tokens.length}if(!Z(V.comma))break}}function cm(e){al(e),ko?Ku():Ao&&xp()}function lm(e,t,n=!1){Q(V.star)&&Y(),t&&!n&&!Q(V.name)&&!Q(V._yield)&&q();let r=null;Q(V.name)&&(t||(r=U.tokens.length,U.scopeDepth++),nl(!1));let i=U.tokens.length;U.scopeDepth++,um(),nf(e);let a=U.tokens.length;U.scopes.push(new To(i,a,!0)),U.scopeDepth--,r!==null&&(U.scopes.push(new To(r,a,!0)),U.scopeDepth--)}function um(e=!1,t=0){ko?Gu():Ao&&bp(),K(V.parenL),t&&(U.tokens[U.tokens.length-1].contextId=t),ol(V.parenR,!1,!1,e,t),t&&(U.tokens[U.tokens.length-1].contextId=t)}function dm(e,t=!1){let n=Mo();Y(),U.tokens[U.tokens.length-1].contextId=n,U.tokens[U.tokens.length-1].isExpression=!e;let r=null;e||(r=U.tokens.length,U.scopeDepth++),xm(e,t),Sm();let i=U.tokens.length;if(mm(n),!U.error&&(U.tokens[i].contextId=n,U.tokens[U.tokens.length-1].contextId=n,r!==null)){let e=U.tokens.length;U.scopes.push(new To(r,e,!1)),U.scopeDepth--}}function fm(){return Q(V.eq)||Q(V.semi)||Q(V.braceR)||Q(V.bang)||Q(V.colon)}function pm(){return Q(V.parenL)||Q(V.lessThan)}function mm(e){for(K(V.braceL);!Z(V.braceR)&&!U.error;){if(Z(V.semi))continue;if(Q(V.at)){Ip();continue}let t=U.start;hm(t,e)}}function hm(e,t){ko&&pl([B._declare,B._public,B._protected,B._private,B._override]);let n=!1;if(Q(V.name)&&U.contextualKeyword===B._static){if($(),pm()){_m(e,!1);return}if(fm()){bm();return}if(U.tokens[U.tokens.length-1].type=V._static,n=!0,Q(V.braceL)){U.tokens[U.tokens.length-1].contextId=t,rm();return}}gm(e,n,t)}function gm(e,t,n){if(ko&&Bu(t))return;if(Z(V.star)){vm(n),_m(e,!1);return}vm(n);let r=!1,i=U.tokens[U.tokens.length-1];i.contextualKeyword===B._constructor&&(r=!0),ym(),pm()?_m(e,r):fm()?bm():i.contextualKeyword===B._async&&!Uo()?(U.tokens[U.tokens.length-1].type=V._async,Q(V.star)&&Y(),vm(n),ym(),_m(e,!1)):(i.contextualKeyword===B._get||i.contextualKeyword===B._set)&&!(Uo()&&Q(V.star))?(i.contextualKeyword===B._get?U.tokens[U.tokens.length-1].type=V._get:U.tokens[U.tokens.length-1].type=V._set,vm(n),_m(e,!1)):i.contextualKeyword===B._accessor&&!Uo()?(vm(n),bm()):Uo()?bm():q()}function _m(e,t){ko?Sl():Ao&&Q(V.lessThan)&&jf(),ef(e,t)}function vm(e){$d(e)}function ym(){if(ko){let e=ls(0);Z(V.question),X(e)}}function bm(){if(ko?(us(V.bang),nu()):Ao&&Q(V.colon)&&tp(),Q(V.eq)){let e=U.tokens.length;Y(),vd(),U.tokens[e].rhsEndIndex=U.tokens.length}Wo()}function xm(e,t=!1){(!ko||e&&!t||!G(B._implements))&&(Q(V.name)&&nl(!0),ko?Sl():Ao&&Q(V.lessThan)&&jf())}function Sm(){let e=!1;Z(V._extends)?(Ed(),e=!0):e=!1,ko?Uu(e):Ao&&hp(e)}function Cm(){let e=U.tokens.length-1;ko&&Fu()||(km()?Am():Em()?($(),Q(V.comma)&&ds()===V.star?(K(V.comma),K(V.star),zo(B._as),$()):Dm(),Om()):Z(V._default)?wm():Nm()?Tm():(Pm(),Om()),U.tokens[e].rhsEndIndex=U.tokens.length)}function wm(){if(ko&&Ru()||Ao&&cp())return;let e=U.start;Z(V._function)?lm(e,!0,!0):G(B._async)&&ds()===V._function?(Ro(B._async),Z(V._function),lm(e,!0,!0)):Q(V._class)?dm(!0,!0):Q(V.at)?(Fp(),dm(!0,!0)):(vd(),Wo())}function Tm(){ko?Hu():Ao?fp():Mp(!0)}function Em(){if(ko&&Mu()||Ao&&dp())return!1;if(Q(V.name))return U.contextualKeyword!==B._async;if(!Q(V._default))return!1;let e=ms(),t=ps(),n=t.type===V.name&&t.contextualKeyword===B._from;if(t.type===V.comma)return!0;if(n){let t=W.charCodeAt(hs(e+4));return t===H.quotationMark||t===H.apostrophe}return!1}function Dm(){Z(V.comma)&&Pm()}function Om(){Ro(B._from)&&(Id(),Um()),Wo()}function km(){return Ao?pp():Q(V.star)}function Am(){Ao?mp():jm()}function jm(){K(V.star),G(B._as)?Mm():Om()}function Mm(){Y(),U.tokens[U.tokens.length-1].type=V._as,$(),Dm(),Om()}function Nm(){return ko&&Mu()||Ao&&up()||U.type===V._var||U.type===V._const||U.type===V._let||U.type===V._function||U.type===V._class||G(B._async)||Q(V.at)}function Pm(){let e=!0;for(K(V.braceL);!Z(V.braceR)&&!U.error;){if(e)e=!1;else if(K(V.comma),Z(V.braceR))break;Fm()}}function Fm(){ko?Lu():($(),U.tokens[U.tokens.length-1].identifierRole=J.ExportAccess,Ro(B._as)&&$())}function Im(){let e=U.snapshot();return zo(B._module),Ro(B._from)?G(B._from)?(U.restoreFromSnapshot(e),!0):(U.restoreFromSnapshot(e),!1):Q(V.comma)?(U.restoreFromSnapshot(e),!1):(U.restoreFromSnapshot(e),!0)}function Lm(){G(B._module)&&Im()&&Y()}function Rm(){if(ko&&Q(V.name)&&ds()===V.eq)bu();else{if(ko&&G(B._type)){let e=ps();if(e.type===V.name&&e.contextualKeyword!==B._from){if(zo(B._type),ds()===V.eq){bu();return}}else(e.type===V.star||e.type===V.braceL)&&zo(B._type)}Q(V.string)||(Lm(),Vm(),zo(B._from)),Id(),Um(),Wo()}}function zm(){return Q(V.name)}function Bm(){rl()}function Vm(){Ao&&vp();let e=!0;if(!(zm()&&(Bm(),!Z(V.comma)))){if(Q(V.star))Y(),zo(B._as),Bm();else for(K(V.braceL);!Z(V.braceR)&&!U.error;){if(e)e=!1;else if(Z(V.colon)&&q(`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`),K(V.comma),Z(V.braceR))break;Hm()}}}function Hm(){ko?Iu():Ao?yp():(rl(),G(B._as)&&(U.tokens[U.tokens.length-1].identifierRole=J.ImportAccess,Y(),rl()))}function Um(){(Q(V._with)||G(B._assert)&&!Vo())&&(Y(),Jd(!1,!1))}function Wm(){return U.pos===0&&W.charCodeAt(0)===H.numberSign&&W.charCodeAt(1)===H.exclamationMark&&bs(2),_s(),jp()}var Gm=class{constructor(e,t){this.tokens=e,this.scopes=t}};function Km(e,t,n,r){if(r&&n)throw Error(`Cannot combine flow and typescript plugins.`);Io(e,t,n,r);let i=Wm();if(U.error)throw No(U.error);return i}function qm(e){let t=e.currentIndex(),n=0,r=e.currentToken();do{let i=e.tokens[t];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===B._await&&i.identifierRole==null&&i.scopeDepth===r.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var Jm=class e{__init(){this.resultCode=``}__init2(){this.resultMappings=Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,r,i,a){this.code=t,this.tokens=n,this.isFlowEnabled=r,this.disableESTransforms=i,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode=``,this.resultMappings=Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,V.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n}matches3AtIndex(e,t,n,r){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===r}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n}matches4(e,t,n,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r}matches5(e,t,n,r,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===i}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,``)),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,``),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken(``)}removeToken(){this.replaceTokenTrimmingLeftWhitespace(``)}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(V.braceL))e++;else if(this.matches1(V.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=qm(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+=`await `,this.resultCode+=this.helperManager.getHelperName(`asyncNullishCoalesce`)):this.resultCode+=this.helperManager.getHelperName(`nullishCoalesce`),this.resultCode+=`(`;e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+=`await `),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===V._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChainDelete`):this.resultCode+=this.helperManager.getHelperName(`optionalChainDelete`):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChain`):this.resultCode+=this.helperManager.getHelperName(`optionalChain`),this.resultCode+=`([`)}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+=`])`),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+=`))`}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error(`Unexpectedly reached end of input.`);this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw Error(`Tried to finish processing tokens before reaching the end.`);return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}};function Ym(e,t,n,r){let i=t.snapshot(),a=Zm(t),o=[],s=[],c=[],l=null,u=[],d=[],f=t.currentToken().contextId;if(f==null)throw Error(`Expected non-null class context ID on class open-brace.`);for(t.nextToken();!t.matchesContextIdAndLabel(V.braceR,f);)if(t.matchesContextual(B._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:o,constructorInsertPos:l}=Qm(t));else if(t.matches1(V.semi))r||d.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let i=t.currentIndex(),a=!1,p=!1,m=!1;for(;$m(t.currentToken());)t.matches1(V._static)&&(a=!0),t.matches1(V.hash)&&(p=!0),(t.matches1(V._declare)||t.matches1(V._abstract))&&(m=!0),t.nextToken();if(a&&t.matches1(V.braceL)||p){Xm(t,f);continue}if(t.matchesContextual(B._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:o,constructorInsertPos:l}=Qm(t));continue}let h=t.currentIndex();if(eh(t),t.matches1(V.lessThan)||t.matches1(V.parenL)){Xm(t,f);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(V.eq)){let r=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(i==null)throw Error(`Expected rhsEndIndex on class field assignment.`);for(t.nextToken();t.currentIndex()<i;)e.processToken();let o;a?(o=n.claimFreeName(`__initStatic`),c.push(o)):(o=n.claimFreeName(`__init`),s.push(o)),u.push({initializerName:o,equalsIndex:r,start:h,end:t.currentIndex()})}else(!r||m)&&d.push({start:i,end:t.currentIndex()})}return t.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:d}:{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:s,staticInitializerNames:c,constructorInsertPos:l,fields:u,rangesToRemove:d}}function Xm(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;$m(e.tokenAtRelativeIndex(-1));)e.previousToken()}function Zm(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw Error(`Expected context ID on class token.`);let r=t.isExpression;if(r==null)throw Error(`Expected isExpression on class token.`);let i=null,a=!1;for(e.nextToken(),e.matches1(V.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(V.braceL,n);)e.matches1(V._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:r,className:i,hasSuperclass:a}}function Qm(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw Error(`Expected context ID on open-paren starting constructor params.`);for(;!e.matchesContextIdAndLabel(V.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),$m(e.currentToken())){for(e.nextToken();$m(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==V.name)throw Error(`Expected identifier after access modifiers in constructor arg.`);let r=e.identifierNameForToken(n);t.push(`this.${r} = ${r}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let r=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(V.braceR,n);){if(!i&&e.matches2(V._super,V.parenL)){e.nextToken();let t=e.currentToken().contextId;if(t==null)throw Error(`Expected a context ID on the super call`);for(;!e.matchesContextIdAndLabel(V.parenR,t);)e.nextToken();r=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:r}}function $m(e){return[V._async,V._get,V._set,V.plus,V.minus,V._readonly,V._static,V._public,V._private,V._protected,V._override,V._abstract,V.star,V._declare,V.hash].includes(e.type)}function eh(e){if(e.matches1(V.bracketL)){let t=e.currentToken().contextId;if(t==null)throw Error(`Expected class context ID on computed name open bracket.`);for(;!e.matchesContextIdAndLabel(V.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function th(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(V.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(V.dot);)e.removeToken(),e.removeToken()}var nh={typeDeclarations:new Set,valueDeclarations:new Set};function rh(e){let t=new Set,n=new Set;for(let r=0;r<e.tokens.length;r++){let i=e.tokens[r];i.type===V.name&&ns(i)&&(i.isType?t.add(e.identifierNameForToken(i)):n.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:n}}function ih(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,V.braceR);)t++;return e.matchesContextualAtIndex(t+1,B._from)&&e.matches1AtIndex(t+2,V.string)}function ah(e){(e.matches2(V._with,V.braceL)||e.matches2(V.name,V.braceL)&&e.matchesContextual(B._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function oh(e,t,n,r){if(!e||t)return!1;let i=n.currentToken();if(i.rhsEndIndex==null)throw Error(`Expected non-null rhsEndIndex on export token.`);let a=i.rhsEndIndex-n.currentIndex();if(a!==3&&!(a===4&&n.matches1AtIndex(i.rhsEndIndex-1,V.semi)))return!1;let o=n.tokenAtRelativeIndex(2);if(o.type!==V.name)return!1;let s=n.identifierNameForToken(o);return r.typeDeclarations.has(s)&&!r.valueDeclarations.has(s)}var sh=class e extends Js{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,r,i,a,o,s,c,l,u,d,f){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=s,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=l,this.isFlowTransformEnabled=u,this.preserveDynamicImport=d,this.keepUnusedImports=f,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=l?rh(n):nh}getPrefixCode(){let e=``;return this.hadExport&&(e+=`Object.defineProperty(exports, "__esModule", {value: true});`),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
146
+ module.exports = exports.default;
147
+ `:``}process(){return this.tokens.matches3(V._import,V.name,V.eq)?this.processImportEquals():this.tokens.matches1(V._import)?(this.processImport(),!0):this.tokens.matches2(V._export,V.eq)?(this.tokens.replaceToken(`module.exports`),!0):this.tokens.matches1(V._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(V.name,V.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(V.name)||this.tokens.matches1(V.jsxName)?this.processIdentifier():this.tokens.matches1(V.eq)?this.processAssignment():this.tokens.matches1(V.assign)?this.processComplexAssignment():this.tokens.matches1(V.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?th(this.tokens):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(V._import,V.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let e=this.enableLegacyTypeScriptModuleInterop?``:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(t==null)throw Error(`Expected context ID on dynamic import invocation.`);for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(V.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?`)))`:`))`)}else{if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}ah(this.tokens),this.tokens.matches1(V.semi)&&this.tokens.removeToken()}}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(B._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,V.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,B._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(V.name)||this.tokens.matches1(V.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(V.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(V.string);)(!e&&this.tokens.matches1(V.braceL)||this.tokens.matches1(V.comma))&&(this.tokens.removeToken(),this.tokens.matches1(V.braceR)||(t=!0),(this.tokens.matches2(V.name,V.comma)||this.tokens.matches2(V.name,V.braceR)||this.tokens.matches4(V.name,V.name,V.name,V.comma)||this.tokens.matches4(V.name,V.name,V.name,V.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(V.string);)this.tokens.removeToken()}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===J.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==J.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===V.parenR;)n++;return this.tokens.tokens[n].type===V.parenL?this.tokens.tokenAtRelativeIndex(1).type===V.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==V._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return t?(this.tokens.replaceToken(`${e}: ${t}`),!0):!1}processExport(){if(this.tokens.matches2(V._export,V._enum)||this.tokens.matches3(V._export,V._const,V._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(V._export,V._default))return this.tokens.matches3(V._export,V._default,V._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(V._export,V.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(V._export,V.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,B._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(V.braceL)){for(;!this.tokens.matches1(V.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(V._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(B._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,V.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),ah(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(V._export,V._var)||this.tokens.matches2(V._export,V._let)||this.tokens.matches2(V._export,V._const))return this.processExportVar(),!0;if(this.tokens.matches2(V._export,V._function)||this.tokens.matches3(V._export,V.name,V._function))return this.processExportFunction(),!0;if(this.tokens.matches2(V._export,V._class)||this.tokens.matches3(V._export,V._abstract,V._class)||this.tokens.matches2(V._export,V.at))return this.processExportClass(),!0;if(this.tokens.matches2(V._export,V.star))return this.processExportStar(),!0;throw Error(`Unrecognized export syntax.`)}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==V.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,V.dot)||e>=2&&[V._var,V._let,V._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0):!1}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==V.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,V.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==V.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,V.dot)||this.tokens.matches1AtIndex(e+2,V.bracketL)||this.tokens.matches1AtIndex(e+2,V.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(n);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==V.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,V.dot))return!1;let r=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;let a=this.tokens.rawCodeForToken(n),o=this.importProcessor.getIdentifierReplacement(r)||r;if(a===`++`)this.tokens.replaceToken(`(${o} = ${i} = ${o} + 1, ${o} - 1)`);else if(a===`--`)this.tokens.replaceToken(`(${o} = ${i} = ${o} - 1, ${o} + 1)`);else throw Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(V._export,V._default,V._function,V.name)||this.tokens.matches5(V._export,V._default,V.name,V._function,V.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,B._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(V._export,V._default,V._class,V.name)||this.tokens.matches5(V._export,V._default,V._abstract,V._class,V.name)||this.tokens.matches3(V._export,V._default,V.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(V._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(oh(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken(`exports.`),this.tokens.copyToken(),this.tokens.appendCode(` =`);e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(V.at);)if(this.tokens.copyToken(),this.tokens.matches1(V.parenL))this.tokens.copyExpectedToken(V.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.parenR);else{for(this.tokens.copyExpectedToken(V.name);this.tokens.matches1(V.dot);)this.tokens.copyExpectedToken(V.dot),this.tokens.copyExpectedToken(V.name);this.tokens.matches1(V.parenL)&&(this.tokens.copyExpectedToken(V.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,V.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,V.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(V.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(t==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(V.braceL);e&&this.tokens.appendCode(`(`);let t=0;for(;;)if(this.tokens.matches1(V.braceL)||this.tokens.matches1(V.dollarBraceL)||this.tokens.matches1(V.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(V.braceR)||this.tokens.matches1(V.bracketR))t--,this.tokens.copyToken();else if(t===0&&!this.tokens.matches1(V.name)&&!this.tokens.currentToken().isType)break;else if(this.tokens.matches1(V.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{let e=this.tokens.currentToken();if(es(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(n===null)throw Error(`Expected a replacement for ${t} in \`export var\` syntax.`);as(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}if(e){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(`)`)}}processExportFunction(){this.tokens.replaceToken(``);let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(V._function))this.tokens.copyToken();else if(this.tokens.matches2(V.name,V._function)){if(!this.tokens.matchesContextual(B._async))throw Error(`Expected async keyword in function export.`);this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(V.star)&&this.tokens.copyToken(),!this.tokens.matches1(V.name))throw Error(`Expected identifier for exported function name.`);let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(V.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(V.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(V._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=ih(this.tokens),t=[];for(;;){if(this.tokens.matches1(V.braceR)){this.tokens.removeToken();break}let n=Us(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;e==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let r=n.leftName,i=this.importProcessor.getIdentifierReplacement(r);t.push(`exports.${e} = ${i||r};`)}if(this.tokens.matches1(V.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(V.comma,V.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}if(this.tokens.matches1(V.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(B._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),ah(this.tokens)}else this.tokens.appendCode(t.join(` `));this.tokens.matches1(V.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(V.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),ah(this.tokens),this.tokens.matches1(V.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}},ch=class extends Js{constructor(e,t,n,r,i,a,o,s){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=o,this.nonTypeIdentifiers=i&&!o?rc(e,s):new Set,this.declarationInfo=i&&!o?rh(e):nh,this.injectCreateRequireForImportRequire=!!s.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(V._import,V.name,V.eq))return this.processImportEquals();if(this.tokens.matches4(V._import,V.name,V.name,V.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,B._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(V._export,V.eq))return this.tokens.replaceToken(`module.exports`),!0;if(this.tokens.matches5(V._export,V._import,V.name,V.name,V.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,B._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(V._import))return this.processImport();if(this.tokens.matches2(V._export,V._default))return this.processExportDefault();if(this.tokens.matches2(V._export,V.braceL))return this.processNamedExports();if(this.tokens.matches2(V._export,V.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,B._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(V.braceL)){for(;!this.tokens.matches1(V.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(V._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(B._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,V.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),ah(this.tokens)),!0}return!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?th(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken(`const`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName(`require`))):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(V._import,V.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(V.string);)this.tokens.removeToken();this.tokens.removeToken(),ah(this.tokens),this.tokens.matches1(V.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(V._import),this.tokens.matchesContextual(B._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,V.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,B._from))return!0;if(this.tokens.matches1(V.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(B._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,B._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(V.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(V.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(V.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(V.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(`,`),e=!0,this.tokens.copyExpectedToken(V.star),this.tokens.copyExpectedToken(V.name),this.tokens.copyExpectedToken(V.name));else if(this.tokens.matches1(V.braceL)){for(n&&this.tokens.appendCode(`,`),this.tokens.copyToken();!this.tokens.matches1(V.braceR);){t=!0;let n=Us(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(V.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(V.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(V.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(oh(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(V._export,V._default,V._function,V.name)||this.tokens.matches5(V._export,V._default,V.name,V._function,V.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,B._async)||this.tokens.matches4(V._export,V._default,V._class,V.name)||this.tokens.matches5(V._export,V._default,V._abstract,V._class,V.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(V._export),this.tokens.copyExpectedToken(V.braceL);let e=ih(this.tokens),t=!1;for(;!this.tokens.matches1(V.braceR);){let n=Us(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(V.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(V.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(V.braceR),!this.keepUnusedImports&&e&&!t&&(this.tokens.removeToken(),this.tokens.removeToken(),ah(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}},lh=class extends Js{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(V._enum)?(this.processEnum(),!0):this.tokens.matches2(V._export,V._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(V._export,V._default,V._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken(`const`),this.tokens.copyExpectedToken(V.name);let e=!1;this.tokens.matchesContextual(B._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(B._symbol),this.tokens.removeToken());let t=this.tokens.matches3(V.braceL,V.name,V.eq);this.tokens.appendCode(` = require("flow-enums-runtime")`);let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?`.Mirrored([`:`({`);!this.tokens.matches1(V.braceR);){if(this.tokens.matches1(V.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(V.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(n?`]);`:`});`)}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(`:`),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};function uh(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var dh=`jest`,fh=[`mock`,`unmock`,`enableAutomock`,`disableAutomock`],ph=class e extends Js{__init(){this.hoistedFunctionNames=[]}constructor(t,n,r,i){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=r,this.importProcessor=i,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(V.name,V.dot,V.name,V.parenL)&&this.tokens.identifierName()===dh?!uh([this,`access`,e=>e.importProcessor,`optionalAccess`,e=>e.getGlobalNames,`call`,e=>e(),`optionalAccess`,e=>e.has,`call`,e=>e(dh)])&&this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(``):``}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(V.dot,V.name,V.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(fh.includes(t)){let t=this.nameManager.claimFreeName(`__jestHoist`);this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${dh}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.parenR),this.tokens.appendCode(`;}`),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${dh}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.parenR),e=!0}return!0}},mh=class extends Js{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(V.num)){let e=this.tokens.currentTokenCode();if(e.includes(`_`))return this.tokens.replaceToken(e.replace(/_/g,``)),!0}return!1}},hh=class extends Js{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return this.tokens.matches2(V._catch,V.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName(`e`)})`),!0):!1}},gh=class extends Js{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(V.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(`, async () => (`):this.tokens.replaceTokenTrimmingLeftWhitespace(`, () => (`),!0}if(this.tokens.matches1(V._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(e!=null&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==V._super){let t=this.nameManager.claimFreeName(`_`),n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,V._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(V.questionDot,V.parenL)||this.tokens.matches2(V.questionDot,V.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${n}`);else if(this.tokens.matches2(V.questionDot,V.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${n}`);else if(this.tokens.matches1(V.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${n}.`);else if(this.tokens.matches1(V.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${n}.`);else if(this.tokens.matches1(V.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${n}[`);else if(this.tokens.matches1(V.parenL))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${n}(`);else throw Error(`Unexpected subscript operator in optional chain.`);return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error(`Reached the end of the code while finding the end of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error(`Reached the start of the code while finding the start of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return this.tokens.tokens[t-1].type===V._super;t--}}},_h=class extends Js{constructor(e,t,n,r){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=r}process(){let e=this.tokens.currentIndex();if(this.tokens.identifierName()===`createReactClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`createReactClass`);return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(V.name,V.dot,V.name)&&this.tokens.identifierName()===`React`&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)===`createClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`React`)||`React`;return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(V.parenL),this.tokens.copyExpectedToken(V.braceL),this.tokens.appendCode(`displayName: '${t}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(V.braceR),this.tokens.copyExpectedToken(V.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,V.name,V.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===J.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,V._export,V._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let e=(this.options.filePath||`unknown`).split(`/`),t=e[e.length-1],n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(0,n);return r===`index`&&e[e.length-2]?e[e.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(V.parenL,V.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(n==null)throw Error(`Expected non-null context ID on object open-brace.`);for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===V.braceR&&t.contextId===n){e++;break}if(this.tokens.identifierNameAtIndex(e)===`displayName`&&this.tokens.tokens[e].identifierRole===J.ObjectKey&&t.contextId===n)return!1}if(e===this.tokens.tokens.length)throw Error(`Unexpected end of input when processing React class.`);return this.tokens.matches1AtIndex(e,V.parenR)||this.tokens.matches2AtIndex(e,V.comma,V.parenR)}},vh=class e extends Js{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`
148
+ (function () {
149
+ var enterModule = require('react-hot-loader').enterModule;
150
+ enterModule && enterModule(module);
151
+ })();`.replace(/\s+/g,` `).trim()}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&ns(t)&&t.identifierRole!==J.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:`default`}),`
152
+ ;(function () {
153
+ var reactHotLoader = require('react-hot-loader').default;
154
+ var leaveModule = require('react-hot-loader').leaveModule;
155
+ if (!reactHotLoader) {
156
+ return;
157
+ }
158
+ ${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||``)});`).join(`
159
+ `)}
160
+ leaveModule(module);
161
+ })();`}process(){return!1}},yh=new Set(`break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield.enum.implements.interface.let.package.private.protected.public.static.await.false.null.true`.split(`.`));function bh(e){if(e.length===0||!Xo[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!Yo[e.charCodeAt(t)])return!1;return!yh.has(e)}var xh=class extends Js{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(V._public)||this.tokens.matches1(V._protected)||this.tokens.matches1(V._private)||this.tokens.matches1(V._abstract)||this.tokens.matches1(V._readonly)||this.tokens.matches1(V._override)||this.tokens.matches1(V.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(V._enum)||this.tokens.matches2(V._const,V._enum)?(this.processEnum(),!0):this.tokens.matches2(V._export,V._enum)||this.tokens.matches3(V._export,V._const,V._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(V._const)||this.tokens.matches1(V._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode(`export `),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(V.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(V.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(V.braceR);){let{nameStringCode:n,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(V.eq,V.string,V.comma)||this.tokens.matches3(V.eq,V.string,V.braceR)?this.processStringLiteralEnumMember(e,n,r):this.tokens.matches1(V.eq)?this.processExplicitValueEnumMember(e,n,r):this.processImplicitValueEnumMember(e,n,r,t),this.tokens.matches1(V.comma)&&this.tokens.removeToken(),t=r??`${e}[${n}]`}}extractEnumKeyInfo(e){if(e.type===V.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:bh(t)?t:null}}if(e.type===V.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:bh(t)?t:null}}throw Error(`Expected name or string at beginning of enum element.`)}processStringLiteralEnumMember(e,t,n){n==null?(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`;`)):(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`))}processExplicitValueEnumMember(e,t,n){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw Error(`Expected rhsEndIndex on enum assign.`);if(n!=null){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,n,r){let i=r==null?`0`:`${r} + 1`;n!=null&&(this.tokens.appendCode(`const ${n} = ${i}; `),i=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${i}] = ${t};`)}},Sh=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,r,i){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:a,importProcessor:o}=t;this.tokens=a,this.isImportsTransformEnabled=n.includes(`imports`),this.isReactHotLoaderTransformEnabled=n.includes(`react-hot-loader`),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new gh(a,this.nameManager)),this.transformers.push(new mh(a)),this.transformers.push(new hh(a,this.nameManager))),n.includes(`jsx`)&&(i.jsxRuntime!==`preserve`&&this.transformers.push(new Ys(this,a,o,this.nameManager,i)),this.transformers.push(new _h(this,a,o,i)));let s=null;if(n.includes(`react-hot-loader`)){if(!i.filePath)throw Error(`filePath is required when using the react-hot-loader transform.`);s=new vh(a,i.filePath),this.transformers.push(s)}if(n.includes(`imports`)){if(o===null)throw Error(`Expected non-null importProcessor with imports transform enabled.`);this.transformers.push(new sh(this,a,o,this.nameManager,this.helperManager,s,r,!!i.enableLegacyTypeScriptModuleInterop,n.includes(`typescript`),n.includes(`flow`),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new ch(a,this.nameManager,this.helperManager,s,n.includes(`typescript`),n.includes(`flow`),!!i.keepUnusedImports,i));n.includes(`flow`)&&this.transformers.push(new lh(this,a,n.includes(`imports`))),n.includes(`typescript`)&&this.transformers.push(new xh(this,a,n.includes(`imports`))),n.includes(`jest`)&&this.transformers.push(new ph(this,a,this.nameManager,o))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?`"use strict";`:``;for(let t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join(``);for(let t of this.transformers)e+=t.getHoistedCode();let t=``;for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:r}=n;if(r.startsWith(`#!`)){let i=r.indexOf(`
162
+ `);return i===-1&&(i=r.length,r+=`
163
+ `),{code:r.slice(0,i+1)+e+r.slice(i+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}return{code:e+r+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(V.braceL)||this.tokens.matches1(V.dollarBraceL))e++;else if(this.tokens.matches1(V.braceR)){if(e===0)return;e--}if(this.tokens.matches1(V.parenL))t++;else if(this.tokens.matches1(V.parenR)){if(t===0)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(V._class))this.processClass();else{for(let e of this.transformers)if(e.process())return;this.tokens.copyToken()}}processNamedClass(){if(!this.tokens.matches2(V._class,V.name))throw Error(`Expected identifier for exported class name.`);let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){let e=Ym(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName(`_class`),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let r=this.tokens.currentToken().contextId;if(r==null)throw Error(`Expected class to have a context ID.`);for(this.tokens.copyExpectedToken(V._class);!this.tokens.matchesContextIdAndLabel(V.braceL,r);)this.processToken();this.processClassBody(e,n);let i=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${i.map(e=>`${e}, `).join(``)}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${i.map(e=>`${e};`).join(` `)}`)}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:r,constructorInitializerStatements:i,fields:a,instanceInitializerNames:o,rangesToRemove:s}=e,c=0,l=0,u=this.tokens.currentToken().contextId;if(u==null)throw Error(`Expected non-null context ID on class.`);this.tokens.copyExpectedToken(V.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode(`__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}`);let d=i.length+o.length>0;if(r===null&&d){let e=this.makeConstructorInitCode(i,o,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName(`args`);this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(V.braceR,u);)if(c<a.length&&this.tokens.currentIndex()===a[c].start){let e=!1;for(this.tokens.matches1(V.bracketL)?this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this`):this.tokens.matches1(V.string)||this.tokens.matches1(V.num)?(this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this.`);this.tokens.currentIndex()<a[c].end;)e&&this.tokens.currentIndex()===a[c].equalsIndex&&this.tokens.appendCode(`]`),this.processToken();this.tokens.appendCode(`}`),c++}else if(l<s.length&&this.tokens.currentIndex()>=s[l].start){for(this.tokens.currentIndex()<s[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<s[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===r&&(this.tokens.copyToken(),d&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,o,t)};`)),this.processToken();this.tokens.copyExpectedToken(V.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(`;`)}processPossibleArrowParamEnd(){if(this.tokens.matches2(V.parenR,V.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,V.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(`) =>`),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(B._async)&&!this.tokens.matches1(V._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==V.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,V.parenL)){for(this.tokens.replaceToken(`async (`),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let n=0;n<e.length;n++){let r=e[n];r!==void 0&&(e[n]=r+t)}return e}};v((e=>{e.__esModule=!0,e.LinesAndColumns=void 0;var t=`
164
+ `,n=`\r`;e.LinesAndColumns=function(){function e(e){this.string=e;for(var r=[0],i=0;i<e.length;)switch(e[i]){case t:i+=t.length,r.push(i);break;case n:i+=n.length,e[i]===t&&(i+=t.length),r.push(i);break;default:i++}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;var r=e-n[t];return{line:t,column:r}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()}))();function Ch(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,V._import)&&!e.matches3AtIndex(n,V._import,V.name,V.eq)&&wh(e,n,t);return t}function wh(e,t,n){t++,!e.matches1AtIndex(t,V.parenL)&&(e.matches1AtIndex(t,V.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,V.comma)&&t++),e.matches1AtIndex(t,V.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,V.braceL)&&(t++,Th(e,t,n)))}function Th(e,t,n){for(;;){if(e.matches1AtIndex(t,V.braceR))return;let r=Us(e,t);if(t=r.endIndex,r.isType||n.add(r.rightName),e.matches2AtIndex(t,V.comma,V.braceR)||e.matches1AtIndex(t,V.braceR))return;if(e.matches1AtIndex(t,V.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function Eh(e,t){$c(t);try{let n=Dh(e,t),r=new Sh(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),i={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw Error(`filePath must be specified when generating a source map.`);i={...i,sourceMap:Rc(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return i}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function Dh(e,t){let n=t.transforms.includes(`jsx`),r=t.transforms.includes(`typescript`),i=t.transforms.includes(`flow`),a=t.disableESTransforms===!0,o=Km(e,n,r,i),s=o.tokens,c=o.scopes,l=new qc(e,s),u=new Vc(l),d=new Jm(e,s,i,a,u),f=!!t.enableLegacyTypeScriptModuleInterop,p=null;return t.transforms.includes(`imports`)?(p=new ic(l,d,f,t,t.transforms.includes(`typescript`),!!t.keepUnusedImports,u),p.preprocessTokens(),Hc(d,c,p.getGlobalNames()),t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&p.pruneTypeOnlyImports()):t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&Hc(d,c,Ch(d)),{tokenProcessor:d,scopes:c,nameManager:l,importProcessor:p,helperManager:u}}var Oh=new Set([`return`,`typeof`,`instanceof`,`in`,`of`,`new`,`delete`,`void`,`throw`,`case`,`do`,`else`,`yield`,`await`]);function kh(e){let t=[],n=``,r=[],i=0,a=0,o=e=>{n&&t.push({code:!0,text:n}),n=``,t.push({code:!1,text:e})},s=[],c={piece:-1,at:-1},l=()=>{let e=t.length,r=n.replace(/\s+$/,``);for(;!r;){let n=t[--e];if(!n)return!0;if(n.code)r=n.text.replace(/\s+$/,``);else if(!n.text.startsWith(`//`)&&!n.text.startsWith(`/*`))return n.text.endsWith("${")}let i=r[r.length-1];if(i===`)`)return c.piece===e&&c.at===r.length-1;if(/(\+\+|--)$/.test(r))return!1;if(/[(,=:[!&|?{};+\-*%<>~^]/.test(i))return!0;let a=/([A-Za-z_$][\w$]*)$/.exec(r)?.[1];return a!==void 0&&Oh.has(a)&&!/\.\s*[A-Za-z_$][\w$]*$/.test(r)},u=t=>{let n=t;for(;n<e.length;){let t=e[n];if(t===`\\`)n+=2;else if(t==="`")return n+1;else if(t===`$`&&e[n+1]===`{`)return n+2;else n++}return n};for(;a<e.length;){let d=e[a];if(d===`"`||d===`'`){let t=a+1;for(;t<e.length&&e[t]!==d&&e[t]!==`
165
+ `;)t+=e[t]===`\\`?2:1;o(e.slice(a,t+1)),a=t+1}else if(d==="`"){let t=u(a+1);o(e.slice(a,t)),e[t-1]===`{`&&e[t-2]===`$`&&r.push(i),a=t}else if(d===`}`&&r.length&&i===r[r.length-1]){r.pop();let t=u(a+1);o(e.slice(a,t)),e[t-1]===`{`&&e[t-2]===`$`&&r.push(i),a=t}else if(d===`/`&&e[a+1]===`/`){let t=e.indexOf(`
166
+ `,a);o(e.slice(a,t===-1?e.length:t)),a=t===-1?e.length:t}else if(d===`/`&&e[a+1]===`*`){let t=e.indexOf(`*/`,a+2);o(e.slice(a,t===-1?e.length:t+2)),a=t===-1?e.length:t+2}else if(d===`/`&&l()){let t=a+1,n=!1;for(;t<e.length&&e[t]!==`
167
+ `;){let r=e[t];if(r===`\\`)t++;else if(r===`[`)n=!0;else if(r===`]`)n=!1;else if(r===`/`&&!n)break;t++}for(t++;t<e.length&&/[a-z]/.test(e[t]);)t++;o(e.slice(a,t)),a=t}else d===`{`?i++:d===`}`?i--:d===`(`?s.push(/(?<![\w$.])(if|while|for(\s+await)?|with)\s*$/.test(n)):d===`)`&&s.pop()&&(c={piece:t.length,at:n.length}),n+=d,a++}return n&&t.push({code:!0,text:n}),t}function Ah(e,t){let n=kh(e).map(e=>e.code?e.text:e.text.replace(/[^\n]/g,` `)).join(``),r=/\s*\{/y,i=``,a=0;for(let o of n.matchAll(/(?<![\w$.])import(\s*)\(/g)){let s=0,c=o.index+o[0].length-1;for(;c<n.length;c++)if(n[c]===`(`)s++;else if(n[c]===`)`&&--s===0)break;r.lastIndex=c+1,!r.test(n)&&(i+=`${e.slice(a,o.index)}${t}`,a=o.index+6)}return i+e.slice(a)}function jh(e,t){let n=kh(e),r=``;for(let e=0;e<n.length;e++){let i=n[e];if(!i.code){r+=i.text;continue}let a=t(i.text),o=n[e+1];o&&!o.code&&/^["']/.test(o.text)&&/\bexports\.\s*$/.test(a)?(a=a.replace(/\.\s*$/,`[`),r+=`${a}${o.text}]`,e++):r+=a}return r}var Mh=[`node`,`require`,`module-sync`,`default`],Nh=[`node`,`import`,`module-sync`,`default`],Ph=[`.js`,`.json`,`.cjs`,`.mjs`,`.ts`,`.mts`,`.cts`],Fh=new Set([`.ts`,`.mts`,`.cts`,`.tsx`]),Ih=`__ownRequire__`,Lh=class{id;filename;path;exports={};loaded=!1;children=[];paths=[];parent;evaluation=null;esm=!1;constructor(e,t){this.id=e,this.filename=e,this.path=e.slice(0,e.lastIndexOf(`/`))||`/`,this.parent=t}},Rh=class extends Error{code;requireStack;constructor(e,t){super(e),this.code=t}};function zh(e){let{fs:t,path:n,builtin:r,builtins:i}=e,a=Object.create(null),o=new Map,s,c=e=>t.statSync(e,{throwIfNoEntry:!1})?.isFile()??!1,l=e=>t.statSync(e,{throwIfNoEntry:!1})?.isDirectory()??!1,u=e=>{if(!o.has(e)){let n=`${e}/package.json`,r=null;if(c(n))try{r=JSON.parse(t.readFileSync(n,`utf8`))}catch(e){throw new Rh(`Invalid package config ${n}: ${e.message}`,`ERR_INVALID_PACKAGE_CONFIG`)}o.set(e,r)}return o.get(e)},d=e=>{for(let t=n.dirname(e);;t=n.dirname(t)){if(t.endsWith(`/node_modules`))return null;let e=u(t);if(e)return[t,e];if(t===`/`)return null}},f=e=>{try{return t.realpathSync(e)}catch{return e}},p=e=>{if(c(e))return e;for(let t of Ph)if(c(e+t))return e+t;return null},m=e=>{let t=u(e),r=typeof t?.main==`string`?t.main:null;if(r){let t=p(n.resolve(e,r))??h(n.resolve(e,r));if(t)return t}return h(e)},h=e=>{for(let t of Ph)if(c(`${e}/index${t}`))return`${e}/index${t}`;return null},g=(e,t,r,i)=>{if(t==null)return;let a;if(typeof t==`string`||Array.isArray(t))a={".":t};else{let e=Object.keys(t);a=e.length&&!e[0].startsWith(`.`)&&!e[0].startsWith(`#`)?{".":t}:t}if(r in a&&!r.includes(`*`))return _(e,a[r],``,i);let o=null;for(let e of Object.keys(a)){let t=e.indexOf(`*`);if(t===-1)continue;let n=e.slice(0,t),i=e.slice(t+1);r.startsWith(n)&&r.endsWith(i)&&r.length>=e.length-1&&(!o||n.length>o.indexOf(`*`))&&(o=e)}if(o){let t=o.indexOf(`*`),n=r.slice(t,r.length-(o.length-t-1));return _(e,a[o],n,i)}for(let t of Object.keys(a))if(t.endsWith(`/`)&&r.startsWith(t)){let i=a[t];if(typeof i==`string`)return n.resolve(e,i+r.slice(t.length))}return null},_=(e,t,r,i)=>{if(typeof t==`string`)return t.startsWith(`./`)?n.resolve(e,t.replaceAll(`*`,r)):t.startsWith(`#`)?null:`\0${t.replaceAll(`*`,r)}`;if(Array.isArray(t)){for(let n of t){let t=_(e,n,r,i);if(t)return t}return null}if(t&&typeof t==`object`){for(let[n,a]of Object.entries(t))if(i.includes(n)){let t=_(e,a,r,i);if(t!==null)return t}}return null},v=t=>{let r=[];for(let e=t;e.endsWith(`/node_modules`)||r.push(`${e===`/`?``:e}/node_modules`),e!==`/`;e=n.dirname(e));for(let t of(e.env.NODE_PATH??``).split(`:`).filter(Boolean))r.push(t);return r},y=(e,t)=>{let n=[];for(let e=t;e;e=e.parent)n.push(e.filename);let r=new Rh(`Cannot find module '${e}'${n.length?`\nRequire stack:\n- ${n.join(`
168
+ - `)}`:``}`,`MODULE_NOT_FOUND`);return r.requireStack=n,r},b=new Map,x=(e,t,n,r,i=!1)=>{if(r)return S(e,t,n,r,i);let a=`${i?`i`:`r`}\0${t}\0${e}`,o=b.get(a);return o===void 0&&(o=S(e,t,n,r,i),b.set(a,o)),o},S=(e,t,r,a,o=!1)=>{let s=(e,t,n)=>o?g(e,t,n,Nh):g(e,t,n,Mh)??g(e,t,n,Nh);e.startsWith(`file://`)&&(e=decodeURIComponent(new URL(e).pathname));let h=e.startsWith(`node:`)?e.slice(5):e;if(i.includes(h))return`node:${h}`;if(e.startsWith(`node:`))throw y(e,r);if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`)||e===`.`||e===`..`){let i=n.resolve(t,e),a=p(i)??m(i);if(a)return f(a);throw y(e,r)}if(e.startsWith(`#`)){let n=d(`${t}/x`),i=n&&s(n[0],n[1].imports,e);if(i?.startsWith(`\0`))return x(i.slice(1),t,r,void 0,o);if(i&&c(i))return f(i);throw y(e,r)}let _=e.split(`/`),b=e.startsWith(`@`)?_.slice(0,2).join(`/`):_[0],S=`.${e.slice(b.length)}`,C=d(`${t}/x`);if(C&&C[1].name===b&&C[1].exports){let e=s(C[0],C[1].exports,S);if(e&&c(e))return f(e)}for(let r of a??v(t)){let t=`${r}/${b}`;if(!l(t))continue;let i=u(t);if(i?.exports!==void 0){let e=s(t,i.exports,S);if(e&&!e.startsWith(`\0`)){let t=p(e);if(t)return f(t)}throw new Rh(`Package subpath '${S}' is not defined by "exports" in ${t}/package.json`,`ERR_PACKAGE_PATH_NOT_EXPORTED`)}let a=n.resolve(r,e),o=p(a)??m(a);if(o)return f(o)}throw y(e,r)},C=(e,t)=>{let r=n.extname(e);if(r===`.mjs`||r===`.mts`)return!0;if(r===`.cjs`||r===`.cts`)return!1;if(d(e)?.[1].type===`module`)return!0;let i=/^\s*(import(?:\s+[\w$]|\s*[{*'"])|export\s+(?:\{|\*|default|const|let|var|function|class|async))/m;if(!i.test(t))return!1;let a=kh(t).map(e=>e.code?e.text:e.text.replace(/[^\n]/g,` `)).join(``);return i.test(a)},w=(e,t)=>{let r=e.filename,i=n.extname(r);t.startsWith(`#!`)&&(t=`//${t.slice(2)}`);let o=C(r,t),s=[];Fh.has(i)&&s.push(`typescript`),o&&s.push(`imports`);let c=o?jh(t,e=>e.replace(/(?<![\w$]|import\s+[\w$]+\s*=\s*)require(?![\w$])/g,Ih).replace(/#([A-Za-z_$][\w$]*)/g,`#$1__private`)):t;s.length&&(c=Eh(c,{transforms:s,filePath:r,disableESTransforms:!0,production:!0,keepUnusedImports:!Fh.has(i),preserveDynamicImport:!0}).code),c=jh(Ah(c,`__dynamicImport`),e=>o?e.replace(/\bimport\s*\.\s*meta\b/g,`__importMeta`).replace(/(^|[^\w$.])require(\s*\()/g,`$1__nodeRequire$2`).replaceAll(Ih,`require`):e),e.esm=o;let l={url:`file://${r}`,filename:r,dirname:e.path,resolve:t=>{let n=x(t,e.path,e,void 0,!0);return n.startsWith(`node:`)?n:`file://${n}`}},u=o?`exports, __nodeRequire, __nodeModule, __importMeta, __dynamicImport`:`exports, require, module, __filename, __dirname, __importMeta, __dynamicImport`,d=e=>(0,eval)(`(${e}function (${u}) {${c}\n})\n//# sourceURL=file://${r}`),f,p=!1,m=e=>(e instanceof SyntaxError&&(e.message=`${r}: ${e.message}`),e);try{f=d(``)}catch(e){if(!(e instanceof SyntaxError)||!o||!/\bawait\b/.test(c))throw m(e);try{f=d(`async `)}catch{throw m(e)}p=!0}let h=t=>j(t,e),g=k(e,e.path,!0),_=[];if(o){Object.defineProperty(e.exports,"__esModule",{value:!0});for(let[,,t]of c.matchAll(/__nodeRequire\((['"])([^'"\\]*)\1\)/g)){g(t);let n=a[x(t,e.path,e,void 0,!0)]?.evaluation;n&&_.push(n)}}let v=()=>o?f.call(void 0,e.exports,g,e,l,h):f.call(e.exports,e.exports,e.require,e,r,e.path,l,h),y=()=>{e.loaded=!0,e.evaluation=null};if(_.length)e.evaluation=Promise.all(_).then(v).then(y);else{let t=v();p&&(e.evaluation=t.then(y))}},T=new WeakMap,E=(e,t=!0)=>{let n=e!==null&&(typeof e==`object`||typeof e==`function`),r=n?T.get(e):void 0;if(r)return r;let i=Object.create(null);if(n)for(let t of Object.keys(e))i[t]=e[t];return i.default=e,`__esModule`in i||Object.defineProperty(i,"__esModule",{value:!0}),n&&t&&T.set(e,i),i},D=(e,t)=>t?e.esm?e.exports:E(e.exports,e.loaded):e.esm&&Object.prototype.hasOwnProperty.call(e.exports,`module.exports`)?e.exports[`module.exports`]:e.exports,O=(e,i,o=!1)=>{if(e.startsWith(`node:`))return r(e.slice(5));let s=a[e];if(s)return i&&!i.children.includes(s)&&i.children.push(s),D(s,o);let c=new Lh(e,i);c.paths=v(c.path),c.require=k(c),a[e]=c,i?.children.push(c);try{let r=t.readFileSync(e,`utf8`);if(n.extname(e)===`.json`)try{c.exports=JSON.parse(r.replace(/^/,``))}catch(t){throw t.message=`${e}: ${t.message}`,t}else if(n.extname(e)===`.node`)throw new Rh(`${e}: a native addon, which the playground cannot load (look for a WebAssembly build of the package)`,`ERR_DLOPEN_FAILED`);else w(c,r);c.evaluation||(c.loaded=!0)}catch(t){throw delete a[e],t}return D(c,o)},k=(e,t=e?.path??`/`,r=!1)=>{let o=(n=>{if(typeof n!=`string`)throw TypeError(`The "id" argument must be of type string`);return O(x(n,t,e,void 0,r),e,r)}),c=(t,r)=>{for(let i of r)try{return x(t,n.resolve(i),e)}catch(e){if(e.code!==`MODULE_NOT_FOUND`)throw e}throw y(t,e)},l=((r,i)=>{let a=i?.paths?/^\.\.?(\/|$)/.test(r)?c(r,i.paths):x(r,t,e,i.paths.flatMap(e=>v(n.resolve(e)))):x(r,t,e);return a.startsWith(`node:`)&&!r.startsWith(`node:`)?a.slice(5):a});return l.paths=e=>i.includes(e)?null:v(t),o.resolve=l,o.cache=a,o.extensions={".js":()=>{},".json":()=>{},".node":()=>{}},Object.defineProperty(o,"main",{get:()=>s}),o},A=async(e,t)=>{let n=t?.path??M().cwd(),r=x(String(e),n,t,void 0,!0),i=O(r,t,!0),o=a[r];return o?.evaluation&&await o.evaluation,o?D(o,!0):E(i)},j=(t,n)=>{let r=e.hold?.()??(()=>{}),i=A(t,n);return i.then(r,r),i},M=()=>({cwd:()=>`/`}),N=e=>{let t=String(e).startsWith(`file://`)?decodeURIComponent(new URL(String(e)).pathname):String(e),r=t.endsWith(`/`)?t.slice(0,-1):n.dirname(t);return k(null,r)};return{cache:a,createRequire:N,async runMain(e){let r=x(n.resolve(e),`/`,null),i=new Lh(r,null);i.id=`.`,i.paths=v(i.path),i.require=k(i),s=i,a[r]=i,w(i,t.readFileSync(r,`utf8`)),i.evaluation&&await i.evaluation,i.loaded=!0},evaluate(e,t){let n=new Lh(`${t}/[eval]`,null);return n.id=`[eval]`,n.paths=v(t),n.require=k(n,t),Function(`exports`,`require`,`module`,`__filename`,`__dirname`,`__dynamicImport`,`return eval(${JSON.stringify(jh(Ah(e,`__dynamicImport`),e=>e))});`)(n.exports,n.require,n,`[eval]`,t,e=>j(e,n))},importFrom:A,setProcess(e){M=e},moduleBuiltin(){return Object.assign(Lh,{Module:Lh,createRequire:N,builtinModules:i,isBuiltin:e=>i.includes(e.replace(/^node:/,``)),_cache:a,_extensions:{".js":()=>{},".json":()=>{},".node":()=>{}},_resolveFilename:(e,t)=>x(e,t?.path??M().cwd(),t),_load:(e,t)=>O(x(e,t?.path??M().cwd(),t),t),_nodeModulePaths:v,wrap:e=>`(function (exports, require, module, __filename, __dirname) { ${e}\n});`,register:()=>{},syncBuiltinESMExports:()=>{},findPackageJSON:void 0,enableCompileCache:()=>({status:3}),constants:{compileCacheStatus:{FAILED:0,ENABLED:1,ALREADY_ENABLED:2,DISABLED:3}}})}}}var Bh=e=>e===6?`::1`:`127.0.0.1`,Vh=(e,t,n)=>Object.assign(Error(`${t} ${e}${n?` ${n}`:``}`),{code:e,syscall:t}),Hh=e=>{if(Array.isArray(e)){let t=e.map(Hh),n=new Uint8Array(t.reduce((e,t)=>e+t.length,0)),r=0;for(let e of t)n.set(e,r),r+=e.length;return n}return typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice()};function Uh(e){let t=typeof e==`number`||typeof e==`string`&&e.trim()?+e:NaN;if(Number.isInteger(t)&&t>0&&t<65536)return t;let n=typeof e==`number`?`type number (${e})`:typeof e==`string`?`type string ('${e}')`:String(e);throw Object.assign(RangeError(`Port should be > 0 and < 65536. Received ${n}.`),{code:`ERR_SOCKET_BAD_PORT`})}function Wh(e,t,n){let r=new Map,i=new Map,a=0;class o extends Ne.EventEmitter{constructor(e,t){super();let n=typeof e==`string`?e:e?.type;if(n!==`udp4`&&n!==`udp6`)throw Object.assign(TypeError(`Bad socket type specified. Valid types are: udp4, udp6`),{code:`ERR_SOCKET_BAD_TYPE`});this.family=n===`udp6`?6:4,this.port=null,this.binding=null,this.peer=null,this.release=null,this.referenced=!0,this.closed=!1,t&&this.on(`message`,t)}bind(...n){let o=typeof n.at(-1)==`function`?n.pop():null;if(this.binding)throw Vh(`ERR_SOCKET_ALREADY_BOUND`,`bind`,`Socket is already bound`);let s=Number((n[0]&&typeof n[0]==`object`?n[0].port:n[0])??0);return o&&this.once(`listening`,o),this.binding=new Promise(n=>{let r=++a,o=t();i.set(r,e=>{o(),n(e)}),e({kind:`net`,op:`udp-bind`,ref:r,port:s})}),this.binding.then(n=>{this.closed?n!==null&&e({kind:`net`,op:`udp-close`,port:n}):n===null?this.emit(`error`,Object.assign(Vh(`EADDRINUSE`,`bind`,``),{port:s})):(this.port=n,r.set(n,this),this.referenced&&(this.release=t()),this.emit(`listening`))}),this}bound(){return this.binding||this.bind(0),this.binding}async addressOf(e){return e?(await n.promises.lookup(e,{family:this.family})).address:Bh(this.family)}send(n,...r){let i=typeof r.at(-1)==`function`?r.pop():null,a=Hh(n);if(typeof r[0]==`number`&&typeof r[1]==`number`&&r.length>=2&&(r.length>2||this.peer)&&(a=a.subarray(r[0],r[0]+r[1]),r=r.slice(2)),this.closed)throw Vh(`ERR_SOCKET_DGRAM_NOT_RUNNING`,`send`,`Not running`);let o=this.peer?0:Uh(r[0]),s=this.peer?Promise.resolve(this.peer):this.addressOf(r[1]).then(e=>({address:e,port:o})),c=t();Promise.all([this.bound(),s]).then(([t,{address:n,port:r}])=>{c(),!(t===null||this.closed)&&(e({kind:`net`,op:`udp-send`,from:t,address:n,port:r,bytes:a}),i?.(null,a.length))},e=>{c(),i?i(e):this.emit(`error`,e)})}connect(e,...t){let n=typeof t.at(-1)==`function`?t.pop():null;if(this.peer)throw Vh(`ERR_SOCKET_DGRAM_IS_CONNECTED`,`connect`,`Already connected`);n&&this.once(`connect`,n),Promise.all([this.bound(),this.addressOf(t[0])]).then(([,t])=>{this.peer={address:t,port:e},this.emit(`connect`)},e=>this.emit(`error`,e))}disconnect(){if(!this.peer)throw Vh(`ERR_SOCKET_DGRAM_NOT_CONNECTED`,`disconnect`,`Not connected`);this.peer=null}remoteAddress(){if(!this.peer)throw Vh(`ERR_SOCKET_DGRAM_NOT_CONNECTED`,`getpeername`,`Not connected`);return{...this.peer,family:this.peer.address.includes(`:`)?`IPv6`:`IPv4`}}address(){if(this.port===null)throw Vh(`EBADF`,`getsockname`,``);return{address:this.family===6?`::`:`0.0.0.0`,family:this.family===6?`IPv6`:`IPv4`,port:this.port}}receive(e,t,n){if(this.peer&&(this.peer.port!==t||this.peer.address!==e))return;let r=e.includes(`:`)?`IPv6`:`IPv4`;this.emit(`message`,E.Buffer.from(n.buffer,n.byteOffset,n.length),{address:e,family:r,port:t,size:n.length})}close(t){if(this.closed)throw Vh(`ERR_SOCKET_DGRAM_NOT_RUNNING`,`close`,`Not running`);return this.closed=!0,t&&this.once(`close`,t),this.port!==null&&(e({kind:`net`,op:`udp-close`,port:this.port}),r.delete(this.port)),this.release?.(),this.release=null,queueMicrotask(()=>this.emit(`close`)),this}ref(){return this.referenced=!0,this.port!==null&&!this.closed&&(this.release??=t()),this}unref(){return this.referenced=!1,this.release?.(),this.release=null,this}setBroadcast(){}setTTL(e){return e}setMulticastTTL(e){return e}setMulticastLoopback(e){return e}setMulticastInterface(){}addMembership(){}dropMembership(){}setRecvBufferSize(){}setSendBufferSize(){}getRecvBufferSize(){return 212992}getSendBufferSize(){return 212992}[Symbol.asyncDispose](){return new Promise(e=>this.closed?e():this.close(e))}}return{module:{Socket:o,createSocket:(e,t)=>new o(e,t)},receive:e=>{if(e.op===`udp-bound`){let t=i.get(e.ref);i.delete(e.ref),t?.(e.port)}else r.get(e.to)?.receive(e.address,e.port,e.bytes)}}}var{Duplex:Gh}=Fe,Kh=e=>/^\d+\.\d+\.\d+\.\d+$/.test(e),qh=new Set([``,`localhost`,`127.0.0.1`,`::1`,`0.0.0.0`,`::`]),Jh=e=>qh.has(e)||e.endsWith(`.localhost`),Yh=e=>e.includes(`:`),Xh={EADDRINUSE:-98,ECONNREFUSED:-111,ENETUNREACH:-101,EHOSTUNREACH:-113,ETIMEDOUT:-110,ECONNRESET:-104},Zh={ECONNREFUSED:`connection refused`,ENETUNREACH:`network is unreachable`,EHOSTUNREACH:`no route to host`,ETIMEDOUT:`connection timed out`,ECONNRESET:`connection reset by peer`},Qh=(e,t,n,r,i=`127.0.0.1`)=>Object.assign(Error(`${t} ${e}: ${r}`),{code:e,errno:Xh[e]??-111,syscall:t,address:i,port:n});function $h(e,t,n=null){let r=new Map,i=new Map,a=new Map,o=new Map,s=0,c=zn(n=>new Promise(r=>{let i=++s,a=t();o.set(i,e=>{a(),r(e)}),e({kind:`net`,op:`dns`,ref:i,query:n})})),l=Wh(e,t,c),u=0;class d extends Gh{constructor(e={}){super({allowHalfOpen:e.allowHalfOpen??!1,decodeStrings:!0}),this.id=e.id??0,this.localPort=e.port??0,this.remotePort=49152+Math.floor(Math.random()*16384),this.remoteAddress=`127.0.0.1`,this.remoteFamily=`IPv4`,this.localAddress=`127.0.0.1`,this.server=null,this.connecting=!1,this.bytesRead=0,this.bytesWritten=0,this.release=this.id?t():null,this.timer=null,this.timeout=0,this.gateway=null,this.engine=null,this.securing=null,this.handshaking=!1,this.host=`localhost`,this.tlsOptions={},this.id&&r.set(this.id,this),this.on(`close`,()=>{r.delete(this.id),this.release?.(),this.release=null,this.timer&&clearTimeout(this.timer)})}connect(...n){let i=typeof n.at(-1)==`function`?n.pop():null,a=n[0]&&typeof n[0]==`object`?n[0]:{port:n[0],host:typeof n[1]==`string`?n[1]:void 0};i&&this.once(`connect`,i),a.timeout&&this.setTimeout(a.timeout);let o=Number(a.port),s=a.host??`localhost`;this.connecting=!0;let l=!!a.https||!!a.gateway;if(this.ownTls=!a.gateway,this.host=s,this.tlsOptions=a.tls??{},a.path!==void 0||!(o>0&&o<65536)){let e=a.path===void 0?Object.assign(RangeError(`Port should be > 0 and < 65536. Received ${o}.`),{code:`ERR_SOCKET_BAD_PORT`}):Qh(`ENOENT`,`connect`,0,`no Unix sockets in the playground`);return queueMicrotask(()=>this.destroy(e)),this}if(this.id=u+=2,this.remotePort=o,this.localPort=49152+Math.floor(Math.random()*16384),this.release??=t(),r.set(this.id,this),l)this.gateway=``,e({kind:`net`,op:`connect`,id:this.id,port:o,host:s,via:`https`});else if(Jh(s))e({kind:`net`,op:`connect`,id:this.id,port:o});else{let t=this.id;c.promises.lookup(s).then(({address:n,family:r})=>{this.destroyed||(this.remoteAddress=n,this.remoteFamily=r===6?`IPv6`:`IPv4`,this.emit(`lookup`,null,n,r,s),Jh(n)?e({kind:`net`,op:`connect`,id:t,port:o}):e({kind:`net`,op:`connect`,id:t,port:o,host:n,via:`tcp`}))},e=>{r.delete(t),this.emit(`lookup`,e),this.destroy(e)})}return this}connected(e,t,n=`ECONNREFUSED`){if(this.connecting=!1,!e)r.delete(this.id),this.destroy(Qh(n,`connect`,this.remotePort,Zh[n]??n.toLowerCase(),this.remoteAddress));else{if(t){let e=t.lastIndexOf(`:`);this.localAddress=t.slice(0,e).replace(/^\[|\]$/g,``),this.localPort=Number(t.slice(e+1))}this.gateway===null&&(this.emit(`connect`),this.emit(`ready`))}}receive(e){if(this.securing)return void this.securing.push(e);if(this.engine)return this.decrypt(e);if(this.gateway!==null){let t=e.indexOf(10);if(t<0){this.gateway+=new TextDecoder().decode(e);return}let n=this.gateway+new TextDecoder().decode(e.subarray(0,t)),r=e.subarray(t+1);if(this.gateway=null,n===`tcp`&&this.ownTls)return this.secure(r.slice());if((n===`tcp`||n===`fetch`)&&this.emit(`gateway`,n),n!==`fetch`&&n!==`tcp`){let e=(n.match(/^error (\w+)/)?.[1]??`ehostunreach`).toUpperCase();this.destroy(Qh(e,`connect`,this.remotePort,Zh[e]??e.toLowerCase()));return}if(this.emit(`connect`),this.emit(`ready`),!r.length)return;e=r}this.deliver(e)}deliver(e){this.bytesRead+=e.length,this.touch(),this.push(E.Buffer.from(e.buffer,e.byteOffset,e.length))}secure(e){this.securing=e.length?[e]:[],this.handshaking=!0;let t=this.tlsOptions.servername??(Kh(this.host)||Yh(this.host)?``:this.host);mr.open(n,this.host,{ALPNProtocols:[`http/1.1`],...this.tlsOptions,servername:t}).then(e=>{if(this.destroyed)return e.forget();this.engine=e,this.transmit();for(let e of this.securing.splice(0))this.decrypt(e);this.securing=null},e=>this.destroy(e))}transmit(){let t=this.engine?.take();t?.length&&e({kind:`net`,op:`data`,id:this.id,bytes:t})}decrypt(e){let t;try{t=this.engine.feed(e)}catch(e){this.transmit(),this.destroy(e);return}if(this.transmit(),this.handshaking&&!this.engine.handshaking){this.handshaking=!1;let e=Cr(this.engine,this.host,this.tlsOptions);if(e&&this.tlsOptions.rejectUnauthorized!==!1)return void this.destroy(e);this.emit(`connect`),this.emit(`ready`)}t===null?this.push(null):t.length&&this.deliver(t)}_read(){}_write(e,t,n){this.pending?this.once(`connect`,()=>this.send(e,n)):this.send(e,n)}_final(e){this.pending?this.once(`connect`,()=>this.finish(e)):this.finish(e)}send(t,n){if(this.bytesWritten+=t.length,this.touch(),this.engine){try{this.engine.write(new Uint8Array(t))}catch(e){return n(e)}this.transmit()}else e({kind:`net`,op:`data`,id:this.id,bytes:new Uint8Array(t)});n()}finish(t){this.engine?.close(),this.transmit(),e({kind:`net`,op:`end`,id:this.id}),t()}_destroy(t,n){this.engine?.forget(),this.engine=null,r.has(this.id)&&e({kind:`net`,op:`close`,id:this.id}),r.delete(this.id),n(t)}get readyState(){return this.destroyed?`closed`:`open`}get pending(){return this.connecting||this.gateway!==null||this.handshaking||!this.id}get bufferSize(){return this.writableLength}address(){let e=this.localAddress.includes(`:`)?`IPv6`:`IPv4`;return{address:this.localAddress,family:e,port:this.localPort}}setNoDelay(){return this}setKeepAlive(){return this}setEncoding(e){return super.setEncoding(e),this}setTimeout(e,t){return this.timeout=e,t&&this.once(`timeout`,t),this.touch(),this}touch(){this.timer&&clearTimeout(this.timer),this.timer=null,this.timeout>0&&!this.destroyed&&(this.timer=setTimeout(()=>this.emit(`timeout`),this.timeout),this.timer.unref?.())}ref(){return this.destroyed||(this.release??=t()),this}unref(){return this.release?.(),this.release=null,this}resetAndDestroy(){return this.destroy()}}class f extends Ne.EventEmitter{constructor(e,t){super(),typeof e==`function`&&([t,e]=[e,{}]),this.allowHalfOpen=e?.allowHalfOpen??!1,this.port=null,this.connections=new Set,this.release=null,this.referenced=!0,this.maxConnections=1/0,t&&this.on(`connection`,t)}get listening(){return this.port!==null}listen(...n){let r=typeof n.at(-1)==`function`?n.pop():null,o=n[0];if(o&&typeof o==`object`&&(o=o.port),typeof o==`string`&&!/^\d+$/.test(o))return queueMicrotask(()=>this.emit(`error`,Qh(`EACCES`,`listen`,0,`no Unix sockets in the playground`))),this;let c=Number(o??0);r&&this.once(`listening`,r);let l=++s,u=t();return a.set(l,e=>{u(),e===null?this.emit(`error`,Qh(`EADDRINUSE`,`listen`,c,`address already in use`)):(this.port=e,i.set(e,this),this.referenced&&(this.release=t()),this.emit(`listening`))}),e({kind:`net`,op:`listen`,ref:l,port:c}),this}address(){return this.port===null?null:{address:`127.0.0.1`,family:`IPv4`,port:this.port}}close(t){if(this.port===null){let e=Object.assign(Error(`Server is not running.`),{code:`ERR_SERVER_NOT_RUNNING`});return t&&queueMicrotask(()=>t(e)),this}e({kind:`net`,op:`unlisten`,port:this.port}),i.delete(this.port),this.port=null,this.release?.(),this.release=null;let n=()=>{this.connections.size||(this.emit(`close`),t?.())};for(let e of this.connections)e.once(`close`,n);return queueMicrotask(n),this}getConnections(e){return queueMicrotask(()=>e(null,this.connections.size)),this}ref(){return this.referenced=!0,this.port!==null&&(this.release??=t()),this}unref(){return this.referenced=!1,this.release?.(),this.release=null,this}accept(e){let t=new d({id:e,port:this.port,allowHalfOpen:this.allowHalfOpen});t.server=this,this.connections.add(t),t.on(`close`,()=>this.connections.delete(t)),this.emit(`connection`,t)}[Symbol.asyncDispose](){return new Promise(e=>this.close(()=>e()))}}return{module:{Server:f,Socket:d,Stream:d,createServer:(e,t)=>new f(e,t),createConnection:(...e)=>new d().connect(...e),connect:(...e)=>new d().connect(...e),isIP:e=>Kh(e)?4:Yh(e)?6:0,isIPv4:Kh,isIPv6:Yh,getDefaultAutoSelectFamily:()=>!0,setDefaultAutoSelectFamily(){},getDefaultAutoSelectFamilyAttemptTimeout:()=>250,setDefaultAutoSelectFamilyAttemptTimeout(){},BlockList:class{check(){return!1}addAddress(){}addRange(){}addSubnet(){}}},receive:t=>{if(t.op===`udp`||t.op===`udp-bound`)l.receive(t);else if(t.op===`dns`){let e=o.get(t.ref);o.delete(t.ref),e?.(t.answer)}else if(t.op===`listening`){let e=a.get(t.ref);a.delete(t.ref),e?.(t.port)}else if(t.op===`open`){let n=i.get(t.port);n?n.accept(t.id):e({kind:`net`,op:`close`,id:t.id})}else{let e=r.get(t.id);if(!e)return;if(t.op===`connected`)e.connected(!0,t.local);else if(t.op===`refused`)e.connected(!1,void 0,t.code);else if(t.op===`data`)e.receive(t.bytes);else if(t.op===`end`)e.push(null);else{r.delete(t.id),e.release?.(),e.release=null;let{remotePort:n,remoteAddress:i}=e;t.op===`reset`?e.destroy(Qh(`ECONNRESET`,`read`,n,Zh.ECONNRESET,i)):hr(e)}}},Server:f,Socket:d,dns:c,dgram:l.module}}var{Readable:eg,Writable:tg}=Fe,ng=(e,t)=>e===`inherit`||e===t||!!e&&typeof e==`object`&&e.fd===t,rg=e=>/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replace(/'/g,`'\\''`)}'`,ig=(e,t,n)=>n?[e,...t].join(` `):[e,...t].map(e=>rg(String(e))).join(` `),ag=(e,t)=>e==null?[[],t]:Array.isArray(e)?[e,t]:[[],e],og=e=>typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sg=(e,t)=>{let n=E.Buffer.from(e);return t&&t!==`buffer`?n.toString(t):n},cg=(e,t)=>{let n=e.replace(/\x1b\[[0-9;]*m/g,``).trim();return n===`error: command not found: ${t}`||n===`sh: ${t}: not found in the playground`};function lg(e,t,n){let r=new Map,i=0,a=1e3+Math.floor(Math.random()*1e3);class o extends Ne.EventEmitter{constructor(o,s,c){super();let l=e=>n.files?.throughFd(e)??e;o=l(o),s=s.map(e=>l(String(e))),this.id=++i,this.pid=a++,this.exitCode=null,this.signalCode=null,this.killed=!1,this.connected=!1,this.said=``,this.spawnfile=o,this.spawnargs=[o,...s];let u=Array.isArray(c.stdio)?c.stdio:[c.stdio,c.stdio,c.stdio],d=u[1];this.copy=typeof d==`number`&&d>2&&n.files?n.files.dup(d):null;let f=this.copy;this.sink=d===`inherit`?e=>n.write(1,e):f===null?typeof d==`number`&&d>0?e=>n.write(d,e):d&&typeof d==`object`&&typeof d.write==`function`?d.fd===1||d.fd===2?e=>n.write(d.fd,e):e=>d.write(e):null:e=>n.write(f,e);let p=u[2];this.errorSink=p===`inherit`?e=>n.write(2,e):typeof p==`number`&&p>0&&p!==1?e=>n.write(p,e):p===1?e=>this.output(e):p&&typeof p==`object`&&typeof p.write==`function`?p.fd===1||p.fd===2?e=>n.write(p.fd,e):e=>p.write(e):null;let m=e=>e==null||e===`pipe`||e===`overlapped`;this.stdout=m(u[1])?new eg({read(){}}):null,this.stderr=m(u[2])?new eg({read(){}}):null,this.stdin=m(u[0])?new tg({write:(t,n,r)=>{e({kind:`child`,op:`stdin`,id:this.id,bytes:new Uint8Array(t)}),r()},final:t=>{e({kind:`child`,op:`stdin`,id:this.id,end:!0}),t()}}):null,this.stdio=[this.stdin,this.stdout,this.stderr],this.release=t(),r.set(this.id,this);let h=ig(o,s,c.shell),g=l(c.cwd instanceof URL?c.cwd.pathname:String(c.cwd??n.cwd())),_=Object.fromEntries(Object.entries(c.env??n.env).filter(([,e])=>e!==void 0)),v=[ng(u[0],0),ng(u[1],1)];e({kind:`child`,op:`spawn`,id:this.id,line:h,cwd:String(g),env:_,terminal:v});let{signal:y,timeout:b}=c,x=()=>this.kill(`SIGTERM`);y?.addEventListener(`abort`,x,{once:!0});let S=b?setTimeout(x,b):void 0;this.unwatch=()=>{y?.removeEventListener(`abort`,x),clearTimeout(S)},queueMicrotask(()=>this.emit(`spawn`)),this.shell=!!c.shell}output(e){this.said.length<256&&(this.said+=new TextDecoder().decode(e)),this.sink?this.sink(e):this.stdout?.push(E.Buffer.from(e.buffer,e.byteOffset,e.length))}errorOutput(e){this.said.length<256&&(this.said+=new TextDecoder().decode(e)),this.errorSink?this.errorSink(e):this.stderr?.push(E.Buffer.from(e.buffer,e.byteOffset,e.length))}exited(e){r.delete(this.id),this.unwatch(),this.copy!==null&&n.files?.close(this.copy),this.copy=null;let t=()=>{this.release?.(),this.release=null};if(e===127&&!this.shell&&cg(this.said,this.spawnfile)){let e=Object.assign(Error(`spawn ${this.spawnfile} ENOENT`),{errno:-2,code:`ENOENT`,syscall:`spawn ${this.spawnfile}`,path:this.spawnfile,spawnargs:this.spawnargs.slice(1)});this.stdout?.push(null),this.stderr?.push(null),this.emit(`error`,e),this.emit(`close`,-2,null),t();return}let i=this.killed&&e>=128?this.killedBy:null;this.exitCode=i?null:e,this.signalCode=i,this.stdout?.push(null),this.stderr?.push(null),this.emit(`exit`,this.exitCode,i);let a=()=>{this.emit(`close`,this.exitCode,i),t()},o=[this.stdout,this.stderr].filter(e=>e&&!e.readableEnded&&e.listenerCount(`data`)),s=o.length;for(let e of o)e.once(`end`,()=>--s||a());s||queueMicrotask(a)}kill(t=`SIGTERM`){return this.exitCode!==null||this.signalCode!==null?!1:(this.killed=!0,this.killedBy=$n(t),e({kind:`child`,op:`kill`,id:this.id,signal:t}),!0)}ref(){this.release??=t()}unref(){this.release?.(),this.release=null}disconnect(){}send(){return!1}}function s(e,t,n){return[t,n]=ag(t,n),new o(e,t,n??{})}function c(e,t,n){let r=[],i=[];e.stdout?.on(`data`,e=>r.push(e)),e.stderr?.on(`data`,e=>i.push(e));let a=t.encoding===void 0?`utf8`:t.encoding,o=e=>a&&a!==`buffer`&&E.Buffer.isEncoding(a)?e.toString(a):e;return e.on(`error`,e=>n?.(e,o(E.Buffer.alloc(0)),o(E.Buffer.alloc(0)))),e.on(`close`,(t,a)=>{if(t===-2)return;let s=E.Buffer.concat(r),c=E.Buffer.concat(i),l=t===0?null:Object.assign(Error(`Command failed: ${e.spawnargs.join(` `)}\n${c}`),{code:t,killed:e.killed,signal:a,cmd:e.spawnargs.join(` `)});n?.(l,o(s),o(c))}),e}function l(e,t,n){typeof t==`function`&&([n,t]=[t,{}]);let r=t??{};return c(s(e,[],{...r,shell:!0}),r,n)}function u(e,t,n,r){typeof t==`function`?[r,t,n]=[t,[],{}]:t==null?t=[]:Array.isArray(t)||([r,n,t]=[n,t,[]]),typeof n==`function`&&([r,n]=[n,{}]);let i=n??{};return c(s(e,t,i),i,r)}function d(e,t,n){return[t,n]=ag(t,n),s(`node`,[e,...t],{stdio:`inherit`,...n})}function f(t,r,o){[r,o]=ag(r,o);let s=o??{},c=Math.min(s.maxBuffer===void 0?1<<20:s.maxBuffer===1/0?64<<20:s.maxBuffer,256<<20),l=new SharedArrayBuffer(16+2*c),u=new Int32Array(l,0,4),d=Array.isArray(s.stdio)?s.stdio:[s.stdio,s.stdio,s.stdio],f=d[1]===`inherit`||d[1]===1,p=[ng(d[0],0),ng(d[1],1)],m=s.cwd instanceof URL?s.cwd.pathname:s.cwd??n.cwd(),h=Object.fromEntries(Object.entries(s.env??n.env).filter(([,e])=>e!==void 0)),g=++i,_=a++;e({kind:`child`,op:`spawn`,id:g,line:ig(t,r,s.shell),cwd:String(m),env:h,input:s.input===void 0?p[0]?void 0:new Uint8Array:og(s.input),shared:l,inherit:f,terminal:p});let v=s.timeout?Date.now()+s.timeout:1/0,y=!1;for(;Atomics.load(u,0)===0;){let t=v-Date.now();t<=0&&!y&&(y=!0,e({kind:`child`,op:`kill`,id:g,signal:`SIGTERM`})),Atomics.wait(u,0,0,y||t===1/0?void 0:t)}let b=Atomics.load(u,1),x=Atomics.load(u,2),S=Atomics.load(u,3),C=new Uint8Array(l,16,Math.max(0,x)).slice(),w=new Uint8Array(l,16+c,Math.max(0,S)).slice(),T=sg(C,s.encoding),E=sg(w,s.encoding),D={pid:_,output:[null,T,E],stdout:T,stderr:E,status:y?null:b,signal:y?`SIGTERM`:null};return x<0||S<0?D.error=Object.assign(Error(`spawnSync ${t} ENOBUFS`),{code:`ENOBUFS`,errno:-105,syscall:`spawnSync ${t}`}):y?D.error=Object.assign(Error(`spawnSync ${t} ETIMEDOUT`),{code:`ETIMEDOUT`,errno:-110,syscall:`spawnSync ${t}`}):b===127&&!s.shell&&cg(new TextDecoder().decode(w)+new TextDecoder().decode(C),t)&&(D.status=null,D.error=Object.assign(Error(`spawnSync ${t} ENOENT`),{code:`ENOENT`,errno:-2,syscall:`spawnSync ${t}`,path:t,spawnargs:r})),D}function p(e,t){if(e.error)throw Object.assign(e.error,e);if(e.status!==0)throw Object.assign(Error(`Command failed: ${t}\n${String(e.stderr)}`),e);return e.stdout}function m(e,t){return p(f(e,[],{...t,shell:!0}),e)}function h(e,t,n){return[t,n]=ag(t,n),p(f(e,t,n),[e,...t].join(` `))}let g=e=>{let t=r.get(e.id);t&&(e.op===`out`?t.output(e.bytes):e.op===`err`?t.errorOutput(e.bytes):t.exited(e.code))},_=Symbol.for(`nodejs.util.promisify.custom`),v=e=>(...t)=>new Promise((n,r)=>e(...t,(e,t,i)=>e?r(Object.assign(e,{stdout:t,stderr:i})):n({stdout:t,stderr:i})));return Object.assign(l,{[_]:v(l)}),Object.assign(u,{[_]:v(u)}),{module:{ChildProcess:o,spawn:s,exec:l,execFile:u,fork:d,spawnSync:f,execSync:m,execFileSync:h},receive:g}}function ug(e,t){let n=[];for(let r of e.split(`/`))r&&r!==`.`&&(r===`..`?n.length&&n[n.length-1]!==`..`?n.pop():t||n.push(`..`):n.push(r));return n.join(`/`)}function dg(e){let t=e.lastIndexOf(`.`);return t<=0||e===`..`?``:e.slice(t)}function fg(e){let t=e.indexOf(`{`);if(t===-1)return[e];let n=[],r=0,i=t+1;for(let a=t;a<e.length;a++)if(e[a]===`{`)r++;else if(e[a]===`}`&&--r===0){if(n.push(e.slice(i,a)),n.length===1)return fg(e.slice(a+1)).map(t=>`${e.slice(0,a+1)}${t}`);let r=fg(e.slice(a+1));return n.flatMap(n=>fg(e.slice(0,t)+n).flatMap(e=>r.map(t=>e+t)))}else e[a]===`,`&&r===1&&(n.push(e.slice(i,a)),i=a+1);return[e]}var pg=`(?!\\.)[^/]+`;function mg(e){let t=e.split(`/`).map(e=>{if(e===`**`)return null;let t=e.startsWith(`.`)?``:`(?!\\.)`;for(let n=0;n<e.length;n++){let r=e[n],i=r===`[`?e.indexOf(`]`,n+2):-1;if(r===`*`)t+=`[^/]*`;else if(r===`?`)t+=`[^/]`;else if(i!==-1){let r=e.slice(n+1,i).replace(/\\/g,`\\\\`);(r[0]===`!`||r[0]===`^`)&&(r=`^/${r.slice(1)}`),t+=`[${r}]`,n=i}else t+=r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}return t}),n=``;return t.forEach((e,r)=>{let i=r===0,a=r===t.length-1;n+=e===null?a?`${i?``:`/`}(?:${pg}(?:/${pg})*)?`:`${i?``:`/`}(?:${pg}/)*`:(i||t[r-1]===null?``:`/`)+e}),n}function hg(e){let t={sep:`/`,delimiter:`:`,resolve(...t){let n=``;for(let r=t.length-1;r>=-1&&!n.startsWith(`/`);r--){let i=r>=0?t[r]:e();i&&(n=n?`${i}/${n}`:i)}return`/${ug(n,!0)}`},normalize(e){if(!e)return`.`;let t=e.startsWith(`/`),n=e.endsWith(`/`),r=ug(e,t);return!r&&!t&&(r=`.`),r&&n&&(r+=`/`),t?`/${r}`:r},isAbsolute:e=>e.startsWith(`/`),join(...e){let n=e.filter(e=>e!==``).join(`/`);return n?t.normalize(n):`.`},relative(e,n){if(e===n)return``;let r=t.resolve(e).split(`/`).filter(Boolean),i=t.resolve(n).split(`/`).filter(Boolean),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a++;return[...r.slice(a).map(()=>`..`),...i.slice(a)].join(`/`)},dirname(e){if(!e)return`.`;let t=-1,n=!0;for(let r=e.length-1;r>=1;r--)if(e[r]!==`/`)n=!1;else if(!n){t=r;break}return t===-1?e[0]===`/`?`/`:`.`:e[0]===`/`&&t===1?`//`:e.slice(0,t)},basename(e,t){let n=e.replace(/\/+$/,``).split(`/`).pop()??``;return!t||t.length>e.length?n:t===e?``:n!==t&&n.endsWith(t)?n.slice(0,-t.length):n},extname(e){return dg(e.replace(/\/+$/,``).split(`/`).pop())},parse(e){let t=e.startsWith(`/`)?`/`:``,n=e.replace(/(?<=.)\/+$/,``),r=n.lastIndexOf(`/`),i=n.slice(r+1),a=i===`..`&&r===0?`.`:dg(i);return{root:t,dir:r<=0?t:n.slice(0,r),base:i,ext:a,name:a?i.slice(0,-a.length):i}},format(e){let t=e.base||`${e.name??``}${e.ext?(e.ext.startsWith(`.`)?``:`.`)+e.ext:``}`,n=e.dir||e.root||``;return n?n===e.root?`${n}${t}`:`${n}/${t}`:t},toNamespacedPath:e=>e,matchesGlob(e,t){let n=fg(t).map(mg).join(`|`);return RegExp(`^(?:${n})/?$`).test(e)},posix:null,win32:null};return t.posix=t,t.win32=t,t}var gg=`v24.11.0`;function _g(e){let{io:t}=e,n=e.cwd,r=0,i=!1,a=!1,o=globalThis.setTimeout.bind(globalThis),s=globalThis.clearTimeout.bind(globalThis),c=globalThis.setInterval.bind(globalThis),l=globalThis.clearInterval.bind(globalThis),u=new Ne.EventEmitter,d=()=>{if(a||i)return;a=!0;let e=()=>r===0&&!i;o(()=>{if(!e())return void(a=!1);o(()=>{a=!1,e()&&(u.emit(`beforeExit`,u.exitCode??0),!(r>0)&&p(Number(u.exitCode??0)))},0)},0)},f=()=>{r++;let e=!0;return()=>{e&&(e=!1,r--,d())}},p=e=>{if(!i){i=!0,(u.exitCode!==void 0||e!==0)&&(u.exitCode=e);try{u.emit(`exit`,e)}catch(e){t.write(2,x(`${da(e)}\n`))}e=Number(u.exitCode??e)}return t.exit(e)};class m{id;repeat;restart;release=null;referenced=!0;pending=!0;constructor(e,t,n){this.id=e,this.repeat=t,this.restart=n,this.update()}update(){this.referenced&&this.pending?this.release??=f():(this.release?.(),this.release=null)}ref(){return this.referenced=!0,this.update(),this}unref(){return this.referenced=!1,this.update(),this}hasRef(){return this.referenced}refresh(){return(this.repeat?l:s)(this.id),h.delete(Number(this.id)),this.id=this.restart(),h.set(Number(this.id),this),this.pending=!0,this.update(),this}close(){return(this.repeat?l:s)(this.id),this.pending=!1,this.update(),this}done(){this.repeat||(this.pending=!1,this.update())}[Symbol.toPrimitive](){return Number(this.id)}}let h=new Map,g=e=>()=>{try{e()}catch(e){L(e)}},_=(e,t=0,...n)=>{let r=()=>o(g(()=>{h.delete(Number(i.id)),i.done(),e(...n)}),t),i=new m(r(),!1,r);return h.set(Number(i.id),i),i},v=(e,t=0,...n)=>{let r=()=>c(g(()=>e(...n)),t),i=new m(r(),!0,r);return h.set(Number(i.id),i),i},y=e=>{let t=e instanceof m?e:h.get(Number(e));t&&(h.delete(Number(t.id)),t.close())},b=(e,...t)=>_(e,0,...t),x=e=>new TextEncoder().encode(e),S=[],C=!1,w=()=>{try{for(let e=S.shift();e;e=S.shift())try{e[0](...e[1])}catch(e){queueMicrotask(()=>{throw e})}}finally{C=!1}},T=(e,...t)=>{S.push([e,t]),C||(C=!0,queueMicrotask(w))},D=[e.columns,e.rows??24],O=n=>{let r=new Ne.EventEmitter;return Object.assign(r,{fd:n,isTTY:e.tty,columns:e.columns,rows:e.rows??24,writable:!0,_isStdio:!0,write(e,r,i){typeof r==`function`&&(i=r);let a=typeof e==`string`?E.Buffer.from(e,typeof r==`string`?r:`utf8`):e;return t.write(n,a),i&&queueMicrotask(i),!0},end(e,t,n){e&&r.write(e,t),typeof n==`function`&&queueMicrotask(n)},cork(){},uncork(){},setDefaultEncoding:()=>r,getColorDepth:()=>e.tty?8:1,hasColors:(t=16)=>e.tty&&t<=256,getWindowSize:()=>[...D],cursorTo(e,r,i){return typeof r==`function`&&([i,r]=[r,void 0]),t.write(n,x(r===void 0?`\x1b[${e+1}G`:`\x1b[${r+1};${e+1}H`)),i&&queueMicrotask(i),!0},moveCursor(e,r,i){let a=``;return e&&(a+=e<0?`\x1b[${-e}D`:`\x1b[${e}C`),r&&(a+=r<0?`\x1b[${-r}A`:`\x1b[${r}B`),a&&t.write(n,x(a)),i&&queueMicrotask(i),!0},clearLine(e=0,r){return t.write(n,x(e<0?`\x1B[1K`:e>0?`\x1B[0K`:`\x1B[2K`)),r&&queueMicrotask(r),!0},clearScreenDown(e){return t.write(n,x(`\x1B[0J`)),e&&queueMicrotask(e),!0},_writableState:{needDrain:!1,length:0},writableLength:0,writableHighWaterMark:16384,writableNeedDrain:!1,destroyed:!1,destroy:()=>r}),r},k=O(1),A=O(2),{Readable:j}=Fe,M=new j({read(){}}),N=null,P=!0,F=()=>{P&&!M.readableEnded&&!M.destroyed&&(M.readableFlowing===!0||M.listenerCount(`readable`)>0)?N??=f():(N?.(),N=null)},I=()=>queueMicrotask(F);for(let e of[`resume`,`pause`,`end`,`close`])M.on(e,I);M.on(`newListener`,I),M.on(`removeListener`,I),Object.assign(M,{fd:0,isTTY:e.stdinTty??!1,isRaw:!1,setRawMode(t){return M.isTTY&&(M.isRaw=!!t,e.raw?.(!!t)),M},ref(){return P=!0,F(),M},unref(){return P=!1,F(),M}});let ee=e=>{e===null?M.push(null):M.push(E.Buffer.from(e.buffer,e.byteOffset,e.length))},te=(e,t)=>{D=[e,t];for(let n of[k,A])n.columns=e,n.rows=t,n.emit(`resize`);u.emit(`SIGWINCH`)},L=n=>{if(u.listenerCount(`uncaughtException`)){u.emit(`uncaughtException`,n,`uncaughtException`);return}e.report&&(e.report(n),p(1));let r=n instanceof Error?da(n):`Uncaught ${da(n)}`;t.write(2,x(`${r}\n\nNode.js ${gg}\n`)),p(1)},R=performance.now(),ne=e=>{let t=performance.now()+performance.timeOrigin,n=Math.floor(t/1e3),r=Math.floor(t%1e3*1e6);return e&&(n-=e[0],r-=e[1],r<0&&(n--,r+=1e9)),[n,r]};return ne.bigint=()=>BigInt(Math.floor((performance.now()+performance.timeOrigin)*1e6)),Object.assign(u,{title:`node`,version:gg,versions:{node:gg.slice(1),v8:`13.6.233.10-node.30`,uv:`1.51.0`,modules:`137`},release:{name:`node`,lts:`Krypton`},arch:`x64`,platform:`linux`,argv:e.argv,argv0:`node`,execArgv:[],execPath:`/usr/bin/node`,env:e.env,pid:42,ppid:1,exitCode:void 0,features:{inspector:!1,typescript:`strip`},config:{variables:{}},stdout:k,stderr:A,stdin:M,cwd:()=>n,chdir(t){let r=hg(()=>n).resolve(String(t)),i=e.stat?e.stat(r):{isDirectory:()=>!0};if(!i||!i.isDirectory()){let[e,r,a]=i?[`ENOTDIR`,-20,`not a directory`]:[`ENOENT`,-2,`no such file or directory`],o=Error(`${e}: ${a}, chdir '${n}' -> '${t}'`);throw Object.assign(o,{errno:r,code:e,syscall:`chdir`,path:n,dest:t})}n=r},exit(e){return e!==void 0&&(u.exitCode=e),p(Number(u.exitCode??0))},reallyExit:e=>t.exit(Number(e??0)),abort:()=>p(134),kill:()=>!0,nextTick:T,hrtime:ne,uptime:()=>(performance.now()-R)/1e3,memoryUsage:Object.assign(()=>({rss:5e7,heapTotal:3e7,heapUsed:2e7,external:1e6,arrayBuffers:1e6}),{rss:()=>5e7}),cpuUsage:()=>({user:Math.round((performance.now()-R)*1e3),system:0}),resourceUsage:()=>({}),umask:()=>18,getuid:()=>1e3,getgid:()=>1e3,geteuid:()=>1e3,getegid:()=>1e3,getgroups:()=>[1e3],emitWarning(e,n){let r=typeof n==`string`?n:n?.type??`Warning`,i=e instanceof Error?`${e.name}: ${e.message}`:`${r}: ${e}`;t.write(2,x(`(node:42) ${i}\n`))},binding:()=>{throw Error(`process.binding is not supported`)},report:{getReport:()=>({header:{glibcVersionRuntime:`2.39`}})},allowedNodeEnvironmentFlags:new Set,setUncaughtExceptionCaptureCallback:()=>{},hasUncaughtExceptionCaptureCallback:()=>!1,setSourceMapsEnabled:()=>{},sourceMapsEnabled:!1,loadEnvFile:()=>{},constrainedMemory:()=>0,availableMemory:()=>2**31}),{process:u,console:vg(k,A,e.tty),timers:{setTimeout:_,setInterval:v,setImmediate:b,clearTimeout:y,clearInterval:y,clearImmediate:y},hold:f,check:d,fail:L,end:p,input:ee,resized:te}}function vg(e,t,n){let r=``,i=new Map,a=new Map,o=e=>(...t)=>{let i=ha({colors:n},...t);e.write(`${r?i.replace(/^/gm,r):i}\n`)},s=o(e),c=o(t);return{log:s,info:s,debug:s,error:c,warn:c,trace:(...e)=>c(`Trace: ${ha({},...e)}\n${Error().stack?.split(`
169
+ `).slice(2).join(`
170
+ `)??``}`),dir:(t,r)=>e.write(`${da(t,{colors:n,...r})}\n`),dirxml:s,table:s,assert:(e,...t)=>{e||c(`Assertion failed`,...t.length?[`:`,...t]:[])},count:(e=`default`)=>{let t=(i.get(e)??0)+1;i.set(e,t),s(`${e}: ${t}`)},countReset:(e=`default`)=>i.delete(e),time:(e=`default`)=>a.set(e,performance.now()),timeLog:(e=`default`,...t)=>s(`${e}: ${(performance.now()-(a.get(e)??0)).toFixed(3)}ms`,...t),timeEnd:(e=`default`)=>{s(`${e}: ${(performance.now()-(a.get(e)??0)).toFixed(3)}ms`),a.delete(e)},group:(...e)=>{e.length&&s(...e),r+=` `},groupCollapsed:(...e)=>{e.length&&s(...e),r+=` `},groupEnd:()=>{r=r.slice(2)},clear:()=>{},profile:()=>{},profileEnd:()=>{},timeStamp:()=>{}}}var yg=1;function bg(e){let t=globalThis.MessageChannel;return class extends t{constructor(){super(),Sg(this.port1,e),Sg(this.port2,e)}}}var xg=Symbol(`node port`);function Sg(e,t){let n=e;if(n[xg])return;n[xg]=!0;let r=null,i=!1,a=!1,o=0,s=!1,c=()=>{let e=!s&&(i||o>0&&!a);e&&!r?r=t():!e&&r&&(r(),r=null)},l=new Map,u=(t,n)=>{if(t===`message`){let t=e=>n(e.data);l.set(n,t),e.addEventListener(`message`,t),e.start(),o++,c()}else t===`close`&&e.addEventListener(`close`,n);return e},d=(t,n)=>{let r=l.get(n);return t===`message`&&r&&(e.removeEventListener(`message`,r),l.delete(n),o--,c()),e};Object.assign(n,{on:u,addListener:u,once:(e,t)=>{let n=(...r)=>{d(e,n),t(...r)};return u(e,n)},off:d,removeListener:d,removeAllListeners:()=>{for(let e of[...l.keys()])d(`message`,e);return e},ref:()=>(i=!0,a=!1,c(),e),unref:()=>(i=!1,a=!0,c(),e),hasRef:()=>r!==null});let f=e.close.bind(e);n.close=()=>{s=!0,c(),f()};let p=null;Object.defineProperty(n,"onmessage",{get:()=>p,set:t=>{p&&e.removeEventListener(`message`,p),p&&!t&&o--,t&&!p&&o++,p=t,t&&(e.addEventListener(`message`,t),e.start()),c()}})}var Cg=(e,t)=>{for(let n of e??[])Sg(n,t)};function wg(e,t,n=new Set){if(e&&typeof e==`object`&&!n.has(e)){if(n.add(e),e instanceof MessagePort)Sg(e,t);else if(Array.isArray(e))for(let r of e)wg(r,t,n);else if(Object.getPrototypeOf(e)===Object.prototype)for(let r of Object.values(e))wg(r,t,n)}}async function Tg(e,t){for(;o(e,t);)await new Promise(e=>setTimeout(e,5))}function Eg(e){let t=e.shared.lock,r=e.self?Dg(e):null;wg(e.self?.workerData,e.hold);class a extends Ne.EventEmitter{threadId;resourceLimits={};thread;release;exited=!1;token;onmessage=null;constructor(n,r={}){super(),this.threadId=yg++,this.token=i(t,e.self?.token??1);let a=new Blob([`import ${JSON.stringify(e.script)};`],{type:`text/javascript`});this.thread=new globalThis.Worker(URL.createObjectURL(a),{type:`module`}),this.release=e.hold();let o=String(n),s=r.eval?null:e.resolve(o.startsWith(`file://`)?decodeURIComponent(new URL(o).pathname):o),c={threadId:this.threadId,token:this.token,file:s,code:r.eval?o:null,workerData:r.workerData,argv:(r.argv??[]).map(String),env:typeof r.env==`object`?r.env:e.env};this.thread.onmessage=({data:t,ports:n})=>{Cg(n,e.hold),this.receive(t)},this.thread.onerror=e=>{e.preventDefault(),this.emit(`error`,Error(e.message||`the worker failed to start`)),this.finish(1)},this.thread.postMessage({kind:`start`,...e.shared,cwd:e.cwd(),thread:c},r.transferList??[]),queueMicrotask(()=>this.emit(`online`))}receive(t){t.kind===`out`?e.write(t.fd,t.bytes):t.kind===`message`?this.emit(`message`,t.data):t.kind===`error`?this.emit(`error`,t.error):t.kind===`exit`&&this.finish(t.code)}finish(e){this.exited||(this.exited=!0,n(t,this.token),Tg(t,this.token).then(()=>{this.thread.terminate(),setTimeout(()=>s(t,this.token),1e3)}),this.release?.(),this.release=null,this.emit(`exit`,e))}postMessage(e,t){let n=Array.isArray(t)?t:t?.transfer??[];this.thread.postMessage({kind:`message`,data:e},n)}terminate(){return this.finish(1),Promise.resolve(1)}ref(){return this.exited||(this.release??=e.hold()),this}unref(){return this.release?.(),this.release=null,this}getHeapSnapshot(){throw Error(`worker.getHeapSnapshot is not available in the playground`)}get stdout(){return null}get stderr(){return null}}return{isMainThread:!e.self,threadId:e.self?.threadId??0,workerData:e.self?.workerData??null,parentPort:r,resourceLimits:{},SHARE_ENV:Symbol.for(`nodejs.worker_threads.SHARE_ENV`),Worker:a,get MessageChannel(){return globalThis.MessageChannel},MessagePort,BroadcastChannel,markAsUntransferable(){},markAsUncloneable(){},isMarkedAsUntransferable:()=>!1,moveMessagePortToContext:e=>e,receiveMessageOnPort:()=>void 0,getEnvironmentData:()=>void 0,setEnvironmentData(){},deliver(t,n){Cg(n,e.hold),r?.deliver?.(t)}}}function Dg(e){let t=new Ne.EventEmitter,n=null,r=[];return t.on(`newListener`,i=>{i===`message`&&(n??=e.hold(),queueMicrotask(()=>{for(;r.length&&t.listenerCount(`message`);)t.emit(`message`,r.shift())}))}),t.on(`removeListener`,e=>{e===`message`&&!t.listenerCount(`message`)&&n&&(n(),n=null)}),Object.assign(t,{deliver(e){t.listenerCount(`message`)?t.emit(`message`,e):r.push(e)},postMessage(t,n){let r=Array.isArray(n)?n:n?.transfer??[];e.post({kind:`message`,data:t},r)},close(){n?.(),n=null},ref:()=>t,unref(){return n?.(),n=null,t},start(){}}),t}var Og=[`/work`,`/tmp`,`/home`,`/shared`];function kg(t,n,r){let i=e=>Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e);class o{wasi;returnOnExit;constructor(r={}){this.returnOnExit=r.returnOnExit??!0;let o=Object.fromEntries(Object.entries(r.env??{}).filter(e=>e[1]!==void 0));this.wasi=new a({args:r.args??[],env:o,root:new e,stdin:()=>new Uint8Array,stdout:e=>n(1,e.slice()),stderr:e=>n(2,e.slice()),sleep:i,fetch:e=>{throw Error(`${e}: no such file`)},shared:{prefixes:Og,call:t}})}get wasiImport(){return this.wasi.imports.wasi_snapshot_preview1}getImportObject(){return{wasi_snapshot_preview1:this.wasiImport}}start(e){let t=this.wasi.start(e);return!this.returnOnExit&&t!==0&&r(t),t}initialize(e){this.wasi.memory=e.exports.memory;try{e.exports._initialize?.()}catch(e){if(!(e instanceof c))throw e}}}return{WASI:o}}var Ag=`Usage: node [options] [ script.js | -e "script" ] [arguments]
171
+
172
+ -e, --eval script evaluate script
173
+ -p, --print script evaluate script and print the result
174
+ -r, --require module require a module first
175
+ -v, --version print Node.js's version
176
+ -h, --help print this help
177
+
178
+ The playground's Node runs scripts on the browser's JavaScript engine; it
179
+ has no REPL or child processes yet.
180
+ `,jg=new TextEncoder,Mg=globalThis.postMessage.bind(globalThis),Ng={write(e,t){Mg({kind:`out`,fd:e,bytes:t.slice()})},exit(e){throw Mg({kind:`exit`,code:e&255}),Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0),Error(`stopped`)}};function Pg(e){let t={eval:null,print:!1,script:null,rest:[],requires:[],version:!1,help:!1};for(let n=0;n<e.length;n++){let r=e[n];if(r===`--`){t.script=e[n+1]??null,t.rest=e.slice(n+2);break}if(r===`-e`||r===`--eval`||r===`-p`||r===`--print`||r===`-pe`){t.eval=e[++n]??``,t.print=r!==`-e`&&r!==`--eval`,t.rest=e.slice(n+1);break}if(r.startsWith(`--eval=`)||r.startsWith(`--print=`)){t.eval=r.slice(r.indexOf(`=`)+1),t.print=r.startsWith(`--print=`),t.rest=e.slice(n+1);break}if(r===`-r`||r===`--require`||r===`--import`)t.requires.push(e[++n]);else if(r===`-v`||r===`--version`)t.version=!0;else if(r===`-h`||r===`--help`)t.help=!0;else if(r.startsWith(`-`))/^--(stack-size|max-old-space-size|input-type|conditions|loader|experimental-loader|title)$/.test(r)&&n++;else{t.script=r,t.rest=e.slice(n+1);break}}return t}var Fg=null,Ig=null,Lg=null,Rg=null,zg=null,Bg=[],Vg=e=>{if(!zg)return void Bg.push(e);e.kind===`resize`?zg.resized(e.columns,e.rows):zg.input(e.end?null:e.bytes)};async function Hg(e){let t=e.thread??null,n=e.lock??l(),i=r(e.doorbell,e.channel,n,t?.token??1),a=t?{eval:t.code,print:!1,script:t.file,rest:t.argv,requires:[],version:!1,help:!1}:Pg(e.args);a.version&&(Ng.write(1,jg.encode(`${gg}\n`)),Ng.exit(0)),a.help&&(Ng.write(1,jg.encode(Ag)),Ng.exit(0)),a.eval===null&&a.script===null&&(Ng.write(2,jg.encode(`node: the playground has no REPL yet: run a file, or -e "code"
181
+ `)),Ng.exit(9));let o={...t?.env??e.env,PWD:e.cwd},s,c=hg(()=>s?s.process.cwd():e.cwd),u=xo(i,()=>c.resolve(`.`),e=>c.resolve(e)),d=a.script?c.resolve(a.script):`[eval]`;if(s=_g({argv:[`/usr/bin/node`,...a.script?[d]:[],...a.rest],env:o,cwd:e.cwd,io:Ng,tty:e.tty??!1,columns:e.columns??80,rows:e.rows??24,stdinTty:!t&&(e.stdinTty??!1),raw:e=>Mg({kind:`tty`,raw:e}),report:t?e=>Mg({kind:`error`,error:e}):void 0,stat:e=>u.module.statSync(e,{throwIfNoEntry:!1})}),!t){zg=s;for(let e of Bg.splice(0))Vg(e)}let{process:f,console:p,timers:m,hold:h,fail:g}=s;u.setStdio((e,t)=>Ng.write(e,t)),u.setLater(e=>m.setImmediate(e)),u.setHold(h),Rg=u.changed,Fg=Eg({script:import.meta.url,shared:{args:[],env:e.env,doorbell:e.doorbell,channel:e.channel,lock:n,tty:e.tty,columns:e.columns},cwd:()=>f.cwd(),env:o,write:(e,t)=>Ng.write(e,t),hold:h,resolve:e=>c.resolve(e),self:t,post:Mg});let _=Fg,v=kg(i,(e,t)=>Ng.write(e,t),s.end);Ig=t?null:$h(Mg,h,e.tls??null),Lg=t?null:lg(Mg,h,{cwd:()=>f.cwd(),env:o,write:(e,t)=>e<=2?Ng.write(e,t):u.module.writeSync(e,t),files:{dup:u.dup,close:e=>u.module.closeSync(e),throughFd:u.throughFd}});let y,b=Ea({fs:u.module,fsPromises:u.promises,path:c,process:f,console:p,timers:m,module:()=>y.moduleBuiltin(),env:o,tty:e.tty??!1,stdinTty:!t&&(e.stdinTty??!1),wasi:()=>v,threads:()=>_,net:Ig,tls:e.tls??null,child:Lg});y=zh({fs:u.module,path:c,builtin:b,builtins:wa,env:o,hold:h}),y.setProcess(()=>({cwd:f.cwd})),t||(globalThis.fetch=eo(b(`http`),b(`https`),globalThis.fetch.bind(globalThis),h)),f.getBuiltinModule=e=>{let t=String(e).replace(/^node:/,``);return wa.includes(t)?b(t):void 0},globalThis.MessageChannel=bg(h),oo(),Object.assign(globalThis,{global:globalThis,process:f,Buffer:E.Buffer,console:p,...m});for(let[e,t]of[[`self`,globalThis],[`navigator`,globalThis.navigator]])Object.defineProperty(globalThis,e,{value:t,writable:!0,configurable:!0,enumerable:!0});addEventListener(`error`,e=>{e.preventDefault(),g(e.error??e.message)}),addEventListener(`unhandledrejection`,e=>{if(e.preventDefault(),f.listenerCount(`unhandledRejection`)){f.emit(`unhandledRejection`,e.reason,e.promise);return}if(t)return g(e.reason);let n=e.reason,r=n instanceof Error?da(n):`Uncaught ${da(n)}`;Ng.write(2,jg.encode(`${r}\n\nNode.js ${gg}\n`)),s.end(1)}),e.bun&&!t&&await Ya({readFile:e=>u.module.readFileSync(e,`utf8`),crc32:e=>b(`zlib`).crc32(e),which:e=>{if(!/^[\w.+-]+$/.test(e))return null;try{let{execSync:t}=b(`child_process`);return t(`command -v ${e}`,{encoding:`utf8`}).trim()||null}catch{return null}},stdin:()=>new ReadableStream({start(e){let t=f.stdin;t.on(`data`,t=>e.enqueue(t)),t.on(`end`,()=>e.close())}})});let x=h();try{for(let t of a.requires)y.createRequire(`${e.cwd}/`)(t);if(a.eval!==null){let t=y.evaluate(a.eval,e.cwd);a.print&&p.log(typeof t==`string`?t:da(t,{colors:e.tty}))}else await y.runMain(d)}catch(e){g(e)}finally{x()}}addEventListener(`message`,e=>{let t=e.data;t?.kind===`start`?Hg(t):t?.kind===`message`?Fg?.deliver(t.data,e.ports):t?.kind===`net`?Ig?.receive(t):t?.kind===`child`?Lg?.receive(t):t?.kind===`changed`?Rg?.(t.paths):(t?.kind===`stdin`||t?.kind===`resize`)&&Vg(t)});export{y as n,v as t};