9remote 0.1.1 → 0.1.4

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 (117) hide show
  1. package/dist/cli.cjs +83 -68
  2. package/dist/server.cjs +25 -29
  3. package/dist/standalone/.next/BUILD_ID +1 -1
  4. package/dist/standalone/.next/build-manifest.json +2 -2
  5. package/dist/standalone/.next/prerender-manifest.json +3 -3
  6. package/dist/standalone/.next/server/app/_global-error.html +2 -2
  7. package/dist/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/dist/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/dist/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/dist/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/dist/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/dist/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/dist/standalone/.next/server/app/_not-found.html +1 -1
  14. package/dist/standalone/.next/server/app/_not-found.rsc +1 -1
  15. package/dist/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  16. package/dist/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  17. package/dist/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  18. package/dist/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  19. package/dist/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  20. package/dist/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/dist/standalone/.next/server/app/index.html +2 -2
  22. package/dist/standalone/.next/server/app/index.rsc +1 -1
  23. package/dist/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  24. package/dist/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  25. package/dist/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  26. package/dist/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  27. package/dist/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  28. package/dist/standalone/.next/server/app/login/page.js.nft.json +1 -1
  29. package/dist/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  30. package/dist/standalone/.next/server/app/login.html +1 -1
  31. package/dist/standalone/.next/server/app/login.rsc +1 -1
  32. package/dist/standalone/.next/server/app/login.segments/_full.segment.rsc +1 -1
  33. package/dist/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  34. package/dist/standalone/.next/server/app/login.segments/_index.segment.rsc +1 -1
  35. package/dist/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  36. package/dist/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  37. package/dist/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  38. package/dist/standalone/.next/server/app/remote/page.js.nft.json +1 -1
  39. package/dist/standalone/.next/server/app/remote/page_client-reference-manifest.js +1 -1
  40. package/dist/standalone/.next/server/app/remote.html +1 -1
  41. package/dist/standalone/.next/server/app/remote.rsc +1 -1
  42. package/dist/standalone/.next/server/app/remote.segments/_full.segment.rsc +1 -1
  43. package/dist/standalone/.next/server/app/remote.segments/_head.segment.rsc +1 -1
  44. package/dist/standalone/.next/server/app/remote.segments/_index.segment.rsc +1 -1
  45. package/dist/standalone/.next/server/app/remote.segments/_tree.segment.rsc +1 -1
  46. package/dist/standalone/.next/server/app/remote.segments/remote/__PAGE__.segment.rsc +1 -1
  47. package/dist/standalone/.next/server/app/remote.segments/remote.segment.rsc +1 -1
  48. package/dist/standalone/.next/server/app/terminal/page/react-loadable-manifest.json +1 -1
  49. package/dist/standalone/.next/server/app/terminal/page.js.nft.json +1 -1
  50. package/dist/standalone/.next/server/app/terminal/page_client-reference-manifest.js +1 -1
  51. package/dist/standalone/.next/server/app/terminal.html +1 -1
  52. package/dist/standalone/.next/server/app/terminal.rsc +2 -2
  53. package/dist/standalone/.next/server/app/terminal.segments/_full.segment.rsc +2 -2
  54. package/dist/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
  55. package/dist/standalone/.next/server/app/terminal.segments/_index.segment.rsc +1 -1
  56. package/dist/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +1 -1
  57. package/dist/standalone/.next/server/app/terminal.segments/terminal/__PAGE__.segment.rsc +2 -2
  58. package/dist/standalone/.next/server/app/terminal.segments/terminal.segment.rsc +1 -1
  59. package/dist/standalone/.next/server/chunks/ssr/{[root-of-the-server]__c4510a54._.js → [root-of-the-server]__9ae89159._.js} +3 -3
  60. package/dist/standalone/.next/server/pages/404.html +1 -1
  61. package/dist/standalone/.next/server/pages/500.html +2 -2
  62. package/dist/standalone/.next/server/server-reference-manifest.js +1 -1
  63. package/dist/standalone/.next/server/server-reference-manifest.json +1 -1
  64. package/dist/standalone/.next/static/chunks/{c83ada0dc165c069.js → 6cd6aceb30e3780f.js} +1 -1
  65. package/dist/standalone/.next/static/chunks/{a5898828bec6764a.js → bcbcbe7624598efe.js} +2 -2
  66. package/dist/standalone/node_modules/@img/sharp-darwin-arm64/package.json +2 -2
  67. package/dist/standalone/node_modules/@img/sharp-libvips-darwin-arm64/package.json +1 -1
  68. package/dist/standalone/node_modules/next/node_modules/@img/sharp-darwin-arm64/package.json +40 -0
  69. package/dist/standalone/node_modules/next/node_modules/@img/sharp-libvips-darwin-arm64/package.json +36 -0
  70. package/dist/standalone/node_modules/next/node_modules/sharp/package.json +202 -0
  71. package/dist/standalone/node_modules/sharp/package.json +77 -57
  72. package/dist/standalone/package.json +5 -9
  73. package/package.json +8 -13
  74. package/scripts/install.js +28 -0
  75. /package/dist/standalone/.next/static/{iksGdT4UarFPXRZSkS0ex → wLxjscs3VLO0dQbU_cK9R}/_buildManifest.js +0 -0
  76. /package/dist/standalone/.next/static/{iksGdT4UarFPXRZSkS0ex → wLxjscs3VLO0dQbU_cK9R}/_clientMiddlewareManifest.json +0 -0
  77. /package/dist/standalone/.next/static/{iksGdT4UarFPXRZSkS0ex → wLxjscs3VLO0dQbU_cK9R}/_ssgManifest.js +0 -0
  78. /package/dist/standalone/node_modules/{@img → next/node_modules/@img}/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  79. /package/dist/standalone/node_modules/{@img → next/node_modules/@img}/sharp-libvips-darwin-arm64/README.md +0 -0
  80. /package/dist/standalone/node_modules/{@img → next/node_modules/@img}/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +0 -0
  81. /package/dist/standalone/node_modules/{@img → next/node_modules/@img}/sharp-libvips-darwin-arm64/lib/index.js +0 -0
  82. /package/dist/standalone/node_modules/{@img → next/node_modules/@img}/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
  83. /package/dist/standalone/node_modules/{@img → next/node_modules/@img}/sharp-libvips-darwin-arm64/versions.json +0 -0
  84. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/classes/comparator.js +0 -0
  85. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/classes/range.js +0 -0
  86. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/classes/semver.js +0 -0
  87. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/cmp.js +0 -0
  88. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/coerce.js +0 -0
  89. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/compare.js +0 -0
  90. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/eq.js +0 -0
  91. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/gt.js +0 -0
  92. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/gte.js +0 -0
  93. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/lt.js +0 -0
  94. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/lte.js +0 -0
  95. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/neq.js +0 -0
  96. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/parse.js +0 -0
  97. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/functions/satisfies.js +0 -0
  98. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/internal/constants.js +0 -0
  99. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/internal/debug.js +0 -0
  100. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/internal/identifiers.js +0 -0
  101. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/internal/lrucache.js +0 -0
  102. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/internal/parse-options.js +0 -0
  103. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/internal/re.js +0 -0
  104. /package/dist/standalone/node_modules/{sharp → next}/node_modules/semver/package.json +0 -0
  105. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/channel.js +0 -0
  106. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/colour.js +0 -0
  107. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/composite.js +0 -0
  108. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/constructor.js +0 -0
  109. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/index.js +0 -0
  110. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/input.js +0 -0
  111. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/is.js +0 -0
  112. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/libvips.js +0 -0
  113. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/operation.js +0 -0
  114. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/output.js +0 -0
  115. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/resize.js +0 -0
  116. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/sharp.js +0 -0
  117. /package/dist/standalone/node_modules/{sharp → next/node_modules/sharp}/lib/utility.js +0 -0
@@ -1,7 +1,7 @@
1
1
  module.exports=[57997,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={UnrecognizedActionError:function(){return f},unstable_isUnrecognizedActionError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});class f extends Error{constructor(...a){super(...a),this.name="UnrecognizedActionError"}}function g(a){return!!(a&&"object"==typeof a&&a instanceof f)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},75718,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReadonlyURLSearchParams",{enumerable:!0,get:function(){return e}});class d extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class e extends URLSearchParams{append(){throw new d}delete(){throw new d}set(){throw new d}sort(){throw new d}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},15128,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"RedirectStatusCode",{enumerable:!0,get:function(){return e}});var d,e=((d={})[d.SeeOther=303]="SeeOther",d[d.TemporaryRedirect=307]="TemporaryRedirect",d[d.PermanentRedirect=308]="PermanentRedirect",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},11026,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e={REDIRECT_ERROR_CODE:function(){return h},RedirectType:function(){return i},isRedirectError:function(){return j}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});let g=a.r(15128),h="NEXT_REDIRECT";var i=((d={}).push="push",d.replace="replace",d);function j(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let b=a.digest.split(";"),[c,d]=b,e=b.slice(2,-2).join(";"),f=Number(b.at(-2));return c===h&&("replace"===d||"push"===d)&&"string"==typeof e&&!isNaN(f)&&f in g.RedirectStatusCode}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},22099,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getRedirectError:function(){return i},getRedirectStatusCodeFromError:function(){return n},getRedirectTypeFromError:function(){return m},getURLFromRedirectError:function(){return l},permanentRedirect:function(){return k},redirect:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(15128),g=a.r(11026),h=a.r(20635).actionAsyncStorage;function i(a,b,c=f.RedirectStatusCode.TemporaryRedirect){let d=Object.defineProperty(Error(g.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d.digest=`${g.REDIRECT_ERROR_CODE};${b};${a};${c};`,d}function j(a,b){throw i(a,b??=h?.getStore()?.isAction?g.RedirectType.push:g.RedirectType.replace,f.RedirectStatusCode.TemporaryRedirect)}function k(a,b=g.RedirectType.replace){throw i(a,b,f.RedirectStatusCode.PermanentRedirect)}function l(a){return(0,g.isRedirectError)(a)?a.digest.split(";").slice(2,-2).join(";"):null}function m(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return a.digest.split(";",2)[1]}function n(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(a.digest.split(";").at(-2))}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},8535,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HTTPAccessErrorStatus:function(){return f},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return h},getAccessFallbackErrorTypeByStatus:function(){return k},getAccessFallbackHTTPStatus:function(){return j},isHTTPAccessFallbackError:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},g=new Set(Object.values(f)),h="NEXT_HTTP_ERROR_FALLBACK";function i(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let[b,c]=a.digest.split(";");return b===h&&g.has(Number(c))}function j(a){return Number(a.digest.split(";")[1])}function k(a){switch(a){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},28102,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"notFound",{enumerable:!0,get:function(){return f}});let d=a.r(8535),e=`${d.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function f(){let a=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw a.digest=e,a}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},64177,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"forbidden",{enumerable:!0,get:function(){return d}}),a.r(8535).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},88213,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unauthorized",{enumerable:!0,get:function(){return d}}),a.r(8535).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},35710,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isHangingPromiseRejectionError:function(){return f},makeDevtoolsIOAwarePromise:function(){return l},makeHangingPromise:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===g}let g="HANGING_PROMISE_REJECTION";class h extends Error{constructor(a,b){super(`During prerendering, ${b} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${b} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${a}".`),this.route=a,this.expression=b,this.digest=g}}let i=new WeakMap;function j(a,b,c){if(a.aborted)return Promise.reject(new h(b,c));{let d=new Promise((d,e)=>{let f=e.bind(null,new h(b,c)),g=i.get(a);if(g)g.push(f);else{let b=[f];i.set(a,b),a.addEventListener("abort",()=>{for(let a=0;a<b.length;a++)b[a]()},{once:!0})}});return d.catch(k),d}}function k(){}function l(a,b,c){return b.stagedRendering?b.stagedRendering.delayUntilStage(c,void 0,a):new Promise(b=>{setTimeout(()=>{b(a)},0)})}},31101,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isPostpone",{enumerable:!0,get:function(){return e}});let d=Symbol.for("react.postpone");function e(a){return"object"==typeof a&&null!==a&&a.$$typeof===d}},41997,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={BailoutToCSRError:function(){return g},isBailoutToCSRError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="BAILOUT_TO_CLIENT_SIDE_RENDERING";class g extends Error{constructor(a){super(`Bail out to client-side rendering: ${a}`),this.reason=a,this.digest=f}}function h(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===f}},77747,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isNextRouterError",{enumerable:!0,get:function(){return f}});let d=a.r(8535),e=a.r(11026);function f(a){return(0,e.isRedirectError)(a)||(0,d.isHTTPAccessFallbackError)(a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},3326,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DynamicServerError:function(){return g},isDynamicServerError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="DYNAMIC_SERVER_USAGE";class g extends Error{constructor(a){super(`Dynamic server usage: ${a}`),this.description=a,this.digest=f}}function h(a){return"object"==typeof a&&null!==a&&"digest"in a&&"string"==typeof a.digest&&a.digest===f}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},99392,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={StaticGenBailoutError:function(){return g},isStaticGenBailoutError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="NEXT_STATIC_GEN_BAILOUT";class g extends Error{constructor(...a){super(...a),this.code=f}}function h(a){return"object"==typeof a&&null!==a&&"code"in a&&a.code===f}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},83590,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={METADATA_BOUNDARY_NAME:function(){return f},OUTLET_BOUNDARY_NAME:function(){return h},ROOT_LAYOUT_BOUNDARY_NAME:function(){return i},VIEWPORT_BOUNDARY_NAME:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="__next_metadata_boundary__",g="__next_viewport_boundary__",h="__next_outlet_boundary__",i="__next_root_layout_boundary__"},76383,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={atLeastOneTask:function(){return h},scheduleImmediate:function(){return g},scheduleOnNextTick:function(){return f},waitAtLeastOneReactRenderTask:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a=>{Promise.resolve().then(()=>{process.nextTick(a)})},g=a=>{setImmediate(a)};function h(){return new Promise(a=>g(a))}function i(){return new Promise(a=>setImmediate(a))}},88644,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},54110,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e,f={Postpone:function(){return B},PreludeState:function(){return $},abortAndThrowOnSynchronousRequestDataAccess:function(){return A},abortOnSynchronousPlatformIOAccess:function(){return z},accessedDynamicData:function(){return J},annotateDynamicAccess:function(){return O},consumeDynamicAccess:function(){return K},createDynamicTrackingState:function(){return s},createDynamicValidationState:function(){return t},createHangingInputAbortSignal:function(){return N},createRenderInBrowserAbortSignal:function(){return M},delayUntilRuntimeStage:function(){return ac},formatDynamicAPIAccesses:function(){return L},getFirstDynamicReason:function(){return u},getStaticShellDisallowedDynamicReasons:function(){return ab},isDynamicPostpone:function(){return E},isPrerenderInterruptedError:function(){return I},logDisallowedDynamicError:function(){return _},markCurrentScopeAsDynamic:function(){return v},postponeWithTracking:function(){return C},throwIfDisallowedDynamic:function(){return aa},throwToInterruptStaticGeneration:function(){return w},trackAllowedDynamicAccess:function(){return W},trackDynamicDataInDynamicRender:function(){return x},trackDynamicHoleInRuntimeShell:function(){return X},trackDynamicHoleInStaticShell:function(){return Y},useDynamicRouteParams:function(){return P},useDynamicSearchParams:function(){return Q}};for(var g in f)Object.defineProperty(c,g,{enumerable:!0,get:f[g]});let h=(d=a.r(72131))&&d.__esModule?d:{default:d},i=a.r(3326),j=a.r(99392),k=a.r(32319),l=a.r(56704),m=a.r(35710),n=a.r(83590),o=a.r(76383),p=a.r(41997),q=a.r(88644),r="function"==typeof h.default.unstable_postpone;function s(a){return{isDebugDynamicAccesses:a,dynamicAccesses:[],syncDynamicErrorWithStack:null}}function t(){return{hasSuspenseAboveBody:!1,hasDynamicMetadata:!1,dynamicMetadata:null,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[]}}function u(a){var b;return null==(b=a.dynamicAccesses[0])?void 0:b.expression}function v(a,b,c){if(b)switch(b.type){case"cache":case"unstable-cache":case"private-cache":return}if(!a.forceDynamic&&!a.forceStatic){if(a.dynamicShouldError)throw Object.defineProperty(new j.StaticGenBailoutError(`Route ${a.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${c}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(b)switch(b.type){case"prerender-ppr":return C(a.route,c,b.dynamicTracking);case"prerender-legacy":b.revalidate=0;let d=Object.defineProperty(new i.DynamicServerError(`Route ${a.route} couldn't be rendered statically because it used ${c}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw a.dynamicUsageDescription=c,a.dynamicUsageStack=d.stack,d}}}function w(a,b,c){let d=Object.defineProperty(new i.DynamicServerError(`Route ${b.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.revalidate=0,b.dynamicUsageDescription=a,b.dynamicUsageStack=d.stack,d}function x(a){switch(a.type){case"cache":case"unstable-cache":case"private-cache":return}}function y(a,b,c){let d=H(`Route ${a} needs to bail out of prerendering at this point because it used ${b}.`);c.controller.abort(d);let e=c.dynamicTracking;e&&e.dynamicAccesses.push({stack:e.isDebugDynamicAccesses?Error().stack:void 0,expression:b})}function z(a,b,c,d){let e=d.dynamicTracking;y(a,b,d),e&&null===e.syncDynamicErrorWithStack&&(e.syncDynamicErrorWithStack=c)}function A(a,b,c,d){if(!1===d.controller.signal.aborted){y(a,b,d);let e=d.dynamicTracking;e&&null===e.syncDynamicErrorWithStack&&(e.syncDynamicErrorWithStack=c)}throw H(`Route ${a} needs to bail out of prerendering at this point because it used ${b}.`)}function B({reason:a,route:b}){let c=k.workUnitAsyncStorage.getStore();C(b,a,c&&"prerender-ppr"===c.type?c.dynamicTracking:null)}function C(a,b,c){(function(){if(!r)throw Object.defineProperty(Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})})(),c&&c.dynamicAccesses.push({stack:c.isDebugDynamicAccesses?Error().stack:void 0,expression:b}),h.default.unstable_postpone(D(a,b))}function D(a,b){return`Route ${a} needs to bail out of prerendering at this point because it used ${b}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function E(a){return"object"==typeof a&&null!==a&&"string"==typeof a.message&&F(a.message)}function F(a){return a.includes("needs to bail out of prerendering at this point because it used")&&a.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(!1===F(D("%%%","^^^")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});let G="NEXT_PRERENDER_INTERRUPTED";function H(a){let b=Object.defineProperty(Error(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return b.digest=G,b}function I(a){return"object"==typeof a&&null!==a&&a.digest===G&&"name"in a&&"message"in a&&a instanceof Error}function J(a){return a.length>0}function K(a,b){return a.dynamicAccesses.push(...b.dynamicAccesses),a.dynamicAccesses}function L(a){return a.filter(a=>"string"==typeof a.stack&&a.stack.length>0).map(({expression:a,stack:b})=>(b=b.split("\n").slice(4).filter(a=>!(a.includes("node_modules/next/")||a.includes(" (<anonymous>)")||a.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${a}:
2
2
  ${b}`))}function M(){let a=new AbortController;return a.abort(Object.defineProperty(new p.BailoutToCSRError("Render in Browser"),"__NEXT_ERROR_CODE",{value:"E721",enumerable:!1,configurable:!0})),a.signal}function N(a){switch(a.type){case"prerender":case"prerender-runtime":let b=new AbortController;if(a.cacheSignal)a.cacheSignal.inputReady().then(()=>{b.abort()});else{let c=(0,k.getRuntimeStagePromise)(a);c?c.then(()=>(0,o.scheduleOnNextTick)(()=>b.abort())):(0,o.scheduleOnNextTick)(()=>b.abort())}return b.signal;case"prerender-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":return}}function O(a,b){let c=b.dynamicTracking;c&&c.dynamicAccesses.push({stack:c.isDebugDynamicAccesses?Error().stack:void 0,expression:a})}function P(a){let b=l.workAsyncStorage.getStore(),c=k.workUnitAsyncStorage.getStore();if(b&&c)switch(c.type){case"prerender-client":case"prerender":{let d=c.fallbackRouteParams;d&&d.size>0&&h.default.use((0,m.makeHangingPromise)(c.renderSignal,b.route,a));break}case"prerender-ppr":{let d=c.fallbackRouteParams;if(d&&d.size>0)return C(b.route,a,c.dynamicTracking);break}case"prerender-runtime":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called during a runtime prerender. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E771",enumerable:!1,configurable:!0});case"cache":case"private-cache":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called inside a cache scope. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0})}}function Q(a){let b=l.workAsyncStorage.getStore(),c=k.workUnitAsyncStorage.getStore();if(b)switch(!c&&(0,k.throwForMissingRequestStore)(a),c.type){case"prerender-client":h.default.use((0,m.makeHangingPromise)(c.renderSignal,b.route,a));break;case"prerender-legacy":case"prerender-ppr":if(b.forceStatic)return;throw Object.defineProperty(new p.BailoutToCSRError(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called from a Server Component. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E795",enumerable:!1,configurable:!0});case"cache":case"unstable-cache":case"private-cache":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called inside a cache scope. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"request":return}}let R=/\n\s+at Suspense \(<anonymous>\)/,S=RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${n.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`),T=RegExp(`\\n\\s+at ${n.METADATA_BOUNDARY_NAME}[\\n\\s]`),U=RegExp(`\\n\\s+at ${n.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),V=RegExp(`\\n\\s+at ${n.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function W(a,b,c,d){if(!V.test(b)){if(T.test(b)){c.hasDynamicMetadata=!0;return}if(U.test(b)){c.hasDynamicViewport=!0;return}if(S.test(b)){c.hasAllowedDynamic=!0,c.hasSuspenseAboveBody=!0;return}else if(R.test(b)){c.hasAllowedDynamic=!0;return}else{if(d.syncDynamicErrorWithStack)return void c.dynamicErrors.push(d.syncDynamicErrorWithStack);let e=Z(`Route "${a.route}": Uncached data was accessed outside of <Suspense>. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,b);return void c.dynamicErrors.push(e)}}}function X(a,b,c,d){if(!V.test(b)){if(T.test(b)){c.dynamicMetadata=Z(`Route "${a.route}": Uncached data or \`connection()\` was accessed inside \`generateMetadata\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`,b);return}if(U.test(b)){let d=Z(`Route "${a.route}": Uncached data or \`connection()\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`,b);c.dynamicErrors.push(d);return}if(S.test(b)){c.hasAllowedDynamic=!0,c.hasSuspenseAboveBody=!0;return}else if(R.test(b)){c.hasAllowedDynamic=!0;return}else{if(d.syncDynamicErrorWithStack)return void c.dynamicErrors.push(d.syncDynamicErrorWithStack);let e=Z(`Route "${a.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,b);return void c.dynamicErrors.push(e)}}}function Y(a,b,c,d){if(!V.test(b)){if(T.test(b)){c.dynamicMetadata=Z(`Route "${a.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`,b);return}if(U.test(b)){let d=Z(`Route "${a.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`,b);c.dynamicErrors.push(d);return}if(S.test(b)){c.hasAllowedDynamic=!0,c.hasSuspenseAboveBody=!0;return}else if(R.test(b)){c.hasAllowedDynamic=!0;return}else{if(d.syncDynamicErrorWithStack)return void c.dynamicErrors.push(d.syncDynamicErrorWithStack);let e=Z(`Route "${a.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,b);return void c.dynamicErrors.push(e)}}}function Z(a,b){let c=Object.defineProperty(Error(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return c.stack=c.name+": "+a+b,c}var $=((e={})[e.Full=0]="Full",e[e.Empty=1]="Empty",e[e.Errored=2]="Errored",e);function _(a,b){console.error(b),a.dev||(a.hasReadableErrorStacks?console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${a.route}" in your browser to investigate the error.`):console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
3
3
  - Start the app in development mode by running \`next dev\`, then open "${a.route}" in your browser to investigate the error.
4
- - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`))}function aa(a,b,c,d){if(d.syncDynamicErrorWithStack)throw _(a,d.syncDynamicErrorWithStack),new j.StaticGenBailoutError;if(0!==b){if(c.hasSuspenseAboveBody)return;let d=c.dynamicErrors;if(d.length>0){for(let b=0;b<d.length;b++)_(a,d[b]);throw new j.StaticGenBailoutError}if(c.hasDynamicViewport)throw console.error(`Route "${a.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new j.StaticGenBailoutError;if(1===b)throw console.error(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new j.StaticGenBailoutError}else if(!1===c.hasAllowedDynamic&&c.hasDynamicMetadata)throw console.error(`Route "${a.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new j.StaticGenBailoutError}function ab(a,b,c){if(c.hasSuspenseAboveBody)return[];if(0!==b){let d=c.dynamicErrors;if(d.length>0)return d;if(1===b)return[Object.defineProperty(new q.InvariantError(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}else if(!1===c.hasAllowedDynamic&&0===c.dynamicErrors.length&&c.dynamicMetadata)return[c.dynamicMetadata];return[]}function ac(a,b){return a.runtimeStagePromise?a.runtimeStagePromise.then(()=>b):b}},44753,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(35710),e=a.r(31101),f=a.r(41997),g=a.r(77747),h=a.r(54110),i=a.r(3326);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},47083,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(44753).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},21066,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return h.RedirectType},forbidden:function(){return j.forbidden},notFound:function(){return i.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return k.unauthorized},unstable_isUnrecognizedActionError:function(){return m},unstable_rethrow:function(){return l.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(75718),g=a.r(22099),h=a.r(11026),i=a.r(28102),j=a.r(64177),k=a.r(88213),l=a.r(47083);function m(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},74137,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return h.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return j.ServerInsertedHTMLContext},forbidden:function(){return l.forbidden},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},unauthorized:function(){return l.unauthorized},unstable_isUnrecognizedActionError:function(){return k.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return l.unstable_rethrow},useParams:function(){return r},usePathname:function(){return p},useRouter:function(){return q},useSearchParams:function(){return o},useSelectedLayoutSegment:function(){return t},useSelectedLayoutSegments:function(){return s},useServerInsertedHTML:function(){return j.useServerInsertedHTML}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(9270),h=a.r(36313),i=a.r(39118),j=a.r(18341),k=a.r(57997),l=a.r(21066),m=a.r(54110).useDynamicRouteParams,n=a.r(54110).useDynamicSearchParams;function o(){n?.("useSearchParams()");let a=(0,f.useContext)(h.SearchParamsContext);return(0,f.useMemo)(()=>a?new h.ReadonlyURLSearchParams(a):null,[a])}function p(){return m?.("usePathname()"),(0,f.useContext)(h.PathnameContext)}function q(){let a=(0,f.useContext)(g.AppRouterContext);if(null===a)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return a}function r(){return m?.("useParams()"),(0,f.useContext)(h.PathParamsContext)}function s(a="children"){m?.("useSelectedLayoutSegments()");let b=(0,f.useContext)(g.LayoutRouterContext);return b?(0,i.getSelectedLayoutSegmentPath)(b.parentTree,a):null}function t(a="children"){m?.("useSelectedLayoutSegment()"),(0,f.useContext)(h.NavigationPromisesContext);let b=s(a);return(0,i.computeSelectedLayoutSegment)(b,a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},50944,(a,b,c)=>{b.exports=a.r(74137)},22734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},92509,(a,b,c)=>{b.exports=a.x("url",()=>require("url"))},33405,(a,b,c)=>{b.exports=a.x("child_process",()=>require("child_process"))},21517,(a,b,c)=>{b.exports=a.x("http",()=>require("http"))},24836,(a,b,c)=>{b.exports=a.x("https",()=>require("https"))},63047,(a,b,c)=>{var d=a.r(22734),e=a.r(92509),f=a.r(33405).spawn;function g(b){"use strict";b=b||{};var c,g,h=this,i=a.r(21517),j=a.r(24836),k={},l=!1,m={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},n=Object.assign({},m),o=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],p=["TRACE","TRACK","CONNECT"],q=!1,r=!1,s=!1,t={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.response=Buffer.alloc(0),this.status=null,this.statusText=null,this.open=function(a,b,c,d,e){if(this.abort(),r=!1,s=!1,!(a&&-1===p.indexOf(a)))throw Error("SecurityError: Request method not allowed");k={method:a,url:b.toString(),async:"boolean"!=typeof c||c,user:d||null,password:e||null},u(this.OPENED)},this.setDisableHeaderCheck=function(a){l=a},this.setRequestHeader=function(a,b){if(this.readyState!=this.OPENED)throw Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(!l&&(!a||-1!==o.indexOf(a.toLowerCase())))return console.warn('Refused to set unsafe header "'+a+'"'),!1;if(q)throw Error("INVALID_STATE_ERR: send flag is true");return n[a]=b,!0},this.getResponseHeader=function(a){return"string"==typeof a&&this.readyState>this.OPENED&&g.headers[a.toLowerCase()]&&!r?g.headers[a.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||r)return"";var a="";for(var b in g.headers)"set-cookie"!==b&&"set-cookie2"!==b&&(a+=b+": "+g.headers[b]+"\r\n");return a.substr(0,a.length-2)},this.getRequestHeader=function(a){return"string"==typeof a&&n[a]?n[a]:""},this.send=function(a){if(this.readyState!=this.OPENED)throw Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(q)throw Error("INVALID_STATE_ERR: send has already been called");var l,m=!1,o=!1,p=e.parse(k.url);switch(p.protocol){case"https:":m=!0;case"http:":l=p.hostname;break;case"file:":o=!0;break;case void 0:case"":l="localhost";break;default:throw Error("Protocol not supported.")}if(o){if("GET"!==k.method)throw Error("XMLHttpRequest: Only GET method is supported");if(k.async)d.readFile(unescape(p.pathname),function(a,b){a?h.handleError(a,a.errno||-1):(h.status=200,h.responseText=b.toString("utf8"),h.response=b,u(h.DONE))});else try{this.response=d.readFileSync(unescape(p.pathname)),this.responseText=this.response.toString("utf8"),this.status=200,u(h.DONE)}catch(a){this.handleError(a,a.errno||-1)}return}var s=p.port||(m?443:80),t=p.pathname+(p.search?p.search:"");if(n.Host=l,m&&443===s||80===s||(n.Host+=":"+p.port),k.user){void 0===k.password&&(k.password="");var v=new Buffer(k.user+":"+k.password);n.Authorization="Basic "+v.toString("base64")}"GET"===k.method||"HEAD"===k.method?a=null:a?(n["Content-Length"]=Buffer.isBuffer(a)?a.length:Buffer.byteLength(a),Object.keys(n).some(function(a){return"content-type"===a.toLowerCase()})||(n["Content-Type"]="text/plain;charset=UTF-8")):"POST"===k.method&&(n["Content-Length"]=0);var w=b.agent||!1,x={host:l,port:s,path:t,method:k.method,headers:n,agent:w};if(m&&(x.pfx=b.pfx,x.key=b.key,x.passphrase=b.passphrase,x.cert=b.cert,x.ca=b.ca,x.ciphers=b.ciphers,x.rejectUnauthorized=!1!==b.rejectUnauthorized),r=!1,k.async){var y=m?j.request:i.request;q=!0,h.dispatchEvent("readystatechange");var z=function(a){if(302===(g=a).statusCode||303===g.statusCode||307===g.statusCode){k.url=g.headers.location;var d=e.parse(k.url);l=d.hostname;var f={hostname:d.hostname,port:d.port,path:d.path,method:303===g.statusCode?"GET":k.method,headers:n};m&&(f.pfx=b.pfx,f.key=b.key,f.passphrase=b.passphrase,f.cert=b.cert,f.ca=b.ca,f.ciphers=b.ciphers,f.rejectUnauthorized=!1!==b.rejectUnauthorized),(c=y(f,z).on("error",A)).end();return}u(h.HEADERS_RECEIVED),h.status=g.statusCode,g.on("data",function(a){if(a){var b=Buffer.from(a);h.response=Buffer.concat([h.response,b])}q&&u(h.LOADING)}),g.on("end",function(){q&&(q=!1,u(h.DONE),h.responseText=h.response.toString("utf8"))}),g.on("error",function(a){h.handleError(a)})},A=function(a){if(c.reusedSocket&&"ECONNRESET"===a.code)return y(x,z).on("error",A);h.handleError(a)};c=y(x,z).on("error",A),b.autoUnref&&c.on("socket",a=>{a.unref()}),a&&c.write(a),c.end(),h.dispatchEvent("loadstart")}else{var B=".node-xmlhttprequest-content-"+process.pid,C=".node-xmlhttprequest-sync-"+process.pid;d.writeFileSync(C,"","utf8");for(var D="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(m?"s":"")+".request;var options = "+JSON.stringify(x)+";var responseText = '';var responseData = Buffer.alloc(0);var req = doRequest(options, function(response) {response.on('data', function(chunk) { var data = Buffer.from(chunk); responseText += data.toString('utf8'); responseData = Buffer.concat([responseData, data]);});response.on('end', function() {fs.writeFileSync('"+B+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText, data: responseData.toString('base64')}}), 'utf8');fs.unlinkSync('"+C+"');});response.on('error', function(error) {fs.writeFileSync('"+B+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+C+"');});}).on('error', function(error) {fs.writeFileSync('"+B+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+C+"');});"+(a?"req.write('"+JSON.stringify(a).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",E=f(process.argv[0],["-e",D]);d.existsSync(C););if(h.responseText=d.readFileSync(B,"utf8"),E.stdin.end(),d.unlinkSync(B),h.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)){var F=JSON.parse(h.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/,""));h.handleError(F,503)}else{h.status=h.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/,"$1");var G=JSON.parse(h.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/,"$1"));g={statusCode:h.status,headers:G.data.headers},h.responseText=G.data.text,h.response=Buffer.from(G.data.data,"base64"),u(h.DONE,!0)}}},this.handleError=function(a,b){this.status=b||0,this.statusText=a,this.responseText=a.stack,r=!0,u(this.DONE)},this.abort=function(){c&&(c.abort(),c=null),n=Object.assign({},m),this.responseText="",this.responseXML="",this.response=Buffer.alloc(0),r=s=!0,this.readyState!==this.UNSENT&&(this.readyState!==this.OPENED||q)&&this.readyState!==this.DONE&&(q=!1,u(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(a,b){a in t||(t[a]=[]),t[a].push(b)},this.removeEventListener=function(a,b){a in t&&(t[a]=t[a].filter(function(a){return a!==b}))},this.dispatchEvent=function(a){if("function"==typeof h["on"+a]&&(this.readyState===this.DONE&&k.async?setTimeout(function(){h["on"+a]()},0):h["on"+a]()),a in t)for(let b=0,c=t[a].length;b<c;b++)this.readyState===this.DONE?setTimeout(function(){t[a][b].call(h)},0):t[a][b].call(h)};var u=function(a){if(h.readyState!==a&&(h.readyState!==h.UNSENT||!s)&&(h.readyState=a,(k.async||h.readyState<h.OPENED||h.readyState===h.DONE)&&h.dispatchEvent("readystatechange"),h.readyState===h.DONE)){let a;a=s?"abort":r?"error":"load",h.dispatchEvent(a),h.dispatchEvent("loadend")}}}b.exports=g,g.XMLHttpRequest=g},84425,(a,b,c)=>{function d(a,b,c,d){return Math.round(a/c)+" "+d+(b>=1.5*c?"s":"")}b.exports=function(a,b){b=b||{};var c,e,f,g,h=typeof a;if("string"===h&&a.length>0){var i=a;if(!((i=String(i)).length>100)){var j=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(j){var k=parseFloat(j[1]);switch((j[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*k;case"weeks":case"week":case"w":return 6048e5*k;case"days":case"day":case"d":return 864e5*k;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*k;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*k;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*k;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return k;default:break}}}return}if("number"===h&&isFinite(a)){return b.long?(e=Math.abs(c=a))>=864e5?d(c,e,864e5,"day"):e>=36e5?d(c,e,36e5,"hour"):e>=6e4?d(c,e,6e4,"minute"):e>=1e3?d(c,e,1e3,"second"):c+" ms":(g=Math.abs(f=a))>=864e5?Math.round(f/864e5)+"d":g>=36e5?Math.round(f/36e5)+"h":g>=6e4?Math.round(f/6e4)+"m":g>=1e3?Math.round(f/1e3)+"s":f+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}},11017,(a,b,c)=>{b.exports=function(b){function c(a){let b,e,f,g=null;function h(...a){if(!h.enabled)return;let d=Number(new Date);h.diff=d-(b||d),h.prev=b,h.curr=d,b=d,a[0]=c.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");let e=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(b,d)=>{if("%%"===b)return"%";e++;let f=c.formatters[d];if("function"==typeof f){let c=a[e];b=f.call(h,c),a.splice(e,1),e--}return b}),c.formatArgs.call(h,a),(h.log||c.log).apply(h,a)}return h.namespace=a,h.useColors=c.useColors(),h.color=c.selectColor(a),h.extend=d,h.destroy=c.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==g?g:(e!==c.namespaces&&(e=c.namespaces,f=c.enabled(a)),f),set:a=>{g=a}}),"function"==typeof c.init&&c.init(h),h}function d(a,b){let d=c(this.namespace+(void 0===b?":":b)+a);return d.log=this.log,d}function e(a,b){let c=0,d=0,e=-1,f=0;for(;c<a.length;)if(d<b.length&&(b[d]===a[c]||"*"===b[d]))"*"===b[d]?(e=d,f=c):c++,d++;else{if(-1===e)return!1;d=e+1,c=++f}for(;d<b.length&&"*"===b[d];)d++;return d===b.length}return c.debug=c,c.default=c,c.coerce=function(a){return a instanceof Error?a.stack||a.message:a},c.disable=function(){let a=[...c.names,...c.skips.map(a=>"-"+a)].join(",");return c.enable(""),a},c.enable=function(a){for(let b of(c.save(a),c.namespaces=a,c.names=[],c.skips=[],("string"==typeof a?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===b[0]?c.skips.push(b.slice(1)):c.names.push(b)},c.enabled=function(a){for(let b of c.skips)if(e(a,b))return!1;for(let b of c.names)if(e(a,b))return!0;return!1},c.humanize=a.r(84425),c.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(b).forEach(a=>{c[a]=b[a]}),c.names=[],c.skips=[],c.formatters={},c.selectColor=function(a){let b=0;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c)|0;return c.colors[Math.abs(b)%c.colors.length]},c.enable(c.load()),c}},70722,(a,b,c)=>{b.exports=a.x("tty",()=>require("tty"))},46786,(a,b,c)=>{b.exports=a.x("os",()=>require("os"))},55858,(a,b,c)=>{"use strict";b.exports=(a,b=process.argv)=>{let c=a.startsWith("-")?"":1===a.length?"-":"--",d=b.indexOf(c+a),e=b.indexOf("--");return -1!==d&&(-1===e||d<e)}},73083,(a,b,c)=>{"use strict";let d;a.r(46786);let e=a.r(70722),f=a.r(55858),{env:g}=process;function h(a){return 0!==a&&{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}function i(a,b){if(0===d)return 0;if(f("color=16m")||f("color=full")||f("color=truecolor"))return 3;if(f("color=256"))return 2;if(a&&!b&&void 0===d)return 0;let c=d||0;if("dumb"===g.TERM)return c;if("CI"in g)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(a=>a in g)||"codeship"===g.CI_NAME?1:c;if("TEAMCITY_VERSION"in g)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION);if("truecolor"===g.COLORTERM)return 3;if("TERM_PROGRAM"in g){let a=parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(g.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM)||"COLORTERM"in g?1:c}f("no-color")||f("no-colors")||f("color=false")||f("color=never")?d=0:(f("color")||f("colors")||f("color=true")||f("color=always"))&&(d=1),"FORCE_COLOR"in g&&(d="true"===g.FORCE_COLOR?1:"false"===g.FORCE_COLOR?0:0===g.FORCE_COLOR.length?1:Math.min(parseInt(g.FORCE_COLOR,10),3)),b.exports={supportsColor:function(a){return h(i(a,a&&a.isTTY))},stdout:h(i(!0,e.isatty(1))),stderr:h(i(!0,e.isatty(2)))}},81454,(a,b,c)=>{let d=a.r(70722),e=a.r(24361);c.init=function(a){a.inspectOpts={};let b=Object.keys(c.inspectOpts);for(let d=0;d<b.length;d++)a.inspectOpts[b[d]]=c.inspectOpts[b[d]]},c.log=function(...a){return process.stderr.write(e.formatWithOptions(c.inspectOpts,...a)+"\n")},c.formatArgs=function(a){let{namespace:d,useColors:e}=this;if(e){let c=this.color,e="\x1b[3"+(c<8?c:"8;5;"+c),f=` ${e};1m${d} \u001B[0m`;a[0]=f+a[0].split("\n").join("\n"+f),a.push(e+"m+"+b.exports.humanize(this.diff)+"\x1b[0m")}else a[0]=(c.inspectOpts.hideDate?"":new Date().toISOString()+" ")+d+" "+a[0]},c.save=function(a){a?process.env.DEBUG=a:delete process.env.DEBUG},c.load=function(){return process.env.DEBUG},c.useColors=function(){return"colors"in c.inspectOpts?!!c.inspectOpts.colors:d.isatty(process.stderr.fd)},c.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),c.colors=[6,2,3,4,5,1];try{let b=a.r(73083);b&&(b.stderr||b).level>=2&&(c.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(a){}c.inspectOpts=Object.keys(process.env).filter(a=>/^debug_/i.test(a)).reduce((a,b)=>{let c=b.substring(6).toLowerCase().replace(/_([a-z])/g,(a,b)=>b.toUpperCase()),d=process.env[b];return d=!!/^(yes|on|true|enabled)$/i.test(d)||!/^(no|off|false|disabled)$/i.test(d)&&("null"===d?null:Number(d)),a[c]=d,a},{}),b.exports=a.r(11017)(c);let{formatters:f}=b.exports;f.o=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts).split("\n").map(a=>a.trim()).join(" ")},f.O=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts)}},47522,(a,b,c)=>{let d;c.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+b.exports.humanize(this.diff),!this.useColors)return;let c="color: "+this.color;a.splice(1,0,c,"color: inherit");let d=0,e=0;a[0].replace(/%[a-zA-Z%]/g,a=>{"%%"!==a&&(d++,"%c"===a&&(e=d))}),a.splice(e,0,c)},c.save=function(a){try{a?c.storage.setItem("debug",a):c.storage.removeItem("debug")}catch(a){}},c.load=function(){let a;try{a=c.storage.getItem("debug")||c.storage.getItem("DEBUG")}catch(a){}return!a&&"undefined"!=typeof process&&"env"in process&&(a=process.env.DEBUG),a},c.useColors=function(){let a;return!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof navigator&&navigator.userAgent&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch(a){}}(),d=!1,c.destroy=()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),b.exports=a.r(11017)(c);let{formatters:e}=b.exports;e.j=function(a){try{return JSON.stringify(a)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}}},35290,(a,b,c)=>{"undefined"==typeof process||"renderer"===process.type||process.__nwjs?b.exports=a.r(47522):b.exports=a.r(81454)},27699,(a,b,c)=>{b.exports=a.x("events",()=>require("events"))},4446,(a,b,c)=>{b.exports=a.x("net",()=>require("net"))},55004,(a,b,c)=>{b.exports=a.x("tls",()=>require("tls"))},54799,(a,b,c)=>{b.exports=a.x("crypto",()=>require("crypto"))},88947,(a,b,c)=>{b.exports=a.x("stream",()=>require("stream"))},6461,(a,b,c)=>{b.exports=a.x("zlib",()=>require("zlib"))},17376,(a,b,c)=>{"use strict";let d=["nodebuffer","arraybuffer","fragments"],e="undefined"!=typeof Blob;e&&d.push("blob"),b.exports={BINARY_TYPES:d,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:e,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},29618,(a,b,c)=>{"use strict";let{EMPTY_BUFFER:d}=a.r(17376),e=Buffer[Symbol.species];function f(a,b,c,d,e){for(let f=0;f<e;f++)c[d+f]=a[f]^b[3&f]}function g(a,b){for(let c=0;c<a.length;c++)a[c]^=b[3&c]}function h(a){let b;return(h.readOnly=!0,Buffer.isBuffer(a))?a:(a instanceof ArrayBuffer?b=new e(a):ArrayBuffer.isView(a)?b=new e(a.buffer,a.byteOffset,a.byteLength):(b=Buffer.from(a),h.readOnly=!1),b)}if(b.exports={concat:function(a,b){if(0===a.length)return d;if(1===a.length)return a[0];let c=Buffer.allocUnsafe(b),f=0;for(let b=0;b<a.length;b++){let d=a[b];c.set(d,f),f+=d.length}return f<b?new e(c.buffer,c.byteOffset,f):c},mask:f,toArrayBuffer:function(a){return a.length===a.buffer.byteLength?a.buffer:a.buffer.slice(a.byteOffset,a.byteOffset+a.length)},toBuffer:h,unmask:g},!process.env.WS_NO_BUFFER_UTIL)try{let a=(()=>{let a=Error("Cannot find module 'bufferutil'");throw a.code="MODULE_NOT_FOUND",a})();b.exports.mask=function(b,c,d,e,g){g<48?f(b,c,d,e,g):a.mask(b,c,d,e,g)},b.exports.unmask=function(b,c){b.length<32?g(b,c):a.unmask(b,c)}}catch(a){}},74873,(a,b,c)=>{"use strict";let d=Symbol("kDone"),e=Symbol("kRun");b.exports=class{constructor(a){this[d]=()=>{this.pending--,this[e]()},this.concurrency=a||1/0,this.jobs=[],this.pending=0}add(a){this.jobs.push(a),this[e]()}[e](){if(this.pending!==this.concurrency&&this.jobs.length){let a=this.jobs.shift();this.pending++,a(this[d])}}}},10976,(a,b,c)=>{"use strict";let d,e=a.r(6461),f=a.r(29618),g=a.r(74873),{kStatusCode:h}=a.r(17376),i=Buffer[Symbol.species],j=Buffer.from([0,0,255,255]),k=Symbol("permessage-deflate"),l=Symbol("total-length"),m=Symbol("callback"),n=Symbol("buffers"),o=Symbol("error");function p(a){this[n].push(a),this[l]+=a.length}function q(a){(this[l]+=a.length,this[k]._maxPayload<1||this[l]<=this[k]._maxPayload)?this[n].push(a):(this[o]=RangeError("Max payload size exceeded"),this[o].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[o][h]=1009,this.removeListener("data",q),this.reset())}function r(a){(this[k]._inflate=null,this[o])?this[m](this[o]):(a[h]=1007,this[m](a))}b.exports=class{constructor(a,b,c){this._maxPayload=0|c,this._options=a||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!b,this._deflate=null,this._inflate=null,this.params=null,d||(d=new g(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let a={};return this._options.serverNoContextTakeover&&(a.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(a.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(a.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?a.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(a.client_max_window_bits=!0),a}accept(a){return a=this.normalizeParams(a),this.params=this._isServer?this.acceptAsServer(a):this.acceptAsClient(a),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let a=this._deflate[m];this._deflate.close(),this._deflate=null,a&&a(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(a){let b=this._options,c=a.find(a=>(!1!==b.serverNoContextTakeover||!a.server_no_context_takeover)&&(!a.server_max_window_bits||!1!==b.serverMaxWindowBits&&("number"!=typeof b.serverMaxWindowBits||!(b.serverMaxWindowBits>a.server_max_window_bits)))&&("number"!=typeof b.clientMaxWindowBits||!!a.client_max_window_bits));if(!c)throw Error("None of the extension offers can be accepted");return b.serverNoContextTakeover&&(c.server_no_context_takeover=!0),b.clientNoContextTakeover&&(c.client_no_context_takeover=!0),"number"==typeof b.serverMaxWindowBits&&(c.server_max_window_bits=b.serverMaxWindowBits),"number"==typeof b.clientMaxWindowBits?c.client_max_window_bits=b.clientMaxWindowBits:(!0===c.client_max_window_bits||!1===b.clientMaxWindowBits)&&delete c.client_max_window_bits,c}acceptAsClient(a){let b=a[0];if(!1===this._options.clientNoContextTakeover&&b.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(b.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&b.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(b.client_max_window_bits=this._options.clientMaxWindowBits);return b}normalizeParams(a){return a.forEach(a=>{Object.keys(a).forEach(b=>{let c=a[b];if(c.length>1)throw Error(`Parameter "${b}" must have only a single value`);if(c=c[0],"client_max_window_bits"===b){if(!0!==c){let a=+c;if(!Number.isInteger(a)||a<8||a>15)throw TypeError(`Invalid value for parameter "${b}": ${c}`);c=a}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${b}": ${c}`)}else if("server_max_window_bits"===b){let a=+c;if(!Number.isInteger(a)||a<8||a>15)throw TypeError(`Invalid value for parameter "${b}": ${c}`);c=a}else if("client_no_context_takeover"===b||"server_no_context_takeover"===b){if(!0!==c)throw TypeError(`Invalid value for parameter "${b}": ${c}`)}else throw Error(`Unknown parameter "${b}"`);a[b]=c})}),a}decompress(a,b,c){d.add(d=>{this._decompress(a,b,(a,b)=>{d(),c(a,b)})})}compress(a,b,c){d.add(d=>{this._compress(a,b,(a,b)=>{d(),c(a,b)})})}_decompress(a,b,c){let d=this._isServer?"client":"server";if(!this._inflate){let a=`${d}_max_window_bits`,b="number"!=typeof this.params[a]?e.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=e.createInflateRaw({...this._options.zlibInflateOptions,windowBits:b}),this._inflate[k]=this,this._inflate[l]=0,this._inflate[n]=[],this._inflate.on("error",r),this._inflate.on("data",q)}this._inflate[m]=c,this._inflate.write(a),b&&this._inflate.write(j),this._inflate.flush(()=>{let a=this._inflate[o];if(a){this._inflate.close(),this._inflate=null,c(a);return}let e=f.concat(this._inflate[n],this._inflate[l]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[n]=[],b&&this.params[`${d}_no_context_takeover`]&&this._inflate.reset()),c(null,e)})}_compress(a,b,c){let d=this._isServer?"server":"client";if(!this._deflate){let a=`${d}_max_window_bits`,b="number"!=typeof this.params[a]?e.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=e.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:b}),this._deflate[l]=0,this._deflate[n]=[],this._deflate.on("data",p)}this._deflate[m]=c,this._deflate.write(a),this._deflate.flush(e.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=f.concat(this._deflate[n],this._deflate[l]);b&&(a=new i(a.buffer,a.byteOffset,a.length-4)),this._deflate[m]=null,this._deflate[l]=0,this._deflate[n]=[],b&&this.params[`${d}_no_context_takeover`]&&this._deflate.reset(),c(null,a)})}}},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},88686,(a,b,c)=>{"use strict";let{isUtf8:d}=a.r(874),{hasBlob:e}=a.r(17376);function f(a){let b=a.length,c=0;for(;c<b;)if((128&a[c])==0)c++;else if((224&a[c])==192){if(c+1===b||(192&a[c+1])!=128||(254&a[c])==192)return!1;c+=2}else if((240&a[c])==224){if(c+2>=b||(192&a[c+1])!=128||(192&a[c+2])!=128||224===a[c]&&(224&a[c+1])==128||237===a[c]&&(224&a[c+1])==160)return!1;c+=3}else{if((248&a[c])!=240||c+3>=b||(192&a[c+1])!=128||(192&a[c+2])!=128||(192&a[c+3])!=128||240===a[c]&&(240&a[c+1])==128||244===a[c]&&a[c+1]>143||a[c]>244)return!1;c+=4}return!0}if(b.exports={isBlob:function(a){return e&&"object"==typeof a&&"function"==typeof a.arrayBuffer&&"string"==typeof a.type&&"function"==typeof a.stream&&("Blob"===a[Symbol.toStringTag]||"File"===a[Symbol.toStringTag])},isValidStatusCode:function(a){return a>=1e3&&a<=1014&&1004!==a&&1005!==a&&1006!==a||a>=3e3&&a<=4999},isValidUTF8:f,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},d)b.exports.isValidUTF8=function(a){return a.length<24?f(a):d(a)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let a=(()=>{let a=Error("Cannot find module 'utf-8-validate'");throw a.code="MODULE_NOT_FOUND",a})();b.exports.isValidUTF8=function(b){return b.length<32?f(b):a(b)}}catch(a){}},47541,(a,b,c)=>{"use strict";let{Writable:d}=a.r(88947),e=a.r(10976),{BINARY_TYPES:f,EMPTY_BUFFER:g,kStatusCode:h,kWebSocket:i}=a.r(17376),{concat:j,toArrayBuffer:k,unmask:l}=a.r(29618),{isValidStatusCode:m,isValidUTF8:n}=a.r(88686),o=Buffer[Symbol.species];b.exports=class extends d{constructor(a={}){super(),this._allowSynchronousEvents=void 0===a.allowSynchronousEvents||a.allowSynchronousEvents,this._binaryType=a.binaryType||f[0],this._extensions=a.extensions||{},this._isServer=!!a.isServer,this._maxPayload=0|a.maxPayload,this._skipUTF8Validation=!!a.skipUTF8Validation,this[i]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(a,b,c){if(8===this._opcode&&0==this._state)return c();this._bufferedBytes+=a.length,this._buffers.push(a),this.startLoop(c)}consume(a){if(this._bufferedBytes-=a,a===this._buffers[0].length)return this._buffers.shift();if(a<this._buffers[0].length){let b=this._buffers[0];return this._buffers[0]=new o(b.buffer,b.byteOffset+a,b.length-a),new o(b.buffer,b.byteOffset,a)}let b=Buffer.allocUnsafe(a);do{let c=this._buffers[0],d=b.length-a;a>=c.length?b.set(this._buffers.shift(),d):(b.set(new Uint8Array(c.buffer,c.byteOffset,a),d),this._buffers[0]=new o(c.buffer,c.byteOffset+a,c.length-a)),a-=c.length}while(a>0)return b}startLoop(a){this._loop=!0;do switch(this._state){case 0:this.getInfo(a);break;case 1:this.getPayloadLength16(a);break;case 2:this.getPayloadLength64(a);break;case 3:this.getMask();break;case 4:this.getData(a);break;case 5:case 6:this._loop=!1;return}while(this._loop)this._errored||a()}getInfo(a){if(this._bufferedBytes<2){this._loop=!1;return}let b=this.consume(2);if((48&b[0])!=0)return void a(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let c=(64&b[0])==64;if(c&&!this._extensions[e.extensionName])return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&b[0])==128,this._opcode=15&b[0],this._payloadLength=127&b[1],0===this._opcode){if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void a(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=c}else{if(!(this._opcode>7)||!(this._opcode<11))return void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void a(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void a(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&b[1])==128,this._isServer){if(!this._masked)return void a(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void a(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(a)}getPayloadLength16(a){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(a)}getPayloadLength64(a){if(this._bufferedBytes<8){this._loop=!1;return}let b=this.consume(8),c=b.readUInt32BE(0);c>2097151?a(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*c+b.readUInt32BE(4),this.haveLength(a))}haveLength(a){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?a(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(a){let b=g;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}b=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&l(b,this._mask)}if(this._opcode>7)return void this.controlMessage(b,a);if(this._compressed){this._state=5,this.decompress(b,a);return}b.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(b)),this.dataMessage(a)}decompress(a,b){this._extensions[e.extensionName].decompress(a,this._fin,(a,c)=>{if(a)return b(a);if(c.length){if(this._messageLength+=c.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void b(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(c)}this.dataMessage(b),0===this._state&&this.startLoop(b)})}dataMessage(a){if(!this._fin){this._state=0;return}let b=this._messageLength,c=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let d;d="nodebuffer"===this._binaryType?j(c,b):"arraybuffer"===this._binaryType?k(j(c,b)):"blob"===this._binaryType?new Blob(c):c,this._allowSynchronousEvents?(this.emit("message",d,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!0),this._state=0,this.startLoop(a)}))}else{let d=j(c,b);if(!this._skipUTF8Validation&&!n(d))return void a(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));5===this._state||this._allowSynchronousEvents?(this.emit("message",d,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!1),this._state=0,this.startLoop(a)}))}}controlMessage(a,b){if(8===this._opcode){if(0===a.length)this._loop=!1,this.emit("conclude",1005,g),this.end();else{let c=a.readUInt16BE(0);if(!m(c))return void b(this.createError(RangeError,`invalid status code ${c}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let d=new o(a.buffer,a.byteOffset+2,a.length-2);if(!this._skipUTF8Validation&&!n(d))return void b(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",c,d),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",a),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",a),this._state=0,this.startLoop(b)}))}createError(a,b,c,d,e){this._loop=!1,this._errored=!0;let f=new a(c?`Invalid WebSocket frame: ${b}`:b);return Error.captureStackTrace(f,this.createError),f.code=e,f[h]=d,f}}},71387,(a,b,c)=>{"use strict";let d,{Duplex:e}=a.r(88947),{randomFillSync:f}=a.r(54799),g=a.r(10976),{EMPTY_BUFFER:h,kWebSocket:i,NOOP:j}=a.r(17376),{isBlob:k,isValidStatusCode:l}=a.r(88686),{mask:m,toBuffer:n}=a.r(29618),o=Symbol("kByteLength"),p=Buffer.alloc(4),q=8192;class r{constructor(a,b,c){this._extensions=b||{},c&&(this._generateMask=c,this._maskBuffer=Buffer.alloc(4)),this._socket=a,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=j,this[i]=void 0}static frame(a,b){let c,e,g=!1,h=2,i=!1;b.mask&&(c=b.maskBuffer||p,b.generateMask?b.generateMask(c):(8192===q&&(void 0===d&&(d=Buffer.alloc(8192)),f(d,0,8192),q=0),c[0]=d[q++],c[1]=d[q++],c[2]=d[q++],c[3]=d[q++]),i=(c[0]|c[1]|c[2]|c[3])==0,h=6),"string"==typeof a?e=(!b.mask||i)&&void 0!==b[o]?b[o]:(a=Buffer.from(a)).length:(e=a.length,g=b.mask&&b.readOnly&&!i);let j=e;e>=65536?(h+=8,j=127):e>125&&(h+=2,j=126);let k=Buffer.allocUnsafe(g?e+h:h);return(k[0]=b.fin?128|b.opcode:b.opcode,b.rsv1&&(k[0]|=64),k[1]=j,126===j?k.writeUInt16BE(e,2):127===j&&(k[2]=k[3]=0,k.writeUIntBE(e,4,6)),b.mask)?(k[1]|=128,k[h-4]=c[0],k[h-3]=c[1],k[h-2]=c[2],k[h-1]=c[3],i)?[k,a]:g?(m(a,c,k,h,e),[k]):(m(a,c,a,0,e),[k,a]):[k,a]}close(a,b,c,d){let e;if(void 0===a)e=h;else if("number"==typeof a&&l(a))if(void 0!==b&&b.length){let c=Buffer.byteLength(b);if(c>123)throw RangeError("The message must not be greater than 123 bytes");(e=Buffer.allocUnsafe(2+c)).writeUInt16BE(a,0),"string"==typeof b?e.write(b,2):e.set(b,2)}else(e=Buffer.allocUnsafe(2)).writeUInt16BE(a,0);else throw TypeError("First argument must be a valid error code number");let f={[o]:e.length,fin:!0,generateMask:this._generateMask,mask:c,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,e,!1,f,d]):this.sendFrame(r.frame(e,f),d)}ping(a,b,c){let d,e;if("string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),d>125)throw RangeError("The data size must not be greater than 125 bytes");let f={[o]:d,fin:!0,generateMask:this._generateMask,mask:b,maskBuffer:this._maskBuffer,opcode:9,readOnly:e,rsv1:!1};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,!1,f,c]):this.getBlobData(a,!1,f,c):0!==this._state?this.enqueue([this.dispatch,a,!1,f,c]):this.sendFrame(r.frame(a,f),c)}pong(a,b,c){let d,e;if("string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),d>125)throw RangeError("The data size must not be greater than 125 bytes");let f={[o]:d,fin:!0,generateMask:this._generateMask,mask:b,maskBuffer:this._maskBuffer,opcode:10,readOnly:e,rsv1:!1};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,!1,f,c]):this.getBlobData(a,!1,f,c):0!==this._state?this.enqueue([this.dispatch,a,!1,f,c]):this.sendFrame(r.frame(a,f),c)}send(a,b,c){let d,e,f=this._extensions[g.extensionName],h=b.binary?2:1,i=b.compress;"string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),this._firstFragment?(this._firstFragment=!1,i&&f&&f.params[f._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(i=d>=f._threshold),this._compress=i):(i=!1,h=0),b.fin&&(this._firstFragment=!0);let j={[o]:d,fin:b.fin,generateMask:this._generateMask,mask:b.mask,maskBuffer:this._maskBuffer,opcode:h,readOnly:e,rsv1:i};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,this._compress,j,c]):this.getBlobData(a,this._compress,j,c):0!==this._state?this.enqueue([this.dispatch,a,this._compress,j,c]):this.dispatch(a,this._compress,j,c)}getBlobData(a,b,c,d){this._bufferedBytes+=c[o],this._state=2,a.arrayBuffer().then(a=>{if(this._socket.destroyed){let a=Error("The socket was closed while the blob was being read");process.nextTick(s,this,a,d);return}this._bufferedBytes-=c[o];let e=n(a);b?this.dispatch(e,b,c,d):(this._state=0,this.sendFrame(r.frame(e,c),d),this.dequeue())}).catch(a=>{process.nextTick(t,this,a,d)})}dispatch(a,b,c,d){if(!b)return void this.sendFrame(r.frame(a,c),d);let e=this._extensions[g.extensionName];this._bufferedBytes+=c[o],this._state=1,e.compress(a,c.fin,(a,b)=>{this._socket.destroyed?s(this,Error("The socket was closed while data was being compressed"),d):(this._bufferedBytes-=c[o],this._state=0,c.readOnly=!1,this.sendFrame(r.frame(b,c),d),this.dequeue())})}dequeue(){for(;0===this._state&&this._queue.length;){let a=this._queue.shift();this._bufferedBytes-=a[3][o],Reflect.apply(a[0],this,a.slice(1))}}enqueue(a){this._bufferedBytes+=a[3][o],this._queue.push(a)}sendFrame(a,b){2===a.length?(this._socket.cork(),this._socket.write(a[0]),this._socket.write(a[1],b),this._socket.uncork()):this._socket.write(a[0],b)}}function s(a,b,c){"function"==typeof c&&c(b);for(let c=0;c<a._queue.length;c++){let d=a._queue[c],e=d[d.length-1];"function"==typeof e&&e(b)}}function t(a,b,c){s(a,b,c),a.onerror(b)}b.exports=r},25936,(a,b,c)=>{"use strict";let{kForOnEventAttribute:d,kListener:e}=a.r(17376),f=Symbol("kCode"),g=Symbol("kData"),h=Symbol("kError"),i=Symbol("kMessage"),j=Symbol("kReason"),k=Symbol("kTarget"),l=Symbol("kType"),m=Symbol("kWasClean");class n{constructor(a){this[k]=null,this[l]=a}get target(){return this[k]}get type(){return this[l]}}Object.defineProperty(n.prototype,"target",{enumerable:!0}),Object.defineProperty(n.prototype,"type",{enumerable:!0});class o extends n{constructor(a,b={}){super(a),this[f]=void 0===b.code?0:b.code,this[j]=void 0===b.reason?"":b.reason,this[m]=void 0!==b.wasClean&&b.wasClean}get code(){return this[f]}get reason(){return this[j]}get wasClean(){return this[m]}}Object.defineProperty(o.prototype,"code",{enumerable:!0}),Object.defineProperty(o.prototype,"reason",{enumerable:!0}),Object.defineProperty(o.prototype,"wasClean",{enumerable:!0});class p extends n{constructor(a,b={}){super(a),this[h]=void 0===b.error?null:b.error,this[i]=void 0===b.message?"":b.message}get error(){return this[h]}get message(){return this[i]}}Object.defineProperty(p.prototype,"error",{enumerable:!0}),Object.defineProperty(p.prototype,"message",{enumerable:!0});class q extends n{constructor(a,b={}){super(a),this[g]=void 0===b.data?null:b.data}get data(){return this[g]}}function r(a,b,c){"object"==typeof a&&a.handleEvent?a.handleEvent.call(a,c):a.call(b,c)}Object.defineProperty(q.prototype,"data",{enumerable:!0}),b.exports={CloseEvent:o,ErrorEvent:p,Event:n,EventTarget:{addEventListener(a,b,c={}){let f;for(let f of this.listeners(a))if(!c[d]&&f[e]===b&&!f[d])return;if("message"===a)f=function(a,c){let d=new q("message",{data:c?a:a.toString()});d[k]=this,r(b,this,d)};else if("close"===a)f=function(a,c){let d=new o("close",{code:a,reason:c.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});d[k]=this,r(b,this,d)};else if("error"===a)f=function(a){let c=new p("error",{error:a,message:a.message});c[k]=this,r(b,this,c)};else{if("open"!==a)return;f=function(){let a=new n("open");a[k]=this,r(b,this,a)}}f[d]=!!c[d],f[e]=b,c.once?this.once(a,f):this.on(a,f)},removeEventListener(a,b){for(let c of this.listeners(a))if(c[e]===b&&!c[d]){this.removeListener(a,c);break}}},MessageEvent:q}},16193,(a,b,c)=>{"use strict";let{tokenChars:d}=a.r(88686);function e(a,b,c){void 0===a[b]?a[b]=[c]:a[b].push(c)}b.exports={format:function(a){return Object.keys(a).map(b=>{let c=a[b];return Array.isArray(c)||(c=[c]),c.map(a=>[b].concat(Object.keys(a).map(b=>{let c=a[b];return Array.isArray(c)||(c=[c]),c.map(a=>!0===a?b:`${b}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(a){let b,c,f=Object.create(null),g=Object.create(null),h=!1,i=!1,j=!1,k=-1,l=-1,m=-1,n=0;for(;n<a.length;n++)if(l=a.charCodeAt(n),void 0===b)if(-1===m&&1===d[l])-1===k&&(k=n);else if(0!==n&&(32===l||9===l))-1===m&&-1!==k&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n);let c=a.slice(k,m);44===l?(e(f,c,g),g=Object.create(null)):b=c,k=m=-1}else throw SyntaxError(`Unexpected character at index ${n}`);else if(void 0===c)if(-1===m&&1===d[l])-1===k&&(k=n);else if(32===l||9===l)-1===m&&-1!==k&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n),e(g,a.slice(k,m),!0),44===l&&(e(f,b,g),g=Object.create(null),b=void 0),k=m=-1}else if(61===l&&-1!==k&&-1===m)c=a.slice(k,n),k=m=-1;else throw SyntaxError(`Unexpected character at index ${n}`);else if(i){if(1!==d[l])throw SyntaxError(`Unexpected character at index ${n}`);-1===k?k=n:h||(h=!0),i=!1}else if(j)if(1===d[l])-1===k&&(k=n);else if(34===l&&-1!==k)j=!1,m=n;else if(92===l)i=!0;else throw SyntaxError(`Unexpected character at index ${n}`);else if(34===l&&61===a.charCodeAt(n-1))j=!0;else if(-1===m&&1===d[l])-1===k&&(k=n);else if(-1!==k&&(32===l||9===l))-1===m&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n);let d=a.slice(k,m);h&&(d=d.replace(/\\/g,""),h=!1),e(g,c,d),44===l&&(e(f,b,g),g=Object.create(null),b=void 0),c=void 0,k=m=-1}else throw SyntaxError(`Unexpected character at index ${n}`);if(-1===k||j||32===l||9===l)throw SyntaxError("Unexpected end of input");-1===m&&(m=n);let o=a.slice(k,m);return void 0===b?e(f,o,g):(void 0===c?e(g,o,!0):h?e(g,c,o.replace(/\\/g,"")):e(g,c,o),e(f,b,g)),f}}},36705,(a,b,c)=>{"use strict";let d=a.r(27699),e=a.r(24836),f=a.r(21517),g=a.r(4446),h=a.r(55004),{randomBytes:i,createHash:j}=a.r(54799),{Duplex:k,Readable:l}=a.r(88947),{URL:m}=a.r(92509),n=a.r(10976),o=a.r(47541),p=a.r(71387),{isBlob:q}=a.r(88686),{BINARY_TYPES:r,EMPTY_BUFFER:s,GUID:t,kForOnEventAttribute:u,kListener:v,kStatusCode:w,kWebSocket:x,NOOP:y}=a.r(17376),{EventTarget:{addEventListener:z,removeEventListener:A}}=a.r(25936),{format:B,parse:C}=a.r(16193),{toBuffer:D}=a.r(29618),E=Symbol("kAborted"),F=[8,13],G=["CONNECTING","OPEN","CLOSING","CLOSED"],H=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class I extends d{constructor(a,b,c){super(),this._binaryType=r[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=s,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=I.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==a?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===b?b=[]:Array.isArray(b)||("object"==typeof b&&null!==b?(c=b,b=[]):b=[b]),function a(b,c,d,g){let h,k,l,o,p={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:F[1],maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...g,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(b._autoPong=p.autoPong,!F.includes(p.protocolVersion))throw RangeError(`Unsupported protocol version: ${p.protocolVersion} (supported versions: ${F.join(", ")})`);if(c instanceof m)h=c;else try{h=new m(c)}catch(a){throw SyntaxError(`Invalid URL: ${c}`)}"http:"===h.protocol?h.protocol="ws:":"https:"===h.protocol&&(h.protocol="wss:"),b._url=h.href;let q="wss:"===h.protocol,r="ws+unix:"===h.protocol;if("ws:"===h.protocol||q||r?r&&!h.pathname?k="The URL's pathname is empty":h.hash&&(k="The URL contains a fragment identifier"):k='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',k){let a=SyntaxError(k);if(0!==b._redirects)return void J(b,a);throw a}let s=q?443:80,u=i(16).toString("base64"),v=q?e.request:f.request,w=new Set;if(p.createConnection=p.createConnection||(q?L:K),p.defaultPort=p.defaultPort||s,p.port=h.port||s,p.host=h.hostname.startsWith("[")?h.hostname.slice(1,-1):h.hostname,p.headers={...p.headers,"Sec-WebSocket-Version":p.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},p.path=h.pathname+h.search,p.timeout=p.handshakeTimeout,p.perMessageDeflate&&(l=new n(!0!==p.perMessageDeflate?p.perMessageDeflate:{},!1,p.maxPayload),p.headers["Sec-WebSocket-Extensions"]=B({[n.extensionName]:l.offer()})),d.length){for(let a of d){if("string"!=typeof a||!H.test(a)||w.has(a))throw SyntaxError("An invalid or duplicated subprotocol was specified");w.add(a)}p.headers["Sec-WebSocket-Protocol"]=d.join(",")}if(p.origin&&(p.protocolVersion<13?p.headers["Sec-WebSocket-Origin"]=p.origin:p.headers.Origin=p.origin),(h.username||h.password)&&(p.auth=`${h.username}:${h.password}`),r){let a=p.path.split(":");p.socketPath=a[0],p.path=a[1]}if(p.followRedirects){if(0===b._redirects){b._originalIpc=r,b._originalSecure=q,b._originalHostOrSocketPath=r?p.socketPath:h.host;let a=g&&g.headers;if(g={...g,headers:{}},a)for(let[b,c]of Object.entries(a))g.headers[b.toLowerCase()]=c}else if(0===b.listenerCount("redirect")){let a=r?!!b._originalIpc&&p.socketPath===b._originalHostOrSocketPath:!b._originalIpc&&h.host===b._originalHostOrSocketPath;a&&(!b._originalSecure||q)||(delete p.headers.authorization,delete p.headers.cookie,a||delete p.headers.host,p.auth=void 0)}p.auth&&!g.headers.authorization&&(g.headers.authorization="Basic "+Buffer.from(p.auth).toString("base64")),o=b._req=v(p),b._redirects&&b.emit("redirect",b.url,o)}else o=b._req=v(p);p.timeout&&o.on("timeout",()=>{M(b,o,"Opening handshake has timed out")}),o.on("error",a=>{null===o||o[E]||(o=b._req=null,J(b,a))}),o.on("response",e=>{let f=e.headers.location,h=e.statusCode;if(f&&p.followRedirects&&h>=300&&h<400){let e;if(++b._redirects>p.maxRedirects)return void M(b,o,"Maximum redirects exceeded");o.abort();try{e=new m(f,c)}catch(a){J(b,SyntaxError(`Invalid URL: ${f}`));return}a(b,e,d,g)}else b.emit("unexpected-response",o,e)||M(b,o,`Unexpected server response: ${e.statusCode}`)}),o.on("upgrade",(a,c,d)=>{let e;if(b.emit("upgrade",a),b.readyState!==I.CONNECTING)return;o=b._req=null;let f=a.headers.upgrade;if(void 0===f||"websocket"!==f.toLowerCase())return void M(b,c,"Invalid Upgrade header");let g=j("sha1").update(u+t).digest("base64");if(a.headers["sec-websocket-accept"]!==g)return void M(b,c,"Invalid Sec-WebSocket-Accept header");let h=a.headers["sec-websocket-protocol"];if(void 0!==h?w.size?w.has(h)||(e="Server sent an invalid subprotocol"):e="Server sent a subprotocol but none was requested":w.size&&(e="Server sent no subprotocol"),e)return void M(b,c,e);h&&(b._protocol=h);let i=a.headers["sec-websocket-extensions"];if(void 0!==i){let a;if(!l)return void M(b,c,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{a=C(i)}catch(a){M(b,c,"Invalid Sec-WebSocket-Extensions header");return}let d=Object.keys(a);if(1!==d.length||d[0]!==n.extensionName)return void M(b,c,"Server indicated an extension that was not requested");try{l.accept(a[n.extensionName])}catch(a){M(b,c,"Invalid Sec-WebSocket-Extensions header");return}b._extensions[n.extensionName]=l}b.setSocket(c,d,{allowSynchronousEvents:p.allowSynchronousEvents,generateMask:p.generateMask,maxPayload:p.maxPayload,skipUTF8Validation:p.skipUTF8Validation})}),p.finishRequest?p.finishRequest(o,b):o.end()}(this,a,b,c)):(this._autoPong=c.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(a){r.includes(a)&&(this._binaryType=a,this._receiver&&(this._receiver._binaryType=a))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(a,b,c){let d=new o({allowSynchronousEvents:c.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:c.maxPayload,skipUTF8Validation:c.skipUTF8Validation}),e=new p(a,this._extensions,c.generateMask);this._receiver=d,this._sender=e,this._socket=a,d[x]=this,e[x]=this,a[x]=this,d.on("conclude",O),d.on("drain",P),d.on("error",Q),d.on("message",S),d.on("ping",T),d.on("pong",U),e.onerror=W,a.setTimeout&&a.setTimeout(0),a.setNoDelay&&a.setNoDelay(),b.length>0&&a.unshift(b),a.on("close",Y),a.on("data",Z),a.on("end",$),a.on("error",_),this._readyState=I.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=I.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[n.extensionName]&&this._extensions[n.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=I.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(a,b){if(this.readyState!==I.CLOSED){if(this.readyState===I.CONNECTING)return void M(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===I.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=I.CLOSING,this._sender.close(a,b,!this._isServer,a=>{!a&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),X(this)}}pause(){this.readyState!==I.CONNECTING&&this.readyState!==I.CLOSED&&(this._paused=!0,this._socket.pause())}ping(a,b,c){if(this.readyState===I.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof a?(c=a,a=b=void 0):"function"==typeof b&&(c=b,b=void 0),"number"==typeof a&&(a=a.toString()),this.readyState!==I.OPEN)?N(this,a,c):(void 0===b&&(b=!this._isServer),this._sender.ping(a||s,b,c))}pong(a,b,c){if(this.readyState===I.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof a?(c=a,a=b=void 0):"function"==typeof b&&(c=b,b=void 0),"number"==typeof a&&(a=a.toString()),this.readyState!==I.OPEN)?N(this,a,c):(void 0===b&&(b=!this._isServer),this._sender.pong(a||s,b,c))}resume(){this.readyState!==I.CONNECTING&&this.readyState!==I.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(a,b,c){if(this.readyState===I.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof b&&(c=b,b={}),"number"==typeof a&&(a=a.toString()),this.readyState!==I.OPEN)return void N(this,a,c);let d={binary:"string"!=typeof a,mask:!this._isServer,compress:!0,fin:!0,...b};this._extensions[n.extensionName]||(d.compress=!1),this._sender.send(a||s,d,c)}terminate(){if(this.readyState!==I.CLOSED){if(this.readyState===I.CONNECTING)return void M(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=I.CLOSING,this._socket.destroy())}}}function J(a,b){a._readyState=I.CLOSING,a._errorEmitted=!0,a.emit("error",b),a.emitClose()}function K(a){return a.path=a.socketPath,g.connect(a)}function L(a){return a.path=void 0,a.servername||""===a.servername||(a.servername=g.isIP(a.host)?"":a.host),h.connect(a)}function M(a,b,c){a._readyState=I.CLOSING;let d=Error(c);Error.captureStackTrace(d,M),b.setHeader?(b[E]=!0,b.abort(),b.socket&&!b.socket.destroyed&&b.socket.destroy(),process.nextTick(J,a,d)):(b.destroy(d),b.once("error",a.emit.bind(a,"error")),b.once("close",a.emitClose.bind(a)))}function N(a,b,c){if(b){let c=q(b)?b.size:D(b).length;a._socket?a._sender._bufferedBytes+=c:a._bufferedAmount+=c}if(c){let b=Error(`WebSocket is not open: readyState ${a.readyState} (${G[a.readyState]})`);process.nextTick(c,b)}}function O(a,b){let c=this[x];c._closeFrameReceived=!0,c._closeMessage=b,c._closeCode=a,void 0!==c._socket[x]&&(c._socket.removeListener("data",Z),process.nextTick(V,c._socket),1005===a?c.close():c.close(a,b))}function P(){let a=this[x];a.isPaused||a._socket.resume()}function Q(a){let b=this[x];void 0!==b._socket[x]&&(b._socket.removeListener("data",Z),process.nextTick(V,b._socket),b.close(a[w])),b._errorEmitted||(b._errorEmitted=!0,b.emit("error",a))}function R(){this[x].emitClose()}function S(a,b){this[x].emit("message",a,b)}function T(a){let b=this[x];b._autoPong&&b.pong(a,!this._isServer,y),b.emit("ping",a)}function U(a){this[x].emit("pong",a)}function V(a){a.resume()}function W(a){let b=this[x];b.readyState!==I.CLOSED&&(b.readyState===I.OPEN&&(b._readyState=I.CLOSING,X(b)),this._socket.end(),b._errorEmitted||(b._errorEmitted=!0,b.emit("error",a)))}function X(a){a._closeTimer=setTimeout(a._socket.destroy.bind(a._socket),3e4)}function Y(){let a,b=this[x];this.removeListener("close",Y),this.removeListener("data",Z),this.removeListener("end",$),b._readyState=I.CLOSING,this._readableState.endEmitted||b._closeFrameReceived||b._receiver._writableState.errorEmitted||null===(a=b._socket.read())||b._receiver.write(a),b._receiver.end(),this[x]=void 0,clearTimeout(b._closeTimer),b._receiver._writableState.finished||b._receiver._writableState.errorEmitted?b.emitClose():(b._receiver.on("error",R),b._receiver.on("finish",R))}function Z(a){this[x]._receiver.write(a)||this.pause()}function $(){let a=this[x];a._readyState=I.CLOSING,a._receiver.end(),this.end()}function _(){let a=this[x];this.removeListener("error",_),this.on("error",y),a&&(a._readyState=I.CLOSING,this.destroy())}Object.defineProperty(I,"CONNECTING",{enumerable:!0,value:G.indexOf("CONNECTING")}),Object.defineProperty(I.prototype,"CONNECTING",{enumerable:!0,value:G.indexOf("CONNECTING")}),Object.defineProperty(I,"OPEN",{enumerable:!0,value:G.indexOf("OPEN")}),Object.defineProperty(I.prototype,"OPEN",{enumerable:!0,value:G.indexOf("OPEN")}),Object.defineProperty(I,"CLOSING",{enumerable:!0,value:G.indexOf("CLOSING")}),Object.defineProperty(I.prototype,"CLOSING",{enumerable:!0,value:G.indexOf("CLOSING")}),Object.defineProperty(I,"CLOSED",{enumerable:!0,value:G.indexOf("CLOSED")}),Object.defineProperty(I.prototype,"CLOSED",{enumerable:!0,value:G.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(a=>{Object.defineProperty(I.prototype,a,{enumerable:!0})}),["open","error","close","message"].forEach(a=>{Object.defineProperty(I.prototype,`on${a}`,{enumerable:!0,get(){for(let b of this.listeners(a))if(b[u])return b[v];return null},set(b){for(let b of this.listeners(a))if(b[u]){this.removeListener(a,b);break}"function"==typeof b&&this.addEventListener(a,b,{[u]:!0})}})}),I.prototype.addEventListener=z,I.prototype.removeEventListener=A,b.exports=I},57515,(a,b,c)=>{"use strict";a.r(36705);let{Duplex:d}=a.r(88947);function e(a){a.emit("close")}function f(){!this.destroyed&&this._writableState.finished&&this.destroy()}function g(a){this.removeListener("error",g),this.destroy(),0===this.listenerCount("error")&&this.emit("error",a)}b.exports=function(a,b){let c=!0,h=new d({...b,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return a.on("message",function(b,c){let d=!c&&h._readableState.objectMode?b.toString():b;h.push(d)||a.pause()}),a.once("error",function(a){h.destroyed||(c=!1,h.destroy(a))}),a.once("close",function(){h.destroyed||h.push(null)}),h._destroy=function(b,d){if(a.readyState===a.CLOSED){d(b),process.nextTick(e,h);return}let f=!1;a.once("error",function(a){f=!0,d(a)}),a.once("close",function(){f||d(b),process.nextTick(e,h)}),c&&a.terminate()},h._final=function(b){a.readyState===a.CONNECTING?a.once("open",function(){h._final(b)}):null!==a._socket&&(a._socket._writableState.finished?(b(),h._readableState.endEmitted&&h.destroy()):(a._socket.once("finish",function(){b()}),a.close()))},h._read=function(){a.isPaused&&a.resume()},h._write=function(b,c,d){a.readyState===a.CONNECTING?a.once("open",function(){h._write(b,c,d)}):a.send(b,d)},h.on("end",f),h.on("error",g),h}},62219,(a,b,c)=>{"use strict";let{tokenChars:d}=a.r(88686);b.exports={parse:function(a){let b=new Set,c=-1,e=-1,f=0;for(;f<a.length;f++){let g=a.charCodeAt(f);if(-1===e&&1===d[g])-1===c&&(c=f);else if(0!==f&&(32===g||9===g))-1===e&&-1!==c&&(e=f);else if(44===g){if(-1===c)throw SyntaxError(`Unexpected character at index ${f}`);-1===e&&(e=f);let d=a.slice(c,e);if(b.has(d))throw SyntaxError(`The "${d}" subprotocol is duplicated`);b.add(d),c=e=-1}else throw SyntaxError(`Unexpected character at index ${f}`)}if(-1===c||-1!==e)throw SyntaxError("Unexpected end of input");let g=a.slice(c,f);if(b.has(g))throw SyntaxError(`The "${g}" subprotocol is duplicated`);return b.add(g),b}}},67691,(a,b,c)=>{"use strict";let d=a.r(27699),e=a.r(21517),{Duplex:f}=a.r(88947),{createHash:g}=a.r(54799),h=a.r(16193),i=a.r(10976),j=a.r(62219),k=a.r(36705),{GUID:l,kWebSocket:m}=a.r(17376),n=/^[+/0-9A-Za-z]{22}==$/;function o(a){a._state=2,a.emit("close")}function p(){this.destroy()}function q(a,b,c,d){c=c||e.STATUS_CODES[b],d={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(c),...d},a.once("finish",a.destroy),a.end(`HTTP/1.1 ${b} ${e.STATUS_CODES[b]}\r
5
- `+Object.keys(d).map(a=>`${a}: ${d[a]}`).join("\r\n")+"\r\n\r\n"+c)}function r(a,b,c,d,e,f){if(a.listenerCount("wsClientError")){let d=Error(e);Error.captureStackTrace(d,r),a.emit("wsClientError",d,c,b)}else q(c,d,e,f)}b.exports=class extends d{constructor(a,b){if(super(),null==(a={allowSynchronousEvents:!0,autoPong:!0,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:k,...a}).port&&!a.server&&!a.noServer||null!=a.port&&(a.server||a.noServer)||a.server&&a.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=a.port?(this._server=e.createServer((a,b)=>{let c=e.STATUS_CODES[426];b.writeHead(426,{"Content-Length":c.length,"Content-Type":"text/plain"}),b.end(c)}),this._server.listen(a.port,a.host,a.backlog,b)):a.server&&(this._server=a.server),this._server){const a=this.emit.bind(this,"connection");this._removeListeners=function(a,b){for(let c of Object.keys(b))a.on(c,b[c]);return function(){for(let c of Object.keys(b))a.removeListener(c,b[c])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(b,c,d)=>{this.handleUpgrade(b,c,d,a)}})}!0===a.perMessageDeflate&&(a.perMessageDeflate={}),a.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=a,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(a){if(2===this._state){a&&this.once("close",()=>{a(Error("The server is not running"))}),process.nextTick(o,this);return}if(a&&this.once("close",a),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(o,this);else{let a=this._server;this._removeListeners(),this._removeListeners=this._server=null,a.close(()=>{o(this)})}}shouldHandle(a){if(this.options.path){let b=a.url.indexOf("?");if((-1!==b?a.url.slice(0,b):a.url)!==this.options.path)return!1}return!0}handleUpgrade(a,b,c,d){b.on("error",p);let e=a.headers["sec-websocket-key"],f=a.headers.upgrade,g=+a.headers["sec-websocket-version"];if("GET"!==a.method)return void r(this,a,b,405,"Invalid HTTP method");if(void 0===f||"websocket"!==f.toLowerCase())return void r(this,a,b,400,"Invalid Upgrade header");if(void 0===e||!n.test(e))return void r(this,a,b,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==g&&8!==g)return void r(this,a,b,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(a))return void q(b,400);let k=a.headers["sec-websocket-protocol"],l=new Set;if(void 0!==k)try{l=j.parse(k)}catch(c){r(this,a,b,400,"Invalid Sec-WebSocket-Protocol header");return}let m=a.headers["sec-websocket-extensions"],o={};if(this.options.perMessageDeflate&&void 0!==m){let c=new i(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let a=h.parse(m);a[i.extensionName]&&(c.accept(a[i.extensionName]),o[i.extensionName]=c)}catch(c){r(this,a,b,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:a.headers[`${8===g?"sec-websocket-origin":"origin"}`],secure:!!(a.socket.authorized||a.socket.encrypted),req:a};if(2===this.options.verifyClient.length)return void this.options.verifyClient(f,(f,g,h,i)=>{if(!f)return q(b,g||401,h,i);this.completeUpgrade(o,e,l,a,b,c,d)});if(!this.options.verifyClient(f))return q(b,401)}this.completeUpgrade(o,e,l,a,b,c,d)}completeUpgrade(a,b,c,d,e,f,j){if(!e.readable||!e.writable)return e.destroy();if(e[m])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return q(e,503);let k=g("sha1").update(b+l).digest("base64"),n=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${k}`],r=new this.options.WebSocket(null,void 0,this.options);if(c.size){let a=this.options.handleProtocols?this.options.handleProtocols(c,d):c.values().next().value;a&&(n.push(`Sec-WebSocket-Protocol: ${a}`),r._protocol=a)}if(a[i.extensionName]){let b=a[i.extensionName].params,c=h.format({[i.extensionName]:[b]});n.push(`Sec-WebSocket-Extensions: ${c}`),r._extensions=a}this.emit("headers",n,d),e.write(n.concat("\r\n").join("\r\n")),e.removeListener("error",p),r.setSocket(e,f,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(r),r.on("close",()=>{this.clients.delete(r),this._shouldEmitClose&&!this.clients.size&&process.nextTick(o,this)})),j(r,d)}}},83915,64606,28032,99887,a=>{"use strict";let b,c,d;var e,f,g=a.i(63047);let h=Object.create(null);h.open="0",h.close="1",h.ping="2",h.pong="3",h.message="4",h.upgrade="5",h.noop="6";let i=Object.create(null);Object.keys(h).forEach(a=>{i[h[a]]=a});let j={type:"error",data:"parser error"},k=({type:a,data:b},c,d)=>d(b instanceof ArrayBuffer||ArrayBuffer.isView(b)?c?b:"b"+l(b,!0).toString("base64"):h[a]+(b||"")),l=(a,b)=>Buffer.isBuffer(a)||a instanceof Uint8Array&&!b?a:a instanceof ArrayBuffer?Buffer.from(a):Buffer.from(a.buffer,a.byteOffset,a.byteLength),m=(a,b)=>{if("string"!=typeof a)return{type:"message",data:n(a,b)};let c=a.charAt(0);return"b"===c?{type:"message",data:n(Buffer.from(a.substring(1),"base64"),b)}:i[c]?a.length>1?{type:i[c],data:a.substring(1)}:{type:i[c]}:j},n=(a,b)=>"arraybuffer"===b?a instanceof ArrayBuffer?a:Buffer.isBuffer(a)?a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength):a.buffer:Buffer.isBuffer(a)?a:Buffer.from(a);function o(a){return a.reduce((a,b)=>a+b.length,0)}function p(a,b){if(a[0].length===b)return a.shift();let c=new Uint8Array(b),d=0;for(let e=0;e<b;e++)c[e]=a[0][d++],d===a[0].length&&(a.shift(),d=0);return a.length&&d<a[0].length&&(a[0]=a[0].slice(d)),c}function q(a){if(a){var b=a;for(var c in q.prototype)b[c]=q.prototype[c];return b}}q.prototype.on=q.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(b),this},q.prototype.once=function(a,b){function c(){this.off(a,c),b.apply(this,arguments)}return c.fn=b,this.on(a,c),this},q.prototype.off=q.prototype.removeListener=q.prototype.removeAllListeners=q.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c,d=this._callbacks["$"+a];if(!d)return this;if(1==arguments.length)return delete this._callbacks["$"+a],this;for(var e=0;e<d.length;e++)if((c=d[e])===b||c.fn===b){d.splice(e,1);break}return 0===d.length&&delete this._callbacks["$"+a],this},q.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var b=Array(arguments.length-1),c=this._callbacks["$"+a],d=1;d<arguments.length;d++)b[d-1]=arguments[d];if(c){c=c.slice(0);for(var d=0,e=c.length;d<e;++d)c[d].apply(this,b)}return this},q.prototype.emitReserved=q.prototype.emit,q.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},q.prototype.hasListeners=function(a){return!!this.listeners(a).length};let r=process.nextTick,s=a.g;class t{constructor(){this._cookies=new Map}parseCookies(a){a&&a.forEach(a=>{let b=function(a){let b=a.split("; "),c=b[0].indexOf("=");if(-1===c)return;let d=b[0].substring(0,c).trim();if(!d.length)return;let e=b[0].substring(c+1).trim();34===e.charCodeAt(0)&&(e=e.slice(1,-1));let f={name:d,value:e};for(let a=1;a<b.length;a++){let c=b[a].split("=");if(2!==c.length)continue;let d=c[0].trim(),e=c[1].trim();switch(d){case"Expires":f.expires=new Date(e);break;case"Max-Age":let g=new Date;g.setUTCSeconds(g.getUTCSeconds()+parseInt(e,10)),f.expires=g}}return f}(a);b&&this._cookies.set(b.name,b)})}get cookies(){let a=Date.now();return this._cookies.forEach((b,c)=>{var d;(null==(d=b.expires)?void 0:d.getTime())<a&&this._cookies.delete(c)}),this._cookies.entries()}addCookies(a){let b=[];for(let[a,c]of this.cookies)b.push(`${a}=${c.value}`);b.length&&(a.setDisableHeaderCheck(!0),a.setRequestHeader("cookie",b.join("; ")))}appendCookies(a){for(let[b,c]of this.cookies)a.append("cookie",`${b}=${c.value}`)}}function u(a,...b){return b.reduce((b,c)=>(a.hasOwnProperty(c)&&(b[c]=a[c]),b),{})}let v=s.setTimeout,w=s.clearTimeout;function x(a,b){b.useNativeTimers?(a.setTimeoutFn=v.bind(s),a.clearTimeoutFn=w.bind(s)):(a.setTimeoutFn=s.setTimeout.bind(s),a.clearTimeoutFn=s.clearTimeout.bind(s))}function y(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var z=a.i(35290);let A=(0,z.default)("engine.io-client:transport");class B extends Error{constructor(a,b,c){super(a),this.description=b,this.context=c,this.type="TransportError"}}class C extends q{constructor(a){super(),this.writable=!1,x(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,b,c){return super.emitReserved("error",new B(a,b,c)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(a){"open"===this.readyState?this.write(a):A("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){let b=m(a,this.socket.binaryType);this.onPacket(b)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,b={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(b)}_hostname(){let a=this.opts.hostname;return -1===a.indexOf(":")?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(a){let b=function(a){let b="";for(let c in a)a.hasOwnProperty(c)&&(b.length&&(b+="&"),b+=encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b}(a);return b.length?"?"+b:""}}let D=(0,z.default)("engine.io-client:polling");class E extends C{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";let b=()=>{D("paused"),this.readyState="paused",a()};if(this._polling||!this.writable){let a=0;this._polling&&(D("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){D("pre-pause polling complete"),--a||b()})),this.writable||(D("we are currently writing - waiting to pause"),a++,this.once("drain",function(){D("pre-pause writing complete"),--a||b()}))}else b()}_poll(){D("polling"),this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){D("polling got data %s",a);let b=a=>{if("opening"===this.readyState&&"open"===a.type&&this.onOpen(),"close"===a.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};((a,b)=>{let c=a.split("\x1e"),d=[];for(let a=0;a<c.length;a++){let e=m(c[a],b);if(d.push(e),"error"===e.type)break}return d})(a,this.socket.binaryType).forEach(b),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this._poll():D('ignoring poll - transport state "%s"',this.readyState))}doClose(){let a=()=>{D("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(D("transport open - closing"),a()):(D("transport not open - deferring close"),this.once("open",a))}write(a){var b;let c,d,e;this.writable=!1,b=a=>{this.doWrite(a,()=>{this.writable=!0,this.emitReserved("drain")})},d=Array(c=a.length),e=0,a.forEach((a,f)=>{k(a,!1,a=>{d[f]=a,++e===c&&b(d.join("\x1e"))})})}uri(){let a=this.opts.secure?"https":"http",b=this.query||{};return!1!==this.opts.timestampRequests&&(b[this.opts.timestampParam]=y()),this.supportsBinary||b.sid||(b.b64=1),this.createUri(a,b)}}let F=!1;try{F="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(a){}let G=F,H=(0,z.default)("engine.io-client:polling");function I(){}class J extends E{constructor(a){if(super(a),"undefined"!=typeof location){const b="https:"===location.protocol;let c=location.port;c||(c=b?"443":"80"),this.xd="undefined"!=typeof location&&a.hostname!==location.hostname||c!==a.port}}doWrite(a,b){let c=this.request({method:"POST",data:a});c.on("success",b),c.on("error",(a,b)=>{this.onError("xhr post error",a,b)})}doPoll(){H("xhr poll");let a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(a,b)=>{this.onError("xhr poll error",a,b)}),this.pollXhr=a}}class K extends q{constructor(a,b,c){super(),this.createRequest=a,x(this,c),this._opts=c,this._method=c.method||"GET",this._uri=b,this._data=void 0!==c.data?c.data:null,this._create()}_create(){var a;let b=u(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");b.xdomain=!!this._opts.xd;let c=this._xhr=this.createRequest(b);try{H("xhr open %s: %s",this._method,this._uri),c.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let a in c.setDisableHeaderCheck&&c.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&c.setRequestHeader(a,this._opts.extraHeaders[a])}catch(a){}if("POST"===this._method)try{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(a){}try{c.setRequestHeader("Accept","*/*")}catch(a){}null==(a=this._opts.cookieJar)||a.addCookies(c),"withCredentials"in c&&(c.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(c.timeout=this._opts.requestTimeout),c.onreadystatechange=()=>{var a;3===c.readyState&&(null==(a=this._opts.cookieJar)||a.parseCookies(c.getResponseHeader("set-cookie"))),4===c.readyState&&(200===c.status||1223===c.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof c.status?c.status:0)},0))},H("xhr data %s",this._data),c.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}"undefined"!=typeof document&&(this._index=K.requestsCount++,K.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=I,a)try{this._xhr.abort()}catch(a){}"undefined"!=typeof document&&delete K.requests[this._index],this._xhr=null}}_onLoad(){let a=this._xhr.responseText;null!==a&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function L(){for(let a in K.requests)K.requests.hasOwnProperty(a)&&K.requests[a].abort()}K.requestsCount=0,K.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",L):"function"==typeof addEventListener&&addEventListener("onpagehide"in s?"pagehide":"unload",L,!1)),(d=function(a){let b=a.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!b||G))return new XMLHttpRequest}catch(a){}if(!b)try{return new s[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(a){}}({xdomain:!1}))&&d.responseType;let M=g.default||g;a.i(57515),a.i(47541),a.i(71387);var N=a.i(36705);a.i(67691),N.default;let O=(0,z.default)("engine.io-client:websocket"),P="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Q extends C{get name(){return"websocket"}doOpen(){let a=this.uri(),b=this.opts.protocols,c=P?{}:u(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,b,c)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let b=0;b<a.length;b++){let c=a[b],d=b===a.length-1;k(c,this.supportsBinary,a=>{try{this.doWrite(c,a)}catch(a){O("websocket closed before onclose event")}d&&r(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let a=this.opts.secure?"wss":"ws",b=this.query||{};return this.opts.timestampRequests&&(b[this.opts.timestampParam]=y()),this.supportsBinary||(b.b64=1),this.createUri(a,b)}}s.WebSocket||s.MozWebSocket;let R=(0,z.default)("engine.io-client:webtransport"),S={websocket:class extends Q{createSocket(a,b,c){var d;if(null==(d=this.socket)?void 0:d._cookieJar)for(let[a,b]of(c.headers=c.headers||{},c.headers.cookie="string"==typeof c.headers.cookie?[c.headers.cookie]:c.headers.cookie||[],this.socket._cookieJar.cookies))c.headers.cookie.push(`${a}=${b.value}`);return new N.default(a,b,c)}doWrite(a,b){let c={};a.options&&(c.compress=a.options.compress),this.opts.perMessageDeflate&&("string"==typeof b?Buffer.byteLength(b):b.length)<this.opts.perMessageDeflate.threshold&&(c.compress=!1),this.ws.send(b,c)}},webtransport:class extends C{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{R("transport closed gracefully"),this.onClose()}).catch(a=>{R("transport closed due to %s",a),this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{var d,e;let f,g,h,i,n=(d=Number.MAX_SAFE_INTEGER,e=this.socket.binaryType,c||(c=new TextDecoder),f=[],g=0,h=-1,i=!1,new TransformStream({transform(a,b){for(f.push(a);;){if(0===g){if(1>o(f))break;let a=p(f,1);i=(128&a[0])==128,g=(h=127&a[0])<126?3:126===h?1:2}else if(1===g){if(2>o(f))break;let a=p(f,2);h=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),g=3}else if(2===g){if(8>o(f))break;let a=p(f,8),c=new DataView(a.buffer,a.byteOffset,a.length),d=c.getUint32(0);if(d>2097151){b.enqueue(j);break}h=0x100000000*d+c.getUint32(4),g=3}else{if(o(f)<h)break;let a=p(f,h);b.enqueue(m(i?a:c.decode(a),e)),g=0}if(0===h||h>d){b.enqueue(j);break}}}})),q=a.readable.pipeThrough(n).getReader(),r=new TransformStream({transform(a,c){!function(a,c){if(a.data instanceof ArrayBuffer||ArrayBuffer.isView(a.data))return c(l(a.data,!1));k(a,!0,a=>{b||(b=new TextEncoder),c(b.encode(a))})}(a,b=>{let d,e=b.length;if(e<126)new DataView((d=new Uint8Array(1)).buffer).setUint8(0,e);else if(e<65536){let a=new DataView((d=new Uint8Array(3)).buffer);a.setUint8(0,126),a.setUint16(1,e)}else{let a=new DataView((d=new Uint8Array(9)).buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(e))}a.data&&"string"!=typeof a.data&&(d[0]|=128),c.enqueue(d),c.enqueue(b)})}});r.readable.pipeTo(a.writable),this._writer=r.writable.getWriter();let s=()=>{q.read().then(({done:a,value:b})=>{a?R("session is closed"):(R("received chunk: %o",b),this.onPacket(b),s())}).catch(a=>{R("an error occurred while reading: %s",a)})};s();let t={type:"open"};this.query.sid&&(t.data=`{"sid":"${this.query.sid}"}`),this._writer.write(t).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let b=0;b<a.length;b++){let c=a[b],d=b===a.length-1;this._writer.write(c).then(()=>{d&&r(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;null==(a=this._transport)||a.close()}},polling:class extends J{request(a={}){var b;return Object.assign(a,{xd:this.xd,cookieJar:null==(b=this.socket)?void 0:b._cookieJar},this.opts),new K(a=>new M(a),this.uri(),a)}}},T=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,U=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function V(a){var b,c;let d,e;if(a.length>8e3)throw"URI too long";let f=a,g=a.indexOf("["),h=a.indexOf("]");-1!=g&&-1!=h&&(a=a.substring(0,g)+a.substring(g,h).replace(/:/g,";")+a.substring(h,a.length));let i=T.exec(a||""),j={},k=14;for(;k--;)j[U[k]]=i[k]||"";return -1!=g&&-1!=h&&(j.source=f,j.host=j.host.substring(1,j.host.length-1).replace(/;/g,":"),j.authority=j.authority.replace("[","").replace("]","").replace(/;/g,":"),j.ipv6uri=!0),d=(b=j.path).replace(/\/{2,9}/g,"/").split("/"),("/"==b.slice(0,1)||0===b.length)&&d.splice(0,1),"/"==b.slice(-1)&&d.splice(d.length-1,1),j.pathNames=d,c=j.query,e={},c.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,b,c){b&&(e[b]=c)}),j.queryKey=e,j}let W=(0,z.default)("engine.io-client:socket"),X="function"==typeof addEventListener&&"function"==typeof removeEventListener,Y=[];X&&addEventListener("offline",()=>{W("closing %d connection(s) because the network was lost",Y.length),Y.forEach(a=>a())},!1);class Z extends q{constructor(a,b){if(super(),this.binaryType="nodebuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&"object"==typeof a&&(b=a,a=null),a){const c=V(a);b.hostname=c.host,b.secure="https"===c.protocol||"wss"===c.protocol,b.port=c.port,c.query&&(b.query=c.query)}else b.host&&(b.hostname=V(b.host).host);x(this,b),this.secure=null!=b.secure?b.secure:"undefined"!=typeof location&&"https:"===location.protocol,b.hostname&&!b.port&&(b.port=this.secure?"443":"80"),this.hostname=b.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=b.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},b.transports.forEach(a=>{let b=a.prototype.name;this.transports.push(b),this._transportsByName[b]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},b),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(a){let b={},c=a.split("&");for(let a=0,d=c.length;a<d;a++){let d=c[a].split("=");b[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return b}(this.opts.query)),X&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(W("adding listener for the 'offline' event"),this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=new t),this._open()}createTransport(a){W('creating transport "%s"',a);let b=Object.assign({},this.opts.query);b.EIO=4,b.transport=a,this.id&&(b.sid=this.id);let c=Object.assign({},this.opts,{query:b,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return W("options: %j",c),new this._transportsByName[a](c)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let a=this.opts.rememberUpgrade&&Z.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let b=this.createTransport(a);b.open(),this.setTransport(b)}setTransport(a){W("setting transport %s",a.name),this.transport&&(W("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",a=>this._onClose("transport close",a))}onOpen(){W("socket open"),this.readyState="open",Z.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(a){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(W('socket receive: type "%s", data "%s"',a.type,a.data),this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let b=Error("server error");b.code=a.data,this._onError(b);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data)}else W('packet received with socket readyState "%s"',this.readyState)}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let a=this._getWritablePackets();W("flushing %d packets in socket",a.length),this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let a=1;for(let b=0;b<this.writeBuffer.length;b++){let c=this.writeBuffer[b].data;if(c&&(a+="string"==typeof c?function(a){let b=0,c=0;for(let d=0,e=a.length;d<e;d++)(b=a.charCodeAt(d))<128?c+=1:b<2048?c+=2:b<55296||b>=57344?c+=3:(d++,c+=4);return c}(c):Math.ceil(1.33*(c.byteLength||c.size))),b>0&&a>this._maxPayload)return W("only send %d out of %d packets",b,this.writeBuffer.length),this.writeBuffer.slice(0,b);a+=2}return W("payload size is %d (max: %d)",a,this._maxPayload),this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let a=Date.now()>this._pingTimeoutTime;return a&&(W("throttled timer detected, scheduling connection close"),this._pingTimeoutTime=0,r(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,b,c){return this._sendPacket("message",a,b,c),this}send(a,b,c){return this._sendPacket("message",a,b,c),this}_sendPacket(a,b,c,d){if("function"==typeof b&&(d=b,b=void 0),"function"==typeof c&&(d=c,c=null),"closing"===this.readyState||"closed"===this.readyState)return;(c=c||{}).compress=!1!==c.compress;let e={type:a,data:b,options:c};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),d&&this.once("flush",d),this.flush()}close(){let a=()=>{this._onClose("forced close"),W("socket closing - telling transport to close"),this.transport.close()},b=()=>{this.off("upgrade",b),this.off("upgradeError",b),a()},c=()=>{this.once("upgrade",b),this.once("upgradeError",b)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():a()}):this.upgrading?c():a()),this}_onError(a){if(W("socket error %j",a),Z.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return W("trying next transport"),this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,b){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(W('socket close with reason: "%s"',a),this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),X&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=Y.indexOf(this._offlineEventListener);-1!==a&&(W("removing listener for the 'offline' event"),Y.splice(a,1))}this.readyState="closed",this.id=null,this.emitReserved("close",a,b),this.writeBuffer=[],this._prevBufferLen=0}}}Z.protocol=4;class $ extends Z{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade){W("starting upgrade probes");for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}}_probe(a){W('probing transport "%s"',a);let b=this.createTransport(a),c=!1;Z.priorWebsocketSuccess=!1;let d=()=>{c||(W('probe transport "%s" opened',a),b.send([{type:"ping",data:"probe"}]),b.once("packet",d=>{if(!c)if("pong"===d.type&&"probe"===d.data){if(W('probe transport "%s" pong',a),this.upgrading=!0,this.emitReserved("upgrading",b),!b)return;Z.priorWebsocketSuccess="websocket"===b.name,W('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{c||"closed"!==this.readyState&&(W("changing transport and sending upgrade packet"),j(),this.setTransport(b),b.send([{type:"upgrade"}]),this.emitReserved("upgrade",b),b=null,this.upgrading=!1,this.flush())})}else{W('probe transport "%s" failed',a);let c=Error("probe error");c.transport=b.name,this.emitReserved("upgradeError",c)}}))};function e(){c||(c=!0,j(),b.close(),b=null)}let f=c=>{let d=Error("probe error: "+c);d.transport=b.name,e(),W('probe transport "%s" failed because of error: %s',a,c),this.emitReserved("upgradeError",d)};function g(){f("transport closed")}function h(){f("socket closed")}function i(a){b&&a.name!==b.name&&(W('"%s" works - aborting "%s"',a.name,b.name),e())}let j=()=>{b.removeListener("open",d),b.removeListener("error",f),b.removeListener("close",g),this.off("close",h),this.off("upgrading",i)};b.once("open",d),b.once("error",f),b.once("close",g),this.once("close",h),this.once("upgrading",i),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==a?this.setTimeoutFn(()=>{c||b.open()},200):b.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){let b=[];for(let c=0;c<a.length;c++)~this.transports.indexOf(a[c])&&b.push(a[c]);return b}}class _ extends ${constructor(a,b={}){const c="object"==typeof a?a:b;(!c.transports||c.transports&&"string"==typeof c.transports[0])&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(a=>S[a]).filter(a=>!!a)),super(a,c)}}_.protocol;let aa=(0,z.default)("socket.io-client:url"),ab="function"==typeof ArrayBuffer,ac=Object.prototype.toString,ad="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===ac.call(Blob),ae="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===ac.call(File);function af(a){return ab&&(a instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer))||ad&&a instanceof Blob||ae&&a instanceof File}let ag=(0,z.default)("socket.io-parser"),ah=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];(e=f||(f={}))[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK";class ai{constructor(a){this.replacer=a}encode(a){return(ag("encoding packet %j",a),(a.type===f.EVENT||a.type===f.ACK)&&function a(b,c){if(!b||"object"!=typeof b)return!1;if(Array.isArray(b)){for(let c=0,d=b.length;c<d;c++)if(a(b[c]))return!0;return!1}if(af(b))return!0;if(b.toJSON&&"function"==typeof b.toJSON&&1==arguments.length)return a(b.toJSON(),!0);for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&a(b[c]))return!0;return!1}(a))?this.encodeAsBinary({type:a.type===f.EVENT?f.BINARY_EVENT:f.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let b=""+a.type;return(a.type===f.BINARY_EVENT||a.type===f.BINARY_ACK)&&(b+=a.attachments+"-"),a.nsp&&"/"!==a.nsp&&(b+=a.nsp+","),null!=a.id&&(b+=a.id),null!=a.data&&(b+=JSON.stringify(a.data,this.replacer)),ag("encoded %j as %s",a,b),b}encodeAsBinary(a){let b,c,d=(b=[],c=a.data,a.data=function a(b,c){if(!b)return b;if(af(b)){let a={_placeholder:!0,num:c.length};return c.push(b),a}if(Array.isArray(b)){let d=Array(b.length);for(let e=0;e<b.length;e++)d[e]=a(b[e],c);return d}if("object"==typeof b&&!(b instanceof Date)){let d={};for(let e in b)Object.prototype.hasOwnProperty.call(b,e)&&(d[e]=a(b[e],c));return d}return b}(c,b),a.attachments=b.length,{packet:a,buffers:b}),e=this.encodeAsString(d.packet),f=d.buffers;return f.unshift(e),f}}class aj extends q{constructor(a){super(),this.reviver=a}add(a){let b;if("string"==typeof a){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let c=(b=this.decodeString(a)).type===f.BINARY_EVENT;c||b.type===f.BINARY_ACK?(b.type=c?f.EVENT:f.ACK,this.reconstructor=new ak(b),0===b.attachments&&super.emitReserved("decoded",b)):super.emitReserved("decoded",b)}else if(af(a)||a.base64)if(this.reconstructor)(b=this.reconstructor.takeBinaryData(a))&&(this.reconstructor=null,super.emitReserved("decoded",b));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+a)}decodeString(a){let b=0,c={type:Number(a.charAt(0))};if(void 0===f[c.type])throw Error("unknown packet type "+c.type);if(c.type===f.BINARY_EVENT||c.type===f.BINARY_ACK){let d=b+1;for(;"-"!==a.charAt(++b)&&b!=a.length;);let e=a.substring(d,b);if(e!=Number(e)||"-"!==a.charAt(b))throw Error("Illegal attachments");c.attachments=Number(e)}if("/"===a.charAt(b+1)){let d=b+1;for(;++b&&","!==a.charAt(b)&&b!==a.length;);c.nsp=a.substring(d,b)}else c.nsp="/";let d=a.charAt(b+1);if(""!==d&&Number(d)==d){let d=b+1;for(;++b;){let c=a.charAt(b);if(null==c||Number(c)!=c){--b;break}if(b===a.length)break}c.id=Number(a.substring(d,b+1))}if(a.charAt(++b)){let d=this.tryParse(a.substr(b));if(aj.isPayloadValid(c.type,d))c.data=d;else throw Error("invalid payload")}return ag("decoded %s as %j",a,c),c}tryParse(a){try{return JSON.parse(a,this.reviver)}catch(a){return!1}}static isPayloadValid(a,b){switch(a){case f.CONNECT:return am(b);case f.DISCONNECT:return void 0===b;case f.CONNECT_ERROR:return"string"==typeof b||am(b);case f.EVENT:case f.BINARY_EVENT:return Array.isArray(b)&&("number"==typeof b[0]||"string"==typeof b[0]&&-1===ah.indexOf(b[0]));case f.ACK:case f.BINARY_ACK:return Array.isArray(b)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ak{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){var b,c;let a=(b=this.reconPack,c=this.buffers,b.data=function a(b,c){if(!b)return b;if(b&&!0===b._placeholder){if("number"==typeof b.num&&b.num>=0&&b.num<c.length)return c[b.num];throw Error("illegal attachments")}if(Array.isArray(b))for(let d=0;d<b.length;d++)b[d]=a(b[d],c);else if("object"==typeof b)for(let d in b)Object.prototype.hasOwnProperty.call(b,d)&&(b[d]=a(b[d],c));return b}(b.data,c),delete b.attachments,b);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}let al=Number.isInteger||function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a};function am(a){return"[object Object]"===Object.prototype.toString.call(a)}function an(a){var b;return"string"==typeof a.nsp&&(void 0===(b=a.id)||al(b))&&function(a,b){switch(a){case f.CONNECT:return void 0===b||am(b);case f.DISCONNECT:return void 0===b;case f.EVENT:return Array.isArray(b)&&("number"==typeof b[0]||"string"==typeof b[0]&&-1===ah.indexOf(b[0]));case f.ACK:return Array.isArray(b);case f.CONNECT_ERROR:return"string"==typeof b||am(b);default:return!1}}(a.type,a.data)}function ao(a,b,c){return a.on(b,c),function(){a.off(b,c)}}a.s(["Decoder",()=>aj,"Encoder",()=>ai,"PacketType",()=>f,"isPacketValid",()=>an,"protocol",0,5],32882);let ap=(0,z.default)("socket.io-client:socket"),aq=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ar extends q{constructor(a,b,c){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=b,c&&c.auth&&(this.auth=c.auth),this._opts=Object.assign({},c),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let a=this.io;this.subs=[ao(a,"open",this.onopen.bind(this)),ao(a,"packet",this.onpacket.bind(this)),ao(a,"error",this.onerror.bind(this)),ao(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...b){var c,d,e;if(aq.hasOwnProperty(a))throw Error('"'+a.toString()+'" is a reserved event name');if(b.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(b),this;let g={type:f.EVENT,data:b};if(g.options={},g.options.compress=!1!==this.flags.compress,"function"==typeof b[b.length-1]){let a=this.ids++;ap("emitting packet with ack id %d",a);let c=b.pop();this._registerAckCallback(a,c),g.id=a}let h=null==(d=null==(c=this.io.engine)?void 0:c.transport)?void 0:d.writable,i=this.connected&&!(null==(e=this.io.engine)?void 0:e._hasPingExpired());return this.flags.volatile&&!h?ap("discard packet as the transport is not currently writable"):i?(this.notifyOutgoingListeners(g),this.packet(g)):this.sendBuffer.push(g),this.flags={},this}_registerAckCallback(a,b){var c;let d=null!=(c=this.flags.timeout)?c:this._opts.ackTimeout;if(void 0===d){this.acks[a]=b;return}let e=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===a&&(ap("removing packet with ack id %d from the buffer",a),this.sendBuffer.splice(b,1));ap("event with ack id %d has timed out after %d ms",a,d),b.call(this,Error("operation has timed out"))},d),f=(...a)=>{this.io.clearTimeoutFn(e),b.apply(this,a)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...b){return new Promise((c,d)=>{let e=(a,b)=>a?d(a):c(b);e.withError=!0,b.push(e),this.emit(a,...b)})}_addToQueue(a){let b;"function"==typeof a[a.length-1]&&(b=a.pop());let c={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((a,...d)=>c!==this._queue[0]?ap("packet [%d] already acknowledged",c.id):(null!==a?c.tryCount>this._opts.retries&&(ap("packet [%d] is discarded after %d tries",c.id,c.tryCount),this._queue.shift(),b&&b(a)):(ap("packet [%d] was successfully sent",c.id),this._queue.shift(),b&&b(null,...d)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(a=!1){if(ap("draining queue"),!this.connected||0===this._queue.length)return;let b=this._queue[0];b.pending&&!a?ap("packet [%d] has already been sent and is waiting for an ack",b.id):(b.pending=!0,b.tryCount++,ap("sending packet [%d] (try n°%d)",b.id,b.tryCount),this.flags=b.flags,this.emit.apply(this,b.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){ap("transport is open - connecting"),"function"==typeof this.auth?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:f.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,b){ap("close (%s)",a),this.connected=!1,delete this.id,this.emitReserved("disconnect",a,b),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(b=>String(b.id)===a)){let b=this.acks[a];delete this.acks[a],b.withError&&b.call(this,Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case f.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case f.EVENT:case f.BINARY_EVENT:this.onevent(a);break;case f.ACK:case f.BINARY_ACK:this.onack(a);break;case f.DISCONNECT:this.ondisconnect();break;case f.CONNECT_ERROR:this.destroy();let b=Error(a.data.message);b.data=a.data.data,this.emitReserved("connect_error",b)}}onevent(a){let b=a.data||[];ap("emitting event %j",b),null!=a.id&&(ap("attaching ack callback to event"),b.push(this.ack(a.id))),this.connected?this.emitEvent(b):this.receiveBuffer.push(Object.freeze(b))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length)for(let b of this._anyListeners.slice())b.apply(this,a);super.emit.apply(this,a),this._pid&&a.length&&"string"==typeof a[a.length-1]&&(this._lastOffset=a[a.length-1])}ack(a){let b=this,c=!1;return function(...d){c||(c=!0,ap("sending ack %j",d),b.packet({type:f.ACK,id:a,data:d}))}}onack(a){let b=this.acks[a.id];"function"!=typeof b?ap("bad ack %s",a.id):(delete this.acks[a.id],ap("calling ack %s with %j",a.id,a.data),b.withError&&a.data.unshift(null),b.apply(this,a.data))}onconnect(a,b){ap("socket connected with id %s",a),this.id=a,this.recovered=b&&this._pid===b,this._pid=b,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){ap("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(ap("performing disconnect (%s)",this.nsp),this.packet({type:f.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){let b=this._anyListeners;for(let c=0;c<b.length;c++)if(a===b[c]){b.splice(c,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){let b=this._anyOutgoingListeners;for(let c=0;c<b.length;c++)if(a===b[c]){b.splice(c,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let b of this._anyOutgoingListeners.slice())b.apply(this,a.data)}}var as=a.i(32882);function at(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}at.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var b=Math.random(),c=Math.floor(b*this.jitter*a);a=(1&Math.floor(10*b))==0?a-c:a+c}return 0|Math.min(a,this.max)},at.prototype.reset=function(){this.attempts=0},at.prototype.setMin=function(a){this.ms=a},at.prototype.setMax=function(a){this.max=a},at.prototype.setJitter=function(a){this.jitter=a};let au=(0,z.default)("socket.io-client:manager");class av extends q{constructor(a,b){var c;super(),this.nsps={},this.subs=[],a&&"object"==typeof a&&(b=a,a=void 0),(b=b||{}).path=b.path||"/socket.io",this.opts=b,x(this,b),this.reconnection(!1!==b.reconnection),this.reconnectionAttempts(b.reconnectionAttempts||1/0),this.reconnectionDelay(b.reconnectionDelay||1e3),this.reconnectionDelayMax(b.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(c=b.randomizationFactor)?c:.5),this.backoff=new at({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==b.timeout?2e4:b.timeout),this._readyState="closed",this.uri=a;const d=b.parser||as;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=!1!==b.autoConnect,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return void 0===a?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var b;return void 0===a?this._reconnectionDelay:(this._reconnectionDelay=a,null==(b=this.backoff)||b.setMin(a),this)}randomizationFactor(a){var b;return void 0===a?this._randomizationFactor:(this._randomizationFactor=a,null==(b=this.backoff)||b.setJitter(a),this)}reconnectionDelayMax(a){var b;return void 0===a?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,null==(b=this.backoff)||b.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(a){if(au("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;au("opening %s",this.uri),this.engine=new _(this.uri,this.opts);let b=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;let d=ao(b,"open",function(){c.onopen(),a&&a()}),e=b=>{au("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",b),a?a(b):this.maybeReconnectOnOpen()},f=ao(b,"error",e);if(!1!==this._timeout){let a=this._timeout;au("connect attempt will timeout after %d",a);let c=this.setTimeoutFn(()=>{au("connect attempt timed out after %d",a),d(),e(Error("timeout")),b.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(d),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){au("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");let a=this.engine;this.subs.push(ao(a,"ping",this.onping.bind(this)),ao(a,"data",this.ondata.bind(this)),ao(a,"error",this.onerror.bind(this)),ao(a,"close",this.onclose.bind(this)),ao(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(a){this.onclose("parse error",a)}}ondecoded(a){r(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){au("error",a),this.emitReserved("error",a)}socket(a,b){let c=this.nsps[a];return c?this._autoConnect&&!c.active&&c.connect():(c=new ar(this,a,b),this.nsps[a]=c),c}_destroy(a){for(let a of Object.keys(this.nsps))if(this.nsps[a].active)return void au("socket %s is still active, skipping close",a);this._close()}_packet(a){au("writing packet %j",a);let b=this.encoder.encode(a);for(let c=0;c<b.length;c++)this.engine.write(b[c],a.options)}cleanup(){au("cleanup"),this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){au("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,b){var c;au("closed due to %s",a),this.cleanup(),null==(c=this.engine)||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,b),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let a=this;if(this.backoff.attempts>=this._reconnectionAttempts)au("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let b=this.backoff.duration();au("will wait %dms before reconnect attempt",b),this._reconnecting=!0;let c=this.setTimeoutFn(()=>{a.skipReconnect||(au("attempting reconnect"),this.emitReserved("reconnect_attempt",a.backoff.attempts),a.skipReconnect||a.open(b=>{b?(au("reconnect attempt error"),a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",b)):(au("reconnect success"),a.onreconnect())}))},b);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){let a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}let aw=(0,z.default)("socket.io-client"),ax={};function ay(a,b){let c;"object"==typeof a&&(b=a,a=void 0);let d=function(a,b="",c){let d=a;c=c||"undefined"!=typeof location&&location,null==a&&(a=c.protocol+"//"+c.host),"string"==typeof a&&("/"===a.charAt(0)&&(a="/"===a.charAt(1)?c.protocol+a:c.host+a),/^(https?|wss?):\/\//.test(a)||(aa("protocol-less url %s",a),a=void 0!==c?c.protocol+"//"+a:"https://"+a),aa("parse %s",a),d=V(a)),!d.port&&(/^(http|ws)$/.test(d.protocol)?d.port="80":/^(http|ws)s$/.test(d.protocol)&&(d.port="443")),d.path=d.path||"/";let e=-1!==d.host.indexOf(":")?"["+d.host+"]":d.host;return d.id=d.protocol+"://"+e+":"+d.port+b,d.href=d.protocol+"://"+e+(c&&c.port===d.port?"":":"+d.port),d}(a,(b=b||{}).path||"/socket.io"),e=d.source,f=d.id,g=d.path,h=ax[f]&&g in ax[f].nsps;return b.forceNew||b["force new connection"]||!1===b.multiplex||h?(aw("ignoring socket cache for %s",e),c=new av(e,b)):(ax[f]||(aw("new io instance for %s",e),ax[f]=new av(e,b)),c=ax[f]),d.query&&!b.query&&(b.query=d.queryKey),c.socket(d.path,b)}Object.assign(ay,{Manager:av,Socket:ar,io:ay,connect:ay}),a.s(["io",()=>ay],83915);let az="https://remote.9router.com",aA={connect:`${az}/api/connect`,tempKeyCreate:`${az}/api/temp-key/create`,tempKeyVerify:`${az}/api/temp-key/verify`,tempKeyRemove:`${az}/api/temp-key/remove`,localSites:"/api/local-sites"};a.s(["API_ENDPOINTS",0,aA,"WORKER_API",0,az],64606);var aB=a.i(72131);function aC(){let a=(0,aB.useCallback)(()=>null,[]);return{getAuth:a,setAuth:(0,aB.useCallback)(a=>{},[]),clearAuth:(0,aB.useCallback)(()=>{},[])}}a.s(["useSessionStorage",()=>aC],28032);var aD=a.i(87924);function aE({size:a="md",text:b,className:c=""}){return(0,aD.jsxs)("div",{className:`flex flex-col items-center justify-center gap-3 ${c}`,children:[(0,aD.jsx)("div",{className:`animate-spin rounded-full border-blue-500 ${{sm:"h-4 w-4 border-2",md:"h-8 w-8 border-2",lg:"h-12 w-12 border-b-2"}[a]}`}),b&&(0,aD.jsx)("p",{className:"text-slate-400 text-sm",children:b})]})}a.s(["default",()=>aE],99887)}];
4
+ - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`))}function aa(a,b,c,d){if(d.syncDynamicErrorWithStack)throw _(a,d.syncDynamicErrorWithStack),new j.StaticGenBailoutError;if(0!==b){if(c.hasSuspenseAboveBody)return;let d=c.dynamicErrors;if(d.length>0){for(let b=0;b<d.length;b++)_(a,d[b]);throw new j.StaticGenBailoutError}if(c.hasDynamicViewport)throw console.error(`Route "${a.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new j.StaticGenBailoutError;if(1===b)throw console.error(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new j.StaticGenBailoutError}else if(!1===c.hasAllowedDynamic&&c.hasDynamicMetadata)throw console.error(`Route "${a.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new j.StaticGenBailoutError}function ab(a,b,c){if(c.hasSuspenseAboveBody)return[];if(0!==b){let d=c.dynamicErrors;if(d.length>0)return d;if(1===b)return[Object.defineProperty(new q.InvariantError(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}else if(!1===c.hasAllowedDynamic&&0===c.dynamicErrors.length&&c.dynamicMetadata)return[c.dynamicMetadata];return[]}function ac(a,b){return a.runtimeStagePromise?a.runtimeStagePromise.then(()=>b):b}},44753,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(35710),e=a.r(31101),f=a.r(41997),g=a.r(77747),h=a.r(54110),i=a.r(3326);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},47083,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(44753).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},21066,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return h.RedirectType},forbidden:function(){return j.forbidden},notFound:function(){return i.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return k.unauthorized},unstable_isUnrecognizedActionError:function(){return m},unstable_rethrow:function(){return l.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(75718),g=a.r(22099),h=a.r(11026),i=a.r(28102),j=a.r(64177),k=a.r(88213),l=a.r(47083);function m(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},74137,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return h.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return j.ServerInsertedHTMLContext},forbidden:function(){return l.forbidden},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},unauthorized:function(){return l.unauthorized},unstable_isUnrecognizedActionError:function(){return k.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return l.unstable_rethrow},useParams:function(){return r},usePathname:function(){return p},useRouter:function(){return q},useSearchParams:function(){return o},useSelectedLayoutSegment:function(){return t},useSelectedLayoutSegments:function(){return s},useServerInsertedHTML:function(){return j.useServerInsertedHTML}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(9270),h=a.r(36313),i=a.r(39118),j=a.r(18341),k=a.r(57997),l=a.r(21066),m=a.r(54110).useDynamicRouteParams,n=a.r(54110).useDynamicSearchParams;function o(){n?.("useSearchParams()");let a=(0,f.useContext)(h.SearchParamsContext);return(0,f.useMemo)(()=>a?new h.ReadonlyURLSearchParams(a):null,[a])}function p(){return m?.("usePathname()"),(0,f.useContext)(h.PathnameContext)}function q(){let a=(0,f.useContext)(g.AppRouterContext);if(null===a)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return a}function r(){return m?.("useParams()"),(0,f.useContext)(h.PathParamsContext)}function s(a="children"){m?.("useSelectedLayoutSegments()");let b=(0,f.useContext)(g.LayoutRouterContext);return b?(0,i.getSelectedLayoutSegmentPath)(b.parentTree,a):null}function t(a="children"){m?.("useSelectedLayoutSegment()"),(0,f.useContext)(h.NavigationPromisesContext);let b=s(a);return(0,i.computeSelectedLayoutSegment)(b,a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},50944,(a,b,c)=>{b.exports=a.r(74137)},22734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},92509,(a,b,c)=>{b.exports=a.x("url",()=>require("url"))},33405,(a,b,c)=>{b.exports=a.x("child_process",()=>require("child_process"))},21517,(a,b,c)=>{b.exports=a.x("http",()=>require("http"))},24836,(a,b,c)=>{b.exports=a.x("https",()=>require("https"))},63047,(a,b,c)=>{var d=a.r(22734),e=a.r(92509),f=a.r(33405).spawn;function g(b){"use strict";b=b||{};var c,g,h=this,i=a.r(21517),j=a.r(24836),k={},l=!1,m={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},n=Object.assign({},m),o=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],p=["TRACE","TRACK","CONNECT"],q=!1,r=!1,s=!1,t={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.response=Buffer.alloc(0),this.status=null,this.statusText=null,this.open=function(a,b,c,d,e){if(this.abort(),r=!1,s=!1,!(a&&-1===p.indexOf(a)))throw Error("SecurityError: Request method not allowed");k={method:a,url:b.toString(),async:"boolean"!=typeof c||c,user:d||null,password:e||null},u(this.OPENED)},this.setDisableHeaderCheck=function(a){l=a},this.setRequestHeader=function(a,b){if(this.readyState!=this.OPENED)throw Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(!l&&(!a||-1!==o.indexOf(a.toLowerCase())))return console.warn('Refused to set unsafe header "'+a+'"'),!1;if(q)throw Error("INVALID_STATE_ERR: send flag is true");return n[a]=b,!0},this.getResponseHeader=function(a){return"string"==typeof a&&this.readyState>this.OPENED&&g.headers[a.toLowerCase()]&&!r?g.headers[a.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||r)return"";var a="";for(var b in g.headers)"set-cookie"!==b&&"set-cookie2"!==b&&(a+=b+": "+g.headers[b]+"\r\n");return a.substr(0,a.length-2)},this.getRequestHeader=function(a){return"string"==typeof a&&n[a]?n[a]:""},this.send=function(a){if(this.readyState!=this.OPENED)throw Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(q)throw Error("INVALID_STATE_ERR: send has already been called");var l,m=!1,o=!1,p=e.parse(k.url);switch(p.protocol){case"https:":m=!0;case"http:":l=p.hostname;break;case"file:":o=!0;break;case void 0:case"":l="localhost";break;default:throw Error("Protocol not supported.")}if(o){if("GET"!==k.method)throw Error("XMLHttpRequest: Only GET method is supported");if(k.async)d.readFile(unescape(p.pathname),function(a,b){a?h.handleError(a,a.errno||-1):(h.status=200,h.responseText=b.toString("utf8"),h.response=b,u(h.DONE))});else try{this.response=d.readFileSync(unescape(p.pathname)),this.responseText=this.response.toString("utf8"),this.status=200,u(h.DONE)}catch(a){this.handleError(a,a.errno||-1)}return}var s=p.port||(m?443:80),t=p.pathname+(p.search?p.search:"");if(n.Host=l,m&&443===s||80===s||(n.Host+=":"+p.port),k.user){void 0===k.password&&(k.password="");var v=new Buffer(k.user+":"+k.password);n.Authorization="Basic "+v.toString("base64")}"GET"===k.method||"HEAD"===k.method?a=null:a?(n["Content-Length"]=Buffer.isBuffer(a)?a.length:Buffer.byteLength(a),Object.keys(n).some(function(a){return"content-type"===a.toLowerCase()})||(n["Content-Type"]="text/plain;charset=UTF-8")):"POST"===k.method&&(n["Content-Length"]=0);var w=b.agent||!1,x={host:l,port:s,path:t,method:k.method,headers:n,agent:w};if(m&&(x.pfx=b.pfx,x.key=b.key,x.passphrase=b.passphrase,x.cert=b.cert,x.ca=b.ca,x.ciphers=b.ciphers,x.rejectUnauthorized=!1!==b.rejectUnauthorized),r=!1,k.async){var y=m?j.request:i.request;q=!0,h.dispatchEvent("readystatechange");var z=function(a){if(302===(g=a).statusCode||303===g.statusCode||307===g.statusCode){k.url=g.headers.location;var d=e.parse(k.url);l=d.hostname;var f={hostname:d.hostname,port:d.port,path:d.path,method:303===g.statusCode?"GET":k.method,headers:n};m&&(f.pfx=b.pfx,f.key=b.key,f.passphrase=b.passphrase,f.cert=b.cert,f.ca=b.ca,f.ciphers=b.ciphers,f.rejectUnauthorized=!1!==b.rejectUnauthorized),(c=y(f,z).on("error",A)).end();return}u(h.HEADERS_RECEIVED),h.status=g.statusCode,g.on("data",function(a){if(a){var b=Buffer.from(a);h.response=Buffer.concat([h.response,b])}q&&u(h.LOADING)}),g.on("end",function(){q&&(q=!1,u(h.DONE),h.responseText=h.response.toString("utf8"))}),g.on("error",function(a){h.handleError(a)})},A=function(a){if(c.reusedSocket&&"ECONNRESET"===a.code)return y(x,z).on("error",A);h.handleError(a)};c=y(x,z).on("error",A),b.autoUnref&&c.on("socket",a=>{a.unref()}),a&&c.write(a),c.end(),h.dispatchEvent("loadstart")}else{var B=".node-xmlhttprequest-content-"+process.pid,C=".node-xmlhttprequest-sync-"+process.pid;d.writeFileSync(C,"","utf8");for(var D="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(m?"s":"")+".request;var options = "+JSON.stringify(x)+";var responseText = '';var responseData = Buffer.alloc(0);var req = doRequest(options, function(response) {response.on('data', function(chunk) { var data = Buffer.from(chunk); responseText += data.toString('utf8'); responseData = Buffer.concat([responseData, data]);});response.on('end', function() {fs.writeFileSync('"+B+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText, data: responseData.toString('base64')}}), 'utf8');fs.unlinkSync('"+C+"');});response.on('error', function(error) {fs.writeFileSync('"+B+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+C+"');});}).on('error', function(error) {fs.writeFileSync('"+B+"', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('"+C+"');});"+(a?"req.write('"+JSON.stringify(a).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",E=f(process.argv[0],["-e",D]);d.existsSync(C););if(h.responseText=d.readFileSync(B,"utf8"),E.stdin.end(),d.unlinkSync(B),h.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)){var F=JSON.parse(h.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/,""));h.handleError(F,503)}else{h.status=h.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/,"$1");var G=JSON.parse(h.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/,"$1"));g={statusCode:h.status,headers:G.data.headers},h.responseText=G.data.text,h.response=Buffer.from(G.data.data,"base64"),u(h.DONE,!0)}}},this.handleError=function(a,b){this.status=b||0,this.statusText=a,this.responseText=a.stack,r=!0,u(this.DONE)},this.abort=function(){c&&(c.abort(),c=null),n=Object.assign({},m),this.responseText="",this.responseXML="",this.response=Buffer.alloc(0),r=s=!0,this.readyState!==this.UNSENT&&(this.readyState!==this.OPENED||q)&&this.readyState!==this.DONE&&(q=!1,u(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(a,b){a in t||(t[a]=[]),t[a].push(b)},this.removeEventListener=function(a,b){a in t&&(t[a]=t[a].filter(function(a){return a!==b}))},this.dispatchEvent=function(a){if("function"==typeof h["on"+a]&&(this.readyState===this.DONE&&k.async?setTimeout(function(){h["on"+a]()},0):h["on"+a]()),a in t)for(let b=0,c=t[a].length;b<c;b++)this.readyState===this.DONE?setTimeout(function(){t[a][b].call(h)},0):t[a][b].call(h)};var u=function(a){if(h.readyState!==a&&(h.readyState!==h.UNSENT||!s)&&(h.readyState=a,(k.async||h.readyState<h.OPENED||h.readyState===h.DONE)&&h.dispatchEvent("readystatechange"),h.readyState===h.DONE)){let a;a=s?"abort":r?"error":"load",h.dispatchEvent(a),h.dispatchEvent("loadend")}}}b.exports=g,g.XMLHttpRequest=g},84425,(a,b,c)=>{function d(a,b,c,d){return Math.round(a/c)+" "+d+(b>=1.5*c?"s":"")}b.exports=function(a,b){b=b||{};var c,e,f,g,h=typeof a;if("string"===h&&a.length>0){var i=a;if(!((i=String(i)).length>100)){var j=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(j){var k=parseFloat(j[1]);switch((j[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*k;case"weeks":case"week":case"w":return 6048e5*k;case"days":case"day":case"d":return 864e5*k;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*k;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*k;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*k;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return k;default:break}}}return}if("number"===h&&isFinite(a)){return b.long?(e=Math.abs(c=a))>=864e5?d(c,e,864e5,"day"):e>=36e5?d(c,e,36e5,"hour"):e>=6e4?d(c,e,6e4,"minute"):e>=1e3?d(c,e,1e3,"second"):c+" ms":(g=Math.abs(f=a))>=864e5?Math.round(f/864e5)+"d":g>=36e5?Math.round(f/36e5)+"h":g>=6e4?Math.round(f/6e4)+"m":g>=1e3?Math.round(f/1e3)+"s":f+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}},11017,(a,b,c)=>{b.exports=function(b){function c(a){let b,e,f,g=null;function h(...a){if(!h.enabled)return;let d=Number(new Date);h.diff=d-(b||d),h.prev=b,h.curr=d,b=d,a[0]=c.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");let e=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(b,d)=>{if("%%"===b)return"%";e++;let f=c.formatters[d];if("function"==typeof f){let c=a[e];b=f.call(h,c),a.splice(e,1),e--}return b}),c.formatArgs.call(h,a),(h.log||c.log).apply(h,a)}return h.namespace=a,h.useColors=c.useColors(),h.color=c.selectColor(a),h.extend=d,h.destroy=c.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==g?g:(e!==c.namespaces&&(e=c.namespaces,f=c.enabled(a)),f),set:a=>{g=a}}),"function"==typeof c.init&&c.init(h),h}function d(a,b){let d=c(this.namespace+(void 0===b?":":b)+a);return d.log=this.log,d}function e(a,b){let c=0,d=0,e=-1,f=0;for(;c<a.length;)if(d<b.length&&(b[d]===a[c]||"*"===b[d]))"*"===b[d]?(e=d,f=c):c++,d++;else{if(-1===e)return!1;d=e+1,c=++f}for(;d<b.length&&"*"===b[d];)d++;return d===b.length}return c.debug=c,c.default=c,c.coerce=function(a){return a instanceof Error?a.stack||a.message:a},c.disable=function(){let a=[...c.names,...c.skips.map(a=>"-"+a)].join(",");return c.enable(""),a},c.enable=function(a){for(let b of(c.save(a),c.namespaces=a,c.names=[],c.skips=[],("string"==typeof a?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===b[0]?c.skips.push(b.slice(1)):c.names.push(b)},c.enabled=function(a){for(let b of c.skips)if(e(a,b))return!1;for(let b of c.names)if(e(a,b))return!0;return!1},c.humanize=a.r(84425),c.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(b).forEach(a=>{c[a]=b[a]}),c.names=[],c.skips=[],c.formatters={},c.selectColor=function(a){let b=0;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c)|0;return c.colors[Math.abs(b)%c.colors.length]},c.enable(c.load()),c}},70722,(a,b,c)=>{b.exports=a.x("tty",()=>require("tty"))},46786,(a,b,c)=>{b.exports=a.x("os",()=>require("os"))},55858,(a,b,c)=>{"use strict";b.exports=(a,b=process.argv)=>{let c=a.startsWith("-")?"":1===a.length?"-":"--",d=b.indexOf(c+a),e=b.indexOf("--");return -1!==d&&(-1===e||d<e)}},73083,(a,b,c)=>{"use strict";let d;a.r(46786);let e=a.r(70722),f=a.r(55858),{env:g}=process;function h(a){return 0!==a&&{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}function i(a,b){if(0===d)return 0;if(f("color=16m")||f("color=full")||f("color=truecolor"))return 3;if(f("color=256"))return 2;if(a&&!b&&void 0===d)return 0;let c=d||0;if("dumb"===g.TERM)return c;if("CI"in g)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(a=>a in g)||"codeship"===g.CI_NAME?1:c;if("TEAMCITY_VERSION"in g)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION);if("truecolor"===g.COLORTERM)return 3;if("TERM_PROGRAM"in g){let a=parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(g.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM)||"COLORTERM"in g?1:c}f("no-color")||f("no-colors")||f("color=false")||f("color=never")?d=0:(f("color")||f("colors")||f("color=true")||f("color=always"))&&(d=1),"FORCE_COLOR"in g&&(d="true"===g.FORCE_COLOR?1:"false"===g.FORCE_COLOR?0:0===g.FORCE_COLOR.length?1:Math.min(parseInt(g.FORCE_COLOR,10),3)),b.exports={supportsColor:function(a){return h(i(a,a&&a.isTTY))},stdout:h(i(!0,e.isatty(1))),stderr:h(i(!0,e.isatty(2)))}},81454,(a,b,c)=>{let d=a.r(70722),e=a.r(24361);c.init=function(a){a.inspectOpts={};let b=Object.keys(c.inspectOpts);for(let d=0;d<b.length;d++)a.inspectOpts[b[d]]=c.inspectOpts[b[d]]},c.log=function(...a){return process.stderr.write(e.formatWithOptions(c.inspectOpts,...a)+"\n")},c.formatArgs=function(a){let{namespace:d,useColors:e}=this;if(e){let c=this.color,e="\x1b[3"+(c<8?c:"8;5;"+c),f=` ${e};1m${d} \u001B[0m`;a[0]=f+a[0].split("\n").join("\n"+f),a.push(e+"m+"+b.exports.humanize(this.diff)+"\x1b[0m")}else a[0]=(c.inspectOpts.hideDate?"":new Date().toISOString()+" ")+d+" "+a[0]},c.save=function(a){a?process.env.DEBUG=a:delete process.env.DEBUG},c.load=function(){return process.env.DEBUG},c.useColors=function(){return"colors"in c.inspectOpts?!!c.inspectOpts.colors:d.isatty(process.stderr.fd)},c.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),c.colors=[6,2,3,4,5,1];try{let b=a.r(73083);b&&(b.stderr||b).level>=2&&(c.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(a){}c.inspectOpts=Object.keys(process.env).filter(a=>/^debug_/i.test(a)).reduce((a,b)=>{let c=b.substring(6).toLowerCase().replace(/_([a-z])/g,(a,b)=>b.toUpperCase()),d=process.env[b];return d=!!/^(yes|on|true|enabled)$/i.test(d)||!/^(no|off|false|disabled)$/i.test(d)&&("null"===d?null:Number(d)),a[c]=d,a},{}),b.exports=a.r(11017)(c);let{formatters:f}=b.exports;f.o=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts).split("\n").map(a=>a.trim()).join(" ")},f.O=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts)}},47522,(a,b,c)=>{let d;c.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+b.exports.humanize(this.diff),!this.useColors)return;let c="color: "+this.color;a.splice(1,0,c,"color: inherit");let d=0,e=0;a[0].replace(/%[a-zA-Z%]/g,a=>{"%%"!==a&&(d++,"%c"===a&&(e=d))}),a.splice(e,0,c)},c.save=function(a){try{a?c.storage.setItem("debug",a):c.storage.removeItem("debug")}catch(a){}},c.load=function(){let a;try{a=c.storage.getItem("debug")||c.storage.getItem("DEBUG")}catch(a){}return!a&&"undefined"!=typeof process&&"env"in process&&(a=process.env.DEBUG),a},c.useColors=function(){let a;return!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof navigator&&navigator.userAgent&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch(a){}}(),d=!1,c.destroy=()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),b.exports=a.r(11017)(c);let{formatters:e}=b.exports;e.j=function(a){try{return JSON.stringify(a)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}}},35290,(a,b,c)=>{"undefined"==typeof process||"renderer"===process.type||process.__nwjs?b.exports=a.r(47522):b.exports=a.r(81454)},27699,(a,b,c)=>{b.exports=a.x("events",()=>require("events"))},4446,(a,b,c)=>{b.exports=a.x("net",()=>require("net"))},55004,(a,b,c)=>{b.exports=a.x("tls",()=>require("tls"))},54799,(a,b,c)=>{b.exports=a.x("crypto",()=>require("crypto"))},88947,(a,b,c)=>{b.exports=a.x("stream",()=>require("stream"))},6461,(a,b,c)=>{b.exports=a.x("zlib",()=>require("zlib"))},65514,(a,b,c)=>{"use strict";let d=["nodebuffer","arraybuffer","fragments"],e="undefined"!=typeof Blob;e&&d.push("blob"),b.exports={BINARY_TYPES:d,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:e,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},40352,(a,b,c)=>{"use strict";let{EMPTY_BUFFER:d}=a.r(65514),e=Buffer[Symbol.species];function f(a,b,c,d,e){for(let f=0;f<e;f++)c[d+f]=a[f]^b[3&f]}function g(a,b){for(let c=0;c<a.length;c++)a[c]^=b[3&c]}function h(a){let b;return(h.readOnly=!0,Buffer.isBuffer(a))?a:(a instanceof ArrayBuffer?b=new e(a):ArrayBuffer.isView(a)?b=new e(a.buffer,a.byteOffset,a.byteLength):(b=Buffer.from(a),h.readOnly=!1),b)}if(b.exports={concat:function(a,b){if(0===a.length)return d;if(1===a.length)return a[0];let c=Buffer.allocUnsafe(b),f=0;for(let b=0;b<a.length;b++){let d=a[b];c.set(d,f),f+=d.length}return f<b?new e(c.buffer,c.byteOffset,f):c},mask:f,toArrayBuffer:function(a){return a.length===a.buffer.byteLength?a.buffer:a.buffer.slice(a.byteOffset,a.byteOffset+a.length)},toBuffer:h,unmask:g},!process.env.WS_NO_BUFFER_UTIL)try{let a=(()=>{let a=Error("Cannot find module 'bufferutil'");throw a.code="MODULE_NOT_FOUND",a})();b.exports.mask=function(b,c,d,e,g){g<48?f(b,c,d,e,g):a.mask(b,c,d,e,g)},b.exports.unmask=function(b,c){b.length<32?g(b,c):a.unmask(b,c)}}catch(a){}},29110,(a,b,c)=>{"use strict";let d=Symbol("kDone"),e=Symbol("kRun");b.exports=class{constructor(a){this[d]=()=>{this.pending--,this[e]()},this.concurrency=a||1/0,this.jobs=[],this.pending=0}add(a){this.jobs.push(a),this[e]()}[e](){if(this.pending!==this.concurrency&&this.jobs.length){let a=this.jobs.shift();this.pending++,a(this[d])}}}},19199,(a,b,c)=>{"use strict";let d,e=a.r(6461),f=a.r(40352),g=a.r(29110),{kStatusCode:h}=a.r(65514),i=Buffer[Symbol.species],j=Buffer.from([0,0,255,255]),k=Symbol("permessage-deflate"),l=Symbol("total-length"),m=Symbol("callback"),n=Symbol("buffers"),o=Symbol("error");function p(a){this[n].push(a),this[l]+=a.length}function q(a){(this[l]+=a.length,this[k]._maxPayload<1||this[l]<=this[k]._maxPayload)?this[n].push(a):(this[o]=RangeError("Max payload size exceeded"),this[o].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[o][h]=1009,this.removeListener("data",q),this.reset())}function r(a){(this[k]._inflate=null,this[o])?this[m](this[o]):(a[h]=1007,this[m](a))}b.exports=class{constructor(a,b,c){this._maxPayload=0|c,this._options=a||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!b,this._deflate=null,this._inflate=null,this.params=null,d||(d=new g(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let a={};return this._options.serverNoContextTakeover&&(a.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(a.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(a.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?a.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(a.client_max_window_bits=!0),a}accept(a){return a=this.normalizeParams(a),this.params=this._isServer?this.acceptAsServer(a):this.acceptAsClient(a),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let a=this._deflate[m];this._deflate.close(),this._deflate=null,a&&a(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(a){let b=this._options,c=a.find(a=>(!1!==b.serverNoContextTakeover||!a.server_no_context_takeover)&&(!a.server_max_window_bits||!1!==b.serverMaxWindowBits&&("number"!=typeof b.serverMaxWindowBits||!(b.serverMaxWindowBits>a.server_max_window_bits)))&&("number"!=typeof b.clientMaxWindowBits||!!a.client_max_window_bits));if(!c)throw Error("None of the extension offers can be accepted");return b.serverNoContextTakeover&&(c.server_no_context_takeover=!0),b.clientNoContextTakeover&&(c.client_no_context_takeover=!0),"number"==typeof b.serverMaxWindowBits&&(c.server_max_window_bits=b.serverMaxWindowBits),"number"==typeof b.clientMaxWindowBits?c.client_max_window_bits=b.clientMaxWindowBits:(!0===c.client_max_window_bits||!1===b.clientMaxWindowBits)&&delete c.client_max_window_bits,c}acceptAsClient(a){let b=a[0];if(!1===this._options.clientNoContextTakeover&&b.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(b.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&b.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(b.client_max_window_bits=this._options.clientMaxWindowBits);return b}normalizeParams(a){return a.forEach(a=>{Object.keys(a).forEach(b=>{let c=a[b];if(c.length>1)throw Error(`Parameter "${b}" must have only a single value`);if(c=c[0],"client_max_window_bits"===b){if(!0!==c){let a=+c;if(!Number.isInteger(a)||a<8||a>15)throw TypeError(`Invalid value for parameter "${b}": ${c}`);c=a}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${b}": ${c}`)}else if("server_max_window_bits"===b){let a=+c;if(!Number.isInteger(a)||a<8||a>15)throw TypeError(`Invalid value for parameter "${b}": ${c}`);c=a}else if("client_no_context_takeover"===b||"server_no_context_takeover"===b){if(!0!==c)throw TypeError(`Invalid value for parameter "${b}": ${c}`)}else throw Error(`Unknown parameter "${b}"`);a[b]=c})}),a}decompress(a,b,c){d.add(d=>{this._decompress(a,b,(a,b)=>{d(),c(a,b)})})}compress(a,b,c){d.add(d=>{this._compress(a,b,(a,b)=>{d(),c(a,b)})})}_decompress(a,b,c){let d=this._isServer?"client":"server";if(!this._inflate){let a=`${d}_max_window_bits`,b="number"!=typeof this.params[a]?e.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=e.createInflateRaw({...this._options.zlibInflateOptions,windowBits:b}),this._inflate[k]=this,this._inflate[l]=0,this._inflate[n]=[],this._inflate.on("error",r),this._inflate.on("data",q)}this._inflate[m]=c,this._inflate.write(a),b&&this._inflate.write(j),this._inflate.flush(()=>{let a=this._inflate[o];if(a){this._inflate.close(),this._inflate=null,c(a);return}let e=f.concat(this._inflate[n],this._inflate[l]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[n]=[],b&&this.params[`${d}_no_context_takeover`]&&this._inflate.reset()),c(null,e)})}_compress(a,b,c){let d=this._isServer?"server":"client";if(!this._deflate){let a=`${d}_max_window_bits`,b="number"!=typeof this.params[a]?e.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=e.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:b}),this._deflate[l]=0,this._deflate[n]=[],this._deflate.on("data",p)}this._deflate[m]=c,this._deflate.write(a),this._deflate.flush(e.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=f.concat(this._deflate[n],this._deflate[l]);b&&(a=new i(a.buffer,a.byteOffset,a.length-4)),this._deflate[m]=null,this._deflate[l]=0,this._deflate[n]=[],b&&this.params[`${d}_no_context_takeover`]&&this._deflate.reset(),c(null,a)})}}},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},55572,(a,b,c)=>{"use strict";let{isUtf8:d}=a.r(874),{hasBlob:e}=a.r(65514);function f(a){let b=a.length,c=0;for(;c<b;)if((128&a[c])==0)c++;else if((224&a[c])==192){if(c+1===b||(192&a[c+1])!=128||(254&a[c])==192)return!1;c+=2}else if((240&a[c])==224){if(c+2>=b||(192&a[c+1])!=128||(192&a[c+2])!=128||224===a[c]&&(224&a[c+1])==128||237===a[c]&&(224&a[c+1])==160)return!1;c+=3}else{if((248&a[c])!=240||c+3>=b||(192&a[c+1])!=128||(192&a[c+2])!=128||(192&a[c+3])!=128||240===a[c]&&(240&a[c+1])==128||244===a[c]&&a[c+1]>143||a[c]>244)return!1;c+=4}return!0}if(b.exports={isBlob:function(a){return e&&"object"==typeof a&&"function"==typeof a.arrayBuffer&&"string"==typeof a.type&&"function"==typeof a.stream&&("Blob"===a[Symbol.toStringTag]||"File"===a[Symbol.toStringTag])},isValidStatusCode:function(a){return a>=1e3&&a<=1014&&1004!==a&&1005!==a&&1006!==a||a>=3e3&&a<=4999},isValidUTF8:f,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},d)b.exports.isValidUTF8=function(a){return a.length<24?f(a):d(a)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let a=(()=>{let a=Error("Cannot find module 'utf-8-validate'");throw a.code="MODULE_NOT_FOUND",a})();b.exports.isValidUTF8=function(b){return b.length<32?f(b):a(b)}}catch(a){}},75091,(a,b,c)=>{"use strict";let{Writable:d}=a.r(88947),e=a.r(19199),{BINARY_TYPES:f,EMPTY_BUFFER:g,kStatusCode:h,kWebSocket:i}=a.r(65514),{concat:j,toArrayBuffer:k,unmask:l}=a.r(40352),{isValidStatusCode:m,isValidUTF8:n}=a.r(55572),o=Buffer[Symbol.species];b.exports=class extends d{constructor(a={}){super(),this._allowSynchronousEvents=void 0===a.allowSynchronousEvents||a.allowSynchronousEvents,this._binaryType=a.binaryType||f[0],this._extensions=a.extensions||{},this._isServer=!!a.isServer,this._maxPayload=0|a.maxPayload,this._skipUTF8Validation=!!a.skipUTF8Validation,this[i]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(a,b,c){if(8===this._opcode&&0==this._state)return c();this._bufferedBytes+=a.length,this._buffers.push(a),this.startLoop(c)}consume(a){if(this._bufferedBytes-=a,a===this._buffers[0].length)return this._buffers.shift();if(a<this._buffers[0].length){let b=this._buffers[0];return this._buffers[0]=new o(b.buffer,b.byteOffset+a,b.length-a),new o(b.buffer,b.byteOffset,a)}let b=Buffer.allocUnsafe(a);do{let c=this._buffers[0],d=b.length-a;a>=c.length?b.set(this._buffers.shift(),d):(b.set(new Uint8Array(c.buffer,c.byteOffset,a),d),this._buffers[0]=new o(c.buffer,c.byteOffset+a,c.length-a)),a-=c.length}while(a>0)return b}startLoop(a){this._loop=!0;do switch(this._state){case 0:this.getInfo(a);break;case 1:this.getPayloadLength16(a);break;case 2:this.getPayloadLength64(a);break;case 3:this.getMask();break;case 4:this.getData(a);break;case 5:case 6:this._loop=!1;return}while(this._loop)this._errored||a()}getInfo(a){if(this._bufferedBytes<2){this._loop=!1;return}let b=this.consume(2);if((48&b[0])!=0)return void a(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let c=(64&b[0])==64;if(c&&!this._extensions[e.extensionName])return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&b[0])==128,this._opcode=15&b[0],this._payloadLength=127&b[1],0===this._opcode){if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void a(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=c}else{if(!(this._opcode>7)||!(this._opcode<11))return void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void a(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void a(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&b[1])==128,this._isServer){if(!this._masked)return void a(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void a(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(a)}getPayloadLength16(a){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(a)}getPayloadLength64(a){if(this._bufferedBytes<8){this._loop=!1;return}let b=this.consume(8),c=b.readUInt32BE(0);c>2097151?a(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*c+b.readUInt32BE(4),this.haveLength(a))}haveLength(a){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?a(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(a){let b=g;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}b=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&l(b,this._mask)}if(this._opcode>7)return void this.controlMessage(b,a);if(this._compressed){this._state=5,this.decompress(b,a);return}b.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(b)),this.dataMessage(a)}decompress(a,b){this._extensions[e.extensionName].decompress(a,this._fin,(a,c)=>{if(a)return b(a);if(c.length){if(this._messageLength+=c.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void b(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(c)}this.dataMessage(b),0===this._state&&this.startLoop(b)})}dataMessage(a){if(!this._fin){this._state=0;return}let b=this._messageLength,c=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let d;d="nodebuffer"===this._binaryType?j(c,b):"arraybuffer"===this._binaryType?k(j(c,b)):"blob"===this._binaryType?new Blob(c):c,this._allowSynchronousEvents?(this.emit("message",d,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!0),this._state=0,this.startLoop(a)}))}else{let d=j(c,b);if(!this._skipUTF8Validation&&!n(d))return void a(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));5===this._state||this._allowSynchronousEvents?(this.emit("message",d,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!1),this._state=0,this.startLoop(a)}))}}controlMessage(a,b){if(8===this._opcode){if(0===a.length)this._loop=!1,this.emit("conclude",1005,g),this.end();else{let c=a.readUInt16BE(0);if(!m(c))return void b(this.createError(RangeError,`invalid status code ${c}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let d=new o(a.buffer,a.byteOffset+2,a.length-2);if(!this._skipUTF8Validation&&!n(d))return void b(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",c,d),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",a),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",a),this._state=0,this.startLoop(b)}))}createError(a,b,c,d,e){this._loop=!1,this._errored=!0;let f=new a(c?`Invalid WebSocket frame: ${b}`:b);return Error.captureStackTrace(f,this.createError),f.code=e,f[h]=d,f}}},10697,(a,b,c)=>{"use strict";let d,{Duplex:e}=a.r(88947),{randomFillSync:f}=a.r(54799),g=a.r(19199),{EMPTY_BUFFER:h,kWebSocket:i,NOOP:j}=a.r(65514),{isBlob:k,isValidStatusCode:l}=a.r(55572),{mask:m,toBuffer:n}=a.r(40352),o=Symbol("kByteLength"),p=Buffer.alloc(4),q=8192;class r{constructor(a,b,c){this._extensions=b||{},c&&(this._generateMask=c,this._maskBuffer=Buffer.alloc(4)),this._socket=a,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=j,this[i]=void 0}static frame(a,b){let c,e,g=!1,h=2,i=!1;b.mask&&(c=b.maskBuffer||p,b.generateMask?b.generateMask(c):(8192===q&&(void 0===d&&(d=Buffer.alloc(8192)),f(d,0,8192),q=0),c[0]=d[q++],c[1]=d[q++],c[2]=d[q++],c[3]=d[q++]),i=(c[0]|c[1]|c[2]|c[3])==0,h=6),"string"==typeof a?e=(!b.mask||i)&&void 0!==b[o]?b[o]:(a=Buffer.from(a)).length:(e=a.length,g=b.mask&&b.readOnly&&!i);let j=e;e>=65536?(h+=8,j=127):e>125&&(h+=2,j=126);let k=Buffer.allocUnsafe(g?e+h:h);return(k[0]=b.fin?128|b.opcode:b.opcode,b.rsv1&&(k[0]|=64),k[1]=j,126===j?k.writeUInt16BE(e,2):127===j&&(k[2]=k[3]=0,k.writeUIntBE(e,4,6)),b.mask)?(k[1]|=128,k[h-4]=c[0],k[h-3]=c[1],k[h-2]=c[2],k[h-1]=c[3],i)?[k,a]:g?(m(a,c,k,h,e),[k]):(m(a,c,a,0,e),[k,a]):[k,a]}close(a,b,c,d){let e;if(void 0===a)e=h;else if("number"==typeof a&&l(a))if(void 0!==b&&b.length){let c=Buffer.byteLength(b);if(c>123)throw RangeError("The message must not be greater than 123 bytes");(e=Buffer.allocUnsafe(2+c)).writeUInt16BE(a,0),"string"==typeof b?e.write(b,2):e.set(b,2)}else(e=Buffer.allocUnsafe(2)).writeUInt16BE(a,0);else throw TypeError("First argument must be a valid error code number");let f={[o]:e.length,fin:!0,generateMask:this._generateMask,mask:c,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,e,!1,f,d]):this.sendFrame(r.frame(e,f),d)}ping(a,b,c){let d,e;if("string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),d>125)throw RangeError("The data size must not be greater than 125 bytes");let f={[o]:d,fin:!0,generateMask:this._generateMask,mask:b,maskBuffer:this._maskBuffer,opcode:9,readOnly:e,rsv1:!1};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,!1,f,c]):this.getBlobData(a,!1,f,c):0!==this._state?this.enqueue([this.dispatch,a,!1,f,c]):this.sendFrame(r.frame(a,f),c)}pong(a,b,c){let d,e;if("string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),d>125)throw RangeError("The data size must not be greater than 125 bytes");let f={[o]:d,fin:!0,generateMask:this._generateMask,mask:b,maskBuffer:this._maskBuffer,opcode:10,readOnly:e,rsv1:!1};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,!1,f,c]):this.getBlobData(a,!1,f,c):0!==this._state?this.enqueue([this.dispatch,a,!1,f,c]):this.sendFrame(r.frame(a,f),c)}send(a,b,c){let d,e,f=this._extensions[g.extensionName],h=b.binary?2:1,i=b.compress;"string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),this._firstFragment?(this._firstFragment=!1,i&&f&&f.params[f._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(i=d>=f._threshold),this._compress=i):(i=!1,h=0),b.fin&&(this._firstFragment=!0);let j={[o]:d,fin:b.fin,generateMask:this._generateMask,mask:b.mask,maskBuffer:this._maskBuffer,opcode:h,readOnly:e,rsv1:i};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,this._compress,j,c]):this.getBlobData(a,this._compress,j,c):0!==this._state?this.enqueue([this.dispatch,a,this._compress,j,c]):this.dispatch(a,this._compress,j,c)}getBlobData(a,b,c,d){this._bufferedBytes+=c[o],this._state=2,a.arrayBuffer().then(a=>{if(this._socket.destroyed){let a=Error("The socket was closed while the blob was being read");process.nextTick(s,this,a,d);return}this._bufferedBytes-=c[o];let e=n(a);b?this.dispatch(e,b,c,d):(this._state=0,this.sendFrame(r.frame(e,c),d),this.dequeue())}).catch(a=>{process.nextTick(t,this,a,d)})}dispatch(a,b,c,d){if(!b)return void this.sendFrame(r.frame(a,c),d);let e=this._extensions[g.extensionName];this._bufferedBytes+=c[o],this._state=1,e.compress(a,c.fin,(a,b)=>{this._socket.destroyed?s(this,Error("The socket was closed while data was being compressed"),d):(this._bufferedBytes-=c[o],this._state=0,c.readOnly=!1,this.sendFrame(r.frame(b,c),d),this.dequeue())})}dequeue(){for(;0===this._state&&this._queue.length;){let a=this._queue.shift();this._bufferedBytes-=a[3][o],Reflect.apply(a[0],this,a.slice(1))}}enqueue(a){this._bufferedBytes+=a[3][o],this._queue.push(a)}sendFrame(a,b){2===a.length?(this._socket.cork(),this._socket.write(a[0]),this._socket.write(a[1],b),this._socket.uncork()):this._socket.write(a[0],b)}}function s(a,b,c){"function"==typeof c&&c(b);for(let c=0;c<a._queue.length;c++){let d=a._queue[c],e=d[d.length-1];"function"==typeof e&&e(b)}}function t(a,b,c){s(a,b,c),a.onerror(b)}b.exports=r},4049,(a,b,c)=>{"use strict";let{kForOnEventAttribute:d,kListener:e}=a.r(65514),f=Symbol("kCode"),g=Symbol("kData"),h=Symbol("kError"),i=Symbol("kMessage"),j=Symbol("kReason"),k=Symbol("kTarget"),l=Symbol("kType"),m=Symbol("kWasClean");class n{constructor(a){this[k]=null,this[l]=a}get target(){return this[k]}get type(){return this[l]}}Object.defineProperty(n.prototype,"target",{enumerable:!0}),Object.defineProperty(n.prototype,"type",{enumerable:!0});class o extends n{constructor(a,b={}){super(a),this[f]=void 0===b.code?0:b.code,this[j]=void 0===b.reason?"":b.reason,this[m]=void 0!==b.wasClean&&b.wasClean}get code(){return this[f]}get reason(){return this[j]}get wasClean(){return this[m]}}Object.defineProperty(o.prototype,"code",{enumerable:!0}),Object.defineProperty(o.prototype,"reason",{enumerable:!0}),Object.defineProperty(o.prototype,"wasClean",{enumerable:!0});class p extends n{constructor(a,b={}){super(a),this[h]=void 0===b.error?null:b.error,this[i]=void 0===b.message?"":b.message}get error(){return this[h]}get message(){return this[i]}}Object.defineProperty(p.prototype,"error",{enumerable:!0}),Object.defineProperty(p.prototype,"message",{enumerable:!0});class q extends n{constructor(a,b={}){super(a),this[g]=void 0===b.data?null:b.data}get data(){return this[g]}}function r(a,b,c){"object"==typeof a&&a.handleEvent?a.handleEvent.call(a,c):a.call(b,c)}Object.defineProperty(q.prototype,"data",{enumerable:!0}),b.exports={CloseEvent:o,ErrorEvent:p,Event:n,EventTarget:{addEventListener(a,b,c={}){let f;for(let f of this.listeners(a))if(!c[d]&&f[e]===b&&!f[d])return;if("message"===a)f=function(a,c){let d=new q("message",{data:c?a:a.toString()});d[k]=this,r(b,this,d)};else if("close"===a)f=function(a,c){let d=new o("close",{code:a,reason:c.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});d[k]=this,r(b,this,d)};else if("error"===a)f=function(a){let c=new p("error",{error:a,message:a.message});c[k]=this,r(b,this,c)};else{if("open"!==a)return;f=function(){let a=new n("open");a[k]=this,r(b,this,a)}}f[d]=!!c[d],f[e]=b,c.once?this.once(a,f):this.on(a,f)},removeEventListener(a,b){for(let c of this.listeners(a))if(c[e]===b&&!c[d]){this.removeListener(a,c);break}}},MessageEvent:q}},20529,(a,b,c)=>{"use strict";let{tokenChars:d}=a.r(55572);function e(a,b,c){void 0===a[b]?a[b]=[c]:a[b].push(c)}b.exports={format:function(a){return Object.keys(a).map(b=>{let c=a[b];return Array.isArray(c)||(c=[c]),c.map(a=>[b].concat(Object.keys(a).map(b=>{let c=a[b];return Array.isArray(c)||(c=[c]),c.map(a=>!0===a?b:`${b}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(a){let b,c,f=Object.create(null),g=Object.create(null),h=!1,i=!1,j=!1,k=-1,l=-1,m=-1,n=0;for(;n<a.length;n++)if(l=a.charCodeAt(n),void 0===b)if(-1===m&&1===d[l])-1===k&&(k=n);else if(0!==n&&(32===l||9===l))-1===m&&-1!==k&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n);let c=a.slice(k,m);44===l?(e(f,c,g),g=Object.create(null)):b=c,k=m=-1}else throw SyntaxError(`Unexpected character at index ${n}`);else if(void 0===c)if(-1===m&&1===d[l])-1===k&&(k=n);else if(32===l||9===l)-1===m&&-1!==k&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n),e(g,a.slice(k,m),!0),44===l&&(e(f,b,g),g=Object.create(null),b=void 0),k=m=-1}else if(61===l&&-1!==k&&-1===m)c=a.slice(k,n),k=m=-1;else throw SyntaxError(`Unexpected character at index ${n}`);else if(i){if(1!==d[l])throw SyntaxError(`Unexpected character at index ${n}`);-1===k?k=n:h||(h=!0),i=!1}else if(j)if(1===d[l])-1===k&&(k=n);else if(34===l&&-1!==k)j=!1,m=n;else if(92===l)i=!0;else throw SyntaxError(`Unexpected character at index ${n}`);else if(34===l&&61===a.charCodeAt(n-1))j=!0;else if(-1===m&&1===d[l])-1===k&&(k=n);else if(-1!==k&&(32===l||9===l))-1===m&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n);let d=a.slice(k,m);h&&(d=d.replace(/\\/g,""),h=!1),e(g,c,d),44===l&&(e(f,b,g),g=Object.create(null),b=void 0),c=void 0,k=m=-1}else throw SyntaxError(`Unexpected character at index ${n}`);if(-1===k||j||32===l||9===l)throw SyntaxError("Unexpected end of input");-1===m&&(m=n);let o=a.slice(k,m);return void 0===b?e(f,o,g):(void 0===c?e(g,o,!0):h?e(g,c,o.replace(/\\/g,"")):e(g,c,o),e(f,b,g)),f}}},89877,(a,b,c)=>{"use strict";let d=a.r(27699),e=a.r(24836),f=a.r(21517),g=a.r(4446),h=a.r(55004),{randomBytes:i,createHash:j}=a.r(54799),{Duplex:k,Readable:l}=a.r(88947),{URL:m}=a.r(92509),n=a.r(19199),o=a.r(75091),p=a.r(10697),{isBlob:q}=a.r(55572),{BINARY_TYPES:r,EMPTY_BUFFER:s,GUID:t,kForOnEventAttribute:u,kListener:v,kStatusCode:w,kWebSocket:x,NOOP:y}=a.r(65514),{EventTarget:{addEventListener:z,removeEventListener:A}}=a.r(4049),{format:B,parse:C}=a.r(20529),{toBuffer:D}=a.r(40352),E=Symbol("kAborted"),F=[8,13],G=["CONNECTING","OPEN","CLOSING","CLOSED"],H=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class I extends d{constructor(a,b,c){super(),this._binaryType=r[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=s,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=I.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==a?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===b?b=[]:Array.isArray(b)||("object"==typeof b&&null!==b?(c=b,b=[]):b=[b]),function a(b,c,d,g){let h,k,l,o,p={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:F[1],maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...g,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(b._autoPong=p.autoPong,!F.includes(p.protocolVersion))throw RangeError(`Unsupported protocol version: ${p.protocolVersion} (supported versions: ${F.join(", ")})`);if(c instanceof m)h=c;else try{h=new m(c)}catch(a){throw SyntaxError(`Invalid URL: ${c}`)}"http:"===h.protocol?h.protocol="ws:":"https:"===h.protocol&&(h.protocol="wss:"),b._url=h.href;let q="wss:"===h.protocol,r="ws+unix:"===h.protocol;if("ws:"===h.protocol||q||r?r&&!h.pathname?k="The URL's pathname is empty":h.hash&&(k="The URL contains a fragment identifier"):k='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',k){let a=SyntaxError(k);if(0!==b._redirects)return void J(b,a);throw a}let s=q?443:80,u=i(16).toString("base64"),v=q?e.request:f.request,w=new Set;if(p.createConnection=p.createConnection||(q?L:K),p.defaultPort=p.defaultPort||s,p.port=h.port||s,p.host=h.hostname.startsWith("[")?h.hostname.slice(1,-1):h.hostname,p.headers={...p.headers,"Sec-WebSocket-Version":p.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},p.path=h.pathname+h.search,p.timeout=p.handshakeTimeout,p.perMessageDeflate&&(l=new n(!0!==p.perMessageDeflate?p.perMessageDeflate:{},!1,p.maxPayload),p.headers["Sec-WebSocket-Extensions"]=B({[n.extensionName]:l.offer()})),d.length){for(let a of d){if("string"!=typeof a||!H.test(a)||w.has(a))throw SyntaxError("An invalid or duplicated subprotocol was specified");w.add(a)}p.headers["Sec-WebSocket-Protocol"]=d.join(",")}if(p.origin&&(p.protocolVersion<13?p.headers["Sec-WebSocket-Origin"]=p.origin:p.headers.Origin=p.origin),(h.username||h.password)&&(p.auth=`${h.username}:${h.password}`),r){let a=p.path.split(":");p.socketPath=a[0],p.path=a[1]}if(p.followRedirects){if(0===b._redirects){b._originalIpc=r,b._originalSecure=q,b._originalHostOrSocketPath=r?p.socketPath:h.host;let a=g&&g.headers;if(g={...g,headers:{}},a)for(let[b,c]of Object.entries(a))g.headers[b.toLowerCase()]=c}else if(0===b.listenerCount("redirect")){let a=r?!!b._originalIpc&&p.socketPath===b._originalHostOrSocketPath:!b._originalIpc&&h.host===b._originalHostOrSocketPath;a&&(!b._originalSecure||q)||(delete p.headers.authorization,delete p.headers.cookie,a||delete p.headers.host,p.auth=void 0)}p.auth&&!g.headers.authorization&&(g.headers.authorization="Basic "+Buffer.from(p.auth).toString("base64")),o=b._req=v(p),b._redirects&&b.emit("redirect",b.url,o)}else o=b._req=v(p);p.timeout&&o.on("timeout",()=>{M(b,o,"Opening handshake has timed out")}),o.on("error",a=>{null===o||o[E]||(o=b._req=null,J(b,a))}),o.on("response",e=>{let f=e.headers.location,h=e.statusCode;if(f&&p.followRedirects&&h>=300&&h<400){let e;if(++b._redirects>p.maxRedirects)return void M(b,o,"Maximum redirects exceeded");o.abort();try{e=new m(f,c)}catch(a){J(b,SyntaxError(`Invalid URL: ${f}`));return}a(b,e,d,g)}else b.emit("unexpected-response",o,e)||M(b,o,`Unexpected server response: ${e.statusCode}`)}),o.on("upgrade",(a,c,d)=>{let e;if(b.emit("upgrade",a),b.readyState!==I.CONNECTING)return;o=b._req=null;let f=a.headers.upgrade;if(void 0===f||"websocket"!==f.toLowerCase())return void M(b,c,"Invalid Upgrade header");let g=j("sha1").update(u+t).digest("base64");if(a.headers["sec-websocket-accept"]!==g)return void M(b,c,"Invalid Sec-WebSocket-Accept header");let h=a.headers["sec-websocket-protocol"];if(void 0!==h?w.size?w.has(h)||(e="Server sent an invalid subprotocol"):e="Server sent a subprotocol but none was requested":w.size&&(e="Server sent no subprotocol"),e)return void M(b,c,e);h&&(b._protocol=h);let i=a.headers["sec-websocket-extensions"];if(void 0!==i){let a;if(!l)return void M(b,c,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{a=C(i)}catch(a){M(b,c,"Invalid Sec-WebSocket-Extensions header");return}let d=Object.keys(a);if(1!==d.length||d[0]!==n.extensionName)return void M(b,c,"Server indicated an extension that was not requested");try{l.accept(a[n.extensionName])}catch(a){M(b,c,"Invalid Sec-WebSocket-Extensions header");return}b._extensions[n.extensionName]=l}b.setSocket(c,d,{allowSynchronousEvents:p.allowSynchronousEvents,generateMask:p.generateMask,maxPayload:p.maxPayload,skipUTF8Validation:p.skipUTF8Validation})}),p.finishRequest?p.finishRequest(o,b):o.end()}(this,a,b,c)):(this._autoPong=c.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(a){r.includes(a)&&(this._binaryType=a,this._receiver&&(this._receiver._binaryType=a))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(a,b,c){let d=new o({allowSynchronousEvents:c.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:c.maxPayload,skipUTF8Validation:c.skipUTF8Validation}),e=new p(a,this._extensions,c.generateMask);this._receiver=d,this._sender=e,this._socket=a,d[x]=this,e[x]=this,a[x]=this,d.on("conclude",O),d.on("drain",P),d.on("error",Q),d.on("message",S),d.on("ping",T),d.on("pong",U),e.onerror=W,a.setTimeout&&a.setTimeout(0),a.setNoDelay&&a.setNoDelay(),b.length>0&&a.unshift(b),a.on("close",Y),a.on("data",Z),a.on("end",$),a.on("error",_),this._readyState=I.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=I.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[n.extensionName]&&this._extensions[n.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=I.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(a,b){if(this.readyState!==I.CLOSED){if(this.readyState===I.CONNECTING)return void M(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===I.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=I.CLOSING,this._sender.close(a,b,!this._isServer,a=>{!a&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),X(this)}}pause(){this.readyState!==I.CONNECTING&&this.readyState!==I.CLOSED&&(this._paused=!0,this._socket.pause())}ping(a,b,c){if(this.readyState===I.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof a?(c=a,a=b=void 0):"function"==typeof b&&(c=b,b=void 0),"number"==typeof a&&(a=a.toString()),this.readyState!==I.OPEN)?N(this,a,c):(void 0===b&&(b=!this._isServer),this._sender.ping(a||s,b,c))}pong(a,b,c){if(this.readyState===I.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof a?(c=a,a=b=void 0):"function"==typeof b&&(c=b,b=void 0),"number"==typeof a&&(a=a.toString()),this.readyState!==I.OPEN)?N(this,a,c):(void 0===b&&(b=!this._isServer),this._sender.pong(a||s,b,c))}resume(){this.readyState!==I.CONNECTING&&this.readyState!==I.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(a,b,c){if(this.readyState===I.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof b&&(c=b,b={}),"number"==typeof a&&(a=a.toString()),this.readyState!==I.OPEN)return void N(this,a,c);let d={binary:"string"!=typeof a,mask:!this._isServer,compress:!0,fin:!0,...b};this._extensions[n.extensionName]||(d.compress=!1),this._sender.send(a||s,d,c)}terminate(){if(this.readyState!==I.CLOSED){if(this.readyState===I.CONNECTING)return void M(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=I.CLOSING,this._socket.destroy())}}}function J(a,b){a._readyState=I.CLOSING,a._errorEmitted=!0,a.emit("error",b),a.emitClose()}function K(a){return a.path=a.socketPath,g.connect(a)}function L(a){return a.path=void 0,a.servername||""===a.servername||(a.servername=g.isIP(a.host)?"":a.host),h.connect(a)}function M(a,b,c){a._readyState=I.CLOSING;let d=Error(c);Error.captureStackTrace(d,M),b.setHeader?(b[E]=!0,b.abort(),b.socket&&!b.socket.destroyed&&b.socket.destroy(),process.nextTick(J,a,d)):(b.destroy(d),b.once("error",a.emit.bind(a,"error")),b.once("close",a.emitClose.bind(a)))}function N(a,b,c){if(b){let c=q(b)?b.size:D(b).length;a._socket?a._sender._bufferedBytes+=c:a._bufferedAmount+=c}if(c){let b=Error(`WebSocket is not open: readyState ${a.readyState} (${G[a.readyState]})`);process.nextTick(c,b)}}function O(a,b){let c=this[x];c._closeFrameReceived=!0,c._closeMessage=b,c._closeCode=a,void 0!==c._socket[x]&&(c._socket.removeListener("data",Z),process.nextTick(V,c._socket),1005===a?c.close():c.close(a,b))}function P(){let a=this[x];a.isPaused||a._socket.resume()}function Q(a){let b=this[x];void 0!==b._socket[x]&&(b._socket.removeListener("data",Z),process.nextTick(V,b._socket),b.close(a[w])),b._errorEmitted||(b._errorEmitted=!0,b.emit("error",a))}function R(){this[x].emitClose()}function S(a,b){this[x].emit("message",a,b)}function T(a){let b=this[x];b._autoPong&&b.pong(a,!this._isServer,y),b.emit("ping",a)}function U(a){this[x].emit("pong",a)}function V(a){a.resume()}function W(a){let b=this[x];b.readyState!==I.CLOSED&&(b.readyState===I.OPEN&&(b._readyState=I.CLOSING,X(b)),this._socket.end(),b._errorEmitted||(b._errorEmitted=!0,b.emit("error",a)))}function X(a){a._closeTimer=setTimeout(a._socket.destroy.bind(a._socket),3e4)}function Y(){let a,b=this[x];this.removeListener("close",Y),this.removeListener("data",Z),this.removeListener("end",$),b._readyState=I.CLOSING,this._readableState.endEmitted||b._closeFrameReceived||b._receiver._writableState.errorEmitted||null===(a=b._socket.read())||b._receiver.write(a),b._receiver.end(),this[x]=void 0,clearTimeout(b._closeTimer),b._receiver._writableState.finished||b._receiver._writableState.errorEmitted?b.emitClose():(b._receiver.on("error",R),b._receiver.on("finish",R))}function Z(a){this[x]._receiver.write(a)||this.pause()}function $(){let a=this[x];a._readyState=I.CLOSING,a._receiver.end(),this.end()}function _(){let a=this[x];this.removeListener("error",_),this.on("error",y),a&&(a._readyState=I.CLOSING,this.destroy())}Object.defineProperty(I,"CONNECTING",{enumerable:!0,value:G.indexOf("CONNECTING")}),Object.defineProperty(I.prototype,"CONNECTING",{enumerable:!0,value:G.indexOf("CONNECTING")}),Object.defineProperty(I,"OPEN",{enumerable:!0,value:G.indexOf("OPEN")}),Object.defineProperty(I.prototype,"OPEN",{enumerable:!0,value:G.indexOf("OPEN")}),Object.defineProperty(I,"CLOSING",{enumerable:!0,value:G.indexOf("CLOSING")}),Object.defineProperty(I.prototype,"CLOSING",{enumerable:!0,value:G.indexOf("CLOSING")}),Object.defineProperty(I,"CLOSED",{enumerable:!0,value:G.indexOf("CLOSED")}),Object.defineProperty(I.prototype,"CLOSED",{enumerable:!0,value:G.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(a=>{Object.defineProperty(I.prototype,a,{enumerable:!0})}),["open","error","close","message"].forEach(a=>{Object.defineProperty(I.prototype,`on${a}`,{enumerable:!0,get(){for(let b of this.listeners(a))if(b[u])return b[v];return null},set(b){for(let b of this.listeners(a))if(b[u]){this.removeListener(a,b);break}"function"==typeof b&&this.addEventListener(a,b,{[u]:!0})}})}),I.prototype.addEventListener=z,I.prototype.removeEventListener=A,b.exports=I},29e3,(a,b,c)=>{"use strict";a.r(89877);let{Duplex:d}=a.r(88947);function e(a){a.emit("close")}function f(){!this.destroyed&&this._writableState.finished&&this.destroy()}function g(a){this.removeListener("error",g),this.destroy(),0===this.listenerCount("error")&&this.emit("error",a)}b.exports=function(a,b){let c=!0,h=new d({...b,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return a.on("message",function(b,c){let d=!c&&h._readableState.objectMode?b.toString():b;h.push(d)||a.pause()}),a.once("error",function(a){h.destroyed||(c=!1,h.destroy(a))}),a.once("close",function(){h.destroyed||h.push(null)}),h._destroy=function(b,d){if(a.readyState===a.CLOSED){d(b),process.nextTick(e,h);return}let f=!1;a.once("error",function(a){f=!0,d(a)}),a.once("close",function(){f||d(b),process.nextTick(e,h)}),c&&a.terminate()},h._final=function(b){a.readyState===a.CONNECTING?a.once("open",function(){h._final(b)}):null!==a._socket&&(a._socket._writableState.finished?(b(),h._readableState.endEmitted&&h.destroy()):(a._socket.once("finish",function(){b()}),a.close()))},h._read=function(){a.isPaused&&a.resume()},h._write=function(b,c,d){a.readyState===a.CONNECTING?a.once("open",function(){h._write(b,c,d)}):a.send(b,d)},h.on("end",f),h.on("error",g),h}},71553,(a,b,c)=>{"use strict";let{tokenChars:d}=a.r(55572);b.exports={parse:function(a){let b=new Set,c=-1,e=-1,f=0;for(;f<a.length;f++){let g=a.charCodeAt(f);if(-1===e&&1===d[g])-1===c&&(c=f);else if(0!==f&&(32===g||9===g))-1===e&&-1!==c&&(e=f);else if(44===g){if(-1===c)throw SyntaxError(`Unexpected character at index ${f}`);-1===e&&(e=f);let d=a.slice(c,e);if(b.has(d))throw SyntaxError(`The "${d}" subprotocol is duplicated`);b.add(d),c=e=-1}else throw SyntaxError(`Unexpected character at index ${f}`)}if(-1===c||-1!==e)throw SyntaxError("Unexpected end of input");let g=a.slice(c,f);if(b.has(g))throw SyntaxError(`The "${g}" subprotocol is duplicated`);return b.add(g),b}}},95837,(a,b,c)=>{"use strict";let d=a.r(27699),e=a.r(21517),{Duplex:f}=a.r(88947),{createHash:g}=a.r(54799),h=a.r(20529),i=a.r(19199),j=a.r(71553),k=a.r(89877),{GUID:l,kWebSocket:m}=a.r(65514),n=/^[+/0-9A-Za-z]{22}==$/;function o(a){a._state=2,a.emit("close")}function p(){this.destroy()}function q(a,b,c,d){c=c||e.STATUS_CODES[b],d={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(c),...d},a.once("finish",a.destroy),a.end(`HTTP/1.1 ${b} ${e.STATUS_CODES[b]}\r
5
+ `+Object.keys(d).map(a=>`${a}: ${d[a]}`).join("\r\n")+"\r\n\r\n"+c)}function r(a,b,c,d,e,f){if(a.listenerCount("wsClientError")){let d=Error(e);Error.captureStackTrace(d,r),a.emit("wsClientError",d,c,b)}else q(c,d,e,f)}b.exports=class extends d{constructor(a,b){if(super(),null==(a={allowSynchronousEvents:!0,autoPong:!0,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:k,...a}).port&&!a.server&&!a.noServer||null!=a.port&&(a.server||a.noServer)||a.server&&a.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=a.port?(this._server=e.createServer((a,b)=>{let c=e.STATUS_CODES[426];b.writeHead(426,{"Content-Length":c.length,"Content-Type":"text/plain"}),b.end(c)}),this._server.listen(a.port,a.host,a.backlog,b)):a.server&&(this._server=a.server),this._server){const a=this.emit.bind(this,"connection");this._removeListeners=function(a,b){for(let c of Object.keys(b))a.on(c,b[c]);return function(){for(let c of Object.keys(b))a.removeListener(c,b[c])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(b,c,d)=>{this.handleUpgrade(b,c,d,a)}})}!0===a.perMessageDeflate&&(a.perMessageDeflate={}),a.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=a,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(a){if(2===this._state){a&&this.once("close",()=>{a(Error("The server is not running"))}),process.nextTick(o,this);return}if(a&&this.once("close",a),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(o,this);else{let a=this._server;this._removeListeners(),this._removeListeners=this._server=null,a.close(()=>{o(this)})}}shouldHandle(a){if(this.options.path){let b=a.url.indexOf("?");if((-1!==b?a.url.slice(0,b):a.url)!==this.options.path)return!1}return!0}handleUpgrade(a,b,c,d){b.on("error",p);let e=a.headers["sec-websocket-key"],f=a.headers.upgrade,g=+a.headers["sec-websocket-version"];if("GET"!==a.method)return void r(this,a,b,405,"Invalid HTTP method");if(void 0===f||"websocket"!==f.toLowerCase())return void r(this,a,b,400,"Invalid Upgrade header");if(void 0===e||!n.test(e))return void r(this,a,b,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==g&&8!==g)return void r(this,a,b,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(a))return void q(b,400);let k=a.headers["sec-websocket-protocol"],l=new Set;if(void 0!==k)try{l=j.parse(k)}catch(c){r(this,a,b,400,"Invalid Sec-WebSocket-Protocol header");return}let m=a.headers["sec-websocket-extensions"],o={};if(this.options.perMessageDeflate&&void 0!==m){let c=new i(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let a=h.parse(m);a[i.extensionName]&&(c.accept(a[i.extensionName]),o[i.extensionName]=c)}catch(c){r(this,a,b,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:a.headers[`${8===g?"sec-websocket-origin":"origin"}`],secure:!!(a.socket.authorized||a.socket.encrypted),req:a};if(2===this.options.verifyClient.length)return void this.options.verifyClient(f,(f,g,h,i)=>{if(!f)return q(b,g||401,h,i);this.completeUpgrade(o,e,l,a,b,c,d)});if(!this.options.verifyClient(f))return q(b,401)}this.completeUpgrade(o,e,l,a,b,c,d)}completeUpgrade(a,b,c,d,e,f,j){if(!e.readable||!e.writable)return e.destroy();if(e[m])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return q(e,503);let k=g("sha1").update(b+l).digest("base64"),n=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${k}`],r=new this.options.WebSocket(null,void 0,this.options);if(c.size){let a=this.options.handleProtocols?this.options.handleProtocols(c,d):c.values().next().value;a&&(n.push(`Sec-WebSocket-Protocol: ${a}`),r._protocol=a)}if(a[i.extensionName]){let b=a[i.extensionName].params,c=h.format({[i.extensionName]:[b]});n.push(`Sec-WebSocket-Extensions: ${c}`),r._extensions=a}this.emit("headers",n,d),e.write(n.concat("\r\n").join("\r\n")),e.removeListener("error",p),r.setSocket(e,f,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(r),r.on("close",()=>{this.clients.delete(r),this._shouldEmitClose&&!this.clients.size&&process.nextTick(o,this)})),j(r,d)}}},83915,64606,28032,99887,a=>{"use strict";let b,c,d;var e,f,g=a.i(63047);let h=Object.create(null);h.open="0",h.close="1",h.ping="2",h.pong="3",h.message="4",h.upgrade="5",h.noop="6";let i=Object.create(null);Object.keys(h).forEach(a=>{i[h[a]]=a});let j={type:"error",data:"parser error"},k=({type:a,data:b},c,d)=>d(b instanceof ArrayBuffer||ArrayBuffer.isView(b)?c?b:"b"+l(b,!0).toString("base64"):h[a]+(b||"")),l=(a,b)=>Buffer.isBuffer(a)||a instanceof Uint8Array&&!b?a:a instanceof ArrayBuffer?Buffer.from(a):Buffer.from(a.buffer,a.byteOffset,a.byteLength),m=(a,b)=>{if("string"!=typeof a)return{type:"message",data:n(a,b)};let c=a.charAt(0);return"b"===c?{type:"message",data:n(Buffer.from(a.substring(1),"base64"),b)}:i[c]?a.length>1?{type:i[c],data:a.substring(1)}:{type:i[c]}:j},n=(a,b)=>"arraybuffer"===b?a instanceof ArrayBuffer?a:Buffer.isBuffer(a)?a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength):a.buffer:Buffer.isBuffer(a)?a:Buffer.from(a);function o(a){return a.reduce((a,b)=>a+b.length,0)}function p(a,b){if(a[0].length===b)return a.shift();let c=new Uint8Array(b),d=0;for(let e=0;e<b;e++)c[e]=a[0][d++],d===a[0].length&&(a.shift(),d=0);return a.length&&d<a[0].length&&(a[0]=a[0].slice(d)),c}function q(a){if(a){var b=a;for(var c in q.prototype)b[c]=q.prototype[c];return b}}q.prototype.on=q.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(b),this},q.prototype.once=function(a,b){function c(){this.off(a,c),b.apply(this,arguments)}return c.fn=b,this.on(a,c),this},q.prototype.off=q.prototype.removeListener=q.prototype.removeAllListeners=q.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c,d=this._callbacks["$"+a];if(!d)return this;if(1==arguments.length)return delete this._callbacks["$"+a],this;for(var e=0;e<d.length;e++)if((c=d[e])===b||c.fn===b){d.splice(e,1);break}return 0===d.length&&delete this._callbacks["$"+a],this},q.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var b=Array(arguments.length-1),c=this._callbacks["$"+a],d=1;d<arguments.length;d++)b[d-1]=arguments[d];if(c){c=c.slice(0);for(var d=0,e=c.length;d<e;++d)c[d].apply(this,b)}return this},q.prototype.emitReserved=q.prototype.emit,q.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},q.prototype.hasListeners=function(a){return!!this.listeners(a).length};let r=process.nextTick,s=a.g;class t{constructor(){this._cookies=new Map}parseCookies(a){a&&a.forEach(a=>{let b=function(a){let b=a.split("; "),c=b[0].indexOf("=");if(-1===c)return;let d=b[0].substring(0,c).trim();if(!d.length)return;let e=b[0].substring(c+1).trim();34===e.charCodeAt(0)&&(e=e.slice(1,-1));let f={name:d,value:e};for(let a=1;a<b.length;a++){let c=b[a].split("=");if(2!==c.length)continue;let d=c[0].trim(),e=c[1].trim();switch(d){case"Expires":f.expires=new Date(e);break;case"Max-Age":let g=new Date;g.setUTCSeconds(g.getUTCSeconds()+parseInt(e,10)),f.expires=g}}return f}(a);b&&this._cookies.set(b.name,b)})}get cookies(){let a=Date.now();return this._cookies.forEach((b,c)=>{var d;(null==(d=b.expires)?void 0:d.getTime())<a&&this._cookies.delete(c)}),this._cookies.entries()}addCookies(a){let b=[];for(let[a,c]of this.cookies)b.push(`${a}=${c.value}`);b.length&&(a.setDisableHeaderCheck(!0),a.setRequestHeader("cookie",b.join("; ")))}appendCookies(a){for(let[b,c]of this.cookies)a.append("cookie",`${b}=${c.value}`)}}function u(a,...b){return b.reduce((b,c)=>(a.hasOwnProperty(c)&&(b[c]=a[c]),b),{})}let v=s.setTimeout,w=s.clearTimeout;function x(a,b){b.useNativeTimers?(a.setTimeoutFn=v.bind(s),a.clearTimeoutFn=w.bind(s)):(a.setTimeoutFn=s.setTimeout.bind(s),a.clearTimeoutFn=s.clearTimeout.bind(s))}function y(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var z=a.i(35290);let A=(0,z.default)("engine.io-client:transport");class B extends Error{constructor(a,b,c){super(a),this.description=b,this.context=c,this.type="TransportError"}}class C extends q{constructor(a){super(),this.writable=!1,x(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,b,c){return super.emitReserved("error",new B(a,b,c)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(a){"open"===this.readyState?this.write(a):A("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){let b=m(a,this.socket.binaryType);this.onPacket(b)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,b={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(b)}_hostname(){let a=this.opts.hostname;return -1===a.indexOf(":")?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(a){let b=function(a){let b="";for(let c in a)a.hasOwnProperty(c)&&(b.length&&(b+="&"),b+=encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b}(a);return b.length?"?"+b:""}}let D=(0,z.default)("engine.io-client:polling");class E extends C{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";let b=()=>{D("paused"),this.readyState="paused",a()};if(this._polling||!this.writable){let a=0;this._polling&&(D("we are currently polling - waiting to pause"),a++,this.once("pollComplete",function(){D("pre-pause polling complete"),--a||b()})),this.writable||(D("we are currently writing - waiting to pause"),a++,this.once("drain",function(){D("pre-pause writing complete"),--a||b()}))}else b()}_poll(){D("polling"),this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){D("polling got data %s",a);let b=a=>{if("opening"===this.readyState&&"open"===a.type&&this.onOpen(),"close"===a.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};((a,b)=>{let c=a.split("\x1e"),d=[];for(let a=0;a<c.length;a++){let e=m(c[a],b);if(d.push(e),"error"===e.type)break}return d})(a,this.socket.binaryType).forEach(b),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this._poll():D('ignoring poll - transport state "%s"',this.readyState))}doClose(){let a=()=>{D("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(D("transport open - closing"),a()):(D("transport not open - deferring close"),this.once("open",a))}write(a){var b;let c,d,e;this.writable=!1,b=a=>{this.doWrite(a,()=>{this.writable=!0,this.emitReserved("drain")})},d=Array(c=a.length),e=0,a.forEach((a,f)=>{k(a,!1,a=>{d[f]=a,++e===c&&b(d.join("\x1e"))})})}uri(){let a=this.opts.secure?"https":"http",b=this.query||{};return!1!==this.opts.timestampRequests&&(b[this.opts.timestampParam]=y()),this.supportsBinary||b.sid||(b.b64=1),this.createUri(a,b)}}let F=!1;try{F="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(a){}let G=F,H=(0,z.default)("engine.io-client:polling");function I(){}class J extends E{constructor(a){if(super(a),"undefined"!=typeof location){const b="https:"===location.protocol;let c=location.port;c||(c=b?"443":"80"),this.xd="undefined"!=typeof location&&a.hostname!==location.hostname||c!==a.port}}doWrite(a,b){let c=this.request({method:"POST",data:a});c.on("success",b),c.on("error",(a,b)=>{this.onError("xhr post error",a,b)})}doPoll(){H("xhr poll");let a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(a,b)=>{this.onError("xhr poll error",a,b)}),this.pollXhr=a}}class K extends q{constructor(a,b,c){super(),this.createRequest=a,x(this,c),this._opts=c,this._method=c.method||"GET",this._uri=b,this._data=void 0!==c.data?c.data:null,this._create()}_create(){var a;let b=u(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");b.xdomain=!!this._opts.xd;let c=this._xhr=this.createRequest(b);try{H("xhr open %s: %s",this._method,this._uri),c.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let a in c.setDisableHeaderCheck&&c.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&c.setRequestHeader(a,this._opts.extraHeaders[a])}catch(a){}if("POST"===this._method)try{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(a){}try{c.setRequestHeader("Accept","*/*")}catch(a){}null==(a=this._opts.cookieJar)||a.addCookies(c),"withCredentials"in c&&(c.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(c.timeout=this._opts.requestTimeout),c.onreadystatechange=()=>{var a;3===c.readyState&&(null==(a=this._opts.cookieJar)||a.parseCookies(c.getResponseHeader("set-cookie"))),4===c.readyState&&(200===c.status||1223===c.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof c.status?c.status:0)},0))},H("xhr data %s",this._data),c.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}"undefined"!=typeof document&&(this._index=K.requestsCount++,K.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=I,a)try{this._xhr.abort()}catch(a){}"undefined"!=typeof document&&delete K.requests[this._index],this._xhr=null}}_onLoad(){let a=this._xhr.responseText;null!==a&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function L(){for(let a in K.requests)K.requests.hasOwnProperty(a)&&K.requests[a].abort()}K.requestsCount=0,K.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",L):"function"==typeof addEventListener&&addEventListener("onpagehide"in s?"pagehide":"unload",L,!1)),(d=function(a){let b=a.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!b||G))return new XMLHttpRequest}catch(a){}if(!b)try{return new s[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(a){}}({xdomain:!1}))&&d.responseType;let M=g.default||g;a.i(29e3),a.i(75091),a.i(10697);var N=a.i(89877);a.i(95837),N.default;let O=(0,z.default)("engine.io-client:websocket"),P="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Q extends C{get name(){return"websocket"}doOpen(){let a=this.uri(),b=this.opts.protocols,c=P?{}:u(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,b,c)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let b=0;b<a.length;b++){let c=a[b],d=b===a.length-1;k(c,this.supportsBinary,a=>{try{this.doWrite(c,a)}catch(a){O("websocket closed before onclose event")}d&&r(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let a=this.opts.secure?"wss":"ws",b=this.query||{};return this.opts.timestampRequests&&(b[this.opts.timestampParam]=y()),this.supportsBinary||(b.b64=1),this.createUri(a,b)}}s.WebSocket||s.MozWebSocket;let R=(0,z.default)("engine.io-client:webtransport"),S={websocket:class extends Q{createSocket(a,b,c){var d;if(null==(d=this.socket)?void 0:d._cookieJar)for(let[a,b]of(c.headers=c.headers||{},c.headers.cookie="string"==typeof c.headers.cookie?[c.headers.cookie]:c.headers.cookie||[],this.socket._cookieJar.cookies))c.headers.cookie.push(`${a}=${b.value}`);return new N.default(a,b,c)}doWrite(a,b){let c={};a.options&&(c.compress=a.options.compress),this.opts.perMessageDeflate&&("string"==typeof b?Buffer.byteLength(b):b.length)<this.opts.perMessageDeflate.threshold&&(c.compress=!1),this.ws.send(b,c)}},webtransport:class extends C{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{R("transport closed gracefully"),this.onClose()}).catch(a=>{R("transport closed due to %s",a),this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{var d,e;let f,g,h,i,n=(d=Number.MAX_SAFE_INTEGER,e=this.socket.binaryType,c||(c=new TextDecoder),f=[],g=0,h=-1,i=!1,new TransformStream({transform(a,b){for(f.push(a);;){if(0===g){if(1>o(f))break;let a=p(f,1);i=(128&a[0])==128,g=(h=127&a[0])<126?3:126===h?1:2}else if(1===g){if(2>o(f))break;let a=p(f,2);h=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),g=3}else if(2===g){if(8>o(f))break;let a=p(f,8),c=new DataView(a.buffer,a.byteOffset,a.length),d=c.getUint32(0);if(d>2097151){b.enqueue(j);break}h=0x100000000*d+c.getUint32(4),g=3}else{if(o(f)<h)break;let a=p(f,h);b.enqueue(m(i?a:c.decode(a),e)),g=0}if(0===h||h>d){b.enqueue(j);break}}}})),q=a.readable.pipeThrough(n).getReader(),r=new TransformStream({transform(a,c){!function(a,c){if(a.data instanceof ArrayBuffer||ArrayBuffer.isView(a.data))return c(l(a.data,!1));k(a,!0,a=>{b||(b=new TextEncoder),c(b.encode(a))})}(a,b=>{let d,e=b.length;if(e<126)new DataView((d=new Uint8Array(1)).buffer).setUint8(0,e);else if(e<65536){let a=new DataView((d=new Uint8Array(3)).buffer);a.setUint8(0,126),a.setUint16(1,e)}else{let a=new DataView((d=new Uint8Array(9)).buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(e))}a.data&&"string"!=typeof a.data&&(d[0]|=128),c.enqueue(d),c.enqueue(b)})}});r.readable.pipeTo(a.writable),this._writer=r.writable.getWriter();let s=()=>{q.read().then(({done:a,value:b})=>{a?R("session is closed"):(R("received chunk: %o",b),this.onPacket(b),s())}).catch(a=>{R("an error occurred while reading: %s",a)})};s();let t={type:"open"};this.query.sid&&(t.data=`{"sid":"${this.query.sid}"}`),this._writer.write(t).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let b=0;b<a.length;b++){let c=a[b],d=b===a.length-1;this._writer.write(c).then(()=>{d&&r(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;null==(a=this._transport)||a.close()}},polling:class extends J{request(a={}){var b;return Object.assign(a,{xd:this.xd,cookieJar:null==(b=this.socket)?void 0:b._cookieJar},this.opts),new K(a=>new M(a),this.uri(),a)}}},T=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,U=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function V(a){var b,c;let d,e;if(a.length>8e3)throw"URI too long";let f=a,g=a.indexOf("["),h=a.indexOf("]");-1!=g&&-1!=h&&(a=a.substring(0,g)+a.substring(g,h).replace(/:/g,";")+a.substring(h,a.length));let i=T.exec(a||""),j={},k=14;for(;k--;)j[U[k]]=i[k]||"";return -1!=g&&-1!=h&&(j.source=f,j.host=j.host.substring(1,j.host.length-1).replace(/;/g,":"),j.authority=j.authority.replace("[","").replace("]","").replace(/;/g,":"),j.ipv6uri=!0),d=(b=j.path).replace(/\/{2,9}/g,"/").split("/"),("/"==b.slice(0,1)||0===b.length)&&d.splice(0,1),"/"==b.slice(-1)&&d.splice(d.length-1,1),j.pathNames=d,c=j.query,e={},c.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,b,c){b&&(e[b]=c)}),j.queryKey=e,j}let W=(0,z.default)("engine.io-client:socket"),X="function"==typeof addEventListener&&"function"==typeof removeEventListener,Y=[];X&&addEventListener("offline",()=>{W("closing %d connection(s) because the network was lost",Y.length),Y.forEach(a=>a())},!1);class Z extends q{constructor(a,b){if(super(),this.binaryType="nodebuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&"object"==typeof a&&(b=a,a=null),a){const c=V(a);b.hostname=c.host,b.secure="https"===c.protocol||"wss"===c.protocol,b.port=c.port,c.query&&(b.query=c.query)}else b.host&&(b.hostname=V(b.host).host);x(this,b),this.secure=null!=b.secure?b.secure:"undefined"!=typeof location&&"https:"===location.protocol,b.hostname&&!b.port&&(b.port=this.secure?"443":"80"),this.hostname=b.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=b.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},b.transports.forEach(a=>{let b=a.prototype.name;this.transports.push(b),this._transportsByName[b]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},b),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(a){let b={},c=a.split("&");for(let a=0,d=c.length;a<d;a++){let d=c[a].split("=");b[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return b}(this.opts.query)),X&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(W("adding listener for the 'offline' event"),this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=new t),this._open()}createTransport(a){W('creating transport "%s"',a);let b=Object.assign({},this.opts.query);b.EIO=4,b.transport=a,this.id&&(b.sid=this.id);let c=Object.assign({},this.opts,{query:b,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return W("options: %j",c),new this._transportsByName[a](c)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let a=this.opts.rememberUpgrade&&Z.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let b=this.createTransport(a);b.open(),this.setTransport(b)}setTransport(a){W("setting transport %s",a.name),this.transport&&(W("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",a=>this._onClose("transport close",a))}onOpen(){W("socket open"),this.readyState="open",Z.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(a){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(W('socket receive: type "%s", data "%s"',a.type,a.data),this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let b=Error("server error");b.code=a.data,this._onError(b);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data)}else W('packet received with socket readyState "%s"',this.readyState)}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let a=this._getWritablePackets();W("flushing %d packets in socket",a.length),this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let a=1;for(let b=0;b<this.writeBuffer.length;b++){let c=this.writeBuffer[b].data;if(c&&(a+="string"==typeof c?function(a){let b=0,c=0;for(let d=0,e=a.length;d<e;d++)(b=a.charCodeAt(d))<128?c+=1:b<2048?c+=2:b<55296||b>=57344?c+=3:(d++,c+=4);return c}(c):Math.ceil(1.33*(c.byteLength||c.size))),b>0&&a>this._maxPayload)return W("only send %d out of %d packets",b,this.writeBuffer.length),this.writeBuffer.slice(0,b);a+=2}return W("payload size is %d (max: %d)",a,this._maxPayload),this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let a=Date.now()>this._pingTimeoutTime;return a&&(W("throttled timer detected, scheduling connection close"),this._pingTimeoutTime=0,r(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,b,c){return this._sendPacket("message",a,b,c),this}send(a,b,c){return this._sendPacket("message",a,b,c),this}_sendPacket(a,b,c,d){if("function"==typeof b&&(d=b,b=void 0),"function"==typeof c&&(d=c,c=null),"closing"===this.readyState||"closed"===this.readyState)return;(c=c||{}).compress=!1!==c.compress;let e={type:a,data:b,options:c};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),d&&this.once("flush",d),this.flush()}close(){let a=()=>{this._onClose("forced close"),W("socket closing - telling transport to close"),this.transport.close()},b=()=>{this.off("upgrade",b),this.off("upgradeError",b),a()},c=()=>{this.once("upgrade",b),this.once("upgradeError",b)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():a()}):this.upgrading?c():a()),this}_onError(a){if(W("socket error %j",a),Z.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return W("trying next transport"),this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,b){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(W('socket close with reason: "%s"',a),this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),X&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=Y.indexOf(this._offlineEventListener);-1!==a&&(W("removing listener for the 'offline' event"),Y.splice(a,1))}this.readyState="closed",this.id=null,this.emitReserved("close",a,b),this.writeBuffer=[],this._prevBufferLen=0}}}Z.protocol=4;class $ extends Z{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade){W("starting upgrade probes");for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}}_probe(a){W('probing transport "%s"',a);let b=this.createTransport(a),c=!1;Z.priorWebsocketSuccess=!1;let d=()=>{c||(W('probe transport "%s" opened',a),b.send([{type:"ping",data:"probe"}]),b.once("packet",d=>{if(!c)if("pong"===d.type&&"probe"===d.data){if(W('probe transport "%s" pong',a),this.upgrading=!0,this.emitReserved("upgrading",b),!b)return;Z.priorWebsocketSuccess="websocket"===b.name,W('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{c||"closed"!==this.readyState&&(W("changing transport and sending upgrade packet"),j(),this.setTransport(b),b.send([{type:"upgrade"}]),this.emitReserved("upgrade",b),b=null,this.upgrading=!1,this.flush())})}else{W('probe transport "%s" failed',a);let c=Error("probe error");c.transport=b.name,this.emitReserved("upgradeError",c)}}))};function e(){c||(c=!0,j(),b.close(),b=null)}let f=c=>{let d=Error("probe error: "+c);d.transport=b.name,e(),W('probe transport "%s" failed because of error: %s',a,c),this.emitReserved("upgradeError",d)};function g(){f("transport closed")}function h(){f("socket closed")}function i(a){b&&a.name!==b.name&&(W('"%s" works - aborting "%s"',a.name,b.name),e())}let j=()=>{b.removeListener("open",d),b.removeListener("error",f),b.removeListener("close",g),this.off("close",h),this.off("upgrading",i)};b.once("open",d),b.once("error",f),b.once("close",g),this.once("close",h),this.once("upgrading",i),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==a?this.setTimeoutFn(()=>{c||b.open()},200):b.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){let b=[];for(let c=0;c<a.length;c++)~this.transports.indexOf(a[c])&&b.push(a[c]);return b}}class _ extends ${constructor(a,b={}){const c="object"==typeof a?a:b;(!c.transports||c.transports&&"string"==typeof c.transports[0])&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(a=>S[a]).filter(a=>!!a)),super(a,c)}}_.protocol;let aa=(0,z.default)("socket.io-client:url"),ab="function"==typeof ArrayBuffer,ac=Object.prototype.toString,ad="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===ac.call(Blob),ae="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===ac.call(File);function af(a){return ab&&(a instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer))||ad&&a instanceof Blob||ae&&a instanceof File}let ag=(0,z.default)("socket.io-parser"),ah=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];(e=f||(f={}))[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK";class ai{constructor(a){this.replacer=a}encode(a){return(ag("encoding packet %j",a),(a.type===f.EVENT||a.type===f.ACK)&&function a(b,c){if(!b||"object"!=typeof b)return!1;if(Array.isArray(b)){for(let c=0,d=b.length;c<d;c++)if(a(b[c]))return!0;return!1}if(af(b))return!0;if(b.toJSON&&"function"==typeof b.toJSON&&1==arguments.length)return a(b.toJSON(),!0);for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&a(b[c]))return!0;return!1}(a))?this.encodeAsBinary({type:a.type===f.EVENT?f.BINARY_EVENT:f.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let b=""+a.type;return(a.type===f.BINARY_EVENT||a.type===f.BINARY_ACK)&&(b+=a.attachments+"-"),a.nsp&&"/"!==a.nsp&&(b+=a.nsp+","),null!=a.id&&(b+=a.id),null!=a.data&&(b+=JSON.stringify(a.data,this.replacer)),ag("encoded %j as %s",a,b),b}encodeAsBinary(a){let b,c,d=(b=[],c=a.data,a.data=function a(b,c){if(!b)return b;if(af(b)){let a={_placeholder:!0,num:c.length};return c.push(b),a}if(Array.isArray(b)){let d=Array(b.length);for(let e=0;e<b.length;e++)d[e]=a(b[e],c);return d}if("object"==typeof b&&!(b instanceof Date)){let d={};for(let e in b)Object.prototype.hasOwnProperty.call(b,e)&&(d[e]=a(b[e],c));return d}return b}(c,b),a.attachments=b.length,{packet:a,buffers:b}),e=this.encodeAsString(d.packet),f=d.buffers;return f.unshift(e),f}}class aj extends q{constructor(a){super(),this.reviver=a}add(a){let b;if("string"==typeof a){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let c=(b=this.decodeString(a)).type===f.BINARY_EVENT;c||b.type===f.BINARY_ACK?(b.type=c?f.EVENT:f.ACK,this.reconstructor=new ak(b),0===b.attachments&&super.emitReserved("decoded",b)):super.emitReserved("decoded",b)}else if(af(a)||a.base64)if(this.reconstructor)(b=this.reconstructor.takeBinaryData(a))&&(this.reconstructor=null,super.emitReserved("decoded",b));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+a)}decodeString(a){let b=0,c={type:Number(a.charAt(0))};if(void 0===f[c.type])throw Error("unknown packet type "+c.type);if(c.type===f.BINARY_EVENT||c.type===f.BINARY_ACK){let d=b+1;for(;"-"!==a.charAt(++b)&&b!=a.length;);let e=a.substring(d,b);if(e!=Number(e)||"-"!==a.charAt(b))throw Error("Illegal attachments");c.attachments=Number(e)}if("/"===a.charAt(b+1)){let d=b+1;for(;++b&&","!==a.charAt(b)&&b!==a.length;);c.nsp=a.substring(d,b)}else c.nsp="/";let d=a.charAt(b+1);if(""!==d&&Number(d)==d){let d=b+1;for(;++b;){let c=a.charAt(b);if(null==c||Number(c)!=c){--b;break}if(b===a.length)break}c.id=Number(a.substring(d,b+1))}if(a.charAt(++b)){let d=this.tryParse(a.substr(b));if(aj.isPayloadValid(c.type,d))c.data=d;else throw Error("invalid payload")}return ag("decoded %s as %j",a,c),c}tryParse(a){try{return JSON.parse(a,this.reviver)}catch(a){return!1}}static isPayloadValid(a,b){switch(a){case f.CONNECT:return am(b);case f.DISCONNECT:return void 0===b;case f.CONNECT_ERROR:return"string"==typeof b||am(b);case f.EVENT:case f.BINARY_EVENT:return Array.isArray(b)&&("number"==typeof b[0]||"string"==typeof b[0]&&-1===ah.indexOf(b[0]));case f.ACK:case f.BINARY_ACK:return Array.isArray(b)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ak{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){var b,c;let a=(b=this.reconPack,c=this.buffers,b.data=function a(b,c){if(!b)return b;if(b&&!0===b._placeholder){if("number"==typeof b.num&&b.num>=0&&b.num<c.length)return c[b.num];throw Error("illegal attachments")}if(Array.isArray(b))for(let d=0;d<b.length;d++)b[d]=a(b[d],c);else if("object"==typeof b)for(let d in b)Object.prototype.hasOwnProperty.call(b,d)&&(b[d]=a(b[d],c));return b}(b.data,c),delete b.attachments,b);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}let al=Number.isInteger||function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a};function am(a){return"[object Object]"===Object.prototype.toString.call(a)}function an(a){var b;return"string"==typeof a.nsp&&(void 0===(b=a.id)||al(b))&&function(a,b){switch(a){case f.CONNECT:return void 0===b||am(b);case f.DISCONNECT:return void 0===b;case f.EVENT:return Array.isArray(b)&&("number"==typeof b[0]||"string"==typeof b[0]&&-1===ah.indexOf(b[0]));case f.ACK:return Array.isArray(b);case f.CONNECT_ERROR:return"string"==typeof b||am(b);default:return!1}}(a.type,a.data)}function ao(a,b,c){return a.on(b,c),function(){a.off(b,c)}}a.s(["Decoder",()=>aj,"Encoder",()=>ai,"PacketType",()=>f,"isPacketValid",()=>an,"protocol",0,5],32882);let ap=(0,z.default)("socket.io-client:socket"),aq=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ar extends q{constructor(a,b,c){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=b,c&&c.auth&&(this.auth=c.auth),this._opts=Object.assign({},c),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let a=this.io;this.subs=[ao(a,"open",this.onopen.bind(this)),ao(a,"packet",this.onpacket.bind(this)),ao(a,"error",this.onerror.bind(this)),ao(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...b){var c,d,e;if(aq.hasOwnProperty(a))throw Error('"'+a.toString()+'" is a reserved event name');if(b.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(b),this;let g={type:f.EVENT,data:b};if(g.options={},g.options.compress=!1!==this.flags.compress,"function"==typeof b[b.length-1]){let a=this.ids++;ap("emitting packet with ack id %d",a);let c=b.pop();this._registerAckCallback(a,c),g.id=a}let h=null==(d=null==(c=this.io.engine)?void 0:c.transport)?void 0:d.writable,i=this.connected&&!(null==(e=this.io.engine)?void 0:e._hasPingExpired());return this.flags.volatile&&!h?ap("discard packet as the transport is not currently writable"):i?(this.notifyOutgoingListeners(g),this.packet(g)):this.sendBuffer.push(g),this.flags={},this}_registerAckCallback(a,b){var c;let d=null!=(c=this.flags.timeout)?c:this._opts.ackTimeout;if(void 0===d){this.acks[a]=b;return}let e=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===a&&(ap("removing packet with ack id %d from the buffer",a),this.sendBuffer.splice(b,1));ap("event with ack id %d has timed out after %d ms",a,d),b.call(this,Error("operation has timed out"))},d),f=(...a)=>{this.io.clearTimeoutFn(e),b.apply(this,a)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...b){return new Promise((c,d)=>{let e=(a,b)=>a?d(a):c(b);e.withError=!0,b.push(e),this.emit(a,...b)})}_addToQueue(a){let b;"function"==typeof a[a.length-1]&&(b=a.pop());let c={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((a,...d)=>c!==this._queue[0]?ap("packet [%d] already acknowledged",c.id):(null!==a?c.tryCount>this._opts.retries&&(ap("packet [%d] is discarded after %d tries",c.id,c.tryCount),this._queue.shift(),b&&b(a)):(ap("packet [%d] was successfully sent",c.id),this._queue.shift(),b&&b(null,...d)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(a=!1){if(ap("draining queue"),!this.connected||0===this._queue.length)return;let b=this._queue[0];b.pending&&!a?ap("packet [%d] has already been sent and is waiting for an ack",b.id):(b.pending=!0,b.tryCount++,ap("sending packet [%d] (try n°%d)",b.id,b.tryCount),this.flags=b.flags,this.emit.apply(this,b.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){ap("transport is open - connecting"),"function"==typeof this.auth?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:f.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,b){ap("close (%s)",a),this.connected=!1,delete this.id,this.emitReserved("disconnect",a,b),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(b=>String(b.id)===a)){let b=this.acks[a];delete this.acks[a],b.withError&&b.call(this,Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case f.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case f.EVENT:case f.BINARY_EVENT:this.onevent(a);break;case f.ACK:case f.BINARY_ACK:this.onack(a);break;case f.DISCONNECT:this.ondisconnect();break;case f.CONNECT_ERROR:this.destroy();let b=Error(a.data.message);b.data=a.data.data,this.emitReserved("connect_error",b)}}onevent(a){let b=a.data||[];ap("emitting event %j",b),null!=a.id&&(ap("attaching ack callback to event"),b.push(this.ack(a.id))),this.connected?this.emitEvent(b):this.receiveBuffer.push(Object.freeze(b))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length)for(let b of this._anyListeners.slice())b.apply(this,a);super.emit.apply(this,a),this._pid&&a.length&&"string"==typeof a[a.length-1]&&(this._lastOffset=a[a.length-1])}ack(a){let b=this,c=!1;return function(...d){c||(c=!0,ap("sending ack %j",d),b.packet({type:f.ACK,id:a,data:d}))}}onack(a){let b=this.acks[a.id];"function"!=typeof b?ap("bad ack %s",a.id):(delete this.acks[a.id],ap("calling ack %s with %j",a.id,a.data),b.withError&&a.data.unshift(null),b.apply(this,a.data))}onconnect(a,b){ap("socket connected with id %s",a),this.id=a,this.recovered=b&&this._pid===b,this._pid=b,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){ap("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(ap("performing disconnect (%s)",this.nsp),this.packet({type:f.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){let b=this._anyListeners;for(let c=0;c<b.length;c++)if(a===b[c]){b.splice(c,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){let b=this._anyOutgoingListeners;for(let c=0;c<b.length;c++)if(a===b[c]){b.splice(c,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let b of this._anyOutgoingListeners.slice())b.apply(this,a.data)}}var as=a.i(32882);function at(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}at.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var b=Math.random(),c=Math.floor(b*this.jitter*a);a=(1&Math.floor(10*b))==0?a-c:a+c}return 0|Math.min(a,this.max)},at.prototype.reset=function(){this.attempts=0},at.prototype.setMin=function(a){this.ms=a},at.prototype.setMax=function(a){this.max=a},at.prototype.setJitter=function(a){this.jitter=a};let au=(0,z.default)("socket.io-client:manager");class av extends q{constructor(a,b){var c;super(),this.nsps={},this.subs=[],a&&"object"==typeof a&&(b=a,a=void 0),(b=b||{}).path=b.path||"/socket.io",this.opts=b,x(this,b),this.reconnection(!1!==b.reconnection),this.reconnectionAttempts(b.reconnectionAttempts||1/0),this.reconnectionDelay(b.reconnectionDelay||1e3),this.reconnectionDelayMax(b.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(c=b.randomizationFactor)?c:.5),this.backoff=new at({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==b.timeout?2e4:b.timeout),this._readyState="closed",this.uri=a;const d=b.parser||as;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=!1!==b.autoConnect,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return void 0===a?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var b;return void 0===a?this._reconnectionDelay:(this._reconnectionDelay=a,null==(b=this.backoff)||b.setMin(a),this)}randomizationFactor(a){var b;return void 0===a?this._randomizationFactor:(this._randomizationFactor=a,null==(b=this.backoff)||b.setJitter(a),this)}reconnectionDelayMax(a){var b;return void 0===a?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,null==(b=this.backoff)||b.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(a){if(au("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;au("opening %s",this.uri),this.engine=new _(this.uri,this.opts);let b=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;let d=ao(b,"open",function(){c.onopen(),a&&a()}),e=b=>{au("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",b),a?a(b):this.maybeReconnectOnOpen()},f=ao(b,"error",e);if(!1!==this._timeout){let a=this._timeout;au("connect attempt will timeout after %d",a);let c=this.setTimeoutFn(()=>{au("connect attempt timed out after %d",a),d(),e(Error("timeout")),b.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(d),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){au("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");let a=this.engine;this.subs.push(ao(a,"ping",this.onping.bind(this)),ao(a,"data",this.ondata.bind(this)),ao(a,"error",this.onerror.bind(this)),ao(a,"close",this.onclose.bind(this)),ao(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(a){this.onclose("parse error",a)}}ondecoded(a){r(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){au("error",a),this.emitReserved("error",a)}socket(a,b){let c=this.nsps[a];return c?this._autoConnect&&!c.active&&c.connect():(c=new ar(this,a,b),this.nsps[a]=c),c}_destroy(a){for(let a of Object.keys(this.nsps))if(this.nsps[a].active)return void au("socket %s is still active, skipping close",a);this._close()}_packet(a){au("writing packet %j",a);let b=this.encoder.encode(a);for(let c=0;c<b.length;c++)this.engine.write(b[c],a.options)}cleanup(){au("cleanup"),this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){au("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,b){var c;au("closed due to %s",a),this.cleanup(),null==(c=this.engine)||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,b),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let a=this;if(this.backoff.attempts>=this._reconnectionAttempts)au("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let b=this.backoff.duration();au("will wait %dms before reconnect attempt",b),this._reconnecting=!0;let c=this.setTimeoutFn(()=>{a.skipReconnect||(au("attempting reconnect"),this.emitReserved("reconnect_attempt",a.backoff.attempts),a.skipReconnect||a.open(b=>{b?(au("reconnect attempt error"),a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",b)):(au("reconnect success"),a.onreconnect())}))},b);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){let a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}let aw=(0,z.default)("socket.io-client"),ax={};function ay(a,b){let c;"object"==typeof a&&(b=a,a=void 0);let d=function(a,b="",c){let d=a;c=c||"undefined"!=typeof location&&location,null==a&&(a=c.protocol+"//"+c.host),"string"==typeof a&&("/"===a.charAt(0)&&(a="/"===a.charAt(1)?c.protocol+a:c.host+a),/^(https?|wss?):\/\//.test(a)||(aa("protocol-less url %s",a),a=void 0!==c?c.protocol+"//"+a:"https://"+a),aa("parse %s",a),d=V(a)),!d.port&&(/^(http|ws)$/.test(d.protocol)?d.port="80":/^(http|ws)s$/.test(d.protocol)&&(d.port="443")),d.path=d.path||"/";let e=-1!==d.host.indexOf(":")?"["+d.host+"]":d.host;return d.id=d.protocol+"://"+e+":"+d.port+b,d.href=d.protocol+"://"+e+(c&&c.port===d.port?"":":"+d.port),d}(a,(b=b||{}).path||"/socket.io"),e=d.source,f=d.id,g=d.path,h=ax[f]&&g in ax[f].nsps;return b.forceNew||b["force new connection"]||!1===b.multiplex||h?(aw("ignoring socket cache for %s",e),c=new av(e,b)):(ax[f]||(aw("new io instance for %s",e),ax[f]=new av(e,b)),c=ax[f]),d.query&&!b.query&&(b.query=d.queryKey),c.socket(d.path,b)}Object.assign(ay,{Manager:av,Socket:ar,io:ay,connect:ay}),a.s(["io",()=>ay],83915);let az="https://remote.9router.com",aA={connect:`${az}/api/connect`,tempKeyCreate:`${az}/api/temp-key/create`,tempKeyVerify:`${az}/api/temp-key/verify`,tempKeyRemove:`${az}/api/temp-key/remove`,localSites:"/api/local-sites"};a.s(["API_ENDPOINTS",0,aA,"WORKER_API",0,az],64606);var aB=a.i(72131);function aC(){let a=(0,aB.useCallback)(()=>null,[]);return{getAuth:a,setAuth:(0,aB.useCallback)(a=>{},[]),clearAuth:(0,aB.useCallback)(()=>{},[])}}a.s(["useSessionStorage",()=>aC],28032);var aD=a.i(87924);function aE({size:a="md",text:b,className:c=""}){return(0,aD.jsxs)("div",{className:`flex flex-col items-center justify-center gap-3 ${c}`,children:[(0,aD.jsx)("div",{className:`animate-spin rounded-full border-blue-500 ${{sm:"h-4 w-4 border-2",md:"h-8 w-8 border-2",lg:"h-12 w-12 border-b-2"}[a]}`}),b&&(0,aD.jsx)("p",{className:"text-slate-400 text-sm",children:b})]})}a.s(["default",()=>aE],99887)}];
6
6
 
7
- //# sourceMappingURL=%5Broot-of-the-server%5D__c4510a54._.js.map
7
+ //# sourceMappingURL=%5Broot-of-the-server%5D__9ae89159._.js.map