@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.
Files changed (89) hide show
  1. package/dist/__tslib-6e4ae2f5.js +1 -0
  2. package/dist/{alchemy-provider-5870b6fa-7183581f.js → alchemy-provider-5870b6fa-bb821a34.js} +1 -1
  3. package/dist/{alchemy-websocket-provider-213da986-d5a91aac.js → alchemy-websocket-provider-213da986-702b5398.js} +1 -1
  4. package/dist/{blocto-0ec2fc36.js → blocto-c38e644a.js} +1 -1
  5. package/dist/browser-3f7e560e.js +1 -0
  6. package/dist/{ccip-d1141d3a.js → ccip-86a505f2.js} +1 -1
  7. package/dist/cjs/__tslib-44b18af7.cjs +1 -0
  8. package/dist/cjs/{alchemy-provider-5870b6fa-94b8a05d.cjs → alchemy-provider-5870b6fa-38f9ed80.cjs} +1 -1
  9. package/dist/cjs/{alchemy-websocket-provider-213da986-cb2dca69.cjs → alchemy-websocket-provider-213da986-fb48ef07.cjs} +1 -1
  10. package/dist/cjs/{blocto-c4470598.cjs → blocto-7eb7575b.cjs} +1 -1
  11. package/dist/cjs/browser-d0e333da.cjs +1 -0
  12. package/dist/cjs/{ccip-466d4e59.cjs → ccip-a63a44a2.cjs} +1 -1
  13. package/dist/cjs/{draggabilly-53856a31.cjs → draggabilly-76e13056.cjs} +1 -1
  14. package/dist/cjs/id-749531a6.cjs +1 -0
  15. package/dist/cjs/{index-76cccf0c.cjs → index-0029a709.cjs} +1 -1
  16. package/dist/cjs/index-10979fb2.cjs +1 -0
  17. package/dist/cjs/{index-86ef4f22.cjs → index-3617a04a.cjs} +1 -1
  18. package/dist/cjs/index-563a38d7.cjs +27 -0
  19. package/dist/cjs/{index-9d9946f3.cjs → index-56a82537.cjs} +7 -7
  20. package/dist/cjs/index-6c5027af.cjs +15 -0
  21. package/dist/cjs/index-7eb41eb1.cjs +2 -0
  22. package/dist/cjs/{index-c4c73f44.cjs → index-a19ffa92.cjs} +1 -1
  23. package/dist/cjs/{index-6aa1755b.cjs → index-aa28e9f9.cjs} +2 -2
  24. package/dist/cjs/index-b64e1d7e.cjs +1 -0
  25. package/dist/cjs/{index-9075d9c2.cjs → index-cc156a43.cjs} +1 -1
  26. package/dist/cjs/{index-56fff369.cjs → index-df00325f.cjs} +1 -1
  27. package/dist/cjs/{index-63b5eebb.cjs → index-e85aaa9d.cjs} +1 -1
  28. package/dist/cjs/index-ef8a01c5.cjs +16 -0
  29. package/dist/cjs/index.cjs +1 -1
  30. package/dist/cjs/index.es-f6621022.cjs +9 -0
  31. package/dist/cjs/{interface-d5ec613a.cjs → interface-d50ce16b.cjs} +1 -1
  32. package/dist/cjs/lib-typedarrays-82021648.cjs +1 -0
  33. package/dist/cjs/mm-install-modal_2.entry-4950a7e9.cjs +1 -0
  34. package/dist/cjs/{portis-9af3489b.cjs → portis-3a895975.cjs} +1 -1
  35. package/dist/cjs/rainbow-6579e86d.cjs +1 -0
  36. package/dist/cjs/sha224-ed46e71e.cjs +1 -0
  37. package/dist/cjs/{sha256-6785be1d.cjs → sha256-d1b2312d.cjs} +1 -1
  38. package/dist/cjs/{typed-data-a102eb38.cjs → typed-data-460b86be.cjs} +1 -1
  39. package/dist/cjs/uAuth-37ec9004.cjs +1 -0
  40. package/dist/cjs/{walletConnect-d4368503.cjs → walletConnect-333618c1.cjs} +1 -1
  41. package/dist/cjs/{walletLink-1b5e5056.cjs → walletLink-1bbb754c.cjs} +2 -2
  42. package/dist/{draggabilly-96bd4e8a.js → draggabilly-9c13a931.js} +1 -1
  43. package/dist/id-72e0c1a1.js +1 -0
  44. package/dist/index-06f6f79c.js +27 -0
  45. package/dist/{index-29d50f5e.js → index-2c7120ea.js} +1 -1
  46. package/dist/index-3354aa33.js +15 -0
  47. package/dist/{index-d9690f1f.js → index-352a03ce.js} +1 -1
  48. package/dist/{index-de489272.js → index-46da6d5f.js} +7 -7
  49. package/dist/{index-ec77233b.js → index-4b6b9842.js} +1 -1
  50. package/dist/{index-9a72391b.js → index-69adc195.js} +1 -1
  51. package/dist/index-754d059b.js +1 -0
  52. package/dist/index-7b0eeb5c.js +1 -0
  53. package/dist/index-a3d1a073.js +16 -0
  54. package/dist/{index-aa09ffe2.js → index-b0e82b69.js} +1 -1
  55. package/dist/{index-b27ec2be.js → index-badfa46e.js} +1 -1
  56. package/dist/{index-25f5dd77.js → index-e3d55f2e.js} +1 -1
  57. package/dist/index-fcb3d760.js +2 -0
  58. package/dist/index.es-2327b5db.js +9 -0
  59. package/dist/index.js +1 -1
  60. package/dist/{interface-501ba1ce.js → interface-367d293e.js} +1 -1
  61. package/dist/lib-typedarrays-3210a74e.js +1 -0
  62. package/dist/mm-install-modal_2.entry-e9e33358.js +1 -0
  63. package/dist/{portis-59e75b95.js → portis-0126b01f.js} +1 -1
  64. package/dist/rainbow-46822247.js +1 -0
  65. package/dist/sha224-58bed7be.js +1 -0
  66. package/dist/{sha256-cdb06d7c.js → sha256-ad86865d.js} +1 -1
  67. package/dist/{typed-data-d46cb643.js → typed-data-cc0c21ba.js} +1 -1
  68. package/dist/uAuth-e9b4faa5.js +1 -0
  69. package/dist/{walletConnect-23af88ec.js → walletConnect-a7ad9f23.js} +1 -1
  70. package/dist/{walletLink-782b101e.js → walletLink-a6e7bead.js} +2 -2
  71. package/package.json +2 -2
  72. package/dist/cjs/id-07cfd31e.cjs +0 -1
  73. package/dist/cjs/index-af8c9c8e.cjs +0 -15
  74. package/dist/cjs/index-b82ccec9.cjs +0 -9
  75. package/dist/cjs/index.es-d9e722ea.cjs +0 -9
  76. package/dist/cjs/lib-typedarrays-afe9c8e7.cjs +0 -1
  77. package/dist/cjs/rainbow-4b5d0839.cjs +0 -1
  78. package/dist/cjs/sha224-8f3f5508.cjs +0 -1
  79. package/dist/cjs/uAuth-22dae0a4.cjs +0 -1
  80. package/dist/cjs/v4-3e682452.cjs +0 -1
  81. package/dist/id-6dc2a6aa.js +0 -1
  82. package/dist/index-0534a22e.js +0 -15
  83. package/dist/index-66392fdc.js +0 -9
  84. package/dist/index.es-d60f6859.js +0 -9
  85. package/dist/lib-typedarrays-5ac4ff04.js +0 -1
  86. package/dist/rainbow-2c04e9df.js +0 -1
  87. package/dist/sha224-b20bdf3b.js +0 -1
  88. package/dist/uAuth-a93ad1ec.js +0 -1
  89. package/dist/v4-95658a31.js +0 -1
@@ -0,0 +1,16 @@
1
+ "use strict";var e=require("./index-56a82537.cjs"),t=require("buffer");require("@ethersproject/address"),require("@ethersproject/providers"),require("zustand"),require("@ethersproject/bytes"),require("@ethersproject/properties"),require("@ethersproject/abstract-signer"),require("@ethersproject/abstract-provider"),require("@ethersproject/contracts"),require("events"),require("@ethersproject/constants"),require("@ethersproject/transactions");var n,r,i={exports:{}};function s(){if(r)return n;r=1;var e=1e3,t=60*e,i=60*t,s=24*i,o=7*s,a=365.25*s;function u(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return n=function(n,r){r=r||{};var c=typeof n;if("string"===c&&n.length>0)return function(n){if((n=String(n)).length>100)return;var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!r)return;var u=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*s;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;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}}(n);if("number"===c&&isFinite(n))return r.long?function(n){var r=Math.abs(n);if(r>=s)return u(n,r,s,"day");if(r>=i)return u(n,r,i,"hour");if(r>=t)return u(n,r,t,"minute");if(r>=e)return u(n,r,e,"second");return n+" ms"}(n):function(n){var r=Math.abs(n);if(r>=s)return Math.round(n/s)+"d";if(r>=i)return Math.round(n/i)+"h";if(r>=t)return Math.round(n/t)+"m";if(r>=e)return Math.round(n/e)+"s";return n+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))}}var o=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=s(),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=o(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(i,i.exports);var a,u=i.exports,c={exports:{}};a=c,e.commonjsGlobal,a.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 l=e.getDefaultExportFromCjs(c.exports);class h 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 d(e){return"object"==typeof e&&null!==e}function f(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function p(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: \`${f(r)}\``}=e;return{value:r,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*m(e,t,n,r){(function(e){return d(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=p(i,t,n,r);e&&(yield e)}}function*g(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&&d(t.schema)&&d(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=g(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):d(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 v{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)=>m(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>m(i(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=E(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return y(e,this,t)}is(e){return b(e,this)}mask(e,t){return function(e,t,n){const r=E(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return E(e,this,t)}}const _="EXACT_OPTIONAL";class w extends v{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=_}static isExactOptional(e){return d(e)&&"brand"in e&&e.brand===_}}function y(e,t,n){const r=E(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function b(e,t){return!E(e,t)[0]}function E(e,t,n={}){const r=g(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(i[0]){return[new h(i[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function k(e,t){return new v({type:e,schema:null,validator:t})}function A(e){const t=e?Object.keys(e):[],n=k("never",(()=>!1));return new v({type:"object",schema:e??null,*entries(r){if(e&&d(r)){const i=new Set(Object.keys(r));for(const n of t){i.delete(n);const t=e[n];w.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=>d(e)||`Expected an object, but received: ${f(e)}`,coercer:e=>d(e)?{...e}:e})}function S(e){return new v({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function C(){return k("string",(e=>"string"==typeof e||`Expected a string, but received: ${f(e)}`))}function I(e){const t=e.map((e=>e.type)).join(" | ");return new v({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]=g(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: ${f(n)}`,...i]}})}function R(e,t){return x(e,"pattern",(n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`))}function x(e,t,n){return new v({...e,*refiner(r,i){yield*e.refiner(r,i);const s=m(n(r,i),i,e,r);for(const e of s)yield{...e,refinement:t}}})}function O(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}const M=(e,t)=>Object.hasOwnProperty.call(e,t);var T;!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"}(T=T||(T={}));const P=BigInt(2**32-1),N=BigInt(32);function L(e,t=!1){return t?{h:Number(e&P),l:Number(e>>N&P)}:{h:0|Number(e>>N&P),l:0|Number(e&P)}}function j(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}=L(e[i],t);[n[i],r[i]]=[s,o]}return[n,r]}const $=[],F=[],z=[],B=BigInt(0),D=BigInt(1),U=BigInt(2),q=BigInt(7),W=BigInt(256),Z=BigInt(113);for(let e=0,t=D,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],$.push(2*(5*r+n)),F.push((e+1)*(e+2)/2%64);let i=B;for(let e=0;e<7;e++)t=(t<<D^(t>>q)*Z)%W,t&U&&(i^=D<<(D<<BigInt(e))-D);z.push(i)}const[G,H]=j(z,!0),V=(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),J=(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 X extends e.Hash{constructor(t,n,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,e.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=e.u32(this.state)}keccak(){e.isLE||e.byteSwap32(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=V(s,o,1)^n[r],u=J(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=F[n],s=V(t,i,r),o=J(t,i,r),a=$[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]^=G[r],e[1]^=H[r]}n.fill(0)}(this.state32,this.rounds),e.isLE||e.byteSwap32(this.state32),this.posOut=0,this.pos=0}update(t){e.exists(this);const{blockLen:n,state:r}=this,i=(t=e.toBytes(t)).length;for(let e=0;e<i;){const s=Math.min(n-this.pos,i-e);for(let n=0;n<s;n++)r[this.pos++]^=t[e++];this.pos===n&&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(t){e.exists(this,!1),e.bytes(t),this.finish();const n=this.state,{blockLen:r}=this;for(let e=0,i=t.length;e<i;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,i-e);t.set(n.subarray(this.posOut,this.posOut+s),e),this.posOut+=s,e+=s}return t}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(t){return e.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(e.output(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}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 X(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 K=((t,n,r)=>e.wrapConstructor((()=>new X(n,t,r))))(1,136,32);var Y={exports:{}};!function(t,n){(function(){var r,i="Expected a function",s="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,u=32,c=64,l=128,h=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",u],["partialRight",c],["rearg",h]],v="[object Arguments]",_="[object Array]",w="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",k="[object GeneratorFunction]",A="[object Map]",S="[object Number]",C="[object Object]",I="[object Promise]",R="[object RegExp]",x="[object Set]",O="[object String]",M="[object Symbol]",T="[object WeakMap]",P="[object ArrayBuffer]",N="[object DataView]",L="[object Float32Array]",j="[object Float64Array]",$="[object Int8Array]",F="[object Int16Array]",z="[object Int32Array]",B="[object Uint8Array]",D="[object Uint8ClampedArray]",U="[object Uint16Array]",q="[object Uint32Array]",W=/\b__p \+= '';/g,Z=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,J=RegExp(H.source),X=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(re.source),se=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\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+"]",je="["+Ce+"]",$e="[^"+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="(?:"+je+"|"+$e+")",Ze="(?:"+Ue+"|"+$e+")",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+"?"+je+"+"+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[L]=at[j]=at[$]=at[F]=at[z]=at[B]=at[D]=at[U]=at[q]=!0,at[v]=at[_]=at[P]=at[w]=at[N]=at[y]=at[b]=at[E]=at[A]=at[S]=at[C]=at[R]=at[x]=at[O]=at[T]=!1;var ut={};ut[v]=ut[_]=ut[P]=ut[N]=ut[w]=ut[y]=ut[L]=ut[j]=ut[$]=ut[F]=ut[z]=ut[A]=ut[S]=ut[C]=ut[R]=ut[x]=ut[O]=ut[M]=ut[B]=ut[D]=ut[U]=ut[q]=!0,ut[b]=ut[E]=ut[T]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ht=parseInt,dt="object"==typeof e.commonjsGlobal&&e.commonjsGlobal&&e.commonjsGlobal.Object===Object&&e.commonjsGlobal,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=dt||ft||Function("return this")(),mt=n&&!n.nodeType&&n,gt=mt&&t&&!t.nodeType&&t,vt=gt&&gt.exports===mt,_t=vt&&dt.process,wt=function(){try{var e=gt&&gt.require&&gt.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?0: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 jt(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 $t(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){var r=n-1,i=e.length;for(;++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:p}function Gt(e){return function(t){return null==t?r:t[e]}}function Ht(e){return function(t){return null==e?r:e[t]}}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,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}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(se,""):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({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});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,i=0,s=[];++n<r;){var a=e[n];a!==t&&a!==o||(e[n]=o,s[i++]=n)}return s}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){var t=tt.lastIndex=0;for(;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--&&oe.test(e.charAt(t)););return t}var gn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var vn=function e(t){var n,oe=(t=null==t?pt:vn.defaults(pt.Object(),t,vn.pick(pt,st))).Array,ke=t.Date,Ae=t.Error,Se=t.Function,Ce=t.Math,Ie=t.Object,Re=t.RegExp,xe=t.String,Oe=t.TypeError,Me=oe.prototype,Te=Se.prototype,Pe=Ie.prototype,Ne=t["__core-js_shared__"],Le=Te.toString,je=Pe.hasOwnProperty,$e=0,Fe=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ze=Pe.toString,Be=Le.call(Ie),De=pt._,Ue=Re("^"+Le.call(je).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=vt?t.Buffer:r,We=t.Symbol,Ze=t.Uint8Array,Ge=qe?qe.allocUnsafe:r,He=cn(Ie.getPrototypeOf,Ie),Ve=Ie.create,Je=Pe.propertyIsEnumerable,Xe=Me.splice,Ke=We?We.isConcatSpreadable:r,Ye=We?We.iterator:r,tt=We?We.toStringTag:r,rt=function(){try{var e=ds(Ie,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,dt=ke&&ke.now!==pt.Date.now&&ke.now,ft=t.setTimeout!==pt.setTimeout&&t.setTimeout,mt=Ce.ceil,gt=Ce.floor,_t=Ie.getOwnPropertySymbols,wt=qe?qe.isBuffer:r,zt=t.isFinite,Ht=Me.join,_n=cn(Ie.keys,Ie),wn=Ce.max,yn=Ce.min,bn=ke.now,En=t.parseInt,kn=Ce.random,An=Me.reverse,Sn=ds(t,"DataView"),Cn=ds(t,"Map"),In=ds(t,"Promise"),Rn=ds(t,"Set"),xn=ds(t,"WeakMap"),On=ds(Ie,"create"),Mn=xn&&new xn,Tn={},Pn=Fs(Sn),Nn=Fs(Cn),Ln=Fs(In),jn=Fs(Rn),$n=Fs(xn),Fn=We?We.prototype:r,zn=Fn?Fn.valueOf:r,Bn=Fn?Fn.toString:r;function Dn(e){if(na(e)&&!Zo(e)&&!(e instanceof Zn)){if(e instanceof Wn)return e;if(je.call(e,"__wrapped__"))return zs(e)}return new Wn(e)}var Un=function(){function e(){}return function(t){if(!ta(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function qn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,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&&!je.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 t=e.length;return t?e[Jr(0,t-1)]:r}function Qn(e,t){return Ls(Oi(e),ur(t,0,e.length))}function er(e){return Ls(Oi(e))}function tr(e,t,n){(n!==r&&!Do(e[t],n)||n===r&&!(t in e))&&or(e,t,n)}function nr(e,t,n){var i=e[t];je.call(e,t)&&Do(i,n)&&(n!==r||t in e)||or(e,t,n)}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,t){for(var n=-1,i=t.length,s=oe(i),o=null==e;++n<i;)s[n]=o?r:Ia(e,t[n]);return s}function ur(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function cr(e,t,n,i,s,o){var a,u=1&t,c=2&t,l=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)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);t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Oi(e,a)}else{var d=ms(e),f=d==E||d==k;if(Jo(e))return Ai(e,u);if(d==C||d==v||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=e.constructor;switch(t){case P:return Si(e);case w:case y:return new r(+e);case N:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case j:case $:case F:case z:case B:case D:case U:case q:return Ci(e,n);case A:return new r;case S:case O:return new r(e);case R:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case x:return new r;case M:return i=e,zn?Ie(zn.call(i)):{}}var i}(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(r){a.add(cr(r,t,n,r,e,o))})):ra(e)&&e.forEach((function(r,i){a.set(i,cr(r,t,n,i,e,o))}));var m=h?r:(l?c?ss:is:c?Pa:Ta)(e);return Rt(m||e,(function(r,i){m&&(r=e[i=r]),nr(a,i,cr(r,t,n,i,e,o))})),a}function lr(e,t,n){var i=n.length;if(null==e)return!i;for(e=Ie(e);i--;){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function hr(e,t,n){if("function"!=typeof e)throw new Oe(i);return Ms((function(){e.apply(r,n)}),t)}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:K,evaluate:Y,interpolate:Q,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 t=this.__data__;if(On){var n=t[e];return n===s?r:n}return je.call(t,e)?t[e]:r},Gn.prototype.has=function(e){var t=this.__data__;return On?t[e]!==r:je.call(t,e)},Gn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=On&&t===r?s:t,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 t=this.__data__,n=rr(t,e);return n<0?r:t[n][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,s),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,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(u===r?a==a&&!ca(a):n(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,t){for(var n=0,i=(t=yi(t,e)).length;null!=e&&n<i;)e=e[$s(t[n++])];return n&&n==i?e:r}function Sr(e,t,n){var r=t(e);return Zo(e)?r:Lt(r,n(e))}function Cr(e){return null==e?e===r?"[object Undefined]":"[object Null]":tt&&tt in Ie(e)?function(e){var t=je.call(e,tt),n=e[tt];try{e[tt]=r;var i=!0}catch(e){}var s=ze.call(e);i&&(t?e[tt]=n:delete e[tt]);return s}(e):function(e){return ze.call(e)}(e)}function Ir(e,t){return e>t}function Rr(e,t){return null!=e&&je.call(e,t)}function xr(e,t){return null!=e&&t in Ie(e)}function Or(e,t,n){for(var i=n?Pt:Tt,s=e[0].length,o=e.length,a=o,u=oe(o),c=1/0,l=[];a--;){var h=e[a];a&&t&&(h=Nt(h,Yt(t))),c=yn(h.length,c),u[a]=!n&&(t||s>=120&&h.length>=120)?new Jn(a&&h):r}h=e[0];var d=-1,f=u[0];e:for(;++d<s&&l.length<c;){var p=h[d],m=t?t(p):p;if(p=n||0!==p?p:0,!(f?en(f,m):i(l,m,n))){for(a=o;--a;){var g=u[a];if(!(g?en(g,m):i(e[a],m,n)))continue e}f&&f.push(m),l.push(p)}}return l}function Mr(e,t,n){var i=null==(e=Rs(e,t=yi(t,e)))?e:e[$s(Xs(t))];return null==i?r:Ct(i,e,n)}function Tr(e){return na(e)&&Cr(e)==v}function Pr(e,t,n,i,s){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Zo(e),u=Zo(t),c=a?_:ms(e),l=u?_:ms(t),h=(c=c==v?C:c)==C,d=(l=l==v?C:l)==C,f=c==l;if(f&&Jo(e)){if(!Jo(t))return!1;a=!0,h=!1}if(f&&!h)return o||(o=new Xn),a||la(e)?ns(e,t,n,i,s,o):function(e,t,n,r,i,s,o){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!s(new Ze(e),new Ze(t)));case w:case y:case S:return Do(+e,+t);case b:return e.name==t.name&&e.message==t.message;case R:case O:return e==t+"";case A:var a=un;case x: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 M:if(zn)return zn.call(e)==zn.call(t)}return!1}(e,t,c,n,i,s,o);if(!(1&n)){var p=h&&je.call(e,"__wrapped__"),m=d&&je.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,E=m?t.value():t;return o||(o=new Xn),s(g,E,n,i,o)}}if(!f)return!1;return o||(o=new Xn),function(e,t,n,i,s,o){var a=1&n,u=is(e),c=u.length,l=is(t),h=l.length;if(c!=h&&!a)return!1;var d=c;for(;d--;){var f=u[d];if(!(a?f in t:je.call(t,f)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);var v=a;for(;++d<c;){var _=e[f=u[d]],w=t[f];if(i)var y=a?i(w,_,f,t,e,o):i(_,w,f,e,t,o);if(!(y===r?_===w||s(_,w,n,i,o):y)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){var b=e.constructor,E=t.constructor;b==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof E&&E instanceof E||(g=!1)}return o.delete(e),o.delete(t),g}(e,t,n,i,s,o)}(e,t,n,i,Pr,s))}function Nr(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Ie(e);s--;){var u=n[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var c=(u=n[s])[0],l=e[c],h=u[1];if(a&&u[2]){if(l===r&&!(c in e))return!1}else{var d=new Xn;if(i)var f=i(l,h,c,e,t,d);if(!(f===r?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 jr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Zo(e)?Ur(e[0],e[1]):Dr(e):fu(e)}function $r(e){if(!As(e))return _n(e);var t=[];for(var n in Ie(e))je.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&&je.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)?oe(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,t){return bs(e)&&Ss(t)?Cs($s(e),t):function(n){var i=Ia(n,e);return i===r&&i===t?Ra(n,e):Pr(t,i,3)}}function qr(e,t,n,i,s){e!==t&&wr(t,(function(o,a){if(s||(s=new Xn),ta(o))!function(e,t,n,i,s,o,a){var u=xs(e,n),c=xs(t,n),l=a.get(c);if(l)return void tr(e,n,l);var h=o?o(u,c,n+"",e,t,a):r,d=h===r;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,n,h)}(e,t,a,n,qr,i,s);else{var u=i?i(xs(e,a),o,a+"",e,t,s):r;u===r&&(u=o),tr(e,a,u)}}),Pa)}function Wr(e,t){var n=e.length;if(n)return ws(t+=t<0?n:0,n)?e[t]:r}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){var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;for(;++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>f)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,t,n,i){if(!ta(e))return e;for(var s=-1,o=(t=yi(t,e)).length,a=o-1,u=e;null!=u&&++s<o;){var c=$s(t[s]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=a){var h=u[c];(l=i?i(h,c,u):r)===r&&(l=ta(h)?h:ws(t[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=oe(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,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,c=ca(t),l=t===r;s<o;){var h=gt((s+o)/2),d=n(e[h]),f=d!==r,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<=t:d<t);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)?p:+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[$s(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()),jt(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=oe(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,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var u=i<o?t[i]:r;n(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]:js(wa(e))}var bi=Kr;function Ei(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:ii(e,t,n)}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,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=ca(e),a=t!==r,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!o&&e>t||o&&a&&c&&!u&&!l||i&&a&&c||!n&&c||!s)return 1;if(!i&&!o&&!l&&e<t||l&&n&&s&&!i&&!o||u&&n&&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=oe(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=oe(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=oe(r));++n<r;)t[n]=e[n];return t}function Mi(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var u=t[o],c=i?i(n[u],e[u],u,n,e):r;c===r&&(c=e[u]),s?or(n,u,c):nr(n,u,c)}return n}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(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&ys(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=Ie(t);++i<s;){var u=n[i];u&&e(t,u,i,o)}return t}))}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 ji(e){return function(t){var n=an(t=wa(t))?pn(t):r,i=n?n[0]:t.charAt(0),s=n?Ei(n,1).join(""):t.slice(1);return i[e]()+s}}function $i(e){return function(t){return jt(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(t,n,i){var s=Ie(t);if(!Ho(t)){var o=cs(n,3);t=Ta(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function Bi(e){return rs((function(t){var n=t.length,s=n,o=Wn.prototype.thru;for(e&&t.reverse();s--;){var a=t[s];if("function"!=typeof a)throw new Oe(i);if(o&&!u&&"wrapper"==as(a))var u=new Wn([],!0)}for(s=u?s:n;++s<n;){var c=as(a=t[s]),l="wrapper"==c?os(a):r;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,r=e[0];if(u&&1==e.length&&Zo(r))return u.plant(r).value();for(var i=0,s=n?t[i].apply(this,e):r;++i<n;)s=t[i].call(this,s);return s}}))}function Di(e,t,n,i,s,o,a,u,c,h){var d=t&l,f=1&t,p=2&t,m=24&t,g=512&t,v=p?r:Fi(e);return function l(){for(var _=arguments.length,w=oe(_),y=_;y--;)w[y]=arguments[y];if(m)var b=us(l),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,t,Di,l.placeholder,n,w,k,u,c,h-_)}var A=f?n:this,S=p?A[e]:e;return _=w.length,u?w=function(e,t){var n=e.length,i=yn(t.length,n),s=Oi(e);for(;i--;){var o=t[i];e[i]=ws(o,n)?s[o]:r}return e}(w,u):g&&_>1&&w.reverse(),d&&c<_&&(w.length=c),this&&this!==pt&&this instanceof l&&(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,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=li(n),i=li(i)):(n=ci(n),i=ci(i)),s=e(n,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,t){var n=(t=t===r?" ":li(t)).length;if(n<2)return n?Xr(t,e):t;var i=Xr(t,mt(e/fn(t)));return an(t)?Ei(pn(i),0,e).join(""):i.slice(0,e)}function Gi(e){return function(t,n,i){return i&&"number"!=typeof i&&ys(t,n,i)&&(n=i=r),t=pa(t),n===r?(n=t,t=0):n=pa(n),function(e,t,n,r){for(var i=-1,s=wn(mt((t-e)/(n||1)),0),o=oe(s);s--;)o[r?s:++i]=e,e+=n;return o}(t,n,i=i===r?t<n?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,t,n,i,s,o,a,l,h,d){var f=8&t;t|=f?u:c,4&(t&=~(f?c:u))||(t&=-4);var p=[e,t,s,f?o:r,f?a:r,f?r:o,f?r:a,l,h,d],m=n.apply(r,p);return Es(e)&&Os(m,p),m.placeholder=i,Ps(m,e,t)}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]==d?function(e){return new Rn(e)}:cu;function Ki(e){return function(t){var n=ms(t);return n==A?un(t):n==x?dn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,s,d,f,p,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Oe(i);var v=s?s.length:0;if(v||(t&=-97,s=d=r),p=p===r?p:wn(ma(p),0),m=m===r?m:ma(m),v-=d?d.length:0,t&c){var _=s,w=d;s=d=r}var y=g?r:os(e),b=[e,t,n,s,d,_,w,f,p,m];if(y&&function(e,t){var n=e[1],r=t[1],i=n|r,s=i<131,a=r==l&&8==n||r==l&&n==h&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ri(c,u,t[4]):u,e[4]=c?ln(e[3],o):t[4]}(u=t[5])&&(c=e[5],e[5]=c?xi(c,u,t[6]):u,e[6]=c?ln(e[5],o):t[6]);(u=t[7])&&(e[7]=u);r&l&&(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]=i}(b,y),e=b[0],t=b[1],n=b[2],s=b[3],d=b[4],!(m=b[9]=b[9]===r?g?0:e.length:wn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==a?function(e,t,n){var i=Fi(e);return function s(){for(var o=arguments.length,a=oe(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)<n?Vi(e,t,Di,s.placeholder,r,a,l,r,r,n-o):Ct(this&&this!==pt&&this instanceof s?i:e,this,a)}}(e,t,m):t!=u&&33!=t||d.length?Di.apply(r,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=oe(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,t,n,s);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,t,n);return Ps((y?ti:Os)(E,b),e,t)}function Qi(e,t,n,i){return e===r||Do(e,Pe[n])&&!je.call(i,n)?t:e}function es(e,t,n,i,s,o){return ta(e)&&ta(t)&&(o.set(t,e),qr(e,t,r,es,o),o.delete(t)),e}function ts(e){return sa(e)?r:e}function ns(e,t,n,i,s,o){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=o.get(e),h=o.get(t);if(l&&h)return l==t&&h==e;var d=-1,f=!0,p=2&n?new Jn:r;for(o.set(e,t),o.set(t,e);++d<u;){var m=e[d],g=t[d];if(i)var v=a?i(g,m,d,t,e,o):i(m,g,d,e,t,o);if(v!==r){if(v)continue;f=!1;break}if(p){if(!Ft(t,(function(e,t){if(!en(p,t)&&(m===e||s(m,e,n,i,o)))return p.push(t)}))){f=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function rs(e){return Ts(Is(e,r,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=je.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(je.call(Dn,"placeholder")?Dn:e).placeholder}function cs(){var e=Dn.iteratee||su;return e=e===su?jr: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,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Lr(n)?n:r}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=$s(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?f: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))||(te.test(e)||!ee.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)))!=N||Cn&&ms(new Cn)!=A||In&&ms(In.resolve())!=I||Rn&&ms(new Rn)!=x||xn&&ms(new xn)!=T)&&(ms=function(e){var t=Cr(e),n=t==C?e.constructor:r,i=n?Fs(n):"";if(i)switch(i){case Pn:return N;case Nn:return A;case Ln:return I;case jn:return x;case $n:return T}return t});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,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Ie(n)))}}function Is(e,t,n){return t=wn(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=wn(r.length-t,0),o=oe(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=oe(t+1);++i<t;)a[i]=r[i];return a[t]=n(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(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Rt(g,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Ns(e){var t=0,n=0;return function(){var i=bn(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ls(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=Jr(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var js=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(ne,(function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)})),t}));function $s(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,t){var n=Xs(t);return Vo(n)&&(n=r),Vo(e)?dr(e,_r(t,1,Vo,!0),cs(n,2)):[]})),Us=Kr((function(e,t){var n=Xs(t);return Vo(n)&&(n=r),Vo(e)?dr(e,_r(t,1,Vo,!0),r,n):[]}));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,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=ma(n),s=n<0?wn(i+s,0):yn(s,i-1)),Dt(e,cs(t,3),s,!0)}function Zs(e){return(null==e?0:e.length)?_r(e,1):[]}function Gs(e){return e&&e.length?e[0]:r}var Hs=Kr((function(e){var t=Nt(e,_i);return t.length&&t[0]===e[0]?Or(t):[]})),Vs=Kr((function(e){var t=Xs(e),n=Nt(e,_i);return t===Xs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Or(n,cs(t,2)):[]})),Js=Kr((function(e){var t=Xs(e),n=Nt(e,_i);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Or(n,r,t):[]}));function Xs(e){var t=null==e?0:e.length;return t?e[t-1]:r}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 t=Xs(e);return Vo(t)&&(t=r),hi(_r(e,1,Vo,!0),cs(t,2))})),ro=Kr((function(e){var t=Xs(e);return t="function"==typeof t?t:r,hi(_r(e,1,Vo,!0),r,t)}));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,t){if(!e||!e.length)return[];var n=io(e);return null==t?n:Nt(n,(function(e){return Ct(t,r,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 t=Xs(e);return Vo(t)&&(t=r),gi(Mt(e,Vo),cs(t,2))})),co=Kr((function(e){var t=Xs(e);return t="function"==typeof t?t:r,gi(Mt(e,Vo),r,t)})),lo=Kr(io);var ho=Kr((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,so(e,n)}));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 t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Zn&&ws(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:po,args:[s],thisArg:r}),new Wn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)}));var go=Ti((function(e,t,n){je.call(e,n)?++e[n]:or(e,n,1)}));var 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){je.call(e,n)?e[n].push(t):or(e,n,[t])}));var Eo=Kr((function(e,t,n){var r=-1,i="function"==typeof t,s=Ho(e)?oe(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[[],[]]}));var 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,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Yi(e,l,r,r,r,r,t)}function xo(e,t){var n;if("function"!=typeof t)throw new Oe(i);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Oo=Kr((function(e,t,n){var r=1;if(n.length){var i=ln(n,us(Oo));r|=u}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|=u}return Yi(t,r,e,n,i)}));function To(e,t,n){var s,o,a,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Oe(i);function m(t){var n=s,i=o;return s=o=r,h=t,u=e.apply(i,n)}function g(e){var n=e-l;return l===r||n>=t||n<0||f&&e-h>=a}function v(){var e=Io();if(g(e))return _(e);c=Ms(v,function(e){var n=t-(e-l);return f?yn(n,a-(e-h)):n}(e))}function _(e){return c=r,p&&s?m(e):(s=o=r,u)}function w(){var e=Io(),n=g(e);if(s=arguments,o=this,l=e,n){if(c===r)return function(e){return h=e,c=Ms(v,t),d?m(e):u}(l);if(f)return ki(c),c=Ms(v,t),m(l)}return c===r&&(c=Ms(v,t)),u}return t=va(t)||0,ta(n)&&(d=!!n.leading,a=(f="maxWait"in n)?wn(va(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==r&&ki(c),h=0,s=l=o=c=r},w.flush=function(){return c===r?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(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Lo.Cache||Vn),n}function jo(e){if("function"!=typeof e)throw new Oe(i);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 $o=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,t){var n=ln(t,us(Fo));return Yi(e,u,r,t,n)})),zo=Kr((function(e,t){var n=ln(t,us(zo));return Yi(e,c,r,t,n)})),Bo=rs((function(e,t){return Yi(e,h,r,r,r,t)}));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)&&je.call(e,"callee")&&!Je.call(e,"callee")},Zo=oe.isArray,Go=yt?Yt(yt):function(e){return na(e)&&Cr(e)==P};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)==y};function Ko(e){if(!na(e))return!1;var t=Cr(e);return t==b||"[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==E||t==k||"[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<=f}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)==A};function ia(e){return"number"==typeof e||na(e)&&Cr(e)==S}function sa(e){if(!na(e)||Cr(e)!=C)return!1;var t=He(e);if(null===t)return!0;var n=je.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)==R};var aa=At?Yt(At):function(e){return na(e)&&ms(e)==x};function ua(e){return"string"==typeof e||!Zo(e)&&na(e)&&Cr(e)==O}function ca(e){return"symbol"==typeof e||na(e)&&Cr(e)==M}var la=St?Yt(St):function(e){return na(e)&&ea(e.length)&&!!at[Cr(e)]};var 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==A?un:t==x?hn:Da)(e)}function pa(e){return e?(e=va(e))===d||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,m):0}function va(e){if("number"==typeof e)return e;if(ca(e))return p;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)?p:+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)je.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);var Sa=Kr((function(e,t){e=Ie(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&ys(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Pa(o),u=-1,c=a.length;++u<c;){var l=a[u],h=e[l];(h===r||Do(h,Pe[l])&&!je.call(e,l))&&(e[l]=o[l])}return e})),Ca=Kr((function(e){return e.push(r,es),Ct(La,r,e)}));function Ia(e,t,n){var i=null==e?r:Ar(e,t);return i===r?n: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)),je.call(e,t)?e[t].push(n):e[t]=[n]}),cs),Ma=Kr(Mr);function Ta(e){return Ho(e)?Kn(e):$r(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)})),ja=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}));var $a=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=$i((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=$i((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ga=$i((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ha=ji("toLowerCase");var Va=$i((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ja=$i((function(e,t,n){return e+(n?" ":"")+Ka(t)}));var Xa=$i((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ka=ji("toUpperCase");function Ya(e,t,n){return e=wa(e),(t=n?r:t)===r?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Qa=Kr((function(e,t){try{return Ct(e,r,t)}catch(e){return Ko(e)?e:new Ae(e)}})),eu=rs((function(e,t){return Rt(t,(function(t){t=$s(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 jr("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($s(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=qi((function(e,t){return e+t}),0),wu=Ji("ceil"),yu=qi((function(e,t){return e/t}),1),bu=Ji("floor");var Eu,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(i);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,t,n){t=(n?ys(e,t,n):t===r)?1:wn(ma(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,a=oe(mt(i/t));s<i;)a[o++]=ii(e,s,s+=t);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=oe(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,n=cs();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Oe(i);return[n(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(t,n,i){var s=Yi(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},Dn.curryRight=function e(t,n,i){var s=Yi(t,a,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},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,t,n){var i=null==e?0:e.length;return i?ii(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},Dn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?ii(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},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,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&ys(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=ma(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:ma(i))<0&&(i+=s),i=n>i?0:ga(i);n<i;)e[n++]=t;return e}(e,t,n,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),d)},Dn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),_r(Ao(e,t),n)},Dn.flatten=Zs,Dn.flattenDeep=function(e){return(null==e?0:e.length)?_r(e,d):[]},Dn.flattenDepth=function(e,t){return(null==e?0:e.length)?_r(e,t=t===r?1:ma(t)):[]},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?0: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=jo,Dn.nthArg=function(e){return e=ma(e),Kr((function(t){return Wr(t,e)}))},Dn.omit=ja,Dn.omitBy=function(e,t){return Fa(e,jo(cs(t)))},Dn.once=function(e){return xo(2,e)},Dn.orderBy=function(e,t,n,i){return null==e?[]:(Zo(t)||(t=null==t?[]:[t]),Zo(n=i?r:n)||(n=null==n?[]:[n]),Zr(e,t,n))},Dn.over=lu,Dn.overArgs=$o,Dn.overEvery=hu,Dn.overSome=du,Dn.partial=Fo,Dn.partialRight=zo,Dn.partition=So,Dn.pick=$a,Dn.pickBy=Fa,Dn.property=fu,Dn.propertyOf=function(e){return function(t){return null==e?r:Ar(e,t)}},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,t,n){return e&&e.length&&t&&t.length?Hr(e,t,r,n):e},Dn.pullAt=Qs,Dn.range=pu,Dn.rangeRight=mu,Dn.rearg=Bo,Dn.reject=function(e,t){return(Zo(e)?Mt:vr)(e,jo(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,t){if("function"!=typeof e)throw new Oe(i);return Kr(e,t=t===r?t:ma(t))},Dn.reverse=eo,Dn.sampleSize=function(e,t,n){return t=(n?ys(e,t,n):t===r)?1:ma(t),(Zo(e)?Qn:Qr)(e,t)},Dn.set=function(e,t,n){return null==e?e:ei(e,t,n)},Dn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ei(e,t,n,i)},Dn.shuffle=function(e){return(Zo(e)?er:ri)(e)},Dn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ys(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),ii(e,t,n)):[]},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,t,n){return n&&"number"!=typeof n&&ys(e,t,n)&&(t=n=r),(n=n===r?m:n>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=li(t))&&an(e)?Ei(pn(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new Oe(i);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,t,n){return e&&e.length?ii(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},Dn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?ii(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,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,n){var r=!0,s=!0;if("function"!=typeof e)throw new Oe(i);return ta(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),To(e,t,{leading:r,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,$s):ca(e)?[e]:Oi(js(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,t){return t="function"==typeof t?t:r,e&&e.length?hi(e,r,t):[]},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,t,n,i){return i="function"==typeof i?i:r,null==e?e:fi(e,t,wi(n),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=_u,Dn.attempt=Qa,Dn.camelCase=Ua,Dn.capitalize=qa,Dn.ceil=wu,Dn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=va(n))==n?n:0),t!==r&&(t=(t=va(t))==t?t:0),ur(va(e),t,n)},Dn.clone=function(e){return cr(e,4)},Dn.cloneDeep=function(e){return cr(e,5)},Dn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:r)},Dn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:r)},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=yu,Dn.endsWith=function(e,t,n){e=wa(e),t=li(t);var i=e.length,s=n=n===r?i:ur(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},Dn.eq=Do,Dn.escape=function(e){return(e=wa(e))&&X.test(e)?e.replace(V,sn):e},Dn.escapeRegExp=function(e){return(e=wa(e))&&ie.test(e)?e.replace(re,"\\$&"):e},Dn.every=function(e,t,n){var i=Zo(e)?Ot:mr;return n&&ys(e,t,n)&&(t=r),i(e,cs(t,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=bu,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,t,n){return t=pa(t),n===r?(n=t,t=0):n=pa(n),function(e,t,n){return e>=yn(t,n)&&e<wn(t,n)}(e=va(e),t,n)},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)==w},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==A||t==x)return!e.size;if(As(e))return!$r(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return Pr(e,t)},Dn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Pr(e,t,r,n):!!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,t,n){return n="function"==typeof n?n:r,Nr(e,t,hs(t),n)},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<=f},Dn.isSet=aa,Dn.isString=ua,Dn.isSymbol=ca,Dn.isTypedArray=la,Dn.isUndefined=function(e){return e===r},Dn.isWeakMap=function(e){return na(e)&&ms(e)==T},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,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=ma(n))<0?wn(i+s,0):yn(s,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,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):r},Dn.maxBy=function(e,t){return e&&e.length?gr(e,cs(t,2),Ir):r},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):r},Dn.minBy=function(e,t){return e&&e.length?gr(e,cs(t,2),zr):r},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,t){return e&&e.length?Wr(e,ma(t)):r},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(se,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ys(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=pa(e),t===r?(t=e,e=0):t=pa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=kn();return yn(e+s*(t-e+lt("1e-"+((s+"").length-1))),t)}return Jr(e,t)},Dn.reduce=function(e,t,n){var r=Zo(e)?jt:Vt,i=arguments.length<3;return r(e,cs(t,4),n,i,fr)},Dn.reduceRight=function(e,t,n){var r=Zo(e)?$t:Vt,i=arguments.length<3;return r(e,cs(t,4),n,i,pr)},Dn.repeat=function(e,t,n){return t=(n?ys(e,t,n):t===r)?1:ma(t),Xr(wa(e),t)},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,t,n){var i=-1,s=(t=yi(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[$s(t[i])];o===r&&(i=s,o=n),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==A||t==x?e.size:$r(e).length},Dn.snakeCase=Va,Dn.some=function(e,t,n){var i=Zo(e)?Ft:si;return n&&ys(e,t,n)&&(t=r),i(e,cs(t,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?0: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,t,n){var i=Dn.templateSettings;n&&ys(e,t,n)&&(t=r),e=wa(e),t=Ea({},t,i,Qi);var s,o,a=Ea({},t.imports,i.imports,Qi),u=Ta(a),c=Qt(a,u),l=0,h=t.interpolate||be,d="__p += '",f=Re((t.escape||be).source+"|"+h.source+"|"+(h===Q?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(je.call(t,"sourceURL")?(t.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=je.call(t,"variable")&&t.variable;if(m){if(he.test(m))throw new Ae("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(W,""):d).replace(Z,"$1").replace(G,"$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(r,c)}));if(g.source=d,Ko(g))throw g;return g},Dn.times=function(e,t){if((e=ma(e))<1||e>f)return[];var n=m,r=yn(e,m);t=cs(t),e-=m;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,f):0===e?e:0},Dn.toString=wa,Dn.toUpper=function(e){return wa(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=wa(e))&&(n||t===r))return Kt(e);if(!e||!(t=li(t)))return e;var i=pn(e),s=pn(t);return Ei(i,tn(i,s),nn(i,s)+1).join("")},Dn.trimEnd=function(e,t,n){if((e=wa(e))&&(n||t===r))return e.slice(0,mn(e)+1);if(!e||!(t=li(t)))return e;var i=pn(e);return Ei(i,0,nn(i,pn(t))+1).join("")},Dn.trimStart=function(e,t,n){if((e=wa(e))&&(n||t===r))return e.replace(se,"");if(!e||!(t=li(t)))return e;var i=pn(e);return Ei(i,tn(i,pn(t))).join("")},Dn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var s="separator"in t?t.separator:s;n="length"in t?ma(t.length):n,i="omission"in t?li(t.omission):i}var o=(e=wa(e)).length;if(an(e)){var a=pn(e);o=a.length}if(n>=o)return e;var u=n-fn(i);if(u<1)return i;var c=a?Ei(a,0,u).join(""):e.slice(0,u);if(s===r)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===r?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))&&J.test(e)?e.replace(H,gn):e},Dn.uniqueId=function(e){var t=++$e;return wa(e)+t},Dn.upperCase=Xa,Dn.upperFirst=Ka,Dn.each=wo,Dn.eachRight=yo,Dn.first=Gs,uu(Dn,(Eu={},br(Dn,(function(e,t){je.call(Dn.prototype,t)||(Eu[t]=e)})),Eu),{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,t){Zn.prototype[e]=function(n){n=n===r?1:wn(ma(n),0);var i=this.__filtered__&&!t?new Zn(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,m),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(jo(cs(e)))},Zn.prototype.slice=function(e,t){e=ma(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Zn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ma(t))<0?n.dropRight(-t):n.take(t-e)),n)},Zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Zn.prototype.toArray=function(){return this.take(m)},br(Zn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=Dn[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(Dn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,u=t instanceof Zn,c=a[0],l=u||Zo(t),h=function(e){var t=s.apply(Dn,Lt([e],a));return i&&d?t[0]:t};l&&n&&"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){t=m?t:new Zn(this);var g=e.apply(t,a);return g.__actions__.push({func:po,args:[h],thisArg:r}),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+"";je.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[Di(r,2).name]=[{name:"wrapper",func:r}],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){var r=-1,i=n.length;for(;++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__===r&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof qn;){var i=zs(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Zn){var t=e;return this.__actions__.length&&(t=new Zn(this)),(t=t.reverse()).__actions__.push({func:po,args:[eo],thisArg:r}),new Wn(t,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.commonjsGlobal)}(Y,Y.exports);var Q=Y.exports;function ee(e,t){return k(e,(e=>"string"==typeof e&&t.test(e)))}const te=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,ne=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u;var re;function ie(e){const t=te.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}function se(e){const t=ne.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}}}ee("CaipChainId",te),ee("CaipNamespace",/^[-a-z0-9]{3,8}$/u),ee("CaipReference",/^[-_a-zA-Z0-9]{1,32}$/u),ee("CaipAccountId",ne),ee("CaipAccountAddress",/^[-.%a-zA-Z0-9]{1,128}$/u),ee("CaipAssetNamespace",/^[-a-z0-9]{3,8}$/u),ee("CaipAssetReference",/^[-.%a-zA-Z0-9]{1,128}$/u),ee("CaipTokenId",/^[-.%a-zA-Z0-9]{1,78}$/u),ee("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),ee("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),ee("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"}(re=re||(re={}));const oe=e=>A(e);function ae({path:e,branch:t}){const n=e[e.length-1];return M(t[t.length-2],n)}function ue(e){return new v({...e,type:`optional ${e.type}`,validator:(t,n)=>!ae(n)||e.validator(t,n),refiner:(t,n)=>!ae(n)||e.refiner(t,n)})}function ce(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(!ce(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]||!ce(n[e][1])){t=!1;break}return t}return!1}const le=k("JSON",(e=>ce(e))),he=(de=le,fe=x(k("any",(()=>!0)),"JSON",(e=>b(e,le))),pe=e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))),new v({...de,coercer:(e,t)=>b(e,fe)?de.coercer(pe(e,t),t):de.coercer(e,t)}));var de,fe,pe;function me(e){try{return function(e){y(e,he)}(e),!0}catch{return!1}}const ge=function(e){const t=f(e),n=typeof e;return new v({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${f(n)}`})}("2.0"),ve=function(e){return new v({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}(I([k("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${f(e)}`)),C()])),_e=oe({code:k("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${f(e)}`)),message:C(),data:ue(he),stack:ue(C())}),we=I([(be=C(),Ee=he,new v({type:"record",schema:null,*entries(e){if(d(e))for(const t in e){const n=e[t];yield[t,t,be],yield[t,n,Ee]}},validator:e=>d(e)||`Expected an object, but received: ${f(e)}`})),(ye=he,new v({type:"array",schema:ye,*entries(e){if(ye&&Array.isArray(e))for(const[t,n]of e.entries())yield[t,n,ye]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${f(e)}`}))]);var ye,be,Ee;oe({id:ve,jsonrpc:ge,method:C(),params:ue(we)}),oe({jsonrpc:ge,method:C(),params:ue(we)}),A({id:ve,jsonrpc:ge,result:S(k("unknown",(()=>!0))),error:S(_e)});function ke({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) */I([oe({id:ve,jsonrpc:ge,result:he}),oe({id:ve,jsonrpc:ge,error:_e})]);function Ae(e){let t=e.length;for(;--t>=0;)e[t]=0}const Se=256,Ce=286,Ie=30,Re=15,xe=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]),Oe=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]),Me=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Te=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Pe=new Array(576);Ae(Pe);const Ne=new Array(60);Ae(Ne);const Le=new Array(512);Ae(Le);const je=new Array(256);Ae(je);const $e=new Array(29);Ae($e);const Fe=new Array(Ie);function ze(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 Be,De,Ue;function qe(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}Ae(Fe);const We=e=>e<256?Le[e]:Le[256+(e>>>7)],Ze=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Ge=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,Ze(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)},He=(e,t,n)=>{Ge(e,n[2*t],n[2*t+1])},Ve=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},Je=(e,t,n)=>{const r=new Array(16);let i,s,o=0;for(i=1;i<=Re;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]=Ve(r[t]++,t))}},Xe=e=>{let t;for(t=0;t<Ce;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Ie;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},Ke=e=>{e.bi_valid>8?Ze(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ye=(e,t,n,r)=>{const i=2*t,s=2*n;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]},Qe=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Ye(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Ye(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},et=(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?He(e,i,t):(s=je[i],He(e,s+Se+1,t),o=xe[s],0!==o&&(i-=$e[s],Ge(e,i,o)),r--,s=We(r),He(e,s,n),o=Oe[s],0!==o&&(r-=Fe[s],Ge(e,r,o)))}while(a<e.sym_next);He(e,256,t)},tt=(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--)Qe(e,n,o);u=s;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Qe(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++,Qe(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<=Re;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),Je(n,c,e.bl_count)},nt=(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))},rt=(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{He(e,i,e.bl_tree)}while(0!=--a);else 0!==i?(i!==s&&(He(e,i,e.bl_tree),a--),He(e,16,e.bl_tree),Ge(e,a-3,2)):a<=10?(He(e,17,e.bl_tree),Ge(e,a-3,3)):(He(e,18,e.bl_tree),Ge(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 it=!1;const st=(e,t,n,r)=>{Ge(e,0+(r?1:0),3),Ke(e),Ze(e,n),Ze(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var ot=(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<Se;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),tt(e,e.l_desc),tt(e,e.d_desc),o=(e=>{let t;for(nt(e,e.dyn_ltree,e.l_desc.max_code),nt(e,e.dyn_dtree,e.d_desc.max_code),tt(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Te[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?st(e,t,n,r):4===e.strategy||s===i?(Ge(e,2+(r?1:0),3),et(e,Pe,Ne)):(Ge(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(Ge(e,t-257,5),Ge(e,n-1,5),Ge(e,r-4,4),i=0;i<r;i++)Ge(e,e.bl_tree[2*Te[i]+1],3);rt(e,e.dyn_ltree,t-1),rt(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),et(e,e.dyn_ltree,e.dyn_dtree)),Xe(e),r&&Ke(e)},at={_tr_init:e=>{it||((()=>{let e,t,n,r,i;const s=new Array(16);for(n=0,r=0;r<28;r++)for($e[r]=n,e=0;e<1<<xe[r];e++)je[n++]=r;for(je[n-1]=r,i=0,r=0;r<16;r++)for(Fe[r]=i,e=0;e<1<<Oe[r];e++)Le[i++]=r;for(i>>=7;r<Ie;r++)for(Fe[r]=i<<7,e=0;e<1<<Oe[r]-7;e++)Le[256+i++]=r;for(t=0;t<=Re;t++)s[t]=0;for(e=0;e<=143;)Pe[2*e+1]=8,e++,s[8]++;for(;e<=255;)Pe[2*e+1]=9,e++,s[9]++;for(;e<=279;)Pe[2*e+1]=7,e++,s[7]++;for(;e<=287;)Pe[2*e+1]=8,e++,s[8]++;for(Je(Pe,287,s),e=0;e<Ie;e++)Ne[2*e+1]=5,Ne[2*e]=Ve(e,5);Be=new ze(Pe,xe,257,Ce,Re),De=new ze(Ne,Oe,0,Ie,Re),Ue=new ze(new Array(0),Me,0,19,7)})(),it=!0),e.l_desc=new qe(e.dyn_ltree,Be),e.d_desc=new qe(e.dyn_dtree,De),e.bl_desc=new qe(e.bl_tree,Ue),e.bi_buf=0,e.bi_valid=0,Xe(e)},_tr_stored_block:st,_tr_flush_block:ot,_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*(je[n]+Se+1)]++,e.dyn_dtree[2*We(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{Ge(e,2,3),He(e,256,Pe),(e=>{16===e.bi_valid?(Ze(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 ut=(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 ct=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 lt=(e,t,n,r)=>{const i=ct,s=r+n;e^=-1;for(let n=r;n<s;n++)e=e>>>8^i[255&(e^t[n])];return-1^e},ht={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"},dt={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:ft,_tr_stored_block:pt,_tr_flush_block:mt,_tr_tally:gt,_tr_align:vt}=at,{Z_NO_FLUSH:_t,Z_PARTIAL_FLUSH:wt,Z_FULL_FLUSH:yt,Z_FINISH:bt,Z_BLOCK:Et,Z_OK:kt,Z_STREAM_END:At,Z_STREAM_ERROR:St,Z_DATA_ERROR:Ct,Z_BUF_ERROR:It,Z_DEFAULT_COMPRESSION:Rt,Z_FILTERED:xt,Z_HUFFMAN_ONLY:Ot,Z_RLE:Mt,Z_FIXED:Tt,Z_DEFAULT_STRATEGY:Pt,Z_UNKNOWN:Nt,Z_DEFLATED:Lt}=dt,jt=258,$t=262,Ft=42,zt=113,Bt=666,Dt=(e,t)=>(e.msg=ht[t],t),Ut=e=>2*e-(e>4?9:0),qt=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Wt=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 Zt=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Gt=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))},Ht=(e,t)=>{mt(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Gt(e.strm)},Vt=(e,t)=>{e.pending_buf[e.pending++]=t},Jt=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Xt=(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=ut(e.adler,t,i,n):2===e.state.wrap&&(e.adler=lt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Kt=(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-$t?e.strstart-(e.w_size-$t):0,c=e.window,l=e.w_mask,h=e.prev,d=e.strstart+jt;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=jt-(d-s),s=d-jt,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},Yt=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-$t)&&(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),Wt(e),r+=t),0===e.strm.avail_in)break;if(n=Xt(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=Zt(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Zt(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<$t&&0!==e.strm.avail_in)},Qt=(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!==bt||t===_t||n!==r+e.strm.avail_in))break;o=t===bt&&n===r+e.strm.avail_in?1:0,pt(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,Gt(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&&(Xt(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!==_t&&t!==bt&&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&&(Xt(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===bt)&&t!==_t&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,o=t===bt&&0===e.strm.avail_in&&n===r?1:0,pt(e,e.block_start,n,o),e.block_start+=n,Gt(e.strm)),o?3:1)},en=(e,t)=>{let n,r;for(;;){if(e.lookahead<$t){if(Yt(e),e.lookahead<$t&&t===_t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=Zt(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-$t&&(e.match_length=Kt(e,n)),e.match_length>=3)if(r=gt(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=Zt(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=Zt(e,e.ins_h,e.window[e.strstart+1]);else r=gt(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ht(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===bt?(Ht(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ht(e,!1),0===e.strm.avail_out)?1:2},tn=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<$t){if(Yt(e),e.lookahead<$t&&t===_t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=Zt(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-$t&&(e.match_length=Kt(e,n),e.match_length<=5&&(e.strategy===xt||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=gt(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=Zt(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&&(Ht(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=gt(e,0,e.window[e.strstart-1]),r&&Ht(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=gt(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===bt?(Ht(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ht(e,!1),0===e.strm.avail_out)?1:2};function nn(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 rn=[new nn(0,0,0,0,Qt),new nn(4,4,8,4,en),new nn(4,5,16,8,en),new nn(4,6,32,32,en),new nn(4,4,16,16,tn),new nn(8,16,32,32,tn),new nn(8,16,128,128,tn),new nn(8,32,128,256,tn),new nn(32,128,258,1024,tn),new nn(32,258,258,4096,tn)];function sn(){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=Lt,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),qt(this.dyn_ltree),qt(this.dyn_dtree),qt(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),qt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),qt(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 on=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Ft&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==zt&&t.status!==Bt?1:0},an=e=>{if(on(e))return Dt(e,St);e.total_in=e.total_out=0,e.data_type=Nt;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?Ft:zt,e.adler=2===t.wrap?0:1,t.last_flush=-2,ft(t),kt},un=e=>{const t=an(e);var n;return t===kt&&((n=e.state).window_size=2*n.w_size,qt(n.head),n.max_lazy_match=rn[n.level].max_lazy,n.good_match=rn[n.level].good_length,n.nice_match=rn[n.level].nice_length,n.max_chain_length=rn[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},cn=(e,t,n,r,i,s)=>{if(!e)return St;let o=1;if(t===Rt&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||n!==Lt||r<8||r>15||t<0||t>9||s<0||s>Tt||8===r&&1!==o)return Dt(e,St);8===r&&(r=9);const a=new sn;return e.state=a,a.strm=e,a.status=Ft,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,un(e)};var ln={deflateInit:(e,t)=>cn(e,t,Lt,15,8,Pt),deflateInit2:cn,deflateReset:un,deflateResetKeep:an,deflateSetHeader:(e,t)=>on(e)||2!==e.state.wrap?St:(e.state.gzhead=t,kt),deflate:(e,t)=>{if(on(e)||t>Et||t<0)return e?Dt(e,St):St;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===Bt&&t!==bt)return Dt(e,0===e.avail_out?It:St);const r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Gt(e),0===e.avail_out)return n.last_flush=-1,kt}else if(0===e.avail_in&&Ut(t)<=Ut(r)&&t!==bt)return Dt(e,It);if(n.status===Bt&&0!==e.avail_in)return Dt(e,It);if(n.status===Ft&&0===n.wrap&&(n.status=zt),n.status===Ft){let t=Lt+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=Ot||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,Jt(n,t),0!==n.strstart&&(Jt(n,e.adler>>>16),Jt(n,65535&e.adler)),e.adler=1,n.status=zt,Gt(e),0!==n.pending)return n.last_flush=-1,kt}if(57===n.status)if(e.adler=0,Vt(n,31),Vt(n,139),Vt(n,8),n.gzhead)Vt(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)),Vt(n,255&n.gzhead.time),Vt(n,n.gzhead.time>>8&255),Vt(n,n.gzhead.time>>16&255),Vt(n,n.gzhead.time>>24&255),Vt(n,9===n.level?2:n.strategy>=Ot||n.level<2?4:0),Vt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Vt(n,255&n.gzhead.extra.length),Vt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=lt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(Vt(n,0),Vt(n,0),Vt(n,0),Vt(n,0),Vt(n,0),Vt(n,9===n.level?2:n.strategy>=Ot||n.level<2?4:0),Vt(n,3),n.status=zt,Gt(e),0!==n.pending)return n.last_flush=-1,kt;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=lt(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,Gt(e),0!==n.pending)return n.last_flush=-1,kt;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=lt(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=lt(e.adler,n.pending_buf,n.pending-r,r)),Gt(e),0!==n.pending)return n.last_flush=-1,kt;r=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Vt(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=lt(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=lt(e.adler,n.pending_buf,n.pending-r,r)),Gt(e),0!==n.pending)return n.last_flush=-1,kt;r=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Vt(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=lt(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&&(Gt(e),0!==n.pending))return n.last_flush=-1,kt;Vt(n,255&e.adler),Vt(n,e.adler>>8&255),e.adler=0}if(n.status=zt,Gt(e),0!==n.pending)return n.last_flush=-1,kt}if(0!==e.avail_in||0!==n.lookahead||t!==_t&&n.status!==Bt){let r=0===n.level?Qt(n,t):n.strategy===Ot?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Yt(e),0===e.lookahead)){if(t===_t)return 1;break}if(e.match_length=0,n=gt(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ht(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===bt?(Ht(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ht(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===Mt?((e,t)=>{let n,r,i,s;const o=e.window;for(;;){if(e.lookahead<=jt){if(Yt(e),e.lookahead<=jt&&t===_t)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+jt;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=jt-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=gt(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=gt(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ht(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===bt?(Ht(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ht(e,!1),0===e.strm.avail_out)?1:2})(n,t):rn[n.level].func(n,t);if(3!==r&&4!==r||(n.status=Bt),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),kt;if(2===r&&(t===wt?vt(n):t!==Et&&(pt(n,0,0,!1),t===yt&&(qt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Gt(e),0===e.avail_out))return n.last_flush=-1,kt}return t!==bt?kt:n.wrap<=0?At:(2===n.wrap?(Vt(n,255&e.adler),Vt(n,e.adler>>8&255),Vt(n,e.adler>>16&255),Vt(n,e.adler>>24&255),Vt(n,255&e.total_in),Vt(n,e.total_in>>8&255),Vt(n,e.total_in>>16&255),Vt(n,e.total_in>>24&255)):(Jt(n,e.adler>>>16),Jt(n,65535&e.adler)),Gt(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?kt:At)},deflateEnd:e=>{if(on(e))return St;const t=e.state.status;return e.state=null,t===zt?Dt(e,Ct):kt},deflateSetDictionary:(e,t)=>{let n=t.length;if(on(e))return St;const r=e.state,i=r.wrap;if(2===i||1===i&&r.status!==Ft||r.lookahead)return St;if(1===i&&(e.adler=ut(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(qt(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,Yt(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=Zt(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,Yt(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,kt},deflateInfo:"pako deflate (from Nodeca project)"};const hn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var dn={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)hn(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 fn=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){fn=!1}const pn=new Uint8Array(256);for(let e=0;e<256;e++)pn[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;pn[254]=pn[254]=1;var mn={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=pn[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&&fn)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+pn[e[n]]>t?n:t}};var gn=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 vn=Object.prototype.toString,{Z_NO_FLUSH:_n,Z_SYNC_FLUSH:wn,Z_FULL_FLUSH:yn,Z_FINISH:bn,Z_OK:En,Z_STREAM_END:kn,Z_DEFAULT_COMPRESSION:An,Z_DEFAULT_STRATEGY:Sn,Z_DEFLATED:Cn}=dt;function In(e){this.options=dn.assign({level:An,method:Cn,chunkSize:16384,windowBits:15,memLevel:8,strategy:Sn},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 gn,this.strm.avail_out=0;let n=ln.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==En)throw new Error(ht[n]);if(t.header&&ln.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?mn.string2buf(t.dictionary):"[object ArrayBuffer]"===vn.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=ln.deflateSetDictionary(this.strm,e),n!==En)throw new Error(ht[n]);this._dict_set=!0}}function Rn(e,t){const n=new In(t);if(n.push(e,!0),n.err)throw n.msg||ht[n.err];return n.result}In.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?bn:_n,"string"==typeof e?n.input=mn.string2buf(e):"[object ArrayBuffer]"===vn.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===wn||s===yn)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=ln.deflate(n,s),i===kn)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=ln.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===En;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},In.prototype.onData=function(e){this.chunks.push(e)},In.prototype.onEnd=function(e){e===En&&(this.result=dn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var xn={Deflate:In,deflate:Rn,deflateRaw:function(e,t){return(t=t||{}).raw=!0,Rn(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,Rn(e,t)},constants:dt};const On=16209;var Mn=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=On;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=On;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=On;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=On;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 Tn=15,Pn=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]),Nn=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]),Ln=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]),jn=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 $n=(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<=Tn;m++)C[m]=0;for(g=0;g<r;g++)C[t[n+g]]++;for(w=u,_=Tn;_>=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<=Tn;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<Tn;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=Pn,M=Nn,p=257):(S=Ln,M=jn,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:Fn,Z_BLOCK:zn,Z_TREES:Bn,Z_OK:Dn,Z_STREAM_END:Un,Z_NEED_DICT:qn,Z_STREAM_ERROR:Wn,Z_DATA_ERROR:Zn,Z_MEM_ERROR:Gn,Z_BUF_ERROR:Hn,Z_DEFLATED:Vn}=dt,Jn=16180,Xn=16190,Kn=16191,Yn=16192,Qn=16194,er=16199,tr=16200,nr=16206,rr=16209,ir=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function sr(){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 or=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Jn||t.mode>16211?1:0},ar=e=>{if(or(e))return Wn;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=Jn,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,Dn},ur=e=>{if(or(e))return Wn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ar(e)},cr=(e,t)=>{let n;if(or(e))return Wn;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Wn:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,ur(e))},lr=(e,t)=>{if(!e)return Wn;const n=new sr;e.state=n,n.strm=e,n.window=null,n.mode=Jn;const r=cr(e,t);return r!==Dn&&(e.state=null),r};let hr,dr,fr=!0;const pr=e=>{if(fr){hr=new Int32Array(512),dr=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($n(1,e.lens,0,288,hr,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;$n(2,e.lens,0,32,dr,0,e.work,{bits:5}),fr=!1}e.lencode=hr,e.lenbits=9,e.distcode=dr,e.distbits=5},mr=(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 gr={inflateReset:ur,inflateReset2:cr,inflateResetKeep:ar,inflateInit:e=>lr(e,15),inflateInit2:lr,inflate:(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(or(e)||!e.output||!e.input&&0!==e.avail_in)return Wn;n=e.state,n.mode===Kn&&(n.mode=Yn),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=Dn;e:for(;;)switch(n.mode){case Jn:if(0===n.wrap){n.mode=Yn;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=lt(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=rr;break}if((15&c)!==Vn){e.msg="unknown compression method",n.mode=rr;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=rr;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&c?16189:Kn,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)!==Vn){e.msg="unknown compression method",n.mode=rr;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=rr;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=lt(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=lt(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=lt(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=lt(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=lt(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=lt(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=lt(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=rr;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=Kn;break;case 16189:for(;l<32;){if(0===a)break e;a--,c+=r[s++]<<l,l+=8}e.adler=n.check=ir(c),c=0,l=0,n.mode=Xn;case Xn: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,qn;e.adler=n.check=1,n.mode=Kn;case Kn:if(t===zn||t===Bn)break e;case Yn:if(n.last){c>>>=7&l,l-=7&l,n.mode=nr;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(pr(n),n.mode=er,t===Bn){c>>>=2,l-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=rr}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=rr;break}if(n.length=65535&c,c=0,l=0,n.mode=Qn,t===Bn)break e;case Qn: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=Kn;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=rr;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=$n(0,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,k){e.msg="invalid code lengths set",n.mode=rr;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=rr;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=rr;break}for(;f--;)n.lens[n.have++]=E}}if(n.mode===rr)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=rr;break}if(n.lenbits=9,C={bits:n.lenbits},k=$n(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=rr;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},k=$n(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=rr;break}if(n.mode=er,t===Bn)break e;case er:n.mode=tr;case tr: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,Mn(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===Kn&&(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=Kn;break}if(64&v){e.msg="invalid literal/length code",n.mode=rr;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=rr;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=rr;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=rr;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=tr);break;case 16205:if(0===u)break e;i[o++]=n.length,u--,n.mode=tr;break;case nr: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?lt(n.check,i,d,o-d):ut(n.check,i,d,o-d)),d=u,4&n.wrap&&(n.flags?c:ir(c))!==n.check){e.msg="incorrect data check",n.mode=rr;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=rr;break}c=0,l=0}n.mode=16208;case 16208:k=Un;break e;case rr:k=Zn;break e;case 16210:return Gn;default:return Wn}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<rr&&(n.mode<nr||t!==Fn))&&mr(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?lt(n.check,i,d,e.next_out-d):ut(n.check,i,d,e.next_out-d)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Kn?128:0)+(n.mode===er||n.mode===Qn?256:0),(0===h&&0===d||t===Fn)&&k===Dn&&(k=Hn),k},inflateEnd:e=>{if(or(e))return Wn;let t=e.state;return t.window&&(t.window=null),e.state=null,Dn},inflateGetHeader:(e,t)=>{if(or(e))return Wn;const n=e.state;return 0==(2&n.wrap)?Wn:(n.head=t,t.done=!1,Dn)},inflateSetDictionary:(e,t)=>{const n=t.length;let r,i,s;return or(e)?Wn:(r=e.state,0!==r.wrap&&r.mode!==Xn?Wn:r.mode===Xn&&(i=1,i=ut(i,t,n,0),i!==r.check)?Zn:(s=mr(e,t,n,n),s?(r.mode=16210,Gn):(r.havedict=1,Dn)))},inflateInfo:"pako inflate (from Nodeca project)"};var vr=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 _r=Object.prototype.toString,{Z_NO_FLUSH:wr,Z_FINISH:yr,Z_OK:br,Z_STREAM_END:Er,Z_NEED_DICT:kr,Z_STREAM_ERROR:Ar,Z_DATA_ERROR:Sr,Z_MEM_ERROR:Cr}=dt;function Ir(e){this.options=dn.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 gn,this.strm.avail_out=0;let n=gr.inflateInit2(this.strm,t.windowBits);if(n!==br)throw new Error(ht[n]);if(this.header=new vr,gr.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=mn.string2buf(t.dictionary):"[object ArrayBuffer]"===_r.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=gr.inflateSetDictionary(this.strm,t.dictionary),n!==br)))throw new Error(ht[n])}Ir.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?yr:wr,"[object ArrayBuffer]"===_r.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=gr.inflate(n,o),s===kr&&i&&(s=gr.inflateSetDictionary(n,i),s===br?s=gr.inflate(n,o):s===Sr&&(s=kr));n.avail_in>0&&s===Er&&n.state.wrap>0&&0!==e[n.next_in];)gr.inflateReset(n),s=gr.inflate(n,o);switch(s){case Ar:case Sr:case kr:case Cr:return this.onEnd(s),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(0===n.avail_out||s===Er))if("string"===this.options.to){let e=mn.utf8border(n.output,n.next_out),t=n.next_out-e,i=mn.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!==br||0!==a){if(s===Er)return s=gr.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Ir.prototype.onData=function(e){this.chunks.push(e)},Ir.prototype.onEnd=function(e){e===br&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=dn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const{Deflate:Rr,deflate:xr,deflateRaw:Or,gzip:Mr}=xn;var Tr=xr;const Pr=4294967295;let Nr=Math.floor(Math.random()*Pr);const Lr=()=>(Nr=(Nr+1)%Pr,Nr);function jr(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 $r extends Error{constructor(e){super(e.message),this.name=this.constructor.name,this.cause=e,Object.setPrototypeOf(this,this.constructor.prototype)}}class Fr extends Error{constructor(e,t){super(e),this.name=this.constructor.name,this.cause=t,Object.setPrototypeOf(this,this.constructor.prototype)}}class zr extends Fr{constructor(e="Transport request timed out",t){super(e,t)}}function Br({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 Dr({transport:e,method:"wallet_createSession",params:t})),getSession:async()=>(await i(),await Dr({transport:e,method:"wallet_getSession"})),revokeSession:async r=>{await i(),t=void 0,n=void 0,await Dr({transport:e,method:"wallet_revokeSession",params:r}),await e.disconnect()},invokeMethod:async t=>(await i(),await Dr({transport:e,method:"wallet_invokeMethod",params:t})),extendsRpcApi:()=>Br({transport:e}),onNotification:t=>e.onNotification(t)}}async function Dr({transport:e,method:t,params:n,timeout:r}){const i=await e.request({method:t,params:n},{timeout:r});if(i?.error)throw new $r(i.error);return i.result}const Ur="caip-348",qr="metamask-contentscript",Wr="metamask-inpage",Zr="metamask-multichain-provider",Gr="metamask-provider",Hr="METAMASK_EXTENSION_CONNECT_CAN_RETRY",Vr=-1,Jr=200;async function Xr(){return new Promise(((e,t)=>{const n=t=>{if(function(e){const{target:t,data:n}=e.data;return t===Wr&&n?.name===Gr&&e.origin===location.origin}(t)){const i=t?.data?.data?.data;if(i?.method===Hr)Kr();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),Kr()}))}function Kr(){window.postMessage({target:qr,data:{name:Gr,data:{method:"metamask_getProviderState"}}},location.origin)}function Yr(e={}){let{extensionId:t}=e;const{defaultTimeout:n=Vr,warmupTimeout:r=Jr}=e;let i,s=Lr();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 Xr());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 Fr("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 Fr("Chrome port not connected");const u=s++,c={id:u,jsonrpc:"2.0",...e};try{return await jr(new Promise((e=>{o.set(u,e),a.postMessage({type:Ur,data:c})})),r,(()=>new zr))}catch(e){throw o.has(u)&&o.delete(u),e}},onNotification:e=>(a.add(e),()=>{a.delete(e)})}}function Qr(e={}){const{defaultTimeout:t=Vr,warmupTimeout:n=Jr}=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===Wr&&n?.name===Zr&&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 Fr("Transport not connected");const s=Lr(),o={jsonrpc:"2.0",id:s,...e};return jr(new Promise((e=>{i.set(s,(t=>e(t))),function(e){window.postMessage({target:qr,data:{name:Zr,data:e}},location.origin)}(o)})),r,(()=>new zr)).catch((e=>{throw i.has(s)&&i.delete(s),e}))},onNotification:e=>(s.add(e),()=>{s.delete(e)})}}function ei({extensionId:e,defaultTimeout:t,warmupTimeout:n}={}){return"undefined"!=typeof chrome&&chrome.runtime&&"function"==typeof chrome.runtime.connect?Yr({extensionId:e,defaultTimeout:t,warmupTimeout:n}):Qr({defaultTimeout:t,warmupTimeout:n})}var ti=ai;ai.default=ai,ai.stable=hi,ai.stableStringify=hi;var ni="[...]",ri="[Circular]",ii=[],si=[];function oi(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ai(e,t,n,r){var i;void 0===r&&(r=oi()),ci(e,"",0,[],void 0,0,r);try{i=0===si.length?JSON.stringify(e,t,n):JSON.stringify(e,fi(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==ii.length;){var s=ii.pop();4===s.length?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function ui(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);void 0!==i.get?i.configurable?(Object.defineProperty(r,n,{value:e}),ii.push([r,n,t,i])):si.push([t,n,e]):(r[n]=e,ii.push([r,n,t]))}function ci(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 ui(ri,e,t,i);if(void 0!==o.depthLimit&&s>o.depthLimit)return void ui(ni,e,t,i);if(void 0!==o.edgesLimit&&n+1>o.edgesLimit)return void ui(ni,e,t,i);if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)ci(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];ci(e[c],c,a,r,e,s,o)}}r.pop()}}function li(e,t){return e<t?-1:e>t?1:0}function hi(e,t,n,r){void 0===r&&(r=oi());var i,s=di(e,"",0,[],void 0,0,r)||e;try{i=0===si.length?JSON.stringify(s,t,n):JSON.stringify(s,fi(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==ii.length;){var o=ii.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function di(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 ui(ri,e,t,i);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==o.depthLimit&&s>o.depthLimit)return void ui(ni,e,t,i);if(void 0!==o.edgesLimit&&n+1>o.edgesLimit)return void ui(ni,e,t,i);if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)di(e[a],a,a,r,e,s,o);else{var u={},c=Object.keys(e).sort(li);for(a=0;a<c.length;a++){var l=c[a];di(e[l],l,a,r,e,s,o),u[l]=e[l]}if(void 0===i)return u;ii.push([i,t,e]),i[t]=u}r.pop()}}function fi(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(si.length>0)for(var r=0;r<si.length;r++){var i=si[r];if(i[1]===t&&i[0]===n){n=i[2],si.splice(r,1);break}}return e.call(this,t,n)}}const pi={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},mi={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},gi={"-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."}},vi=pi.internal,_i="Unspecified error message. This is a bug, please report it.";yi(vi);const wi="Unspecified server error.";function yi(e,t=_i){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(M(gi,t))return gi[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return wi}return t}function bi(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return me(r)&&(t[n]=r),t}),{})}const Ei=function(e){return e?.__esModule?e.default:e}(ti);class ki 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 O(e)&&M(e,"cause")&&O(e.cause)}(n)?super(t):(super(t,{cause:n.cause}),M(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=>me(e)?e:O(e)?bi(e):null)):O(t)?bi(t):me(t)?t:null))),this.stack&&(e.stack=this.stack),e}toString(){return Ei(this.serialize(),Si,2)}}class Ai extends ki{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 Si(e,t){if("[Circular]"!==t)return t}const Ci=e=>xi(pi.internal,e),Ii=e=>Oi(mi.unauthorized,e),Ri=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 Ai(t,n,r)};function xi(e,t){const[n,r]=Mi(t);return new ki(e,n??yi(e),r)}function Oi(e,t){const[n,r]=Mi(t);return new Ai(e,n??yi(e),r)}function Mi(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 Ti=/\{[^{}]+\}/g;function Pi(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=Bi(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??Fi,body:w,...y}=l||{};let b=t;h&&(b=Bi(h)??t);let E="function"==typeof i?i:$i(i);v&&(E="function"==typeof v?v:$i({..."object"==typeof i?i:{},...v}));const k=void 0===w?void 0:_(w,zi(o,p,m.header)),A=zi(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(Ti)??[]){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,ji(e,o,{style:s,explode:i})):n="object"!=typeof o?"matrix"!==s?n.replace(r,"label"===s?`.${encodeURIComponent(o)}`:encodeURIComponent(o)):n.replace(r,`;${Ni(e,o)}`):n.replace(r,Li(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 Ni(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 Li(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(Ni(s,t[i],n))}const s=r.join(i);return"label"===n.style||"matrix"===n.style?`${i}${s}`:s}function ji(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(Ni(e,r,n));return"label"===n.style||"matrix"===n.style?`${r}${i.join(r)}`:i.join(r)}function $i(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(ji(r,i,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}))}else"object"!=typeof i?n.push(Ni(r,i,e)):n.push(Li(r,i,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}))}return n.join("&")}}function Fi(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 zi(...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 Bi(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var Di,Ui=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()}}},qi=class{enabled=!1;sender;properties={};constructor(e){const t=Pi({baseUrl:e});this.sender=new Ui({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&&(Di=process.env.METAMASK_ANALYTICS_ENDPOINT??process.env.NEXT_PUBLIC_METAMASK_ANALYTICS_ENDPOINT);var Wi=new qi(Di??"https://mm-sdk-analytics.api.cx.metamask.io/"),Zi={exports:{}};!function(t,n){var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e.commonjsGlobal&&e.commonjsGlobal,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.commonjsGlobal&&e.commonjsGlobal||{},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}(Zi,Zi.exports);var Gi=Zi.exports;const Hi=[];for(let e=0;e<256;++e)Hi.push((e+256).toString(16).slice(1));let Vi;const Ji=new Uint8Array(16);var Xi={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ki(e,t,n){if(Xi.randomUUID&&!t&&!e)return Xi.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Vi){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Vi=crypto.getRandomValues.bind(crypto)}return Vi(Ji)}();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(Hi[e[t+0]]+Hi[e[t+1]]+Hi[e[t+2]]+Hi[e[t+3]]+"-"+Hi[e[t+4]]+Hi[e[t+5]]+"-"+Hi[e[t+6]]+Hi[e[t+7]]+"-"+Hi[e[t+8]]+Hi[e[t+9]]+"-"+Hi[e[t+10]]+Hi[e[t+11]]+Hi[e[t+12]]+Hi[e[t+13]]+Hi[e[t+14]]+Hi[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 Yi(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 Qi(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 es,ts,ns,rs,is,ss,os,as,us,cs,ls,hs,ds,fs,ps="INSTALLED",ms="NOT_INSTALLED",gs="REGISTERED",vs="REGISTERING",_s="RELOADING",ws={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},ys="REGISTRATION_IN_PROGRESS",bs="FORWARDER_ID",Es=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()?ps:ms;var a=e._detectBrowser();this.downloadUrl=a?ws[a]:ws.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(ys)&&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 Yi(this,void 0,void 0,(function(){return Qi(this,(function(n){switch(n.label){case 0:switch(this.state){case _s:return[3,1];case ms:return[3,2];case ps:return[3,3];case vs:return[3,5];case gs: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=_s,location.reload(),[3,8];case 3:return console.debug("Registering with MetaMask"),this.state=vs,[4,e._register()];case 4:return n.sent(),this.state=gs,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(ys,"true"),this._openDownloadPage(),this._openForwarder()},e.prototype.stopOnboarding=function(){"true"===sessionStorage.getItem(ys)&&(this.forwarderMode===e.FORWARDER_MODE.INJECT&&(console.debug("Removing forwarder"),e._removeForwarder()),sessionStorage.setItem(ys,"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",bs),t.insertBefore(n,t.children[0])},e._removeForwarder=function(){var e;null===(e=document.getElementById(bs))||void 0===e||e.remove()},e._detectBrowser=function(){var e=l.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}(),ks=Object.defineProperty,As=Object.defineProperties,Ss=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertyNames,Is=Object.getOwnPropertySymbols,Rs=Object.prototype.hasOwnProperty,xs=Object.prototype.propertyIsEnumerable,Os=e=>{throw TypeError(e)},Ms=(e,t,n)=>t in e?ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ts=(e,t)=>{for(var n in t||(t={}))Rs.call(t,n)&&Ms(e,n,t[n]);if(Is)for(var n of Is(t))xs.call(t,n)&&Ms(e,n,t[n]);return e},Ps=(e,t)=>As(e,Ss(t)),Ns=(e,t)=>function(){return e&&(t=(0,e[Cs(e)[0]])(e=0)),t},Ls=(e,t)=>{for(var n in t)ks(e,n,{get:t[n],enumerable:!0})},js=(e,t,n)=>t.has(e)||Os("Cannot "+n),$s=(e,t,n)=>(js(e,t,"read from private field"),n?n.call(e):t.get(e)),Fs=(e,t,n)=>t.has(e)?Os("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),zs=(e,t,n,r)=>(js(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Bs=(e,t,n)=>(js(e,t,"access private method"),n),Ds=(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())})),Us=Ns({"src/domain/errors/base.ts"(){es=class extends Error{constructor(e,t){super(e),this.message=e,this.code=t}}}}),qs=Ns({"src/domain/errors/rpc.ts"(){Us(),(ts=class e extends es{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,ns=ts,(rs=class e extends es{constructor(t){super(`RPCErr${e.code}: RPC Client response reason ${t}`,e.code),this.reason=t}}).code=51,is=rs,(ss=class e extends es{constructor(t){super(`RPCErr${e.code}: RPC Client fetch reason ${t}`,e.code),this.reason=t}}).code=52,os=ss,(as=class e extends es{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,us=as}}),Ws=Ns({"src/domain/errors/index.ts"(){qs()}}),Zs=Ns({"src/domain/events/index.ts"(){ls=class{constructor(){Fs(this,cs,new e.EventEmitter3)}emit(e,...t){$s(this,cs).emit(e,...t)}on(e,t){return $s(this,cs).on(e,t),()=>{this.off(e,t)}}off(e,t){$s(this,cs).off(e,t)}removeListener(e,t){$s(this,cs).off(e,t)}once(e,t){return $s(this,cs).once(e,t),()=>{this.off(e,t)}}listenerCount(e){return $s(this,cs).listenerCount(e)}},cs=new WeakMap}});function Gs(e,t){return e.includes(t)||e.includes("metamask-sdk:*")||e.includes("*")}var Hs,Vs,Js,Xs,Ks,Ys=Ns({"src/domain/logger/index.ts"(){hs=(e="metamask-sdk",t="214")=>{const n=u(e);return n.color=t,n},ds=(e="metamask-sdk")=>{u.enable(e)},fs=(e,t)=>Ds(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 Gs(t,e)}const r=yield t.getDebug();return!!r&&Gs(r,e)}))}}),Qs=Ns({"src/domain/multichain/api/constants.ts"(){Hs=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"]),Vs=new Set(["eth_accounts","eth_chainId"]),Js=new Set(["wallet_addEthereumChain","wallet_switchEthereumChain","eth_accounts"])}}),eo=Ns({"src/domain/multichain/api/infura.ts"(){Qs()}});var to,no,ro=Ns({"src/domain/multichain/index.ts"(){Zs(),Qs(),eo(),Xs=(e=>(e.Browser="browser",e.MWP="mwp",e.UNKNOWN="unknown",e))(Xs||{}),Ks=class extends ls{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=Ts(Ts({},_.analytics),null!=(t=e.analytics)?t:{});!1===(null==(n=_.analytics)?void 0:n.enabled)&&(w.enabled=!1),this.options=Ps(Ts({},_),{api:Ps(Ts({},_.api),{supportedNetworks:Ts(Ts({},_.api.supportedNetworks),null!=(i=null==(r=e.api)?void 0:r.supportedNetworks)?i:{})}),versions:Ts(Ts({},_.versions),null!=(s=e.versions)?s:{}),analytics:Ts({},w),ui:Ps(Ts({},_.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:Ts(Ts({},_.mobile),null!=(d=e.mobile)?d:{}),transport:Ps(Ts({},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 io(){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 so(){return io()?"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=l.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 oo(){const e=so();return io()||"web-mobile"===e}function ao(){return Ds(this,null,(function*(){return no}))}var uo,co,lo,ho,fo,po=Ns({"src/domain/platform/index.ts"(){to=new Set(["io.metamask","io.metamask.mobile"]),no=Ds(null,null,(function*(){const e=so();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)&&to.has(e.info.rdns)}));e(i)}catch(t){e(!1)}}),300)}))}))}}),mo=Ns({"src/domain/store/adapter.ts"(){uo=class{constructor(e){this.options=e}}}}),go=Ns({"src/domain/store/client.ts"(){co=class{}}}),vo=Ns({"src/domain/store/index.ts"(){mo(),go()}}),_o=Ns({"src/domain/ui/types.ts"(){lo=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)}}}}),wo=Ns({"src/domain/ui/index.ts"(){_o()}});function yo(e){var t,n,r,i;if("object"!=typeof e||null===e)return{code:void 0,message:""};if(e instanceof us)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 bo(e){if("object"!=typeof e||null===e)return!1;const{code:t,message:n}=yo(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 Eo(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}=yo(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}=yo(e),i=function(e){if(!e)return;let t=e;for(const{pattern:e,replacement:n}of fo)t=t.replace(e,n);return t.length>ho&&(t=`${t.slice(0,ho-1)}…`),t}(r);return Ts(Ts({failure_reason:t},"number"==typeof n?{error_code:n}:{}),i?{error_message_sample:i}:{})}function ko(e,t){return Ds(this,null,(function*(){var n;const r=jo(e.dapp),i=so(),s=yield t.getAnonId();return{mmconnect_versions:null!=(n=e.versions)?n:{},dapp_id:r,platform:i,anon_id:s}}))}function Ao(e,t,n,r,i){return Ds(this,null,(function*(){var s;const o=jo(e.dapp),a=yield t.getAnonId();return Ts(Ts(Ts({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 So,Co=Ns({"src/multichain/utils/analytics.ts"(){ta(),Po(),ho=200,fo=[{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 Io(){return So}var Ro,xo,Oo,Mo,To=Ns({"src/domain/utils/index.ts"(){Co(),So="1.1.0"}}),Po=Ns({"src/domain/index.ts"(){Ws(),Zs(),Ys(),ro(),po(),vo(),wo(),To()}});function No(){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 Lo(e){const t=Tr(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 jo(e){var t;return null!=(t=e.url)?t:e.name}function $o(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 Fo(e){return e.reduce(((e,t)=>Ps(Ts({},e),{[t]:{methods:[],notifications:[],accounts:[]}})),{})}function zo(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 Bo(e){return e.reduce(((e,t)=>{try{return[...e,se(t)]}catch(n){const r=JSON.stringify(t);return console.error(`Invalid CAIP account ID: ${r}`,n),e}}),[])}function Do(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=ie(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 Uo,qo,Wo,Zo,Go,Ho,Vo,Jo,Xo,Ko,Yo,Qo,ea,ta=Ns({"src/multichain/utils/index.ts"(){Po(),Ro=()=>{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},xo=4294967295,Oo=Math.floor(Math.random()*xo),Mo=()=>Oo=(Oo+1)%xo}}),na=Ns({"src/multichain/transports/constants.ts"(){Uo="metamask-multichain-provider"}}),ra={};Ls(ra,{MWPTransport:()=>ea});var ia=Ns({"src/multichain/transports/mwp/index.ts"(){Po(),ta(),na(),6e4,6e4,12e4,1e4,qo="cache_wallet_getSession",Wo="cache_eth_accounts",Zo="cache_eth_chainId",Go="pending_session_request",Ho=["wallet_getSession","wallet_createSession","wallet_sessionChanged"],Vo=["wallet_revokeSession","wallet_revokePermissions"],Jo=hs("metamask-sdk:transport"),ea=class{constructor(e,t,n={requestTimeout:6e4,connectionTimeout:12e4,resumeTimeout:1e4}){this.dappClient=e,this.kvstore=t,this.options=n,Fs(this,Xo),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(Go,JSON.stringify(e)).catch((e=>{Jo("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 Ds(this,null,(function*(){try{const e=yield this.kvstore.get(Go);return e?JSON.parse(e):null}catch(e){return null}}))}removeStoredPendingSessionRequest(){return Ds(this,null,(function*(){yield this.kvstore.delete(Go)}))}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=me(r)?r:void 0;return e>=1e3&&e<=4999?Ri({code:e,message:n,data:i}):new ki(e,n,i)}const n=e instanceof Error?e.message:JSON.stringify(e);return Ci({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=Ps(Ts({},t),{method:"wallet_getSession"===e.method||"wallet_createSession"===e.method?"wallet_sessionChanged":e.method}),i=Ps(Ts({},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(Zo,JSON.stringify(e.data.params.chainId)),"metamask_accountsChanged"===e.data.method&&this.kvstore.set(Wo,JSON.stringify(e.data.params)),"wallet_sessionChanged"===e.data.method){const t={result:e.data.params};this.kvstore.set(qo,JSON.stringify(t))}this.notifyCallbacks(e.data)}}}init(){return Ds(this,null,(function*(){}))}sendEip1193Message(e,t){return Ds(this,null,(function*(){const n=Ts({jsonrpc:"2.0",id:String(Mo())},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 zr)}),null!=(i=null==t?void 0:t.timeout)?i:this.options.requestTimeout);this.pendingRequests.set(n.id,{request:n,method:n.method,resolve:t=>Ds(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 Ds(this,null,(function*(){const t=yield this.getActiveSession();t&&Jo("active session found",{id:t.id,channel:t.channel,expiresAt:t.expiresAt});return(t?Bs(this,Xo,Yo).call(this,t,e):Bs(this,Xo,Qo).call(this,e)).catch((e=>Ds(this,null,(function*(){throw yield this.dappClient.disconnect(),e})))).finally((()=>{this.removeStoredPendingSessionRequest()}))}))}disconnect(){return Ds(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(Wo),this.kvstore.delete(Zo)),s.length>0?this.kvstore.set(qo,JSON.stringify({result:{sessionScopes:o}})):(this.kvstore.delete(qo),"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 Ds(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 Ds(this,null,(function*(){var t;if("wallet_getSession"===e.method){const n=yield this.kvstore.get(qo);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(Wo);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(Zo);if(t)return{id:e.id,jsonrpc:"2.0",result:JSON.parse(t),method:e.method}}}))}storeWalletSession(e,t){return Ds(this,null,(function*(){t.error||(Ho.includes(e.method)?yield this.kvstore.set(qo,JSON.stringify(t)):"eth_accounts"===e.method?yield this.kvstore.set(Wo,JSON.stringify(t.result)):"eth_chainId"===e.method?yield this.kvstore.set(Zo,JSON.stringify(t.result)):Vo.includes(e.method)&&(yield this.kvstore.delete(qo),yield this.kvstore.delete(Wo),yield this.kvstore.delete(Zo)))}))}request(e,t){return Ds(this,null,(function*(){const n=Ts({jsonrpc:"2.0",id:String(Mo())},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 zr)}),null!=(i=null==t?void 0:t.timeout)?i:this.options.requestTimeout);this.pendingRequests.set(n.id,{request:n,method:n.method,resolve:t=>Ds(this,null,(function*(){return yield this.storeWalletSession(n,t),e(t)})),reject:r,timeout:s}),this.dappClient.sendRequest({name:Uo,data:n}).catch(r)})))}))}onNotification(e){return this.notificationCallbacks.add(e),()=>{this.notificationCallbacks.delete(e)}}getActiveSession(){return Ds(this,null,(function*(){const{kvstore:e}=this,{SessionStore:t}=yield Promise.resolve().then((function(){return require("./index-10979fb2.cjs")})).then((function(e){return e.index})),n=yield t.create(e);try{const[e]=yield n.list();return e}catch(e){return void Jo("error getting active session",e)}}))}waitForWalletSessionIfNotCached(){return Ds(this,null,(function*(){if(yield this.kvstore.get(qo))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 zr)}),this.options.resumeTimeout)}));return Promise.race([t,n])}))}},Xo=new WeakSet,Ko=function(e){return Ds(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=zo(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:Do(Fo(null!=(i=null==e?void 0:e.scopes)?i:[]),Bo(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:Do(Fo(null!=(o=null==e?void 0:e.scopes)?o:[]),Bo(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})}))},Yo=function(e,t){return Ds(this,null,(function*(){var n;const r=null!==(yield this.getStoredPendingSessionRequest()),i=ke(),s=()=>Ds(this,null,(function*(){try{i.resolve(yield Bs(this,Xo,Ko).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=ke(),a=setTimeout((()=>o.reject(new zr)),r?this.options.resumeTimeout:this.options.connectionTimeout),u=()=>this.dappClient.off("connected",s);return Promise.race([i.promise,o.promise]).finally((()=>{clearTimeout(a),u()}))}))},Qo=function(e){return Ds(this,null,(function*(){var t,n;const{dappClient:r}=this,i=null!==(yield this.getStoredPendingSessionRequest()),s=ke(),o={optionalScopes:Do(Fo(null!=(t=null==e?void 0:e.scopes)?t:[]),Bo(null!=(n=null==e?void 0:e.caipAccountIds)?n:[])),sessionProperties:null==e?void 0:e.sessionProperties},a={jsonrpc:"2.0",id:String(Mo()),method:"wallet_createSession",params:o};let u;const c=()=>{u&&(this.dappClient.off("message",u),u=void 0)};u=e=>Ds(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=so(),h=["web-desktop","nodejs"].includes(l),d={name:Uo,data:a};r.connect({mode:"trusted",initialPayload:h?void 0:d}).then((()=>Ds(this,null,(function*(){if(h)return r.sendRequest(d)})))).catch((e=>s.reject(e)));const f=ke(),p=setTimeout((()=>f.reject(new zr)),i?this.options.resumeTimeout:this.options.connectionTimeout);return Promise.race([s.promise,f.promise]).finally((()=>{clearTimeout(p),c()}))}))}}}),sa={};function oa(){return Ds(this,null,(function*(){const{decrypt:e,encrypt:t,PrivateKey:n,PublicKey:r}=yield Promise.resolve().then((function(){return require("./index-563a38d7.cjs")})).then((function(e){return e.index}));return{generateKeyPair(){const e=new n;return{privateKey:new Uint8Array(e.secret),publicKey:e.publicKey.toBytes(!0)}},encrypt(e,n){return Ds(this,null,(function*(){const r=Buffer.from(e,"utf8");return t(n,r).toString("base64")}))},decrypt(t,n){return Ds(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"))}}}))}Ls(sa,{createKeyManager:()=>oa});var aa=Ns({"src/multichain/transports/mwp/KeyManager.ts"(){}});var ua,ca,la,ha,da,fa,pa,ma=Ns({"src/ui/modals/base/utils.ts"(){}}),ga=Ns({"src/ui/modals/base/AbstractInstallModal.ts"(){ma(),Po(),ua=hs("metamask-sdk:ui"),ha=class extends lo{constructor(){super(...arguments),Fs(this,ca,null),Fs(this,la,-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;zs(this,ca,setInterval((()=>Ds(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)&&$s(this,la)!==i){const e=(s=r)<=0?"EXPIRED":`${Math.floor(s/1e3)}s`;ua(`[UI: InstallModal-nodejs()] QR code expires in: ${e} (${i}s)`),zs(this,la,i)}var s;if(n>=e.expiresAt){this.stopExpirationCheck(),ua("[UI: InstallModal-nodejs()] ⏰ QR code EXPIRED! Generating new one...");try{t=yield this.options.createConnectionRequest();const e=yield this.options.generateQRCode(t);zs(this,la,-1),this.updateLink(e),this.updateExpiresIn(i),this.renderQRCode(e,t)}catch(e){ua(`[UI: InstallModal-nodejs()] ❌ Error generating new QR code: ${e}`)}}}))),1e3))}stopExpirationCheck(){$s(this,ca)&&(clearInterval($s(this,ca)),zs(this,ca,null),ua("[UI: InstallModal-nodejs()] 🛑 Stopped QR code expiration checking"))}},ca=new WeakMap,la=new WeakMap}}),va=Ns({"src/ui/modals/web/install.ts"(){ga(),da=class extends ha{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)}}}}),_a=Ns({"src/ui/modals/base/AbstractOTPModal.ts"(){Po(),fa=class extends lo{get otpCode(){return this.data}set otpCode(e){this.data=e}updateOTPCode(e){this.otpCode=e,this.instance&&(this.instance.otpCode=e)}}}}),wa=Ns({"src/ui/modals/web/otp.ts"(){_a(),pa=class extends fa{mount(){}unmount(){}}}}),ya={};Ls(ya,{InstallModal:()=>da,OTPCodeModal:()=>pa});var ba,Ea,ka=Ns({"src/ui/modals/web/index.ts"(){va(),wa()}}),Aa={};Ls(Aa,{StoreAdapterWeb:()=>Ea});var Sa=Ns({"src/store/adapters/web.ts"(){Po(),ba=class e extends uo{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 Ds(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 Ds(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 Ds(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)}}))}))}},ba.stores=["sdk-kv-store","key-value-pairs"],ba.DB_NAME="mmconnect",Ea=ba}});ta();var Ca=No();null!=Ca.Buffer||(Ca.Buffer=t.Buffer),Po();var Ia="https://metamask.app.link/connect",Ra="metamask://connect";Po(),Co(),Ys(),ro(),po(),Po();var xa=1;var Oa=class extends Error{};Po(),ta(),Co(),Po();var Ma,Ta,Pa,Na,La,ja,$a=5;function Fa(e){if("object"==typeof e&&null!==e)return e}function za(e){return"string"==typeof e&&e.length>0?e:void 0}function Ba(e){for(const t of e){const e=za(t);if(void 0!==e)return e}}function Da(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=za(null==e?void 0:e.message),r=function(e){return void 0!==e&&me(e)?e:void 0}(null==e?void 0:e.data);return Ts(Ts({code:t},void 0===n?{}:{message:n}),void 0===r?{}:{data:r})}function Ua(e){var t,n,r,i;const s=function(e){const t=[];let n=e;for(let e=0;void 0!==n&&e<$a;e+=1)t.push(n),n=Fa(n.cause);return t}(Fa(e)),o=za(e);for(const[e,i]of s.entries()){const a=Da(i);if(a){const i=s.slice(e+1),u=s.slice(0,e),c=Ba(i.map((e=>e.message))),l=Ba([o,...u.map((e=>e.message))]),h=null!=(r=null!=(n=null!=(t=a.message)?t:c)?n:l)?r:"Unknown error";return Ts(Ts({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:Ba(s.map((e=>e.message))))?i:"Unknown error";return{reason:a}}function qa(e){if(e instanceof us)return e;const{reason:t,rpcCode:n,rpcMessage:r,rpcData:i}=Ua(e);return new us(t,n,r,i)}Ma=new WeakSet,Ta=function(e,t){return Ds(this,null,(function*(){var n;if(!1===(null==(n=this.config.analytics)?void 0:n.enabled))try{return yield t()}catch(e){throw qa(e)}yield Bs(this,Ma,Pa).call(this,e);try{const n=yield t();return yield Bs(this,Ma,Na).call(this,e),n}catch(t){const n=qa(t),r=void 0===n.rpcCode?t:n;throw bo(r)?yield Bs(this,Ma,ja).call(this,e):yield Bs(this,Ma,La).call(this,e,r),n}}))},Pa=function(e){return Ds(this,null,(function*(){const t=yield Ao(this.config,this.config.storage,e,this.transportType);Wi.track("mmconnect_wallet_action_requested",t)}))},Na=function(e){return Ds(this,null,(function*(){const t=yield Ao(this.config,this.config.storage,e,this.transportType);Wi.track("mmconnect_wallet_action_succeeded",t)}))},La=function(e,t){return Ds(this,null,(function*(){const n=yield Ao(this.config,this.config.storage,e,this.transportType,Eo(t));Wi.track("mmconnect_wallet_action_failed",n)}))},ja=function(e){return Ds(this,null,(function*(){const t=yield Ao(this.config,this.config.storage,e,this.transportType);Wi.track("mmconnect_wallet_action_rejected",t)}))},ta();var Wa,Za,Ga,Ha,Va,Ja,Xa,Ka,Ya,Qa,eu,tu,nu,ru,iu,su,ou,au,uu,cu,lu,hu=class{constructor(){Fs(this,Xa),Fs(this,Wa,new Set),Fs(this,Za,ei()),Fs(this,Ga,{timeout:6e4}),Fs(this,Ha,new Map),Fs(this,Va),Fs(this,Ja)}sendEip1193Message(e,t){return Ds(this,null,(function*(){Bs(this,Xa,nu).call(this);const n=String(Mo()),r=Ts({jsonrpc:"2.0",id:n},e);return new Promise(((e,i)=>{var s;const o=setTimeout((()=>{$s(this,Ha).delete(n),i(new Error("Request timeout"))}),null!=(s=null==t?void 0:t.timeout)?s:$s(this,Ga).timeout);$s(this,Ha).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 Ds(this,null,(function*(){yield Bs(this,Xa,ru).call(this);let e={sessionScopes:{}};try{e=(yield this.request({method:"wallet_getSession"},$s(this,Ga))).result}catch(e){console.error("Failed to get wallet session during DefaultTransport init")}Bs(this,Xa,Ka).call(this,{method:"wallet_sessionChanged",params:e})}))}connect(e){return Ds(this,null,(function*(){var t,n,r,i,s;yield Bs(this,Xa,ru).call(this);const o=yield this.request({method:"wallet_getSession"},$s(this,Ga));if(o.error)throw new Error(o.error.message);let a=o.result;const u={optionalScopes:Do(Fo(null!=(t=null==e?void 0:e.scopes)?t:[]),Bo(null!=(n=null==e?void 0:e.caipAccountIds)?n:[])),sessionProperties:null==e?void 0:e.sessionProperties};if(a&&e&&!e.forceRequest){if(!zo(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},$s(this,Ga));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},$s(this,Ga));if(e.error)throw new Error(e.error.message);a=e.result}Bs(this,Xa,Ka).call(this,{method:"wallet_sessionChanged",params:a})}))}disconnect(){return Ds(this,arguments,(function*(e=[]){yield this.request({method:"wallet_revokeSession",params:{scopes:e}})}))}isConnected(){return $s(this,Za).isConnected()}request(e){return Ds(this,arguments,(function*(e,t=$s(this,Ga)){const n=yield $s(this,Za).request(e,t);if(n.error)throw Bs(this,Xa,Ya).call(this,n.error);return n}))}onNotification(e){return $s(this,Za).onNotification(e),$s(this,Wa).add(e),()=>{$s(this,Wa).delete(e)}}getActiveSession(){return Ds(this,null,(function*(){throw new Error("getActiveSession is purposely not implemented for the DefaultTransport")}))}getStoredPendingSessionRequest(){return Ds(this,null,(function*(){throw new Error("getStoredPendingSessionRequest is purposely not implemented for the DefaultTransport")}))}};Wa=new WeakMap,Za=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Va=new WeakMap,Ja=new WeakMap,Xa=new WeakSet,Ka=function(e){for(const t of $s(this,Wa))try{t(e)}catch(e){console.log("[WindowPostMessageTransport] notifyCallbacks error:",e)}},Ya=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 me(r)&&(n.data=r),n},Qa=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},eu=function(e){var t,n;if(!Bs(this,Xa,Qa).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=$s(this,Ha).get(e);if(t){clearTimeout(t.timeout),$s(this,Ha).delete(e);const n=r;"error"in n&&n.error?t.reject(Bs(this,Xa,Ya).call(this,n.error)):t.resolve(n)}}},tu=function(e){var t,n;if(!Bs(this,Xa,Qa).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&&Bs(this,Xa,Ka).call(this,r)},nu=function(){$s(this,Va)||(zs(this,Va,Bs(this,Xa,eu).bind(this)),zs(this,Ja,Bs(this,Xa,tu).bind(this)),window.addEventListener("message",$s(this,Va)),window.addEventListener("message",$s(this,Ja)))},ru=function(){return Ds(this,null,(function*(){Bs(this,Xa,nu).call(this),$s(this,Za).isConnected()||(yield $s(this,Za).connect())}))},ta();iu=new WeakMap,su=new WeakMap,ou=new WeakSet,au=function(e){return Ds(this,null,(function*(){const t=e.params,n=Object.keys(Ts(Ts({},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=$s(this,su).call(this);if(!s)throw new Error("Transport not initialized after connect");return s.request({method:"wallet_getSession"})}))},uu=function(e){return Ds(this,null,(function*(){const t=$s(this,su).call(this);return(null==t?void 0:t.isConnected())?t.request({method:"wallet_getSession"}):{jsonrpc:"2.0",id:e.id,result:{sessionScopes:{}}}}))},cu=function(e){return Ds(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}}}))},lu=function(e){return Ds(this,null,(function*(){if(!this.isTransportConnected())return{error:Ii()};return{result:this.metamaskConnectMultichain.invokeMethod(e.params)}}))},ta();var du,fu,pu,mu,gu,vu,_u,wu,yu,bu,Eu,ku,Au,Su,Cu,Iu,Ru,xu,Ou,Mu,Tu,Pu,Nu,Lu,ju,$u,Fu,zu,Bu,Du,Uu=hs("metamask-sdk:core"),qu="__METAMASK_CONNECT_MULTICHAIN_SINGLETON__";function Wu(e){var t;return Ps(Ts({},null!=e?e:{}),{enabled:null==(t=null==e?void 0:e.enabled)||t,integrationType:(null==e?void 0:e.integrationType)||"direct"})}function Zu(e){var t;return!1!==(null==(t=e.analytics)?void 0:t.enabled)}function Gu(e,t,n){return Ds(this,null,(function*(){var r,i;if(!Zu(e))return null==n||n(void 0),void Wi.disable();const s=so();if(!("in-app-browser"===s||"web-desktop"===s||"web-mobile"===s)&&!("react-native"===s))return;const o=jo(e.dapp),a=yield t.getAnonId();null==n||n(a);const{integrationType:u}=null!=(r=e.analytics)?r:{integrationType:""};Wi.setGlobalProperty("mmconnect_versions",null!=(i=e.versions)?i:{}),Wi.setGlobalProperty("dapp_id",o),Wi.setGlobalProperty("anon_id",a),Wi.setGlobalProperty("platform",s),u&&Wi.setGlobalProperty("integration_types",[u]),Wi.enable()}))}fu=new WeakMap,pu=new WeakMap,mu=new WeakMap,gu=new WeakMap,vu=new WeakMap,_u=new WeakMap,wu=new WeakMap,yu=new WeakMap,bu=new WeakSet,Eu=function(){if(!$s(this,mu))throw new Error("Transport not initialized, establish connection first");return $s(this,mu)},ku=new WeakMap,Au=function(){return Ds(this,null,(function*(){yield Gu(this.options,this.storage,(e=>{zs(this,yu,e)}))}))},Su=function(e){return Ds(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)}}))},Cu=function(){return Ds(this,null,(function*(){const e=yield this.storage.getTransportType(),t=yield ao();if(e){if("browser"===e){if(t){const e=new hu;return zs(this,mu,e),zs(this,_u,"browser"),$s(this,pu).setupTransportNotificationListener(),zs(this,wu,e.onNotification(Bs(this,bu,Su).bind(this))),e}}else if("mwp"===e){const{adapter:e}=this.options.storage,t=yield Bs(this,bu,Ou).call(this),{MWPTransport:n}=yield Promise.resolve().then((()=>(ia(),ra))),r=new n(t,e);return zs(this,gu,t),zs(this,mu,r),zs(this,_u,"mwp"),$s(this,pu).setupTransportNotificationListener(),zs(this,wu,r.onNotification(Bs(this,bu,Su).bind(this))),r}yield this.storage.removeTransportType()}}))},Iu=function(){return Ds(this,null,(function*(){var e;const t=yield Bs(this,bu,Cu).call(this);if(t)t.isConnected()||(this.status="connecting",yield t.connect()),this.status="connected","mwp"===$s(this,_u)?yield this.storage.setTransportType("mwp"):yield this.storage.setTransportType("browser");else{this.status="loaded";const t=yield ao(),n=null==(e=this.options.ui.preferExtension)||e;if(t&&n){yield Bs(this,bu,$u).call(this,{persist:!1});try{yield Bs(this,bu,Eu).call(this).init()}catch(e){console.error("Passive init failed:",e)}}}}))},Ru=function(){const e={dapp:this.options.dapp,sdk:{version:Io(),platform:so()}};return Zu(this.options)&&$s(this,yu)&&(e.analytics={remote_session_id:$s(this,yu)}),e},xu=function(){return Ds(this,null,(function*(){try{yield Bs(this,bu,Au).call(this),yield Bs(this,bu,Iu).call(this)}catch(e){yield this.storage.removeTransportType(),this.status="pending",Uu("MetaMaskSDK error during initialization",e)}}))},Ou=function(){return Ds(this,null,(function*(){const[e,{DappClient:t},{createKeyManager:n}]=yield Promise.all([Promise.resolve().then((function(){return require("./index-10979fb2.cjs")})).then((function(e){return e.index})),Promise.resolve().then((function(){return require("./index-7eb41eb1.cjs")})),Promise.resolve().then((()=>(aa(),sa)))]),r=yield n(),{adapter:i}=this.options.storage,s=yield e.SessionStore.create(i),o="undefined"!=typeof window?WebSocket:(yield Promise.resolve().then((function(){return require("./browser-d0e333da.cjs")})).then((function(e){return e.browser}))).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})}))},Mu=function(){return Ds(this,null,(function*(){if("mwp"===$s(this,_u))return;const{adapter:e}=this.options.storage,t=yield Bs(this,bu,Ou).call(this);zs(this,gu,t);const{MWPTransport:n}=yield Promise.resolve().then((()=>(ia(),ra))),r=new n(t,e);zs(this,mu,r),zs(this,_u,"mwp"),$s(this,pu).setupTransportNotificationListener(),zs(this,wu,r.onNotification(Bs(this,bu,Su).bind(this))),yield this.storage.setTransportType("mwp")}))},Tu=function(){return Ds(this,null,(function*(){var e;(null==(e=this.options.ui.factory.modal)?void 0:e.isMounted)&&(yield this.storage.removeTransportType())}))},Pu=function(){const e=Bs(this,bu,Tu).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)}},Nu=function(e,t,n,r){return Ds(this,null,(function*(){const i=ke();return this.options.ui.factory.renderInstallModal(e,(()=>Ds(this,null,(function*(){"CONNECTED"!==this.dappClient.state&&"CONNECTING"!==this.dappClient.state||(yield this.dappClient.disconnect());const e=ke();return this.dappClient.on("session_request",(t=>{e.resolve({sessionRequest:t,metadata:Bs(this,bu,Ru).call(this)})})),Bs(this,bu,Eu).call(this).connect({scopes:t,caipAccountIds:n,sessionProperties:r}).then((()=>Ds(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=>Ds(this,null,(function*(){const{ProtocolError:t,ErrorCode:n}=yield Promise.resolve().then((function(){return require("./index-10979fb2.cjs")})).then((function(e){return e.index}));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=>Ds(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}))},Lu=function(e,t,n,r){return Ds(this,null,(function*(){null!=$s(this,vu)||zs(this,vu,Bs(this,bu,Pu).call(this)),this.options.ui.headless?yield Bs(this,bu,ju).call(this,t,n,r):yield Bs(this,bu,Nu).call(this,e,t,n,r)}))},ju=function(e,t,n){return Ds(this,null,(function*(){"CONNECTED"!==this.dappClient.state&&"CONNECTING"!==this.dappClient.state||(yield this.dappClient.disconnect().catch((()=>{})));const r=e=>{const t={sessionRequest:e,metadata:Bs(this,bu,Ru).call(this)},n=this.options.ui.factory.createConnectionDeeplink(t);this.emit("display_uri",n)};this.dappClient.on("session_request",r);try{yield Bs(this,bu,Eu).call(this).connect({scopes:e,caipAccountIds:t,sessionProperties:n}),this.status="connected",yield this.storage.setTransportType("mwp")}catch(e){const{ProtocolError:t}=yield Promise.resolve().then((function(){return require("./index-10979fb2.cjs")})).then((function(e){return e.index}));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)}}))},$u=function(){return Ds(this,arguments,(function*(e={persist:!0}){if("browser"===$s(this,_u))return $s(this,mu);(null==e?void 0:e.persist)&&(yield this.storage.setTransportType("browser"));const t=new hu;return zs(this,wu,t.onNotification(Bs(this,bu,Su).bind(this))),zs(this,mu,t),zs(this,_u,"browser"),$s(this,pu).setupTransportNotificationListener(),t}))},Fu=function(e,t,n){return Ds(this,null,(function*(){return new Promise(((r,i)=>Ds(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),Bs(this,bu,Eu).call(this).isConnected()?o=setTimeout((()=>{this.openSimpleDeeplinkIfNeeded()}),250):this.dappClient.once("session_request",(e=>{var t;const n={sessionRequest:e,metadata:Bs(this,bu,Ru).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"):$o(this.options,r,i)})),Bs(this,bu,Eu).call(this).connect({scopes:e,caipAccountIds:t,sessionProperties:n}).then(r).catch((e=>Ds(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)}))}))))}))},zu=function(e,t,n){return Ds(this,null,(function*(){return this.status="connecting",e.then((()=>Ds(this,null,(function*(){if(this.status="connected",Zu(this.options))try{const e=yield ko(this.options,this.storage);Wi.track("mmconnect_connection_established",Ps(Ts({},e),{transport_type:n,user_permissioned_chains:t}))}catch(e){Uu("Error tracking connection_established event",e)}})))).catch((e=>Ds(this,null,(function*(){if(this.status="disconnected",Zu(this.options))try{const t=yield ko(this.options,this.storage);bo(e)?Wi.track("mmconnect_connection_rejected",Ps(Ts({},t),{transport_type:n})):Wi.track("mmconnect_connection_failed",Ts(Ps(Ts({},t),{transport_type:n}),Eo(e)))}catch(t){Uu("Error tracking connection failed/rejected event",e)}throw e}))))}))},Bu=function(){return Ds(this,null,(function*(){var e;let t={sessionScopes:{},sessionProperties:{}};if(null==(e=$s(this,mu))?void 0:e.isConnected())try{const e=yield $s(this,mu).request({method:"wallet_getSession"});e.result&&(t=e.result)}catch(e){}return t}))},Du=function(){return Ds(this,null,(function*(){var e,t;const{ui:n}=this.options,{showInstallModal:r=!1}=null!=n?n:{};if(!(oo()&&!r))return;const i=yield null==(e=$s(this,mu))?void 0:e.getStoredPendingSessionRequest();if(!i)return;const s={sessionRequest:i,metadata:Bs(this,bu,Ru).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"):$o(this.options,o,a)}))};var Hu=class e extends Ks{constructor(e){var t,n,r,i;const s=function(e){var t,n;const r=so(),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=Ps(Ts({},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=Ps(Ts({},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=Ro();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(Ps(Ts({},s),{ui:Ps(Ts({},s.ui),{preferExtension:null==(t=s.ui.preferExtension)||t,showInstallModal:null!=(n=s.ui.showInstallModal)&&n,headless:null!=(r=s.ui.headless)&&r}),analytics:Wu(e.analytics),versions:Ts({"connect-multichain":Io()},null!=(i=e.versions)?i:{})})),Fs(this,bu),Fs(this,fu),Fs(this,pu),Fs(this,mu),Fs(this,gu),Fs(this,vu),Fs(this,_u),this._status="pending",Fs(this,wu),Fs(this,yu),Fs(this,ku,`Sdk/Javascript SdkVersion/${Io()} Platform/${so()} dApp/${null!=(du=this.options.dapp.url)?du:this.options.dapp.name} dAppTitle/${this.options.dapp.name}`),zs(this,pu,new class{constructor(e,t){this.metamaskConnectMultichain=e,Fs(this,ou),Fs(this,iu,new Set),Fs(this,su),zs(this,su,t)}isTransportDefined(){return void 0!==$s(this,su).call(this)}isTransportConnected(){var e,t;return null!=(t=null==(e=$s(this,su).call(this))?void 0:e.isConnected())&&t}clearNotificationCallbacks(){$s(this,iu).clear()}notifyCallbacks(e){$s(this,iu).forEach((t=>{t(e)}))}clearTransportNotificationListener(){var e;null==(e=this.notificationListener)||e.call(this),this.notificationListener=void 0}setupTransportNotificationListener(){const e=$s(this,su).call(this);e&&!this.notificationListener&&(this.notificationListener=e.onNotification(this.notifyCallbacks.bind(this)))}connect(){return Ds(this,null,(function*(){return Promise.resolve()}))}disconnect(){return Ds(this,null,(function*(){return Promise.resolve()}))}isConnected(){return!0}request(e){return Ds(this,arguments,(function*(e,t={}){const n=Mo(),r=Ts({id:n,jsonrpc:"2.0"},e);switch(r.method){case"wallet_createSession":return Bs(this,ou,au).call(this,r);case"wallet_getSession":return Bs(this,ou,uu).call(this,r);case"wallet_revokeSession":return Bs(this,ou,cu).call(this,r);case"wallet_invokeMethod":return Bs(this,ou,lu).call(this,r);default:throw new Error(`Unsupported method: ${r.method}`)}}))}onNotification(e){return this.setupTransportNotificationListener(),$s(this,iu).add(e),()=>{$s(this,iu).delete(e)}}}(this,(()=>$s(this,mu)))),zs(this,fu,Br({transport:$s(this,pu)}))}get status(){return this._status}set status(e){this._status!==e&&(this._status=e,this.emit("stateChanged",e))}get provider(){return $s(this,fu)}get dappClient(){if(!$s(this,gu))throw new Error("DappClient not initialized, establish connection first");return $s(this,gu)}get transportType(){var e;return null!=(e=$s(this,_u))?e:"unknown"}get storage(){return this.options.storage}get version(){return Io()}static create(t){return Ds(this,null,(function*(){var n;const r=No(),i=r[qu];if(i){const r=yield i;return r.version!==Io()&&console.warn(`MetaMask Connect does not support using multiple versions of @metamask/connect-multichain. Attempted to create a new instance with version ${Io()}, 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 Bs(n=r,bu,Au).call(n):yield Gu(r.options,r.storage),t.debug&&ds("metamask-sdk:*"),r}const s=Ds(null,null,(function*(){var n;const r=new e(t);return(yield fs("metamask-sdk:core",r.options.storage))&&ds("metamask-sdk:core"),yield Bs(n=r,bu,xu).call(n),r})).catch((e=>{throw r[qu]=void 0,console.error("Error initializing MetaMaskConnectMultichain",e),e}));return r[qu]=s,s}))}connect(e,t,n,r){return Ds(this,null,(function*(){var i;if("connecting"===this.status&&"mwp"===$s(this,_u))throw yield Bs(this,bu,Du).call(this),new Error("Existing connection is pending. Please check your MetaMask Mobile app to continue.");const{ui:s}=this.options,o=so(),a="in-app-browser"===o||"web-desktop"===o,{preferExtension:u=!0,showInstallModal:c=!1}=s,l=oo(),h=yield ao();let d;if(d="in-app-browser"===o||a&&h&&u?"browser":"mwp",Zu(this.options))try{const t=yield ko(this.options,this.storage),n=Object.keys(this.options.api.supportedNetworks);Wi.track("mmconnect_connection_initiated",Ps(Ts({},t),{transport_type:d,dapp_configured_chains:n,dapp_requested_chains:e}))}catch(e){Uu("Error tracking connection_initiated event",e)}const f=yield Bs(this,bu,Bu).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:Ts(Ts({},e.sessionProperties),r)}}(f,e,t,n),v=Object.keys(null!=g?g:{}).length>0?g:void 0;if((null==(i=$s(this,mu))?void 0:i.isConnected())&&!l)return Bs(this,bu,zu).call(this,$s(this,mu).connect({scopes:p,caipAccountIds:m,sessionProperties:v,forceRequest:r}).then((()=>Ds(this,null,(function*(){return"mwp"===$s(this,_u)?this.storage.setTransportType("mwp"):this.storage.setTransportType("browser")})))),e,d);if("in-app-browser"===o){const t=yield Bs(this,bu,$u).call(this);return Bs(this,bu,zu).call(this,t.connect({scopes:p,caipAccountIds:m,sessionProperties:v,forceRequest:r}),e,d)}if(a&&h&&u){const t=yield Bs(this,bu,$u).call(this);return Bs(this,bu,zu).call(this,t.connect({scopes:p,caipAccountIds:m,sessionProperties:v,forceRequest:r}),e,d)}yield Bs(this,bu,Mu).call(this);const _=h?c:!u||c;return l&&!_?Bs(this,bu,zu).call(this,Bs(this,bu,Fu).call(this,p,m,v),e,d):Bs(this,bu,zu).call(this,Bs(this,bu,Lu).call(this,_,p,m,v),e,d)}))}disconnect(){return Ds(this,arguments,(function*(e=[]){var t,n,r;const i=yield Bs(this,bu,Bu).call(this),s=0===e.length?[]:Object.keys(i.sessionScopes).filter((t=>!e.includes(t)));yield null==(t=$s(this,mu))?void 0:t.disconnect(e),0===s.length&&(yield this.storage.removeTransportType(),"browser"!==$s(this,_u)&&(yield null==(n=$s(this,wu))?void 0:n.call(this),null==(r=$s(this,vu))||r.call(this),zs(this,wu,void 0),zs(this,vu,void 0),zs(this,mu,void 0),zs(this,_u,void 0),$s(this,pu).clearTransportNotificationListener(),zs(this,gu,void 0)),this.status="disconnected")}))}invokeMethod(e){return Ds(this,null,(function*(){var t;const n=Bs(this,bu,Eu).call(this),{options:r}=this,i=new class{constructor(e,t){this.config=e,this.sdkInfo=t}request(e){return Ds(this,null,(function*(){const{request:t}=e,n=JSON.stringify({jsonrpc:"2.0",method:t.method,params:t.params,id:xa+=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 Oa(`No RPC endpoint found for scope ${e}`);return i}fetchWithTimeout(e,t,n,r,i){return Ds(this,null,(function*(){const s=new AbortController,o=setTimeout((()=>s.abort()),i);try{const i=yield Gi(e,{method:n,headers:r,body:t,signal:s.signal});if(clearTimeout(o),!i.ok)throw new ns(e,n,i.status);return i}catch(e){if(clearTimeout(o),e instanceof ns)throw e;if(e instanceof Error&&"AbortError"===e.name)throw new os(`Request timeout after ${i}ms`);throw new os(e.message)}}))}parseResponse(e){return Ds(this,null,(function*(){try{return(yield e.json()).result}catch(e){throw new is(e.message)}}))}getHeaders(e){const t={Accept:"application/json","Content-Type":"application/json"};return e.includes("infura")?Ps(Ts({},t),{"Metamask-Sdk-Info":this.sdkInfo}):t}}(r,$s(this,ku)),s=new class{constructor(e,t,n,r){this.transport=e,this.rpcClient=t,this.config=n,this.transportType=r,Fs(this,Ma)}invokeMethod(e){return Ds(this,null,(function*(){const{method:t}=e.request;return Js.has(t)?this.handleWithEip1193Passthrough(e):Hs.has(t)?this.handleWithRpcNode(e):Vs.has(t)?this.handleWithSdkState(e):this.handleWithWallet(e)}))}handleWithEip1193Passthrough(e){return Ds(this,null,(function*(){return(yield this.transport.sendEip1193Message({method:e.request.method,params:e.request.params})).result}))}handleWithWallet(e){return Ds(this,null,(function*(){return Bs(this,Ma,Ta).call(this,e,(()=>Ds(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:{};oo()&&!i&&setTimeout((()=>Ds(this,null,(function*(){const e=yield this.transport.getActiveSession();if(!e)throw new Error("No active session found");const t=`${Ra}/mwp?id=${encodeURIComponent(e.id)}`;(null==r?void 0:r.preferredOpenLink)?r.preferredOpenLink(t,"_self"):$o(this.config,t,Ia)}))),10);const s=yield t;if(s.error)throw qa(s.error);return s.result}))))}))}handleWithRpcNode(e){return Ds(this,null,(function*(){try{return yield this.rpcClient.request(e)}catch(t){if(t instanceof Oa)return this.handleWithWallet(e);throw t}}))}handleWithSdkState(e){return Ds(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=$s(this,_u))?t:"unknown");return s.invokeMethod(e)}))}openSimpleDeeplinkIfNeeded(){const{ui:e,mobile:t}=this.options,{showInstallModal:n=!1}=null!=e?e:{};oo()&&!n&&setTimeout((()=>Ds(this,null,(function*(){const e=yield Bs(this,bu,Eu).call(this).getActiveSession();if(!e)throw new Error("No active session found");const n=`${Ra}/mwp?id=${encodeURIComponent(e.id)}`;(null==t?void 0:t.preferredOpenLink)?t.preferredOpenLink(n,"_self"):$o(this.options,n,Ia)}))),10)}emitSessionChanged(){return Ds(this,null,(function*(){var e,t;const n={sessionScopes:{}};if(!(null==(e=$s(this,mu))?void 0:e.isConnected()))return void this.emit("wallet_sessionChanged",n);const r=yield $s(this,mu).request({method:"wallet_getSession"});this.emit("wallet_sessionChanged",null!=(t=r.result)?t:n)}))}};Us();var Vu=class e extends es{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}};Vu.code=60;var Ju=Vu,Xu=class e extends es{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}};Xu.code=61;var Ku=Xu,Yu=class e extends es{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}};Yu.code=62;var Qu=Yu;ro(),go();var ec=class extends co{constructor(e){super(),this.adapter=e}getTransportType(){return Ds(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 Ju(this.adapter.platform,"multichain-transport",e.message)}}))}setTransportType(e){return Ds(this,null,(function*(){try{yield this.adapter.set("multichain-transport",e)}catch(e){throw new Ku(this.adapter.platform,"multichain-transport",e.message)}}))}removeTransportType(){return Ds(this,null,(function*(){try{yield this.adapter.delete("multichain-transport")}catch(e){throw new Qu(this.adapter.platform,"multichain-transport",e.message)}}))}getAnonId(){return Ds(this,null,(function*(){try{const e=yield this.adapter.get("anonId");if(e)return e;const t=Ki();return yield this.adapter.set("anonId",t),t}catch(e){throw new Ju(this.adapter.platform,"anonId",e.message)}}))}getExtensionId(){return Ds(this,null,(function*(){try{return yield this.adapter.get("extensionId")}catch(e){throw new Ju(this.adapter.platform,"extensionId",e.message)}}))}setAnonId(e){return Ds(this,null,(function*(){try{return yield this.adapter.set("anonId",e)}catch(e){throw new Ku(this.adapter.platform,"anonId",e.message)}}))}setExtensionId(e){return Ds(this,null,(function*(){try{return yield this.adapter.set("extensionId",e)}catch(e){throw new Ku(this.adapter.platform,"extensionId",e.message)}}))}removeExtensionId(){return Ds(this,null,(function*(){try{return yield this.adapter.delete("extensionId")}catch(e){throw new Qu(this.adapter.platform,"extensionId",e.message)}}))}removeAnonId(){return Ds(this,null,(function*(){try{return yield this.adapter.delete("anonId")}catch(e){throw new Qu(this.adapter.platform,"anonId",e.message)}}))}getDebug(){return Ds(this,null,(function*(){try{return yield this.adapter.get("DEBUG")}catch(e){throw new Ju(this.adapter.platform,"DEBUG",e.message)}}))}};Po(),ta();var tc=class{constructor(e){this.options=e,this.platform=so(),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 Ds(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=Lo(JSON.stringify(e)),n=encodeURIComponent(t);return`${Ra}/mwp?p=${n}&c=1`}createConnectionUniversalLink(e){if(!e)return`${Ia}`;const t=Lo(JSON.stringify(e)),n=encodeURIComponent(t);return`${Ia}/mwp?p=${n}&c=1`}onCloseModal(e=!0){return Ds(this,null,(function*(){return this.unload(e?new Error("User closed modal"):void 0)}))}onStartDesktopOnboarding(){(new Es).startOnboarding()}renderInstallModal(e,t,n,r){return Ds(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=>Ds(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 Ds(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 nc=class extends tc{preload(){return Ds(this,null,(function*(){return function(){return Ds(this,null,(function*(){if("undefined"!=typeof document)try{const{defineCustomElements:e}=yield Promise.resolve().then((function(){return require("./index-b64e1d7e.cjs")})).then((function(e){return e.index}));e()}catch(e){console.error("Failed to load customElements:",e)}}))}()}))}};Po();var rc=e=>Ds(null,null,(function*(){e.debug&&ds("metamask-sdk:*");const t=yield Promise.resolve().then((()=>(ka(),ya)));let n;if(e.storage)n=e.storage;else{const{StoreAdapterWeb:e}=yield Promise.resolve().then((()=>(Sa(),Aa))),t=new e;n=new ec(t)}const r=new nc(t);return Hu.create(Ps(Ts({},e),{storage:n,ui:Ps(Ts({},e.ui),{factory:r})}))}));function ic(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class sc extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}function oc(e,t="Assertion failed.",n=sc){if(!e){if(t instanceof Error)throw t;throw ic(n,t)}}const{memoize:ac}=Q,uc=/^(?:0x)?[0-9a-f]+$/iu,cc=/^0x[0-9a-f]{40}$/u,lc=/^0x[0-9a-fA-F]{40}$/u;R(C(),uc),R(C(),/^0x[0-9a-f]+$/iu),R(C(),cc),R(C(),lc);const hc=e=>"string"==typeof e;function dc(e){return hc(e)&&lc.test(e)}function fc(e){oc(function(e){return hc(e)&&uc.test(e)}(e),"Value must be a hexadecimal string.")}const pc=ac((function(e){oc(dc(e),"Invalid hex address.");const t=function(e){if(e.startsWith("0x")||e.startsWith("0X"))return e.substring(2);return e}(e).toLowerCase(),n=K(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 mc=ac((function(e){return!!dc(e)&&pc(e)===e}));function gc(e,t){return k(e,(e=>"string"==typeof e&&t.test(e)))}ac((function(e){return hc(t=e)&&cc.test(t)||mc(e);var t}));const vc=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,_c=/^[-a-z0-9]{3,8}$/u,wc=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u;var yc;function bc(e){const t=wc.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}}}gc("CaipChainId",vc),gc("CaipNamespace",_c),gc("CaipReference",/^[-_a-zA-Z0-9]{1,32}$/u),gc("CaipAccountId",wc),gc("CaipAccountAddress",/^[-.%a-zA-Z0-9]{1,128}$/u),gc("CaipAssetNamespace",/^[-a-z0-9]{3,8}$/u),gc("CaipAssetReference",/^[-.%a-zA-Z0-9]{1,128}$/u),gc("CaipTokenId",/^[-.%a-zA-Z0-9]{1,78}$/u),gc("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),gc("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),gc("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"}(yc=yc||(yc={}));const Ec=e=>{fc(e);const t=parseInt(e,16);return oc(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};var kc={exports:{}};var Ac={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 Sc="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}=Ac,s=Sc,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*$")}(kc,kc.exports);const Cc=Object.freeze({loose:!0}),Ic=Object.freeze({});var Rc=e=>e?"object"!=typeof e?Cc:e:Ic;const xc=/^[0-9]+$/,Oc=(e,t)=>{if("number"==typeof e&&"number"==typeof t)return e===t?0:e<t?-1:1;const n=xc.test(e),r=xc.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var Mc={compareIdentifiers:Oc,rcompareIdentifiers:(e,t)=>Oc(t,e)};const Tc=Sc,{MAX_LENGTH:Pc,MAX_SAFE_INTEGER:Nc}=Ac,{safeRe:Lc,t:jc}=kc.exports,$c=Rc,{compareIdentifiers:Fc}=Mc;class zc{constructor(e,t){if(t=$c(t),e instanceof zc){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>Pc)throw new TypeError(`version is longer than ${Pc} characters`);Tc("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Lc[jc.LOOSE]:Lc[jc.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>Nc||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nc||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nc||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<Nc)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(Tc("SemVer.compare",this.version,this.options,e),!(e instanceof zc)){if("string"==typeof e&&e===this.version)return 0;e=new zc(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof zc||(e=new zc(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 zc||(e=new zc(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(Tc("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 Fc(n,r)}while(++t)}compareBuild(e){e instanceof zc||(e=new zc(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(Tc("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 Fc(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?Lc[jc.PRERELEASELOOSE]:Lc[jc.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!==Fc(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 Bc=zc;const Dc=Bc;var Uc=(e,t,n=!1)=>{if(e instanceof Dc)return e;try{return new Dc(e,t)}catch(e){if(!n)return null;throw e}};const qc=Uc;var Wc=(e,t)=>{const n=qc(e,t);return n?n.version:null};const Zc=Uc;var Gc=(e,t)=>{const n=Zc(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const Hc=Bc;var Vc=(e,t,n,r,i)=>{"string"==typeof n&&(i=r,r=n,n=void 0);try{return new Hc(e instanceof Hc?e.version:e,n).inc(t,r,i).version}catch(e){return null}};const Jc=Uc;var Xc=(e,t)=>{const n=Jc(e,null,!0),r=Jc(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 Kc=Bc;var Yc=(e,t)=>new Kc(e,t).major;const Qc=Bc;var el=(e,t)=>new Qc(e,t).minor;const tl=Bc;var nl=(e,t)=>new tl(e,t).patch;const rl=Uc;var il=(e,t)=>{const n=rl(e,t);return n&&n.prerelease.length?n.prerelease:null};const sl=Bc;var ol=(e,t,n)=>new sl(e,n).compare(new sl(t,n));const al=ol;var ul=(e,t,n)=>al(t,e,n);const cl=ol;var ll=(e,t)=>cl(e,t,!0);const hl=Bc;var dl=(e,t,n)=>{const r=new hl(e,n),i=new hl(t,n);return r.compare(i)||r.compareBuild(i)};const fl=dl;var pl=(e,t)=>e.sort(((e,n)=>fl(e,n,t)));const ml=dl;var gl=(e,t)=>e.sort(((e,n)=>ml(n,e,t)));const vl=ol;var _l=(e,t,n)=>vl(e,t,n)>0;const wl=ol;var yl=(e,t,n)=>wl(e,t,n)<0;const bl=ol;var El=(e,t,n)=>0===bl(e,t,n);const kl=ol;var Al=(e,t,n)=>0!==kl(e,t,n);const Sl=ol;var Cl=(e,t,n)=>Sl(e,t,n)>=0;const Il=ol;var Rl=(e,t,n)=>Il(e,t,n)<=0;const xl=El,Ol=Al,Ml=_l,Tl=Cl,Pl=yl,Nl=Rl;var Ll=(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 xl(e,n,r);case"!=":return Ol(e,n,r);case">":return Ml(e,n,r);case">=":return Tl(e,n,r);case"<":return Pl(e,n,r);case"<=":return Nl(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const jl=Bc,$l=Uc,{safeRe:Fl,t:zl}=kc.exports;var Bl=(e,t)=>{if(e instanceof jl)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?Fl[zl.COERCERTLFULL]:Fl[zl.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?Fl[zl.COERCEFULL]:Fl[zl.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 $l(`${r}.${i}.${s}${o}${a}`,t)};const Dl=Uc,Ul=Ac,ql=Bc,Wl=(e,t)=>{const n=e instanceof ql?e.version:e;return Dl(n,t)},Zl=(e,t)=>{if(Gl(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()},Gl=e=>e.startsWith("pre");var Hl=(e,t,n)=>{if(!Ul.RELEASE_TYPES.includes(t))return null;const r=Wl(e,n);return r&&Zl(r,t)};var Vl,Jl,Xl,Kl,Yl=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 Ql(){if(Jl)return Vl;Jl=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}}Vl=t;const n=new Yl,r=Rc,i=eh(),s=Sc,o=Bc,{safeRe:a,src:u,t:c,comparatorTrimReplace:l,tildeTrimReplace:h,caretTrimReplace:d}=kc.exports,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:p}=Ac,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 Vl}function eh(){if(Kl)return Xl;Kl=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(">")))))))}}Xl=t;const n=Rc,{safeRe:r,t:i}=kc.exports,s=Ll,o=Sc,a=Bc,u=Ql();return Xl}const th=Ql();var nh=(e,t,n)=>{try{t=new th(t,n)}catch(e){return!1}return t.test(e)};const rh=Ql();var ih=(e,t)=>new rh(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const sh=Bc,oh=Ql();var ah=(e,t,n)=>{let r=null,i=null,s=null;try{s=new oh(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new sh(r,n)))})),r};const uh=Bc,ch=Ql();var lh=(e,t,n)=>{let r=null,i=null,s=null;try{s=new ch(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new uh(r,n)))})),r};const hh=Bc,dh=Ql(),fh=_l;var ph=(e,t)=>{e=new dh(e,t);let n=new hh("0.0.0");if(e.test(n))return n;if(n=new hh("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 hh(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!fh(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!fh(n,i)||(n=i)}return n&&e.test(n)?n:null};const mh=Ql();var gh=(e,t)=>{try{return new mh(e,t).range||"*"}catch(e){return null}};const vh=Bc,_h=eh(),{ANY:wh}=_h,yh=Ql(),bh=nh,Eh=_l,kh=yl,Ah=Rl,Sh=Cl;var Ch=(e,t,n,r)=>{let i,s,o,a,u;switch(e=new vh(e,r),t=new yh(t,r),n){case">":i=Eh,s=Ah,o=kh,a=">",u=">=";break;case"<":i=kh,s=Sh,o=Eh,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(bh(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===wh&&(e=new _h(">=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 Ih=Ch;var Rh=(e,t,n)=>Ih(e,t,">",n);const xh=Ch;var Oh=(e,t,n)=>xh(e,t,"<",n);const Mh=Ql();var Th=(e,t,n)=>(e=new Mh(e,n),t=new Mh(t,n),e.intersects(t,n));const Ph=nh,Nh=ol;const Lh=Ql(),jh=eh(),{ANY:$h}=jh,Fh=nh,zh=ol,Bh=[new jh(">=0.0.0-0")],Dh=[new jh(">=0.0.0")],Uh=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===$h){if(1===t.length&&t[0].semver===$h)return!0;e=n.includePrerelease?Bh:Dh}if(1===t.length&&t[0].semver===$h){if(n.includePrerelease)return!0;t=Dh}const r=new Set;let i,s,o,a,u,c,l;for(const t of e)">"===t.operator||">="===t.operator?i=qh(i,t,n):"<"===t.operator||"<="===t.operator?s=Wh(s,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&s){if(o=zh(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&&!Fh(e,String(i),n))return null;if(s&&!Fh(e,String(s),n))return null;for(const r of t)if(!Fh(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=qh(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=Wh(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))},qh=(e,t,n)=>{if(!e)return t;const r=zh(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},Wh=(e,t,n)=>{if(!e)return t;const r=zh(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var Zh=(e,t,n={})=>{if(e===t)return!0;e=new Lh(e,n),t=new Lh(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=Uh(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const Gh=kc.exports,Hh=Ac,Vh=Bc,Jh=Mc,Xh=(e,t,n)=>{const r=[];let i=null,s=null;const o=e.sort(((e,t)=>Nh(e,t,n)));for(const e of o){Ph(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 Kh,Yh,Qh,ed,td,nd,rd,id,sd,od,ad,ud,cd,ld={parse:Uc,valid:Wc,clean:Gc,inc:Vc,diff:Xc,major:Yc,minor:el,patch:nl,prerelease:il,compare:ol,rcompare:ul,compareLoose:ll,compareBuild:dl,sort:pl,rsort:gl,gt:_l,lt:yl,eq:El,neq:Al,gte:Cl,lte:Rl,cmp:Ll,coerce:Bl,truncate:Hl,Comparator:eh(),Range:Ql(),satisfies:nh,toComparators:ih,maxSatisfying:ah,minSatisfying:lh,minVersion:ph,validRange:gh,outside:Ch,gtr:Rh,ltr:Oh,intersects:Th,simplifyRange:Xh,subset:Zh,SemVer:Vh,re:Gh.re,src:Gh.src,tokens:Gh.t,SEMVER_SPEC_VERSION:Hh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Hh.RELEASE_TYPES,compareIdentifiers:Jh.compareIdentifiers,rcompareIdentifiers:Jh.rcompareIdentifiers},hd=Object.defineProperty,dd=Object.defineProperties,fd=Object.getOwnPropertyDescriptors,pd=Object.getOwnPropertySymbols,md=Object.prototype.hasOwnProperty,gd=Object.prototype.propertyIsEnumerable,vd=e=>{throw TypeError(e)},_d=(e,t,n)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wd=(e,t)=>{for(var n in t||(t={}))md.call(t,n)&&_d(e,n,t[n]);if(pd)for(var n of pd(t))gd.call(t,n)&&_d(e,n,t[n]);return e},yd=(e,t)=>dd(e,fd(t)),bd=(e,t,n)=>t.has(e)||vd("Cannot "+n),Ed=(e,t,n)=>(bd(e,t,"read from private field"),n?n.call(e):t.get(e)),kd=(e,t,n)=>t.has(e)?vd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ad=(e,t,n,r)=>(bd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Sd=(e,t,n)=>(bd(e,t,"access private method"),n),Cd=(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())})),Id=["metamask_getProviderState","metamask_sendDomainMetadata","metamask_logWeb3ShimUsage","wallet_registerOnboarding","net_version","wallet_getPermissions"],Rd=["eth_accounts","eth_coinbase",...Id,"wallet_requestPermissions","eth_requestAccounts","eth_chainId","wallet_revokePermissions","wallet_switchEthereumChain","wallet_addEthereumChain"],xd={"eip1193-compatible":!0},Od="metamask-connect:evm",Md=hs(Od,"63"),Td=()=>{ds(Od)},Pd="eip6963:announceProvider",Nd="eip6963:requestProvider",Ld=["io.metamask","io.metamask.mobile"],jd=()=>{const{window:e}=globalThis;return"function"==typeof(null==e?void 0:e.dispatchEvent)?e:void 0},$d=e=>Ld.some((t=>t===e)),Fd=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),zd=()=>{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,[Fd[e[0]],Fd[e[1]],Fd[e[2]],Fd[e[3]],"-",Fd[e[4]],Fd[e[5]],"-",Fd[e[6]],Fd[e[7]],"-",Fd[e[8]],Fd[e[9]],"-",Fd[e[10]],Fd[e[11]],Fd[e[12]],Fd[e[13]],Fd[e[14]],Fd[e[15]]].join("")))(t)}throw new Error("Web Crypto API is required for EIP-6963 announcement")},Bd=()=>Cd(null,null,(function*(){const e=jd();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(Pd,n);try{e.dispatchEvent((()=>{const{Event:e}=globalThis;return new e(Nd)})()),yield(e=>Cd(null,null,(function*(){return yield new Promise((t=>setTimeout(t,e)))})))(300)}finally{e.removeEventListener(Pd,n)}return[...t].some($d)}));Kh=new WeakMap,Yh=new WeakMap,Qh=new WeakMap,ed=new WeakMap,td=new WeakMap,nd=new WeakSet,rd=function(){return Cd(this,null,(function*(){if(jd()){if(yield Bd())return Md("MetaMask EIP-6963 provider is already announced. Skipping..."),void Ad(this,Qh,!0);Ad(this,Yh,Object.freeze({info:Object.freeze({uuid:zd(),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:Ed(this,Kh)})),Sd(this,nd,id).call(this),Sd(this,nd,sd).call(this)}}))},id=function(){const e=jd();e&&!Ed(this,ed)&&(Ad(this,ed,(()=>{try{Sd(this,nd,sd).call(this)}catch(e){Md("EIP-6963 provider announcement failed",e)}})),e.addEventListener(Nd,Ed(this,ed)))},sd=function(){const e=jd();e&&Ed(this,Yh)&&e.dispatchEvent((e=>{const{CustomEvent:t}=globalThis;return new t(Pd,{detail:e})})(Ed(this,Yh)))};var Dd=class extends ls{constructor(e,t){super(),kd(this,od),kd(this,ad),kd(this,ud,[]),kd(this,cd),Ad(this,od,e),Ad(this,ad,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 Cd(this,null,(function*(){var t,n,r,i;if(Md(`request: ${e.method} - chainId: ${this.selectedChainId}`,e.params),Rd.includes(e.method))return null==(t=Ed(this,ad))?void 0:t.call(this,e);if(!Ed(this,cd))throw new Error("No chain ID selected");const s=`eip155:${Ec(Ed(this,cd))}`,o=Ed(this,od).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 Ed(this,od).invokeMethod({scope:s,request:{method:e.method,params:e.params}})}catch(e){if(e instanceof us&&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){Ad(this,ud,e)}get accounts(){return Ed(this,ud)}get selectedChainId(){return Ed(this,cd)}set selectedChainId(e){Ad(this,cd,e)}get chainId(){return this.selectedChainId}sendAsync(e,t){return Cd(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)}};od=new WeakMap,ad=new WeakMap,ud=new WeakMap,cd=new WeakMap;var Ud=e=>{return"string"==typeof(t=e)&&_c.test(t)?{namespace:e}:function(e){return"string"==typeof e&&vc.test(e)}(e)?function(e){const t=vc.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}(e):{};var t},qd=e=>{const{namespace:t}=Ud(e);return t===yc.Eip155||e===`${yc.Wallet}:${yc.Eip155}`},Wd=e=>/^0x[0-9a-fA-F]+$/u.test(e),Zd=e=>Wd(e)?e:`0x${BigInt(e).toString(16)}`,Gd=e=>{if(!e)return[];const t=[];for(const n of Object.keys(e)){const{namespace:e,reference:r}=Ud(n);e===yc.Eip155&&r&&t.push(Zd(r))}return Array.from(new Set(t))};var Hd="0x1",Vd="cache_eth_chainId";function Jd(e){var t;return!1!==(null==(t=null==e?void 0:e.analytics)?void 0:t.enabled)}var Xd,Kd,Yd,Qd,ef,tf,nf,rf,sf,of,af,uf,cf,lf,hf,df,ff,pf,mf,gf,vf,_f,wf,yf,bf,Ef,kf,Af,Sf=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}},Cf=({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}]};Xd=new WeakMap,Kd=new WeakMap,Yd=new WeakMap,Qd=new WeakMap,ef=new WeakMap,tf=new WeakMap,nf=new WeakMap,rf=new WeakMap,sf=new WeakMap,of=new WeakMap,af=new WeakSet,uf=function(){return Ed(this,Xd).options},cf=function(e,t,n){return{scope:t,request:{method:e,params:n}}},lf=function(e,t,n){return Cd(this,null,(function*(){const r=Sd(this,af,uf).call(this);if(Jd(r))try{const i=Sd(this,af,cf).call(this,e,t,n),s=yield Ao(r,Ed(this,Xd).storage,i,Ed(this,Xd).transportType);Wi.track("mmconnect_wallet_action_requested",s)}catch(e){Md("Error tracking mmconnect_wallet_action_requested event",e)}}))},hf=function(e,t,n){return Cd(this,null,(function*(){const r=Sd(this,af,uf).call(this);if(Jd(r))try{const i=Sd(this,af,cf).call(this,e,t,n),s=yield Ao(r,Ed(this,Xd).storage,i,Ed(this,Xd).transportType);Wi.track("mmconnect_wallet_action_succeeded",s)}catch(e){Md("Error tracking mmconnect_wallet_action_succeeded event",e)}}))},df=function(e,t,n,r){return Cd(this,null,(function*(){const i=Sd(this,af,uf).call(this);if(Jd(i))try{const s=Sd(this,af,cf).call(this,e,t,n),o=yield Ao(i,Ed(this,Xd).storage,s,Ed(this,Xd).transportType);bo(r)?Wi.track("mmconnect_wallet_action_rejected",o):Wi.track("mmconnect_wallet_action_failed",o)}catch(e){Md("Error tracking wallet action rejected or failed event",r)}}))},ff=function(e){return Cd(this,null,(function*(){if(Ed(this,of)&&e.includes(Ed(this,of)))return Ed(this,of);try{const t=yield Ed(this,Xd).storage.adapter.get(Vd);if(t){const n=JSON.parse(t);if(e.includes(n))return n}}catch(e){Md("Error retrieving cached chainId",e)}return e[0]}))},pf=function(e){return Cd(this,null,(function*(){var t,n;if(Md(`Intercepting request for method: ${e.method}`),Id.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=Gd(Ed(this,Qd));0===i.length&&i.push(Hd);const s=Ed(this,Kd).selectedChainId,o=s&&i.includes(s)?s:i[0],a=[o,...i.filter((e=>e!==o))],u=`eip155:${Ec(o)}`;yield Sd(this,af,lf).call(this,n,u,r);try{const i=yield this.connect({chainIds:a,forceRequest:t});return yield Sd(this,af,hf).call(this,n,u,r),"eth_requestAccounts"===e.method?i.accounts:"wallet_requestPermissions"===e.method?Cf({accounts:i.accounts,chainIds:Gd(Ed(this,Qd)),invoker:Sf(Sd(this,af,uf).call(this))}):i}catch(e){throw yield Sd(this,af,df).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 Sd(this,af,gf).call(this,e.params[0]),null):function(e){return"eth_accounts"===e.method||"eth_coinbase"===e.method}(e)?"eth_coinbase"===e.method?null!=(t=Ed(this,Kd).selectedAccount)?t:null:Ed(this,Kd).accounts:function(e){return"eth_chainId"===e.method}(e)?Ed(this,Kd).selectedChainId:(Md("Request not intercepted, forwarding to default handler",e),Promise.resolve())}))},mf=function(){Ed(this,Kd).accounts=[],Ed(this,Kd).selectedChainId=void 0},gf=function(e){return Cd(this,null,(function*(){Md("addEthereumChain called",{chainConfiguration:e});const t="wallet_addEthereumChain";if(!e)throw new Error("No chain configuration found.");const n=e.chainId||Ed(this,Kd).selectedChainId||"0x1",r=`eip155:${Ec(n)}`,i=[e];yield Sd(this,af,lf).call(this,t,r,i);try{null===(yield Sd(this,af,vf).call(this,{scope:r,method:"wallet_addEthereumChain",params:i}))&&(yield Sd(this,af,_f).call(this,n),Sd(this,af,yf).call(this,n)),yield Sd(this,af,hf).call(this,t,r,i)}catch(e){throw yield Sd(this,af,df).call(this,t,r,i,e),e}}))},vf=function(e){return Cd(this,null,(function*(){Md("direct request to metamask-provider called",e);const t=Ed(this,Xd).invokeMethod({scope:e.scope,request:{method:e.method,params:e.params}});return"wallet_addEthereumChain"!==e.method&&"wallet_switchEthereumChain"!==e.method||Ed(this,Xd).openSimpleDeeplinkIfNeeded(),t}))},_f=function(e){return Cd(this,null,(function*(){try{yield Ed(this,Xd).storage.adapter.set(Vd,JSON.stringify(e))}catch(e){Md("Error caching chainId",e)}}))},wf=function(e){return Cd(this,null,(function*(){var t;Md("event: wallet_sessionChanged",e),Ad(this,Qd,null!=(t=null==e?void 0:e.sessionScopes)?t:{});const n=Gd(Ed(this,Qd));if(0===n.length)Sd(this,af,kf).call(this);else{let e=[];e="connected"===Ed(this,Xd).status?yield Ed(this,Xd).invokeMethod({scope:`eip155:${Ec(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}=bc(e);qd(r)&&Wd(n)&&t.push(n)}return Array.from(new Set(t))})(Ed(this,Qd));const t=yield Sd(this,af,ff).call(this,n);Sd(this,af,Ef).call(this,{chainId:t,accounts:e})}}))},yf=function(e){var t,n;e!==Ed(this,Kd).selectedChainId&&(Md("handler: chainChanged",{chainId:e}),Ed(this,Kd).selectedChainId=e,Ed(this,Kd).emit("chainChanged",e),null==(n=null==(t=Ed(this,ef))?void 0:t.chainChanged)||n.call(t,e))},bf=function(e){var t,n;e.length===Ed(this,Kd).accounts.length&&e.every(((e,t)=>e===Ed(this,Kd).accounts[t]))||(Md("handler: accountsChanged",e),Ed(this,Kd).accounts=e,Ed(this,Kd).emit("accountsChanged",e),null==(n=null==(t=Ed(this,ef))?void 0:t.accountsChanged)||n.call(t,e))},Ef=function({chainId:e,accounts:t}){var n,r,i,s,o,a,u;Md("handler: connect",{chainId:e,accounts:t});const c={chainId:e,accounts:t};if("connected"===Ed(this,sf))return Sd(this,af,yf).call(this,e),void Sd(this,af,bf).call(this,t);Ed(this,Kd).selectedChainId=e,Ed(this,Kd).accounts=t,Ad(this,sf,"connected"),Ed(this,Kd).emit("connect",c),null==(r=null==(n=Ed(this,ef))?void 0:n.connect)||r.call(n,c),Ed(this,Kd).emit("chainChanged",e),null==(s=null==(i=Ed(this,ef))?void 0:i.chainChanged)||s.call(i,e),Ed(this,Kd).emit("accountsChanged",t),null==(a=null==(o=Ed(this,ef))?void 0:o.accountsChanged)||a.call(o,t),null==(u=Ed(this,rf))||u.call(this);const l=e=>{Md("core-event: accountsChanged",e),Sd(this,af,bf).call(this,e)},h=e=>{Md("core-event: chainChanged",e.chainId),Sd(this,af,_f).call(this,e.chainId).catch((e=>{Md("Error caching chainId in notification handler",e)})),Sd(this,af,yf).call(this,e.chainId)};Ed(this,Xd).on("metamask_accountsChanged",l),Ed(this,Xd).on("metamask_chainChanged",h),Ad(this,rf,(()=>{Ed(this,Xd).off("metamask_accountsChanged",l),Ed(this,Xd).off("metamask_chainChanged",h)}))},kf=function(){var e,t;"disconnected"!==Ed(this,sf)&&(Ad(this,sf,"disconnected"),Md("handler: disconnect"),Ed(this,Kd).emit("disconnect"),null==(t=null==(e=Ed(this,ef))?void 0:e.disconnect)||t.call(e),Sd(this,af,bf).call(this,[]))},Af=function(e){var t,n;"connecting"===Ed(this,sf)&&(Md("handler: display_uri",e),Ed(this,Kd).emit("display_uri",e),null==(n=null==(t=Ed(this,ef))?void 0:t.displayUri)||n.call(t,e))};var If=class e{constructor({core:e,eventHandlers:t}){kd(this,af),kd(this,Xd),kd(this,Kd),kd(this,Yd),kd(this,Qd,{}),kd(this,ef),kd(this,tf),kd(this,nf),kd(this,rf),kd(this,sf,"disconnected"),kd(this,of),Ad(this,Xd,e),Ad(this,Kd,new Dd(e,Sd(this,af,pf).bind(this))),Ad(this,Yd,new class{constructor(e){kd(this,nd),kd(this,Kh),kd(this,Yh),kd(this,Qh,!1),kd(this,ed),kd(this,td),Ad(this,Kh,e)}announce(){return Cd(this,null,(function*(){try{if(Ed(this,Qh))return;if(Ed(this,Yh))return void Sd(this,nd,sd).call(this);Ed(this,td)||Ad(this,td,Sd(this,nd,rd).call(this).catch((e=>{Md("EIP-6963 provider announcement failed",e)})).finally((()=>{Ad(this,td,void 0)}))),yield Ed(this,td)}catch(e){Md("EIP-6963 provider announcement failed",e)}}))}}(Ed(this,Kd))),Ad(this,ef,t),Ad(this,tf,Sd(this,af,wf).bind(this)),Ed(this,Xd).on("wallet_sessionChanged",Ed(this,tf)),Ad(this,nf,Sd(this,af,Af).bind(this)),Ed(this,Xd).on("display_uri",Ed(this,nf)),Md("Connect/EVM constructor completed")}static create(t){return Cd(this,null,(function*(){var n;const r=new e(t);let i;try{i=yield Ed(r,Xd).provider.getSession()}catch(e){i={sessionScopes:{}}}return yield Sd(n=r,af,wf).call(n,i),r}))}connect(){return Cd(this,arguments,(function*({account:e,forceRequest:t,chainIds:n=[Hd]}={}){var r;if(Md("request: connect",{account:e}),!n||0===n.length)throw new Error("chainIds must be an array of at least one chain ID");Ad(this,of,n[0]);const i=Array.from(new Set(null!=(r=n.concat(Hd))?r:[Hd])).map((e=>`eip155:${Ec(e)}`)),s=e?i.map((t=>`${t}:${e}`)):[];Ad(this,sf,"connecting");try{const e=new Promise((e=>{Ed(this,Kd).once("connect",(({chainId:t,accounts:n})=>{Md("fulfilled-request: connect",{chainId:t,accounts:n}),e({accounts:n,chainId:t})}))}));return yield Ed(this,Xd).connect(i,s,xd,t),yield e}catch(e){throw Ad(this,sf,"disconnected"),Md("Error connecting to wallet",e),e}finally{Ad(this,of,void 0)}}))}connectAndSign(e){return Cd(this,arguments,(function*({message:e,chainIds:t}){var n,r;const{accounts:i,chainId:s}=yield this.connect({chainIds:null!=t?t:[Hd]}),o=yield Ed(this,Kd).request({method:"personal_sign",params:[i[0],e]});return null==(r=null==(n=Ed(this,ef))?void 0:n.connectAndSign)||r.call(n,{accounts:i,chainId:s,signature:o}),{accounts:i,chainId:s,signature:o}}))}connectWith(e){return Cd(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:[Hd],account:r,forceRequest:i}),c="function"==typeof t?t(a[0]):t,l=yield Ed(this,Kd).request({method:e,params:c});return null==(o=null==(s=Ed(this,ef))?void 0:s.connectWith)||o.call(s,{accounts:a,chainId:u,result:l}),{accounts:a,chainId:u,result:l}}))}disconnect(){return Cd(this,null,(function*(){var e;Md("request: disconnect");const t=Ed(this,Qd),n=Object.keys(t).filter((e=>{const{namespace:t}=Ud(e);return"eip155"===t}));yield Ed(this,Xd).disconnect(n),Sd(this,af,kf).call(this),Sd(this,af,mf).call(this),null==(e=Ed(this,rf))||e.call(this),Ad(this,rf,void 0),Md("fulfilled-request: disconnect")}))}switchChain(e){return Cd(this,arguments,(function*({chainId:e,chainConfiguration:t}){const n="wallet_switchEthereumChain",r=`eip155:${Ec(e)}`,i=[{chainId:e}];if(this.selectedChainId===e)return Promise.resolve();if(Gd(Ed(this,Qd)).includes(e)&&Ed(this,Xd).transportType===Xs.MWP)return yield Sd(this,af,_f).call(this,e),Sd(this,af,yf).call(this,e),Promise.resolve();yield Sd(this,af,lf).call(this,n,r,i);try{const t=yield Sd(this,af,vf).call(this,{scope:r,method:"wallet_switchEthereumChain",params:i});return yield Sd(this,af,hf).call(this,n,r,i),null===t&&(yield Sd(this,af,_f).call(this,e),Sd(this,af,yf).call(this,e)),Promise.resolve()}catch(e){yield Sd(this,af,df).call(this,n,r,i,e);if(e.message.includes("Unrecognized chain ID")&&t)return Sd(this,af,gf).call(this,t);throw e}}))}getProvider(){return Ed(this,Kd)}announceProvider(){return Cd(this,null,(function*(){yield Ed(this,Yd).announce()}))}getChainId(){return this.selectedChainId}getAccount(){return Ed(this,Kd).selectedAccount}get accounts(){return Ed(this,Kd).accounts}get selectedAccount(){return Ed(this,Kd).selectedAccount}get selectedChainId(){return Ed(this,Kd).selectedChainId}get status(){return Ed(this,sf)}};function Rf(e){return Cd(this,null,(function*(){var t,n,r;if(e.debug&&Td(),Md("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 rc(yd(wd({},e),{api:{supportedNetworks:i},analytics:yd(wd({},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||ld.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 If.create({core:t,eventHandlers:e.eventHandlers,supportedNetworks:e.api.supportedNetworks});return e.skipAutoAnnounce||o.announceProvider().catch((e=>{Md("EIP-6963 provider announcement failed",e)})),o}catch(e){throw console.error("Error creating Metamask Connect/EVM",e),e}}))}exports.default=async function(t,n){const r={};t.rpc&&Object.entries(t.rpc).forEach((([e,t])=>{const n=`0x${Number(e).toString(16)}`;r[n]=t}));const i=await Rf({dapp:{name:t.appName??"DODO",iconUrl:t.appLogoUrl},api:{supportedNetworks:r},mobile:{useDeeplink:!0}}),s=i.getProvider(),o=()=>n.disconnect(void 0),a=e=>n.message(e.type,e.data);s.removeListener("connect",n.connect),s.removeListener("disconnect",o),s.removeListener("accountsChanged",n.accountsChanged),s.removeListener("chainChanged",n.chainChanged),s.removeListener("message",a);try{s.on("connect",n.connect),s.on("disconnect",o),s.on("accountsChanged",n.accountsChanged),s.on("chainChanged",n.chainChanged),s.on("message",a)}catch(e){}const{accounts:u}=await i.connect();if(!u||0===u.length)throw new Error("MetaMask Connect: no accounts returned");return await e.convertWeb3Provider(s)};