@dodoex/wallet-web3 0.5.4 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tslib-6e4ae2f5.js +1 -0
- package/dist/{alchemy-provider-5870b6fa-7183581f.js → alchemy-provider-5870b6fa-bb821a34.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-d5a91aac.js → alchemy-websocket-provider-213da986-702b5398.js} +1 -1
- package/dist/{blocto-0ec2fc36.js → blocto-c38e644a.js} +1 -1
- package/dist/browser-3f7e560e.js +1 -0
- package/dist/{ccip-d1141d3a.js → ccip-86a505f2.js} +1 -1
- package/dist/cjs/__tslib-44b18af7.cjs +1 -0
- package/dist/cjs/{alchemy-provider-5870b6fa-94b8a05d.cjs → alchemy-provider-5870b6fa-38f9ed80.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-cb2dca69.cjs → alchemy-websocket-provider-213da986-fb48ef07.cjs} +1 -1
- package/dist/cjs/{blocto-c4470598.cjs → blocto-7eb7575b.cjs} +1 -1
- package/dist/cjs/browser-d0e333da.cjs +1 -0
- package/dist/cjs/{ccip-466d4e59.cjs → ccip-a63a44a2.cjs} +1 -1
- package/dist/cjs/{draggabilly-53856a31.cjs → draggabilly-76e13056.cjs} +1 -1
- package/dist/cjs/id-749531a6.cjs +1 -0
- package/dist/cjs/{index-76cccf0c.cjs → index-0029a709.cjs} +1 -1
- package/dist/cjs/index-10979fb2.cjs +1 -0
- package/dist/cjs/{index-86ef4f22.cjs → index-3617a04a.cjs} +1 -1
- package/dist/cjs/index-563a38d7.cjs +27 -0
- package/dist/cjs/{index-9d9946f3.cjs → index-56a82537.cjs} +7 -7
- package/dist/cjs/index-6c5027af.cjs +15 -0
- package/dist/cjs/index-7eb41eb1.cjs +2 -0
- package/dist/cjs/{index-c4c73f44.cjs → index-a19ffa92.cjs} +1 -1
- package/dist/cjs/{index-6aa1755b.cjs → index-aa28e9f9.cjs} +2 -2
- package/dist/cjs/index-b64e1d7e.cjs +1 -0
- package/dist/cjs/{index-9075d9c2.cjs → index-cc156a43.cjs} +1 -1
- package/dist/cjs/{index-56fff369.cjs → index-df00325f.cjs} +1 -1
- package/dist/cjs/{index-63b5eebb.cjs → index-e85aaa9d.cjs} +1 -1
- package/dist/cjs/index-ef8a01c5.cjs +16 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.es-f6621022.cjs +9 -0
- package/dist/cjs/{interface-d5ec613a.cjs → interface-d50ce16b.cjs} +1 -1
- package/dist/cjs/lib-typedarrays-82021648.cjs +1 -0
- package/dist/cjs/mm-install-modal_2.entry-4950a7e9.cjs +1 -0
- package/dist/cjs/{portis-9af3489b.cjs → portis-3a895975.cjs} +1 -1
- package/dist/cjs/rainbow-6579e86d.cjs +1 -0
- package/dist/cjs/sha224-ed46e71e.cjs +1 -0
- package/dist/cjs/{sha256-6785be1d.cjs → sha256-d1b2312d.cjs} +1 -1
- package/dist/cjs/{typed-data-a102eb38.cjs → typed-data-460b86be.cjs} +1 -1
- package/dist/cjs/uAuth-37ec9004.cjs +1 -0
- package/dist/cjs/{walletConnect-d4368503.cjs → walletConnect-333618c1.cjs} +1 -1
- package/dist/cjs/{walletLink-1b5e5056.cjs → walletLink-1bbb754c.cjs} +2 -2
- package/dist/{draggabilly-96bd4e8a.js → draggabilly-9c13a931.js} +1 -1
- package/dist/id-72e0c1a1.js +1 -0
- package/dist/index-06f6f79c.js +27 -0
- package/dist/{index-29d50f5e.js → index-2c7120ea.js} +1 -1
- package/dist/index-3354aa33.js +15 -0
- package/dist/{index-d9690f1f.js → index-352a03ce.js} +1 -1
- package/dist/{index-de489272.js → index-46da6d5f.js} +7 -7
- package/dist/{index-ec77233b.js → index-4b6b9842.js} +1 -1
- package/dist/{index-9a72391b.js → index-69adc195.js} +1 -1
- package/dist/index-754d059b.js +1 -0
- package/dist/index-7b0eeb5c.js +1 -0
- package/dist/index-a3d1a073.js +16 -0
- package/dist/{index-aa09ffe2.js → index-b0e82b69.js} +1 -1
- package/dist/{index-b27ec2be.js → index-badfa46e.js} +1 -1
- package/dist/{index-25f5dd77.js → index-e3d55f2e.js} +1 -1
- package/dist/index-fcb3d760.js +2 -0
- package/dist/index.es-2327b5db.js +9 -0
- package/dist/index.js +1 -1
- package/dist/{interface-501ba1ce.js → interface-367d293e.js} +1 -1
- package/dist/lib-typedarrays-3210a74e.js +1 -0
- package/dist/mm-install-modal_2.entry-e9e33358.js +1 -0
- package/dist/{portis-59e75b95.js → portis-0126b01f.js} +1 -1
- package/dist/rainbow-46822247.js +1 -0
- package/dist/sha224-58bed7be.js +1 -0
- package/dist/{sha256-cdb06d7c.js → sha256-ad86865d.js} +1 -1
- package/dist/{typed-data-d46cb643.js → typed-data-cc0c21ba.js} +1 -1
- package/dist/uAuth-e9b4faa5.js +1 -0
- package/dist/{walletConnect-23af88ec.js → walletConnect-a7ad9f23.js} +1 -1
- package/dist/{walletLink-782b101e.js → walletLink-a6e7bead.js} +2 -2
- package/package.json +2 -2
- package/dist/cjs/id-07cfd31e.cjs +0 -1
- package/dist/cjs/index-af8c9c8e.cjs +0 -15
- package/dist/cjs/index-b82ccec9.cjs +0 -9
- package/dist/cjs/index.es-d9e722ea.cjs +0 -9
- package/dist/cjs/lib-typedarrays-afe9c8e7.cjs +0 -1
- package/dist/cjs/rainbow-4b5d0839.cjs +0 -1
- package/dist/cjs/sha224-8f3f5508.cjs +0 -1
- package/dist/cjs/uAuth-22dae0a4.cjs +0 -1
- package/dist/cjs/v4-3e682452.cjs +0 -1
- package/dist/id-6dc2a6aa.js +0 -1
- package/dist/index-0534a22e.js +0 -15
- package/dist/index-66392fdc.js +0 -9
- package/dist/index.es-d60f6859.js +0 -9
- package/dist/lib-typedarrays-5ac4ff04.js +0 -1
- package/dist/rainbow-2c04e9df.js +0 -1
- package/dist/sha224-b20bdf3b.js +0 -1
- package/dist/uAuth-a93ad1ec.js +0 -1
- package/dist/v4-95658a31.js +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{c as e,y as t,ar as n,as as r,at as i,au as s,av as o,aw as a,ax as u,ay as c,az as l,aA as h,$ as d,z as f}from"./index-46da6d5f.js";import{Buffer as p}from"buffer";import"@ethersproject/address";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/abstract-signer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";var m,g,v={exports:{}};function _(){if(g)return m;g=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,s=365.25*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return m=function(a,u){u=u||{};var c=typeof a;if("string"===c&&a.length>0)return function(o){if((o=String(o)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(i){var s=Math.abs(i);if(s>=r)return o(i,s,r,"day");if(s>=n)return o(i,s,n,"hour");if(s>=t)return o(i,s,t,"minute");if(s>=e)return o(i,s,e,"second");return i+" ms"}(a):function(i){var s=Math.abs(i);if(s>=r)return Math.round(i/r)+"d";if(s>=n)return Math.round(i/n)+"h";if(s>=t)return Math.round(i/t)+"m";if(s>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}}var w=function(e){function t(e){let r,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(r||i);n.diff=s,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=_(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=w(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(v,v.exports);var y=v.exports,b={exports:{}};b.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,u=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===a)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),s=u(n(94)),o=u(n(95)),a=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),u=a.default.find(o,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=a.default.find(o,(function(e){return t.isPlatform(e)}));if(l){var h=this.satisfies(n[l]);if(void 0!==h)return h}}if(s>0){var d=Object.keys(i),f=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}});var E=t(b.exports);class k extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...s}=e,{path:o}=e,a=0===o.length?r:`At path: ${o.join(".")} -- ${r}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function A(e){return"object"==typeof e&&null!==e}function S(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function C(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:s}=t,{type:o}=n,{refinement:a,message:u=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${S(r)}\``}=e;return{value:r,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*I(e,t,n,r){(function(e){return A(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=C(i,t,n,r);e&&(yield e)}}function*R(e,t,n={}){const{path:r=[],branch:i=[e],coerce:s=!1,mask:o=!1}=n,a={path:r,branch:i};if(s&&(e=t.coercer(e,a),o&&"type"!==t.type&&A(t.schema)&&A(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let u="valid";for(const r of t.validator(e,a))r.explanation=n.message,u="not_valid",yield[r,void 0];for(let[c,l,h]of t.entries(e,a)){const t=R(l,h,{path:void 0===c?r:[...r,c],branch:void 0===c?i:[...i,l],coerce:s,mask:o,message:n.message});for(const n of t)n[0]?(u=null===n[0].refinement||void 0===n[0].refinement?"not_valid":"not_refined",yield[n[0],void 0]):s&&(l=n[1],void 0===c?e=l:e instanceof Map?e.set(c,l):e instanceof Set?e.add(l):A(e)&&(void 0!==l||c in e)&&(e[c]=l))}if("not_valid"!==u)for(const r of t.refiner(e,a))r.explanation=n.message,u="not_refined",yield[r,void 0];"valid"===u&&(yield[void 0,e])}class x{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:s=(e=>e),entries:o=function*(){}}=e;this.type=t,this.schema=n,this.entries=o,this.coercer=s,this.validator=r?(e,t)=>I(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>I(i(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=N(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return T(e,this,t)}is(e){return P(e,this)}mask(e,t){return function(e,t,n){const r=N(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return N(e,this,t)}}const O="EXACT_OPTIONAL";class M extends x{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=O}static isExactOptional(e){return A(e)&&"brand"in e&&e.brand===O}}function T(e,t,n){const r=N(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function P(e,t){return!N(e,t)[0]}function N(e,t,n={}){const r=R(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(i[0]){return[new k(i[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function L(e,t){return new x({type:e,schema:null,validator:t})}function $(e){const t=e?Object.keys(e):[],n=L("never",(()=>!1));return new x({type:"object",schema:e??null,*entries(r){if(e&&A(r)){const i=new Set(Object.keys(r));for(const n of t){i.delete(n);const t=e[n];M.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(r,n)||(yield[n,r[n],e[n]])}for(const e of i)yield[e,r[e],n]}},validator:e=>A(e)||`Expected an object, but received: ${S(e)}`,coercer:e=>A(e)?{...e}:e})}function j(e){return new x({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function F(){return L("string",(e=>"string"==typeof e||`Expected a string, but received: ${S(e)}`))}function z(e){const t=e.map((e=>e.type)).join(" | ");return new x({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const i=[];for(const t of e){const[...e]=R(n,t,r),[s]=e;if(!s?.[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${S(n)}`,...i]}})}function B(e,t){return D(e,"pattern",(n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`))}function D(e,t,n){return new x({...e,*refiner(r,i){yield*e.refiner(r,i);const s=I(n(r,i),i,e,r);for(const e of s)yield{...e,refinement:t}}})}function U(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}const q=(e,t)=>Object.hasOwnProperty.call(e,t);var W;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(W=W||(W={}));const Z=BigInt(2**32-1),G=BigInt(32);function H(e,t=!1){return t?{h:Number(e&Z),l:Number(e>>G&Z)}:{h:0|Number(e>>G&Z),l:0|Number(e&Z)}}function V(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:o}=H(e[i],t);[n[i],r[i]]=[s,o]}return[n,r]}const J=[],X=[],K=[],Y=BigInt(0),Q=BigInt(1),ee=BigInt(2),te=BigInt(7),ne=BigInt(256),re=BigInt(113);for(let e=0,t=Q,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],J.push(2*(5*r+n)),X.push((e+1)*(e+2)/2%64);let i=Y;for(let e=0;e<7;e++)t=(t<<Q^(t>>te)*re)%ne,t&ee&&(i^=Q<<(Q<<BigInt(e))-Q);K.push(i)}const[ie,se]=V(K,!0),oe=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),ae=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class ue extends r{constructor(e,t,n,r=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,i(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=s(this.state)}keccak(){o||a(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const r=(t+8)%10,i=(t+2)%10,s=n[i],o=n[i+1],a=oe(s,o,1)^n[r],u=ae(s,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=X[n],s=oe(t,i,r),o=ae(t,i,r),a=J[n];t=e[a],i=e[a+1],e[a]=s,e[a+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=ie[r],e[1]^=se[r]}n.fill(0)}(this.state32,this.rounds),o||a(this.state32),this.posOut=0,this.pos=0}update(e){u(this);const{blockLen:t,state:n}=this,r=(e=c(e)).length;for(let i=0;i<r;){const s=Math.min(t-this.pos,r-i);for(let t=0;t<s;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!=(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){u(this,!1),l(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return i(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(h(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new ue(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}const ce=((e,t,r)=>n((()=>new ue(t,e,r))))(1,136,32);var le,he,de={exports:{}};le=de,he=de.exports,function(){var t,n="Expected a function",r="__lodash_hash_undefined__",i="__lodash_placeholder__",s=16,o=32,a=64,u=128,c=256,l=1/0,h=9007199254740991,d=NaN,f=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",o],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",_="[object Date]",w="[object Error]",y="[object Function]",b="[object GeneratorFunction]",E="[object Map]",k="[object Number]",A="[object Object]",S="[object Promise]",C="[object RegExp]",I="[object Set]",R="[object String]",x="[object Symbol]",O="[object WeakMap]",M="[object ArrayBuffer]",T="[object DataView]",P="[object Float32Array]",N="[object Float64Array]",L="[object Int8Array]",$="[object Int16Array]",j="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",B="[object Uint16Array]",D="[object Uint32Array]",U=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,H=RegExp(Z.source),V=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Re="\\ufe0e\\ufe0f",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="['’]",Me="["+ke+"]",Te="["+xe+"]",Pe="["+Ae+"]",Ne="\\d+",Le="["+Se+"]",$e="["+Ce+"]",je="[^"+ke+xe+Ne+Se+Ce+Ie+"]",Fe="\\ud83c[\\udffb-\\udfff]",ze="[^"+ke+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ie+"]",qe="\\u200d",We="(?:"+$e+"|"+je+")",Ze="(?:"+Ue+"|"+je+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Pe+"|"+Fe+")?",Je="["+Re+"]?",Xe=Je+Ve+"(?:"+qe+"(?:"+[ze,Be,De].join("|")+")"+Je+Ve+")*",Ke="(?:"+[Le,Be,De].join("|")+")"+Xe,Ye="(?:"+[ze+Pe+"?",Pe,Be,De,Me].join("|")+")",Qe=RegExp(Oe,"g"),et=RegExp(Pe,"g"),tt=RegExp(Fe+"(?="+Fe+")|"+Ye+Xe,"g"),nt=RegExp([Ue+"?"+$e+"+"+Ge+"(?="+[Te,Ue,"$"].join("|")+")",Ze+"+"+He+"(?="+[Te,Ue+We,"$"].join("|")+")",Ue+"?"+We+"+"+Ge,Ue+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ke].join("|"),"g"),rt=RegExp("["+qe+ke+Ae+Re+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,at={};at[P]=at[N]=at[L]=at[$]=at[j]=at[F]=at[z]=at[B]=at[D]=!0,at[m]=at[g]=at[M]=at[v]=at[T]=at[_]=at[w]=at[y]=at[E]=at[k]=at[A]=at[C]=at[I]=at[R]=at[O]=!1;var ut={};ut[m]=ut[g]=ut[M]=ut[T]=ut[v]=ut[_]=ut[P]=ut[N]=ut[L]=ut[$]=ut[j]=ut[E]=ut[k]=ut[A]=ut[C]=ut[I]=ut[R]=ut[x]=ut[F]=ut[z]=ut[B]=ut[D]=!0,ut[w]=ut[y]=ut[O]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ht=parseInt,dt="object"==typeof e&&e&&e.Object===Object&&e,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=dt||ft||Function("return this")(),mt=he&&!he.nodeType&&he,gt=mt&&le&&!le.nodeType&&le,vt=gt&>.exports===mt,_t=vt&&dt.process,wt=function(){try{var e=gt&>.require&>.require("util").types;return e||_t&&_t.binding&&_t.binding("util")}catch(e){}}(),yt=wt&&wt.isArrayBuffer,bt=wt&&wt.isDate,Et=wt&&wt.isMap,kt=wt&&wt.isRegExp,At=wt&&wt.isSet,St=wt&&wt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function It(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(r,o,n(o),e)}return r}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Tt(e,t){return!(null==e||!e.length)&&Ut(e,t,0)>-1}function Pt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function $t(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function jt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Ft(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var zt=Gt("length");function Bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Dt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Ut(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Dt(e,Wt,n)}function qt(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function Wt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?Jt(e,t)/n:d}function Gt(e){return function(n){return null==n?t:n[e]}}function Ht(e){return function(n){return null==e?t:e[n]}}function Vt(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Jt(e,n){for(var r,i=-1,s=e.length;++i<s;){var o=n(e[i]);o!==t&&(r=r===t?o:r+o)}return r}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(re,""):e}function Yt(e){return function(t){return e(t)}}function Qt(e,t){return Nt(t,(function(t){return e[t]}))}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,r=e.length;++n<r&&Ut(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var rn=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sn=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+ct[e]}function an(e){return rt.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,s=0,o=[];++n<r;){var a=e[n];a!==t&&a!==i||(e[n]=i,o[s++]=n)}return o}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return an(e)?function(e){for(var t=tt.lastIndex=0;tt.test(e);)++t;return t}(e):zt(e)}function pn(e){return an(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var gn=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"}),vn=function e(ie){var le,he=(ie=null==ie?pt:vn.defaults(pt.Object(),ie,vn.pick(pt,st))).Array,ke=ie.Date,Ae=ie.Error,Se=ie.Function,Ce=ie.Math,Ie=ie.Object,Re=ie.RegExp,xe=ie.String,Oe=ie.TypeError,Me=he.prototype,Te=Se.prototype,Pe=Ie.prototype,Ne=ie["__core-js_shared__"],Le=Te.toString,$e=Pe.hasOwnProperty,je=0,Fe=(le=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+le:"",ze=Pe.toString,Be=Le.call(Ie),De=pt._,Ue=Re("^"+Le.call($e).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=vt?ie.Buffer:t,We=ie.Symbol,Ze=ie.Uint8Array,Ge=qe?qe.allocUnsafe:t,He=cn(Ie.getPrototypeOf,Ie),Ve=Ie.create,Je=Pe.propertyIsEnumerable,Xe=Me.splice,Ke=We?We.isConcatSpreadable:t,Ye=We?We.iterator:t,tt=We?We.toStringTag:t,rt=function(){try{var e=ds(Ie,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=ie.clearTimeout!==pt.clearTimeout&&ie.clearTimeout,dt=ke&&ke.now!==pt.Date.now&&ke.now,ft=ie.setTimeout!==pt.setTimeout&&ie.setTimeout,mt=Ce.ceil,gt=Ce.floor,_t=Ie.getOwnPropertySymbols,wt=qe?qe.isBuffer:t,zt=ie.isFinite,Ht=Me.join,_n=cn(Ie.keys,Ie),wn=Ce.max,yn=Ce.min,bn=ke.now,En=ie.parseInt,kn=Ce.random,An=Me.reverse,Sn=ds(ie,"DataView"),Cn=ds(ie,"Map"),In=ds(ie,"Promise"),Rn=ds(ie,"Set"),xn=ds(ie,"WeakMap"),On=ds(Ie,"create"),Mn=xn&&new xn,Tn={},Pn=Fs(Sn),Nn=Fs(Cn),Ln=Fs(In),$n=Fs(Rn),jn=Fs(xn),Fn=We?We.prototype:t,zn=Fn?Fn.valueOf:t,Bn=Fn?Fn.toString:t;function Dn(e){if(na(e)&&!Zo(e)&&!(e instanceof Zn)){if(e instanceof Wn)return e;if($e.call(e,"__wrapped__"))return zs(e)}return new Wn(e)}var Un=function(){function e(){}return function(n){if(!ta(n))return{};if(Ve)return Ve(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function qn(){}function Wn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Kn(e,t){var n=Zo(e),r=!n&&Wo(e),i=!n&&!r&&Jo(e),s=!n&&!r&&!i&&la(e),o=n||r||i||s,a=o?Xt(e.length,xe):[],u=a.length;for(var c in e)!t&&!$e.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ws(c,u))||a.push(c);return a}function Yn(e){var n=e.length;return n?e[Jr(0,n-1)]:t}function Qn(e,t){return Ls(Oi(e),ur(t,0,e.length))}function er(e){return Ls(Oi(e))}function tr(e,n,r){(r!==t&&!Do(e[n],r)||r===t&&!(n in e))&&or(e,n,r)}function nr(e,n,r){var i=e[n];$e.call(e,n)&&Do(i,r)&&(r!==t||n in e)||or(e,n,r)}function rr(e,t){for(var n=e.length;n--;)if(Do(e[n][0],t))return n;return-1}function ir(e,t,n,r){return fr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function sr(e,t){return e&&Mi(t,Ta(t),e)}function or(e,t,n){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,n){for(var r=-1,i=n.length,s=he(i),o=null==e;++r<i;)s[r]=o?t:Ia(e,n[r]);return s}function ur(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function cr(e,n,r,i,s,o){var a,u=1&n,c=2&n,l=4&n;if(r&&(a=s?r(e,i,s,o):r(e)),a!==t)return a;if(!ta(e))return e;var h=Zo(e);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&$e.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Oi(e,a)}else{var d=ms(e),f=d==y||d==b;if(Jo(e))return Ai(e,u);if(d==A||d==m||f&&!s){if(a=c||f?{}:vs(e),!u)return c?function(e,t){return Mi(e,ps(e),t)}(e,function(e,t){return e&&Mi(t,Pa(t),e)}(a,e)):function(e,t){return Mi(e,fs(e),t)}(e,sr(a,e))}else{if(!ut[d])return s?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case M:return Si(e);case v:case _:return new i(+e);case T:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case N:case L:case $:case j:case F:case z:case B:case D:return Ci(e,n);case E:return new i;case k:case R:return new i(e);case C:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new i;case x:return r=e,zn?Ie(zn.call(r)):{}}}(e,d,u)}}o||(o=new Xn);var p=o.get(e);if(p)return p;o.set(e,a),aa(e)?e.forEach((function(t){a.add(cr(t,n,r,t,e,o))})):ra(e)&&e.forEach((function(t,i){a.set(i,cr(t,n,r,i,e,o))}));var g=h?t:(l?c?ss:is:c?Pa:Ta)(e);return Rt(g||e,(function(t,i){g&&(t=e[i=t]),nr(a,i,cr(t,n,r,i,e,o))})),a}function lr(e,n,r){var i=r.length;if(null==e)return!i;for(e=Ie(e);i--;){var s=r[i],o=n[s],a=e[s];if(a===t&&!(s in e)||!o(a))return!1}return!0}function hr(e,r,i){if("function"!=typeof e)throw new Oe(n);return Ms((function(){e.apply(t,i)}),r)}function dr(e,t,n,r){var i=-1,s=Tt,o=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=Nt(t,Yt(n))),r?(s=Pt,o=!1):t.length>=200&&(s=en,o=!1,t=new Jn(t));e:for(;++i<a;){var l=e[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,o&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;u.push(l)}else s(t,h,r)||u.push(l)}return u}Dn.templateSettings={escape:J,evaluate:X,interpolate:K,variable:"",imports:{_:Dn}},Dn.prototype=qn.prototype,Dn.prototype.constructor=Dn,Wn.prototype=Un(qn.prototype),Wn.prototype.constructor=Wn,Zn.prototype=Un(qn.prototype),Zn.prototype.constructor=Zn,Gn.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var n=this.__data__;if(On){var i=n[e];return i===r?t:i}return $e.call(n,e)?n[e]:t},Gn.prototype.has=function(e){var n=this.__data__;return On?n[e]!==t:$e.call(n,e)},Gn.prototype.set=function(e,n){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=On&&n===t?r:n,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var n=this.__data__,r=rr(n,e);return r<0?t:n[r][1]},Hn.prototype.has=function(e){return rr(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Cn||Hn),string:new Gn}},Vn.prototype.delete=function(e){var t=ls(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ls(this,e).get(e)},Vn.prototype.has=function(e){return ls(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ls(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,r),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),pr=Ni(Er,!0);function mr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(e,n,r){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=n(o);if(null!=a&&(u===t?a==a&&!ca(a):r(a,u)))var u=a,c=o}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function _r(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=_s),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?_r(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var wr=Li(),yr=Li(!0);function br(e,t){return e&&wr(e,t,Ta)}function Er(e,t){return e&&yr(e,t,Ta)}function kr(e,t){return Mt(t,(function(t){return Yo(e[t])}))}function Ar(e,n){for(var r=0,i=(n=yi(n,e)).length;null!=e&&r<i;)e=e[js(n[r++])];return r&&r==i?e:t}function Sr(e,t,n){var r=t(e);return Zo(e)?r:Lt(r,n(e))}function Cr(e){return null==e?e===t?"[object Undefined]":"[object Null]":tt&&tt in Ie(e)?function(e){var n=$e.call(e,tt),r=e[tt];try{e[tt]=t;var i=!0}catch(e){}var s=ze.call(e);return i&&(n?e[tt]=r:delete e[tt]),s}(e):function(e){return ze.call(e)}(e)}function Ir(e,t){return e>t}function Rr(e,t){return null!=e&&$e.call(e,t)}function xr(e,t){return null!=e&&t in Ie(e)}function Or(e,n,r){for(var i=r?Pt:Tt,s=e[0].length,o=e.length,a=o,u=he(o),c=1/0,l=[];a--;){var h=e[a];a&&n&&(h=Nt(h,Yt(n))),c=yn(h.length,c),u[a]=!r&&(n||s>=120&&h.length>=120)?new Jn(a&&h):t}h=e[0];var d=-1,f=u[0];e:for(;++d<s&&l.length<c;){var p=h[d],m=n?n(p):p;if(p=r||0!==p?p:0,!(f?en(f,m):i(l,m,r))){for(a=o;--a;){var g=u[a];if(!(g?en(g,m):i(e[a],m,r)))continue e}f&&f.push(m),l.push(p)}}return l}function Mr(e,n,r){var i=null==(e=Rs(e,n=yi(n,e)))?e:e[js(Xs(n))];return null==i?t:Ct(i,e,r)}function Tr(e){return na(e)&&Cr(e)==m}function Pr(e,n,r,i,s){return e===n||(null==e||null==n||!na(e)&&!na(n)?e!=e&&n!=n:function(e,n,r,i,s,o){var a=Zo(e),u=Zo(n),c=a?g:ms(e),l=u?g:ms(n),h=(c=c==m?A:c)==A,d=(l=l==m?A:l)==A,f=c==l;if(f&&Jo(e)){if(!Jo(n))return!1;a=!0,h=!1}if(f&&!h)return o||(o=new Xn),a||la(e)?ns(e,n,r,i,s,o):function(e,t,n,r,i,s,o){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!s(new Ze(e),new Ze(t)));case v:case _:case k:return Do(+e,+t);case w:return e.name==t.name&&e.message==t.message;case C:case R:return e==t+"";case E:var a=un;case I:var u=1&r;if(a||(a=hn),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var l=ns(a(e),a(t),r,i,s,o);return o.delete(e),l;case x:if(zn)return zn.call(e)==zn.call(t)}return!1}(e,n,c,r,i,s,o);if(!(1&r)){var p=h&&$e.call(e,"__wrapped__"),y=d&&$e.call(n,"__wrapped__");if(p||y){var b=p?e.value():e,S=y?n.value():n;return o||(o=new Xn),s(b,S,r,i,o)}}return!!f&&(o||(o=new Xn),function(e,n,r,i,s,o){var a=1&r,u=is(e),c=u.length,l=is(n),h=l.length;if(c!=h&&!a)return!1;for(var d=c;d--;){var f=u[d];if(!(a?f in n:$e.call(n,f)))return!1}var p=o.get(e),m=o.get(n);if(p&&m)return p==n&&m==e;var g=!0;o.set(e,n),o.set(n,e);for(var v=a;++d<c;){var _=e[f=u[d]],w=n[f];if(i)var y=a?i(w,_,f,n,e,o):i(_,w,f,e,n,o);if(!(y===t?_===w||s(_,w,r,i,o):y)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){var b=e.constructor,E=n.constructor;b==E||!("constructor"in e)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof E&&E instanceof E||(g=!1)}return o.delete(e),o.delete(n),g}(e,n,r,i,s,o))}(e,n,r,i,Pr,s))}function Nr(e,n,r,i){var s=r.length,o=s,a=!i;if(null==e)return!o;for(e=Ie(e);s--;){var u=r[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var c=(u=r[s])[0],l=e[c],h=u[1];if(a&&u[2]){if(l===t&&!(c in e))return!1}else{var d=new Xn;if(i)var f=i(l,h,c,e,n,d);if(!(f===t?Pr(h,l,3,i,d):f))return!1}}return!0}function Lr(e){return!(!ta(e)||(t=e,Fe&&Fe in t))&&(Yo(e)?Ue:ve).test(Fs(e));var t}function $r(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Zo(e)?Ur(e[0],e[1]):Dr(e):fu(e)}function jr(e){if(!As(e))return _n(e);var t=[];for(var n in Ie(e))$e.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ie(e))t.push(n);return t}(e);var t=As(e),n=[];for(var r in e)("constructor"!=r||!t&&$e.call(e,r))&&n.push(r);return n}function zr(e,t){return e<t}function Br(e,t){var n=-1,r=Ho(e)?he(e.length):[];return fr(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function Dr(e){var t=hs(e);return 1==t.length&&t[0][2]?Cs(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Ur(e,n){return bs(e)&&Ss(n)?Cs(js(e),n):function(r){var i=Ia(r,e);return i===t&&i===n?Ra(r,e):Pr(n,i,3)}}function qr(e,n,r,i,s){e!==n&&wr(n,(function(o,a){if(s||(s=new Xn),ta(o))!function(e,n,r,i,s,o,a){var u=xs(e,r),c=xs(n,r),l=a.get(c);if(l)tr(e,r,l);else{var h=o?o(u,c,r+"",e,n,a):t,d=h===t;if(d){var f=Zo(c),p=!f&&Jo(c),m=!f&&!p&&la(c);h=c,f||p||m?Zo(u)?h=u:Vo(u)?h=Oi(u):p?(d=!1,h=Ai(c,!0)):m?(d=!1,h=Ci(c,!0)):h=[]:sa(c)||Wo(c)?(h=u,Wo(u)?h=_a(u):ta(u)&&!Yo(u)||(h=vs(c))):d=!1}d&&(a.set(c,h),s(h,c,i,o,a),a.delete(c)),tr(e,r,h)}}(e,n,a,r,qr,i,s);else{var u=i?i(xs(e,a),o,a+"",e,n,s):t;u===t&&(u=o),tr(e,a,u)}}),Pa)}function Wr(e,n){var r=e.length;if(r)return ws(n+=n<0?r:0,r)?e[n]:t}function Zr(e,t,n){t=t.length?Nt(t,(function(e){return Zo(e)?function(t){return Ar(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;t=Nt(t,Yt(cs()));var i=Br(e,(function(e,n,i){var s=Nt(t,(function(t){return t(e)}));return{criteria:s,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;++r<o;){var u=Ii(i[r],s[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=Ar(e,o);n(a,o)&&ei(s,yi(o,e),a)}return s}function Hr(e,t,n,r){var i=r?qt:Ut,s=-1,o=t.length,a=e;for(e===t&&(t=Oi(t)),n&&(a=Nt(e,Yt(n)));++s<o;)for(var u=0,c=t[s],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&Xe.call(a,u,1),Xe.call(e,u,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;ws(i)?Xe.call(e,i,1):di(e,i)}}return e}function Jr(e,t){return e+gt(kn()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Ts(Is(e,t,iu),e+"")}function Yr(e){return Yn(Da(e))}function Qr(e,t){var n=Da(e);return Ls(n,ur(t,0,n.length))}function ei(e,n,r,i){if(!ta(e))return e;for(var s=-1,o=(n=yi(n,e)).length,a=o-1,u=e;null!=u&&++s<o;){var c=js(n[s]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=a){var h=u[c];(l=i?i(h,c,u):t)===t&&(l=ta(h)?h:ws(n[s+1])?[]:{})}nr(u,c,l),u=u[c]}return e}var ti=Mn?function(e,t){return Mn.set(e,t),e}:iu,ni=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ri(e){return Ls(Da(e))}function ii(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=he(i);++r<i;)s[r]=e[r+t];return s}function si(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=e[s];null!==o&&!ca(o)&&(n?o<=t:o<t)?r=s+1:i=s}return i}return ai(e,t,iu,n)}function ai(e,n,r,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(n=r(n))!=n,u=null===n,c=ca(n),l=n===t;s<o;){var h=gt((s+o)/2),d=r(e[h]),f=d!==t,p=null===d,m=d==d,g=ca(d);if(a)var v=i||m;else v=l?m&&(i||f):u?m&&f&&(i||!p):c?m&&f&&!p&&(i||!g):!p&&!g&&(i?d<=n:d<n);v?s=h+1:o=h}return yn(o,4294967294)}function ui(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!Do(a,u)){var u=a;s[i++]=0===o?0:o}}return s}function ci(e){return"number"==typeof e?e:ca(e)?d:+e}function li(e){if("string"==typeof e)return e;if(Zo(e))return Nt(e,li)+"";if(ca(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,n){var r=-1,i=Tt,s=e.length,o=!0,a=[],u=a;if(n)o=!1,i=Pt;else if(s>=200){var c=t?null:Xi(e);if(c)return hn(c);o=!1,i=en,u=new Jn}else u=t?[]:a;e:for(;++r<s;){var l=e[r],h=t?t(l):l;if(l=n||0!==l?l:0,o&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue e;t&&u.push(h),a.push(l)}else i(u,h,n)||(u!==a&&u.push(h),a.push(l))}return a}function di(e,t){return null==(e=Rs(e,t=yi(t,e)))||delete e[js(Xs(t))]}function fi(e,t,n,r){return ei(e,t,n(Ar(e,t)),r)}function pi(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?ii(e,r?0:s,r?s+1:i):ii(e,r?s+1:0,r?i:s)}function mi(e,t){var n=e;return n instanceof Zn&&(n=n.value()),$t(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function gi(e,t,n){var r=e.length;if(r<2)return r?hi(e[0]):[];for(var i=-1,s=he(r);++i<r;)for(var o=e[i],a=-1;++a<r;)a!=i&&(s[i]=dr(s[i]||o,e[a],t,n));return hi(_r(s,1),t,n)}function vi(e,n,r){for(var i=-1,s=e.length,o=n.length,a={};++i<s;){var u=i<o?n[i]:t;r(a,e[i],u)}return a}function _i(e){return Vo(e)?e:[]}function wi(e){return"function"==typeof e?e:iu}function yi(e,t){return Zo(e)?e:bs(e,t)?[e]:$s(wa(e))}var bi=Kr;function Ei(e,n,r){var i=e.length;return r=r===t?i:r,!n&&r>=i?e:ii(e,n,r)}var ki=ct||function(e){return pt.clearTimeout(e)};function Ai(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Si(e){var t=new e.constructor(e.byteLength);return new Ze(t).set(new Ze(e)),t}function Ci(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ii(e,n){if(e!==n){var r=e!==t,i=null===e,s=e==e,o=ca(e),a=n!==t,u=null===n,c=n==n,l=ca(n);if(!u&&!l&&!o&&e>n||o&&a&&c&&!u&&!l||i&&a&&c||!r&&c||!s)return 1;if(!i&&!o&&!l&&e<n||l&&r&&s&&!i&&!o||u&&r&&s||!a&&s||!c)return-1}return 0}function Ri(e,t,n,r){for(var i=-1,s=e.length,o=n.length,a=-1,u=t.length,c=wn(s-o,0),l=he(u+c),h=!r;++a<u;)l[a]=t[a];for(;++i<o;)(h||i<s)&&(l[n[i]]=e[i]);for(;c--;)l[a++]=e[i++];return l}function xi(e,t,n,r){for(var i=-1,s=e.length,o=-1,a=n.length,u=-1,c=t.length,l=wn(s-a,0),h=he(l+c),d=!r;++i<l;)h[i]=e[i];for(var f=i;++u<c;)h[f+u]=t[u];for(;++o<a;)(d||i<s)&&(h[f+n[o]]=e[i++]);return h}function Oi(e,t){var n=-1,r=e.length;for(t||(t=he(r));++n<r;)t[n]=e[n];return t}function Mi(e,n,r,i){var s=!r;r||(r={});for(var o=-1,a=n.length;++o<a;){var u=n[o],c=i?i(r[u],e[u],u,r,e):t;c===t&&(c=e[u]),s?or(r,u,c):nr(r,u,c)}return r}function Ti(e,t){return function(n,r){var i=Zo(n)?It:ir,s=t?t():{};return i(n,e,cs(r,2),s)}}function Pi(e){return Kr((function(n,r){var i=-1,s=r.length,o=s>1?r[s-1]:t,a=s>2?r[2]:t;for(o=e.length>3&&"function"==typeof o?(s--,o):t,a&&ys(r[0],r[1],a)&&(o=s<3?t:o,s=1),n=Ie(n);++i<s;){var u=r[i];u&&e(n,u,i,o)}return n}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!Ho(n))return e(n,r);for(var i=n.length,s=t?i:-1,o=Ie(n);(t?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function Li(e){return function(t,n,r){for(var i=-1,s=Ie(t),o=r(t),a=o.length;a--;){var u=o[e?a:++i];if(!1===n(s[u],u,s))break}return t}}function $i(e){return function(n){var r=an(n=wa(n))?pn(n):t,i=r?r[0]:n.charAt(0),s=r?Ei(r,1).join(""):n.slice(1);return i[e]()+s}}function ji(e){return function(t){return $t(Ya(Wa(t).replace(Qe,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Un(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function zi(e){return function(n,r,i){var s=Ie(n);if(!Ho(n)){var o=cs(r,3);n=Ta(n),r=function(e){return o(s[e],e,s)}}var a=e(n,r,i);return a>-1?s[o?n[a]:a]:t}}function Bi(e){return rs((function(r){var i=r.length,s=i,o=Wn.prototype.thru;for(e&&r.reverse();s--;){var a=r[s];if("function"!=typeof a)throw new Oe(n);if(o&&!u&&"wrapper"==as(a))var u=new Wn([],!0)}for(s=u?s:i;++s<i;){var c=as(a=r[s]),l="wrapper"==c?os(a):t;u=l&&Es(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[as(l[0])].apply(u,l[3]):1==a.length&&Es(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&Zo(t))return u.plant(t).value();for(var n=0,s=i?r[n].apply(this,e):t;++n<i;)s=r[n].call(this,s);return s}}))}function Di(e,n,r,i,s,o,a,c,l,h){var d=n&u,f=1&n,p=2&n,m=24&n,g=512&n,v=p?t:Fi(e);return function u(){for(var _=arguments.length,w=he(_),y=_;y--;)w[y]=arguments[y];if(m)var b=us(u),E=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,b);if(i&&(w=Ri(w,i,s,m)),o&&(w=xi(w,o,a,m)),_-=E,m&&_<h){var k=ln(w,b);return Vi(e,n,Di,u.placeholder,r,w,k,c,l,h-_)}var A=f?r:this,S=p?A[e]:e;return _=w.length,c?w=function(e,n){for(var r=e.length,i=yn(n.length,r),s=Oi(e);i--;){var o=n[i];e[i]=ws(o,r)?s[o]:t}return e}(w,c):g&&_>1&&w.reverse(),d&&l<_&&(w.length=l),this&&this!==pt&&this instanceof u&&(S=v||Fi(S)),S.apply(A,w)}}function Ui(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function qi(e,n){return function(r,i){var s;if(r===t&&i===t)return n;if(r!==t&&(s=r),i!==t){if(s===t)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=ci(r),i=ci(i)),s=e(r,i)}return s}}function Wi(e){return rs((function(t){return t=Nt(t,Yt(cs())),Kr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function Zi(e,n){var r=(n=n===t?" ":li(n)).length;if(r<2)return r?Xr(n,e):n;var i=Xr(n,mt(e/fn(n)));return an(n)?Ei(pn(i),0,e).join(""):i.slice(0,e)}function Gi(e){return function(n,r,i){return i&&"number"!=typeof i&&ys(n,r,i)&&(r=i=t),n=pa(n),r===t?(r=n,n=0):r=pa(r),function(e,t,n,r){for(var i=-1,s=wn(mt((t-e)/(n||1)),0),o=he(s);s--;)o[r?s:++i]=e,e+=n;return o}(n,r,i=i===t?n<r?1:-1:pa(i),e)}}function Hi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function Vi(e,n,r,i,s,u,c,l,h,d){var f=8&n;n|=f?o:a,4&(n&=~(f?a:o))||(n&=-4);var p=[e,n,s,f?u:t,f?c:t,f?t:u,f?t:c,l,h,d],m=r.apply(t,p);return Es(e)&&Os(m,p),m.placeholder=i,Ps(m,e,n)}function Ji(e){var t=Ce[e];return function(e,n){if(e=va(e),(n=null==n?0:yn(ma(n),292))&&zt(e)){var r=(wa(e)+"e").split("e");return+((r=(wa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xi=Rn&&1/hn(new Rn([,-0]))[1]==l?function(e){return new Rn(e)}:cu;function Ki(e){return function(t){var n=ms(t);return n==E?un(t):n==I?dn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,r,l,h,d,f,p,m){var g=2&r;if(!g&&"function"!=typeof e)throw new Oe(n);var v=h?h.length:0;if(v||(r&=-97,h=d=t),p=p===t?p:wn(ma(p),0),m=m===t?m:ma(m),v-=d?d.length:0,r&a){var _=h,w=d;h=d=t}var y=g?t:os(e),b=[e,r,l,h,d,_,w,f,p,m];if(y&&function(e,t){var n=e[1],r=t[1],s=n|r,o=s<131,a=r==u&&8==n||r==u&&n==c&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],s|=1&n?0:4);var l=t[3];if(l){var h=e[3];e[3]=h?Ri(h,l,t[4]):l,e[4]=h?ln(e[3],i):t[4]}(l=t[5])&&(h=e[5],e[5]=h?xi(h,l,t[6]):l,e[6]=h?ln(e[5],i):t[6]),(l=t[7])&&(e[7]=l),r&u&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=s}(b,y),e=b[0],r=b[1],l=b[2],h=b[3],d=b[4],!(m=b[9]=b[9]===t?g?0:e.length:wn(b[9]-v,0))&&24&r&&(r&=-25),r&&1!=r)E=8==r||r==s?function(e,n,r){var i=Fi(e);return function s(){for(var o=arguments.length,a=he(o),u=o,c=us(s);u--;)a[u]=arguments[u];var l=o<3&&a[0]!==c&&a[o-1]!==c?[]:ln(a,c);return(o-=l.length)<r?Vi(e,n,Di,s.placeholder,t,a,l,t,t,r-o):Ct(this&&this!==pt&&this instanceof s?i:e,this,a)}}(e,r,m):r!=o&&33!=r||d.length?Di.apply(t,b):function(e,t,n,r){var i=1&t,s=Fi(e);return function t(){for(var o=-1,a=arguments.length,u=-1,c=r.length,l=he(c+a),h=this&&this!==pt&&this instanceof t?s:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++o];return Ct(h,i?n:this,l)}}(e,r,l,h);else var E=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,r,l);return Ps((y?ti:Os)(E,b),e,r)}function Qi(e,n,r,i){return e===t||Do(e,Pe[r])&&!$e.call(i,r)?n:e}function es(e,n,r,i,s,o){return ta(e)&&ta(n)&&(o.set(n,e),qr(e,n,t,es,o),o.delete(n)),e}function ts(e){return sa(e)?t:e}function ns(e,n,r,i,s,o){var a=1&r,u=e.length,c=n.length;if(u!=c&&!(a&&c>u))return!1;var l=o.get(e),h=o.get(n);if(l&&h)return l==n&&h==e;var d=-1,f=!0,p=2&r?new Jn:t;for(o.set(e,n),o.set(n,e);++d<u;){var m=e[d],g=n[d];if(i)var v=a?i(g,m,d,n,e,o):i(m,g,d,e,n,o);if(v!==t){if(v)continue;f=!1;break}if(p){if(!Ft(n,(function(e,t){if(!en(p,t)&&(m===e||s(m,e,r,i,o)))return p.push(t)}))){f=!1;break}}else if(m!==g&&!s(m,g,r,i,o)){f=!1;break}}return o.delete(e),o.delete(n),f}function rs(e){return Ts(Is(e,t,Zs),e+"")}function is(e){return Sr(e,Ta,fs)}function ss(e){return Sr(e,Pa,ps)}var os=Mn?function(e){return Mn.get(e)}:cu;function as(e){for(var t=e.name+"",n=Tn[t],r=$e.call(Tn,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function us(e){return($e.call(Dn,"placeholder")?Dn:e).placeholder}function cs(){var e=Dn.iteratee||su;return e=e===su?$r:e,arguments.length?e(arguments[0],arguments[1]):e}function ls(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function hs(e){for(var t=Ta(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ss(i)]}return t}function ds(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Lr(r)?r:t}var fs=_t?function(e){return null==e?[]:(e=Ie(e),Mt(_t(e),(function(t){return Je.call(e,t)})))}:gu,ps=_t?function(e){for(var t=[];e;)Lt(t,fs(e)),e=He(e);return t}:gu,ms=Cr;function gs(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,s=!1;++r<i;){var o=js(t[r]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&ea(i)&&ws(o,i)&&(Zo(e)||Wo(e))}function vs(e){return"function"!=typeof e.constructor||As(e)?{}:Un(He(e))}function _s(e){return Zo(e)||Wo(e)||!!(Ke&&e&&e[Ke])}function ws(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function ys(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Ho(n)&&ws(t,n.length):"string"==r&&t in n)&&Do(n[t],e)}function bs(e,t){if(Zo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||Q.test(e)||!Y.test(e)||null!=t&&e in Ie(t)}function Es(e){var t=as(e),n=Dn[t];if("function"!=typeof n||!(t in Zn.prototype))return!1;if(e===n)return!0;var r=os(n);return!!r&&e===r[0]}(Sn&&ms(new Sn(new ArrayBuffer(1)))!=T||Cn&&ms(new Cn)!=E||In&&ms(In.resolve())!=S||Rn&&ms(new Rn)!=I||xn&&ms(new xn)!=O)&&(ms=function(e){var n=Cr(e),r=n==A?e.constructor:t,i=r?Fs(r):"";if(i)switch(i){case Pn:return T;case Nn:return E;case Ln:return S;case $n:return I;case jn:return O}return n});var ks=Ne?Yo:vu;function As(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function Ss(e){return e==e&&!ta(e)}function Cs(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ie(r))}}function Is(e,n,r){return n=wn(n===t?e.length-1:n,0),function(){for(var t=arguments,i=-1,s=wn(t.length-n,0),o=he(s);++i<s;)o[i]=t[n+i];i=-1;for(var a=he(n+1);++i<n;)a[i]=t[i];return a[n]=r(o),Ct(e,this,a)}}function Rs(e,t){return t.length<2?e:Ar(e,ii(t,0,-1))}function xs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Os=Ns(ti),Ms=ft||function(e,t){return pt.setTimeout(e,t)},Ts=Ns(ni);function Ps(e,t,n){var r=t+"";return Ts(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Rt(p,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Ns(e){var n=0,r=0;return function(){var i=bn(),s=16-(i-r);if(r=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Ls(e,n){var r=-1,i=e.length,s=i-1;for(n=n===t?i:n;++r<n;){var o=Jr(r,s),a=e[o];e[o]=e[r],e[r]=a}return e.length=n,e}var $s=function(e){var t=Lo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)})),t}));function js(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fs(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function zs(e){if(e instanceof Zn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Oi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bs=Kr((function(e,t){return Vo(e)?dr(e,_r(t,1,Vo,!0)):[]})),Ds=Kr((function(e,n){var r=Xs(n);return Vo(r)&&(r=t),Vo(e)?dr(e,_r(n,1,Vo,!0),cs(r,2)):[]})),Us=Kr((function(e,n){var r=Xs(n);return Vo(r)&&(r=t),Vo(e)?dr(e,_r(n,1,Vo,!0),t,r):[]}));function qs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=wn(r+i,0)),Dt(e,cs(t,3),i)}function Ws(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return r!==t&&(s=ma(r),s=r<0?wn(i+s,0):yn(s,i-1)),Dt(e,cs(n,3),s,!0)}function Zs(e){return null!=e&&e.length?_r(e,1):[]}function Gs(e){return e&&e.length?e[0]:t}var Hs=Kr((function(e){var t=Nt(e,_i);return t.length&&t[0]===e[0]?Or(t):[]})),Vs=Kr((function(e){var n=Xs(e),r=Nt(e,_i);return n===Xs(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Or(r,cs(n,2)):[]})),Js=Kr((function(e){var n=Xs(e),r=Nt(e,_i);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Or(r,t,n):[]}));function Xs(e){var n=null==e?0:e.length;return n?e[n-1]:t}var Ks=Kr(Ys);function Ys(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Qs=rs((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Vr(e,Nt(t,(function(e){return ws(e,n)?+e:e})).sort(Ii)),r}));function eo(e){return null==e?e:An.call(e)}var to=Kr((function(e){return hi(_r(e,1,Vo,!0))})),no=Kr((function(e){var n=Xs(e);return Vo(n)&&(n=t),hi(_r(e,1,Vo,!0),cs(n,2))})),ro=Kr((function(e){var n=Xs(e);return n="function"==typeof n?n:t,hi(_r(e,1,Vo,!0),t,n)}));function io(e){if(!e||!e.length)return[];var t=0;return e=Mt(e,(function(e){if(Vo(e))return t=wn(e.length,t),!0})),Xt(t,(function(t){return Nt(e,Gt(t))}))}function so(e,n){if(!e||!e.length)return[];var r=io(e);return null==n?r:Nt(r,(function(e){return Ct(n,t,e)}))}var oo=Kr((function(e,t){return Vo(e)?dr(e,t):[]})),ao=Kr((function(e){return gi(Mt(e,Vo))})),uo=Kr((function(e){var n=Xs(e);return Vo(n)&&(n=t),gi(Mt(e,Vo),cs(n,2))})),co=Kr((function(e){var n=Xs(e);return n="function"==typeof n?n:t,gi(Mt(e,Vo),t,n)})),lo=Kr(io),ho=Kr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,so(e,r)}));function fo(e){var t=Dn(e);return t.__chain__=!0,t}function po(e,t){return t(e)}var mo=rs((function(e){var n=e.length,r=n?e[0]:0,i=this.__wrapped__,s=function(t){return ar(t,e)};return!(n>1||this.__actions__.length)&&i instanceof Zn&&ws(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:po,args:[s],thisArg:t}),new Wn(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(s)})),go=Ti((function(e,t,n){$e.call(e,n)?++e[n]:or(e,n,1)})),vo=zi(qs),_o=zi(Ws);function wo(e,t){return(Zo(e)?Rt:fr)(e,cs(t,3))}function yo(e,t){return(Zo(e)?xt:pr)(e,cs(t,3))}var bo=Ti((function(e,t,n){$e.call(e,n)?e[n].push(t):or(e,n,[t])})),Eo=Kr((function(e,t,n){var r=-1,i="function"==typeof t,s=Ho(e)?he(e.length):[];return fr(e,(function(e){s[++r]=i?Ct(t,e,n):Mr(e,t,n)})),s})),ko=Ti((function(e,t,n){or(e,n,t)}));function Ao(e,t){return(Zo(e)?Nt:Br)(e,cs(t,3))}var So=Ti((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Co=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ys(e,t[0],t[1])?t=[]:n>2&&ys(t[0],t[1],t[2])&&(t=[t[0]]),Zr(e,_r(t,1),[])})),Io=dt||function(){return pt.Date.now()};function Ro(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,Yi(e,u,t,t,t,t,n)}function xo(e,r){var i;if("function"!=typeof r)throw new Oe(n);return e=ma(e),function(){return--e>0&&(i=r.apply(this,arguments)),e<=1&&(r=t),i}}var Oo=Kr((function(e,t,n){var r=1;if(n.length){var i=ln(n,us(Oo));r|=o}return Yi(e,r,t,n,i)})),Mo=Kr((function(e,t,n){var r=3;if(n.length){var i=ln(n,us(Mo));r|=o}return Yi(t,r,e,n,i)}));function To(e,r,i){var s,o,a,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Oe(n);function m(n){var r=s,i=o;return s=o=t,h=n,u=e.apply(i,r)}function g(e){var n=e-l;return l===t||n>=r||n<0||f&&e-h>=a}function v(){var e=Io();if(g(e))return _(e);c=Ms(v,function(e){var t=r-(e-l);return f?yn(t,a-(e-h)):t}(e))}function _(e){return c=t,p&&s?m(e):(s=o=t,u)}function w(){var e=Io(),n=g(e);if(s=arguments,o=this,l=e,n){if(c===t)return function(e){return h=e,c=Ms(v,r),d?m(e):u}(l);if(f)return ki(c),c=Ms(v,r),m(l)}return c===t&&(c=Ms(v,r)),u}return r=va(r)||0,ta(i)&&(d=!!i.leading,a=(f="maxWait"in i)?wn(va(i.maxWait)||0,r):a,p="trailing"in i?!!i.trailing:p),w.cancel=function(){c!==t&&ki(c),h=0,s=l=o=c=t},w.flush=function(){return c===t?u:_(Io())},w}var Po=Kr((function(e,t){return hr(e,1,t)})),No=Kr((function(e,t,n){return hr(e,va(t)||0,n)}));function Lo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Lo.Cache||Vn),r}function $o(e){if("function"!=typeof e)throw new Oe(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Lo.Cache=Vn;var jo=bi((function(e,t){var n=(t=1==t.length&&Zo(t[0])?Nt(t[0],Yt(cs())):Nt(_r(t,1),Yt(cs()))).length;return Kr((function(r){for(var i=-1,s=yn(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),Fo=Kr((function(e,n){var r=ln(n,us(Fo));return Yi(e,o,t,n,r)})),zo=Kr((function(e,n){var r=ln(n,us(zo));return Yi(e,a,t,n,r)})),Bo=rs((function(e,n){return Yi(e,c,t,t,t,n)}));function Do(e,t){return e===t||e!=e&&t!=t}var Uo=Hi(Ir),qo=Hi((function(e,t){return e>=t})),Wo=Tr(function(){return arguments}())?Tr:function(e){return na(e)&&$e.call(e,"callee")&&!Je.call(e,"callee")},Zo=he.isArray,Go=yt?Yt(yt):function(e){return na(e)&&Cr(e)==M};function Ho(e){return null!=e&&ea(e.length)&&!Yo(e)}function Vo(e){return na(e)&&Ho(e)}var Jo=wt||vu,Xo=bt?Yt(bt):function(e){return na(e)&&Cr(e)==_};function Ko(e){if(!na(e))return!1;var t=Cr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function Yo(e){if(!ta(e))return!1;var t=Cr(e);return t==y||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qo(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=Et?Yt(Et):function(e){return na(e)&&ms(e)==E};function ia(e){return"number"==typeof e||na(e)&&Cr(e)==k}function sa(e){if(!na(e)||Cr(e)!=A)return!1;var t=He(e);if(null===t)return!0;var n=$e.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==Be}var oa=kt?Yt(kt):function(e){return na(e)&&Cr(e)==C},aa=At?Yt(At):function(e){return na(e)&&ms(e)==I};function ua(e){return"string"==typeof e||!Zo(e)&&na(e)&&Cr(e)==R}function ca(e){return"symbol"==typeof e||na(e)&&Cr(e)==x}var la=St?Yt(St):function(e){return na(e)&&ea(e.length)&&!!at[Cr(e)]},ha=Hi(zr),da=Hi((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Ho(e))return ua(e)?pn(e):Oi(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=ms(e);return(t==E?un:t==I?hn:Da)(e)}function pa(e){return e?(e=va(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?ur(ma(e),0,f):0}function va(e){if("number"==typeof e)return e;if(ca(e))return d;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=ge.test(e);return n||_e.test(e)?ht(e.slice(2),n?2:8):me.test(e)?d:+e}function _a(e){return Mi(e,Pa(e))}function wa(e){return null==e?"":li(e)}var ya=Pi((function(e,t){if(As(t)||Ho(t))Mi(t,Ta(t),e);else for(var n in t)$e.call(t,n)&&nr(e,n,t[n])})),ba=Pi((function(e,t){Mi(t,Pa(t),e)})),Ea=Pi((function(e,t,n,r){Mi(t,Pa(t),e,r)})),ka=Pi((function(e,t,n,r){Mi(t,Ta(t),e,r)})),Aa=rs(ar),Sa=Kr((function(e,n){e=Ie(e);var r=-1,i=n.length,s=i>2?n[2]:t;for(s&&ys(n[0],n[1],s)&&(i=1);++r<i;)for(var o=n[r],a=Pa(o),u=-1,c=a.length;++u<c;){var l=a[u],h=e[l];(h===t||Do(h,Pe[l])&&!$e.call(e,l))&&(e[l]=o[l])}return e})),Ca=Kr((function(e){return e.push(t,es),Ct(La,t,e)}));function Ia(e,n,r){var i=null==e?t:Ar(e,n);return i===t?r:i}function Ra(e,t){return null!=e&&gs(e,t,xr)}var xa=Ui((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),e[t]=n}),tu(iu)),Oa=Ui((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),$e.call(e,t)?e[t].push(n):e[t]=[n]}),cs),Ma=Kr(Mr);function Ta(e){return Ho(e)?Kn(e):jr(e)}function Pa(e){return Ho(e)?Kn(e,!0):Fr(e)}var Na=Pi((function(e,t,n){qr(e,t,n)})),La=Pi((function(e,t,n,r){qr(e,t,n,r)})),$a=rs((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=yi(t,e),r||(r=t.length>1),t})),Mi(e,ss(e),n),r&&(n=cr(n,7,ts));for(var i=t.length;i--;)di(n,t[i]);return n})),ja=rs((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Ra(e,n)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var n=Nt(ss(e),(function(e){return[e]}));return t=cs(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var za=Ki(Ta),Ba=Ki(Pa);function Da(e){return null==e?[]:Qt(e,Ta(e))}var Ua=ji((function(e,t,n){return t=t.toLowerCase(),e+(n?qa(t):t)}));function qa(e){return Ka(wa(e).toLowerCase())}function Wa(e){return(e=wa(e))&&e.replace(ye,rn).replace(et,"")}var Za=ji((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ga=ji((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ha=$i("toLowerCase"),Va=ji((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ja=ji((function(e,t,n){return e+(n?" ":"")+Ka(t)})),Xa=ji((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ka=$i("toUpperCase");function Ya(e,n,r){return e=wa(e),(n=r?t:n)===t?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(n)||[]}var Qa=Kr((function(e,n){try{return Ct(e,t,n)}catch(e){return Ko(e)?e:new Ae(e)}})),eu=rs((function(e,t){return Rt(t,(function(t){t=js(t),or(e,t,Oo(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Bi(),ru=Bi(!0);function iu(e){return e}function su(e){return $r("function"==typeof e?e:cr(e,1))}var ou=Kr((function(e,t){return function(n){return Mr(n,e,t)}})),au=Kr((function(e,t){return function(n){return Mr(e,n,t)}}));function uu(e,t,n){var r=Ta(t),i=kr(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=kr(t,Ta(t)));var s=!(ta(n)&&"chain"in n&&!n.chain),o=Yo(e);return Rt(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=Oi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function cu(){}var lu=Wi(Nt),hu=Wi(Ot),du=Wi(Ft);function fu(e){return bs(e)?Gt(js(e)):function(e){return function(t){return Ar(t,e)}}(e)}var pu=Gi(),mu=Gi(!0);function gu(){return[]}function vu(){return!1}var _u,wu=qi((function(e,t){return e+t}),0),yu=Ji("ceil"),bu=qi((function(e,t){return e/t}),1),Eu=Ji("floor"),ku=qi((function(e,t){return e*t}),1),Au=Ji("round"),Su=qi((function(e,t){return e-t}),0);return Dn.after=function(e,t){if("function"!=typeof t)throw new Oe(n);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=Ro,Dn.assign=ya,Dn.assignIn=ba,Dn.assignInWith=Ea,Dn.assignWith=ka,Dn.at=Aa,Dn.before=xo,Dn.bind=Oo,Dn.bindAll=eu,Dn.bindKey=Mo,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Zo(e)?e:[e]},Dn.chain=fo,Dn.chunk=function(e,n,r){n=(r?ys(e,n,r):n===t)?1:wn(ma(n),0);var i=null==e?0:e.length;if(!i||n<1)return[];for(var s=0,o=0,a=he(mt(i/n));s<i;)a[o++]=ii(e,s,s+=n);return a},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=he(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(Zo(n)?Oi(n):[n],_r(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,r=cs();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Oe(n);return[r(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},Dn.conforms=function(e){return function(e){var t=Ta(e);return function(n){return lr(n,e,t)}}(cr(e,1))},Dn.constant=tu,Dn.countBy=go,Dn.create=function(e,t){var n=Un(e);return null==t?n:sr(n,t)},Dn.curry=function e(n,r,i){var s=Yi(n,8,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},Dn.curryRight=function e(n,r,i){var o=Yi(n,s,t,t,t,t,t,r=i?t:r);return o.placeholder=e.placeholder,o},Dn.debounce=To,Dn.defaults=Sa,Dn.defaultsDeep=Ca,Dn.defer=Po,Dn.delay=No,Dn.difference=Bs,Dn.differenceBy=Ds,Dn.differenceWith=Us,Dn.drop=function(e,n,r){var i=null==e?0:e.length;return i?ii(e,(n=r||n===t?1:ma(n))<0?0:n,i):[]},Dn.dropRight=function(e,n,r){var i=null==e?0:e.length;return i?ii(e,0,(n=i-(n=r||n===t?1:ma(n)))<0?0:n):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?pi(e,cs(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?pi(e,cs(t,3),!0):[]},Dn.fill=function(e,n,r,i){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&ys(e,n,r)&&(r=0,i=s),function(e,n,r,i){var s=e.length;for((r=ma(r))<0&&(r=-r>s?0:s+r),(i=i===t||i>s?s:ma(i))<0&&(i+=s),i=r>i?0:ga(i);r<i;)e[r++]=n;return e}(e,n,r,i)):[]},Dn.filter=function(e,t){return(Zo(e)?Mt:vr)(e,cs(t,3))},Dn.flatMap=function(e,t){return _r(Ao(e,t),1)},Dn.flatMapDeep=function(e,t){return _r(Ao(e,t),l)},Dn.flatMapDepth=function(e,n,r){return r=r===t?1:ma(r),_r(Ao(e,n),r)},Dn.flatten=Zs,Dn.flattenDeep=function(e){return null!=e&&e.length?_r(e,l):[]},Dn.flattenDepth=function(e,n){return null!=e&&e.length?_r(e,n=n===t?1:ma(n)):[]},Dn.flip=function(e){return Yi(e,512)},Dn.flow=nu,Dn.flowRight=ru,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Dn.functions=function(e){return null==e?[]:kr(e,Ta(e))},Dn.functionsIn=function(e){return null==e?[]:kr(e,Pa(e))},Dn.groupBy=bo,Dn.initial=function(e){return null!=e&&e.length?ii(e,0,-1):[]},Dn.intersection=Hs,Dn.intersectionBy=Vs,Dn.intersectionWith=Js,Dn.invert=xa,Dn.invertBy=Oa,Dn.invokeMap=Eo,Dn.iteratee=su,Dn.keyBy=ko,Dn.keys=Ta,Dn.keysIn=Pa,Dn.map=Ao,Dn.mapKeys=function(e,t){var n={};return t=cs(t,3),br(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Dn.mapValues=function(e,t){var n={};return t=cs(t,3),br(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Dn.matches=function(e){return Dr(cr(e,1))},Dn.matchesProperty=function(e,t){return Ur(e,cr(t,1))},Dn.memoize=Lo,Dn.merge=Na,Dn.mergeWith=La,Dn.method=ou,Dn.methodOf=au,Dn.mixin=uu,Dn.negate=$o,Dn.nthArg=function(e){return e=ma(e),Kr((function(t){return Wr(t,e)}))},Dn.omit=$a,Dn.omitBy=function(e,t){return Fa(e,$o(cs(t)))},Dn.once=function(e){return xo(2,e)},Dn.orderBy=function(e,n,r,i){return null==e?[]:(Zo(n)||(n=null==n?[]:[n]),Zo(r=i?t:r)||(r=null==r?[]:[r]),Zr(e,n,r))},Dn.over=lu,Dn.overArgs=jo,Dn.overEvery=hu,Dn.overSome=du,Dn.partial=Fo,Dn.partialRight=zo,Dn.partition=So,Dn.pick=ja,Dn.pickBy=Fa,Dn.property=fu,Dn.propertyOf=function(e){return function(n){return null==e?t:Ar(e,n)}},Dn.pull=Ks,Dn.pullAll=Ys,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,cs(n,2)):e},Dn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Hr(e,n,t,r):e},Dn.pullAt=Qs,Dn.range=pu,Dn.rangeRight=mu,Dn.rearg=Bo,Dn.reject=function(e,t){return(Zo(e)?Mt:vr)(e,$o(cs(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=cs(t,3);++r<s;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Vr(e,i),n},Dn.rest=function(e,r){if("function"!=typeof e)throw new Oe(n);return Kr(e,r=r===t?r:ma(r))},Dn.reverse=eo,Dn.sampleSize=function(e,n,r){return n=(r?ys(e,n,r):n===t)?1:ma(n),(Zo(e)?Qn:Qr)(e,n)},Dn.set=function(e,t,n){return null==e?e:ei(e,t,n)},Dn.setWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:ei(e,n,r,i)},Dn.shuffle=function(e){return(Zo(e)?er:ri)(e)},Dn.slice=function(e,n,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&ys(e,n,r)?(n=0,r=i):(n=null==n?0:ma(n),r=r===t?i:ma(r)),ii(e,n,r)):[]},Dn.sortBy=Co,Dn.sortedUniq=function(e){return e&&e.length?ui(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?ui(e,cs(t,2)):[]},Dn.split=function(e,n,r){return r&&"number"!=typeof r&&ys(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=wa(e))&&("string"==typeof n||null!=n&&!oa(n))&&!(n=li(n))&&an(e)?Ei(pn(e),0,r):e.split(n,r):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new Oe(n);return t=null==t?0:wn(ma(t),0),Kr((function(n){var r=n[t],i=Ei(n,0,t);return r&&Lt(i,r),Ct(e,this,i)}))},Dn.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Dn.take=function(e,n,r){return e&&e.length?ii(e,0,(n=r||n===t?1:ma(n))<0?0:n):[]},Dn.takeRight=function(e,n,r){var i=null==e?0:e.length;return i?ii(e,(n=i-(n=r||n===t?1:ma(n)))<0?0:n,i):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?pi(e,cs(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?pi(e,cs(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new Oe(n);return ta(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),To(e,t,{leading:i,maxWait:t,trailing:s})},Dn.thru=po,Dn.toArray=fa,Dn.toPairs=za,Dn.toPairsIn=Ba,Dn.toPath=function(e){return Zo(e)?Nt(e,js):ca(e)?[e]:Oi($s(wa(e)))},Dn.toPlainObject=_a,Dn.transform=function(e,t,n){var r=Zo(e),i=r||Jo(e)||la(e);if(t=cs(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:ta(e)&&Yo(s)?Un(He(e)):{}}return(i?Rt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Dn.unary=function(e){return Ro(e,1)},Dn.union=to,Dn.unionBy=no,Dn.unionWith=ro,Dn.uniq=function(e){return e&&e.length?hi(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?hi(e,cs(t,2)):[]},Dn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?hi(e,t,n):[]},Dn.unset=function(e,t){return null==e||di(e,t)},Dn.unzip=io,Dn.unzipWith=so,Dn.update=function(e,t,n){return null==e?e:fi(e,t,wi(n))},Dn.updateWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:fi(e,n,wi(r),i)},Dn.values=Da,Dn.valuesIn=function(e){return null==e?[]:Qt(e,Pa(e))},Dn.without=oo,Dn.words=Ya,Dn.wrap=function(e,t){return Fo(wi(t),e)},Dn.xor=ao,Dn.xorBy=uo,Dn.xorWith=co,Dn.zip=lo,Dn.zipObject=function(e,t){return vi(e||[],t||[],nr)},Dn.zipObjectDeep=function(e,t){return vi(e||[],t||[],ei)},Dn.zipWith=ho,Dn.entries=za,Dn.entriesIn=Ba,Dn.extend=ba,Dn.extendWith=Ea,uu(Dn,Dn),Dn.add=wu,Dn.attempt=Qa,Dn.camelCase=Ua,Dn.capitalize=qa,Dn.ceil=yu,Dn.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=va(r))==r?r:0),n!==t&&(n=(n=va(n))==n?n:0),ur(va(e),n,r)},Dn.clone=function(e){return cr(e,4)},Dn.cloneDeep=function(e){return cr(e,5)},Dn.cloneDeepWith=function(e,n){return cr(e,5,n="function"==typeof n?n:t)},Dn.cloneWith=function(e,n){return cr(e,4,n="function"==typeof n?n:t)},Dn.conformsTo=function(e,t){return null==t||lr(e,t,Ta(t))},Dn.deburr=Wa,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=bu,Dn.endsWith=function(e,n,r){e=wa(e),n=li(n);var i=e.length,s=r=r===t?i:ur(ma(r),0,i);return(r-=n.length)>=0&&e.slice(r,s)==n},Dn.eq=Do,Dn.escape=function(e){return(e=wa(e))&&V.test(e)?e.replace(G,sn):e},Dn.escapeRegExp=function(e){return(e=wa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Dn.every=function(e,n,r){var i=Zo(e)?Ot:mr;return r&&ys(e,n,r)&&(n=t),i(e,cs(n,3))},Dn.find=vo,Dn.findIndex=qs,Dn.findKey=function(e,t){return Bt(e,cs(t,3),br)},Dn.findLast=_o,Dn.findLastIndex=Ws,Dn.findLastKey=function(e,t){return Bt(e,cs(t,3),Er)},Dn.floor=Eu,Dn.forEach=wo,Dn.forEachRight=yo,Dn.forIn=function(e,t){return null==e?e:wr(e,cs(t,3),Pa)},Dn.forInRight=function(e,t){return null==e?e:yr(e,cs(t,3),Pa)},Dn.forOwn=function(e,t){return e&&br(e,cs(t,3))},Dn.forOwnRight=function(e,t){return e&&Er(e,cs(t,3))},Dn.get=Ia,Dn.gt=Uo,Dn.gte=qo,Dn.has=function(e,t){return null!=e&&gs(e,t,Rr)},Dn.hasIn=Ra,Dn.head=Gs,Dn.identity=iu,Dn.includes=function(e,t,n,r){e=Ho(e)?e:Da(e),n=n&&!r?ma(n):0;var i=e.length;return n<0&&(n=wn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ut(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=wn(r+i,0)),Ut(e,t,i)},Dn.inRange=function(e,n,r){return n=pa(n),r===t?(r=n,n=0):r=pa(r),function(e,t,n){return e>=yn(t,n)&&e<wn(t,n)}(e=va(e),n,r)},Dn.invoke=Ma,Dn.isArguments=Wo,Dn.isArray=Zo,Dn.isArrayBuffer=Go,Dn.isArrayLike=Ho,Dn.isArrayLikeObject=Vo,Dn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Cr(e)==v},Dn.isBuffer=Jo,Dn.isDate=Xo,Dn.isElement=function(e){return na(e)&&1===e.nodeType&&!sa(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(Ho(e)&&(Zo(e)||"string"==typeof e||"function"==typeof e.splice||Jo(e)||la(e)||Wo(e)))return!e.length;var t=ms(e);if(t==E||t==I)return!e.size;if(As(e))return!jr(e).length;for(var n in e)if($e.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return Pr(e,t)},Dn.isEqualWith=function(e,n,r){var i=(r="function"==typeof r?r:t)?r(e,n):t;return i===t?Pr(e,n,t,r):!!i},Dn.isError=Ko,Dn.isFinite=function(e){return"number"==typeof e&&zt(e)},Dn.isFunction=Yo,Dn.isInteger=Qo,Dn.isLength=ea,Dn.isMap=ra,Dn.isMatch=function(e,t){return e===t||Nr(e,t,hs(t))},Dn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Nr(e,n,hs(n),r)},Dn.isNaN=function(e){return ia(e)&&e!=+e},Dn.isNative=function(e){if(ks(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=ia,Dn.isObject=ta,Dn.isObjectLike=na,Dn.isPlainObject=sa,Dn.isRegExp=oa,Dn.isSafeInteger=function(e){return Qo(e)&&e>=-9007199254740991&&e<=h},Dn.isSet=aa,Dn.isString=ua,Dn.isSymbol=ca,Dn.isTypedArray=la,Dn.isUndefined=function(e){return e===t},Dn.isWeakMap=function(e){return na(e)&&ms(e)==O},Dn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Cr(e)},Dn.join=function(e,t){return null==e?"":Ht.call(e,t)},Dn.kebabCase=Za,Dn.last=Xs,Dn.lastIndexOf=function(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var s=i;return r!==t&&(s=(s=ma(r))<0?wn(i+s,0):yn(s,i-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,n,s):Dt(e,Wt,s,!0)},Dn.lowerCase=Ga,Dn.lowerFirst=Ha,Dn.lt=ha,Dn.lte=da,Dn.max=function(e){return e&&e.length?gr(e,iu,Ir):t},Dn.maxBy=function(e,n){return e&&e.length?gr(e,cs(n,2),Ir):t},Dn.mean=function(e){return Zt(e,iu)},Dn.meanBy=function(e,t){return Zt(e,cs(t,2))},Dn.min=function(e){return e&&e.length?gr(e,iu,zr):t},Dn.minBy=function(e,n){return e&&e.length?gr(e,cs(n,2),zr):t},Dn.stubArray=gu,Dn.stubFalse=vu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=ku,Dn.nth=function(e,n){return e&&e.length?Wr(e,ma(n)):t},Dn.noConflict=function(){return pt._===this&&(pt._=De),this},Dn.noop=cu,Dn.now=Io,Dn.pad=function(e,t,n){e=wa(e);var r=(t=ma(t))?fn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Zi(gt(i),n)+e+Zi(mt(i),n)},Dn.padEnd=function(e,t,n){e=wa(e);var r=(t=ma(t))?fn(e):0;return t&&r<t?e+Zi(t-r,n):e},Dn.padStart=function(e,t,n){e=wa(e);var r=(t=ma(t))?fn(e):0;return t&&r<t?Zi(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(wa(e).replace(re,""),t||0)},Dn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&ys(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=pa(e),n===t?(n=e,e=0):n=pa(n)),e>n){var i=e;e=n,n=i}if(r||e%1||n%1){var s=kn();return yn(e+s*(n-e+lt("1e-"+((s+"").length-1))),n)}return Jr(e,n)},Dn.reduce=function(e,t,n){var r=Zo(e)?$t:Vt,i=arguments.length<3;return r(e,cs(t,4),n,i,fr)},Dn.reduceRight=function(e,t,n){var r=Zo(e)?jt:Vt,i=arguments.length<3;return r(e,cs(t,4),n,i,pr)},Dn.repeat=function(e,n,r){return n=(r?ys(e,n,r):n===t)?1:ma(n),Xr(wa(e),n)},Dn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,n,r){var i=-1,s=(n=yi(n,e)).length;for(s||(s=1,e=t);++i<s;){var o=null==e?t:e[js(n[i])];o===t&&(i=s,o=r),e=Yo(o)?o.call(e):o}return e},Dn.round=Au,Dn.runInContext=e,Dn.sample=function(e){return(Zo(e)?Yn:Yr)(e)},Dn.size=function(e){if(null==e)return 0;if(Ho(e))return ua(e)?fn(e):e.length;var t=ms(e);return t==E||t==I?e.size:jr(e).length},Dn.snakeCase=Va,Dn.some=function(e,n,r){var i=Zo(e)?Ft:si;return r&&ys(e,n,r)&&(n=t),i(e,cs(n,3))},Dn.sortedIndex=function(e,t){return oi(e,t)},Dn.sortedIndexBy=function(e,t,n){return ai(e,t,cs(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Do(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return ai(e,t,cs(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=oi(e,t,!0)-1;if(Do(e[n],t))return n}return-1},Dn.startCase=Ja,Dn.startsWith=function(e,t,n){return e=wa(e),n=null==n?0:ur(ma(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},Dn.subtract=Su,Dn.sum=function(e){return e&&e.length?Jt(e,iu):0},Dn.sumBy=function(e,t){return e&&e.length?Jt(e,cs(t,2)):0},Dn.template=function(e,n,r){var i=Dn.templateSettings;r&&ys(e,n,r)&&(n=t),e=wa(e),n=Ea({},n,i,Qi);var s,o,a=Ea({},n.imports,i.imports,Qi),u=Ta(a),c=Qt(a,u),l=0,h=n.interpolate||be,d="__p += '",f=Re((n.escape||be).source+"|"+h.source+"|"+(h===K?fe:be).source+"|"+(n.evaluate||be).source+"|$","g"),p="//# sourceURL="+($e.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(f,(function(t,n,r,i,a,u){return r||(r=i),d+=e.slice(l,u).replace(Ee,on),n&&(s=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var m=$e.call(n,"variable")&&n.variable;if(m){if(ce.test(m))throw new Ae("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(U,""):d).replace(q,"$1").replace(W,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Qa((function(){return Se(u,p+"return "+d).apply(t,c)}));if(g.source=d,Ko(g))throw g;return g},Dn.times=function(e,t){if((e=ma(e))<1||e>h)return[];var n=f,r=yn(e,f);t=cs(t),e-=f;for(var i=Xt(r,t);++n<e;)t(n);return i},Dn.toFinite=pa,Dn.toInteger=ma,Dn.toLength=ga,Dn.toLower=function(e){return wa(e).toLowerCase()},Dn.toNumber=va,Dn.toSafeInteger=function(e){return e?ur(ma(e),-9007199254740991,h):0===e?e:0},Dn.toString=wa,Dn.toUpper=function(e){return wa(e).toUpperCase()},Dn.trim=function(e,n,r){if((e=wa(e))&&(r||n===t))return Kt(e);if(!e||!(n=li(n)))return e;var i=pn(e),s=pn(n);return Ei(i,tn(i,s),nn(i,s)+1).join("")},Dn.trimEnd=function(e,n,r){if((e=wa(e))&&(r||n===t))return e.slice(0,mn(e)+1);if(!e||!(n=li(n)))return e;var i=pn(e);return Ei(i,0,nn(i,pn(n))+1).join("")},Dn.trimStart=function(e,n,r){if((e=wa(e))&&(r||n===t))return e.replace(re,"");if(!e||!(n=li(n)))return e;var i=pn(e);return Ei(i,tn(i,pn(n))).join("")},Dn.truncate=function(e,n){var r=30,i="...";if(ta(n)){var s="separator"in n?n.separator:s;r="length"in n?ma(n.length):r,i="omission"in n?li(n.omission):i}var o=(e=wa(e)).length;if(an(e)){var a=pn(e);o=a.length}if(r>=o)return e;var u=r-fn(i);if(u<1)return i;var c=a?Ei(a,0,u).join(""):e.slice(0,u);if(s===t)return c+i;if(a&&(u+=c.length-u),oa(s)){if(e.slice(u).search(s)){var l,h=c;for(s.global||(s=Re(s.source,wa(pe.exec(s))+"g")),s.lastIndex=0;l=s.exec(h);)var d=l.index;c=c.slice(0,d===t?u:d)}}else if(e.indexOf(li(s),u)!=u){var f=c.lastIndexOf(s);f>-1&&(c=c.slice(0,f))}return c+i},Dn.unescape=function(e){return(e=wa(e))&&H.test(e)?e.replace(Z,gn):e},Dn.uniqueId=function(e){var t=++je;return wa(e)+t},Dn.upperCase=Xa,Dn.upperFirst=Ka,Dn.each=wo,Dn.eachRight=yo,Dn.first=Gs,uu(Dn,(_u={},br(Dn,(function(e,t){$e.call(Dn.prototype,t)||(_u[t]=e)})),_u),{chain:!1}),Dn.VERSION="4.17.21",Rt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Dn[e].placeholder=Dn})),Rt(["drop","take"],(function(e,n){Zn.prototype[e]=function(r){r=r===t?1:wn(ma(r),0);var i=this.__filtered__&&!n?new Zn(this):this.clone();return i.__filtered__?i.__takeCount__=yn(r,i.__takeCount__):i.__views__.push({size:yn(r,f),type:e+(i.__dir__<0?"Right":"")}),i},Zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Rt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:cs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Rt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Zn.prototype[e]=function(){return this[n](1).value()[0]}})),Rt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Zn.prototype[e]=function(){return this.__filtered__?new Zn(this):this[n](1)}})),Zn.prototype.compact=function(){return this.filter(iu)},Zn.prototype.find=function(e){return this.filter(e).head()},Zn.prototype.findLast=function(e){return this.reverse().find(e)},Zn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Zn(this):this.map((function(n){return Mr(n,e,t)}))})),Zn.prototype.reject=function(e){return this.filter($o(cs(e)))},Zn.prototype.slice=function(e,n){e=ma(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Zn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ma(n))<0?r.dropRight(-n):r.take(n-e)),r)},Zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Zn.prototype.toArray=function(){return this.take(f)},br(Zn.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),s=Dn[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);s&&(Dn.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof Zn,c=a[0],l=u||Zo(n),h=function(e){var t=s.apply(Dn,Lt([e],a));return i&&d?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=o&&!d,m=u&&!f;if(!o&&l){n=m?n:new Zn(this);var g=e.apply(n,a);return g.__actions__.push({func:po,args:[h],thisArg:t}),new Wn(g,d)}return p&&m?e.apply(this,a):(g=this.thru(h),p?i?g.value()[0]:g.value():g)})})),Rt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Zo(i)?i:[],e)}return this[n]((function(n){return t.apply(Zo(n)?n:[],e)}))}})),br(Zn.prototype,(function(e,t){var n=Dn[t];if(n){var r=n.name+"";$e.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[Di(t,2).name]=[{name:"wrapper",func:t}],Zn.prototype.clone=function(){var e=new Zn(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e},Zn.prototype.reverse=function(){if(this.__filtered__){var e=new Zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Zo(e),r=t<0,i=n?e.length:0,s=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=yn(t,e+o);break;case"takeRight":e=wn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,u=a-o,c=r?a:o-1,l=this.__iteratees__,h=l.length,d=0,f=yn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return mi(e,this.__actions__);var p=[];e:for(;u--&&d<f;){for(var m=-1,g=e[c+=t];++m<h;){var v=l[m],_=v.iteratee,w=v.type,y=_(g);if(2==w)g=y;else if(!y){if(1==w)continue e;break e}}p[d++]=g}return p},Dn.prototype.at=mo,Dn.prototype.chain=function(){return fo(this)},Dn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Dn.prototype.next=function(){this.__values__===t&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var n,r=this;r instanceof qn;){var i=zs(r);i.__index__=0,i.__values__=t,n?s.__wrapped__=i:n=i;var s=i;r=r.__wrapped__}return s.__wrapped__=e,n},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Zn){var n=e;return this.__actions__.length&&(n=new Zn(this)),(n=n.reverse()).__actions__.push({func:po,args:[eo],thisArg:t}),new Wn(n,this.__chain__)}return this.thru(eo)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Ye&&(Dn.prototype[Ye]=function(){return this}),Dn}();gt?((gt.exports=vn)._=vn,mt._=vn):pt._=vn}.call(e);var fe=de.exports;function pe(e,t){return L(e,(e=>"string"==typeof e&&t.test(e)))}const me=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,ge=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u;var ve;function _e(e){const t=me.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}function we(e){const t=ge.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}pe("CaipChainId",me),pe("CaipNamespace",/^[-a-z0-9]{3,8}$/u),pe("CaipReference",/^[-_a-zA-Z0-9]{1,32}$/u),pe("CaipAccountId",ge),pe("CaipAccountAddress",/^[-.%a-zA-Z0-9]{1,128}$/u),pe("CaipAssetNamespace",/^[-a-z0-9]{3,8}$/u),pe("CaipAssetReference",/^[-.%a-zA-Z0-9]{1,128}$/u),pe("CaipTokenId",/^[-.%a-zA-Z0-9]{1,78}$/u),pe("CaipAssetType",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u),pe("CaipAssetId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u),pe("CaipAssetTypeOrId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u),function(e){e.Bip122="bip122",e.Solana="solana",e.Stellar="stellar",e.Tron="tron",e.Eip155="eip155",e.Wallet="wallet"}(ve=ve||(ve={}));const ye=e=>$(e);function be({path:e,branch:t}){const n=e[e.length-1];return q(t[t.length-2],n)}function Ee(e){return new x({...e,type:`optional ${e.type}`,validator:(t,n)=>!be(n)||e.validator(t,n),refiner:(t,n)=>!be(n)||e.refiner(t,n)})}function ke(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(!ke(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e<n.length;e++)if("string"!=typeof n[e][0]||!ke(n[e][1])){t=!1;break}return t}return!1}const Ae=L("JSON",(e=>ke(e))),Se=(Ce=Ae,Ie=D(L("any",(()=>!0)),"JSON",(e=>P(e,Ae))),Re=e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))),new x({...Ce,coercer:(e,t)=>P(e,Ie)?Ce.coercer(Re(e,t),t):Ce.coercer(e,t)}));var Ce,Ie,Re;function xe(e){try{return function(e){T(e,Se)}(e),!0}catch{return!1}}const Oe=function(e){const t=S(e),n=typeof e;return new x({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${S(n)}`})}("2.0"),Me=function(e){return new x({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}(z([L("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${S(e)}`)),F()])),Te=ye({code:L("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${S(e)}`)),message:F(),data:Ee(Se),stack:Ee(F())}),Pe=z([(Le=F(),$e=Se,new x({type:"record",schema:null,*entries(e){if(A(e))for(const t in e){const n=e[t];yield[t,t,Le],yield[t,n,$e]}},validator:e=>A(e)||`Expected an object, but received: ${S(e)}`})),(Ne=Se,new x({type:"array",schema:Ne,*entries(e){if(Ne&&Array.isArray(e))for(const[t,n]of e.entries())yield[t,n,Ne]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${S(e)}`}))]);var Ne,Le,$e;ye({id:Me,jsonrpc:Oe,method:F(),params:Ee(Pe)}),ye({jsonrpc:Oe,method:F(),params:Ee(Pe)}),$({id:Me,jsonrpc:Oe,result:j(L("unknown",(()=>!0))),error:j(Te)});function je({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}
|
|
2
|
+
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */z([ye({id:Me,jsonrpc:Oe,result:Se}),ye({id:Me,jsonrpc:Oe,error:Te})]);function Fe(e){let t=e.length;for(;--t>=0;)e[t]=0}const ze=256,Be=286,De=30,Ue=15,qe=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),We=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Ze=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ge=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),He=new Array(576);Fe(He);const Ve=new Array(60);Fe(Ve);const Je=new Array(512);Fe(Je);const Xe=new Array(256);Fe(Xe);const Ke=new Array(29);Fe(Ke);const Ye=new Array(De);function Qe(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let et,tt,nt;function rt(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}Fe(Ye);const it=e=>e<256?Je[e]:Je[256+(e>>>7)],st=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},ot=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,st(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},at=(e,t,n)=>{ot(e,n[2*t],n[2*t+1])},ut=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},ct=(e,t,n)=>{const r=new Array(16);let i,s,o=0;for(i=1;i<=Ue;i++)o=o+n[i-1]<<1,r[i]=o;for(s=0;s<=t;s++){let t=e[2*s+1];0!==t&&(e[2*s]=ut(r[t]++,t))}},lt=e=>{let t;for(t=0;t<Be;t++)e.dyn_ltree[2*t]=0;for(t=0;t<De;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ht=e=>{e.bi_valid>8?st(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},dt=(e,t,n,r)=>{const i=2*t,s=2*n;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]},ft=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&dt(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!dt(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},pt=(e,t,n)=>{let r,i,s,o,a=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+a++],r+=(255&e.pending_buf[e.sym_buf+a++])<<8,i=e.pending_buf[e.sym_buf+a++],0===r?at(e,i,t):(s=Xe[i],at(e,s+ze+1,t),o=qe[s],0!==o&&(i-=Ke[s],ot(e,i,o)),r--,s=it(r),at(e,s,n),o=We[s],0!==o&&(r-=Ye[s],ot(e,r,o)))}while(a<e.sym_next);at(e,256,t)},mt=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let o,a,u,c=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<s;o++)0!==n[2*o]?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):n[2*o+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=c<2?++c:0,n[2*u]=1,e.depth[u]=0,e.opt_len--,i&&(e.static_len-=r[2*u+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)ft(e,n,o);u=s;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ft(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,n[2*u]=n[2*o]+n[2*a],e.depth[u]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,n[2*o+1]=n[2*a+1]=u,e.heap[1]=u++,ft(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length;let c,l,h,d,f,p,m=0;for(d=0;d<=Ue;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)l=e.heap[c],d=n[2*n[2*l+1]+1]+1,d>u&&(d=u,m++),n[2*l+1]=d,l>r||(e.bl_count[d]++,f=0,l>=a&&(f=o[l-a]),p=n[2*l],e.opt_len+=p*(d+f),s&&(e.static_len+=p*(i[2*l+1]+f)));if(0!==m){do{for(d=u-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(d=u;0!==d;d--)for(l=e.bl_count[d];0!==l;)h=e.heap[--c],h>r||(n[2*h+1]!==d&&(e.opt_len+=(d-n[2*h+1])*n[2*h],n[2*h+1]=d),l--)}})(e,t),ct(n,c,e.bl_count)},gt=(e,t,n)=>{let r,i,s=-1,o=t[1],a=0,u=7,c=4;for(0===o&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++a<u&&i===o||(a<c?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,s=i,0===o?(u=138,c=3):i===o?(u=6,c=3):(u=7,c=4))},vt=(e,t,n)=>{let r,i,s=-1,o=t[1],a=0,u=7,c=4;for(0===o&&(u=138,c=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++a<u&&i===o)){if(a<c)do{at(e,i,e.bl_tree)}while(0!=--a);else 0!==i?(i!==s&&(at(e,i,e.bl_tree),a--),at(e,16,e.bl_tree),ot(e,a-3,2)):a<=10?(at(e,17,e.bl_tree),ot(e,a-3,3)):(at(e,18,e.bl_tree),ot(e,a-11,7));a=0,s=i,0===o?(u=138,c=3):i===o?(u=6,c=3):(u=7,c=4)}};let _t=!1;const wt=(e,t,n,r)=>{ot(e,0+(r?1:0),3),ht(e),st(e,n),st(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var yt=(e,t,n,r)=>{let i,s,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<ze;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),mt(e,e.l_desc),mt(e,e.d_desc),o=(e=>{let t;for(gt(e,e.dyn_ltree,e.l_desc.max_code),gt(e,e.dyn_dtree,e.d_desc.max_code),mt(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Ge[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==t?wt(e,t,n,r):4===e.strategy||s===i?(ot(e,2+(r?1:0),3),pt(e,He,Ve)):(ot(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(ot(e,t-257,5),ot(e,n-1,5),ot(e,r-4,4),i=0;i<r;i++)ot(e,e.bl_tree[2*Ge[i]+1],3);vt(e,e.dyn_ltree,t-1),vt(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),pt(e,e.dyn_ltree,e.dyn_dtree)),lt(e),r&&ht(e)},bt={_tr_init:e=>{_t||((()=>{let e,t,n,r,i;const s=new Array(16);for(n=0,r=0;r<28;r++)for(Ke[r]=n,e=0;e<1<<qe[r];e++)Xe[n++]=r;for(Xe[n-1]=r,i=0,r=0;r<16;r++)for(Ye[r]=i,e=0;e<1<<We[r];e++)Je[i++]=r;for(i>>=7;r<De;r++)for(Ye[r]=i<<7,e=0;e<1<<We[r]-7;e++)Je[256+i++]=r;for(t=0;t<=Ue;t++)s[t]=0;for(e=0;e<=143;)He[2*e+1]=8,e++,s[8]++;for(;e<=255;)He[2*e+1]=9,e++,s[9]++;for(;e<=279;)He[2*e+1]=7,e++,s[7]++;for(;e<=287;)He[2*e+1]=8,e++,s[8]++;for(ct(He,287,s),e=0;e<De;e++)Ve[2*e+1]=5,Ve[2*e]=ut(e,5);et=new Qe(He,qe,257,Be,Ue),tt=new Qe(Ve,We,0,De,Ue),nt=new Qe(new Array(0),Ze,0,19,7)})(),_t=!0),e.l_desc=new rt(e.dyn_ltree,et),e.d_desc=new rt(e.dyn_dtree,tt),e.bl_desc=new rt(e.bl_tree,nt),e.bi_buf=0,e.bi_valid=0,lt(e)},_tr_stored_block:wt,_tr_flush_block:yt,_tr_tally:(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Xe[n]+ze+1)]++,e.dyn_dtree[2*it(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{ot(e,2,3),at(e,256,He),(e=>{16===e.bi_valid?(st(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var Et=(e,t,n,r)=>{let i=65535&e|0,s=e>>>16&65535|0,o=0;for(;0!==n;){o=n>2e3?2e3:n,n-=o;do{i=i+t[r++]|0,s=s+i|0}while(--o);i%=65521,s%=65521}return i|s<<16|0};const kt=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var At=(e,t,n,r)=>{const i=kt,s=r+n;e^=-1;for(let n=r;n<s;n++)e=e>>>8^i[255&(e^t[n])];return-1^e},St={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ct={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:It,_tr_stored_block:Rt,_tr_flush_block:xt,_tr_tally:Ot,_tr_align:Mt}=bt,{Z_NO_FLUSH:Tt,Z_PARTIAL_FLUSH:Pt,Z_FULL_FLUSH:Nt,Z_FINISH:Lt,Z_BLOCK:$t,Z_OK:jt,Z_STREAM_END:Ft,Z_STREAM_ERROR:zt,Z_DATA_ERROR:Bt,Z_BUF_ERROR:Dt,Z_DEFAULT_COMPRESSION:Ut,Z_FILTERED:qt,Z_HUFFMAN_ONLY:Wt,Z_RLE:Zt,Z_FIXED:Gt,Z_DEFAULT_STRATEGY:Ht,Z_UNKNOWN:Vt,Z_DEFLATED:Jt}=Ct,Xt=258,Kt=262,Yt=42,Qt=113,en=666,tn=(e,t)=>(e.msg=St[t],t),nn=e=>2*e-(e>4?9:0),rn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},sn=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do{n=e.head[--r],e.head[r]=n>=i?n-i:0}while(--t);t=i,r=t;do{n=e.prev[--r],e.prev[r]=n>=i?n-i:0}while(--t)};let on=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const an=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},un=(e,t)=>{xt(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,an(e.strm)},cn=(e,t)=>{e.pending_buf[e.pending++]=t},ln=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},hn=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=Et(e.adler,t,i,n):2===e.state.wrap&&(e.adler=At(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},dn=(e,t)=>{let n,r,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match;const u=e.strstart>e.w_size-Kt?e.strstart-(e.w_size-Kt):0,c=e.window,l=e.w_mask,h=e.prev,d=e.strstart+Xt;let f=c[s+o-1],p=c[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(n=t,c[n+o]===p&&c[n+o-1]===f&&c[n]===c[s]&&c[++n]===c[s+1]){s+=2,n++;do{}while(c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&s<d);if(r=Xt-(d-s),s=d-Xt,r>o){if(e.match_start=t,o=r,r>=a)break;f=c[s+o-1],p=c[s+o]}}}while((t=h[t&l])>u&&0!=--i);return o<=e.lookahead?o:e.lookahead},fn=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kt)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),sn(e),r+=t),0===e.strm.avail_in)break;if(n=hn(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=on(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=on(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<Kt&&0!==e.strm.avail_in)},pn=(e,t)=>{let n,r,i,s=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_out<i)break;if(i=e.strm.avail_out-i,r=e.strstart-e.block_start,n>r+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n<s&&(0===n&&t!==Lt||t===Tt||n!==r+e.strm.avail_in))break;o=t===Lt&&n===r+e.strm.avail_in?1:0,Rt(e,0,0,o),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,an(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(hn(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==Tt&&t!==Lt&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(hn(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,s=i>e.w_size?e.w_size:i,r=e.strstart-e.block_start,(r>=s||(r||t===Lt)&&t!==Tt&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,o=t===Lt&&0===e.strm.avail_in&&n===r?1:0,Rt(e,e.block_start,n,o),e.block_start+=n,an(e.strm)),o?3:1)},mn=(e,t)=>{let n,r;for(;;){if(e.lookahead<Kt){if(fn(e),e.lookahead<Kt&&t===Tt)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=on(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-Kt&&(e.match_length=dn(e,n)),e.match_length>=3)if(r=Ot(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=on(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=on(e,e.ins_h,e.window[e.strstart+1]);else r=Ot(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(un(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Lt?(un(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(un(e,!1),0===e.strm.avail_out)?1:2},gn=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Kt){if(fn(e),e.lookahead<Kt&&t===Tt)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=on(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Kt&&(e.match_length=dn(e,n),e.match_length<=5&&(e.strategy===qt||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=Ot(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=on(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(un(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=Ot(e,0,e.window[e.strstart-1]),r&&un(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Ot(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Lt?(un(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(un(e,!1),0===e.strm.avail_out)?1:2};function vn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const _n=[new vn(0,0,0,0,pn),new vn(4,4,8,4,mn),new vn(4,5,16,8,mn),new vn(4,6,32,32,mn),new vn(4,4,16,16,gn),new vn(8,16,32,32,gn),new vn(8,16,128,128,gn),new vn(8,32,128,256,gn),new vn(32,128,258,1024,gn),new vn(32,258,258,4096,gn)];function wn(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Jt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),rn(this.dyn_ltree),rn(this.dyn_dtree),rn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),rn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),rn(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const yn=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Yt&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Qt&&t.status!==en?1:0},bn=e=>{if(yn(e))return tn(e,zt);e.total_in=e.total_out=0,e.data_type=Vt;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Yt:Qt,e.adler=2===t.wrap?0:1,t.last_flush=-2,It(t),jt},En=e=>{const t=bn(e);var n;return t===jt&&((n=e.state).window_size=2*n.w_size,rn(n.head),n.max_lazy_match=_n[n.level].max_lazy,n.good_match=_n[n.level].good_length,n.nice_match=_n[n.level].nice_length,n.max_chain_length=_n[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},kn=(e,t,n,r,i,s)=>{if(!e)return zt;let o=1;if(t===Ut&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||n!==Jt||r<8||r>15||t<0||t>9||s<0||s>Gt||8===r&&1!==o)return tn(e,zt);8===r&&(r=9);const a=new wn;return e.state=a,a.strm=e,a.status=Yt,a.wrap=o,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=s,a.method=n,En(e)};var An={deflateInit:(e,t)=>kn(e,t,Jt,15,8,Ht),deflateInit2:kn,deflateReset:En,deflateResetKeep:bn,deflateSetHeader:(e,t)=>yn(e)||2!==e.state.wrap?zt:(e.state.gzhead=t,jt),deflate:(e,t)=>{if(yn(e)||t>$t||t<0)return e?tn(e,zt):zt;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===en&&t!==Lt)return tn(e,0===e.avail_out?Dt:zt);const r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(an(e),0===e.avail_out)return n.last_flush=-1,jt}else if(0===e.avail_in&&nn(t)<=nn(r)&&t!==Lt)return tn(e,Dt);if(n.status===en&&0!==e.avail_in)return tn(e,Dt);if(n.status===Yt&&0===n.wrap&&(n.status=Qt),n.status===Yt){let t=Jt+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=Wt||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=r<<6,0!==n.strstart&&(t|=32),t+=31-t%31,ln(n,t),0!==n.strstart&&(ln(n,e.adler>>>16),ln(n,65535&e.adler)),e.adler=1,n.status=Qt,an(e),0!==n.pending)return n.last_flush=-1,jt}if(57===n.status)if(e.adler=0,cn(n,31),cn(n,139),cn(n,8),n.gzhead)cn(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),cn(n,255&n.gzhead.time),cn(n,n.gzhead.time>>8&255),cn(n,n.gzhead.time>>16&255),cn(n,n.gzhead.time>>24&255),cn(n,9===n.level?2:n.strategy>=Wt||n.level<2?4:0),cn(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(cn(n,255&n.gzhead.extra.length),cn(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=At(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(cn(n,0),cn(n,0),cn(n,0),cn(n,0),cn(n,0),cn(n,9===n.level?2:n.strategy>=Wt||n.level<2?4:0),cn(n,3),n.status=Qt,an(e),0!==n.pending)return n.last_flush=-1,jt;if(69===n.status){if(n.gzhead.extra){let t=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=At(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,an(e),0!==n.pending)return n.last_flush=-1,jt;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=At(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=At(e.adler,n.pending_buf,n.pending-r,r)),an(e),0!==n.pending)return n.last_flush=-1,jt;r=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,cn(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=At(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=At(e.adler,n.pending_buf,n.pending-r,r)),an(e),0!==n.pending)return n.last_flush=-1,jt;r=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,cn(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=At(e.adler,n.pending_buf,n.pending-r,r))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(an(e),0!==n.pending))return n.last_flush=-1,jt;cn(n,255&e.adler),cn(n,e.adler>>8&255),e.adler=0}if(n.status=Qt,an(e),0!==n.pending)return n.last_flush=-1,jt}if(0!==e.avail_in||0!==n.lookahead||t!==Tt&&n.status!==en){let r=0===n.level?pn(n,t):n.strategy===Wt?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(fn(e),0===e.lookahead)){if(t===Tt)return 1;break}if(e.match_length=0,n=Ot(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(un(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Lt?(un(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(un(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===Zt?((e,t)=>{let n,r,i,s;const o=e.window;for(;;){if(e.lookahead<=Xt){if(fn(e),e.lookahead<=Xt&&t===Tt)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){s=e.strstart+Xt;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<s);e.match_length=Xt-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Ot(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Ot(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(un(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Lt?(un(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(un(e,!1),0===e.strm.avail_out)?1:2})(n,t):_n[n.level].func(n,t);if(3!==r&&4!==r||(n.status=en),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),jt;if(2===r&&(t===Pt?Mt(n):t!==$t&&(Rt(n,0,0,!1),t===Nt&&(rn(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),an(e),0===e.avail_out))return n.last_flush=-1,jt}return t!==Lt?jt:n.wrap<=0?Ft:(2===n.wrap?(cn(n,255&e.adler),cn(n,e.adler>>8&255),cn(n,e.adler>>16&255),cn(n,e.adler>>24&255),cn(n,255&e.total_in),cn(n,e.total_in>>8&255),cn(n,e.total_in>>16&255),cn(n,e.total_in>>24&255)):(ln(n,e.adler>>>16),ln(n,65535&e.adler)),an(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?jt:Ft)},deflateEnd:e=>{if(yn(e))return zt;const t=e.state.status;return e.state=null,t===Qt?tn(e,Bt):jt},deflateSetDictionary:(e,t)=>{let n=t.length;if(yn(e))return zt;const r=e.state,i=r.wrap;if(2===i||1===i&&r.status!==Yt||r.lookahead)return zt;if(1===i&&(e.adler=Et(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(rn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const s=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,fn(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=on(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,fn(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=a,e.avail_in=s,r.wrap=i,jt},deflateInfo:"pako deflate (from Nodeca project)"};const Sn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Cn={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Sn(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;const n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}};let In=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){In=!1}const Rn=new Uint8Array(256);for(let e=0;e<256;e++)Rn[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Rn[254]=Rn[254]=1;var xn={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,s,o=e.length,a=0;for(i=0;i<o;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<o&&(r=e.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),s=0,i=0;s<a;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<o&&(r=e.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[s++]=n:n<2048?(t[s++]=192|n>>>6,t[s++]=128|63&n):n<65536?(t[s++]=224|n>>>12,t[s++]=128|n>>>6&63,t[s++]=128|63&n):(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63,t[s++]=128|n>>>6&63,t[s++]=128|63&n);return t},buf2string:(e,t)=>{const n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,i;const s=new Array(2*n);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){s[i++]=t;continue}let o=Rn[t];if(o>4)s[i++]=65533,r+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&r<n;)t=t<<6|63&e[r++],o--;o>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&In)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(s,i)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Rn[e[n]]>t?n:t}};var On=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Mn=Object.prototype.toString,{Z_NO_FLUSH:Tn,Z_SYNC_FLUSH:Pn,Z_FULL_FLUSH:Nn,Z_FINISH:Ln,Z_OK:$n,Z_STREAM_END:jn,Z_DEFAULT_COMPRESSION:Fn,Z_DEFAULT_STRATEGY:zn,Z_DEFLATED:Bn}=Ct;function Dn(e){this.options=Cn.assign({level:Fn,method:Bn,chunkSize:16384,windowBits:15,memLevel:8,strategy:zn},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new On,this.strm.avail_out=0;let n=An.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==$n)throw new Error(St[n]);if(t.header&&An.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?xn.string2buf(t.dictionary):"[object ArrayBuffer]"===Mn.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=An.deflateSetDictionary(this.strm,e),n!==$n)throw new Error(St[n]);this._dict_set=!0}}function Un(e,t){const n=new Dn(t);if(n.push(e,!0),n.err)throw n.msg||St[n.err];return n.result}Dn.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?Ln:Tn,"string"==typeof e?n.input=xn.string2buf(e):"[object ArrayBuffer]"===Mn.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(s===Pn||s===Nn)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=An.deflate(n,s),i===jn)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=An.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===$n;if(0!==n.avail_out){if(s>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},Dn.prototype.onData=function(e){this.chunks.push(e)},Dn.prototype.onEnd=function(e){e===$n&&(this.result=Cn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var qn={Deflate:Dn,deflate:Un,deflateRaw:function(e,t){return(t=t||{}).raw=!0,Un(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,Un(e,t)},constants:Ct};const Wn=16209;var Zn=function(e,t){let n,r,i,s,o,a,u,c,l,h,d,f,p,m,g,v,_,w,y,b,E,k,A,S;const C=e.state;n=e.next_in,A=e.input,r=n+(e.avail_in-5),i=e.next_out,S=e.output,s=i-(t-e.avail_out),o=i+(e.avail_out-257),a=C.dmax,u=C.wsize,c=C.whave,l=C.wnext,h=C.window,d=C.hold,f=C.bits,p=C.lencode,m=C.distcode,g=(1<<C.lenbits)-1,v=(1<<C.distbits)-1;e:do{f<15&&(d+=A[n++]<<f,f+=8,d+=A[n++]<<f,f+=8),_=p[d&g];t:for(;;){if(w=_>>>24,d>>>=w,f-=w,w=_>>>16&255,0===w)S[i++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=p[(65535&_)+(d&(1<<w)-1)];continue t}if(32&w){C.mode=16191;break e}e.msg="invalid literal/length code",C.mode=Wn;break e}y=65535&_,w&=15,w&&(f<w&&(d+=A[n++]<<f,f+=8),y+=d&(1<<w)-1,d>>>=w,f-=w),f<15&&(d+=A[n++]<<f,f+=8,d+=A[n++]<<f,f+=8),_=m[d&v];n:for(;;){if(w=_>>>24,d>>>=w,f-=w,w=_>>>16&255,!(16&w)){if(0==(64&w)){_=m[(65535&_)+(d&(1<<w)-1)];continue n}e.msg="invalid distance code",C.mode=Wn;break e}if(b=65535&_,w&=15,f<w&&(d+=A[n++]<<f,f+=8,f<w&&(d+=A[n++]<<f,f+=8)),b+=d&(1<<w)-1,b>a){e.msg="invalid distance too far back",C.mode=Wn;break e}if(d>>>=w,f-=w,w=i-s,b>w){if(w=b-w,w>c&&C.sane){e.msg="invalid distance too far back",C.mode=Wn;break e}if(E=0,k=h,0===l){if(E+=u-w,w<y){y-=w;do{S[i++]=h[E++]}while(--w);E=i-b,k=S}}else if(l<w){if(E+=u+l-w,w-=l,w<y){y-=w;do{S[i++]=h[E++]}while(--w);if(E=0,l<y){w=l,y-=w;do{S[i++]=h[E++]}while(--w);E=i-b,k=S}}}else if(E+=l-w,w<y){y-=w;do{S[i++]=h[E++]}while(--w);E=i-b,k=S}for(;y>2;)S[i++]=k[E++],S[i++]=k[E++],S[i++]=k[E++],y-=3;y&&(S[i++]=k[E++],y>1&&(S[i++]=k[E++]))}else{E=i-b;do{S[i++]=S[E++],S[i++]=S[E++],S[i++]=S[E++],y-=3}while(y>2);y&&(S[i++]=S[E++],y>1&&(S[i++]=S[E++]))}break}}break}}while(n<r&&i<o);y=f>>3,n-=y,f-=y<<3,d&=(1<<f)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<o?o-i+257:257-(i-o),C.hold=d,C.bits=f};const Gn=15,Hn=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Vn=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Jn=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Xn=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Kn=(e,t,n,r,i,s,o,a)=>{const u=a.bits;let c,l,h,d,f,p,m=0,g=0,v=0,_=0,w=0,y=0,b=0,E=0,k=0,A=0,S=null;const C=new Uint16Array(16),I=new Uint16Array(16);let R,x,O,M=null;for(m=0;m<=Gn;m++)C[m]=0;for(g=0;g<r;g++)C[t[n+g]]++;for(w=u,_=Gn;_>=1&&0===C[_];_--);if(w>_&&(w=_),0===_)return i[s++]=20971520,i[s++]=20971520,a.bits=1,0;for(v=1;v<_&&0===C[v];v++);for(w<v&&(w=v),E=1,m=1;m<=Gn;m++)if(E<<=1,E-=C[m],E<0)return-1;if(E>0&&(0===e||1!==_))return-1;for(I[1]=0,m=1;m<Gn;m++)I[m+1]=I[m]+C[m];for(g=0;g<r;g++)0!==t[n+g]&&(o[I[t[n+g]]++]=g);if(0===e?(S=M=o,p=20):1===e?(S=Hn,M=Vn,p=257):(S=Jn,M=Xn,p=0),A=0,g=0,m=v,f=s,y=w,b=0,h=-1,k=1<<w,d=k-1,1===e&&k>852||2===e&&k>592)return 1;for(;;){R=m-b,o[g]+1<p?(x=0,O=o[g]):o[g]>=p?(x=M[o[g]-p],O=S[o[g]-p]):(x=96,O=0),c=1<<m-b,l=1<<y,v=l;do{l-=c,i[f+(A>>b)+l]=R<<24|x<<16|O|0}while(0!==l);for(c=1<<m-1;A&c;)c>>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0==--C[m]){if(m===_)break;m=t[n+o[g]]}if(m>w&&(A&d)!==h){for(0===b&&(b=w),f+=v,y=m-b,E=1<<y;y+b<_&&(E-=C[y+b],!(E<=0));)y++,E<<=1;if(k+=1<<y,1===e&&k>852||2===e&&k>592)return 1;h=A&d,i[h]=w<<24|y<<16|f-s|0}}return 0!==A&&(i[f+A]=m-b<<24|64<<16|0),a.bits=w,0};const{Z_FINISH:Yn,Z_BLOCK:Qn,Z_TREES:er,Z_OK:tr,Z_STREAM_END:nr,Z_NEED_DICT:rr,Z_STREAM_ERROR:ir,Z_DATA_ERROR:sr,Z_MEM_ERROR:or,Z_BUF_ERROR:ar,Z_DEFLATED:ur}=Ct,cr=16180,lr=16190,hr=16191,dr=16192,fr=16194,pr=16199,mr=16200,gr=16206,vr=16209,_r=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function wr(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const yr=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<cr||t.mode>16211?1:0},br=e=>{if(yr(e))return ir;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=cr,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,tr},Er=e=>{if(yr(e))return ir;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,br(e)},kr=(e,t)=>{let n;if(yr(e))return ir;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?ir:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Er(e))},Ar=(e,t)=>{if(!e)return ir;const n=new wr;e.state=n,n.strm=e,n.window=null,n.mode=cr;const r=kr(e,t);return r!==tr&&(e.state=null),r};let Sr,Cr,Ir=!0;const Rr=e=>{if(Ir){Sr=new Int32Array(512),Cr=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Kn(1,e.lens,0,288,Sr,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Kn(2,e.lens,0,32,Cr,0,e.work,{bits:5}),Ir=!1}e.lencode=Sr,e.lenbits=9,e.distcode=Cr,e.distbits=5},xr=(e,t,n,r)=>{let i;const s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(n-r,n-r+i),s.wnext),(r-=i)?(s.window.set(t.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0};var Or=(e,t)=>{let n,r,i,s,o,a,u,c,l,h,d,f,p,m,g,v,_,w,y,b,E,k,A=0;const S=new Uint8Array(4);let C,I;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yr(e)||!e.output||!e.input&&0!==e.avail_in)return ir;n=e.state,n.mode===hr&&(n.mode=dr),o=e.next_out,i=e.output,u=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,c=n.hold,l=n.bits,h=a,d=u,k=tr;e:for(;;)switch(n.mode){case cr:if(0===n.wrap){n.mode=dr;break}for(;l<16;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(2&n.wrap&&35615===c){0===n.wbits&&(n.wbits=15),n.check=0,S[0]=255&c,S[1]=c>>>8&255,n.check=At(n.check,S,2,0),c=0,l=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=vr;break}if((15&c)!==ur){e.msg="unknown compression method",n.mode=vr;break}if(c>>>=4,l-=4,E=8+(15&c),0===n.wbits&&(n.wbits=E),E>15||E>n.wbits){e.msg="invalid window size",n.mode=vr;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&c?16189:hr,c=0,l=0;break;case 16181:for(;l<16;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(n.flags=c,(255&n.flags)!==ur){e.msg="unknown compression method",n.mode=vr;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=vr;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&4&n.wrap&&(S[0]=255&c,S[1]=c>>>8&255,n.check=At(n.check,S,2,0)),c=0,l=0,n.mode=16182;case 16182:for(;l<32;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}n.head&&(n.head.time=c),512&n.flags&&4&n.wrap&&(S[0]=255&c,S[1]=c>>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=At(n.check,S,4,0)),c=0,l=0,n.mode=16183;case 16183:for(;l<16;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&4&n.wrap&&(S[0]=255&c,S[1]=c>>>8&255,n.check=At(n.check,S,2,0)),c=0,l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;l<16;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&4&n.wrap&&(S[0]=255&c,S[1]=c>>>8&255,n.check=At(n.check,S,2,0)),c=0,l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(f=n.length,f>a&&(f=a),f&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(s,s+f),E)),512&n.flags&&4&n.wrap&&(n.check=At(n.check,r,f,s)),a-=f,s+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===a)break e;f=0;do{E=r[s+f++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E))}while(E&&f<a);if(512&n.flags&&4&n.wrap&&(n.check=At(n.check,r,f,s)),a-=f,s+=f,E)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===a)break e;f=0;do{E=r[s+f++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E))}while(E&&f<a);if(512&n.flags&&4&n.wrap&&(n.check=At(n.check,r,f,s)),a-=f,s+=f,E)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;l<16;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(4&n.wrap&&c!==(65535&n.check)){e.msg="header crc mismatch",n.mode=vr;break}c=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=hr;break;case 16189:for(;l<32;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}e.adler=n.check=_r(c),c=0,l=0,n.mode=lr;case lr:if(0===n.havedict)return e.next_out=o,e.avail_out=u,e.next_in=s,e.avail_in=a,n.hold=c,n.bits=l,rr;e.adler=n.check=1,n.mode=hr;case hr:if(t===Qn||t===er)break e;case dr:if(n.last){c>>>=7&l,l-=7&l,n.mode=gr;break}for(;l<3;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}switch(n.last=1&c,c>>>=1,l-=1,3&c){case 0:n.mode=16193;break;case 1:if(Rr(n),n.mode=pr,t===er){c>>>=2,l-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=vr}c>>>=2,l-=2;break;case 16193:for(c>>>=7&l,l-=7&l;l<32;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=vr;break}if(n.length=65535&c,c=0,l=0,n.mode=fr,t===er)break e;case fr:n.mode=16195;case 16195:if(f=n.length,f){if(f>a&&(f=a),f>u&&(f=u),0===f)break e;i.set(r.subarray(s,s+f),o),a-=f,s+=f,u-=f,o+=f,n.length-=f;break}n.mode=hr;break;case 16196:for(;l<14;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(n.nlen=257+(31&c),c>>>=5,l-=5,n.ndist=1+(31&c),c>>>=5,l-=5,n.ncode=4+(15&c),c>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=vr;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;l<3;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}n.lens[R[n.have++]]=7&c,c>>>=3,l-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,C={bits:n.lenbits},k=Kn(0,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,k){e.msg="invalid code lengths set",n.mode=vr;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;A=n.lencode[c&(1<<n.lenbits)-1],g=A>>>24,v=A>>>16&255,_=65535&A,!(g<=l);){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(_<16)c>>>=g,l-=g,n.lens[n.have++]=_;else{if(16===_){for(I=g+2;l<I;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(c>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=vr;break}E=n.lens[n.have-1],f=3+(3&c),c>>>=2,l-=2}else if(17===_){for(I=g+3;l<I;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}c>>>=g,l-=g,E=0,f=3+(7&c),c>>>=3,l-=3}else{for(I=g+7;l<I;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}c>>>=g,l-=g,E=0,f=11+(127&c),c>>>=7,l-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=vr;break}for(;f--;)n.lens[n.have++]=E}}if(n.mode===vr)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=vr;break}if(n.lenbits=9,C={bits:n.lenbits},k=Kn(1,n.lens,0,n.nlen,n.lencode,0,n.work,C),n.lenbits=C.bits,k){e.msg="invalid literal/lengths set",n.mode=vr;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},k=Kn(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,C),n.distbits=C.bits,k){e.msg="invalid distances set",n.mode=vr;break}if(n.mode=pr,t===er)break e;case pr:n.mode=mr;case mr:if(a>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=s,e.avail_in=a,n.hold=c,n.bits=l,Zn(e,d),o=e.next_out,i=e.output,u=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,c=n.hold,l=n.bits,n.mode===hr&&(n.back=-1);break}for(n.back=0;A=n.lencode[c&(1<<n.lenbits)-1],g=A>>>24,v=A>>>16&255,_=65535&A,!(g<=l);){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(v&&0==(240&v)){for(w=g,y=v,b=_;A=n.lencode[b+((c&(1<<w+y)-1)>>w)],g=A>>>24,v=A>>>16&255,_=65535&A,!(w+g<=l);){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}c>>>=w,l-=w,n.back+=w}if(c>>>=g,l-=g,n.back+=g,n.length=_,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=hr;break}if(64&v){e.msg="invalid literal/length code",n.mode=vr;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(I=n.extra;l<I;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;A=n.distcode[c&(1<<n.distbits)-1],g=A>>>24,v=A>>>16&255,_=65535&A,!(g<=l);){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(0==(240&v)){for(w=g,y=v,b=_;A=n.distcode[b+((c&(1<<w+y)-1)>>w)],g=A>>>24,v=A>>>16&255,_=65535&A,!(w+g<=l);){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}c>>>=w,l-=w,n.back+=w}if(c>>>=g,l-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=vr;break}n.offset=_,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(I=n.extra;l<I;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=vr;break}n.mode=16204;case 16204:if(0===u)break e;if(f=d-u,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=vr;break}f>n.wnext?(f-=n.wnext,p=n.wsize-f):p=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=i,p=o-n.offset,f=n.length;f>u&&(f=u),u-=f,n.length-=f;do{i[o++]=m[p++]}while(--f);0===n.length&&(n.mode=mr);break;case 16205:if(0===u)break e;i[o++]=n.length,u--,n.mode=mr;break;case gr:if(n.wrap){for(;l<32;){if(0===a)break e;a--,c|=r[s++]<<l,l+=8}if(d-=u,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=n.flags?At(n.check,i,d,o-d):Et(n.check,i,d,o-d)),d=u,4&n.wrap&&(n.flags?c:_r(c))!==n.check){e.msg="incorrect data check",n.mode=vr;break}c=0,l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;l<32;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}if(4&n.wrap&&c!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=vr;break}c=0,l=0}n.mode=16208;case 16208:k=nr;break e;case vr:k=sr;break e;case 16210:return or;default:return ir}return e.next_out=o,e.avail_out=u,e.next_in=s,e.avail_in=a,n.hold=c,n.bits=l,(n.wsize||d!==e.avail_out&&n.mode<vr&&(n.mode<gr||t!==Yn))&&xr(e,e.output,e.next_out,d-e.avail_out),h-=e.avail_in,d-=e.avail_out,e.total_in+=h,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=n.flags?At(n.check,i,d,e.next_out-d):Et(n.check,i,d,e.next_out-d)),e.data_type=n.bits+(n.last?64:0)+(n.mode===hr?128:0)+(n.mode===pr||n.mode===fr?256:0),(0===h&&0===d||t===Yn)&&k===tr&&(k=ar),k},Mr={inflateReset:Er,inflateReset2:kr,inflateResetKeep:br,inflateInit:e=>Ar(e,15),inflateInit2:Ar,inflate:Or,inflateEnd:e=>{if(yr(e))return ir;let t=e.state;return t.window&&(t.window=null),e.state=null,tr},inflateGetHeader:(e,t)=>{if(yr(e))return ir;const n=e.state;return 0==(2&n.wrap)?ir:(n.head=t,t.done=!1,tr)},inflateSetDictionary:(e,t)=>{const n=t.length;let r,i,s;return yr(e)?ir:(r=e.state,0!==r.wrap&&r.mode!==lr?ir:r.mode===lr&&(i=1,i=Et(i,t,n,0),i!==r.check)?sr:(s=xr(e,t,n,n),s?(r.mode=16210,or):(r.havedict=1,tr)))},inflateInfo:"pako inflate (from Nodeca project)"};var Tr=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Pr=Object.prototype.toString,{Z_NO_FLUSH:Nr,Z_FINISH:Lr,Z_OK:$r,Z_STREAM_END:jr,Z_NEED_DICT:Fr,Z_STREAM_ERROR:zr,Z_DATA_ERROR:Br,Z_MEM_ERROR:Dr}=Ct;function Ur(e){this.options=Cn.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new On,this.strm.avail_out=0;let n=Mr.inflateInit2(this.strm,t.windowBits);if(n!==$r)throw new Error(St[n]);if(this.header=new Tr,Mr.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=xn.string2buf(t.dictionary):"[object ArrayBuffer]"===Pr.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Mr.inflateSetDictionary(this.strm,t.dictionary),n!==$r)))throw new Error(St[n])}Ur.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Lr:Nr,"[object ArrayBuffer]"===Pr.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),s=Mr.inflate(n,o),s===Fr&&i&&(s=Mr.inflateSetDictionary(n,i),s===$r?s=Mr.inflate(n,o):s===Br&&(s=Fr));n.avail_in>0&&s===jr&&n.state.wrap>0&&0!==e[n.next_in];)Mr.inflateReset(n),s=Mr.inflate(n,o);switch(s){case zr:case Br:case Fr:case Dr:return this.onEnd(s),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(0===n.avail_out||s===jr))if("string"===this.options.to){let e=xn.utf8border(n.output,n.next_out),t=n.next_out-e,i=xn.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(s!==$r||0!==a){if(s===jr)return s=Mr.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Ur.prototype.onData=function(e){this.chunks.push(e)},Ur.prototype.onEnd=function(e){e===$r&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Cn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const{Deflate:qr,deflate:Wr,deflateRaw:Zr,gzip:Gr}=qn;var Hr=Wr;const Vr=4294967295;let Jr=Math.floor(Math.random()*Vr);const Xr=()=>(Jr=(Jr+1)%Vr,Jr);function Kr(e,t,n){return-1===t?e:new Promise(((r,i)=>{const s=setTimeout((()=>{i(n?n():new Error(`Timeout after ${t}ms`))}),t);e.then((e=>{clearTimeout(s),r(e)})).catch((e=>{clearTimeout(s),i(e)}))}))}class Yr extends Error{constructor(e){super(e.message),this.name=this.constructor.name,this.cause=e,Object.setPrototypeOf(this,this.constructor.prototype)}}class Qr extends Error{constructor(e,t){super(e),this.name=this.constructor.name,this.cause=t,Object.setPrototypeOf(this,this.constructor.prototype)}}class ei extends Qr{constructor(e="Transport request timed out",t){super(e,t)}}function ti({transport:e}){let t,n;async function r(){e.isConnected()||(n||(n=e.connect()),await n)}async function i(){return t||(t=(async()=>{await r(),await async function(e,t={}){const{maxRetries:n=10,retryDelay:r=200,timeoutErrorClass:i}=t;for(let t=0;t<=n;t++)try{return await e()}catch(e){if(t>=n)throw e;if(i&&"function"==typeof i&&e instanceof i)continue;await new Promise((e=>setTimeout(e,r)))}throw new Error("Max retries exceeded")}((()=>e.request({method:"wallet_getSession"},{timeout:e.warmupTimeout??1e3})))})()),await t}return r(),{createSession:async t=>(await i(),await ni({transport:e,method:"wallet_createSession",params:t})),getSession:async()=>(await i(),await ni({transport:e,method:"wallet_getSession"})),revokeSession:async r=>{await i(),t=void 0,n=void 0,await ni({transport:e,method:"wallet_revokeSession",params:r}),await e.disconnect()},invokeMethod:async t=>(await i(),await ni({transport:e,method:"wallet_invokeMethod",params:t})),extendsRpcApi:()=>ti({transport:e}),onNotification:t=>e.onNotification(t)}}async function ni({transport:e,method:t,params:n,timeout:r}){const i=await e.request({method:t,params:n},{timeout:r});if(i?.error)throw new Yr(i.error);return i.result}const ri="caip-348",ii="metamask-contentscript",si="metamask-inpage",oi="metamask-multichain-provider",ai="metamask-provider",ui="METAMASK_EXTENSION_CONNECT_CAN_RETRY",ci=-1,li=200;async function hi(){return new Promise(((e,t)=>{const n=t=>{if(function(e){const{target:t,data:n}=e.data;return t===si&&n?.name===ai&&e.origin===location.origin}(t)){const i=t?.data?.data?.data;if(i?.method===ui)di();else if(i?.result?.extensionId){const t=i?.result?.extensionId;e(t),window.removeEventListener("message",n),clearTimeout(r)}}},r=setTimeout((()=>{window.removeEventListener("message",n),t(new Error("MetaMask extension not found"))}),1e4);window.addEventListener("message",n),di()}))}function di(){window.postMessage({target:ii,data:{name:ai,data:{method:"metamask_getProviderState"}}},location.origin)}function fi(e={}){let{extensionId:t}=e;const{defaultTimeout:n=ci,warmupTimeout:r=li}=e;let i,s=Xr();const o=new Map,a=new Set;function u(e){const{data:t}=e;if(null==t?.id)!function(e){for(const t of a)try{t(e)}catch(e){console.log("[ChromeTransport] notifyCallbacks error:",e)}}(t);else if(o.has(t.id)){const e=o.get(t.id);o.delete(t.id),e?.(t)}}return{warmupTimeout:r,connect:async()=>{try{t||(t=await hi());const e=chrome.runtime.connect(t);let n=!0;if(e.onDisconnect.addListener((()=>{console.log("[ChromeTransport] chromePort disconnected"),i=void 0,n=!1})),await new Promise((e=>setTimeout(e,10))),!n)throw new Error(`No extension found with id: ${t}`);e.onMessage.addListener(u),i=e}catch(e){throw new Qr("Failed to connect to MetaMask",e)}},disconnect:async()=>{if(i)try{i.disconnect(),i=void 0,a.clear(),o.clear()}catch(e){console.log("[ChromeTransport] disconnect error:",e)}},isConnected:()=>void 0!==i,request:async(e,t={})=>{const{timeout:r=n}=t,a=i;if(!a)throw new Qr("Chrome port not connected");const u=s++,c={id:u,jsonrpc:"2.0",...e};try{return await Kr(new Promise((e=>{o.set(u,e),a.postMessage({type:ri,data:c})})),r,(()=>new ei))}catch(e){throw o.has(u)&&o.delete(u),e}},onNotification:e=>(a.add(e),()=>{a.delete(e)})}}function pi(e={}){const{defaultTimeout:t=ci,warmupTimeout:n=li}=e;let r=null;const i=new Map,s=new Set;function o(e){if(null==e?.id)!function(e){for(const t of s)try{t(e)}catch(e){console.log("[WindowPostMessageTransport] notifyCallbacks error:",e)}}(e);else if(i.has(e.id)){const t=i.get(e.id);i.delete(e.id),t?.(e)}}async function a(){r&&(window.removeEventListener("message",r),r=null),i.clear(),s.clear()}const u=()=>Boolean(r);return{warmupTimeout:n,connect:async()=>{u()&&await a(),r=e=>{const{target:t,data:n}=e.data;t===si&&n?.name===oi&&e.origin===location.origin&&o(n.data)},window.addEventListener("message",r)},disconnect:a,isConnected:u,request:(e,n={})=>{const{timeout:r=t}=n;if(!u())throw new Qr("Transport not connected");const s=Xr(),o={jsonrpc:"2.0",id:s,...e};return Kr(new Promise((e=>{i.set(s,(t=>e(t))),function(e){window.postMessage({target:ii,data:{name:oi,data:e}},location.origin)}(o)})),r,(()=>new ei)).catch((e=>{throw i.has(s)&&i.delete(s),e}))},onNotification:e=>(s.add(e),()=>{s.delete(e)})}}function mi({extensionId:e,defaultTimeout:t,warmupTimeout:n}={}){return"undefined"!=typeof chrome&&chrome.runtime&&"function"==typeof chrome.runtime.connect?fi({extensionId:e,defaultTimeout:t,warmupTimeout:n}):pi({defaultTimeout:t,warmupTimeout:n})}var gi=Ei;Ei.default=Ei,Ei.stable=Ci,Ei.stableStringify=Ci;var vi="[...]",_i="[Circular]",wi=[],yi=[];function bi(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ei(e,t,n,r){var i;void 0===r&&(r=bi()),Ai(e,"",0,[],void 0,0,r);try{i=0===yi.length?JSON.stringify(e,t,n):JSON.stringify(e,Ri(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==wi.length;){var s=wi.pop();4===s.length?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function ki(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);void 0!==i.get?i.configurable?(Object.defineProperty(r,n,{value:e}),wi.push([r,n,t,i])):yi.push([t,n,e]):(r[n]=e,wi.push([r,n,t]))}function Ai(e,t,n,r,i,s,o){var a;if(s+=1,"object"==typeof e&&null!==e){for(a=0;a<r.length;a++)if(r[a]===e)return void ki(_i,e,t,i);if(void 0!==o.depthLimit&&s>o.depthLimit)return void ki(vi,e,t,i);if(void 0!==o.edgesLimit&&n+1>o.edgesLimit)return void ki(vi,e,t,i);if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Ai(e[a],a,a,r,e,s,o);else{var u=Object.keys(e);for(a=0;a<u.length;a++){var c=u[a];Ai(e[c],c,a,r,e,s,o)}}r.pop()}}function Si(e,t){return e<t?-1:e>t?1:0}function Ci(e,t,n,r){void 0===r&&(r=bi());var i,s=Ii(e,"",0,[],void 0,0,r)||e;try{i=0===yi.length?JSON.stringify(s,t,n):JSON.stringify(s,Ri(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==wi.length;){var o=wi.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Ii(e,t,n,r,i,s,o){var a;if(s+=1,"object"==typeof e&&null!==e){for(a=0;a<r.length;a++)if(r[a]===e)return void ki(_i,e,t,i);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==o.depthLimit&&s>o.depthLimit)return void ki(vi,e,t,i);if(void 0!==o.edgesLimit&&n+1>o.edgesLimit)return void ki(vi,e,t,i);if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Ii(e[a],a,a,r,e,s,o);else{var u={},c=Object.keys(e).sort(Si);for(a=0;a<c.length;a++){var l=c[a];Ii(e[l],l,a,r,e,s,o),u[l]=e[l]}if(void 0===i)return u;wi.push([i,t,e]),i[t]=u}r.pop()}}function Ri(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(yi.length>0)for(var r=0;r<yi.length;r++){var i=yi[r];if(i[1]===t&&i[0]===n){n=i[2],yi.splice(r,1);break}}return e.call(this,t,n)}}const xi={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},Oi={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},Mi={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},Ti=xi.internal,Pi="Unspecified error message. This is a bug, please report it.";Li(Ti);const Ni="Unspecified server error.";function Li(e,t=Pi){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(q(Mi,t))return Mi[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return Ni}return t}function $i(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return xe(r)&&(t[n]=r),t}),{})}const ji=function(e){return e?.__esModule?e.default:e}(gi);class Fi extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');!function(e){return U(e)&&q(e,"cause")&&U(e.cause)}(n)?super(t):(super(t,{cause:n.cause}),q(this,"cause")||Object.assign(this,{cause:n.cause})),void 0!==n&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};var t;return void 0!==this.data&&(e.data=this.data,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=(t=this.data.cause,Array.isArray(t)?t.map((e=>xe(e)?e:U(e)?$i(e):null)):U(t)?$i(t):xe(t)?t:null))),this.stack&&(e.stack=this.stack),e}toString(){return ji(this.serialize(),Bi,2)}}class zi extends Fi{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function Bi(e,t){if("[Circular]"!==t)return t}const Di=e=>Wi(xi.internal,e),Ui=e=>Zi(Oi.unauthorized,e),qi=e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new zi(t,n,r)};function Wi(e,t){const[n,r]=Gi(t);return new Fi(e,n??Li(e),r)}function Zi(e,t){const[n,r]=Gi(t);return new zi(e,n??Li(e),r)}function Gi(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}const Hi=/\{[^{}]+\}/g;function Vi(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:s,headers:o,requestInitExt:a,...u}={...e};a="object"==typeof process&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici?a:void 0,t=ts(t);const c=[];async function l(e,l){const{baseUrl:h,fetch:d=r,Request:f=n,headers:p,params:m={},parseAs:g="json",querySerializer:v,bodySerializer:_=s??Qi,body:w,...y}=l||{};let b=t;h&&(b=ts(h)??t);let E="function"==typeof i?i:Yi(i);v&&(E="function"==typeof v?v:Yi({..."object"==typeof i?i:{},...v}));const k=void 0===w?void 0:_(w,es(o,p,m.header)),A=es(void 0===k||k instanceof FormData?{}:{"Content-Type":"application/json"},o,p,m.header),S={redirect:"follow",...u,...y,body:k,headers:A};let C,I,R,x=new n(function(e,t){let n=`${t.baseUrl}${e}`;t.params?.path&&(n=function(e,t){let n=e;for(const r of e.match(Hi)??[]){let e=r.substring(1,r.length-1),i=!1,s="simple";if(e.endsWith("*")&&(i=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(s="label",e=e.substring(1)):e.startsWith(";")&&(s="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;const o=t[e];Array.isArray(o)?n=n.replace(r,Ki(e,o,{style:s,explode:i})):n="object"!=typeof o?"matrix"!==s?n.replace(r,"label"===s?`.${encodeURIComponent(o)}`:encodeURIComponent(o)):n.replace(r,`;${Ji(e,o)}`):n.replace(r,Xi(e,o,{style:s,explode:i}))}return n}(n,t.params.path));let r=t.querySerializer(t.params.query??{});r.startsWith("?")&&(r=r.substring(1));r&&(n+=`?${r}`);return n}(e,{baseUrl:b,params:m,querySerializer:E}),S);for(const e in y)e in x||(x[e]=y[e]);if(c.length){C=Math.random().toString(36).slice(2,11),I=Object.freeze({baseUrl:b,fetch:d,parseAs:g,querySerializer:E,bodySerializer:_});for(const t of c)if(t&&"object"==typeof t&&"function"==typeof t.onRequest){const r=await t.onRequest({request:x,schemaPath:e,params:m,options:I,id:C});if(r){if(!(r instanceof n)){if(r instanceof Response){R=r;break}throw new Error("onRequest: must return new Request() or Response() when modifying the request")}x=r}}}if(!R){try{R=await d(x,a)}catch(O){let t=O;if(c.length)for(let n=c.length-1;n>=0;n--){const r=c[n];if(r&&"object"==typeof r&&"function"==typeof r.onError){const n=await r.onError({request:x,error:t,schemaPath:e,params:m,options:I,id:C});if(n){if(n instanceof Response){t=void 0,R=n;break}if(n instanceof Error){t=n;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(c.length)for(let t=c.length-1;t>=0;t--){const n=c[t];if(n&&"object"==typeof n&&"function"==typeof n.onResponse){const t=await n.onResponse({request:x,response:R,schemaPath:e,params:m,options:I,id:C});if(t){if(!(t instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");R=t}}}}if(204===R.status||"HEAD"===x.method||"0"===R.headers.get("Content-Length"))return R.ok?{data:void 0,response:R}:{error:void 0,response:R};if(R.ok)return"stream"===g?{data:R.body,response:R}:{data:await R[g](),response:R};let O=await R.text();try{O=JSON.parse(O)}catch{}return{error:O,response:R}}return{request:(e,t,n)=>l(t,{...n,method:e.toUpperCase()}),GET:(e,t)=>l(e,{...t,method:"GET"}),PUT:(e,t)=>l(e,{...t,method:"PUT"}),POST:(e,t)=>l(e,{...t,method:"POST"}),DELETE:(e,t)=>l(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>l(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>l(e,{...t,method:"HEAD"}),PATCH:(e,t)=>l(e,{...t,method:"PATCH"}),TRACE:(e,t)=>l(e,{...t,method:"TRACE"}),use(...e){for(const t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");c.push(t)}},eject(...e){for(const t of e){const e=c.indexOf(t);-1!==e&&c.splice(e,1)}}}}function Ji(e,t,n){if(null==t)return"";if("object"==typeof t)throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${!0===n?.allowReserved?t:encodeURIComponent(t)}`}function Xi(e,t,n){if(!t||"object"!=typeof t)return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if("deepObject"!==n.style&&!1===n.explode){for(const e in t)r.push(e,!0===n.allowReserved?t[e]:encodeURIComponent(t[e]));const i=r.join(",");switch(n.style){case"form":return`${e}=${i}`;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return i}}for(const i in t){const s="deepObject"===n.style?`${e}[${i}]`:i;r.push(Ji(s,t[i],n))}const s=r.join(i);return"label"===n.style||"matrix"===n.style?`${i}${s}`:s}function Ki(e,t,n){if(!Array.isArray(t))return"";if(!1===n.explode){const r={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",i=(!0===n.allowReserved?t:t.map((e=>encodeURIComponent(e)))).join(r);switch(n.style){case"simple":return i;case"label":return`.${i}`;case"matrix":return`;${e}=${i}`;default:return`${e}=${i}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const r of t)"simple"===n.style||"label"===n.style?i.push(!0===n.allowReserved?r:encodeURIComponent(r)):i.push(Ji(e,r,n));return"label"===n.style||"matrix"===n.style?`${r}${i.join(r)}`:i.join(r)}function Yi(e){return function(t){const n=[];if(t&&"object"==typeof t)for(const r in t){const i=t[r];if(null!=i)if(Array.isArray(i)){if(0===i.length)continue;n.push(Ki(r,i,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}))}else"object"!=typeof i?n.push(Ji(r,i,e)):n.push(Xi(r,i,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}))}return n.join("&")}}function Qi(e,t){if(e instanceof FormData)return e;if(t){if("application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"]))return new URLSearchParams(e).toString()}return JSON.stringify(e)}function es(...e){const t=new Headers;for(const n of e){if(!n||"object"!=typeof n)continue;const e=n instanceof Headers?n.entries():Object.entries(n);for(const[n,r]of e)if(null===r)t.delete(n);else if(Array.isArray(r))for(const e of r)t.append(n,e);else void 0!==r&&t.set(n,r)}return t}function ts(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var ns,rs=class{sendFn;batch=[];batchSize;baseTimeoutMs;currentTimeoutMs;maxTimeoutMs=3e4;timeoutId=null;isSending=!1;constructor(e){this.batchSize=e.batchSize,this.baseTimeoutMs=e.baseTimeoutMs,this.currentTimeoutMs=e.baseTimeoutMs,this.sendFn=e.sendFn}enqueue(e){this.batch.push(e),this.schedule()}clear(){this.batch=[],this.currentTimeoutMs=this.baseTimeoutMs,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}schedule(){this.batch.length>0&&!this.timeoutId&&(this.timeoutId=setTimeout((()=>{this.timeoutId=null,this.flush()}),this.currentTimeoutMs))}async flush(){if(this.isSending||0===this.batch.length)return;this.isSending=!0;const e=[...this.batch.slice(0,this.batchSize)];this.batch=this.batch.slice(this.batchSize);try{await this.sendFn(e),this.currentTimeoutMs=this.baseTimeoutMs}catch(t){console.error("Sender: Failed to send batch",t),this.batch=[...e,...this.batch],this.currentTimeoutMs=Math.min(2*this.currentTimeoutMs,this.maxTimeoutMs)}finally{this.isSending=!1,this.schedule()}}},is=class{enabled=!1;sender;properties={};constructor(e){const t=Vi({baseUrl:e});this.sender=new rs({batchSize:100,baseTimeoutMs:200,sendFn:async e=>{const n=await t.POST("/v2/events",{body:e});if(200!==n.response.status)throw new Error(n.error)}})}enable(){this.enabled=!0}disable(){this.enabled=!1,this.sender.clear()}setGlobalProperty(e,t){if("integration_types"!==e)this.properties[e]=t;else{const e=Array.isArray(this.properties.integration_types)?this.properties.integration_types:[],n=Array.isArray(t)?t:[];this.properties.integration_types=[...new Set([...e,...n])]}}track(e,t){if(!this.enabled)return;const n={namespace:"metamask/connect",event_name:e,properties:{...t,...this.properties}};this.sender.enqueue(n)}};"undefined"!=typeof process&&process.env&&(ns=process.env.METAMASK_ANALYTICS_ENDPOINT??process.env.NEXT_PUBLIC_METAMASK_ANALYTICS_ENDPOINT);var ss=new is(ns??"https://mm-sdk-analytics.api.cx.metamask.io/"),os={exports:{}};!function(t,n){var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e&&e,i=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(t){!function(n){var r=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==e&&e||{},i={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function f(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i.arrayBuffer&&i.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(f);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,r,i,s=h(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=d(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(e,t){e=a(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},l.prototype.delete=function(e){delete this.map[a(e)]},l.prototype.get=function(e){return e=a(e),this.has(e)?this.map[e]:null},l.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},l.prototype.set=function(e,t){this.map[a(e)]=u(t)},l.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},l.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),c(e)},l.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},l.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),c(e)},i.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function v(e,t){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,s=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new l(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,s||null==e._bodyInit||(s=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new l(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),g.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in r)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var y=[301,302,303,307,308];w.redirect=function(e,t){if(-1===y.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},n.DOMException=r.DOMException;try{new n.DOMException}catch(e){n.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},n.DOMException.prototype=Object.create(Error.prototype),n.DOMException.prototype.constructor=n.DOMException}function b(e,t){return new Promise((function(s,o){var c=new v(e,t);if(c.signal&&c.signal.aborted)return o(new n.DOMException("Aborted","AbortError"));var h=new XMLHttpRequest;function d(){h.abort()}if(h.onload=function(){var e,t,n={statusText:h.statusText,headers:(e=h.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{t.append(r,i)}catch(e){console.warn("Response "+e.message)}}})),t)};0===c.url.indexOf("file://")&&(h.status<200||h.status>599)?n.status=200:n.status=h.status,n.url="responseURL"in h?h.responseURL:n.headers.get("X-Request-URL");var r="response"in h?h.response:h.responseText;setTimeout((function(){s(new w(r,n))}),0)},h.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},h.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request timed out"))}),0)},h.onabort=function(){setTimeout((function(){o(new n.DOMException("Aborted","AbortError"))}),0)},h.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?h.withCredentials=!0:"omit"===c.credentials&&(h.withCredentials=!1),"responseType"in h&&(i.blob?h.responseType="blob":i.arrayBuffer&&(h.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof l||r.Headers&&t.headers instanceof r.Headers)){var f=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){f.push(a(e)),h.setRequestHeader(e,u(t.headers[e]))})),c.headers.forEach((function(e,t){-1===f.indexOf(t)&&h.setRequestHeader(t,e)}))}else c.headers.forEach((function(e,t){h.setRequestHeader(t,e)}));c.signal&&(c.signal.addEventListener("abort",d),h.onreadystatechange=function(){4===h.readyState&&c.signal.removeEventListener("abort",d)}),h.send(void 0===c._bodyInit?null:c._bodyInit)}))}b.polyfill=!0,r.fetch||(r.fetch=b,r.Headers=l,r.Request=v,r.Response=w),n.Headers=l,n.Request=v,n.Response=w,n.fetch=b}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=r.fetch?r:i;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,t.exports=n}(os,os.exports);var as=os.exports;const us=[];for(let e=0;e<256;++e)us.push((e+256).toString(16).slice(1));let cs;const ls=new Uint8Array(16);var hs={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ds(e,t,n){if(hs.randomUUID&&!t&&!e)return hs.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!cs){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cs=crypto.getRandomValues.bind(crypto)}return cs(ls)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(us[e[t+0]]+us[e[t+1]]+us[e[t+2]]+us[e[t+3]]+"-"+us[e[t+4]]+us[e[t+5]]+"-"+us[e[t+6]]+us[e[t+7]]+"-"+us[e[t+8]]+us[e[t+9]]+"-"+us[e[t+10]]+us[e[t+11]]+us[e[t+12]]+us[e[t+13]]+us[e[t+14]]+us[e[t+15]]).toLowerCase()}(r)}
|
|
3
|
+
/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */function fs(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{u(r.next(e))}catch(e){s(e)}}function a(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}u((r=r.apply(e,t||[])).next())}))}function ps(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}var ms,gs,vs,_s,ws,ys,bs,Es,ks,As,Ss,Cs,Is,Rs,xs="INSTALLED",Os="NOT_INSTALLED",Ms="REGISTERED",Ts="REGISTERING",Ps="RELOADING",Ns={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},Ls="REGISTRATION_IN_PROGRESS",$s="FORWARDER_ID",js=function(){function e(t){var n=void 0===t?{}:t,r=n.forwarderOrigin,i=void 0===r?"https://fwd.metamask.io":r,s=n.forwarderMode,o=void 0===s?e.FORWARDER_MODE.INJECT:s;this.forwarderOrigin=i,this.forwarderMode=o,this.state=e.isMetaMaskInstalled()?xs:Os;var a=e._detectBrowser();this.downloadUrl=a?Ns[a]:Ns.DEFAULT,this._onMessage=this._onMessage.bind(this),this._onMessageFromForwarder=this._onMessageFromForwarder.bind(this),this._openForwarder=this._openForwarder.bind(this),this._openDownloadPage=this._openDownloadPage.bind(this),this.startOnboarding=this.startOnboarding.bind(this),this.stopOnboarding=this.stopOnboarding.bind(this),window.addEventListener("message",this._onMessage),o===e.FORWARDER_MODE.INJECT&&"true"===sessionStorage.getItem(Ls)&&e._injectForwarder(this.forwarderOrigin)}return e.prototype._onMessage=function(e){if(e.origin===this.forwarderOrigin)return"metamask:reload"===e.data.type?this._onMessageFromForwarder(e):void console.debug("Unknown message from '"+e.origin+"' with data "+JSON.stringify(e.data))},e.prototype._onMessageUnknownStateError=function(e){throw new Error("Unknown state: '"+e+"'")},e.prototype._onMessageFromForwarder=function(t){return fs(this,void 0,void 0,(function(){return ps(this,(function(n){switch(n.label){case 0:switch(this.state){case Ps:return[3,1];case Os:return[3,2];case xs:return[3,3];case Ts:return[3,5];case Ms:return[3,6]}return[3,7];case 1:return console.debug("Ignoring message while reloading"),[3,8];case 2:return console.debug("Reloading now to register with MetaMask"),this.state=Ps,location.reload(),[3,8];case 3:return console.debug("Registering with MetaMask"),this.state=Ts,[4,e._register()];case 4:return n.sent(),this.state=Ms,t.source.postMessage({type:"metamask:registrationCompleted"},t.origin),this.stopOnboarding(),[3,8];case 5:return console.debug("Already registering - ignoring reload message"),[3,8];case 6:return console.debug("Already registered - ignoring reload message"),[3,8];case 7:this._onMessageUnknownStateError(this.state),n.label=8;case 8:return[2]}}))}))},e.prototype.startOnboarding=function(){sessionStorage.setItem(Ls,"true"),this._openDownloadPage(),this._openForwarder()},e.prototype.stopOnboarding=function(){"true"===sessionStorage.getItem(Ls)&&(this.forwarderMode===e.FORWARDER_MODE.INJECT&&(console.debug("Removing forwarder"),e._removeForwarder()),sessionStorage.setItem(Ls,"false"))},e.prototype._openForwarder=function(){this.forwarderMode===e.FORWARDER_MODE.OPEN_TAB?window.open(this.forwarderOrigin,"_blank"):e._injectForwarder(this.forwarderOrigin)},e.prototype._openDownloadPage=function(){window.open(this.downloadUrl,"_blank")},e.isMetaMaskInstalled=function(){return Boolean(window.ethereum&&window.ethereum.isMetaMask)},e._register=function(){return window.ethereum.request({method:"wallet_registerOnboarding"})},e._injectForwarder=function(e){var t=document.body,n=document.createElement("iframe");n.setAttribute("height","0"),n.setAttribute("width","0"),n.setAttribute("style","display: none;"),n.setAttribute("src",e),n.setAttribute("id",$s),t.insertBefore(n,t.children[0])},e._removeForwarder=function(){var e;null===(e=document.getElementById($s))||void 0===e||e.remove()},e._detectBrowser=function(){var e=E.parse(window.navigator.userAgent);return"Firefox"===e.browser.name?"FIREFOX":["Chrome","Chromium"].includes(e.browser.name||"")?"CHROME":null},e.FORWARDER_MODE={INJECT:"INJECT",OPEN_TAB:"OPEN_TAB"},e}(),Fs=Object.defineProperty,zs=Object.defineProperties,Bs=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertyNames,Us=Object.getOwnPropertySymbols,qs=Object.prototype.hasOwnProperty,Ws=Object.prototype.propertyIsEnumerable,Zs=e=>{throw TypeError(e)},Gs=(e,t,n)=>t in e?Fs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hs=(e,t)=>{for(var n in t||(t={}))qs.call(t,n)&&Gs(e,n,t[n]);if(Us)for(var n of Us(t))Ws.call(t,n)&&Gs(e,n,t[n]);return e},Vs=(e,t)=>zs(e,Bs(t)),Js=(e,t)=>function(){return e&&(t=(0,e[Ds(e)[0]])(e=0)),t},Xs=(e,t)=>{for(var n in t)Fs(e,n,{get:t[n],enumerable:!0})},Ks=(e,t,n)=>t.has(e)||Zs("Cannot "+n),Ys=(e,t,n)=>(Ks(e,t,"read from private field"),n?n.call(e):t.get(e)),Qs=(e,t,n)=>t.has(e)?Zs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),eo=(e,t,n,r)=>(Ks(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),to=(e,t,n)=>(Ks(e,t,"access private method"),n),no=(e,t,n)=>new Promise(((r,i)=>{var s=e=>{try{a(n.next(e))}catch(e){i(e)}},o=e=>{try{a(n.throw(e))}catch(e){i(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,o);a((n=n.apply(e,t)).next())})),ro=Js({"src/domain/errors/base.ts"(){ms=class extends Error{constructor(e,t){super(e),this.message=e,this.code=t}}}}),io=Js({"src/domain/errors/rpc.ts"(){ro(),(gs=class e extends ms{constructor(t,n,r){super(`RPCErr${e.code}: ${r} on ${t} for method ${n}`,e.code),this.rpcEndpoint=t,this.method=n,this.httpStatus=r}}).code=50,vs=gs,(_s=class e extends ms{constructor(t){super(`RPCErr${e.code}: RPC Client response reason ${t}`,e.code),this.reason=t}}).code=51,ws=_s,(ys=class e extends ms{constructor(t){super(`RPCErr${e.code}: RPC Client fetch reason ${t}`,e.code),this.reason=t}}).code=52,bs=ys,(Es=class e extends ms{constructor(t,n,r,i){super(`RPCErr${e.code}: RPC Client invoke method reason (${t})`,e.code),this.reason=t,this.rpcCode=n,this.rpcMessage=r,this.rpcData=i}}).code=53,ks=Es}}),so=Js({"src/domain/errors/index.ts"(){io()}}),oo=Js({"src/domain/events/index.ts"(){Ss=class{constructor(){Qs(this,As,new d)}emit(e,...t){Ys(this,As).emit(e,...t)}on(e,t){return Ys(this,As).on(e,t),()=>{this.off(e,t)}}off(e,t){Ys(this,As).off(e,t)}removeListener(e,t){Ys(this,As).off(e,t)}once(e,t){return Ys(this,As).once(e,t),()=>{this.off(e,t)}}listenerCount(e){return Ys(this,As).listenerCount(e)}},As=new WeakMap}});function ao(e,t){return e.includes(t)||e.includes("metamask-sdk:*")||e.includes("*")}var uo,co,lo,ho,fo,po=Js({"src/domain/logger/index.ts"(){Cs=(e="metamask-sdk",t="214")=>{const n=y(e);return n.color=t,n},Is=(e="metamask-sdk")=>{y.enable(e)},Rs=(e,t)=>no(null,null,(function*(){var n;if("process"in globalThis&&(null==(n=null==process?void 0:process.env)?void 0:n.DEBUG)){const{DEBUG:t}=process.env;return ao(t,e)}const r=yield t.getDebug();return!!r&&ao(r,e)}))}}),mo=Js({"src/domain/multichain/api/constants.ts"(){uo=new Set(["eth_blockNumber","eth_gasPrice","eth_maxPriorityFeePerGas","eth_blobBaseFee","eth_feeHistory","eth_getBalance","eth_getCode","eth_getStorageAt","eth_call","eth_estimateGas","eth_getLogs","eth_getProof","eth_getTransactionCount","eth_getBlockByNumber","eth_getBlockByHash","eth_getBlockTransactionCountByNumber","eth_getBlockTransactionCountByHash","eth_getUncleCountByBlockNumber","eth_getUncleCountByBlockHash","eth_getTransactionByHash","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByBlockHashAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockNumberAndIndex","eth_getUncleByBlockHashAndIndex","eth_getFilterChanges","eth_getFilterLogs","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"]),co=new Set(["eth_accounts","eth_chainId"]),lo=new Set(["wallet_addEthereumChain","wallet_switchEthereumChain","eth_accounts"])}}),go=Js({"src/domain/multichain/api/infura.ts"(){mo()}});var vo,_o,wo=Js({"src/domain/multichain/index.ts"(){oo(),mo(),go(),ho=(e=>(e.Browser="browser",e.MWP="mwp",e.UNKNOWN="unknown",e))(ho||{}),fo=class extends Ss{constructor(e){super(),this.options=e}mergeOptions(e){var t,n,r,i,s,o,a,u,c,l,h,d,f,p,m,g,v;const _=this.options,w=Hs(Hs({},_.analytics),null!=(t=e.analytics)?t:{});!1===(null==(n=_.analytics)?void 0:n.enabled)&&(w.enabled=!1),this.options=Vs(Hs({},_),{api:Vs(Hs({},_.api),{supportedNetworks:Hs(Hs({},_.api.supportedNetworks),null!=(i=null==(r=e.api)?void 0:r.supportedNetworks)?i:{})}),versions:Hs(Hs({},_.versions),null!=(s=e.versions)?s:{}),analytics:Hs({},w),ui:Vs(Hs({},_.ui),{headless:null!=(a=null==(o=e.ui)?void 0:o.headless)?a:_.ui.headless,preferExtension:null!=(c=null==(u=e.ui)?void 0:u.preferExtension)?c:_.ui.preferExtension,showInstallModal:null!=(h=null==(l=e.ui)?void 0:l.showInstallModal)?h:_.ui.showInstallModal}),mobile:Hs(Hs({},_.mobile),null!=(d=e.mobile)?d:{}),transport:Vs(Hs({},null!=(f=_.transport)?f:{}),{extensionId:null!=(g=null==(p=e.transport)?void 0:p.extensionId)?g:null==(m=_.transport)?void 0:m.extensionId}),debug:null!=(v=e.debug)?v:_.debug})}}}});function yo(){var e,t;if("undefined"!=typeof global&&"ReactNative"===(null==(e=null==global?void 0:global.navigator)?void 0:e.product))return!0;return"undefined"!=typeof window&&void 0!==window.navigator&&"ReactNative"===(null==(t=window.navigator)?void 0:t.product)}function bo(){return yo()?"react-native":"undefined"!=typeof window&&(null==window?void 0:window.navigator)&&"ReactNative"!==(null==navigator?void 0:navigator.product)?"undefined"!=typeof window&&Boolean(window.ReactNativeWebView)&&Boolean(window.navigator.userAgent.endsWith("MetaMaskMobile"))?"in-app-browser":function(){var e,t;const n=E.parse(window.navigator.userAgent);return"mobile"===(null==(e=null==n?void 0:n.platform)?void 0:e.type)||"tablet"===(null==(t=null==n?void 0:n.platform)?void 0:t.type)}()?"web-mobile":"web-desktop":"nodejs"}function Eo(){const e=bo();return yo()||"web-mobile"===e}function ko(){return no(this,null,(function*(){return _o}))}var Ao,So,Co,Io,Ro,xo=Js({"src/domain/platform/index.ts"(){vo=new Set(["io.metamask","io.metamask.mobile"]),_o=no(null,null,(function*(){const e=bo();return"nodejs"===e||"react-native"===e?Promise.resolve(!1):new Promise((e=>{const t=[],n=window,r=e=>{var n,r;(null==(r=null==(n=null==e?void 0:e.detail)?void 0:n.info)?void 0:r.rdns)&&t.push(e.detail)};n.addEventListener("eip6963:announceProvider",r),n.dispatchEvent(new Event("eip6963:requestProvider")),setTimeout((()=>{try{"function"==typeof(null==n?void 0:n.removeEventListener)&&n.removeEventListener("eip6963:announceProvider",r);const i=t.some((e=>{var t;return"string"==typeof(null==(t=null==e?void 0:e.info)?void 0:t.rdns)&&vo.has(e.info.rdns)}));e(i)}catch(t){e(!1)}}),300)}))}))}}),Oo=Js({"src/domain/store/adapter.ts"(){Ao=class{constructor(e){this.options=e}}}}),Mo=Js({"src/domain/store/client.ts"(){So=class{}}}),To=Js({"src/domain/store/index.ts"(){Oo(),Mo()}}),Po=Js({"src/domain/ui/types.ts"(){Co=class{constructor(e){this.options=e}get isMounted(){return void 0!==this.instance}get data(){if("object"==typeof this.options&&this.options&&"link"in this.options)return this.options.link;if("object"==typeof this.options&&this.options&&"otpCode"in this.options)return this.options.otpCode;throw new Error("Invalid options")}set data(e){"object"==typeof this.options&&this.options&&"link"in this.options&&(this.options.link=e),"object"==typeof this.options&&this.options&&"otpCode"in this.options&&(this.options.otpCode=e)}}}}),No=Js({"src/domain/ui/index.ts"(){Po()}});function Lo(e){var t,n,r,i;if("object"!=typeof e||null===e)return{code:void 0,message:""};if(e instanceof ks)return{code:null!=(t=e.rpcCode)?t:e.code,message:null!=(r=null!=(n=e.rpcMessage)?n:e.message)?r:""};const s=e;return{code:s.code,message:null!=(i=s.message)?i:""}}function $o(e){if("object"!=typeof e||null===e)return!1;const{code:t,message:n}=Lo(e),r=n.toLowerCase();return 4001===t||r.includes("reject")||r.includes("denied")||r.includes("cancel")||r.includes("user rejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")}function jo(e){const t=function(e){var t,n;if("object"!=typeof e||null===e)return"unknown";const r=e,i=null!=(t=r.name)?t:"",s=null!=(n=r.message)?n:"",o=s.toLowerCase(),{code:a}=Lo(e);if("number"==typeof a){if(-32601===a)return"wallet_method_unsupported";if(-32602===a)return"wallet_invalid_params";if(-32603===a)return"wallet_internal_error";if(a<=-32e3&&a>=-32099)return"wallet_internal_error";if(4100===a)return"wallet_unauthorized";if(4200===a)return"wallet_method_unsupported";if(4902===a)return"unrecognized_chain"}return"TransportTimeoutError"===i||"Request timeout"===s||o.includes("timed out")||o.includes("timeout")?"transport_timeout":"TransportError"===i||o.includes("not connected")||o.includes("transport disconnect")||o.includes("connection lost")||o.includes("socket closed")?"transport_disconnect":"unknown"}(e),{code:n,message:r}=Lo(e),i=function(e){if(!e)return;let t=e;for(const{pattern:e,replacement:n}of Ro)t=t.replace(e,n);return t.length>Io&&(t=`${t.slice(0,Io-1)}…`),t}(r);return Hs(Hs({failure_reason:t},"number"==typeof n?{error_code:n}:{}),i?{error_message_sample:i}:{})}function Fo(e,t){return no(this,null,(function*(){var n;const r=Ko(e.dapp),i=bo(),s=yield t.getAnonId();return{mmconnect_versions:null!=(n=e.versions)?n:{},dapp_id:r,platform:i,anon_id:s}}))}function zo(e,t,n,r,i){return no(this,null,(function*(){var s;const o=Ko(e.dapp),a=yield t.getAnonId();return Hs(Hs(Hs({mmconnect_versions:null!=(s=e.versions)?s:{},dapp_id:o,method:n.request.method,caip_chain_id:n.scope,anon_id:a,transport_type:r},(null==i?void 0:i.failure_reason)?{failure_reason:i.failure_reason}:{}),"number"==typeof(null==i?void 0:i.error_code)?{error_code:i.error_code}:{}),(null==i?void 0:i.error_message_sample)?{error_message_sample:i.error_message_sample}:{})}))}var Bo,Do=Js({"src/multichain/utils/analytics.ts"(){ga(),Vo(),Io=200,Ro=[{pattern:/0x[a-fA-F0-9]{40}/gu,replacement:"<addr>"},{pattern:/(?:0x)?[a-fA-F0-9]{16,}/gu,replacement:"<hex>"},{pattern:/https?:\/\/[^\s"')]+/gu,replacement:"<url>"},{pattern:/\b[a-z]{1,10}1[ac-hj-np-z02-9]{38,}\b/gu,replacement:"<addr>"},{pattern:/\b[1-9A-HJ-NP-Za-km-z]{32,}\b/gu,replacement:"<addr>"},{pattern:/\d{10,}/gu,replacement:"<num>"}]}});function Uo(){return Bo}var qo,Wo,Zo,Go,Ho=Js({"src/domain/utils/index.ts"(){Do(),Bo="1.1.0"}}),Vo=Js({"src/domain/index.ts"(){so(),oo(),po(),wo(),xo(),To(),No(),Ho()}});function Jo(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;throw new Error("Unable to locate global object")}function Xo(e){const t=Hr(e);return function(e){if("undefined"!=typeof btoa)return btoa(e);if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("No base64 encoding method available")}(String.fromCharCode.apply(null,Array.from(t)))}function Ko(e){var t;return null!=(t=e.url)?t:e.name}function Yo(e,t,n){var r;const{mobile:i}=e;if(null==(r=null==i?void 0:i.useDeeplink)||r)"undefined"!=typeof window&&(window.location.href=t);else if("undefined"!=typeof document){const e=document.createElement("a");e.href=n,e.target="_self",e.rel="noreferrer noopener",e.click()}}function Qo(e){return e.reduce(((e,t)=>Vs(Hs({},e),{[t]:{methods:[],notifications:[],accounts:[]}})),{})}function ea(e,t,n,r){if(!(e.every((e=>t.includes(e)))&&t.every((t=>e.includes(t)))))return!1;const i=Object.values(n.sessionScopes).filter((({accounts:e})=>Boolean(e))).flatMap((({accounts:e})=>null!=e?e:[]));return r.every((e=>i.includes(e)))}function ta(e){return e.reduce(((e,t)=>{try{return[...e,we(t)]}catch(n){const r=JSON.stringify(t);return console.error(`Invalid CAIP account ID: ${r}`,n),e}}),[])}function na(e,t){var n;if(!e||!(null==t?void 0:t.length))return e;const r=Object.fromEntries(Object.entries(e).map((([e,t])=>{var n,r,i;return[e,{methods:[...null!=(n=null==t?void 0:t.methods)?n:[]],notifications:[...null!=(r=null==t?void 0:t.notifications)?r:[]],accounts:[...null!=(i=null==t?void 0:t.accounts)?i:[]]}]}))),i=new Map;for(const e of t){const t=`${e.chain.namespace}:${e.chain.reference}`,r=`${e.chainId}:${e.address}`;i.has(t)||i.set(t,[]),null==(n=i.get(t))||n.push(r)}for(const[e,t]of Object.entries(r))if(null==t?void 0:t.accounts)try{const n=_e(e),r=`${n.namespace}:${n.reference}`,s=i.get(r);if(s){const e=new Set(t.accounts),n=s.filter((t=>!e.has(t)));t.accounts.push(...n)}}catch(t){console.error(`Invalid scope format: ${e}`,t)}return r}var ra,ia,sa,oa,aa,ua,ca,la,ha,da,fa,pa,ma,ga=Js({"src/multichain/utils/index.ts"(){Vo(),qo=()=>{var e;if("undefined"==typeof document)return;let t;const n=document.getElementsByTagName("link");for(let r=0;r<n.length;r++)"icon"!==n[r].getAttribute("rel")&&"shortcut icon"!==n[r].getAttribute("rel")||(t=null!=(e=n[r].getAttribute("href"))?e:void 0);return t},Wo=4294967295,Zo=Math.floor(Math.random()*Wo),Go=()=>Zo=(Zo+1)%Wo}}),va=Js({"src/multichain/transports/constants.ts"(){ra="metamask-multichain-provider"}}),_a={};Xs(_a,{MWPTransport:()=>ma});var wa=Js({"src/multichain/transports/mwp/index.ts"(){Vo(),ga(),va(),6e4,6e4,12e4,1e4,ia="cache_wallet_getSession",sa="cache_eth_accounts",oa="cache_eth_chainId",aa="pending_session_request",ua=["wallet_getSession","wallet_createSession","wallet_sessionChanged"],ca=["wallet_revokeSession","wallet_revokePermissions"],la=Cs("metamask-sdk:transport"),ma=class{constructor(e,t,n={requestTimeout:6e4,connectionTimeout:12e4,resumeTimeout:1e4}){this.dappClient=e,this.kvstore=t,this.options=n,Qs(this,ha),this.__pendingRequests=new Map,this.notificationCallbacks=new Set,this.dappClient.on("message",this.handleMessage.bind(this)),this.dappClient.on("session_request",(e=>{this.currentSessionRequest=e,this.kvstore.set(aa,JSON.stringify(e)).catch((e=>{la("Failed to store pending session request",e)}))})),"undefined"!=typeof window&&void 0!==window.addEventListener&&(this.windowFocusHandler=this.onWindowFocus.bind(this),window.addEventListener("focus",this.windowFocusHandler))}get pendingRequests(){return this.__pendingRequests}set pendingRequests(e){this.__pendingRequests=e}get sessionRequest(){return this.currentSessionRequest}getStoredPendingSessionRequest(){return no(this,null,(function*(){try{const e=yield this.kvstore.get(aa);return e?JSON.parse(e):null}catch(e){return null}}))}removeStoredPendingSessionRequest(){return no(this,null,(function*(){yield this.kvstore.delete(aa)}))}onWindowFocus(){this.isConnected()||this.dappClient.reconnect()}notifyCallbacks(e){this.notificationCallbacks.forEach((t=>t(e)))}rejectRequest(e,t=new Error("Request rejected")){const n=this.pendingRequests.get(e);n&&(this.pendingRequests.delete(e),clearTimeout(n.timeout),n.reject(t))}parseWalletError(e){const t=e;if("number"==typeof t.code&&"string"==typeof t.message){const{code:e,message:n}=t,r=t.data,i=xe(r)?r:void 0;return e>=1e3&&e<=4999?qi({code:e,message:n,data:i}):new Fi(e,n,i)}const n=e instanceof Error?e.message:JSON.stringify(e);return Di({message:n})}getResponseError(e){if("error"in e&&e.error)return e.error;const{result:t}=e;return"object"==typeof t&&null!==t&&"error"in t&&t.error&&this.isErrorPayload(t.error)?t.error:void 0}isErrorPayload(e){if(e instanceof Error)return!0;const t=e;return"number"==typeof(null==t?void 0:t.code)&&"string"==typeof(null==t?void 0:t.message)}handleMessage(e){if("object"==typeof e&&null!==e&&"data"in e){const t=e.data;if("id"in t&&"string"==typeof t.id){const e=this.pendingRequests.get(t.id);if(e){clearTimeout(e.timeout);const n=this.getResponseError(t);if(n)return this.pendingRequests.delete(t.id),void e.reject(this.parseWalletError(n));const r=Vs(Hs({},t),{method:"wallet_getSession"===e.method||"wallet_createSession"===e.method?"wallet_sessionChanged":e.method}),i=Vs(Hs({},t),{method:"wallet_getSession"===e.method||"wallet_createSession"===e.method?"wallet_sessionChanged":e.method,params:r.result});this.notifyCallbacks(i),e.resolve(r),this.pendingRequests.delete(t.id)}}else{if("metamask_chainChanged"===e.data.method&&this.kvstore.set(oa,JSON.stringify(e.data.params.chainId)),"metamask_accountsChanged"===e.data.method&&this.kvstore.set(sa,JSON.stringify(e.data.params)),"wallet_sessionChanged"===e.data.method){const t={result:e.data.params};this.kvstore.set(ia,JSON.stringify(t))}this.notifyCallbacks(e.data)}}}init(){return no(this,null,(function*(){}))}sendEip1193Message(e,t){return no(this,null,(function*(){const n=Hs({jsonrpc:"2.0",id:String(Go())},e),r=yield this.getCachedResponse(n);return r?(this.notifyCallbacks(r),r):new Promise(((e,r)=>{var i;const s=setTimeout((()=>{this.rejectRequest(n.id,new ei)}),null!=(i=null==t?void 0:t.timeout)?i:this.options.requestTimeout);this.pendingRequests.set(n.id,{request:n,method:n.method,resolve:t=>no(this,null,(function*(){return yield this.storeWalletSession(n,t),e(t)})),reject:r,timeout:s}),this.dappClient.sendRequest({name:"metamask-provider",data:n}).catch(r)}))}))}connect(e){return no(this,null,(function*(){const t=yield this.getActiveSession();t&&la("active session found",{id:t.id,channel:t.channel,expiresAt:t.expiresAt});return(t?to(this,ha,fa).call(this,t,e):to(this,ha,pa).call(this,e)).catch((e=>no(this,null,(function*(){throw yield this.dappClient.disconnect(),e})))).finally((()=>{this.removeStoredPendingSessionRequest()}))}))}disconnect(){return no(this,arguments,(function*(e=[]){var t,n;const r=yield this.getCachedResponse({jsonrpc:"2.0",id:"0",method:"wallet_getSession"}),i=null!=(n=null==(t=null==r?void 0:r.result)?void 0:t.sessionScopes)?n:{},s=0===e.length?[]:Object.keys(i).filter((t=>!e.includes(t))),o=Object.fromEntries(Object.entries(i).filter((([e])=>s.includes(e))));this.request({method:"wallet_revokeSession",params:{scopes:e}}).catch((e=>{console.error("error revoking session",e)}));s.some((e=>e.includes("eip155")))||(this.kvstore.delete(sa),this.kvstore.delete(oa)),s.length>0?this.kvstore.set(ia,JSON.stringify({result:{sessionScopes:o}})):(this.kvstore.delete(ia),"undefined"!=typeof window&&void 0!==window.removeEventListener&&this.windowFocusHandler&&(window.removeEventListener("focus",this.windowFocusHandler),this.windowFocusHandler=void 0),yield this.dappClient.disconnect()),this.notifyCallbacks({method:"wallet_sessionChanged",params:{sessionScopes:o}})}))}isConnected(){return"CONNECTED"===this.dappClient.state}attemptResumeSession(){return no(this,null,(function*(){try{yield this.dappClient.reconnect(),yield new Promise(((e,t)=>{const n=setTimeout((()=>{t(new Error("Resume timeout"))}),2e3);this.isConnected()?(clearTimeout(n),e()):this.dappClient.once("connected",(()=>{clearTimeout(n),e()}))}))}catch(e){return Promise.reject(new Error(`Failed to resume session: ${e.message}`))}}))}getCachedResponse(e){return no(this,null,(function*(){var t;if("wallet_getSession"===e.method){const n=yield this.kvstore.get(ia);if(n){const r=JSON.parse(n);return{id:e.id,jsonrpc:"2.0",result:null!=(t=r.params)?t:r.result,method:e.method}}}else if("eth_accounts"===e.method){const t=yield this.kvstore.get(sa);if(t)return{id:e.id,jsonrpc:"2.0",result:JSON.parse(t),method:e.method}}else if("eth_chainId"===e.method){const t=yield this.kvstore.get(oa);if(t)return{id:e.id,jsonrpc:"2.0",result:JSON.parse(t),method:e.method}}}))}storeWalletSession(e,t){return no(this,null,(function*(){t.error||(ua.includes(e.method)?yield this.kvstore.set(ia,JSON.stringify(t)):"eth_accounts"===e.method?yield this.kvstore.set(sa,JSON.stringify(t.result)):"eth_chainId"===e.method?yield this.kvstore.set(oa,JSON.stringify(t.result)):ca.includes(e.method)&&(yield this.kvstore.delete(ia),yield this.kvstore.delete(sa),yield this.kvstore.delete(oa)))}))}request(e,t){return no(this,null,(function*(){const n=Hs({jsonrpc:"2.0",id:String(Go())},e),r=yield this.getCachedResponse(n);return r?(this.notifyCallbacks(r),r):(this.isConnected()||(yield this.attemptResumeSession()),new Promise(((e,r)=>{var i;const s=setTimeout((()=>{this.rejectRequest(n.id,new ei)}),null!=(i=null==t?void 0:t.timeout)?i:this.options.requestTimeout);this.pendingRequests.set(n.id,{request:n,method:n.method,resolve:t=>no(this,null,(function*(){return yield this.storeWalletSession(n,t),e(t)})),reject:r,timeout:s}),this.dappClient.sendRequest({name:ra,data:n}).catch(r)})))}))}onNotification(e){return this.notificationCallbacks.add(e),()=>{this.notificationCallbacks.delete(e)}}getActiveSession(){return no(this,null,(function*(){const{kvstore:e}=this,{SessionStore:t}=yield import("./index-754d059b.js").then((function(e){return e.i})),n=yield t.create(e);try{const[e]=yield n.list();return e}catch(e){return void la("error getting active session",e)}}))}waitForWalletSessionIfNotCached(){return no(this,null,(function*(){if(yield this.kvstore.get(ia))return;let e;const t=new Promise((t=>{e=this.onNotification((n=>{if("object"==typeof n&&null!==n&&"data"in n){const r=n.data;"wallet_getSession"!==r.method&&"wallet_sessionChanged"!==r.method||(e(),t())}}))})),n=new Promise(((t,n)=>{setTimeout((()=>{e(),this.removeStoredPendingSessionRequest(),n(new ei)}),this.options.resumeTimeout)}));return Promise.race([t,n])}))}},ha=new WeakSet,da=function(e){return no(this,null,(function*(){var t,n,r,i,s,o,a;yield this.waitForWalletSessionIfNotCached();const u=yield this.request({method:"wallet_getSession"});if(u.error)throw new Error(u.error.message);let c=u.result;if(c&&e){const o=ea(Object.keys(null!=(t=null==c?void 0:c.sessionScopes)?t:{}),null!=(n=null==e?void 0:e.scopes)?n:[],c,null!=(r=null==e?void 0:e.caipAccountIds)?r:[]);if(e.forceRequest||!o){const t={optionalScopes:na(Qo(null!=(i=null==e?void 0:e.scopes)?i:[]),ta(null!=(s=null==e?void 0:e.caipAccountIds)?s:[]))},n=yield this.request({method:"wallet_createSession",params:t});if(n.error)throw new Error(n.error.message);c=n.result}}else if(!c){const t={optionalScopes:na(Qo(null!=(o=null==e?void 0:e.scopes)?o:[]),ta(null!=(a=null==e?void 0:e.caipAccountIds)?a:[]))},n=yield this.request({method:"wallet_createSession",params:t});if(n.error)throw new Error(n.error.message);c=n.result}yield this.removeStoredPendingSessionRequest(),this.notifyCallbacks({method:"wallet_sessionChanged",params:c})}))},fa=function(e,t){return no(this,null,(function*(){var n;const r=null!==(yield this.getStoredPendingSessionRequest()),i=je(),s=()=>no(this,null,(function*(){try{i.resolve(yield to(this,ha,da).call(this,t))}catch(e){i.reject(e)}}));"CONNECTED"===this.dappClient.state?s():(this.dappClient.once("connected",s),this.dappClient.resume(null!=(n=e.id)?n:"").catch((e=>i.reject(e))));const o=je(),a=setTimeout((()=>o.reject(new ei)),r?this.options.resumeTimeout:this.options.connectionTimeout),u=()=>this.dappClient.off("connected",s);return Promise.race([i.promise,o.promise]).finally((()=>{clearTimeout(a),u()}))}))},pa=function(e){return no(this,null,(function*(){var t,n;const{dappClient:r}=this,i=null!==(yield this.getStoredPendingSessionRequest()),s=je(),o={optionalScopes:na(Qo(null!=(t=null==e?void 0:e.scopes)?t:[]),ta(null!=(n=null==e?void 0:e.caipAccountIds)?n:[])),sessionProperties:null==e?void 0:e.sessionProperties},a={jsonrpc:"2.0",id:String(Go()),method:"wallet_createSession",params:o};let u;const c=()=>{u&&(this.dappClient.off("message",u),u=void 0)};u=e=>no(this,null,(function*(){if("object"!=typeof e||null===e)return;if(!("data"in e))return;const t=e.data,n=t.id===a.id,r="wallet_createSession"===t.method||"wallet_sessionChanged"===t.method;if(!n&&!r)return;const i=this.getResponseError(t);i?s.reject(this.parseWalletError(i)):(yield this.storeWalletSession(a,t),yield this.removeStoredPendingSessionRequest(),this.notifyCallbacks(t),s.resolve())})),this.dappClient.on("message",u);const l=bo(),h=["web-desktop","nodejs"].includes(l),d={name:ra,data:a};r.connect({mode:"trusted",initialPayload:h?void 0:d}).then((()=>no(this,null,(function*(){if(h)return r.sendRequest(d)})))).catch((e=>s.reject(e)));const f=je(),p=setTimeout((()=>f.reject(new ei)),i?this.options.resumeTimeout:this.options.connectionTimeout);return Promise.race([s.promise,f.promise]).finally((()=>{clearTimeout(p),c()}))}))}}}),ya={};function ba(){return no(this,null,(function*(){const{decrypt:e,encrypt:t,PrivateKey:n,PublicKey:r}=yield import("./index-06f6f79c.js").then((function(e){return e.i}));return{generateKeyPair(){const e=new n;return{privateKey:new Uint8Array(e.secret),publicKey:e.publicKey.toBytes(!0)}},encrypt(e,n){return no(this,null,(function*(){const r=Buffer.from(e,"utf8");return t(n,r).toString("base64")}))},decrypt(t,n){return no(this,null,(function*(){const r=Buffer.from(t,"base64"),i=yield e(n,r);return Buffer.from(i).toString("utf8")}))},validatePeerKey(e){r.fromHex(Buffer.from(e).toString("hex"))}}}))}Xs(ya,{createKeyManager:()=>ba});var Ea=Js({"src/multichain/transports/mwp/KeyManager.ts"(){}});var ka,Aa,Sa,Ca,Ia,Ra,xa,Oa=Js({"src/ui/modals/base/utils.ts"(){}}),Ma=Js({"src/ui/modals/base/AbstractInstallModal.ts"(){Oa(),Vo(),ka=Cs("metamask-sdk:ui"),Ca=class extends Co{constructor(){super(...arguments),Qs(this,Aa,null),Qs(this,Sa,-1)}get link(){return this.data}set link(e){this.data=e}get connectionRequest(){return this.options.connectionRequest}set connectionRequest(e){this.options.connectionRequest=e}updateLink(e){this.link=e,this.instance&&(this.instance.link=e)}updateExpiresIn(e){e>=0&&this.instance&&(this.instance.expiresIn=e)}startExpirationCheck(e){this.stopExpirationCheck();let t=e;eo(this,Aa,setInterval((()=>no(this,null,(function*(){const{sessionRequest:e}=t,n=Date.now(),r=e.expiresAt-n,i=Math.floor(r/1e3);if(r>0&&function(e){return e<=10||(e<=30?e%5==0:e<=60?e%10==0:e<=300?e%30==0:e%60==0)}(i)&&Ys(this,Sa)!==i){const e=(s=r)<=0?"EXPIRED":`${Math.floor(s/1e3)}s`;ka(`[UI: InstallModal-nodejs()] QR code expires in: ${e} (${i}s)`),eo(this,Sa,i)}var s;if(n>=e.expiresAt){this.stopExpirationCheck(),ka("[UI: InstallModal-nodejs()] ⏰ QR code EXPIRED! Generating new one...");try{t=yield this.options.createConnectionRequest();const e=yield this.options.generateQRCode(t);eo(this,Sa,-1),this.updateLink(e),this.updateExpiresIn(i),this.renderQRCode(e,t)}catch(e){ka(`[UI: InstallModal-nodejs()] ❌ Error generating new QR code: ${e}`)}}}))),1e3))}stopExpirationCheck(){Ys(this,Aa)&&(clearInterval(Ys(this,Aa)),eo(this,Aa,null),ka("[UI: InstallModal-nodejs()] 🛑 Stopped QR code expiration checking"))}},Aa=new WeakMap,Sa=new WeakMap}}),Ta=Js({"src/ui/modals/web/install.ts"(){Ma(),Ia=class extends Ca{renderQRCode(){}mount(){var e;const{options:t}=this,n=document.createElement("mm-install-modal");n.showInstallModal=t.showInstallModal,n.addEventListener("close",(e=>{const{detail:n}=e;t.onClose(null==n?void 0:n.shouldTerminate)})),n.addEventListener("startDesktopOnboarding",t.startDesktopOnboarding),n.link=t.link,this.instance=n,null==(e=t.parentElement)||e.appendChild(n),this.startExpirationCheck(t.connectionRequest)}unmount(){var e;const{options:t,instance:n}=this;this.stopExpirationCheck(),n&&(null==(e=t.parentElement)?void 0:e.contains(n))&&(t.parentElement.removeChild(n),this.instance=void 0)}}}}),Pa=Js({"src/ui/modals/base/AbstractOTPModal.ts"(){Vo(),Ra=class extends Co{get otpCode(){return this.data}set otpCode(e){this.data=e}updateOTPCode(e){this.otpCode=e,this.instance&&(this.instance.otpCode=e)}}}}),Na=Js({"src/ui/modals/web/otp.ts"(){Pa(),xa=class extends Ra{mount(){}unmount(){}}}}),La={};Xs(La,{InstallModal:()=>Ia,OTPCodeModal:()=>xa});var $a,ja,Fa=Js({"src/ui/modals/web/index.ts"(){Ta(),Na()}}),za={};Xs(za,{StoreAdapterWeb:()=>ja});var Ba=Js({"src/store/adapters/web.ts"(){Vo(),$a=class e extends Ao{constructor(t="-kv-store",n=e.stores[0]){super(),this.storeName=n,this.platform="web";const r=`${e.DB_NAME}${t}`;this.dbPromise=new Promise(((t,n)=>{try{const i=this.internal.open(r,1);i.onerror=()=>n(new Error("Failed to open IndexedDB.")),i.onsuccess=()=>t(i.result),i.onupgradeneeded=()=>{const t=i.result;for(const n of e.stores)t.objectStoreNames.contains(n)||t.createObjectStore(n)}}catch(e){n(e)}}))}get internal(){if("undefined"==typeof window||!window.indexedDB)throw new Error("indexedDB is not available in this environment");return window.indexedDB}get(e){return no(this,null,(function*(){const{storeName:t}=this,n=yield this.dbPromise;return new Promise(((r,i)=>{try{const s=n.transaction(t,"readonly"),o=s.objectStore(t).get(e);o.onerror=()=>i(new Error("Failed to get value from IndexedDB.")),o.onsuccess=()=>{var e;return r(null!=(e=o.result)?e:null)}}catch(e){i(e)}}))}))}set(e,t){return no(this,null,(function*(){const{storeName:n}=this,r=yield this.dbPromise;return new Promise(((i,s)=>{try{const o=r.transaction(n,"readwrite"),a=o.objectStore(n).put(t,e);a.onerror=()=>s(new Error("Failed to set value in IndexedDB.")),a.onsuccess=()=>i()}catch(e){s(e)}}))}))}delete(e){return no(this,null,(function*(){const{storeName:t}=this,n=yield this.dbPromise;return new Promise(((r,i)=>{try{const s=n.transaction(t,"readwrite"),o=s.objectStore(t).delete(e);o.onerror=()=>i(new Error("Failed to delete value from IndexedDB.")),o.onsuccess=()=>r()}catch(e){i(e)}}))}))}},$a.stores=["sdk-kv-store","key-value-pairs"],$a.DB_NAME="mmconnect",ja=$a}});ga();var Da=Jo();null!=Da.Buffer||(Da.Buffer=p),Vo();var Ua="https://metamask.app.link/connect",qa="metamask://connect";Vo(),Do(),po(),wo(),xo(),Vo();var Wa=1;var Za=class extends Error{};Vo(),ga(),Do(),Vo();var Ga,Ha,Va,Ja,Xa,Ka,Ya=5;function Qa(e){if("object"==typeof e&&null!==e)return e}function eu(e){return"string"==typeof e&&e.length>0?e:void 0}function tu(e){for(const t of e){const e=eu(t);if(void 0!==e)return e}}function nu(e){const t=function(e){return"number"==typeof e?e:void 0}(null==e?void 0:e.code);if(void 0===t)return;const n=eu(null==e?void 0:e.message),r=function(e){return void 0!==e&&xe(e)?e:void 0}(null==e?void 0:e.data);return Hs(Hs({code:t},void 0===n?{}:{message:n}),void 0===r?{}:{data:r})}function ru(e){var t,n,r,i;const s=function(e){const t=[];let n=e;for(let e=0;void 0!==n&&e<Ya;e+=1)t.push(n),n=Qa(n.cause);return t}(Qa(e)),o=eu(e);for(const[e,i]of s.entries()){const a=nu(i);if(a){const i=s.slice(e+1),u=s.slice(0,e),c=tu(i.map((e=>e.message))),l=tu([o,...u.map((e=>e.message))]),h=null!=(r=null!=(n=null!=(t=a.message)?t:c)?n:l)?r:"Unknown error";return Hs(Hs({reason:h,rpcCode:a.code},void 0===a.message?{}:{rpcMessage:a.message}),void 0===a.data?{}:{rpcData:a.data})}}const a=null!=(i=null!=o?o:tu(s.map((e=>e.message))))?i:"Unknown error";return{reason:a}}function iu(e){if(e instanceof ks)return e;const{reason:t,rpcCode:n,rpcMessage:r,rpcData:i}=ru(e);return new ks(t,n,r,i)}Ga=new WeakSet,Ha=function(e,t){return no(this,null,(function*(){var n;if(!1===(null==(n=this.config.analytics)?void 0:n.enabled))try{return yield t()}catch(e){throw iu(e)}yield to(this,Ga,Va).call(this,e);try{const n=yield t();return yield to(this,Ga,Ja).call(this,e),n}catch(t){const n=iu(t),r=void 0===n.rpcCode?t:n;throw $o(r)?yield to(this,Ga,Ka).call(this,e):yield to(this,Ga,Xa).call(this,e,r),n}}))},Va=function(e){return no(this,null,(function*(){const t=yield zo(this.config,this.config.storage,e,this.transportType);ss.track("mmconnect_wallet_action_requested",t)}))},Ja=function(e){return no(this,null,(function*(){const t=yield zo(this.config,this.config.storage,e,this.transportType);ss.track("mmconnect_wallet_action_succeeded",t)}))},Xa=function(e,t){return no(this,null,(function*(){const n=yield zo(this.config,this.config.storage,e,this.transportType,jo(t));ss.track("mmconnect_wallet_action_failed",n)}))},Ka=function(e){return no(this,null,(function*(){const t=yield zo(this.config,this.config.storage,e,this.transportType);ss.track("mmconnect_wallet_action_rejected",t)}))},ga();var su,ou,au,uu,cu,lu,hu,du,fu,pu,mu,gu,vu,_u,wu,yu,bu,Eu,ku,Au,Su,Cu=class{constructor(){Qs(this,hu),Qs(this,su,new Set),Qs(this,ou,mi()),Qs(this,au,{timeout:6e4}),Qs(this,uu,new Map),Qs(this,cu),Qs(this,lu)}sendEip1193Message(e,t){return no(this,null,(function*(){to(this,hu,vu).call(this);const n=String(Go()),r=Hs({jsonrpc:"2.0",id:n},e);return new Promise(((e,i)=>{var s;const o=setTimeout((()=>{Ys(this,uu).delete(n),i(new Error("Request timeout"))}),null!=(s=null==t?void 0:t.timeout)?s:Ys(this,au).timeout);Ys(this,uu).set(n,{resolve:t=>{e(t)},reject:i,timeout:o}),window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:r}},location.origin)}))}))}init(){return no(this,null,(function*(){yield to(this,hu,_u).call(this);let e={sessionScopes:{}};try{e=(yield this.request({method:"wallet_getSession"},Ys(this,au))).result}catch(e){console.error("Failed to get wallet session during DefaultTransport init")}to(this,hu,du).call(this,{method:"wallet_sessionChanged",params:e})}))}connect(e){return no(this,null,(function*(){var t,n,r,i,s;yield to(this,hu,_u).call(this);const o=yield this.request({method:"wallet_getSession"},Ys(this,au));if(o.error)throw new Error(o.error.message);let a=o.result;const u={optionalScopes:na(Qo(null!=(t=null==e?void 0:e.scopes)?t:[]),ta(null!=(n=null==e?void 0:e.caipAccountIds)?n:[])),sessionProperties:null==e?void 0:e.sessionProperties};if(a&&e&&!e.forceRequest){if(!ea(Object.keys(null!=(r=null==a?void 0:a.sessionScopes)?r:{}),null!=(i=null==e?void 0:e.scopes)?i:[],a,null!=(s=null==e?void 0:e.caipAccountIds)?s:[])){const e=yield this.request({method:"wallet_createSession",params:u},Ys(this,au));if(e.error)throw new Error(e.error.message);a=e.result}}else if(!a||(null==e?void 0:e.forceRequest)){const e=yield this.request({method:"wallet_createSession",params:u},Ys(this,au));if(e.error)throw new Error(e.error.message);a=e.result}to(this,hu,du).call(this,{method:"wallet_sessionChanged",params:a})}))}disconnect(){return no(this,arguments,(function*(e=[]){yield this.request({method:"wallet_revokeSession",params:{scopes:e}})}))}isConnected(){return Ys(this,ou).isConnected()}request(e){return no(this,arguments,(function*(e,t=Ys(this,au)){const n=yield Ys(this,ou).request(e,t);if(n.error)throw to(this,hu,fu).call(this,n.error);return n}))}onNotification(e){return Ys(this,ou).onNotification(e),Ys(this,su).add(e),()=>{Ys(this,su).delete(e)}}getActiveSession(){return no(this,null,(function*(){throw new Error("getActiveSession is purposely not implemented for the DefaultTransport")}))}getStoredPendingSessionRequest(){return no(this,null,(function*(){throw new Error("getStoredPendingSessionRequest is purposely not implemented for the DefaultTransport")}))}};su=new WeakMap,ou=new WeakMap,au=new WeakMap,uu=new WeakMap,cu=new WeakMap,lu=new WeakMap,hu=new WeakSet,du=function(e){for(const t of Ys(this,su))try{t(e)}catch(e){console.log("[WindowPostMessageTransport] notifyCallbacks error:",e)}},fu=function(e){const t=e,n=new Error("string"==typeof t.message?t.message:"Request failed");"number"==typeof t.code&&(n.code=t.code);const{data:r}=t;return xe(r)&&(n.data=r),n},pu=function(e){var t,n;return"metamask-provider"===(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.data)?void 0:n.name)&&e.origin===location.origin},mu=function(e){var t,n;if(!to(this,hu,pu).call(this,e))return;const r=null==(n=null==(t=null==e?void 0:e.data)?void 0:t.data)?void 0:n.data;if(("object"!=typeof r||null===r||!("method"in r))&&"object"==typeof r&&null!==r&&"id"in r&&("result"in r||"error"in r)){const e=String(r.id),t=Ys(this,uu).get(e);if(t){clearTimeout(t.timeout),Ys(this,uu).delete(e);const n=r;"error"in n&&n.error?t.reject(to(this,hu,fu).call(this,n.error)):t.resolve(n)}}},gu=function(e){var t,n;if(!to(this,hu,pu).call(this,e))return;const r=null==(n=null==(t=null==e?void 0:e.data)?void 0:t.data)?void 0:n.data;"object"==typeof r&&null!==r&&"method"in r&&to(this,hu,du).call(this,r)},vu=function(){Ys(this,cu)||(eo(this,cu,to(this,hu,mu).bind(this)),eo(this,lu,to(this,hu,gu).bind(this)),window.addEventListener("message",Ys(this,cu)),window.addEventListener("message",Ys(this,lu)))},_u=function(){return no(this,null,(function*(){to(this,hu,vu).call(this),Ys(this,ou).isConnected()||(yield Ys(this,ou).connect())}))},ga();wu=new WeakMap,yu=new WeakMap,bu=new WeakSet,Eu=function(e){return no(this,null,(function*(){const t=e.params,n=Object.keys(Hs(Hs({},t.optionalScopes),t.requiredScopes)),r=[];n.forEach((e=>{var n,i,s,o;const a=null==(n=t.requiredScopes)?void 0:n[e],u=null==(i=t.optionalScopes)?void 0:i[e];a&&r.push(...null!=(s=a.accounts)?s:[]),u&&r.push(...null!=(o=u.accounts)?o:[])}));const i=[...new Set(r)];yield this.metamaskConnectMultichain.connect(n,i,t.sessionProperties);const s=Ys(this,yu).call(this);if(!s)throw new Error("Transport not initialized after connect");return s.request({method:"wallet_getSession"})}))},ku=function(e){return no(this,null,(function*(){const t=Ys(this,yu).call(this);return(null==t?void 0:t.isConnected())?t.request({method:"wallet_getSession"}):{jsonrpc:"2.0",id:e.id,result:{sessionScopes:{}}}}))},Au=function(e){return no(this,null,(function*(){var t;const n=e.params,r=null!=(t=null==n?void 0:n.scopes)?t:[];try{return yield this.metamaskConnectMultichain.disconnect(r),{jsonrpc:"2.0",id:e.id,result:!0}}catch(t){return{jsonrpc:"2.0",id:e.id,result:!1}}}))},Su=function(e){return no(this,null,(function*(){if(!this.isTransportConnected())return{error:Ui()};return{result:this.metamaskConnectMultichain.invokeMethod(e.params)}}))},ga();var Iu,Ru,xu,Ou,Mu,Tu,Pu,Nu,Lu,$u,ju,Fu,zu,Bu,Du,Uu,qu,Wu,Zu,Gu,Hu,Vu,Ju,Xu,Ku,Yu,Qu,ec,tc,nc,rc=Cs("metamask-sdk:core"),ic="__METAMASK_CONNECT_MULTICHAIN_SINGLETON__";function sc(e){var t;return Vs(Hs({},null!=e?e:{}),{enabled:null==(t=null==e?void 0:e.enabled)||t,integrationType:(null==e?void 0:e.integrationType)||"direct"})}function oc(e){var t;return!1!==(null==(t=e.analytics)?void 0:t.enabled)}function ac(e,t,n){return no(this,null,(function*(){var r,i;if(!oc(e))return null==n||n(void 0),void ss.disable();const s=bo();if(!("in-app-browser"===s||"web-desktop"===s||"web-mobile"===s)&&!("react-native"===s))return;const o=Ko(e.dapp),a=yield t.getAnonId();null==n||n(a);const{integrationType:u}=null!=(r=e.analytics)?r:{integrationType:""};ss.setGlobalProperty("mmconnect_versions",null!=(i=e.versions)?i:{}),ss.setGlobalProperty("dapp_id",o),ss.setGlobalProperty("anon_id",a),ss.setGlobalProperty("platform",s),u&&ss.setGlobalProperty("integration_types",[u]),ss.enable()}))}Ru=new WeakMap,xu=new WeakMap,Ou=new WeakMap,Mu=new WeakMap,Tu=new WeakMap,Pu=new WeakMap,Nu=new WeakMap,Lu=new WeakMap,$u=new WeakSet,ju=function(){if(!Ys(this,Ou))throw new Error("Transport not initialized, establish connection first");return Ys(this,Ou)},Fu=new WeakMap,zu=function(){return no(this,null,(function*(){yield ac(this.options,this.storage,(e=>{eo(this,Lu,e)}))}))},Bu=function(e){return no(this,null,(function*(){var t,n,r;if("object"==typeof e&&null!==e&&"method"in e){if("wallet_sessionChanged"===e.method){const r=null!=(n=null==(t=e.params)?void 0:t.sessionScopes)?n:{},i=Object.keys(r).length>0;if("loaded"===this.status&&!i)return;this.status=i?"connected":"disconnected"}this.emit(e.method,null!=(r=e.params)?r:e.result)}}))},Du=function(){return no(this,null,(function*(){const e=yield this.storage.getTransportType(),t=yield ko();if(e){if("browser"===e){if(t){const e=new Cu;return eo(this,Ou,e),eo(this,Pu,"browser"),Ys(this,xu).setupTransportNotificationListener(),eo(this,Nu,e.onNotification(to(this,$u,Bu).bind(this))),e}}else if("mwp"===e){const{adapter:e}=this.options.storage,t=yield to(this,$u,Zu).call(this),{MWPTransport:n}=yield Promise.resolve().then((()=>(wa(),_a))),r=new n(t,e);return eo(this,Mu,t),eo(this,Ou,r),eo(this,Pu,"mwp"),Ys(this,xu).setupTransportNotificationListener(),eo(this,Nu,r.onNotification(to(this,$u,Bu).bind(this))),r}yield this.storage.removeTransportType()}}))},Uu=function(){return no(this,null,(function*(){var e;const t=yield to(this,$u,Du).call(this);if(t)t.isConnected()||(this.status="connecting",yield t.connect()),this.status="connected","mwp"===Ys(this,Pu)?yield this.storage.setTransportType("mwp"):yield this.storage.setTransportType("browser");else{this.status="loaded";const t=yield ko(),n=null==(e=this.options.ui.preferExtension)||e;if(t&&n){yield to(this,$u,Yu).call(this,{persist:!1});try{yield to(this,$u,ju).call(this).init()}catch(e){console.error("Passive init failed:",e)}}}}))},qu=function(){const e={dapp:this.options.dapp,sdk:{version:Uo(),platform:bo()}};return oc(this.options)&&Ys(this,Lu)&&(e.analytics={remote_session_id:Ys(this,Lu)}),e},Wu=function(){return no(this,null,(function*(){try{yield to(this,$u,zu).call(this),yield to(this,$u,Uu).call(this)}catch(e){yield this.storage.removeTransportType(),this.status="pending",rc("MetaMaskSDK error during initialization",e)}}))},Zu=function(){return no(this,null,(function*(){const[e,{DappClient:t},{createKeyManager:n}]=yield Promise.all([import("./index-754d059b.js").then((function(e){return e.i})),import("./index-fcb3d760.js"),Promise.resolve().then((()=>(Ea(),ya)))]),r=yield n(),{adapter:i}=this.options.storage,s=yield e.SessionStore.create(i),o="undefined"!=typeof window?WebSocket:(yield import("./browser-3f7e560e.js").then((function(e){return e.b}))).WebSocket;return new t({transport:yield e.WebSocketTransport.create({url:"wss://mm-sdk-relay.api.cx.metamask.io/connection/websocket",kvstore:i,websocket:o}),sessionstore:s,keymanager:r})}))},Gu=function(){return no(this,null,(function*(){if("mwp"===Ys(this,Pu))return;const{adapter:e}=this.options.storage,t=yield to(this,$u,Zu).call(this);eo(this,Mu,t);const{MWPTransport:n}=yield Promise.resolve().then((()=>(wa(),_a))),r=new n(t,e);eo(this,Ou,r),eo(this,Pu,"mwp"),Ys(this,xu).setupTransportNotificationListener(),eo(this,Nu,r.onNotification(to(this,$u,Bu).bind(this))),yield this.storage.setTransportType("mwp")}))},Hu=function(){return no(this,null,(function*(){var e;(null==(e=this.options.ui.factory.modal)?void 0:e.isMounted)&&(yield this.storage.removeTransportType())}))},Vu=function(){const e=to(this,$u,Hu).bind(this);return"undefined"!=typeof window&&void 0!==window.addEventListener&&window.addEventListener("beforeunload",e),()=>{"undefined"!=typeof window&&void 0!==window.removeEventListener&&window.removeEventListener("beforeunload",e)}},Ju=function(e,t,n,r){return no(this,null,(function*(){const i=je();return this.options.ui.factory.renderInstallModal(e,(()=>no(this,null,(function*(){"CONNECTED"!==this.dappClient.state&&"CONNECTING"!==this.dappClient.state||(yield this.dappClient.disconnect());const e=je();return this.dappClient.on("session_request",(t=>{e.resolve({sessionRequest:t,metadata:to(this,$u,qu).call(this)})})),to(this,$u,ju).call(this).connect({scopes:t,caipAccountIds:n,sessionProperties:r}).then((()=>no(this,null,(function*(){var e;yield this.options.ui.factory.unload(),null==(e=this.options.ui.factory.modal)||e.unmount(),this.status="connected",yield this.storage.setTransportType("mwp")})))).catch((e=>no(this,null,(function*(){const{ProtocolError:t,ErrorCode:n}=yield import("./index-754d059b.js").then((function(e){return e.i}));if(e instanceof t)e.code!==n.REQUEST_EXPIRED&&(this.status="disconnected",yield this.options.ui.factory.unload(e),i.reject(e));else{this.status="disconnected";const t=e instanceof Error?e:new Error(String(e));yield this.options.ui.factory.unload(t),i.reject(t)}})))),e.promise}))),(e=>no(this,null,(function*(){e?(yield this.storage.removeTransportType(),i.reject(e)):(yield this.storage.setTransportType("mwp"),i.resolve())}))),(e=>{this.emit("display_uri",e)})).catch((e=>{i.reject(e instanceof Error?e:new Error(String(e)))})),i.promise}))},Xu=function(e,t,n,r){return no(this,null,(function*(){null!=Ys(this,Tu)||eo(this,Tu,to(this,$u,Vu).call(this)),this.options.ui.headless?yield to(this,$u,Ku).call(this,t,n,r):yield to(this,$u,Ju).call(this,e,t,n,r)}))},Ku=function(e,t,n){return no(this,null,(function*(){"CONNECTED"!==this.dappClient.state&&"CONNECTING"!==this.dappClient.state||(yield this.dappClient.disconnect().catch((()=>{})));const r=e=>{const t={sessionRequest:e,metadata:to(this,$u,qu).call(this)},n=this.options.ui.factory.createConnectionDeeplink(t);this.emit("display_uri",n)};this.dappClient.on("session_request",r);try{yield to(this,$u,ju).call(this).connect({scopes:e,caipAccountIds:t,sessionProperties:n}),this.status="connected",yield this.storage.setTransportType("mwp")}catch(e){const{ProtocolError:t}=yield import("./index-754d059b.js").then((function(e){return e.i}));if(this.status="disconnected",yield this.storage.removeTransportType(),e instanceof t||e instanceof Error)throw e;throw new Error(String(e))}finally{this.dappClient.off("session_request",r)}}))},Yu=function(){return no(this,arguments,(function*(e={persist:!0}){if("browser"===Ys(this,Pu))return Ys(this,Ou);(null==e?void 0:e.persist)&&(yield this.storage.setTransportType("browser"));const t=new Cu;return eo(this,Nu,t.onNotification(to(this,$u,Bu).bind(this))),eo(this,Ou,t),eo(this,Pu,"browser"),Ys(this,xu).setupTransportNotificationListener(),t}))},Qu=function(e,t,n){return no(this,null,(function*(){return new Promise(((r,i)=>no(this,null,(function*(){const s=e=>{var t;if("object"!=typeof e||null===e||!("data"in e))return;const n=e.data;"object"==typeof n&&null!==n&&(n.error&&(this.dappClient.off("message",s),i(n.error)),(null==(t=null==n?void 0:n.result)?void 0:t.sessionScopes)&&this.dappClient.off("message",s))};let o;return this.dappClient.on("message",s),to(this,$u,ju).call(this).isConnected()?o=setTimeout((()=>{this.openSimpleDeeplinkIfNeeded()}),250):this.dappClient.once("session_request",(e=>{var t;const n={sessionRequest:e,metadata:to(this,$u,qu).call(this)},r=this.options.ui.factory.createConnectionDeeplink(n),i=this.options.ui.factory.createConnectionUniversalLink(n);this.emit("display_uri",r),(null==(t=this.options.mobile)?void 0:t.preferredOpenLink)?this.options.mobile.preferredOpenLink(r,"_self"):Yo(this.options,r,i)})),to(this,$u,ju).call(this).connect({scopes:e,caipAccountIds:t,sessionProperties:n}).then(r).catch((e=>no(this,null,(function*(){yield this.storage.removeTransportType(),this.dappClient.off("message",s),i(e instanceof Error?e:new Error(String(e)))})))).finally((()=>{o&&clearTimeout(o)}))}))))}))},ec=function(e,t,n){return no(this,null,(function*(){return this.status="connecting",e.then((()=>no(this,null,(function*(){if(this.status="connected",oc(this.options))try{const e=yield Fo(this.options,this.storage);ss.track("mmconnect_connection_established",Vs(Hs({},e),{transport_type:n,user_permissioned_chains:t}))}catch(e){rc("Error tracking connection_established event",e)}})))).catch((e=>no(this,null,(function*(){if(this.status="disconnected",oc(this.options))try{const t=yield Fo(this.options,this.storage);$o(e)?ss.track("mmconnect_connection_rejected",Vs(Hs({},t),{transport_type:n})):ss.track("mmconnect_connection_failed",Hs(Vs(Hs({},t),{transport_type:n}),jo(e)))}catch(t){rc("Error tracking connection failed/rejected event",e)}throw e}))))}))},tc=function(){return no(this,null,(function*(){var e;let t={sessionScopes:{},sessionProperties:{}};if(null==(e=Ys(this,Ou))?void 0:e.isConnected())try{const e=yield Ys(this,Ou).request({method:"wallet_getSession"});e.result&&(t=e.result)}catch(e){}return t}))},nc=function(){return no(this,null,(function*(){var e,t;const{ui:n}=this.options,{showInstallModal:r=!1}=null!=n?n:{};if(!(Eo()&&!r))return;const i=yield null==(e=Ys(this,Ou))?void 0:e.getStoredPendingSessionRequest();if(!i)return;const s={sessionRequest:i,metadata:to(this,$u,qu).call(this)},o=this.options.ui.factory.createConnectionDeeplink(s),a=this.options.ui.factory.createConnectionUniversalLink(s);(null==(t=this.options.mobile)?void 0:t.preferredOpenLink)?this.options.mobile.preferredOpenLink(o,"_self"):Yo(this.options,o,a)}))};var uc=class e extends fo{constructor(e){var t,n,r,i;const s=function(e){var t,n;const r=bo(),i="web-desktop"===r||"web-mobile"===r||"in-app-browser"===r;if(!(null==(t=e.dapp)?void 0:t.name))throw new Error("You must provide dapp name");if(i&&(e.dapp=Vs(Hs({},e.dapp),{url:`${window.location.protocol}//${window.location.host}`})),!(null==(n=e.dapp)?void 0:n.url))throw new Error("You must provide dapp url");if("react-native"===r&&e.dapp.url){const t=function(e){var t;if(/^https?:\/\//u.test(e))return;const n=e.match(/^([^:]*):\/\//u);return{url:`https://${((null!=(t=null==n?void 0:n[1])?t:e).toLowerCase().replace(/[^a-z0-9-]/gu,"-").replace(/^-+|-+$/gu,"")||"unknown").slice(0,63).replace(/-+$/u,"")}.rn.dapp.local`,nativeScheme:e}}(e.dapp.url);t&&(console.info(`Normalizing dapp URL for React Native: "${e.dapp.url}" -> "${t.url}"`),e.dapp=Vs(Hs({},e.dapp),{url:t.url,nativeScheme:t.nativeScheme}))}const s=/^(http|https):\/\/[^\s]*$/u;if(e.dapp){"iconUrl"in e.dapp&&e.dapp.iconUrl&&!s.test(e.dapp.iconUrl)&&(console.warn("Invalid dappMetadata.iconUrl: URL must start with http:// or https://"),e.dapp.iconUrl=void 0),"base64Icon"in e.dapp&&e.dapp.base64Icon&&e.dapp.base64Icon.length>163400&&(console.warn("Invalid dappMetadata.base64Icon: Base64-encoded icon string length must be less than 163400 characters"),e.dapp.base64Icon=void 0),e.dapp.url&&!s.test(e.dapp.url)&&console.warn("Invalid dappMetadata.url: URL must start with http:// or https://");const t=qo();if(t&&!("iconUrl"in e.dapp)&&!("base64Icon"in e.dapp)){const n=`${window.location.protocol}//${window.location.host}${t}`;e.dapp.iconUrl=n}}return e}(e);super(Vs(Hs({},s),{ui:Vs(Hs({},s.ui),{preferExtension:null==(t=s.ui.preferExtension)||t,showInstallModal:null!=(n=s.ui.showInstallModal)&&n,headless:null!=(r=s.ui.headless)&&r}),analytics:sc(e.analytics),versions:Hs({"connect-multichain":Uo()},null!=(i=e.versions)?i:{})})),Qs(this,$u),Qs(this,Ru),Qs(this,xu),Qs(this,Ou),Qs(this,Mu),Qs(this,Tu),Qs(this,Pu),this._status="pending",Qs(this,Nu),Qs(this,Lu),Qs(this,Fu,`Sdk/Javascript SdkVersion/${Uo()} Platform/${bo()} dApp/${null!=(Iu=this.options.dapp.url)?Iu:this.options.dapp.name} dAppTitle/${this.options.dapp.name}`),eo(this,xu,new class{constructor(e,t){this.metamaskConnectMultichain=e,Qs(this,bu),Qs(this,wu,new Set),Qs(this,yu),eo(this,yu,t)}isTransportDefined(){return void 0!==Ys(this,yu).call(this)}isTransportConnected(){var e,t;return null!=(t=null==(e=Ys(this,yu).call(this))?void 0:e.isConnected())&&t}clearNotificationCallbacks(){Ys(this,wu).clear()}notifyCallbacks(e){Ys(this,wu).forEach((t=>{t(e)}))}clearTransportNotificationListener(){var e;null==(e=this.notificationListener)||e.call(this),this.notificationListener=void 0}setupTransportNotificationListener(){const e=Ys(this,yu).call(this);e&&!this.notificationListener&&(this.notificationListener=e.onNotification(this.notifyCallbacks.bind(this)))}connect(){return no(this,null,(function*(){return Promise.resolve()}))}disconnect(){return no(this,null,(function*(){return Promise.resolve()}))}isConnected(){return!0}request(e){return no(this,arguments,(function*(e,t={}){const n=Go(),r=Hs({id:n,jsonrpc:"2.0"},e);switch(r.method){case"wallet_createSession":return to(this,bu,Eu).call(this,r);case"wallet_getSession":return to(this,bu,ku).call(this,r);case"wallet_revokeSession":return to(this,bu,Au).call(this,r);case"wallet_invokeMethod":return to(this,bu,Su).call(this,r);default:throw new Error(`Unsupported method: ${r.method}`)}}))}onNotification(e){return this.setupTransportNotificationListener(),Ys(this,wu).add(e),()=>{Ys(this,wu).delete(e)}}}(this,(()=>Ys(this,Ou)))),eo(this,Ru,ti({transport:Ys(this,xu)}))}get status(){return this._status}set status(e){this._status!==e&&(this._status=e,this.emit("stateChanged",e))}get provider(){return Ys(this,Ru)}get dappClient(){if(!Ys(this,Mu))throw new Error("DappClient not initialized, establish connection first");return Ys(this,Mu)}get transportType(){var e;return null!=(e=Ys(this,Pu))?e:"unknown"}get storage(){return this.options.storage}get version(){return Uo()}static create(t){return no(this,null,(function*(){var n;const r=Jo(),i=r[ic];if(i){const r=yield i;return r.version!==Uo()&&console.warn(`MetaMask Connect does not support using multiple versions of @metamask/connect-multichain. Attempted to create a new instance with version ${Uo()}, but an existing ${r.version} singleton was already initialized. Using the existing ${r.version} singleton. This is NOT supported and may lead to unexpected behavior. Please ensure there is only one version of @metamask/connect-multichain package resolved in your application.`),r.mergeOptions(t),r instanceof e?yield to(n=r,$u,zu).call(n):yield ac(r.options,r.storage),t.debug&&Is("metamask-sdk:*"),r}const s=no(null,null,(function*(){var n;const r=new e(t);return(yield Rs("metamask-sdk:core",r.options.storage))&&Is("metamask-sdk:core"),yield to(n=r,$u,Wu).call(n),r})).catch((e=>{throw r[ic]=void 0,console.error("Error initializing MetaMaskConnectMultichain",e),e}));return r[ic]=s,s}))}connect(e,t,n,r){return no(this,null,(function*(){var i;if("connecting"===this.status&&"mwp"===Ys(this,Pu))throw yield to(this,$u,nc).call(this),new Error("Existing connection is pending. Please check your MetaMask Mobile app to continue.");const{ui:s}=this.options,o=bo(),a="in-app-browser"===o||"web-desktop"===o,{preferExtension:u=!0,showInstallModal:c=!1}=s,l=Eo(),h=yield ko();let d;if(d="in-app-browser"===o||a&&h&&u?"browser":"mwp",oc(this.options))try{const t=yield Fo(this.options,this.storage),n=Object.keys(this.options.api.supportedNetworks);ss.track("mmconnect_connection_initiated",Vs(Hs({},t),{transport_type:d,dapp_configured_chains:n,dapp_requested_chains:e}))}catch(e){rc("Error tracking connection_initiated event",e)}const f=yield to(this,$u,tc).call(this),{mergedScopes:p,mergedCaipAccountIds:m,mergedSessionProperties:g}=function(e,t,n,r){const i=Object.keys(e.sessionScopes),s=[];return Object.values(e.sessionScopes).forEach((e=>{(null==e?void 0:e.accounts)&&Array.isArray(e.accounts)&&e.accounts.forEach((e=>{s.push(e)}))})),{mergedScopes:Array.from(new Set([...i,...t])),mergedCaipAccountIds:Array.from(new Set([...s,...n])),mergedSessionProperties:Hs(Hs({},e.sessionProperties),r)}}(f,e,t,n),v=Object.keys(null!=g?g:{}).length>0?g:void 0;if((null==(i=Ys(this,Ou))?void 0:i.isConnected())&&!l)return to(this,$u,ec).call(this,Ys(this,Ou).connect({scopes:p,caipAccountIds:m,sessionProperties:v,forceRequest:r}).then((()=>no(this,null,(function*(){return"mwp"===Ys(this,Pu)?this.storage.setTransportType("mwp"):this.storage.setTransportType("browser")})))),e,d);if("in-app-browser"===o){const t=yield to(this,$u,Yu).call(this);return to(this,$u,ec).call(this,t.connect({scopes:p,caipAccountIds:m,sessionProperties:v,forceRequest:r}),e,d)}if(a&&h&&u){const t=yield to(this,$u,Yu).call(this);return to(this,$u,ec).call(this,t.connect({scopes:p,caipAccountIds:m,sessionProperties:v,forceRequest:r}),e,d)}yield to(this,$u,Gu).call(this);const _=h?c:!u||c;return l&&!_?to(this,$u,ec).call(this,to(this,$u,Qu).call(this,p,m,v),e,d):to(this,$u,ec).call(this,to(this,$u,Xu).call(this,_,p,m,v),e,d)}))}disconnect(){return no(this,arguments,(function*(e=[]){var t,n,r;const i=yield to(this,$u,tc).call(this),s=0===e.length?[]:Object.keys(i.sessionScopes).filter((t=>!e.includes(t)));yield null==(t=Ys(this,Ou))?void 0:t.disconnect(e),0===s.length&&(yield this.storage.removeTransportType(),"browser"!==Ys(this,Pu)&&(yield null==(n=Ys(this,Nu))?void 0:n.call(this),null==(r=Ys(this,Tu))||r.call(this),eo(this,Nu,void 0),eo(this,Tu,void 0),eo(this,Ou,void 0),eo(this,Pu,void 0),Ys(this,xu).clearTransportNotificationListener(),eo(this,Mu,void 0)),this.status="disconnected")}))}invokeMethod(e){return no(this,null,(function*(){var t;const n=to(this,$u,ju).call(this),{options:r}=this,i=new class{constructor(e,t){this.config=e,this.sdkInfo=t}request(e){return no(this,null,(function*(){const{request:t}=e,n=JSON.stringify({jsonrpc:"2.0",method:t.method,params:t.params,id:Wa+=1}),r=this.getRpcEndpoint(e.scope),i=yield this.fetchWithTimeout(r,n,"POST",this.getHeaders(r),3e4);return yield this.parseResponse(i)}))}getRpcEndpoint(e){var t,n,r;const i=(null!=(r=null==(n=null==(t=this.config)?void 0:t.api)?void 0:n.supportedNetworks)?r:{})[e];if(!i)throw new Za(`No RPC endpoint found for scope ${e}`);return i}fetchWithTimeout(e,t,n,r,i){return no(this,null,(function*(){const s=new AbortController,o=setTimeout((()=>s.abort()),i);try{const i=yield as(e,{method:n,headers:r,body:t,signal:s.signal});if(clearTimeout(o),!i.ok)throw new vs(e,n,i.status);return i}catch(e){if(clearTimeout(o),e instanceof vs)throw e;if(e instanceof Error&&"AbortError"===e.name)throw new bs(`Request timeout after ${i}ms`);throw new bs(e.message)}}))}parseResponse(e){return no(this,null,(function*(){try{return(yield e.json()).result}catch(e){throw new ws(e.message)}}))}getHeaders(e){const t={Accept:"application/json","Content-Type":"application/json"};return e.includes("infura")?Vs(Hs({},t),{"Metamask-Sdk-Info":this.sdkInfo}):t}}(r,Ys(this,Fu)),s=new class{constructor(e,t,n,r){this.transport=e,this.rpcClient=t,this.config=n,this.transportType=r,Qs(this,Ga)}invokeMethod(e){return no(this,null,(function*(){const{method:t}=e.request;return lo.has(t)?this.handleWithEip1193Passthrough(e):uo.has(t)?this.handleWithRpcNode(e):co.has(t)?this.handleWithSdkState(e):this.handleWithWallet(e)}))}handleWithEip1193Passthrough(e){return no(this,null,(function*(){return(yield this.transport.sendEip1193Message({method:e.request.method,params:e.request.params})).result}))}handleWithWallet(e){return no(this,null,(function*(){return to(this,Ga,Ha).call(this,e,(()=>no(this,null,(function*(){const t=this.transport.request({method:"wallet_invokeMethod",params:e}),{ui:n,mobile:r}=this.config,{showInstallModal:i=!1}=null!=n?n:{};Eo()&&!i&&setTimeout((()=>no(this,null,(function*(){const e=yield this.transport.getActiveSession();if(!e)throw new Error("No active session found");const t=`${qa}/mwp?id=${encodeURIComponent(e.id)}`;(null==r?void 0:r.preferredOpenLink)?r.preferredOpenLink(t,"_self"):Yo(this.config,t,Ua)}))),10);const s=yield t;if(s.error)throw iu(s.error);return s.result}))))}))}handleWithRpcNode(e){return no(this,null,(function*(){try{return yield this.rpcClient.request(e)}catch(t){if(t instanceof Za)return this.handleWithWallet(e);throw t}}))}handleWithSdkState(e){return no(this,null,(function*(){return console.warn(`Method "${e.request.method}" is configured for SDK state handling, but this is not yet implemented. Falling back to wallet passthrough.`),this.handleWithWallet(e)}))}}(n,i,r,null!=(t=Ys(this,Pu))?t:"unknown");return s.invokeMethod(e)}))}openSimpleDeeplinkIfNeeded(){const{ui:e,mobile:t}=this.options,{showInstallModal:n=!1}=null!=e?e:{};Eo()&&!n&&setTimeout((()=>no(this,null,(function*(){const e=yield to(this,$u,ju).call(this).getActiveSession();if(!e)throw new Error("No active session found");const n=`${qa}/mwp?id=${encodeURIComponent(e.id)}`;(null==t?void 0:t.preferredOpenLink)?t.preferredOpenLink(n,"_self"):Yo(this.options,n,Ua)}))),10)}emitSessionChanged(){return no(this,null,(function*(){var e,t;const n={sessionScopes:{}};if(!(null==(e=Ys(this,Ou))?void 0:e.isConnected()))return void this.emit("wallet_sessionChanged",n);const r=yield Ys(this,Ou).request({method:"wallet_getSession"});this.emit("wallet_sessionChanged",null!=(t=r.result)?t:n)}))}};ro();var cc=class e extends ms{constructor(t,n,r){super(`StorageErr${e.code}: ${t} storage get error in key: ${n} - ${r}`,e.code),this.platform=t,this.key=n,this.reason=r}};cc.code=60;var lc=cc,hc=class e extends ms{constructor(t,n,r){super(`StorageErr${e.code}: ${t} storage set error in key: ${n} - ${r}`,e.code),this.platform=t,this.key=n,this.reason=r}};hc.code=61;var dc=hc,fc=class e extends ms{constructor(t,n,r){super(`StorageErr${e.code}: ${t} storage delete error in key: ${n} - ${r}`,e.code),this.platform=t,this.key=n,this.reason=r}};fc.code=62;var pc=fc;wo(),Mo();var mc=class extends So{constructor(e){super(),this.adapter=e}getTransportType(){return no(this,null,(function*(){try{const e=yield this.adapter.get("multichain-transport");return e?function(e){switch(e){case"browser":return"browser";case"mwp":return"mwp";default:return"unknown"}}(e):null}catch(e){throw new lc(this.adapter.platform,"multichain-transport",e.message)}}))}setTransportType(e){return no(this,null,(function*(){try{yield this.adapter.set("multichain-transport",e)}catch(e){throw new dc(this.adapter.platform,"multichain-transport",e.message)}}))}removeTransportType(){return no(this,null,(function*(){try{yield this.adapter.delete("multichain-transport")}catch(e){throw new pc(this.adapter.platform,"multichain-transport",e.message)}}))}getAnonId(){return no(this,null,(function*(){try{const e=yield this.adapter.get("anonId");if(e)return e;const t=ds();return yield this.adapter.set("anonId",t),t}catch(e){throw new lc(this.adapter.platform,"anonId",e.message)}}))}getExtensionId(){return no(this,null,(function*(){try{return yield this.adapter.get("extensionId")}catch(e){throw new lc(this.adapter.platform,"extensionId",e.message)}}))}setAnonId(e){return no(this,null,(function*(){try{return yield this.adapter.set("anonId",e)}catch(e){throw new dc(this.adapter.platform,"anonId",e.message)}}))}setExtensionId(e){return no(this,null,(function*(){try{return yield this.adapter.set("extensionId",e)}catch(e){throw new dc(this.adapter.platform,"extensionId",e.message)}}))}removeExtensionId(){return no(this,null,(function*(){try{return yield this.adapter.delete("extensionId")}catch(e){throw new pc(this.adapter.platform,"extensionId",e.message)}}))}removeAnonId(){return no(this,null,(function*(){try{return yield this.adapter.delete("anonId")}catch(e){throw new pc(this.adapter.platform,"anonId",e.message)}}))}getDebug(){return no(this,null,(function*(){try{return yield this.adapter.get("DEBUG")}catch(e){throw new lc(this.adapter.platform,"DEBUG",e.message)}}))}};Vo(),ga();var gc=class{constructor(e){this.options=e,this.platform=bo(),this.validateModals()}validateModals(){const e=["InstallModal","OTPCodeModal"].filter((e=>!this.options[e]));if(e.length>0)throw new Error(`Missing required modals: ${e.join(", ")}`)}unload(e){return no(this,null,(function*(){var t,n;null==(t=this.modal)||t.unmount(),yield null==(n=this.successCallback)?void 0:n.call(this,e)}))}get isMobile(){return"react-native"===this.platform}get isNode(){return"nodejs"===this.platform}get isWeb(){return"web-desktop"===this.platform||"in-app-browser"===this.platform||"web-mobile"===this.platform}getContainer(){return"undefined"==typeof document?void 0:document.createElement("div")}getMountedContainer(){if("undefined"==typeof document)return;const e=this.getContainer();return e&&document.body.appendChild(e),e}createConnectionDeeplink(e){if(!e)throw new Error("createConnectionDeeplink can only be called with a connection request");const t=Xo(JSON.stringify(e)),n=encodeURIComponent(t);return`${qa}/mwp?p=${n}&c=1`}createConnectionUniversalLink(e){if(!e)return`${Ua}`;const t=Xo(JSON.stringify(e)),n=encodeURIComponent(t);return`${Ua}/mwp?p=${n}&c=1`}onCloseModal(e=!0){return no(this,null,(function*(){return this.unload(e?new Error("User closed modal"):void 0)}))}onStartDesktopOnboarding(){(new js).startOnboarding()}renderInstallModal(e,t,n,r){return no(this,null,(function*(){var i,s;null==(i=this.modal)||i.unmount(),yield this.preload(),this.successCallback=n,this.displayUriCallback=r;const o=this.getMountedContainer(),a=yield t(),u=this.createConnectionDeeplink(a);null==(s=this.displayUriCallback)||s.call(this,u);const c=new this.options.InstallModal({expiresIn:(a.sessionRequest.expiresAt-Date.now())/1e3,connectionRequest:a,parentElement:o,showInstallModal:e,link:u,generateQRCode:e=>no(this,null,(function*(){var t;const n=this.createConnectionDeeplink(e);return null==(t=this.displayUriCallback)||t.call(this,n),n})),onClose:e=>{this.onCloseModal(e).catch((e=>{console.error("Failed to close modal:",e)}))},startDesktopOnboarding:this.onStartDesktopOnboarding.bind(this),createConnectionRequest:t,onDisplayUri:this.displayUriCallback});this.modal=c,c.mount()}))}renderOTPCodeModal(e,t,n){return no(this,null,(function*(){var r;null==(r=this.modal)||r.unmount(),yield this.preload(),this.successCallback=t;const i=this.getMountedContainer(),s=yield e(),o=new this.options.OTPCodeModal({parentElement:i,otpCode:s,onClose:this.onCloseModal.bind(this),createOTPCode:e,updateOTPCode:e=>n(e,o)});this.modal=o,o.mount()}))}};var vc=class extends gc{preload(){return no(this,null,(function*(){return function(){return no(this,null,(function*(){if("undefined"!=typeof document)try{const{defineCustomElements:e}=yield import("./index-7b0eeb5c.js").then((function(e){return e.i}));e()}catch(e){console.error("Failed to load customElements:",e)}}))}()}))}};Vo();var _c=e=>no(null,null,(function*(){e.debug&&Is("metamask-sdk:*");const t=yield Promise.resolve().then((()=>(Fa(),La)));let n;if(e.storage)n=e.storage;else{const{StoreAdapterWeb:e}=yield Promise.resolve().then((()=>(Ba(),za))),t=new e;n=new mc(t)}const r=new vc(t);return uc.create(Vs(Hs({},e),{storage:n,ui:Vs(Hs({},e.ui),{factory:r})}))}));function wc(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class yc extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}function bc(e,t="Assertion failed.",n=yc){if(!e){if(t instanceof Error)throw t;throw wc(n,t)}}const{memoize:Ec}=fe,kc=/^(?:0x)?[0-9a-f]+$/iu,Ac=/^0x[0-9a-f]{40}$/u,Sc=/^0x[0-9a-fA-F]{40}$/u;B(F(),kc),B(F(),/^0x[0-9a-f]+$/iu),B(F(),Ac),B(F(),Sc);const Cc=e=>"string"==typeof e;function Ic(e){return Cc(e)&&Sc.test(e)}function Rc(e){bc(function(e){return Cc(e)&&kc.test(e)}(e),"Value must be a hexadecimal string.")}const xc=Ec((function(e){bc(Ic(e),"Invalid hex address.");const t=function(e){if(e.startsWith("0x")||e.startsWith("0X"))return e.substring(2);return e}(e).toLowerCase(),n=ce(t),{length:r}=t,i=new Array(r);for(let e=0;e<r;e++){const r=1&e,s=n[e>>1],o=0===r?s>>4:15&s;i[e]=o>=8?t[e].toUpperCase():t[e]}return`0x${i.join("")}`}));const Oc=Ec((function(e){return!!Ic(e)&&xc(e)===e}));function Mc(e,t){return L(e,(e=>"string"==typeof e&&t.test(e)))}Ec((function(e){return Cc(t=e)&&Ac.test(t)||Oc(e);var t}));const Tc=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,Pc=/^[-a-z0-9]{3,8}$/u,Nc=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u;var Lc;function $c(e){const t=Nc.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}Mc("CaipChainId",Tc),Mc("CaipNamespace",Pc),Mc("CaipReference",/^[-_a-zA-Z0-9]{1,32}$/u),Mc("CaipAccountId",Nc),Mc("CaipAccountAddress",/^[-.%a-zA-Z0-9]{1,128}$/u),Mc("CaipAssetNamespace",/^[-a-z0-9]{3,8}$/u),Mc("CaipAssetReference",/^[-.%a-zA-Z0-9]{1,128}$/u),Mc("CaipTokenId",/^[-.%a-zA-Z0-9]{1,78}$/u),Mc("CaipAssetType",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u),Mc("CaipAssetId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u),Mc("CaipAssetTypeOrId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u),function(e){e.Bip122="bip122",e.Solana="solana",e.Stellar="stellar",e.Tron="tron",e.Eip155="eip155",e.Wallet="wallet"}(Lc=Lc||(Lc={}));const jc=e=>{Rc(e);const t=parseInt(e,16);return bc(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};var Fc={exports:{}};var zc={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};var Bc="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=zc,s=Bc,o=(t=e.exports={}).re=[],a=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],l=t.t={};let h=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=h++;s(e,i,t),l[e]=i,u[i]=t,c[i]=r,o[i]=new RegExp(t,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${u[l.NONNUMERICIDENTIFIER]}|${u[l.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NONNUMERICIDENTIFIER]}|${u[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),p("FULL",`^${u[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),p("LOOSE",`^${u[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),p("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",u[l.COERCE],!0),p("COERCERTLFULL",u[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Fc,Fc.exports);const Dc=Object.freeze({loose:!0}),Uc=Object.freeze({});var qc=e=>e?"object"!=typeof e?Dc:e:Uc;const Wc=/^[0-9]+$/,Zc=(e,t)=>{if("number"==typeof e&&"number"==typeof t)return e===t?0:e<t?-1:1;const n=Wc.test(e),r=Wc.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var Gc={compareIdentifiers:Zc,rcompareIdentifiers:(e,t)=>Zc(t,e)};const Hc=Bc,{MAX_LENGTH:Vc,MAX_SAFE_INTEGER:Jc}=zc,{safeRe:Xc,t:Kc}=Fc.exports,Yc=qc,{compareIdentifiers:Qc}=Gc;class el{constructor(e,t){if(t=Yc(t),e instanceof el){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Vc)throw new TypeError(`version is longer than ${Vc} characters`);Hc("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Xc[Kc.LOOSE]:Xc[Kc.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Jc||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Jc||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Jc||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<Jc)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Hc("SemVer.compare",this.version,this.options,e),!(e instanceof el)){if("string"==typeof e&&e===this.version)return 0;e=new el(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof el||(e=new el(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof el||(e=new el(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(Hc("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return Qc(n,r)}while(++t)}compareBuild(e){e instanceof el||(e=new el(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(Hc("build compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return Qc(n,r)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?Xc[Kc.PRERELEASELOOSE]:Xc[Kc.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];if(!1===n&&(r=[t]),((e,t)=>{const n=t.split(".");if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(0!==Qc(e[t],n[t]))return!1;return!0})(this.prerelease,t)){const e=this.prerelease[t.split(".").length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var tl=el;const nl=tl;var rl=(e,t,n=!1)=>{if(e instanceof nl)return e;try{return new nl(e,t)}catch(e){if(!n)return null;throw e}};const il=rl;var sl=(e,t)=>{const n=il(e,t);return n?n.version:null};const ol=rl;var al=(e,t)=>{const n=ol(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const ul=tl;var cl=(e,t,n,r,i)=>{"string"==typeof n&&(i=r,r=n,n=void 0);try{return new ul(e instanceof ul?e.version:e,n).inc(t,r,i).version}catch(e){return null}};const ll=rl;var hl=(e,t)=>{const n=ll(e,null,!0),r=ll(t,null,!0),i=n.compare(r);if(0===i)return null;const s=i>0,o=s?n:r,a=s?r:n,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(0===a.compareMain(o))return a.minor&&!a.patch?"minor":"patch"}const c=u?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};const dl=tl;var fl=(e,t)=>new dl(e,t).major;const pl=tl;var ml=(e,t)=>new pl(e,t).minor;const gl=tl;var vl=(e,t)=>new gl(e,t).patch;const _l=rl;var wl=(e,t)=>{const n=_l(e,t);return n&&n.prerelease.length?n.prerelease:null};const yl=tl;var bl=(e,t,n)=>new yl(e,n).compare(new yl(t,n));const El=bl;var kl=(e,t,n)=>El(t,e,n);const Al=bl;var Sl=(e,t)=>Al(e,t,!0);const Cl=tl;var Il=(e,t,n)=>{const r=new Cl(e,n),i=new Cl(t,n);return r.compare(i)||r.compareBuild(i)};const Rl=Il;var xl=(e,t)=>e.sort(((e,n)=>Rl(e,n,t)));const Ol=Il;var Ml=(e,t)=>e.sort(((e,n)=>Ol(n,e,t)));const Tl=bl;var Pl=(e,t,n)=>Tl(e,t,n)>0;const Nl=bl;var Ll=(e,t,n)=>Nl(e,t,n)<0;const $l=bl;var jl=(e,t,n)=>0===$l(e,t,n);const Fl=bl;var zl=(e,t,n)=>0!==Fl(e,t,n);const Bl=bl;var Dl=(e,t,n)=>Bl(e,t,n)>=0;const Ul=bl;var ql=(e,t,n)=>Ul(e,t,n)<=0;const Wl=jl,Zl=zl,Gl=Pl,Hl=Dl,Vl=Ll,Jl=ql;var Xl=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Wl(e,n,r);case"!=":return Zl(e,n,r);case">":return Gl(e,n,r);case">=":return Hl(e,n,r);case"<":return Vl(e,n,r);case"<=":return Jl(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const Kl=tl,Yl=rl,{safeRe:Ql,t:eh}=Fc.exports;var th=(e,t)=>{if(e instanceof Kl)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?Ql[eh.COERCERTLFULL]:Ql[eh.COERCERTL];let i;for(;(i=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),r.lastIndex=i.index+i[1].length+i[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?Ql[eh.COERCEFULL]:Ql[eh.COERCE]);if(null===n)return null;const r=n[2],i=n[3]||"0",s=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Yl(`${r}.${i}.${s}${o}${a}`,t)};const nh=rl,rh=zc,ih=tl,sh=(e,t)=>{const n=e instanceof ih?e.version:e;return nh(n,t)},oh=(e,t)=>{if(ah(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0}return e.format()},ah=e=>e.startsWith("pre");var uh=(e,t,n)=>{if(!rh.RELEASE_TYPES.includes(t))return null;const r=sh(e,n);return r&&oh(r,t)};var ch,lh,hh,dh,fh=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};function ph(){if(lh)return ch;lh=1;const e=/\s+/g;class t{constructor(n,s){if(s=r(s),n instanceof t)return n.loose===!!s.loose&&n.includePrerelease===!!s.includePrerelease?n:new t(n.raw,s);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(m,"");const t=((this.options.includePrerelease&&f)|(this.options.loose&&p))+":"+e,r=n.get(t);if(r)return r;const o=this.options.loose,u=o?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];e=e.replace(u,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),s("comparator trim",e),e=e.replace(a[c.TILDETRIM],h),s("tilde trim",e),e=e.replace(a[c.CARETTRIM],d),s("caret trim",e);let v=e.split(" ").map((e=>w(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));o&&(v=v.filter((e=>(s("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),s("range list",v);const _=new Map,y=v.map((e=>new i(e,this.options)));for(const e of y){if(g(e))return[e];_.set(e.value,e)}_.size>1&&_.has("")&&_.delete("");const b=[..._.values()];return n.set(t,b),b}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>_(t,n)&&e.set.some((e=>_(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}ch=t;const n=new fh,r=qc,i=mh(),s=Bc,o=tl,{safeRe:a,src:u,t:c,comparatorTrimReplace:l,tildeTrimReplace:h,caretTrimReplace:d}=Fc.exports,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:p}=zc,m=new RegExp(u[c.BUILD],"g"),g=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,_=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},w=(e,t)=>(e=e.replace(a[c.BUILD],""),s("comp",e,t),e=k(e,t),s("caret",e),e=b(e,t),s("tildes",e),e=S(e,t),s("xrange",e),e=I(e,t),s("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const n=t.loose?a[c.TILDELOOSE]:a[c.TILDE];return e.replace(n,((t,n,r,i,o)=>{let a;return s("tilde",e,t,n,r,i,o),y(n)?a="":y(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),a=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,s("tilde return",a),a}))},k=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{s("caret",e,t);const n=t.loose?a[c.CARETLOOSE]:a[c.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,a)=>{let u;return s("caret",e,t,n,i,o,a),y(n)?u="":y(i)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(o)?u="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:a?(s("replaceCaret pr",a),u="0"===n?"0"===i?`>=${n}.${i}.${o}-${a} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${a} <${+n+1}.0.0-0`):(s("no pr"),u="0"===n?"0"===i?`>=${n}.${i}.${o} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),s("caret return",u),u}))},S=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return e.replace(n,((n,r,i,o,a,u)=>{if(s("xRange",e,n,r,i,o,a,u),((e,t,n)=>y(e)&&!y(t)||y(t)&&n&&!y(n))(i,o,a))return e;const c=y(i),l=c||y(o),h=l||y(a),d=h;return"="===r&&d&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(o=0),a=0,">"===r?(r=">=",l?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),"<"===r&&(u="-0"),n=`${r+i}.${o}.${a}${u}`):l?n=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(n=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),s("xRange return",n),n}))},I=(e,t)=>(s("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),R=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),x=e=>(t,n,r,i,s,o,a,u,c,l,h,d)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(s)?`>=${r}.${i}.0${e?"-0":""}`:o?`>=${n}`:`>=${n}${e?"-0":""}`} ${u=y(c)?"":y(l)?`<${+c+1}.0.0-0`:y(h)?`<${c}.${+l+1}.0-0`:d?`<=${c}.${l}.${h}-${d}`:e?`<${c}.${l}.${+h+1}-0`:`<=${u}`}`.trim(),O=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return ch}function mh(){if(dh)return hh;dh=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),o("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],s=t.match(n);if(!s)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new a(s[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(o("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new a(t,this.options)}catch(e){return!1}return s(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new u(e.value,r).test(this.value):""===e.operator?""===e.value||new u(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(s(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(s(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}hh=t;const n=qc,{safeRe:r,t:i}=Fc.exports,s=Xl,o=Bc,a=tl,u=ph();return hh}const gh=ph();var vh=(e,t,n)=>{try{t=new gh(t,n)}catch(e){return!1}return t.test(e)};const _h=ph();var wh=(e,t)=>new _h(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const yh=tl,bh=ph();var Eh=(e,t,n)=>{let r=null,i=null,s=null;try{s=new bh(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new yh(r,n)))})),r};const kh=tl,Ah=ph();var Sh=(e,t,n)=>{let r=null,i=null,s=null;try{s=new Ah(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new kh(r,n)))})),r};const Ch=tl,Ih=ph(),Rh=Pl;var xh=(e,t)=>{e=new Ih(e,t);let n=new Ch("0.0.0");if(e.test(n))return n;if(n=new Ch("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new Ch(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!Rh(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!Rh(n,i)||(n=i)}return n&&e.test(n)?n:null};const Oh=ph();var Mh=(e,t)=>{try{return new Oh(e,t).range||"*"}catch(e){return null}};const Th=tl,Ph=mh(),{ANY:Nh}=Ph,Lh=ph(),$h=vh,jh=Pl,Fh=Ll,zh=ql,Bh=Dl;var Dh=(e,t,n,r)=>{let i,s,o,a,u;switch(e=new Th(e,r),t=new Lh(t,r),n){case">":i=jh,s=zh,o=Fh,a=">",u=">=";break;case"<":i=Fh,s=Bh,o=jh,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($h(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const c=t.set[n];let l=null,h=null;if(c.forEach((e=>{e.semver===Nh&&(e=new Ph(">=0.0.0")),l=l||e,h=h||e,i(e.semver,l.semver,r)?l=e:o(e.semver,h.semver,r)&&(h=e)})),l.operator===a||l.operator===u)return!1;if((!h.operator||h.operator===a)&&s(e,h.semver))return!1;if(h.operator===u&&o(e,h.semver))return!1}return!0};const Uh=Dh;var qh=(e,t,n)=>Uh(e,t,">",n);const Wh=Dh;var Zh=(e,t,n)=>Wh(e,t,"<",n);const Gh=ph();var Hh=(e,t,n)=>(e=new Gh(e,n),t=new Gh(t,n),e.intersects(t,n));const Vh=vh,Jh=bl;const Xh=ph(),Kh=mh(),{ANY:Yh}=Kh,Qh=vh,ed=bl,td=[new Kh(">=0.0.0-0")],nd=[new Kh(">=0.0.0")],rd=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===Yh){if(1===t.length&&t[0].semver===Yh)return!0;e=n.includePrerelease?td:nd}if(1===t.length&&t[0].semver===Yh){if(n.includePrerelease)return!0;t=nd}const r=new Set;let i,s,o,a,u,c,l;for(const t of e)">"===t.operator||">="===t.operator?i=id(i,t,n):"<"===t.operator||"<="===t.operator?s=sd(s,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&s){if(o=ed(i.semver,s.semver,n),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==s.operator))return null}for(const e of r){if(i&&!Qh(e,String(i),n))return null;if(s&&!Qh(e,String(s),n))return null;for(const r of t)if(!Qh(e,String(r),n))return!1;return!0}let h=!(!s||n.includePrerelease||!s.semver.prerelease.length)&&s.semver,d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;h&&1===h.prerelease.length&&"<"===s.operator&&0===h.prerelease[0]&&(h=!1);for(const e of t){if(l=l||">"===e.operator||">="===e.operator,c=c||"<"===e.operator||"<="===e.operator,i)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),">"===e.operator||">="===e.operator){if(a=id(i,e,n),a===e&&a!==i)return!1}else if(">="===i.operator&&!e.test(i.semver))return!1;if(s)if(h&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===h.major&&e.semver.minor===h.minor&&e.semver.patch===h.patch&&(h=!1),"<"===e.operator||"<="===e.operator){if(u=sd(s,e,n),u===e&&u!==s)return!1}else if("<="===s.operator&&!e.test(s.semver))return!1;if(!e.operator&&(s||i)&&0!==o)return!1}return!(i&&c&&!s&&0!==o)&&(!(s&&l&&!i&&0!==o)&&(!d&&!h))},id=(e,t,n)=>{if(!e)return t;const r=ed(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},sd=(e,t,n)=>{if(!e)return t;const r=ed(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var od=(e,t,n={})=>{if(e===t)return!0;e=new Xh(e,n),t=new Xh(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=rd(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const ad=Fc.exports,ud=zc,cd=tl,ld=Gc,hd=(e,t,n)=>{const r=[];let i=null,s=null;const o=e.sort(((e,t)=>Jh(e,t,n)));for(const e of o){Vh(e,t,n)?(s=e,i||(i=e)):(s&&r.push([i,s]),s=null,i=null)}i&&r.push([i,null]);const a=[];for(const[e,t]of r)e===t?a.push(e):t||e!==o[0]?t?e===o[0]?a.push(`<=${t}`):a.push(`${e} - ${t}`):a.push(`>=${e}`):a.push("*");const u=a.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return u.length<c.length?u:t};var dd,fd,pd,md,gd,vd,_d,wd,yd,bd,Ed,kd,Ad,Sd={parse:rl,valid:sl,clean:al,inc:cl,diff:hl,major:fl,minor:ml,patch:vl,prerelease:wl,compare:bl,rcompare:kl,compareLoose:Sl,compareBuild:Il,sort:xl,rsort:Ml,gt:Pl,lt:Ll,eq:jl,neq:zl,gte:Dl,lte:ql,cmp:Xl,coerce:th,truncate:uh,Comparator:mh(),Range:ph(),satisfies:vh,toComparators:wh,maxSatisfying:Eh,minSatisfying:Sh,minVersion:xh,validRange:Mh,outside:Dh,gtr:qh,ltr:Zh,intersects:Hh,simplifyRange:hd,subset:od,SemVer:cd,re:ad.re,src:ad.src,tokens:ad.t,SEMVER_SPEC_VERSION:ud.SEMVER_SPEC_VERSION,RELEASE_TYPES:ud.RELEASE_TYPES,compareIdentifiers:ld.compareIdentifiers,rcompareIdentifiers:ld.rcompareIdentifiers},Cd=Object.defineProperty,Id=Object.defineProperties,Rd=Object.getOwnPropertyDescriptors,xd=Object.getOwnPropertySymbols,Od=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,Td=e=>{throw TypeError(e)},Pd=(e,t,n)=>t in e?Cd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nd=(e,t)=>{for(var n in t||(t={}))Od.call(t,n)&&Pd(e,n,t[n]);if(xd)for(var n of xd(t))Md.call(t,n)&&Pd(e,n,t[n]);return e},Ld=(e,t)=>Id(e,Rd(t)),$d=(e,t,n)=>t.has(e)||Td("Cannot "+n),jd=(e,t,n)=>($d(e,t,"read from private field"),n?n.call(e):t.get(e)),Fd=(e,t,n)=>t.has(e)?Td("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),zd=(e,t,n,r)=>($d(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Bd=(e,t,n)=>($d(e,t,"access private method"),n),Dd=(e,t,n)=>new Promise(((r,i)=>{var s=e=>{try{a(n.next(e))}catch(e){i(e)}},o=e=>{try{a(n.throw(e))}catch(e){i(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,o);a((n=n.apply(e,t)).next())})),Ud=["metamask_getProviderState","metamask_sendDomainMetadata","metamask_logWeb3ShimUsage","wallet_registerOnboarding","net_version","wallet_getPermissions"],qd=["eth_accounts","eth_coinbase",...Ud,"wallet_requestPermissions","eth_requestAccounts","eth_chainId","wallet_revokePermissions","wallet_switchEthereumChain","wallet_addEthereumChain"],Wd={"eip1193-compatible":!0},Zd="metamask-connect:evm",Gd=Cs(Zd,"63"),Hd=()=>{Is(Zd)},Vd="eip6963:announceProvider",Jd="eip6963:requestProvider",Xd=["io.metamask","io.metamask.mobile"],Kd=()=>{const{window:e}=globalThis;return"function"==typeof(null==e?void 0:e.dispatchEvent)?e:void 0},Yd=e=>Xd.some((t=>t===e)),Qd=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),ef=()=>{const{crypto:e}=globalThis;if(null==e?void 0:e.randomUUID)return e.randomUUID();if(null==e?void 0:e.getRandomValues){const t=new Uint8Array(16);return e.getRandomValues(t),(e=>(e[6]=e[6]%16+64,e[8]=e[8]%64+128,[Qd[e[0]],Qd[e[1]],Qd[e[2]],Qd[e[3]],"-",Qd[e[4]],Qd[e[5]],"-",Qd[e[6]],Qd[e[7]],"-",Qd[e[8]],Qd[e[9]],"-",Qd[e[10]],Qd[e[11]],Qd[e[12]],Qd[e[13]],Qd[e[14]],Qd[e[15]]].join("")))(t)}throw new Error("Web Crypto API is required for EIP-6963 announcement")},tf=()=>Dd(null,null,(function*(){const e=Kd();if(!e)return!1;const t=new Set,n=e=>{const n=(e=>{var t;const{detail:n}=e,r=null==(t=null==n?void 0:n.info)?void 0:t.rdns;return"string"==typeof r?r:void 0})(e);n&&t.add(n)};e.addEventListener(Vd,n);try{e.dispatchEvent((()=>{const{Event:e}=globalThis;return new e(Jd)})()),yield(e=>Dd(null,null,(function*(){return yield new Promise((t=>setTimeout(t,e)))})))(300)}finally{e.removeEventListener(Vd,n)}return[...t].some(Yd)}));dd=new WeakMap,fd=new WeakMap,pd=new WeakMap,md=new WeakMap,gd=new WeakMap,vd=new WeakSet,_d=function(){return Dd(this,null,(function*(){if(Kd()){if(yield tf())return Gd("MetaMask EIP-6963 provider is already announced. Skipping..."),void zd(this,pd,!0);zd(this,fd,Object.freeze({info:Object.freeze({uuid:ef(),name:"MetaMask",icon:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 142 137">%0A <path fill="%23FF5C16" d="m132.24 131.751-30.481-9.076-22.986 13.741-16.038-.007-23-13.734-30.467 9.076L0 100.465l9.268-34.723L0 36.385 9.268 0l47.607 28.443h27.757L132.24 0l9.268 36.385-9.268 29.357 9.268 34.723-9.268 31.286Z"/>%0A <path fill="%23FF5C16" d="m9.274 0 47.608 28.463-1.893 19.534L9.274 0Zm30.468 100.478 20.947 15.957-20.947 6.24v-22.197Zm19.273-26.381L54.989 48.01l-25.77 17.74-.014-.007v.013l.08 18.26 10.45-9.918h19.28ZM132.24 0 84.632 28.463l1.887 19.534L132.24 0Zm-30.467 100.478-20.948 15.957 20.948 6.24v-22.197Zm10.529-34.723h.007-.007v-.013l-.006.007-25.77-17.739L82.5 74.097h19.272l10.457 9.917.073-18.259Z"/>%0A <path fill="%23E34807" d="m39.735 122.675-30.467 9.076L0 100.478h39.735v22.197ZM59.008 74.09l5.82 37.714-8.066-20.97-27.49-6.82 10.456-9.923h19.28Zm42.764 48.585 30.468 9.076 9.268-31.273h-39.736v22.197ZM82.5 74.09l-5.82 37.714 8.065-20.97 27.491-6.82-10.463-9.923H82.5Z"/>%0A <path fill="%23FF8D5D" d="m0 100.465 9.268-34.723h19.93l.073 18.266 27.492 6.82 8.065 20.969-4.146 4.618-20.947-15.957H0v.007Zm141.508 0-9.268-34.723h-19.931l-.073 18.266-27.49 6.82-8.066 20.969 4.145 4.618 20.948-15.957h39.735v.007ZM84.632 28.443H56.875L54.99 47.977l9.839 63.8H76.68l9.845-63.8-1.893-19.534Z"/>%0A <path fill="%23661800" d="M9.268 0 0 36.385l9.268 29.357h19.93l25.784-17.745L9.268 0Zm43.98 81.665h-9.029l-4.916 4.819 17.466 4.33-3.521-9.155v.006ZM132.24 0l9.268 36.385-9.268 29.357h-19.931L86.526 47.997 132.24 0ZM88.273 81.665h9.042l4.916 4.825-17.486 4.338 3.528-9.17v.007Zm-9.507 42.305 2.06-7.542-4.146-4.618H64.82l-4.145 4.618 2.059 7.542"/>%0A <path fill="%23C0C4CD" d="M78.766 123.969v12.453H62.735v-12.453h16.03Z"/>%0A <path fill="%23E7EBF6" d="m39.742 122.662 23.006 13.754v-12.453l-2.06-7.541-20.946 6.24Zm62.031 0-23.007 13.754v-12.453l2.06-7.541 20.947 6.24Z"/>%0A</svg>%0A',rdns:"io.metamask.mmc"}),provider:jd(this,dd)})),Bd(this,vd,wd).call(this),Bd(this,vd,yd).call(this)}}))},wd=function(){const e=Kd();e&&!jd(this,md)&&(zd(this,md,(()=>{try{Bd(this,vd,yd).call(this)}catch(e){Gd("EIP-6963 provider announcement failed",e)}})),e.addEventListener(Jd,jd(this,md)))},yd=function(){const e=Kd();e&&jd(this,fd)&&e.dispatchEvent((e=>{const{CustomEvent:t}=globalThis;return new t(Vd,{detail:e})})(jd(this,fd)))};var nf=class extends Ss{constructor(e,t){super(),Fd(this,bd),Fd(this,Ed),Fd(this,kd,[]),Fd(this,Ad),zd(this,bd,e),zd(this,Ed,t),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this),this.send=this.send.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.emit=this.emit.bind(this),this.once=this.once.bind(this),this.removeListener=this.removeListener.bind(this),this.listenerCount=this.listenerCount.bind(this)}request(e){return Dd(this,null,(function*(){var t,n,r,i;if(Gd(`request: ${e.method} - chainId: ${this.selectedChainId}`,e.params),qd.includes(e.method))return null==(t=jd(this,Ed))?void 0:t.call(this,e);if(!jd(this,Ad))throw new Error("No chain ID selected");const s=`eip155:${jc(jd(this,Ad))}`,o=jd(this,bd).options;if(!(null!=(r=null==(n=null==o?void 0:o.api)?void 0:n.supportedNetworks)?r:{})[s])throw new Error(`Chain ${s} is not configured in supportedNetworks. Requests cannot be made to chains not explicitly configured in supportedNetworks.`);try{return yield jd(this,bd).invokeMethod({scope:s,request:{method:e.method,params:e.params}})}catch(e){if(e instanceof ks&&void 0!==e.rpcCode){const t=e,n=new Error(null!=(i=e.rpcMessage)?i:e.reason);throw n.code=e.rpcCode,void 0!==t.rpcData&&(n.data=t.rpcData),n}throw e}}))}get selectedAccount(){return this.accounts[0]}set accounts(e){zd(this,kd,e)}get accounts(){return jd(this,kd)}get selectedChainId(){return jd(this,Ad)}set selectedChainId(e){zd(this,Ad,e)}get chainId(){return this.selectedChainId}sendAsync(e,t){return Dd(this,null,(function*(){var n;const r=null!=(n=e.id)?n:1,i=this.request({method:e.method,params:e.params}).then((e=>({id:r,jsonrpc:"2.0",result:e}))).catch((e=>{var t,n;return{id:r,jsonrpc:"2.0",error:{code:null!=(t=e.code)?t:-32603,message:null!=(n=e.message)?n:"Internal error",data:e.data}}}));if(!t)return i;i.then((e=>{e.error?t(new Error(e.error.message),e):t(null,e)})).catch((e=>{t(e,null)}))}))}send(e,t){this.sendAsync(e,t)}};bd=new WeakMap,Ed=new WeakMap,kd=new WeakMap,Ad=new WeakMap;var rf=e=>{return"string"==typeof(t=e)&&Pc.test(t)?{namespace:e}:function(e){return"string"==typeof e&&Tc.test(e)}(e)?function(e){const t=Tc.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}(e):{};var t},sf=e=>{const{namespace:t}=rf(e);return t===Lc.Eip155||e===`${Lc.Wallet}:${Lc.Eip155}`},of=e=>/^0x[0-9a-fA-F]+$/u.test(e),af=e=>of(e)?e:`0x${BigInt(e).toString(16)}`,uf=e=>{if(!e)return[];const t=[];for(const n of Object.keys(e)){const{namespace:e,reference:r}=rf(n);e===Lc.Eip155&&r&&t.push(af(r))}return Array.from(new Set(t))};var cf="0x1",lf="cache_eth_chainId";function hf(e){var t;return!1!==(null==(t=null==e?void 0:e.analytics)?void 0:t.enabled)}var df,ff,pf,mf,gf,vf,_f,wf,yf,bf,Ef,kf,Af,Sf,Cf,If,Rf,xf,Of,Mf,Tf,Pf,Nf,Lf,$f,jf,Ff,zf,Bf=e=>{const{name:t,nativeScheme:n,url:r}=e.dapp,i=null!=n?n:t;if(!r)return i;try{const{origin:e}=new URL(r);return"null"===e?i:e}catch(e){return i}},Df=({accounts:e,chainIds:t,invoker:n})=>{const r=(()=>{var e;return(null==(e=globalThis.crypto)?void 0:e.randomUUID)?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`})(),i=Date.now();return[{id:r,parentCapability:"eth_accounts",invoker:n,caveats:[{type:"restrictReturnedAccounts",value:e}],date:i},{id:r,parentCapability:"endowment:permitted-chains",invoker:n,caveats:[{type:"restrictNetworkSwitching",value:t}],date:i}]};df=new WeakMap,ff=new WeakMap,pf=new WeakMap,mf=new WeakMap,gf=new WeakMap,vf=new WeakMap,_f=new WeakMap,wf=new WeakMap,yf=new WeakMap,bf=new WeakMap,Ef=new WeakSet,kf=function(){return jd(this,df).options},Af=function(e,t,n){return{scope:t,request:{method:e,params:n}}},Sf=function(e,t,n){return Dd(this,null,(function*(){const r=Bd(this,Ef,kf).call(this);if(hf(r))try{const i=Bd(this,Ef,Af).call(this,e,t,n),s=yield zo(r,jd(this,df).storage,i,jd(this,df).transportType);ss.track("mmconnect_wallet_action_requested",s)}catch(e){Gd("Error tracking mmconnect_wallet_action_requested event",e)}}))},Cf=function(e,t,n){return Dd(this,null,(function*(){const r=Bd(this,Ef,kf).call(this);if(hf(r))try{const i=Bd(this,Ef,Af).call(this,e,t,n),s=yield zo(r,jd(this,df).storage,i,jd(this,df).transportType);ss.track("mmconnect_wallet_action_succeeded",s)}catch(e){Gd("Error tracking mmconnect_wallet_action_succeeded event",e)}}))},If=function(e,t,n,r){return Dd(this,null,(function*(){const i=Bd(this,Ef,kf).call(this);if(hf(i))try{const s=Bd(this,Ef,Af).call(this,e,t,n),o=yield zo(i,jd(this,df).storage,s,jd(this,df).transportType);$o(r)?ss.track("mmconnect_wallet_action_rejected",o):ss.track("mmconnect_wallet_action_failed",o)}catch(e){Gd("Error tracking wallet action rejected or failed event",r)}}))},Rf=function(e){return Dd(this,null,(function*(){if(jd(this,bf)&&e.includes(jd(this,bf)))return jd(this,bf);try{const t=yield jd(this,df).storage.adapter.get(lf);if(t){const n=JSON.parse(t);if(e.includes(n))return n}}catch(e){Gd("Error retrieving cached chainId",e)}return e[0]}))},xf=function(e){return Dd(this,null,(function*(){var t,n;if(Gd(`Intercepting request for method: ${e.method}`),Ud.includes(e.method))return Promise.reject(new Error(`Method: ${e.method} is not supported by Metamask Connect/EVM`));if("wallet_revokePermissions"===e.method)return this.disconnect();if("wallet_requestPermissions"===(n=e).method||"eth_requestAccounts"===n.method){const t="wallet_requestPermissions"===e.method,{method:n,params:r}=e,i=uf(jd(this,mf));0===i.length&&i.push(cf);const s=jd(this,ff).selectedChainId,o=s&&i.includes(s)?s:i[0],a=[o,...i.filter((e=>e!==o))],u=`eip155:${jc(o)}`;yield Bd(this,Ef,Sf).call(this,n,u,r);try{const i=yield this.connect({chainIds:a,forceRequest:t});return yield Bd(this,Ef,Cf).call(this,n,u,r),"eth_requestAccounts"===e.method?i.accounts:"wallet_requestPermissions"===e.method?Df({accounts:i.accounts,chainIds:uf(jd(this,mf)),invoker:Bf(Bd(this,Ef,kf).call(this))}):i}catch(e){throw yield Bd(this,Ef,If).call(this,n,u,r,e),e}}return function(e){return"wallet_switchEthereumChain"===e.method}(e)?(yield this.switchChain({chainId:e.params[0].chainId}),null):function(e){return"wallet_addEthereumChain"===e.method}(e)?(yield Bd(this,Ef,Mf).call(this,e.params[0]),null):function(e){return"eth_accounts"===e.method||"eth_coinbase"===e.method}(e)?"eth_coinbase"===e.method?null!=(t=jd(this,ff).selectedAccount)?t:null:jd(this,ff).accounts:function(e){return"eth_chainId"===e.method}(e)?jd(this,ff).selectedChainId:(Gd("Request not intercepted, forwarding to default handler",e),Promise.resolve())}))},Of=function(){jd(this,ff).accounts=[],jd(this,ff).selectedChainId=void 0},Mf=function(e){return Dd(this,null,(function*(){Gd("addEthereumChain called",{chainConfiguration:e});const t="wallet_addEthereumChain";if(!e)throw new Error("No chain configuration found.");const n=e.chainId||jd(this,ff).selectedChainId||"0x1",r=`eip155:${jc(n)}`,i=[e];yield Bd(this,Ef,Sf).call(this,t,r,i);try{null===(yield Bd(this,Ef,Tf).call(this,{scope:r,method:"wallet_addEthereumChain",params:i}))&&(yield Bd(this,Ef,Pf).call(this,n),Bd(this,Ef,Lf).call(this,n)),yield Bd(this,Ef,Cf).call(this,t,r,i)}catch(e){throw yield Bd(this,Ef,If).call(this,t,r,i,e),e}}))},Tf=function(e){return Dd(this,null,(function*(){Gd("direct request to metamask-provider called",e);const t=jd(this,df).invokeMethod({scope:e.scope,request:{method:e.method,params:e.params}});return"wallet_addEthereumChain"!==e.method&&"wallet_switchEthereumChain"!==e.method||jd(this,df).openSimpleDeeplinkIfNeeded(),t}))},Pf=function(e){return Dd(this,null,(function*(){try{yield jd(this,df).storage.adapter.set(lf,JSON.stringify(e))}catch(e){Gd("Error caching chainId",e)}}))},Nf=function(e){return Dd(this,null,(function*(){var t;Gd("event: wallet_sessionChanged",e),zd(this,mf,null!=(t=null==e?void 0:e.sessionScopes)?t:{});const n=uf(jd(this,mf));if(0===n.length)Bd(this,Ef,Ff).call(this);else{let e=[];e="connected"===jd(this,df).status?yield jd(this,df).invokeMethod({scope:`eip155:${jc(n[0])}`,request:{method:"eth_accounts",params:[]}}):(e=>{if(!e)return[];const t=[];for(const{accounts:n}of Object.values(e))if(n)for(const e of n){const{address:n,chainId:r}=$c(e);sf(r)&&of(n)&&t.push(n)}return Array.from(new Set(t))})(jd(this,mf));const t=yield Bd(this,Ef,Rf).call(this,n);Bd(this,Ef,jf).call(this,{chainId:t,accounts:e})}}))},Lf=function(e){var t,n;e!==jd(this,ff).selectedChainId&&(Gd("handler: chainChanged",{chainId:e}),jd(this,ff).selectedChainId=e,jd(this,ff).emit("chainChanged",e),null==(n=null==(t=jd(this,gf))?void 0:t.chainChanged)||n.call(t,e))},$f=function(e){var t,n;e.length===jd(this,ff).accounts.length&&e.every(((e,t)=>e===jd(this,ff).accounts[t]))||(Gd("handler: accountsChanged",e),jd(this,ff).accounts=e,jd(this,ff).emit("accountsChanged",e),null==(n=null==(t=jd(this,gf))?void 0:t.accountsChanged)||n.call(t,e))},jf=function({chainId:e,accounts:t}){var n,r,i,s,o,a,u;Gd("handler: connect",{chainId:e,accounts:t});const c={chainId:e,accounts:t};if("connected"===jd(this,yf))return Bd(this,Ef,Lf).call(this,e),void Bd(this,Ef,$f).call(this,t);jd(this,ff).selectedChainId=e,jd(this,ff).accounts=t,zd(this,yf,"connected"),jd(this,ff).emit("connect",c),null==(r=null==(n=jd(this,gf))?void 0:n.connect)||r.call(n,c),jd(this,ff).emit("chainChanged",e),null==(s=null==(i=jd(this,gf))?void 0:i.chainChanged)||s.call(i,e),jd(this,ff).emit("accountsChanged",t),null==(a=null==(o=jd(this,gf))?void 0:o.accountsChanged)||a.call(o,t),null==(u=jd(this,wf))||u.call(this);const l=e=>{Gd("core-event: accountsChanged",e),Bd(this,Ef,$f).call(this,e)},h=e=>{Gd("core-event: chainChanged",e.chainId),Bd(this,Ef,Pf).call(this,e.chainId).catch((e=>{Gd("Error caching chainId in notification handler",e)})),Bd(this,Ef,Lf).call(this,e.chainId)};jd(this,df).on("metamask_accountsChanged",l),jd(this,df).on("metamask_chainChanged",h),zd(this,wf,(()=>{jd(this,df).off("metamask_accountsChanged",l),jd(this,df).off("metamask_chainChanged",h)}))},Ff=function(){var e,t;"disconnected"!==jd(this,yf)&&(zd(this,yf,"disconnected"),Gd("handler: disconnect"),jd(this,ff).emit("disconnect"),null==(t=null==(e=jd(this,gf))?void 0:e.disconnect)||t.call(e),Bd(this,Ef,$f).call(this,[]))},zf=function(e){var t,n;"connecting"===jd(this,yf)&&(Gd("handler: display_uri",e),jd(this,ff).emit("display_uri",e),null==(n=null==(t=jd(this,gf))?void 0:t.displayUri)||n.call(t,e))};var Uf=class e{constructor({core:e,eventHandlers:t}){Fd(this,Ef),Fd(this,df),Fd(this,ff),Fd(this,pf),Fd(this,mf,{}),Fd(this,gf),Fd(this,vf),Fd(this,_f),Fd(this,wf),Fd(this,yf,"disconnected"),Fd(this,bf),zd(this,df,e),zd(this,ff,new nf(e,Bd(this,Ef,xf).bind(this))),zd(this,pf,new class{constructor(e){Fd(this,vd),Fd(this,dd),Fd(this,fd),Fd(this,pd,!1),Fd(this,md),Fd(this,gd),zd(this,dd,e)}announce(){return Dd(this,null,(function*(){try{if(jd(this,pd))return;if(jd(this,fd))return void Bd(this,vd,yd).call(this);jd(this,gd)||zd(this,gd,Bd(this,vd,_d).call(this).catch((e=>{Gd("EIP-6963 provider announcement failed",e)})).finally((()=>{zd(this,gd,void 0)}))),yield jd(this,gd)}catch(e){Gd("EIP-6963 provider announcement failed",e)}}))}}(jd(this,ff))),zd(this,gf,t),zd(this,vf,Bd(this,Ef,Nf).bind(this)),jd(this,df).on("wallet_sessionChanged",jd(this,vf)),zd(this,_f,Bd(this,Ef,zf).bind(this)),jd(this,df).on("display_uri",jd(this,_f)),Gd("Connect/EVM constructor completed")}static create(t){return Dd(this,null,(function*(){var n;const r=new e(t);let i;try{i=yield jd(r,df).provider.getSession()}catch(e){i={sessionScopes:{}}}return yield Bd(n=r,Ef,Nf).call(n,i),r}))}connect(){return Dd(this,arguments,(function*({account:e,forceRequest:t,chainIds:n=[cf]}={}){var r;if(Gd("request: connect",{account:e}),!n||0===n.length)throw new Error("chainIds must be an array of at least one chain ID");zd(this,bf,n[0]);const i=Array.from(new Set(null!=(r=n.concat(cf))?r:[cf])).map((e=>`eip155:${jc(e)}`)),s=e?i.map((t=>`${t}:${e}`)):[];zd(this,yf,"connecting");try{const e=new Promise((e=>{jd(this,ff).once("connect",(({chainId:t,accounts:n})=>{Gd("fulfilled-request: connect",{chainId:t,accounts:n}),e({accounts:n,chainId:t})}))}));return yield jd(this,df).connect(i,s,Wd,t),yield e}catch(e){throw zd(this,yf,"disconnected"),Gd("Error connecting to wallet",e),e}finally{zd(this,bf,void 0)}}))}connectAndSign(e){return Dd(this,arguments,(function*({message:e,chainIds:t}){var n,r;const{accounts:i,chainId:s}=yield this.connect({chainIds:null!=t?t:[cf]}),o=yield jd(this,ff).request({method:"personal_sign",params:[i[0],e]});return null==(r=null==(n=jd(this,gf))?void 0:n.connectAndSign)||r.call(n,{accounts:i,chainId:s,signature:o}),{accounts:i,chainId:s,signature:o}}))}connectWith(e){return Dd(this,arguments,(function*({method:e,params:t,chainIds:n,account:r,forceRequest:i}){var s,o;const{accounts:a,chainId:u}=yield this.connect({chainIds:null!=n?n:[cf],account:r,forceRequest:i}),c="function"==typeof t?t(a[0]):t,l=yield jd(this,ff).request({method:e,params:c});return null==(o=null==(s=jd(this,gf))?void 0:s.connectWith)||o.call(s,{accounts:a,chainId:u,result:l}),{accounts:a,chainId:u,result:l}}))}disconnect(){return Dd(this,null,(function*(){var e;Gd("request: disconnect");const t=jd(this,mf),n=Object.keys(t).filter((e=>{const{namespace:t}=rf(e);return"eip155"===t}));yield jd(this,df).disconnect(n),Bd(this,Ef,Ff).call(this),Bd(this,Ef,Of).call(this),null==(e=jd(this,wf))||e.call(this),zd(this,wf,void 0),Gd("fulfilled-request: disconnect")}))}switchChain(e){return Dd(this,arguments,(function*({chainId:e,chainConfiguration:t}){const n="wallet_switchEthereumChain",r=`eip155:${jc(e)}`,i=[{chainId:e}];if(this.selectedChainId===e)return Promise.resolve();if(uf(jd(this,mf)).includes(e)&&jd(this,df).transportType===ho.MWP)return yield Bd(this,Ef,Pf).call(this,e),Bd(this,Ef,Lf).call(this,e),Promise.resolve();yield Bd(this,Ef,Sf).call(this,n,r,i);try{const t=yield Bd(this,Ef,Tf).call(this,{scope:r,method:"wallet_switchEthereumChain",params:i});return yield Bd(this,Ef,Cf).call(this,n,r,i),null===t&&(yield Bd(this,Ef,Pf).call(this,e),Bd(this,Ef,Lf).call(this,e)),Promise.resolve()}catch(e){yield Bd(this,Ef,If).call(this,n,r,i,e);if(e.message.includes("Unrecognized chain ID")&&t)return Bd(this,Ef,Mf).call(this,t);throw e}}))}getProvider(){return jd(this,ff)}announceProvider(){return Dd(this,null,(function*(){yield jd(this,pf).announce()}))}getChainId(){return this.selectedChainId}getAccount(){return jd(this,ff).selectedAccount}get accounts(){return jd(this,ff).accounts}get selectedAccount(){return jd(this,ff).selectedAccount}get selectedChainId(){return jd(this,ff).selectedChainId}get status(){return jd(this,yf)}};function qf(e){return Dd(this,null,(function*(){var t,n,r;if(e.debug&&Hd(),Gd("Creating Metamask Connect/EVM with options:",e),!(null==(t=e.api)?void 0:t.supportedNetworks)||0===Object.keys(e.api.supportedNetworks).length)throw new Error("supportedNetworks is required and must contain at least one chain configuration");!function(e,t){const n=[];for(const[t,r]of Object.entries(e))try{new URL(r)}catch(e){n.push(`${t}: ${r}`)}if(n.length>0)throw new Error(`${t} contains invalid URLs:\n${n.join("\n")}`)}(e.api.supportedNetworks,"supportedNetworks");const i=Object.entries(e.api.supportedNetworks).reduce(((e,[t,n])=>(e[`eip155:${parseInt(t,16)}`]=n,e)),{});try{const t=yield _c(Ld(Nd({},e),{api:{supportedNetworks:i},analytics:Ld(Nd({},null!=(n=e.analytics)?n:{}),{integrationType:(null==(r=e.analytics)?void 0:r.integrationType)||"direct"}),versions:{"connect-evm":"2.1.0"}})),s="^1.1.0";"unknown"===s||""===s||Sd.satisfies(t.version,s)||console.warn(`@metamask/connect-evm expected @metamask/connect-multichain version ${s}, but got ${t.version}. This may lead to unexpected behavior.`);const o=yield Uf.create({core:t,eventHandlers:e.eventHandlers,supportedNetworks:e.api.supportedNetworks});return e.skipAutoAnnounce||o.announceProvider().catch((e=>{Gd("EIP-6963 provider announcement failed",e)})),o}catch(e){throw console.error("Error creating Metamask Connect/EVM",e),e}}))}async function Wf(e,t){const n={};e.rpc&&Object.entries(e.rpc).forEach((([e,t])=>{const r=`0x${Number(e).toString(16)}`;n[r]=t}));const r=await qf({dapp:{name:e.appName??"DODO",iconUrl:e.appLogoUrl},api:{supportedNetworks:n},mobile:{useDeeplink:!0}}),i=r.getProvider(),s=()=>t.disconnect(void 0),o=e=>t.message(e.type,e.data);i.removeListener("connect",t.connect),i.removeListener("disconnect",s),i.removeListener("accountsChanged",t.accountsChanged),i.removeListener("chainChanged",t.chainChanged),i.removeListener("message",o);try{i.on("connect",t.connect),i.on("disconnect",s),i.on("accountsChanged",t.accountsChanged),i.on("chainChanged",t.chainChanged),i.on("message",o)}catch(e){}const{accounts:a}=await r.connect();if(!a||0===a.length)throw new Error("MetaMask Connect: no accounts returned");return await f(i)}export{Wf as default};
|