(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{5399:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvPrefix=e.ConsoleText=e.ConsoleColor=void 0,function(t){t.Reset="\x1b[0m",t.Cyan="\x1b[36m",t.Red="\x1b[31m",t.Green="\x1b[32m"}(e.ConsoleColor||(e.ConsoleColor={})),function(t){t.ErrorTitle="\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:"}(e.ConsoleText||(e.ConsoleText={})),function(t){t.App="APP_"}(e.EnvPrefix||(e.EnvPrefix={}))},2247:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envBoolean=e.envNumber=e.envString=e.envEnum=void 0;var n=r(5399);e.envEnum=function(t,e,r){return function(){if("string"===typeof t&&Object.values(e).includes(t))return t;if("string"===typeof r&&Object.values(e).includes(r))return r;throw new Error("".concat(n.ConsoleColor.Green,"\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c").concat(n.ConsoleColor.Reset," - \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 ").concat(Object.values(e)," | ").concat(n.ConsoleColor.Red,"\u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438").concat(n.ConsoleColor.Reset," - ").concat(t))}},e.envString=function(t,e){return function(){if("string"===typeof t&&""!==t)return t;if("string"===typeof e&&""!==e)return e;throw new Error("".concat(n.ConsoleColor.Green,"\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c").concat(n.ConsoleColor.Reset," - \u0442\u0438\u043f String | ").concat(n.ConsoleColor.Red,"\u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438").concat(n.ConsoleColor.Reset," - ").concat(typeof t))}},e.envNumber=function(t,e){return function(){if(("string"===typeof t||"number"===typeof t)&&!Number.isNaN(Number(t)))return Number(t);if("number"===typeof e&&!Number.isNaN(e))return e;throw new Error("".concat(n.ConsoleColor.Green,"\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c").concat(n.ConsoleColor.Reset," - \u0442\u0438\u043f Number | ").concat(n.ConsoleColor.Red,"\u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438").concat(n.ConsoleColor.Reset," - ").concat(typeof t))}},e.envBoolean=function(t,e){return function(){if("true"===t)return!0;if("false"===t)return!1;if("boolean"===typeof t)return t;if("boolean"===typeof e)return e;throw new Error("".concat(n.ConsoleColor.Green,"\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c").concat(n.ConsoleColor.Reset," - \u0442\u0438\u043f Boolean | ").concat(n.ConsoleColor.Red,"\u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438").concat(n.ConsoleColor.Reset," - ").concat(typeof t))}}},2285:function(t,e,r){"use strict";var n=r(9135);Object.defineProperty(e,"__esModule",{value:!0}),e.createEmptyOrInvalidEnvsErrorLog=void 0;var i=r(5399);function o(t){var e=n(t,2),r=e[0],o=e[1];return"".concat(i.ConsoleColor.Cyan).concat(r,": ").concat(o).concat(i.ConsoleColor.Reset)}e.createEmptyOrInvalidEnvsErrorLog=function(t){return["\n",i.ConsoleText.ErrorTitle,Object.entries(t).map(o).join("\n"),"\n"].join("\n")}},3883:function(t,e,r){"use strict";var n=r(2907);Object.defineProperty(e,"__esModule",{value:!0}),e.validateAndCreate=void 0;var i=r(5399),o=r(2285);e.validateAndCreate=function(t){var e={},r={};for(var a in t)try{if(!a.startsWith(i.EnvPrefix.App))throw new Error("\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 ".concat(i.EnvPrefix.App));var s=t[a]();r[a]=s}catch(u){u instanceof Error&&(e[a]=u.message)}if(Object.keys(e).length){var c=o.createEmptyOrInvalidEnvsErrorLog(e);if("undefined"!==typeof window)throw console.error(c),new Error(c);console.error(c),n.exit(1)}return r}},2193:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(3883),e),i(r(2285),e),i(r(2247),e),i(r(5399),e),i(r(6643),e)},6643:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},9821:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMimeTypesList=e.defaultPwa=e.defaultSocial=e.defaultReferrerPolicy=e.defaultColorScheme=e.defaultThemeColor=e.defaultViewport=e.defaultFaviconUrl=void 0,e.defaultFaviconUrl="/static/common/favicon.png",e.defaultViewport="width=device-width, initial-scale=1",e.defaultThemeColor="#ffdd2d",e.defaultColorScheme="light only",e.defaultReferrerPolicy="strict-origin",e.defaultSocial={siteName:"\u0422-\u0411\u0430\u043d\u043a",siteTwitter:"https://\u0445.com/tbank_ru",type:"website",locale:"ru_RU",cardTwitter:"summary_large_image",appIdVk:"VK-RTRG-218928-gWfNz"},e.defaultPwa={manifest:"/manifest.json",serviceWorker:"/sw.js",icons:[{href:"https://tbank.ru/apple-touch-icon-57x57.png",rel:"apple-touch-icon",sizes:"57x57"},{href:"https://tbank.ru/apple-touch-icon-60x60.png",rel:"apple-touch-icon",sizes:"60x60"},{href:"https://tbank.ru/apple-touch-icon-72x72.png",rel:"apple-touch-icon",sizes:"72x72"},{href:"https://tbank.ru/apple-touch-icon-76x76.png",rel:"apple-touch-icon",sizes:"76x76"},{href:"https://tbank.ru/apple-touch-icon-114x114.png",rel:"apple-touch-icon",sizes:"114x114"},{href:"https://tbank.ru/apple-touch-icon-120x120.png",rel:"apple-touch-icon",sizes:"120x120"},{href:"https://tbank.ru/apple-touch-icon-144x144.png",rel:"apple-touch-icon",sizes:"144x144"},{href:"https://tbank.ru/apple-touch-icon-152x152.png",rel:"apple-touch-icon",sizes:"152x152"},{href:"https://tbank.ru/apple-touch-icon-180x180.png",rel:"apple-touch-icon",sizes:"180x180"},{href:"https://tbank.ru/android-chrome-192x192.png",rel:"android-touch-icon",sizes:"192x192",type:"image/png"},{href:"https://tbank.ru/favicon-16x16.png",rel:"icon",sizes:"16x16"},{href:"https://tbank.ru/favicon-16x16.png",rel:"icon",sizes:"16x16"},{href:"https://tbank.ru/favicon-32x32.png",rel:"icon",sizes:"32x32"},{href:"https://tbank.ru/favicon-96x96.png",rel:"icon",sizes:"96x96"},{rel:"icon",type:"image/png",href:"https://tbank.ru/android-chrome-192x192.png",sizes:"192x192"},{rel:"icon",href:"https://static.tinkoff.ru/dist/portal-new/images/favicon.ico",type:"image/x-icon"},{rel:"mask-icon",href:"https://tbank.ru/safari-pinned-tab.svg",color:"#333333"}]},function(t){t.eot="application/vnd.ms-fontobject",t.otf="font/otf",t.ttf="font/ttf",t.woff="font/woff",t.woff2="font/woff2"}(e.FontMimeTypesList||(e.FontMimeTypesList={}))},6980:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(9821),e),i(r(2794),e),i(r(3510),e)},3510:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2794:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadProject=void 0;var i=n(r(5470)),o=r(9821),a=r(8302);e.HeadProject=function(t){var e,r=t.title,n=t.cdnUrl,s=t.description,c=t.relativeFaviconPath,u=t.pwa,f=t.fonts,l=t.canonical,h=t.keywords,d=t.social,p=t.colorScheme,b=t.themeColor,y=t.viewport,v=t.wrapper,g=t.referrerPolicy,m=t.preload,w=t.formatDetection,_=t.verification,S=null!==u&&void 0!==u?u:o.defaultPwa,E=null!==p&&void 0!==p?p:o.defaultColorScheme,A=null!==b&&void 0!==b?b:o.defaultThemeColor,k=Object.assign(Object.assign({},d),o.defaultSocial),M="".concat(a.getCdnUrlWithoutSlashAtTheEnd(n)).concat(null!==c&&void 0!==c?c:o.defaultFaviconUrl),x=function(t,e){return i.default.createElement("link",Object.assign({key:e},t))},R=function(t){return i.default.createElement("link",{rel:"preload",href:t.href,type:t.type,as:"font"})},O=function(t){return i.default.createElement("link",{rel:"preload",href:t,as:"image"})};return i.default.createElement(v,null,i.default.createElement("meta",{charSet:"utf-8"}),i.default.createElement("meta",{name:"referrer",content:null!==g&&void 0!==g?g:o.defaultReferrerPolicy}),i.default.createElement("meta",{name:"viewport",content:null!==y&&void 0!==y?y:o.defaultViewport}),i.default.createElement("title",null,r),i.default.createElement("meta",{name:"description",content:s}),(null===h||void 0===h?void 0:h.length)&&i.default.createElement("meta",{name:"keywords",content:h.join(", ")}),i.default.createElement("link",{rel:"icon",href:M}),l&&i.default.createElement("link",{rel:"canonical",href:l}),w&&i.default.createElement("meta",{name:"format-detection",content:w}),"object"===typeof m&&function(t){var e,r;return i.default.createElement(i.default.Fragment,null,null===(e=null===t||void 0===t?void 0:t.fonts)||void 0===e?void 0:e.map(R),null===(r=null===t||void 0===t?void 0:t.images)||void 0===r?void 0:r.map(O))}(m),i.default.createElement("meta",{name:"color-scheme",content:E}),i.default.createElement("meta",{name:"theme-color",content:A}),"object"===typeof S&&function(t){var e=t.manifest,r=t.serviceWorker,n=t.icons;return i.default.createElement(i.default.Fragment,null,i.default.createElement("link",{rel:"manifest",href:e}),n.map(x),i.default.createElement("script",{dangerouslySetInnerHTML:{__html:a.createRegisterServiceWorkerScript(r)}}))}(S),Array.isArray(f)&&function(t){return i.default.createElement(i.default.Fragment,null,t.map((function(t,e){return i.default.createElement("link",{key:e,href:t,rel:"preconnect"})})),t.map((function(t,e){return i.default.createElement("link",{key:e,href:t,rel:"stylesheet"})})))}(f),i.default.createElement("meta",{property:"og:title",content:k.title}),i.default.createElement("meta",{property:"og:description",content:k.description}),i.default.createElement("meta",{property:"og:image",content:k.image}),i.default.createElement("meta",{property:"og:image:alt",content:k.imageAlt}),i.default.createElement("meta",{property:"og:url",content:k.url}),i.default.createElement("meta",{property:"og:site_name",content:k.siteName}),i.default.createElement("meta",{property:"og:type",content:k.type}),i.default.createElement("meta",{property:"og:locale",content:k.locale}),i.default.createElement("meta",{property:"vk:image",content:k.imageVk}),i.default.createElement("meta",{name:"twitter:title",content:k.title}),i.default.createElement("meta",{name:"twitter:description",content:k.description}),i.default.createElement("meta",{name:"twitter:image",content:k.imageTwitter}),i.default.createElement("meta",{name:"twitter:image:alt",content:k.imageAltTwitter}),i.default.createElement("meta",{name:"twitter:site",content:k.siteTwitter}),i.default.createElement("meta",{name:"twitter:card",content:k.cardTwitter}),i.default.createElement("meta",{property:"fb:app_id",content:k.appIdFb}),k.appIdVk&&(e=k.appIdVk,i.default.createElement(i.default.Fragment,null,i.default.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:a.createVkPixelSnippet(e)}}),i.default.createElement("noscript",null,i.default.createElement("img",{src:"https://vk.com/rtrg?p=".concat(k.appIdVk),style:{position:"fixed",left:"-999px"},alt:""})))),(null===_||void 0===_?void 0:_.yandex)&&i.default.createElement("meta",{name:"yandex-verification",content:_.yandex}),(null===_||void 0===_?void 0:_.google)&&i.default.createElement("meta",{name:"google-site-verification",content:_.google}))}},8302:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCdnUrlWithoutSlashAtTheEnd=e.createVkPixelSnippet=e.createRegisterServiceWorkerScript=void 0,e.createRegisterServiceWorkerScript=function(t){return"if (typeof window !== 'undefined') {\n window.addEventListener('load', function() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.register('".concat(t,"').catch(console.error);\n }\n });\n }")},e.createVkPixelSnippet=function(t){return'\n !function(){\n var t = document.createElement("script");\n t.type="text/javascript",\n t.async=!0,\n t.src="https://vk.com/js/api/openapi.js?162",\n t.onload = function() {\n var VK = window.VK;\n if (!VK) return;\n VK.Retargeting.Init("'.concat(t,'"),\n VK.Retargeting.Hit()\n },document.head.appendChild(t)}();\n ')};e.getCdnUrlWithoutSlashAtTheEnd=function(t){return"/"!==t[t.length-1]?t:t.slice(0,-1)}},0:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.STARTUP_HANDLER_INITIALIZATION_ERROR_MESSAGE=e.STARTUP_HANDLER_UNDEFINED_ERROR_MESSAGE=e.BASE_URL_EXTRACT_ERROR=e.SYNTAX_ERROR=e.NETWORK_ERROR_MESSAGE=e.REQUEST_ERROR_MESSAGE=e.RESPONSE_OK_STATUS=e.HEALTH_CHECK_SUCCESS_CODE=e.GET_HTTP_METHOD=e.defaultPropValues=e.baseStyles=void 0,e.baseStyles={documentBody:{display:"block",margin:0,padding:0,fontFamily:"'Open Sans', 'Segoe UI', '-apple-system', 'Roboto', 'Helvetica', 'Arial', sans-serif"},overlay:{position:"fixed",left:0,top:0,bottom:0,right:0,background:"#000",zIndex:999999},modal:{background:"#000",color:"#fff",overflow:"hidden",boxSizing:"border-box",padding:"32px 20px",width:"calc(100vw - 2 * 10px)",maxWidth:"500px",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",borderRadius:"30px",maxHeight:"calc(100vh - 69px * 2)",display:"flex",flexDirection:"column",zIndex:2,fontWeight:400,fontSize:"16px",lineHeight:"25px",textAlign:"center",whiteSpace:"break-spaces"},body:{display:"flex",flexDirection:"column",alignItems:"center"},title:{fontWeight:700,fontSize:"20px",lineHeight:"28px",color:"#fff",margin:0},description:{margin:0,marginTop:"20px"},errorInfo:{opacity:.5,fontSize:"0.9em",margin:0,marginTop:"20px"},button:{color:"#fff",background:"#000",margin:"24px auto 0",height:"40px",padding:"0 24px",boxSizing:"border-box",borderRadius:"20px",fontWeight:600,fontSize:"16px",lineHeight:"21px",display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",whiteSpace:"nowrap",width:"fit-content"}},e.defaultPropValues={staticCheckFile:"/healthz.json",errors:{staticAvailabilityError:{code:"F2998",title:"\u0427\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435\xa0\u0442\u0430\u043a",description:"\u041c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c \u043e\xa0\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0438\xa0\u0440\u0435\u0448\u0430\u0435\u043c\xa0\u0435\u0435. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u043f\u043e\u0437\u0436\u0435"},syntaxError:{code:"F2999",title:"\u0427\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435\xa0\u0442\u0430\u043a",description:"\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\xa0\u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435\xa0\u043d\u0430\u043c",buttonText:"\u0425\u043e\u0440\u043e\u0448\u043e"}}},e.GET_HTTP_METHOD="GET",e.HEALTH_CHECK_SUCCESS_CODE=200,e.RESPONSE_OK_STATUS={status:"OK"},e.REQUEST_ERROR_MESSAGE="\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435:",e.NETWORK_ERROR_MESSAGE="\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435:",e.SYNTAX_ERROR="syntaxerror",e.BASE_URL_EXTRACT_ERROR="\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0438\u0437",e.STARTUP_HANDLER_UNDEFINED_ERROR_MESSAGE="startupErrorHandler \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d",e.STARTUP_HANDLER_INITIALIZATION_ERROR_MESSAGE="\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c startupErrorHandler"},3945:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadScriptStartupErrorHandler=void 0;var i=n(r(5470)),o=r(8606),a=r(0);e.HeadScriptStartupErrorHandler=function(t){var e=t.wrapper,r=t.appStaticUrl,n=t.customStyles,s=t.errors,c=void 0===s?a.defaultPropValues.errors:s,u=t.staticCheckImage;u||(u="".concat((0,o.extractBaseUrl)(r)).concat(a.defaultPropValues.staticCheckFile));return i.default.createElement(e,null,i.default.createElement("style",{dangerouslySetInnerHTML:{__html:(0,o.generateStyles)({customStyles:n})}}),i.default.createElement("script",{src:"".concat(r,"/libs/startup-error-handler/bundle.min.js"),crossOrigin:"anonymous"}),i.default.createElement("script",{dangerouslySetInnerHTML:{__html:function(t){var e=JSON.stringify(t);return"\n if (typeof window.startupErrorHandler === 'undefined') {\n console.error('".concat(a.STARTUP_HANDLER_UNDEFINED_ERROR_MESSAGE,"');\n } else if (typeof window.startupErrorHandler.init !== 'function') {\n console.error('").concat(a.STARTUP_HANDLER_INITIALIZATION_ERROR_MESSAGE,"');\n } else {\n window.startupErrorHandler.init(").concat(e,");\n }\n ")}({staticCheckImage:u,errors:c})}}))}},3664:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadScriptStartupErrorHandler=void 0;var o=r(3945);Object.defineProperty(e,"HeadScriptStartupErrorHandler",{enumerable:!0,get:function(){return o.HeadScriptStartupErrorHandler}}),i(r(833),e)},833:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},8606:function(t,e,r){"use strict";var n=r(9135);Object.defineProperty(e,"__esModule",{value:!0}),e.generateStyles=e.isSyntaxError=e.checkUrlAccessibility=e.createMessageFromErrorInfo=e.createHTMLElement=e.extractBaseUrl=void 0;var i=r(0);e.extractBaseUrl=function(t){try{return new URL(t).origin}catch(e){return console.error("".concat(i.BASE_URL_EXTRACT_ERROR,' "').concat(t,'"')),""}};e.createHTMLElement=function(t,e,r,n){var i=document.createElement(t);return i.classList.add(r),n&&(i.innerHTML=n),e.appendChild(i),i};e.createMessageFromErrorInfo=function(t){var e=t.message;return t.filename&&(e+=" at "+t.filename),t.lineno&&(e+=":"+t.lineno),t.colno&&(e+=":"+t.colno),e};e.checkUrlAccessibility=function(t,e){var r=new XMLHttpRequest;r.open(i.GET_HTTP_METHOD,t,!0),r.onload=function(){r.status===i.HEALTH_CHECK_SUCCESS_CODE?e(!1,i.RESPONSE_OK_STATUS):e(new Error("".concat(i.REQUEST_ERROR_MESSAGE," ").concat(r.status)),i.RESPONSE_OK_STATUS)},r.onerror=function(){e(new Error(i.NETWORK_ERROR_MESSAGE),i.RESPONSE_OK_STATUS)},r.send()};e.isSyntaxError=function(t){return t.toLowerCase().includes(i.SYNTAX_ERROR)};e.generateStyles=function(t){var e=t.customStyles;return Object.entries(i.baseStyles).map((function(t){var r=n(t,2),i=r[0],o=r[1];return".".concat(i,"{").concat(a(Object.assign(Object.assign({},o),null===e||void 0===e?void 0:e[i])),"}")})).join("")};var o=new RegExp(/[A-Z]/g),a=function(t){return Object.keys(t).reduce((function(e,r){var n=r.replace(o,(function(t){return"-".concat(t.toLowerCase())})),i=t[r].toString();return"".concat(e).concat(n,":").concat(i,";")}),"")}},890:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SsoIFrameDataType=e.SSO_URLS=void 0,e.SSO_URLS=["https://id.tinkoff.ru","https://id-test.tinkoff.ru","https://id-qa.tcsbank.ru","https://id.tbank.ru","https://id-test.tbank.ru"],function(t){t.HeightChange="height-change",t.InitializedFormName="sso-initialized-form-name"}(e.SsoIFrameDataType||(e.SsoIFrameDataType={}))},2297:function(t,e,r){"use strict";var n=r(9135);Object.defineProperty(e,"__esModule",{value:!0}),e.useSsoAuthFormStep=e.SsoAuthFormStep=void 0;var i,o=r(5470),a=r(890),s=r(8776);!function(t){t.Initial="Initial",t.Confirmation="Confirmation",t.Success="Success",t.Error="Error"}(i=e.SsoAuthFormStep||(e.SsoAuthFormStep={}));e.useSsoAuthFormStep=function(){var t=o.useState(i.Initial),e=n(t,2),r=e[0],c=e[1];return o.useEffect((function(){var t=function(t){if(function(t){var e,r;if(!s.isMessageFromIdTinkoff(t.origin))return!1;if((null===(e=null===t||void 0===t?void 0:t.data)||void 0===e?void 0:e.type)!==a.SsoIFrameDataType.InitializedFormName)return!1;if("string"!==typeof(null===(r=null===t||void 0===t?void 0:t.data)||void 0===r?void 0:r.payload))return!1;return!0}(t))switch(t.data.payload){case"entry":c(i.Initial);break;case"complete":c(i.Success);break;case"error":c(i.Error);break;default:c(i.Confirmation)}};return window.addEventListener("message",t),function(){return window.removeEventListener("message",t)}}),[]),r}},8776:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMessageFromIdTinkoff=void 0;var n=r(890);e.isMessageFromIdTinkoff=function(t){return n.SSO_URLS.includes(t)}},7023:function(t,e,r){"use strict";var n=r(7048);Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractStorage=void 0;e.AbstractStorage=function t(){n(this,t)}},3285:function(t,e,r){"use strict";var n=r(7048),i=r(2117),o=r(9449),a=r(1959),s=r(5422);function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.NullStorage=void 0;var u=function(t){o(r,t);var e=c(r);function r(){return n(this,r),e.apply(this,arguments)}return i(r,[{key:"getLength",value:function(){console.error(new Error("Storage.getLength(): storage is undefined"))}},{key:"clear",value:function(){console.error(new Error("Storage.clear(): storage undefined"))}},{key:"getItem",value:function(){console.error(new Error("Storage.getItem(): storage undefined"))}},{key:"getItemObject",value:function(){console.error(new Error("Storage.getItemObject(): storage undefined"))}},{key:"key",value:function(){console.error(new Error("Storage.key(): storage undefined"))}},{key:"removeItem",value:function(){console.error(new Error("Storage.removeItem(): storage undefined"))}},{key:"setItem",value:function(){console.error(new Error("Storage.setItem(): storage undefined"))}},{key:"setItemObject",value:function(){console.error(new Error("Storage.setItemObject(): storage undefined"))}}]),r}(r(7023).AbstractStorage);e.NullStorage=u},6727:function(t,e,r){"use strict";var n=r(7048),i=r(2117),o=r(9449),a=r(1959),s=r(5422);function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.RealStorage=void 0;var u=function(t){o(r,t);var e=c(r);function r(t){var i;return n(this,r),(i=e.call(this)).storage=t.storage,i.onError=t.onError,i}return i(r,[{key:"getLength",value:function(){return this.storage.length}},{key:"clear",value:function(){return this.storage.clear()}},{key:"getItem",value:function(t){try{return this.storage.getItem(t)}catch(e){return this.onError(e),null}}},{key:"getItemObject",value:function(t){try{var e=this.getItem(t);return null!==e?JSON.parse(e):e}catch(r){return this.onError(r),null}}},{key:"key",value:function(t){return this.storage.key(t)}},{key:"removeItem",value:function(t){return this.storage.removeItem(t)}},{key:"setItem",value:function(t,e){try{this.storage.setItem(t,e)}catch(r){this.onError(r)}}},{key:"setItemObject",value:function(t,e){try{this.setItem(t,JSON.stringify(e))}catch(r){this.onError(r)}}}]),r}(r(7023).AbstractStorage);e.RealStorage=u},7603:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initSessionStorage=e.initLocalStorage=void 0;var n=r(6727),i=r(3285),o=r(2206),a=r(3933),s=r(6730),c=function(t){var e=function(e){if(t.onError)return t.onError(e);console.error(e)};if(s.isServer)return new i.NullStorage;var r=a.getWindowStorage(t.storageType,e);return r?new n.RealStorage({storage:r,onError:e}):new i.NullStorage};e.initLocalStorage=function(t){return c(Object.assign(Object.assign({},t),{storageType:o.StorageType.localStorage}))};e.initSessionStorage=function(t){return c(Object.assign(Object.assign({},t),{storageType:o.StorageType.sessionStorage}))}},6730:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isServer=void 0,e.isServer="undefined"===typeof window},391:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(2206),e),i(r(7603),e),i(r(3285),e),i(r(6727),e),i(r(7023),e)},2206:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageType=void 0,function(t){t.localStorage="localStorage",t.sessionStorage="sessionStorage"}(e.StorageType||(e.StorageType={}))},3933:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowStorage=void 0;e.getWindowStorage=function(t,e){try{var r="specialsStorageCheck";return window[t].setItem(r,"true"),window[t].removeItem(r),window[t]}catch(n){return e(n),null}}},3030:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QUERY_PARAMS_FOR_REPLACE_AFTER_LOGIN=e.INVALID_SESSION_ERROR_CODE=e.SSO_CLIENT_API_OPTIONS=e.SSO_API_OPTIONS=e.PROJECT_API_OPTIONS=e.PROJECT_USER_AUTH_OPTIONS=void 0,e.PROJECT_USER_AUTH_OPTIONS={query:{authTokenQueryName:"auth_token",completeUriQueryName:"complete_uri",postCompleteRedirectUriQueryName:"post_complete_redirect_uri"},pages:{projectLoginPage:"/auth/login"}},e.PROJECT_API_OPTIONS={userInfoUrl:"/v1/users/info",logoutUrl:"/v1/auth/logout",loginUrl:"/v1/auth/login",cookies:{authStatusCookieName:"spec_auth_status"}},e.SSO_API_OPTIONS={pingUrl:"/auth/ping",logoutUrl:"/auth/logout"},e.SSO_CLIENT_API_OPTIONS={validateUrl:"/validate",completeUrl:"/complete"},e.INVALID_SESSION_ERROR_CODE="B4001",e.QUERY_PARAMS_FOR_REPLACE_AFTER_LOGIN=["session_state","state","auth"]},7764:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(3030),e),i(r(173),e),i(r(455),e),i(r(6248),e),i(r(4830),e),i(r(2528),e),i(r(7438),e),i(r(7234),e),i(r(5915),e),i(r(7205),e),i(r(1189),e),i(r(707),e),i(r(7),e),i(r(2541),e),i(r(6772),e),i(r(8791),e),i(r(316),e),i(r(2648),e),i(r(517),e),i(r(6163),e),i(r(753),e),i(r(206),e),i(r(11),e)},707:function(t,e,r){"use strict";var n=r(9135),i=r(3857),o=r(7048),a=r(2117);function s(t,e){var r="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)){n.next=5;break}return l=t.calculateTimeToWait(e,r.delayInMs,r.timeBetweenRetryExponent),n.next=5,f.wait(l);case 5:return n.next=7,o(i({},u.IDEMPOTENCY_HEADER_KEY,h));case 7:return n.abrupt("return",n.sent);case 10:if(n.prev=10,n.t0=n.catch(0),!(eo.length-16&&(i.default.randomFillSync(o),a=0);return o.slice(a,a+=16)}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]}(t)};var o=new Uint8Array(256),a=o.length;for(var s=[],c=0;c<256;++c)s.push((c+256).toString(16).slice(1))},7709:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wait=void 0,e.wait=function(t){return new Promise((function(e){return setTimeout(e,t)}))}},6676:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoaderType=e.RequestStatus=void 0,function(t){t.Loading="loading",t.Success="success",t.Error="error"}(e.RequestStatus||(e.RequestStatus={})),function(t){t.Remote="remote",t.Local="local"}(e.LoaderType||(e.LoaderType={}))},8176:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourcesLoaderContext=void 0;var n=r(5470);e.ResourcesLoaderContext=n.createContext({})},3924:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useResourcesLoaderContext=void 0;var n=r(5470),i=r(8176);e.useResourcesLoaderContext=function(){return n.useContext(i.ResourcesLoaderContext)}},9907:function(t,e,r){"use strict";var n=r(7048),i=r(2117);Object.defineProperty(e,"__esModule",{value:!0}),e.Resources=void 0;var o=function(){function t(e){var r=e.data;n(this,t),this.data=r}return i(t,[{key:"getData",value:function(){return this.data}}]),t}();e.Resources=o},5448:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(1518),e),i(r(6676),e),i(r(9907),e),i(r(3924),e),i(r(5555),e),i(r(1147),e)},5555:function(t,e,r){"use strict";var n=r(3857),i=r(9135),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e},c=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{c(n.next(t))}catch(e){o(e)}}function s(t){try{c(n.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.ResourcesLoader=void 0;var u=s(r(5470)),f=r(6676),l=r(8176);e.ResourcesLoader=function(t){var e=function(t){var e=u.useState((function(){return t.type===f.LoaderType.Local?{status:f.RequestStatus.Success,data:t.data,error:void 0}:{status:f.RequestStatus.Loading,data:void 0,error:void 0}})),r=i(e,2),o=r[0],a=r[1],s=function(e){"function"===typeof t.onLoad&&t.onLoad(e)};t.type===f.LoaderType.Local&&s(t.data);return u.useEffect((function(){t.type===f.LoaderType.Remote&&function(t){return c(this,void 0,void 0,n.mark((function e(){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("".concat(t,"?t=").concat(Date.now()));case 2:return r=e.sent,e.next=5,r.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))}(t.url).then((function(t){s(t),a({status:f.RequestStatus.Success,data:t,error:void 0})})).catch((function(t){console.log(t),a({status:f.RequestStatus.Error,error:t,data:void 0})}))}),[]),o}(t);if(e.status===f.RequestStatus.Success)return u.default.createElement(l.ResourcesLoaderContext.Provider,{value:e.data},t.children);if(t.type===f.LoaderType.Remote){if(t.loading&&e.status===f.RequestStatus.Loading)return t.loading;if(t.error&&e.status===f.RequestStatus.Error)return t.error}return null}},1518:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1147:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createResourcesLoaderPropsRemote=e.createResourcesLoaderPropsLocal=void 0;var n=r(6676);e.createResourcesLoaderPropsLocal=function(t,e){return{type:n.LoaderType.Local,data:t,onLoad:e}},e.createResourcesLoaderPropsRemote=function(t,e){return{type:n.LoaderType.Remote,url:t,onLoad:e}}},1646:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultRedirectUri=e.SecretCodeStatus=void 0,function(t){t.Enabled="Enabled",t.Disabled="Disabled"}(e.SecretCodeStatus||(e.SecretCodeStatus={})),e.defaultRedirectUri="https://tbank.ru"},7279:function(t,e,r){"use strict";var n=r(9135),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.SecretCodeChecker=void 0;var s=a(r(5470)),c=r(9723),u=r(1646);e.SecretCodeChecker=function(t){var e=s.useState(!1),r=n(e,2),i=r[0],o=r[1];return s.useEffect((function(){if(c.isSecretCodeEnabled(t)){var e=t.getSecretCodeParams(),r=e.deps,n=e.config;if(r.localStorage.getItem(n.key)===n.code)return c.replaceSecretCodeFromQueryString(n,r),o(!0);if(new URLSearchParams(r.window.location.search).get(n.key)===n.code)return c.saveSecretCodeToLocalStorage(n,r),c.replaceSecretCodeFromQueryString(n,r),o(!0);r.window.location.href=n.redirectUrl||u.defaultRedirectUri}}),[t]),c.isSecretCodeEnabled(t)?i?s.default.createElement(s.default.Fragment,null,t.children):null:s.default.createElement(s.default.Fragment,null,t.children)}},6142:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(7279),e),i(r(1646),e),i(r(8664),e),i(r(9723),e)},8664:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},9723:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSecretCodePropsDisabled=e.createSecretCodePropsEnabled=e.saveSecretCodeToLocalStorage=e.replaceSecretCodeFromQueryString=e.isSecretCodeEnabled=void 0;var n=r(1646);e.isSecretCodeEnabled=function(t){return t.status===n.SecretCodeStatus.Enabled},e.replaceSecretCodeFromQueryString=function(t,e){var r=e.window,n=e.shallowUrlReplace,i=new URL(r.location.href);i.searchParams.has(t.key)&&(i.searchParams.delete(t.key),n?n(i):r.history.replaceState(null,document.title,i.toString()))},e.saveSecretCodeToLocalStorage=function(t,e){e.localStorage.setItem(t.key,t.code)},e.createSecretCodePropsEnabled=function(t){return{status:n.SecretCodeStatus.Enabled,getSecretCodeParams:t}},e.createSecretCodePropsDisabled=function(){return{status:n.SecretCodeStatus.Disabled}}},44:function(t,e){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Severity=e.MASKED_PARAMS_SENTRY_LOGS=void 0,e.MASKED_PARAMS_SENTRY_LOGS=["token","sessionid","sessionId","state","session_state","code"],function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(r||(e.Severity=r={}))},7321:function(t,e,r){"use strict";var n=r(7048),i=r(2117);Object.defineProperty(e,"__esModule",{value:!0}),e.SentryBrowser=void 0;var o=r(1015),a=r(44),s=function(){function t(e,r){var i=this;n(this,t),this.sentry=e,this.payloadFormatter=r,this.captureException=function(t){var e=t.trackingId,r=t.error,n=t.message,o=t.payload,s=t.isMaskingDisabled,c=s?o:i.payloadFormatter.mask({payload:o,privateKeys:i.privateKeys});return i.sentry.configureScope((function(t){t.setLevel(a.Severity.Error),t.setExtras({error:r||new Error(n),trackingId:e,message:n,payload:c,isMaskingDisabled:s})})),i.sentry.captureEvent({message:n})},this.captureEvent=function(t){var e=t.trackingId,r=t.message,n=t.payload,o=t.isMaskingDisabled,s=o?n:i.payloadFormatter.mask({payload:n,privateKeys:i.privateKeys});return i.sentry.configureScope((function(t){t.setLevel(a.Severity.Info),t.setExtras({trackingId:e,message:r,payload:s,isMaskingDisabled:o})})),i.sentry.captureEvent({message:r})},this.captureExceptionAndThrowError=function(t,e){throw i.captureException({message:t,error:e}),e},this.createCaptureExceptionAndThrowError=function(t){return function(e){return i.captureExceptionAndThrowError(t,e)}}}return i(t,[{key:"init",value:function(t){var e=t.sentryOptions,r=t.privateKeys,n=void 0===r?a.MASKED_PARAMS_SENTRY_LOGS:r;this.privateKeys=n,this.sentry.init(Object.assign(Object.assign({},e),{beforeSend:this.beforeSendPrepare()}))}},{key:"beforeSendPrepare",value:function(){var t=this;return function(e){var r;return(null===(r=e.extra)||void 0===r?void 0:r.isMaskingDisabled)?e:t.payloadFormatter.mask({payload:e,privateKeys:t.privateKeys})}}}],[{key:"getRealOrFake",value:function(t){return t.sentryBrowser?t.sentryBrowser:new o.SentryBrowserFake}}]),t}();e.SentryBrowser=s},4437:function(t,e,r){"use strict";var n=r(7048);Object.defineProperty(e,"__esModule",{value:!0}),e.SentryBrowserAbstract=void 0;e.SentryBrowserAbstract=function t(){n(this,t)}},1015:function(t,e,r){"use strict";var n=r(7048);Object.defineProperty(e,"__esModule",{value:!0}),e.SentryBrowserFake=void 0;e.SentryBrowserFake=function t(){n(this,t),this.init=function(t){console.error("SentryBrowser init not implemented")},this.captureException=function(t){return console.error("SentryBrowser captureException not implemented"),null},this.captureEvent=function(t){return console.error("SentryBrowser captureEvent not implemented"),null},this.captureExceptionAndThrowError=function(t,e){console.error("SentryBrowser captureExceptionAndThrowError not implemented")},this.createCaptureExceptionAndThrowError=function(t){console.error("SentryBrowser createCaptureExceptionAndThrowError not implemented")}}},3014:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadScriptSentryBrowser=void 0;var i=n(r(5470));function o(t){var e=JSON.stringify(t);return"\n if (typeof window.sentryBrowser === 'undefined') {\n console.error('sentryBrowser \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d');\n } else if (typeof window.sentryBrowser.init !== 'function') {\n console.error('\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c sentryBrowser');\n } else {\n window.sentryBrowser.init(".concat(e,");\n }\n ")}e.HeadScriptSentryBrowser=function(t){var e=t.wrapper,r=t.appStaticUrl,n=t.sentryBrowserParams;return i.default.createElement(e,null,i.default.createElement("script",{src:"".concat(r,"/libs/sentry-browser/bundle.min.js"),crossOrigin:"anonymous"}),i.default.createElement("script",{dangerouslySetInnerHTML:{__html:o(n)}}))}},2516:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(3014),e),i(r(7321),e),i(r(4437),e),i(r(44),e),i(r(2268),e)},2268:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},604:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENT_FAILURE_NAME=e.EVENTEA_PROJECT=e.PRODUCT_CATEGORY=e.TRACKING_STATE_PARAMS_TO_COOKIE=e.CookieKey=e.PARAM_NOT_INIT=e.IS_SERVER=e.TINKOFF_WEB_TRACKING_URL=void 0,e.TINKOFF_WEB_TRACKING_URL="https://acdn.t-static.ru/twa/v5/bundles/generic/client.js?container=sub_modules&ttm=tinkoff-pwa_special-projects",e.IS_SERVER="undefined"===typeof window,e.PARAM_NOT_INIT="noInit",function(t){t.Referer="spec_app_referer",t.Payload="spec_app_payload"}(e.CookieKey||(e.CookieKey={})),e.TRACKING_STATE_PARAMS_TO_COOKIE=["wuid","wuidVisitNum"],e.PRODUCT_CATEGORY="Specprojects",e.EVENTEA_PROJECT="special-projects",e.EVENT_FAILURE_NAME="web-tracker-download-failed"},7619:function(t,e,r){"use strict";var n=r(7048);Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTracking=void 0;e.AbstractTracking=function t(){n(this,t)}},7009:function(t,e,r){"use strict";var n=r(7048),i=r(2117);Object.defineProperty(e,"__esModule",{value:!0}),e.NullTracking=void 0;var o=function(){function t(){var e=this;n(this,t),this.sendEvent=function(){e.showError()},this.updateLocation=function(){e.showError()}}return i(t,[{key:"saveTrackingStateToCookie",value:function(){this.showError()}},{key:"subscribeTrackingPageLoad",value:function(){this.showError()}},{key:"subscribeTrackingFailure",value:function(){this.showError()}},{key:"setSsoId",value:function(){this.showError()}},{key:"updatePersonalizedLandingMetrics",value:function(){this.showError()}},{key:"showError",value:function(){console.error(new Error("\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c @tinkoff/web-tracking \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435"))}}]),t}();e.NullTracking=o},3949:function(t,e,r){"use strict";var n=r(9135),i=r(7048),o=r(2117),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RealTracking=void 0;var s=a(r(9945)),c=r(8549),u=r(604),f=r(5511),l=function(){function t(e){var r=this;i(this,t),this.sendEvent=function(t,e){e&&r.tracking.extend(e),r.eventea.send({project:u.EVENTEA_PROJECT,event:t,payload:e})},this.updateLocation=function(){r.tracking.updateLocation()},this.subscribeTrackingPageLoad=function(t){if(r.hasTrackingStateAlreadyInitialized())t();else{window.addEventListener("pageLoad",(function e(){window.removeEventListener("pageLoad",e),t()}))}};var n=new s.default;n.resolve(c.getTracking()),this.tracking=n,this.eventea=new f.EventeaQueue,this.eventeaStatistQueue=new f.EventeaStatistQueue,this.props=e||{}}return o(t,[{key:"subscribeTrackingFailure",value:function(t){if(window.webTrackingDownloadScriptFailed)t();else{window.addEventListener(u.EVENT_FAILURE_NAME,(function e(){window.removeEventListener(u.EVENT_FAILURE_NAME,e),t()}))}}},{key:"saveTrackingStateToCookie",value:function(){var t=new URLSearchParams;u.TRACKING_STATE_PARAMS_TO_COOKIE.forEach((function(e){var r,n,i;t.append(e,(null===(i=null===(n=null===(r=window.tracking)||void 0===r?void 0:r.state)||void 0===n?void 0:n[e])||void 0===i?void 0:i.toString())||u.PARAM_NOT_INIT)})),document.cookie="".concat(this.props.appRefererCookieName||u.CookieKey.Referer,"=").concat(window.location.href,";path=/"),document.cookie="".concat(this.props.appPayloadCookieName||u.CookieKey.Payload,"=").concat(t.toString(),";path=/")}},{key:"setSsoId",value:function(t){this.eventeaStatistQueue.updateClientParameters({ssoId:t})}},{key:"updatePersonalizedLandingMetrics",value:function(t){var e,r=null===(e=window.tracking)||void 0===e?void 0:e.state;r&&(r.personalizedLandingMetrics={state:{}},Object.entries(t).forEach((function(t){var e=n(t,2),i=e[0],o=e[1];r.personalizedLandingMetrics.state[i]=o})))}},{key:"hasTrackingStateAlreadyInitialized",value:function(){var t,e=null===(t=window.tracking)||void 0===t?void 0:t.state;return!!e&&u.TRACKING_STATE_PARAMS_TO_COOKIE.every((function(t){return"undefined"!==typeof e[t]}))}}]),t}();e.RealTracking=l},3925:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(6041),e),i(r(604),e),i(r(7009),e),i(r(3949),e),i(r(7619),e),i(r(9470),e),i(r(7790),e)},6041:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTracking=void 0;var n=r(7009),i=r(3949);e.createTracking=function(t){return"undefined"===typeof window?new n.NullTracking:new i.RealTracking(t)}},7790:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HeadScriptTracking=void 0;var i=n(r(5470)),o=r(604);function a(t,e){return'\n !function(){\n if (typeof window.tracking !== "object") {\n window.tracking = {};\n }\n if (typeof window.tracking.state !== "object") {\n window.tracking.state = {};\n }\n if (typeof window.tracking.state.productCategory !== "string") {\n window.tracking.state.productCategory = "'.concat(e,'";\n } \n if (typeof window.tracking.state.productName !== "string") {\n window.tracking.state.productName = "').concat(t,'";\n }\n }();\n ')}e.HeadScriptTracking=function(t){var e=t.head,r=t.productName,n=t.productCategory,s=void 0===n?o.PRODUCT_CATEGORY:n;return i.default.createElement(e,null,i.default.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:a(r,s)}}))}},9470:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptTracking=void 0;var i=n(r(5470)),o=r(604);e.ScriptTracking=function(t){var e=t.script;return i.default.createElement(e,{src:o.TINKOFF_WEB_TRACKING_URL,type:"text/javascript",defer:!0,onError:function(){window.webTrackingDownloadScriptFailed=!0,window.dispatchEvent(new Event(o.EVENT_FAILURE_NAME))}})}},5511:function(t,e,r){"use strict";var n=r(1866),i=r(7048),o=r(2117);Object.defineProperty(e,"__esModule",{value:!0}),e.EventeaQueueObserver=e.EventeaQueue=e.EventeaStatistQueue=void 0;var a=r(2517);Object.defineProperty(e,"EventeaStatistQueue",{enumerable:!0,get:function(){return a.EventeaStatistQueue}});var s="undefined"!==typeof window?window:void 0,c=function(){function t(e){var r,n;i(this,t),this.errorHandlers=null===e||void 0===e?void 0:e.errorHandlers,s?!s._evnteq&&(s._evnteq=[]):null===(n=null===(r=this.errorHandlers)||void 0===r?void 0:r.handleQueueUsageAtServer)||void 0===n||n.call(r)}return o(t,[{key:"__addEventToStore",value:function(){var t;(null===s||void 0===s?void 0:s._evnteq)&&(t=s._evnteq).push.apply(t,arguments)}},{key:"getQueue",get:function(){var t;return Array.isArray(null===s||void 0===s?void 0:s._evnteq)?null===s||void 0===s?void 0:s._evnteq:null===(t=null===s||void 0===s?void 0:s._evnteq)||void 0===t?void 0:t.queue}},{key:"send",value:function(t){this.__addEventToStore(["send",t])}},{key:"sendOnce",value:function(t){return this.__addEventToStore(["sendOnce",t]),!0}},{key:"data",value:function(t){this.__addEventToStore(["data",t])}}]),t}();e.EventeaQueue=c;var u=function(){function t(e){var r,o;if(i(this,t),this.observerSuspended=!1,this.queue=[],this.errorHandlers=null===e||void 0===e?void 0:e.errorHandlers,s){var a;if(Array.isArray(s._evnteq))(a=this.queue).push.apply(a,n(s._evnteq));s._evnteq=this}else this.observerSuspended=!0,null===(o=null===(r=this.errorHandlers)||void 0===r?void 0:r.handleQueueUsageAtServer)||void 0===o||o.call(r)}return o(t,[{key:"watch",set:function(t){var e,r;this.observerSuspended?null===(r=null===(e=this.errorHandlers)||void 0===e?void 0:e.handleQueueUsageAtServer)||void 0===r||r.call(e):(this.watcher=t,this.push.apply(this,n(this.queue)),this.queue=[])}},{key:"push",value:function(){for(var t,e,r,n=arguments.length,i=new Array(n),o=0;o0;this._trackingResolve(t),t.ready.then(this._readyResolve),t.extend(this._stateAcc),r&&this._listeners.change&&this._listeners.change.forEach((function(r){r(t.state,e._stateAcc)})),this._listeners=Object.create(null)},t.prototype.addPixels=function(t){return this.tracking?this.tracking.addPixels(t):this.trackingReady.then((function(e){return e.addPixels(t)}))},t.prototype.resolve=function(t){var e=this;return Promise.resolve(t).then((function(t){return e.setTracking(t),t}))},Object.defineProperty(t.prototype,"state",{get:function(){return this.tracking?this.tracking.state:this._stateAcc},enumerable:!1,configurable:!0}),t.prototype.callUtil=function(t){for(var e,r=[],i=1;i=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){u.headers[t]=i.merge(s)})),t.exports=u},6824:function(t){t.exports={version:"0.26.0"}},850:function(t){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},8351:function(t){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},3231:function(t,e,r){"use strict";var n=r(6824).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,r){function i(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,a){if(!1===t)throw new Error(i(n," has been removed"+(e?" in "+e:"")));return e&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,a)}},t.exports={assertOptions:function(t,e,r){if("object"!==typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],a=e[o];if(a){var s=t[o],c=void 0===s||a(s,o,t);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},2515:function(t,e,r){"use strict";var n=r(850),i=Object.prototype.toString;function o(t){return Array.isArray(t)}function a(t){return"undefined"===typeof t}function s(t){return"[object ArrayBuffer]"===i.call(t)}function c(t){return null!==t&&"object"===typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function f(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var r=0,n=t.length;r0?a-4:a;for(r=0;r>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4406:function(t,e,r){"use strict";var n=r(1297),i=r(3264),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50;var a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|b(t,e),n=s(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);var i=function(t){if(c.isBuffer(t)){var e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!==typeof t.length||H(t.length)?s(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),s(t<0?0:0|p(t))}function h(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function b(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,r);case"utf8":case"utf-8":return M(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,a=1,s=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function M(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128===(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nn.length?c.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},c.byteLength=b,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(n,i),f=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=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),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function H(t){return t!==t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},3063:function(t,e){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e>1,f=-7,l=r?i-1:0,h=r?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=u}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,c,u=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*c-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*b}},2907:function(t,e,r){"use strict";var n,i;t.exports=(null===(n=r.g.process)||void 0===n?void 0:n.env)&&"object"===typeof(null===(i=r.g.process)||void 0===i?void 0:i.env)?r.g.process:r(6299)},417:function(t,e,r){var n=r(4406).Buffer,i=r(2907),o=r(3857),a=r(7048),s=r(9449),c=r(1959),u=r(5422);function f(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=u(t);if(e){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return c(this,r)}}!function(){var e={8557:function(t,e,r){var n=e;n.bignum=r(6884),n.define=r(9636).define,n.base=r(2207),n.constants=r(3503),n.decoders=r(5133),n.encoders=r(9245)},9636:function(t,e,r){var n=r(8557),i=r(7526);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=r(6144).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},8483:function(t,e,r){var n=r(7526),i=r(2207).Reporter,o=r(4300).Buffer;function a(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof s||(t=new s(t,e)),this.length+=t.length,t}),this);else if("number"===typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"===typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(a,i),e.C=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(t){var e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=s,s.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"===typeof this.value?t[e]=this.value:"string"===typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},2207:function(t,e,r){var n=e;n.Reporter=r(2148).b,n.DecoderBuffer=r(8483).C,n.EncoderBuffer=r(8483).R,n.Node=r(211)},211:function(t,e,r){var n=r(2207).Reporter,i=r(2207).EncoderBuffer,o=r(2207).DecoderBuffer,a=r(9036),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};f.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},u.prototype._wrap=function(){var t=this._baseState;c.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},u.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(a(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){u.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(r),this}})),u.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},u.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){var c=null;if(null!==r.explicit?c=r.explicit:null!==r.implicit?c=r.implicit:null!==r.tag&&(c=r.tag),null!==c||r.any){if(a=this._peekTag(t,c,r.any),t.isError(a))return a}else{var u=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(u)}}if(r.obj&&a&&(n=t.enterObject()),a){if(null!==r.explicit){var f=this._decodeTag(t,r.explicit);if(t.isError(f))return f;t=f}var l=t.offset;if(null===r.use&&null===r.choice){if(r.any)u=t.save();var h=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(h))return h;r.any?i=t.raw(u):t=h}if(e&&e.track&&null!==r.tag&&e.track(t.path(),l,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(d,e)}}return r.obj&&a&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,i),i},u.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=t.save(),s=r.choice[o];try{var c=s._decode(t,e);if(t.isError(c))return!1;n={type:o,value:c},i=!0}catch(e){return t.restore(a),!1}return!0}),this),i?n:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},u.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},u.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!==typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),c))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(a=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===u?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(u,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},u.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},2148:function(t,e,r){var n=r(7526);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.b=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},8880:function(t,e,r){var n=r(3503);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n._reverse(e.tag)},3503:function(t,e,r){var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e},n.der=r(8880)},359:function(t,e,r){var n=r(7526),i=r(8557),o=i.base,a=i.bignum,s=i.constants.der;function c(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.Node.call(this,"der",t)}function f(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=s.tagClass[r>>6],i=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=s.tagClassByName[r||"universal"]<<6)}t.exports=c,c.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,a.Node),u.prototype._encodeComposite=function(t,e,r,n){var o,a=l(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var s=1,c=n.length;c>=256;c>>=8)s++;(o=new i(2+s))[0]=a,o[1]=128|s;c=1+s;for(var u=n.length;u>0;c--,u>>=8)o[c]=255&u;return this._createEncoderBuffer([o,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),c=s.length-1;for(n=t.length-1;n>=0;n--){a=t[n];for(s[c--]=127&a;(a>>=7)>0;)s[c--]=128|127&a}return this._createEncoderBuffer(s)},u.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var a=t;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,l=67108863&c,h=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=h;d++){var p=u-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[u]=0|l,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?b+r:u[h-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,u=new t(o),f=this.clone();if(c){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,y=0|a[2],v=8191&y,g=y>>>13,m=0|a[3],w=8191&m,_=m>>>13,S=0|a[4],E=8191&S,A=S>>>13,k=0|a[5],M=8191&k,x=k>>>13,R=0|a[6],O=8191&R,P=R>>>13,T=0|a[7],C=8191&T,I=T>>>13,j=0|a[8],L=8191&j,B=j>>>13,N=0|a[9],D=8191&N,U=N>>>13,F=0|s[0],q=8191&F,H=F>>>13,V=0|s[1],z=8191&V,W=V>>>13,K=0|s[2],G=8191&K,$=K>>>13,Y=0|s[3],J=8191&Y,Q=Y>>>13,X=0|s[4],Z=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ct=8191&st,ut=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(u+(n=Math.imul(l,q))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,q)|0))<<13)|0;u=((o=Math.imul(h,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,H))+Math.imul(b,q)|0,o=Math.imul(b,H);var vt=(u+(n=n+Math.imul(l,z)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,z)|0))<<13)|0;u=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,H))+Math.imul(g,q)|0,o=Math.imul(g,H),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,W)|0;var gt=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,$)|0)+Math.imul(h,G)|0))<<13)|0;u=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(v,z)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,$)|0;var mt=(u+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,J)|0))<<13)|0;u=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(A,q)|0,o=Math.imul(A,H),n=n+Math.imul(w,z)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,Q)|0;var wt=(u+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Z)|0))<<13)|0;u=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,z)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,Q)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,tt)|0;var _t=(u+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;u=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,H))+Math.imul(P,q)|0,o=Math.imul(P,H),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,z)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var St=(u+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;u=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,H))+Math.imul(I,q)|0,o=Math.imul(I,H),n=n+Math.imul(O,z)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var Et=(u+(n=n+Math.imul(l,ct)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(h,ct)|0))<<13)|0;u=((o=o+Math.imul(h,ut)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,H))+Math.imul(B,q)|0,o=Math.imul(B,H),n=n+Math.imul(C,z)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ct)|0,o=o+Math.imul(b,ut)|0;var At=(u+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;u=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(L,z)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,$)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ut)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,ut)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ht)|0;var kt=(u+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,bt)|0)+Math.imul(h,pt)|0))<<13)|0;u=((o=o+Math.imul(h,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,W))+Math.imul(U,z)|0,o=Math.imul(U,W),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,Q)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ht)|0;var Mt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,$))+Math.imul(U,G)|0,o=Math.imul(U,$),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ut)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var xt=(u+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,bt)|0)+Math.imul(g,pt)|0))<<13)|0;u=((o=o+Math.imul(g,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,Q))+Math.imul(U,J)|0,o=Math.imul(U,Q),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,ut)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Rt=(u+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,tt))+Math.imul(U,Z)|0,o=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ct)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(P,ct)|0,o=o+Math.imul(P,ut)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ht)|0;var Ot=(u+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,ht)|0;var Pt=(u+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,bt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,at))+Math.imul(U,ot)|0,o=Math.imul(U,at),n=n+Math.imul(L,ct)|0,i=(i=i+Math.imul(L,ut)|0)+Math.imul(B,ct)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var Tt=(u+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,bt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ct),i=(i=Math.imul(D,ut))+Math.imul(U,ct)|0,o=Math.imul(U,ut),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ht)|0;var Ct=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(U,lt)|0,o=Math.imul(U,ht);var It=(u+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,bt)|0)+Math.imul(B,pt)|0))<<13)|0;u=((o=o+Math.imul(B,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var jt=(u+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,bt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,bt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,c[0]=yt,c[1]=vt,c[2]=gt,c[3]=mt,c[4]=wt,c[5]=_t,c[6]=St,c[7]=Et,c[8]=At,c[9]=kt,c[10]=Mt,c[11]=xt,c[12]=Rt,c[13]=Ot,c[14]=Pt,c[15]=Tt,c[16]=Ct,c[17]=It,c[18]=jt,0!==u&&(c[19]=u,r.length++),r};function p(t,e,r){return(new b).mulp(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(c)):(r.isub(e),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(g,v),g.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new m;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var b=d,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var u=e.words[n],f=c-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6069:function(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r>>24]^f[p>>>16&255]^l[b>>>8&255]^h[255&y]^e[v++],a=u[p>>>24]^f[b>>>16&255]^l[y>>>8&255]^h[255&d]^e[v++],s=u[b>>>24]^f[y>>>16&255]^l[d>>>8&255]^h[255&p]^e[v++],c=u[y>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&b]^e[v++],d=o,p=a,b=s,y=c;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^e[v++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^e[v++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[v++],c=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^e[v++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var f=t[a],l=t[f],h=t[l],d=257*t[u]^16843008*u;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===a?a=s=1:(a=f^t[t[t[h^f]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(t){this._key=i(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e===4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-e]^a}for(var u=[],f=0;f>>24]]^c.INV_SUB_MIX[1][c.SBOX[h>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[h>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},5112:function(t,e,r){var n=r(9725),i=r(3118).Buffer,o=r(8826),a=r(7526),s=r(7731),c=r(5653),u=r(4630);function f(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new s(r),o=e.length,a=o%16;n.update(e),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var c=8*o,f=i.alloc(8);f.writeUIntBE(c,0,8),n.update(f),t._finID=n.state;var l=i.from(t._finID);return u(l),l}function l(t,e,r,a){o.call(this);var c=i.alloc(4,0);this._cipher=new n.AES(e);var u=this._cipher.encryptBlock(c);this._ghash=new s(u),r=f(this,r,u),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(e,!1,r.key,r.iv);return h(t,n.key,n.iv)},e.createDecipheriv=h},9811:function(t,e,r){var n=r(8963),i=r(5112),o=r(3118).Buffer,a=r(6255),s=r(8826),c=r(9725),u=r(7325);function f(t,e,r){s.call(this),this._cache=new h,this._cipher=new c.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(7526)(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var s=n[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"===typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,e,r):"auth"===s.type?new i(s.module,e,r):new f(s.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},h.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},h.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=o(n)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},4630:function(t){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},4156:function(t,e,r){var n=r(5653);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},2509:function(t,e,r){var n=r(3118).Buffer,i=r(5653);function o(t,e,r){var o=e.length,a=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:a]),a}e.encrypt=function(t,e,r){for(var i,a=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){a=n.concat([a,o(t,e,r)]);break}i=t._cache.length,a=n.concat([a,o(t,e.slice(0,i),r)]),e=e.slice(i)}return a}},9010:function(t,e,r){var n=r(3118).Buffer;function i(t,e,r){for(var n,i,a=-1,s=0;++a<8;)n=e&1<<7-a?128:0,s+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>a%8,t._prev=o(t._prev,r?n:i);return s}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new i(o(e));return r}t.exports=a,a.getr=s},5703:function(t,e,r){t.exports=r(26)},1265:function(t,e,r){var n=r(3118).Buffer,i=r(2539),o=r(6572),a=r(7526),s=r(3596),c=r(9204),u=r(26);function f(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new f(t)}function d(t){return new l(t)}Object.keys(u).forEach((function(t){u[t].id=n.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]})),a(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"===typeof t&&(t=n.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=s(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},a(l,o.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return"string"===typeof t&&(t=n.from(t,e)),this._hash.update(t),this},l.prototype.verify=function(t,e,r){"string"===typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return c(e,i,t,this._signType,this._tag)},t.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},3596:function(t,e,r){var n=r(3118).Buffer,i=r(2730),o=r(6236),a=r(8818).ec,s=r(5410),c=r(569),u=r(9167);function f(t,e){var r=u[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var i=new a(r).keyFromPrivate(e.privateKey).sign(t);return n.from(i.toDER())}function l(t,e,r){for(var n,i=e.params.priv_key,o=e.params.p,a=e.params.q,c=e.params.g,u=new s(0),f=p(t,a).mod(a),l=!1,v=d(i,a,t,r);!1===l;)u=y(c,n=b(a,v,r),o,a),0===(l=n.invm(a).imul(f.add(i.mul(u))).mod(a)).cmpn(0)&&(l=!1,u=new s(0));return h(u,l)}function h(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),n.from(r)}function d(t,e,r,o){if((t=n.from(t.toArray())).length0&&r.ishrn(n),r}function b(t,e,r){var o,a;do{for(o=n.alloc(0);8*o.length=e)throw new Error("invalid sig")}t.exports=function(t,e,r,o,s){var f=a(r);if("ec"===f.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return c(t,e,f)}if("dsa"===f.type){if("dsa"!==o)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(t,"der"),l=f.s,h=f.r;u(l,o),u(h,o);var d=i.mont(n),p=l.invm(o);return 0===s.toRed(d).redPow(new i(e).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(t,e,f)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");e=n.concat([s,e]);for(var l=f.modulus.byteLength(),h=[1],d=0;e.length+h.length+2=49&&u<=54?u-49+10:u>=17&&u<=22?u-17+10:u,a|=c}return n(!(240&a),"Invalid character in "+t),i}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),c=e;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a"}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f:o.prototype.inspect=f;var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=h[t],f=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?b+r:l[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,l=67108863&c,h=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=h;d++){var p=u-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[u]=0|l,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,y=0|a[2],v=8191&y,g=y>>>13,m=0|a[3],w=8191&m,_=m>>>13,S=0|a[4],E=8191&S,A=S>>>13,k=0|a[5],M=8191&k,x=k>>>13,R=0|a[6],O=8191&R,P=R>>>13,T=0|a[7],C=8191&T,I=T>>>13,j=0|a[8],L=8191&j,B=j>>>13,N=0|a[9],D=8191&N,U=N>>>13,F=0|s[0],q=8191&F,H=F>>>13,V=0|s[1],z=8191&V,W=V>>>13,K=0|s[2],G=8191&K,$=K>>>13,Y=0|s[3],J=8191&Y,Q=Y>>>13,X=0|s[4],Z=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ct=8191&st,ut=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(u+(n=Math.imul(l,q))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,q)|0))<<13)|0;u=((o=Math.imul(h,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,H))+Math.imul(b,q)|0,o=Math.imul(b,H);var vt=(u+(n=n+Math.imul(l,z)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,z)|0))<<13)|0;u=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,H))+Math.imul(g,q)|0,o=Math.imul(g,H),n=n+Math.imul(p,z)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,W)|0;var gt=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,$)|0)+Math.imul(h,G)|0))<<13)|0;u=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(v,z)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(g,z)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,$)|0;var mt=(u+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,J)|0))<<13)|0;u=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(A,q)|0,o=Math.imul(A,H),n=n+Math.imul(w,z)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,Q)|0;var wt=(u+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Z)|0))<<13)|0;u=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(E,z)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,z)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,Q)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,tt)|0;var _t=(u+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;u=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,H))+Math.imul(P,q)|0,o=Math.imul(P,H),n=n+Math.imul(M,z)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,z)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var St=(u+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;u=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,H))+Math.imul(I,q)|0,o=Math.imul(I,H),n=n+Math.imul(O,z)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,W)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var Et=(u+(n=n+Math.imul(l,ct)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(h,ct)|0))<<13)|0;u=((o=o+Math.imul(h,ut)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,H))+Math.imul(B,q)|0,o=Math.imul(B,H),n=n+Math.imul(C,z)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(I,z)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ct)|0,o=o+Math.imul(b,ut)|0;var At=(u+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;u=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(L,z)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,z)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,$)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ut)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,ut)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ht)|0;var kt=(u+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,bt)|0)+Math.imul(h,pt)|0))<<13)|0;u=((o=o+Math.imul(h,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,W))+Math.imul(U,z)|0,o=Math.imul(U,W),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,Q)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ht)|0;var Mt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,$))+Math.imul(U,G)|0,o=Math.imul(U,$),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ut)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var xt=(u+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,bt)|0)+Math.imul(g,pt)|0))<<13)|0;u=((o=o+Math.imul(g,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,J),i=(i=Math.imul(D,Q))+Math.imul(U,J)|0,o=Math.imul(U,Q),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,ut)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Rt=(u+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,tt))+Math.imul(U,Z)|0,o=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ct)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(P,ct)|0,o=o+Math.imul(P,ut)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ht)|0;var Ot=(u+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,ht)|0;var Pt=(u+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,bt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,at))+Math.imul(U,ot)|0,o=Math.imul(U,at),n=n+Math.imul(L,ct)|0,i=(i=i+Math.imul(L,ut)|0)+Math.imul(B,ct)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var Tt=(u+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,bt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ct),i=(i=Math.imul(D,ut))+Math.imul(U,ct)|0,o=Math.imul(U,ut),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ht)|0;var Ct=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(U,lt)|0,o=Math.imul(U,ht);var It=(u+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,bt)|0)+Math.imul(B,pt)|0))<<13)|0;u=((o=o+Math.imul(B,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var jt=(u+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,bt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,bt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,c[0]=yt,c[1]=vt,c[2]=gt,c[3]=mt,c[4]=wt,c[5]=_t,c[6]=St,c[7]=Et,c[8]=At,c[9]=kt,c[10]=Mt,c[11]=xt,c[12]=Rt,c[13]=Ot,c[14]=Pt,c[15]=Tt,c[16]=Ct,c[17]=It,c[18]=jt,0!==u&&(c[19]=u,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return y(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(b=p),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?b(this,t,e):r<63?p(this,t,e):r<1024?y(this,t,e):v(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(c)):(r.isub(e),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return m[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var b=d,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y=0;n--){for(var u=e.words[n],f=c-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},42:function(t){"use strict";var e={};function r(t,r,n){function i(t,e,n){return"string"===typeof r?r:r(t,e,n)}n||(n=Error);var o=function(t){s(r,t);var e=f(r);function r(t,n,o){return a(this,r),e.call(this,i(t,n,o))}return r}(n);o.prototype.name=n.name,o.prototype.code=t,e[t]=o}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o;if("string"===typeof e&&function(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))o="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var a=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";o='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(n(e,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6744:function(t,e,r){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(8318),a=r(3877);r(7526)(f,o);for(var s=n(a.prototype),c=0;c0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n)a.endEmitted?E(t,new S):R(t,a,e,!0);else if(a.ended)E(t,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?R(t,a,e,!1):I(t,a)):R(t,a,e,!1)}else n||(a.reading=!1,I(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;f("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(C,t))}function C(t){var e=t._readableState;f("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function I(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){f("readable nexttick read 0"),t.read(0)}function N(t,e){f("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function F(t){var e=t._readableState;f("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(q,e,t))}function q(t,e){if(f("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function H(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):T(this),null;if(0===(t=P(t,e))&&e.ended)return 0===e.length&&F(this),null;var n,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(t){E(this,new _("_read()"))},M.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?c:v;function s(t,e){f("onunpipe"),t===r&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,h())}function c(){f("onend"),t.end()}n.endEmitted?i.nextTick(o):r.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(r);t.on("drain",u);var l=!1;function h(){f("cleanup"),t.removeListener("close",b),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",v),r.removeListener("data",d),l=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u()}function d(e){f("ondata");var i=t.write(e);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==H(n.pipes,t))&&!l&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(e){f("onerror",e),v(),t.removeListener("error",p),0===a(t,"error")&&E(t,e)}function b(){t.removeListener("finish",y),v()}function y(){f("onfinish"),t.removeListener("close",b),v()}function v(){f("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",b),t.once("finish",y),t.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?T(this):n.reading||i.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(L,this),r},M.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(L,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(N,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new S(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,r){r(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)}},509:function(t,e,r){"use strict";var n;function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(1785),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function b(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[s]=null,t[c]=null,e(p(r,!1)))}}function y(t){i.nextTick(b,t)}var v=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((n={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[u]?r(t[u]):e(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},o(n,Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),v);t.exports=function(t){var e,r=Object.create(g,(o(e={},d,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,h,{value:function(t,e){var n=r[d].read();n?(r[l]=null,r[s]=null,r[c]=null,t(p(n,!1))):(r[s]=t,r[c]=e)},writable:!0}),e));return r[l]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[c];return null!==e&&(r[l]=null,r[s]=null,r[c]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[c]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",y.bind(null,r)),r}},8469:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e=a.allocUnsafe(t>>>0),r=this.head,n=0;r;)u(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:c,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return e.reduce(f)}},894:function(t,e,r){"use strict";var n=r(42).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},1727:function(t,e,r){t.exports=r(2781)},6572:function(t,e,r){var n=r(2781);"disable"===i.env.READABLE_STREAM&&n?(t.exports=n.Readable,Object.assign(t.exports,n),t.exports.Stream=n):((e=t.exports=r(8318)).Stream=n||e,e.Readable=e,e.Writable=r(3877),e.Duplex=r(6744),e.Transform=r(9482),e.PassThrough=r(6609),e.finished=r(1785),e.pipeline=r(7612))},5673:function(t,e,r){"use strict";var n=r(3118).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},5653:function(t){t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;or)?e=("rmd160"===t?new c:u(t)).update(e).digest():e.lengths?e=t(e):e.length0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,t.keys,a)}},c.prototype._update=function(t,e,r,n){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,a=h}o.rip(s,a,n,i)},c.prototype._decrypt=function(t,e,r,n,i){for(var a=r,s=e,c=t.keys.length-2;c>=0;c-=2){var u=t.keys[c],f=t.keys[c+1];o.expand(a,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(u,f),h=a;a=(s^o.permute(l))>>>0,s=h}o.rip(a,s,n,i)}},2635:function(t,e,r){"use strict";var n=r(9036),i=r(7526),o=r(1020),a=r(9670);function s(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function c(t){o.call(this,t);var e=new s(this.type,this.options.key);this._edeState=e}i(c,o),t.exports=c,c.create=function(t){return new c(t)},c.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},c.prototype._pad=a.prototype._pad,c.prototype._unpad=a.prototype._unpad},6843:function(t,e){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c>>r[c]&1;for(c=s;c>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),e.cmp(c)){if(!e.cmp(u))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(b(p=r.shrn(1))&&b(r)&&y(p)&&y(r)&&a.test(p)&&a.test(r))return r}}},8818:function(t,e,r){"use strict";var n=e;n.version=r(763).i8,n.utils=r(8454),n.rand=r(6069),n.curve=r(954),n.curves=r(2998),n.ec=r(2081),n.eddsa=r(2298)},3005:function(t,e,r){"use strict";var n=r(6884),i=r(8454),o=i.getNAF,a=i.getJSF,s=i.assert;function c(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<=c;e--)u=(u<<1)+n[e];a.push(u)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(c=0;c=0;u--){for(e=0;u>=0&&0===a[u];u--)e++;if(u>=0&&e++,c=c.dblp(e),u<0)break;var f=a[u];s(0!==f),c="affine"===t.type?f>0?c.mixedAdd(i[f-1>>1]):c.mixedAdd(i[-f-1>>1].neg()):f>0?c.add(i[f-1>>1]):c.add(i[-f-1>>1].neg())}return"affine"===t.type?c.toP():c},c.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,f=0,l=0;l=1;l-=2){var d=l-1,p=l;if(1===s[d]&&1===s[p]){var b=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(b[1]=e[d].add(e[p]),b[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(b[1]=e[d].toJ().mixedAdd(e[p]),b[2]=e[d].add(e[p].neg())):(b[1]=e[d].toJ().mixedAdd(e[p]),b[2]=e[d].toJ().mixedAdd(e[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[d],r[p]);f=Math.max(v[0].length,f),u[d]=new Array(f),u[p]=new Array(f);for(var g=0;g=0;l--){for(var E=0;l>=0;){var A=!0;for(g=0;g=0&&E++,_=_.dblp(E),l<0)break;for(g=0;g0?k=c[g][M-1>>1]:M<0&&(k=c[g][-M-1>>1].neg()),_="affine"===k.type?_.mixedAdd(k):_.add(k))}}for(l=0;l=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),c=i.redMul(a),u=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(c,u,l,f)},u.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(u=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(u.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),c=a.redSub(s).redISub(s);t=n.redSub(i).redISub(o).redMul(c),e=a.redMul(u.redSub(o)),r=a.redMul(c)}}else{var u=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),c=u.redSub(s).redSub(s);t=this.curve._mulC(n.redISub(u)).redMul(c),e=this.curve._mulC(u).redMul(i.redISub(o)),r=u.redMul(c)}return this.curve.point(t,e,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(e),u=o.redMul(a),f=s.redMul(c),l=o.redMul(c),h=a.redMul(s);return this.curve.point(u,f,h,l)},u.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),l=n.redMul(c).redMul(f);return this.curve.twisted?(e=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(e=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(l,e,r)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},u.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},954:function(t,e,r){"use strict";var n=e;n.base=r(3005),n.short=r(401),n.mont=r(6103),n.edwards=r(9224)},6103:function(t,e,r){"use strict";var n=r(6884),i=r(7526),o=r(3005),a=r(8454);function s(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new c(this,t,e)},s.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),c=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},401:function(t,e,r){"use strict";var n=r(8454),i=r(6884),o=r(7526),a=r(3005),s=n.assert;function c(t){a.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,r,n){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),t.exports=c,c.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(t){for(var e,r,n,o,a,s,c,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,d=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),v=new i(1),g=0;0!==h.cmpn(0);){var m=d.div(h);u=d.sub(m.mul(h)),f=y.sub(m.mul(p));var w=v.sub(m.mul(b));if(!n&&u.cmp(l)<0)e=c.neg(),r=p,n=u.neg(),o=f;else if(n&&2===++g)break;c=u,d=h,h=u,y=p,p=f,v=b,b=w}a=u.neg(),s=f;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),c.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),l=n.redMul(u),h=c.redSqr().redIAdd(f).redISub(l).redISub(l),d=c.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),f=r.redMul(c),l=s.redSqr().redIAdd(u).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(u)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},2998:function(t,e,r){"use strict";var n,i=e,o=r(9767),a=r(954),s=r(8454).assert;function c(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new c(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(7759)}catch(t){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},2081:function(t,e,r){"use strict";var n=r(6884),i=r(8242),o=r(8454),a=r(2998),s=r(6069),c=o.assert,u=r(7044),f=r(8020);function l(t){if(!(this instanceof l))return new l(t);"string"===typeof t&&(c(a.hasOwnProperty(t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new u(this,t)},l.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(e.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),c=t.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(u.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var v=d.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new f({r:y,s:v,recoveryParam:g})}}}}}},l.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new f(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(t).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,r,i){c((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,a=new n(t),s=e.r,u=e.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),b=u.mul(d).umod(o);return this.g.mulAdd(p,s,b)},l.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},7044:function(t,e,r){"use strict";var n=r(6884),i=r(8454).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"===typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return""}},8020:function(t,e,r){"use strict";var n=r(6884),i=r(8454),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function c(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=e.place;o>>=0;return!(i<=127)&&(e.place=a,i)}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;var o=c(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var a=c(t,r);if(!1===a)return!1;var u=t.slice(r.place,a+r.place);if(r.place+=a,2!==t[r.place++])return!1;var f=c(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var l=t.slice(r.place,f+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(u),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,t)}},2298:function(t,e,r){"use strict";var n=r(9767),i=r(2998),o=r(8454),a=o.assert,s=o.parseBytes,c=r(9285),u=r(3883);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,a,s,c=t.andln(3)+n&3,u=e.andln(3)+i&3;if(3===c&&(c=-1),3===u&&(u=-1),0===(1&c))o=0;else o=3!==(s=t.andln(7)+n&7)&&5!==s||2!==u?c:-c;if(r[0].push(o),0===(1&u))a=0;else a=3!==(s=e.andln(7)+i&7)&&5!==s||2!==c?u:-u;r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"===typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},7325:function(t,e,r){var n=r(3118).Buffer,i=r(4125);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),c=n.alloc(o||0),u=n.alloc(0);a>0||o>0;){var f=new i;f.update(u),f.update(t),e&&f.update(e),u=f.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,u.length),u.copy(s,h,0,l),a-=l}if(l0){var d=c.length-o,p=Math.min(o,u.length-l);u.copy(c,d,l,l+p),o-=p}}return u.fill(0),{key:s,iv:c}}},3421:function(t,e,r){"use strict";var n=r(3118).Buffer,i=r(5098).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(7526)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},519:function(t){"use strict";var e={};function r(t,r,n){function i(t,e,n){return"string"===typeof r?r:r(t,e,n)}n||(n=Error);var o=function(t){s(r,t);var e=f(r);function r(t,n,o){return a(this,r),e.call(this,i(t,n,o))}return r}(n);o.prototype.name=n.name,o.prototype.code=t,e[t]=o}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o;if("string"===typeof e&&function(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))o="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var a=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";o='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(n(e,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},5077:function(t,e,r){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(279),a=r(3582);r(7526)(f,o);for(var s=n(a.prototype),c=0;c0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n)a.endEmitted?E(t,new S):R(t,a,e,!0);else if(a.ended)E(t,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?R(t,a,e,!1):I(t,a)):R(t,a,e,!1)}else n||(a.reading=!1,I(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;f("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(C,t))}function C(t){var e=t._readableState;f("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function I(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){f("readable nexttick read 0"),t.read(0)}function N(t,e){f("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function F(t){var e=t._readableState;f("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(q,e,t))}function q(t,e){if(f("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function H(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):T(this),null;if(0===(t=P(t,e))&&e.ended)return 0===e.length&&F(this),null;var n,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(t){E(this,new _("_read()"))},M.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?c:v;function s(t,e){f("onunpipe"),t===r&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,h())}function c(){f("onend"),t.end()}n.endEmitted?i.nextTick(o):r.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(r);t.on("drain",u);var l=!1;function h(){f("cleanup"),t.removeListener("close",b),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",v),r.removeListener("data",d),l=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u()}function d(e){f("ondata");var i=t.write(e);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==H(n.pipes,t))&&!l&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(e){f("onerror",e),v(),t.removeListener("error",p),0===a(t,"error")&&E(t,e)}function b(){t.removeListener("finish",y),v()}function y(){f("onfinish"),t.removeListener("close",b),v()}function v(){f("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",b),t.once("finish",y),t.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?T(this):n.reading||i.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(L,this),r},M.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(L,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(N,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new S(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,r){r(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)}},1439:function(t,e,r){"use strict";var n;function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(9830),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function b(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[s]=null,t[c]=null,e(p(r,!1)))}}function y(t){i.nextTick(b,t)}var v=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((n={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[u]?r(t[u]):e(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},o(n,Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),v);t.exports=function(t){var e,r=Object.create(g,(o(e={},d,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,h,{value:function(t,e){var n=r[d].read();n?(r[l]=null,r[s]=null,r[c]=null,t(p(n,!1))):(r[s]=t,r[c]=e)},writable:!0}),e));return r[l]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[c];return null!==e&&(r[l]=null,r[s]=null,r[c]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[c]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",y.bind(null,r)),r}},5206:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e=a.allocUnsafe(t>>>0),r=this.head,n=0;r;)u(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:c,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return e.reduce(f)}},4292:function(t,e,r){"use strict";var n=r(519).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},3917:function(t,e,r){t.exports=r(2781)},5098:function(t,e,r){var n=r(2781);"disable"===i.env.READABLE_STREAM&&n?(t.exports=n.Readable,Object.assign(t.exports,n),t.exports.Stream=n):((e=t.exports=r(279)).Stream=n||e,e.Readable=e,e.Writable=r(3582),e.Duplex=r(5077),e.Transform=r(6821),e.PassThrough=r(3880),e.finished=r(9830),e.pipeline=r(1586))},9573:function(t,e,r){"use strict";var n=r(3118).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},9767:function(t,e,r){var n=e;n.utils=r(8911),n.common=r(5169),n.sha=r(9417),n.ripemd=r(5282),n.hmac=r(7890),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},5169:function(t,e,r){"use strict";var n=r(8911),i=r(9036);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},8911:function(t,e,r){"use strict";var n=r(9036),i=r(7526);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function c(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,a,s){var c=0,u=e;return c+=(u=u+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,a,s,c,u){var f=0,l=e;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,a,s,c,u){return e+n+o+s+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},8242:function(t,e,r){"use strict";var n=r(9767),i=r(6249),o=r(9036);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=a,a.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length>>32-e}function u(t,e,r,n,i,o,a){return c(t+(e&r|~e&n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return c(t+(e&n|r&~n)+i+o|0,a)+e|0}function l(t,e,r,n,i,o,a){return c(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return c(t+(r^(e|~n))+i+o|0,a)+e|0}n(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,t[0],3614090360,7),o=u(o,r,n,i,t[1],3905402710,12),i=u(i,o,r,n,t[2],606105819,17),n=u(n,i,o,r,t[3],3250441966,22),r=u(r,n,i,o,t[4],4118548399,7),o=u(o,r,n,i,t[5],1200080426,12),i=u(i,o,r,n,t[6],2821735955,17),n=u(n,i,o,r,t[7],4249261313,22),r=u(r,n,i,o,t[8],1770035416,7),o=u(o,r,n,i,t[9],2336552879,12),i=u(i,o,r,n,t[10],4294925233,17),n=u(n,i,o,r,t[11],2304563134,22),r=u(r,n,i,o,t[12],1804603682,7),o=u(o,r,n,i,t[13],4254626195,12),i=u(i,o,r,n,t[14],2792965006,17),r=f(r,n=u(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=l(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,r,n,i,t[8],2272392833,11),i=l(i,o,r,n,t[11],1839030562,16),n=l(n,i,o,r,t[14],4259657740,23),r=l(r,n,i,o,t[1],2763975236,4),o=l(o,r,n,i,t[4],1272893353,11),i=l(i,o,r,n,t[7],4139469664,16),n=l(n,i,o,r,t[10],3200236656,23),r=l(r,n,i,o,t[13],681279174,4),o=l(o,r,n,i,t[0],3936430074,11),i=l(i,o,r,n,t[3],3572445317,16),n=l(n,i,o,r,t[6],76029189,23),r=l(r,n,i,o,t[9],3654602809,4),o=l(o,r,n,i,t[12],3873151461,11),i=l(i,o,r,n,t[15],530742520,16),r=h(r,n=l(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},148:function(t,e,r){var n=r(6884),i=r(6069);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),c=0;!s.testn(c);c++);for(var u=t.shrn(c),f=s.toRed(o);e>0;e--){var l=this._randrange(new n(2),s);r&&r(l);var h=l.toRed(o).redPow(u);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d0;e--){var f=this._randrange(new n(2),a),l=t.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(c);if(0!==h.cmp(o)&&0!==h.cmp(u)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},9913:function(t,e,r){"use strict";var n=r(8557);e.certificate=r(8657);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=c;var u=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=u;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=f,e.DSAparam=n.define("DSAparam",(function(){this.int()}));var l=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=l;var h=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},8657:function(t,e,r){"use strict";var n=r(8557),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),c=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),u=n.define("RDNSequence",(function(){this.seqof(c)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),l=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));t.exports=p},4803:function(t,e,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,a=r(7325),s=r(7384),c=r(3118).Buffer;t.exports=function(t,e){var r,u=t.toString(),f=u.match(n);if(f){var l="aes"+f[1],h=c.from(f[2],"hex"),d=c.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(e,h.slice(0,8),parseInt(f[1],10)).key,b=[],y=s.createDecipheriv(l,p,h);b.push(y.update(d)),b.push(y.final()),r=c.concat(b)}else{var v=u.match(o);r=new c(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:r}}},569:function(t,e,r){var n=r(9913),i=r(8675),o=r(4803),a=r(7384),s=r(785),c=r(3118).Buffer;function u(t){var e;"object"!==typeof t||c.isBuffer(t)||(e=t.passphrase,t=t.key),"string"===typeof t&&(t=c.from(t));var r,i,a=o(t,e),s=a.tag,u=a.data;switch(s){case"CERTIFICATE":i=n.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(i||(i=n.PublicKey.decode(u,"der")),r=i.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=n.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+s);case"ENCRYPTED PRIVATE KEY":u=f(u=n.EncryptedPrivateKey.decode(u,"der"),e);case"PRIVATE KEY":switch(r=(i=n.PrivateKey.decode(u,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:n.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=n.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+s);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return{curve:(u=n.ECPrivateKey.decode(u,"der")).parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+s)}}function f(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,h=s.pbkdf2Sync(e,r,n,l,"sha1"),d=a.createDecipheriv(o,h,u),p=[];return p.push(d.update(f)),p.push(d.final()),c.concat(p)}t.exports=u,u.signature=n.signature},785:function(t,e,r){var n=r(6113),i=r(721),o=r(908),a=r(7409);n.pbkdf2Sync&&-1!==n.pbkdf2Sync.toString().indexOf("keylen, digest")?(e.pbkdf2Sync=function(t,e,r,s,c){return i(r,s),t=a(t,o,"Password"),e=a(e,o,"Salt"),c=c||"sha1",n.pbkdf2Sync(t,e,r,s,c)},e.pbkdf2=function(t,e,r,s,c,u){if(i(r,s),t=a(t,o,"Password"),e=a(e,o,"Salt"),"function"===typeof c&&(u=c,c="sha1"),"function"!==typeof u)throw new Error("No callback provided to pbkdf2");return n.pbkdf2(t,e,r,s,c,u)}):(e.pbkdf2Sync=r(2419),e.pbkdf2=r(5539))},5539:function(t,e,n){var o,a=n(3118).Buffer,s=n(721),c=n(908),u=n(2419),f=n(7409),l=r.g.crypto&&r.g.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function p(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==d[t])return d[t];var e=b(o=o||a.alloc(8),o,10,128,t).then((function(){return!0})).catch((function(){return!1}));return d[t]=e,e}function b(t,e,r,n,i){return l.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return l.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return a.from(t)}))}t.exports=function(t,e,n,o,a,l){"function"===typeof a&&(l=a,a=void 0);var d=h[(a=a||"sha1").toLowerCase()];if(!d||"function"!==typeof r.g.Promise)return i.nextTick((function(){var r;try{r=u(t,e,n,o,a)}catch(t){return l(t)}l(null,r)}));if(s(n,o),t=f(t,c,"Password"),e=f(e,c,"Salt"),"function"!==typeof l)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){i.nextTick((function(){e(null,t)}))}),(function(t){i.nextTick((function(){e(t)}))}))}(p(d).then((function(r){return r?b(t,e,n,o,d):u(t,e,n,o,a)})),l)}},908:function(t){var e;e="utf-8",t.exports=e},721:function(t){var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!==typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!==typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!==r)throw new TypeError("Bad key length")}},2419:function(t,e,r){var n={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},i=r(2730),o=r(3118).Buffer,a=r(721),s=r(908),c=r(7409);t.exports=function(t,e,r,u,f){a(r,u),t=c(t,s,"Password"),e=c(e,s,"Salt"),f=f||"sha1";var l=o.allocUnsafe(u),h=o.allocUnsafe(e.length+4);e.copy(h,0,0,e.length);for(var d=0,p=n[f],b=Math.ceil(u/p),y=1;y<=b;y++){h.writeUInt32BE(y,e.length);for(var v=i(f,t).update(h).digest(),g=v,m=1;mh||new a(e).cmp(c.modulus)>=0)throw new Error("decryption error");o=r?u(new a(e),c):s(e,c);var d=f.alloc(h-o.length);if(o=f.concat([d,o],h),4===i)return l(c,o);if(1===i)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var a=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,o,r);if(3===i)return o;throw new Error("unknown padding")}},3922:function(t,e,r){var n=r(569),i=r(2711),o=r(2539),a=r(22),s=r(9973),c=r(6884),u=r(8992),f=r(6236),l=r(3118).Buffer;function h(t,e){var r=t.modulus.byteLength(),n=e.length,u=o("sha1").update(l.alloc(0)).digest(),f=u.length,h=2*f;if(n>r-h-2)throw new Error("message too long");var d=l.alloc(r-n-h-2),p=r-f-1,b=i(f),y=s(l.concat([u,d,l.alloc(1,1),e],p),a(b,p)),v=s(b,a(y,f));return new c(l.concat([l.alloc(1),v,y],r))}function d(t){for(var e,r=l.allocUnsafe(t),n=0,o=i(2*t),a=0;no-11)throw new Error("message too long");n=r?l.alloc(o-i-3,255):d(o-i-3);return new c(l.concat([l.from([0,r?1:2]),n,l.alloc(1),e],o))}(a,e,r);else{if(3!==i)throw new Error("unknown padding");if((o=new c(e)).cmp(a.modulus)>=0)throw new Error("data too long for modulus")}return r?f(o,a):u(o,a)}},8992:function(t,e,r){var n=r(6884),i=r(3118).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},9973:function(t){t.exports=function(t,e){for(var r=t.length,n=-1;++na)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(t);if(t>0)if(t>o)for(var n=0;nf||t<0)throw new TypeError("offset must be a uint32");if(t>c||t>e)throw new RangeError("offset out of range")}function h(t,e,r){if("number"!==typeof t||t!==t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>c)throw new RangeError("buffer too small")}function d(t,e,r,n){var o=t.buffer,a=new Uint8Array(o,e,r);return u.getRandomValues(a),n?void i.nextTick((function(){n(null,t)})):t}u&&u.getRandomValues?(e.randomFill=function(t,e,n,i){if(!s.isBuffer(t)&&!(t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof e)i=e,e=0,n=t.length;else if("function"===typeof n)i=n,n=t.length-e;else if("function"!==typeof i)throw new TypeError('"cb" argument must be a function');return l(e,t.length),h(n,e,t.length),d(t,e,n,i)},e.randomFillSync=function(t,e,n){"undefined"===typeof e&&(e=0);if(!s.isBuffer(t)&&!(t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(e,t.length),void 0===n&&(n=t.length-e);return h(n,e,t.length),d(t,e,n)}):(e.randomFill=o,e.randomFillSync=o)},7455:function(t,e,r){"use strict";var n=r(4300).Buffer,i=r(7526),o=r(3421),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function b(t,e,r,n,i,o,a,s){return p(t+(e^r^n)+o+a|0,s)+i|0}function y(t,e,r,n,i,o,a,s){return p(t+(e&r|~e&n)+o+a|0,s)+i|0}function v(t,e,r,n,i,o,a,s){return p(t+((e|~r)^n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return p(t+(e&n|r&~n)+o+a|0,s)+i|0}function m(t,e,r,n,i,o,a,s){return p(t+(e^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,E=0|this._d,A=0|this._e,k=0;k<80;k+=1){var M,x;k<16?(M=b(r,n,i,o,d,t[s[k]],l[0],u[k]),x=m(w,_,S,E,A,t[c[k]],h[0],f[k])):k<32?(M=y(r,n,i,o,d,t[s[k]],l[1],u[k]),x=g(w,_,S,E,A,t[c[k]],h[1],f[k])):k<48?(M=v(r,n,i,o,d,t[s[k]],l[2],u[k]),x=v(w,_,S,E,A,t[c[k]],h[2],f[k])):k<64?(M=g(r,n,i,o,d,t[s[k]],l[3],u[k]),x=y(w,_,S,E,A,t[c[k]],h[3],f[k])):(M=m(r,n,i,o,d,t[s[k]],l[4],u[k]),x=b(w,_,S,E,A,t[c[k]],h[4],f[k])),r=d,d=o,o=p(i,10),i=n,n=M,w=A,A=E,E=p(S,10),S=_,_=x}var R=this._b+i+E|0;this._b=this._c+o+A|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=R},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},3118:function(t,e,r){var n=r(4300),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"===typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},7782:function(t,e,r){var n=r(3118).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"===typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},1862:function(t,e,r){var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(2003),n.sha1=r(5645),n.sha224=r(7741),n.sha256=r(9642),n.sha384=r(3869),n.sha512=r(3741)},2003:function(t,e,r){var n=r(7526),i=r(7782),o=r(3118).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,c=0;c<16;++c)e[c]=t.readInt32BE(4*c);for(;c<80;++c)e[c]=e[c-3]^e[c-8]^e[c-14]^e[c-16];for(var h=0;h<80;++h){var d=~~(h/20),p=u(r)+l(d,n,i,o)+s+e[h]+a[d]|0;s=o,o=i,i=f(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},5645:function(t,e,r){var n=r(7526),i=r(7782),o=r(3118).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,c=0;c<16;++c)e[c]=t.readInt32BE(4*c);for(;c<80;++c)e[c]=u(e[c-3]^e[c-8]^e[c-14]^e[c-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=f(r)+h(p,n,i,o)+s+e[d]+a[p]|0;s=o,o=i,i=l(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},7741:function(t,e,r){var n=r(7526),i=r(9642),o=r(7782),a=r(3118).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=c},9642:function(t,e,r){var n=r(7526),i=r(7782),o=r(3118).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,c=0|this._f,b=0|this._g,y=0|this._h,v=0;v<16;++v)e[v]=t.readInt32BE(4*v);for(;v<64;++v)e[v]=p(e[v-2])+e[v-7]+d(e[v-15])+e[v-16]|0;for(var g=0;g<64;++g){var m=y+h(s)+u(s,c,b)+a[g]+e[g]|0,w=l(r)+f(r,n,i)|0;y=b,b=c,c=s,s=o+m|0,o=i,i=n,n=r,r=m+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=c+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=c},3869:function(t,e,r){var n=r(7526),i=r(3741),o=r(7782),a=r(3118).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=c},3741:function(t,e,r){var n=r(7526),i=r(7782),o=r(3118).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function b(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,g=0|this._gh,m=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,E=0|this._dl,A=0|this._el,k=0|this._fl,M=0|this._gl,x=0|this._hl,R=0;R<32;R+=2)e[R]=t.readInt32BE(4*R),e[R+1]=t.readInt32BE(4*R+4);for(;R<160;R+=2){var O=e[R-30],P=e[R-30+1],T=d(O,P),C=p(P,O),I=b(O=e[R-4],P=e[R-4+1]),j=y(P,O),L=e[R-14],B=e[R-14+1],N=e[R-32],D=e[R-32+1],U=C+B|0,F=T+L+v(U,C)|0;F=(F=F+I+v(U=U+j|0,j)|0)+N+v(U=U+D|0,D)|0,e[R]=F,e[R+1]=U}for(var q=0;q<160;q+=2){F=e[q],U=e[q+1];var H=f(r,n,i),V=f(w,_,S),z=l(r,w),W=l(w,r),K=h(s,A),G=h(A,s),$=a[q],Y=a[q+1],J=u(s,c,g),Q=u(A,k,M),X=x+G|0,Z=m+K+v(X,x)|0;Z=(Z=(Z=Z+J+v(X=X+Q|0,Q)|0)+$+v(X=X+Y|0,Y)|0)+F+v(X=X+U|0,U)|0;var tt=W+V|0,et=z+H+v(tt,W)|0;m=g,x=M,g=c,M=k,c=s,k=A,s=o+Z+v(A=E+X|0,E)|0,o=i,E=S,i=n,S=_,n=r,_=w,r=Z+et+v(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+k|0,this._gl=this._gl+M|0,this._hl=this._hl+x|0,this._ah=this._ah+r+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,S)|0,this._dh=this._dh+o+v(this._dl,E)|0,this._eh=this._eh+s+v(this._el,A)|0,this._fh=this._fh+c+v(this._fl,k)|0,this._gh=this._gh+g+v(this._gl,M)|0,this._hh=this._hh+m+v(this._hl,x)|0},c.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=c},5121:function(t){function e(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,r){if(e("noDeprecation"))return t;var n=!1;return function(){if(!n){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}}},4300:function(t){"use strict";t.exports=r(4406)},6113:function(t){"use strict";t.exports=r(417)},2361:function(t){"use strict";t.exports=r(1988)},2781:function(t){"use strict";t.exports=r(3423)},1576:function(t){"use strict";t.exports=r(6887)},3837:function(t){"use strict";t.exports=r(8853)},6144:function(t){"use strict";t.exports=r(9286)},9234:function(t){"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},26:function(t){"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},9167:function(t){"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},3418:function(t){"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},763:function(t){"use strict";t.exports={i8:"6.5.3"}},8675:function(t){"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},c={};function u(t){var r=c[t];if(void 0!==r)return r.exports;var n=c[t]={id:t,loaded:!1,exports:{}},i=!0;try{e[t].call(n.exports,n,n.exports,u),i=!1}finally{i&&delete c[t]}return n.loaded=!0,n.exports}u.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},u.ab="//";var l={};!function(){"use strict";var t=l;t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=u(2711),t.createHash=t.Hash=u(2539),t.createHmac=t.Hmac=u(2730);var e=u(5703),r=Object.keys(e),n=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);t.getHashes=function(){return n};var i=u(785);t.pbkdf2=i.pbkdf2,t.pbkdf2Sync=i.pbkdf2Sync;var o=u(57);t.Cipher=o.Cipher,t.createCipher=o.createCipher,t.Cipheriv=o.Cipheriv,t.createCipheriv=o.createCipheriv,t.Decipher=o.Decipher,t.createDecipher=o.createDecipher,t.Decipheriv=o.Decipheriv,t.createDecipheriv=o.createDecipheriv,t.getCiphers=o.getCiphers,t.listCiphers=o.listCiphers;var a=u(9977);t.DiffieHellmanGroup=a.DiffieHellmanGroup,t.createDiffieHellmanGroup=a.createDiffieHellmanGroup,t.getDiffieHellman=a.getDiffieHellman,t.createDiffieHellman=a.createDiffieHellman,t.DiffieHellman=a.DiffieHellman;var s=u(1265);t.createSign=s.createSign,t.Sign=s.Sign,t.createVerify=s.createVerify,t.Verify=s.Verify,t.createECDH=u(7354);var c=u(3501);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var f=u(9534);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}(),t.exports=l}()},1988:function(t){!function(){"use strict";var e={182:function(t){var e,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!==t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"===typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}b(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"===typeof t.on&&b(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,a;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"===typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,function(t){console&&console.warn&&console.warn(t)}(u)}return t}function f(){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 l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[t];if(void 0===c)return!1;if("function"===typeof c)n(c,this,e);else{var u=c.length,f=p(c,u);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}},a=!0;try{e[t](o,o.exports,n),a=!1}finally{a&&delete r[t]}return o.exports}n.ab="//";var i=n(182);t.exports=i}()},6299:function(t){!function(){var e={162:function(t){var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"===typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,c=[],u=!1,f=-1;function l(){u&&s&&(u=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!u){var t=a(l);u=!0;for(var e=c.length;e;){for(s=c,c=[];++f1)for(var r=1;r2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o;if("string"===typeof e&&function(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))o="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var a=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";o='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(n(e,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},239:function(t,e,r){"use strict";var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(375),a=r(886);r(526)(f,o);for(var s=i(a.prototype),c=0;c0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n)a.endEmitted?E(t,new S):R(t,a,e,!0);else if(a.ended)E(t,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?R(t,a,e,!1):I(t,a)):R(t,a,e,!1)}else n||(a.reading=!1,I(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;f("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(C,t))}function C(t){var e=t._readableState;f("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function I(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){f("readable nexttick read 0"),t.read(0)}function N(t,e){f("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function F(t){var e=t._readableState;f("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(q,e,t))}function q(t,e){if(f("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function H(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):T(this),null;if(0===(t=P(t,e))&&e.ended)return 0===e.length&&F(this),null;var n,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(t){E(this,new _("_read()"))},M.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:v;function s(t,e){f("onunpipe"),t===r&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,h())}function c(){f("onend"),t.end()}i.endEmitted?n.nextTick(o):r.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(r);t.on("drain",u);var l=!1;function h(){f("cleanup"),t.removeListener("close",b),t.removeListener("finish",y),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",v),r.removeListener("data",d),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u()}function d(e){f("ondata");var n=t.write(e);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==H(i.pipes,t))&&!l&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(e){f("onerror",e),v(),t.removeListener("error",p),0===a(t,"error")&&E(t,e)}function b(){t.removeListener("finish",y),v()}function y(){f("onfinish"),t.removeListener("close",b),v()}function v(){f("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",b),t.once("finish",y),t.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(L,this),r},M.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(L,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(N,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new S(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,r){r(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,r){var i=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)}},771:function(t,e,r){"use strict";var i;function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(494),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function b(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[s]=null,t[c]=null,e(p(r,!1)))}}function y(t){n.nextTick(b,t)}var v=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){n.nextTick((function(){t[u]?r(t[u]):e(p(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},o(i,Symbol.asyncIterator,(function(){return this})),o(i,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),i),v);t.exports=function(t){var e,r=Object.create(g,(o(e={},d,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,h,{value:function(t,e){var n=r[d].read();n?(r[l]=null,r[s]=null,r[c]=null,t(p(n,!1))):(r[s]=t,r[c]=e)},writable:!0}),e));return r[l]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[c];return null!==e&&(r[l]=null,r[s]=null,r[c]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[c]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",y.bind(null,r)),r}},914:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e=a.allocUnsafe(t>>>0),r=this.head,n=0;r;)u(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:c,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return e.reduce(f)}},322:function(t,e,r){"use strict";var n=r(833).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},919:function(t,e,r){t.exports=r(781)},313:function(t,e,r){"use strict";var n=r(118).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},121:function(t){function e(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,r){if(e("noDeprecation"))return t;var n=!1;return function(){if(!n){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}}},300:function(t){"use strict";t.exports=r(4406)},361:function(t){"use strict";t.exports=r(1988)},781:function(t){"use strict";t.exports=r(1988).EventEmitter},837:function(t){"use strict";t.exports=r(8853)}},s={};function c(t){var r=s[t];if(void 0!==r)return r.exports;var n=s[t]={exports:{}},i=!0;try{e[t](n,n.exports,c),i=!1}finally{i&&delete s[t]}return n.exports}c.ab="//";var f=c(562);t.exports=f}()},8853:function(t,e,r){var n=r(4406).Buffer,i=r(2907);!function(){var e={901:function(t){t.exports=function(t,r,n){if(t.filter)return t.filter(r,n);if(void 0===t||null===t)throw new TypeError;if("function"!=typeof r)throw new TypeError;for(var i=[],o=0;o-1?i(r):r}},112:function(t,e,r){"use strict";var n=r(517),i=r(91),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(n,a,arguments);if(c&&u){var r=c(e,"length");r.configurable&&u(e,"length",{value:1+f(0,t.length-(arguments.length-1))})}return e};var l=function(){return s(n,o,arguments)};u?u(t.exports,"apply",{value:l}):t.exports.apply=l},91:function(t,e,r){"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(t){try{return Function('"use strict"; return ('+t+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(t){c=null}var u=function(){throw new a},f=c?function(){try{return u}catch(t){try{return c(arguments,"callee").get}catch(t){return u}}}():u,l=r(449)(),h=Object.getPrototypeOf||function(t){return t.__proto__},d=s("async function* () {}"),p=d?d.prototype:n,b=p?p.prototype:n,y="undefined"===typeof Uint8Array?n:h(Uint8Array),v={"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":s("async function () {}"),"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":b?h(b):n,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":s("function* () {}"),"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&l?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?n:Promise,"%Proxy%":"undefined"===typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&l?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"===typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=r(517),w=r(793),_=m.call(Function.call,Array.prototype.concat),S=m.call(Function.apply,Array.prototype.splice),E=m.call(Function.call,String.prototype.replace),A=m.call(Function.call,String.prototype.slice),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,x=function(t){var e=A(t,0,1),r=A(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return E(t,k,(function(t,e,r,i){n[n.length]=r?E(i,M,"$1"):e||t})),n},R=function(t,e){var r,n=t;if(w(g,n)&&(n="%"+(r=g[n])[0]+"%"),w(v,n)){var o=v[n];if("undefined"===typeof o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new a('"allowMissing" argument must be a boolean');var r=x(t),n=r.length>0?r[0]:"",o=R("%"+n+"%",e),s=o.name,u=o.value,f=!1,l=o.alias;l&&(n=l[0],S(r,_([0,1],l)));for(var h=1,d=!0;h=r.length){var g=c(u,p);u=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:u[p]}else d=w(u,p),u=u[p];d&&!f&&(v[s]=u)}}return u}},219:function(t){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var a=0;a1&&"boolean"!==typeof e)throw new a('"allowMissing" argument must be a boolean');var r=M(t),n=r.length>0?r[0]:"",o=x("%"+n+"%",e),s=o.name,u=o.value,f=!1,l=o.alias;l&&(n=l[0],_(r,w([0,1],l)));for(var h=1,d=!0;h=r.length){var g=c(u,p);u=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:u[p]}else d=m(u,p),u=u[p];d&&!f&&(b[s]=u)}}return u}},449:function(t,e,n){"use strict";var i=r.g.Symbol,o=n(545);t.exports=function(){return"function"===typeof i&&("function"===typeof Symbol&&("symbol"===typeof i("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},545:function(t){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},793:function(t,e,r){"use strict";var n=r(517);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},526:function(t){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},312:function(t){"use strict";var e="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(t){return!(e&&t&&"object"===typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===r.call(t)},i=function(t){return!!n(t)||null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Array]"!==r.call(t)&&"[object Function]"===r.call(t.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,t.exports=o?n:i},906:function(t){"use strict";var e=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(t){}}(),s=a?o(a):{};t.exports=function(t){return"function"===typeof t&&(!!n.test(r.call(t))||(i?o(t)===s:"[object GeneratorFunction]"===e.call(t)))}},234:function(t,e,n){"use strict";var i=n(219),o=n(627),a=n(749),s=a("Object.prototype.toString"),c=n(449)()&&"symbol"===typeof Symbol.toStringTag,u=o(),f=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1}return!!d&&function(t){var e=!1;return i(h,(function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}})),e}(t)}},982:function(t,e,r){"use strict";var n=r(879)("%Object.getOwnPropertyDescriptor%");if(n)try{n([],"length")}catch(t){n=null}t.exports=n},536:function(t){t.exports=function(t){return t instanceof n}},3:function(t,e,r){"use strict";var n=r(312),i=r(906),o=r(715),a=r(234);function s(t){return t.call.bind(t)}var c="undefined"!==typeof BigInt,u="undefined"!==typeof Symbol,f=s(Object.prototype.toString),l=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(c)var p=s(BigInt.prototype.valueOf);if(u)var b=s(Symbol.prototype.valueOf);function y(t,e){if("object"!==typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function v(t){return"[object Map]"===f(t)}function g(t){return"[object Set]"===f(t)}function m(t){return"[object WeakMap]"===f(t)}function w(t){return"[object WeakSet]"===f(t)}function _(t){return"[object ArrayBuffer]"===f(t)}function S(t){return"undefined"!==typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function E(t){return"[object DataView]"===f(t)}function A(t){return"undefined"!==typeof DataView&&(E.working?E(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!==typeof Promise&&t instanceof Promise||null!==t&&"object"===typeof t&&"function"===typeof t.then&&"function"===typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||A(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},v.working="undefined"!==typeof Map&&v(new Map),e.isMap=function(t){return"undefined"!==typeof Map&&(v.working?v(t):t instanceof Map)},g.working="undefined"!==typeof Set&&g(new Set),e.isSet=function(t){return"undefined"!==typeof Set&&(g.working?g(t):t instanceof Set)},m.working="undefined"!==typeof WeakMap&&m(new WeakMap),e.isWeakMap=function(t){return"undefined"!==typeof WeakMap&&(m.working?m(t):t instanceof WeakMap)},w.working="undefined"!==typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},_.working="undefined"!==typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=S,E.working="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var k="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(t){return"[object SharedArrayBuffer]"===f(t)}function x(t){return"undefined"!==typeof k&&("undefined"===typeof M.working&&(M.working=M(new k)),M.working?M(t):t instanceof k)}function R(t){return y(t,l)}function O(t){return y(t,h)}function P(t){return y(t,d)}function T(t){return c&&y(t,p)}function C(t){return u&&y(t,b)}e.isSharedArrayBuffer=x,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},e.isGeneratorObject=function(t){return"[object Generator]"===f(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},e.isNumberObject=R,e.isStringObject=O,e.isBooleanObject=P,e.isBigIntObject=T,e.isSymbolObject=C,e.isBoxedPrimitive=function(t){return R(t)||O(t)||P(t)||T(t)||C(t)},e.isAnyArrayBuffer=function(t){return"undefined"!==typeof Uint8Array&&(S(t)||x(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},650:function(t,e,r){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,t,n.depth)}function f(t,e){var r=u.styles[e];return r?"\x1b["+u.colors[r][0]+"m"+t+"\x1b["+u.colors[r][1]+"m":t}function l(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&k(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=h(t,i,n)),i}var o=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(k(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return d(r)}var u,f="",l=!1,S=["{","}"];(b(r)&&(l=!0,S=["[","]"]),k(r))&&(f=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),A(r)&&(f=" "+d(r)),0!==a.length||l&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=l?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(u,f,S)):S[0]+f+S[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),P(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=v(r)?h(t,c.value,null):h(t,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function b(t){return Array.isArray(t)}function y(t){return"boolean"===typeof t}function v(t){return null===t}function g(t){return"number"===typeof t}function m(t){return"string"===typeof t}function w(t){return void 0===t}function _(t){return S(t)&&"[object RegExp]"===M(t)}function S(t){return"object"===typeof t&&null!==t}function E(t){return S(t)&&"[object Date]"===M(t)}function A(t){return S(t)&&("[object Error]"===M(t)||t instanceof Error)}function k(t){return"function"===typeof t}function M(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=i.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(3),e.isArray=b,e.isBoolean=y,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=m,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=w,e.isRegExp=_,e.types.isRegExp=_,e.isObject=S,e.isDate=E,e.types.isDate=E,e.isError=A,e.types.isNativeError=A,e.isFunction=k,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=r(536);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",O(),e.format.apply(e,arguments))},e.inherits=r(526),e._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var T="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var e;if("function"!==typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o1&&"boolean"!==typeof e)throw new a('"allowMissing" argument must be a boolean');var r=M(t),n=r.length>0?r[0]:"",i=x("%"+n+"%",e),o=i.name,s=i.value,u=!1,f=i.alias;f&&(n=f[0],S(r,_([0,1],f)));for(var l=1,h=!0;l=r.length){var p=c(s,d);if(h=!!p,!e&&!(d in s))throw new a("base intrinsic for "+t+" exists, but the property is not available.");s=h&&"get"in p&&!("originalValue"in p.get)?p.get:s[d]}else h=w(s,d),s=s[d];h&&!u&&(v[o]=s)}}return s}},850:function(t,e,r){"use strict";var n=r(227)("%Object.getOwnPropertyDescriptor%");if(n)try{n([],"length")}catch(t){n=null}t.exports=n},627:function(t,e,n){"use strict";var i=n(901);t.exports=function(){return i(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],(function(t){return"function"===typeof r.g[t]}))}}},o={};function a(t){var r=o[t];if(void 0!==r)return r.exports;var n=o[t]={exports:{}},i=!0;try{e[t](n,n.exports,a),i=!1}finally{i&&delete o[t]}return n.exports}a.ab="//";var s=a(650);t.exports=s}()},9286:function(module){var __dirname="/";(function(){var __webpack_modules__={742:function _(__unused_webpack_module,exports){var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r1?1:s,r=.5*(1-Math.cos(Math.PI*a)),n=e.startX+(e.x-e.startX)*r,i=e.startY+(e.y-e.startY)*r,e.method.call(e.scrollable,n,i),n===e.x&&i===e.y||t.requestAnimationFrame(d.bind(t,e))}function p(r,n,a){var c,u,f,l,h=o();r===e.body?(c=t,u=t.scrollX||t.pageXOffset,f=t.scrollY||t.pageYOffset,l=i.scroll):(c=r,u=r.scrollLeft,f=r.scrollTop,l=s),d({scrollable:c,method:l,startTime:h,startX:u,startY:f,x:n,y:a})}}}}()},2040:function(t,e,r){"use strict";r.r(e),r.d(e,{assoc:function(){return l},deepMerge:function(){return _},dissoc:function(){return b},get:function(){return c},merge:function(){return m},update:function(){return g}});var n=Array.prototype.slice;function i(t){return"object"===typeof t}function o(t){if(Array.isArray(t))return t.slice();var e={};for(var r in t)e[r]=t[r];return e}function a(t,e,r){return i(t)&&null!==t&&e in t?t[e]:r}function s(t,e,r){var n=e[0],i=e.slice(1);return a(t,n)&&i.length?s(t[n],i,r):a(t,n,r)}function c(t,e,r){return Array.isArray(e)?s(t,e,r):a(t,e,r)}function u(t,e,r){if(t[e]===r)return t;var n=o(t);return n[e]=r,n}function f(t,e,r){if(s(t,e)===r)return t;var n=e[0],i=e.slice(1),a=o(t);return i.length?a[n]=f(n in a?a[n]:{},i,r):a[n]=r,a}function l(t){for(var e,r,n=arguments,i=arguments.length,o=t,a=1;a>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},8722:function(t){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:500;return function(){clearTimeout(e),e=setTimeout((function(){return t()}),r)}}((function(){return w.projectUserAuth.logout()}));var _=this;this.logout=M(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_.userStore.setLoadingStatus(),_.debouncedLogout();case 2:case"end":return t.stop()}}),t)}))),this.navigateToUserAuthPage=function(t){w.navigationService.navigateToUserAuthPage(t)},this.navigateToMainPage=function(t){w.navigationService.navigateToMainPage(t)},this.navigateToOrderCardOnMainPage=function(t){w.navigationService.navigateToOrderCardOnMainPage(t)},this.navigateToAccountPage=function(t){w.navigationService.navigateToAccountPage(t)},this.setNavigate=function(t){w.navigationService.setNavigate(t)},this.updateLocation=function(){w.trackingService.updateLocation()},this.scrollPageToTop=function(){w.scrollService.scrollPageToTop()},this.scrollToSectionCard=function(){w.scrollService.scrollToElementIntoView(w.clientSections.Card),w.locationService.replaceLocationHash(w.clientSections.Card)},this.scrollToSectionConditions=function(){w.scrollService.scrollToElementIntoView(w.clientSections.Conditions),w.locationService.replaceLocationHash(w.clientSections.Conditions)},this.scrollToSectionInsurance=function(){w.scrollService.scrollToElementIntoView(w.clientSections.Insurance),w.locationService.replaceLocationHash(w.clientSections.Insurance)},this.scrollToHashSection=function(){var t=w.getCurrentLocationHash();w.scrollService.scrollToElementIntoView(t)},this.scrollToElementWithInit=function(t,e){w.scrollService.scrollToElementWithInit(t,e)},this.copy=function(t){var e=w;w.copyStore.getIsCopied()||(setTimeout((function(){e.copyStore.setIsCopied(!1)}),3e3),w.copyStore.setIsCopied(!0),w.copyService.copy(t))},this.openFaqModal=function(){w.modalStore.setFaqCurrentModalType()},this.openPdfModal=function(t){w.modalStore.setPdfCurrentModalType(t)},this.closeModal=function(){w.modalStore.resetCurrentModalType()};var A=this;this.userAnalytics=function(){var t=M(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.projectApi.userAnalytics(e).catch(console.error);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.trackPageLoaded=function(){w.trackingService.trackPageLoaded()},this.trackClickAuthorize=function(t){w.trackingService.trackClickAuthorize(t)},this.trackClickLogout=function(t){w.trackingService.trackClickLogout(t)},this.trackClickFaq=function(t,e){w.trackingService.trackClickFaq(t,e)},this.trackClickFaqItem=function(t){w.trackingService.trackClickFaqItem(t)},this.trackClickNavigateToAccount=function(t){w.trackingService.trackClickNavigateToAccount(t)},this.trackClickTask=function(t){w.trackingService.trackClickTask(t)},this.trackClickBackToMainPage=function(){w.trackingService.trackClickBackToMainPage()},this.trackClickWatchResults=function(t){w.trackingService.trackClickWatchResults(t)},this.trackClickExitFromLoginPage=function(){w.trackingService.trackClickExitFromLoginPage()},this.trackClickConditions=function(){w.trackingService.trackClickConditions()},this.trackClickOrderCard=function(){w.trackingService.trackClickOrderCard()},this.trackClickInsurance=function(t){w.trackingService.trackClickInsurance(t)},this.trackClickOrderInsurance=function(t){w.trackingService.trackClickOrderInsurance(t)},this.trackClickOldProject=function(t,e){w.trackingService.trackClickOldProject(t,e)},this.trackClickCopyCodeWord=function(){w.trackingService.trackClickCopyCodeWord()},this.getCurrentLocationHash=function(){return w.locationService.getHash()};var k=this;this.handleErrorAction=function(){var t=M(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next=t.t0===E._.Logout?3:t.t0===E._.Reload?6:t.t0===E._.LogoutWithReload?8:t.t0===E._.LogoutWithOrderCard?12:17;break;case 3:return k.logout(),k.navigateToMainPage(),t.abrupt("break",17);case 6:case 10:return k.reloadPage(),t.abrupt("break",17);case 8:return t.next=10,k.logout();case 12:return t.next=14,k.logout();case 14:return k.trackingService.trackClickOrderCardOnError(),k.navigateToOrderCardOnMainPage(),t.abrupt("break",17);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.buildErrorData=function(t){var e=w.errorsService.buildErrorData(t);return e.buildResults.isMatched||w.loggerService.handleUnMatchedError(e.breadcrumbs),e}}return t.prototype.init=function(){var t=this;return M(S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.isIframe){e.next=2;break}return e.abrupt("return",t.projectUserAuth.auth());case 2:t.platformService.init(),t.trackingService.updateClientParams(),t.userStore.subscribe((function(e){t.loggerService.log(e)})),t.projectApi.onUnauthorizedHttpErrorProject((function(){t.userStore.setGuestStatus()})),t.projectApi.onHttpErrorBackend((function(e){t.loggerService.handleHttpErrorBackend(e)})),t.projectUserAuth.subscribe((function(e){var r,n;if(t.trackingService.updateClientParams(null===(r=e.data)||void 0===r||null===(n=r.userInfo)||void 0===n?void 0:n.id),t.userStore.setState(e),t.userStore.isLoggedIn()){var i,o;t.trackingService.trackAuthUserValid();var a=null===(i=e.data)||void 0===i?void 0:i.userInfo.serverTime,s=null===(o=e.data)||void 0===o?void 0:o.userInfo.targetAuditoryActualizedAt;a&&s&&t.tasksService.checkIsActiveOffer(a,s)}else if(t.userStore.isError()){var c=t.userStore.getErrorCode();t.trackingService.trackAuthError(c)}else t.userStore.isGuest()&&t.tasksService.reset()})),t.trackingService.subscribeTrackingModuleLoad((function(){t.projectUserAuth.auth()}));case 9:case"end":return e.stop()}}),e)})))()},t}();(0,A.Lj)(x,m.V.projectApi,m.V.projectUserAuth,m.V.config,m.V.navigationService,m.V.locationService,m.V.trackingService,m.V.loggerService,m.V.scrollService,m.V.userStore,m.V.modalStore,m.V.copyStore,m.V.platformService,m.V.clientSections,m.V.copyService,m.V.userAgentService,m.V.errorsService,m.V.tasksService,m.V.envs,m.V.globalWindow);var R=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners=new Set,this.resetState=function(){r.setState(r.initialState)},this.getState=function(){return r.state},this.setState=function(t){var e=r;return r.state=t,r.listeners.forEach((function(t){t(e.state)})),r.state},this.subscribe=function(t){var e=r;return r.listeners.add(t),function(){e.listeners.delete(t)}},this.state=e,this.initialState=e};function O(t){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function P(t,e){return!e||"object"!==C(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function T(t,e){return(T=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var C=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function I(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O(t);if(e){var i=O(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return P(this,r)}}var j,L={isCopied:!1},B=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&T(t,e)}(r,t);var e=I(r);function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=e.call(this,L)).getIsCopied=function(){return t.getState().isCopied},t.setIsCopied=function(e){t.setState({isCopied:e})},t}return r}(R);function N(t){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function D(t,e){return!e||"object"!==F(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function U(t,e){return(U=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(0,A.Lj)(B),function(t){t.Faq="Faq",t.Pdf="Pdf"}(j||(j={}));var F=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function q(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=N(t);if(e){var i=N(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return D(this,r)}}var H={currentModal:null},V=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&U(t,e)}(r,t);var e=q(r);function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=e.call(this,H)).pdfHref="",t.getPdfHref=function(){return t.pdfHref},t.setFaqCurrentModalType=function(){t.setCurrentModalType(j.Faq)},t.setPdfCurrentModalType=function(e){t.setCurrentModalType(j.Pdf),t.pdfHref=e},t.resetCurrentModalType=function(){t.resetState()},t.isFaqCurrentModal=function(){return t.getState().currentModal===j.Faq},t.isPdfCurrentModal=function(){return t.getState().currentModal===j.Pdf},t.setCurrentModalType=function(e){t.setState({currentModal:e})},t}return r}(R);function z(t){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function W(t,e){return!e||"object"!==$(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function K(t,e){return(K=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(0,A.Lj)(V);var G,$=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function Y(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=z(t);if(e){var i=z(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return W(this,r)}}!function(t){t.Active="active",t.WaitForResults="wait_for_results",t.Finished="finished"}(G||(G={}));var J=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&K(t,e)}(r,t);var e=Y(r);function r(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this,{status:t.config.projectFinished.isProjectFinished?G.Finished:t.config.isProjectWaitForResults?G.WaitForResults:G.Active})).resources=t,n.getStatus=function(){return n.getState().status},n.isStatusActive=function(){return n.getState().status===G.Active},n.isStatusWaitForResults=function(){return n.getState().status===G.WaitForResults},n.isStatusFinished=function(){return n.getState().status===G.Finished},n.setStatus=function(t){n.setState({status:t})},n}return r}(R);function Q(t){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function X(t,e){return!e||"object"!==tt(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Z(t,e){return(Z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(0,A.Lj)(J,m.V.resources);var tt=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function et(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Q(t);if(e){var i=Q(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return X(this,r)}}var rt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Z(t,e)}(r,t);var e=et(r);function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=e.call(this,{isOfferActive:!1})).isOfferActive=function(){return t.getState().isOfferActive},t.setOfferActiveValue=function(e){t.setState({isOfferActive:e})},t}return r}(R);(0,A.Lj)(rt);var nt=r(4830),it=r(8755);function ot(t){return(ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function at(t,e){return!e||"object"!==ct(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function st(t,e){return(st=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ct=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function ut(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ot(t);if(e){var i=ot(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return at(this,r)}}var ft=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&st(t,e)}(r,t);var e=ut(r);function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=e.call(this,{status:w.ProjectUserAuthStatus.Loading,error:void 0,data:void 0})).isLoggedIn=function(){return t.getState().status===w.ProjectUserAuthStatus.LoggedIn},t.isError=function(){return t.getState().status===w.ProjectUserAuthStatus.Error},t.isLoading=function(){return t.getState().status===w.ProjectUserAuthStatus.Loading},t.isGuest=function(){return t.getState().status===w.ProjectUserAuthStatus.Guest},t.setLoadingStatus=function(){t.setState({status:w.ProjectUserAuthStatus.Loading,data:void 0,error:void 0})},t.setGuestStatus=function(){t.setState({status:w.ProjectUserAuthStatus.Guest,data:void 0,error:void 0})},t.getUserInfoData=function(){var e=t.getState();if(!e.data)throw new Error("\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0441\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d");return e.data.userInfo},t.getErrorData=function(){if(!t.isError())throw new Error("\u041d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435");return t.getState().error},t.getErrorCode=function(){var e,r,n=t.getErrorData();return e=n,(null!=(r=nt.HttpErrorProject)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](e):e instanceof r)||"errorCode"in n&&"string"===typeof n.errorCode?n.errorCode:t.getErrorData().name},t.getTasksOrFail=function(){if(!t.isLoggedIn())return[];var e=t.getState();if(!e.data)throw new Error("\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c \u0441\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d");return e.data.userInfo.tasks},t.getCurrentTaskOrFail=function(e){return t.getTasksOrFail().find((function(t){return t.title===e}))},t.getIsCurrentTaskDoneOrFail=function(e){var r=t.getCurrentTaskOrFail(e);return!!r&&[it.hY.Done,it.hY.DoneSupport].includes(r.status)},t.getTasksTotalScoreOrFail=function(){return t.getTasksOrFail().filter((function(t){var e=t.status;return[it.hY.Done,it.hY.DoneSupport].includes(e)})).reduce((function(t,e){return t+e.tickets.length}),0)},t.getTasksTicketsOrFail=function(){return t.getTasksOrFail().filter((function(t){var e=t.status;return[it.hY.Done,it.hY.DoneSupport].includes(e)})).map((function(t){return t.tickets})).flat()},t.getHasDriveCreditOrFail=function(){if(!t.isLoggedIn())return!1;var e=t.getState();if(!e.data)throw new Error("\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u043a\u0430\u0440\u0442\u0430\u043c \u0441\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d");return e.data.userInfo.hasDriveCredit},t.getHasDriveDebitOrFail=function(){if(!t.isLoggedIn())return!1;var e=t.getState();if(!e.data)throw new Error("\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u043a\u0430\u0440\u0442\u0430\u043c \u0441\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d");return e.data.userInfo.hasDriveDebit},t.getHasDriverCardsOrFail=function(){return t.getHasDriveDebitOrFail()},t.getHasOsagoTaskDoneOrFail=function(){return!!t.isLoggedIn()&&t.getIsCurrentTaskDoneOrFail(it.OQ.Osago)},t.getHasKaskoTaskDoneOrFail=function(){return!!t.isLoggedIn()&&t.getIsCurrentTaskDoneOrFail(it.OQ.Kasko)},t.getHasInsurancesOrFail=function(){return t.getHasOsagoTaskDoneOrFail()&&t.getHasKaskoTaskDoneOrFail()},t}return r}(R);(0,A.Lj)(ft);var lt=r(391),ht=r(5837),dt=r.n(ht);var pt=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.copy=function(t){dt()(t)}};(0,A.Lj)(pt);var bt=function(){function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gui=e,this.projectStatusStore=r,this.isInit=!1,this.handleChangeLocation=function(t){return n.projectStatusStore.setStatus(t)}}var e=t.prototype;return e.init=function(){this.isInit||(this.isInit=!0,this.guiInstance=this.gui.getInstance(),this.guiInstance.domElement.style.right="0",this.guiInstance.domElement.style.zIndex="2010",this.config={projectStatus:this.projectStatusStore.getStatus()},this.guiInstance.add(this.config,"projectStatus",{active:G.Active,waitForResults:G.WaitForResults,finished:G.Finished}).onChange(this.handleChangeLocation))},e.destroy=function(){var t;null===(t=this.guiInstance)||void 0===t||t.destroy()},t}();(0,A.Lj)(bt,m.V.devPanel,m.V.projectStatusStore);var yt=function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resources=e,this.platformService=r,this.buildErrorData=function(t){var e=n.extractBreadcrumbs(t),r=n.platformService.isMb(),i=n.extractResources(e),o=null!==i&&void 0!==i?i:n.resources.errors.fallback;return{resources:r?o.mb:o.web,breadcrumbs:e,buildResults:{isMatched:"undefined"!==typeof i}}},this.extractBreadcrumbs=function(t){return w.HttpErrorProject.isHttpErrorProject(t)?{httpCode:t.httpCode,errorCode:t.errorCode,requestId:t.requestId}:w.HttpErrorBackend.isHttpErrorBackend(t)?{httpCode:t.response.httpCode}:{}},this.extractResources=function(t){var e=n.resources.errors,r=t.errorCode,i=t.httpCode;if(r){var o=e.errorCodes.find((function(t){return t.errorCodes.includes(r)}));if(o)return o}if(i){var a=e.httpCodes.find((function(t){return t.httpCodes.includes(i)}));if(a)return a}}};(0,A.Lj)(yt,m.V.resources,m.V.platformService);var vt=function t(e){var r,n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.globalWindow=e,this.replaceLocationHash=function(t){var e;null===(e=n.globalWindow)||void 0===e||e.history.replaceState(null,"","#".concat(t))},this.getHash=function(){var t;return null===(t=n.globalWindow)||void 0===t?void 0:t.location.hash.slice(1)},(null===(r=this.globalWindow)||void 0===r?void 0:r.history)&&"scrollRestoration"in this.globalWindow.history&&(this.globalWindow.history.scrollRestoration="manual")};(0,A.Lj)(vt,m.V.globalWindow);var gt=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=e,this.sentryBrowser=r,this.errorNames={ErrorBoundaryError:"ErrorBoundaryError",HttpErrorBackend:"HttpErrorBackend",UnmatchedError:"UnmatchedError",AuthMBError:"AuthMBError"}}var e=t.prototype;return e.handleErrorBoundaryError=function(t){this.error(this.errorNames.ErrorBoundaryError,t)},e.handleAuthMBError=function(t){this.error(this.errorNames.AuthMBError,void 0,t)},e.handleHttpErrorBackend=function(t){this.error(this.errorNames.HttpErrorBackend,t)},e.log=function(t){this.config.isProd||console.log(t)},e.handleUnMatchedError=function(t){this.error(this.errorNames.UnmatchedError,void 0,t)},e.warning=function(t){this.config.isProd||console.warn(t)},e.error=function(t,e,r){this.config.isProd||console.error(t),this.sentryBrowser.captureException({message:t,error:e,payload:r})},t}();(0,A.Lj)(gt,m.V.config,m.V.sentryBrowser);var mt=function(){function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.routes=e,this.clientSections=r,this.navigate=function(){},this.initialized=!1,this.setNavigate=function(t){n.initialized||(n.navigate=t,n.initialized=!0)},this.pageReload=function(){n.navigate(0)}}var e=t.prototype;return e.navigateToMainPage=function(t){this.navigateTo(this.routes.Main,t)},e.navigateToOrderCardOnMainPage=function(t){this.navigateTo(this.routes.Main+"#".concat(this.clientSections.Card),t)},e.navigateToAccountPage=function(t){this.navigateTo(this.routes.Account,t)},e.navigateToUserAuthPage=function(t){this.navigateTo(this.routes.AuthUser,t)},e.navigateTo=function(t,e){this.navigate(t,e)},t}();(0,A.Lj)(mt,m.V.clientRoutes,m.V.clientSections);var wt=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.queryStringService=e,this.init=function(){r.platform=null!==r.queryStringService.getMobileVersion()?"mb":"web"},this.getPlatform=function(){return r.platform},this.isMb=function(){return"mb"===r.platform}};(0,A.Lj)(wt,m.V.queryStringService);var _t=r(8059),St=r.n(_t);function Et(t){return(Et=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function At(t,e){return!e||"object"!==Mt(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function kt(t,e){return(kt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Mt=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function xt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Et(t);if(e){var i=Et(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return At(this,r)}}var Rt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kt(t,e)}(r,t);var e=xt(r);function r(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this,new w.AxiosHttpAdapter(St().create({baseURL:t.APP_PROJECT_API_URL})),new w.HttpRetry)).envs=t,n}return r}(w.HttpClient);function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=Pt(t,2),n=r[0],i=r[1];i&&e.append(n,i.toString())})),e},e.getAuthScenario=function(){return this.getQueryValue(this.keys.authScenario)},e.getMobileVersion=function(){return this.getQueryValue(this.keys.mobileVersion)},e.getAuth=function(){return this.getQueryValue(this.keys.auth)},e.getHttpCode=function(){return this.getQueryValue(this.keys.httpCode)},e.getErrorCode=function(){return this.getQueryValue(this.keys.errorCode)},t}();(0,A.Lj)(Tt,m.V.globalWindow);var Ct=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.globalWindow=e,this.scrollToElementIntoView=function(t){var e=r.globalWindow.document.getElementById(t);null!==e&&r.globalWindow.scrollTo({top:e.getBoundingClientRect().y+r.globalWindow.scrollY,behavior:"smooth"})},this.scrollToElementWithInit=function(t,e){t.current&&(e.current?r.scrollToElement(t.current):e.current=!0)},this.scrollToElement=function(t){r.globalWindow.scrollTo({top:t.getBoundingClientRect().y+r.globalWindow.scrollY,behavior:"smooth"})}}return t.prototype.scrollPageToTop=function(){var t=this,e=setTimeout((function(){t.globalWindow.scrollTo(0,-100),clearTimeout(e)}),100)},t}();(0,A.Lj)(Ct,m.V.globalWindow);var It=3e5,jt=function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.globalWindow=e,this.tasksStore=r,this.userStore=n,this.timeoutId=0,this.checkIsActiveOffer=function(t,e){i.timeoutId&&i.globalWindow.clearTimeout(i.timeoutId);var r=new Date(t),n=new Date(e),o=r.getTime()-n.getTime();if(o>It)i.tasksStore.setOfferActiveValue(!0);else{var a=i;i.tasksStore.setOfferActiveValue(!1);var s=It-o;i.timeoutId=i.globalWindow.setTimeout((function(){a.tasksStore.setOfferActiveValue(!0)}),s)}},this.filterResourcesTasksByUserTasks=function(t){var e=i.userStore.getTasksOrFail();return t.filter((function(t){return e.find((function(e){return e.title===t.title}))}))},this.reset=function(){i.tasksStore.setOfferActiveValue(!1),i.globalWindow.clearTimeout(i.timeoutId)}};(0,A.Lj)(jt,m.V.globalWindow,m.V.tasksStore,m.V.userStore);var Lt=r(4370);var Bt=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.globalWindow=e,this.checkIsSafariBrowser=function(){var t,e;return(null===(t=r.globalWindow)||void 0===t?void 0:t.navigator.userAgent.indexOf(" Safari/"))>=0&&-1===(null===(e=r.globalWindow)||void 0===e?void 0:e.navigator.userAgent.indexOf(" Chrome/"))},this.checkIsIOSVersionLess14=function(){var t,e=null===(t=r.globalWindow)||void 0===t?void 0:t.navigator.userAgent,n=e.substring(e.indexOf("OS "),e.indexOf(")")).split(" "),i=3===n.length?n[2]:n[1],o=parseFloat(i);return(Number.isNaN(o)?Number.MAX_SAFE_INTEGER:o)<14}};function Nt(t,e){var n,i;t.bind(m.V.envs).toConstant(v),t.bind(m.V.resources).toConstant(e),t.bind(m.V.clientRoutes).toConstant(b.r8),t.bind(m.V.clientSections).toConstant(b.OW),t.bind(m.V.globalWindow).toConstant(globalThis.window),t.bind(m.V.config).toConstant((n=t.get(m.V.envs),i=t.get(m.V.globalWindow),{isLocal:n.APP_ENVIRONMENT===b.qA.Local,isStage:n.APP_ENVIRONMENT===b.qA.Stage,isProd:n.APP_ENVIRONMENT===b.qA.Prod,isIframe:i.parent!==i})),t.bind(m.V.httpClientProjectApi).toInstance(Rt).inSingletonScope(),t.bind(m.V.scrollService).toInstance(Ct).inSingletonScope(),t.bind(m.V.userAgentService).toInstance(Bt).inSingletonScope(),t.bind(m.V.sentryBrowser).toInstance((function(){return d.SentryBrowser.getRealOrFake(t.get(m.V.globalWindow))})).inSingletonScope(),t.bind(m.V.loggerService).toInstance(gt).inSingletonScope(),t.bind(m.V.queryStringService).toInstance(Tt).inSingletonScope(),t.bind(m.V.platformService).toInstance(wt).inSingletonScope(),t.bind(m.V.copyService).toInstance(pt).inSingletonScope(),t.bind(m.V.trackingService).toInstance(Lt.e2).inSingletonScope(),t.bind(m.V.localStorageService).toInstance((function(){return(0,lt.initLocalStorage)()})).inSingletonScope(),t.bind(m.V.navigationService).toInstance(mt).inSingletonScope(),t.bind(m.V.locationService).toInstance(vt).inSingletonScope(),t.bind(m.V.errorsService).toInstance(yt).inSingletonScope(),t.bind(m.V.tasksService).toInstance(jt).inSingletonScope();var o="prod"!==b.qA.Prod?r(6135).b:r(7747).g;t.bind(m.V.devPanel).toInstance(o).inSingletonScope(),t.bind(m.V.devPanelService).toInstance(bt).inSingletonScope()}function Dt(t){var e=new A.W2;return Nt(e,t),function(t){t.bind(m.V.projectAuthApi).toInstance(r(192).T).inSingletonScope();var e=t.get(m.V.envs),n=e.APP_SSO_API_URL,i=e.APP_SSO_CLIENT_URL,o=e.APP_PROJECT_URL;t.bind(m.V.projectUserAuth).toInstance((function(){return w.ProjectUserAuthCreator.create({ssoApi:n,ssoClientApi:i,projectApi:t.get(m.V.projectAuthApi),srcOrigin:o})})).inSingletonScope()}(e),function(t){t.bind(m.V.projectApi).toInstance(r(6246).U).inSingletonScope(),t.bind(m.V.userStore).toInstance(ft).inSingletonScope(),t.bind(m.V.modalStore).toInstance(V).inSingletonScope(),t.bind(m.V.copyStore).toInstance(B).inSingletonScope(),t.bind(m.V.projectStatusStore).toInstance(J).inSingletonScope(),t.bind(m.V.tasksStore).toInstance(rt).inSingletonScope(),t.bind(m.V.manager).toInstance(x).inSingletonScope()}(e),e}(0,A.Lj)(Bt,m.V.globalWindow);var Ut=r(6930);function Ft(t){var e=t.children,r=(0,h.useResourcesLoaderContext)(),o=(0,i.useMemo)((function(){return Dt(r)}),[r]);return(0,n.jsx)(Ut.jm,{container:o,children:e})}var qt=r(964),Ht=r(2527),Vt=r.n(Ht),zt=r(6142);function Wt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,i)}function Kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Wt(o,n,i,a,s,"next",t)}function s(t){Wt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Gt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $t(t){return Yt.apply(this,arguments)}function Yt(){return(Yt=Kt(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Vt().replace(e,void 0,{shallow:!0});case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Jt(t){var e=t.children,r=(0,qt.C5)(),i=(0,qt.Ip)(),o=(0,qt.HS)(),a=(0,qt.YS)().config.secretCode;return(0,n.jsx)(zt.SecretCodeChecker,function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]?arguments[4]:"div";(0,u.Z)(this,t),this.parent=e,this.object=r,this.property=n,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(o),this.domElement.classList.add("controller"),this.domElement.classList.add(i),this.$name=document.createElement("div"),this.$name.classList.add("name"),t.nextNameID=t.nextNameID||0,this.$name.id="lil-gui-name-".concat(++t.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(function(t){return t.stopPropagation()})),this.domElement.addEventListener("keyup",(function(t){return t.stopPropagation()})),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(n)}return(0,f.Z)(t,[{key:"name",value:function(t){return this._name=t,this.$name.textContent=t,this}},{key:"onChange",value:function(t){return this._onChange=t,this}},{key:"_callOnChange",value:function(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}},{key:"onFinishChange",value:function(t){return this._onFinishChange=t,this}},{key:"_callOnFinishChange",value:function(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}},{key:"reset",value:function(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.disable(!t)}},{key:"disable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}},{key:"show",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}},{key:"hide",value:function(){return this.show(!1)}},{key:"options",value:function(t){var e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}},{key:"min",value:function(t){return this}},{key:"max",value:function(t){return this}},{key:"step",value:function(t){return this}},{key:"decimals",value:function(t){return this}},{key:"listen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}},{key:"_listenCallback",value:function(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);var t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"setValue",value:function(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}},{key:"updateDisplay",value:function(){return this}},{key:"load",value:function(t){return this.setValue(t),this._callOnFinishChange(),this}},{key:"save",value:function(){return this.getValue()}},{key:"destroy",value:function(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}]),t}(),d=function(t){o(r,t);var e=l(r);function r(t,n,i){var o;return(0,u.Z)(this,r),(o=e.call(this,t,n,i,"boolean","label")).$input=document.createElement("input"),o.$input.setAttribute("type","checkbox"),o.$input.setAttribute("aria-labelledby",o.$name.id),o.$widget.appendChild(o.$input),o.$input.addEventListener("change",(function(){o.setValue(o.$input.checked),o._callOnFinishChange()})),o.$disable=o.$input,o.updateDisplay(),o}return(0,f.Z)(r,[{key:"updateDisplay",value:function(){return this.$input.checked=this.getValue(),this}}]),r}(h);function p(t){var e,r;return(e=t.match(/(#|0x)?([a-f0-9]{6})/i))?r=e[2]:(e=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?r=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(r=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!r&&"#"+r}var b={isPrimitive:!0,match:function(t){return"number"===typeof t},fromHexString:function(t){return parseInt(t.substring(1),16)},toHexString:function(t){return"#"+t.toString(16).padStart(6,0)}},y={isPrimitive:!1,match:function(t){return Array.isArray(t)},fromHexString:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=b.fromHexString(t);e[0]=(n>>16&255)/255*r,e[1]=(n>>8&255)/255*r,e[2]=(255&n)/255*r},toHexString:function(t){var e=(0,n.Z)(t,3),r=e[0],i=e[1],o=e[2],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=r*(a=255/a)<<16^i*a<<8^o*a<<0;return b.toHexString(s)}},v={isPrimitive:!1,match:function(t){return Object(t)===t},fromHexString:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=b.fromHexString(t);e.r=(n>>16&255)/255*r,e.g=(n>>8&255)/255*r,e.b=(255&n)/255*r},toHexString:function(t){var e=t.r,r=t.g,n=t.b,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=e*(i=255/i)<<16^r*i<<8^n*i<<0;return b.toHexString(o)}},g=[{isPrimitive:!0,match:function(t){return"string"===typeof t},fromHexString:p,toHexString:p},b,y,v];var m=function(t){o(r,t);var e=l(r);function r(t,n,i,o){var a,s;return(0,u.Z)(this,r),(a=e.call(this,t,n,i,"color")).$input=document.createElement("input"),a.$input.setAttribute("type","color"),a.$input.setAttribute("tabindex",-1),a.$input.setAttribute("aria-labelledby",a.$name.id),a.$text=document.createElement("input"),a.$text.setAttribute("type","text"),a.$text.setAttribute("spellcheck","false"),a.$text.setAttribute("aria-labelledby",a.$name.id),a.$display=document.createElement("div"),a.$display.classList.add("display"),a.$display.appendChild(a.$input),a.$widget.appendChild(a.$display),a.$widget.appendChild(a.$text),a._format=(s=a.initialValue,g.find((function(t){return t.match(s)}))),a._rgbScale=o,a._initialValueHexString=a.save(),a._textFocused=!1,a.$input.addEventListener("input",(function(){a._setValueFromHexString(a.$input.value)})),a.$input.addEventListener("blur",(function(){a._callOnFinishChange()})),a.$text.addEventListener("input",(function(){var t=p(a.$text.value);t&&a._setValueFromHexString(t)})),a.$text.addEventListener("focus",(function(){a._textFocused=!0,a.$text.select()})),a.$text.addEventListener("blur",(function(){a._textFocused=!1,a.updateDisplay(),a._callOnFinishChange()})),a.$disable=a.$text,a.updateDisplay(),a}return(0,f.Z)(r,[{key:"reset",value:function(){return this._setValueFromHexString(this._initialValueHexString),this}},{key:"_setValueFromHexString",value:function(t){if(this._format.isPrimitive){var e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}},{key:"save",value:function(){return this._format.toHexString(this.getValue(),this._rgbScale)}},{key:"load",value:function(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}},{key:"updateDisplay",value:function(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}]),r}(h),w=function(t){o(r,t);var e=l(r);function r(t,n,i){var o;return(0,u.Z)(this,r),(o=e.call(this,t,n,i,"function")).$button=document.createElement("button"),o.$button.appendChild(o.$name),o.$widget.appendChild(o.$button),o.$button.addEventListener("click",(function(t){t.preventDefault(),o.getValue().call(o.object),o._callOnChange()})),o.$button.addEventListener("touchstart",(function(){}),{passive:!0}),o.$disable=o.$button,o}return r}(h),_=function(t){o(r,t);var e=l(r);function r(t,n,i,o,a,s){var c;(0,u.Z)(this,r),(c=e.call(this,t,n,i,"number"))._initInput(),c.min(o),c.max(a);var f=void 0!==s;return c.step(f?s:c._getImplicitStep(),f),c.updateDisplay(),c}return(0,f.Z)(r,[{key:"decimals",value:function(t){return this._decimals=t,this.updateDisplay(),this}},{key:"min",value:function(t){return this._min=t,this._onUpdateMinMax(),this}},{key:"max",value:function(t){return this._max=t,this._onUpdateMinMax(),this}},{key:"step",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this._step=t,this._stepExplicit=e,this}},{key:"updateDisplay",value:function(){var t=this.getValue();if(this._hasSlider){var e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=100*e+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}},{key:"_initInput",value:function(){var t=this;this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;var e,r,n,i,o,a=function(e){var r=parseFloat(t.$input.value);isNaN(r)||(t._snapClampSetValue(r+e),t.$input.value=t.getValue())},s=!1,c=function(a){if(s){var c=a.clientX-e,f=a.clientY-r;Math.abs(f)>5?(a.preventDefault(),t.$input.blur(),s=!1,t._setDraggingStyle(!0,"vertical")):Math.abs(c)>5&&u()}if(!s){var l=a.clientY-n;o-=l*t._step*t._arrowKeyMultiplier(a),i+o>t._max?o=t._max-i:i+oMath.abs(a)?c(n):(window.removeEventListener("touchmove",t),window.removeEventListener("touchend",f))}else n.preventDefault(),i(n.touches[0].clientX)},f=function e(){t._callOnFinishChange(),t._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",e)},l=this._callOnFinishChange.bind(this);this.$slider.addEventListener("mousedown",(function(e){t._setDraggingStyle(!0),i(e.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",a)})),this.$slider.addEventListener("touchstart",(function(n){n.touches.length>1||(t._hasScrollBar?(e=n.touches[0].clientX,r=n.touches[0].clientY,s=!0):c(n),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",f))}),{passive:!1}),this.$slider.addEventListener("wheel",(function(e){if(!(Math.abs(e.deltaX)1&&void 0!==arguments[1]?arguments[1]:"horizontal";this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle("lil-gui-".concat(e),t)}},{key:"_getImplicitStep",value:function(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}},{key:"_onUpdateMinMax",value:function(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}},{key:"_normalizeMouseWheel",value:function(t){var e=t.deltaX,r=t.deltaY;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,r=-t.wheelDelta/120,r*=this._stepExplicit?1:10),e+-r}},{key:"_arrowKeyMultiplier",value:function(t){var e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}},{key:"_snap",value:function(t){var e=0;return this._hasMin?e=this._min:this._hasMax&&(e=this._max),t-=e,t=Math.round(t/this._step)*this._step,t+=e,t=parseFloat(t.toPrecision(15))}},{key:"_clamp",value:function(t){return tthis._max&&(t=this._max),t}},{key:"_snapClampSetValue",value:function(t){this.setValue(this._clamp(this._snap(t)))}},{key:"_hasScrollBar",get:function(){var t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}},{key:"_hasMin",get:function(){return void 0!==this._min}},{key:"_hasMax",get:function(){return void 0!==this._max}}]),r}(h),S=function(t){o(r,t);var e=l(r);function r(t,n,i,o){var a;return(0,u.Z)(this,r),(a=e.call(this,t,n,i,"option")).$select=document.createElement("select"),a.$select.setAttribute("aria-labelledby",a.$name.id),a.$display=document.createElement("div"),a.$display.classList.add("display"),a.$select.addEventListener("change",(function(){a.setValue(a._values[a.$select.selectedIndex]),a._callOnFinishChange()})),a.$select.addEventListener("focus",(function(){a.$display.classList.add("focus")})),a.$select.addEventListener("blur",(function(){a.$display.classList.remove("focus")})),a.$widget.appendChild(a.$select),a.$widget.appendChild(a.$display),a.$disable=a.$select,a.options(o),a}return(0,f.Z)(r,[{key:"options",value:function(t){var e=this;return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach((function(t){var r=document.createElement("option");r.textContent=t,e.$select.appendChild(r)})),this.updateDisplay(),this}},{key:"updateDisplay",value:function(){var t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=-1===e?t:this._names[e],this}}]),r}(h),E=function(t){o(r,t);var e=l(r);function r(t,n,i){var o;return(0,u.Z)(this,r),(o=e.call(this,t,n,i,"string")).$input=document.createElement("input"),o.$input.setAttribute("type","text"),o.$input.setAttribute("spellcheck","false"),o.$input.setAttribute("aria-labelledby",o.$name.id),o.$input.addEventListener("input",(function(){o.setValue(o.$input.value)})),o.$input.addEventListener("keydown",(function(t){"Enter"===t.code&&o.$input.blur()})),o.$input.addEventListener("blur",(function(){o._callOnFinishChange()})),o.$widget.appendChild(o.$input),o.$disable=o.$input,o.updateDisplay(),o}return(0,f.Z)(r,[{key:"updateDisplay",value:function(){return this.$input.value=this.getValue(),this}}]),r}(h),A='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n font-weight: 600;\n padding: 0 var(--padding);\n width: 100%;\n text-align: left;\n background: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25be";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25b8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n border: none;\n}\n.lil-gui .controller button {\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n}\n@media (hover: hover) {\n .lil-gui .controller button:hover {\n background: var(--hover-color);\n }\n .lil-gui .controller button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui .controller button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function k(t){var e=document.createElement("style");e.innerHTML=t;var r=document.querySelector("head link[rel=stylesheet], head style");r?document.head.insertBefore(e,r):document.head.appendChild(e)}var M=!1,x=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.parent,i=r.autoPlace,o=void 0===i?void 0===n:i,a=r.container,s=r.width,c=r.title,f=void 0===c?"Controls":c,l=r.closeFolders,h=void 0!==l&&l,d=r.injectStyles,p=void 0===d||d,b=r.touchStyles,y=void 0===b||b;if((0,u.Z)(this,t),this.parent=n,this.root=n?n.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("button"),this.$title.classList.add("title"),this.$title.setAttribute("aria-expanded",!0),this.$title.addEventListener("click",(function(){return e.openAnimated(e._closed)})),this.$title.addEventListener("touchstart",(function(){}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(f),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),y&&this.domElement.classList.add("allow-touch-styles"),!M&&p&&(k(A),M=!0),a?a.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this._closeFolders=h}return(0,f.Z)(t,[{key:"add",value:function(t,e,r,n,i){if(Object(r)===r)return new S(this,t,e,r);var o=t[e];switch(typeof o){case"number":return new _(this,t,e,r,n,i);case"boolean":return new d(this,t,e);case"string":return new E(this,t,e);case"function":return new w(this,t,e)}console.error("gui.add failed\n\tproperty:",e,"\n\tobject:",t,"\n\tvalue:",o)}},{key:"addColor",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new m(this,t,e,r)}},{key:"addFolder",value:function(e){var r=new t({parent:this,title:e});return this.root._closeFolders&&r.close(),r}},{key:"load",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.controllers&&this.controllers.forEach((function(e){e instanceof w||e._name in t.controllers&&e.load(t.controllers[e._name])})),e&&t.folders&&this.folders.forEach((function(e){e._title in t.folders&&e.load(t.folders[e._title])})),this}},{key:"save",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={controllers:{},folders:{}};return this.controllers.forEach((function(t){if(!(t instanceof w)){if(t._name in e.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));e.controllers[t._name]=t.save()}})),t&&this.folders.forEach((function(t){if(t._title in e.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));e.folders[t._title]=t.save()})),e}},{key:"open",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}},{key:"close",value:function(){return this.open(!1)}},{key:"_setClosed",value:function(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}},{key:"show",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}},{key:"hide",value:function(){return this.show(!1)}},{key:"openAnimated",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((function(){var r=t.$children.clientHeight;t.$children.style.height=r+"px",t.domElement.classList.add("transition");t.$children.addEventListener("transitionend",(function e(r){r.target===t.$children&&(t.$children.style.height="",t.domElement.classList.remove("transition"),t.$children.removeEventListener("transitionend",e))}));var n=e?t.$children.scrollHeight:0;t.domElement.classList.toggle("closed",!e),requestAnimationFrame((function(){t.$children.style.height=n+"px"}))})),this}},{key:"title",value:function(t){return this._title=t,this.$title.textContent=t,this}},{key:"reset",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=t?this.controllersRecursive():this.controllers;return e.forEach((function(t){return t.reset()})),this}},{key:"onChange",value:function(t){return this._onChange=t,this}},{key:"_callOnChange",value:function(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}},{key:"onFinishChange",value:function(t){return this._onFinishChange=t,this}},{key:"_callOnFinishChange",value:function(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}},{key:"onOpenClose",value:function(t){return this._onOpenClose=t,this}},{key:"_callOnOpenClose",value:function(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}},{key:"destroy",value:function(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((function(t){return t.destroy()}))}},{key:"controllersRecursive",value:function(){var t=Array.from(this.controllers);return this.folders.forEach((function(e){t=t.concat(e.controllersRecursive())})),t}},{key:"foldersRecursive",value:function(){var t=Array.from(this.folders);return this.folders.forEach((function(e){t=t.concat(e.foldersRecursive())})),t}}]),t}();var R=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.getInstance=function(){return t.instance||(t.instance=new x),t.instance},t}()},6605:function(t,e,r){"use strict";var n,i;r.d(e,{_:function(){return i},j:function(){return n}}),function(t){t.SSOTokenNotActive="B4100",t.CampaignNameAlreadyExist="B4111",t.AuthSiebelIdIsNotDefinedError="B4101",t.UserNotFoundError="B4102",t.InvalidCitizenship="B4103",t.InvalidUserInfoError="B4109",t.CampaignDoesNotExistError="B4110",t.UserBanned="B4444",t.SiebelIdIsNotDefined="B4104",t.BmsBankTransactionNotFoundError="B4105",t.InsuranceKaskoNotFoundError="B4106",t.InsuranceOsagoNotFoundError="B4107",t.NotificationNotFoundError="B4108",t.KaskoPromocodeUploadError="B4112",t.ProjectUserIsNotDefined="B4201",t.ProjectEndError="B4115",t.InvalidAgeError="B4116",t.UserIsNotClient="B4307",t.ProductLoyalties="B5103",t.UnauthorizedError="B4001",t.BadRequest="B4002",t.HeaderValidation="B4003",t.NotFound="B4004",t.RequestValidation="B4005",t.InternalServer="B5001",t.QueryFailed="B5002",t.GetUserIdEmptyPayload="B4010",t.GetPortalUserId="B5010",t.SsoTokenIntrospectError="B5020",t.SsoUserInfoError="B5021",t.GetProductLoyaltiesV2="B5022",t.ActivePrimaryDetailRequestError="B5026",t.BundleAllRequestError="B5025",t.TestError="F9999",t.MbUserGuestError="F2001",t.UnknownError="U0001"}(n||(n={})),function(t){t.LogoutWithOrderCard="LogoutWithOrderCard",t.LogoutWithReload="LogoutWithReload",t.Logout="Logout",t.Reload="Reload"}(i||(i={}))},6246:function(t,e,r){"use strict";r.d(e,{U:function(){return u}});var n=r(5972),i=r.n(n),o=r(7188),a=r(4322),s=r(7764);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,i)}var u=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.httpClientProjectApi=e,this.onUnauthorizedHttpErrorProject=function(t){return r.httpClientProjectApi.subscribe("error",(function(e){s.HttpErrorProject.isHttpErrorProject(e)&&e.httpCode===s.HttpStatus.UNAUTHORIZED&&t(e)}))},this.onHttpErrorBackend=function(t){return r.httpClientProjectApi.subscribe("error",(function(e){s.HttpErrorProject.isHttpErrorProject(e)||t(e)}))};var n=this;this.userAnalytics=function(){var t,e=(t=i().mark((function t(e){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.httpClientProjectApi.patch({url:"/v1/users/analytics",query:{userAnalyticsType:e}});case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()};(0,a.Lj)(u,o.V.httpClientProjectApi)},192:function(t,e,r){"use strict";r.d(e,{T:function(){return l}});var n=r(7188),i=r(4322),o=r(7764);function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=function(t){return t&&"undefined"!==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function f(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=a(t);if(e){var i=a(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(r,t);var e=f(r);function r(t,n,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(a=e.call(this,t,o.PROJECT_API_OPTIONS,i.document)).httpClientProjectApi=t,a.queryString=n,a.globalWindow=i,a}return r}(o.ProjectApi);(0,i.Lj)(l,n.V.httpClientProjectApi,n.V.queryStringService,n.V.globalWindow)},4370:function(t,e,r){"use strict";r.d(e,{EP:function(){return u},Ob:function(){return f},Og:function(){return l},Si:function(){return s},Vb:function(){return i},e2:function(){return y},gY:function(){return a},gp:function(){return c},i3:function(){return n},nE:function(){return o}});var n,i,o,a,s,c,u,f,l,h=r(7188),d=r(4322),p=r(3925);function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.MercDubrovsky22="merc_dubrovsky_22",t.CorvetteZavozin22="corvette_zavozin_22",t.TeslaAcademeg23="tesla_academeg_23",t.LadaAcademeg23="lada_academeg_23",t.LadaAcademeg24="lada_academeg_24",t.TeslaRozetked24="tesla_rozetked_24"}(n||(n={})),function(t){t.Draw="draw",t.Winners="winners",t.Rules="rules"}(i||(i={})),function(t){t.Icon="authorization_icon",t.BelowCars="button_below_cars",t.HowToParticipate="button_how_to_participate",t.CodeWord="button_code_word"}(o||(o={})),function(t){t.Main="logout_main",t.Account="logout_lk"}(a||(a={})),function(t){t.Header="header",t.Bottom="bottom"}(s||(s={})),function(t){t.Main="main",t.Account="lk"}(c||(c={})),function(t){t.Blogger="blogger",t.Second="second"}(u||(u={})),function(t){t.Main="lk_main",t.Scroll="lk_scroll"}(f||(f={})),function(t){t.DriveCardDebit="debit_drive_purchase_10k",t.Osago="osago",t.Kasko="kasko",t.Fuel="fuel_1500",t.SavingAccount="saving_1k",t.Lekar="lekar_3k",t.CityDrive500="citydrive_500",t.CityDrive300="citydrive_300",t.Deposit="deposit_50k",t.KolesaDarom="kolesa_darom"}(l||(l={}));var y=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.platformService=e,this.tracking=(0,p.createTracking)(),this.clientParams={specScreenType:void 0,specDbId:void 0},this.updateClientParams=function(t){r.clientParams={specDbId:t,specScreenType:r.getSpecScreenType()}},this.updateLocation=function(){r.tracking.updateLocation()},this.subscribeTrackingModuleLoad=function(t){var e=r;r.tracking.subscribeTrackingPageLoad((function(){e.tracking.saveTrackingStateToCookie(),t()}))},this.trackPageLoaded=function(){r.sendExtendedEvent("specAction1")},this.trackClickAuthorize=function(t){r.sendExtendedEvent("specAction2",{specVar:t})},this.trackClickConditions=function(){r.sendExtendedEvent("specAction3")},this.trackClickOrderCard=function(){r.sendExtendedEvent("specAction4")},this.trackClickNavigateToAccount=function(t){r.sendExtendedEvent("specAction5",{specVar:t})},this.trackClickInsurance=function(t){r.sendExtendedEvent("specAction6",{specVar:t})},this.trackClickLogout=function(t){r.sendExtendedEvent("specAction8",{specVar:t})},this.trackClickBackToMainPage=function(){r.sendExtendedEvent("specAction9")},this.trackClickExitFromLoginPage=function(){r.sendExtendedEvent("specAction10")},this.trackClickTask=function(t){r.sendExtendedEvent("specAction11",{specVar:t})},this.trackClickOldProject=function(t,e){r.sendExtendedEvent("specAction12",{specVar:t,specVar2:e})},this.trackClickFaq=function(t,e){r.sendExtendedEvent("specAction13",{specVar:t,specVar2:e})},this.trackClickFaqItem=function(t){r.sendExtendedEvent("specAction14",{specVar:t})},this.trackClickWatchResults=function(t){r.sendExtendedEvent("specAction15",{specVar:t})},this.trackClickOrderInsurance=function(t){r.sendExtendedEvent("specAction16",{specVar:t})},this.trackClickOrderCardOnError=function(){r.sendExtendedEvent("specAction17")},this.trackClickCopyCodeWord=function(){r.sendExtendedEvent("specAction18")},this.sendExtendedEvent=function(t,e){r.tracking.sendEvent(t,r.addClientParamsToEventData(e))},this.addClientParamsToEventData=function(t){var e=t?function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r{const a=o(!1),s=r?null:a,c=n.useMemo((()=>{const t=e.clone();return s&&t.extend(s),t}),[e,s]);return n.createElement(i.Provider,{value:c},t)},s=n.createContext([]),c=()=>n.useContext(s),u=(...t)=>t.map((t=>()=>(t=>{const e=o(),r=c();return n.useMemo((()=>e.get(t,r)),[t,r,e])})(t)))},4322:function(t,e,r){"use strict";r.d(e,{Lj:function(){return E},W2:function(){return S},r:function(){return b}});var n,i,o,a,s=new WeakMap,c=new Map,u=new Map;(i=n||(n={}))[i.Constant=0]="Constant",i[i.Instance=1]="Instance",i[i.Factory=2]="Factory",(a=o||(o={}))[a.Container=0]="Container",a[a.Resolution=1]="Resolution",a[a.Singleton=2]="Singleton",a[a.Transient=3]="Transient";var f=class{constructor(t){this.impl=t,this.type=n.Instance}},l=class extends f{constructor(){super(...arguments),this.scope=o.Container,this.cache=new WeakMap}},h=class extends f{constructor(){super(...arguments),this.scope=o.Resolution}},d=class extends f{constructor(t){super(t),this.impl=t,this.scope=o.Singleton}},p=class extends f{constructor(){super(...arguments),this.scope=o.Transient}},b=t=>{const e=Symbol(t);return{__t:null,__d:t,__s:e,__o:!1,optional:{__t:null,__d:t,__s:e,__o:!0}}},y=class{constructor(){this.parent=null,this.map=new Map}set(t,e,r=y.notag){const n=this.map.get(e.__s);n?n.set(r,t):this.map.set(e.__s,(new Map).set(r,t))}find(t,e,r){const n=this.map.get(t.__s);if(void 0!==n){if(r){const t=n.get(r);if(t)return t}if(e)for(let t=0,r=e.length;t{e.map.set(n,t(r))})),e}clone(){return this.from((t=>new Map(t)))}},v=y;v.notag=Symbol("NO_TAG");var g=class{constructor(t,e){this.vault=t,this.condition=e}static vault(t){return t.vault}bind(t){return new class{constructor(t,e,r){this.vault=t,this.token=e,this.condition=r}toConstant(t){this.vault.set(new class{constructor(t){this.impl=t,this.type=n.Constant}}(t),this.token,this.condition)}toFactory(t,e){this.vault.set(new class{constructor(t){this.impl=t,this.type=n.Factory}}({creator:t,initializer:e}),this.token,this.condition)}toInstance(t){return new class{constructor(t,e,r,n){this.vault=t,this.impl=e,this.token=r,this.condition=n}inContainerScope(){this.set(l)}inResolutionScope(){this.set(h)}inSingletonScope(){this.set(d)}inTransientScope(){this.set(p)}set(t){this.vault.set(new t(this.impl),this.token,this.condition)}}(this.vault,t,this.token,this.condition)}}(this.vault,t,this.condition)}use(...t){return new class{constructor(t,e,r,n){this.vault=t,this.tokens=e,this.getVault=r,this.condition=n}from(t){const{tokens:e}=this;for(let r=0,n=e.length;rthis.resolveToken(t,r,n,e.split())))}resolveToken(t,e,r,n=new _){const i=this.vault.get(t,n,e,r);if(i)return this.resolveBinding(i,n);if(!t.__o)throw new Error(`No matching bindings found for '${t.__d}' token.`)}resolveBinding(t,e){return(t=>t.type===n.Instance)(t)?(t=>t.scope===o.Singleton)(t)?this.resolveCache(t,e,(()=>t.cache),(e=>{t.cache=e})):(t=>t.scope===o.Container)(t)?this.resolveCache(t,e,(()=>t.cache.get(this.vault)),(e=>{t.cache.set(this.vault,e)})):(t=>t.scope===o.Resolution)(t)?this.resolveCache(t,e,(()=>e.instances.get(t)),(r=>{e.instances.set(t,r)})):this.createInstance(t.impl,e):(t=>t.type===n.Factory)(t)?(...r)=>{const n=this.createInstance(t.impl.creator,e);return n instanceof Promise?n.then((e=>S.resolveInitialization(e,r,t.impl.initializer))):S.resolveInitialization(n,r,t.impl.initializer)}:t.impl}resolveCache(t,e,r,n){const i=r();if(void 0!==i)return i;const o=this.createInstance(t.impl,e);return n(o),o}createInstance(t,e){const r=this.getParameters(t,e),n=s.get(t);if(void 0!==n)return n?t(...r):new t(...r);try{const e=t(...r);return s.set(t,!0),e}catch(i){const e=new t(...r);return s.set(t,!1),e}}getParameters(t,e){const r=c.get(t);if(r)return this.resolveTokens(r,e,u.get(t),t);if(0===t.length)return[];throw new Error(`Missing required 'injected' registration of '${t.name}'`)}static resolveInitialization(t,e,r){const n=null==r?void 0:r(t,...e);return n instanceof Promise?n.then((()=>t)):t}},E=(t,...e)=>(c.set(t,e),t)}},function(t){var e=function(e){return t(t.s=e)};t.O(0,[774,179],(function(){return e(6840),e(6535)}));var r=t.O();_N_E=r}]);