diff --git a/index.html b/index.html index 3ee67a71..f6979f2e 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,4 @@ li { list-style-type: none; text-align: center; -}

token-negotiator

\ No newline at end of file +}

token-negotiator

\ No newline at end of file diff --git a/v3.1.0/negotiator-3d41bf48ddc440c8f8bd.js b/v3.1.0/negotiator-3d41bf48ddc440c8f8bd.js new file mode 100644 index 00000000..fd8b6df8 --- /dev/null +++ b/v3.1.0/negotiator-3d41bf48ddc440c8f8bd.js @@ -0,0 +1,2 @@ +/*! For license information please see negotiator-3d41bf48ddc440c8f8bd.js.LICENSE.txt */ +(self.webpackChunknegotiator=self.webpackChunknegotiator||[]).push([[337],{56232:(e,t,n)=>{"use strict";n.r(t),n.d(t,{detectEnv:()=>v,detectOS:()=>y,formatIOSMobile:()=>Y,formatMobileRegistry:()=>G,formatMobileRegistryEntry:()=>Z,getClientMeta:()=>D,getCrypto:()=>M,getCryptoOrThrow:()=>O,getDappRegistryUrl:()=>X,getDocument:()=>T,getDocumentOrThrow:()=>B,getFromWindow:()=>A,getFromWindowOrThrow:()=>S,getLocal:()=>q,getLocalStorage:()=>U,getLocalStorageOrThrow:()=>I,getLocation:()=>P,getLocationOrThrow:()=>L,getMobileLinkRegistry:()=>K,getMobileRegistryEntry:()=>$,getNavigator:()=>N,getNavigatorOrThrow:()=>R,getWalletRegistryUrl:()=>Q,isAndroid:()=>b,isBrowser:()=>k,isIOS:()=>x,isMobile:()=>E,isNode:()=>C,mobileLinkChoiceKey:()=>H,removeLocal:()=>j,safeJsonParse:()=>z,safeJsonStringify:()=>W,saveMobileLinkInfo:()=>V,setLocal:()=>F});var r=n(68364),o=n(40957),i=n(34155),a=function(){for(var e=0,t=0,n=arguments.length;t1)}function E(){return!!y()&&(b()||x())}function C(){const e=v();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}function k(){return!C()&&!!N()}const A=o.getFromWindow,S=o.getFromWindowOrThrow,B=o.getDocumentOrThrow,T=o.getDocument,R=o.getNavigatorOrThrow,N=o.getNavigator,L=o.getLocationOrThrow,P=o.getLocation,O=o.getCryptoOrThrow,M=o.getCrypto,I=o.getLocalStorageOrThrow,U=o.getLocalStorage;function D(){return r.D()}const z=function(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}},W=function(e){return"string"==typeof e?e:JSON.stringify(e)};function F(e,t){const n=W(t),r=U();r&&r.setItem(e,n)}function q(e){let t=null,n=null;const r=U();return r&&(n=r.getItem(e)),t=n?z(n):n,t}function j(e){const t=U();t&&t.removeItem(e)}const H="WALLETCONNECT_DEEPLINK_CHOICE";function Y(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function V(e){const t=e.href.split("?")[0];F(H,Object.assign(Object.assign({},e),{href:t}))}function $(e,t){return e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())))[0]}function K(e,t){let n=e;return t&&(n=t.map((t=>$(e,t))).filter(Boolean)),n}const J="https://registry.walletconnect.com";function Q(){return J+"/api/v2/wallets"}function X(){return J+"/api/v2/dapps"}function Z(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:null!==(n=e.image_url.sm)&&void 0!==n?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function G(e,t="mobile"){return Object.values(e).filter((e=>!!e[t].universal||!!e[t].native)).map((e=>Z(e,t)))}},40957:(e,t)=>{"use strict";function n(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function r(e){const t=n(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},68364:(e,t,n)=>{"use strict";t.D=void 0;const r=n(40957);t.D=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let e=0;er.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(o.length&&o){const e=r.getAttribute("content");if(e)return e}}return""}const o=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let e=0;e-1){const e=o.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const r=t.pathname.split("/");r.pop();n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:o}}},4337:(e,t,n)=>{var r=n(34155);function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(56232),a=o(n(92592)),l=o(n(20640)),s=n(35776);var c=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n';"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var u="data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",f="WalletConnect",h=300,p="rgb(64, 153, 255)",d="walletconnect-wrapper",g="walletconnect-style-sheet",_="walletconnect-qrcode-modal",m="walletconnect-qrcode-close",w="walletconnect-qrcode-text",v="walletconnect-connect-button";function y(e){return s.createElement("div",{className:"walletconnect-modal__header"},s.createElement("img",{src:u,className:"walletconnect-modal__headerLogo"}),s.createElement("p",null,f),s.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:e.onClose},s.createElement("div",{id:m,className:"walletconnect-modal__close__icon"},s.createElement("div",{className:"walletconnect-modal__close__line1"}),s.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function b(e){return s.createElement("a",{className:"walletconnect-connect__button",href:e.href,id:v+"-"+e.name,onClick:e.onClick,rel:"noopener noreferrer",style:{backgroundColor:e.color},target:"_blank"},e.name)}var x="data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E";function E(e){var t=e.color,n=e.href,r=e.name,o=e.logo,i=e.onClick;return s.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},s.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),s.createElement("div",{className:"walletconnect-modal__base__row__right"},s.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+o+"') "+t,backgroundSize:"100%"}}),s.createElement("img",{src:x,className:"walletconnect-modal__base__row__right__caret"})))}function C(e){var t=e.color,n=e.href,r=e.name,o=e.logo,i=e.onClick,a=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return s.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},s.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+t,backgroundSize:"100%"}}),s.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},r))}var k=5,A=12;function S(e){var t=i.isAndroid(),n=s.useState(""),r=n[0],o=n[1],a=s.useState(""),l=a[0],c=a[1],u=s.useState(1),f=u[0],h=u[1],d=l?e.links.filter((function(e){return e.name.toLowerCase().includes(l.toLowerCase())})):e.links,g=e.errorMessage,_=l||d.length>k,m=Math.ceil(d.length/A),v=[(f-1)*A+1,f*A],y=d.length?d.filter((function(e,t){return t+1>=v[0]&&t+1<=v[1]})):[],x=!(t||!(m>1)),S=void 0;return s.createElement("div",null,s.createElement("p",{id:w,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&s.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:function(e){o(e.target.value),clearTimeout(S),e.target.value?S=setTimeout((function(){c(e.target.value),h(1)}),1e3):(o(""),c(""),h(1))}}),s.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":_&&d.length?"__wrap":"")},t?s.createElement(b,{name:e.text.connect,color:p,href:e.uri,onClick:s.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:e.uri})}),[])}):y.length?y.map((function(t){var n=t.color,r=t.name,o=t.shortName,a=t.logo,l=i.formatIOSMobile(e.uri,t),c=s.useCallback((function(){i.saveMobileLinkInfo({name:r,href:l})}),[y]);return _?s.createElement(C,{color:n,href:l,name:o||r,logo:a,onClick:c}):s.createElement(E,{color:n,href:l,name:r,logo:a,onClick:c})})):s.createElement(s.Fragment,null,s.createElement("p",null,g.length?e.errorMessage:e.links.length&&!d.length?e.text.no_wallets_found:e.text.loading))),x&&s.createElement("div",{className:"walletconnect-modal__footer"},Array(m).fill(0).map((function(e,t){var n=t+1,r=f===n;return s.createElement("a",{style:{margin:"auto 10px",fontWeight:r?"bold":"normal"},onClick:function(){return h(n)}},n)}))))}function B(e){var t=!!e.message.trim();return s.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var T=function(e){try{var t="";return Promise.resolve(a.toString(e,{margin:0,type:"svg"})).then((function(e){return"string"==typeof e&&(t=e.replace("0||s.useEffect((function(){!function(){try{if(t)return Promise.resolve();l(!0);var o=function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){var t=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(t)).then((function(t){return Promise.resolve(t.json()).then((function(t){var o=t.listings,a=n?"mobile":"desktop",s=i.getMobileLinkRegistry(i.formatMobileRegistry(o,a),r);l(!1),f(!0),N(s.length?"":e.text.no_supported_wallets),A(s);var c=1===s.length;c&&(v(i.formatIOSMobile(e.uri,s[0])),d(!0)),E(c)}))}))}),(function(t){l(!1),f(!0),N(e.text.something_went_wrong),console.error(t)}));return Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(e){return Promise.reject(e)}}()}))};L();var P=n?p:!p;return s.createElement("div",{id:_,className:"walletconnect-qrcode__base animated fadeIn"},s.createElement("div",{className:"walletconnect-modal__base"},s.createElement(y,{onClose:e.onClose}),x&&p?s.createElement("div",{className:"walletconnect-modal__single_wallet"},s.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:k[0].name,href:w})},href:w,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(x?k[0].name:"")+" ›")):t||a||!a&&k.length?s.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(P?" right__selected":"")},s.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return d(!1),L()}},e.text.mobile),s.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode)):s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode),s.createElement("a",{onClick:function(){return d(!1),L()}},e.text.desktop))):null,s.createElement("div",null,p||!t&&!a&&!k.length?s.createElement(R,Object.assign({},g)):s.createElement(S,Object.assign({},g,{links:k,errorMessage:T})))))}var L={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function P(){var e=i.getDocumentOrThrow(),t=e.getElementById(_);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((function(){var t=e.getElementById(d);t&&e.body.removeChild(t)}),h))}function O(e){return function(){P(),e&&e()}}function M(e,t,n){!function(){var e=i.getDocumentOrThrow(),t=e.getElementById(g);t&&e.head.removeChild(t);var n=e.createElement("style");n.setAttribute("id",g),n.innerText=c,e.head.appendChild(n)}();var r,o=function(){var e=i.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",d),e.body.appendChild(t),t}();s.render(s.createElement(N,{text:(r=i.getNavigatorOrThrow().language.split("-")[0]||"en",L[r]||L.en),uri:e,onClose:O(t),qrcodeModalOptions:n}),o)}var I=function(){return void 0!==r&&void 0!==r.versions&&void 0!==r.versions.node};var U={open:function(e,t,n){console.log(e),I()?function(e){a.toString(e,{type:"terminal"}).then(console.log)}(e):M(e,t,n)},close:function(){I()||P()}};e.exports=U},20640:(e,t,n)=>{"use strict";var r=n(11742),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,l,s,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),l=document.createRange(),s=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),l.selectNodeContents(c),s.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(l):s.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}},65987:e=>{"use strict";var t={single_source_shortest_paths:function(e,n,r){var o={},i={};i[n]=0;var a,l,s,c,u,f,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in l=(a=p.pop()).value,c=a.cost,u=e[l]||{})u.hasOwnProperty(s)&&(f=c+u[s],h=i[s],(void 0===i[s]||h>f)&&(i[s]=f,p.push(s,f),o[s]=l));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},5826:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},35776:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Children:()=>we,Component:()=>v,Fragment:()=>w,PureComponent:()=>pe,Suspense:()=>be,SuspenseList:()=>Ce,cloneElement:()=>We,createContext:()=>D,createElement:()=>g,createFactory:()=>De,createPortal:()=>Be,createRef:()=>m,default:()=>He,findDOMNode:()=>qe,forwardRef:()=>_e,hydrate:()=>Le,isValidElement:()=>ze,lazy:()=>Ee,memo:()=>de,render:()=>Ne,unmountComponentAtNode:()=>Fe,unstable_batchedUpdates:()=>je,useCallback:()=>ne,useContext:()=>re,useDebugValue:()=>oe,useEffect:()=>X,useErrorBoundary:()=>ie,useImperativeHandle:()=>ee,useLayoutEffect:()=>Z,useMemo:()=>te,useReducer:()=>Q,useRef:()=>G,useState:()=>J,version:()=>Ue});var r,o,i,a,l,s,c,u={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,n){var r,o=arguments,i={};for(r in t)"key"!==r&&"ref"!==r&&(i[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r2&&(t.children=f.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return _(e.type,n,t.key||e.key,t.ref||e.ref,null)}function D(e){var t={},n={__c:"__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,o=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=o,t},this.shouldComponentUpdate=function(e){o.props.value!==e.value&&r.some((function(t){t.context=e.value,x(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return x(n.__E=n)}catch(t){e=t}throw e}},v.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),x(this))},v.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},v.prototype.render=w,o=[],i=0,a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=u,c=0;var z,W,F,q=0,j=[],H=r.__r,Y=r.diffed,V=r.__c,$=r.unmount;function K(e,t){r.__h&&r.__h(W,e,q||t),q=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function J(e){return q=1,Q(ue,e)}function Q(e,t,n){var r=K(z++,2);return r.__c||(r.__c=W,r.__=[n?n(t):ue(void 0,t),function(t){var n=e(r.__[0],t);r.__[0]!==n&&(r.__[0]=n,r.__c.setState({}))}]),r.__}function X(e,t){var n=K(z++,3);!r.__s&&ce(n.__H,t)&&(n.__=e,n.__H=t,W.__H.__h.push(n))}function Z(e,t){var n=K(z++,4);!r.__s&&ce(n.__H,t)&&(n.__=e,n.__H=t,W.__h.push(n))}function G(e){return q=5,te((function(){return{current:e}}),[])}function ee(e,t,n){q=6,Z((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function te(e,t){var n=K(z++,7);return ce(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function ne(e,t){return q=8,te((function(){return e}),t)}function re(e){var t=W.context[e.__c],n=K(z++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(W)),t.props.value):e.__}function oe(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ie(e){var t=K(z++,10),n=J();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function ae(){j.some((function(e){if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(se),e.__H.__h=[]}catch(t){return e.__H.__h=[],r.__e(t,e.__v),!0}})),j=[]}function le(e){e.t&&e.t()}function se(e){var t=e.__();"function"==typeof t&&(e.t=t)}function ce(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function ue(e,t){return"function"==typeof t?t(e):t}function fe(e,t){for(var n in t)e[n]=t[n];return e}function he(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}r.__r=function(e){H&&H(e),z=0,(W=e.__c).__H&&(W.__H.__h.forEach(le),W.__H.__h.forEach(se),W.__H.__h=[])},r.diffed=function(e){Y&&Y(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==j.push(t)&&F===r.requestAnimationFrame||((F=r.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(ae))}},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||se(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(n,e.__v)}})),V&&V(e,t)},r.unmount=function(e){$&&$(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){r.__e(e,t.__v)}}};var pe=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return he(this.props,e)||he(this.state,t)},r}(v);function de(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:he(this.props,e)}function r(t){return this.shouldComponentUpdate=n,g(e,fe({},t))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r}var ge=r.__b;function _e(e){function t(t){var n=fe({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}r.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),ge&&ge(e)};var me=function(e,t){return e?k(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},we={map:me,forEach:me,count:function(e){return e?k(e).length:0},only:function(e){if(1!==(e=k(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:k},ve=r.__e;function ye(e){return e&&((e=fe({},e)).__c=null,e.__k=e.__k&&e.__k.map(ye)),e}function be(){this.__u=0,this.o=null,this.__b=null}function xe(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function Ee(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return g(n,o)}return o.displayName="Lazy",o.t=!0,o}function Ce(){this.i=null,this.l=null}r.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(e,t.__c);ve(e,t,n)},(be.prototype=new v).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=xe(n.__v),o=!1,i=function(){o||(o=!0,r?r(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var a=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(i,i)},be.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=ye(this.__b),this.__b=null),[g(v,null,t.u?null:e.children),t.u&&e.fallback]};var ke=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]{var r=n(47138),o=n(95115),i=n(6907),a=n(93776);function l(e,t,n,i,a){var l=[].slice.call(arguments,1),s=l.length,c="function"==typeof l[s-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=t,t=i=void 0):2!==s||t.getContext||(i=n,n=t,t=void 0),new Promise((function(r,a){try{var l=o.create(n,i);r(e(l,t,i))}catch(e){a(e)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=t,t=i=void 0):3===s&&(t.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=t,t=void 0));try{var u=o.create(n,i);a(null,e(u,t,i))}catch(e){a(e)}}t.create=o.create,t.toCanvas=l.bind(null,i.render),t.toDataURL=l.bind(null,i.renderToDataURL),t.toString=l.bind(null,(function(e,t,n){return a.render(e,n)}))},47138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},21845:(e,t,n)=>{var r=n(10242).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];for(var t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7],a=1;a{var r=n(76910),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},97245:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},73280:(e,t,n)=>{var r=n(99131);function o(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=r.alloc(e*e),this.reservedBit=r.alloc(e*e)}o.prototype.set=function(e,t,n,r){var o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},o.prototype.get=function(e,t){return this.data[e*this.size+t]},o.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},o.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=o},43424:(e,t,n)=>{var r=n(99131),o=n(76910);function i(e){this.mode=o.BYTE,this.data=r.from(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(var t=0,n=this.data.length;t{var r=n(64908),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}}},64908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},76526:(e,t,n)=>{var r=n(10242).getSymbolSize;t.getPositions=function(e){var t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},61642:(e,t,n)=>{var r=n(10242),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){for(var n=e.bit<<3|t,i=n<<10;r.getBCHDigit(i)-o>=0;)i^=1335<{var r=n(99131),o=r.alloc(512),i=r.alloc(256);!function(){for(var e=1,t=0;t<255;t++)o[t]=e,i[e]=t,256&(e<<=1)&&(e^=285);for(t=255;t<512;t++)o[t]=o[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return i[e]},t.exp=function(e){return o[e]},t.mul=function(e,t){return 0===e||0===t?0:o[i[e]+i[t]]}},35442:(e,t,n)=>{var r=n(76910),o=n(10242);function i(e){this.mode=r.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var t;for(t=0;t=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=i},27126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,r=3,o=40,i=10;function a(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){for(var t=e.size,r=0,o=0,i=0,a=null,l=null,s=0;s=5&&(r+=n+(o-5)),a=u,o=1),(u=e.get(c,s))===l?i++:(i>=5&&(r+=n+(i-5)),l=u,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},t.getPenaltyN2=function(e){for(var t=e.size,n=0,o=0;o=10&&(1488===r||93===r)&&n++,i=i<<1&2047|e.get(l,a),l>=10&&(1488===i||93===i)&&n++}return n*o},t.getPenaltyN4=function(e){for(var t=0,n=e.data.length,r=0;r{var r=n(43114),o=n(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},41085:(e,t,n)=>{var r=n(76910);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){var t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);var o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},26143:(e,t,n)=>{var r=n(99131),o=n(69729);t.mul=function(e,t){for(var n=r.alloc(e.length+t.length-1),i=0;i=0;){for(var i=n[0],a=0;a{var r=n(99131),o=n(10242),i=n(64908),a=n(97245),l=n(73280),s=n(21845),c=n(76526),u=n(27126),f=n(35393),h=n(52882),p=n(23103),d=n(61642),g=n(76910),_=n(16130),m=n(5826);function w(e,t,n){var r,o,i=e.size,a=d.getEncodedBits(t,n);for(r=0;r<15;r++)o=1==(a>>r&1),r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function v(e,t,n){var i=new a;n.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(i)}));var l=8*(o.getSymbolTotalCodewords(e)-f.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=l&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);for(var s=(l-i.getLengthInBits())/8,c=0;c=0&&l<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===l||6===l)||l>=2&&l<=4&&s>=2&&s<=4?e.set(i+l,a+s,!0,!0):e.set(i+l,a+s,!1,!0))}(y,t),function(e){for(var t=e.size,n=8;n=7&&function(e,t){for(var n,r,o,i=e.size,a=p.getEncodedBits(t),l=0;l<18;l++)n=Math.floor(l/3),r=l%3+i-8-3,o=1==(a>>l&1),e.set(n,r,o,!0),e.set(r,n,o,!0)}(y,t),function(e,t){for(var n=e.size,r=-1,o=n-1,i=7,a=0,l=n-1;l>0;l-=2)for(6===l&&l--;;){for(var s=0;s<2;s++)if(!e.isReserved(o,l-s)){var c=!1;a>>i&1)),e.set(o,l-s,c),-1==--i&&(a++,i=7)}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(y,d),isNaN(r)&&(r=u.getBestMask(y,w.bind(null,y,n))),u.applyMask(r,y),w(y,n,r),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:r,segments:i}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");var n,r,a=i.M;return void 0!==t&&(a=i.from(t.errorCorrectionLevel,i.M),n=p.from(t.version),r=u.from(t.maskPattern),t.toSJISFunc&&o.setToSJISFunction(t.toSJISFunc)),y(e,n,a,r)}},52882:(e,t,n)=>{var r=n(99131),o=n(26143),i=n(6772).lW;function a(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(e){this.degree=e,this.genPoly=o.generateECPolynomial(this.degree)},a.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=r.alloc(this.degree),n=i.concat([e,t],e.length+this.degree),a=o.mod(n,this.genPoly),l=this.degree-a.length;if(l>0){var s=r.alloc(this.degree);return a.copy(s,l),s}return a},e.exports=a},7007:(e,t)=>{var n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return l.test(e)}},16130:(e,t,n)=>{var r=n(76910),o=n(41085),i=n(8260),a=n(43424),l=n(35442),s=n(7007),c=n(10242),u=n(65987);function f(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){for(var r,o=[];null!==(r=e.exec(n));)o.push({data:r[0],index:r.index,mode:t,length:r[0].length});return o}function p(e){var t,n,o=h(s.NUMERIC,r.NUMERIC,e),i=h(s.ALPHANUMERIC,r.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(s.BYTE,r.BYTE,e),n=h(s.KANJI,r.KANJI,e)):(t=h(s.BYTE_KANJI,r.BYTE,e),n=[]),o.concat(i,t,n).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function d(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return i.getBitsLength(e);case r.KANJI:return l.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function g(e,t){var n,s=r.getBestModeForData(e);if((n=r.from(t,s))!==r.BYTE&&n.bit=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(l))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},10242:(e,t)=>{var n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},43114:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},23103:(e,t,n)=>{var r=n(10242),o=n(35393),i=n(64908),a=n(76910),l=n(43114),s=n(5826),c=r.getBCHDigit(7973);function u(e,t){return a.getCharCountIndicator(e,t)+4}function f(e,t){var n=0;return e.forEach((function(e){var r=u(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return l.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!l.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var i=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===a.MIXED)return i;var s=i-u(n,e);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},t.getBestVersionForData=function(e,n){var r,o=i.from(n,i.M);if(s(e)){if(e.length>1)return function(e,n){for(var r=1;r<=40;r++)if(f(e,r)<=t.getCapacity(r,n,a.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(var o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!l.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var t=e<<12;r.getBCHDigit(t)-c>=0;)t^=7973<{var r=n(89653);t.render=function(e,t,n){var o=n,i=t;void 0!==o||t&&t.getContext||(o=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);var a=r.getImageWidth(e.modules.size,o),l=i.getContext("2d"),s=l.createImageData(a,a);return r.qrToImageData(s.data,e,o),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(l,i,a),l.putImageData(s,0,0),i},t.renderToDataURL=function(e,n,r){var o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});var i=t.render(e,n,o),a=o.type||"image/png",l=o.rendererOpts||{};return i.toDataURL(a,l.quality)}},93776:(e,t,n)=>{var r=n(89653);function o(e,t){var n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(e,t,n){var r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){var a=r.getOptions(t),l=e.modules.size,s=e.modules.data,c=l+2*a.margin,u=a.color.light.a?"':"",f="0&&c>0&&e[s-1]||(r+=a?i("M",c+n,.5+u+n):i("m",o,0),o=0,a=!1),c+1',h='viewBox="0 0 '+c+" "+c+'"',p=''+u+f+"\n";return"function"==typeof n&&n(null,p),p}},89653:(e,t)=>{function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){var r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){for(var o=n.modules.size,i=n.modules.data,a=t.getScale(o,r),l=Math.floor((o+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark],u=0;u=s&&f>=s&&u{"use strict";var r=n(5826);i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}();var o=i.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function i(e,t,n){return i.TYPED_ARRAY_SUPPORT||this instanceof i?"number"==typeof e?s(this,e):function(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer)return function(e,t,n,r){if(n<0||t.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function l(e,t){var n;return i.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t)).__proto__=i.prototype:(null===(n=e)&&(n=new i(t)),n.length=t),n}function s(e,t){var n=l(e,t<0?0:0|a(t));if(!i.TYPED_ARRAY_SUPPORT)for(var r=0;r55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function f(e){return i.isBuffer(e)?e.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!=typeof e&&(e=""+e),0===e.length?0:u(e).length)}i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),i.prototype.write=function(e,t,n){void 0===t||void 0===n&&"string"==typeof t?(n=this.length,t=0):isFinite(t)&&(t|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,n,r){return function(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}(u(t,e.length-n),e,n,r)}(this,e,t,n)},i.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o{"use strict";var r=n(79742),o=n(80645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=s,t.h2=50;var a=2147483647;function l(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|g(e,t),r=l(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);var o=function(e){if(s.isBuffer(e)){var t=0|d(e.length),n=l(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?l(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),l(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),n=l(t),r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(o)return r?-1:D(e).length;t=(""+t).toLowerCase(),o=!0}}function _(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,l/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;il&&(n=l-s),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(u=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:i=e[o+1],a=e[o+2],l=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&l)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&l)>65535&&s<1114112&&(u=s)}null===u?(u=65533,f=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=f}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?s.from(i).copy(r,o):Uint8Array.prototype.set.call(r,i,o);else{if(!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o)}o+=i.length}return r},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,o){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(i,a),c=this.slice(r,o),u=e.slice(t,n),f=0;f>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function B(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function O(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,i){return t=+t,n>>>=0,i||O(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,i){return t=+t,n>>>=0,i||O(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],o=1,i=0;++i>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=0,a=1,l=0;for(this[t]=255&e;++i>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=n-1,a=1,l=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/a>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}var j=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()},11742:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r + * @license MIT + */ diff --git a/v3.1.0/negotiator-5365c5c6f9f34b56302f.js b/v3.1.0/negotiator-5365c5c6f9f34b56302f.js new file mode 100644 index 00000000..3a650711 --- /dev/null +++ b/v3.1.0/negotiator-5365c5c6f9f34b56302f.js @@ -0,0 +1 @@ +(self.webpackChunknegotiator=self.webpackChunknegotiator||[]).push([[278],{18712:e=>{var t;self,t=()=>(()=>{var e={4320:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.JsonRpcError=void 0;const i=r(2451),o=n(r(4445)),s=r(8164);class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,i.isPlainObject)(this.data)&&(e.data.cause=(0,s.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,o.default)(this.serialize(),l,2)}}function l(e,t){if("[Circular]"!==t)return t}t.JsonRpcError=a,t.EthereumProviderError=class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},2546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerErrors=t.rpcErrors=void 0;const n=r(4320),i=r(537),o=r(8164);function s(e,t){const[r,i]=l(t);return new n.JsonRpcError(e,r??(0,o.getMessageFromCode)(e),i)}function a(e,t){const[r,i]=l(t);return new n.EthereumProviderError(e,r??(0,o.getMessageFromCode)(e),i)}function l(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}t.rpcErrors={parse:e=>s(i.errorCodes.rpc.parse,e),invalidRequest:e=>s(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(i.errorCodes.rpc.methodNotFound,e),internal:e=>s(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(i.errorCodes.rpc.limitExceeded,e)},t.providerErrors={userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}},9428:(e,t,r)=>{"use strict";t.PY=t.Xy=t.yd=void 0;var n=r(4320);Object.defineProperty(t,"yd",{enumerable:!0,get:function(){return n.EthereumProviderError}});var i=r(8164);Object.defineProperty(t,"Xy",{enumerable:!0,get:function(){return i.serializeError}});var o=r(2546);Object.defineProperty(t,"PY",{enumerable:!0,get:function(){return o.rpcErrors}}),r(537)},8164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCause=t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(2451),i=r(537),o=i.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(l(e)){const r=e.toString();if((0,n.hasProperty)(i.errorValues,r))return i.errorValues[r].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function l(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,n.isValidJson)(e)?e:(0,n.isObject)(e)?c(e):null)):(0,n.isObject)(e)?c(e):(0,n.isValidJson)(e)?e:null}function c(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const i=e[r];return(0,n.isValidJson)(i)&&(t[r]=i),t}),{})}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=l,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const i=function(e,t){return e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize?e.serialize():(0,n.isJsonRpcError)(e)?e:{...t,data:{cause:u(e)}}}(e,t);return r||delete i.stack,i},t.serializeCause=u},1422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(7884);function i(e,t){return r=e,Boolean("string"==typeof(null===(i=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name))?new e({message:t}):e({message:t});var r,n,i}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=o,t.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",s=o){try{(0,n.assert)(e,t)}catch(e){throw i(s,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},7207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(7884),i=r(1422);t.base64=(e,t={})=>{var r,o;const s=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(o=t.characterSet)&&void 0!==o?o:"base64";let l,u;return"base64"===a?l=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===a),l=String.raw`[-_A-Za-z0-9]`),u=s?new RegExp(`^(?:${l}{4})*(?:${l}{3}=|${l}{2}==)?$`,"u"):new RegExp(`^(?:${l}{4})*(?:${l}{2,3}|${l}{3}=|${l}{2}==)?$`,"u"),(0,n.pattern)(e,u)}},8476:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const i=r(1422),o=r(2009),s=48,a=58,l=87,u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(c(e),"Value must be a Uint8Array.")}function f(e){if(d(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint."),p(e.toString(16))}function y(e){return(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),p(e.toString(16))}function b(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function m(e){if("bigint"==typeof e)return g(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):b(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=c,t.assertIsBytes=d,t.bytesToHex=f,t.bytesToBigInt=h,t.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const n=new Uint8Array(t);for(let e=0;e>=BigInt(8);return n.reverse()},t.numberToBytes=y,t.stringToBytes=b,t.valueToBytes=m,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(7884),i=r(7207);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},3557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(7884),i=r(1422),o=r(8476),s=r(2009),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),l=(0,n.coerce)((0,n.number)(),a,Number),u=(0,n.coerce)((0,n.bigint)(),a,BigInt),c=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),d=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);t.createNumber=function(e){try{const t=(0,n.create)(e,l);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return(0,n.create)(e,u)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},4283:function(e,t){"use strict";var r,n,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class s{constructor(e){r.set(this,void 0),i(this,r,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return o(this,r,"f")[Symbol.iterator]()}entries(){return o(this,r,"f").entries()}forEach(e,t){return o(this,r,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return o(this,r,"f").get(e)}has(e){return o(this,r,"f").has(e)}keys(){return o(this,r,"f").keys()}values(){return o(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=s;class a{constructor(e){n.set(this,void 0),i(this,n,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},5345:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const n=r(7884),i=r(1422);function o(e){return(0,n.is)(e,t.HexStruct)}function s(e){return(0,n.is)(e,t.StrictHexStruct)}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=o,t.isStrictHexString=s,t.assertIsHexString=function(e){(0,i.assert)(o(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,i.assert)(s(e),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}},2451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1422),t),i(r(7207),t),i(r(8476),t),i(r(5013),t),i(r(3557),t),i(r(4283),t),i(r(5345),t),i(r(2009),t),i(r(2497),t),i(r(3732),t),i(r(160),t),i(r(6215),t),i(r(9679),t),i(r(9108),t),i(r(7772),t),i(r(7749),t),i(r(8426),t)},2497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=void 0;const n=r(7884),i=r(1422);t.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>t.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>t.UnsafeJsonStruct)))]),t.JsonStruct=(0,n.define)("Json",((e,r)=>{function n(e,t){const n=[...t.validator(e,r)];return!(n.length>0)||n}try{const r=n(e,t.UnsafeJsonStruct);return!0!==r?r:n(JSON.parse(JSON.stringify(e)),t.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),t.isValidJson=function(e){return(0,n.is)(e,t.JsonStruct)},t.getJsonSize=function(e){(0,i.assertStruct)(e,t.JsonStruct,"Invalid JSON value");const r=JSON.stringify(e);return(new TextEncoder).encode(r).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(t.JsonStruct),stack:(0,n.optional)((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,n.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},3732:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},160:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const i=(0,n(r(1227)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},6215:(e,t)=>{"use strict";function r(e){return e.charCodeAt(0)<=127}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),(n=t.JsonSize||(t.JsonSize={}))[n.Null=4]="Null",n[n.Comma=1]="Comma",n[n.Wrapper=1]="Wrapper",n[n.True=4]="True",n[n.False=5]="False",n[n.Quote=1]="Quote",n[n.Colon=1]="Colon",n[n.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=r,t.calculateStringSize=function(e){var n;return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(null!==(n=e.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==n?n:[]).length},t.calculateNumberSize=function(e){return e.toString().length}},9679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(1422),i=r(2009);t.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),t.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),t.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},9108:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7772:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},7749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(5393),i=r(7884),o=r(1422);t.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,i.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,i.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,n.gt)(e,t)},t.gtRange=function(e,t){return(0,n.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}},3066:(e,t,r)=>{"use strict";const n=r(4403),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),u=Symbol("dispose"),c=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1,g=(e,t,r)=>{const n=e[f].get(t);if(n){const t=n.value;if(y(e,t)){if(m(e,n),!e[a])return}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},b=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){const r=t.prev;m(e,t),t=r}},m=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[o]-=r.length,e[f].delete(r.key),e[d].removeNode(t)}};class w{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;y(e,i)&&(m(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[s]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[u]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach((e=>this[u](e.key,e.value))),this[f]=new Map,this[d]=new n,this[o]=0}dump(){return this[d].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[f].has(e)){if(a>this[i])return m(this,this[f].get(e)),!1;const s=this[f].get(e).value;return this[u]&&(this[c]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),b(this),!0}const h=new w(e,t,a,n,r);return h.length>this[i]?(this[u]&&this[u](e,t),!1):(this[o]+=h.length,this[d].unshift(h),this[f].set(e,this[d].head),b(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach(((e,t)=>g(this,t,!1)))}}},7809:(e,t,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=i;const o=r(3459),{safeRe:s,t:a}=r(8416),l=r(2928),u=r(2494),c=r(808),d=r(5579)},5579:(e,t,r)=>{class n{constructor(e,t){if(t=o(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+e,r=i.get(t);if(r)return r;const n=this.options.loose,o=n?u[c.HYPHENRANGELOOSE]:u[c.HYPHENRANGE];e=e.replace(o,C(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[c.COMPARATORTRIM],d),a("comparator trim",e);let l=(e=(e=e.replace(u[c.TILDETRIM],f)).replace(u[c.CARETTRIM],h)).split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>O(e,this.options)));n&&(l=l.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[c.COMPARATORLOOSE]))))),a("range list",l);const b=new Map,m=l.map((e=>new s(e,this.options)));for(const e of m){if(y(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const v=[...b.values()];return i.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>m(r,t)&&e.set.some((e=>m(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,b=e=>""===e.value,m=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},w=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=A(e,t),a("xrange",e),e=T(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const r=t.loose?u[c.TILDELOOSE]:u[c.TILDE];return e.replace(r,((t,r,n,i,o)=>{let s;return a("tilde",e,t,r,n,i,o),v(r)?s="":v(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:v(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>R(e,t))).join(" "),R=(e,t)=>{a("caret",e,t);const r=t.loose?u[c.CARETLOOSE]:u[c.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,o,s)=>{let l;return a("caret",e,t,r,i,o,s),v(r)?l="":v(i)?l=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(o)?l="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===r?"0"===i?`>=${r}.${i}.${o}-${s} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} <${+r+1}.0.0-0`):(a("no pr"),l="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),a("caret return",l),l}))},A=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>I(e,t))).join(" ")),I=(e,t)=>{e=e.trim();const r=t.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return e.replace(r,((r,n,i,o,s,l)=>{a("xRange",e,r,n,i,o,s,l);const u=v(i),c=u||v(o),d=c||v(s),f=d;return"="===n&&f&&(n=""),l=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(c&&(o=0),s=0,">"===n?(n=">=",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",c?i=+i+1:o=+o+1),"<"===n&&(l="-0"),r=`${n+i}.${o}.${s}${l}`):c?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`),a("xRange return",r),r}))},T=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[c.STAR],"")),O=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),C=e=>(t,r,n,i,o,s,a,l,u,c,d,f,h)=>`${r=v(n)?"":v(i)?`>=${n}.0.0${e?"-0":""}`:v(o)?`>=${n}.${i}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=v(u)?"":v(c)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),N=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},808:(e,t,r)=>{const n=r(2494),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(1493),{safeRe:s,t:a}=r(8416),l=r(3459),{compareIdentifiers:u}=r(9417);class c{constructor(e,t){if(t=l(t),e instanceof c){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},7321:(e,t,r)=>{const n=r(9706);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2928:(e,t,r)=>{const n=r(6393),i=r(3),o=r(690),s=r(6155),a=r(1675),l=r(8800);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return i(e,r,u);case">":return o(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return l(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},5054:(e,t,r)=>{const n=r(808),i=r(9706),{safeRe:o,t:s}=r(8416);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else r=e.match(o[s.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},9457:(e,t,r)=>{const n=r(808);e.exports=(e,t,r)=>{const i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},8992:(e,t,r)=>{const n=r(6837);e.exports=(e,t)=>n(e,t,!0)},6837:(e,t,r)=>{const n=r(808);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},9603:(e,t,r)=>{const n=r(9706);e.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,l=s?i:r,u=!!a.prerelease.length;if(l.prerelease.length&&!u)return l.patch||l.minor?a.patch?"patch":a.minor?"minor":"major":"major";const c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},6393:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>0===n(e,t,r)},690:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>n(e,t,r)>0},6155:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>n(e,t,r)>=0},624:(e,t,r)=>{const n=r(808);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},1675:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>n(e,t,r)<0},8800:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>n(e,t,r)<=0},745:(e,t,r)=>{const n=r(808);e.exports=(e,t)=>new n(e,t).major},1561:(e,t,r)=>{const n=r(808);e.exports=(e,t)=>new n(e,t).minor},3:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>0!==n(e,t,r)},9706:(e,t,r)=>{const n=r(808);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},8660:(e,t,r)=>{const n=r(808);e.exports=(e,t)=>new n(e,t).patch},7674:(e,t,r)=>{const n=r(9706);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},3370:(e,t,r)=>{const n=r(6837);e.exports=(e,t,r)=>n(t,e,r)},6646:(e,t,r)=>{const n=r(9457);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7819:(e,t,r)=>{const n=r(5579);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3124:(e,t,r)=>{const n=r(9457);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},5557:(e,t,r)=>{const n=r(9706);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},5393:(e,t,r)=>{const n=r(8416),i=r(1493),o=r(808),s=r(9417),a=r(9706),l=r(5557),u=r(7321),c=r(624),d=r(9603),f=r(745),h=r(1561),p=r(8660),g=r(7674),y=r(6837),b=r(3370),m=r(8992),w=r(9457),v=r(3124),_=r(6646),E=r(690),S=r(1675),R=r(6393),A=r(3),I=r(6155),T=r(8800),O=r(2928),C=r(5054),N=r(7809),P=r(5579),L=r(7819),x=r(458),M=r(6449),D=r(1940),j=r(442),k=r(7677),$=r(9455),U=r(7922),B=r(3670),F=r(451),W=r(4501),V=r(4854);e.exports={parse:a,valid:l,clean:u,inc:c,diff:d,major:f,minor:h,patch:p,prerelease:g,compare:y,rcompare:b,compareLoose:m,compareBuild:w,sort:v,rsort:_,gt:E,lt:S,eq:R,neq:A,gte:I,lte:T,cmp:O,coerce:C,Comparator:N,Range:P,satisfies:L,toComparators:x,maxSatisfying:M,minSatisfying:D,minVersion:j,validRange:k,outside:$,gtr:U,ltr:B,intersects:F,simplifyRange:W,subset:V,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},1493:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2494:(e,t,r)=>{var n=r(4155);const i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=i},9417:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:er(t,e)}},3459:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},8416:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(1493),i=r(2494),o=(t=e.exports={}).re=[],s=t.safeRe=[],a=t.src=[],l=t.t={};let u=0;const c=(e,t,r)=>{const n=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),c=u++;i(e,c,t),l[e]=c,a[c]=t,o[c]=new RegExp(t,r?"g":void 0),s[c]=new RegExp(n,r?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[l.NUMERICIDENTIFIER]}|${a[l.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[l.NUMERICIDENTIFIERLOOSE]}|${a[l.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[l.PRERELEASEIDENTIFIER]}(?:\\.${a[l.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[l.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[l.BUILDIDENTIFIER]}(?:\\.${a[l.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[l.MAINVERSION]}${a[l.PRERELEASE]}?${a[l.BUILD]}?`),c("FULL",`^${a[l.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[l.MAINVERSIONLOOSE]}${a[l.PRERELEASELOOSE]}?${a[l.BUILD]}?`),c("LOOSE",`^${a[l.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[l.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:${a[l.PRERELEASE]})?${a[l.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:${a[l.PRERELEASELOOSE]})?${a[l.BUILD]}?)?)?`),c("XRANGE",`^${a[l.GTLT]}\\s*${a[l.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[l.GTLT]}\\s*${a[l.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",a[l.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${a[l.LONETILDE]}${a[l.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[l.LONETILDE]}${a[l.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${a[l.LONECARET]}${a[l.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[l.LONECARET]}${a[l.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[l.GTLT]}\\s*(${a[l.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]}|${a[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[l.XRANGEPLAIN]})\\s+-\\s+(${a[l.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[l.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7922:(e,t,r)=>{const n=r(9455);e.exports=(e,t,r)=>n(e,t,">",r)},451:(e,t,r)=>{const n=r(5579);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},3670:(e,t,r)=>{const n=r(9455);e.exports=(e,t,r)=>n(e,t,"<",r)},6449:(e,t,r)=>{const n=r(808),i=r(5579);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},1940:(e,t,r)=>{const n=r(808),i=r(5579);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},442:(e,t,r)=>{const n=r(808),i=r(5579),o=r(690);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&e.test(r)?r:null}},9455:(e,t,r)=>{const n=r(808),i=r(7809),{ANY:o}=i,s=r(5579),a=r(7819),l=r(690),u=r(1675),c=r(8800),d=r(6155);e.exports=(e,t,r,f)=>{let h,p,g,y,b;switch(e=new n(e,f),t=new s(t,f),r){case">":h=l,p=c,g=u,y=">",b=">=";break;case"<":h=u,p=d,g=l,y="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let r=0;r{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,h(e.semver,s.semver,f)?s=e:g(e.semver,a.semver,f)&&(a=e)})),s.operator===y||s.operator===b)return!1;if((!a.operator||a.operator===y)&&p(e,a.semver))return!1;if(a.operator===b&&g(e,a.semver))return!1}return!0}},4501:(e,t,r)=>{const n=r(7819),i=r(6837);e.exports=(e,t,r)=>{const o=[];let s=null,a=null;const l=e.sort(((e,t)=>i(e,t,r)));for(const e of l)n(e,t,r)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length{const n=r(5579),i=r(7809),{ANY:o}=i,s=r(7819),a=r(6837),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?l:u}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=u}const n=new Set;let i,c,h,p,g,y,b;for(const t of e)">"===t.operator||">="===t.operator?i=d(i,t,r):"<"===t.operator||"<="===t.operator?c=f(c,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&c){if(h=a(i.semver,c.semver,r),h>0)return null;if(0===h&&(">="!==i.operator||"<="!==c.operator))return null}for(const e of n){if(i&&!s(e,String(i),r))return null;if(c&&!s(e,String(c),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let m=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver,w=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;m&&1===m.prerelease.length&&"<"===c.operator&&0===m.prerelease[0]&&(m=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,i)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(p=d(i,e,r),p===e&&p!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(e),r))return!1;if(c)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),"<"===e.operator||"<="===e.operator){if(g=f(c,e,r),g===e&&g!==c)return!1}else if("<="===c.operator&&!s(c.semver,String(e),r))return!1;if(!e.operator&&(c||i)&&0!==h)return!1}return!(i&&y&&!c&&0!==h||c&&b&&!i&&0!==h||w||m)},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=c(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},458:(e,t,r)=>{const n=r(5579);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},7677:(e,t,r)=>{const n=r(5579);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},9332:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4403:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],l=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,d=l>0?s-4:s;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;au?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),a(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){let o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function D(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||L(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||L(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||L(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function V(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function J(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},1227:(e,t,r)=>{var n=r(4155);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("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 window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=r(2447)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{var n=r(4155),i=r(778),o=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var a=e._writableState,l=e._readableState,u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,d=!1,f=function(){e.writable||h()},h=function(){c=!1,u||r.call(e)},p=function(){u=!1,c||r.call(e)},g=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},y=function(t){r.call(e,t)},b=function(){n.nextTick(m)},m=function(){if(!d)return(!u||l&&l.ended&&!l.destroyed)&&(!c||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},w=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",b),e.req?w():e.on("request",w)):c&&!a&&(e.on("end",f),e.on("close",f)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",g),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",y),e.on("close",b),function(){d=!0,e.removeListener("complete",h),e.removeListener("abort",b),e.removeListener("request",w),e.req&&e.req.removeListener("finish",h),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("exit",g),e.removeListener("end",p),e.removeListener("error",y),e.removeListener("close",b)}};e.exports=s},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4063:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},4445:e=>{e.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),l(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,f(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function l(e,n,i,o,s,u,c){var d;if(u+=1,"object"==typeof e&&null!==e){for(d=0;dc.depthLimit)return void a(t,e,n,s);if(void 0!==c.edgesLimit&&i+1>c.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(d=0;dt?1:0}function c(e,t,r,s){void 0===s&&(s=o());var a,l=d(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(l,t,r):JSON.stringify(l,f(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function d(e,i,o,s,l,c,f){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;hf.depthLimit)return void a(t,e,i,l);if(void 0!==f.edgesLimit&&o+1>f.edgesLimit)return void a(t,e,i,l);if(s.push(e),Array.isArray(e))for(h=0;h0)for(var n=0;n{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+d],d+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=c?(a=0,s=c):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<0;e[r+h]=255&s,h+=p,s/=256,u-=8);e[r+h-p]|=128*g}},4970:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},2378:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",l="[object GeneratorFunction]",u="[object Null]",c="[object Object]",d="[object Proxy]",f="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[a]=g["[object Map]"]=g["[object Number]"]=g[c]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var y,b,m,w="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,v="object"==typeof self&&self&&self.Object===Object&&self,_=w||v||Function("return this")(),E=t&&!t.nodeType&&t,S=E&&e&&!e.nodeType&&e,R=S&&S.exports===E,A=R&&w.process,I=function(){try{return S&&S.require&&S.require("util").types||A&&A.binding&&A.binding("util")}catch(e){}}(),T=I&&I.isTypedArray,O=Array.prototype,C=Function.prototype,N=Object.prototype,P=_["__core-js_shared__"],L=C.toString,x=N.hasOwnProperty,M=(y=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",D=N.toString,j=L.call(Object),k=RegExp("^"+L.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=R?_.Buffer:void 0,U=_.Symbol,B=_.Uint8Array,F=($&&$.allocUnsafe,b=Object.getPrototypeOf,m=Object,function(e){return b(m(e))}),W=Object.create,V=N.propertyIsEnumerable,H=O.splice,G=U?U.toStringTag:void 0,J=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),K=$?$.isBuffer:void 0,z=Math.max,q=Date.now,X=fe(_,"Map"),Y=fe(Object,"create"),Z=function(){function e(){}return function(t){if(!Re(t))return{};if(W)return W(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},ee.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(X||ee),string:new Q}},te.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return de(this,e).get(e)},te.prototype.has=function(e){return de(this,e).has(e)},te.prototype.set=function(e,t){var r=de(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!X||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};var ce=J?function(e,t){return J(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Ne;function de(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function fe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Re(e)||function(e){return!!M&&M in e}(e))&&(Ee(e)?k:h).test(function(e){if(null!=e){try{return L.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function he(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ce);function be(e,t){return e===t||e!=e&&t!=t}var me=le(function(){return arguments}())?le:function(e){return Ae(e)&&x.call(e,"callee")&&!V.call(e,"callee")},we=Array.isArray;function ve(e){return null!=e&&Se(e.length)&&!Ee(e)}var _e=K||function(){return!1};function Ee(e){if(!Re(e))return!1;var t=ae(e);return t==a||t==l||t==s||t==d}function Se(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var Ie=T?function(e){return function(t){return e(t)}}(T):function(e){return Ae(e)&&Se(e.length)&&!!g[ae(e)]};function Te(e){return ve(e)?function(e,t){var r=we(e),n=!r&&me(e),i=!r&&!n&&_e(e),o=!r&&!n&&!i&&Ie(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Oe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Re(r))return!1;var n=typeof t;return!!("number"==n?ve(r)&&he(t,r.length):"string"==n&&t in r)&&be(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&u){try{return void(window.localStorage[u]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+r+";"}catch(e){}}}(r),s.call(a,r,e),typeof console===t&&r{var t=1e3,r=60*t,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(l=Math.abs(a))>=i?o(a,l,i,"day"):l>=n?o(a,l,n,"hour"):l>=r?o(a,l,r,"minute"):l>=t?o(a,l,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},778:(e,t,r)=>{var n=r(2479);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},4155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,l=[],u=!1,c=-1;function d(){u&&a&&(u=!1,a.length?l=a.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c1)for(var r=1;r{var n=r(4155),i=r(778),o=r(2840),s=r(1156),a=function(){},l=/^v?\.0/.test(n.version),u=function(e){return"function"==typeof e},c=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(d,f){var h=f0,(function(t){e||(e=t),t&&n.forEach(c),h||(n.forEach(c),r(e))}))}));return t.reduce(d)}},196:(e,t,r)=>{"use strict";const{AbortError:n,codes:i}=r(4381),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:a}=r(5874),l=r(8610),{ERR_INVALID_ARG_TYPE:u}=i;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new u("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new u("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const r=o(t)?()=>{t.destroy(new n(void 0,{cause:e.reason}))}:()=>{t[a](new n(void 0,{cause:e.reason}))};return e.aborted?r():(e.addEventListener("abort",r),l(t,(()=>e.removeEventListener("abort",r)))),t}},7327:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(9061),{Buffer:a}=r(8764),{inspect:l}=r(6087);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(eo.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},299:(e,t,r)=>{"use strict";const{pipeline:n}=r(9946),i=r(8672),{destroyer:o}=r(1195),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:d,isReadableStream:f}=r(5874),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:g}}=r(4381),y=r(8610);e.exports=function(...e){if(0===e.length)throw new g("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||d(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,b,m,w,v;const _=e[0],E=n(e,(function(e){const t=w;w=null,t?t(e):e?v.destroy(e):R||S||v.destroy()})),S=!!(l(_)||d(_)||c(_)),R=!!(a(E)||f(E)||c(E));if(v=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==E||!E.writableObjectMode),writable:S,readable:R}),S){if(s(_))v._write=function(e,t,n){_.write(e,t)?n():r=n},v._final=function(e){_.end(),b=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(_)){const e=(c(_)?_.writable:_).getWriter();v._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},v._final=async function(t){try{await e.ready,e.close().catch((()=>{})),b=t}catch(e){t(e)}}}const e=c(E)?E.readable:E;y(e,(()=>{if(b){const e=b;b=null,e()}}))}if(R)if(s(E))E.on("readable",(function(){if(m){const e=m;m=null,e()}})),E.on("end",(function(){v.push(null)})),v._read=function(){for(;;){const e=E.read();if(null===e)return void(m=v._read);if(!v.push(e))return}};else if(u(E)){const e=(c(E)?E.readable:E).getReader();v._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!v.push(t))return;if(r)return void v.push(null)}catch{return}}}return v._destroy=function(e,t){e||null===w||(e=new h),m=null,r=null,b=null,null===w?t(e):(w=t,s(E)&&o(E,e))},v}},1195:(e,t,r)=>{"use strict";const n=r(4155),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(4381),{Symbol:a}=r(9061),{kDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:d}=r(5874),f=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function g(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(b,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function y(e,t){m(e,t),b(e)}function b(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function m(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function w(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(m,e,t):m(e,t))}function v(e){let t=!1;function r(r){if(t)return void w(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(f,r):r?w(e,r,!0):n.nextTick(_,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function _(e){e.emit(h)}function E(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function R(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(v,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),d(e)?(e.socket=null,e.destroy(t)):E(e)?e.abort():E(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(R,e,t):n.nextTick(S,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?g(this,e,t):this.once(f,(function(r){g(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:w}},8672:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(9061);e.exports=u;const a=r(911),l=r(6304);s(u.prototype,a.prototype),s(u,a);{const e=o(l.prototype);for(let t=0;t{const n=r(4155),i=r(8764),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:d}=r(5874),f=r(8610),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g}}=r(4381),{destroyer:y}=r(1195),b=r(8672),m=r(911),{createDeferredPromise:w}=r(6087),v=r(6307),_=globalThis.Blob||i.Blob,E=void 0!==_?function(e){return e instanceof _}:function(e){return!1},S=globalThis.AbortController||r(8599).AbortController,{FunctionPrototypeCall:R}=r(9061);class A extends b{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?m.wrap(e.readable):e.readable,r=e.writable;let n,i,a,l,u,c=!!o(t),d=!!s(r);function p(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new A({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:d}),d&&(f(r,(e=>{d=!1,e&&y(t,e),p(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(f(t,(e=>{c=!1,e&&y(t,e),p(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new h),a=null,n=null,i=null,null===l?o(e):(l=o,y(r,e),y(t,e))},u}e.exports=function e(t,r){if(d(t))return t;if(u(t))return I({readable:t});if(c(t))return I({writable:t});if(l(t))return I({writable:!1,readable:!1});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=w();const i=new S,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new h(void 0,{cause:o.reason});({promise:t,resolve:r}=w()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return v(A,e,{objectMode:!0,write:i,final:o,destroy:s});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new g("nully","body",e)}),(e=>{y(t,e)}));return t=new A({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new g("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(a(t))return v(A,t,{objectMode:!0,writable:!1});if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{y(e,t)})),e=new A({objectMode:!0,writable:!1,read(){}})}throw new p(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},8610:(e,t,r)=>{const n=r(4155),{AbortError:i,codes:o}=r(4381),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(6087),{validateAbortSignal:c,validateFunction:d,validateObject:f,validateBoolean:h}=r(6547),{Promise:p,PromisePrototypeThen:g}=r(9061),{isClosed:y,isReadable:b,isReadableNodeStream:m,isReadableStream:w,isReadableFinished:v,isReadableErrored:_,isWritable:E,isWritableNodeStream:S,isWritableStream:R,isWritableFinished:A,isWritableErrored:I,isNodeStream:T,willEmitClose:O,kIsClosedPromise:C}=r(5874),N=()=>{};function P(e,t,r){var o,h;if(2===arguments.length?(r=t,t=l):null==t?t=l:f(t,"options"),d(r,"callback"),c(t.signal,"options.signal"),r=u(r),w(e)||R(e))return function(e,t,r){let o=!1,s=N;if(t.signal)if(s=()=>{o=!0,r.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{const n=r;r=u(((...r)=>{t.signal.removeEventListener("abort",s),n.apply(e,r)})),t.signal.addEventListener("abort",s)}const a=(...t)=>{o||n.nextTick((()=>r.apply(e,t)))};return g(e[C].promise,a,a),N}(e,t,r);if(!T(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const p=null!==(o=t.readable)&&void 0!==o?o:m(e),P=null!==(h=t.writable)&&void 0!==h?h:S(e),L=e._writableState,x=e._readableState,M=()=>{e.writable||k()};let D=O(e)&&m(e)===p&&S(e)===P,j=A(e,!1);const k=()=>{j=!0,e.destroyed&&(D=!1),(!D||e.readable&&!p)&&(p&&!$||r.call(e))};let $=v(e,!1);const U=()=>{$=!0,e.destroyed&&(D=!1),(!D||e.writable&&!P)&&(P&&!j||r.call(e))},B=t=>{r.call(e,t)};let F=y(e);const W=()=>{F=!0;const t=I(e)||_(e);return t&&"boolean"!=typeof t?r.call(e,t):p&&!$&&m(e,!0)&&!v(e,!1)?r.call(e,new a):!P||j||A(e,!1)?void r.call(e):r.call(e,new a)},V=()=>{F=!0;const t=I(e)||_(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},H=()=>{e.req.on("finish",k)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?P&&!L&&(e.on("end",M),e.on("close",M)):(e.on("complete",k),D||e.on("abort",W),e.req?H():e.on("request",H)),D||"boolean"!=typeof e.aborted||e.on("aborted",W),e.on("end",U),e.on("finish",k),!1!==t.error&&e.on("error",B),e.on("close",W),F?n.nextTick(W):null!=L&&L.errorEmitted||null!=x&&x.errorEmitted?D||n.nextTick(V):(p||D&&!b(e)||!j&&!1!==E(e))&&(P||D&&!E(e)||!$&&!1!==b(e))?x&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const G=()=>{r=N,e.removeListener("aborted",W),e.removeListener("complete",k),e.removeListener("abort",W),e.removeListener("request",H),e.req&&e.req.removeListener("finish",k),e.removeListener("end",M),e.removeListener("close",M),e.removeListener("finish",k),e.removeListener("end",U),e.removeListener("error",B),e.removeListener("close",W)};if(t.signal&&!F){const o=()=>{const n=r;G(),n.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{const n=r;r=u(((...r)=>{t.signal.removeEventListener("abort",o),n.apply(e,r)})),t.signal.addEventListener("abort",o)}}return G}e.exports=P,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=P(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6307:(e,t,r)=>{"use strict";const n=r(4155),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(9061),{Buffer:a}=r(8764),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=r(4381).codes;e.exports=function(e,t,r){let c,d;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])d=!0,c=t[o]();else{if(!t||!t[s])throw new l("iterable",["Iterable"],t);d=!1,c=t[s]()}const f=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return f._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=d?await c.next():c.next();if(t)f.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new u;if(f.push(t))continue;h=!1}}catch(e){f.destroy(e)}break}}())},f._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},f}},4870:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(9061),{EventEmitter:o}=r(7187);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){d(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return a(r,"error",c),a(e,"error",c),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},4382:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(8599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(4381),{validateAbortSignal:u,validateInteger:c,validateObject:d}=r(6547),f=r(9061).Symbol("kWeak"),{finished:h}=r(8610),p=r(299),{addAbortSignalNoValidate:g}=r(196),{isWritable:y,isNodeStream:b}=r(5874),{ArrayPrototypePush:m,MathFloor:w,Number:v,NumberIsNaN:_,Promise:E,PromiseReject:S,PromisePrototypeThen:R,Symbol:A}=r(9061),I=A("kEmpty"),T=A("kEof");function O(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let r=1;return null!=(null==t?void 0:t.concurrency)&&(r=w(t.concurrency)),c(r,"concurrency",1),async function*(){var i,o;const s=new n,a=this,u=[],c=s.signal,d={signal:c},f=()=>s.abort();let h,p;null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted&&f(),null==t||null===(o=t.signal)||void 0===o||o.addEventListener("abort",f);let g=!1;function y(){g=!0}!async function(){try{for await(let t of a){var n;if(g)return;if(c.aborted)throw new l;try{t=e(t,d)}catch(e){t=S(e)}t!==I&&("function"==typeof(null===(n=t)||void 0===n?void 0:n.catch)&&t.catch(y),u.push(t),h&&(h(),h=null),!g&&u.length&&u.length>=r&&await new E((e=>{p=e})))}u.push(T)}catch(e){const t=S(e);R(t,void 0,y),u.push(t)}finally{var i;g=!0,h&&(h(),h=null),null==t||null===(i=t.signal)||void 0===i||i.removeEventListener("abort",f)}}();try{for(;;){for(;u.length>0;){const e=await u[0];if(e===T)return;if(c.aborted)throw new l;e!==I&&(yield e),u.shift(),p&&(p(),p=null)}await new E((e=>{h=e}))}}finally{s.abort(),g=!0,p&&(p(),p=null)}}.call(this)}async function C(e,t=undefined){for await(const r of N.call(this,e,t))return!0;return!1}function N(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return O.call(this,(async function(t,r){return await e(t,r)?t:I}),t)}class P extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=v(e),_(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:function(e=undefined){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)},drop:function(e,t=undefined){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:N,flatMap:function(e,t){const r=O.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:O,take:function(e,t=undefined){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(!(e-- >0))return;yield r}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),b(e)&&!y(e))throw new i("stream",e,"must be writable");const r=p(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=undefined){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of O.call(this,(async function(t,r){return await e(t,r),I}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await h(this.destroy(e)),e}const a=new n,c=a.signal;if(null!=r&&r.signal){const e={once:!0,[f]:this};r.signal.addEventListener("abort",(()=>a.abort()),e)}let p=!1;try{for await(const n of this){var g;if(p=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new l;s?t=await e(t,n,{signal:c}):(t=n,s=!0)}if(!p&&!s)throw new P}finally{a.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});m(t,n)}return t},some:C,find:async function(e,t){for await(const r of N.call(this,e,t))return r}}},917:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(9061);e.exports=o;const i=r(1161);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},9946:(e,t,r)=>{const n=r(4155),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s}=r(9061),a=r(8610),{once:l}=r(6087),u=r(1195),c=r(8672),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:h,ERR_MISSING_ARGS:p,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:b}=r(4381),{validateFunction:m,validateAbortSignal:w}=r(6547),{isIterable:v,isReadable:_,isReadableNodeStream:E,isNodeStream:S,isTransformStream:R,isWebStream:A,isReadableStream:I,isReadableEnded:T}=r(5874),O=globalThis.AbortController||r(8599).AbortController;let C,N;function P(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,u.destroyer(e,t||new g("pipe")))},cleanup:a(e,{readable:t,writable:r},(e=>{n=!e}))}}function L(e){if(v(e))return e;if(E(e))return async function*(e){N||(N=r(911)),yield*N.prototype[s].call(e)}(e);throw new f("val",["Readable","Iterable","AsyncIterable"],e)}async function x(e,t,r,{end:n}){let i,s=null;const l=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},u=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",l);const c=a(t,{readable:!1},l);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&t.end(),await u(),r()}catch(e){r(i!==e?d(i,e):e)}finally{c(),t.off("drain",l)}}async function M(e,t,r,{end:n}){R(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function D(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new p("streams");const s=new O,a=s.signal,l=null==o?void 0:o.signal,u=[];function d(){k(new b)}let g,y;w(l,"options.signal"),null==l||l.addEventListener("abort",d);const m=[];let T,N=0;function D(e){k(e,0==--N)}function k(e,r){if(!e||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=e),g||r){for(;m.length;)m.shift()(g);null==l||l.removeEventListener("abort",d),s.abort(),r&&(g||u.forEach((e=>e())),n.nextTick(t,g,y))}}for(let F=0;F0,G=V||!1!==(null==o?void 0:o.end),J=F===e.length-1;if(S(W)){if(G){const{destroy:K,cleanup:z}=P(W,V,H);m.push(K),_(W)&&J&&u.push(z)}function $(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&D(e)}W.on("error",$),_(W)&&J&&u.push((()=>{W.removeListener("error",$)}))}if(0===F)if("function"==typeof W){if(T=W({signal:a}),!v(T))throw new h("Iterable, AsyncIterable or Stream","source",T)}else T=v(W)||E(W)||R(W)?W:c.from(W);else if("function"==typeof W){var U;if(T=R(T)?L(null===(U=T)||void 0===U?void 0:U.readable):L(T),T=W(T,{signal:a}),V){if(!v(T,!0))throw new h("AsyncIterable",`transform[${F-1}]`,T)}else{var B;C||(C=r(917));const q=new C({objectMode:!0}),X=null===(B=T)||void 0===B?void 0:B.then;if("function"==typeof X)N++,X.call(T,(e=>{y=e,null!=e&&q.write(e),G&&q.end(),n.nextTick(D)}),(e=>{q.destroy(e),n.nextTick(D,e)}));else if(v(T,!0))N++,x(T,q,D,{end:G});else{if(!I(T)&&!R(T))throw new h("AsyncIterable or Promise","destination",T);{const Q=T.readable||T;N++,x(Q,q,D,{end:G})}}T=q;const{destroy:Y,cleanup:Z}=P(T,!1,!0);m.push(Y),J&&u.push(Z)}}else if(S(W)){if(E(T)){N+=2;const ee=j(T,W,D,{end:G});_(W)&&J&&u.push(ee)}else if(R(T)||I(T)){const te=T.readable||T;N++,x(te,W,D,{end:G})}else{if(!v(T))throw new f("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],T);N++,x(T,W,D,{end:G})}T=W}else if(A(W)){if(E(T))N++,M(L(T),W,D,{end:G});else if(I(T)||v(T))N++,M(T,W,D,{end:G});else{if(!R(T))throw new f("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],T);N++,M(T.readable,W,D,{end:G})}T=W}else T=c.from(W)}return(null!=a&&a.aborted||null!=l&&l.aborted)&&n.nextTick(d),T}function j(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new y)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}T(e)?n.nextTick(s):e.once("end",s)}else r();return a(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),a(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:D,pipeline:function(...e){return D(e,l(function(e){return m(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},911:(e,t,r)=>{const n=r(4155),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:d,SafeSet:f,SymbolAsyncIterator:h,Symbol:p}=r(9061);e.exports=U,U.ReadableState=$;const{EventEmitter:g}=r(7187),{Stream:y,prependListener:b}=r(4870),{Buffer:m}=r(8764),{addAbortSignal:w}=r(196),v=r(8610);let _=r(6087).debuglog("stream",(e=>{_=e}));const E=r(7327),S=r(1195),{getHighWaterMark:R,getDefaultHighWaterMark:A}=r(2457),{aggregateTwoErrors:I,codes:{ERR_INVALID_ARG_TYPE:T,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_OUT_OF_RANGE:C,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:P}}=r(4381),{validateObject:L}=r(6547),x=p("kPaused"),{StringDecoder:M}=r(2553),D=r(6307);c(U.prototype,y.prototype),c(U,y);const j=()=>{},{errorOrDestroy:k}=S;function $(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.readableObjectMode)),this.highWaterMark=e?R(this,e,"readableHighWaterMark",n):A(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[x]=null,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new M(e.encoding),this.encoding=e.encoding)}function U(e){if(!(this instanceof U))return new U(e);const t=this instanceof r(8672);this._readableState=new $(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&w(e.signal,this)),y.call(this,e),S.construct(this,(()=>{this._readableState.needReadable&&G(this,this._readableState)}))}function B(e,t,r,n){_("readableAddChunk",t);const i=e._readableState;let o;if(i.objectMode||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=m.from(t,r).toString(i.encoding):(t=m.from(t,r),r=""))):t instanceof m?r="":y._isUint8Array(t)?(t=y._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new T("chunk",["string","Buffer","Uint8Array"],t))),o)k(e,o);else if(null===t)i.reading=!1,function(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?V(e):(t.needReadable=!1,t.emittedReadable=!0,H(e))}}(e,i);else if(i.objectMode||t&&t.length>0)if(n)if(i.endEmitted)k(e,new P);else{if(i.destroyed||i.errored)return!1;F(e,i,t,!0)}else if(i.ended)k(e,new N);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?F(e,i,t,!1):G(e,i)):F(e,i,t,!1)}else n||(i.reading=!1,G(e,i));return!i.ended&&(i.length0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&V(e)),G(e,t)}function W(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function V(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(H,e))}function H(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,X(e)}function G(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(J,e,t))}function J(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[x]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function z(e){_("readable nexttick read 0"),e.read(0)}function q(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),X(e),t.flowing&&!t.reading&&e.read(0)}function X(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function Y(e,t){"function"!=typeof e.read&&(e=U.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=j;function i(t){this===e?(n(),n=j):n=t}e.on("readable",i);const o=v(e,{writable:!1},(e=>{r=e?I(r,e):null,n(),n=j}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=I(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):S.destroyer(e,null)}}(e,t);return r.stream=e,r}function Z(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Q(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ee,t,e))}function ee(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(te,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function te(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let re;function ne(){return void 0===re&&(re={}),re}U.prototype.destroy=S.destroy,U.prototype._undestroy=S.undestroy,U.prototype._destroy=function(e,t){t(e)},U.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},U.prototype.push=function(e,t){return B(this,e,t,!1)},U.prototype.unshift=function(e,t){return B(this,e,t,!0)},U.prototype.isPaused=function(){const e=this._readableState;return!0===e[x]||!1===e.flowing},U.prototype.setEncoding=function(e){const t=new M(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},U.prototype.read=function(e){_("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new C("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):V(this),null;if(0===(e=W(e,t))&&t.ended)return 0===t.length&&Q(this),null;let n,i=t.needReadable;if(_("need readable",i),(0===t.length||t.length-e0?Z(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},U.prototype._read=function(e){throw new O("_read()")},U.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new f(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),_("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?g:s;function s(){_("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){_("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,_("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",g),r.removeListener("data",c),l=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let l=!1;function u(){l||(1===i.pipes.length&&i.pipes[0]===e?(_("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(_("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function c(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&u()}function d(t){if(_("onerror",t),g(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?k(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),g()}function p(){_("onfinish"),e.removeListener("close",h),g()}function g(){_("unpipe"),r.unpipe(e)}return r.on("data",c),b(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?i.flowing&&u():i.flowing||(_("pipe resume"),r.resume()),e},U.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,_("on readable",i.length,i.reading),i.length?V(this):i.reading||n.nextTick(z,this))),r},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(e,t){const r=y.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(K,this),r},U.prototype.off=U.prototype.removeListener,U.prototype.removeAllListeners=function(e){const t=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(K,this),t},U.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(q,e,t))}(this,e)),e[x]=!1,this},U.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[x]=!0,this},U.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{k(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(9061),{ERR_INVALID_ARG_VALUE:o}=r(4381).codes;function s(e){return e?16:16384}e.exports={getHighWaterMark:function(e,t,r,a){const l=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=l){if(!i(l)||l<0)throw new o(a?`options.${r}`:"options.highWaterMark",l);return n(l)}return s(e.objectMode)},getDefaultHighWaterMark:s}},1161:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(9061);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(4381).codes,s=r(8672),{getHighWaterMark:a}=r(2457);n(u.prototype,s.prototype),n(u,s);const l=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==c&&c.call(this)}u.prototype._final=c,u.prototype._transform=function(e,t,r){throw new o("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{"use strict";const{Symbol:n,SymbolAsyncIterator:i,SymbolIterator:o,SymbolFor:s}=r(9061),a=n("kDestroyed"),l=n("kIsErrored"),u=n("kIsReadable"),c=n("kIsDisturbed"),d=s("nodejs.webstream.isClosedPromise"),f=s("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function g(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||g(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function b(e){return!(!e||g(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function m(e){return!(!e||g(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function w(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function v(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function E(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!w(e)&&h(e)&&e.readable&&!_(e)}function S(e){return"boolean"!=typeof(null==e?void 0:e.writable)?null:!w(e)&&p(e)&&e.writable&&!v(e)}function R(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function A(e){return"boolean"==typeof e._sent100&&R(e)}e.exports={kDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,a,u,c,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[l])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(a=e._readableState)||void 0===a?void 0:a.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:l,isReadable:E,kIsReadable:u,kIsClosedPromise:d,kControllerErrorFunction:f,isClosed:function(e){if(!g(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&R(e)?e._closed:null},isDestroyed:w,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return g(e)?!(!w(e)&&(!1!==(null==t?void 0:t.readable)&&E(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[i]:!1===t?"function"==typeof e[o]:"function"==typeof e[i]||"function"==typeof e[o])},isReadableNodeStream:h,isReadableStream:y,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return g(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:g,isWebStream:function(e){return y(e)||b(e)||m(e)},isWritable:S,isWritableNodeStream:p,isWritableStream:b,isWritableEnded:v,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return g(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:A,willEmitClose:function(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&A(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:m}},6304:(e,t,r)=>{const n=r(4155),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:d,SymbolHasInstance:f}=r(9061);e.exports=M,M.WritableState=L;const{EventEmitter:h}=r(7187),p=r(4870).Stream,{Buffer:g}=r(8764),y=r(1195),{addAbortSignal:b}=r(196),{getHighWaterMark:m,getDefaultHighWaterMark:w}=r(2457),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:E,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:R,ERR_STREAM_ALREADY_FINISHED:A,ERR_STREAM_NULL_VALUES:I,ERR_STREAM_WRITE_AFTER_END:T,ERR_UNKNOWN_ENCODING:O}=r(4381).codes,{errorOrDestroy:C}=y;function N(){}u(M.prototype,p.prototype),u(M,p);const P=d("kOnFinished");function L(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?m(this,e,"writableHighWaterMark",n):w(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=$.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,x(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[P]=[]}function x(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function M(e){const t=this instanceof r(8672);if(!t&&!s(M,this))return new M(e);this._writableState=new L(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&b(e.signal,this)),p.call(this,e),y.construct(this,(()=>{const e=this._writableState;e.writing||W(this,e),H(this,e)}))}function D(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!g.isEncoding(r))throw new O(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=N)}if(null===t)throw new I;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=g.from(t,r),r="buffer");else if(t instanceof g)r="buffer";else{if(!p._isUint8Array(t))throw new v("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new T:o.destroyed&&(s=new R("write")),s?(n.nextTick(i,s),C(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&W(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(U,r.afterWriteTickInfo)):B(e,r,1,o))):C(e,new E)}function U({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,B(e,t,r,n)}function B(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&F(t),H(e,t)}function F(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?N:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function V(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t,r){V(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)C(e,null!=i?i:E());else if(r=!0,t.pendingcb--,i){const r=t[P].splice(0);for(let e=0;e{V(t)?G(e,t):t.pendingcb--}),e,t)):V(t)&&(t.pendingcb++,G(e,t))))}function G(e,t){t.pendingcb--,t.finished=!0;const r=t[P].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:d,ObjectPrototypeHasOwnProperty:f,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:g,StringPrototypeTrim:y}=r(9061),{hideStackFrames:b,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:w,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:E}}=r(4381),{normalizeEncoding:S}=r(6087),{isAsyncFunction:R,isArrayBufferView:A}=r(6087).types,I={},T=/^[0-7]+$/,O=b(((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(en)throw new _(t,`>= ${r} && <= ${n}`,e)})),C=b(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(en)throw new _(t,`>= ${r} && <= ${n}`,e)})),N=b(((e,t,r=!1)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new _(t,`>= ${n} && <= ${i}`,e)}));function P(e,t){if("string"!=typeof e)throw new w(t,"string",e)}const L=b(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new v(t,e,"must be one of: "+n)}}));function x(e,t){if("boolean"!=typeof e)throw new w(t,"boolean",e)}function M(e,t,r){return null!=e&&f(e,t)?e[t]:r}const D=b(((e,t,r=null)=>{const i=M(r,"allowArray",!1),o=M(r,"allowFunction",!1);if(!M(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new w(t,"Object",e)})),j=b(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new w(t,"a dictionary",e)})),k=b(((e,t,r=0)=>{if(!n(e))throw new w(t,"Array",e);if(e.length{if(!A(e))throw new w(t,["Buffer","TypedArray","DataView"],e)})),U=b(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new w(t,"AbortSignal",e)})),B=b(((e,t)=>{if("function"!=typeof e)throw new w(t,"Function",e)})),F=b(((e,t)=>{if("function"!=typeof e||R(e))throw new w(t,"Function",e)})),W=b(((e,t)=>{if(void 0!==e)throw new w(t,"undefined",e)})),V=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(e,t){if(void 0===e||!h(V,e))throw new v(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(T,e))throw new v(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return N(e,t),e},validateArray:k,validateStringArray:function(e,t){k(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new _(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:D,validateOneOf:L,validatePlainFunction:F,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new m(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(P(e,t),void 0===I[e]){if(void 0!==I[g(e)])throw new E(e+" (signals must use all capital letters)");throw new E(e)}},validateString:P,validateUint32:N,validateUndefined:W,validateUnion:function(e,t,r){if(!i(r,e))throw new w(t,`('${o(r,"|")}')`,e)},validateAbortSignal:U,validateLinkHeaderValue:function(e){if("string"==typeof e)return H(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},9827:(e,t,r)=>{"use strict";const n=r(5099),i=r(7854),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},4381:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(6087),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function d(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function f(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class g extends Error{constructor(e="The operation was aborted",t=undefined){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=f(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=f(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:g,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},9061:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Uint8Array}},6087:(e,t,r)=>{"use strict";const n=r(8764),i=Object.getPrototypeOf((async function(){})).constructor,o=globalThis.Blob||n.Blob,s=void 0!==o?function(e){return e instanceof o}:function(e){return!1};class a extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof i,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:s},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5099:(e,t,r)=>{const{Buffer:n}=r(8764),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(9061),{promisify:{custom:a}}=r(6087),{streamReturningOperators:l,promiseReturningOperators:u}=r(4382),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(4381),d=r(299),{pipeline:f}=r(9946),{destroyer:h}=r(1195),p=r(8610),g=r(7854),y=r(5874),b=e.exports=r(4870).Stream;b.isDisturbed=y.isDisturbed,b.isErrored=y.isErrored,b.isReadable=y.isReadable,b.Readable=r(911);for(const v of o(l)){const _=l[v];function m(...e){if(new.target)throw c();return b.Readable.from(s(_,this,e))}i(m,"name",{__proto__:null,value:_.name}),i(m,"length",{__proto__:null,value:_.length}),i(b.Readable.prototype,v,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(u)){const S=u[E];function m(...e){if(new.target)throw c();return s(S,this,e)}i(m,"name",{__proto__:null,value:S.name}),i(m,"length",{__proto__:null,value:S.length}),i(b.Readable.prototype,E,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}b.Writable=r(6304),b.Duplex=r(8672),b.Transform=r(1161),b.PassThrough=r(917),b.pipeline=f;const{addAbortSignal:w}=r(196);b.addAbortSignal=w,b.finished=p,b.destroy=h,b.compose=d,i(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),i(f,a,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),i(p,a,{__proto__:null,enumerable:!0,get:()=>g.finished}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},7854:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(9061),{isIterable:o,isNodeStream:s,isWebStream:a}=r(5874),{pipelineImpl:l}=r(9946),{finished:u}=r(8610);r(5099),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},2479:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r{},7884:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>c,StructError:()=>n,any:()=>A,array:()=>I,assert:()=>d,assign:()=>y,bigint:()=>T,boolean:()=>O,coerce:()=>X,create:()=>f,date:()=>C,defaulted:()=>Y,define:()=>b,deprecated:()=>m,dynamic:()=>w,empty:()=>Q,enums:()=>N,func:()=>P,instance:()=>L,integer:()=>x,intersection:()=>M,is:()=>p,lazy:()=>v,literal:()=>D,map:()=>j,mask:()=>h,max:()=>te,min:()=>re,never:()=>k,nonempty:()=>ne,nullable:()=>$,number:()=>U,object:()=>B,omit:()=>_,optional:()=>F,partial:()=>E,pattern:()=>ie,pick:()=>S,record:()=>W,refine:()=>se,regexp:()=>V,set:()=>H,size:()=>oe,string:()=>G,struct:()=>R,trimmed:()=>Z,tuple:()=>J,type:()=>K,union:()=>z,unknown:()=>q,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function o(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:l,message:u=`Expected a value of type \`${a}\`${l?` with refinement \`${l}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:l,key:i[i.length-1],path:i,branch:o,...e,message:u}}function*l(e,t,r,n){var o;i(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=a(i,t,r,n);e&&(yield e)}}function*u(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,l={path:n,branch:o};if(s&&(e=t.coercer(e,l),a&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c="valid";for(const n of t.validator(e,l))n.explanation=r.message,c="not_valid",yield[n,void 0];for(let[d,f,h]of t.entries(e,l)){const t=u(f,h,{path:void 0===d?n:[...n,d],branch:void 0===d?o:[...o,f],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(c=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(f=r[1],void 0===d?e=f:e instanceof Map?e.set(d,f):e instanceof Set?e.add(f):i(e)&&(void 0!==f||d in e)&&(e[d]=f))}if("not_valid"!==c)for(const n of t.refiner(e,l))n.explanation=r.message,c="not_refined",yield[n,void 0];"valid"===c&&(yield[void 0,e])}class c{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(e,t)=>l(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>l(i(e,t),t,this,e):()=>[]}assert(e,t){return d(e,this,t)}create(e,t){return f(e,this,t)}is(e){return p(e,this)}mask(e,t){return h(e,this,t)}validate(e,t={}){return g(e,this,t)}}function d(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function f(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function h(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t){return!g(e,t)[0]}function g(e,t,r={}){const i=u(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(i);return o[0]?[new n(o[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function y(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?K(n):B(n)}function b(e,t){return new c({type:e,schema:null,validator:t})}function m(e,t){return new c({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function w(e){return new c({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function v(e){let t;return new c({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function _(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?K(n):B(n)}function E(e){const t=e instanceof c?{...e.schema}:{...e};for(const e in t)t[e]=F(t[e]);return B(t)}function S(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return B(n)}function R(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),b(e,t)}function A(){return b("any",(()=>!0))}function I(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function T(){return b("bigint",(e=>"bigint"==typeof e))}function O(){return b("boolean",(e=>"boolean"==typeof e))}function C(){return b("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function N(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new c({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function P(){return b("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function L(e){return b("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function x(){return b("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function M(e){return new c({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function D(e){const t=s(e),r=typeof e;return new c({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function j(e,t){return new c({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function k(){return b("never",(()=>!1))}function $(e){return new c({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function U(){return b("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function B(e){const t=e?Object.keys(e):[],r=k();return new c({type:"object",schema:e||null,*entries(n){if(e&&i(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function F(e){return new c({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function W(e,t){return new c({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`})}function V(){return b("regexp",(e=>e instanceof RegExp))}function H(e){return new c({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function G(){return b("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function J(e){const t=k();return new c({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;iArray.isArray(e)||`Expected an array, but received: ${s(e)}`})}function K(e){const t=Object.keys(e);return new c({type:"type",schema:e,*entries(r){if(i(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function z(e){const t=e.map((e=>e.type)).join(" | ");return new c({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=u(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})}function q(){return b("unknown",(()=>!0))}function X(e,t,r){return new c({...e,coercer:(n,i)=>p(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function Y(e,t,r={}){return X(e,q(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&o(e)&&o(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function Z(e){return X(e,G(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?rn?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function ie(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function oe(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:o}=e;return t<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}{const{length:o}=e;return t<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}}))}function se(e,t,r){return new c({...e,*refiner(n,i){yield*e.refiner(n,i);const o=l(r(n,i),i,e,n);for(const e of o)yield{...e,refinement:t}}})}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}r.r(n),r.d(n,{BUTTON_POSITION:()=>W,PAYMENT_PROVIDER:()=>U,SUPPORTED_PAYMENT_NETWORK:()=>B,TORUS_BUILD_ENV:()=>F,TorusInpageProvider:()=>ve,WALLET_OPENLOGIN_VERIFIER_MAP:()=>$,WALLET_VERIFIERS:()=>k,default:()=>Pe});var i=r(2378),o=r.n(i),s=r(2043),a=r.n(s);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=u(u({},r.headers),function(){const e={};return d&&(e["x-api-key"]=d),e}()));const n=o()(r,t,{method:"GET"}),i=await async function(e,t){let r=null;try{r=new URL(e)}catch(e){}return fetch(e,t)}(e,n);if(i.ok)return i.json();throw function(e){c.info(`Response: ${e.status} ${e.statusText}`),c.info(`Url: ${e.url}`)}(i),i};var h=r(9827),p=r(7187),g=r(4445),y=r.n(g),b=r(9428),m=r(2840),w=r.n(m),v=r(778),_=r.n(v),E=r(4286),S=r.n(E);function R(){}const A="ACK";class I extends h.Duplex{constructor(e){let{name:r,target:n,targetWindow:i=window,targetOrigin:o="*"}=e;if(super({objectMode:!0}),t(this,"_init",void 0),t(this,"_haveSyn",void 0),t(this,"_name",void 0),t(this,"_target",void 0),t(this,"_targetWindow",void 0),t(this,"_targetOrigin",void 0),t(this,"_onMessage",void 0),t(this,"_synIntervalId",void 0),!r||!n)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=r,this._target=n,this._targetWindow=i,this._targetOrigin=o,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write("BRK",null,R),this._haveSyn=!1,this._init=!1}_handShake(){this._write("SYN",null,R),this.cork()}_onData(e){if(this._init)if("BRK"===e)this._break();else try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(A,null,R)):e===A&&(this._init=!0,this._haveSyn||this._write(A,null,R),this.uncork())}_postMessage(e){const t=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:e},t)}onMessage(e){const t=e.data;"*"!==this._targetOrigin&&e.origin!==this._targetOrigin||e.source!==this._targetWindow||"object"!=typeof t||t.target!==this._name||!t.data||this._onData(t.data)}_read(){}_write(e,t,r){this._postMessage(e),r()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}function T(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class O extends p.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)T(s,this,i);else{const e=s.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n{const o=e=>{const r=e||t.error;r&&(t.error=(0,b.Xy)(r)),i([r,!0])},s=e=>{t.error?o(t.error):(e&&("function"!=typeof e&&o(new C({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),i([null,!1]))};try{r(e,t,s,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new C({code:-32603,message:"Response has no error or result for request"});if(!r)throw new C({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,s]=await P._runAllMiddleware(e,t,this._middleware);return o?(await P._runReturnHandlers(s),n(i)):r((async e=>{try{await P._runReturnHandlers(s)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,r){if(!e||Array.isArray(e)||"object"!=typeof e){const e=new C({code:-32603,message:"request must be plain object"});return r(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const t=new C({code:-32603,message:"method must be string"});return r(t,{id:e.id,jsonrpc:"2.0",error:t})}const n=function(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{}),{},{objectMode:!0})),t(this,"_substreams",void 0),t(this,"getStream",void 0),this._substreams={}}createStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new L({parent:this,name:e});return this._substreams[e]=t,function(e,r){const n=_()((e=>t.destroy(e||void 0)));w()(e,{readable:!1},n),w()(e,{writable:!1},n)}(this),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=D}_read(){}_write(e,t,r){const{name:n,data:i}=e;if(!n)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const o=this._substreams[n];return o?(o!==D&&o.push(i),r()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}const k={GOOGLE:"google",FACEBOOK:"facebook",TWITCH:"twitch",REDDIT:"reddit",DISCORD:"discord",EMAIL_PASSWORDLESS:"torus-auth0-email-passwordless"},$={[k.GOOGLE]:"tkey-google",[k.FACEBOOK]:"tkey-facebook",[k.TWITCH]:"tkey-twitch",[k.REDDIT]:"tkey-reddit",[k.DISCORD]:"tkey-discord",[k.EMAIL_PASSWORDLESS]:"tkey-auth0-email-passwordless"},U={MOONPAY:"moonpay",WYRE:"wyre",RAMPNETWORK:"rampnetwork",XANPOOL:"xanpool",MERCURYO:"mercuryo",TRANSAK:"transak",BANXA:"banxa"},B={MAINNET:"mainnet",MATIC:"matic",BSC_MAINNET:"bsc_mainnet",AVALANCHE_MAINNET:"avalanche_mainnet",XDAI:"xdai",ARBITRUM_MAINNET:"arbitrum_mainnet",OPTIMISM_MAINNET:"optimism_mainnet"},F={PRODUCTION:"production",DEVELOPMENT:"development",BINANCE:"binance",TESTING:"testing",LRC:"lrc",BETA:"beta",BNB:"bnb",POLYGON:"polygon",ALPHA:"alpha"},W={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},V={[U.MOONPAY]:["AUD","BGN","BRL","CAD","CHF","CNY","COP","CZK","DKK","DOP","EGP","EUR","GBP","HKD","HRK","IDR","ILS","JPY","JOD","KES","KRW","KWD","LKR","MAD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PKR","PLN","RON","RUB","SEK","SGD","THB","TRY","TWD","USD","VND","ZAR"],[U.WYRE]:["USD","EUR","GBP","AUD","CAD","NZD","CNY","ARS","BRL","CHF","CLP","COP","CZK","DKK","HKD","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","PHP","PLN","SEK","SGD","THB","VND","ZAR"],[U.RAMPNETWORK]:["USD","EUR","GBP","BMD","BAM","BWP","BRL","BGN","COP","CRC","CZK","DKK","DOP","GEL","GTQ","HNL","HUF","ISK","INR","ILS","KZT","KES","KWD","LAK","MKD","MYR","MXN","MDL","MZN","NZD","NGN","PYG","PEN","PLN","RON","RSD","SGD","ZAR","LKR","SEK","CHF","TJS","THB","UYU"],[U.XANPOOL]:["SGD","HKD","THB","PHP","INR","IDR","MYR","AUD","NZD","KRW"],[U.MERCURYO]:["EUR","USD","GBP","TRY","JPY","BRL","NGN","VND","MXN","KRW","PLN","SEK","CHF","CAD","CZK","DKK","BGN","HKD","AUD","INR"],[U.TRANSAK]:["ARS","AUD","BBD","BGN","BMD","BRL","CAD","CHF","CLP","CRC","CZK","DKK","DOP","EUR","FJD","FKP","GBP","GIP","HRK","HUF","IDR","ILS","ISK","JMD","JPY","KES","KRW","MDL","MXN","MYR","NOK","NZD","PEN","PHP","PLN","PYG","RON","SEK","SGD","THB","TRY","TZS","USD","ZAR"],[U.BANXA]:["AUD","CAD","CZK","DKK","EUR","GBP","HKD","JPY","NOK","NZD","NZD","PLN","RUB","SEK","SGD","TRY","USD"]},H=new Set(["ETH","USDT","USDC","TUSD","EOSDT","USD","DAI","GUSD","DKKT","PAX","ILS","RUB","BYN","EUR","GBP","JPY","KRW","PLN","MXN","AUD","BRL","CAD","CHF","KPW","LAK","LBP","LKR","XOF","CNHT","DOGE","UAH","TRY","HKD","XJP","SGD","USC","NZD","NGN","RUR","COP","GHS","EGP","IDR","BHD","CRC","PEN","AED","DOP","PKR","HUF","VND","XAR","LTC","RON","OMR","MYR","DKK","UGX","ZMW","SAR","SEK","GEL","RWF","IRR","TZS","CNY","VEF","BDT","HRK","CLP","THB","XAF","ARS","UYU","SZL","KZT","NOK","KES","PAB","INR","CZK","MAD","TWD","PHP","ZAR","BOB","CDF","DASH","VES","ISK","MWK","BAM","TTD","XRP","JOD","RSD","HNL","BGN","GTQ","BWP","XMR","MMK","QAR","AOA","KWD","MUR","WUSD","WEUR","WAVES","WTRY","LRD","LSL","LYD","AWG","MDL","BTO","EURS","CHFT","MKD","MNT","MOP","MRO","MVR","VOLLAR","CKUSD","KHR","VUV","BITCNY","QC","BBD","NAD","NPR","PGK","PYG","BIF","BMD","BND","XLM","BNB","SCR","BAT","CRO","HT","KCS","LEO","LINK","MKR","NPXS","OMG","REP","ZB","ZIL","ZRX","BCH","BZD","CUP","CVE","DJF","DZD","ERN","ETB","FJD","FKP","BUSD","ANCT","ALL","AMD","ANG","CNYX","IQD","UZS","TND","GGP","XAU","KGS","GIP","JMD","ZEC","USDP","BSV","EMC2","SNT","GTO","POWR","EUSD","EURT","BCY","BTS","ATM","BLOCKPAY","ARDR","AMP","B2X","BITGOLD","BITEUR","ATB","BITUSD","AGRS","DFXT","HIKEN","BIX","KNC","EOS","COB","COSS","BMH","NANO","BDG","BNT","XVG","LKK1Y","LKK","USDK","EURN","NZDT","JSE","GMD","GNF","GYD","YER","XPF","HTG","SLL","SOS","WST","SVC","SYP","NEO","KMF","JUMP","AYA","BLAST","WGR","BCN","BTG","URALS","INN","USDQ","CNH","HUSD","BKRW","NZDX","EURX","CADX","USDEX","JPYX","AUDX","VNDC","EON","GBPX","CHFX","USDJ","IDRT","USDS","USDN","BIDR","IDK","BSD","BTN","KYD","NIO","SBD","SDG","SHP","TOP","XCD","XCHF","CNYT","GYEN","ZUSD","GOLD","TRX","TRYB","PLATC","STRAX","UST","GLM","VAI","BRZ","DDRST","XAUT","MIM"]);function G(e){return V[e].filter((e=>H.has(e)))}const J={[U.MOONPAY]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"4.5% or 5 USD",line3:"2,000€/day, 10,000€/mo",supportPage:"https://help.moonpay.io/en/",minOrderValue:24.99,maxOrderValue:5e4,validCurrencies:G(U.MOONPAY),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"aave",display:"AAVE"},{value:"bat",display:"BAT"},{value:"dai",display:"DAI"},{value:"eth",display:"ETH"},{value:"mkr",display:"MKR"},{value:"matic",display:"MATIC"},{value:"usdt",display:"USDT"},{value:"uni",display:"UNI"},{value:"usdc",display:"USDC"},{value:"weth",display:"WETH"}],[B.MATIC]:[{value:"eth_polygon",display:"ETH"},{value:"matic_polygon",display:"MATIC"},{value:"usdc_polygon",display:"USDC"},{value:"usdt_polygon",display:"USDT"}],[B.BSC_MAINNET]:[{value:"bnb_bsc",display:"BNB"},{value:"busd_bsc",display:"BUSD"}],[B.AVALANCHE_MAINNET]:[{value:"avax_cchain",display:"AVAX"},{value:"usdc_cchain",display:"USDC"}],[B.ARBITRUM_MAINNET]:[{value:"eth_arbitrum",display:"ETH"},{value:"usdc_arbitrum",display:"USDC"}],[B.OPTIMISM_MAINNET]:[{value:"eth_optimism",display:"ETH"},{value:"usdc_optimism",display:"USDC"}]},includeFees:!0,api:!0,enforceMax:!1},[U.WYRE]:{line1:"Apple Pay/ Debit/ Credit Card",line2:"4.9% + 30¢ or 5 USD",line3:"$250/day",supportPage:"https://support.sendwyre.com/en/",minOrderValue:5,maxOrderValue:500,validCurrencies:G(U.WYRE),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"AAVE",display:"AAVE"},{value:"COMP",display:"COMP"},{value:"BAT",display:"BAT"},{value:"BUSD",display:"BUSD"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"WBTC",display:"WBTC"},{value:"MKR",display:"MKR"},{value:"UNI",display:"UNI"},{value:"WETH",display:"WETH"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[B.MATIC]:[{value:"mUSDC",display:"USDC"},{value:"MATIC",display:"MATIC"},{value:"MWETH",display:"WETH"}],[B.AVALANCHE_MAINNET]:[{value:"AVAXC",display:"AVAX"},{value:"AVAXCUSDC",display:"USDC"}],[B.BSC_MAINNET]:[{value:"BNB",display:"BNB"},{value:"BBUSD",display:"BUSD"}]},includeFees:!1,api:!0,enforceMax:!1},[U.RAMPNETWORK]:{line1:"Debit Card/
Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000€/purchase, 20,000€/mo",supportPage:"https://instant.ramp.network/",minOrderValue:50,maxOrderValue:2e4,validCurrencies:G(U.RAMPNETWORK),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"ETH",display:"ETH"},{value:"DAI",display:"DAI"},{value:"BAT",display:"BAT"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[B.MATIC]:[{value:"MATIC_BAT",display:"BAT"},{value:"MATIC_DAI",display:"DAI"},{value:"MATIC_MATIC",display:"MATIC"},{value:"MATIC_USDC",display:"USDC"},{value:"MATIC_USDT",display:"USDT"}],[B.AVALANCHE_MAINNET]:[{value:"AVAX_AVAX",display:"AVAX"},{value:"AVAX_USDC",display:"USDC"},{value:"AVAX_USDT",display:"USDT"}],[B.ARBITRUM_MAINNET]:[{value:"ARBITRUM_ETH",display:"ETH"},{value:"ARBITRUM_USDC.e\t",display:"USDC"},{value:"ARBITRUM_USDT",display:"USDT"}],[B.OPTIMISM_MAINNET]:[{value:"OPTIMISM_DAI",display:"DAI"},{value:"OPTIMISM_OPTIMISM",display:"OPTIMISM"},{value:"OPTIMISM_USDC",display:"USDC"},{value:"OPTIMISM_USDT",display:"USDT"}],[B.BSC_MAINNET]:[{value:"BSC_BNB",display:"BNB"},{value:"BSC_BUSD",display:"BUSD"}]},includeFees:!0,api:!0,receiveHint:"walletTopUp.receiveHintRamp",enforceMax:!1},[U.XANPOOL]:{line1:"PayNow/ InstaPay/ FPS/ GoJekPay/ UPI/ PromptPay/
ViettelPay/ DuitNow",line2:"2.5% buying, 3% selling",line3:"$2,500 / day",supportPage:"mailto:support@xanpool.com",minOrderValue:100,maxOrderValue:2500,validCurrencies:G(U.XANPOOL),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"ETH",display:"ETH"},{value:"USDT",display:"USDT"},{value:"USDC",display:"USDC"}]},includeFees:!0,api:!0,sell:!0,enforceMax:!1},[U.MERCURYO]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"3.95% or 4 USD",line3:"10,000€/day, 25,000€/mo",supportPage:"mailto:support@mercuryo.io",minOrderValue:30,maxOrderValue:5e3,validCurrencies:G(U.MERCURYO),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"ETH",display:"ETH"},{value:"BAT",display:"BAT"},{value:"USDT",display:"USDT"},{value:"DAI",display:"DAI"}],[B.BSC_MAINNET]:[{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"},{value:"1INCH",display:"1INCH"}],[B.AVALANCHE_MAINNET]:[{value:"AVAX",display:"AVAX"}],[B.MATIC]:[{value:"MATIC",display:"MATIC"}]},includeFees:!0,api:!0,enforceMax:!1},[U.TRANSAK]:{line1:"Apple & Google Pay / Credit/Debit Card
Bangkok Bank Mobile & iPay
Bank Transfer (sepa/gbp) / SCB Mobile & Easy",line2:"0.99% - 5.5% or 5 USD",line3:"$5,000/day, $28,000/mo",supportPage:"https://support.transak.com/hc/en-US",minOrderValue:30,maxOrderValue:500,validCurrencies:G(U.TRANSAK),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"1INCH",display:"1INCH"},{value:"BAT",display:"BAT"},{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[B.MATIC]:[{value:"BAT",display:"BAT"},{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"MATIC",display:"MATIC"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"},{value:"WETH",display:"WETH"}],[B.BSC_MAINNET]:[{value:"BAT",display:"BAT"},{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"}],[B.AVALANCHE_MAINNET]:[{value:"AVAX",display:"AVAX"}],[B.OPTIMISM_MAINNET]:[{value:"ETH",display:"ETH"},{value:"USDC",display:"USDC"}],[B.ARBITRUM_MAINNET]:[{value:"USDC",display:"USDC"},{value:"ETH",display:"ETH"}]},includeFees:!0,enforceMax:!0},[U.BANXA]:{line1:"Debit Card/
Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000€/purchase, 20,000€/mo",supportPage:"https://support.banxa.com",minOrderValue:20,maxOrderValue:15e3,validCurrencies:G(U.BANXA),validCryptoCurrenciesByChain:{[B.MAINNET]:[{value:"ETH",display:"ETH"},{value:"DAI",display:"DAI"},{value:"MKR",display:"MKR"},{value:"USDT",display:"USDT"},{value:"BUSD",display:"BUSD"},{value:"USDC",display:"USDC"},{value:"BAT",display:"BAT"},{value:"AAVE",display:"AAVE"},{value:"COMP",display:"COMP"},{value:"UNI",display:"UNI"}],[B.MATIC]:[{value:"MATIC",display:"MATIC"}]},includeFees:!0,enforceMax:!0}},K={supportedVerifierList:Object.values(k),paymentProviders:J,api:"https://api.tor.us",translations:{en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies benötigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"継続する",actionRequired:"認証が必要です",pendingAction:"続行をクリックして、ポップアップでリクエストを続行します",cookiesRequired:"必要なクッキー",enableCookies:"Torusにアクセスするには、ブラウザの設定でCookieを有効にしてください。",clickHere:"詳しくは"}},ko:{embed:{continue:"계속하다",actionRequired:"승인 필요",pendingAction:"팝업에서 요청을 진행하려면 계속을 클릭하십시오.",cookiesRequired:"쿠키 필요",enableCookies:"브라우저 환경 설정에서 쿠키를 활성화하여 Torus에 액세스하십시오.",clickHere:"더 많은 정보"}},zh:{embed:{continue:"继续",actionRequired:"需要授权",pendingAction:"单击继续以在弹出窗口中继续您的请求",cookiesRequired:"必填Cookie",enableCookies:"请在您的浏览器首选项中启用cookie以访问Torus。",clickHere:"更多信息"}}},prodTorusUrl:"",localStorageKeyPrefix:"torus-"},z=e=>{const t=window.document.createElement("template"),r=e.trim();return t.innerHTML=r,t.content.firstChild},q=(e,t,r)=>{const n=i=>{r(i),e.removeListener(t,n)};e.on(t,n)};var X=r(4063),Y=r.n(X),Z=r(4970);const Q=a().getLogger("torus-embed"),ee={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",sendSiteMetadata:()=>"Torus: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:(e,t)=>`Invalid options. Received: { maxEventListeners: ${e}, shouldSendMetadata: ${t} }`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`Torus: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:'Torus: ""ethereum.enable()" is deprecated and may be removed in the future. Please use "ethereum.send("eth_requestAccounts")" instead. For more information, see: https://eips.ethereum.org/EIPS/eip-1102',sendDeprecation:'Torus: "ethereum.send(...)" is deprecated and may be removed in the future. Please use "ethereum.sendAsync(...)" or "ethereum.request(...)" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',events:{close:'Torus: The event "close" is deprecated and may be removed in the future. Please use "disconnect" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',data:'Torus: The event "data" is deprecated and will be removed in the future.Use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message',networkChanged:'Torus: The event "networkChanged" is deprecated and may be removed in the future. Please use "chainChanged" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',notification:'Torus: The event "notification" is deprecated and may be removed in the future. Please use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193'},publicConfigStore:'Torus: The property "publicConfigStore" is deprecated and WILL be removed in the future.'}};function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var r=1;rthis.push(e),this.obsStore=e,this.obsStore.subscribe(this.handler)}pipe(e,t){const r=super.pipe(e,t);return e.write(this.obsStore.getState()),r}_write(e,t,r){this.obsStore.putState(e),r()}_read(e){}_destroy(e,t){this.obsStore.unsubscribe(this.handler),super._destroy(e,t)}}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var r=1;r0&&r.emit("error",n)}const ue=()=>Math.random().toString(36).slice(2),ce=async(e,t)=>{let r,n;const i="2.2.5";let o=t.version||i;try{if(("binance"===e||"production"===e)&&!t.version){let e;e=K.prodTorusUrl?{data:K.prodTorusUrl}:await f(`${K.api}/latestversion?name=@toruslabs/torus-embed&version=${i}`,{},{useAPIKey:!0}),o=e.data,K.prodTorusUrl=e.data}}catch(e){Q.error(e,"unable to fetch latest version")}switch(Q.info("version used: ",o),e){case"binance":r=`https://binance.tor.us/v${o}`,n="info";break;case"testing":r="https://testing.tor.us",n="debug";break;case"bnb":r="https://bnb.tor.us",n="error";break;case"polygon":r="https://polygon.tor.us",n="error";break;case"lrc":r="https://lrc.tor.us",n="debug";break;case"beta":r="https://beta.tor.us",n="debug";break;case"development":r="http://localhost:4050",n="debug";break;case"alpha":r="https://alpha.tor.us",n="debug";break;default:r=`https://app.tor.us/v${o}`,n="error"}return{torusUrl:r,logLevel:n}},de=()=>{let e=window.navigator.language||"en-US";const t=e.split("-");return e=Object.prototype.hasOwnProperty.call(K.translations,t[0])?t[0]:"en",e},fe=["eth_subscription"],he=()=>{},pe="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=660,width=375",ge="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=450";function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var r=1;r2&&void 0!==arguments[2])||arguments[2];return(n,i)=>n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)};class we extends O{constructor(e){let{maxEventListeners:r=100,shouldSendMetadata:n=!0,jsonRpcStreamName:i="provider"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(super(),t(this,"chainId",void 0),t(this,"selectedAddress",void 0),t(this,"_rpcEngine",void 0),t(this,"networkVersion",void 0),t(this,"shouldSendMetadata",void 0),t(this,"isTorus",void 0),t(this,"_publicConfigStore",void 0),t(this,"tryPreopenHandle",void 0),t(this,"enable",void 0),t(this,"_state",void 0),t(this,"_jsonRpcConnection",void 0),t(this,"_sentWarnings",{enable:!1,experimentalMethods:!1,send:!1,publicConfigStore:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}}),!(0,Z.duplex)(e))throw new Error(ee.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(r),this._state=be({},we._defaultState),this.selectedAddress=null,this.networkVersion=null,this.chainId=null,this.shouldSendMetadata=n,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._sendSync=this._sendSync.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this);const o=new j;var s;S()(e,o,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._publicConfigStore=new ne({storageKey:"Metamask-Config"}),S()(o.createStream("publicConfig"),(s=this._publicConfigStore,new ie(s)),le.bind(this,"MetaMask PublicConfigStore")),o.ignoreStream("phishing"),this.on("connect",(()=>{this._state.isConnected=!0}));const a=function(){const e={},t=new O,r=new h.Duplex({objectMode:!0,read:function(){return!1},write:function(r,n,i){let o;try{r.id?function(t){const r=e[t.id];if(!r)throw new Error(`StreamMiddleware - Unknown response id "${t.id}"`);delete e[t.id],Object.assign(r.res,t),setTimeout(r.end)}(r):function(e){t.emit("notification",e)}(r)}catch(e){o=e}i(o)}});return{events:t,middleware:(t,n,i,o)=>{r.push(t),e[t.id]={req:t,res:n,next:i,end:o}},stream:r}}();S()(a.stream,o.createStream(i),a.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider"));const l=new P;l.push(((e,t,r,n)=>{const i=e.id,o=Math.random().toString(36).slice(2);e.id=o,t.id=o,r((r=>{e.id=i,t.id=i,r()}))})),l.push(((e,t,r)=>{"string"==typeof e.method&&e.method||(t.error=b.PY.invalidRequest({message:"The request 'method' must be a non-empty string.",data:se(se({},e||{}),{},{cause:"The request 'method' must be a non-empty string."})})),r((e=>{const{error:r}=t;return r?(Q.error(`MetaMask - RPC Error: ${r.message}`,r),e()):e()}))})),l.push(a.middleware),this._rpcEngine=l,a.events.on("notification",(e=>{const{method:t,params:r}=e;"wallet_accountsChanged"===t?this._handleAccountsChanged(r):"wallet_unlockStateChanged"===t?this._handleUnlockStateChanged(r):"wallet_chainChanged"===t?this._handleChainChanged(r):fe.includes(e.method)&&(this.emit("data",e),this.emit("notification",r.result),this.emit("message",{type:t,data:r}))}))}get publicConfigStore(){return this._sentWarnings.publicConfigStore||(Q.warn(ee.warnings.publicConfigStore),this._sentWarnings.publicConfigStore=!0),this._publicConfigStore}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw b.PY.invalidRequest({message:ee.errors.invalidRequestArgs(),data:be(be({},e||{}),{},{cause:ee.errors.invalidRequestArgs()})});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw b.PY.invalidRequest({message:ee.errors.invalidRequestMethod(),data:be(be({},e||{}),{},{cause:ee.errors.invalidRequestArgs()})});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw b.PY.invalidRequest({message:ee.errors.invalidRequestParams(),data:be(be({},e||{}),{},{cause:ee.errors.invalidRequestArgs()})});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},me(e,n))}))}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}async _initializeState(){try{const{accounts:e,chainId:t,isUnlocked:r,networkVersion:n}=await this.request({method:"wallet_getProviderState"});this.emit("connect",{chainId:t}),this._handleChainChanged({chainId:t,networkVersion:n}),this._handleUnlockStateChanged({accounts:e,isUnlocked:r}),this._handleAccountsChanged(e)}catch(e){Q.error("MetaMask: Failed to get initial state. Please report this bug.",e)}finally{Q.info("initialized state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t;const i=e;if(!Array.isArray(i))if(i.jsonrpc||(i.jsonrpc="2.0"),"eth_accounts"===i.method||"eth_requestAccounts"===i.method)n=(e,n)=>{this._handleAccountsChanged(n.result||[],"eth_accounts"===i.method,r),t(e,n)};else if("wallet_getProviderState"===i.method)return void this._rpcEngine.handle(e,n);this.tryPreopenHandle(i,n)}send(e,t){return this._sentWarnings.send||(Q.warn(ee.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},me(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(e,he),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(ee.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),Q.debug(ee.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new b.yd(1013,t||ee.errors.disconnected()),Q.debug(r)):(r=new b.yd(1011,t||ee.errors.permanentlyDisconnected()),Q.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleStreamDisconnect(e,t){le(e,t,this),this._handleDisconnect(!1,t?t.message:void 0)}_handleAccountsChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e;Array.isArray(n)||(Q.error("MetaMask: Received non-array accounts parameter. Please report this bug.",n),n=[]);for(const t of e)if("string"!=typeof t){Q.error("MetaMask: Received non-string account. Please report this bug.",e),n=[];break}Y()(this._state.accounts,n)||(t&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!r&&Q.error('MetaMask: "eth_accounts" unexpectedly updated accounts. Please report this bug.',n),this._state.accounts=n,this.emit("accountsChanged",n)),this.selectedAddress!==n[0]&&(this.selectedAddress=n[0]||null)}_handleChainChanged(){let{chainId:e,networkVersion:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&t?"loading"===t?this._handleDisconnect(!0):(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):Q.error("MetaMask: Received invalid network parameters. Please report this bug.",{chainId:e,networkVersion:t})}_handleUnlockStateChanged(){let{accounts:e,isUnlocked:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):Q.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:t})}_warnOfDeprecation(e){!1===this._sentWarnings.events[e]&&(Q.warn(ee.warnings.events[e]),this._sentWarnings.events[e]=!0)}}t(we,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});const ve=we;class _e extends p.EventEmitter{constructor(e){let{url:r,target:n,features:i}=e;super(),t(this,"url",void 0),t(this,"target",void 0),t(this,"features",void 0),t(this,"window",void 0),t(this,"windowTimer",void 0),t(this,"iClosedWindow",void 0),this.url=r,this.target=n||"_blank",this.features=i||function(){const e=void 0!==window.screenLeft?window.screenLeft:window.screenX,t=void 0!==window.screenTop?window.screenTop:window.screenY,r=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,n=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,i=Math.abs((r-1200)/2/1+e);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=1200,top=${Math.abs((n-700)/2/1+t)},left=${i}`}(),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval((()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),void 0===this.window&&clearInterval(this.windowTimer)}),500))}open(){var e;this.window=window.open(this.url.href,this.target,this.features),null!==(e=this.window)&&void 0!==e&&e.focus&&this.window.focus()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(e){e?window.location.replace(this.url.href):window.location.href=this.url.href}}const Ee=_e;function Se(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}const Re=e=>{const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:e.location.hostname};async function Ae(e){const{document:t}=e;let r=t.querySelector('head > link[rel="shortcut icon"]');return r&&await Se(r.href)?r.href:(r=Array.from(t.querySelectorAll('head > link[rel="icon"]')).find((e=>Boolean(e.href))),r&&await Se(r.href)?r.href:null)}var Ie=r(8764).Buffer;const Te=["host","chainId","networkName"];function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{};t(this,"buttonPosition",W.BOTTOM_LEFT),t(this,"buttonSize",void 0),t(this,"torusUrl",void 0),t(this,"torusIframe",void 0),t(this,"styleLink",void 0),t(this,"isLoggedIn",void 0),t(this,"isInitialized",void 0),t(this,"torusWidgetVisibility",void 0),t(this,"torusAlert",void 0),t(this,"apiKey",void 0),t(this,"modalZIndex",void 0),t(this,"alertZIndex",void 0),t(this,"torusAlertContainer",void 0),t(this,"isIframeFullScreen",void 0),t(this,"whiteLabel",void 0),t(this,"requestedVerifier",void 0),t(this,"currentVerifier",void 0),t(this,"embedTranslations",void 0),t(this,"ethereum",void 0),t(this,"provider",void 0),t(this,"communicationMux",void 0),t(this,"isLoginCallback",void 0),t(this,"paymentProviders",K.paymentProviders),t(this,"loginHint",""),t(this,"useWalletConnect",void 0),t(this,"isCustomLogin",!1),this.buttonPosition=e,this.buttonSize=r,this.torusUrl="",this.isLoggedIn=!1,this.isInitialized=!1,this.torusWidgetVisibility=!0,this.requestedVerifier="",this.currentVerifier="",this.apiKey=i,function(e){d=e}(i),this.modalZIndex=n,this.alertZIndex=n+1e3,this.isIframeFullScreen=!1}async init(){let{buildEnv:e=F.PRODUCTION,enableLogging:t=!1,network:r={host:"mainnet",chainId:null,networkName:"",blockExplorer:"",ticker:"",tickerName:""},loginConfig:n={},showTorusButton:i=!0,integrity:s={version:""},whiteLabel:a,useWalletConnect:l=!1,mfaLevel:u="default"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");const{torusUrl:c,logLevel:d}=await ce(e,s);Q.info(c,"url loaded"),this.torusUrl=c,this.whiteLabel=a,this.useWalletConnect=l,this.isCustomLogin=!!(n&&Object.keys(n).length>0)||!!(a&&Object.keys(a).length>0),Q.setDefaultLevel(d),t?Q.enableAll():Q.disableAll(),this.torusWidgetVisibility=i;const f=new URL(c);f.pathname.endsWith("/")?f.pathname+="popup":f.pathname+="/popup",f.hash=`#isCustomLogin=${this.isCustomLogin}`,this.torusIframe=z(`