PageSourceSearch

https://www.fagot.ai/_next/static/chunks/3464-73b77c1e40fc3390.js

js fagot.ai collected 2026-09-30 21:15:33 UTC 1,077,688 bytes, 68 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3464],{254:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEARTBEAT_EVENTS=t.HEARTBEAT_INTERVAL=void 0;let n=r(77271);t.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,t.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},47762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(67197).__exportStar(r(254),t)},13236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartBeat=void 0;let n=r(67197),i=r(60429),s=r(77271),a=r(32666),o=r(47762);class l extends a.IHeartBeat{constructor(e){super(e),this.events=new i.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||o.HEARTBEAT_INTERVAL}static init(e){return n.__awaiter(this,void 0,void 0,function*(){let t=new l(e);return yield t.init(),t})}init(){return n.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return n.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),s.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}t.HeartBeat=l},89380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(67197);n.__exportStar(r(13236),t),n.__exportStar(r(32666),t),n.__exportStar(r(47762),t)},53414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeartBeat=void 0;let n=r(96669);class i extends n.IEvents{constructor(e){super()}}t.IHeartBeat=i},32666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(67197).__exportStar(r(53414),t)},67197:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>s,__asyncDelegator:()=>w,__asyncGenerator:()=>v,__asyncValues:()=>x,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>S,__createBinding:()=>h,__decorate:()=>o,__exportStar:()=>p,__extends:()=>i,__generator:()=>d,__importDefault:()=>C,__importStar:()=>
1_,__makeTemplateObject:()=>E,__metadata:()=>c,__param:()=>l,__read:()=>m,__rest:()=>a,__spread:()=>y,__spreadArrays:()=>b,__values:()=>f});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}function d(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function b(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){
1s.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{var r;(r=i[e](t)).value instanceof g?Promise.resolve(r.value.v).then(l,c):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function l(e){o("next",e)}function c(e){o("throw",e)}function u(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},53479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{html:t,height:r=null,width:s=null,children:a,dataNtpc:o=""}=e;return(0,i.useEffect)(()=>{o&&performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-".concat(o)}})},[o]),(0,n.jsxs)(n.Fragment,{children:[a,t?(0,n.jsx)("div",{style:{height:null!=r?"".concat(r,"px"):"auto",width:null!=s?"".concat(s,"px"):"auto"},"data-ntpc":o,dangerouslySetInnerHTML:{__html:t}}):null]})};let n=r(95155),i=r(12115)},60766:(e,t,r)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:o="dataLayer",nonce:l}=e;return void 0===n&&(n=o),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:"\n          window['".concat(o,"'] = window['").concat(o,"'] || [];\n          function gtag(){window['").concat(o,"'].push(arguments);}\n          gtag('js', new Date());\n\n          gtag('config', '").concat(t,"' ").concat(r?",{ 'debug_mode': true }":"",");")},nonce:l}),(0,i.jsx)(a.default,{id:"_next-ga",src:"https://www.googletagmanager.com/gtag/js?id=".concat(t),nonce:l})]})},t.sendGAEvent=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(void 0===n){console.warn("@next/third-parties: GA has not been initialized");return}window[n]?window[n].push(arguments):console.warn("@next/third-parties: GA dataLayer ".concat(n," does not exist"))};let i=r(95155),s=r(12115),a=function(e){return e&&e.__esModule?e:{default:e}}(r(54203))},48239:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{apiKey:t,...r}=e,n={...r,key:t},{html:o}=(0,s.GoogleMapsEmbed)(n);return(0,i.jsx)(a.default,{height:n.height||null,width:n.width||null,html:o,dataNtpc:"GoogleMapsEmbed"})};let i=r(95155),s=r(97949),a=n(r(53479))},80096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r="https://www.googletagmanager.com/gtm.js",dataLayerName:o="dataLayer",auth:l,preview:c,dataLayer:u,nonce:d}=e;a=o;let h="dataLayer"!==o?"&l=".concat(o):"";return(0,i.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:"\n      (function(w,l){\n        w[l]=w[l]||[];\n        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});\n        ".concat(u?"w[l].push(".concat(JSON.stringify(u),")"):"","\n      })(window,'").concat(o,"');")}
1,nonce:d}),(0,n.jsx)(s.default,{id:"_next-gtm","data-ntpc":"GTM",src:"".concat(r,"?id=").concat(t).concat(h).concat(l?"&gtm_auth=".concat(l):"").concat(c?"&gtm_preview=".concat(c,"&gtm_cookies_win=x"):""),nonce:d})]})};let n=r(95155),i=r(12115),s=function(e){return e&&e.__esModule?e:{default:e}}(r(54203)),a="dataLayer";t.sendGTMEvent=(e,t)=>{let r=t||a;window[r]=window[r]||[],window[r].push(e)}},1046:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=t.sendGTMEvent=t.GoogleTagManager=t.YouTubeEmbed=t.GoogleMapsEmbed=void 0;var i=r(48239);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return n(i).default}});var s=r(72175);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return n(s).default}});var a=r(80096);Object.defineProperty(t,"GoogleTagManager",{enumerable:!0,get:function(){return a.GoogleTagManager}}),Object.defineProperty(t,"sendGTMEvent",{enumerable:!0,get:function(){return a.sendGTMEvent}});var o=r(60766);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return o.GoogleAnalytics}}),Object.defineProperty(t,"sendGAEvent",{enumerable:!0,get:function(){return o.sendGAEvent}})},72175:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{html:t,scripts:r,stylesheets:n}=(0,a.YouTubeEmbed)(e);return(0,i.jsx)(o.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==r?void 0:r.map(e=>(0,i.jsx)(s.default,{src:e.url,strategy:l[e.strategy],stylesheets:n},e.url))})};let i=r(95155),s=n(r(54203)),a=r(97949),o=n(r(53479)),l={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"}},98131:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function n(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.anumber=r,t.abytes=n,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")},t.aoutput=function(e,t){n(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}},21650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=void 0,t.fromBig=i,t.split=s,t.add=v;let r=BigInt(0x100000000-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function s(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){let{h:a,l:o}=i(e[s],t);[r[s],n[s]]=[a,o]}return[r,n]}let a=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=a;let o=(e,t,r)=>e>>>r;t.shrSH=o;let l=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=l;let c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;let u=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=u;let d=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=d;let h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;let p=(e,t)=>t;t.rotr32H=p;let f=(e,t)=>e;t.rotr32L=f;let m=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=m;let y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;let b=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=b;let g=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}}t.rotlBL=g;let w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;let x=(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0;t.add3H=x;let E=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=E;let _=(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0;t.add4H=_;let C=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=C;let k=(e,t,r,n,i,s)=>t+r+n+i+s+(e/0x100000000|0)|0;t.add5H=k,t.default={fromBig:i,split:s,toBig:a,shrSH:o,shrSL:l,rotrSH:c,rotrSL:u,rotrBH:d,rotrBL:h,rotr32H:p,rotr32L:f,rotlSH:m,rotlSL:y,rotlBH:b,rotlBL:g,add:v,add3L:w,add3H:x,add4L:E,add4H:_,add5H:k,add5L:C}},75501:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},28307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=v;let n=r(98131),i=r(21650),s=r(68237),a=[],o=[],l=[],c=BigInt(0),u=BigInt(1),d=BigInt(2),h=BigInt(7),p=BigInt(256),f=BigInt(113);for(let e=0,t=u,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),o.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)(t=(t<<u^(t>>h)*f)%p)&d&&(i^=u<<(u<<BigInt(e))-u);l.push(i)}let[m,y]=(0,i.split)(l,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),g=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function v(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,s=r[i],a=r[i+1],o=b(s,a,1)^r[n],l=g(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=o[r],s=b(t,i,n),l=g(t,i,n),c=a[r];t=e[c],i=e[c+1],e[c]=s,e[c+1]=l}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=y[n]}r.fill(0)}class w extends s.Hash{constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.anumber)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}keccak(){s.isLE||(0,s.byteSwap32)(this.state32),v(this.state32,this.rounds),s.isLE||(0,s.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.aexists)(this);let{blockLen:t,state:r}=this,i=(e=(0,s.toBytes)(e)).length;for(let n=0;n<i;){let s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.aexists)(this,!1),(0,n.abytes)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.aoutput)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new w(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}t.Keccak=w;let x=(e,t,r)=>(0,s.wrapConstructor)(()=>new w(t,e,r));t.sha3_224=x(6,144,28),t.sha3_256=x(6,136,32),t.sha3_384=x(6,104,48),t.sha3_512=x(6,72,64),t.keccak_224=x(1,144,28),t.keccak_256=x(1,136,32),t.keccak_384=x(1,104,48),t.keccak_512=x(1,72,64);let E=(e,t,r)=>(0,s.wrapXOFConstructorWithOpts)((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},68237:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.nextTick=t.byteSwapIfBE=t.isLE=void 0,t.isBytes=function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=s,t.byteSwap32=function(e){for(let t=0;t<e.length;t++)e[t]=s(e[t])},t.bytesToHex=function(e){(0,i.abytes)(e);let t="";for(let r=0;r<e.length;r++)t+=a[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=l(e.charCodeAt(i)),s=l(e.charCodeAt(i+1));if(void 0===r||void 0===s)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+s}return n},t.asyncLoop=u,t.utf8ToBytes=d,t.toBytes=h,t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];(0,i.abytes)(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==({}).toString.call(t))throw Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){let t=t=>e().update(h(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(h(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(h(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return n.crypto.randomBytes(e);throw Error("crypto.getRandomValues must be defined")};let n=r(75501),i=r(98131);function s(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}t.isLE=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],t.byteSwapIfBE=t.isLE?e=>e:e=>s(e);let a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),o={_0:48,_9:57,A:65,F:70,a:97,f:102};function l(e){return e>=o._0&&e<=o._9?e-o._0:e>=o.A&&e<=o.F?e-(o.A-10):e>=o.a&&e<=o.f?e-(o.a-10):void 0}let c=async()=>{};async function u(e,r,n){let i=Date.now();for(let s=0;s<e;s++){n(s);let e=Date.now()-i;e>=0&&e<r||(await (0,t.nextTick)(),i+=e)}}function d(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function h(e){return"string"==typeof e&&(e=d(e)),(0,i.abytes)(e),e}t.nextTick=c;class p{clone(){return this._cloneInto()}}t.Hash=p},19064:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n=r(98212);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function s(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function a(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function o(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function l(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function c(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),u(e/0x100000000>>>0,t,r),u(e>>>0,t,r+4),t}function p(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),d(e>>>0,t,r),d(e/0x100000000>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=s,t.writeInt16LE=s,t.readInt32BE=a,t.readUint32BE=o,t.readInt32LE=l,t.readUint32LE=c,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=a(e,t),n=a(e,t+4);return 0x100000000*r+n-(n>>31)*0x100000000},t.readUint64BE=function(e,t){return void 0===t&&(t=0),0x100000000*o(e,t)+o(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=l(e,t);return 0x100000000*l(e,t+4)+r-(r>>31)*0x100000000},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 0x100000000*c(e,t+4)+r},t.writeUint64BE=h,t.writeInt64BE=h,t.writeUint64LE=p,t.writeInt64LE=p,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw Error("readUintBE: array is too short for the given b
1itLength");for(var n=0,i=1,s=e/8+r-1;s>=r;s--)n+=t[s]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s<r+e/8;s++)n+=t[s]*i,i*=256;return n},t.writeUintBE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw Error("writeUintBE value must be an integer");for(var s=1,a=e/8+i-1;a>=i;a--)r[a]=t/s&255,s*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw Error("writeUintLE value must be an integer");for(var s=1,a=i;a<i+e/8;a++)r[a]=t/s&255,s*=256;return r},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},t.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},t.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},t.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}},17074:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19064),i=r(29987);function s(e,t,r,s,a){if(void 0===a&&(a=0),32!==e.length)throw Error("ChaCha: key size must be 32 bytes");if(s.length<r.length)throw Error("ChaCha: destination is shorter than source");if(0===a){if(8!==t.length&&12!==t.length)throw Error("ChaCha nonce must be 8 or 12 bytes");l=(o=new Uint8Array(16)).length-t.length,o.set(t,l)}else{if(16!==t.length)throw Error("ChaCha nonce with counter must be 16 bytes");o=t,l=a}for(var o,l,c=new Uint8Array(64),u=0;u<r.length;u+=64){!function(e,t,r){for(var i=r[3]<<24|r[2]<<16|r[1]<<8|r[0],s=r[7]<<24|r[6]<<16|r[5]<<8|r[4],a=r[11]<<24|r[10]<<16|r[9]<<8|r[8],o=r[15]<<24|r[14]<<16|r[13]<<8|r[12],l=r[19]<<24|r[18]<<16|r[17]<<8|r[16],c=r[23]<<24|r[22]<<16|r[21]<<8|r[20],u=r[27]<<24|r[26]<<16|r[25]<<8|r[24],d=r[31]<<24|r[30]<<16|r[29]<<8|r[28],h=t[3]<<24|t[2]<<16|t[1]<<8|t[0],p=t[7]<<24|t[6]<<16|t[5]<<8|t[4],f=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],y=0x61707865,b=0x3320646e,g=0x79622d32,v=0x6b206574,w=i,x=s,E=a,_=o,C=l,k=c,S=u,A=d,T=h,I=p,P=f,O=m,D=0;D<20;D+=2)T^=y=y+w|0,w^=C=C+(T=T>>>16|T<<16)|0,w=w>>>20|w<<12,I^=b=b+x|0,x^=k=k+(I=I>>>16|I<<16)|0,x=x>>>20|x<<12,P^=g=g+E|0,E^=S=S+(P=P>>>16|P<<16)|0,E=E>>>20|E<<12,O^=v=v+_|0,_^=A=A+(O=O>>>16|O<<16)|0,_=_>>>20|_<<12,P^=g=g+E|0,E^=S=S+(P=P>>>24|P<<8)|0,E=E>>>25|E<<7,O^=v=v+_|0,_^=A=A+(O=O>>>24|O<<8)|0,_=_>>>25|_<<7,I^=b=b+x|0,x^=k=k+(I=I>>>24|I<<8)|0,x=x>>>25|x<<7,T^=y=y+w|0,w^=C=C+(T=T>>>24|T<<8)|0,w=w>>>25|w<<7,O^=y=y+x|0,x^=S=S+(O=O>>>16|O<<16)|0,x=x>>>20|x<<12,T^=b=b+E|0,E^=A=A+(T=T>>>16|T<<16)|0,E=E>>>20|E<<12,I^=g=g+_|0,_^=C=C+(I=I>>>16|I<<16)|0,_=_>>>20|_<<12,P^=v=v+w|0,w^=k=k+(P=P>>>16|P<<16)|0,w=w>>>20|w<<12,I^=g=g+_|0,_^=C=C+(I=I>>>24|I<<8)|0,_=_>>>25|_<<7,P^=v=v+w|0,w^=k=k+(P=P>>>24|P<<8)|0,w=w>>>25|w<<7,T^=b=b+E|0,E^=A=A+(T=T>>>24|T<<8)|0,E=E>>>25|E<<7,O^=y=y+x|0,x^=S=S+(O=O>>>24|O<<8)|0,x=x>>>25|x<<7;n.writeUint32LE(y+0x61707865|0,e,0),n.writeUint32LE(b+0x3320646e|0,e,4),n.writeUint32LE(g+0x79622d32|0,e,8),n.writeUint32LE(v+0x6b206574|0,e,12),n.writeUint32LE(w+i|0,e,16),n.writeUint32LE(x+s|0,e,20),n.writeUint32LE(E+a|0,e,24),n.writeUint32LE(_+o|0,e,28),n.writeUint32LE(C+l|0,e,32),n.writeUint32LE(k+c|0,e,36),n.writeUint32LE(S+u|0,e,40),n.writeUint32LE(A+d|0,e,44),n.writeUint32LE(T+h|0,e,48),n.writeUint32LE(I+p|0,e,52),n.writeUint32LE(P+f|0,e,56),n.writeUint32LE(O+m|0,e,60)}(c,o,e);for(var d=u;d<u+64&&d<r.length;d++)s[d]=r[d]^c[d-u];!function(e,t,r){for(var n=1;r--;)n=n+(255&e[t])|0,e[t]=255&n,n>>>=8,t++;if(n>0)throw Error("ChaCha: counter overflow")}(o,0,l)}return i.wipe(c),0===a&&i.wipe(o),s}t.streamXOR=s,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),s(e,t,r,r,n)}},67904:(e,t,r)=>{"use strict";var n=r(17074),i=r(56536),s=r(29987),a=r(19064),o=r(18288);t.J4=32,t.PX=12,t.iW=16;var l=new Uint8Array(16),c=function(){function e(e){if(this.nonceLength=t.PX,this.tagLength=t.iW,e.length!==t.J4)throw Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw Error("ChaCha20Poly1305: incorrect nonce length");var a,o=new Uint8Array(16);o.set(e,o.length-e.length);var l=new Uint8Array(32);n.stream(this._key,o,l,4);var c=t.length+this.tagLength;if(i){if(i.length!==c)throw Error("ChaCha20Poly1305: incorrect destination length");a=i}else a=new Uint8Array(c);return n.streamXOR(this._key,o,t,a,4),this._authenticate(a.subarray(a.length-this.tagLength,a.length),l,a.subarray(0,a.length-this.tagLength),r),s.wipe(o),a},e.prototype.open=function(e,t,r,i){if(e.length>16)throw Error("ChaCha20Poly1305: incorrect nonce length");if(t.length<this.tagLength)return null;var a,l=new Uint8Array(16);l.set(e,l.length-e.length);var c=new Uint8Array(32);n.stream(this._key,l,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,t.subarray(0,t.length-this.tagLength),r),!o.equal(u,t.subarray(t.length-this.tagLength,t.length)))return null;var d=t.length-this.tagLength;if(i){if(i.length!==d)throw Error("ChaCha20Poly1305: incorrect destination length");a=i}else a=new Uint8Array(d);return n.streamXOR(this._key,l,t.subarray(0,t.length-this.tagLength),a,4),s.wipe(l),a},e.prototype.clean=function(){return s.wipe(this._key),this},e.prototype._authenticate=function(e,t,r,n){var o=new i.Poly1305(t);n&&(o.update(n),n.length%16>0&&o.update(l.subarray(n.length%16))),o.update(r),r.length%16>0&&o.update(l.subarray(r.length%16));var c=new Uint8Array(8);n&&a.writeUint64LE(n.length,c),o.update(c),a.writeUint64LE(r.length,c),o.update(c);for(var u=o.digest(),d=0;d<u.length;d++)e[d]=u[d];o.clean(),s.wipe(u),s.wipe(c)},e}();t.g6=c},18288:(e,t)=>
1{"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 1&r-1>>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},47004:(e,t,r)=>{"use strict";t._S=t.K=t.TP=t.wE=t.Ee=void 0,r(69992);let n=r(23442);function i(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}r(29987),t.Ee=64,t.wE=64,t.TP=32,new Uint8Array(32)[0]=9;let s=i(),a=i([1]),o=(i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222])),l=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),c=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]);function u(e,t){for(let r=0;r<16;r++)e[r]=0|t[r]}function d(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function h(e,t,r){let n=~(r-1);for(let r=0;r<16;r++){let i=n&(e[r]^t[r]);e[r]^=i,t[r]^=i}}function p(e,t){let r=i(),n=i();for(let e=0;e<16;e++)n[e]=t[e];d(n),d(n),d(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let e=r[15]>>16&1;r[14]&=65535,h(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function m(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function y(e,t,r){let n,i,s=0,a=0,o=0,l=0,c=0,u=0,d=0,h=0,p=0,f=0,m=0,y=0,b=0,g=0,v=0,w=0,x=0,E=0,_=0,C=0,k=0,S=0,A=0,T=0,I=0,P=0,O=0,D=0,U=0,N=0,M=0,B=r[0],R=r[1],L=r[2],j=r[3],F=r[4],z=r[5],q=r[6],H=r[7],$=r[8],K=r[9],V=r[10],G=r[11],W=r[12],Z=r[13],J=r[14],Y=r[15];s+=(n=t[0])*B,a+=n*R,o+=n*L,l+=n*j,c+=n*F,u+=n*z,d+=n*q,h+=n*H,p+=n*$,f+=n*K,m+=n*V,y+=n*G,b+=n*W,g+=n*Z,v+=n*J,w+=n*Y,a+=(n=t[1])*B,o+=n*R,l+=n*L,c+=n*j,u+=n*F,d+=n*z,h+=n*q,p+=n*H,f+=n*$,m+=n*K,y+=n*V,b+=n*G,g+=n*W,v+=n*Z,w+=n*J,x+=n*Y,o+=(n=t[2])*B,l+=n*R,c+=n*L,u+=n*j,d+=n*F,h+=n*z,p+=n*q,f+=n*H,m+=n*$,y+=n*K,b+=n*V,g+=n*G,v+=n*W,w+=n*Z,x+=n*J,E+=n*Y,l+=(n=t[3])*B,c+=n*R,u+=n*L,d+=n*j,h+=n*F,p+=n*z,f+=n*q,m+=n*H,y+=n*$,b+=n*K,g+=n*V,v+=n*G,w+=n*W,x+=n*Z,E+=n*J,_+=n*Y,c+=(n=t[4])*B,u+=n*R,d+=n*L,h+=n*j,p+=n*F,f+=n*z,m+=n*q,y+=n*H,b+=n*$,g+=n*K,v+=n*V,w+=n*G,x+=n*W,E+=n*Z,_+=n*J,C+=n*Y,u+=(n=t[5])*B,d+=n*R,h+=n*L,p+=n*j,f+=n*F,m+=n*z,y+=n*q,b+=n*H,g+=n*$,v+=n*K,w+=n*V,x+=n*G,E+=n*W,_+=n*Z,C+=n*J,k+=n*Y,d+=(n=t[6])*B,h+=n*R,p+=n*L,f+=n*j,m+=n*F,y+=n*z,b+=n*q,g+=n*H,v+=n*$,w+=n*K,x+=n*V,E+=n*G,_+=n*W,C+=n*Z,k+=n*J,S+=n*Y,h+=(n=t[7])*B,p+=n*R,f+=n*L,m+=n*j,y+=n*F,b+=n*z,g+=n*q,v+=n*H,w+=n*$,x+=n*K,E+=n*V,_+=n*G,C+=n*W,k+=n*Z,S+=n*J,A+=n*Y,p+=(n=t[8])*B,f+=n*R,m+=n*L,y+=n*j,b+=n*F,g+=n*z,v+=n*q,w+=n*H,x+=n*$,E+=n*K,_+=n*V,C+=n*G,k+=n*W,S+=n*Z,A+=n*J,T+=n*Y,f+=(n=t[9])*B,m+=n*R,y+=n*L,b+=n*j,g+=n*F,v+=n*z,w+=n*q,x+=n*H,E+=n*$,_+=n*K,C+=n*V,k+=n*G,S+=n*W,A+=n*Z,T+=n*J,I+=n*Y,m+=(n=t[10])*B,y+=n*R,b+=n*L,g+=n*j,v+=n*F,w+=n*z,x+=n*q,E+=n*H,_+=n*$,C+=n*K,k+=n*V,S+=n*G,A+=n*W,T+=n*Z,I+=n*J,P+=n*Y,y+=(n=t[11])*B,b+=n*R,g+=n*L,v+=n*j,w+=n*F,x+=n*z,E+=n*q,_+=n*H,C+=n*$,k+=n*K,S+=n*V,A+=n*G,T+=n*W,I+=n*Z,P+=n*J,O+=n*Y,b+=(n=t[12])*B,g+=n*R,v+=n*L,w+=n*j,x+=n*F,E+=n*z,_+=n*q,C+=n*H,k+=n*$,S+=n*K,A+=n*V,T+=n*G,I+=n*W,P+=n*Z,O+=n*J,D+=n*Y,g+=(n=t[13])*B,v+=n*R,w+=n*L,x+=n*j,E+=n*F,_+=n*z,C+=n*q,k+=n*H,S+=n*$,A+=n*K,T+=n*V,I+=n*G,P+=n*W,O+=n*Z,D+=n*J,U+=n*Y,v+=(n=t[14])*B,w+=n*R,x+=n*L,E+=n*j,_+=n*F,C+=n*z,k+=n*q,S+=n*H,A+=n*$,T+=n*K,I+=n*V,P+=n*G,O+=n*W,D+=n*Z,U+=n*J,N+=n*Y,w+=(n=t[15])*B,x+=n*R,E+=n*L,_+=n*j,C+=n*F,k+=n*z,S+=n*q,A+=n*H,T+=n*$,I+=n*K,P+=n*V,O+=n*G,D+=n*W,U+=n*Z,N+=n*J,M+=n*Y,s+=38*x,a+=38*E,o+=38*_,l+=38*C,c+=38*k,u+=38*S,d+=38*A,h+=38*T,p+=38*I,f+=38*P,m+=38*O,y+=38*D,b+=38*U,g+=38*N,v+=38*M,i=Math.floor((n=s+(i=1)+6
15535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),i=Math.floor((n=s+(i=1)+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function b(e,t){let r=i(),n=i(),s=i(),a=i(),l=i(),c=i(),u=i(),d=i(),h=i();m(r,e[1],e[0]),m(h,t[1],t[0]),y(r,r,h),f(n,e[0],e[1]),f(h,t[0],t[1]),y(n,n,h),y(s,e[3],t[3]),y(s,s,o),y(a,e[2],t[2]),f(a,a,a),m(l,n,r),m(c,a,s),f(u,a,s),f(d,n,r),y(e[0],l,c),y(e[1],d,u),y(e[2],u,c),y(e[3],l,d)}function g(e,t,r){for(let n=0;n<4;n++)h(e[n],t[n],r)}function v(e,t){let r=i(),n=i(),s=i();(function(e,t){let r;let n=i();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)y(n,n,n),2!==r&&4!==r&&y(n,n,t);for(r=0;r<16;r++)e[r]=n[r]})(s,t[2]),y(r,t[0],s),y(n,t[1],s),p(e,n),e[31]^=function(e){let t=new Uint8Array(32);return p(t,e),1&t[0]}(r)<<7}function w(e,t){let r=[i(),i(),i(),i()];u(r[0],l),u(r[1],c),u(r[2],a),y(r[3],l,c),function(e,t,r){u(e[0],s),u(e[1],a),u(e[2],a),u(e[3],s);for(let n=255;n>=0;--n){let i=r[n/8|0]>>(7&n)&1;g(e,t,i),b(t,e),b(e,e),g(e,t,i)}}(e,r,t)}t.K=function(e){if(e.length!==t.TP)throw Error(`ed25519: seed must be ${t.TP} bytes`);let r=(0,n.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;let s=new Uint8Array(32),a=[i(),i(),i(),i()];w(a,r),v(s,a);let o=new Uint8Array(64);return o.set(e),o.set(s,32),{publicKey:s,secretKey:o}};let x=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(e,t){let r,n,i,s;for(n=63;n>=32;--n){for(r=0,i=n-32,s=n-12;i<s;++i)t[i]+=r-16*t[n]*x[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(i=0,r=0;i<32;i++)t[i]+=r-(t[31]>>4)*x[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*x[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function _(e){let t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;E(e,t)}t._S=function(e,t){let r=new Float64Array(64),s=[i(),i(),i(),i()],a=(0,n.hash)(e.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;let o=new Uint8Array(64);o.set(a.subarray(32),32);let l=new n.SHA512;l.update(o.subarray(32)),l.update(t);let c=l.digest();l.clean(),_(c),w(s,c),v(o,s),l.reset(),l.update(o.subarray(0,32)),l.update(e.subarray(32)),l.update(t);let u=l.digest();_(u);for(let e=0;e<32;e++)r[e]=c[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=u[e]*a[t];return E(o.subarray(32),r),o}},31054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},92084:(e,t,r)=>{"use strict";var n=r(41344),i=r(29987),s=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var s=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r<t.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[r]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),i.wipe(this._buffer),i.wipe(this._counter),this._bufpos=0},e}();t.i=s},41344:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n=r(31054),i=r(18288),s=r(29987),a=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(var i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),n.isSerializableHash(this._inner)&&n.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),s.wipe(r)}return e.prototype.reset=function(){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){n.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),n.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?this._outer.finish(e):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0),this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!n.isSerializableHash(this._inner))throw Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!n.isSerializableHash(this._inner))throw Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();t.HMAC=a,t.hmac=function(e,t,r){var n=new a(e,t);n.update(r);var i=n.digest();return n.clean(),i},t.equal=i.equal},98212:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=0x1fffffffffffff,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},56536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(18288),i=r(29987);t.DIGEST_LENGTH=16;var s=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=(r>>>13|n<<3)&8191;var i=e[4]|e[5]<<8;this._r[2]=(n>>>10|i<<6)&7939;var s=e[6]|e[7]<<8;this._r[3]=(i>>>7|s<<9)&8191;var a=e[8]|e[9]<<8;this._r[4]=(s>>>4|a<<12)&255,this._r[5]=a>>>1&8190;var o=e[10]|e[11]<<8;this._r[6]=(a>>>14|o<<2)&8191;var l=e[12]|e[13]<<8;this._r[7]=(o>>>11|l<<5)&8065;var c=e[14]|e[15]<<8;this._r[8]=(l>>>8|c<<8)&8191,this._r[9]=c>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],s=this._h[1],a=this._h[2],o=this._h[3],l=this._h[4],c=this._h[5],u=this._h[6],d=this._h[7],h=this._h[8],p=this._h[9],f=this._r[0],m=this._r[1],y=this._r[2],b=this._r[3],g=this._r[4],v=this._r[5],w=this._r[6],x=this._r[7],E=this._r[8],_=this._r[9];r>=16;
1){var C,k=e[t+0]|e[t+1]<<8;i+=8191&k;var S=e[t+2]|e[t+3]<<8;s+=(k>>>13|S<<3)&8191;var A=e[t+4]|e[t+5]<<8;a+=(S>>>10|A<<6)&8191;var T=e[t+6]|e[t+7]<<8;o+=(A>>>7|T<<9)&8191;var I=e[t+8]|e[t+9]<<8;l+=(T>>>4|I<<12)&8191,c+=I>>>1&8191;var P=e[t+10]|e[t+11]<<8;u+=(I>>>14|P<<2)&8191;var O=e[t+12]|e[t+13]<<8;d+=(P>>>11|O<<5)&8191;var D=e[t+14]|e[t+15]<<8;h+=(O>>>8|D<<8)&8191,p+=D>>>5|n;var U=0;U=(C=0+i*f+5*_*s+5*E*a+5*x*o+5*w*l)>>>13,C&=8191,C+=5*v*c+5*g*u+5*b*d+5*y*h+5*m*p,U+=C>>>13,C&=8191;var N=U;N+=i*m,N+=s*f,N+=5*_*a,N+=5*E*o,N+=5*x*l,U=N>>>13,N&=8191,N+=5*w*c,N+=5*v*u,N+=5*g*d,N+=5*b*h,N+=5*y*p,U+=N>>>13,N&=8191;var M=U;M+=i*y,M+=s*m,M+=a*f,M+=5*_*o,M+=5*E*l,U=M>>>13,M&=8191,M+=5*x*c,M+=5*w*u,M+=5*v*d,M+=5*g*h,M+=5*b*p,U+=M>>>13,M&=8191;var B=U;B+=i*b,B+=s*y,B+=a*m,B+=o*f,B+=5*_*l,U=B>>>13,B&=8191,B+=5*E*c,B+=5*x*u,B+=5*w*d,B+=5*v*h,B+=5*g*p,U+=B>>>13,B&=8191;var R=U;R+=i*g,R+=s*b,R+=a*y,R+=o*m,R+=l*f,U=R>>>13,R&=8191,R+=5*_*c,R+=5*E*u,R+=5*x*d,R+=5*w*h,R+=5*v*p,U+=R>>>13,R&=8191;var L=U;L+=i*v,L+=s*g,L+=a*b,L+=o*y,L+=l*m,U=L>>>13,L&=8191,L+=c*f,L+=5*_*u,L+=5*E*d,L+=5*x*h,L+=5*w*p,U+=L>>>13,L&=8191;var j=U;j+=i*w,j+=s*v,j+=a*g,j+=o*b,j+=l*y,U=j>>>13,j&=8191,j+=c*m,j+=u*f,j+=5*_*d,j+=5*E*h,j+=5*x*p,U+=j>>>13,j&=8191;var F=U;F+=i*x,F+=s*w,F+=a*v,F+=o*g,F+=l*b,U=F>>>13,F&=8191,F+=c*y,F+=u*m,F+=d*f,F+=5*_*h,F+=5*E*p,U+=F>>>13,F&=8191;var z=U;z+=i*E,z+=s*x,z+=a*w,z+=o*v,z+=l*g,U=z>>>13,z&=8191,z+=c*b,z+=u*y,z+=d*m,z+=h*f,z+=5*_*p,U+=z>>>13,z&=8191;var q=U;q+=i*_,q+=s*E,q+=a*x,q+=o*w,q+=l*v,U=q>>>13,q&=8191,q+=c*g,q+=u*b,q+=d*y,q+=h*m,q+=p*f,U+=q>>>13,q&=8191,C=8191&(U=(U=(U<<2)+U|0)+C|0),U>>>=13,N+=U,i=C,s=N,a=M,o=B,l=R,c=L,u=j,d=F,h=z,p=q,t+=16,r-=16}this._h[0]=i,this._h[1]=s,this._h[2]=a,this._h[3]=o,this._h[4]=l,this._h[5]=c,this._h[6]=u,this._h[7]=d,this._h[8]=h,this._h[9]=p},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,s,a=new Uint16Array(10);if(this._leftover){for(s=this._leftover,this._buffer[s++]=1;s<16;s++)this._buffer[s]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,s=2;s<10;s++)this._h[s]+=r,r=this._h[s]>>>13,this._h[s]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,s=1;s<10;s++)a[s]=this._h[s]+r,r=a[s]>>>13,a[s]&=8191;for(a[9]-=8192,n=(1^r)-1,s=0;s<10;s++)a[s]&=n;for(s=0,n=~n;s<10;s++)this._h[s]=this._h[s]&n|a[s];for(s=1,this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,i=this._h[0]+this._pad[0],this._h[0]=65535&i;s<8;s++)i=(this._h[s]+this._pad[s]|0)+(i>>>16)|0,this._h[s]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[r+i];if(n-=t,r+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(var i=0;i<n;i++)this._buffer[this._leftover+i]=e[r+i];this._leftover+=n}return this},e.prototype.digest=function(){if(this._finished)throw Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},e.prototype.clean=function(){return i.wipe(this._buffer),i.wipe(this._r),i.wipe(this._h),i.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();t.Poly1305=s,t.oneTimeAuth=function(e,t){var r=new s(e);r.update(t);var n=r.digest();return r.clean(),n},t.equal=function(e,r){return e.length===t.DIGEST_LENGTH&&r.length===t.DIGEST_LENGTH&&n.equal(e,r)}},69992:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;let n=r(15766),i=r(19064),s=r(29987);function a(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(e=t.defaultRandomSource){let r=a(4,e),n=(0,i.readUint32LE)(r);return(0,s.wipe)(r),n};let o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function l(e,r=o,n=t.defaultRandomSource){if(r.length<2)throw Error("randomString charset is too short");if(r.length>256)throw Error("randomString charset is too long");let i="",c=r.length,u=256-256%c;for(;e>0;){let t=a(Math.ceil(256*e/u),n);for(let n=0;n<t.length&&e>0;n++){let s=t[n];s<u&&(i+=r.charAt(s%c),e--)}(0,s.wipe)(t)}return i}t.randomString=l,t.randomStringForEntropy=function(e,r=o,n=t.defaultRandomSource){return l(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},39737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;class r{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw Error("Browser random byte generator is not available.");let t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}}t.BrowserRandomSource=r},15595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;let n=r(29987);class i{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{let e=r(77051);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw Error("NodeRandomSource: got fewer bytes than requested");let r=new Uint8Array(e);for(let e=0;e<r.length;e++)r[e]=t[e];return(0,n.wipe)(t),r}}t.NodeRandomSource=i},15766:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;let n=r(39737),i=r(15595);class s{constructor(){if(this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new i.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw Error("System random byte generator is not available.");return this._source.randomBytes(e)}}t.SystemRandomSource=s},1360:(e,t,r)=>{"use strict";var n=r(19064),i=r(29987);t.On=32,t.cS=64;var s=function(){function e(){this.digestLength=t.On,this.blockSize=t.cS,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=0x6a09e667,this._state[1]=0xbb67ae85,this._state[2]=0x3c6ef372,this._state[3]=0xa54ff53a,this._state[4]=0x510e527f,this._state[5]=0x9b05688c,this._state[6]=0x1f83d9ab,this._state[7]=0x5be0cd19},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=o(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t%64
1<56?64:128;this._buffer[r]=128;for(var s=r+1;s<i-8;s++)this._buffer[s]=0;n.writeUint32BE(t/0x20000000|0,this._buffer,i-8),n.writeUint32BE(t<<3,this._buffer,i-4),o(this._temp,this._state,this._buffer,0,i),this._finished=!0}for(var s=0;s<this.digestLength/4;s++)n.writeUint32BE(this._state[s],e,4*s);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.aD=s;var a=new Int32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]);function o(e,t,r,i,s){for(;s>=64;){for(var o=t[0],l=t[1],c=t[2],u=t[3],d=t[4],h=t[5],p=t[6],f=t[7],m=0;m<16;m++){var y=i+4*m;e[m]=n.readUint32BE(r,y)}for(var m=16;m<64;m++){var b=e[m-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,v=((b=e[m-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[m]=(g+e[m-7]|0)+(v+e[m-16]|0)}for(var m=0;m<64;m++){var g=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&p)|0)+(f+(a[m]+e[m]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&l^o&c^l&c)|0;f=p,p=h,h=d,d=u+g|0,u=c,c=l,l=o,o=g+v|0}t[0]+=o,t[1]+=l,t[2]+=c,t[3]+=u,t[4]+=d,t[5]+=h,t[6]+=p,t[7]+=f,i+=64,s-=64}return i}t.tW=function(e){var t=new s;t.update(e);var r=t.digest();return t.clean(),r}},23442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19064),i=r(29987);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var s=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=0x6a09e667,this._stateHi[1]=0xbb67ae85,this._stateHi[2]=0x3c6ef372,this._stateHi[3]=0xa54ff53a,this._stateHi[4]=0x510e527f,this._stateHi[5]=0x9b05688c,this._stateHi[6]=0x1f83d9ab,this._stateHi[7]=0x5be0cd19,this._stateLo[0]=0xf3bcc908,this._stateLo[1]=0x84caa73b,this._stateLo[2]=0xfe94f82b,this._stateLo[3]=0x5f1d36f1,this._stateLo[4]=0xade682d1,this._stateLo[5]=0x2b3e6c1f,this._stateLo[6]=0xfb41bd6b,this._stateLo[7]=0x137e2179},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t%128<112?128:256;this._buffer[r]=128;for(var s=r+1;s<i-8;s++)this._buffer[s]=0;n.writeUint32BE(t/0x20000000|0,this._buffer,i-8),n.writeUint32BE(t<<3,this._buffer,i-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,i),this._finished=!0}for(var s=0;s<this.digestLength/8;s++)n.writeUint32BE(this._stateHi[s],e,8*s),n.writeUint32BE(this._stateLo[s],e,8*s+4);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=s;var a=new Int32Array([0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817]);function o(e,t,r,i,s,o,l){for(var c,u,d,h,p,f,m,y,b=r[0],g=r[1],v=r[2],w=r[3],x=r[4],E=r[5],_=r[6],C=r[7],k=i[0],S=i[1],A=i[2],T=i[3],I=i[4],P=i[5],O=i[6],D=i[7];l>=128;){for(var U=0;U<16;U++){var N=8*U+o;e[U]=n.readUint32BE(s,N),t[U]=n.readUint32BE(s,N+4)}for(var U=0;U<80;U++){var M=b,B=g,R=v,L=w,j=x,F=E,z=_,q=C,H=k,$=S,K=A,V=T,G=I,W=P,Z=O,J=D;
1if(c=C,p=65535&(u=D),f=u>>>16,m=65535&c,y=c>>>16,c=(x>>>14|I<<18)^(x>>>18|I<<14)^(I>>>9|x<<23),p+=65535&(u=(I>>>14|x<<18)^(I>>>18|x<<14)^(x>>>9|I<<23)),f+=u>>>16,m+=65535&c,y+=c>>>16,c=x&E^~x&_,p+=65535&(u=I&P^~I&O),f+=u>>>16,m+=65535&c,y+=c>>>16,c=a[2*U],p+=65535&(u=a[2*U+1]),f+=u>>>16,m+=65535&c,y+=c>>>16,c=e[U%16],p+=65535&(u=t[U%16]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,d=65535&m|y<<16,h=65535&p|f<<16,c=d,p=65535&(u=h),f=u>>>16,m=65535&c,y=c>>>16,c=(b>>>28|k<<4)^(k>>>2|b<<30)^(k>>>7|b<<25),p+=65535&(u=(k>>>28|b<<4)^(b>>>2|k<<30)^(b>>>7|k<<25)),f+=u>>>16,m+=65535&c,y+=c>>>16,c=b&g^b&v^g&v,p+=65535&(u=k&S^k&A^S&A),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,q=65535&m|y<<16,J=65535&p|f<<16,c=L,p=65535&(u=V),f=u>>>16,m=65535&c,y=c>>>16,c=d,p+=65535&(u=h),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,L=65535&m|y<<16,V=65535&p|f<<16,g=M,v=B,w=R,x=L,E=j,_=F,C=z,b=q,S=H,A=$,T=K,I=V,P=G,O=W,D=Z,k=J,U%16==15)for(var N=0;N<16;N++)c=e[N],p=65535&(u=t[N]),f=u>>>16,m=65535&c,y=c>>>16,c=e[(N+9)%16],p+=65535&(u=t[(N+9)%16]),f+=u>>>16,m+=65535&c,y+=c>>>16,c=((d=e[(N+1)%16])>>>1|(h=t[(N+1)%16])<<31)^(d>>>8|h<<24)^d>>>7,p+=65535&(u=(h>>>1|d<<31)^(h>>>8|d<<24)^(h>>>7|d<<25)),f+=u>>>16,m+=65535&c,y+=c>>>16,c=((d=e[(N+14)%16])>>>19|(h=t[(N+14)%16])<<13)^(h>>>29|d<<3)^d>>>6,p+=65535&(u=(h>>>19|d<<13)^(d>>>29|h<<3)^(h>>>6|d<<26)),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,e[N]=65535&m|y<<16,t[N]=65535&p|f<<16}c=b,p=65535&(u=k),f=u>>>16,m=65535&c,y=c>>>16,c=r[0],p+=65535&(u=i[0]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[0]=b=65535&m|y<<16,i[0]=k=65535&p|f<<16,c=g,p=65535&(u=S),f=u>>>16,m=65535&c,y=c>>>16,c=r[1],p+=65535&(u=i[1]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[1]=g=65535&m|y<<16,i[1]=S=65535&p|f<<16,c=v,p=65535&(u=A),f=u>>>16,m=65535&c,y=c>>>16,c=r[2],p+=65535&(u=i[2]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[2]=v=65535&m|y<<16,i[2]=A=65535&p|f<<16,c=w,p=65535&(u=T),f=u>>>16,m=65535&c,y=c>>>16,c=r[3],p+=65535&(u=i[3]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[3]=w=65535&m|y<<16,i[3]=T=65535&p|f<<16,c=x,p=65535&(u=I),f=u>>>16,m=65535&c,y=c>>>16,c=r[4],p+=65535&(u=i[4]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[4]=x=65535&m|y<<16,i[4]=I=65535&p|f<<16,c=E,p=65535&(u=P),f=u>>>16,m=65535&c,y=c>>>16,c=r[5],p+=65535&(u=i[5]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[5]=E=65535&m|y<<16,i[5]=P=65535&p|f<<16,c=_,p=65535&(u=O),f=u>>>16,m=65535&c,y=c>>>16,c=r[6],p+=65535&(u=i[6]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[6]=_=65535&m|y<<16,i[6]=O=65535&p|f<<16,c=C,p=65535&(u=D),f=u>>>16,m=65535&c,y=c>>>16,c=r[7],p+=65535&(u=i[7]),f+=u>>>16,m+=65535&c,y+=c>>>16,f+=p>>>16,m+=f>>>16,y+=m>>>16,r[7]=C=65535&m|y<<16,i[7]=D=65535&p|f<<16,o+=128,l-=128}return o}t.hash=function(e){var t=new s;t.update(e);var r=t.digest();return t.clean(),r}},29987:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},78502:(e,t,r)=>{"use strict";t.Tc=t.TZ=t.wE=t.Xx=void 0;let n=r(69992),i=r(29987);function s(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}t.Xx=32,t.wE=32;let a=new Uint8Array(32);a[0]=9;let o=s([56129,1]);function l(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function c(e,t,r){let n=~(r-1);for(let r=0;r<16;r++){let i=n&(e[r]^t[r]);e[r]^=i,t[r]^=i}}function u(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function d(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function h(e,t,r){let n,i,s=0,a=0,o=0,l=0,c=0,u=0,d=0,h=0,p=0,f=0,m=0,y=0,b=0,g=0,v=0,w=0,x=0,E=0,_=0,C=0,k=0,S=0,A=0,T=0,I=0,P=0,O=0,D=0,U=0,N=0,M=0,B=r[0],R=r[1],L=r[2],j=r[3],F=r[4],z=r[5],q=r[6],H=r[7],$=r[8],K=r[9],V=r[10],G=r[11],W=r[12],Z=r[13],J=r[14],Y=r[15];s+=(n=t[0])*B,a+=n*R,o+=n*L,l+=n*j,c+=n*F,u+=n*z,d+=n*q,h+=n*H,p+=n*$,f+=n*K,m+=n*V,y+=n*G,b+=n*W,g+=n*Z,v+=n*J,w+=n*Y,a+=(n=t[1])*B,o+=n*R,l+=n*L,c+=n*j,u+=n*F,d+=n*z,h+=n*q,p+=n*H,f+=n*$,m+=n*K,y+=n*V,b+=n*G,g+=n*W,v+=n*Z,w+=n*J,x+=n*Y,o+=(n=t[2])*B,l+=n*R,c+=n*L,u+=n*j,d+=n*F,h+=n*z,p+=n*q,f+=n*H,m+=n*$,y+=n*K,b+=n*V,g+=n*G,v+=n*W,w+=n*Z,x+=n*J,E+=n*Y,l+=(n=t[3])*B,c+=n*R,u+=n*L,d+=n*j,h+=n*F,p+=n*z,f+=n*q,m+=n*H,y+=n*$,b+=n*K,g+=n*V,v+=n*G,w+=n*W,x+=n*Z,E+=n*J,_+=n*Y,c+=(n=t[4])*B,u+=n*R,d+=n*L,h+=n*j,p+=n*F,f+=n*z,m+=n*q,y+=n*H,b+=n*$,g+=n*K,v+=n*V,w+=n*G,x+=n*W,E+=n*Z,_+=n*J,C+=n*Y,u+=(n=t[5])*B,d+=n*R,h+=n*L,p+=n*j,f+=n*F,m+=n*z,y+=n*q,b+=n*H,g+=n*$,v+=n*K,w+=n*V,x+=n*G,E+=n*W,_+=n*Z,C+=n*J,k+=n*Y,d+=(n=t[6])*B,h+=n*R,p+=n*L,f+=n*j,m+=n*F,y+=n*z,b+=n*q,g+=n*H,v+=n*$,w+=n*K,x+=n*V,E+=n*G,_+=n*W,C+=n*Z,k+=n*J,S+=n*Y,h+=(n=t[7])*B,p+=n*R,f+=n*L,m+=n*j,y+=n*F,b+=n*z,g+=n*q,v+=n*H,w+=n*$,x+=n*K,E+=n*V,_+=n*G,C+=n*W,k+=n*Z,S+=n*J,A+=n*Y,p+=(n=t[8])*B,f+=n*R,m+=n*L,y+=n*j,b+=n*F,g+=n*z,v+=n*q,w+=n*H,x+=n*$,E+=n*K,_+=n*V,C+=n*G,k+=n*W,S+=n*Z,A+=n*J,T+=n*Y,f+=(n=t[9])*B,m+=n*R,y+=n*L,b+=n*j,g+=n*F,v+=n*z,w+=n*q,x+=n*H,E+=n*$,_+=n*K,C+=n*V,k+=n*G,S+=n*W,A+=n*Z,T+=n*J,I+=n*Y,m+=(n=t[10])*B,y+=n*R,b+=n*L,g+=n*j,v+=n*F,w+=n*z,x+=n*q,E+=n*H,_+=n*$,C+=n*K,k+=n*V,S+=n*G,A+=n*W,T+=n*Z,I+=n*J,P+=n*Y,y+=(n=t[11])*B,b+=n*R,g+=n*L,v+=n*j,w+=n*F,x+=n*z,E+=n*q,_+=n*H,C+=n*$,k+=n*K,S+=n*V,A+=n*G,T+=n*W,I+=n*Z,P+=n*J,O+=n*Y,b+=(n=t[12])*B,g+=n*R,v+=n*L,w+=n*j,x+=n*F,E+=n*z,_+=n*q,C+=n*H,k+=n*$,S+=n*K,A+=n*V,T+=n*G,I+=n*W,P+=n*Z,O+=n*J,D+=n*Y,g+=(n=t[13])*B,v+=n*R,w+=n*L,x+=n*j,E+=n*F,_+=n*z,C+=n*q,k+=n*H,S+=n*$,A+=n*K,T+=n*V,I+=n*G,P+=n*W,O+=n*Z,D+=n*J,U+=n*Y,v+=(n=t[14])*B,w+=n*R,x+=n*L,E+=n*j,_+=n*F,C+=n*z,k+=n*q,S+=n*H,A+=n*$,T+=n*K,I+=n*V,P+=n*G,O+=n*W,D+=n*Z,U+=n*J,N+=n*Y,w+=(n=t[15])*B,x+=n*R,E+=n*L,_+=n*j,C+=n*F,k+=n*z,S+=n*q,A+=n*H,T+=n*$,I+=n*K,P+=n*V,O+=n*G,D+=n*W,U+=n*Z,N+=n*J,M+=n*Y,s+=38*x,a+=38*E,o+=38*_,l+=38*C,c+=38*k,u+=38*S,d+=38*A,h+=38*T,p+=38*I,f+=38*P,m+=38*O,y+=38*D,b+=38*U,g+=38*N,v+=38*M,i=Math.floor((n=s+(i=1)+6
15535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),i=Math.floor((n=s+(i=1)+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=o+i+65535)/65536),o=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=m,e[11]=y,e[12]=b,e[13]=g,e[14]=v,e[15]=w}function p(e,t){let r=new Uint8Array(32),n=new Float64Array(80),i=s(),a=s(),p=s(),f=s(),m=s(),y=s();for(let t=0;t<31;t++)r[t]=e[t];r[31]=127&e[31]|64,r[0]&=248,function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(n,t);for(let e=0;e<16;e++)a[e]=n[e];i[0]=f[0]=1;for(let e=254;e>=0;--e){let t=r[e>>>3]>>>(7&e)&1;c(i,a,t),c(p,f,t),u(m,i,p),d(i,i,p),u(p,a,f),d(a,a,f),h(f,m,m),h(y,i,i),h(i,p,i),h(p,a,m),u(m,i,p),d(i,i,p),h(a,i,i),d(p,f,y),h(i,p,o),u(i,i,f),h(p,p,i),h(i,f,y),h(f,a,n),h(a,m,m),c(i,a,t),c(p,f,t)}for(let e=0;e<16;e++)n[e+16]=i[e],n[e+32]=p[e],n[e+48]=a[e],n[e+64]=f[e];let b=n.subarray(32),g=n.subarray(16);!function(e,t){let r=s();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)h(r,r,r),2!==e&&4!==e&&h(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]}(b,b),h(g,g,b);let v=new Uint8Array(32);return!function(e,t){let r=s(),n=s();for(let e=0;e<16;e++)n[e]=t[e];l(n),l(n),l(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let e=r[15]>>16&1;r[14]&=65535,c(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(v,g),v}t.TZ=function(e){let r=(0,n.randomBytes)(32,e),s=function(e){if(e.length!==t.wE)throw Error(`x25519: seed must be ${t.wE} bytes`);let r=new Uint8Array(e);return{publicKey:p(r,a),secretKey:r}}(r);return(0,i.wipe)(r),s},t.Tc=function(e,r,n=!1){if(e.length!==t.Xx)throw Error("X25519: incorrect secret key length");if(r.length!==t.Xx)throw Error("X25519: incorrect public key length");let i=p(e,r);if(n){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw Error("X25519: invalid shared key")}return i}},11942:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(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 u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw 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 d(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function f(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){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}}else 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=d(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)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return d(this)||(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(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,s=d(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},i.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=o(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[o(e)]},u.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},u.prototype.set=function(e,t){this.map[o(e)]=l(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},i.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var y=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function b(e,t){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object c
1onstructor cannot be called as a function.');var r,i,s=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(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 u(t.headers)),this.method=(i=(r=t.method||this.method||"GET").toUpperCase(),y.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw 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 a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function v(e,t){if(!(this instanceof v))throw 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 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 u(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var w=[301,302,303,307,308];v.redirect=function(e,t){if(-1===w.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,r){return new Promise(function(s,a){var c=new b(e,r);if(c.signal&&c.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function h(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new u,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 r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===c.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout(function(){s(new v(n,r))},0)},d.onerror=function(){setTimeout(function(){a(TypeError("Network request failed"))},0)},d.ontimeout=function(){setTimeout(function(){a(TypeError("Network request timed out"))},0)},d.onabort=function(){setTimeout(function(){a(new t.DOMException("Aborted","AbortError"))},0)},d.open(c.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(i.blob?d.responseType="blob":i.arrayBuffer&&(d.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof u||n.Headers&&r.headers instanceof n.Headers)){var p=[];
1Object.getOwnPropertyNames(r.headers).forEach(function(e){p.push(o(e)),d.setRequestHeader(e,l(r.headers[e]))}),c.headers.forEach(function(e,t){-1===p.indexOf(t)&&d.setRequestHeader(t,e)})}else c.headers.forEach(function(e,t){d.setRequestHeader(t,e)});c.signal&&(c.signal.addEventListener("abort",h),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",h)}),d.send(void 0===c._bodyInit?null:c._bodyInit)})}x.polyfill=!0,n.fetch||(n.fetch=x,n.Headers=u,n.Request=b,n.Response=v),t.Headers=u,t.Request=b,t.Response=v,t.fetch=x,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=n.fetch?n:i;(t=s.fetch).default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t},32253:(e,t,r)=>{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){let e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},6263:(e,t,r)=>{"use strict";var n=r(2818);function i(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function s(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=i,t.isNode=s,t.isBrowser=function(){return!i()&&!s()}},24144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(44092);n.__exportStar(r(32253),t),n.__exportStar(r(6263),t)},44092:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>s,__asyncDelegator:()=>w,__asyncGenerator:()=>v,__asyncValues:()=>x,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>S,__createBinding:()=>h,__decorate:()=>o,__exportStar:()=>p,__extends:()=>i,__generator:()=>d,__importDefault:()=>C,__importStar:()=>
1_,__makeTemplateObject:()=>E,__metadata:()=>c,__param:()=>l,__read:()=>m,__rest:()=>a,__spread:()=>y,__spreadArrays:()=>b,__values:()=>f});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}function d(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function b(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){
1s.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{var r;(r=i[e](t)).value instanceof g?Promise.resolve(r.value.v).then(l,c):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function l(e){o("next",e)}function c(e){o("throw",e)}function u(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},72446:(e,t,r)=>{"use strict";r.d(t,{H:()=>n});class n{}},96669:(e,t,r)=>{"use strict";r.r(t),r.d(t,{IEvents:()=>n.H});var n=r(72446)},1864:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(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 u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw 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 d(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function f(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){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}}else 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=d(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)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return d(this)||(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(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,s=d(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},i.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=o(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[o(e)]},u.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},u.prototype.set=function(e,t){this.map[o(e)]=l(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},i.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var y=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function b(e,t){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object c
1onstructor cannot be called as a function.');var r,i,s=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(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 u(t.headers)),this.method=(i=(r=t.method||this.method||"GET").toUpperCase(),y.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw 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 a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function g(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function v(e,t){if(!(this instanceof v))throw 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 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 u(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var w=[301,302,303,307,308];v.redirect=function(e,t){if(-1===w.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,r){return new Promise(function(s,a){var c=new b(e,r);if(c.signal&&c.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function h(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new u,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 r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===c.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout(function(){s(new v(n,r))},0)},d.onerror=function(){setTimeout(function(){a(TypeError("Network request failed"))},0)},d.ontimeout=function(){setTimeout(function(){a(TypeError("Network request timed out"))},0)},d.onabort=function(){setTimeout(function(){a(new t.DOMException("Aborted","AbortError"))},0)},d.open(c.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(i.blob?d.responseType="blob":i.arrayBuffer&&(d.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof u||n.Headers&&r.headers instanceof n.Headers)){var p=[];
1Object.getOwnPropertyNames(r.headers).forEach(function(e){p.push(o(e)),d.setRequestHeader(e,l(r.headers[e]))}),c.headers.forEach(function(e,t){-1===p.indexOf(t)&&d.setRequestHeader(t,e)})}else c.headers.forEach(function(e,t){d.setRequestHeader(t,e)});c.signal&&(c.signal.addEventListener("abort",h),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",h)}),d.send(void 0===c._bodyInit?null:c._bodyInit)})}x.polyfill=!0,n.fetch||(n.fetch=x,n.Headers=u,n.Request=b,n.Response=v),t.Headers=u,t.Request=b,t.Response=v,t.fetch=x,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=n.fetch?n:i;(t=s.fetch).default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t},73244:e=>{"use strict";e.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},71285:()=>{},41842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(65656);n.__exportStar(r(91302),t),n.__exportStar(r(30099),t)},91302:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},30099:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},77271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(65656);n.__exportStar(r(67590),t),n.__exportStar(r(28895),t),n.__exportStar(r(36858),t),n.__exportStar(r(41842),t)},36858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(65656).__exportStar(r(80233),t)},80233:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;class r{}t.IWatch=r},36801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;let n=r(41842);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},71825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}},67590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(65656);n.__exportStar(r(71825),t),n.__exportStar(r(36801),t)},28895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let t=this.get(e);if(void 0!==t.elapsed)throw Error(`Watch already stopped for label: ${e}`);let r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){let t=this.timestamps.get(e);if(void 0===t)throw Error(`No timestamp found for label: ${e}`);return t}elapsed(e){let t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},65656:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>s,__asyncDelegator:()=>w,__asyncGenerator:()=>v,__asyncValues:()=>x,__await:()=>g,__awaiter:()=>u,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>S,__createBinding:()=>h,__decorate:()=>o,__exportStar:()=>p,__extends:()=>i,__generator:()=>d,__importDefault:()=>C,__importStar:()=>
1_,__makeTemplateObject:()=>E,__metadata:()=>c,__param:()=>l,__read:()=>m,__rest:()=>a,__spread:()=>y,__spreadArrays:()=>b,__values:()=>f});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}function d(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function b(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){
1s.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{var r;(r=i[e](t)).value instanceof g?Promise.resolve(r.value.v).then(l,c):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function l(e){o("next",e)}function c(e){o("throw",e)}function u(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},15208:(e,t)=>{"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){let t=r(e);if(!t)throw Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},19973:(e,t,r)=>{"use strict";t.g=void 0;let n=r(15208);t.g=function(){let e,t,r;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function i(...t){let r=e.getElementsByTagName("meta");for(let e=0;e<r.length;e++){let n=r[e],i=["itemprop","property","name"].map(e=>n.getAttribute(e)).filter(e=>!!e&&t.includes(e));if(i.length&&i){let e=n.getAttribute("content");if(e)return e}}return""}let s=((r=i("name","og:site_name","og:title","twitter:title"))||(r=e.title),r),a=i("description","og:description","twitter:description","keywords");return{description:a,url:t.origin,icons:function(){let r=e.getElementsByTagName("link"),n=[];for(let e=0;e<r.length;e++){let i=r[e],s=i.getAttribute("rel");if(s&&s.toLowerCase().indexOf("icon")>-1){let e=i.getAttribute("href");if(e){if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{let n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){let r=t.protocol+e;n.push(r)}else n.push(e)}}}return n}(),name:s}}},11466:e=>{"use strict";var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),n=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},i=n.exec(e);i;){try{t[i[0]]=decodeURIComponent(i[0])}catch(e){var s=function(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch(e){}if(1===t.length)return t;r=r||1;var n=t.slice(0,r),i=t.slice(r);return Array.prototype.concat.call([],e(n),e(i))})(t,n).join("")).match(r)||[];return e}}(i[0]);s!==i[0]&&(t[i[0]]=s)}i=n.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var l=a[o];e=e.replace(RegExp(l,"g"),t[l])}return e}(e)}}},60429:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(r,n){var i;function s(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&(i={once:!0},"function"==typeof e.on&&m(e,"error",s,i))})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){if(o(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]),void 0===a)a=s[t]=r,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var i,s,a,c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(s){n.once&&e.removeEventListener(t,i),r(s)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
1,set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,o=Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var c=l.length,u=f(l,c),r=0;r<c;++r)n(u[r],this,t);return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return o(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,a;if(o(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},98287:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),s=0;s<n.length;s++){var a=n[s],o=e[a];(i?-1!==t.indexOf(a):t(a,o,e))&&(r[a]=o)}return r}},19618:(e,t,r)=>{e=r.nmd(e);var n,i,s="__lodash_hash_undefined__",a="[object Arguments]",o="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",h="[object Map]",p="[object Number]",f="[object Object]",m="[object Promise]",y="[object RegExp]",b="[object Set]",g="[object String]",v="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",E=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[a]=C[o]=C[w]=C[l]=C[x]=C[c]=C[u]=C[d]=C[h]=C[p]=C[f]=C[y]=C[b]=C[g]=C[v]=!1;var k="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,S="object"==typeof self&&self&&self.Object===Object&&self,A=k||S||Function("return this")(),T=t&&!t.nodeType&&t,I=T&&e&&!e.nodeType&&e,P=I&&I.exports===T,O=P&&k.process,D=function(){try{return O&&O.binding&&O.binding("util")}catch(e){}}(),U=D&&D.isTypedArray;function N(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function M(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var B=Array.prototype,R=Function.prototype,L=Object.prototype,j=A["__core-js_shared__"],F=R.toString,z=L.hasOwnProperty,q=function(){var e=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||"");
1return e?"Symbol(src)_1."+e:""}(),H=L.toString,$=RegExp("^"+F.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=P?A.Buffer:void 0,V=A.Symbol,G=A.Uint8Array,W=L.propertyIsEnumerable,Z=B.splice,J=V?V.toStringTag:void 0,Y=Object.getOwnPropertySymbols,X=K?K.isBuffer:void 0,Q=(n=Object.keys,i=Object,function(e){return n(i(e))}),ee=eC(A,"DataView"),et=eC(A,"Map"),er=eC(A,"Promise"),en=eC(A,"Set"),ei=eC(A,"WeakMap"),es=eC(Object,"create"),ea=eA(ee),eo=eA(et),el=eA(er),ec=eA(en),eu=eA(ei),ed=V?V.prototype:void 0,eh=ed?ed.valueOf:void 0;function ep(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ef(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function em(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ey(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new em;++t<r;)this.add(e[t])}function eb(e){var t=this.__data__=new ef(e);this.size=t.size}function eg(e,t){for(var r=e.length;r--;)if(eT(e[r][0],t))return r;return -1}function ev(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=z.call(e,J),r=e[J];try{e[J]=void 0;var n=!0}catch(e){}var i=H.call(e);return n&&(t?e[J]=r:delete e[J]),i}(e):H.call(e)}function ew(e){return eM(e)&&ev(e)==a}function ex(e,t,r,n,i,s){var a=1&r,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var u=-1,d=!0,h=2&r?new ey:void 0;for(s.set(e,t),s.set(t,e);++u<o;){var p=e[u],f=t[u];if(n)var m=a?n(f,p,u,t,e,s):n(p,f,u,e,t,s);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}(t,function(e,t){if(!h.has(t)&&(p===e||i(p,e,r,n,s)))return h.push(t)})){d=!1;break}}else if(!(p===f||i(p,f,r,n,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function eE(e){var t;return t=function(e){return null!=e&&eU(e.length)&&!eD(e)?function(e,t){var r,n=eP(e),i=!n&&eI(e),s=!n&&!i&&eO(e),a=!n&&!i&&!s&&eB(e),o=n||i||s||a,l=o?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=l.length;for(var u in e)z.call(e,u)&&!(o&&("length"==u||s&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||(r=null==(r=c)?0x1fffffffffffff:r)&&("number"==typeof u||_.test(u))&&u>-1&&u%1==0&&u<r))&&l.push(u);return l}(e):function(e){if(t=e&&e.constructor,e!==("function"==typeof t&&t.prototype||L))return Q(e);var t,r=[];for(var n in Object(e))z.call(e,n)&&"constructor"!=n&&r.push(n);return r}(e)}(e),eP(e)?t:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(t,ek(e))}function e_(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function eC(e,t){var r=null==e?void 0:e[t];return!(!eN(r)||q&&q in r)&&(eD(r)?$:E).test(eA(r))?r:void 0}ep.prototype.clear=function(){this.__data__=es?es(null):{},this.size=0},ep.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ep.prototype.get=function(e){var t=this.__data__;if(es){var r=t[e];return r===s?void 0:r}return z.call(t,e)?t[e]:void 0},ep.prototype.has=function(e){var t=this.__data__;return es?void 0!==t[e]:z.call(t,e)},ep.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=es&&void 0===t?s:t,this},ef.prototype.clear=function(){this.__data__=[],this.size=0},ef.prototype.delete=function(e){var t=this.__data__,r=eg(t,e);return!(r<0)&&(r==t.length-1?t.pop():Z.call(t,r,1),--this.size,!0)},ef.prototype.get=function(e){var t=this.__data__,r=eg(t,e);return r<0?void 0:t[r][1]},ef.prototype.has=function(e){return eg(this.__data__,e)>-1},ef.prototype.set=function(e,t){var r=this.__data__,n=eg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},em.prototype.clear=function(){this.size=0,this.__data__={hash:new ep,map:new(et||ef),string:new ep}},em.prototype.delete=function(e){var t=e_(this,e).delete(e);return this.size-=t?1:0,t},em.prototype.get=function(e){return e_(this,e).get(e)},em.prototype.has=function(e){return e_(this,e).has(e)},em.prototype.set=function(e,t){var r=e_(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ey.prototype.add=ey.prototype.push=function(e){return this.__data__.set(e,s),this},ey.prototype.has=function(e){return this.__data__.has(e)},eb.prototype.clear=function(){this.__data__=new ef,this.size=0},eb.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eb.prototype.get=function(e){return this.__data__.get(e)},eb.prototype.has=function(e){return this.__data__.has(e)},eb.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ef){var n=r.__data__;if(!et||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new em(n)}return r.set(e,t),this.size=r.size,this};var ek=Y?function(e){return null==e?[]:function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}(Y(e=Object(e)),function(t){return W.call(e,t)})}:function(){return[]},eS=ev;function eA(e){if(null!=e){try{return F.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eT(e,t){return e===t||e!=e&&t!=t}(ee&&eS(new ee(new ArrayBuffer(1)))!=x||et&&eS(new et)!=h||er&&eS(er.resolve())!=m||en&&eS(new en)!=b||ei&&eS(new ei)!=v)&&(eS=function(e){var t=ev(e),r=t==f?e.constructor:void 0,n=r?eA(r):"";if(n)switch(n){case ea:return x;case eo:return h;case el:return m;case ec:return b;case eu:return v}return t});var eI=ew(function(){return arguments}())?ew:function(e){return eM(e)&&z.call(e,"callee")&&!W.call(e,"callee")},eP=Array.isArray,eO=X||function(){return!1};function eD(e){if(!eN(e))return!1;var t=ev(e);return t==d||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eU(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eN(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eM(e){return null!=e&&"object"==typeof e}var eB=U?function(e){return U(e)}:function(e){return eM(e)&&eU(e.length)&&!!C[ev(e)]};e.exports=function(e,t){return function e(t,r,n,i,s){return t===r||(null!=t&&null!=r&&(eM(t)||eM(r))?function(e,t,r,n,i,s){var d=eP(e),m=eP(t),v=d?o:eS(e),E=m?o:eS(t);v=v==a?f:v,E=E==a?f:E;var _=v==f,C=E==f,k=v==E;
1if(k&&eO(e)){if(!eO(t))return!1;d=!0,_=!1}if(k&&!_)return s||(s=new eb),d||eB(e)?ex(e,t,r,n,i,s):function(e,t,r,n,i,s,a){switch(r){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case w:if(e.byteLength!=t.byteLength||!s(new G(e),new G(t)))break;return!0;case l:case c:case p:return eT(+e,+t);case u:return e.name==t.name&&e.message==t.message;case y:case g:return e==t+"";case h:var o=N;case b:var d=1&n;if(o||(o=M),e.size!=t.size&&!d)break;var f=a.get(e);if(f)return f==t;n|=2,a.set(e,t);var m=ex(o(e),o(t),n,i,s,a);return a.delete(e),m;case"[object Symbol]":if(eh)return eh.call(e)==eh.call(t)}return!1}(e,t,v,r,n,i,s);if(!(1&r)){var S=_&&z.call(e,"__wrapped__"),A=C&&z.call(t,"__wrapped__");if(S||A){var T=S?e.value():e,I=A?t.value():t;return s||(s=new eb),i(T,I,r,n,s)}}return!!k&&(s||(s=new eb),function(e,t,r,n,i,s){var a=1&r,o=eE(e),l=o.length;if(l!=eE(t).length&&!a)return!1;for(var c=l;c--;){var u=o[c];if(!(a?u in t:z.call(t,u)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var p=a;++c<l;){var f=e[u=o[c]],m=t[u];if(n)var y=a?n(m,f,u,t,e,s):n(f,m,u,e,t,s);if(!(void 0===y?f===m||i(f,m,r,n,s):y)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var b=e.constructor,g=t.constructor;b!=g&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,i,s))}(t,r,n,i,e,s):t!=t&&r!=r)}(e,t)}},54203:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i.a});var n=r(53704),i=r.n(n),s={};for(let e in n)"default"!==e&&(s[e]=()=>n[e]);r.d(t,s)},86528:e=>{"use strict";let t=self.fetch.bind(self);e.exports=t,e.exports.default=e.exports},53704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return g},handleClientScriptLoad:function(){return m},initScriptLoader:function(){return y}});let n=r(60306),i=r(29955),s=r(95155),a=n._(r(47650)),o=i._(r(12115)),l=r(81147),c=r(22815),u=r(68571),d=new Map,h=new Set,p=e=>{if(a.default.preinit){e.forEach(e=>{a.default.preinit(e,{as:"style"})});return}if("undefined"!=typeof window){let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},f=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:i=null,dangerouslySetInnerHTML:s,children:a="",strategy:o="afterInteractive",onError:l,stylesheets:u}=e,f=r||t;if(f&&h.has(f))return;if(d.has(t)){h.add(f),d.get(t).then(n,l);return}let m=()=>{i&&i(),h.add(f)},y=document.createElement("script"),b=new Promise((e,t)=>{y.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),y.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});s?(y.innerHTML=s.__html||"",m()):a?(y.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",m()):t&&(y.src=t,d.set(t,b)),(0,c.setAttributesFromProps)(y,e),"worker"===o&&y.setAttribute("type","text/partytown"),y.setAttribute("data-nscript",o),u&&p(u),document.body.appendChild(y)};function m(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>f(e))}):f(e)}function y(e){e.forEach(m),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");h.add(t)})}function b(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:i=null,strategy:c="afterInteractive",onError:d,stylesheets:p,...m}=e,{updateScripts:y,scripts:b,getIsSsr:g,appDir:v,nonce:w}=(0,o.useContext)(l.HeadManagerContext),x=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=t||r;x.current||(i&&e&&h.has(e)&&i(),x.current=!0)},[i,t,r]);let E=(0,o.useRef)(!1);if((0,o.useEffect)(()=>{!E.current&&("afterInteractive"===c?f(e):"lazyOnload"===c&&("complete"===document.readyState?(0,u.requestIdleCallback)(()=>f(e)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>f(e))})),E.current=!0)},[e,c]),("beforeInteractive"===c||"worker"===c)&&(y?(b[c]=(b[c]||[]).concat([{id:t,src:r,onLoad:n,onReady:i,onError:d,...m}
1]),y(b)):g&&g()?h.add(t||r):g&&!g()&&f(e)),v){if(p&&p.forEach(e=>{a.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)return r?(a.default.preload(r,m.integrity?{as:"script",integrity:m.integrity,nonce:w,crossOrigin:m.crossOrigin}:{as:"script",nonce:w,crossOrigin:m.crossOrigin}),(0,s.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...m,id:t}])+")"}})):(m.dangerouslySetInnerHTML&&(m.children=m.dangerouslySetInnerHTML.__html,delete m.dangerouslySetInnerHTML),(0,s.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...m,id:t}])+")"}}));"afterInteractive"===c&&r&&a.default.preload(r,m.integrity?{as:"script",integrity:m.integrity,nonce:w,crossOrigin:m.crossOrigin}:{as:"script",nonce:w,crossOrigin:m.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});let g=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},22815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"setAttributesFromProps",{enumerable:!0,get:function(){return s}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},n=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function i(e){return["async","defer","noModule"].includes(e)}function s(e,t){for(let[s,a]of Object.entries(t)){if(!t.hasOwnProperty(s)||n.includes(s)||void 0===a)continue;let o=r[s]||s.toLowerCase();"SCRIPT"===e.tagName&&i(o)?e[o]=!!a:e.setAttribute(o,String(a)),(!1===a||"SCRIPT"===e.tagName&&i(o)&&(!a||"false"===a))&&(e.setAttribute(o,""),e.removeAttribute(o))}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65155:(e,t,r)=>{"use strict";let n=r(72434),i=r(11466),s=r(93200),a=r(98287),o=e=>null==e,l=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function d(e,t){return t.decode?i(e):e}function h(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function p(e){let t=(e=h(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){n[e]=r;return}void 0===n[e]&&(n[e]={}),n[e][t[1]]=r};case"bracket":return(e,r,n)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"colon-list-separator":return(e,r,n)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!i&&d(r,e).includes(e.arrayFormatSeparator);r=s?d(r,e):r;let a=i||s?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i){n[t]=r?d(r,e):r;return}let s=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===n[t]){n[t]=s;return}n[t]=[].concat(n[t],s)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),n=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return n;for(let i of e.split("&")){if(""===i)continue;let[e,a]=s(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:d(a,t),r(d(e,t),a,n)}for(let e of Object.keys(n)){let r=n[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=f(r[e],t);else n[e]=f(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>
1{let r=n[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=p,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[",i,"]"].join("")]:[...r,[u(t,e),"[",u(i,e),"]=",u(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length)?[[u(r,e),t,u(i,e)].join("")]:[[n,u(i,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,u(t,e)]:[...r,[u(t,e),"=",u(n,e)].join("")]}}(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map(r=>{let i=e[r];return void 0===i?"":null===i?u(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":i.reduce(n(r),[]).join("&"):u(r,t)+"="+u(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>
1{t=Object.assign({decode:!0},t);let[r,n]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:d(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[l]:!0},r);let n=h(e.url).split("?")[0]||"",i=t.extract(e.url),s=Object.assign(t.parse(i,{sort:!1}),e.query),a=t.stringify(s,r);a&&(a=`?${a}`);let o=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(o=`#${r[l]?u(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${a}${o}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[l]:!1},n);let{url:i,query:s,fragmentIdentifier:o}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:a(s,r),fragmentIdentifier:o},n)},t.exclude=(e,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},56617:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var a=Array(s);a[0]=i(e);for(var o=1;o<s;o++)a[o]=i(r[o]);return a.join(" ")}if("string"!=typeof e)return e;var l=r.length;if(0===l)return e;for(var c="",u=0,d=-1,h=e&&e.length||0,p=0;p<h;){if(37===e.charCodeAt(p)&&p+1<h){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=l||null==r[u])break;d<p&&(c+=e.slice(d,p)),c+=Number(r[u]),d=p+2,p++;break;case 105:if(u>=l||null==r[u])break;d<p&&(c+=e.slice(d,p)),c+=Math.floor(Number(r[u])),d=p+2,p++;break;case 79:case 111:case 106:if(u>=l||void 0===r[u])break;d<p&&(c+=e.slice(d,p));var f=typeof r[u];if("string"===f){c+="'"+r[u]+"'",d=p+2,p++;break}if("function"===f){c+=r[u].name||"<anonymous>",d=p+2,p++;break}c+=i(r[u]),d=p+2,p++;break;case 115:if(u>=l)break;d<p&&(c+=e.slice(d,p)),c+=String(r[u]),d=p+2,p++;break;case 37:d<p&&(c+=e.slice(d,p)),c+="%",d=p+2,p++,u--}++u}++p}return -1===d?e:(d<h&&(c+=e.slice(d)),c)}},93200:e=>{"use strict";e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},72434:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},97949:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=t.GoogleMapsEmbed=t.GoogleAnalytics=void 0;var n=r(40243);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return n.GoogleAnalytics}});var i=r(74440);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return i.GoogleMapsEmbed}});var s=r(19088);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return s.YouTubeEmbed}})},40243:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let s=i(r(23817)),a=r(77151);t.GoogleAnalytics=e=>{var t=n(e,[]);return(0,a.formatData)(s.default,t)}},74440:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleMapsEmbed=void 0;let s=i(r(26802)),a=r(77151);t.GoogleMapsEmbed=e=>{var t=n(e,[]);return(0,a.formatData)(s.default,t)}},19088:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}
1,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let s=i(r(88246)),a=r(77151);t.YouTubeEmbed=e=>{var t=n(e,[]);return(0,a.formatData)(s.default,t)}},77151:(e,t)=>{"use strict";function r(e,t,n=!1){return t?Object.keys(e).filter(e=>n?!t.includes(e):t.includes(e)).reduce((t,r)=>(t[r]=e[r],t),{}):{}}function n(e,t,r,n){let i=n&&Object.keys(n).length>0?new URL(Object.values(n)[0],e):new URL(e);return t&&r&&t.forEach(e=>{r[e]&&i.searchParams.set(e,r[e])}),i.toString()}function i(e,t,r,i,s){var a;if(!t)return`<${e}></${e}>`;let o=(null===(a=t.src)||void 0===a?void 0:a.url)?Object.assign(Object.assign({},t),{src:n(t.src.url,t.src.params,i,s)}):t,l=Object.keys(Object.assign(Object.assign({},o),r)).reduce((e,t)=>{let n=null==r?void 0:r[t],i=o[t],s=null!=n?n:i,a=!0===s?t:`${t}="${s}"`;return s?e+` ${a}`:e},"");return`<${e}${l}></${e}>`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatData=t.createHtml=t.formatUrl=void 0,t.formatUrl=n,t.createHtml=i,t.formatData=function(e,t){var s,a,o,l,c;let u=r(t,null===(s=e.scripts)||void 0===s?void 0:s.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[])),d=r(t,null===(o=null===(a=e.html)||void 0===a?void 0:a.attributes.src)||void 0===o?void 0:o.params),h=r(t,[null===(c=null===(l=e.html)||void 0===l?void 0:l.attributes.src)||void 0===c?void 0:c.slugParam]),p=r(t,[...Object.keys(u),...Object.keys(d),...Object.keys(h)],!0);return Object.assign(Object.assign({},e),{html:e.html?i(e.html.element,e.html.attributes,p,d,h):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:n(e.url,e.params,u)})):null})}},65169:(e,t,r)=>{var n=r(75927).hp;let i=r(66811);function s(e){if(e.startsWith("int["))return"int256"+e.slice(3);if("int"===e)return"int256";if(e.startsWith("uint["))return"uint256"+e.slice(4);if("uint"===e)return"uint256";if(e.startsWith("fixed["))return"fixed128x128"+e.slice(5);if("fixed"===e)return"fixed128x128";if(e.startsWith("ufixed["))return"ufixed128x128"+e.slice(6);else if("ufixed"===e)return"ufixed128x128";return e}function a(e){return Number.parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function o(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10)]}function l(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":Number.parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t||"number"===t)return BigInt(e);if("bigint"===t)return e;throw Error("Argument is not a number")}function u(e,t){if("address"===e)return u("uint160",c(t));if("bool"===e)return u("uint8",t?1:0);if("string"===e)return u("bytes",new n(t,"utf8"));if((p=e).lastIndexOf("]")===p.length-1){if(void 0===t.length)throw Error("Not an array?");if("dynamic"!==(r=l(e))&&0!==r&&t.length>r)throw Error("Elements exceed array size: "+r);for(h in d=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)d.push(u(e,t[h]));if("dynamic"===r){var r,s,d,h,p,f=u("uint256",t.length);d.unshift(f)}return n.concat(d)}if("bytes"===e)return t=new n(t),d=n.concat([u("uint256",t.length),t]),t.length%32!=0&&(d=n.concat([d,i.zeros(32-t.length%32)])),d;if(e.startsWith("bytes")){if((r=a(e))<1||r>32)throw Error("Invalid bytes<N> width: "+r);return i.setLengthRight(t,32)}else if(e.startsWith("uint")){if((r=a(e))%8||r<8||r>256)throw Error("Invalid uint<N> width: "+r);s=c(t);let n=i.bitLengthFromBigInt(s);if(n>r)throw Error("Supplied uint exceeds width: "+r+" vs "+n);if(s<0)throw Error("Supplied uint is negative");return i.bufferBEFromBigInt(s,32)}else if(e.startsWith("int")){if((r=a(e))%8||r<8||r>256)throw Error("Invalid int<N> width: "+r);s=c(t);let n=i.bitLengthFromBigInt(s);if(n>r)throw Error("Supplied int exceeds width: "+r+" vs "+n);let o=i.twosFromBigInt(s,256);return i.bufferBEFromBigInt(o,32)}else if(e.startsWith("ufixed")){if(r=o(e),(s=c(t))<0)throw Error("Supplied ufixed is negative");return u("uint256",s*BigInt(2)**BigInt(r[1]))}else if(e.startsWith("fixed"))return r=o(e),u("int256",c(t)*BigInt(2)**BigInt(r[1]));throw Error("Unsupported or invalid type: "+e)}function d(e,t){if(e.length!==t.length)throw Error("Number of types are not matching the values");for(var r,o,l=[],u=0;u<e.length;u++){var d=s(e[u]),h=t[u];
1if("bytes"===d)l.push(h);else if("string"===d)l.push(new n(h,"utf8"));else if("bool"===d)l.push(new n(h?"01":"00","hex"));else if("address"===d)l.push(i.setLength(h,20));else if(d.startsWith("bytes")){if((r=a(d))<1||r>32)throw Error("Invalid bytes<N> width: "+r);l.push(i.setLengthRight(h,r))}else if(d.startsWith("uint")){if((r=a(d))%8||r<8||r>256)throw Error("Invalid uint<N> width: "+r);o=c(h);let e=i.bitLengthFromBigInt(o);if(e>r)throw Error("Supplied uint exceeds width: "+r+" vs "+e);l.push(i.bufferBEFromBigInt(o,r/8))}else if(d.startsWith("int")){if((r=a(d))%8||r<8||r>256)throw Error("Invalid int<N> width: "+r);o=c(h);let e=i.bitLengthFromBigInt(o);if(e>r)throw Error("Supplied int exceeds width: "+r+" vs "+e);let t=i.twosFromBigInt(o,r);l.push(i.bufferBEFromBigInt(t,r/8))}else throw Error("Unsupported or invalid type: "+d)}return n.concat(l)}e.exports={rawEncode:function(e,t){var r=[],i=[],a=32*e.length;for(var o in e){var c=s(e[o]),d=u(c,t[o]);"string"===c||"bytes"===c||"dynamic"===l(c)?(r.push(u("uint256",a)),i.push(d),a+=d.length):r.push(d)}return n.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(e,t){return i.keccak(d(e,t))}}},15875:(e,t,r)=>{var n=r(75927).hp;let i=r(66811),s=r(65169),a={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},o={encodeData(e,t,r,a=!0){let o=["bytes32"],l=[this.hashType(e,r)];if(a){let c=(e,t,o)=>{if(void 0!==r[t])return["bytes32",null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(this.encodeData(t,o,r,a))];if(void 0===o)throw Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",i.keccak(o)];if("string"===t)return"string"==typeof o&&(o=n.from(o,"utf8")),["bytes32",i.keccak(o)];if(t.lastIndexOf("]")===t.length-1){let r=t.slice(0,t.lastIndexOf("[")),n=o.map(t=>c(e,r,t));return["bytes32",i.keccak(s.rawEncode(n.map(([e])=>e),n.map(([,e])=>e)))]}return[t,o]};for(let n of r[e]){let[e,r]=c(n.name,n.type,t[n.name]);o.push(e),l.push(r)}}else for(let s of r[e]){let e=t[s.name];if(void 0!==e){if("bytes"===s.type)o.push("bytes32"),e=i.keccak(e),l.push(e);else if("string"===s.type)o.push("bytes32"),"string"==typeof e&&(e=n.from(e,"utf8")),e=i.keccak(e),l.push(e);else if(void 0!==r[s.type])o.push("bytes32"),e=i.keccak(this.encodeData(s.type,e,r,a)),l.push(e);else if(s.type.lastIndexOf("]")===s.type.length-1)throw Error("Arrays currently unimplemented in encodeData");else o.push(s.type),l.push(e)}}return s.rawEncode(o,l)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter(t=>t!==e);for(let i of n=[e].concat(n.sort())){if(!t[i])throw Error("No type definition specified: "+i);r+=i+"("+t[i].map(({name:e,type:t})=>t+" "+e).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||void 0===t[e])return r;for(let n of(r.push(e),t[e]))for(let e of this.findTypeDependencies(n.type,t,r))r.includes(e)||r.push(e);return r},hashStruct(e,t,r,n=!0){return i.keccak(this.encodeData(e,t,r,n))},hashType(e,t){return i.keccak(this.encodeType(e,t))},sanitizeData(e){let t={};for(let r in a.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){let r=this.sanitizeData(e),s=[n.from("1901","hex")];return s.push(this.hashStruct("EIP712Domain",r.domain,r.types,t)),"EIP712Domain"!==r.primaryType&&s.push(this.hashStruct(r.primaryType,r.message,r.types,t)),i.keccak(n.concat(s))}};e.exports={TYPED_MESSAGE_SCHEMA:a,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){let t=Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;let r=e.map(function(e){return"bytes"===e.type?i.toBuffer(e.value):e.value}),n=e.map(function(e){return e.type}),a=e.map(function(e){if(!e.name)throw t;return e.type+" "+e.name});return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(Array(e.length).fill("string"),a),s.soliditySHA3(n,r)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}},66811:(e,t,r)=>{var n=r(75927).hp;let{keccak_256:i}=r(28307);function s(e){return n.allocUnsafe(e).fill(0)}function a(e,t){let r=e.toString(16);r.length%2!=0&&(r="0"+r);let i=r.match(/.{1,2}/g).map(e=>parseInt(e,16));for(;i.length<t;)i.unshift(0);return n.from(i)}function o(e,t,r){let n=s(t);return(e=l(e),r)?e.length<t?(e.copy(n),n):e.slice(0,t):e.length<t?(e.copy(n,t-e.length),n):e.slice(-t)}function l(e){if(!n.isBuffer(e)){if(Array.isArray(e))e=n.from(e);else if("string"==typeof e){var t;e=c(e)?n.from((t=u(e)).length%2?"0"+t:t,"hex"):n.from(e)}else if("number"==typeof e)e=intToBuffer(e);else if(null==e)e=n.allocUnsafe(0);else if("bigint"==typeof e)e=a(e);else if(e.toArray)e=n.from(e.toArray());else throw Error("invalid type")}return e}function c(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function u(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:s,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:c,stripHexPrefix:u,toBuffer:l,bufferToHex:function(e){return"0x"+(e=l(e)).toString("hex")},keccak:function(e,t){if(e=l(e),t||(t=256),256!==t)throw Error("unsupported");return n.from(i(new Uint8Array(e)))},bitLengthFromBigInt:function(e){return e.toString(2).length},bufferBEFromBigInt:a,twosFromBigInt:function(e,t){return(e<0n?(~e&(1n<<BigInt(t))-1n)+1n:e)&(1n<<BigInt(t))-1n}}},28509:(e,t,r)=>{"use strict";let n=r(56617);e.exports=s;let i=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function s(e){var t,r;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let u=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let d=e.serializers||{},m=Array.isArray(t=e.browser.serialize)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(d),y=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(y=!1),"function"==typeof u&&(u.error=u.fatal=u.warn=u.info=u.debug=u.trace=u),!1===e.enabled&&(e.level="silent");let b=e.level||"info",g=Object.create(u);g.log||(g.log=h),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(v,g,"error","log"),a(v,g,"fatal","error"),a(v,g,"warn","error"),a(v,g,"info","log"),a(v,g,"debug","log"),a(v,g,"trace","log")}});let v={transmit:n,serialize:m,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?p:f};return g.levels=s.levels,g.level=b,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prepe
1ndOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=h,g.serializers=d,g._serialize=m,g._stdErrSerialize=y,g.child=function(t,r){if(!t)throw Error("missing bindings for child Pino");r=r||{},m&&t.serializers&&(r.serializers=t.serializers);let i=r.serializers;if(m&&i){var s=Object.assign({},d,i),a=!0===e.browser.serialize?Object.keys(s):m;delete t.serializers,o([t],a,s,this._stdErrSerialize)}function u(e){this._childLevel=(0|e._childLevel)+1,this.error=l(e,t,"error"),this.fatal=l(e,t,"fatal"),this.warn=l(e,t,"warn"),this.info=l(e,t,"info"),this.debug=l(e,t,"debug"),this.trace=l(e,t,"trace"),s&&(this.serializers=s,this._serialize=a),n&&(this._logEvent=c([].concat(e._logEvent.bindings,t)))}return u.prototype=this,new u(this)},n&&(g._logEvent=c()),g}function a(e,t,r,a){let l=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?h:l[r]?l[r]:i[r]||i[a]||h,function(e,t,r){if(e.transmit||t[r]!==h){var a;t[r]=(a=t[r],function(){let l=e.timestamp(),u=Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h<u.length;h++)u[h]=arguments[h];if(e.serialize&&!e.asObject&&o(u,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(d,function(e,t,r,i){e._serialize&&o(r,e._serialize,e.serializers,e._stdErrSerialize);let a=r.slice(),l=a[0],c={};i&&(c.time=i),c.level=s.levels.values[t];let u=(0|e._childLevel)+1;if(u<1&&(u=1),null!==l&&"object"==typeof l){for(;u--&&"object"==typeof a[0];)Object.assign(c,a.shift());l=a.length?n(a.shift(),a):void 0}else"string"==typeof l&&(l=n(a.shift(),a));return void 0!==l&&(c.msg=l),c}(this,r,u,l)):a.apply(d,u),e.transmit){let n=e.transmit.level||t.level,i=s.levels.values[n],a=s.levels.values[r];if(a<i)return;(function(e,t,r){let n=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,l=t.val,u=e._logEvent.bindings;o(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(e){return -1===u.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=a,n(s,e._logEvent,l),e._logEvent=c(u)})(this,{ts:l,methodLevel:r,methodValue:a,transmitLevel:n,transmitValue:s.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},u)}})}}(e,t,r)}function o(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=s.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function l(e,t,r){return function(){let n=Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function c(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function u(){return{}}function d(e){return e}function h(){}function p(){return!1}function f(){return Date.now()}s.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},s.stdSerializers={mapHttpRequest:u,mapHttpResponse:u,wrapRequestSerializer:d,wrapResponseSerializer:d,wrapErrorSerializer:d,req:u,res:u,err:function(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}},s.stdTimeFunctions=Object.assign({},{nullTime:p,epochTime:f,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},98433:(e,t,r)=>{"use strict";let n,i,s;r.d(t,{b3:()=>kT});var a={};r.r(a),r.d(a,{abey:()=>eN,abstract:()=>eV,abstractTestnet:()=>eG,acala:()=>eW,acria:()=>eZ,adf:()=>eJ,aioz:()=>eY,alephZero:()=>eX,alephZeroTestnet:()=>eQ,alienx:()=>e0,alienxHalTestnet:()=>e1,ancient8:()=>e2,ancient8Sepolia:()=>e6,anvil:()=>e3,apeChain:()=>e5,apexTestnet:()=>e8,arbitrum:()=>e7,arbitrumGoerli:()=>e4,arbitrumNova:()=>e9,arbitrumSepolia:()=>te,areonNetwork:()=>tt,areonNetworkTestnet:()=>tr,artelaTestnet:()=>tn,arthera:()=>ti,artheraTestnet:()=>ts,assetChain:()=>ta,assetChainTestnet:()=>to,astar:()=>tl,astarZkEVM:()=>tc,astarZkyoto:()=>tu,atletaOlympia:()=>td,aurora:()=>th,auroraTestnet:()=>tp,auroria:()=>tf,avalanche:()=>tm,avalancheFuji:()=>ty,b3:()=>tb,b3Sepolia:()=>tg,bahamut:()=>tv,base:()=>eT,baseGoerli:()=>eI,baseSepolia:()=>
1eP,beam:()=>tw,beamTestnet:()=>tx,bearNetworkChainMainnet:()=>tE,bearNetworkChainTestnet:()=>t_,berachain:()=>tC,berachainTestnet:()=>tk,berachainTestnetbArtio:()=>tS,bevmMainnet:()=>tA,bifrost:()=>tT,birdlayer:()=>tR,bitTorrent:()=>tM,bitTorrentTestnet:()=>tB,bitgert:()=>tI,bitkub:()=>tP,bitkubTestnet:()=>tO,bitlayer:()=>tD,bitlayerTestnet:()=>tU,bitrock:()=>tN,blast:()=>tL,blastSepolia:()=>tj,bob:()=>tF,bobSepolia:()=>tH,boba:()=>tz,bobaSepolia:()=>tq,boolBetaMainnet:()=>t$,botanixTestnet:()=>tK,bounceBit:()=>tV,bounceBitTestnet:()=>tG,bronos:()=>tW,bronosTestnet:()=>tZ,bsc:()=>tJ,bscGreenfield:()=>tY,bscTestnet:()=>tX,bsquared:()=>tQ,bsquaredTestnet:()=>t0,btr:()=>t1,btrTestnet:()=>t2,bxn:()=>t6,bxnTestnet:()=>t3,cannon:()=>t5,canto:()=>t8,celo:()=>ra,celoAlfajores:()=>ro,chang:()=>rl,chiliz:()=>rc,chips:()=>ru,citreaTestnet:()=>rd,classic:()=>rh,coinbit:()=>rp,coinex:()=>rf,confluxESpace:()=>rm,confluxESpaceTestnet:()=>ry,coreDao:()=>rb,corn:()=>rg,cornTestnet:()=>rv,crab:()=>rw,creatorTestnet:()=>rx,creditCoin3Mainnet:()=>rE,creditCoin3Testnet:()=>r_,cronos:()=>rC,cronosTestnet:()=>rk,cronoszkEVM:()=>rS,cronoszkEVMTestnet:()=>rA,crossbell:()=>rT,curtis:()=>rI,cyber:()=>rP,cyberTestnet:()=>rO,dailyNetwork:()=>rD,dailyNetworkTestnet:()=>rU,darwinia:()=>rN,dchain:()=>rM,dchainTestnet:()=>rB,defichainEvm:()=>rR,defichainEvmTestnet:()=>rL,degen:()=>rj,dfk:()=>rF,diode:()=>rz,disChain:()=>rq,dodochainTestnet:()=>rH,dogechain:()=>r$,donatuz:()=>rK,dosChain:()=>rV,dosChainTestnet:()=>rG,dreyerxMainnet:()=>rW,dreyerxTestnet:()=>rZ,dustboyIoT:()=>rJ,dymension:()=>rY,edgeless:()=>rX,edgelessTestnet:()=>rQ,edgeware:()=>r0,edgewareTestnet:()=>r1,ekta:()=>r2,ektaTestnet:()=>r6,elastos:()=>r3,elastosTestnet:()=>r5,electroneum:()=>r8,electroneumTestnet:()=>r7,elysiumTestnet:()=>r4,energy:()=>r9,enuls:()=>ne,eon:()=>nt,eos:()=>nr,eosTestnet:()=>nn,etherlink:()=>ni,etherlinkTestnet:()=>ns,etp:()=>na,evmos:()=>no,evmosTestnet:()=>nl,excelonMainnet:()=>nc,expanse:()=>nu,exsat:()=>nd,exsatTestnet:()=>nh,fantom:()=>np,fantomSonicTestnet:()=>nf,fantomTestnet:()=>nm,fibo:()=>ny,filecoin:()=>nb,filecoinCalibration:()=>ng,filecoinHyperspace:()=>nv,fireChain:()=>nw,flare:()=>nx,flareTestnet:()=>nE,flowMainnet:()=>n_,flowPreviewnet:()=>nC,flowTestnet:()=>nk,fluence:()=>nS,fluenceStage:()=>nA,fluenceTestnet:()=>nT,forma:()=>nI,forta:()=>nP,foundry:()=>nO,fraxtal:()=>nD,fraxtalTestnet:()=>nU,funkiMainnet:()=>nN,funkiSepolia:()=>nM,fuse:()=>nB,fuseSparknet:()=>nR,fusion:()=>nL,fusionTestnet:()=>nj,garnet:()=>nF,geist:()=>nz,genesys:()=>nq,glideL1Protocol:()=>nH,glideL2Protocol:()=>n$,gnosis:()=>nK,gnosisChiado:()=>nV,goChain:()=>nZ,goat:()=>nG,gobi:()=>nW,godwoken:()=>nJ,goerli:()=>nY,gravity:()=>nX,guruNetwork:()=>nQ,guruTestnet:()=>n0,ham:()=>n1,happychainTestnet:()=>n2,haqqMainnet:()=>n6,haqqTestedge2:()=>n3,hardhat:()=>n5,harmonyOne:()=>n8,hashkey:()=>n7,hashkeyTestnet:()=>n4,hedera:()=>n9,hederaPreviewnet:()=>ie,hederaTestnet:()=>it,hela:()=>ir,hemi:()=>ii,hemiSepolia:()=>is,holesky:()=>ia,hpb:()=>io,huddle01Mainnet:()=>il,huddle01Testnet:()=>ic,humanode:()=>iu,humanodeTestnet5:()=>id,hychain:()=>ih,hychainTestnet:()=>ip,iSunCoin:()=>iA,idchain:()=>im,immutableZkEvm:()=>iy,immutableZkEvmTestnet:()=>ib,inEVM:()=>ig,initVerse:()=>iv,initVerseGenesis:()=>iw,ink:()=>ix,inkSepolia:()=>iE,iota:()=>i_,iotaTestnet:()=>iC,iotex:()=>ik,iotexTestnet:()=>iS,jbc:()=>iT,jbcTestnet:()=>iI,kaia:()=>ij,kairos:()=>iF,kakarotSepolia:()=>iO,kakarotStarknetSepolia:()=>iD,kardiaChain:()=>iU,karura:()=>iP,kava:()=>iN,kavaTestnet:()=>iM,kcc:()=>iB,kinto:()=>iR,klaytn:()=>iL,klaytnBaobab:()=>iz,koi:()=>iq,kroma:()=>iH,kromaSepolia:()=>i$,l3x:()=>iK,l3xTestnet:()=>iV,lavita:()=>iG,lensTestnet:()=>iW,lightlinkPegasus:()=>iZ,lightlinkPhoenix:()=>iJ,linea:()=>i5,lineaGoerli:()=>i8,lineaSepolia:()=>i7,lineaTestnet:()=>i4,lisk:()=>i9,liskSepolia:()=>se,localhost:()=>st,loop:()=>sr,lukso:()=>sn,luksoTestnet:()=>si,lumiaMainnet:()=>ss,lumiaTestnet:()=>sa,lycan:()=>so,lyra:()=>sl,mainnet:()=>sc.r,mandala:()=>su,manta:()=>sd,mantaSepoliaTestnet:()=>sh,mantaTestnet:()=>sp,mantle:()=>sf,mantleSepoliaTestnet:()=>sm,mantleTestnet:()=>sy,mapProtocol:()=>sb,matchain:()=>sg,matchainTestnet:()=>sv,mchVerse:()=>sw,mekong:()=>sx,meld:()=>sE,merlin:()=>s_,metachain:()=>sC,metachainIstanbul:()=>sk,metadium:()=>sS,metalL2:()=>sA,meter:()=>sT,meterTestnet:()=>sI,metis:()=>sP,metisGoerli:()=>sD,metisSepolia:()=>sO,mev:()=>sU,mevTestnet:()=>sN,mint:()=>sM,mintSepoliaTestnet:()=>sB,mitosisTestnet:()=>sR,mode:()=>sL,modeTestnet:()=>sj,monadTestnet:()=>sF,moonbaseAlpha:()=>sz,moonbeam:()=>sq,moonbeamDev:()=>sH,moonriver:()=>s$,morph:()=>sK,morphHolesky:()=>sV,morphSepolia:()=>sG,nahmii:()=>sW,nautilus:()=>sZ,near:()=>sJ,nearTestnet:()=>sY,neonDevnet:()=>sX,neonMainnet:()=>sQ,neoxMainnet:()=>s0,neoxT4:()=>s1,nexi:()=>s2,nexilix:()=>s6,oasisTestnet:()=>s3,oasys:()=>s5,odysseyTestnet:()=>s8,okc:()=>s7,omax:()=>s4,oneWorld:()=>s9,oortMainnetDev:()=>ae,opBNB:()=>at,opBNBTestnet:()=>ar,optimism:()=>ek,optimismGoerli:()=>eS,optimismSepolia:()=>
1eA,optopia:()=>an,optopiaTestnet:()=>ai,orderly:()=>as,orderlySepolia:()=>aa,otimDevnet:()=>ao,palm:()=>al,palmTestnet:()=>ac,pgn:()=>au,pgnTestnet:()=>ad,phoenix:()=>ah,planq:()=>ap,playfiAlbireo:()=>af,plinga:()=>am,plume:()=>ay,plumeDevnet:()=>ab,plumeTestnet:()=>ag,polterTestnet:()=>av,polygon:()=>aw,polygonAmoy:()=>ax,polygonMumbai:()=>aE,polygonZkEvm:()=>a_,polygonZkEvmCardona:()=>aC,polygonZkEvmTestnet:()=>ak,premiumBlockTestnet:()=>aS,pulsechain:()=>aA,pulsechainV4:()=>aT,qMainnet:()=>aP,qTestnet:()=>aO,ql1:()=>aI,real:()=>aD,redbellyMainnet:()=>aU,redbellyTestnet:()=>aN,reddioSepolia:()=>aL,redstone:()=>aM,rei:()=>aB,reyaNetwork:()=>aR,rivalz:()=>aj,rollux:()=>aF,rolluxTestnet:()=>az,ronin:()=>aq,root:()=>aH,rootPorcini:()=>a$,rootstock:()=>aK,rootstockTestnet:()=>aV,rss3:()=>aG,rss3Sepolia:()=>aW,saakuru:()=>aZ,saga:()=>aJ,saigon:()=>aY,sanko:()=>aX,sapphire:()=>aQ,sapphireTestnet:()=>a0,satoshiVM:()=>a1,satoshiVMTestnet:()=>a2,scroll:()=>a6,scrollSepolia:()=>a3,sei:()=>a5,seiDevnet:()=>a8,seiTestnet:()=>a7,sepolia:()=>a4,shape:()=>a9,shapeSepolia:()=>oe,shardeumSphinx:()=>ot,shibarium:()=>or,shibariumTestnet:()=>on,shiden:()=>oi,shimmer:()=>os,shimmerTestnet:()=>oa,sidraChain:()=>oo,silicon:()=>ol,siliconSepolia:()=>oc,sixProtocol:()=>ou,skaleBlockBrawlers:()=>od,skaleCalypso:()=>oh,skaleCalypsoTestnet:()=>op,skaleCryptoBlades:()=>of,skaleCryptoColosseum:()=>om,skaleEuropa:()=>oy,skaleEuropaTestnet:()=>ob,skaleExorde:()=>og,skaleHumanProtocol:()=>ov,skaleNebula:()=>ow,skaleNebulaTestnet:()=>ox,skaleRazor:()=>oE,skaleTitan:()=>o_,skaleTitanTestnet:()=>oC,sketchpad:()=>ok,snax:()=>oS,snaxTestnet:()=>oA,soneium:()=>oT,soneiumMinato:()=>oI,songbird:()=>oD,songbirdTestnet:()=>oU,sonic:()=>oP,sonicTestnet:()=>oO,sophon:()=>oN,sophonTestnet:()=>oM,spicy:()=>oB,step:()=>oR,story:()=>oL,storyOdyssey:()=>oj,storyTestnet:()=>oF,stratis:()=>oz,superlumio:()=>oq,superposition:()=>oH,superseed:()=>o$,superseedSepolia:()=>oK,swan:()=>oV,swanProximaTestnet:()=>oG,swanSaturnTestnet:()=>oW,swellchain:()=>oZ,swissdlt:()=>oJ,syscoin:()=>oY,syscoinTestnet:()=>oX,taiko:()=>oQ,taikoHekla:()=>o0,taikoJolnir:()=>o1,taikoKatla:()=>o2,taikoTestnetSepolia:()=>o6,taraxa:()=>o3,taraxaTestnet:()=>o5,telcoinTestnet:()=>o8,telos:()=>o7,telosTestnet:()=>o4,tenet:()=>o9,ternoa:()=>le,thaiChain:()=>lt,that:()=>lr,theta:()=>ln,thetaTestnet:()=>li,thunderCore:()=>ls,thunderTestnet:()=>la,tiktrixTestnet:()=>lo,tomb:()=>ll,treasure:()=>lc,treasureTopaz:()=>lu,tron:()=>ld,ubiq:()=>lh,ultra:()=>lp,ultraTestnet:()=>lf,ultron:()=>lm,ultronTestnet:()=>ly,unichain:()=>lb,unichainSepolia:()=>lg,unique:()=>lv,uniqueOpal:()=>lw,uniqueQuartz:()=>lx,unreal:()=>lE,vanar:()=>l_,vechain:()=>lC,velas:()=>lk,viction:()=>lS,victionTestnet:()=>lA,vision:()=>lT,visionTestnet:()=>lI,wanchain:()=>lP,wanchainTestnet:()=>
1lO,weaveVMAlphanet:()=>lD,wemix:()=>lU,wemixTestnet:()=>lN,wmcTestnet:()=>lM,worldLand:()=>lL,worldchain:()=>lB,worldchainSepolia:()=>lR,x1Testnet:()=>l$,xLayer:()=>lH,xLayerTestnet:()=>l$,xai:()=>lj,xaiTestnet:()=>lF,xdc:()=>lz,xdcTestnet:()=>lq,xrOne:()=>lK,xrSepolia:()=>lV,yooldoVerse:()=>lG,yooldoVerseTestnet:()=>lW,zenchainTestnet:()=>lZ,zeniq:()=>lJ,zeroG:()=>lY,zetachain:()=>lX,zetachainAthensTestnet:()=>lQ,zhejiang:()=>l0,zilliqa:()=>l1,zilliqaTestnet:()=>l2,zircuit:()=>l6,zircuitTestnet:()=>l3,zkFair:()=>l5,zkFairTestnet:()=>l8,zkLinkNova:()=>l7,zkLinkNovaSepoliaTestnet:()=>l4,zkSync:()=>l9,zkSyncInMemoryNode:()=>ce,zkSyncLocalNode:()=>ci,zkSyncSepoliaTestnet:()=>cs,zksync:()=>l9,zksyncInMemoryNode:()=>ce,zksyncLocalCustomHyperchain:()=>ct,zksyncLocalHyperchain:()=>cr,zksyncLocalHyperchainL1:()=>cn,zksyncLocalNode:()=>ci,zksyncSepoliaTestnet:()=>cs,zora:()=>ca,zoraSepolia:()=>co,zoraTestnet:()=>cl});var o={};r.r(o),r.d(o,{identity:()=>pH});var l={};r.r(l),r.d(l,{base2:()=>p$});var c={};r.r(c),r.d(c,{base8:()=>pK});var u={};r.r(u),r.d(u,{base10:()=>pV});var d={};r.r(d),r.d(d,{base16:()=>pG,base16upper:()=>pW});var h={};r.r(h),r.d(h,{base32:()=>pZ,base32hex:()=>pQ,base32hexpad:()=>p1,base32hexpadupper:()=>p2,base32hexupper:()=>p0,base32pad:()=>pY,base32padupper:()=>pX,base32upper:()=>pJ,base32z:()=>p6});var p={};r.r(p),r.d(p,{base36:()=>p3,base36upper:()=>p5});var f={};r.r(f),r.d(f,{base58btc:()=>p8,base58flickr:()=>p7});var m={};r.r(m),r.d(m,{base64:()=>p4,base64pad:()=>p9,base64url:()=>fe,base64urlpad:()=>ft});var y={};r.r(y),r.d(y,{base256emoji:()=>fs});var b={};r.r(b),r.d(b,{sha256:()=>fb,sha512:()=>fg});var g={};r.r(g),r.d(g,{identity:()=>fv});var v={};r.r(v),r.d(v,{code:()=>fx,decode:()=>f_,encode:()=>fE,name:()=>fw});var w={};r.r(w),r.d(w,{code:()=>fA,decode:()=>fI,encode:()=>fT,name:()=>fS});var x=r(75927);"undefined"!=typeof window&&(window.global=globalThis,Object.assign(window,{Buffer:x.hp}));var E=r(55733);function _(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var C=r(40814),k=r(69595),S=r(61117),A=r(34354);function T(e){if("string"==typeof e){if(!(0,A.P)(e,{strict:!1}))throw new S.M({address:e});return{address:e,type:"json-rpc"}}if(!(0,A.P)(e.address,{strict:!1}))throw new S.M({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,experimental_signAuthorization:e.experimental_signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}var I=r(69310),P=r(86255),O=r(92196);let D=new O.V("ethereum-core");var U=r(45757),N=r(76397),M=r(98979);function B(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),n="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,N.aT)(e)):e.blobs,i=[];for(let e of n)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?i:i.map(e=>(0,M.My)(e))}function R(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),n="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,N.aT)(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,N.aT)(e)):e.commitments,s=[];for(let e=0;e<n.length;e++){let r=n[e],a=i[e];s.push(Uint8Array.from(t.computeBlobKzgProof(r,a)))}return"bytes"===r?s:s.map(e=>(0,M.My)(e))}var L=r(48775),j=r(11601);function F(e,t){let r=(0,L.sc)((0,j.q)(e,{strict:!1})?(0,N.ZJ)(e):e);return"bytes"===(t||"hex")?r:(0,M.nj)(r)}function z(e){let{commitments:t,version:r}=e,n=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(let e of t)i.push(function(e){let{commitment:t,version:r=1}=e,n=e.to??("string"==typeof t?"hex":"bytes"),i=F(t,"bytes");return i.set([r],0),"bytes"===n?i:(0,M.My)(i)}({commitment:e,to:n,version:r}));return i}var q=r(80477);class H extends q.C{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class $ extends q.C{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class K extends q.C{constructor({hash:e,size:t}){super(`Versioned hash "${e}
1" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class V extends q.C{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}var G=r(95389),W=r(91149);function Z(e){let{data:t,kzg:r,to:n}=e,i=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?(0,N.aT)(e.data):e.data,n=(0,W.E)(r);if(!n)throw new $;if(n>761855)throw new H({maxSize:761855,size:n});let i=[],s=!0,a=0;for(;s;){let e=(0,G.l)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=r.slice(a,a+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),s=!1;break}t++,a+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,M.My)(e.bytes))}({data:t,to:n}),s=e.commitments??B({blobs:i,kzg:r,to:n}),a=e.proofs??R({blobs:i,commitments:s,kzg:r,to:n}),o=[];for(let e=0;e<i.length;e++)o.push({blob:i[e],commitment:s[e],proof:a[e]});return o}var J=r(16704),Y=r(67368);function X(e,t="hex"){let r=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),r=Q(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:i}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,N.aT)(e):e,r=Q(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),n=(0,G.l)(new Uint8Array(r.length));return(r.encode(n),"hex"===t)?(0,M.My)(n.bytes):n.bytes}function Q(e){if(e<256)return 1;if(e<65536)return 2;if(e<0x1000000)return 3;if(e<0x100000000)return 4;throw new q.C("Length is too large.")}var ee=r(26542),et=r(89780),er=r(87939),en=r(22162),ei=r(45732);function es(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:i}=e;if(t<=0)throw new et.qD({chainId:t});if(i&&!(0,A.P)(i))throw new S.M({address:i});if(n&&n>ee.Ao)throw new er.BG({maxFeePerGas:n});if(r&&n&&r>n)throw new er.lN({maxFeePerGas:n,maxPriorityFeePerGas:r})}function ea(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new U.Vg({transaction:e})}function eo(e){if(!e||0===e.length)return[];let t=[];for(let r=0;r<e.length;r++){let{address:n,storageKeys:i}=e[r];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new U.fZ({storageKey:i[e]});if(!(0,A.P)(n,{strict:!1}))throw new S.M({address:n});t.push([n,i])}return t}function el(e,t){let r=ea(e);return"eip1559"===r?function(e,t){let{chainId:r,gas:n,nonce:i,to:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:l,accessList:c,data:u}=e;es(e);let d=eo(c),h=[(0,M.nj)(r),i?(0,M.nj)(i):"0x",l?(0,M.nj)(l):"0x",o?(0,M.nj)(o):"0x",n?(0,M.nj)(n):"0x",s??"0x",a?(0,M.nj)(a):"0x",u??"0x",d,...ec(e,t)];return(0,J.aP)(["0x02",X(h)])}(e,t):"eip2930"===r?function(e,t){let{chainId:r,gas:n,data:i,nonce:s,to:a,value:o,accessList:l,gasPrice:c}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s}=e;if(t<=0)throw new et.qD({chainId:t});if(s&&!(0,A.P)(s))throw new S.M({address:s});if(r||i)throw new q.C("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>ee.Ao)throw new er.BG({maxFeePerGas:n})}(e);let u=eo(l),d=[(0,M.nj)(r),s?(0,M.nj)(s):"0x",c?(0,M.nj)(c):"0x",n?(0,M.nj)(n):"0x",a??"0x",o?(0,M.nj)(o):"0x",i??"0x",u,...ec(e,t)];return(0,J.aP)(["0x01",X(d)])}(e,t):"eip4844"===r?function(e,t){let{chainId:r,gas:n,nonce:i,to:s,value:a,maxFeePerBlobGas:o,maxFeePerGas:l,maxPriorityFeePerGas:c,accessList:u,data:d}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new $;for(let e of t){let t=(0,W.E)(e),r=(0,ei.ME)((0,en.di)(e,0,1));if(32!==t)throw new K({hash:e,size:t});if(1!==r)throw new V({hash:e,version:r})}}es(e)}(e);let h=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(void 0===h||void 0===p)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,M.My)(e)),r=e.kzg,n=B({blobs:t,kzg:r});if(void 0===h&&(h=z({commitments:n})),void 0===p){let e=R({blobs:t,commitments:n,kzg:r});p=Z({blobs:t,commitments:n,proofs:e})}}let f=eo(u),m=[(0,M.nj)(r),i?(0,M.nj)(i):"0x",c?(0,M.nj)(c):"0x",l?(0,M.nj)(l):"0x",n?(0,M.nj)(n):"0x",s??"0x",a?(0,M.nj)(a):"0x",d??"0x",f,o?(0,M.nj)(o):"0x",h??[],...ec(e,t)],y=[],b=[],g=[];if(p)for(let e=0;e<p.length;e++){let{blob:t,commitment:r,proof:n}=p[e];y.push(t),b.push(r),g.push(n)}return(0,J.aP)(["0x03",p?X([m,y,b,g]):X(m)])}(e,t):"eip7702"===r?function(e,t){let{authorizationList:r,chainId:n,gas:i,nonce:s,to:a,value:o,maxFeePerGas:l,maxPriorityFeePerGas:c,accessList:u,data:d}=e;!function(e){let{authorizationList:t}=e;
1if(t)for(let e of t){let{contractAddress:t,chainId:r}=e;if(!(0,A.P)(t))throw new S.M({address:t});if(r<0)throw new et.qD({chainId:r})}es(e)}(e);let h=eo(u),p=function(e){if(!e||0===e.length)return[];let t=[];for(let r of e){let{contractAddress:e,chainId:n,nonce:i,...s}=r;t.push([n?(0,M.nj)(n):"0x",e,i?(0,M.nj)(i):"0x",...ec({},s)])}return t}(r);return(0,J.aP)(["0x04",X([(0,M.nj)(n),s?(0,M.nj)(s):"0x",c?(0,M.nj)(c):"0x",l?(0,M.nj)(l):"0x",i?(0,M.nj)(i):"0x",a??"0x",o?(0,M.nj)(o):"0x",d??"0x",h,p,...ec(e,t)])])}(e,t):function(e,t){let{chainId:r=0,gas:n,data:i,nonce:s,to:a,value:o,gasPrice:l}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s}=e;if(s&&!(0,A.P)(s))throw new S.M({address:s});if(void 0!==t&&t<=0)throw new et.qD({chainId:t});if(r||i)throw new q.C("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>ee.Ao)throw new er.BG({maxFeePerGas:n})}(e);let c=[s?(0,M.nj)(s):"0x",l?(0,M.nj)(l):"0x",n?(0,M.nj)(n):"0x",a??"0x",o?(0,M.nj)(o):"0x",i??"0x"];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new U.zW({v:t.v});return e})(),n=(0,Y.B)(t.r),i=(0,Y.B)(t.s);c=[...c,(0,M.nj)(e),"0x00"===n?"0x":n,"0x00"===i?"0x":i]}else r>0&&(c=[...c,(0,M.nj)(r),"0x","0x"]);return X(c)}(e,t)}function ec(e,t){let r=t??e,{v:n,yParity:i}=r;if(void 0===r.r||void 0===r.s||void 0===n&&void 0===i)return[];let s=(0,Y.B)(r.r),a=(0,Y.B)(r.s);return["number"==typeof i?i?(0,M.nj)(1):"0x":0n===n?"0x":1n===n?(0,M.nj)(1):27n===n?"0x":(0,M.nj)(1),"0x00"===s?"0x":s,"0x00"===a?"0x":a]}let eu={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};var ed=r(34897);let eh={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ep(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,ei.ME)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,ei.ME)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?eh[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let ef=(0,ed.q)("transaction",ep);function em(e){let t=(e.transactions??[]).map(e=>"string"==typeof e?e:ep(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}let ey=(0,ed.q)("block",em);function eb(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}let eg={"0x0":"reverted","0x1":"success"};function ev(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>eb(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,ei.ME)(e.transactionIndex):null,status:e.status?eg[e.status]:null,type:e.type?eh[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}let ew=(0,ed.q)("transactionReceipt",ev),ex={block:ey({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=ep(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ei.uU(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:ef({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,ei.uU)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:ew({format:e=>({l1GasPrice:e.l1GasPrice?(0,ei.uU)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,ei.uU)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,ei.uU)(e.l1Fee):null,l1FeeScalar:e.l
11FeeScalar?Number(e.l1FeeScalar):null})})};function eE(e,t){return"deposit"===e.type||void 0!==e.sourceHash?function(e){!function(e){let{from:t,to:r}=e;if(t&&!(0,A.P)(t))throw new S.M({address:t});if(r&&!(0,A.P)(r))throw new S.M({address:r})}(e);let{sourceHash:t,data:r,from:n,gas:i,isSystemTx:s,mint:a,to:o,value:l}=e,c=[t,n,o??"0x",a?(0,M.nj)(a):"0x",l?(0,M.nj)(l):"0x",i?(0,M.nj)(i):"0x",s?"0x1":"0x",r??"0x"];return(0,J.aP)(["0x7e",X(c)])}(e):el(e,t)}let e_={contracts:eu,formatters:ex,serializers:{transaction:eE}};var eC=r(68275);let ek=(0,eC.x)({...e_,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...e_.contracts,disputeGameFactory:{1:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{1:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{1:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{1:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),eS=(0,eC.x)({...e_,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...e_.contracts,l2OutputOracle:{5:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{5:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{5:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:5}),eA=(0,eC.x)({...e_,id:0xaa37dc,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...e_.contracts,disputeGameFactory:{0xaa36a7:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{0xaa36a7:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{0xaa36a7:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{0xaa36a7:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:0xaa36a7}),eT=(0,eC.x)({...e_,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...e_.contracts,disputeGameFactory:{1:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{1:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{1:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:0x10ac19f}},l1StandardBridge:{1:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:0x10ac19f}}},sourceId:1}),eI=(0,eC.x)({...e_,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...e_.contracts,l2OutputOracle:{5:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{5:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{5:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:5}),eP=(0,eC.x)({...e_,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol
1:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...e_.contracts,disputeGameFactory:{0xaa36a7:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{0xaa36a7:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{0xaa36a7:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{0xaa36a7:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:0xaa36a7}),eO=[{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1Fee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],eD=(e,t)=>_(void 0,void 0,void 0,function*(){let r=el(Object.assign(Object.assign({chainId:e.chain.id},t),{type:t.type?t.type:"eip1559"}));return e.readContract({abi:eO,address:"0x420000000000000000000000000000000000000F",args:[r],functionName:"getL1Fee"})}),eU=[ek.id,eS.id,eA.id,eT.id,eI.id,eP.id],eN=(0,eC.x)({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1});var eM=r(53864);let eB=32n*ee.Au,eR={block:ey({format(e){let t=e.transactions?.map(e=>{if("string"==typeof e)return e;let t=eR.transaction?.format(e);return"0x71"===t.typeHex?t.type="eip712":"0xff"===t.typeHex&&(t.type="priority"),t});return{l1BatchNumber:e.l1BatchNumber?(0,ei.uU)(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?(0,ei.uU)(e.l1BatchTimestamp):null,transactions:t}}}),transaction:ef({format(e){let t={};return"0x71"===e.type?t.type="eip712":"0xff"===e.type&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?(0,ei.uU)(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?(0,ei.uU)(e.l1BatchTxIndex):null}}}),transactionReceipt:ew({format:e=>({l1BatchNumber:e.l1BatchNumber?(0,ei.uU)(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?(0,ei.uU)(e.l1BatchTxIndex):null,logs:e.logs.map(e=>({...eb(e),l1BatchNumber:e.l1BatchNumber?(0,ei.uU)(e.l1BatchNumber):null,transactionLogIndex:(0,ei.ME)(e.transactionLogIndex),logType:e.logType})),l2ToL1Logs:e.l2ToL1Logs.map(e=>({blockNumber:(0,ei.uU)(e.blockHash),blockHash:e.blockHash,l1BatchNumber:e.l1BatchNumber?(0,ei.uU)(e.l1BatchNumber):null,transactionIndex:(0,ei.uU)(e.transactionIndex),shardId:(0,ei.uU)(e.shardId),isService:e.isService,sender:e.sender,key:e.key,value:e.value,transactionHash:e.transactionHash,logIndex:(0,ei.uU)(e.logIndex)}))})}),transactionRequest:(0,eM.bm)({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format:e=>e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:(0,M.nj)(e.gasPerPubdata)}:{gasPerPubdata:(0,M.nj)(50000n)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from((0,N.aT)(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(e=>Array.from((0,N.aT)(e)))}:{},...e.customSignature?{customSignature:Array.from((0,N.aT)(e.customSignature))}:{}},type:"0x71"}:{}})};class eL extends q.C{constructor(){super('Transaction is not an EIP712 transaction.\n\nTransaction must:\n  - include `type: "eip712"`\n  - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`',{name:"InvalidEip712TransactionError"})}}function ej(e){return"eip712"===e.type||"customSignature"in e&&!!e.customSignature||"paymaster"in e&&!!e.paymaster||"paymasterInput"in e&&!!e.paymasterInput||"gasPerPubdata"in e&&"bigint"==typeof e.gasPerPubdata||"factoryDeps"in e&&!!e.factoryDeps}function eF(e){let{chainId:t,to:r,from:n,paymaster:i,paymasterInput:s}=e;if(!ej(e))throw new eL;if(!t||t<=0)throw new et.qD({chainId:t});if(r&&!(0,A.P)(r))throw new S.M({address:r});if(n&&!(0,A.P)(n))throw new S.M({address:n});if(i&&!(0,A.P)(i))throw new S.M({address:i});if(i&&!s)throw new q.C("`paymasterInput` must be provided when `paymaster` is defined");if(!i&&s)throw new q.C("`paymaster` must be provided when `paymasterInput` is defined")}var ez=r(33085);class eq extends q.C{constructor({givenLength:e,maxBytecodeSize:t}){super(`Bytecode cannot be longer than ${t} bytes. Given length: ${e}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class eH extends q.C{constructor({givenLengthInWords:e}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${e}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class e$ extends q.C{constructor({givenLength:e}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${e}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}let eK={formatters:eR,serializers:{transaction:function(e,t){return ej(e)?function(e){let{chainId:t,gas:r,nonce:n,to:i,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:l,customSignature:c,factoryDeps:u,paymaster:d,paymasterInput:h,gasPerPubdata:p,data:f}=e;eF(e);let m=[n?(0,M.nj)(n):"0x",l?(0,M.nj)(l):"0x",o?(0,M.nj)(o):"0x",r?(0,M.nj)(r):"0x",i??"0x",a?(0,M.nj)(a):"0x",f??"0x0",(0,M.nj)(t),(0,M.nj)(""),(0,M.nj)(""),(0,M.nj)(t),s??"0x",p?(0,M.nj)(p):(0,M.nj)(50000n),u??[],c??"0x",d&&h?[d,h]:[]];return(0,J.aP)(["0x71",X(m)])}(e):el(e,t)}},custom:{getEip712Domain:e=>{eF(e);let t=function(e){let{gas:t,nonce:r,to:n,from:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:o,factoryDeps:l,paymaster:c,paymasterInput:u,gasPerPubdata:d,data:h}=e;return{txType:113n,from:BigInt(i),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??50000n,maxFeePerGas:a??0n,maxPriorityFeePerGas:o??0n,paymaster:c?BigInt(c):0n,nonce:r?BigInt(r):0n,value:s??0n,data:h||"0x0",factoryDeps:l?.map(e=>M.nj(function(e){let t=(0,N.ZJ)(e);if(t.length%32!=0)throw new e$({givenLength:t.length});if(t.length>eB)throw new eq({givenLength:t.length,maxBytecodeSize:eB});let r=F(t),n=(0,N.ZJ)(r),i=t.length/32;if(i%2==0)throw new eH({givenLengthInWords:i});let s=(0,N.ZJ)(i),a=(0,ez.eV)(s,{size:2}),o=new Uint8Array([1,0]);return n.set(o,0),n.set(a,2),n}(e)))??[],paymasterInput:u||"0x"}}(e);return{domain:{name:"zkSync",version:"2",chainId:e.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:t}}}},eV=(0,eC.x)({...eK,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}}
1),eG=(0,eC.x)({...eK,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),eW=(0,eC.x)({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),eZ=(0,eC.x)({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),eJ=(0,eC.x)({id:1215,name:"ADF Chain",nativeCurrency:{name:"ADDFILL",symbol:"ADF",decimals:18},rpcUrls:{default:{http:["https://mainnet.adftechnology.com"]}},blockExplorers:{default:{name:"ADF Mainnet Explorer",url:"https://explorer.adftechnology.com"}},testnet:!1}),eY=(0,eC.x)({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),eX=(0,eC.x)({id:41455,name:"Aleph Zero",nativeCurrency:{name:"Aleph Zero",symbol:"AZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Aleph Zero EVM Explorer",url:"https://evm-explorer.alephzero.org",apiUrl:"https://evm-explorer.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4603377}}}),eQ=(0,eC.x)({id:2039,name:"Aleph Zero Testnet",nativeCurrency:{name:"TZERO",symbol:"TZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero-testnet.gelato.digital"],webSocket:["wss://ws.alephzero-testnet.gelato.digital"]}},blockExplorers:{default:{name:"Aleph Zero EVM Testnet explorer",url:"https://evm-explorer-testnet.alephzero.org",apiUrl:"https://evm-explorer-testnet.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2861745}},testnet:!0}),e0=(0,eC.x)({id:0x9c4400,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),e1=(0,eC.x)({id:0x9c4401,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),e2=(0,eC.x)({...e_,id:0x34fb5e38,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...e_.contracts,l2OutputOracle:{1:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{1:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:0x122fe6b}},l1StandardBridge:{1:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:0x122fe6b}}},sourceId:1}),e6=(0,eC.x)({...e_,id:0x1ad1ba8,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...e_.contracts,l2OutputOracle:{0xaa36a7:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{0xaa36a7:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{0xaa36a7:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:0xaa36a7}),e3=(0,eC.x)({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol
1:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),e5=(0,eC.x)({id:33139,name:"Ape Chain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),e8=(0,eC.x)({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),e7=(0,eC.x)({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),e4=(0,eC.x)({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18}
1,rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),e9=(0,eC.x)({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),te=(0,eC.x)({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),tt=(0,eC.x)({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),tr=(0,eC.x)({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),tn=(0,eC.x)({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),ti=(0,eC.x)({id:10242,name:"Arthera",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer.arthera.net",apiUrl:"https://explorer.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4502791}}}),ts=(0,eC.x)({id:10243,name:"Arthera Testnet",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc-test.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer-test.arthera.net",apiUrl:"https://explorer-test.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:22051}}}),ta=(0,eC.x)({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),to=(0,eC.x)({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),tl=(0,eC.x)({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),tc=(0,eC.x)({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol
1:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),tu=(0,eC.x)({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),td=(0,eC.x)({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),th=(0,eC.x)({id:0x4e454152,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x3bfe5a8}}}),tp=(0,eC.x)({id:0x4e454153,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),tf=(0,eC.x)({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),tm=(0,eC.x)({id:43114,name:"Avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xb5b35e}}}),ty=(0,eC.x)({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),tb=(0,eC.x)({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},sourceId:8453}),tg=(0,eC.x)({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},testnet:!0,sourceId:0xa0c71fd}),tv=(0,eC.x)({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),tw=(0,eC.x)({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}
vendor: 4,158 bytes, line 1
1),tx=(0,eC.x)({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),tE=(0,eC.x)({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),t_=(0,eC.x)({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),tC=(0,eC.x)({id:80094,name:"Berachain",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},ensRegistry:{address:"0x5b22280886a2f5e09a49bea7e320eab0e5320e28",blockCreated:877007},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:877008}},rpcUrls:{default:{http:["https://rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://berascan.com"}},testnet:!1}),tk=(0,eC.x)({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},testnet:!0}),tS=(0,eC.x)({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269},ensRegistry:{address:"0xB0eef18971290b333450586D33dcA6cE122651D2",blockCreated:7736794},ensUniversalResolver:{address:"0x41692Ef1EA0C79E6b73077E4A67572D2BDbD7057",blockCreated:7736795}},rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),tA=(0,eC.x)({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),tT=(0,eC.x)({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),tI=(0,eC.x)({id:32520,name:"Bitgert Mainnet",nativeCurrency:{decimals:18,name:"Brise",symbol:"Brise"},rpcUrls:{default:{http:["https://rpc-bitgert.icecreamswap.com"]}},blockExplorers:{default:{name:"Bitgert Scan",url:"https://brisescan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2118034}},testnet:!1}),tP=(0,eC.x)({id:96,name:"Bitkub",nativeCurrency:{name:"Bitkub",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),tO=(0,eC.x)({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),tD=(0,eC.x)({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}
1},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:2421963}}}),tU=(0,eC.x)({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:4135671}},testnet:!0}),tN=(0,eC.x)({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),tM=(0,eC.x)({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x1da3898}}}),tB=(0,eC.x)({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),tR=(0,eC.x)({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}}),tL=(0,eC.x)({...e_,id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929}},sourceId:1}),tj=(0,eC.x)({id:0xa0c71fd,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:0xaa36a7}),tF=(0,eC.x)({...e_,id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{1:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{1:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:1}),tz=(0,eC.x)({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),tq=(0,eC.x)({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),tH=(0,eC.x)({...e_,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{0xaa36a7:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{0xaa36a7:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:0xaa36a7}),t$=(0,eC.x)({id:11100,name:"Bool Beta Mainnet",nativeCurrency:{decimals:18,name:"BOL",symbol:"BOL"},rpcUrls:{default:{http:["https://beta-rpc-node-http.bool.network"]}},blockExplorers:{default:{name:"BoolScan",url:"https://beta-mainnet.boolscan.com/"}},testnet:!1}
1),tK=(0,eC.x)({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Botanix",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://node.botanixlabs.dev"]}},blockExplorers:{default:{name:"Botanix Testnet Explorer",url:"https://testnet.botanixscan.io"}},testnet:!0}),tV=(0,eC.x)({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),tG=(0,eC.x)({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),tW=(0,eC.x)({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),tZ=(0,eC.x)({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),tJ=(0,eC.x)({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xf2f12c}}}),tY=(0,eC.x)({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),tX=(0,eC.x)({id:97,name:"Binance Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x109d893}},testnet:!0}),tQ=(0,eC.x)({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),t0=(0,eC.x)({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),t1=(0,eC.x)({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com","https://rpc.ankr.com/bitlayer"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),t2=(0,eC.x)({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),t6=(0,eC.x)({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),t3=(0,eC.x)({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),t5=(0,eC.x)({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol
1:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),t8=(0,eC.x)({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}});async function t7(e,{address:t,blockNumber:r,blockTag:n="latest"}){let i=void 0!==r?(0,M.cK)(r):void 0,s=await e.request({method:"eth_getCode",params:[t,i||n]},{dedupe:!!i});if("0x"!==s)return s}async function t4(e,t){return BigInt(await e.request({method:"eth_gasPrice",params:[t]}))}async function t9(e,t){return BigInt(await e.request({method:"eth_maxPriorityFeePerGas",params:[t]}))}async function re(e){return!!await t7(e,{address:"0x4200000000000000000000000000000000000018"})}function rt(e){return 0===e||0n===e||null==e||"0"===e||""===e||"string"==typeof e&&("0x"===(0,Y.B)(e).toLowerCase()||"0x00"===(0,Y.B)(e).toLowerCase())}function rr(e){return"cip64"===e.type||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas&&!rt(e.feeCurrency)}let rn={block:ey({format:e=>({transactions:e.transactions?.map(e=>"string"==typeof e?e:{...ep(e),...e.gatewayFee?{gatewayFee:ei.uU(e.gatewayFee),gatewayFeeRecipient:e.gatewayFeeRecipient}:{},feeCurrency:e.feeCurrency}),...e.randomness?{randomness:e.randomness}:{}})}),transaction:ef({format(e){if("0x7e"===e.type)return{isSystemTx:e.isSystemTx,mint:e.mint?(0,ei.uU)(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};let t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?(0,ei.uU)(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:(0,eM.bm)({format(e){let t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),rr(e)&&(t.type="0x7b"),t}})},ri=ee.Ao,rs={contracts:eu,formatters:rn,serializers:{transaction:function(e,t){return rr(e)?function(e,t){!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s,feeCurrency:a}=e;if(t<=0)throw new et.qD({chainId:t});if(s&&!(0,A.P)(s))throw new S.M({address:s});if(n)throw new q.C("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(!rt(i)&&i>ri)throw new er.BG({maxFeePerGas:i});if(!rt(r)&&!rt(i)&&r>i)throw new er.lN({maxFeePerGas:i,maxPriorityFeePerGas:r});if(!rt(a)&&!(0,A.P)(a))throw new q.C("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(rt(a))throw new q.C("`feeCurrency` must be provided for CIP-64 transactions.")}(e);let{chainId:r,gas:n,nonce:i,to:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:l,accessList:c,feeCurrency:u,data:d}=e,h=[(0,M.nj)(r),i?(0,M.nj)(i):"0x",l?(0,M.nj)(l):"0x",o?(0,M.nj)(o):"0x",n?(0,M.nj)(n):"0x",s??"0x",a?(0,M.nj)(a):"0x",d??"0x",eo(c),u,...ec(e,t)];return(0,J.aP)(["0x7b",X(h)])}(e,t):eE(e,t)}},fees:{estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;let[t,r,n]=await Promise.all([t4(e.client,e.request.feeCurrency),t9(e.client,e.request.feeCurrency),re(e.client)]);return{maxFeePerGas:n?e.multiply(t-r)+r:t+r,maxPriorityFeePerGas:r}}}},ra=(0,eC.x)({...rs,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xc81517}},testnet:!1}),ro=(0,eC.x)({...rs,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...rs.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xde4e29},portal:{17e3:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{17e3:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{17e3:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{17e3:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),rl=(0,eC.x)({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),rc=(0,eC.x)({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.ankr.com/chiliz","https://chiliz-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}}}),ru=(0,eC.x)({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol
1:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),rd=(0,eC.x)({id:5115,name:"Citrea Testnet",nativeCurrency:{name:"cBTC",symbol:"cBTC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.citrea.xyz"]}},blockExplorers:{default:{name:"Citrea Explorer",url:"https://explorer.testnet.citrea.xyz",apiUrl:"https://explorer.testnet.citrea.xyz/api"}},testnet:!0}),rh=(0,eC.x)({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),rp=(0,eC.x)({id:112,name:"Coinbit Mainnet",nativeCurrency:{name:"GIDR",symbol:"GIDR",decimals:18},rpcUrls:{default:{http:["https://coinbit-rpc-mainnet.chain.sbcrypto.app"]}},blockExplorers:{default:{name:"Coinbit Explorer",url:"https://coinbit-explorer.chain.sbcrypto.app"}},testnet:!1}),rf=(0,eC.x)({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),rm=(0,eC.x)({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:0x416cc37}}}),ry=(0,eC.x)({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:0x700e4aa}}}),rb=(0,eC.x)({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xb5b35e}},testnet:!1}),rg=(0,eC.x)({id:21e6,name:"Corn",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://rpc.ankr.com/corn_maizenet"]}},blockExplorers:{default:{name:"Corn Explorer",url:"https://cornscan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3228}},sourceId:1}),rv=(0,eC.x)({id:0x1406f41,name:"Corn Testnet",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://rpc.ankr.com/corn_testnet"]}},blockExplorers:{default:{name:"Corn Testnet Explorer",url:"https://testnet.cornscan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4886}},testnet:!0,sourceId:0xaa36a7}),rw=(0,eC.x)({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),rx=(0,eC.x)({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),rE=(0,eC.x)({id:102030,name:"Creditcoin3 Mainnet",nativeCurrency:{name:"Creditcoin3 Mainnet",symbol
1:"CTC",decimals:18},rpcUrls:{default:{http:["https://mainnet3.creditcoin.network"],webSocket:["wss://mainnet3.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin.blockscout.com",apiUrl:"https://creditcoin.blockscout.com/api"}},testnet:!1}),r_=(0,eC.x)({id:102031,name:"Creditcoin3 Testnet",nativeCurrency:{name:"Creditcoin3 Testnet",symbol:"TCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-testnet.creditcoin.network"],webSocket:["wss://rpc.cc3-testnet.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-testnet.blockscout.com",apiUrl:"https://creditcoin-testnet.blockscout.com/api"}},testnet:!0}),rC=(0,eC.x)({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),rk=(0,eC.x)({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x9b8193}},testnet:!0}),rS=(0,eC.x)({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}},contracts:{multicall3:{address:"0x06f4487d7c4a5983d2660db965cc6d2565e4cfaa",blockCreated:72}}}),rA=(0,eC.x)({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),rT=(0,eC.x)({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x247968f}}}),rI=(0,eC.x)({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),rP=(0,eC.x)({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),rO=(0,eC.x)({id:0x6a63bb8,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),rD=(0,eC.x)({id:824,name:"Daily Network Mainnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.mainnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Mainnet Explorer",url:"https://explorer.mainnet.dailycrypto.net"}},testnet:!1}),rU=(0,eC.x)({id:825,name:"Daily Network Testnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.testnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Testnet Explorer",url:"https://explorer.testnet.dailycrypto.net"}},testnet:!0}),rN=(0,eC.x)({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol
1:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),rM=(0,eC.x)({...e_,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...e_.contracts}}),rB=(0,eC.x)({...e_,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...e_.contracts}}),rR=(0,eC.x)({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),rL=(0,eC.x)({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),rj=(0,eC.x)({id:0x27bc86aa,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),rF=(0,eC.x)({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xe1af97}}}),rz=(0,eC.x)({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),rq=(0,eC.x)({id:513100,name:"DisChain",nativeCurrency:{decimals:18,name:"DIS",symbol:"DIS"},rpcUrls:{default:{http:["https://rpc.dischain.xyz"]}},blockExplorers:{default:{name:"DisChain Explorer",url:"https://www.oklink.com/dis"}}}),rH=(0,eC.x)({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),r$=(0,eC.x)({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:0x183545f}}}),rK=(0,eC.x)({id:42026,name:"Donatuz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["ttps://rpc.donatuz.com"]}},blockExplorers:{default:{name:"Donatuz Explorer",url:"https://explorer.donatuz.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),rV=(0,eC.x)({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}
1),rG=(0,eC.x)({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),rW=(0,eC.x)({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),rZ=(0,eC.x)({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),rJ=(0,eC.x)({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),rY=(0,eC.x)({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),rX=(0,eC.x)({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),rQ=(0,eC.x)({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),r0=(0,eC.x)({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x11474f0}}}),r1=(0,eC.x)({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),r2=(0,eC.x)({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),r6=(0,eC.x)({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),r3=(0,eC.x)({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),r5=(0,eC.x)({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),r8=(0,eC.x)({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}
1),r7=(0,eC.x)({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),r4=(0,eC.x)({...e_,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),r9=(0,eC.x)({id:246,name:"Energy Mainnet",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"EnergyWeb Explorer",url:"https://explorer.energyweb.org"}},testnet:!1}),ne=(0,eC.x)({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),nt=(0,eC.x)({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),nr=(0,eC.x)({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),nn=(0,eC.x)({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),ni=(0,eC.x)({id:42793,name:"Etherlink",nativeCurrency:{decimals:18,name:"Tez",symbol
1:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),ns=(0,eC.x)({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet-explorer.etherlink.com"}},testnet:!0}),na=(0,eC.x)({id:0x1351815,name:"ETP Mainnet",nativeCurrency:{decimals:18,name:"ETP Chain Native Token",symbol:"ETP"},rpcUrls:{default:{http:["https://rpc.etpscan.xyz"]}},blockExplorers:{default:{name:"ETP Scan",url:"https://etpscan.xyz"}}}),no=(0,eC.x)({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),nl=(0,eC.x)({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),nc=(0,eC.x)({id:0x1507ca2,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),nu=(0,eC.x)({id:2,name:"Expanse Network",nativeCurrency:{decimals:18,name:"EXP",symbol:"EXP"},rpcUrls:{default:{http:["https://node.expanse.tech"]}},blockExplorers:{default:{name:"Expanse Explorer",url:"https://explorer.expanse.tech"}},testnet:!1}),nd=(0,eC.x)({id:7200,name:"exSat Network",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan.exsat.network",apiUrl:"https://scan.exsat.network/api"}}}),nh=(0,eC.x)({id:839999,name:"exSat Testnet",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm-tst3.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan-testnet.exsat.network",apiUrl:"https://scan-testnet.exsat.network/api"}}}),np=(0,eC.x)({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x1f79203}}}),nf=(0,eC.x)({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),nm=(0,eC.x)({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}},testnet:!0}),ny=(0,eC.x)({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),nb=(0,eC.x)({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),ng=(0,eC.x)({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}
1),nv=(0,eC.x)({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),nw=(0,eC.x)({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),nx=(0,eC.x)({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"Flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),nE=(0,eC.x)({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),n_=(0,eC.x)({id:747,name:"Flow EVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://evm.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),nC=(0,eC.x)({id:646,name:"Flow EVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),nk=(0,eC.x)({id:545,name:"Flow EVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://evm-testnet.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}},testnet:!0}),nS=(0,eC.x)({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:207583}}}),nA=(0,eC.x)({id:0x1cbc67bfdc,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83227}},testnet:!0}),nT=(0,eC.x)({id:0x31bf8c3,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96424}},testnet:!0}),nI=(0,eC.x)({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),nP=(0,eC.x)({id:80931,name:"Forta Chain",nativeCurrency:{symbol
1:"FORT",name:"FORT",decimals:18},rpcUrls:{default:{http:["https://rpc-forta-chain-8gj1qndmfc.t.conduit.xyz"]}},blockExplorers:{default:{name:"Forta Explorer",url:"https://explorer.forta.org"}}}),nO=(0,eC.x)({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),nD=(0,eC.x)({...e_,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...e_.contracts,l2OutputOracle:{1:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{1:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:0x123fb5b}},l1StandardBridge:{1:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:0x123fb5b}}},sourceId:1}),nU=(0,eC.x)({...e_,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...e_.contracts,l2OutputOracle:{17e3:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{17e3:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{17e3:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:17e3}),nN=(0,eC.x)({...e_,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...e_.contracts},sourceId:1}),nM=(0,eC.x)({...e_,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:0xaa36a7}),nB=(0,eC.x)({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xf660c4}}}),nR=(0,eC.x)({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),nL=(0,eC.x)({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x9f5385}},testnet:!1}),nj=(0,eC.x)({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x9f1f95}},testnet:!0}),nF=(0,eC.x)({...e_,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:17e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.
1com"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{17e3:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{17e3:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{17e3:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),nz=(0,eC.x)({id:63157,name:"Geist Mainnet",nativeCurrency:{decimals:18,name:"Aavegotchi GHST Token",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://geist-mainnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:660735}}}),nq=(0,eC.x)({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),nH=(0,eC.x)({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),n$=(0,eC.x)({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),nK=(0,eC.x)({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"xDAI",symbol:"XDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x140c71b}}}),nV=(0,eC.x)({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),nG=(0,eC.x)({id:2345,name:"GOAT",nativeCurrency:{decimals:18,name:"Bitcoin",symbol:"BTC"},rpcUrls:{default:{http:["https://rpc.goat.network"]}},blockExplorers:{default:{name:"Goat Explorer",url:"https://explorer.goat.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),nW=(0,eC.x)({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),nZ=(0,eC.x)({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol
1:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),nJ=(0,eC.x)({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),nY=(0,eC.x)({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:0x9dc386},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),nX=(0,eC.x)({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol
1:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),nQ=(0,eC.x)({id:260,name:"Guru Network Mainnet",nativeCurrency:{name:"GURU Token",symbol:"GURU",decimals:18},rpcUrls:{default:{http:["https://rpc.gurunetwork.ai/archive/260"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:271691}},testnet:!1}),n0=(0,eC.x)({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"tGURU Token",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://sepolia.gurunetwork.ai"}},testnet:!0}),n1=(0,eC.x)({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),n2=(0,eC.x)({id:216,name:"Happychain Testnet",nativeCurrency:{symbol:"HAPPY",name:"HAPPY",decimals:18},rpcUrls:{default:{http:["https://happy-testnet-sepolia.rpc.caldera.xyz/http"],webSocket:["wss://happy-testnet-sepolia.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Happy Chain Testnet Explorer",url:"https://happy-testnet-sepolia.explorer.caldera.xyz/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0}),n6=(0,eC.x)({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),n3=(0,eC.x)({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),n5=(0,eC.x)({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),n8=(0,eC.x)({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x1710b99}}}),n7=(0,eC.x)({id:177,name:"HashKey Chain",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://mainnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkey.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),n4=(0,eC.x)({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://hashkeychain-testnet.alt.technology"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkeychain-testnet-explorer.alt.technology"}}}),n9=(0,eC.x)({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}
1),ie=(0,eC.x)({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),it=(0,eC.x)({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),ir=(0,eC.x)({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),ii=(0,eC.x)({id:43111,name:"Hemi",network:"Hemi",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.hemi.xyz"}},testnet:!1}),is=(0,eC.x)({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),ia=(0,eC.x)({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),io=(0,eC.x)({id:269,name:"High Performance Blockchain",nativeCurrency:{name:"HPB",symbol:"HPB",decimals:18},rpcUrls:{default:{http:["https://hpbnode.com"]}},blockExplorers:{default:{name:"hpbScan",url:"https://hscan.org"}},testnet:!1}),il=(0,eC.x)({id:12323,name:"Huddle01 dRTC Chain",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle01.calderachain.xyz/http"],webSocket:["wss://huddle01.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle01.calderaexplorer.xyz",apiUrl:"https://huddle01.calderaexplorer.xyz/api"}},sourceId:42161}),ic=(0,eC.x)({id:2524852,name:"Huddle01 dRTC Chain Testnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle-testnet.rpc.caldera.xyz/http"],webSocket:["wss://huddle-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle-testnet.explorer.caldera.xyz",apiUrl:"https://huddle-testnet.explorer.caldera.xyz/api"}},sourceId:421614}),iu=(0,eC.x)({id:5234,name:"Humanode",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.mainnet.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.mainnet.stages.humanode.io"]}},blockExplorers:{default:{name:"Subscan",url:"https://humanode.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4413097}}}),id=(0,eC.x)({id:14853,name:"Humanode Testnet 5",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.testnet5.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.testnet5.stages.humanode.io"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),ih=(0,eC.x)({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),ip=(0,eC.x)({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol
1:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),im=(0,eC.x)({id:74,name:"IDChain Mainnet",nativeCurrency:{decimals:18,name:"EIDI",symbol:"EIDI"},rpcUrls:{default:{http:["https://idchain.one/rpc"],webSocket:["wss://idchain.one/ws"]}},blockExplorers:{default:{name:"IDChain Explorer",url:"https://explorer.idchain.one"}},testnet:!1}),iy=(0,eC.x)({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),ib=(0,eC.x)({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}}
1,contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),ig=(0,eC.x)({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),iv=(0,eC.x)({id:7233,name:"InitVerse Mainnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-mainnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseScan",url:"https://www.iniscan.com",apiUrl:"https://explorer-api.inichain.com/api"}},contracts:{multicall3:{address:"0x83466BE48A067115FFF91f7b892Ed1726d032e47",blockCreated:2318}}}),iw=(0,eC.x)({id:7234,name:"InitVerse Genesis Testnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-testnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseGenesisScan",url:"https://genesis-testnet.iniscan.com",apiUrl:"https://explorer-testnet-api.inichain.com/api"}},contracts:{multicall3:{address:"0x0cF32CBDd6c437331EA4f85ed2d881A5379B5a6F",blockCreated:16361}},testnet:!0}),ix=(0,eC.x)({...e_,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{...e_.contracts,disputeGameFactory:{1:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{1:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{1:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:1}),iE=(0,eC.x)({...e_,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...e_.contracts,disputeGameFactory:{0xaa36a7:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{0xaa36a7:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{0xaa36a7:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:0xaa36a7}
1),i_=(0,eC.x)({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),iC=(0,eC.x)({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),ik=(0,eC.x)({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x15230d6}}}),iS=(0,eC.x)({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:0x17383c8}},testnet:!0}),iA=(0,eC.x)({id:8017,name:"iSunCoin Mainnet",nativeCurrency:{decimals:18,name:"ISC",symbol:"ISC"},rpcUrls:{default:{http:["https://mainnet.isuncoin.com"]}},blockExplorers:{default:{name:"iSunCoin Explorer",url:"https://baifa.io/app/chains/8017"}}}),iT=(0,eC.x)({id:8899,name:"JIBCHAIN L1",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),iI=(0,eC.x)({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),iP=(0,eC.x)({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),iO=(0,eC.x)({id:0x6b6b7274,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),iD=(0,eC.x)({id:0x34550b76e4065,name:"Kakarot Starknet Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),iU=(0,eC.x)({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),iN=(0,eC.x)({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),iM=(0,eC.x)({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",n
1ativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),iB=(0,eC.x)({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xb3732e}},testnet:!1}),iR=(0,eC.x)({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),iL=(0,eC.x)({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x5b8e16f}}}),ij=(0,eC.x)({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x5b8e16f}}}),iF=(0,eC.x)({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x75aca81}},testnet:!0}),iz=(0,eC.x)({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x75aca81}},testnet:!0}),iq=(0,eC.x)({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),iH=(0,eC.x)({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xf4fa54}},testnet:!1}),i$=(0,eC.x)({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8900914}},testnet:!0}),iK=(0,eC.x)({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}
1),iV=(0,eC.x)({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),iG=(0,eC.x)({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),iW=(0,eC.x)({id:37111,name:"Lens Testnet",nativeCurrency:{name:"GRASS",symbol:"GRASS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.lens.dev"],webSocket:["wss://rpc.testnet.lens.dev/ws"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://block-explorer.testnet.lens.dev",apiUrl:"https://block-explorer-api.staging.lens.dev/api"}},testnet:!0}),iZ=(0,eC.x)({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x794be34}},testnet:!0}),iJ=(0,eC.x)({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x77af730}},testnet:!1});var iY=r(98722),iX=r(66734),iQ=r(14303),i0=r(24058),i1=r(41953);async function i2(e,t){let{account:r=e.account}=t;if(!r)throw new iX.T;let n=(0,iY.J)(r);try{let{accessList:r,blockNumber:i,blockTag:s,data:a,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:h,value:p,...f}=t,m=(i?(0,M.cK)(i):void 0)||s;(0,i1.c)(t);let y=e.chain?.formatters?.transactionRequest?.format,b=(y||eM.Bv)({...(0,i0.o)(f,{format:y}),from:n?.address,accessList:r,data:a,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:h,value:p}),{baseFeePerGas:g,gasLimit:v,priorityFeePerGas:w}=await e.request({method:"linea_estimateGas",params:m?[b,m]:[b]});return{baseFeePerGas:BigInt(g),gasLimit:BigInt(v),priorityFeePerGas:BigInt(w)}}catch(r){throw(0,iQ.d)(r,{...t,account:n,chain:e.chain})}}let i6={fees:{estimateFeesPerGas:i3,async maxPriorityFeePerGas({block:e,client:t,request:r}){let n=await i3({block:e,client:t,multiply:e=>e,request:r,type:"eip1559"});return n?.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function i3({client:e,multiply:t,request:r,type:n}){try{let i=await i2(e,{...r,account:r?.account}),{priorityFeePerGas:s}=i,a=t(BigInt(i.baseFeePerGas))+s;if("legacy"===n)return{gasPrice:a};return{maxFeePerGas:a,maxPriorityFeePerGas:s}}catch{return null}}let i5=(0,eC.x)({...i6,id:59144,name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),i8=(0,eC.x)({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),i7=(0,eC.x)({...i6,id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol
1:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427}},testnet:!0}),i4=(0,eC.x)({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),i9=(0,eC.x)({...e_,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{...e_.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{1:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{1:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{1:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:1}),se=(0,eC.x)({...e_,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...e_.contracts,l2OutputOracle:{0xaa36a7:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{0xaa36a7:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{0xaa36a7:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:0xaa36a7}),st=(0,eC.x)({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),sr=(0,eC.x)({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),sn=(0,eC.x)({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),si=(0,eC.x)({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),ss=(0,eC.x)({id:0x3b4c8eb9,name:"Lumia Mainnet",network:"LumiaMainnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Explorer",url:"https://explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3975939}},testnet:!1}),sa=(0,eC.x)({id:0x7467cbf8,name:"Lumia Testnet",network:"LumiaTestnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Testnet Explorer",url:"https://testnet-explorer.lumia.org/"}}
1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2235063}},testnet:!0}),so=(0,eC.x)({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),sl=(0,eC.x)({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}});var sc=r(74325);let su=(0,eC.x)({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),sd=(0,eC.x)({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),sh=(0,eC.x)({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),sp=(0,eC.x)({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),sf=(0,eC.x)({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),sm=(0,eC.x)({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),sy=(0,eC.x)({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),sb=(0,eC.x)({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol
1:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),sg=(0,eC.x)({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),sv=(0,eC.x)({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),sw=(0,eC.x)({id:29548,name:"MCH Verse",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.oasys.mycryptoheroes.net"]}},blockExplorers:{default:{name:"MCH Verse Explorer",url:"https://explorer.oasys.mycryptoheroes.net",apiUrl:"https://explorer.oasys.mycryptoheroes.net/api"}},testnet:!1}),sx=(0,eC.x)({id:0x1a5ee289c,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),sE=(0,eC.x)({id:0x13d92e8d,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),s_=(0,eC.x)({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),sC=(0,eC.x)({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),sk=(0,eC.x)({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),sS=(0,eC.x)({id:11,name:"Metadium Network",nativeCurrency:{decimals:18,name:"META",symbol:"META"},rpcUrls:{default:{http:["https://api.metadium.com/prod"]}},blockExplorers:{default:{name:"Metadium Explorer",url:"https://explorer.metadium.com"}},testnet:!1}),sA=(0,eC.x)({...e_,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...e_.contracts,l2OutputOracle:{1:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{1:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{1:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:1}),sT=(0,eC.x)({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),sI=(0,eC.x)({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),sP=(0,eC.x)({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://metis.rpc.hypersync.xyz","https://metis-pokt.nodies.app","https://api.blockeden.xyz/metis/67nCBdZQSH9z3YqDDjdm","https://metis-andromeda.rpc.thirdweb.com","https://metis-andromeda.gateway.tenderly.co","https://metis.api.onfinality.io/public","wss://metis-rpc.publicnode.com","https://andromeda.metis.io/?owner=1088","wss://metis.drpc.org","https://metis-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),sO=(0,eC.x)({id:59902,name:"Metis Sepolia",nativeCurrency:{decimals:18,name:"Test Metis",symbol:"tMETIS"},rpcUrls:{default:{http:["wss://metis-sepolia-rpc.publicnode.com","https://sepolia.metisdevops.link","https://metis-sepolia-rpc.publicnode.com","https://metis-sepolia.gateway.tenderly.co"]}},blockExplorers:{default:{name:"Metis Sepolia Explorer",url:"https://sepolia-explorer.metisdevops.link",apiUrl:"https://sepolia-explorer.metisdevops.link/api-docs"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:224185}}}),sD=(0,eC.x)({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),sU=(0,eC.x)({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol
1:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x52db43c}}}),sN=(0,eC.x)({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x3d639ab}},testnet:!0}),sM=(0,eC.x)({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),sB=(0,eC.x)({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),sR=(0,eC.x)({id:124832,name:"Mitosis Testnet",nativeCurrency:{name:"MITO",symbol:"MITO",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.mitosis.org"]}},blockExplorers:{default:{name:"Mitosis testnet explorer",url:"https://testnet.mitosiscan.xyz"}},testnet:!0}),sL=(0,eC.x)({...e_,id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{1:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{1:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{1:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:1}),sj=(0,eC.x)({...e_,id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{...e_.contracts,l2OutputOracle:{0xaa36a7:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{0xaa36a7:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{0xaa36a7:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:0xaa36a7}),sF=(0,eC.x)({id:10143,name:"Monad Testnet",nativeCurrency:{name:"Testnet MON Token",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.monad.xyz"]}},blockExplorers:{default:{name:"Monad Testnet explorer",url:"https://testnet.monadexplorer.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:251449}},testnet:!0}),sz=(0,eC.x)({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),sq=(0,eC.x)({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),sH=(0,eC.x)({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),s$=(0,eC.x)({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://moonriver.public.blastapi.io"],webS
1ocket:["wss://moonriver.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),sK=(0,eC.x)({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},testnet:!1}),sV=(0,eC.x)({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),sG=(0,eC.x)({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),sW=(0,eC.x)({id:5551,name:"Nahmii 2 Mainnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://l2.nahmii.io"]}},blockExplorers:{default:{name:"Nahmii 2 Explorer",url:"https://explorer.n2.nahmii.io"}},testnet:!1}),sZ=(0,eC.x)({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),sJ=(0,eC.x)({id:397,name:"NEAR Protocol",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.mainnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer.near.org"}},testnet:!1}),sY=(0,eC.x)({id:398,name:"NEAR Protocol Testnet",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.testnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer-testnet.near.org"}},testnet:!0}),sX=(0,eC.x)({id:0xe9ac0ce,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xc3b3260}},testnet:!0}),sQ=(0,eC.x)({id:0xe9ac0d6,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xc4fa274}},testnet:!1}),s0=(0,eC.x)({id:47763,name:"Neo X Mainnet",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://mainnet-1.rpc.banelabs.org","https://mainnet-2.rpc.banelabs.org"]}},blockExplorers:{default:{name:"Neo X - Explorer",url:"https://xexplorer.neo.org"}},testnet:!1}),s1=(0,eC.x)({id:0xba9304,name:"Neo X Testnet T4",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.banelabs.org/"]}},blockExplorers:{default:{name:"neox-scan",url:"https://xt4scan.ngd.network"}},testnet:!0}),s2=(0,eC.x)({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:0x18938b0}}}),s6=(0,eC.x)({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}
1),s3=(0,eC.x)({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),s5=(0,eC.x)({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),s8=(0,eC.x)({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),s7=(0,eC.x)({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x9e2778}}}),s4=(0,eC.x)({id:311,name:"Omax Mainnet",nativeCurrency:{decimals:18,name:"OMAX",symbol:"OMAX"},rpcUrls:{default:{http:["https://mainapi.omaxray.com"]}},blockExplorers:{default:{name:"Omax Explorer",url:"https://omaxscan.com"}},testnet:!1}),s9=(0,eC.x)({id:309075,name:"One World Chain Mainnet",nativeCurrency:{decimals:18,name:"OWCT",symbol:"OWCT"},rpcUrls:{default:{http:["https://mainnet-rpc.oneworldchain.org"]}},blockExplorers:{default:{name:"One World Explorer",url:"https://mainnet.oneworldchain.org"}},testnet:!1}),ae=(0,eC.x)({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),at=(0,eC.x)({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{56:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{56:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{56:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:56}),ar=(0,eC.x)({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{97:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{97:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{97:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:97}),an=(0,eC.x)({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),ai=(0,eC.x)({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),as=(0,eC.x)({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),aa=(0,eC.x)({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}
1),ao=(0,eC.x)({id:0x273cf32,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),al=(0,eC.x)({id:0x2a15c308d,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xeb6e80}}}),ac=(0,eC.x)({id:0x2a15c3083,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xeb6e80}},testnet:!0}),au=(0,eC.x)({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{1:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{1:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{1:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:ex,sourceId:1}),ad=(0,eC.x)({id:58008,network:"pgn-testnet",name:"PGN ",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{0xaa36a7:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{0xaa36a7:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{0xaa36a7:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:ex,sourceId:0xaa36a7,testnet:!0}),ah=(0,eC.x)({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),ap=(0,eC.x)({id:7070,name:"Planq Mainnet",nativeCurrency:{decimals:18,name:"PLQ",symbol:"PLQ"},rpcUrls:{default:{http:["https://evm-rpc.planq.network"]}},blockExplorers:{default:{name:"Planq Explorer",url:"https://evm.planq.network"}},testnet:!1}),af=(0,eC.x)({...eK,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),am=(0,eC.x)({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),ay=(0,eC.x)({id:98865,name:"Plume Mainnet",nativeCurrency:{name:"Plume Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.plumenetwork.xyz"],webSocket:["wss://rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plumenetwork.xyz",apiUrl:"https://explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:48577}},sourceId:1}
1),ab=(0,eC.x)({id:98864,name:"Plume Devnet",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://test-rpc.plumenetwork.xyz"],webSocket:["wss://test-rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://test-explorer.plumenetwork.xyz",apiUrl:"https://test-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:481948}},testnet:!0,sourceId:0xaa36a7}),ag=(0,eC.x)({id:0x99c0a0f,name:"Plume Testnet",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},testnet:!0,sourceId:0xaa36a7}),av=(0,eC.x)({id:631571,name:"Polter Testnet",nativeCurrency:{decimals:18,name:"Polter GHST",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-polter.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://polter-testnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11245}},testnet:!0}),aw=(0,eC.x)({id:137,name:"Polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x18938b0}}}),ax=(0,eC.x)({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api-amoy.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),aE=(0,eC.x)({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x18938b0}},testnet:!0}),a_=(0,eC.x)({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),aC=(0,eC.x)({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),ak=(0,eC.x)({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),aS=(0,eC.x)({id:23023,name:"PremiumBlock Testnet",nativeCurrency:{name:"Premium Block",symbol:"PBLK",decimals:18},rpcUrls:{default:{http:["https://rpc.premiumblock.org"]}},blockExplorers:{default:{name:"PremiumBlocks Explorer",url:"https://scan.premiumblock.org"}},testnet:!0}),aA=(0,eC.x)({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol
1:"PLS",decimals:18},testnet:!1,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xdb04c1}}}),aT=(0,eC.x)({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xdb04c1}}}),aI=(0,eC.x)({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),aP=(0,eC.x)({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),aO=(0,eC.x)({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),aD=(0,eC.x)({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://real.drpc.org"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),aU=(0,eC.x)({id:151,name:"Redbelly Network Mainnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.mainnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.routescan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api"}},testnet:!1}),aN=(0,eC.x)({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.testnet.routescan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/153_2/etherscan/api"}},testnet:!0}),aM=(0,eC.x)({...e_,name:"Redstone",id:690,sourceId:1,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{1:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:0x12abdd9}},l2OutputOracle:{1:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:0x12abde1}},l1StandardBridge:{1:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:0x12abddb}}}}),aB=(0,eC.x)({id:47805,name:"REI Mainnet",nativeCurrency:{decimals:18,name:"REI",symbol:"REI"},rpcUrls:{default:{http:["https://rpc.rei.network"],webSocket:["wss://rpc.rei.network"]}},blockExplorers:{default:{name:"REI Scan",url:"https://scan.rei.network"}},testnet:!1}),aR=(0,eC.x)({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),aL=(0,eC.x)({id:50341,name:"Reddio Sepolia",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://reddio-dev.reddio.com"]}},blockExplorers:{default:{name:"Reddioscan",url:"https://reddio-devnet.l2scan.co",apiUrl:"https://reddio-devnet.l2scan.co/api"}},testnet:!0}
1),aj=(0,eC.x)({id:753,name:"Rivalz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rivalz.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Rivalz Caldera Explorer",url:"https://rivalz.calderaexplorer.xyz"}},testnet:!1}),aF=(0,eC.x)({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),az=(0,eC.x)({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),aq=(0,eC.x)({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x18d166f}}}),aH=(0,eC.x)({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),a$=(0,eC.x)({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:0xa1112c}},testnet:!0}),aK=(0,eC.x)({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),aV=(0,eC.x)({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2771150}},testnet:!0}),aG=(0,eC.x)({...e_,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...e_.contracts,l2OutputOracle:{1:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{1:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:0x127d2b1}},l1StandardBridge:{1:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:1}),aW=(0,eC.x)({...e_,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...e_.contracts,l2OutputOracle:{0xaa36a7:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{0xaa36a7:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{0xaa36a7:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:0xaa36a7}),aZ=(0,eC.x)({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),aJ=(0,eC.x)({id:5464,name:"Saga",network:"saga",nativeCurrency:{decimals:18,name:"gas",symbol:"GAS"},rpcUrls:{default:{http:["http://sagaevm-5464-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Saga Explorer",url:"https://sagaevm-5464-1.sagaexplorer.io"}},contracts:{multicall3:{address:"0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160",blockCreated:467530}}}
1),aY=(0,eC.x)({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x11de6e7}},testnet:!0}),aX=(0,eC.x)({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:37}},testnet:!1}),aQ=(0,eC.x)({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),a0=(0,eC.x)({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"}},testnet:!0}),a1=(0,eC.x)({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),a2=(0,eC.x)({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),a6=(0,eC.x)({id:534352,name:"Scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),a3=(0,eC.x)({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),a5=(0,eC.x)({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),a8=(0,eC.x)({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),a7=(0,eC.x)({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),a4=(0,eC.x)({id:0xaa36a7,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}
1),a9=(0,eC.x)({...e_,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...e_.contracts,l2OutputOracle:{1:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:0x136d214}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{1:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:0x136d20d}},l1StandardBridge:{1:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:0x136d20f}}},sourceId:1}),oe=(0,eC.x)({...e_,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:0xaa36a7}),ot=(0,eC.x)({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),or=(0,eC.x)({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),on=(0,eC.x)({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),oi=(0,eC.x)({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),os=(0,eC.x)({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),oa=(0,eC.x)({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),oo=(0,eC.x)({id:97453,name:"Sidra Chain",nativeCurrency:{decimals:18,name:"Sidra Digital Asset",symbol:"SDA"},rpcUrls:{default:{http:["https://node.sidrachain.com"]}},blockExplorers:{default:{name:"Sidra Chain Explorer",url:"https://ledger.sidrachain.com"}}}),ol=(0,eC.x)({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),oc=(0,eC.x)({id:0x66ad6b08,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),ou=(0,eC.x)({id:98,name:"Six Protocol",nativeCurrency:{decimals:18,name:"SIX",symbol:"SIX"},rpcUrls:{default:{http:["https://sixnet-rpc-evm.sixprotocol.net"]}},blockExplorers:{default:{name:"Six Protocol Scan",url:"https://sixscan.io/sixnet"}},testnet:!1}),od=(0,eC.x)({id:0x175b1806,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webS
1ocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),oh=(0,eC.x)({id:0x5d456c62,name:"SKALE | Calypso NFT Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),op=(0,eC.x)({id:0x3a14269b,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),of=(0,eC.x)({id:0x3d28774d,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),om=(0,eC.x)({id:0x3d91725c,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),oy=(0,eC.x)({id:0x79f99296,name:"SKALE | Europa Liquidity Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),ob=(0,eC.x)({id:0x561bf78b,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),og=(0,eC.x)({id:0x7f8cb400,name:"SKALE | Exorde",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),ov=(0,eC.x)({id:0x4be3e8bd,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),ow=(0,eC.x)({id:0x585eb4b1,name:"SKALE | Nebula Gaming Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}
1),ox=(0,eC.x)({id:0x235ddd0,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),oE=(0,eC.x)({id:0x109b4597,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),o_=(0,eC.x)({id:0x507aaa2a,name:"SKALE | Titan Community Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),oC=(0,eC.x)({id:0x3cd156dc,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),ok=(0,eC.x)({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),oS=(0,eC.x)({...e_,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...e_.contracts,disputeGameFactory:{1:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{1:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{1:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{1:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:1}),oA=(0,eC.x)({...e_,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...e_.contracts,disputeGameFactory:{0xaa36a7:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{0xaa36a7:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{0xaa36a7:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{0xaa36a7:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061b
1C5f74"}}},testnet:!0,sourceId:0xaa36a7}),oT=(0,eC.x)({...e_,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...e_.contracts,disputeGameFactory:{1:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{1:{address:"0x0000000000000000000000000000000000000000"}},portal:{1:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{1:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:1}),oI=(0,eC.x)({...e_,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...e_.contracts,disputeGameFactory:{0xaa36a7:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{0xaa36a7:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{0xaa36a7:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{0xaa36a7:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:0xaa36a7}),oP=(0,eC.x)({id:146,name:"Sonic",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Explorer",url:"https://sonicscan.org/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:60}},testnet:!1}),oO=(0,eC.x)({id:64165,name:"Sonic Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.testnet.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Testnet Explorer",url:"https://testnet.soniclabs.com/"}},testnet:!0}),oD=(0,eC.x)({id:19,name:"Songbird Canary-Network",nativeCurrency:{decimals:18,name:"Songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xcc3368}}}),oU=(0,eC.x)({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),oN=(0,eC.x)({...eK,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),oM=(0,eC.x)({...eK,id:0x1fa72e78,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),oB=(0,eC.x)({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),oR=(0,eC.x)({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),oL=(0,eC.x)({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},testnet:!1}),oj=(0,eC.x)({id:1516,name:"Story Odyssey",nativeCurrency:{decimals:18,name:"IP",symbol
1:"IP"},rpcUrls:{default:{http:["https://rpc.odyssey.storyrpc.io"]}},blockExplorers:{default:{name:"Story Odyssey Explorer",url:"https://odyssey.storyscan.xyz"}},testnet:!0}),oF=(0,eC.x)({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),oz=(0,eC.x)({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),oq=(0,eC.x)({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),oH=(0,eC.x)({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39}},testnet:!1}),o$=(0,eC.x)({...e_,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...e_.contracts,disputeGameFactory:{1:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:0x13c6dc9}},l2OutputOracle:{1:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:0x13c6dc9}},portal:{1:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:0x13c6dc9}},l1StandardBridge:{1:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:0x13c6dc9}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:1}),oK=(0,eC.x)({...e_,id:53302,name:"Superseed Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Sepolia Explorer",url:"https://sepolia-explorer.superseed.xyz",apiUrl:"https://sepolia-explorer.superseed.xyz/api/v2"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{0xaa36a7:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{0xaa36a7:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:0xaa36a7}),oV=(0,eC.x)({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),oG=(0,eC.x)({id:0x134daed,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io	"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),oW=(0,eC.x)({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),oZ=(0,eC.x)({...e_,id:1923,name:"Swellchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-mainnet.alt.technology","https://rpc.ankr.com/swell"]}},blockExplorers:{default:{name:"Swell Explorer",url:"https://explorer.swellnetwork.io",apiUrl:"https://explorer.swellnetwork.io/api"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),oJ=(0,eC.x)({id:94,name:"SwissDLT Mainnet",nativeCurrency:{decimals:18,name:"BCTS",symbol:"BCTS"},rpcUrls:{default:{http:["https://rpc.swissdlt.ch"]}},blockExplorers:{default:{name:"SwissDLT Explorer",url:"https://explorer.swissdlt.ch"}},testnet:!1}
1),oY=(0,eC.x)({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),oX=(0,eC.x)({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),oQ=(0,eC.x)({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://taikoscan.io",apiUrl:"https://api.taikoscan.io/api"}},contracts:{multicall3:{address:"0xcb2436774C3e191c85056d248EF4260ce5f27A9D"}}}),o0=(0,eC.x)({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59757}},testnet:!0}),o1=(0,eC.x)({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),o2=(0,eC.x)({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),o6=(0,eC.x)({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),o3=(0,eC.x)({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),o5=(0,eC.x)({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),o8=(0,eC.x)({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),o7=(0,eC.x)({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://mainnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xeb1c295}}}),o4=(0,eC.x)({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://testnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0}),o9=(0,eC.x)({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),le=(0,eC.x)({id:752025,name:"Ternoa",nativeCurrency:{name:"Capsule Coin",symbol:"CAPS",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.zkevm.ternoa.network"]}},blockExplorers:{default:{name:"Ternoa Explorer",url:"https://explorer-mainnet.zkevm.ternoa.network"}},testnet:!1}),lt=(0,eC.x)({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),lr=(0,eC.x)({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol
1:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),ln=(0,eC.x)({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),li=(0,eC.x)({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),ls=(0,eC.x)({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://explorer-mainnet.thundercore.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),la=(0,eC.x)({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Thunder Explorer",url:"https://testnet.5irescan.io/"}},testnet:!0}),lo=(0,eC.x)({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),ll=(0,eC.x)({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),lc=(0,eC.x)({...eK,id:61166,name:"Treasure",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.treasure.lol"],webSocket:["wss://rpc.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Block Explorer",url:"https://treasurescan.io"}},contracts:{multicall3:{address:"0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a",blockCreated:101}},testnet:!1}),lu=(0,eC.x)({...eK,id:978658,name:"Treasure Topaz Testnet",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.topaz.treasure.lol"],webSocket:["wss://rpc.topaz.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Topaz Block Explorer",url:"https://topaz.treasurescan.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:108112}},testnet:!0}),ld=(0,eC.x)({id:0x2b6653dc,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),lh=(0,eC.x)({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),lp=(0,eC.x)({id:19991,name:"Ultra EVM",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Explorer",url:"https://evmexplorer.ultra.io"}}}),lf=(0,eC.x)({id:18881,name:"Ultra EVM Testnet",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.test.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Testnet Explorer",url:"https://evmexplorer.testnet.ultra.io"}},testnet:!0}),lm=(0,eC.x)({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),ly=(0,eC.x)({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}
1),lb=(0,eC.x)({id:130,name:"Unichain",nativeCurrency:{name:"Unichain",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),lg=(0,eC.x)({...e_,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{0xaa36a7:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{0xaa36a7:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{0xaa36a7:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:0xaa36a7}),lv=(0,eC.x)({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),lw=(0,eC.x)({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),lx=(0,eC.x)({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),lE=(0,eC.x)({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),l_=(0,eC.x)({id:2040,name:"Vanar Mainnet",nativeCurrency:{name:"VANRY",symbol:"VANRY",decimals:18},rpcUrls:{default:{http:["https://rpc.vanarchain.com"]}},blockExplorers:{default:{name:"Vanar Mainnet Explorer",url:"https://explorer.vanarchain.com/"}},testnet:!1}),lC=(0,eC.x)({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),lk=(0,eC.x)({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0x354b739}},testnet:!1}),lS=(0,eC.x)({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),lA=(0,eC.x)({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0xb9b3c3}},testnet:!0}),lT=(0,eC.x)({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),lI=(0,eC.x)({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),lP=(0,eC.x)({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:0x1823c86}}}
1),lO=(0,eC.x)({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:0x1798e18}},testnet:!0}),lD=(0,eC.x)({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),lU=(0,eC.x)({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),lN=(0,eC.x)({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),lM=(0,eC.x)({id:42070,name:"WMC Testnet",nativeCurrency:{name:"WMTx",symbol:"WMTx",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet-base.worldmobile.net"]}},blockExplorers:{default:{name:"WMC Explorer",url:"https://explorer2-base-testnet.worldmobile.net"}},testnet:!0}),lB=(0,eC.x)({...e_,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{1:{address:"0x0E90dCAFBC242D2C861A20Bb20EC8E7182965a52"}},l2OutputOracle:{1:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{1:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{1:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:1}),lR=(0,eC.x)({...e_,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org",apiUrl:"https://api-sepolia.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...e_.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{0xaa36a7:{address:"0x8cF97Ee616C986a070F5020d973b456D0120C253"}},l2OutputOracle:{0xaa36a7:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{0xaa36a7:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{0xaa36a7:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:0xaa36a7}),lL=(0,eC.x)({id:103,name:"WorldLand Mainnet",nativeCurrency:{decimals:18,name:"WLC",symbol:"WLC"},rpcUrls:{default:{http:["https://seoul.worldland.foundation"]}},blockExplorers:{default:{name:"WorldLand Scan",url:"https://scan.worldland.foundation"}},testnet:!1}),lj=(0,eC.x)({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),lF=(0,eC.x)({id:0x8c7f67225,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}
1),lz=(0,eC.x)({id:50,name:"XinFin Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:0x485e5f4}}}),lq=(0,eC.x)({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0x38ff28d}}}),lH=(0,eC.x)({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),l$=(0,eC.x)({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),lK=(0,eC.x)({id:273,name:"XR One",nativeCurrency:{decimals:18,name:"XR1",symbol:"XR1"},rpcUrls:{default:{http:["https://xr1.calderachain.xyz/http"],webSocket:["wss://xr1.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr1.calderaexplorer.xyz"}},testnet:!1}),lV=(0,eC.x)({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),lG=(0,eC.x)({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),lW=(0,eC.x)({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),lZ=(0,eC.x)({id:8408,name:"Zenchain Testnet",nativeCurrency:{decimals:18,name:"ZCX",symbol:"ZCX"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),lJ=(0,eC.x)({id:0x59454e4951,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),lY=(0,eC.x)({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),lX=(0,eC.x)({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://explorer.zetachain.com"}},testnet:!1}),lQ=(0,eC.x)({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://athens.explorer.zetachain.com"}},testnet:!0}),l0=(0,eC.x)({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol
1:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),l1=(0,eC.x)({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),l2=(0,eC.x)({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),l6=(0,eC.x)({...e_,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://zircuit1-mainnet.p2pify.com","https://zircuit1-mainnet.liquify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{1:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{1:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{1:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),l3=(0,eC.x)({...e_,id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287},l2OutputOracle:{0xaa36a7:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{0xaa36a7:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{0xaa36a7:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),l5=(0,eC.x)({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),l8=(0,eC.x)({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),l7=(0,eC.x)({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),l4=(0,eC.x)({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),l9=(0,eC.x)({...eK,id:324,name:"ZKsync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:0x2b8b4fc}}}),ce=(0,eC.x)({...eK,id:260,name:"ZKsync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}
1),ct=(0,eC.x)({...eK,id:272,name:"ZKsync CLI Local Custom Hyperchain",nativeCurrency:{name:"BAT",symbol:"BAT",decimals:18},rpcUrls:{default:{http:["http://localhost:15200"],webSocket:["ws://localhost:15201"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),cr=(0,eC.x)({...eK,id:270,name:"ZKsync CLI Local Hyperchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15100"],webSocket:["ws://localhost:15101"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),cn=(0,eC.x)({id:9,name:"ZKsync CLI Local Hyperchain L1",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15045"]}},blockExplorers:{default:{name:"Blockscout",url:"http://localhost:15001/",apiUrl:"http://localhost:15001/api/v2"}},testnet:!0}),ci=(0,eC.x)({...eK,id:270,name:"ZKsync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),cs=(0,eC.x)({...eK,id:300,name:"ZKsync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},universalSignatureVerifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),ca=(0,eC.x)({...e_,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...e_.contracts,l2OutputOracle:{1:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{1:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{1:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:1}),co=(0,eC.x)({...e_,id:0x3b9ac9ff,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...e_.contracts,l2OutputOracle:{0xaa36a7:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{0xaa36a7:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{0xaa36a7:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:0xaa36a7,testnet:!0}),cl=(0,eC.x)({...e_,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...e_.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{5:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:5,testnet:!0}),cc=Object.values(a).reduce((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t}),{}),cu=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];class cd extends q.C{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function ch(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new cd({value:e});let[r,n="0"]=e.split("."),i=r.startsWith("-");if(i&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${n}`))&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>t){let[e,i,s]=[n.slice(0,t-1),n.slice(t-1,t),n.slice(t)],a=Math.round(Number(`${i}.${s}`));(n=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`).length>t&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,t)}else n=n.padEnd(t,"0");return BigInt(`${i?"-":""}${r}${n}`)}var cp=r(89888);class cf{fetchFee(){return _(this,void 0,void 0,function*(){try{let e=yield this.estimateL1Fee();if(this.initialGasLimit&&this.initialMaxFeePerGas){this.fee.gas=this.initialGasLimit*this.initialMaxFeePerGas+e;return}let t=yield this.estimateGas();if(this.initialMaxFeePerGas){this.fee.gas=t*this.initialMaxFeePerGas+e;return}let r=yield this.publicClient.estimateFeesPerGas();if(!r||!r.maxFeePerGas)return;this.fee.gas=t*r.maxFeePerGas+e,this.maxFeePerGas=r.maxFeePerGas,this.maxPriorityFeePerGas=r.maxPriorityFeePerGas}catch(e){D.debug(e);return}})}constructor({publicClient:e,initialGasLimit:t,initialMaxFeePerGas:r}){this.fee={gas:BigInt(0)},this.publicClient=e,this.initialGasLimit=t,this.initialMaxFeePerGas=r}}let cm=(e,t)=>_(void 0,void 0,void 0,function*(){let{chain:r}=e;if(!r)throw Error("Chain is not defined");if(eU.includes(r.id))return eD(e,t);throw Error("Chain is not supported")}),cy=[...eU],cb=e=>cy.includes(e),cg=e=>/^0x[0-9a-fA-F]{40}$/.test(e);var cv=r(57317);function cw(e,t="wei"){return ch(e,cv.eL[t])}let cx=e=>cw(e,"wei"),cE=function(e){let{precision:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,I.eg)((0,k.c)(e),{precision:t})};var c_=r(68424);let cC=(e,t)=>(null==e?void 0:e.startsWith("0xa9059cbb"))?(0,c_.n)([{name:"x",type:"address"},{name:"x",type:"uint256"}],"0x"+(null==e?void 0:e.slice(10)))[0]:e&&"0x"!==e?void 0:null!=t?t:void 0;class ck extends cf{get to(){return this.transaction.to||void 0}set to(e){this.transaction.to=e}get from(){return this.address}get value(){return this.transaction.value}set value(e){this.transaction.value=e}get nonNativeValue(){return this.transaction.nonNativeValue}set nonNativeValue(e){this.transaction.nonNativeValue=e}get nonNativeAddress(){return this.transaction.nonNativeAddress}set nonNativeAddress(e){this.transaction.nonNativeAddress=e}get nonNativeDecimal(){return this.transaction.nonNativeDecimal}set nonNativeDecimal(e){this.transaction.nonNativeDecimal=e}get data(){return this.transaction.data}submit(){return _(this,void 0,void 0,function*(){return this.onSubmit(this.transaction).catch(e=>{if(e instanceof I.kW)throw new U.$s(new q.C(e.message),this.transaction);throw e})})}getBalance(){return this.publicClient.getBalance({address:this.address})}estimateGas(){return _(this,void 0,void 0,function*(){let e=yield this.publicClient.transport.request({method:"eth_estimateGas",params:[{data:this.data,to:this.to,value:this.convertBigIntToHex(this.value)}]});return(0,ei.uU)(e)})}convertBigIntToHex(e){return e?(0,M.nj)(e):void 0}getTransactionRecipient(){var e;return cC(this.transaction.data,null!==(e=this.transaction.to)&&void 0!==e?e:void 0)}estimateL1Fee(){return _(this,void 0,void 0,function*(){var e;return cb((null===(e=this.publicClient.chain)||void 0===e?void 0:e.id)||0)?cm(this.publicClient,{data:this.transaction.data,to:this.transaction.to,value:this.transaction.value}):BigInt(0)})}set maxFeePerGas(e){this.transaction.maxFeePerGas=e}set maxPriorityFeePerGas(e){this.transaction.maxPriorityFeePerGas=e}constructor({transaction:e,onSubmit:t,publicClient:r,account:n}
1){super({initialGasLimit:e.gas,initialMaxFeePerGas:e.maxFeePerGas,publicClient:r}),this.chain="EVM",this.validateAddressFormat=cg,this.parse=cx,this.parseNonNativeToken=(e,t)=>ch(e,t),this.format=cE,this.formatNonNativeToken=(e,t)=>(0,cp.J)(e,t),this.transaction=e,this.onSubmit=t,this.publicClient=r,this.address=n}}let cS=e=>_(void 0,[e],void 0,function*(e){let{from:t,publicClient:r,walletClient:n}=e;return new ck({account:t,onSubmit:e=>_(void 0,void 0,void 0,function*(){return e.nonNativeAddress?n.writeContract({abi:cu,account:t,address:e.nonNativeAddress,args:[e.to,e.nonNativeValue],functionName:"transfer",maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas}):n.sendTransaction({account:t,data:"0x",maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,to:e.to,value:e.value})}),publicClient:r,transaction:{}})}),cA=e=>{for(let t of Object.values(a))if("id"in t&&t.id===e)return t;throw Error("Chain with id ".concat(e," not found"))},cT=e=>{var t;return{blockExplorers:(null===(t=e.blockExplorerUrls)||void 0===t?void 0:t[0])?{default:{name:e.blockExplorerUrls[0],url:e.blockExplorerUrls[0]}}:void 0,id:e.chainId,name:e.vanityName||e.name||e.chainName,nativeCurrency:e.nativeCurrency,rpcUrls:{default:{http:e.rpcUrls},public:{http:e.rpcUrls}}}},cI=e=>{let t;try{t=cA(e.chainId)}catch(t){D.debug("Chain with id ".concat(e.chainId," not found in viem's chains"))}let r=cT(e);return t?Object.assign(Object.assign({},t),r):r},cP=e=>{let{chainId:t,name:r,networks:n}=e;return t||r?t&&r?n.find(e=>e.chainId===t&&e.name===r):t?n.find(e=>e.chainId===t):n.find(e=>e.name===r):void 0};var cO=r(55207);function cD(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,j.q)(t)?t:null}function cU(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,M.My)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let n=cD(r[e]),i=n?(0,N.ZJ)(n):(0,cO.S)((0,N.Af)(r[e]),"bytes");t=(0,cO.S)((0,J.xW)([t,i]),"bytes")}return(0,M.My)(t)}var cN=r(36991),cM=r(7702),cB=[{inputs:[{internalType:"contract ENS",name:"ens_",type:"address"},{internalType:"address",name:"registrarController_",type:"address"},{internalType:"address",name:"reverseRegistrar_",type:"address"},{internalType:"address",name:"owner_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AlreadyInitialized",type:"error"},{inputs:[],name:"CantSetSelfAsDelegate",type:"error"},{inputs:[],name:"CantSetSelfAsOperator",type:"error"},{inputs:[],name:"NewOwnerIsZeroAddress",type:"error"},{inputs:[],name:"NoHandoverRequest",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"uint256",name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"address",name:"delegate",type:"address"},{indexed:!0,internalType:"bool",name:"approved",type:"bool"}],name:"Approved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"},{indexed:!1,internalType:"bytes",name:"record",type:"bytes"}],name:"DNSRecordChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"}],name:"DNSRecordDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"lastzonehash",type:"bytes"},{indexed:!1,internalType:"bytes",name:"zonehash",type:"bytes"}],name:"DNSZonehashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newRegistrarController",type:"address"}],name:"RegistrarControllerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newReverseRegistrar",type:"address"}],name:"ReverseRegistrarUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"},{indexed:!1,internalType:"string",name:"value",type:"string"}],name:"TextChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint64",name:"newVersion",type:"uint64"}],name:"VersionChanged",type:"event"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"delegate",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cancelOwnershipHandover",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"clearRecords",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner",type:"address"}],name:"completeOwnershipHandover",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"},{internalType:"uint16",name:"resource",type:"uint16"}],name:"dnsRecord",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"ens",outputs:[{internalType:"contract ENS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"}],name:"hasDNSRecords",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"delegate",type:"address"}],name:"isApprovedFor",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"nodehash",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicallWithNodeCheck",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"result",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner",type:"address"}
1],name:"ownershipHandoverExpiresAt",outputs:[{internalType:"uint256",name:"result",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"recordVersions",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"registrarController",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"requestOwnershipHandover",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"",type:"bytes"},{internalType:"bytes",name:"data",type:"bytes"}],name:"resolve",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"reverseRegistrar",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentType",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"setABI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"},{internalType:"bytes",name:"a",type:"bytes"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes",name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"}],name:"setDNSRecords",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"},{internalType:"address",name:"implementer",type:"address"}],name:"setInterface",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"newName",type:"string"}],name:"setName",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"registrarController_",type:"address"}],name:"setRegistrarController",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"reverseRegistrar_",type:"address"}],name:"setReverseRegistrar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"},{internalType:"string",name:"value",type:"string"}],name:"setText",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes",name:"hash",type:"bytes"}],name:"setZonehash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"zonehash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"}];let cR=e=>_(void 0,[e],void 0,function*(e){let{rpcProvider:t,address:r}=e,n={avatar:void 0,name:void 0},i=yield t.getChainId();if(!i)return n;let s=e=>((0x80000000|e)>>>0).toString(16).toLocaleUpperCase();if(8453===i){let e=((e,t)=>{let r=e.toLocaleLowerCase(),n=(0,cO.S)(r.substring(2)),i=s(t),a=cU("".concat(i.toLocaleUpperCase(),".reverse"));return(0,cO.S)(function(e,t){if(e.length!==t.length)throw new cN.YE({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n<e.length;n++){let i=e[n],s=t[n];
1r.push(function e(t,r,n=!1){if("address"===t){if(!(0,A.P)(r))throw new S.M({address:r});return(0,ez.eV)(r.toLowerCase(),{size:n?32:null})}if("string"===t)return(0,M.i3)(r);if("bytes"===t)return r;if("bool"===t)return(0,ez.eV)((0,M.$P)(r),{size:n?32:1});let i=t.match(cM.Ge);if(i){let[e,t,s="256"]=i,a=Number.parseInt(s)/8;return(0,M.cK)(r,{size:n?32:a,signed:"int"===t})}let s=t.match(cM.BD);if(s){let[e,t]=s;if(Number.parseInt(t)!==(r.length-2)/2)throw new cN.BI({expectedSize:Number.parseInt(t),givenSize:(r.length-2)/2});return(0,ez.eV)(r,{dir:"right",size:n?32:null})}let a=t.match(cM.D5);if(a&&Array.isArray(r)){let[t,n]=a,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":(0,J.aP)(i)}throw new cN.Wl(t)}(i,s))}return(0,J.aP)(r)}(["bytes32","bytes32"],[a,n]))})(r,8453);try{let r=yield t.readContract({abi:cB,address:"0xC6d566A56A1aFf6508b41f6c90ff131615583BCD",args:[e],functionName:"name"});r&&(n.name=r)}catch(e){}}else n.name=yield t.getEnsName({address:r}),n.avatar=n.name?yield t.getEnsAvatar({name:n.name}):void 0;return n});function cL(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let i=e[r];return"function"==typeof i?i:r=>t(e,r)}class cj extends q.C{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var cF=r(94490),cz=r(46304),cq=r(57880),cH=r(4617);let c$="/docs/contract/encodeEventTopics";function cK(e){let{abi:t,eventName:r,args:n}=e,i=t[0];if(r){let e=(0,cH.iY)({abi:t,name:r});if(!e)throw new cN.M_(r,{docsPath:c$});i=e}if("event"!==i.type)throw new cN.M_(void 0,{docsPath:c$});let s=(0,cq.B)(i),a=(0,cF.h)(s),o=[];if(n&&"inputs"in i){let e=i.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map(e=>n[e.name])??[]:[];t.length>0&&(o=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>cV({param:e,value:t[r][i]})):void 0!==t[r]&&null!==t[r]?cV({param:e,value:t[r]}):null)??[])}return[a,...o]}function cV({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,cO.S)((0,N.ZJ)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new cj(e.type);return(0,cz.h)([e],[t])}function cG(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:s})=>{"success"===i&&t===e&&(r[n]=s.request)}),t=>r[t]||e.request}async function cW(e,t){let{address:r,abi:n,args:i,eventName:s,fromBlock:a,strict:o,toBlock:l}=t,c=cG(e,{method:"eth_newFilter"}),u=s?cK({abi:n,args:i,eventName:s}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof a?(0,M.cK)(a):a,toBlock:"bigint"==typeof l?(0,M.cK)(l):l,topics:u}]});return{abi:n,args:i,eventName:s,id:d,request:c(d),strict:!!o,type:"event"}}var cZ=r(74046),cJ=r(88085),cY=r(40928),cX=r(76790);function cQ(e,{abi:t,address:r,args:n,docsPath:i,functionName:s,sender:a}){let o=e instanceof cJ.$S?e:e instanceof q.C?e.walk(e=>"data"in e)||e.walk():{},{code:l,data:c,details:u,message:d,shortMessage:h}=o,p=e instanceof cN.O?new cJ.rR({functionName:s}):[3,cX.bq.code].includes(l)&&(c||u||d||h)?new cJ.M({abi:t,data:"object"==typeof c?c.data:c,functionName:s,message:o instanceof cY.J8?u:h??d}):e;return new cJ.bG(p,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:s,sender:a})}async function c0({hash:e,signature:t}){let n=(0,j.q)(e)?e:(0,M.nj)(e),{secp256k1:i}=await Promise.resolve().then(r.bind(r,35542)),s=(()=>{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:n,yParity:s}=t,a=c1(Number(s??n));return new i.Signature((0,ei.uU)(e),(0,ei.uU)(r)).addRecoveryBit(a)}let e=(0,j.q)(t)?t:(0,M.nj)(t),r=c1((0,ei.ME)(`0x${e.slice(130)}`));return i.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(n.substring(2)).toHex(!1);return`0x${s}`}function c1(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function c2({hash:e,signature:t}){return function(e){let t=(0,cO.S)(`0x${e.substring(4)}`).substring(26);return(0,C.o)(`0x${t}`)}(await c0({hash:e,signature:t}))}async function c6(e){let{authorization:t,signature:r}=e;return c2({hash:function(e){let{chainId:t,contractAddress:r,nonce:n,to:i}=e,s=(0,cO.S)((0,J.aP)(["0x05",X([t?(0,M.cK)(t):"0x",r,n?(0,M.cK)(n):"0x"])]));return"bytes"===i?(0,N.aT)(s):s}(t),signature:r??t})}var c3=r(18773);class c5 extends q.C{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:u,value:d}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,U.aO)({from:t?.address,to:u,value:void 0!==d&&`${(0,k.c)(d)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:void 0!==a&&`${(0,c3.Q)(a)} gwei`,maxFeePerGas:void 0!==o&&`${(0,c3.Q)(o)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,c3.Q)(l)} gwei`,nonce:c}
1)].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var c8=r(90563),c7=r(52368);class c4 extends q.C{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class c9 extends q.C{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class ue extends q.C{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,c3.Q)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class ut extends q.C{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}async function ur(e,{blockHash:t,blockNumber:r,blockTag:n,includeTransactions:i}={}){let s=i??!1,a=void 0!==r?(0,M.cK)(r):void 0,o=null;if(!(o=t?await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[a||(n??"latest"),s]},{dedupe:!!a})))throw new ut({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||em)(o)}async function un(e){return BigInt(await e.request({method:"eth_gasPrice"}))}async function ui(e,t){return us(e,t)}async function us(e,t){let{block:r,chain:n=e.chain,request:i}=t||{};try{let t=n?.fees?.maxPriorityFeePerGas??n?.fees?.defaultPriorityFee;if("function"==typeof t){let n=r||await cL(e,ur,"getBlock")({}),s=await t({block:n,client:e,request:i});if(null===s)throw Error();return s}if(void 0!==t)return t;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,ei.uU)(s)}catch{let[t,n]=await Promise.all([r?Promise.resolve(r):cL(e,ur,"getBlock")({}),cL(e,un,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new c9;let i=n-t.baseFeePerGas;if(i<0n)return 0n;return i}}async function ua(e,t){return uo(e,t)}async function uo(e,t){let{block:r,chain:n=e.chain,request:i,type:s="eip1559"}=t||{},a=await (async()=>"function"==typeof n?.fees?.baseFeeMultiplier?n.fees.baseFeeMultiplier({block:r,client:e,request:i}):n?.fees?.baseFeeMultiplier??1.2)();if(a<1)throw new c4;let o=a.toString().split(".")[1]?.length??0,l=10**o,c=e=>e*BigInt(Math.ceil(a*l))/BigInt(l),u=r||await cL(e,ur,"getBlock")({});if("function"==typeof n?.fees?.estimateFeesPerGas){let t=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:c,request:i,type:s});if(null!==t)return t}if("eip1559"===s){if("bigint"!=typeof u.baseFeePerGas)throw new c9;let t="bigint"==typeof i?.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await us(e,{block:u,chain:n,request:i}),r=c(u.baseFeePerGas);return{maxFeePerGas:i?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:i?.gasPrice??c(await cL(e,un,"getGasPrice")({}))}}async function ul(e,{address:t,blockTag:r="latest",blockNumber:n}){let i=await e.request({method:"eth_getTransactionCount",params:[t,n?(0,M.cK)(n):r]},{dedupe:!!n});return(0,ei.ME)(i)}async function uc(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,ei.ME)(t)}let uu=["blobVersionedHashes","chainId","fees","gas","nonce","type"],ud=new Map;async function uh(e,t){let r,n;let{account:i=e.account,blobs:s,chain:a,gas:o,kzg:l,nonce:c,nonceManager:u,parameters:d=uu,type:h}=t,p=i?(0,iY.J)(i):i,f={...t,...p?{from:p?.address}:{}};async function m(){return r||(r=await cL(e,ur,"getBlock")({blockTag:"latest"}))}async function y(){return n||(a?a.id:void 0!==t.chainId?t.chainId:n=await cL(e,uc,"getChainId")({}))}if((d.includes("blobVersionedHashes")||d.includes("sidecars"))&&s&&l){let e=B({blobs:s,kzg:l});if(d.includes("blobVersionedHashes")){let t=z({commitments:e,to:"hex"});f.blobVersionedHashes=t}if(d.includes("sidecars")){let t=R({blobs:s,commitments:e,kzg:l}),r=Z({blobs:s,commitments:e,proofs:t,to:"hex"});f.sidecars=r}}if(d.includes("chainId")&&(f.chainId=await y()),(d.includes("fees")||d.includes("type"))&&void 0===h)try{f.type=ea(f)}catch{let t=ud.get(e.uid);if(void 0===t){let r=await m();t="bigint"==typeof r?.baseFeePerGas,ud.set(e.uid,t)}f.type=t?"eip1559":"legacy"}if(d.includes("fees")){if("legacy"!==f.type&&"eip2930"!==f.type){if(void 0===f.maxFeePerGas||void 0===f.maxPriorityFeePerGas){let r=await m(),{maxFeePerGas:n,maxPriorityFeePerGas:i}=await uo(e,{block:r,chain:a,request:f});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<i)throw new ue({maxPriorityFeePerGas:i});f.maxPriorityFeePerGas=i,f.maxFeePerGas=n}}else{if(void 0!==t.maxFeePerGas||void 0!==t.maxPriorityFeePerGas)throw new c9;if(void 0===t.gasPrice){let t=await m(),{gasPrice:r}=await uo(e,{block:t,chain:a,request:f,type:"legacy"});f.gasPrice=r}}}if(d.includes("gas")&&void 0===o&&(f.gas=await cL(e,uf,"estimateGas")({...f,account:p?{address:p.address,type:"json-rpc"}:p})),d.includes("nonce")&&void 0===c&&p){if(u){let t=await y();f.nonce=await u.consume({address:p.address,chainId:t,client:e})}else f.nonce=await cL(e,ul,"getTransactionCount")({address:p.address,blockTag:"pending"})}return(0,i1.c)(f),delete f.parameters,f}async function up(e,{address:t,blockNumber:r,blockTag:n="latest"}){let i=r?(0,M.cK)(r):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,i||n]}))}async function uf(e,t){let{account:r=e.account}=t,n=r?(0,iY.J)(r):void 0;try{let{accessList:r,authorizationList:s,blobs:a,blobVersionedHashes:o,blockNumber:l,blockTag:c,data:u,gas:d,gasPrice:h,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:y,value:b,stateOverride:g,...v}=await uh(e,{...t,parameters:n?.type==="local"?void 0:["blobVersionedHashes"]}),w=(l?(0,M.cK)(l):void 0)||c,x=(0,c7.yH)(g),E=await (async()=>v.to?v.to:s&&s.length>0?await c6({authorization:s[0]}).catch(()=>{throw new q.C("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,i1.c)(t);let _=e.chain?.formatters?.transactionRequest?.format,C=(_||eM.Bv)({...(0,i0.o)(v,{format:_}),from:n?.address,accessList:r,authorizationList:s,blobs:a,blobVersionedHashes:o,data:u,gas:d,gasPrice:h,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:y,to:E,value:b});function i(t){let{block:r,request:n,rpcStateOverride:i}=t;return e.request({method:"eth_estimateGas",params:i?[n,r??"latest",i]:r?[n,r]:[n]})}let k=BigInt(await i({block:w,request:C,rpcStateOverride:x}));if(s){let t=await up(e,{address:C.from}),r=await Promise.all(s.map(async e=>{let{contractAddress:r}=e,s=await i({block:w,request:{authorizationList:void 0,data:u,from:n?.address,to:r,value:(0,M.cK)(t)},rpcStateOverride:x}).catch(()=>100000n);
vendor: 5,402 bytes, line 1
1return 2n*BigInt(s)}));k+=r.reduce((e,t)=>e+t,0n)}return k}catch(r){throw function(e,{docsPath:t,...r}){return new c5((()=>{let t=(0,c8.l)(e,r);return t instanceof er.RM?e:t})(),{docsPath:t,...r})}(r,{...t,account:n,chain:e.chain})}}async function um(e,t){let{abi:r,address:n,args:i,functionName:s,dataSuffix:a,...o}=t,l=(0,cZ.p)({abi:r,args:i,functionName:s});try{return await cL(e,uf,"estimateGas")({data:`${l}${a?a.replace("0x",""):""}`,to:n,...o})}catch(t){let e=o.account?(0,iY.J)(o.account):void 0;throw cQ(t,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:e?.address})}}var uy=r(81770),ub=r(90305);let ug="/docs/contract/decodeEventLog";function uv(e){let{abi:t,data:r,strict:n,topics:i}=e,s=n??!0,[a,...o]=i;if(!a)throw new cN._z({docsPath:ug});let l=1===t.length?t[0]:t.find(e=>"event"===e.type&&a===(0,cF.h)((0,cq.B)(e)));if(!(l&&"name"in l)||"event"!==l.type)throw new cN.kE(a,{docsPath:ug});let{name:c,inputs:u}=l,d=u?.some(e=>!("name"in e&&e.name)),h=d?[]:{},p=u.filter(e=>"indexed"in e&&e.indexed);for(let e=0;e<p.length;e++){let t=p[e],r=o[e];if(!r)throw new cN.l3({abiItem:l,param:t});h[d?e:t.name||e]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,c_.n)([e],t)||[])[0]}({param:t,value:r})}let f=u.filter(e=>!("indexed"in e&&e.indexed));if(f.length>0){if(r&&"0x"!==r)try{let e=(0,c_.n)(f,r);if(e){if(d)h=[...h,...e];else for(let t=0;t<f.length;t++)h[f[t].name]=e[t]}}catch(e){if(s){if(e instanceof cN.Iy||e instanceof ub.SK)throw new cN.fo({abiItem:l,data:r,params:f,size:(0,W.E)(r)});throw e}}else if(s)throw new cN.fo({abiItem:l,data:"0x",params:f,size:0})}return{eventName:c,args:Object.values(h).length>0?h:void 0}}function uw(e){let{abi:t,args:r,logs:n,strict:i=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(e=>{try{let n=t.find(t=>"event"===t.type&&e.topics[0]===(0,cF.h)(t));if(!n)return null;let a=uv({...e,abi:[n],strict:i});if(s&&!s.includes(a.eventName)||!function(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function i(e,t,r){try{if("address"===e.type)return(0,uy.h)(t,r);if("string"===e.type||"bytes"===e.type)return(0,cO.S)((0,N.ZJ)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((e,n)=>{if(null==e)return!0;let s=r[n];return!!s&&(Array.isArray(e)?e:[e]).some(e=>i(s,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof n||Array.isArray(n))&&Object.entries(n).every(([e,n])=>{if(null==n)return!0;let s=r.find(t=>t.name===e);return!!s&&(Array.isArray(n)?n:[n]).some(r=>i(s,r,t[e]))})}({args:a.args,inputs:n.inputs,matchArgs:r}))return null;return{...a,...e}}catch(n){let t,r;if(n instanceof cN.kE)return null;if(n instanceof cN.fo||n instanceof cN.l3){if(i)return null;t=n.abiItem.name,r=n.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...e,args:r?[]:{},eventName:t}}}).filter(Boolean)}async function ux(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:s,events:a,args:o,strict:l}={}){let c=a??(s?[s]:void 0),u=[];c&&(u=[c.flatMap(e=>cK({abi:[e],eventName:e.name,args:a?void 0:o}))],s&&(u=u[0]));let d=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:u,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:u,fromBlock:"bigint"==typeof n?(0,M.cK)(n):n,toBlock:"bigint"==typeof i?(0,M.cK)(i):i}]})).map(e=>eb(e));return c?uw({abi:c,args:o,logs:d,strict:l??!1}):d}async function uE(e,t){let{abi:r,address:n,args:i,blockHash:s,eventName:a,fromBlock:o,toBlock:l,strict:c}=t,u=a?(0,cH.iY)({abi:r,name:a}):void 0,d=u?void 0:r.filter(e=>"event"===e.type);return cL(e,ux,"getLogs")({address:n,args:i,blockHash:s,event:u,events:d,fromBlock:o,toBlock:l,strict:c})}var u_=r(59719),uC=r(66750);async function uk(e,t){let{abi:r,address:n,args:i,functionName:s,...a}=t,o=(0,cZ.p)({abi:r,args:i,functionName:s});try{let{data:t}=await cL(e,uC.T,"call")({...a,data:o,to:n});return(0,u_.e)({abi:r,args:i,functionName:s,data:t||"0x"})}catch(e){throw cQ(e,{abi:r,address:n,args:i,docsPath:"/docs/contract/readContract",functionName:s})}}async function uS(e,t){let{abi:r,address:n,args:i,dataSuffix:s,functionName:a,...o}=t,l=o.account?(0,iY.J)(o.account):e.account,c=(0,cZ.p)({abi:r,args:i,functionName:a});try{let{data:u}=await cL(e,uC.T,"call")({batch:!1,data:`${c}${s?s.replace("0x",""):""}`,to:n,...o,account:l}),d=(0,u_.e)({abi:r,args:i,functionName:a,data:u||"0x"}),h=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:d,request:{abi:h,address:n,args:i,dataSuffix:s,functionName:a,...o,account:l}}}catch(e){throw cQ(e,{abi:r,address:n,args:i,docsPath:"/docs/contract/simulateContract",functionName:a,sender:l?.address})}}let uA=new Map,uT=new Map,uI=0;function uP(e,t,r){let n=++uI,i=()=>uA.get(e)||[],s=()=>{let t=i();uA.set(e,t.filter(e=>e.id!==n))},a=()=>{let t=i();if(!t.some(e=>e.id===n))return;let r=uT.get(e);1===t.length&&r&&r(),s()},o=i();if(uA.set(e,[...o,{id:n,fns:t}]),o&&o.length>0)return a;let l={};for(let e in t)l[e]=(...t)=>{let r=i();if(0!==r.length)for(let n of r)n.fns[e]?.(...t)};let c=r(l);return"function"==typeof c&&uT.set(e,c),a}var uO=r(23646);function uD(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let i=!0,s=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));let o=await r?.(a)??n;await (0,uO.u)(o);let l=async()=>
1{i&&(await e({unpoll:s}),await (0,uO.u)(n),l())};l()})(),s}var uU=r(66692);let uN=new Map,uM=new Map;async function uB(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let n=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,uN),n=t(e,uM);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}(t),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()<r)return i.data;let s=n.promise.get();s||(s=e(),n.promise.set(s));try{let e=await s;return n.response.set({created:new Date,data:e}),e}finally{n.promise.clear()}}let uR=e=>`blockNumber.${e}`;async function uL(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await uB(()=>e.request({method:"eth_blockNumber"}),{cacheKey:uR(e.uid),cacheTime:t}))}async function uj(e,{filter:t}){let r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof n[0])return n;let i=n.map(e=>eb(e));return"abi"in t&&t.abi?uw({abi:t.abi,logs:i,strict:r}):i}async function uF(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function uz(e,t){let{abi:r,address:n,args:i,batch:s=!0,eventName:a,fromBlock:o,onError:l,onLogs:c,poll:u,pollingInterval:d=e.pollingInterval,strict:h}=t;return(void 0!==u?u:"bigint"==typeof o||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
1onfig.type))?(()=>{let t=h??!1;return uP((0,uU.A)(["watchContractEvent",n,i,s,e.uid,a,d,t,o]),{onLogs:c,onError:l},l=>{let c,u;void 0!==o&&(c=o-1n);let h=!1,p=uD(async()=>{if(!h){try{u=await cL(e,cW,"createContractEventFilter")({abi:r,address:n,args:i,eventName:a,strict:t,fromBlock:o})}catch{}h=!0;return}try{let o;if(u)o=await cL(e,uj,"getFilterChanges")({filter:u});else{let s=await cL(e,uL,"getBlockNumber")({});o=c&&c<s?await cL(e,uE,"getContractEvents")({abi:r,address:n,args:i,eventName:a,fromBlock:c+1n,toBlock:s,strict:t}):[],c=s}if(0===o.length)return;if(s)l.onLogs(o);else for(let e of o)l.onLogs([e])}catch(e){u&&e instanceof cX.Di&&(h=!1),l.onError?.(e)}},{emitOnBegin:!0,interval:d});return async()=>{u&&await cL(e,uF,"uninstallFilter")({filter:u}),p()}})})():(()=>{let t=(0,uU.A)(["watchContractEvent",n,i,s,e.uid,a,d,h??!1]),o=!0,u=()=>o=!1;return uP(t,{onLogs:c,onError:l},t=>((async()=>{try{let s=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),l=a?cK({abi:r,eventName:a,args:i}):[],{unsubscribe:c}=await s.subscribe({params:["logs",{address:n,topics:l}],onData(e){if(!o)return;let n=e.result;try{let{eventName:e,args:i}=uv({abi:r,data:n.data,topics:n.topics,strict:h}),s=eb(n,{args:i,eventName:e});t.onLogs([s])}catch(s){let e,r;if(s instanceof cN.fo||s instanceof cN.l3){if(h)return;e=s.abiItem.name,r=s.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=eb(n,{args:r?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});u=c,o||u()}catch(e){l?.(e)}})(),()=>u()))})()}function uq({chain:e,currentChainId:t}){if(!e)throw new et.jF;if(t!==e.id)throw new et.EH({chain:e,currentChainId:t})}async function uH(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}let u$=new(r(46140)).A(128);async function uK(e,t){let{account:r=e.account,chain:n=e.chain,accessList:i,authorizationList:s,blobs:a,data:o,gas:l,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:p,value:f,...m}=t;if(void 0===r)throw new iX.T({docsPath:"/docs/actions/wallet/sendTransaction"});let y=r?(0,iY.J)(r):null;try{(0,i1.c)(t);let r=await (async()=>t.to?t.to:s&&s.length>0?await c6({authorization:s[0]}).catch(()=>{throw new q.C("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(y?.type==="json-rpc"||null===y){let t;null!==n&&(t=await cL(e,uc,"getChainId")({}),uq({currentChainId:t,chain:n}));let b=e.chain?.formatters?.transactionRequest?.format,g=(b||eM.Bv)({...(0,i0.o)(m,{format:b}),accessList:i,authorizationList:s,blobs:a,chainId:t,data:o,from:y?.address,gas:l,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:p,to:r,value:f}),v=u$.get(e.uid);try{return await e.request({method:v?"wallet_sendTransaction":"eth_sendTransaction",params:[g]},{retryCount:0})}catch(t){if(!1===v)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[g]},{retryCount:0}).then(t=>(u$.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw u$.set(e.uid,!1),t;throw r});throw t}}if(y?.type==="local"){let t=await cL(e,uh,"prepareTransactionRequest")({account:y,accessList:i,authorizationList:s,blobs:a,chain:n,data:o,gas:l,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:p,nonceManager:y.nonceManager,parameters:[...uu,"sidecars"],value:f,...m,to:r}),b=n?.serializers?.transaction,g=await y.signTransaction(t,{serializer:b});return await cL(e,uH,"sendRawTransaction")({serializedTransaction:g})}if(y?.type==="smart")throw new iX.Z({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new iX.Z({docsPath:"/docs/actions/wallet/sendTransaction",type:y?.type})}catch(e){if(e instanceof iX.Z)throw e;throw function(e,{docsPath:t,...r}){let n=(()=>{let t=(0,c8.l)(e,r);return t instanceof er.RM?e:t})();return new U.$s(n,{docsPath:t,...r})}(e,{...t,account:y,chain:t.chain||void 0})}}async function uV(e,t){let{abi:r,account:n=e.account,address:i,args:s,dataSuffix:a,functionName:o,...l}=t;if(void 0===n)throw new iX.T({docsPath:"/docs/contract/writeContract"});
1let c=n?(0,iY.J)(n):null,u=(0,cZ.p)({abi:r,args:s,functionName:o});try{return await cL(e,uK,"sendTransaction")({data:`${u}${a?a.replace("0x",""):""}`,to:i,account:c,...l})}catch(e){throw cQ(e,{abi:r,address:i,args:s,docsPath:"/docs/contract/writeContract",functionName:o,sender:c?.address})}}function uG(e){let t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function uW(e,t){let r=!1;return Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some(e=>e.indexed):2===e.length&&(r=!0),{args:r?e[0]:void 0,options:(r?e[1]:e[0])??{}}}var uZ=r(44711);async function uJ(e,{chain:t}){let{id:r,name:n,nativeCurrency:i,rpcUrls:s,blockExplorers:a}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,M.cK)(r),chainName:n,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:a?Object.values(a).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})}var uY=r(62937);async function uX(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,C.o)(e))}async function uQ(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function u0(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,C.b)(e))}async function u1(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}var u2=r(87027);async function u6(e,t){let{account:r=e.account,chain:n=e.chain,...i}=t;if(!r)throw new iX.T({docsPath:"/docs/actions/wallet/signTransaction"});let s=(0,iY.J)(r);(0,i1.c)({account:s,...t});let a=await cL(e,uc,"getChainId")({});null!==n&&uq({currentChainId:a,chain:n});let o=n?.formatters||e.chain?.formatters,l=o?.transactionRequest?.format||eM.Bv;return s.signTransaction?s.signTransaction({...i,chainId:a},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...l(i),chainId:(0,M.cK)(a),from:s.address}]},{retryCount:0})}class u3 extends q.C{constructor({domain:e}){super(`Invalid domain "${(0,uU.A)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class u5 extends q.C{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class u8 extends q.C{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function u7(e){let{domain:t,message:r,primaryType:n,types:i}=e,s=(e,t)=>{for(let r of e){let{name:e,type:n}=r,a=t[e],o=n.match(cM.Ge);if(o&&("number"==typeof a||"bigint"==typeof a)){let[e,t,r]=o;(0,M.cK)(a,{signed:"int"===t,size:Number.parseInt(r)/8})}if("address"===n&&"string"==typeof a&&!(0,A.P)(a))throw new S.M({address:a});let l=n.match(cM.BD);if(l){let[e,t]=l;if(t&&(0,W.E)(a)!==Number.parseInt(t))throw new cN.BI({expectedSize:Number.parseInt(t),givenSize:(0,W.E)(a)})}let c=i[n];c&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new u8({type:e})}(n),s(c,a))}};if(i.EIP712Domain&&t){if("object"!=typeof t)throw new u3({domain:t});s(i.EIP712Domain,t)}if("EIP712Domain"!==n){if(i[n])s(i[n],r);else throw new u5({primaryType:n,types:i})}}function u4({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}async function u9(e,t){let{account:r=e.account,domain:n,message:i,primaryType:s}=t;if(!r)throw new iX.T({docsPath:"/docs/actions/wallet/signTypedData"});let a=(0,iY.J)(r),o={EIP712Domain:u4({domain:n}),...t.types};if(u7({domain:n,message:i,primaryType:s,types:o}),a.signTypedData)return a.signTypedData({domain:n,message:i,primaryType:s,types:o});let l=function(e){let{domain:t,message:r,primaryType:n,types:i}=e,s=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},a=i.EIP712Domain&&t?s(i.EIP712Domain,t):{},o=(()=>
1{if("EIP712Domain"!==n)return s(i[n],r)})();return(0,uU.A)({domain:a,message:o,primaryType:n,types:i})}({domain:n,message:i,primaryType:s,types:o});return e.request({method:"eth_signTypedData_v4",params:[a.address,l]},{retryCount:0})}async function de(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,M.cK)(t)}]},{retryCount:0})}async function dt(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function dr(e){return{addChain:t=>uJ(e,t),deployContract:t=>(function(e,t){let{abi:r,args:n,bytecode:i,...s}=t,a=(0,uY.m)({abi:r,args:n,bytecode:i});return uK(e,{...s,data:a})})(e,t),getAddresses:()=>uX(e),getChainId:()=>uc(e),getPermissions:()=>uQ(e),prepareTransactionRequest:t=>uh(e,t),requestAddresses:()=>u0(e),requestPermissions:t=>u1(e,t),sendRawTransaction:t=>uH(e,t),sendTransaction:t=>uK(e,t),signMessage:t=>(0,u2.l)(e,t),signTransaction:t=>u6(e,t),signTypedData:t=>u9(e,t),switchChain:t=>de(e,t),watchAsset:t=>dt(e,t),writeContract:t=>uV(e,t)}}function dn(e){let{key:t="wallet",name:r="Wallet Client",transport:n}=e;return(0,uZ.U)({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(dr)}var di=r(99652);let ds=e=>null!=e&&"object"==typeof e&&"walk"in e&&"function"==typeof e.walk,da=e=>{let{getAccounts:t,onPersonalSign:r,onSendTransaction:n,onSignTypedData:i,transport:s}=e;return e=>{let a=s(e);return(0,di.I)({request:e=>_(void 0,void 0,void 0,function*(){let{method:s,params:o}=e;if(t&&"eth_accounts"===s)return t({provider:a});if(r&&"personal_sign"===s){let[t]=o;return r({args:e,message:t,provider:a}).catch(e=>{if(e instanceof I.vx)throw new cX.vx(e);throw e})}if(n&&"eth_sendTransaction"===s){let[t]=o;return n({args:e,provider:a,transaction:t}).catch(e=>{if(ds(e)&&e.walk()instanceof I.kW)throw new cX.vx(e.walk());if(e instanceof I.kW||e instanceof I.vx)throw new cX.vx(e);throw e})}if(i&&"eth_signTypedData_v4"===s){let[,t]=null!=o?o:[];return i({args:e,message:t,provider:a}).catch(e=>{if(e instanceof I.vx)throw new cX.vx(e);throw e})}return a.request(e)})})(e)}},dl=e=>{try{return(0,C.b)(e)}catch(t){return e}};class dc extends P.uW{sendBalance(e){return _(this,arguments,void 0,function*(e){let{amount:t,toAddress:r,token:n}=e,i=yield this.getWalletClient();if(n&&n.address){let e=function({abi:e,address:t,client:r}){let[n,i]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],s=null!=n,a=null!=i,o={},l=!1,c=!1,u=!1;for(let t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?l=!0:c=!0:"event"===t.type&&(u=!0),l&&c&&u)break;return s&&(l&&(o.read=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=uG(r);return cL(n,uk,"readContract")({abi:e,address:t,functionName:i,args:s,...a})}})),c&&(o.simulate=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=uG(r);return cL(n,uS,"simulateContract")({abi:e,address:t,functionName:i,args:s,...a})}})),u&&(o.createEventFilter=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=uW(r,e.find(e=>"event"===e.type&&e.name===i));return cL(n,cW,"createContractEventFilter")({abi:e,address:t,eventName:i,args:s,...a})}}),o.getEvents=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=uW(r,e.find(e=>"event"===e.type&&e.name===i));return cL(n,uE,"getContractEvents")({abi:e,address:t,eventName:i,args:s,...a})}}),o.watchEvent=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:a}=uW(r,e.find(e=>"event"===e.type&&e.name===i));return cL(n,uz,"watchContractEvent")({abi:e,address:t,eventName:i,args:s,...a})}}))),a&&c&&(o.write=new Proxy({},{get:(r,n)=>(...r)=>{let{args:s,options:a}=uG(r);return cL(i,uV,"writeContract")({abi:e,address:t,functionName:n,args:s,...a})}})),(s||a)&&c&&(o.estimateGas=new Proxy({},{get:(r,s)=>(...r)=>{let{args:a,options:o}=uG(r);return cL(n??i,um,"estimateContractGas")({abi:e,address:t,functionName:s,args:a,...o,account:o.account??i.account})}})),o.address=t,o.abi=e,o}({abi:cu,address:n.address,client:i});return yield e.write.transfer([r,ch(t,n.decimals||18)])}let s={account:this.address,chain:cA((yield i.getChainId())),to:r,value:t?cw(t):void 0};return yield i.sendTransaction(s)})}getPublicClient(){return _(this,void 0,void 0,function*(){let e=yield this._connector.getPublicClient();if(!e)throw Error("Unable to retrieve PublicClient");return e})}getWalletClient(e){return _(this,void 0,void 0,function*(){let t=this._connector.getWalletClient(e);
1if(!t)throw Error("Unable to retrieve WalletClient");return dn({account:this.address,chain:t.chain,transport:da({onPersonalSign:e=>_(this,[e],void 0,function*(e){let{provider:t,args:r}=e;return yield this.sync(),t.request(r)}),onSendTransaction:e=>_(this,[e],void 0,function*(e){let{provider:t,args:r}=e;return yield this.sync(),t.request(r)}),onSignTypedData:e=>_(this,[e],void 0,function*(e){let{provider:t,args:r}=e;return yield this.sync(),t.request(r)}),transport:(0,di.I)(t.transport)})})})}constructor(e){super(Object.assign(Object.assign({},e),{address:dl(e.address)}))}}class du extends P.gy{getPublicClient(){return _(this,void 0,void 0,function*(){var e,t;let r=null!==(e=yield this.getNetwork())&&void 0!==e?e:1;if(0===this.evmNetworks.length)return;let n={cosmos:[],evm:this.evmNetworks,solana:[],starknet:void 0};if(!this.chainRpcProviders)return;let i=this.chainRpcProviders.getProviders(n);return null===(t=this.chainRpcProviders.getEvmProviderByChainId(i,r))||void 0===t?void 0:t.provider})}getNetwork(){return _(this,void 0,void 0,function*(){let e=this.getWalletClient();if(!this.supportsNetworkSwitching||!e)return Promise.resolve(void 0);let t=yield(0,I.Z8)(e.getChainId,{fallbackValue:I.cj,timeoutMs:1e3});return this.setActiveChain(cc[t]),t})}getNameService(e){return _(this,void 0,void 0,function*(){let t=yield this.getPublicClient();if(t)return cR({address:e,rpcProvider:t})})}isTestnet(){return _(this,void 0,void 0,function*(){var e,t,r;return null!==(r=null===(t=null===(e=yield this.getPublicClient())||void 0===e?void 0:e.chain)||void 0===t?void 0:t.testnet)&&void 0!==r&&r})}parseAddress(e){try{return(0,C.b)(e)}catch(t){P.vF.debug("Failed to parse EVM address into EIP55 format: error getting checksum, returning default ".concat(e),t)}return e}getSigner(){return _(this,void 0,void 0,function*(){return this.getWalletClient()})}getBalance(e){return _(this,void 0,void 0,function*(){let t=yield this.getPublicClient(),r=yield null==t?void 0:t.getBalance({address:e});if(r||r===BigInt(0))return(0,k.c)(r)})}supportsNetworkSwitching(){return!0}switchNetwork(e){return _(this,arguments,void 0,function*(e){let{networkName:t,networkChainId:r}=e,n=cP({chainId:r,name:t,networks:this.evmNetworks});if(!n)throw new I.ii("Could not find network mapping for chain ".concat(t||r));if(!this.supportsNetworkSwitching())throw new I.ii("Network switching is not supported");let i=this.getWalletClient();if(!i)throw new I.ii("Provider not found");return this.providerSwitchNetwork({network:n,provider:i})})}chooseAccountsToConnect(){return _(this,void 0,void 0,function*(){var e,t,r;let n=this.getWalletClient();if(!n)return[];try{let i=yield n.requestPermissions({eth_accounts:{}});P.vF.debug("chooseAccountsToConnect - requestPermissions result",i);let s=null===(r=null===(t=null===(e=null==i?void 0:i.find(e=>"eth_accounts"===e.parentCapability))||void 0===e?void 0:e.caveats)||void 0===t?void 0:t[0])||void 0===r?void 0:r.value;if("string"==typeof s)return[s];if(Array.isArray(s))return s}catch(e){if(P.vF.debug("chooseAccountsToConnect - error",e),4001===e.code)throw new I.vx}return[]})}getConnectedAccounts(){return _(this,void 0,void 0,function*(){let e=this.getWalletClient();if(!e)return[];let t=yield(0,I.Z8)(e.getAddresses,{fallbackValue:[],timeoutMs:500});return t.length&&this.setActiveAccount(t[0]),t})}providerSwitchNetwork(e){return _(this,arguments,void 0,function*(e){var t,r,n,i,s;let{network:a,provider:o}=e,{chainId:l}=a,c=yield this.getNetwork();if(!c||c!==l)try{if(!this.supportsNetworkSwitching())throw new I.ii("Network switching is not supported");let e=cI(a);if(yield o.switchChain({id:e.id}),"magiceden"===this.key){let e=yield o.getChainId();this.emit("chainChange",{chain:e.toString()})}else this.setActiveChain(e)}catch(e){if(null===(t=e.details)||void 0===t?void 0:t.includes('"wallet_switchEthereumChain" not implemented'))throw new I.ii("Network switching is not available at this time. The user should manually switch network in their wallet");if(4902===e.code||(null===(r=e.message)||void 0===r?void 0:r.includes("Unrecognized chain"))||(null===(i=null===(n=e.data)||void 0===n?void 0:n.orginalError)||void 0===i?void 0:i.code)===4902)return this.providerAddNetwork({network:a,provider:o});if((null===(s=e.message)||void 0===s?void 0:s.includes("rejected"))||"string"==typeof e&&e.includes("rejected"))throw new I.ii("User rejected the wallet's request to switch network");throw e}})}providerAddNetwork(e){return _(this,arguments,void 0,function*(e){var t;let{network:r,provider:n}=e;try{(0,I.Fr)()?yield this.walletUiUtils.addNetwork({handler:()=>n.addChain({chain:cI(r)}),network:r,walletConnector:this}):yield n.addChain({chain:cI(r)})}catch(e){if((null===(t=e.message)||void 0===t?void 0:t.includes("rejected"))||"string"==typeof e&&e.includes("rejected"))throw new I.ii("User rejected the wallet's request to add network");throw e}})}setActiveAccount(e){this.activeAccount=e?T(e):void 0}getActiveAccount(){return this.activeAccount}setActiveChain(e){this.activeChain=e}getActiveChain(){return this.activeChain}createUiTransaction(e){return _(this,void 0,void 0,function*(){yield this.validateActiveWallet(e);let t=yield this.getWalletClient(),r=yield this.getPublicClient();if(!r||!t)throw new I.ii("No public client available");return cS({from:e,publicClient:r,walletClient:t})})}confirmTransactionStatus(e){return _(this,void 0,void 0,function*(){let t=yield this.getPublicClient();if(!t)throw new I.ii("No public client available");return t.waitForTransactionReceipt({confirmations:3,hash:e})})}getBlockExplorerUrlsForCurrentNetwork(){return _(this,void 0,void 0,function*(){var e,t;let r=yield this.getNetwork();return null!==(t=null===(e=this.evmNetworks.find(e=>e.chainId.toString()===(null==r?void 0:r.toString())))||void 0===e?void 0:e.blockExplorerUrls)&&void 0!==t?t:[]})}getEnabledNetworks(){return this.evmNetworks}constructor(e){var t,r;super(e),this.supportedChains=["EVM","ETH"],this.connectedChain="EVM",this.ChainWallet=dc,this.evmNetworkRpcMap=()=>this.evmNetworks.reduce((e,t)=>
1{var r;return[e[t.chainId]]=(null===(r=null==t?void 0:t.privateCustomerRpcUrls)||void 0===r?void 0:r.length)?t.privateCustomerRpcUrls:t.rpcUrls,e},{}),this.walletUiUtils=e.walletUiUtils,this.evmNetworks=(0,I.bb)(e.evmNetworks),this.chainRpcProviders=e.chainRpcProviders,null===(t=this.chainRpcProviders)||void 0===t||t.registerEvmProviders(null!==(r=e.providersConfig)&&void 0!==r?r:{})}}var dd=r(38472),dh=r(40874),dp=r(4382);function df(e,t){if(!(e instanceof q.C))return!1;let r=e.walk(e=>e instanceof cJ.M);return r instanceof cJ.M&&(!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&r.reason===dp.fD[50])}function dm(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,N.Af)(t).byteLength+2),n=0,i=t.split(".");for(let e=0;e<i.length;e++){let t=(0,N.Af)(i[e]);if(t.byteLength>255){var s;t=(0,N.Af)((s=function(e){let t=new Uint8Array(32).fill(0);return e?cD(e)||(0,cO.S)((0,N.Af)(e)):(0,M.My)(t)}(i[e]),`[${s.slice(2)}]`))}r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function dy(e,{blockNumber:t,blockTag:r,coinType:n,name:i,gatewayUrls:s,strict:a,universalResolverAddress:o}){let l=o;if(!l){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");l=(0,dh.M)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a=(0,cZ.p)({abi:dd.Rm,functionName:"addr",...null!=n?{args:[cU(i),BigInt(n)]}:{args:[cU(i)]}}),o={address:l,abi:dd.Ag,functionName:"resolve",args:[(0,M.nj)(dm(i)),a],blockNumber:t,blockTag:r},c=cL(e,uk,"readContract"),u=s?await c({...o,args:[...o.args,s]}):await c(o);if("0x"===u[0])return null;let d=(0,u_.e)({abi:dd.Rm,args:null!=n?[cU(i),BigInt(n)]:void 0,functionName:"addr",data:u[0]});if("0x"===d||"0x00"===(0,Y.B)(d))return null;return d}catch(e){if(a)throw e;if(df(e,"resolve"))return null;throw e}}class db extends q.C{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class dg extends q.C{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class dv extends q.C{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class dw extends q.C{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}let dx=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,dE=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,d_=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,dC=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function dk(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!globalThis.hasOwnProperty("Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function dS(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function dA({uri:e,gatewayUrls:t}){let r=d_.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=dS(t?.ipfs,"https://ipfs.io"),i=dS(t?.arweave,"https://arweave.net"),s=e.match(dx),{protocol:a,subpath:o,target:l,subtarget:c=""}=s?.groups||{},u="ipns:/"===a||"ipns/"===o,d="ipfs:/"===a||"ipfs/"===o||dE.test(e);if(e.startsWith("http")&&!u&&!d){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((u||d)&&l)return{uri:`${n}/${u?"ipns":"ipfs"}/${l}${c}`,isOnChain:!1,isEncoded:!1};if("ar:/"===a&&l)return{uri:`${i}/${l}${c||""}`,isOnChain:!1,isEncoded:!1};let h=e.replace(dC,"");if(h.startsWith("<svg")&&(h=`data:image/svg+xml;base64,${btoa(h)}`),h.startsWith("data:")||h.startsWith("{"))return{uri:h,isOnChain:!0,isEncoded:!1};throw new dv({uri:e})}function dT(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new db({data:e});return e.image||e.image_url||e.image_data}async function dI({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(e=>e.json());return await dP({gatewayUrls:e,uri:dT(r)})}catch{throw new dv({uri:t})}}async function dP({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=dA({uri:t,gatewayUrls:e});if(n||await dk(r))return r;throw new dv({uri:t})}async function dO(e,{nft:t}){if("erc721"===t.namespace)return uk(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}
1],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return uk(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new dw({namespace:t.namespace})}async function dD(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?dU(e,{gatewayUrls:t,record:r}):dP({uri:r,gatewayUrls:t})}async function dU(e,{gatewayUrls:t,record:r}){let n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[s,a]=r.split(":"),[o,l]=n.split(":");if(!s||"eip155"!==s.toLowerCase())throw new dg({reason:"Only EIP-155 supported"});if(!a)throw new dg({reason:"Chain ID not found"});if(!l)throw new dg({reason:"Contract address not found"});if(!i)throw new dg({reason:"Token ID not found"});if(!o)throw new dg({reason:"ERC namespace not found"});return{chainID:Number.parseInt(a),namespace:o.toLowerCase(),contractAddress:l,tokenID:i}}(r),{uri:i,isOnChain:s,isEncoded:a}=dA({uri:await dO(e,{nft:n}),gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return dP({uri:dT(JSON.parse(a?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let o=n.tokenID;return"erc1155"===n.namespace&&(o=o.replace("0x","").padStart(64,"0")),dI({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,o)})}async function dN(e,{blockNumber:t,blockTag:r,name:n,key:i,gatewayUrls:s,strict:a,universalResolverAddress:o}){let l=o;if(!l){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");l=(0,dh.M)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a={address:l,abi:dd.Ag,functionName:"resolve",args:[(0,M.nj)(dm(n)),(0,cZ.p)({abi:dd.SJ,functionName:"text",args:[cU(n),i]})],blockNumber:t,blockTag:r},o=cL(e,uk,"readContract"),c=s?await o({...a,args:[...a.args,s]}):await o(a);if("0x"===c[0])return null;let u=(0,u_.e)({abi:dd.SJ,functionName:"text",data:c[0]});return""===u?null:u}catch(e){if(a)throw e;if(df(e,"resolve"))return null;throw e}}async function dM(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:s,strict:a,universalResolverAddress:o}){let l=await cL(e,dN,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o,gatewayUrls:s,strict:a});if(!l)return null;try{return await dD(e,{record:l,gatewayUrls:n})}catch{return null}}async function dB(e,{address:t,blockNumber:r,blockTag:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let o=a;if(!o){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");o=(0,dh.M)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let l=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let s={address:o,abi:dd.oX,functionName:"reverse",args:[(0,M.nj)(dm(l))],blockNumber:r,blockTag:n},a=cL(e,uk,"readContract"),[c,u]=i?await a({...s,args:[...s.args,i]}):await a(s);if(t.toLowerCase()!==u.toLowerCase())return null;return c}catch(e){if(s)throw e;if(df(e,"reverse"))return null;throw e}}async function dR(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:i}){let s=i;if(!s){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");s=(0,dh.M)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}let[a]=await cL(e,uk,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,M.nj)(dm(n))],blockNumber:t,blockTag:r});return a}async function dL(e,t){let{account:r=e.account,blockNumber:n,blockTag:i="latest",blobs:s,data:a,gas:o,gasPrice:l,maxFeePerBlobGas:c,maxFeePerGas:u,maxPriorityFeePerGas:d,to:h,value:p,...f}=t,m=r?(0,iY.J)(r):void 0;try{(0,i1.c)(t);let r=n?(0,M.cK)(n):void 0,y=e.chain?.formatters?.transactionRequest?.format,b=(y||eM.Bv)({...(0,i0.o)(f,{format:y}),from:m?.address,blobs:s,data:a,gas:o,gasPrice:l,maxFeePerBlobGas:c,maxFeePerGas:u,maxPriorityFeePerGas:d,to:h,value:p}),g=await e.request({method:"eth_createAccessList",params:[b,r||i]});return{accessList:g.accessList,gasUsed:BigInt(g.gasUsed)}}catch(r){throw(0,iQ.d)(r,{...t,account:m,chain:e.chain})}}async function dj(e){let t=cG(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function dF(e,{address:t,args:r,event:n,events:i,fromBlock:s,strict:a,toBlock:o}={}){let l=i??(n?[n]:void 0),c=cG(e,{method:"eth_newFilter"}),u=[];l&&(u=[l.flatMap(e=>cK({abi:[e],eventName:e.name,args:r}))],n&&(u=u[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof s?(0,M.cK)(s):s,toBlock:"bigint"==typeof o?(0,M.cK)(o):o,...u.length?{topics:u}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:s,id:d,request:c(d),strict:!!a,toBlock:o,type:"event"}}async function dz(e){let t=cG(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function dq(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}async function dH(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let i;let s=void 0!==r?(0,M.cK)(r):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]},{dedupe:!!s}),(0,ei.ME)(i)}class d$ extends q.C{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function dK(e,t){let{address:r,factory:n,factoryData:i}=t;try{let[t,s,a,o,l,c,u]=await cL(e,uk,"readContract")({abi:dV,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:s,version:a,chainId:Number(o),verifyingContract:l,salt:c},extensions:u,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new d$({address:r});throw e}}let dV=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function dG(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){var s;let a=r?(0,M.cK)(r):void 0;return{baseFeePerGas:(s=await e.request({method:"eth_feeHistory",params:[(0,M.cK)(t),a||n,i]},{dedupe:!!a})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:s.gasUsedRatio,oldestBlock:BigInt(s.oldestBlock),reward:s.reward?.map(e=>e.map(e=>BigInt(e)))}}async function dW(e,{filter:t}){let r=t.strict??!1,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>eb(e));return t.abi?uw({abi:t.abi,logs:n,strict:r}):n}
vendor: 5,069 bytes, line 1
1async function dZ(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){var s;let a=void 0!==r?(0,M.cK)(r):void 0;return{...s=await e.request({method:"eth_getProof",params:[t,i,a||(n??"latest")]}),balance:s.balance?BigInt(s.balance):void 0,nonce:s.nonce?(0,ei.ME)(s.nonce):void 0,storageProof:s.storageProof?s.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}}async function dJ(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){let s=void 0!==r?(0,M.cK)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,s||n]})}async function dY(e,{blockHash:t,blockNumber:r,blockTag:n,hash:i,index:s}){let a=n||"latest",o=void 0!==r?(0,M.cK)(r):void 0,l=null;if(i?l=await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,M.cK)(s)]},{dedupe:!0}):(o||a)&&(l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[o||a,(0,M.cK)(s)]},{dedupe:!!o})),!l)throw new U.Kz({blockHash:t,blockNumber:r,blockTag:a,hash:i,index:s});return(e.chain?.formatters?.transaction?.format||ep)(l)}async function dX(e,{hash:t,transactionReceipt:r}){let[n,i]=await Promise.all([cL(e,uL,"getBlockNumber")({}),t?cL(e,dY,"getTransaction")({hash:t}):void 0]),s=r?.blockNumber||i?.blockNumber;return s?n-s+1n:0n}async function dQ(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new U.Kc({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||ev)(r)}async function d0(e,t){let{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:s,multicallAddress:a,stateOverride:o}=t,l=t.contracts,c=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),u=a;if(!u){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");u=(0,dh.M)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let d=[[]],h=0,p=0;for(let e=0;e<l.length;e++){let{abi:t,address:n,args:i,functionName:s}=l[e];try{let e=(0,cZ.p)({abi:t,args:i,functionName:s});p+=(e.length-2)/2,c>0&&p>c&&d[h].length>0&&(h++,p=(e.length-2)/2,d[h]=[]),d[h]=[...d[h],{allowFailure:!0,callData:e,target:n}]}catch(a){let e=cQ(a,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:s});if(!r)throw e;d[h]=[...d[h],{allowFailure:!0,callData:"0x",target:n}]}}let f=await Promise.allSettled(d.map(t=>cL(e,uk,"readContract")({abi:dd.v2,address:u,args:[t],blockNumber:i,blockTag:s,functionName:"aggregate3",stateOverride:o}))),m=[];for(let e=0;e<f.length;e++){let t=f[e];if("rejected"===t.status){if(!r)throw t.reason;for(let r=0;r<d[e].length;r++)m.push({status:"failure",error:t.reason,result:void 0});continue}let n=t.value;for(let t=0;t<n.length;t++){let{returnData:i,success:s}=n[t],{callData:a}=d[e][t],{abi:o,address:c,functionName:u,args:h}=l[m.length];try{if("0x"===a)throw new cN.O;if(!s)throw new cJ.$S({data:i});let e=(0,u_.e)({abi:o,args:h,data:i,functionName:u});m.push(r?{result:e,status:"success"}:e)}catch(t){let e=cQ(t,{abi:o,address:c,args:h,docsPath:"/docs/contract/multicall",functionName:u});if(!r)throw e;m.push({error:e,result:void 0,status:"failure"})}}}if(m.length!==l.length)throw new q.C("multicall results mismatch");return m}class d1 extends Error{constructor(e,t={}){let r=(()=>{if(t.cause instanceof d1){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),n=t.cause instanceof d1&&t.cause.docsPath||t.docsPath,i=`https://oxlib.sh${n??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||n?["",r?`Details: ${r}`:void 0,n?`See: ${i}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"[email protected]"}),this.cause=t.cause,this.details=r,this.docs=i,this.docsPath=n,this.shortMessage=e}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}function d2(e,t){if(hi(e)>t)throw new hl({givenSize:hi(e),maxSize:t})}function d6(e,t={}){let{dir:r,size:n=32}=t;if(0===n)return e;let i=e.replace("0x","");if(i.length>2*n)throw new hu({size:Math.ceil(i.length/2),targetSize:n,type:"Hex"});return`0x${i["right"===r?"padEnd":"padStart"](2*n,"0")}`}let d3=new TextEncoder,d5=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d8(...e){return`0x${e.reduce((e,t)=>
1e+t.replace("0x",""),"")}`}function d7(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(d2(r,t.size),ht(r,t.size)):r}function d4(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=d5[e[t]];let n=`0x${r}`;return"number"==typeof t.size?(d2(n,t.size),hr(n,t.size)):n}function d9(e,t={}){let r;let{signed:n,size:i}=t,s=BigInt(e);i?r=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof r&&n?-r-1n:0;if(r&&s>r||s<a){let t="bigint"==typeof e?"n":"";throw new hs({max:r?`${r}${t}`:void 0,min:`${a}${t}`,signed:n,size:i,value:`${e}${t}`})}let o=(n&&s<0?(1n<<BigInt(8*i))+BigInt(s):s).toString(16),l=`0x${o}`;return i?ht(l,i):l}function he(e,t={}){return d4(d3.encode(e),t)}function ht(e,t){return d6(e,{dir:"left",size:t})}function hr(e,t){return d6(e,{dir:"right",size:t})}function hn(e,t,r,n={}){let{strict:i}=n;!function(e,t){if("number"==typeof t&&t>0&&t>hi(e)-1)throw new hc({offset:t,position:"start",size:hi(e)})}(e,t);let s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return i&&function(e,t,r){if("number"==typeof t&&"number"==typeof r&&hi(e)!==r-t)throw new hc({offset:r,position:"end",size:hi(e)})}(s,t,r),s}function hi(e){return Math.ceil((e.length-2)/2)}class hs extends d1{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class ha extends d1{constructor(e){super(`Value \`${"object"==typeof e?function(e,t,r){return JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"#__bigint":t,void 0)}(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class ho extends d1{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class hl extends d1{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class hc extends d1{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class hu extends d1{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function hd(e){return{address:e.address,amount:d9(e.amount),index:d9(e.index),validatorIndex:d9(e.validatorIndex)}}async function hh(e,t){let{blockNumber:r,blockTag:n="latest",blocks:i,returnFullTransactions:s,traceTransfers:a,validation:o}=t;try{let t=[];for(let e of i){var l;let r=e.blockOverrides?(l=e.blockOverrides,{..."bigint"==typeof l.baseFeePerGas&&{baseFeePerGas:d9(l.baseFeePerGas)},..."bigint"==typeof l.blobBaseFee&&{blobBaseFee:d9(l.blobBaseFee)},..."string"==typeof l.feeRecipient&&{feeRecipient:l.feeRecipient},..."bigint"==typeof l.gasLimit&&{gasLimit:d9(l.gasLimit)},..."bigint"==typeof l.number&&{number:d9(l.number)},..."bigint"==typeof l.prevRandao&&{prevRandao:d9(l.prevRandao)},..."bigint"==typeof l.time&&{time:d9(l.time)},...l.withdrawals&&{withdrawals:l.withdrawals.map(hd)}}):void 0,n=e.calls.map(e=>{let t=e.account?(0,iY.J)(e.account):void 0,r={...e,data:e.abi?(0,cZ.p)(e):e.data,from:e.from??t?.address};return(0,i1.c)(r),(0,eM.Bv)(r)}),i=e.stateOverrides?(0,c7.yH)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:n,stateOverrides:i})}let c=r?(0,M.cK)(r):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:s,traceTransfers:a,validation:o},c||n]})).map((e,t)=>({...em(e),calls:e.calls.map((e,r)=>{let{abi:n,args:s,functionName:a,to:o}=i[t].calls[r],l=e.error?.data??e.returnData,c=BigInt(e.gasUsed),u=e.logs?.map(e=>eb(e)),d="0x1"===e.status?"success":"failure",h=n&&"success"===d?(0,u_.e)({abi:n,data:l,functionName:a}):null,p=(()=>{let t;if("success"!==d&&(e.error?.data==="0x"?t=new cN.O:e.error&&(t=new cJ.$S(e.error)),t))return cQ(t,{abi:n??[],address:o,args:s,functionName:a??"<unknown>"})})();return{data:l,gasUsed:c,logs:u,status:d,..."success"===d?{result:h}:{error:p}}})}))}catch(t){let e=(0,c8.l)(t,{});if(e instanceof er.RM)throw t;throw e}}var hp=r(52076),hf=r(89071),hm=r(34494),hy=r(3133),hb=r(96139),hg=r(17253);let hv={zero:48,nine:57,A:65,F:70,a:97,f:102};function hw(e){return e>=hv.zero&&e<=hv.nine?e-hv.zero:e>=hv.A&&e<=hv.F?e-(hv.A-10):e>=hv.a&&e<=hv.f?e-(hv.a-10):void 0}let hx=new TextEncoder;class hE extends d1{constructor({givenSize:e,maxSize:t}
1){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class h_ extends d1{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}function hC(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,n=(0,hg.lY)(e instanceof Uint8Array?e:"string"==typeof e?function(e,t={}){let{size:r}=t,n=e;r&&(d2(e,r),n=hr(e,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);let s=i.length/2,a=new Uint8Array(s);for(let e=0,t=0;e<s;e++){let r=hw(i.charCodeAt(t++)),n=hw(i.charCodeAt(t++));if(void 0===r||void 0===n)throw new d1(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);a[e]=16*r+n}return a}(e):e instanceof Uint8Array?e:new Uint8Array(e));return"Bytes"===r?n:d4(n)}class hk extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let hS={checksum:new hk(8192)}.checksum,hA=/^0x[a-fA-F0-9]{40}$/;function hT(e,t={}){let{strict:r=!0}=t;if(!hA.test(e))throw new hP({address:e,cause:new hO});if(r){if(e.toLowerCase()===e)return;if(function(e){if(hS.has(e))return hS.get(e);hT(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=hC(function(e,t={}){let{size:r}=t,n=hx.encode(e);return"number"==typeof r?(!function(e,t){if(e.length>t)throw new hE({givenSize:e.length,maxSize:t})}(n,r),function(e,t={}){let{dir:r,size:n=32}=t;if(0===n)return e;if(e.length>n)throw new h_({size:e.length,targetSize:n,type:"Bytes"});let i=new Uint8Array(n);for(let t=0;t<n;t++){let s="right"===r;i[s?t:n-t-1]=e[s?t:e.length-t-1]}return i}(n,{dir:"right",size:r})):n}(t),{as:"Bytes"}),n=t.split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&n[e]&&(n[e]=n[e].toUpperCase()),(15&r[e>>1])>=8&&n[e+1]&&(n[e+1]=n[e+1].toUpperCase());let i=`0x${n.join("")}`;return hS.set(e,i),i}(e)!==e)throw new hP({address:e,cause:new hD})}}function hI(e,t={}){let{strict:r=!0}=t??{};try{return hT(e,{strict:r}),!0}catch{return!1}}class hP extends d1{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class hO extends d1{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class hD extends d1{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}function hU(e){let t=!0,r="",n=0,i="",s=!1;for(let a=0;a<e.length;a++){let o=e[a];if(["(",")",","].includes(o)&&(t=!0),"("===o&&n++,")"===o&&n--,t){if(0===n){if(" "===o&&["event","function","error",""].includes(i))i="";else if(i+=o,")"===o){s=!0;break}continue}if(" "===o){","!==e[a-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=o,r+=o}}if(!s)throw new d1("Unable to normalize signature.");return i}function hN(e,t={}){let{prepare:r=!0}=t,n=Array.isArray(e)||"string"==typeof e?function(e){let t;if("string"==typeof e)t=(0,hy.uT)(e);else{let r=(0,hm.e)(e),n=e.length;for(let i=0;i<n;i++){let n=e[i];if(!(0,hf.WL)(n)){t=(0,hy.uT)(n,r);break}}}if(!t)throw new hp.xo({signature:e});return t}(e):e;return{...n,...r?{hash:hB(n)}:{}}}function hM(e){return hn(hB(e),0,4)}function hB(e){return"string"!=typeof e&&"hash"in e&&e.hash?e.hash:hC(he(hU("string"==typeof e?e:hb.B(e))))}class hR extends d1{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${hU(hb.B(e.abiItem))}\`, and`,`\`${t.type}\` in \`${hU(hb.B(t.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class hL extends d1{constructor({name:e,data:t,type:r="item"}){super(`ABI ${r}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}r(58275);let hj=/^(.*)\[([0-9]*)\]$/,hF=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,hz=/^(u?int)(8|
116|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function hq(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=hi(i)}let r=[],n=[],i=0;for(let s=0;s<e.length;s++){let{dynamic:a,encoded:o}=e[s];a?(r.push(d9(t+i,{size:32})),n.push(o),i+=hi(o)):r.push(o)}return d8(...r,...n)}function hH(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function h$(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new hW({expectedLength:e.length,givenLength:t.length});let i=hq(function({checksumAddress:e,parameters:t,values:r}){let n=[];for(let i=0;i<t.length;i++)n.push(function e({checksumAddress:t=!1,parameter:r,value:n}){let i=hH(r.type);if(i){let[s,a]=i;return function(t,r){let{checksumAddress:n,length:i,parameter:s}=r,a=null===i;if(!Array.isArray(t))throw new hZ(t);if(!a&&t.length!==i)throw new hV({expectedLength:i,givenLength:t.length,type:`${s.type}[${i}]`});let o=!1,l=[];for(let r=0;r<t.length;r++){let i=e({checksumAddress:n,parameter:s,value:t[r]});i.dynamic&&(o=!0),l.push(i)}
1if(a||o){let e=hq(l);if(a){let t=d9(l.length,{size:32});return{dynamic:!0,encoded:l.length>0?d8(t,e):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:d8(...l.map(({encoded:e})=>e))}}(n,{checksumAddress:t,length:s,parameter:{...r,type:a}})}if("tuple"===r.type)return function(t,r){let{checksumAddress:n,parameter:i}=r,s=!1,a=[];for(let r=0;r<i.components.length;r++){let o=i.components[r],l=Array.isArray(t)?r:o.name,c=e({checksumAddress:n,parameter:o,value:t[l]});a.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?hq(a):d8(...a.map(({encoded:e})=>e))}}(n,{checksumAddress:t,parameter:r});if("address"===r.type)return function(e,t){let{checksum:r=!1}=t;return hT(e,{strict:r}),{dynamic:!1,encoded:ht(e.toLowerCase())}}(n,{checksum:t});if("bool"===r.type)return function(e){if("boolean"!=typeof e)throw new d1(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ht(d7(e))}}(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){let e=r.type.startsWith("int"),[,,t="256"]=hz.exec(r.type)??[];return function(e,{signed:t,size:r}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new hs({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:d9(e,{size:32,signed:t})}}(n,{signed:e,size:Number(t)})}if(r.type.startsWith("bytes"))return function(e,{type:t}){let[,r]=t.split("bytes"),n=hi(e);if(!r){let t=e;return n%32!=0&&(t=hr(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:d8(ht(d9(n,{size:32})),t)}}if(n!==Number.parseInt(r))throw new hG({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:hr(e)}}(n,{type:r.type});if("string"===r.type)return function(e){let t=he(e),r=Math.ceil(hi(t)/32),n=[];for(let e=0;e<r;e++)n.push(hr(hn(t,32*e,(e+1)*32)));return{dynamic:!0,encoded:d8(hr(d9(hi(t),{size:32})),...n)}}(n);throw new hJ(r.type)}({checksumAddress:e,parameter:t[i],value:r[i]}));return n}({checksumAddress:n,parameters:e,values:t}));return 0===i.length?"0x":i}function hK(e,t){if(e.length!==t.length)throw new hW({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n<e.length;n++){let i=e[n],s=t[n];
1r.push(hK.encode(i,s))}return d8(...r)}(hK||(hK={})).encode=function e(t,r,n=!1){if("address"===t)return hT(r),ht(r.toLowerCase(),n?32:0);if("string"===t)return he(r);if("bytes"===t)return r;if("bool"===t)return ht(d7(r),n?32:1);let i=t.match(hz);if(i){let[e,t,s="256"]=i,a=Number.parseInt(s)/8;return d9(r,{size:n?32:a,signed:"int"===t})}let s=t.match(hF);if(s){let[e,t]=s;if(Number.parseInt(t)!==(r.length-2)/2)throw new hG({expectedSize:Number.parseInt(t),value:r});return hr(r,n?32:0)}let a=t.match(hj);if(a&&Array.isArray(r)){let[t,n]=a,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":d8(...i)}throw new hJ(t)};class hV extends d1{constructor({expectedLength:e,givenLength:t,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class hG extends d1{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${hi(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class hW extends d1{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding parameters/values length mismatch.
2Expected length (parameters): ${e}
3Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class hZ extends d1{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class hJ extends d1{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function hY(e,t={}){return hN(e,t)}let hX="0x0000000000000000000000000000000000000000";var hQ=r(33726);async function h0(e,t){let{blockNumber:r,blockTag:n,calls:i,stateOverrides:s,traceAssetChanges:a,traceTransfers:o,validation:l}=t,c=t.account?(0,iY.J)(t.account):void 0;if(a&&!c)throw new q.C("`account` is required when `traceAssetChanges` is true");let u=c?function(e,t){let{bytecode:r,args:n}=t;return d8(r,e.inputs?.length&&n?.length?h$(e.inputs,n):"0x")}(hN("constructor(bytes, bytes)"),{bytecode:hQ.LX,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",function(e,...t){let{overloads:r}=e,n=r?function(e,t,r){let n=function(e,t,r){let n;let{args:i=[],prepare:s=!0}=r??{},a=function(e,t={}){let{strict:r=!1}=t;try{return!function(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new ha(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new ho(e)}(e,{strict:r}),!0}catch{return!1}}(t,{strict:!1}),o=e.filter(e=>a?"function"===e.type||"error"===e.type?hM(e)===hn(t,0,4):"event"===e.type&&hB(e)===t:"name"in e&&e.name===t);if(0===o.length)throw new hL({name:t});if(1===o.length)return{...o[0],...s?{hash:hB(o[0])}:{}};for(let e of o)if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return{...e,...s?{hash:hB(e)}:{}};continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;
3switch(i){case"address":return hI(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(n&&"inputs"in n&&n.inputs){let t=function e(t,r,n){for(let i in t){let s=t[i],a=r[i];if("tuple"===s.type&&"tuple"===a.type&&"components"in s&&"components"in a)return e(s.components,a.components,n[i]);let o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")||(o.includes("address")&&o.includes("string")||o.includes("address")&&o.includes("bytes"))&&hI(n[i],{strict:!1}))return o}}(e.inputs,n.inputs,i);if(t)throw new hR({abiItem:e,type:t[0]},{abiItem:n,type:t[1]})}n=e}}let l=(()=>{if(n)return n;let[e,...t]=o;return{...e,overloads:t}})();if(!l)throw new hL({name:t});return{...l,...s?{hash:hB(l)}:{}}}(e,t,r);if("function"!==n.type)throw new hL({name:t,type:"function"});return n}([e,...r],e.name,{args:t[0]}):e,i=hM(n),s=t.length>0?h$(n.inputs,t[0]):void 0;return s?d8(i,s):i}(hY("function getBalance(address)"),[c.address])]}):void 0,d=a?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:r}=await dL(e,{account:c.address,...t,data:t.abi?(0,cZ.p)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],h=s?.map(e=>e.address===c?.address?{...e,nonce:0}:e),p=await hh(e,{blockNumber:r,blockTag:n,blocks:[...a?[{calls:[{data:u}],stateOverrides:s},{calls:d.map((e,t)=>({abi:[hY("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[c.address],to:e,from:hX,nonce:t})),stateOverrides:[{address:hX,nonce:0}]}]:[],{calls:[...i,{}].map((e,t)=>({...e,from:c?.address,nonce:t})),stateOverrides:h},...a?[{calls:[{data:u}]},{calls:d.map((e,t)=>({abi:[hY("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[c.address],to:e,from:hX,nonce:t})),stateOverrides:[{address:hX,nonce:0}]},{calls:d.map((e,t)=>({to:e,abi:[hY("function decimals() returns (uint256)")],functionName:"decimals",from:hX,nonce:t})),stateOverrides:[{address:hX,nonce:0}]},{calls:d.map((e,t)=>({to:e,abi:[hY("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:hX,nonce:t})),stateOverrides:[{address:hX,nonce:0}]},{calls:d.map((e,t)=>({to:e,abi:[hY("function symbol() returns (string)")],functionName:"symbol",from:hX,nonce:t})),stateOverrides:[{address:hX,nonce:0}]}]:[]],traceTransfers:o,validation:l}),f=a?p[2]:p[0],[m,y,,b,g,v,w,x]=a?p:[],{calls:E,..._}=f,C=E.slice(0,-1)??[],k=[...m?.calls??[],...y?.calls??[]].map(e=>"success"===e.status?(0,ei.uU)(e.data):null),S=[...b?.calls??[],...g?.calls??[]].map(e=>"success"===e.status?(0,ei.uU)(e.data):null),A=(v?.calls??[]).map(e=>"success"===e.status?e.result:null),T=(x?.calls??[]).map(e=>"success"===e.status?e.result:null),I=(w?.calls??[]).map(e=>"success"===e.status?e.result:null),P=[];for(let[e,t]of S.entries()){let r=k[e];if("bigint"!=typeof t||"bigint"!=typeof r)continue;let n=A[e-1],i=T[e-1],s=I[e-1],a=0===e?{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",decimals:18,symbol:"ETH"}:{address:d[e-1],decimals:s||n?Number(n??1):void 0,symbol:i??void 0};P.some(e=>e.token.address===a.address)||P.push({token:a,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:P,block:_,results:C}}function h1(e,t){return(0,cO.S)(function(e){let t="string"==typeof e?(0,M.i3)(e):"string"==typeof e.raw?e.raw:(0,M.My)(e.raw),r=(0,M.i3)(`\x19Ethereum Signed Message:
4${(0,W.E)(t)}`);return(0,J.xW)([r,t])}(e),t)}let h2="0x6492649264926492649264926492649264926492649264926492649264926492";var h6=r(35542);function h3({r:e,s:t,to:r="hex",v:n,yParity:i}){let s=(()=>
4{if(0===i||1===i)return i;if(n&&(27n===n||28n===n||n>=35n))return n%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),a=`0x${new h6.secp256k1.Signature((0,ei.uU)(e),(0,ei.uU)(t)).toCompactHex()}${0===s?"1b":"1c"}`;return"hex"===r?a:(0,N.aT)(a)}async function h5(e,t){let{address:r,factory:n,factoryData:i,hash:s,signature:a,universalSignatureVerifierAddress:o=e.chain?.contracts?.universalSignatureVerifier?.address,...l}=t,c=(0,j.q)(a)?a:"object"==typeof a&&"r"in a&&"s"in a?h3(a):(0,M.My)(a),u=await (async()=>n||i?(0,en.iN)(c,-32)===h2?c:function(e){let{address:t,data:r,signature:n,to:i="hex"}=e,s=(0,J.aP)([(0,cz.h)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,n]),h2]);return"hex"===i?s:(0,N.aT)(s)}({address:n,data:i,signature:c}):c)();try{let t=o?{to:o,data:(0,cZ.p)({abi:dd._,functionName:"isValidSig",args:[r,s,u]}),...l}:{data:(0,uY.m)({abi:dd._,args:[r,s,u],bytecode:hQ.nP}),...l},{data:n}=await cL(e,uC.T,"call")(t);return(0,ei.Nx)(n??"0x0")}catch(e){try{if((0,uy.h)((0,C.b)(r),await c2({hash:s,signature:a})))return!0}catch{}if(e instanceof cJ.zX)return!1;throw e}}async function h8(e,{address:t,message:r,factory:n,factoryData:i,signature:s,...a}){return h5(e,{address:t,factory:n,factoryData:i,hash:h1(r),signature:s,...a})}function h7(e){let{domain:t={},message:r,primaryType:n}=e,i={EIP712Domain:u4({domain:t}),...e.types};u7({domain:t,message:r,primaryType:n,types:i});let s=["0x1901"];return t&&s.push(function({domain:e,types:t}){return h4({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:i})),"EIP712Domain"!==n&&s.push(h4({data:r,primaryType:n,types:i})),(0,cO.S)((0,J.xW)(s))}function h4({data:e,primaryType:t,types:r}){let n=function e({data:t,primaryType:r,types:n}){let i=[{type:"bytes32"}],s=[function({primaryType:e,types:t}){let r=(0,M.nj)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),s=i?.[0];if(n.has(s)||void 0===r[s])return n;for(let t of(n.add(s),r[s]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,cO.S)(r)}({primaryType:r,types:n})];for(let a of n[r]){let[r,o]=function t({types:r,name:n,type:i,value:s}){if(void 0!==r[i])return[{type:"bytes32"},(0,cO.S)(e({data:s,primaryType:i,types:r}))];if("bytes"===i){let e=s.length%2?"0":"";return s=`0x${e+s.slice(2)}`,[{type:"bytes32"},(0,cO.S)(s)]}if("string"===i)return[{type:"bytes32"},(0,cO.S)((0,M.nj)(s))];if(i.lastIndexOf("]")===i.length-1){let e=i.slice(0,i.lastIndexOf("[")),a=s.map(i=>t({name:n,type:e,types:r,value:i}));return[{type:"bytes32"},(0,cO.S)((0,cz.h)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:i},s]}({types:n,name:a.name,type:a.type,value:t[a.name]});i.push(r),s.push(o)}return(0,cz.h)(i,s)}({data:e,primaryType:t,types:r});return(0,cO.S)(n)}async function h9(e,t){let{address:r,factory:n,factoryData:i,signature:s,message:a,primaryType:o,types:l,domain:c,...u}=t;return h5(e,{address:r,factory:n,factoryData:i,hash:h7({message:a,primaryType:o,types:l,domain:c}),signature:s,...u})}var pe=r(30400),pt=r(9869);function pr(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:s,pollingInterval:a=e.pollingInterval}){let o;return(void 0!==s?s:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type))?uP((0,uU.A)(["watchBlockNumber",e.uid,t,r,a]),{onBlockNumber:n,onError:i},n=>uD(async()=>{try{let t=await cL(e,uL,"getBlockNumber")({cacheTime:0});if(o){if(t===o)return;if(t-o>1&&r)for(let e=o+1n;e<t;e++)n.onBlockNumber(e,o),o=e}(!o||t>o)&&(n.onBlockNumber(t,o),o=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:a})):uP((0,uU.A)(["watchBlockNumber",e.uid,t,r]),{onBlockNumber:n,onError:i},t=>{let r=!0,n=()=>r=!1;return(async()=>{try{let i=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await i.subscribe({params:["newHeads"],onData(e){if(!r)return;let n=(0,ei.uU)(e.result?.number);t.onBlockNumber(n,o),o=n},onError(e){t.onError?.(e)}});n=s,r||n()}catch(e){i?.(e)}})(),()=>n()})}async function pn(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:i=e.pollingInterval,retryCount:s=6,retryDelay:a=({count:e})=>200*~~(1<<e),timeout:o=18e4}){let l,c,u;let d=(0,uU.A)(["waitForTransactionReceipt",e.uid,r]),h=!1,{promise:p,resolve:f,reject:m}=(0,pe.Y)(),y=o?setTimeout(()=>m(new U.WA({hash:r})),o):void 0,b=uP(d,{onReplaced:n,resolve:f,reject:m},n=>{let o=cL(e,pr,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){let d=e=>{clearTimeout(y),o(),e(),b()},p=i;if(!h)try{if(u){if(t>1&&(!u.blockNumber||p-u.blockNumber+1n<t))return;d(()=>n.resolve(u));return}if(l||(h=!0,await (0,pt.b)(async()=>{(l=await cL(e,dY,"getTransaction")({hash:r})).blockNumber&&(p=l.blockNumber)},{delay:a,retryCount:s}),h=!1),u=await cL(e,dQ,"getTransactionReceipt")({hash:r}),t>1&&(!u.blockNumber||p-u.blockNumber+1n<t))return;d(()=>n.resolve(u))}catch(r){if(r instanceof U.Kz||r instanceof U.Kc){if(!l){h=!1;return}try{c=l,h=!0;let r=await (0,pt.b)(()=>cL(e,ur,"getBlock")({blockNumber:p,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:e})=>e instanceof ut});h=!1;let i=r.transactions.find(({from:e,nonce:t})=>e===c.from&&t===c.nonce);if(!i||(u=await cL(e,dQ,"getTransactionReceipt")({hash:i.hash}),t>1&&(!u.blockNumber||p-u.blockNumber+1n<t)))return;let o="replaced";i.to===c.to&&i.value===c.value&&i.input===c.input?o="repriced":i.from===i.to&&0n===i.value&&(o="cancelled"),d(()=>{n.onReplaced?.({reason:o,replacedTransaction:c,transaction:i,transactionReceipt:u}),n.resolve(u)})}catch(e){d(()=>n.reject(e))}}else d(()=>n.reject(r))}}})});return p}let pi=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,ps=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;async function pa(e,t){let{address:r,domain:n,message:i,nonce:s,scheme:a,signature:o,time:l=new Date,...c}=t,u=function(e){let{scheme:t,statement:r,...n}=e.match(pi)?.groups??{},{chainId:i,expirationTime:s,issuedAt:a,notBefore:o,requestId:l,...c}=e.match(ps)?.groups??{},u=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...n,...c,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...a?{issuedAt:new Date(a)}:{},...o?{notBefore:new Date(o)}:{},...l?{requestId:l}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}(i);if(!u.address||!function(e){let{address:t,domain:r,message:n,nonce:i,scheme:s,time:a=new Date}=e;if(r&&n.domain!==r||i&&n.nonce!==i||s&&n.scheme!==s||n.expirationTime&&a>=n.expirationTime||n.notBefore&&a<n.notBefore)return!1;try{if(!n.address||t&&!(0,uy.h)(n.address,t))return!1}catch{return!1}return!0}({address:r,domain:n,message:u,nonce:s,scheme:a,time:l}))return!1;let d=h1(i);return h5(e,{address:u.address,hash:d,signature:o,...c})}function po(e){return{call:t=>(0,uC.T)(e,t),createAccessList:t=>dL(e,t),createBlockFilter:()=>dj(e),createContractEventFilter:t=>cW(e,t),createEventFilter:t=>dF(e,t),createPendingTransactionFilter:()=>dz(e),estimateContractGas:t=>um(e,t),estimateGas:t=>uf(e,t),getBalance:t=>up(e,t),getBlobBaseFee:()=>dq(e),getBlock:t=>ur(e,t),getBlockNumber:t=>uL(e,t),getBlockTransactionCount:t=>dH(e,t),getBytecode:t=>t7(e,t),getChainId:()=>uc(e),getCode:t=>t7(e,t),getContractEvents:t=>uE(e,t),getEip712Domain:t=>dK(e,t),getEnsAddress:t=>dy(e,t),getEnsAvatar:t=>dM(e,t),getEnsName:t=>dB(e,t),getEnsResolver:t=>dR(e,t),getEnsText:t=>dN(e,t),getFeeHistory:t=>dG(e,t),estimateFeesPerGas:t=>ua(e,t),getFilterChanges:t=>uj(e,t),getFilterLogs:t=>dW(e,t),getGasPrice:()=>un(e),getLogs:t=>ux(e,t),getProof:t=>dZ(e,t),estimateMaxPriorityFeePerGas:t=>ui(e,t),getStorageAt:t=>dJ(e,t),getTransaction:t=>dY(e,t),getTransactionConfirmations:t=>dX(e,t),getTransactionCount:t=>ul(e,t),getTransactionReceipt:t=>dQ(e,t),multicall:t=>d0(e,t),prepareTransactionRequest:t=>uh(e,t),readContract:t=>uk(e,t),sendRawTransaction:t=>uH(e,t),simulate:t=>hh(e,t),simulateBlocks:t=>hh(e,t),simulateCalls:t=>h0(e,t),simulateContract:t=>uS(e,t),verifyMessage:t=>h8(e,t),verifySiweMessage:t=>pa(e,t),verifyTypedData:t=>h9(e,t),uninstallFilter:t=>uF(e,t),waitForTransactionReceipt:t=>pn(e,t),watchBlocks:t=>(function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:a,poll:o,pollingInterval:l=e.pollingInterval}){let c,u,d,h;let p=void 0!==o?o:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type),f=a??!1;return p?uP((0,uU.A)(["watchBlocks",e.uid,t,r,n,f,l]),{onBlock:i,onError:s},i=>uD(async()=>{try{let n=await cL(e,ur,"getBlock")({blockTag:t,includeTransactions:f});if(n.number&&c?.number){if(n.number===c.number)return;if(n.number-c.number>1&&r)for(let t=c?.number+1n;t<n.number;t++){let r=await cL(e,ur,"getBlock")({blockNumber:t,includeTransactions:f});i.onBlock(r,c),c=r}}(!c?.number||"pending"===t&&!n?.number||n.number&&n.number>c.number)&&(i.onBlock(n,c),c=n)}catch(e){i.onError?.(e)}},{emitOnBegin:n,interval:l})):(u=!0,d=!0,h=()=>u=!1,(async()=>{try{n&&cL(e,ur,"getBlock")({blockTag:t,includeTransactions:f}).then(e=>{u&&d&&(i(e,void 0),d=!1)});let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await r.subscribe({params:["newHeads"],async onData(t){if(!u)return;let r=await cL(e,ur,"getBlock")({blockNumber:t.blockNumber,includeTransactions:f}).catch(()=>{});u&&(i(r,c),d=!1,c=r)},onError(e){s?.(e)}});h=a,u||h()}catch(e){s?.(e)}})(),()=>h())})(e,t),watchBlockNumber:t=>pr(e,t),watchContractEvent:t=>uz(e,t),watchEvent:t=>(function(e,{address:t,args:r,batch:n=!0,event:i,events:s,fromBlock:a,onError:o,onLogs:l,poll:c,pollingInterval:u=e.pollingInterval,strict:d}){let h,p;let f=void 0!==c?c:"bigint"==typeof a||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type),m=d??!1;return f?uP((0,uU.A)(["watchEvent",t,r,n,e.uid,i,u,a]),{onLogs:l,onError:o},o=>{let l,c;void 0!==a&&(l=a-1n);let d=!1,h=uD(async()=>{if(!d){try{c=await cL(e,dF,"createEventFilter")({address:t,args:r,event:i,events:s,strict:m,fromBlock:a})}catch{}d=!0;return}try{let a;if(c)a=await cL(e,uj,"getFilterChanges")({filter:c});else{let n=await cL(e,uL,"getBlockNumber")({});a=l&&l!==n?await cL(e,ux,"getLogs")({address:t,args:r,event:i,events:s,fromBlock:l+1n,toBlock:n}):[],l=n}if(0===a.length)return;if(n)o.onLogs(a);else for(let e of a)o.onLogs([e])}catch(e){c&&e instanceof cX.Di&&(d=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:u});return async()=>{c&&await cL(e,uF,"uninstallFilter")({filter:c}),h()}}):(h=!0,p=()=>h=!1,(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),a=s??(i?[i]:void 0),c=[];a&&(c=[a.flatMap(e=>cK({abi:[e],eventName:e.name,args:r}))],i&&(c=c[0]));let{unsubscribe:u}=await n.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!h)return;let t=e.result;try{let{eventName:e,args:r}=uv({abi:a??[],data:t.data,topics:t.topics,strict:m}),n=eb(t,{args:r,eventName:e});l([n])}catch(i){let e,r;if(i instanceof cN.fo||i instanceof cN.l3){if(d)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let n=eb(t,{args:r?[]:{},eventName:e});l([n])}},onError(e){o?.(e)}});p=u,h||p()}catch(e){o?.(e)}})(),()=>p())})(e,t),watchPendingTransactions:t=>(function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=e.pollingInterval}){let a,o;return(void 0!==i?i:"webSocket"!==e.transport.type)?uP((0,uU.A)(["watchPendingTransactions",e.uid,t,s]),{onTransactions:n,onError:r},r=>{let n;let i=uD(async()=>{try{if(!n)try{n=await cL(e,dz,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let s=await cL(e,uj,"getFilterChanges")({filter:n});if(0===s.length)return;if(t)r.onTransactions(s);else for(let e of s)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:s});return async()=>{n&&await cL(e,uF,"uninstallFilter")({filter:n}),i()}}):(a=!0,o=()=>a=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!a)return;let t=e.result;n([t])},onError(e){r?.(e)}});o=t,a||o()}catch(e){r?.(e)}})(),()=>o())})(e,t)}}function pl(e){let{key:t="public",name:r="Public Client"}=e;return(0,uZ.U)({...e,key:t,name:r,type:"publicClient"}).extend(po)}var pc=r(84273),pu=r(75892);pu.fZ.getEvmProviderByChainId=(e,t)=>{var r;return null===(r=e.evm)||void 0===r?void 0:r.find(e=>e.chainId===t)},pu.fZ.registerEvmProviders=e=>{if(!e)throw Error("providersConfig is required");pu.fZ.registerChainProviders(pu.zX.EVM,t=>{let r={};return(null==t?void 0:t.evm)&&(r.evm=(0,I.bb)(t.evm).map(t=>{var r;let n=(null===(r=t.privateCustomerRpcUrls)||void 0===r?void 0:r[0])||t.rpcUrls[0],i=pl({chain:cI(t),transport:(0,pc.L)(n,null==e?void 0:e.publicClientHttpTransportConfig)});return{chainId:t.chainId,chainName:t.name,provider:i}})),r.evm})};let pd=e=>Object.assign(Object.assign({},e),{gas:void 0!==e.gas?(0,ei.uU)(e.gas):void 0,gasPrice:void 0!==e.gasPrice?(0,ei.uU)(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?(0,ei.uU)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?(0,ei.uU)(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?(0,ei.uU)(e.nonce):void 0,value:void 0!==e.value?(0,ei.uU)(e.value):void 0}),ph=e=>{let{address:t,account:r,provider:n,walletConnector:i,walletUiUtils:s}=e;return T({address:t,signMessage:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return _(void 0,void 0,void 0,function*(){return s.signMessage({handler:()=>_(void 0,void 0,void 0,function*(){return(yield r()).signMessage(...t)}),message:(()=>{var e;let r=null===(e=t[0])||void 0===e?void 0:e.message;return r&&!("string"==typeof r&&Array.isArray(r))?JSON.stringify(r):null==r?void 0:r.toString()})(),walletConnector:i})})},signTransaction:function(){for(var e=arguments.length,a=Array(e),o=0;o<e;o++)a[o]=arguments[o];return _(void 0,void 0,void 0,function*(){let e=new ck({account:t,onSubmit:e=>_(void 0,void 0,void 0,function*(){return(yield r()).signTransaction(e)}),publicClient:n,transaction:a[0]});return s.sendTransaction(i,e)})},signTypedData:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.signMessage({handler:()=>_(void 0,void 0,void 0,function*(){return(yield r()).signTypedData(...t)}),message:JSON.stringify(t[0]),walletConnector:i})}})},pp=e=>{let{address:t,account:r,chain:n,transport:i,walletConnector:s,walletUiUtils:a}=e,o=null;return o=dn({account:ph({account:r,address:t,provider:pl({chain:n,transport:i}),walletConnector:s,walletUiUtils:a}),chain:n,transport:da({getAccounts:()=>_(void 0,void 0,void 0,function*(){return[t]}),onPersonalSign:e=>_(void 0,[e],void 0,function*(e){let{message:t}=e;if(!o)throw Error("Client not initialized");return o.signMessage({message:{raw:t}})}),onSendTransaction:e=>_(void 0,[e],void 0,function*(e){let{transaction:t}=e;if(!o)throw Error("Client not initialized");let r=pd(t);return o.sendTransaction(r)}),onSignTypedData:e=>_(void 0,[e],void 0,function*(e){let{message:t}=e;if(!o)throw Error("Client not initialized");return o.signTypedData(JSON.parse(t))}),transport:i})})};function pf(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}(0,E.R)("@dynamic-labs/ethereum-core","4.6.3"),"function"==typeof SuppressedError&&SuppressedError;var pm=r(96965);let py=e=>{if(4001===e.code)throw e;let t=null;try{t=pb(e)}catch(e){}if(t)throw t;throw e},pb=e=>"string"==typeof e.message&&(e.message.includes("User rejected the request")||e.message.includes("user reject this request")||"Request rejected"===e.message)?new cX.vx(e):null;class pg{getInstalledProvider(){return this.getEip6963Provider()||this.getInjectedProvider()}getInjectedProvider(){let e=this.getInjectedConfig();if(e&&e.extensionLocators&&e.extensionLocators.length)return this.installedProviderLookup(e.extensionLocators)}getEip6963Provider(){let{rdns:e}=this.connector.metadata;if(e)return this.eip6963ProviderLookup(e)}getInjectedConfig(){var e;let t=null===(e=this.walletBookWallet)||void 0===e?void 0:e.injectedConfig;return null==t?void 0:t.find(e=>"evm"===e.chain)}installedProviders(){let e=this.getInjectedConfig();if(!e)return[];let t=[];if(e.windowLocations)for(let r of e.windowLocations){let e=(0,I.FR)(r);e&&e.length&&t.push(...e)}return window.ethereum&&(window.ethereum.providers&&window.ethereum.providers.length?window.ethereum.providers.forEac
4h(e=>t.push(e)):t.push(window.ethereum)),t}installedProviderLookup(e){let t=this.installedProviders();return(0,P.Ee)(t,e)}eip6963ProviderLookup(e){var t;let{providers:r}=I.Nj.get();return null===(t=r.find(t=>{var r;return(null===(r=null==t?void 0:t.info)||void 0===r?void 0:r.rdns)===e}))||void 0===t?void 0:t.provider}isInstalledHelper(){return void 0!==this.findProvider()}findProvider(){return this.connector.findProvider()}findWalletClient(e){let t=this.findProvider();if(t)return dn({account:this.connector.getActiveAccount(),chain:e?cc[e]:this.connector.getActiveChain(),transport:(0,di.I)({request:e=>t.request(e).catch(py)})})}getAddress(){return pf(this,void 0,void 0,function*(){let e=this.findWalletClient();return e?this.getAddressWithProvider(e):Promise.resolve(void 0)})}getAddressWithProvider(e){return pf(this,void 0,void 0,function*(){try{let[t]=yield e.requestAddresses(),r=(0,C.b)(t);return this.connector.setActiveAccount(r),r}catch(e){return P.vF.error(e),Promise.reject(e)}})}signMessage(e){return pf(this,void 0,void 0,function*(){let t=yield this.getAddress();if(!t)return Promise.resolve(void 0);let r=this.findWalletClient();return r?yield r.signMessage({account:t,message:e}):Promise.resolve(void 0)})}_setupEventListeners(e){let t=this.findProvider();if(!t)return P.vF.warn("Provider not found",{connector:e}),{tearDownEventListeners:()=>{}};if(!t.on)return P.vF.warn("Provider does not support event listeners",{connector:e,provider:t}),{tearDownEventListeners:()=>{}};let{handleAccountChange:r,handleChainChange:n,handleDisconnect:i}=(0,P.AG)(e);return t.on("accountsChanged",r),t.on("chainChanged",n),t.on("disconnect",i),{tearDownEventListeners:()=>{let e=this.findProvider();e&&(r&&e.removeListener("accountsChanged",r),n&&e.removeListener("chainChanged",n),i&&e.removeListener("disconnect",i))}}}constructor(e){this.walletBookWallet=(0,pm.pD)(e.walletBook,e.key),this.connector=e}}var pv=r(60429),pw=r.n(pv),px=r(67904),pE=r(92084),p_=r(69992),pC=r(1360),pk=r(78502);function pS(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function pA(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));let r=pS(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}let pT=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),a=s.charCodeAt(0);if(255!==r[a])throw TypeError(s+" is ambiguous");r[a]=i}var o=e.length,l=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===l;)n++,t++;for(var s=(e.length-t)*c+1>>>0,a=new Uint8Array(s);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=s-1;(0!==u||d<i)&&-1!==h;h--,d++)u+=o*a[h]>>>0,a[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=s-i;p!==s&&0===a[p];)p++;for(var f=new Uint8Array(n+(s-p)),m=n;p!==s;)f[m++]=a[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,s=t.length;i!==s&&0===t[i];)i++,r++;for(var a=(s-i)*u+1>>>0,c=new Uint8Array(a);i!==s;){for(var d=t[i],h=0,p=a-1;(0!==d||h<n)&&-1!==p;p--,h++)d+=256*c[p]>>>0,c[p]=d%o>>>0,d=d/o>>>0;if(0!==d)throw Error("Non-zero carry");n=h,i++}for(var f=a-n;f!==a&&0===c[f];)f++;for(var m=l.repeat(r);f<a;++f)m+=e.charAt(c[f]);return m},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw Error(`Non-${t} character`)}}};new Uint8Array(0);let pI=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},pP=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},pO=e=>new TextEncoder().encode(e),pD=e=>new TextDecoder().decode(e);class pU{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class pN{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name}
4 decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return pB(this,e)}}class pM{constructor(e){this.decoders=e}or(e){return pB(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let pB=(e,t)=>new pM({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class pR{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new pU(e,t,r),this.decoder=new pN(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let pL=({name:e,prefix:t,encode:r,decode:n})=>new pR(e,t,r,n),pj=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:i}=pT(r,t);return pL({prefix:e,name:t,encode:n,decode:e=>pP(i(e))})},pF=(e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let s=e.length;for(;"="===e[s-1];)--s;let a=new Uint8Array(s*r/8|0),o=0,l=0,c=0;for(let t=0;t<s;++t){let s=i[e[t]];if(void 0===s)throw SyntaxError(`Non-${n} character`);l=l<<r|s,(o+=r)>=8&&(o-=8,a[c++]=255&l>>o)}if(o>=r||255&l<<8-o)throw SyntaxError("Unexpected end of data");return a},pz=(e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,s="",a=0,o=0;for(let n=0;n<e.length;++n)for(o=o<<8|e[n],a+=8;a>r;)a-=r,s+=t[i&o>>a];if(a&&(s+=t[i&o<<r-a]),n)for(;s.length*r&7;)s+="=";return s},pq=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>pL({prefix:t,name:e,encode:e=>pz(e,n,r),decode:t=>pF(t,n,r,e)}),pH=pL({prefix:"\0",name:"identity",encode:e=>pD(e),decode:e=>pO(e)}),p$=pq({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),pK=pq({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),pV=pj({prefix:"9",name:"base10",alphabet:"0123456789"}),pG=pq({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),pW=pq({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),pZ=pq({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),pJ=pq({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),pY=pq({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),pX=pq({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),pQ=pq({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),p0=pq({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),p1=pq({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),p2=pq({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),p6=pq({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),p3=pj({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),p5=pj({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),p8=pj({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),p7=pj({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),p4=pq({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),p9=pq({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),fe=pq({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ft=pq({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),fr=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),fn=fr.reduce((e,t,r)=>(e[r]=t,e),[]),fi=fr.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]),fs=pL({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>
4e+=fn[t],"")},decode:function(e){let t=[];for(let r of e){let e=fi[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}}),fa={encode:function e(t,r,n){r=r||[];for(var i=n=n||0;t>=0x80000000;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},decode:function e(t,r){var n,i=0,r=r||0,s=0,a=r,o=t.length;do{if(a>=o)throw e.bytes=0,RangeError("Could not decode varint");n=t[a++],i+=s<28?(127&n)<<s:(127&n)*Math.pow(2,s),s+=7}while(n>=128);return e.bytes=a-r,i},encodingLength:function(e){return e<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:e<0x800000000?5:e<0x40000000000?6:e<0x2000000000000?7:e<0x100000000000000?8:e<0x8000000000000000?9:10}},fo=(e,t=0)=>[fa.decode(e,t),fa.decode.bytes],fl=(e,t,r=0)=>(fa.encode(e,t,r),t),fc=e=>fa.encodingLength(e),fu=(e,t)=>{let r=t.byteLength,n=fc(e),i=n+fc(r),s=new Uint8Array(i+r);return fl(e,s,0),fl(r,s,n),s.set(t,i),new fp(e,r,t,s)},fd=e=>{let t=pP(e),[r,n]=fo(t),[i,s]=fo(t.subarray(n)),a=t.subarray(n+s);if(a.byteLength!==i)throw Error("Incorrect length");return new fp(r,i,a,t)},fh=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&pI(e.bytes,t.bytes);class fp{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let ff=({name:e,code:t,encode:r})=>new fm(e,t,r);class fm{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?fu(this.code,t):t.then(e=>fu(this.code,e))}throw Error("Unknown type, must be binary type")}}let fy=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),fb=ff({name:"sha2-256",code:18,encode:fy("SHA-256")}),fg=ff({name:"sha2-512",code:19,encode:fy("SHA-512")}),fv={code:0,name:"identity",encode:pP,digest:e=>fu(0,pP(e))},fw="raw",fx=85,fE=e=>pP(e),f_=e=>pP(e),fC=new TextEncoder,fk=new TextDecoder,fS="json",fA=512,fT=e=>fC.encode(JSON.stringify(e)),fI=e=>JSON.parse(fk.decode(e));class fP{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:fj,byteLength:fj,code:fL,version:fL,multihash:fL,bytes:fL,_baseCache:fj,asCID:fj})}toV0(){if(0===this.version)return this;{let{code:e,multihash:t}=this;if(e!==fN)throw Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==fM)throw Error("Cannot convert non sha2-256 multihash CID to CIDv0");return fP.createV0(t)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,r=fu(e,t);return fP.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&fh(this.multihash,e.multihash)}toString(e){let{bytes:t,version:r,_baseCache:n}=this;return 0===r?fD(t,n,e||p8.encoder):fU(t,n,e||pZ.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return fF(/^0\.0/,fz),!!(e&&(e[fR]||e.asCID===e))}get toBaseEncodedString(){throw Error("Deprecated, use .toString()")}get codec(){throw Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw Error('"multibaseName" property is deprecated')}get prefix(){throw Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof fP)return e;if(null!=e&&e.asCID===e){let{version:t,code:r,multihash:n,bytes:i}=e;return new fP(t,r,n,i||fB(t,r,n.bytes))}if(null==e||!0!==e[fR])return null;{let{version:t,multihash:r,code:n}=e,i=fd(r);return fP.create(t,n,i)}}static create(e,t,r){if("number"!=typeof t)throw Error("String codecs are no longer supported");switch(e){case 0:if(t===fN)return new fP(e,t,r,r.bytes);throw Error(`Version 0 CID must use dag-pb (code: ${fN}) block encoding`);case 1:{let n=fB(e,t,r.bytes);return new fP(e,t,r,n)}default:throw Error("Invalid version")}}static createV0(e){return fP.create(0,fN,e)}static createV1(e,t){return fP.create(1,e,t)}static decode(e){let[t,r]=fP.decodeFirst(e);
4if(r.length)throw Error("Incorrect length");return t}static decodeFirst(e){let t=fP.inspectBytes(e),r=t.size-t.multihashSize,n=pP(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw Error("Incorrect length");let i=n.subarray(t.multihashSize-t.digestSize),s=new fp(t.multihashCode,t.digestSize,i,n);return[0===t.version?fP.createV0(s):fP.createV1(t.codec,s),e.subarray(t.size)]}static inspectBytes(e){let t=0,r=()=>{let[r,n]=fo(e.subarray(t));return t+=n,r},n=r(),i=fN;if(18===n?(n=0,t=0):1===n&&(i=r()),0!==n&&1!==n)throw RangeError(`Invalid CID version ${n}`);let s=t,a=r(),o=r(),l=t+o;return{version:n,codec:i,multihashCode:a,digestSize:o,multihashSize:l-s,size:l}}static parse(e,t){let[r,n]=fO(e,t),i=fP.decode(n);return i._baseCache.set(r,e),i}}let fO=(e,t)=>{switch(e[0]){case"Q":{let r=t||p8;return[p8.prefix,r.decode(`${p8.prefix}${e}`)]}case p8.prefix:{let r=t||p8;return[p8.prefix,r.decode(e)]}case pZ.prefix:{let r=t||pZ;return[pZ.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},fD=(e,t,r)=>{let{prefix:n}=r;if(n!==p8.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=t.get(n);if(null!=i)return i;{let i=r.encode(e).slice(1);return t.set(n,i),i}},fU=(e,t,r)=>{let{prefix:n}=r,i=t.get(n);if(null!=i)return i;{let i=r.encode(e);return t.set(n,i),i}},fN=112,fM=18,fB=(e,t,r)=>{let n=fc(e),i=n+fc(t),s=new Uint8Array(i+r.byteLength);return fl(e,s,0),fl(t,s,n),s.set(r,i),s},fR=Symbol.for("@ipld/js-cid/CID"),fL={writable:!1,configurable:!1,enumerable:!0},fj={writable:!1,enumerable:!1,configurable:!1},fF=(e,t)=>{if(e.test("0.0.0-dev"))console.warn(t);else throw Error(t)},fz=`CID.isCID(v) is deprecated and will be removed in the next major release.
5Following code pattern:
6
7if (CID.isCID(value)) {
8  doSomethingWithCID(value)
9}
10
11Is replaced with:
12
13const cid = CID.asCID(value)
14if (cid) {
15  // Make sure to use cid instead of value
16  doSomethingWithCID(cid)
17}
18`,fq={...o,...l,...c,...u,...d,...h,...p,...f,...m,...y};function fH(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}({...b,...g});let f$=fH("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),fK=fH("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{let t=pS((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),fV={utf8:f$,"utf-8":f$,hex:fq.base16,latin1:fK,ascii:fK,binary:fK,...fq};function fG(e,t="utf8"){let r=fV[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}function fW(e,t="utf8"){let r=fV[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}var fZ=r(2818),fJ=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},fY=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},fX=function(e){this.version=e,this.type="node",this.name="node",this.os=fZ.platform},fQ=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},f0=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},f1=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},f2=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,f6=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;
18\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],f3=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]],f5=r(77271),f8=r(15208),f7=r(19973),f4=r(65155);let f9={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}};var me=r(2818);function mt(e,t){return e.includes(":")?[e]:t.chains||[]}let mr="base10",mn="base16",mi="base64pad",ms="utf8";function ma(){return fW((0,p_.randomBytes)(32),mn)}function mo(e){return fW((0,pC.tW)(fG(e,ms)),mn)}function ml(e){return Number(fW(e,mr))}function mc(e){let t=fG(e,mi),r=t.slice(0,1);if(1===ml(r)){let e=t.slice(1,33),n=t.slice(33,45);return{type:r,sealed:t.slice(45),iv:n,senderPublicKey:e}}let n=t.slice(1,13);return{type:r,sealed:t.slice(13),iv:n}}function mu(e){let t=e?.type||0;if(1===t){if(typeof e?.senderPublicKey>"u")throw Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function md(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var mh=Object.defineProperty,mp=Object.getOwnPropertySymbols,mf=Object.prototype.hasOwnProperty,mm=Object.prototype.propertyIsEnumerable,my=(e,t,r)=>t in e?mh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mb=(e,t)=>{for(var r in t||(t={}))mf.call(t,r)&&my(e,r,t[r]);if(mp)for(var r of mp(t))mm.call(t,r)&&my(e,r,t[r]);return e};let mg={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};function mv(){return"u">typeof me&&"u">typeof me.versions&&"u">typeof me.versions.node}function mw(){return!(0,f8.getDocument)()&&!!(0,f8.getNavigator)()&&"ReactNative"===navigator.product}function mx(){return!mv()&&!!(0,f8.getNavigator)()&&!!(0,f8.getDocument)()}function mE(){return mw()?mg.reactNative:mv()?mg.node:mx()?mg.browser:mg.unknown}function m_(e,t){return e.filter(e=>t.includes(e)).length===e.length}function mC(e){return Object.fromEntries(e.entries())}function mk(e){return new Map(Object.entries(e))}function mS(e=f5.FIVE_MINUTES,t){let r,n,i;let s=(0,f5.toMiliseconds)(e||f5.FIVE_MINUTES);return{resolve:e=>{i&&r&&(clearTimeout(i),r(e))},reject:e=>{i&&n&&(clearTimeout(i),n(e))},done:()=>new Promise((e,a)=>{i=setTimeout(()=>{a(Error(t))},s),r=e,n=a})}}function mA(e,t,r){return new Promise(async(n,i)=>{let s=setTimeout(()=>i(Error(r)),t);try{let t=await e;n(t)}catch(e){i(e)}clearTimeout(s)})}function mT(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw Error(`Unknown expirer target type: ${e}`)}function mI(e){let[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else if("id"===t&&Number.isInteger(Number(r)))n.id=Number(r);else throw Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function mP(e,t){return(0,f5.fromMiliseconds)((t||Date.now())+(0,f5.toMiliseconds)(e))}function mO(e){return Date.now()>=(0,f5.toMiliseconds)(e)}function mD(e,t){return`${e}${t?`:${t}`:""}`}function mU(e=[],t=[]){return[...new Set([...e,...t])]}async function mN({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;let i="string"==typeof n?JSON.parse(n):n,s=i?.href;if("string"!=typeof s)return;s.endsWith("/")&&(s=s.slice(0,-1));let a=`${s}/wc?requestId=${e}&sessionTopic=${t}`,o=mE();o===mg.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===mg.reactNative&&"u">typeof(null==r.g?void 0:r.g.Linking)&&await r.g.Linking.openURL(a)}catch(e){console.error(e)}}async function mM(e,t){try{return await e.getItem(t)||(mx()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}function mB(e){return e?.relay||{protocol:"irn"}}function mR(e){let t=f9[e];if(typeof t>"u")throw Error(`Relay Protocol not supported: ${e}`);return t}var mL=Object.defineProperty,mj=Object.defineProperties,mF=Object.getOwnPropertyDescriptors,mz=Object.getOwnPropertySymbols,mq=Object.prototype.hasOwnProperty,mH=Object.prototype.propertyIsEnumerable,m$=(e,t,r)=>t in e?mL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mK=(e,t)=>{for(var r in t||(t={}))mq.call(t,r)&&m$(e,r,t[r]);if(mz)for(var r of mz(t))mH.call(t,r)&&m$(e,r,t[r]);return e},mV=(e,t)=>mj(e,mF(t));function mG(e){var t;
18let r=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,r),s=e.substring(r+1,n).split("@"),a="u">typeof n?e.substring(n):"",o=f4.parse(a);return{protocol:i,topic:(t=s[0]).startsWith("//")?t.substring(2):t,version:parseInt(s[1],10),symKey:o.symKey,relay:function(e,t="-"){let r={},n="relay"+t;return Object.keys(e).forEach(t=>{if(t.startsWith(n)){let i=t.replace(n,""),s=e[t];r[i]=s}}),r}(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}var mW=Object.defineProperty,mZ=Object.defineProperties,mJ=Object.getOwnPropertyDescriptors,mY=Object.getOwnPropertySymbols,mX=Object.prototype.hasOwnProperty,mQ=Object.prototype.propertyIsEnumerable,m0=(e,t,r)=>t in e?mW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function m1(e){let t=[];return e.forEach(e=>{let[r,n]=e.split(":");t.push(`${r}:${n}`)}),t}function m2(e){return e.includes(":")}function m6(e){return m2(e)?e.split(":")[0]:e}let m3={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},m5={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function m8(e,t){let{message:r,code:n}=m5[e];return{message:t?`${r} ${t}`:r,code:n}}function m7(e,t){let{message:r,code:n}=m3[e];return{message:t?`${r} ${t}`:r,code:n}}function m4(e,t){return!!Array.isArray(e)&&(!("u">typeof t)||!e.length||e.every(t))}function m9(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function ye(e){return typeof e>"u"}function yt(e,t){return!!(t&&ye(e))||"string"==typeof e&&!!e.trim().length}function yr(e,t){return!!(t&&ye(e))||"number"==typeof e&&!isNaN(e)}function yn(e){return!!(yt(e,!1)&&e.includes(":"))&&2===e.split(":").length}function yi(e){let t=!0;return m4(e)?e.length&&(t=e.every(e=>yt(e,!1))):t=!1,t}function ys(e,t){let r=null;return Object.values(e).forEach(e=>{var n;let i;if(r)return;let s=(n=`${t}, namespace`,i=null,yi(e?.methods)?yi(e?.events)||(i=m7("UNSUPPORTED_EVENTS",`${n}, events should be an array of strings or empty array for no events`)):i=m7("UNSUPPORTED_METHODS",`${n}, methods should be an array of strings or empty array for no methods`),i);s&&(r=s)}),r}function ya(e,t){let r=null;if(e&&m9(e)){let n;let i=ys(e,t);i&&(r=i);let s=(n=null,Object.values(e).forEach(e=>{var r,i;let s;if(n)return;let a=(r=e?.accounts,i=`${t}
18 namespace`,s=null,m4(r)?r.forEach(e=>{s||function(e){if(yt(e,!1)&&e.includes(":")){let t=e.split(":");if(3===t.length){let e=t[0]+":"+t[1];return!!t[2]&&yn(e)}}return!1}(e)||(s=m7("UNSUPPORTED_ACCOUNTS",`${i}, account ${e} should be a string and conform to "namespace:chainId:address" format`))}):s=m7("UNSUPPORTED_ACCOUNTS",`${i}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),s);a&&(n=a)}),n);s&&(r=s)}else r=m8("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function yo(e){return yt(e.protocol,!0)}function yl(e){return"u">typeof e}function yc(e,t){return!(!yn(t)||!(function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...m1(e.accounts))}),t})(e).includes(t))}function yu(e,t,r){let n=null,i=function(e){let t={};return Object.keys(e).forEach(r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach(n=>{t[n]={methods:e[r].methods,events:e[r].events}})}),t}(e),s=function(e){let t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{let n=m1(e[r].accounts);n?.forEach(n=>{t[n]={accounts:e[r].accounts.filter(e=>e.includes(`${n}:`)),methods:e[r].methods,events:e[r].events}})}}),t}(t),a=Object.keys(i),o=Object.keys(s),l=yd(Object.keys(e)),c=yd(Object.keys(t)),u=l.filter(e=>!c.includes(e));return u.length&&(n=m8("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
19      Required: ${u.toString()}
20      Received: ${Object.keys(t).toString()}`)),m_(a,o)||(n=m8("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
21      Required: ${a.toString()}
22      Approved: ${o.toString()}`)),Object.keys(t).forEach(e=>{if(!e.includes(":")||n)return;let i=m1(t[e].accounts);i.includes(e)||(n=m8("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}
23        Required: ${e}
24        Approved: ${i.toString()}`))}),a.forEach(e=>{n||(m_(i[e].methods,s[e].methods)?m_(i[e].events,s[e].events)||(n=m8("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=m8("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))}),n}function yd(e){return[...new Set(e.map(e=>e.includes(":")?e.split(":")[0]:e))]}function yh(){let e=mE();return new Promise(t=>{switch(e){case mg.browser:t(mx()&&navigator?.onLine);break;case mg.reactNative:t(yp());break;case mg.node:default:t(!0)}})}async function yp(){if(mw()&&"u">typeof r.g&&null!=r.g&&r.g.NetInfo){let e=await (null==r.g?void 0:r.g.NetInfo.fetch());return e?.isConnected}return!0}let yf={};class ym{static get(e){return yf[e]}static set(e,t){yf[e]=t}static delete(e){delete yf[e]}}let yy=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,yb=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,yg=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function yv(e,t){if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);return}return t}function yw(e,t={}){if("string"!=typeof e)return e;let r=e.trim();if('"'===e[0]&&e.endsWith('"')&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){let e=r.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!yg.test(e)){if(t.strict)throw SyntaxError("[destr] Invalid JSON");return e}try{if(yy.test(e)||yb.test(e)){if(t.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(e,yv)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}var yx=r(75927).hp;function yE(e,...t){try{var r;return(r=e(...t))&&"function"==typeof r.then?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function y_(e){if(function(e){let t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return y_(e.toJSON());throw Error("[unstorage] Cannot stringify value!")}let yC="base64:";function yk(e){return e&&e.split("?")[0]?.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,"")||""}function yS(e){return(e=yk(e))?e+":":""}let yA=()=>{let e=new Map;return{name:"memory",getInstance:()=>e,hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>[...e.keys()],clear(){e.clear()},dispose(){e.clear()}}};function yT(e,t,r){return e.watch?e.watch((e,n)=>t(e,r+n)):()=>{}}async function yI(e){"function"==typeof e.dispose&&await yE(e.dispose)}function yP(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function yO(e,t){let r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);let n=yP(r);return(e,r)=>n.then(n=>r(n.transaction(t,e).objectStore(t)))}function yD(){return n||(n=yO("keyval-store","keyval")),n}function yU(e,t=yD()){return t("readonly",t=>yP(t.get(e)))}let yN=e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"n":t),yM=e=>JSON.parse(e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3'),(e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t);function yB(e){if("string"!=typeof e)throw Error(`Cannot safe json parse value of type ${typeof e}`);try{return yM(e)}catch(t){return e}}function yR(e){return"string"==typeof e?e:yN(e)||""}var yL=(e={})=>{let t;let r=e.base&&e.base.length>0?`${e.base}:`:"",n=e=>r+e;return e.dbName&&e.storeName&&(t=yO(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await yU(n(e),t)>"u"),getItem:async e=>await yU(n(e),t)??null,setItem:(e,r)=>(function(e,t,r=yD()){return r("readwrite",r=>(r.put(t,e),yP(r.transaction)))})(n(e),r,t),removeItem:e=>(function(e,t=yD()){return t("readwrite",t=>(t.delete(e),yP(t.transaction)))})(n(e),t),getKeys:()=>(function(e=yD()){return e("readonly",e=>{var t;if(e.getAllKeys)return yP(e.getAllKeys());let r=[];return(t=e=>r.push(e.key),e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},yP(e.transaction)).then(()=>r)})})(t),clear:()=>(function(e=yD()){return e("readwrite",e=>(e.clear(),yP(e.transaction)))})(t)}};class yj{constructor(){this.indexedDb=function(e={}){let t={mounts:{"":e.driver||yA()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}}
24,r=e=>{for(let r of t.mountpoints)if(e.startsWith(r))return{base:r,relativeKey:e.slice(r.length),driver:t.mounts[r]};return{base:"",relativeKey:e,driver:t.mounts[""]}},n=(e,r)=>t.mountpoints.filter(t=>t.startsWith(e)||r&&e.startsWith(t)).map(r=>({relativeBase:e.length>r.length?e.slice(r.length):void 0,mountpoint:r,driver:t.mounts[r]})),i=(e,r)=>{if(t.watching)for(let n of(r=yk(r),t.watchListeners))n(e,r)},s=async()=>{if(!t.watching)for(let e in t.watching=!0,t.mounts)t.unwatch[e]=await yT(t.mounts[e],i,e)},a=async()=>{if(t.watching){for(let e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},o=(e,t,n)=>{let i=new Map,s=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(let n of e){let e="string"==typeof n,i=yk(e?n:n.key),a=e?void 0:n.value,o=e||!n.options?t:{...t,...n.options},l=r(i);s(l).items.push({key:i,value:a,relativeKey:l.relativeKey,options:o})}return Promise.all([...i.values()].map(e=>n(e))).then(e=>e.flat())},l={hasItem(e,t={}){let{relativeKey:n,driver:i}=r(e=yk(e));return yE(i.hasItem,n,t)},getItem(e,t={}){let{relativeKey:n,driver:i}=r(e=yk(e));return yE(i.getItem,n,t).then(e=>yw(e))},getItems:(e,t={})=>o(e,t,e=>e.driver.getItems?yE(e.driver.getItems,e.items.map(e=>({key:e.relativeKey,options:e.options})),t).then(t=>t.map(t=>({key:function(...e){return yk(e.join(":"))}(e.base,t.key),value:yw(t.value)}))):Promise.all(e.items.map(t=>yE(e.driver.getItem,t.relativeKey,t.options).then(e=>({key:t.key,value:yw(e)}))))),getItemRaw(e,t={}){let{relativeKey:n,driver:i}=r(e=yk(e));return i.getItemRaw?yE(i.getItemRaw,n,t):yE(i.getItem,n,t).then(e=>{var t;return"string"==typeof e&&e.startsWith(yC)?(t=e.slice(yC.length),globalThis.Buffer?yx.from(t,"base64"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))):e})},async setItem(e,t,n={}){if(void 0===t)return l.removeItem(e);let{relativeKey:s,driver:a}=r(e=yk(e));a.setItem&&(await yE(a.setItem,s,y_(t),n),a.watch||i("update",e))},async setItems(e,t){await o(e,t,async e=>{if(e.driver.setItems)return yE(e.driver.setItems,e.items.map(e=>({key:e.relativeKey,value:y_(e.value),options:e.options})),t);e.driver.setItem&&await Promise.all(e.items.map(t=>yE(e.driver.setItem,t.relativeKey,y_(t.value),t.options)))})},async setItemRaw(e,t,n={}){if(void 0===t)return l.removeItem(e,n);let{relativeKey:s,driver:a}=r(e=yk(e));if(a.setItemRaw)await yE(a.setItemRaw,s,t,n);else{if(!a.setItem)return;await yE(a.setItem,s,"string"==typeof t?t:yC+(globalThis.Buffer?yx.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))),n)}a.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t});let{relativeKey:n,driver:s}=r(e=yk(e));s.removeItem&&(await yE(s.removeItem,n,t),(t.removeMeta||t.removeMata)&&await yE(s.removeItem,n+"$",t),s.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t});let{relativeKey:n,driver:i}=r(e=yk(e)),s=Object.create(null);if(i.getMeta&&Object.assign(s,await yE(i.getMeta,n,t)),!t.nativeOnly){let e=await yE(i.getItem,n+"$",t).then(e=>yw(e));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(s,e))}return s},setMeta(e,t,r={}){return this.setItem(e+"$",t,r)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){let r=n(e=yS(e),!0),i=[],s=[];for(let e of r){for(let r of(await yE(e.driver.getKeys,e.relativeBase,t))){let t=e.mountpoint+yk(r);i.some(e=>t.startsWith(e))||s.push(t)}i=[e.mountpoint,...i.filter(t=>!t.startsWith(e.mountpoint))]}return e?s.filter(t=>t.startsWith(e)&&"$"!==t[t.length-1]):s.filter(e=>"$"!==e[e.length-1])},async clear(e,t={}){e=yS(e),await Promise.all(n(e,!1).map(async e=>e.driver.clear?yE(e.driver.clear,e.relativeBase,t):e.driver.removeItem?Promise.all((await e.driver.getKeys(e.relativeBase||"",t)).map(r=>e.driver.removeItem(r,t))):void 0))},async dispose(){await Promise.all(Object.values(t.mounts).map(e=>yI(e)))},watch:async e=>(await s(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter(t=>t!==e),0===t.watchListeners.length&&await a()}),async unwatch(){t.watchListeners=[],await a()},mount(e,r){if((e=yS(e))&&t.mounts[e])throw Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort((e,t)=>
24t.length-e.length)),t.mounts[e]=r,t.watching&&Promise.resolve(yT(r,i,e)).then(r=>{t.unwatch[e]=r}).catch(console.error),l},async unmount(e,r=!0){(e=yS(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e]?.(),delete t.unwatch[e]),r&&await yI(t.mounts[e]),t.mountpoints=t.mountpoints.filter(t=>t!==e),delete t.mounts[e])},getMount(e=""){let t=r(e=yk(e)+":");return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>n(e=yk(e),t.parents).map(e=>({driver:e.driver,base:e.mountpoint})),keys:(e,t={})=>l.getKeys(e,t),get:(e,t={})=>l.getItem(e,t),set:(e,t,r={})=>l.setItem(e,t,r),has:(e,t={})=>l.hasItem(e,t),del:(e,t={})=>l.removeItem(e,t),remove:(e,t={})=>l.removeItem(e,t)};return l}({driver:yL({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){let t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,yR(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var yF="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof r.g?r.g:"u">typeof self?self:{},yz={exports:{}};function yq(e){var t;return[e[0],yB(null!=(t=e[1])?t:"")]}!function(){function e(){}e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){let e=this;Object.keys(e).forEach(function(t){e[t]=void 0,delete e[t]})},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),"u">typeof yF&&yF.localStorage?yz.exports=yF.localStorage:"u">typeof window&&window.localStorage?yz.exports=window.localStorage:yz.exports=new e}();class yH{constructor(){this.localStorage=yz.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(yq)}async getItem(e){let t=this.localStorage.getItem(e);if(null!==t)return yB(t)}async setItem(e,t){this.localStorage.setItem(e,yR(t))}async removeItem(e){this.localStorage.removeItem(e)}}let y$=async(e,t,r)=>{let n="wc_storage_version",i=await t.getItem(n);if(i&&i>=1){r(t);return}let s=await e.getKeys();if(!s.length){r(t);return}let a=[];for(;s.length;){let r=s.shift();if(!r)continue;let n=r.toLowerCase();if(n.includes("wc@")||n.includes("walletconnect")||n.includes("wc_")||n.includes("wallet_connect")){let n=await e.getItem(r);await t.setItem(r,n),a.push(r)}}await t.setItem(n,1),r(t),yK(e,a)},yK=async(e,t)=>{t.length&&t.forEach(async t=>{await e.removeItem(t)})};class yV{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};let e=new yH;this.storage=e;try{let t=new yj;y$(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{let t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}}var yG=r(89380),yW=r(28509),yZ=r.n(yW);let yJ={level:"info"},yY="custom_context";class yX{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class yQ{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){let t=new yX(e);if(t.size>this.maxSizeInBytes)throw Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?this.tail&&(this.tail.next=t):this.head=t,this.tail=t,this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;let e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){let e=[],t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};let t=e.value;return e=e.next,{done:!1,value:t}}}}}var y0=Object.defineProperty,y1=Object.defineProperties,y2=Object.getOwnPropertyDescriptors,y6=Object.getOwnPropertySymbols,y3=Object.prototype.hasOwnProperty,y5=Object.prototype.propertyIsEnumerable,y8=(e,t,r)=>t in e?y0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y7=(e,t)=>{for(var r in t||(t={}))y3.call(t,r)&&y8(e,r,t[r]);if(y6)for(var r of y6(t))y5.call(t,r)&&y8(e,r,t[r]);return e},y4=(e,t)=>
24y1(e,y2(t));function y9(e){return y4(y7({},e),{level:e?.level||yJ.level})}function be(e,t=yY){return typeof e.bindings>"u"?function(e,t=yY){return e[t]||""}(e,t):e.bindings().context||""}function bt(e,t,r=yY){let n=function(e,t,r=yY){let n=be(e,r);return n.trim()?`${n}/${t}`:t}(e,t,r);return function(e,t,r=yY){return e[r]=t,e}(e.child({context:n}),n,r)}var br=r(72446);class bn extends br.H{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class bi extends br.H{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class bs{constructor(e,t){this.logger=e,this.core=t}}class ba extends br.H{constructor(e,t){super(),this.relayer=e,this.logger=t}}class bo extends br.H{constructor(e){super()}}class bl{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class bc extends br.H{constructor(e,t){super(),this.relayer=e,this.logger=t}}class bu extends br.H{constructor(e,t){super(),this.core=e,this.logger=t}}class bd{constructor(e,t){this.projectId=e,this.logger=t}}class bh{constructor(e,t){this.projectId=e,this.logger=t}}var bp=r(47004);let bf="base64url",bm="base58btc";function by(e){return fW(fG(yR(e),"utf8"),bf)}function bb(e){return["did","key","z"+fW(pA([fG("K36",bm),e]),bm)].join(":")}function bg(e=(0,p_.randomBytes)(32)){return bp.K(e)}async function bv(e,t,r,n,i=(0,f5.fromMiliseconds)(Date.now())){var s,a;let o={alg:"EdDSA",typ:"JWT"},l={iss:bb(n.publicKey),sub:e,aud:t,iat:i,exp:i+r},c=fG([by((s={header:o,payload:l}).header),by(s.payload)].join("."),"utf8");return[by((a={header:o,payload:l,signature:bp._S(n.secretKey,c)}).header),by(a.payload),fW(a.signature,bf)].join(".")}r(71285);let bw="INTERNAL_ERROR",bx="SERVER_ERROR",bE=[-32700,-32600,-32601,-32602,-32603],b_={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[bw]:{code:-32603,message:"Internal error"},[bx]:{code:-32e3,message:"Server error"}};function bC(e){return Object.keys(b_).includes(e)?b_[e]:b_[bx]}function bk(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?Error(`Unavailable ${r} RPC url at ${t}`):e}var bS=r(24144);
24function bA(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function bT(e=6){return BigInt(bA(e))}function bI(e,t,r){return{id:r||bA(),jsonrpc:"2.0",method:e,params:t}}function bP(e,t){return{id:e,jsonrpc:"2.0",result:t}}function bO(e,t,r){var n,i,s;return{id:e,jsonrpc:"2.0",error:void 0===(n=t)?bC(bw):("string"==typeof n&&(n=Object.assign(Object.assign({},bC(bx)),{message:n})),void 0!==r&&(n.data=r),i=n.code,bE.includes(i)&&(s=n.code,n=Object.values(b_).find(e=>e.code===s)||b_[bx]),n)}}class bD{}class bU extends bD{constructor(){super()}}class bN extends bU{constructor(e){super()}}function bM(e,t){let r=function(e){let t=e.match(RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function bB(e){return bM(e,"^https?:")}function bR(e){return bM(e,"^wss?:")}function bL(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function bj(e){return bL(e)&&"method"in e}function bF(e){return bL(e)&&(bz(e)||bq(e))}function bz(e){return"result"in e}function bq(e){return"error"in e}class bH extends bN{constructor(e){super(e),this.events=new pv.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(bI(e.method,e.params||[],e.id||bT().toString()),t)}async requestStrict(e,t){return new Promise(async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(e){n(e)}this.events.on(`${e.id}`,e=>{bq(e)?n(e.error):r(e.result)});try{await this.connection.send(e,t)}catch(e){n(e)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),bF(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}let b$=()=>"u">typeof WebSocket||"u">typeof r.g&&"u">typeof r.g.WebSocket||"u">typeof window&&"u">typeof window.WebSocket||"u">typeof self&&"u">typeof self.WebSocket,bK=e=>e.split("?")[0],bV="u">typeof WebSocket?WebSocket:"u">typeof r.g&&"u">typeof r.g.WebSocket?r.g.WebSocket:"u">typeof window&&"u">typeof window.WebSocket?window.WebSocket:"u">typeof self&&"u">typeof self.WebSocket?self.WebSocket:r(73244);class bG{constructor(e){if(this.url=e,this.events=new pv.EventEmitter,this.registering=!1,!bR(e))throw Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return"u">typeof this.socket}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(Error("Connection already closed"));return}this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(yR(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!bR(e))throw Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>
24{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(Error("WebSocket connection is missing or invalid"));e(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,r)=>{let n=new URLSearchParams(e).get("origin"),i=(0,bS.isReactNative)()?{headers:{origin:n}}:{rejectUnauthorized:!RegExp("wss?://localhost(:d{2,5})?").test(e)},s=new bV(e,[],i);b$()?s.onerror=e=>{r(this.emitError(e.error))}:s.on("error",e=>{r(this.emitError(e))}),s.onopen=()=>{this.onOpen(s),t(s)}})}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?yB(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=bO(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return bk(e,bK(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){let t=this.parseError(Error(e?.message||`WebSocket connection failed for host: ${bK(this.url)}`));return this.events.emit("register_error",t),t}}var bW=r(19618),bZ=r.n(bW),bJ=r(86528),bY=r.n(bJ),bX=r(2818),bQ=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),a=s.charCodeAt(0);if(255!==r[a])throw TypeError(s+" is ambiguous");r[a]=i}var o=e.length,l=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===l;)n++,t++;for(var s=(e.length-t)*c+1>>>0,a=new Uint8Array(s);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=s-1;(0!==u||d<i)&&-1!==h;h--,d++)u+=o*a[h]>>>0,a[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=s-i;p!==s&&0===a[p];)p++;for(var f=new Uint8Array(n+(s-p)),m=n;p!==s;)f[m++]=a[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,s=t.length;i!==s&&0===t[i];)i++,r++;for(var a=(s-i)*u+1>>>0,c=new Uint8Array(a);i!==s;){for(var d=t[i],h=0,p=a-1;(0!==d||h<n)&&-1!==p;p--,h++)d+=256*c[p]>>>0,c[p]=d%o>>>0,d=d/o>>>0;if(0!==d)throw Error("Non-zero carry");n=h,i++}for(var f=a-n;f!==a&&0===c[f];)f++;for(var m=l.repeat(r);f<a;++f)m+=e.charAt(c[f]);return m},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw Error(`Non-${t} character`)}}};let b0=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},b1=e=>new TextEncoder().encode(e),b2=e=>new TextDecoder().decode(e);class b6{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class b3{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return b8(this,e)}}class b5{constructor(e){this.decoders=e}or(e){return b8(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}
24, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let b8=(e,t)=>new b5({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class b7{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new b6(e,t,r),this.decoder=new b3(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let b4=({name:e,prefix:t,encode:r,decode:n})=>new b7(e,t,r,n),b9=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:i}=bQ(r,t);return b4({prefix:e,name:t,encode:n,decode:e=>b0(i(e))})},ge=(e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let s=e.length;for(;"="===e[s-1];)--s;let a=new Uint8Array(s*r/8|0),o=0,l=0,c=0;for(let t=0;t<s;++t){let s=i[e[t]];if(void 0===s)throw SyntaxError(`Non-${n} character`);l=l<<r|s,(o+=r)>=8&&(o-=8,a[c++]=255&l>>o)}if(o>=r||255&l<<8-o)throw SyntaxError("Unexpected end of data");return a},gt=(e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,s="",a=0,o=0;for(let n=0;n<e.length;++n)for(o=o<<8|e[n],a+=8;a>r;)a-=r,s+=t[i&o>>a];if(a&&(s+=t[i&o<<r-a]),n)for(;s.length*r&7;)s+="=";return s},gr=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>b4({prefix:t,name:e,encode:e=>gt(e,n,r),decode:t=>ge(t,n,r,e)});var gn=Object.freeze({__proto__:null,identity:b4({prefix:"\0",name:"identity",encode:e=>b2(e),decode:e=>b1(e)})}),gi=Object.freeze({__proto__:null,base2:gr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),gs=Object.freeze({__proto__:null,base8:gr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),ga=Object.freeze({__proto__:null,base10:b9({prefix:"9",name:"base10",alphabet:"0123456789"})}),go=Object.freeze({__proto__:null,base16:gr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:gr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let gl=gr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),gc=gr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gu=gr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),gd=gr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),gh=gr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),gp=gr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5});var gf=Object.freeze({__proto__:null,base32:gl,base32upper:gc,base32pad:gu,base32padupper:gd,base32hex:gh,base32hexupper:gp,base32hexpad:gr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),base32hexpadupper:gr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:gr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),gm=Object.freeze({__proto__:null,base36:b9({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:b9({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),gy=Object.freeze({__proto__:null,base58btc:b9({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:b9({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let gb=gr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});var gg=Object.freeze({__proto__:null,base64:gb,base64pad:gr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),base64url:gr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:gr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let gv=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),gw=gv.reduce((e,t,r)=>(e[r]=t,e),[]),gx=gv.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);var gE=Object.freeze({__proto__:null,base256emoji:b4({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>
24e+=gw[t],"")},decode:function(e){let t=[];for(let r of e){let e=gx[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}})});function g_(e,t){var r,n=0,t=t||0,i=0,s=t,a=e.length;do{if(s>=a)throw g_.bytes=0,RangeError("Could not decode varint");r=e[s++],n+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128);return g_.bytes=s-t,n}var gC={encode:function e(t,r,n){r=r||[],n=n||0;for(var i=n;t>=0x80000000;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},encodingLength:function(e){return e<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:e<0x800000000?5:e<0x40000000000?6:e<0x2000000000000?7:e<0x100000000000000?8:e<0x8000000000000000?9:10}};let gk=(e,t,r=0)=>(gC.encode(e,t,r),t),gS=e=>gC.encodingLength(e),gA=(e,t)=>{let r=t.byteLength,n=gS(e),i=n+gS(r),s=new Uint8Array(i+r);return gk(e,s,0),gk(r,s,n),s.set(t,i),new gT(e,r,t,s)};class gT{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let gI=({name:e,code:t,encode:r})=>new gP(e,t,r);class gP{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?gA(this.code,t):t.then(e=>gA(this.code,e))}throw Error("Unknown type, must be binary type")}}let gO=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var gD=Object.freeze({__proto__:null,sha256:gI({name:"sha2-256",code:18,encode:gO("SHA-256")}),sha512:gI({name:"sha2-512",code:19,encode:gO("SHA-512")})}),gU=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:b0,digest:e=>gA(0,b0(e))}});new TextEncoder,new TextDecoder;let gN={...gn,...gi,...gs,...ga,...go,...gf,...gm,...gy,...gg,...gE};function gM(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function gB(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}({...gD,...gU});let gR=gB("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),gL=gB("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{let t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?gM(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),gj={utf8:gR,"utf-8":gR,hex:gN.base16,latin1:gL,ascii:gL,binary:gL,...gN},gF="core",gz=`wc@2:${gF}:`,gq={logger:"error"},gH={database:":memory:"},g$="client_ed25519_seed",gK=f5.ONE_DAY,gV=f5.SIX_HOURS,gG="wss://relay.walletconnect.com",gW="wss://relay.walletconnect.org",gZ={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",publish:"relayer_publish"},gJ={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},gY=f5.ONE_SECOND,gX={created:"subscription_created",deleted:"subscription_deleted",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},gQ=1e3*f5.FIVE_SECONDS,g0={wc_pairingDelete:{req:{ttl:f5.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:f5.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:f5.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:f5.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:f5.ONE_DAY,prompt:!1,tag:0},res:{ttl:f5.ONE_DAY,prompt:!1,tag:0}}},g1={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},g2={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},g6={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},g3="verify-api",g5="https://verify.walletconnect.com",g8="https://verify.walletconnect.org",g7=[g5,g8];class g4{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=gz,this.init=async()=>{if(!this.initialized){let e=await this.getKeyChain();"u">typeof e&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();let t=this.keychain.get(e);if(typeof t>"u"){let{message:t}=m8("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=bt(t,this.name)}get context(){return be(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,mC(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?mk(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}}class g9{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),bb(bg(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();let e=function(){let e=pk.TZ();return{privateKey:fW(e.secretKey,mn),publicKey:fW(e.publicKey,mn)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();let t=bg(await this.getClientSeed()),r=ma();return await bv(r,e,gK,t)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();let n=function(e,t){let r=pk.Tc(fG(e,mn),fG(t,mn),!0);return fW(new pE.i(pC.aD,r).expand(32),mn)}(this.getPrivateKey(e),t);return this.setSymKey(n,r)},this.setSymKey=async(e,t)=>{this.isInitialized();let r=t||fW((0,pC.tW)(fG(e,mn)),mn);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();let n=mu(r),i=yR(t);if(md(n)){let t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}let s=this.getSymKey(e),{type:a,senderPublicKey:o}=n;return function(e){var t;let r=(t="u">typeof e.type?e.type:0,fG(`${t}`,mr));if(1===ml(r)&&typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");let n="u">typeof e.senderPublicKey?fG(e.senderPublicKey,mn):void 0,i="u">typeof e.iv?fG(e.iv,mn):(0,p_.randomBytes)(12);return function(e){if(1===ml(e.type)){if(typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");
24return fW(pA([e.type,e.senderPublicKey,e.iv,e.sealed]),mi)}return fW(pA([e.type,e.iv,e.sealed]),mi)}({type:r,sealed:new px.g6(fG(e.symKey,mn)).seal(i,fG(e.message,ms)),iv:i,senderPublicKey:n})}({type:a,symKey:s,message:i,senderPublicKey:o})},this.decode=async(e,t,r)=>{this.isInitialized();let n=function(e,t){let r=mc(e);return mu({type:ml(r.type),senderPublicKey:"u">typeof r.senderPublicKey?fW(r.senderPublicKey,mn):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,r);if(md(n)){let t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{let r=this.getSymKey(e),n=function(e){let t=new px.g6(fG(e.symKey,mn)),{sealed:r,iv:n}=mc(e.encoded),i=t.open(n,r);if(null===i)throw Error("Failed to decrypt");return fW(i,ms)}({symKey:r,encoded:t});return yB(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>ml(mc(e).type),this.getPayloadSenderPublicKey=e=>{let t=mc(e);return t.senderPublicKey?fW(t.senderPublicKey,mn):void 0},this.core=e,this.logger=bt(t,this.name),this.keychain=r||new g4(this.core,this.logger)}get context(){return be(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(g$)}catch{e=ma(),await this.keychain.set(g$,e)}return function(e,t="utf8"){let r=gj[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?gM(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}}class ve extends bs{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=gz,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let e=await this.getRelayerMessages();"u">typeof e&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();let r=mo(t),n=this.messages.get(e);return typeof n>"u"&&(n={}),"u">typeof n[r]||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),"u">typeof this.get(e)[mo(t)]),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=bt(e,this.name),this.core=t}get context(){return be(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,mC(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?mk(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}}class vt extends ba{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new pv.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,f5.toMiliseconds)(2*f5.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var n;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});try{let i=r?.ttl||gV,s=mB(r),a=r?.prompt||!1,o=r?.tag||0,l=r?.id||bT().toString(),c={topic:e,message:t,opts:{ttl:i,relay:s,prompt:a,tag:o,id:l}},u=setTimeout(()=>this.queue.set(l,c),this.publishTimeout);try{await await mA(this.rpcPublish(e,t,i,s,a,o,l),this.publishTimeout,`Failed to publish payload, please try again. id:${l} tag:${o}`),this.removeRequestFromQueue(l),this.relayer.events.emit(gZ.publish,c)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(n=r?.internal)&&n.throwOnFailedPublish)throw this.removeRequestFromQueue(l),e;return}finally{clearTimeout(u)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=bt(t,this.name),this.registerEventListeners()}get context(){return be(this.logger)}rpcPublish(e,t,r,n,i,s,a){var o,l,c,u;let d={method:mR(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:s},id:a};return ye(null==(o=d.params)?void 0:o.prompt)&&(null==(l=d.params)||delete l.prompt),ye(null==(c=d.params)?void 0:c.tag)&&(null==(u=d.params)||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{let{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)})}registerEventListeners(){this.relayer.core.heartbeat.on(yG.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(gZ.connection_stalled);return}this.checkQueue()}),this.relayer.on(gZ.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class vr{constructor(){this.map=new Map,this.set=(e,t)=>{let r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>
24{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;let r=this.get(e);if(!this.exists(e,t))return;let n=r.filter(e=>e!==t);if(!n.length){this.map.delete(e);return}this.map.set(e,n)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var vn=Object.defineProperty,vi=Object.defineProperties,vs=Object.getOwnPropertyDescriptors,va=Object.getOwnPropertySymbols,vo=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable,vc=(e,t,r)=>t in e?vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vu=(e,t)=>{for(var r in t||(t={}))vo.call(t,r)&&vc(e,r,t[r]);if(va)for(var r of va(t))vl.call(t,r)&&vc(e,r,t[r]);return e},vd=(e,t)=>vi(e,vs(t));class vh extends bc{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new vr,this.events=new pv.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=gz,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{let r=mB(t),n={topic:e,relay:r};this.pending.set(e,n);let i=await this.rpcSubscribe(e,r);return this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),"u">typeof t?.id?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;let t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise((r,n)=>{let i=new f5.Watch;i.start(t);let s=setInterval(()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(s),i.stop(t),r(!0)),i.elapsed(t)>=gQ&&(clearInterval(s),i.stop(t),n(Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=bt(t,this.name),this.clientId=""}get context(){return be(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){let r=this.topicMap.get(e);await Promise.all(r.map(async r=>await this.unsubscribeById(e,r,t)))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{let n=mB(r);await this.rpcUnsubscribe(e,t,n);let i=m7("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){let r={method:mR(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await mA(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(gZ.connection_stalled)}return mo(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;let t={method:mR(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await mA(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(gZ.connection_stalled)}}rpcUnsubscribe(e,t,r){let n={method:mR(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,vd(vu({},t),{id:e})),this.pending.delete(t.topic)}
24onBatchSubscribe(e){e.length&&e.forEach(e=>{this.setSubscription(e.id,vu({},e)),this.pending.delete(e.topic)})}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,vu({},t)),this.topicMap.set(t.topic,e),this.events.emit(gX.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});let t=this.subscriptions.get(e);if(!t){let{message:t}=m8("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});let r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(gX.deleted,vd(vu({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(gX.sync)}async reset(){if(this.cached.length){let e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){let e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(gX.resubscribed)}async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){let{message:e}=m8("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;let t=await this.rpcBatchSubscribe(e);m4(t)&&this.onBatchSubscribe(t.map((t,r)=>vd(vu({},e[r]),{id:t})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;let e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(yG.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(gZ.connect,async()=>{await this.onConnect()}),this.relayer.on(gZ.disconnect,()=>{this.onDisconnect()}),this.events.on(gX.created,async e=>{let t=gX.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(gX.deleted,async e=>{let t=gX.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{let t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var vp=Object.defineProperty,vf=Object.getOwnPropertySymbols,vm=Object.prototype.hasOwnProperty,vy=Object.prototype.propertyIsEnumerable,vb=(e,t,r)=>t in e?vp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vg=(e,t)=>{for(var r in t||(t={}))vm.call(t,r)&&vb(e,r,t[r]);if(vf)for(var r of vf(t))vy.call(t,r)&&vb(e,r,t[r]);return e};class vv extends bo{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new pv.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async e=>{this.logger.debug("Publishing Request Payload");let t=e.id;try{await this.toEstablishConnection();let r=this.provider.request(e);return this.requestsInFlight.set(t,{promise:r,request:e}),await r}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}finally{this.requestsInFlight.delete(t)}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(gZ.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(gZ.error,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(gJ.payload,this.onPayloadHandler),this.provider.on(gJ.connect,this.onConnectHandler),this.provider.on(gJ.disconnect,this.onDisconnectHandler),this.provider.on(gJ.error,this.onProviderErrorHandler)},this.core=e.core,this.logger="u">typeof e.logger&&"string"!=typeof e.logger?bt(e.logger,this.name):yZ()(y9({level:e.logger||"error"})),this.messages=new ve(this.logger,e.core),this.subscriber=new vh(this,this.logger),this.publisher=new vt(this,this.logger),this.relayUrl=e?.relayUrl||gG,this.projectId=e.projectId,this.bundleId=function(){var e;try{return mw()&&"u">typeof r.g&&"u">typeof(null==r.g?void 0:r.g.Application)?null==(e=r.g.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}
24async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${gW}...`),await this.restartTransport(gW)}this.initialized=!0,setTimeout(async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},1e4)}get context(){return be(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;let n;this.isInitialized();let i=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";if(i)return i;let s=t=>{t.topic===e&&(this.subscriber.off(gX.created,s),n())};return await Promise.all([new Promise(e=>{n=e,this.subscriber.on(gX.created,s)}),new Promise(async r=>{i=await this.subscriber.subscribe(e,t),r()})]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach(async e=>{await e.promise})),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await mA(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(e=>{if(!this.initialized)return e();this.subscriber.once(gX.resubscribed,()=>{e()})}),new Promise(async(e,t)=>{try{await mA(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){t(e);return}e()})])}catch(e){if(this.logger.error(e),!this.isConnectionStalled(e.message))throw e;this.provider.events.emit(gJ.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await yh())throw Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new bH(new bG(function({protocol:e,version:t,relayUrl:n,sdkVersion:i,auth:s,projectId:a,useOnCloseEvent:o,bundleId:l}){var c,u;let d;let h=n.split("?"),p=function(e,t,n){let i=function(){if(mE()===mg.reactNative&&"u">typeof r.g&&"u">typeof(null==r.g?void 0:r.g.Platform)){let{OS:e,Version:t}=r.g.Platform;return[e,t].join("-")}let e="undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new f1:"undefined"!=typeof navigator?function(e){var t=""!==e&&f6.reduce(function(t,r){var n=r[0],i=r[1];if(t)return t;var s=i.exec(e);return!!s&&[n,s]},!1);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new f0;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=fJ(fJ([],i,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(3-i.length),!0)):i=[];var s=i.join("."),a=function(e){for(var t=0,r=f3.length;t<r;t++){var n=f3[t],i=n[0];if(n[1].exec(e))return i}return null}(e),o=f2.exec(e);return o&&o[1]?new fQ(r,s,a,o[1]):new fY(r,s,a)}(navigator.userAgent):void 0!==fZ&&fZ.version?new fX(fZ.version.slice(1)):null;if(null===e)return"unknown";let t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),s=function(){var e;let t=mE();return t===mg.browser?[t,(null==(e=(0,f8.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),["js",n].join("-"),i,s].join("/")}(e,t,i),f=(c=h[1]||"",u={auth:s,ua:p,projectId:a,useOnCloseEvent:o||void 0,origin:l||void 0},d=mb(mb({}
24,d=f4.parse(c)),u),c=f4.stringify(d));return h[0]+"?"+f}({sdkVersion:"2.11.2",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){let{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){let{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;let n=this.messages.has(t,r);return n&&this.logger.debug(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),bj(e)){if(!e.method.endsWith("_subscription"))return;let t=e.params,{topic:r,message:n,publishedAt:i}=t.data,s={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(vg({type:"event",event:t.id},s)),this.events.emit(t.id,s),await this.acknowledgePayload(e),await this.onMessageEvent(s)}else bF(e)&&this.events.emit(gZ.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(gZ.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){let t=bP(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(gJ.payload,this.onPayloadHandler),this.provider.off(gJ.connect,this.onConnectHandler),this.provider.off(gJ.disconnect,this.onDisconnectHandler),this.provider.off(gJ.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(gZ.connection_stalled,()=>{this.restartTransport().catch(e=>this.logger.error(e))});let e=await yh();!function(e){switch(mE()){case mg.browser:!mw()&&mx()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)));break;case mg.reactNative:mw()&&"u">typeof r.g&&null!=r.g&&r.g.NetInfo&&r.g?.NetInfo.addEventListener(t=>e(t?.isConnected));case mg.node:}}(async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch(e=>this.logger.error(e)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(e=>this.logger.error(e))))})}onProviderDisconnect(){this.events.emit(gZ.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},(0,f5.toMiliseconds)(gY)))}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{let t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var vw=Object.defineProperty,vx=Object.getOwnPropertySymbols,vE=Object.prototype.hasOwnProperty,v_=Object.prototype.propertyIsEnumerable,vC=(e,t,r)=>t in e?vw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vk=(e,t)=>{for(var r in t||(t={}))vE.call(t,r)&&vC(e,r,t[r]);if(vx)for(var r of vx(t))v_.call(t,r)&&vC(e,r,t[r]);return e};class vS extends bl{constructor(e,t,r,n=gz,i){super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=gz,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>{this.getKey&&null!==e&&!ye(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):e?.topic&&this.map.set(e.topic,e)}),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter(t=>Object.keys(e).every(r=>bZ()(t[r],e[r]))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});let r=vk(vk({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",ke
24y:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=bt(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return be(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let t=this.map.get(e);if(!t){let{message:t}=m8("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){let{message:e}=m8("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}}class vA{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(pw()),this.initialized=!1,this.storagePrefix=gz,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();let e=ma(),t=await this.core.crypto.setSymKey(e),r=mP(f5.FIVE_MINUTES),n={protocol:"irn"},i=function(e){return`${e.protocol}:${e.topic}@${e.version}?`+f4.stringify(mV(mK({symKey:e.symKey},function(e,t="-"){let r={};return Object.keys(e).forEach(n=>{e[n]&&(r["relay"+t+n]=e[n])}),r}(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:n,expiryTimestamp:r});return await this.pairings.set(t,{topic:t,expiry:r,relay:n,active:!1}),await this.core.relayer.subscribe(t),this.core.expirer.set(t,r),{topic:t,uri:i}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);let{topic:t,symKey:r,relay:n,expiryTimestamp:i}=mG(e.uri);if(this.pairings.keys.includes(t)&&this.pairings.get(t).active)throw Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);let s=i||mP(f5.FIVE_MINUTES),a={topic:t,relay:n,expiry:s,active:!1};return await this.pairings.set(t,a),this.core.expirer.set(t,s),e.activatePairing&&await this.activate({topic:t}),this.events.emit(g1.create,a),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(r,t),await this.core.relayer.subscribe(t,{relay:n})),a},this.activate=async({topic:e})=>{this.isInitialized();let t=mP(f5.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);let{topic:t}=e;if(this.pairings.keys.includes(t)){let e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=mS();this.events.once(mD("pairing_ping",e),({error:e})=>{e?i(e):n()}),await r()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",m7("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{let n=bI(t,r),i=await this.core.crypto.encode(e,n),s=g0[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,s),n.id},this.sendResult=async(e,t,r)=>{let n=bP(e,r),i=await this.core.crypto.encode(t,n),s=g0[(await this.core.history.get(t,e)).request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{let n=bO(e,r),i=await this.core.crypto.encode(t,n),s=await this.core.history.get(t,e),a=g0[s.request.method]?g0[s.request.method].res:g0.unregistered_method.res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,m7("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{let e=this.pairings.getAll().filter(e=>mO(e.expiry));await Promise.all(e.map(e=>this.deletePairing(e.topic)))},this.onRelayEventRequest=e=>{let{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{let{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(g1.ping,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{let{id:r}=t;setTimeout(()=>{bz(t)?this.events.emit(mD("pairing_ping",r),{}):bq(t)&&this.events.emit(mD("pairing_ping",r),{error:t.error})},500)},this.onPairingDeleteRequest=async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(g1.delete,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{let{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;let t=m7("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(m7("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`pair() params: ${e}`);throw Error(t)}if(!function(e){if(yt(e,!1))try{return"u">typeof new URL(e)}catch{}return!1}(e.uri)){let{message:t}=m8("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw Error(t)}let r=mG(e.uri);if(!(null!=(t=r?.relay)&&t.protocol)){let{message:e}=m8("MISSING_OR_INVALID","pair() uri#relay-protocol");throw Error(e)}if(!(null!=r&&r.symKey)){let{message:e}=m8("MISSING_OR_INVALID","pair() uri#symKey");throw Error(e)}if(null!=r&&r.expiryTimestamp&&(0,f5.toMiliseconds)(r?.expiryTimestamp)<Date.now()){let{message:e}=m8("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw Error(e)}},this.isValidPing=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!yt(e,!1)){let{message:t}=m8("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.pairings.keys.includes(e)){let{message:t}=m8("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if(mO(this.pairings.get(e).expiry)){await this.deletePairing(e);let{message:t}=m8("EXPIRED",`pairing topic: ${e}`);throw Error(t)}},this.core=e,this.logger=bt(t,this.name),this.pairings=new vS(this.core,this.logger,this.name,this.storagePrefix)}get context(){return be(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}registerRelayerEvents(){this.core.relayer.on(gZ.message,async e=>{let{topic:t,message:r}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;let n=await this.core.crypto.decode(t,r);try{bj(n)?(this.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):bF(n)&&(await this.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.core.history.delete(t,n.id))}catch(e){this.logger.error(e)}})}registerExpirerEvents(){this.core.expirer.on(g6.expired,async e=>{let{topic:t}=mI(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(g1.expire,{topic:t}))})}}class vT extends bi{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new pv.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=gz,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(
24),this.cached.forEach(e=>this.records.set(e.id,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;let n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:mP(f5.THIRTY_DAYS)};this.records.set(n.id,n),this.events.emit(g2.created,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;let t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=bq(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(g2.updated,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach(r=>{r.topic!==e||"u">typeof t&&r.id!==t||(this.records.delete(r.id),this.events.emit(g2.deleted,r))})},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=bt(t,this.name)}get context(){return be(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach(t=>{if("u">typeof t.response)return;let r={topic:t.topic,request:bI(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let t=this.records.get(e);if(!t){let{message:t}=m8("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(g2.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:e}=m8("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(g2.created,e=>{let t=g2.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(g2.updated,e=>{let t=g2.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.events.on(g2.deleted,e=>{let t=g2.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}),this.core.heartbeat.on(yG.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{(0,f5.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}}class vI extends bu{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new pv.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=gz,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e
24=>this.expirations.set(e.target,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{let t=this.formatTarget(e);return"u">typeof this.getExpiration(t)}catch{return!1}},this.set=(e,t)=>{this.isInitialized();let r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(g6.created,{target:r,expiration:n})},this.get=e=>{this.isInitialized();let t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){let t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(g6.deleted,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=bt(t,this.name)}get context(){return be(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return mT("topic",e);if("number"==typeof e)return mT("id",e);let{message:t}=m8("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(g6.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:e}=m8("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){let t=this.expirations.get(e);if(!t){let{message:t}=m8("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),Error(t)}return t}checkExpiry(e,t){let{expiry:r}=t;(0,f5.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(g6.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(yG.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(g6.created,e=>{let t=g6.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(g6.expired,e=>{let t=g6.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(g6.deleted,e=>{let t=g6.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}}}class vP extends bd{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=g3,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||mw()||!mx())return;let t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=g8;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{let t;if(this.isDevEnv)return"";let r=this.getVerifyUrl(e?.verifyUrl);try{t=await this.fetchAttestation(e.attestationId,r)}catch(n){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${r}`),this.logger.info(n),t=await this.fetchAttestation(e.attestationId,g8)}return t},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);let r=this.startAbortTimer(2*f5.ONE_SECOND),n=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?await n.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>
24{0!==this.queue.length&&(this.queue.forEach(e=>this.sendPost(e)),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;let t=r=>{"verify_ready"===r.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise(r=>{if(document.getElementById(g3))return r();window.addEventListener("message",t);let n=document.createElement("iframe");n.id=g3,n.src=`${this.verifyUrl}/${this.projectId}`,n.style.display="none",document.body.append(n),this.iframe=n,e=r}),new Promise((e,r)=>setTimeout(()=>{window.removeEventListener("message",t),r("verify iframe load timeout")},(0,f5.toMiliseconds)(f5.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||g5;return g7.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${g5}`),t=g5),t},this.logger=bt(t,this.name),this.verifyUrl=g5,this.abortController=new AbortController,this.isDevEnv=mv()&&bX.env.IS_VITEST}get context(){return be(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,f5.toMiliseconds)(e))}}class vO extends bh{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{let{clientId:t,token:r,notificationType:n,enableEncrypted:i=!1}=e,s=`https://echo.walletconnect.com/${this.projectId}/clients`;await bY()(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:n,token:r,always_raw:i})})},this.logger=bt(t,this.context)}}var vD=Object.defineProperty,vU=Object.getOwnPropertySymbols,vN=Object.prototype.hasOwnProperty,vM=Object.prototype.propertyIsEnumerable,vB=(e,t,r)=>t in e?vD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vR=(e,t)=>{for(var r in t||(t={}))vN.call(t,r)&&vB(e,r,t[r]);if(vU)for(var r of vU(t))vM.call(t,r)&&vB(e,r,t[r]);return e};class vL extends bn{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=gF,this.events=new pv.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||gG,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";let t="u">typeof e?.logger&&"string"!=typeof e?.logger?e.logger:yZ()(y9({level:e?.logger||gq.logger}));this.logger=bt(t,this.name),this.heartbeat=new yG.HeartBeat,this.crypto=new g9(this,this.logger,e?.keychain),this.history=new vT(this,this.logger),this.expirer=new vI(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new yV(vR(vR({},gH),e?.storageOptions)),this.relayer=new vv({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new vA(this,this.logger),this.verify=new vP(this.projectId||"",this.logger),this.echoClient=new vO(this.projectId||"",this.logger)}static async init(e){let t=new vL(e);await t.initialize();let r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return be(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}class vj{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class vF{constructor(e){this.client=e}}let vz="client",vq=`wc@2:${vz}:`,vH={name:vz,logger:"error"},v$="WALLETCONNECT_DEEPLINK_CHOICE",vK="Proposal expired",vV=f5.SEVEN_DAYS,vG={wc_sessionPropose:{req:{ttl:f5.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:f5.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:f5.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:f5.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:f5.ONE_DAY,prompt:!1,tag:1104},res:{ttl:f5.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:f5.ONE_DAY,prompt:!1,tag:1106},res:{ttl:f5.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:f5.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:f5.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:f5.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:f5.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:f5.ONE_DAY,prompt:!1,tag:1112},res:{ttl:f5.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:f5.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:f5.THIRTY_SECONDS,prompt:!1,tag:1115}}},vW={min:f5.FIVE_MINUTES,max:f5.SEVEN_DAYS},vZ={idle:"IDLE",active:"ACTIVE"},vJ=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var vY=Object.defineProperty,vX=Object.defineProperties,vQ=Object.getOwnPropertyDescriptors,v0=Object.getOwnPropertySymbols,v1=Object.prototype.hasOwnProperty,v2=Object.prototype.propertyIsEnumerable,v6=(e,t,r)=>t in e?vY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v3=(e,t)=>
24{for(var r in t||(t={}))v1.call(t,r)&&v6(e,r,t[r]);if(v0)for(var r of v0(t))v2.call(t,r)&&v6(e,r,t[r]);return e},v5=(e,t)=>vX(e,vQ(t));class v8 extends vF{constructor(e){super(e),this.name="engine",this.events=new(pw()),this.initialized=!1,this.ignoredPayloadTypes=[1],this.requestQueue={state:vZ.idle,queue:[]},this.sessionRequestQueue={state:vZ.idle,queue:[]},this.requestQueueDelay=f5.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(vG)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,f5.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();let t=v5(v3({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);let{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:s,relays:a}=t,o=r,l,c=!1;if(o&&(c=this.client.core.pairing.pairings.get(o).active),!o||!c){let{topic:e,uri:t}=await this.client.core.pairing.create();o=e,l=t}let u=await this.client.core.crypto.generateKeyPair(),d=vG.wc_sessionPropose.req.ttl||f5.FIVE_MINUTES,h=mP(d),p=v3({requiredNamespaces:n,optionalNamespaces:i,relays:a??[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata},expiryTimestamp:h},s&&{sessionProperties:s}),{reject:f,resolve:m,done:y}=mS(d,vK);if(this.events.once(mD("session_connect"),async({error:e,session:t})=>{if(e)f(e);else if(t){t.self.publicKey=u;let e=v5(v3({},t),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),o&&await this.client.core.pairing.updateMetadata({topic:o,metadata:t.peer.metadata}),m(e)}}),!o){let{message:e}=m8("NO_MATCHING_KEY",`connect() pairing topic: ${o}`);throw Error(e)}let b=await this.sendRequest({topic:o,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,v3({id:b},p)),{uri:l,approval:y}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);let{id:t,relayProtocol:r,namespaces:n,sessionProperties:i}=e,{pairingTopic:s,proposer:a,requiredNamespaces:o,optionalNamespaces:l}=this.client.proposal.get(t);s=s||"";let c=await this.client.core.crypto.generateKeyPair(),u=a.publicKey,d=await this.client.core.crypto.generateSharedKey(c,u);s&&t&&(await this.client.core.pairing.updateMetadata({topic:s,metadata:a.metadata}),await this.sendResult({id:t,topic:s,result:{relay:{protocol:r??"irn"},responderPublicKey:c}}),await this.client.proposal.delete(t,m7("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:s}));let h=v3({relay:{protocol:r??"irn"},namespaces:n,pairingTopic:s,controller:{publicKey:c,metadata:this.client.metadata},expiry:mP(vV)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(d);let p=v5(v3({},h),{topic:d,requiredNamespaces:o,optionalNamespaces:l,pairingTopic:s,acknowledged:!1,self:h.controller,peer:{publicKey:a.publicKey,metadata:a.metadata},controller:c});await this.client.session.set(d,p);try{await this.sendRequest({topic:d,method:"wc_sessionSettle",params:h,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(d,m7("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(d),e}return await this.setExpiry(d,mP(vV)),{topic:d,acknowledged:()=>new Promise(e=>setTimeout(()=>e(this.client.session.get(d)),500))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);let{id:t,reason:r}=e,{pairingTopic:n}=this.client.proposal.get(t);n&&(await this.sendError(t,n,r),await this.client.proposal.delete(t,m7("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);let{topic:t,namespaces:r}=e,n=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r}}),{done:i,resolve:s,reject:a}=mS();return this.events.once(mD("session_update",n),({error:e})=>{e?a(e):s()}),await this.client.session.update(t,{namespaces:r}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);let{topic:t}=e,r=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:n,resolve:i,reject:s}=mS();return this.events.once(mD("session_extend",r),({error:e})=>{e?s(e):i()}),await this.setExpiry(t,mP(vV)),{acknowledged:n}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);let{chainId:t,request:r,topic:n,expiry:i=vG.wc_sessionRequest.req.ttl}
24=e,s=bA(),{done:a,resolve:o,reject:l}=mS(i,"Request expired. Please try again.");return this.events.once(mD("session_request",s),({error:e,result:t})=>{e?l(e):o(t)}),await Promise.all([new Promise(async e=>{await this.sendRequest({clientRpcId:s,topic:n,method:"wc_sessionRequest",params:{request:v5(v3({},r),{expiryTimestamp:mP(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch(e=>l(e)),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:s}),e()}),new Promise(async e=>{mN({id:s,topic:n,wcDeepLink:await mM(this.client.core.storage,v$)}),e()}),a()]).then(e=>e[2])},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);let{topic:t,response:r}=e,{id:n}=r;bz(r)?await this.sendResult({id:n,topic:t,result:r.result,throwOnFailedPublish:!0}):bq(r)&&await this.sendError(n,t,r.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);let{topic:t}=e;if(this.client.session.keys.includes(t)){let e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:r,resolve:n,reject:i}=mS();this.events.once(mD("session_ping",e),({error:e})=>{e?i(e):n()}),await r()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);let{topic:t,event:r,chainId:n}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:m7("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(t))await this.client.core.pairing.disconnect({topic:t});else{let{message:e}=m8("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw Error(e)}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter(t=>(function(e,t){let{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r),s=!0;return!!m_(i,n)&&(n.forEach(t=>{let{accounts:n,methods:i,events:a}=e.namespaces[t],o=m1(n),l=r[t];m_(mt(t,l),o)&&m_(l.methods,i)&&m_(l.events,a)||(s=!1)}),s)})(t,e))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{let t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter(r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic});if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map(e=>this.client.core.pairing.disconnect({topic:e.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{let{topic:t,expirerHasDeleted:r=!1,emitEvent:n=!0,id:i=0}=e,{self:s}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,m7("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(s.publicKey)&&await this.client.core.crypto.deleteKeyPair(s.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),r||this.client.core.expirer.del(t),this.client.core.storage.removeItem(v$).catch(e=>this.client.logger.warn(e)),this.getPendingSessionRequests().forEach(e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,m7("USER_DISCONNECTED"))}),n&&this.client.events.emit("session_delete",{id:i,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,m7("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(t=>t.id!==e),r&&(this.sessionRequestQueue.state=vZ.idle,this.client.events.emit("session_request_expire",{id:e}))},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,mP(vG.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{let{id:t,topic:r,params:n,verifyContext:i}=e,s=n.request.expiryTimestamp||mP(vG.wc_sessionRequest.req.ttl);
24await this.client.pendingRequest.set(t,{id:t,topic:r,params:n,verifyContext:i}),s&&this.client.core.expirer.set(t,s)},this.sendRequest=async e=>{let{topic:t,method:r,params:n,expiry:i,relayRpcId:s,clientRpcId:a,throwOnFailedPublish:o}=e,l=bI(r,n,a);if(mx()&&vJ.includes(r)){let e=mo(JSON.stringify(l));this.client.core.verify.register({attestationId:e})}let c=await this.client.core.crypto.encode(t,l),u=vG[r].req;return i&&(u.ttl=i),s&&(u.id=s),this.client.core.history.set(t,l),o?(u.internal=v5(v3({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,c,u)):this.client.core.relayer.publish(t,c,u).catch(e=>this.client.logger.error(e)),l.id},this.sendResult=async e=>{let{id:t,topic:r,result:n,throwOnFailedPublish:i}=e,s=bP(t,n),a=await this.client.core.crypto.encode(r,s),o=vG[(await this.client.core.history.get(r,t)).request.method].res;i?(o.internal=v5(v3({},o.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,a,o)):this.client.core.relayer.publish(r,a,o).catch(e=>this.client.logger.error(e)),await this.client.core.history.resolve(s)},this.sendError=async(e,t,r)=>{let n=bO(e,r),i=await this.client.core.crypto.encode(t,n),s=vG[(await this.client.core.history.get(t,e)).request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(n)},this.cleanup=async()=>{let e=[],t=[];this.client.session.getAll().forEach(t=>{let r=!1;mO(t.expiry)&&(r=!0),this.client.core.crypto.keychain.has(t.topic)||(r=!0),r&&e.push(t.topic)}),this.client.proposal.getAll().forEach(e=>{mO(e.expiryTimestamp)&&t.push(e.id)}),await Promise.all([...e.map(e=>this.deleteSession({topic:e})),...t.map(e=>this.deleteProposal(e))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===vZ.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=vZ.active;let e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise(e=>setTimeout(e,300))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=vZ.idle},this.processRequest=e=>{let{topic:t,payload:r}=e,n=r.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest
24(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${n}`)}},this.onRelayEventResponse=async e=>{let{topic:t,payload:r}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}},this.onRelayEventUnknownPayload=e=>{let{topic:t}=e,{message:r}=m8("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw Error(r)},this.onSessionProposeRequest=async(e,t)=>{let{params:r,id:n}=t;try{this.isValidConnect(v3({},t.params));let i=r.expiryTimestamp||mP(vG.wc_sessionPropose.req.ttl),s=v3({id:n,pairingTopic:e,expiryTimestamp:i},r);await this.setProposal(n,s);let a=mo(JSON.stringify(t)),o=await this.getVerifyContext(a,s.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:s,verifyContext:o})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{let{id:r}=t;if(bz(t)){let{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});let i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});let s=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});let a=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});let o=await this.client.core.crypto.generateSharedKey(s,a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:o});let l=await this.client.core.relayer.subscribe(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:l}),await this.client.core.pairing.activate({topic:e})}else bq(t)&&(await this.client.proposal.delete(r,m7("USER_DISCONNECTED")),this.events.emit(mD("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{let{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);let{relay:r,controller:i,expiry:s,namespaces:a,sessionProperties:o,pairingTopic:l}=t.params,c=v3({topic:e,relay:r,expiry:s,namespaces:a,acknowledged:!0,pairingTopic:l,requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},o&&{sessionProperties:o});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(mD("session_connect"),{session:c}),this.cleanupDuplicatePairings(c)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{let{id:r}=t;bz(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(mD("session_approve",r),{})):bq(t)&&(await this.client.session.delete(e,m7("USER_DISCONNECTED")),this.events.emit(mD("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{let{params:r,id:n}=t;try{let t=`${e}_session_update`,i=ym.get(t);if(i&&this.isRequestOutOfSync(i,n)){this.client.logger.info(`Discarding out of sync request - ${n}`);return}this.isValidUpdate(v3({topic:e},r)),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_update",{id:n,topic:e,params:r}),ym.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{let{id:r}=t;bz(t)?this.events.emit(mD("session_update",r),{}):bq(t)&&this.events.emit(mD("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{let{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,mP(vV)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{let{id:r}=t;bz(t)?this.events.emit(mD("session_extend",r),{}):bq(t)&&this.events.emit(mD("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{let{id:r}=t;setTimeout(()=>{bz(t)?this.events.emit(mD("session_ping",r),{}):bq(t)&&this.events.emit(mD("session_ping",r),{error:t.error})},500)},this.onSessionDeleteRequest=async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise(t=>{this.client.core.relayer.once(gZ.publish,async()=>{t(await this.deleteSession({topic:e,id:r}))})}),this.sendResult({id:r,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:m7("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{let{id:r,params:n}=t;try{this.isValidRequest(v3({topic:e},n));let t=mo(JSON.stringify(bI("wc_sessionRequest",n,r))),i=this.client.session.get(e),s=await this.getVerifyContext(t,i.peer.metadata),a={id:r,topic:e,params:n,verifyContext:s};await this.setPendingSessionRequest(a),this.addSessionRequestToSessionRequestQueue(a),this.processSessionRequestQueue()}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{let{id:r}=t;bz(t)?this.events.emit(mD("session_request",r),{result:t.result}):bq(t)&&this.events.emit(mD("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{let{id:r,params:n}=t;try{let t=`${e}_session_event_${n.event.name}`,i=ym.get(t);if(i&&this.isRequestOutOfSync(i,r)){this.client.logger.info(`Discarding out of sync request - ${r}`);return}this.isValidEmit(v3({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),ym.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=vZ.idle,this.processSessionRequestQueue()},(0,f5.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{let r=this.client.core.history.pending;r.length>
240&&r.filter(t=>t.topic===e&&"wc_sessionRequest"===t.request.method).forEach(e=>{this.events.emit(mD("session_request",e.request.id),{error:t})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===vZ.active){this.client.logger.info("session request queue is already active.");return}let e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=vZ.active,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}},this.onPairingCreated=e=>{if(e.active)return;let t=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);t&&this.onSessionProposeRequest(e.topic,bI("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw Error(t)}let{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:s}=e;if(ye(t)||await this.isValidPairingTopic(t),!function(e,t){let r=!1;return t&&!e?r=!0:e&&m4(e)&&e.length&&e.forEach(e=>{r=yo(e)}),r}(s,!0)){let{message:e}=m8("MISSING_OR_INVALID",`connect() relays: ${s}`);throw Error(e)}ye(r)||0===m9(r)||this.validateNamespaces(r,"requiredNamespaces"),ye(n)||0===m9(n)||this.validateNamespaces(n,"optionalNamespaces"),ye(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{let r=function(e,t,r){let n=null;if(e&&m9(e)){let i;let s=ys(e,t);s&&(n=s);let a=(i=null,Object.entries(e).forEach(([e,n])=>{var s,a;let o;if(i)return;let l=(s=mt(e,n),a=`${t} ${r}`,o=null,m4(s)&&s.length?s.forEach(e=>{o||yn(e)||(o=m7("UNSUPPORTED_CHAINS",`${a}, chain ${e} should be a string and conform to "namespace:chainId" format`))}):yn(e)||(o=m7("UNSUPPORTED_CHAINS",`${a}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),o);l&&(i=l)}),i);a&&(n=a)}else n=m8("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}(e,"connect()",t);if(r)throw Error(r.message)},this.isValidApprove=async e=>{if(!yl(e))throw Error(m8("MISSING_OR_INVALID",`approve() params: ${e}`).message);let{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;await this.isValidProposalId(t);let s=this.client.proposal.get(t),a=ya(r,"approve()");if(a)throw Error(a.message);let o=yu(s.requiredNamespaces,r,"approve()");if(o)throw Error(o.message);if(!yt(n,!0)){let{message:e}=m8("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw Error(e)}ye(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`reject() params: ${e}`);throw Error(t)}let{id:t,reason:r}=e;if(await this.isValidProposalId(t),!function(e){return!(!e||"object"!=typeof e||!e.code||!yr(e.code,!1)||!e.message||!yt(e.message,!1))}(r)){let{message:e}=m8("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw Error(e)}},this.isValidSessionSettleRequest=e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw Error(t)}
24let{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!yo(t)){let{message:e}=m8("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw Error(e)}let s=function(e,t){let r=null;return yt(e?.publicKey,!1)||(r=m8("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}(r,"onSessionSettleRequest()");if(s)throw Error(s.message);let a=ya(n,"onSessionSettleRequest()");if(a)throw Error(a.message);if(mO(i)){let{message:e}=m8("EXPIRED","onSessionSettleRequest()");throw Error(e)}},this.isValidUpdate=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`update() params: ${e}`);throw Error(t)}let{topic:t,namespaces:r}=e;await this.isValidSessionTopic(t);let n=this.client.session.get(t),i=ya(r,"update()");if(i)throw Error(i.message);let s=yu(n.requiredNamespaces,r,"update()");if(s)throw Error(s.message)},this.isValidExtend=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`extend() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`request() params: ${e}`);throw Error(t)}let{topic:t,request:r,chainId:n,expiry:i}=e;await this.isValidSessionTopic(t);let{namespaces:s}=this.client.session.get(t);if(!yc(s,n)){let{message:e}=m8("MISSING_OR_INVALID",`request() chainId: ${n}`);throw Error(e)}if(!function(e){return!(ye(e)||!yt(e.method,!1))}(r)){let{message:e}=m8("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw Error(e)}if(!function(e,t,r){return!!yt(r,!1)&&(function(e,t){let r=[];return Object.values(e).forEach(e=>{m1(e.accounts).includes(t)&&r.push(...e.methods)}),r})(e,t).includes(r)}(s,n,r.method)){let{message:e}=m8("MISSING_OR_INVALID",`request() method: ${r.method}`);throw Error(e)}if(i&&!function(e,t){return yr(e,!1)&&e<=t.max&&e>=t.min}(i,vW)){let{message:e}=m8("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${vW.min} and ${vW.max}`);throw Error(e)}},this.isValidRespond=async e=>{var t;if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`respond() params: ${e}`);throw Error(t)}let{topic:r,response:n}=e;try{await this.isValidSessionTopic(r)}catch(r){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),r}if(!function(e){return!(ye(e)||ye(e.result)&&ye(e.error)||!yr(e.id,!1)||!yt(e.jsonrpc,!1))}(n)){let{message:e}=m8("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw Error(e)}},this.isValidPing=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`emit() params: ${e}`);throw Error(t)}let{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);let{namespaces:i}=this.client.session.get(t);if(!yc(i,n)){let{message:e}=m8("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw Error(e)}if(!function(e){return!(ye(e)||!yt(e.name,!1))}(r)||!function(e,t,r){return!!yt(r,!1)&&(function(e,t){let r=[];return Object.values(e).forEach(e=>{m1(e.accounts).includes(t)&&r.push(...e.events)}),r})(e,t).includes(r)}(i,n,r.name)){let{message:e}=m8("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw Error(e)}},this.isValidDisconnect=async e=>{if(!yl(e)){let{message:t}=m8("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{let r={verified:{verifyUrl:t.verifyUrl||g5,validation:"UNKNOWN",origin:t.url||""}};try{let n=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});n&&(r.verified.origin=n.origin,r.verified.isScam=n.isScam,r.verified.validation=n.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach(e=>{if(!yt(e,!1)){let{message:r}=m8("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw Error(r)}})}}async isInitialized(){if(!this.initialized){let{message:e}=m8("NOT_INITIALIZED",this.name);throw Error(e)}
24await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(gZ.message,async e=>{let{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;let n=await this.client.core.crypto.decode(t,r);try{bj(n)?(this.client.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):bF(n)?(await this.client.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.client.core.history.delete(t,n.id)):this.onRelayEventUnknownPayload({topic:t,payload:n})}catch(e){this.client.logger.error(e)}})}registerExpirerEvents(){this.client.core.expirer.on(g6.expired,async e=>{let{topic:t,id:r}=mI(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,m8("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))})}registerPairingEvents(){this.client.core.pairing.events.on(g1.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!yt(e,!1)){let{message:t}=m8("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:t}=m8("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if(mO(this.client.core.pairing.pairings.get(e).expiry)){let{message:t}=m8("EXPIRED",`pairing topic: ${e}`);throw Error(t)}}async isValidSessionTopic(e){if(!yt(e,!1)){let{message:t}=m8("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw Error(t)}if(!this.client.session.keys.includes(e)){let{message:t}=m8("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw Error(t)}if(mO(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:t}=m8("EXPIRED",`session topic: ${e}`);throw Error(t)}if(!this.client.core.crypto.keychain.has(e)){let{message:t}=m8("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(yt(e,!1)){let{message:t}=m8("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw Error(t)}else{let{message:t}=m8("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw Error(t)}}async isValidProposalId(e){if("number"!=typeof e){let{message:t}=m8("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw Error(t)}if(!this.client.proposal.keys.includes(e)){let{message:t}=m8("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw Error(t)}if(mO(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:t}=m8("EXPIRED",`proposal id: ${e}`);throw Error(t)}}}class v7 extends vS{constructor(e,t){super(e,t,"proposal",vq),this.core=e,this.logger=t}}class v4 extends vS{constructor(e,t){super(e,t,"session",vq),this.core=e,this.logger=t}}class v9 extends vS{constructor(e,t){super(e,t,"request",vq,e=>e.id),this.core=e,this.logger=t}}class we extends vj{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=vH.name,this.events=new pv.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||vH.name,this.metadata=e?.metadata||(0,f7.g)()||{name:"",description:"",url:"",icons:[""]};let t="u">typeof e?.logger&&"string"!=typeof e?.logger?e.logger:yZ()(y9({level:e?.logger||vH.logger}));this.core=e?.core||new vL(e),this.logger=bt(t,this.name),this.session=new v4(this.core,this.logger),this.proposal=new v7(this.core,this.logger),this.pendingRequest=new v9(this.core,this.logger),this.engine=new v8(this)}static async init(e){let t=new we(e);return await t.initialize(),t}get context(){return be(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var wt=r(1864),wr=r.n(wt),wn=Object.defineProperty,wi=Object.defineProperties,ws=Object.getOwnPropertyDescriptors,wa=Object.getOwnPropertySymbols,wo=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable,wc=(e,t,r)=>t in e?wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wu=(e,t)=>{for(var r in t||(t={}))wo.call(t,r)&&wc(e,r,t[r]);if(wa)for(var r of wa(t))wl.call(t,r)&&wc(e,r,t[r]);return e},wd=(e,t)=>wi(e,ws(t));let wh={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class wp{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new pv.EventEmitter,this.isAvailable=!1,this.registering=!1,!bB(e))throw Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}
24get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{let t=yR(e),r=await (await wr()(this.url,wd(wu({},wh),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!bB(e))throw Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(Error("HTTP connection is missing or invalid"));e()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let t=yR({id:1,jsonrpc:"2.0",method:"test",params:[]});await wr()(e,wd(wu({},wh),{body:t}))}this.onOpen()}catch(t){let e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?yB(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=bO(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return bk(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}let wf="error",wm="wc@2:universal_provider:",wy={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var wb="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof r.g?r.g:"u">typeof self?self:{},wg={exports:{}};!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",a=1/0,o=0/0,l=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",u="[object Array]",d="[object Boolean]",h="[object Date]",p="[object Error]",f="[object Function]",m="[object GeneratorFunction]",y="[object Map]",b="[object Number]",g="[object Object]",v="[object Promise]",w="[object RegExp]",x="[object Set]",E="[object String]",_="[object Symbol]",C="[object WeakMap]",k="[object ArrayBuffer]",S="[object DataView]",A="[object Float32Array]",T="[object Float64Array]",I="[object Int8Array]",P="[object Int16Array]",O="[object Int32Array]",D="[object Uint8Array]",U="[object Uint8ClampedArray]",N="[object Uint16Array]",M="[object Uint32Array]",B=/\b__p \+= '';/g,R=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,j=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,z=RegExp(j.source),q=RegExp(F.source),H=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,J=RegExp(Z.source),Y=/^\s+/,X=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ee=/\{\n\/\* \[wrapped with (.+)\] \*/,et=/,? & /,er=
24/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,en=/[()=,{}\[\]\/\s]/,ei=/\\(\\)?/g,es=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ea=/\w*$/,eo=/^[-+]0x[0-9a-f]+$/i,el=/^0b[01]+$/i,ec=/^\[object .+?Constructor\]$/,eu=/^0o[0-7]+$/i,ed=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ep=/($^)/,ef=/['\n\r\u2028\u2029\\]/g,em="\ud800-\udfff",ey="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",eb="\\u2700-\\u27bf",eg="a-z\\xdf-\\xf6\\xf8-\\xff",ev="A-Z\\xc0-\\xd6\\xd8-\\xde",ew="\\ufe0e\\ufe0f",ex="\\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",eE="['’]",e_="["+ex+"]",eC="["+ey+"]",ek="["+eg+"]",eS="[^"+em+ex+"\\d+"+eb+eg+ev+"]",eA="\ud83c[\udffb-\udfff]",eT="[^"+em+"]",eI="(?:\ud83c[\udde6-\uddff]){2}",eP="[\ud800-\udbff][\udc00-\udfff]",eO="["+ev+"]",eD="\\u200d",eU="(?:"+ek+"|"+eS+")",eN="(?:"+eO+"|"+eS+")",eM="(?:"+eE+"(?:d|ll|m|re|s|t|ve))?",eB="(?:"+eE+"(?:D|LL|M|RE|S|T|VE))?",eR="(?:"+eC+"|"+eA+")?",eL="["+ew+"]?",ej="(?:"+eD+"(?:"+[eT,eI,eP].join("|")+")"+eL+eR+")*",eF=eL+eR+ej,ez="(?:"+["["+eb+"]",eI,eP].join("|")+")"+eF,eq="(?:"+[eT+eC+"?",eC,eI,eP,"["+em+"]"].join("|")+")",eH=RegExp(eE,"g"),e$=RegExp(eC,"g"),eK=RegExp(eA+"(?="+eA+")|"+eq+eF,"g"),eV=RegExp([eO+"?"+ek+"+"+eM+"(?="+[e_,eO,"$"].join("|")+")",eN+"+"+eB+"(?="+[e_,eO+eU,"$"].join("|")+")",eO+"?"+eU+"+"+eM,eO+"+"+eB,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",ez].join("|"),"g"),eG=RegExp("["+eD+em+ey+ew+"]"),eW=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eZ=["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"],eJ=-1,eY={};eY[A]=eY[T]=eY[I]=eY[P]=eY[O]=eY[D]=eY[U]=eY[N]=eY[M]=!0,eY[c]=eY[u]=eY[k]=eY[d]=eY[S]=eY[h]=eY[p]=eY[f]=eY[y]=eY[b]=eY[g]=eY[w]=eY[x]=eY[E]=eY[C]=!1;var eX={};eX[c]=eX[u]=eX[k]=eX[S]=eX[d]=eX[h]=eX[A]=eX[T]=eX[I]=eX[P]=eX[O]=eX[y]=eX[b]=eX[g]=eX[w]=eX[x]=eX[E]=eX[_]=eX[D]=eX[U]=eX[N]=eX[M]=!0,eX[p]=eX[f]=eX[C]=!1;var eQ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e0=parseFloat,e1=parseInt,e2="object"==typeof wb&&wb&&wb.Object===Object&&wb,e6="object"==typeof self&&self&&self.Object===Object&&self,e3=e2||e6||Function("return this")(),e5=t&&!t.nodeType&&t,e8=e5&&e&&!e.nodeType&&e,e7=e8&&e8.exports===e5,e4=e7&&e2.process,e9=function(){try{return e8&&e8.require&&e8.require("util").types||e4&&e4.binding&&e4.binding("util")}catch{}}(),te=e9&&e9.isArrayBuffer,tt=e9&&e9.isDate,tr=e9&&e9.isMap,tn=e9&&e9.isRegExp,ti=e9&&e9.isSet,ts=e9&&e9.isTypedArray;function ta(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function to(e,t,r,n){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(n,a,r(a),e)}return n}function tl(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function tc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function tu(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function td(e,t){return!!(null==e?0:e.length)&&tx(e,t,0)>-1}function th(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function tp(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function tf(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function tm(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function ty(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function tb(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var tg=tk("length");function tv(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function tw(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return -1}function tx(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}(e,t,r):tw(e,t_,r)}function tE(e,t,r,n){for(var i=r-1,s=e.length;++i<s;)if(n(e[i],t))return i;return -1}function t_(e){return e!=e}function tC(e,t){var r=null==e?0:e.length;return r?tT(e,t)/r:o}function tk(e){return function(t){return null==t?r:t[e]}}function tS(e){return function(t){return null==e?r:e[t]}
24}function tA(e,t,r,n,i){return i(e,function(e,i,s){r=n?(n=!1,e):t(r,e,i,s)}),r}function tT(e,t){for(var n,i=-1,s=e.length;++i<s;){var a=t(e[i]);a!==r&&(n=n===r?a:n+a)}return n}function tI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function tP(e){return e&&e.slice(0,tV(e)+1).replace(Y,"")}function tO(e){return function(t){return e(t)}}function tD(e,t){return tp(t,function(t){return e[t]})}function tU(e,t){return e.has(t)}function tN(e,t){for(var r=-1,n=e.length;++r<n&&tx(t,e[r],0)>-1;);return r}function tM(e,t){for(var r=e.length;r--&&tx(t,e[r],0)>-1;);return r}var tB=tS({À:"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"}),tR=tS({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tL(e){return"\\"+eQ[e]}function tj(e){return eG.test(e)}function tF(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function tz(e,t){return function(r){return e(t(r))}}function tq(e,t){for(var r=-1,n=e.length,i=0,a=[];++r<n;){var o=e[r];(o===t||o===s)&&(e[r]=s,a[i++]=r)}return a}function tH(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function t$(e){return tj(e)?function(e){for(var t=eK.lastIndex=0;eK.test(e);)++t;return t}(e):tg(e)}function tK(e){return tj(e)?e.match(eK)||[]:e.split("")}function tV(e){for(var t=e.length;t--&&X.test(e.charAt(t)););return t}var tG=tS({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),tW=function e(t){var X,em,ey,eb,eg=(t=null==t?e3:tW.defaults(e3.Object(),t,tW.pick(e3,eZ))).Array,ev=t.Date,ew=t.Error,ex=t.Function,eE=t.Math,e_=t.Object,eC=t.RegExp,ek=t.String,eS=t.TypeError,eA=eg.prototype,eT=ex.prototype,eI=e_.prototype,eP=t["__core-js_shared__"],eO=eT.toString,eD=eI.hasOwnProperty,eU=0,eN=(X=/[^.]+$/.exec(eP&&eP.keys&&eP.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",eM=eI.toString,eB=eO.call(e_),eR=e3._,eL=eC("^"+eO.call(eD).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ej=e7?t.Buffer:r,eF=t.Symbol,ez=t.Uint8Array,eq=ej?ej.allocUnsafe:r,eK=tz(e_.getPrototypeOf,e_),eG=e_.create,eQ=eI.propertyIsEnumerable,e2=eA.splice,e6=eF?eF.isConcatSpreadable:r,e5=eF?eF.iterator:r,e8=eF?eF.toStringTag:r,e4=function(){try{var e=ip(e_,"defineProperty");return e({},"",{}),e}catch{}}(),e9=t.clearTimeout!==e3.clearTimeout&&t.clearTimeout,tg=ev&&ev.now!==e3.Date.now&&ev.now,tS=t.setTimeout!==e3.setTimeout&&t.setTimeout,tZ=eE.ceil,tJ=eE.floor,tY=e_.getOwnPropertySymbols,tX=ej?ej.isBuffer:r,tQ=t.isFinite,t0=eA.join,t1=tz(e_.keys,e_),t2=eE.max,t6=eE.min,t3=ev.now,t5=t.parseInt,t8=eE.random,t7=eA.reverse,t4=ip(t,"DataView"),t9=ip(t,"Map"),re=ip(t,"Promise"),rt=ip(t,"Set"),rr=ip(t,"WeakMap"),rn=ip(e_,"create"),ri=rr&&new rr,rs={},ra=ij(t4),ro=ij(t9),rl=ij(re),rc=ij(rt),ru=ij(rr),rd=eF?eF.prototype:r,rh=rd?rd.valueOf:r,rp=rd?rd.toString:r;function rf(e){if(sV(e)&&!sM(e)&&!(e instanceof rg)){if(e instanceof rb)return e;if(eD.call(e,"__wrapped__"))return iF(e)}return new rb(e)}var rm=function(){function e(){}return function(t){if(!sK(t))return{};if(eG)return eG(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function ry(){}function rb(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function rg(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function rv(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rx(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rE(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new rx;++t<r;)this.add(e[t])}function r_(e){var t=this.__data__=new rw(e);this.size=t.size}function rC(e,t){var r=sM(e),n=!r&&sN(e),i=!r&&!n&&sj(e),s=!r&&!n&&!i&&s0(e),a=r||n||i||s,o=a?tI(e.length,ek):[],l=o.length;for(var c in e)(t||eD.call(e,c))&&!(a&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ix(c,l)))&&o.push(c);return o}function rk(e){var t=e.length;return t?e[nc(0,t-1)]:r}function rS(e,t,n){(n===r||sO(e[t],n))&&(n!==r||t in e)||rO(e,t,n)}function rA(e,t,n){var i=e[t];eD.call(e,t)&&sO(i,n)&&(n!==r||t in e)||rO(e,t,n)}function rT(e,t){for(var r=e.length;r--;)if(sO(e[r][0],t))return r;return -1}function rI(e,t,r,n){return rL(e,function(e,i,s){t(n,e,r(e),s)}),n}function rP(e,t){return e&&nz(t,ah(t),e)}function rO(e,t,r){"__proto__"==t&&e4?e4(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rD(e,t){for(var n=-1,i=t.length,s=eg(i),a=null==e;++n<i;)s[n]=a?r:ao(e,t[n]);return s}function rU(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function rN(e,t,n,i,s,a){var o,l=1&t,u=2&t,p=4&t;if(n&&(o=s?n(e,i,s,a):n(e)),o!==r)return o;if(!sK(e))return e;var v=sM(e);if(v){if(C=e.length,B=new e.constructor(C),C&&"string"==typeof e[0]&&eD.call(e,"index")&&(B.index=e.index,B.input=e.input),o=B,!l)return nF(e,o)}else{var C,B,R,L,j,F=ib(e),z=F==f||F==m;if(sj(e))return nN(e,l);if(F==g||F==c||z&&!s){if(o=u||z?{}:iv(e),!l)return u?(R=(j=o)&&nz(e,ap(e),j),nz(e,iy(e),R)):(L=rP(o,e),nz(e,im(e),L))}else{if(!eX[F])return s?e:{};o=function(e,t,r){var n,i,s=e.constructor;switch(t){case k:return nM(e);case d:case h:return new s(+e);case S:return n=r?nM(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case A:case T:case I:case P:case O:case D:case U:case N:case M:return nB(e,r);case y:return new s;case b:case E:return new s(e);case w:return(i=new e.constructor(e.source,ea.exec(e))).lastIndex=e.lastIndex,i;case x:return new s;case _:return rh?e_(rh.call(e)):{}}}(e,F,l)}}a||(a=new r_);var q=a.get(e);if(q)return q;a.set(e,o),sY(e)?e.forEach(function(r){o.add(rN(r,t,n,r,e,a))}):sG(e)&&e.forEach(function(r,i){o.set(i,rN(r,t,n,i,e,a))});
vendor: 4,710 bytes, line 24
24var H=p?u?ia:is:u?ap:ah,$=v?r:H(e);return tl($||e,function(r,i){$&&(r=e[i=r]),rA(o,i,rN(r,t,n,i,e,a))}),o}function rM(e,t,n){var i=n.length;if(null==e)return!i;for(e=e_(e);i--;){var s=n[i],a=t[s],o=e[s];if(o===r&&!(s in e)||!a(o))return!1}return!0}function rB(e,t,i){if("function"!=typeof e)throw new eS(n);return iD(function(){e.apply(r,i)},t)}function rR(e,t,r,n){var i=-1,s=td,a=!0,o=e.length,l=[],c=t.length;if(!o)return l;r&&(t=tp(t,tO(r))),n?(s=th,a=!1):t.length>=200&&(s=tU,a=!1,t=new rE(t));e:for(;++i<o;){var u=e[i],d=null==r?u:r(u);if(u=n||0!==u?u:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else s(t,d,n)||l.push(u)}return l}rf.templateSettings={escape:H,evaluate:$,interpolate:K,variable:"",imports:{_:rf}},rf.prototype=ry.prototype,rf.prototype.constructor=rf,rb.prototype=rm(ry.prototype),rb.prototype.constructor=rb,rg.prototype=rm(ry.prototype),rg.prototype.constructor=rg,rv.prototype.clear=function(){this.__data__=rn?rn(null):{},this.size=0},rv.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},rv.prototype.get=function(e){var t=this.__data__;if(rn){var n=t[e];return n===i?r:n}return eD.call(t,e)?t[e]:r},rv.prototype.has=function(e){var t=this.__data__;return rn?t[e]!==r:eD.call(t,e)},rv.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=rn&&t===r?i:t,this},rw.prototype.clear=function(){this.__data__=[],this.size=0},rw.prototype.delete=function(e){var t=this.__data__,r=rT(t,e);return!(r<0)&&(r==t.length-1?t.pop():e2.call(t,r,1),--this.size,!0)},rw.prototype.get=function(e){var t=this.__data__,n=rT(t,e);return n<0?r:t[n][1]},rw.prototype.has=function(e){return rT(this.__data__,e)>-1},rw.prototype.set=function(e,t){var r=this.__data__,n=rT(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},rx.prototype.clear=function(){this.size=0,this.__data__={hash:new rv,map:new(t9||rw),string:new rv}},rx.prototype.delete=function(e){var t=id(this,e).delete(e);return this.size-=t?1:0,t},rx.prototype.get=function(e){return id(this,e).get(e)},rx.prototype.has=function(e){return id(this,e).has(e)},rx.prototype.set=function(e,t){var r=id(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},rE.prototype.add=rE.prototype.push=function(e){return this.__data__.set(e,i),this},rE.prototype.has=function(e){return this.__data__.has(e)},r_.prototype.clear=function(){this.__data__=new rw,this.size=0},r_.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},r_.prototype.get=function(e){return this.__data__.get(e)},r_.prototype.has=function(e){return this.__data__.has(e)},r_.prototype.set=function(e,t){var r=this.__data__;if(r instanceof rw){var n=r.__data__;if(!t9||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new rx(n)}return r.set(e,t),this.size=r.size,this};var rL=n$(rV),rj=n$(rG,!0);function rF(e,t){var r=!0;return rL(e,function(e,n,i){return r=!!t(e,n,i)}),r}function rz(e,t,n){for(var i=-1,s=e.length;++i<s;){var a=e[i],o=t(a);if(null!=o&&(l===r?o==o&&!sQ(o):n(o,l)))var l=o,c=a}return c}function rq(e,t){var r=[];return rL(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function rH(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=iw),i||(i=[]);++s<a;){var o=e[s];t>0&&r(o)?t>1?rH(o,t-1,r,n,i):tf(i,o):n||(i[i.length]=o)}return i}var r$=nK(),rK=nK(!0);function rV(e,t){return e&&r$(e,t,ah)}function rG(e,t){return e&&rK(e,t,ah)}function rW(e,t){return tu(t,function(t){return sq(e[t])})}function rZ(e,t){t=nO(t,e);for(var n=0,i=t.length;null!=e&&n<i;)e=e[iL(t[n++])];return n&&n==i?e:r}function rJ(e,t,r){var n=t(e);return sM(e)?n:tf(n,r(e))}function rY(e){return null==e?e===r?"[object Undefined]":"[object Null]":e8&&e8 in e_(e)?function(e){var t=eD.call(e,e8),n=e[e8];try{e[e8]=r;var i=!0}catch{}var s=eM.call(e);return i&&(t?e[e8]=n:delete e[e8]),s}(e):eM.call(e)}function rX(e,t){return e>t}function rQ(e,t){return null!=e&&eD.call(e,t)}function r0(e,t){return null!=e&&t in e_(e)}function r1(e,t,n){for(var i=n?th:td,s=e[0].length,a=e.length,o=a,l=eg(a),c=1/0,u=[];o--;){var d=e[o];o&&t&&(d=tp(d,tO(t))),c=t6(d.length,c),l[o]=!n&&(t||s>=120&&d.length>=120)?new rE(o&&d):r}d=e[0];var h=-1,p=l[0];e:for(;++h<s&&u.length<c;){var f=d[h],m=t?t(f):f;if(f=n||0!==f?f:0,!(p?tU(p,m):i(u,m,n))){for(o=a;--o;){var y=l[o];if(!(y?tU(y,m):i(e[o],m,n)))continue e}p&&p.push(m),u.push(f)}}return u}function r2(e,t,n){t=nO(t,e);var i=null==(e=iI(e,t))?e:e[iL(iY(t))];return null==i?r:ta(i,e,n)}function r6(e){return sV(e)&&rY(e)==c}function r3(e,t,n,i,s){return e===t||(null!=e&&null!=t&&(sV(e)||sV(t))?function(e,t,n,i,s,a){var o=sM(e),l=sM(t),f=o?u:ib(e),m=l?u:ib(t);f=f==c?g:f,m=m==c?g:m;var v=f==g,C=m==g,A=f==m;
24if(A&&sj(e)){if(!sj(t))return!1;o=!0,v=!1}if(A&&!v)return a||(a=new r_),o||s0(e)?ir(e,t,n,i,s,a):function(e,t,r,n,i,s,a){switch(r){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!s(new ez(e),new ez(t)));case d:case h:case b:return sO(+e,+t);case p:return e.name==t.name&&e.message==t.message;case w:case E:return e==t+"";case y:var o=tF;case x:var l=1&n;if(o||(o=tH),e.size!=t.size&&!l)break;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var u=ir(o(e),o(t),n,i,s,a);return a.delete(e),u;case _:if(rh)return rh.call(e)==rh.call(t)}return!1}(e,t,f,n,i,s,a);if(!(1&n)){var T=v&&eD.call(e,"__wrapped__"),I=C&&eD.call(t,"__wrapped__");if(T||I){var P=T?e.value():e,O=I?t.value():t;return a||(a=new r_),s(P,O,n,i,a)}}return!!A&&(a||(a=new r_),function(e,t,n,i,s,a){var o=1&n,l=is(e),c=l.length;if(c!=is(t).length&&!o)return!1;for(var u=c;u--;){var d=l[u];if(!(o?d in t:eD.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=o;++u<c;){var y=e[d=l[u]],b=t[d];if(i)var g=o?i(b,y,d,t,e,a):i(y,b,d,e,t,a);if(!(g===r?y===b||s(y,b,n,i,a):g)){f=!1;break}m||(m="constructor"==d)}if(f&&!m){var v=e.constructor,w=t.constructor;v!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w)&&(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,i,s,a))}(e,t,n,i,r3,s):e!=e&&t!=t)}function r5(e,t,n,i){var s=n.length,a=s,o=!i;if(null==e)return!a;for(e=e_(e);s--;){var l=n[s];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var c=(l=n[s])[0],u=e[c],d=l[1];if(o&&l[2]){if(u===r&&!(c in e))return!1}else{var h=new r_;if(i)var p=i(u,d,c,e,t,h);if(!(p===r?r3(d,u,3,i,h):p))return!1}}return!0}function r8(e){return!(!sK(e)||eN&&eN in e)&&(sq(e)?eL:ec).test(ij(e))}function r7(e){return"function"==typeof e?e:null==e?aL:"object"==typeof e?sM(e)?nr(e[0],e[1]):nt(e):aG(e)}function r4(e){if(!iS(e))return t1(e);var t=[];for(var r in e_(e))eD.call(e,r)&&"constructor"!=r&&t.push(r);return t}function r9(e,t){return e<t}function ne(e,t){var r=-1,n=sR(e)?eg(e.length):[];return rL(e,function(e,i,s){n[++r]=t(e,i,s)}),n}function nt(e){var t=ih(e);return 1==t.length&&t[0][2]?iA(t[0][0],t[0][1]):function(r){return r===e||r5(r,e,t)}}function nr(e,t){var n;return i_(e)&&(n=t)==n&&!sK(n)?iA(iL(e),t):function(n){var i=ao(n,e);return i===r&&i===t?al(n,e):r3(t,i,3)}}function nn(e,t,n,i,s){e!==t&&r$(t,function(a,o){if(s||(s=new r_),sK(a))!function(e,t,n,i,s,a,o){var l=iP(e,n),c=iP(t,n),u=o.get(c);if(u){rS(e,n,u);return}var d=a?a(l,c,n+"",e,t,o):r,h=d===r;if(h){var p=sM(c),f=!p&&sj(c),m=!p&&!f&&s0(c);d=c,p||f||m?sM(l)?d=l:sL(l)?d=nF(l):f?(h=!1,d=nN(c,!0)):m?(h=!1,d=nB(c,!0)):d=[]:sZ(c)||sN(c)?(d=l,sN(l)?d=s4(l):(!sK(l)||sq(l))&&(d=iv(c))):h=!1}h&&(o.set(c,d),s(d,c,i,a,o),o.delete(c)),rS(e,n,d)}(e,t,o,n,nn,i,s);else{var l=i?i(iP(e,o),a,o+"",e,t,s):r;l===r&&(l=a),rS(e,o,l)}},ap)}function ni(e,t){var n=e.length;if(n)return ix(t+=t<0?n:0,n)?e[t]:r}function ns(e,t,r){t=t.length?tp(t,function(e){return sM(e)?function(t){return rZ(t,1===e.length?e[0]:e)}:e}):[aL];var n=-1;return t=tp(t,tO(iu())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(ne(e,function(e,r,i){return{criteria:tp(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,s=t.criteria,a=i.length,o=r.length;++n<a;){var l=nR(i[n],s[n]);if(l){if(n>=o)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)})}function na(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var a=t[n],o=rZ(e,a);r(o,a)&&nh(s,nO(a,e),o)}return s}function no(e,t,r,n){var i=n?tE:tx,s=-1,a=t.length,o=e;for(e===t&&(t=nF(t)),r&&(o=tp(e,tO(r)));++s<a;)for(var l=0,c=t[s],u=r?r(c):c;(l=i(o,u,l,n))>-1;)o!==e&&e2.call(o,l,1),e2.call(e,l,1);return e}function nl(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==s){var s=i;ix(i)?e2.call(e,i,1):n_(e,i)}}return e}function nc(e,t){return e+tJ(t8()*(t-e+1))}function nu(e,t){var r="";if(!e||t<1||t>0x1fffffffffffff)return r;do t%2&&(r+=e),(t=tJ(t/2))&&(e+=e);while(t);return r}
vendor: 4,532 bytes, line 24
24function nd(e,t){return iU(iT(e,t,aL),e+"")}function nh(e,t,n,i){if(!sK(e))return e;t=nO(t,e);for(var s=-1,a=t.length,o=a-1,l=e;null!=l&&++s<a;){var c=iL(t[s]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)break;if(s!=o){var d=l[c];(u=i?i(d,c,l):r)===r&&(u=sK(d)?d:ix(t[s+1])?[]:{})}rA(l,c,u),l=l[c]}return e}var np=ri?function(e,t){return ri.set(e,t),e}:aL,nf=e4?function(e,t){return e4(e,"toString",{configurable:!0,enumerable:!1,value:aM(t),writable:!0})}:aL;function nm(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=eg(i);++n<i;)s[n]=e[n+t];return s}function ny(e,t){var r;return rL(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function nb(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=0x7fffffff){for(;n<i;){var s=n+i>>>1,a=e[s];null!==a&&!sQ(a)&&(r?a<=t:a<t)?n=s+1:i=s}return i}return ng(e,t,aL,r)}function ng(e,t,n,i){var s=0,a=null==e?0:e.length;if(0===a)return 0;t=n(t);for(var o=t!=t,l=null===t,c=sQ(t),u=t===r;s<a;){var d=tJ((s+a)/2),h=n(e[d]),p=h!==r,f=null===h,m=h==h,y=sQ(h);if(o)var b=i||m;else b=u?m&&(i||p):l?m&&p&&(i||!f):c?m&&p&&!f&&(i||!y):!f&&!y&&(i?h<=t:h<t);b?s=d+1:a=d}return t6(a,0xfffffffe)}function nv(e,t){for(var r=-1,n=e.length,i=0,s=[];++r<n;){var a=e[r],o=t?t(a):a;if(!r||!sO(o,l)){var l=o;s[i++]=0===a?0:a}}return s}function nw(e){return"number"==typeof e?e:sQ(e)?o:+e}function nx(e){if("string"==typeof e)return e;if(sM(e))return tp(e,nx)+"";if(sQ(e))return rp?rp.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}function nE(e,t,r){var n=-1,i=td,s=e.length,a=!0,o=[],l=o;if(r)a=!1,i=th;else if(s>=200){var c=t?null:n8(e);if(c)return tH(c);a=!1,i=tU,l=new rE}else l=t?[]:o;e:for(;++n<s;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),o.push(u)}else i(l,d,r)||(l!==o&&l.push(d),o.push(u))}return o}function n_(e,t){return t=nO(t,e),null==(e=iI(e,t))||delete e[iL(iY(t))]}function nC(e,t,r,n){return nh(e,t,r(rZ(e,t)),n)}function nk(e,t,r,n){for(var i=e.length,s=n?i:-1;(n?s--:++s<i)&&t(e[s],s,e););return r?nm(e,n?0:s,n?s+1:i):nm(e,n?s+1:0,n?i:s)}function nS(e,t){var r=e;return r instanceof rg&&(r=r.value()),tm(t,function(e,t){return t.func.apply(t.thisArg,tf([e],t.args))},r)}function nA(e,t,r){var n=e.length;if(n<2)return n?nE(e[0]):[];for(var i=-1,s=eg(n);++i<n;)for(var a=e[i],o=-1;++o<n;)o!=i&&(s[i]=rR(s[i]||a,e[o],t,r));return nE(rH(s,1),t,r)}function nT(e,t,n){for(var i=-1,s=e.length,a=t.length,o={};++i<s;){var l=i<a?t[i]:r;n(o,e[i],l)}return o}function nI(e){return sL(e)?e:[]}function nP(e){return"function"==typeof e?e:aL}function nO(e,t){return sM(e)?e:i_(e,t)?[e]:iR(s9(e))}function nD(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:nm(e,t,n)}var nU=e9||function(e){return e3.clearTimeout(e)};function nN(e,t){if(t)return e.slice();var r=e.length,n=eq?eq(r):new e.constructor(r);return e.copy(n),n}function nM(e){var t=new e.constructor(e.byteLength);return new ez(t).set(new ez(e)),t}function nB(e,t){var r=t?nM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function nR(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,a=sQ(e),o=t!==r,l=null===t,c=t==t,u=sQ(t);if(!l&&!u&&!a&&e>t||a&&o&&c&&!l&&!u||i&&o&&c||!n&&c||!s)return 1;if(!i&&!a&&!u&&e<t||u&&n&&s&&!i&&!a||l&&n&&s||!o&&s||!c)return -1}return 0}function nL(e,t,r,n){for(var i=-1,s=e.length,a=r.length,o=-1,l=t.length,c=t2(s-a,0),u=eg(l+c),d=!n;++o<l;)u[o]=t[o];for(;++i<a;)(d||i<s)&&(u[r[i]]=e[i]);for(;c--;)u[o++]=e[i++];return u}function nj(e,t,r,n){for(var i=-1,s=e.length,a=-1,o=r.length,l=-1,c=t.length,u=t2(s-o,0),d=eg(u+c),h=!n;++i<u;)d[i]=e[i];for(var p=i;++l<c;)d[p+l]=t[l];for(;++a<o;)(h||i<s)&&(d[p+r[a]]=e[i++]);return d}function nF(e,t){var r=-1,n=e.length;for(t||(t=eg(n));++r<n;)t[r]=e[r];return t}function nz(e,t,n,i){var s=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var l=t[a],c=i?i(n[l],e[l],l,n,e):r;c===r&&(c=e[l]),s?rO(n,l,c):rA(n,l,c)}return n}function nq(e,t){return function(r,n){var i=sM(r)?to:rI,s=t?t():{};return i(r,e,iu(n,2),s)}}function nH(e){return nd(function(t,n){var i=-1,s=n.length,a=s>1?n[s-1]:r,o=s>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(s--,a):r,o&&iE(n[0],n[1],o)&&(a=s<3?r:a,s=1),t=e_(t);++i<s;){var l=n[i];l&&e(t,l,i,a)}return t})}function n$(e,t){return function(r,n){if(null==r)return r;if(!sR(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=e_(r);(t?s--:++s<i)&&!1!==n(a[s],s,a););return r}}function nK(e){return function(t,r,n){for(var i=-1,s=e_(t),a=n(t),o=a.length;o--;){var l=a[e?o:++i];
24if(!1===r(s[l],l,s))break}return t}}function nV(e){return function(t){var n=tj(t=s9(t))?tK(t):r,i=n?n[0]:t.charAt(0),s=n?nD(n,1).join(""):t.slice(1);return i[e]()+s}}function nG(e){return function(t){return tm(aD(aC(t).replace(eH,"")),e,"")}}function nW(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 r=rm(e.prototype),n=e.apply(r,t);return sK(n)?n:r}}function nZ(e){return function(t,n,i){var s=e_(t);if(!sR(t)){var a=iu(n,3);t=ah(t),n=function(e){return a(s[e],e,s)}}var o=e(t,n,i);return o>-1?s[a?t[o]:o]:r}}function nJ(e){return ii(function(t){var i=t.length,s=i,a=rb.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new eS(n);if(a&&!l&&"wrapper"==il(o))var l=new rb([],!0)}for(s=l?s:i;++s<i;){var c=il(o=t[s]),u="wrapper"==c?io(o):r;l=u&&iC(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[il(u[0])].apply(l,u[3]):1==o.length&&iC(o)?l[c]():l.thru(o)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&sM(r))return l.plant(r).value();for(var n=0,s=i?t[n].apply(this,e):r;++n<i;)s=t[n].call(this,s);return s}})}function nY(e,t,n,i,s,a,o,l,c,u){var d=128&t,h=1&t,p=2&t,f=24&t,m=512&t,y=p?r:nW(e);return function b(){for(var g=arguments.length,v=eg(g),w=g;w--;)v[w]=arguments[w];if(f)var x=ic(b),E=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,x);if(i&&(v=nL(v,i,s,f)),a&&(v=nj(v,a,o,f)),g-=E,f&&g<u){var _=tq(v,x);return n3(e,t,nY,b.placeholder,n,v,_,l,c,u-g)}var C=h?n:this,k=p?C[e]:e;return g=v.length,l?v=function(e,t){for(var n=e.length,i=t6(t.length,n),s=nF(e);i--;){var a=t[i];e[i]=ix(a,n)?s[a]:r}return e}(v,l):m&&g>1&&v.reverse(),d&&c<g&&(v.length=c),this&&this!==e3&&this instanceof b&&(k=y||nW(k)),k.apply(C,v)}}function nX(e,t){return function(r,n){var i,s;return i=t(n),s={},rV(r,function(t,r,n){e(s,i(t),r,n)}),s}}function nQ(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=nx(n),i=nx(i)):(n=nw(n),i=nw(i)),s=e(n,i)}return s}}function n0(e){return ii(function(t){return t=tp(t,tO(iu())),nd(function(r){var n=this;return e(t,function(e){return ta(e,n,r)})})})}function n1(e,t){var n=(t=t===r?" ":nx(t)).length;if(n<2)return n?nu(t,e):t;var i=nu(t,tZ(e/t$(t)));return tj(t)?nD(tK(i),0,e).join(""):i.slice(0,e)}function n2(e){return function(t,n,i){return i&&"number"!=typeof i&&iE(t,n,i)&&(n=i=r),t=s3(t),n===r?(n=t,t=0):n=s3(n),i=i===r?t<n?1:-1:s3(i),function(e,t,r,n){for(var i=-1,s=t2(tZ((t-e)/(r||1)),0),a=eg(s);s--;)a[n?s:++i]=e,e+=r;return a}(t,n,i,e)}}function n6(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=s7(t),r=s7(r)),e(t,r)}}function n3(e,t,n,i,s,a,o,l,c,u){var d=8&t,h=d?o:r,p=d?r:o,f=d?a:r,m=d?r:a;t|=d?32:64,4&(t&=~(d?64:32))||(t&=-4);var y=[e,t,s,f,h,m,p,l,c,u],b=n.apply(r,y);return iC(e)&&iO(b,y),b.placeholder=i,iN(b,e,t)}function n5(e){var t=eE[e];return function(e,r){if(e=s7(e),(r=null==r?0:t6(s5(r),292))&&tQ(e)){var n=(s9(e)+"e").split("e");return+((n=(s9(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var n8=rt&&1/tH(new rt([,-0]))[1]==a?function(e){return new rt(e)}:aH;function n7(e){return function(t){var r,n,i=ib(t);return i==y?tF(t):i==x?(r=-1,n=Array(t.size),t.forEach(function(e){n[++r]=[e,e]}),n):tp(e(t),function(e){return[e,t[e]]})}}function n4(e,t,i,a,o,l,c,u){var d=2&t;if(!d&&"function"!=typeof e)throw new eS(n);var h=a?a.length:0;if(h||(t&=-97,a=o=r),c=c===r?c:t2(s5(c),0),u=u===r?u:s5(u),h-=o?o.length:0,64&t){var p=a,f=o;a=o=r}var m=d?r:io(e),y=[e,t,i,a,o,p,f,l,c,u];if(m&&function(e,t){var r=e[1],n=t[1],i=r|n,a=i<131,o=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(a||o){1&n&&(e[2]=t[2],i|=1&r?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?nL(c,l,t[4]):l,e[4]=c?tq(e[3],s):t[4]}(l=t[5])&&(c=e[5],e[5]=c?nj(c,l,t[6]):l,e[6]=c?tq(e[5],s):t[6]),(l=t[7])&&(e[7]=l),128&n&&(e[8]=null==e[8]?t[8]:t6(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}}(y,m),e=y[0],t=y[1],i=y[2],a=y[3],o=y[4],(u=y[9]=y[9]===r?d?0:e.length:t2(y[9]-h,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?(b=e,g=t,v=u,w=nW(b),D=function e(){for(var t=arguments.length,n=eg(t),i=t,s=ic(e);i--;)n[i]=arguments[i];var a=t<3&&n[0]!==s&&n[t-1]!==s?[]:tq(n,s);return(t-=a.length)<v?n3(b,g,nY,e.placeholder,r,n,a,r,r,v-t):ta(this&&this!==e3&&this instanceof e?w:b,this,n)}):32!=t&&33!=t||o.length?D=nY.apply(r,y):(x=e,E=t,_=i,C=a,k=1&E,S=nW(x),D=function e(){for(var t=-1,r=arguments.length,n=-1,i=C.length,s=eg(i+r),a=this&&this!==e3&&this instanceof e?S:x;++n<i;)s[n]=C[n];for(;r--;)s[n++]=arguments[++t];return ta(a,k?_:this,s)});else var b,g,v,w,x,E,_,C,k,S,A,T,I,P,O,D=(A=e,T=t,I=i,P=1&T,O=nW(A),function e(){return(this&&this!==e3&&this instanceof e?O:A).apply(P?I:this,arguments)});return iN((m?np:iO)(D,y),e,t)}function n9(e,t,n,i){return e===r||sO(e,eI[n])&&!eD.call(i,n)?t:e}function ie(e,t,n,i,s,a){return sK(e)&&sK(t)&&(a.set(t,e),nn(e,t,r,ie,a),a.delete(t)),e}function it(e){return sZ(e)?r:e}function ir(e,t,n,i,s,a){var o=1&n,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=2&n?new rE:r;for(a.set(e,t),a.set(t,e);++h<l;){var m=e[h],y=t[h];if(i)var b=o?i(y,m,h,t,e,a):i(m,y,h,e,t,a);if(b!==r){if(b)continue;p=!1;break}if(f){if(!tb(t,function(e,t){if(!tU(f,t)&&(m===e||s(m,e,n,i,a)))return f.push(t)})){p=!1;break}}else if(!(m===y||s(m,y,n,i,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function ii(e){return iU(iT(e,r,iV),e+"")}function is(e){return rJ(e,ah,im)}function ia(e){return rJ(e,ap,iy)}var io=ri?function(e){return ri.get(e)}:aH;
24function il(e){for(var t=e.name+"",r=rs[t],n=eD.call(rs,t)?r.length:0;n--;){var i=r[n],s=i.func;if(null==s||s==e)return i.name}return t}function ic(e){return(eD.call(rf,"placeholder")?rf:e).placeholder}function iu(){var e=rf.iteratee||aj;return e=e===aj?r7:e,arguments.length?e(arguments[0],arguments[1]):e}function id(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function ih(e){for(var t=ah(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,i==i&&!sK(i)]}return t}function ip(e,t){var n=null==e?r:e[t];return r8(n)?n:r}var im=tY?function(e){return null==e?[]:tu(tY(e=e_(e)),function(t){return eQ.call(e,t)})}:aJ,iy=tY?function(e){for(var t=[];e;)tf(t,im(e)),e=eK(e);return t}:aJ,ib=rY;function ig(e,t,r){t=nO(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=iL(t[n]);if(!(s=null!=e&&r(e,a)))break;e=e[a]}return s||++n!=i?s:!!(i=null==e?0:e.length)&&s$(i)&&ix(a,i)&&(sM(e)||sN(e))}function iv(e){return"function"!=typeof e.constructor||iS(e)?{}:rm(eK(e))}function iw(e){return sM(e)||sN(e)||!!(e6&&e&&e[e6])}function ix(e,t){var r=typeof e;return!!(t=t??0x1fffffffffffff)&&("number"==r||"symbol"!=r&&ed.test(e))&&e>-1&&e%1==0&&e<t}function iE(e,t,r){if(!sK(r))return!1;var n=typeof t;return("number"==n?!!(sR(r)&&ix(t,r.length)):"string"==n&&t in r)&&sO(r[t],e)}function i_(e,t){if(sM(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||sQ(e))||G.test(e)||!V.test(e)||null!=t&&e in e_(t)}function iC(e){var t=il(e),r=rf[t];if("function"!=typeof r||!(t in rg.prototype))return!1;if(e===r)return!0;var n=io(r);return!!n&&e===n[0]}(t4&&ib(new t4(new ArrayBuffer(1)))!=S||t9&&ib(new t9)!=y||re&&ib(re.resolve())!=v||rt&&ib(new rt)!=x||rr&&ib(new rr)!=C)&&(ib=function(e){var t=rY(e),n=t==g?e.constructor:r,i=n?ij(n):"";if(i)switch(i){case ra:return S;case ro:return y;case rl:return v;case rc:return x;case ru:return C}return t});var ik=eP?sq:aY;function iS(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eI)}function iA(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in e_(n))}}function iT(e,t,n){return t=t2(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=t2(r.length-t,0),a=eg(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=eg(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),ta(e,this,o)}}function iI(e,t){return t.length<2?e:rZ(e,nm(t,0,-1))}function iP(e,t){if(!("constructor"===t&&"function"==typeof e[t])&&"__proto__"!=t)return e[t]}var iO=iM(np),iD=tS||function(e,t){return e3.setTimeout(e,t)},iU=iM(nf);function iN(e,t,r){var n,i,s=t+"";return iU(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Q,`{
25/* [wrapped with `+t+`] */
26`)}(s,(n=(i=s.match(ee))?i[1].split(et):[],tl(l,function(e){var t="_."+e[0];r&e[1]&&!td(n,t)&&n.push(t)}),n.sort())))}function iM(e){var t=0,n=0;return function(){var i=t3(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function iB(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var a=nc(n,s),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var iR=(ey=(em=sk(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(W,function(e,r,n,i){t.push(n?i.replace(ei,"$1"):r||e)}),t},function(e){return 500===ey.size&&ey.clear(),e})).cache,em);function iL(e){if("string"==typeof e||sQ(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function ij(e){if(null!=e){try{return eO.call(e)}catch{}try{return e+""}catch{}}return""}function iF(e){if(e instanceof rg)return e.clone();var t=new rb(e.__wrapped__,e.__chain__);return t.__actions__=nF(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var iz=nd(function(e,t){return sL(e)?rR(e,rH(t,1,sL,!0)):[]}),iq=nd(function(e,t){var n=iY(t);return sL(n)&&(n=r),sL(e)?rR(e,rH(t,1,sL,!0),iu(n,2)):[]}),iH=nd(function(e,t){var n=iY(t);return sL(n)&&(n=r),sL(e)?rR(e,rH(t,1,sL,!0),r,n):[]});function i$(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:s5(r);return i<0&&(i=t2(n+i,0)),tw(e,iu(t,3),i)}function iK(e,t,n){var i=null==e?0:e.length;if(!i)return -1;var s=i-1;return n!==r&&(s=s5(n),s=n<0?t2(i+s,0):t6(s,i-1)),tw(e,iu(t,3),s,!0)}function iV(e){return(null==e?0:e.length)?rH(e,1):[]}function iG(e){return e&&e.length?e[0]:r}var iW=nd(function(e){var t=tp(e,nI);return t.length&&t[0]===e[0]?r1(t):[]}),iZ=nd(function(e){var t=iY(e),n=tp(e,nI);return t===iY(n)?t=r:n.pop(),n.length&&n[0]===e[0]?r1(n,iu(t,2)):[]}),iJ=nd(function(e){var t=iY(e),n=tp(e,nI);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?r1(n,r,t):[]});function iY(e){var t=null==e?0:e.length;return t?e[t-1]:r}var iX=nd(iQ);function iQ(e,t){return e&&e.length&&t&&t.length?no(e,t):e}var i0=ii(function(e,t){var r=null==e?0:e.length,n=rD(e,t);return nl(e,tp(t,function(e){return ix(e,r)?+e:e}).sort(nR)),n});function i1(e){return null==e?e:t7.call(e)}var i2=nd(function(e){return nE(rH(e,1,sL,!0))}),i6=nd(function(e){var t=iY(e);return sL(t)&&(t=r),nE(rH(e,1,sL,!0),iu(t,2))}),i3=nd(function(e){var t=iY(e);return t="function"==typeof t?t:r,nE(rH(e,1,sL,!0),r,t)});function i5(e){if(!(e&&e.length))return[];var t=0;return e=tu(e,function(e){if(sL(e))return t=t2(e.length,t),!0}),tI(t,function(t){return tp(e,tk(t))})}function i8(e,t){if(!(e&&e.length))return[];var n=i5(e);return null==t?n:tp(n,function(e){return ta(t,r,e)}
vendor: 11,376 bytes, line 26
26)}var i7=nd(function(e,t){return sL(e)?rR(e,t):[]}),i4=nd(function(e){return nA(tu(e,sL))}),i9=nd(function(e){var t=iY(e);return sL(t)&&(t=r),nA(tu(e,sL),iu(t,2))}),se=nd(function(e){var t=iY(e);return t="function"==typeof t?t:r,nA(tu(e,sL),r,t)}),st=nd(i5),sr=nd(function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,i8(e,n)});function sn(e){var t=rf(e);return t.__chain__=!0,t}function si(e,t){return t(e)}var ss=ii(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return rD(t,e)};return!(t>1)&&!this.__actions__.length&&i instanceof rg&&ix(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:si,args:[s],thisArg:r}),new rb(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(r),e})):this.thru(s)}),sa=nq(function(e,t,r){eD.call(e,r)?++e[r]:rO(e,r,1)}),so=nZ(i$),sl=nZ(iK);function sc(e,t){return(sM(e)?tl:rL)(e,iu(t,3))}function su(e,t){return(sM(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:rj)(e,iu(t,3))}var sd=nq(function(e,t,r){eD.call(e,r)?e[r].push(t):rO(e,r,[t])}),sh=nd(function(e,t,r){var n=-1,i="function"==typeof t,s=sR(e)?eg(e.length):[];return rL(e,function(e){s[++n]=i?ta(t,e,r):r2(e,t,r)}),s}),sp=nq(function(e,t,r){rO(e,r,t)});function sf(e,t){return(sM(e)?tp:ne)(e,iu(t,3))}var sm=nq(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),sy=nd(function(e,t){if(null==e)return[];var r=t.length;return r>1&&iE(e,t[0],t[1])?t=[]:r>2&&iE(t[0],t[1],t[2])&&(t=[t[0]]),ns(e,rH(t,1),[])}),sb=tg||function(){return e3.Date.now()};function sg(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,n4(e,128,r,r,r,r,t)}function sv(e,t){var i;if("function"!=typeof t)throw new eS(n);return e=s5(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var sw=nd(function(e,t,r){var n=1;if(r.length){var i=tq(r,ic(sw));n|=32}return n4(e,n,t,r,i)}),sx=nd(function(e,t,r){var n=3;if(r.length){var i=tq(r,ic(sx));n|=32}return n4(t,n,e,r,i)});function sE(e,t,i){var s,a,o,l,c,u,d=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new eS(n);function m(t){var n=s,i=a;return s=a=r,d=t,l=e.apply(i,n)}function y(e){var n=e-u,i=e-d;return u===r||n>=t||n<0||p&&i>=o}function b(){var e,r,n,i=sb();if(y(i))return g(i);c=iD(b,(e=i-u,r=i-d,n=t-e,p?t6(n,o-r):n))}function g(e){return c=r,f&&s?m(e):(s=a=r,l)}function v(){var e,n=sb(),i=y(n);if(s=arguments,a=this,u=n,i){if(c===r)return d=e=u,c=iD(b,t),h?m(e):l;if(p)return nU(c),c=iD(b,t),m(u)}return c===r&&(c=iD(b,t)),l}return t=s7(t)||0,sK(i)&&(h=!!i.leading,o=(p="maxWait"in i)?t2(s7(i.maxWait)||0,t):o,f="trailing"in i?!!i.trailing:f),v.cancel=function(){c!==r&&nU(c),d=0,s=u=a=c=r},v.flush=function(){return c===r?l:g(sb())},v}var s_=nd(function(e,t){return rB(e,1,t)}),sC=nd(function(e,t,r){return rB(e,s7(t)||0,r)});function sk(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new eS(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(sk.Cache||rx),r}function sS(e){if("function"!=typeof e)throw new eS(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}sk.Cache=rx;var sA=nd(function(e,t){var r=(t=1==t.length&&sM(t[0])?tp(t[0],tO(iu())):tp(rH(t,1),tO(iu()))).length;return nd(function(n){for(var i=-1,s=t6(n.length,r);++i<s;)n[i]=t[i].call(this,n[i]);return ta(e,this,n)})}),sT=nd(function(e,t){var n=tq(t,ic(sT));return n4(e,32,r,t,n)}),sI=nd(function(e,t){var n=tq(t,ic(sI));return n4(e,64,r,t,n)}),sP=ii(function(e,t){return n4(e,256,r,r,r,t)});function sO(e,t){return e===t||e!=e&&t!=t}var sD=n6(rX),sU=n6(function(e,t){return e>=t}),sN=r6(function(){return arguments}())?r6:function(e){return sV(e)&&eD.call(e,"callee")&&!eQ.call(e,"callee")},sM=eg.isArray,sB=te?tO(te):function(e){return sV(e)&&rY(e)==k};function sR(e){return null!=e&&s$(e.length)&&!sq(e)}function sL(e){return sV(e)&&sR(e)}var sj=tX||aY,sF=tt?tO(tt):function(e){return sV(e)&&rY(e)==h};function sz(e){if(!sV(e))return!1;var t=rY(e);return t==p||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sZ(e)}function sq(e){if(!sK(e))return!1;var t=rY(e);return t==f||t==m||"[object AsyncFunction]"==t||"[object Proxy]"==t}function sH(e){return"number"==typeof e&&e==s5(e)}function s$(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function sK(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function sV(e){return null!=e&&"object"==typeof e}var sG=tr?tO(tr):function(e){return sV(e)&&ib(e)==y};function sW(e){return"number"==typeof e||sV(e)&&rY(e)==b}function sZ(e){if(!sV(e)||rY(e)!=g)return!1;var t=eK(e);if(null===t)return!0;var r=eD.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eO.call(r)==eB}var sJ=tn?tO(tn):function(e){return sV(e)&&rY(e)==w},sY=ti?tO(ti):function(e){return sV(e)&&ib(e)==x};function sX(e){return"string"==typeof e||!sM(e)&&sV(e)&&rY(e)==E}function sQ(e){return"symbol"==typeof e||sV(e)&&rY(e)==_}var s0=ts?tO(ts):function(e){return sV(e)&&s$(e.length)&&!!eY[rY(e)]},s1=n6(r9),s2=n6(function(e,t){return e<=t});function s6(e){if(!e)return[];if(sR(e))return sX(e)?tK(e):nF(e);if(e5&&e[e5])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[e5]());var t=ib(e);return(t==y?tF:t==x?tH:ax)(e)}function s3(e){return e?(e=s7(e))===a||e===-a?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function s5(e){var t=s3(e),r=t%1;return t==t?r?t-r:t:0}function s8(e){return e?rU(s5(e),0,0xffffffff):0}function s7(e){if("number"==typeof e)return e;if(sQ(e))return o;if(sK(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=sK(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tP(e);var r=el.test(e);return r||eu.test(e)?e1(e.slice(2),r?2:8):eo.test(e)?o:+e}function s4(e){return nz(e,ap(e))}function s9(e){return null==e?"":nx(e)}var ae=nH(function(e,t){if(iS(t)||sR(t)){nz(t,ah(t),e);return}for(var r in t)eD.call(t,r)&&rA(e,r,t[r])}),at=nH(function(e,t){nz(t,ap(t),e)}),ar=nH(function(e,t,r,n){nz(t,ap(t),e,n)}),an=nH(function(e,t,r,n){nz(t,ah(t),e,n)}),ai=ii(rD),as=nd(function(e,t){e=e_(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&iE(t[0],t[1],s)&&(i=1);++n<i;)for(var a=t[n],o=ap(a),l=-1,c=o.length;++l<c;){var u=o[l],d=e[u];(d===r||sO(d,eI[u])&&!eD.call(e,u))&&(e[u]=a[u])}return e}),aa=nd(function(e){return e.push(r,ie),ta(am,r,e)});function ao(e,t,n){var i=null==e?r:rZ(e,t);return i===r?n:i}function al(e,t){return null!=e&&ig(e,t,r0)}var ac=nX(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eM.call(t)),e[t]=r},aM(aL)),au=nX(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eM.call(t)),eD.call(e,t)?e[t].push(r):e[t]=[r]},iu),ad=nd(r2);function ah(e){return sR(e)?rC(e):r4(e)}function ap(e){return sR(e)?rC(e,!0):function(e){if(!sK(e))return function(e){var t=[];if(null!=e)for(var r in e_(e))t.push(r);return t}(e);var t=iS(e),r=[];for(var n in e)"constructor"==n&&(t||!eD.call(e,n))||r.push(n);return r}(e)}var af=nH(function(e,t,r){nn(e,t,r)}),am=nH(function(e,t,r,n){nn(e,t,r,n)}),ay=ii(function(e,t){var r={};if(null==e)return r;var n=!1;t=tp(t,function(t){return t=nO(t,e),n||(n=t.length>1),t}),nz(e,ia(e),r),n&&(r=rN(r,7,it));for(var i=t.length;i--;)n_(r,t[i]);return r}),ab=ii(function(e,t){return null==e?{}:na(e,t,function(t,r){return al(e,r)})});function ag(e,t){if(null==e)return{};var r=tp(ia(e),function(e){return[e]});return t=iu(t),na(e,r,function(e,r){return t(e,r[0])})}var av=n7(ah),aw=n7(ap);function ax(e){return null==e?[]:tD(e,ah(e))}var aE=nG(function(e,t,r){return t=t.toLowerCase(),e+(r?a_(t):t)});function a_(e){return aO(s9(e).toLowerCase())}function aC(e){return(e=s9(e))&&e.replace(eh,tB).replace(e$,"")}var ak=nG(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),aS=nG(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),aA=nV("toLowerCase"),aT=nG(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),aI=nG(function(e,t,r){return e+(r?" ":"")+aO(t)}),aP=nG(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),aO=nV("toUpperCase");function aD(e,t,n){var i;return e=s9(e),(t=n?r:t)===r?(i=e,eW.test(i))?e.match(eV)||[]:e.match(er)||[]:e.match(t)||[]}var aU=nd(function(e,t){try{return ta(e,r,t)}catch(e){return sz(e)?e:new ew(e)}}),aN=ii(function(e,t){return tl(t,function(t){rO(e,t=iL(t),sw(e[t],e))}),e});function aM(e){return function(){return e}}var aB=nJ(),aR=nJ(!0);function aL(e){return e}function aj(e){return r7("function"==typeof e?e:rN(e,1))}var aF=nd(function(e,t){return function(r){return r2(r,e,t)}}),az=nd(function(e,t){return function(r){return r2(e,r,t)}});function aq(e,t,r){var n=ah(t),i=rW(t,n);null!=r||sK(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=rW(t,ah(t)));var s=!(sK(r)&&"chain"in r)||!!r.chain,a=sq(e);return tl(i,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=nF(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,tf([this.value()],arguments))})}),e}function aH(){}var a$=n0(tp),aK=n0(tc),aV=n0(tb);function aG(e){return i_(e)?tk(iL(e)):function(t){return rZ(t,e)}}var aW=n2(),aZ=n2(!0);function aJ(){return[]}function aY(){return!1}var aX=nQ(function(e,t){return e+t},0),aQ=n5("ceil"),a0=nQ(function(e,t){return e/t},1),a1=n5("floor"),a2=nQ(function(e,t){return e*t},1),a6=n5("round"),a3=nQ(function(e,t){return e-t},0);return rf.after=function(e,t){if("function"!=typeof t)throw new eS(n);return e=s5(e),function(){if(--e<1)return t.apply(this,arguments)}},rf.ary=sg,rf.assign=ae,rf.assignIn=at,rf.assignInWith=ar,rf.assignWith=an,rf.at=ai,rf.before=sv,rf.bind=sw,rf.bindAll=aN,rf.bindKey=sx,rf.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return sM(e)?e:[e]},rf.chain=sn,rf.chunk=function(e,t,n){t=(n?iE(e,t,n):t===r)?1:t2(s5(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,o=eg(tZ(i/t));s<i;)o[a++]=nm(e,s,s+=t);return o},rf.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var s=e[t];s&&(i[n++]=s)}return i},rf.concat=function(){var e=arguments.length;if(!e)return[];for(var t=eg(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return tf(sM(r)?nF(r):[r],rH(t,1))},rf.cond=function(e){var t=null==e?0:e.length,r=iu();return e=t?tp(e,function(e){if("function"!=typeof e[1])throw new eS(n);return[r(e[0]),e[1]]}):[],nd(function(r){for(var n=-1;++n<t;){var i=e[n];if(ta(i[0],this,r))return ta(i[1],this,r)}})},rf.conforms=function(e){var t,r;return r=ah(t=rN(e,1)),function(e){return rM(e,t,r)}},rf.constant=aM,rf.countBy=sa,rf.create=function(e,t){var r=rm(e);return null==t?r:rP(r,t)},rf.curry=function e(t,n,i){n=i?r:n;var s=n4(t,8,r,r,r,r,r,n);return s.placeholder=e.placeholder,s},rf.curryRight=function e(t,n,i){n=i?r:n;var s=n4(t,16,r,r,r,r,r,n);return s.placeholder=e.placeholder,s},rf.debounce=sE,rf.defaults=as,rf.defaultsDeep=aa,rf.defer=s_,rf.delay=sC,rf.difference=iz,rf.differenceBy=iq,rf.differenceWith=iH,rf.drop=function(e,t,n){var i=null==e?0:e.length;return i?nm(e,(t=n||t===r?1:s5(t))<0?0:t,i):[]},rf.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?nm(e,0,(t=i-(t=n||t===r?1:s5(t)))<0?0:t):[]},rf.dropRightWhile=function(e,t){return e&&e.length?nk(e,iu(t,3),!0,
vendor: 6,179 bytes, line 26
26!0):[]},rf.dropWhile=function(e,t){return e&&e.length?nk(e,iu(t,3),!0):[]},rf.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&iE(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=s5(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:s5(i))<0&&(i+=s),i=n>i?0:s8(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},rf.filter=function(e,t){return(sM(e)?tu:rq)(e,iu(t,3))},rf.flatMap=function(e,t){return rH(sf(e,t),1)},rf.flatMapDeep=function(e,t){return rH(sf(e,t),a)},rf.flatMapDepth=function(e,t,n){return n=n===r?1:s5(n),rH(sf(e,t),n)},rf.flatten=iV,rf.flattenDeep=function(e){return(null==e?0:e.length)?rH(e,a):[]},rf.flattenDepth=function(e,t){return(null==e?0:e.length)?rH(e,t=t===r?1:s5(t)):[]},rf.flip=function(e){return n4(e,512)},rf.flow=aB,rf.flowRight=aR,rf.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},rf.functions=function(e){return null==e?[]:rW(e,ah(e))},rf.functionsIn=function(e){return null==e?[]:rW(e,ap(e))},rf.groupBy=sd,rf.initial=function(e){return(null==e?0:e.length)?nm(e,0,-1):[]},rf.intersection=iW,rf.intersectionBy=iZ,rf.intersectionWith=iJ,rf.invert=ac,rf.invertBy=au,rf.invokeMap=sh,rf.iteratee=aj,rf.keyBy=sp,rf.keys=ah,rf.keysIn=ap,rf.map=sf,rf.mapKeys=function(e,t){var r={};return t=iu(t,3),rV(e,function(e,n,i){rO(r,t(e,n,i),e)}),r},rf.mapValues=function(e,t){var r={};return t=iu(t,3),rV(e,function(e,n,i){rO(r,n,t(e,n,i))}),r},rf.matches=function(e){return nt(rN(e,1))},rf.matchesProperty=function(e,t){return nr(e,rN(t,1))},rf.memoize=sk,rf.merge=af,rf.mergeWith=am,rf.method=aF,rf.methodOf=az,rf.mixin=aq,rf.negate=sS,rf.nthArg=function(e){return e=s5(e),nd(function(t){return ni(t,e)})},rf.omit=ay,rf.omitBy=function(e,t){return ag(e,sS(iu(t)))},rf.once=function(e){return sv(2,e)},rf.orderBy=function(e,t,n,i){return null==e?[]:(sM(t)||(t=null==t?[]:[t]),sM(n=i?r:n)||(n=null==n?[]:[n]),ns(e,t,n))},rf.over=a$,rf.overArgs=sA,rf.overEvery=aK,rf.overSome=aV,rf.partial=sT,rf.partialRight=sI,rf.partition=sm,rf.pick=ab,rf.pickBy=ag,rf.property=aG,rf.propertyOf=function(e){return function(t){return null==e?r:rZ(e,t)}},rf.pull=iX,rf.pullAll=iQ,rf.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?no(e,t,iu(r,2)):e},rf.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?no(e,t,r,n):e},rf.pullAt=i0,rf.range=aW,rf.rangeRight=aZ,rf.rearg=sP,rf.reject=function(e,t){return(sM(e)?tu:rq)(e,sS(iu(t,3)))},rf.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,i=[],s=e.length;for(t=iu(t,3);++n<s;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return nl(e,i),r},rf.rest=function(e,t){if("function"!=typeof e)throw new eS(n);return nd(e,t=t===r?t:s5(t))},rf.reverse=i1,rf.sampleSize=function(e,t,n){return t=(n?iE(e,t,n):t===r)?1:s5(t),(sM(e)?function(e,t){return iB(nF(e),rU(t,0,e.length))}:function(e,t){var r=ax(e);return iB(r,rU(t,0,r.length))})(e,t)},rf.set=function(e,t,r){return null==e?e:nh(e,t,r)},rf.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:nh(e,t,n,i)},rf.shuffle=function(e){return(sM(e)?function(e){return iB(nF(e))}:function(e){return iB(ax(e))})(e)},rf.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&iE(e,t,n)?(t=0,n=i):(t=null==t?0:s5(t),n=n===r?i:s5(n)),nm(e,t,n)):[]},rf.sortBy=sy,rf.sortedUniq=function(e){return e&&e.length?nv(e):[]},rf.sortedUniqBy=function(e,t){return e&&e.length?nv(e,iu(t,2)):[]},rf.split=function(e,t,n){return n&&"number"!=typeof n&&iE(e,t,n)&&(t=n=r),(n=n===r?0xffffffff:n>>>0)?(e=s9(e))&&("string"==typeof t||null!=t&&!sJ(t))&&!(t=nx(t))&&tj(e)?nD(tK(e),0,n):e.split(t,n):[]},rf.spread=function(e,t){if("function"!=typeof e)throw new eS(n);return t=null==t?0:t2(s5(t),0),nd(function(r){var n=r[t],i=nD(r,0,t);return n&&tf(i,n),ta(e,this,i)})},rf.tail=function(e){var t=null==e?0:e.length;return t?nm(e,1,t):[]},rf.take=function(e,t,n){return e&&e.length?nm(e,0,(t=n||t===r?1:s5(t))<0?0:t):[]},rf.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?nm(e,(t=i-(t=n||t===r?1:s5(t)))<0?0:t,i):[]},rf.takeRightWhile=function(e,t){return e&&e.length?nk(e,iu(t,3),!1,!0):[]},rf.takeWhile=function(e,t){return e&&e.length?nk(e,iu(t,3)):[]},rf.tap=function(e,t){return t(e),e},rf.throttle=function(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new eS(n);return sK(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),sE(e,t,{leading:i,maxWait:t,trailing:s})},rf.thru=si,rf.toArray=s6,rf.toPairs=av,rf.toPairsIn=aw,rf.toPath=function(e){return sM(e)?tp(e,iL):sQ(e)?[e]:nF(iR(s9(e)))},rf.toPlainObject=s4,rf.transform=function(e,t,r){var n=sM(e),i=n||sj(e)||s0(e);if(t=iu(t,4),null==r){var s=e&&e.constructor;r=i?n?new s:[]:sK(e)&&sq(s)?rm(eK(e)):{}}return(i?tl:rV)(e,function(e,n,i){return t(r,e,n,i)}),r},rf.unary=function(e){return sg(e,1)},rf.union=i2,rf.unionBy=i6,rf.unionWith=i3,rf.uniq=function(e){return e&&e.length?nE(e):[]},rf.uniqBy=function(e,t){return e&&e.length?nE(e,iu(t,2)):[]},rf.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?nE(e,r,t):[]},rf.unset=function(e,t){return null==e||n_(e,t)},rf.unzip=i5,rf.unzipWith=i8,rf.update=function(e,t,r){return null==e?e:nC(e,t,nP(r))},rf.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:nC(e,t,nP(n),i)},rf.values=ax,rf.valuesIn=function(e){return null==e?[]:tD(e,ap(e))},rf.without=i7,rf.words=aD,rf.wrap=function(e,t){return sT(nP(t),e)},rf.xor=i4,rf.xorBy=i9,rf.xorWith=se,rf.zip=st,rf.zipObject=function(e,t){return nT(e||[],t||[],rA)},rf.zipObjectDeep=function(e,t){return nT(e||[],t||[],nh)},rf.zipWith=sr,rf.entries=av,rf.entriesIn=aw,rf.extend=at,rf.extendWith=ar,aq(rf,rf),rf.add=aX,rf.attempt=aU,rf.camelCase=aE,rf.capitalize=a_,rf.ceil=aQ,rf.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=s7(n))==n?n:0),t!==r&&(t=(t=s7(t))==t?t:0),rU(s7(e),t,n)},rf.clone=function(e){return rN(e,4)},rf.cloneDeep=function(e){return rN(e,5)},rf.cloneDeepWith=function(e,t){return rN(e,5,t="function"==typeof t?t:r)},rf.cloneWith=function(e,t){return rN(e,4,t="function"==typeof t?t:r)},rf.conformsTo=function(e,t){return null==t||rM(e,t,ah(t))},rf.deburr=aC,rf.defaultTo=function(e,t){return null==e||e!=e?t:e}
vendor: 4,478 bytes, line 26
26,rf.divide=a0,rf.endsWith=function(e,t,n){e=s9(e),t=nx(t);var i=e.length,s=n=n===r?i:rU(s5(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},rf.eq=sO,rf.escape=function(e){return(e=s9(e))&&q.test(e)?e.replace(F,tR):e},rf.escapeRegExp=function(e){return(e=s9(e))&&J.test(e)?e.replace(Z,"\\$&"):e},rf.every=function(e,t,n){var i=sM(e)?tc:rF;return n&&iE(e,t,n)&&(t=r),i(e,iu(t,3))},rf.find=so,rf.findIndex=i$,rf.findKey=function(e,t){return tv(e,iu(t,3),rV)},rf.findLast=sl,rf.findLastIndex=iK,rf.findLastKey=function(e,t){return tv(e,iu(t,3),rG)},rf.floor=a1,rf.forEach=sc,rf.forEachRight=su,rf.forIn=function(e,t){return null==e?e:r$(e,iu(t,3),ap)},rf.forInRight=function(e,t){return null==e?e:rK(e,iu(t,3),ap)},rf.forOwn=function(e,t){return e&&rV(e,iu(t,3))},rf.forOwnRight=function(e,t){return e&&rG(e,iu(t,3))},rf.get=ao,rf.gt=sD,rf.gte=sU,rf.has=function(e,t){return null!=e&&ig(e,t,rQ)},rf.hasIn=al,rf.head=iG,rf.identity=aL,rf.includes=function(e,t,r,n){e=sR(e)?e:ax(e),r=r&&!n?s5(r):0;var i=e.length;return r<0&&(r=t2(i+r,0)),sX(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&tx(e,t,r)>-1},rf.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var i=null==r?0:s5(r);return i<0&&(i=t2(n+i,0)),tx(e,t,i)},rf.inRange=function(e,t,n){var i,s,a;return t=s3(t),n===r?(n=t,t=0):n=s3(n),(i=e=s7(e))>=t6(s=t,a=n)&&i<t2(s,a)},rf.invoke=ad,rf.isArguments=sN,rf.isArray=sM,rf.isArrayBuffer=sB,rf.isArrayLike=sR,rf.isArrayLikeObject=sL,rf.isBoolean=function(e){return!0===e||!1===e||sV(e)&&rY(e)==d},rf.isBuffer=sj,rf.isDate=sF,rf.isElement=function(e){return sV(e)&&1===e.nodeType&&!sZ(e)},rf.isEmpty=function(e){if(null==e)return!0;if(sR(e)&&(sM(e)||"string"==typeof e||"function"==typeof e.splice||sj(e)||s0(e)||sN(e)))return!e.length;var t=ib(e);if(t==y||t==x)return!e.size;if(iS(e))return!r4(e).length;for(var r in e)if(eD.call(e,r))return!1;return!0},rf.isEqual=function(e,t){return r3(e,t)},rf.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?r3(e,t,r,n):!!i},rf.isError=sz,rf.isFinite=function(e){return"number"==typeof e&&tQ(e)},rf.isFunction=sq,rf.isInteger=sH,rf.isLength=s$,rf.isMap=sG,rf.isMatch=function(e,t){return e===t||r5(e,t,ih(t))},rf.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,r5(e,t,ih(t),n)},rf.isNaN=function(e){return sW(e)&&e!=+e},rf.isNative=function(e){if(ik(e))throw new ew("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return r8(e)},rf.isNil=function(e){return null==e},rf.isNull=function(e){return null===e},rf.isNumber=sW,rf.isObject=sK,rf.isObjectLike=sV,rf.isPlainObject=sZ,rf.isRegExp=sJ,rf.isSafeInteger=function(e){return sH(e)&&e>=-0x1fffffffffffff&&e<=0x1fffffffffffff},rf.isSet=sY,rf.isString=sX,rf.isSymbol=sQ,rf.isTypedArray=s0,rf.isUndefined=function(e){return e===r},rf.isWeakMap=function(e){return sV(e)&&ib(e)==C},rf.isWeakSet=function(e){return sV(e)&&"[object WeakSet]"==rY(e)},rf.join=function(e,t){return null==e?"":t0.call(e,t)},rf.kebabCase=ak,rf.last=iY,rf.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return -1;var s=i;return n!==r&&(s=(s=s5(n))<0?t2(i+s,0):t6(s,i-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,s):tw(e,t_,s,!0)},rf.lowerCase=aS,rf.lowerFirst=aA,rf.lt=s1,rf.lte=s2,rf.max=function(e){return e&&e.length?rz(e,aL,rX):r},rf.maxBy=function(e,t){return e&&e.length?rz(e,iu(t,2),rX):r},rf.mean=function(e){return tC(e,aL)},rf.meanBy=function(e,t){return tC(e,iu(t,2))},rf.min=function(e){return e&&e.length?rz(e,aL,r9):r},rf.minBy=function(e,t){return e&&e.length?rz(e,iu(t,2),r9):r},rf.stubArray=aJ,rf.stubFalse=aY,rf.stubObject=function(){return{}},rf.stubString=function(){return""},rf.stubTrue=function(){return!0},rf.multiply=a2,rf.nth=function(e,t){return e&&e.length?ni(e,s5(t)):r},rf.noConflict=function(){return e3._===this&&(e3._=eR),this},rf.noop=aH,rf.now=sb,rf.pad=function(e,t,r){e=s9(e);var n=(t=s5(t))?t$(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return n1(tJ(i),r)+e+n1(tZ(i),r)},rf.padEnd=function(e,t,r){e=s9(e);var n=(t=s5(t))?t$(e):0;return t&&n<t?e+n1(t-n,r):e},rf.padStart=function(e,t,r){e=s9(e);var n=(t=s5(t))?t$(e):0;return t&&n<t?n1(t-n,r)+e:e},rf.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),t5(s9(e).replace(Y,""),t||0)},rf.random=function(e,t,n){if(n&&"boolean"!=typeof n&&iE(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=s3(e),t===r?(t=e,e=0):t=s3(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=t8();
vendor: 4,762 bytes, lines 26-43
26return t6(e+s*(t-e+e0("1e-"+((s+"").length-1))),t)}return nc(e,t)},rf.reduce=function(e,t,r){var n=sM(e)?tm:tA,i=arguments.length<3;return n(e,iu(t,4),r,i,rL)},rf.reduceRight=function(e,t,r){var n=sM(e)?ty:tA,i=arguments.length<3;return n(e,iu(t,4),r,i,rj)},rf.repeat=function(e,t,n){return t=(n?iE(e,t,n):t===r)?1:s5(t),nu(s9(e),t)},rf.replace=function(){var e=arguments,t=s9(e[0]);return e.length<3?t:t.replace(e[1],e[2])},rf.result=function(e,t,n){t=nO(t,e);var i=-1,s=t.length;for(s||(s=1,e=r);++i<s;){var a=null==e?r:e[iL(t[i])];a===r&&(i=s,a=n),e=sq(a)?a.call(e):a}return e},rf.round=a6,rf.runInContext=e,rf.sample=function(e){return(sM(e)?rk:function(e){return rk(ax(e))})(e)},rf.size=function(e){if(null==e)return 0;if(sR(e))return sX(e)?t$(e):e.length;var t=ib(e);return t==y||t==x?e.size:r4(e).length},rf.snakeCase=aT,rf.some=function(e,t,n){var i=sM(e)?tb:ny;return n&&iE(e,t,n)&&(t=r),i(e,iu(t,3))},rf.sortedIndex=function(e,t){return nb(e,t)},rf.sortedIndexBy=function(e,t,r){return ng(e,t,iu(r,2))},rf.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=nb(e,t);if(n<r&&sO(e[n],t))return n}return -1},rf.sortedLastIndex=function(e,t){return nb(e,t,!0)},rf.sortedLastIndexBy=function(e,t,r){return ng(e,t,iu(r,2),!0)},rf.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=nb(e,t,!0)-1;if(sO(e[r],t))return r}return -1},rf.startCase=aI,rf.startsWith=function(e,t,r){return e=s9(e),r=null==r?0:rU(s5(r),0,e.length),t=nx(t),e.slice(r,r+t.length)==t},rf.subtract=a3,rf.sum=function(e){return e&&e.length?tT(e,aL):0},rf.sumBy=function(e,t){return e&&e.length?tT(e,iu(t,2)):0},rf.template=function(e,t,n){var i=rf.templateSettings;n&&iE(e,t,n)&&(t=r),e=s9(e),t=ar({},t,i,n9);var s,a,o=ar({},t.imports,i.imports,n9),l=ah(o),c=tD(o,l),u=0,d=t.interpolate||ep,h="__p += '",p=eC((t.escape||ep).source+"|"+d.source+"|"+(d===K?es:ep).source+"|"+(t.evaluate||ep).source+"|$","g"),f="//# sourceURL="+(eD.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eJ+"]")+`
27`;e.replace(p,function(t,r,n,i,o,l){return n||(n=i),h+=e.slice(u,l).replace(ef,tL),r&&(s=!0,h+=`' +
28__e(`+r+`) +
29'`),o&&(a=!0,h+=`';
30`+o+`;
31__p += '`),n&&(h+=`' +
32((__t = (`+n+`)) == null ? '' : __t) +
33'`),u=l+t.length,t}),h+=`';
34`;var m=eD.call(t,"variable")&&t.variable;if(m){if(en.test(m))throw new ew("Invalid `variable` option passed into `_.template`")}else h=`with (obj) {
35`+h+`
36}
37`;h=(a?h.replace(B,""):h).replace(R,"$1").replace(L,"$1;"),h="function("+(m||"obj")+`) {
38`+(m?"":`obj || (obj = {});
39`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?`, __j = Array.prototype.join;
40function print() { __p += __j.call(arguments, '') }
41`:`;
42`)+h+`return __p
43}`;var y=aU(function(){return ex(l,f+"return "+h).apply(r,c)});if(y.source=h,sz(y))throw y;return y},rf.times=function(e,t){if((e=s5(e))<1||e>0x1fffffffffffff)return[];var r=0xffffffff,n=t6(e,0xffffffff);t=iu(t),e-=0xffffffff;for(var i=tI(n,t);++r<e;)t(r);return i},rf.toFinite=s3,rf.toInteger=s5,rf.toLength=s8,rf.toLower=function(e){return s9(e).toLowerCase()},rf.toNumber=s7,rf.toSafeInteger=function(e){return e?rU(s5(e),-0x1fffffffffffff,0x1fffffffffffff):0===e?e:0},rf.toString=s9,rf.toUpper=function(e){return s9(e).toUpperCase()},rf.trim=function(e,t,n){if((e=s9(e))&&(n||t===r))return tP(e);if(!e||!(t=nx(t)))return e;var i=tK(e),s=tK(t),a=tN(i,s),o=tM(i,s)+1;return nD(i,a,o).join("")},rf.trimEnd=function(e,t,n){if((e=s9(e))&&(n||t===r))return e.slice(0,tV(e)+1);if(!e||!(t=nx(t)))return e;var i=tK(e),s=tM(i,tK(t))+1;return nD(i,0,s).join("")},rf.trimStart=function(e,t,n){if((e=s9(e))&&(n||t===r))return e.replace(Y,"");if(!e||!(t=nx(t)))return e;var i=tK(e),s=tN(i,tK(t));return nD(i,s).join("")},rf.truncate=function(e,t){var n=30,i="...";if(sK(t)){var s="separator"in t?t.separator:s;n="length"in t?s5(t.length):n,i="omission"in t?nx(t.omission):i}var a=(e=s9(e)).length;if(tj(e)){var o=tK(e);a=o.length}if(n>=a)return e;var l=n-t$(i);if(l<1)return i;var c=o?nD(o,0,l).join(""):e.slice(0,l);if(s===r)return c+i;if(o&&(l+=c.length-l),sJ(s)){if(e.slice(l).search(s)){var u,d=c;for(s.global||(s=eC(s.source,s9(ea.exec(s))+"g")),s.lastIndex=0;u=s.exec(d);)var h=u.index;c=c.slice(0,h===r?l:h)}}else if(e.indexOf(nx(s),l)!=l){var p=c.lastIndexOf(s);p>-1&&(c=c.slice(0,p))}return c+i},rf.unescape=function(e){return(e=s9(e))&&z.test(e)?e.replace(j,tG):e},rf.uniqueId=function(e){var t=++eU;return s9(e)+t},rf.upperCase=aP,rf.upperFirst=aO,rf.each=sc,rf.eachRight=su,rf.first=iG,aq(rf,(eb={},rV(rf,function(e,t){eD.call(rf.prototype,t)||(eb[t]=e)}),eb),{chain:!1}),rf.VERSION="4.17.21",tl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){rf[e].placeholder=rf}),tl(["drop","take"],function(e,t){rg.prototype[e]=function(n){n=n===r?1:t2(s5(n),0
43);var i=this.__filtered__&&!t?new rg(this):this.clone();return i.__filtered__?i.__takeCount__=t6(n,i.__takeCount__):i.__views__.push({size:t6(n,0xffffffff),type:e+(i.__dir__<0?"Right":"")}),i},rg.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tl(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;rg.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:iu(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),tl(["head","last"],function(e,t){var r="take"+(t?"Right":"");rg.prototype[e]=function(){return this[r](1).value()[0]}}),tl(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");rg.prototype[e]=function(){return this.__filtered__?new rg(this):this[r](1)}}),rg.prototype.compact=function(){return this.filter(aL)},rg.prototype.find=function(e){return this.filter(e).head()},rg.prototype.findLast=function(e){return this.reverse().find(e)},rg.prototype.invokeMap=nd(function(e,t){return"function"==typeof e?new rg(this):this.map(function(r){return r2(r,e,t)})}),rg.prototype.reject=function(e){return this.filter(sS(iu(e)))},rg.prototype.slice=function(e,t){e=s5(e);var n=this;return n.__filtered__&&(e>0||t<0)?new rg(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=s5(t))<0?n.dropRight(-t):n.take(t-e)),n)},rg.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},rg.prototype.toArray=function(){return this.take(0xffffffff)},rV(rg.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=rf[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);s&&(rf.prototype[t]=function(){var t=this.__wrapped__,o=i?[1]:arguments,l=t instanceof rg,c=o[0],u=l||sM(t),d=function(e){var t=s.apply(rf,tf([e],o));return i&&h?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=!!this.__actions__.length,f=a&&!h,m=l&&!p;if(!a&&u){t=m?t:new rg(this);var y=e.apply(t,o);return y.__actions__.push({func:si,args:[d],thisArg:r}),new rb(y,h)}return f&&m?e.apply(this,o):(y=this.thru(d),f?i?y.value()[0]:y.value():y)})}),tl(["pop","push","shift","sort","splice","unshift"],function(e){var t=eA[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);rf.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(sM(i)?i:[],e)}return this[r](function(r){return t.apply(sM(r)?r:[],e)})}}),rV(rg.prototype,function(e,t){var r=rf[t];if(r){var n=r.name+"";eD.call(rs,n)||(rs[n]=[]),rs[n].push({name:t,func:r})}}),rs[nY(r,2).name]=[{name:"wrapper",func:r}],rg.prototype.clone=function(){var e=new rg(this.__wrapped__);return e.__actions__=nF(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nF(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nF(this.__views__),e},rg.prototype.reverse=function(){if(this.__filtered__){var e=new rg(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},rg.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=sM(e),n=t<0,i=r?e.length:0,s=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var s=r[n],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t6(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=s.start,o=s.end,l=o-a,c=n?o:a-1,u=this.__iteratees__,d=u.length,h=0,p=t6(l,this.__takeCount__);if(!r||!n&&i==l&&p==l)return nS(e,this.__actions__);var f=[];e:for(;l--&&h<p;){c+=t;for(var m=-1,y=e[c];++m<d;){var b=u[m],g=b.iteratee,v=b.type,w=g(y);if(2==v)y=w;else if(!w){if(1==v)continue e;break e}}f[h++]=y}return f},rf.prototype.at=ss,rf.prototype.chain=function(){return sn(this)},rf.prototype.commit=function(){return new rb(this.value(),this.__chain__)},rf.prototype.next=function(){this.__values__===r&&(this.__values__=s6(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}},rf.prototype.plant=function(e){for(var t,n=this;n instanceof ry;){var i=iF(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},rf.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof rg){var t=e;return this.__actions__.length&&(t=new rg(this)),(t=t.reverse()).__actions__.push({func:si,args:[i1],thisArg:r}),new rb(t,this.__chain__)}return this.thru(i1)},rf.prototype.toJSON=rf.prototype.valueOf=rf.prototype.value=function(){return nS(this.__wrapped__,this.__actions__)},rf.prototype.first=rf.prototype.head,e5&&(rf.prototype[e5]=function(){return this}),rf}();e8?((e8.exports=tW)._=tW,e5._=tW):e3._=tW}).call(wb)}(wg,wg.exports);var wv=Object.defineProperty,ww=Object.defineProperties,wx=Object.getOwnPropertyDescriptors,wE=Object.getOwnPropertySymbols,w_=Object.prototype.hasOwnProperty,wC=Object.prototype.propertyIsEnumerable,wk=(e,t,r)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wS=(e,t)=>{for(var r in t||(t={}))w_.call(t,r)&&wk(e,r,t[r]);if(wE)for(var r of wE(t))wC.call(t,r)&&wk(e,r,t[r]);return e},wA=(e,t)=>ww(e,wx(t));function wT(e,t,r){var n;let i=function(e){let[t,r]=e.split(":");return{namespace:t,reference:r}}(e);return(null==(n=t.rpcMap)?void 0:n[i.reference])||`https://rpc.walletconnect.com/v1/?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function wI(e){return e.includes(":")?e.split(":")[1]:e}function wP(e){return e.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function wO(e={},t={}){let r=wD(e),n=wD(t);
43return wg.exports.merge(r,n)}function wD(e){var t,r,n,i;let s={};if(!m9(e))return s;for(let[a,o]of Object.entries(e)){let e=m2(a)?[a]:o.chains,l=o.methods||[],c=o.events||[],u=o.rpcMap||{},d=m6(a);s[d]=wA(wS(wS({},s[d]),o),{chains:mU(e,null==(t=s[d])?void 0:t.chains),methods:mU(l,null==(r=s[d])?void 0:r.methods),events:mU(c,null==(n=s[d])?void 0:n.events),rpcMap:wS(wS({},u),null==(i=s[d])?void 0:i.rpcMap)})}return s}function wU(e){return e.includes(":")?e.split(":")[2]:e}function wN(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):isNaN(Number(e=e.includes(":")?e.split(":")[1]:e))?e:Number(e)}let wM={},wB=e=>wM[e],wR=(e,t)=>{wM[e]=t};class wL{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=wI(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||wT(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}}class wj{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){let r=t||wT(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=parseInt(wI(t));e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(){let e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0",i=parseInt(n=n.startsWith("0x")?n:`0x${n}`,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`);else throw Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class wF{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=wI(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||wT(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}}class wz{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=wI(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||wT(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}}class wq{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{let r=this.getCardanoRPCUrl(t),n=wI(t);e[n]=this.createHttpProvider(n,r)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){let t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||this.getCardanoRPCUrl(e);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}}class wH{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=wI(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||wT(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}}class w${constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let n=wI(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||wT(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new bH(new wp(r,wB("disableProviderPing")))}}class wK{constructor(e){this.name="near",this.namespace=e.namespace,this.events=wB("events"),this.client=wB("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){let r=t||wT(`${this.name}:${e}`,this.namespace);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(wy.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e&&e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||wT(e,this.namespace);return typeof r>"u"?void 0:new bH(new wp(r,wB("disableProviderPing")))}}var wV=Object.defineProperty,wG=Object.defineProperties,wW=Object.getOwnPropertyDescriptors,wZ=Object.getOwnPropertySymbols,wJ=Object.prototype.hasOwnProperty,wY=Object.prototype.propertyIsEnumerable,wX=(e,t,r)=>t in e?wV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wQ=(e,t)=>{for(var r in t||(t={}))wJ.call(t,r)&&wX(e,r,t[r]);if(wZ)for(var r of wZ(t))wY.call(t,r)&&wX(e,r,t[r]);return e},w0=(e,t)=>wG(e,wW(t));class w1{constructor(e){this.events=new(pw()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger="u">typeof e?.logger&&"string"!=typeof e?.logger?e.logger:yZ()(y9({level:e?.logger||wf})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){let t=new w1(e);return await t.initialize(),t}async request(e,t,r){let[n,i]=this.validateChain(t);if(!this.session)throw Error("Please call connect() before request()");return await this.getProvider(n).request({request:wQ({}
43,e),chainId:`${n}:${i}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,n){let i=new Date().getTime();this.request(e,r,n).then(e=>t(null,bP(i,e))).catch(e=>t(e,void 0))}async enable(){if(!this.client)throw Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:m7("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw Error("Max auto pairing attempts reached");let{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then(e=>{this.session=e;let t=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=n.methods||[],i=n.events||[],s=n.accounts||[],a=m2(r)?[r]:n.chains?n.chains:wP(n.accounts);t[r]={chains:a,methods:e,events:i,accounts:s}}return t}(e.namespaces);this.namespaces=wO(this.namespaces,t),this.persist("namespaces",this.namespaces)}).catch(e=>{if(e.message!==vK)throw e;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;let[r,n]=this.validateChain(e);this.getProvider(r).setDefaultChain(n,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");let t=this.client.pairing.getAll();if(m4(t)){for(let r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){let e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await we.init({logger:this.providerOpts.logger||wf,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw Error("Sign Client not initialized");if(!this.session)throw Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map(e=>m6(e)))];wR("client",this.client),wR("events",this.events),wR("disableProviderPing",this.disableProviderPing),e.forEach(e=>{if(!this.session)return;let t=function(e,t){let r=Object.keys(t.namespaces).filter(t=>t.includes(e));if(!r.length)return[];let n=[];return r.forEach(e=>{let r=t.namespaces[e].accounts;n.push(...r)}),n}(e,this.session),r=wP(t),n=w0(wQ({},wO(this.namespaces,this.optionalNamespaces)[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new wj({namespace:n});break;case"solana":this.rpcProviders[e]=new wF({namespace:n});break;case"cosmos":this.rpcProviders[e]=new wz({namespace:n});break;case"polkadot":this.rpcProviders[e]=new wL({namespace:n});break;case"cip34":this.rpcProviders[e]=new wq({namespace:n});break;case"elrond":this.rpcProviders[e]=new wH({namespace:n});break;case"multiversx":this.rpcProviders[e]=new w$({namespace:n});break;case"near":this.rpcProviders[e]=new wK({namespace:n})}})}registerEventListeners(){if(typeof this.client>"u")throw Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{let{params:t}=e,{event:r}=t;
43if("accountsChanged"===r.name){let e=r.data;e&&m4(e)&&this.events.emit("accountsChanged",e.map(wU))}else if("chainChanged"===r.name){let e=t.chainId,r=t.event.data,n=m6(e),i=wN(e)!==wN(r)?`${n}:${wN(r)}`:e;this.onChainChanged(i)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var r;let{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=w0(wQ({},i),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",w0(wQ({},m7("USER_DISCONNECTED")),{data:e.topic}))}),this.on(wy.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])})}setNamespaces(e){let{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){let[t,r]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map(e=>m6(e)).includes(t))throw Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];let n=m6(Object.keys(this.namespaces)[0]),i=this.rpcProviders[n].getDefaultChain();return[n,i]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;let[r,n]=this.validateChain(e);n&&(t||this.getProvider(r).setDefaultChain(n),this.namespaces[r]?this.namespaces[r].defaultChain=n:this.namespaces[`${r}:${n}`]?this.namespaces[`${r}:${n}`].defaultChain=n:this.namespaces[`${r}:${n}`]={defaultChain:n},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",n))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${wm}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${wm}/${e}`)}}let w2=["eth_sendTransaction","personal_sign"],w6=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],w3=["chainChanged","accountsChanged"],w5=["chainChanged","accountsChanged","message","disconnect","connect"];var w8=Object.defineProperty,w7=Object.defineProperties,w4=Object.getOwnPropertyDescriptors,w9=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,xr=(e,t,r)=>t in e?w8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xn=(e,t)=>{for(var r in t||(t={}))xe.call(t,r)&&xr(e,r,t[r]);if(w9)for(var r of w9(t))xt.call(t,r)&&xr(e,r,t[r]);return e},xi=(e,t)=>w7(e,w4(t));function xs(e){return Number(e[0].split(":")[1])}function xa(e){return`0x${e.toString(16)}`}class xo{constructor(){this.events=new pv.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){let t=new xo;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,r){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),r)}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);let{required:t,optional:r}=function(e){let{chains:t,optionalChains:r,methods:n,optionalMethods:i,events:s,optionalEvents:a,rpcMap:o}=e;if(!m4(t))throw Error("Invalid chains");let l={chains:t,methods:n||w2,events:s||w3,rpcMap:xn({},t.length?{[xs(t)]:o[xs(t)]}:{})},c=s?.filter(e=>!w3.includes(e)),u=n?.filter(e=>!w2.includes(e));if(!r&&!a&&!i&&!(null!=c&&c.length)&&!(null!=u&&u.length))return{required:t.length?l:void 0};let d={chains:[...new Set(c?.length&&u?.length||!r?l.chains.concat(r||[]):r)],methods:[...new Set(l.methods.concat(null!=i&&i.length?i:w6))],events:[...new Set(l.events.concat(null!=a&&a.length?a:w5))],rpcMap:o};return{required:t.length?l:void 0,optional:r.length?d:void 0}}(this.rpc);try{let n=await new Promise(async(n,i)=>{var s;this.rpc.showQrModal&&(null==(s=this.modal)||s.subscribeModal(e=>{e.open||this.signer.session||(this.signer.abortPairingAttempt(),i(Error("Connection request reset. Please try again.")))})),await this.signer.connect(xi(xn({namespaces:xn({},t&&{[this.namespace]:t})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then(e=>{n(e)}).catch(e=>{i(Error(e.message))})});if(!n)return;let i=function(e,t=[]){let r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;let i=e[n];
43r.push(...i.accounts)}),r}(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:xa(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{let{params:t}=e,{event:r}=t;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{let t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",xa(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",xi(xn({},m7("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,r;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(r=this.modal)||r.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){let t=e.filter(e=>this.isCompatibleChainId(e)).map(e=>this.parseChainId(e));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",xa(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){let t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){let[t,r,n]=e.split(":");return{chainId:`${t}:${r}`,address:n}}setAccounts(e){this.accounts=e.filter(e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId).map(e=>this.parseAccountId(e).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,r;let n=null!=(t=e?.chains)?t:[],i=null!=(r=e?.optionalChains)?r:[],s=n.concat(i);if(!s.length)throw Error("No chains specified in either `chains` or `optionalChains`");let a=n.length?e?.methods||w2:[],o=n.length?e?.events||w3:[],l=e?.optionalMethods||[],c=e?.optionalEvents||[],u=e?.rpcMap||this.buildRpcMap(s,e.projectId),d=e?.qrModalOptions||void 0;return{chains:n?.map(e=>this.formatChainId(e)),optionalChains:i.map(e=>this.formatChainId(e)),methods:a,events:o,optionalMethods:l,optionalEvents:c,rpcMap:u,showQrModal:!!(null!=e&&e.showQrModal),qrModalOptions:d,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){let r={};return e.forEach(e=>{r[e]=this.getRpcUrl(e,t)}),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?xs(this.rpc.chains):xs(this.rpc.optionalChains),this.signer=await w1.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{let{WalletConnectModal:t}=await r.e(9099).then(r.bind(r,89099));e=t}catch{throw Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(xn({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;let{chains:t,optionalChains:r,rpcMap:n}=e;t&&m4(t)&&(this.rpc.chains=t.map(e=>this.formatChainId(e)),t.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})),r&&m4(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map(e=>this.formatChainId(e)),r.forEach(e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))}getRpcUrl(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;let e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map(e=>this.parseAccount(e))}}var xl=r(29761);let xc=e=>"dynamic-wc2-active-account-".concat(e),xu=e=>"dynamic-wc2-session-topic-".concat(e),xd=e=>"dynamic-wc2-current-chain-".concat(e),xh=new xl.A;class xp extends du{supportsNetworkSwitching(){return!0}getAddress(e){return pf(this,void 0,void 0,function*(){var t,r;let n=this.getActiveAccount();if(null==n?void 0:n.address)return n.address;if(!xp.provider||!(null===(t=xp.provider)||void 0===t?void 0:t.signer.uri)){if(P.vF.debug("No WC2 provider found, re-initializing..."),yield this.endSession(),yield this.init(),yield(0,I.yy)(1e3),xp.provider&&(null===(r=xp.provider)||void 0===r?void 0:r.signer.uri))P.vF.debug("provider was successfully initialized, continuing");else throw P.vF.debug("No WC2 provider was found after init attempt, aborting"),new I.ii("No provider found")}return(0,P.At)(xp.provider.signer.uri,this.metadata.deepLinks,{onDesktopUri:null==e?void 0:e.onDesktopUri,onDisplayUri:null==e?void 0:e.onDisplayUri},this.deepLinkPreference),new Promise((e,t)=>
43{if(!xp.provider){t(new I.ii("No provider found"));return}let r=()=>{P.vF.debug("onConnection faile re-initializing provider");let e=new I.ii("Connection rejected. Please try again.");e.code="connection_rejected",xp.provider&&(xp.provider.signer.uri=void 0,this.init(),P.vF.debug("provider was re-initialized in onConnection fail, continuing")),t(e),i()},n=()=>{var r;P.vF.debug("onConnection success, setting session");let n=null===(r=xp.provider)||void 0===r?void 0:r.session;if(!n){P.vF.debug("onConnection success, but no session found rejecting"),t(new I.ii("No session found"));return}this.setSession(n),this.setWCActiveAccount(n.namespaces.eip155.accounts[0].split(":")[2]),this.getNetwork().then(t=>{var r,n;P.vF.debug("onConnection success, resolving, chainId:",t),this.currentChainId=t,P.vF.debug("onConnection success, resolving, activeAccountAddress:",null===(r=this.getActiveAccount())||void 0===r?void 0:r.address),e(null===(n=this.getActiveAccount())||void 0===n?void 0:n.address)}),i()},i=()=>{var e;xh.off("walletconnect_connection_failed",r),null===(e=xp.provider)||void 0===e||e.off("connect",n)};xh.on("walletconnect_connection_failed",r),xp.provider.on("connect",n)})})}init(){return pf(this,void 0,void 0,function*(){P.vF.debug("init was called",this.name),yield this.initProvider(),yield this.initConnection(),this.isInitialized=!0})}initProvider(){return pf(this,void 0,void 0,function*(){P.vF.debug("initProvider was called",this.name);let{provider:e}=xp;e||(P.vF.debug("provider is undefined",this.name),void 0===this.initializePromise&&(this.initializePromise=this.createInitProviderPromise()),yield this.initializePromise)})}createInitProviderPromise(){return pf(this,void 0,void 0,function*(){xp.provider=yield this.createProvider(),this.teardownEventListeners(),this.setupEventListeners()})}initConnection(){return pf(this,void 0,void 0,function*(){P.vF.debug("initConnection was called",this.name);let{provider:e}=xp;if(!e)throw new I.ii("No provider found (init connection)");null!=e&&e.signer.uri||e.connect().catch(e=>{P.vF.error(e),xh.emit("walletconnect_connection_failed",e)})})}createProvider(){return pf(this,void 0,void 0,function*(){return P.vF.debug("createProvider was called",this.name),xo.init({events:["chainChanged","accountsChanged"],methods:[],optionalChains:this.getMappedChainsByPreferredOrder(),optionalMethods:["eth_chainId","eth_signTypedData","eth_signTransaction","eth_sign","personal_sign","eth_sendTransaction","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],projectId:this.projectId,rpcMap:this.evmNetworkRpcMap(),showQrModal:!1})})}refreshSession(){return pf(this,void 0,void 0,function*(){var e,t,r,n,i;P.vF.debug("refreshSession was called",this.name),(null===(t=null===(e=xp.provider)||void 0===e?void 0:e.session)||void 0===t?void 0:t.topic)&&localStorage.getItem(this.sessionTopicKey)===(null===(n=null===(r=xp.provider)||void 0===r?void 0:r.session)||void 0===n?void 0:n.topic)&&(this.session=xp.provider.session,this.setActiveAccount(null!==(i=localStorage.getItem(this.activeAccountKey))&&void 0!==i?i:void 0));let s=this.getWalletClient(),a=yield s.getChainId();P.vF.debug("checking selected chain in refreshSession",this.name,a,this.currentChainId),this.currentChainId&&this.currentChainId!==a&&(P.vF.debug("switching to selected chain",this.currentChainId),yield s.switchChain({id:this.currentChainId}))})}getMappedChainsByPreferredOrder(){let e=this.evmNetworks.map(e=>"eip155:".concat(e.chainId));return[...this.preferredChains.filter(t=>e.includes(t)),...e.filter(e=>!this.preferredChains.includes(e))].map(e=>Number(e.split(":")[1]))}getWalletClient(e){P.vF.debug("getWalletClient was called",this.name);let t=xp.provider||this.createProvider();return dn({account:this.getActiveAccount(),chain:cc[null!=e?e:String(this.currentChainId)],transport:(0,di.I)({request:e=>pf(this,void 0,void 0,function*(){return(yield t).request(e)})})})}get currentChainId(){return this._currentChainId}set currentChainId(e){this._currentChainId=e,e?localStorage.setItem(this.currentChainKey,e.toString()):localStorage.removeItem(this.currentChainKey)}get sessionTopicKey(){return xu(this.key)}get activeAccountKey(){return xc(this.key)}get currentChainKey(){return xd(this.key)}setupEventListeners(){xp.provider&&(this.sessionEventHandler=e=>{let{params:t}=e;if(P.vF.debug("session_event was called",{params:t}),!t||!t.event){P.vF.debug("session_event was called without params or params.event");return}let{name:r,data:n}=t.event;if("chainChanged"===r){let e=(0,I.yO)(n);if(e===this.currentChainId){P.vF.debug("ignoring chainChanged event with same chain id as current chain id: ".concat(e));return}if(void 0===e){P.vF.debug("received unexpected data for chainChanged: ".concat(n," with type ").concat(typeof n,"}"));return}
43this.currentChainId=e,this.emit("chainChange",{chain:String(e)}),this.switchNetwork({networkChainId:e})}else if("accountsChanged"===r){if(!Array.isArray(n)){P.vF.debug("received unexpected data for accountsChanged: ".concat(n," with type ").concat(typeof n,"}"));return}let e=n[0].split(":")[2];this.setWCActiveAccount(e)}},xp.provider.on("session_event",this.sessionEventHandler),this.sessionDeleteHandler=()=>pf(this,void 0,void 0,function*(){this.endSession(),this.emit("disconnect")}),xp.provider.on("session_delete",this.sessionDeleteHandler))}teardownEventListeners(){xp.provider&&(xp.provider.off("session_event",this.sessionEventHandler),xp.provider.off("session_delete",this.sessionDeleteHandler))}waitForSignMessage(e,t){return pf(this,void 0,void 0,function*(){let r=new Promise((r,n)=>{this.on("chainChange",()=>r({success:!1})),e(t).then(e=>r({signedMessage:e,success:!0})).catch(n)}),n=yield r;return!1===n.success?e(t):n.signedMessage})}getDeepLink(){var e;if(!this.session)return;let t=(0,P.jT)({deepLinks:this.metadata.deepLinks,mode:"regular",preference:this.deepLinkPreference,uri:null===(e=xp.provider)||void 0===e?void 0:e.signer.uri});if(t)return"".concat(t,"?sessionTopic=").concat(this.session.topic)}signMessage(e){return pf(this,void 0,void 0,function*(){if(!this.session)throw new I.ii("no session");let t=this.getDeepLink();return(0,I.Fr)()&&t&&(window.location.href=t),yield this.waitForSignMessage(e=>pf(this,void 0,void 0,function*(){let t=this.getActiveAccount();if(t)return(yield this.getWalletClient()).signMessage({account:t,message:e})}),e)})}clearActiveAccount(){localStorage.removeItem(this.activeAccountKey),this.setActiveAccount(void 0)}clearSession(){localStorage.removeItem(this.sessionTopicKey),this.session=void 0}setWCActiveAccount(e){localStorage.setItem(this.activeAccountKey,e),this.setActiveAccount(e),this.emit("accountChange",{accounts:[e]})}setSession(e){localStorage.setItem(this.sessionTopicKey,e.topic),this.session=e}endSession(){return pf(this,void 0,void 0,function*(){var e;if(this.clearActiveAccount(),this.clearSession(),this.currentChainId=void 0,null===(e=xp.provider)||void 0===e?void 0:e.session)try{yield xp.provider.disconnect(),xp.provider=void 0}catch(e){P.vF.debug(e)}})}getNetwork(){let e=Object.create(null,{getNetwork:{get:()=>super.getNetwork}});return pf(this,void 0,void 0,function*(){return this.currentChainId?this.currentChainId:(yield this.initProvider(),e.getNetwork.call(this))})}providerSwitchNetwork(e){let t=Object.create(null,{providerSwitchNetwork:{get:()=>super.providerSwitchNetwork}});return pf(this,arguments,void 0,function*(e){let{network:r}=e,n=yield this.getSupportedNetworks();if(!(null==n?void 0:n.includes(r.chainId.toString()))){let e=new I.ii("Network switching is not available at this time. The user should manually switch network in their wallet");throw e.code="network_switching_only_available_in_wallet",e}let i=yield this.getNetwork();if(i&&i===r.chainId)return;if(this.switchNetworkOnlyFromWallet)throw new I.ii("Network switching is only supported through the wallet");let s=yield this.getWalletClient();yield t.providerSwitchNetwork.call(this,{network:r,provider:s}),this.currentChainId=r.chainId,this.emit("chainChange",{chain:String(r.chainId)})})}getConnectedAccounts(){return pf(this,void 0,void 0,function*(){!1===this.isInitialized&&(yield this.initProvider(),yield this.refreshSession(),this.isInitialized=!0);let e=this.getActiveAccount();return(null==e?void 0:e.address)?[e.address]:[]})}getSupportedNetworks(){return pf(this,void 0,void 0,function*(){var e;if(yield this.initProvider(),yield this.refreshSession(),!this.session)return[];let t=[];return Object.keys(this.session.namespaces).forEach(e=>{e.startsWith("eip155:")&&t.push(e.split(":")[1])}),null===(e=this.session.namespaces.eip155)||void 0===e||e.accounts.forEach(e=>t.push(e.split(":")[1])),t.length?t:this.evmNetworks.map(e=>e.chainId.toString())})}constructor(e){super(e),this.isInitialized=!1,this.canConnectViaQrCode=!0,this.isWalletConnect=!0,this.preferredChains=[],this.sessionEventHandler=()=>{},this.sessionDeleteHandler=()=>{},this.name=e.walletName,this.projectId=e.projectId,this.deepLinkPreference=e.deepLinkPreference||"native",this.preferredChains=e.walletConnectPreferredChains||[];let t=localStorage.getItem(this.currentChainKey);this.currentChainId=t?(0,I.yO)(t):void 0}}class xf extends du{get ethProviderHelper(){return this._ethProviderHelper||(this._ethProviderHelper=new pg(this)),this._ethProviderHelper}getMobileOrInstalledWallet(){var e;return this.isInstalledOnBrowser()||(null===(e=this.metadata)||void 0===e?void 0:e.inAppBrowserUrl)&&"in-app-browser"===this.mobileExperience&&(0,I.Fr)()||!this.walletConnectorFallback?this:new xp(Object.assign(Object.assign({},this.constructorProps),{walletName:this.name}))}findProvider(){var e;return null===(e=this.ethProviderHelper)||void 0===e?void 0:e.getInstalledProvider()}setupEventListeners(){if(!this.getWalletClient()||!this.ethProviderHelper)return;let{tearDownEventListeners:e}=this.ethProviderHelper._setupEventListeners(this);this.teardownEventListeners=e}getWalletClient(e){var t;return null===(t=this.ethProviderHelper)||void 0===t?void 0:t.findWalletClient(e)}isInstalledOnBrowser(){var e;return(null===(e=this.ethProviderHelper)||void 0===e?void 0:e.findProvider())!==void 0}getAddress(){return pf(this,void 0,void 0,function*(){var e;return null===(e=this.ethProviderHelper)||void 0===e?void 0:e.getAddress()})}connect(){return pf(this,void 0,void 0,function*(){yield this.getAddress()})}signMessage(e){return pf(this,void 0,void 0,function*(){var t;return null===(t=this.ethProviderHelper)||void 0===t?void 0:t.signMessage(e)})}proveOwnership(e,t){return pf(this,void 0,void 0,function*(){return yield this.validateActiveWallet(e),this.signMessage(t)})}endSession(){return pf(this,void 0,void 0,function*(){})}providerSwitchNetwork(e){let t=Object.create(null,{providerSwitchNetwork:{get:()=>super.providerSwitchNetwork}});return pf(this,arguments,void 0,function*(e){let{network:r,provider:n}=e;
43return t.providerSwitchNetwork.call(this,{network:r,provider:n})})}constructor(){super(...arguments),this.walletConnectorFallback=!1}}class xm extends xf{getAddress(){let e=Object.create(null,{getAddress:{get:()=>super.getAddress}});return pf(this,void 0,void 0,function*(){if(this.isInstalledOnBrowser())return e.getAddress.call(this);(0,I.Fr)()&&(0,I.Yh)({nativeLink:"phantom://browse",universalLink:"https://phantom.app/ul/browse"})})}canGetChainAddress(){var e,t;return!!(null===(t=null===(e=this.ethProviderHelper)||void 0===e?void 0:e.findProvider())||void 0===t?void 0:t.selectedAddress)}constructor(){super(...arguments),this.name="Phantom",this.overrideKey="phantomevm"}}class xy extends xf{constructor(){super(...arguments),this.name="ExodusEvm",this.overrideKey="exodusevm",this.walletConnectorFallback=!0}}class xb extends xf{isInstalledOnBrowser(){return!1}constructor(){super(...arguments),this.name="Fallback Connector",this.overrideKey="fallbackconnector",this.isAvailable=!1}}let xg=e=>{let{info:t,provider:r}=e,n=(0,I.rh)(t.name);return class extends xf{findProvider(){return r}constructor(e){super(Object.assign(Object.assign({},e),{metadata:{groupKey:n,icon:t.icon,id:t.uuid,name:t.name,rdns:t.rdns}})),this.name=t.name,this.overrideKey="".concat(n,"evm")}}},xv=new O.V("@dynamic-labs/ethereum"),xw=(e,t)=>{let{shortName:r}=t,n=r||t.name,i=!!t.walletConnect;return class extends xf{getAddress(){let e=Object.create(null,{getAddress:{get:()=>super.getAddress}});return pf(this,void 0,void 0,function*(){var t;if(this.isInstalledOnBrowser())return e.getAddress.call(this);let r=null===(t=this.metadata)||void 0===t?void 0:t.inAppBrowserUrl;if(!r){let e=Error("No inAppBrowserBase found for ".concat(this.name,"."));throw xv.error(e.message),e}window.location.href="".concat(r,"/").concat(window.location.href)})}constructor(){super(...arguments),this.name=n,this.walletConnectorFallback=i,this.overrideKey=e}}},xx=[xm,xy],xE=["phantomevm","coinbase","exodusevm","abstract","metamask","edenonline","intersend"],x_=(e,t)=>{var r;let{rdns:n,name:i}=e,s="".concat((0,I.rh)(i)).concat("evm");P.vF.logVerboseTroubleshootingMessage("[ETH shouldAddEip6963Connector]",n,i,"evm",s);let a=Object.entries(null!==(r=null==t?void 0:t.wallets)&&void 0!==r?r:{}).find(e=>{var t,r;let[a,o]=e;return(null===(t=o.eip6963Config)||void 0===t?void 0:t.rdns)===n||a===s||xE.includes(s)||o.name===i&&(null===(r=o.injectedConfig)||void 0===r?void 0:r[0].chain)==="evm"});return P.vF.logVerboseTroubleshootingMessage("[ETH shouldAddEip6963Connector]",a),!a},xC=e=>{null==i||i(),i=(0,I.AZ)(t=>{x_(t.detail.info,e)&&(P.vF.logVerboseTroubleshootingMessage("[ETH fetchInjectedWalletConnectors] listenToEip6963Events",t.detail),P.Qg.emit("providerInjected",{injectedConnectorConstructor:xg(t.detail)}))})},xk=e=>{var t;let{walletBook:r}=e;xC(r);let n=Object.entries(null!==(t=null==r?void 0:r.wallets)&&void 0!==t?t:{}).filter(e=>{var t;let[r,n]=e;return(null===(t=n.injectedConfig)||void 0===t?void 0:t.find(e=>"evm"===e.chain))&&!xE.includes(r)}).map(e=>{let[t,r]=e;return xw(t,r)}),{providers:i}=I.Nj.get(),s=i.filter(e=>x_(e.info,r)).map(e=>xg(e));return P.vF.logVerboseTroubleshootingMessage("[ETH fetchInjectedWalletConnectors] eip6963Connectors",s),[...n,...s]};function xS(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}function xA(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}"function"==typeof SuppressedError&&SuppressedError;var xT=r(92601),xI=r(2818);let xP="undefined"!=typeof window&&void 0!==window.document&&"undefined"!=typeof crypto&&void 0!==crypto.subtle,xO=void 0!==xI&&null!=xI.versions&&null!=xI.versions.node,xD=async e=>xP?(await r.e(1728).then(r.bind(r,71728)).then(e=>e.signWithApiKey))(e):xO?(await r.e(7366).then(r.bind(r,87366)).then(e=>e.signWithApiKey))(e):(await r.e(8553).then(r.bind(r,58553)).then(e=>e.signWithApiKey))(e);class xU{constructor(e){this.apiPublicKey=e.apiPublicKey,this.apiPrivateKey=e.apiPrivateKey}async stamp(e){let t=await xD({publicKey:this.apiPublicKey,privateKey:this.apiPrivateKey,content:e}),r={publicKey:this.apiPublicKey,scheme:"SIGNATURE_SCHEME_TK_API_P256",signature:t};
43return{stampHeaderName:"X-Stamp",stampHeaderValue:(0,xT.up)(JSON.stringify(r))}}}let xN=r(11942).fetch,xM="copy",xB="convert";function xR(e,t){return{required:!0,schema:e,derive:t}}function xL(e){return{required:!0,schema:e}}function xj(e){return{required:!1,schema:e}}let xF={appid:xj(xM),appidExclude:xj(xM),credProps:xj(xM)};xL(xM),xL(xM),xL(xB),xj(xM),xL({clientDataJSON:xL(xB),attestationObject:xL(xB),transports:xR(xM,e=>e.getTransports?.()||[])}),xR(xF,e=>e.getClientExtensionResults()),xL(xM),xL(xM),xL(xB),xj(xM),xL({clientDataJSON:xL(xB),authenticatorData:xL(xB),signature:xL(xB),userHandle:xL(xB)}),xR(xF,e=>e.getClientExtensionResults());var xz=r(75927).hp;class xq extends Error{constructor(e){let t=`Turnkey error ${e.code}: ${e.message}`;null!=e.details&&(t+=` (Details: ${JSON.stringify(e.details)})`),super(t),this.name="TurnkeyRequestError",this.details=e.details??null,this.code=e.code}}class xH{constructor(e,t){if(this.getActivity=async e=>this.request("/public/v1/query/get_activity",e),this.stampGetActivity=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_activity",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getApiKey=async e=>this.request("/public/v1/query/get_api_key",e),this.stampGetApiKey=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_api_key",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getApiKeys=async e=>this.request("/public/v1/query/get_api_keys",e),this.stampGetApiKeys=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_api_keys",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getAttestationDocument=async e=>this.request("/public/v1/query/get_attestation",e),this.stampGetAttestationDocument=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_attestation",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getAuthenticator=async e=>this.request("/public/v1/query/get_authenticator",e),this.stampGetAuthenticator=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_authenticator",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getAuthenticators=async e=>this.request("/public/v1/query/get_authenticators",e),this.stampGetAuthenticators=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_authenticators",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getOauthProviders=async e=>this.request("/public/v1/query/get_oauth_providers",e),this.stampGetOauthProviders=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_oauth_providers",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getOrganization=async e=>this.request("/public/v1/query/get_organization",e),this.stampGetOrganization=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_organization",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getOrganizationConfigs=async e=>this.request("/public/v1/query/get_organization_configs",e),this.stampGetOrganizationConfigs=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_organization_configs",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getPolicy=async e=>this.request("/public/v1/query/get_policy",e),this.stampGetPolicy=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_policy",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getPrivateKey=async e=>this.request("/public/v1/query/get_private_key",e),this.stampGetPrivateKey=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_private_key",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getUser=async e=>this.request("/public/v1/query/get_user",e),this.stampGetUser=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_user",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getWallet=async e=>this.request("/public/v1/query/get_wallet",e),this.stampGetWallet=async e=>{let t=this.config.baseUrl+"/public/v1/query/get_wallet",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getActivities=async e=>this.request("/public/v1/query/list_activities",e),this.stampGetActivities=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_activities",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getPolicies=async e=>this.request("/public/v1/query/list_policies",e),this.stampGetPolicies=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_policies",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.listPrivateKeyTags=async e=>this.request("/public/v1/query/list_private_key_tags",e),this.stampListPrivateKeyTags=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_private_key_tags",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getPrivateKeys=async e=>this.request("/public/v1/query/list_private_keys",e),this.stampGetPrivateKeys=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_private_keys",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}}
43,this.getSubOrgIds=async e=>this.request("/public/v1/query/list_suborgs",e),this.stampGetSubOrgIds=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_suborgs",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.listUserTags=async e=>this.request("/public/v1/query/list_user_tags",e),this.stampListUserTags=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_user_tags",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getUsers=async e=>this.request("/public/v1/query/list_users",e),this.stampGetUsers=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_users",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getWalletAccounts=async e=>this.request("/public/v1/query/list_wallet_accounts",e),this.stampGetWalletAccounts=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_wallet_accounts",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getWallets=async e=>this.request("/public/v1/query/list_wallets",e),this.stampGetWallets=async e=>{let t=this.config.baseUrl+"/public/v1/query/list_wallets",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.getWhoami=async e=>this.request("/public/v1/query/whoami",e),this.stampGetWhoami=async e=>{let t=this.config.baseUrl+"/public/v1/query/whoami",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.approveActivity=async e=>this.request("/public/v1/submit/approve_activity",e),this.stampApproveActivity=async e=>{let t=this.config.baseUrl+"/public/v1/submit/approve_activity",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createApiKeys=async e=>this.request("/public/v1/submit/create_api_keys",e),this.stampCreateApiKeys=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_api_keys",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createApiOnlyUsers=async e=>this.request("/public/v1/submit/create_api_only_users",e),this.stampCreateApiOnlyUsers=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_api_only_users",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createAuthenticators=async e=>this.request("/public/v1/submit/create_authenticators",e),this.stampCreateAuthenticators=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_authenticators",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createInvitations=async e=>this.request("/public/v1/submit/create_invitations",e),this.stampCreateInvitations=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_invitations",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createOauthProviders=async e=>this.request("/public/v1/submit/create_oauth_providers",e),this.stampCreateOauthProviders=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_oauth_providers",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createPolicies=async e=>this.request("/public/v1/submit/create_policies",e),this.stampCreatePolicies=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_policies",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createPolicy=async e=>this.request("/public/v1/submit/create_policy",e),this.stampCreatePolicy=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_policy",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createPrivateKeyTag=async e=>this.request("/public/v1/submit/create_private_key_tag",e),this.stampCreatePrivateKeyTag=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_private_key_tag",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createPrivateKeys=async e=>this.request("/public/v1/submit/create_private_keys",e),this.stampCreatePrivateKeys=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_private_keys",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createReadOnlySession=async e=>this.request("/public/v1/submit/create_read_only_session",e),this.stampCreateReadOnlySession=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_read_only_session",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createReadWriteSession=async e=>this.request("/public/v1/submit/create_read_write_session",e),this.stampCreateReadWriteSession=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_read_write_session",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createSubOrganization=async e=>this.request("/public/v1/submit/create_sub_organization",e),this.stampCreateSubOrganization=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_sub_organization",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createUserTag=async e=>this.request("/public/v1/submit/create_user_tag",e),this.stampCreateUserTag=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_user_tag",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createUsers=async e=>this.request("/public/v1/submit/create_users",e),this.stampCreateUsers=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_users",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}}
43,this.createWallet=async e=>this.request("/public/v1/submit/create_wallet",e),this.stampCreateWallet=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_wallet",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.createWalletAccounts=async e=>this.request("/public/v1/submit/create_wallet_accounts",e),this.stampCreateWalletAccounts=async e=>{let t=this.config.baseUrl+"/public/v1/submit/create_wallet_accounts",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteApiKeys=async e=>this.request("/public/v1/submit/delete_api_keys",e),this.stampDeleteApiKeys=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_api_keys",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteAuthenticators=async e=>this.request("/public/v1/submit/delete_authenticators",e),this.stampDeleteAuthenticators=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_authenticators",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteInvitation=async e=>this.request("/public/v1/submit/delete_invitation",e),this.stampDeleteInvitation=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_invitation",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteOauthProviders=async e=>this.request("/public/v1/submit/delete_oauth_providers",e),this.stampDeleteOauthProviders=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_oauth_providers",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deletePolicy=async e=>this.request("/public/v1/submit/delete_policy",e),this.stampDeletePolicy=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_policy",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deletePrivateKeyTags=async e=>this.request("/public/v1/submit/delete_private_key_tags",e),this.stampDeletePrivateKeyTags=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_private_key_tags",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deletePrivateKeys=async e=>this.request("/public/v1/submit/delete_private_keys",e),this.stampDeletePrivateKeys=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_private_keys",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteSubOrganization=async e=>this.request("/public/v1/submit/delete_sub_organization",e),this.stampDeleteSubOrganization=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_sub_organization",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteUserTags=async e=>this.request("/public/v1/submit/delete_user_tags",e),this.stampDeleteUserTags=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_user_tags",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteUsers=async e=>this.request("/public/v1/submit/delete_users",e),this.stampDeleteUsers=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_users",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.deleteWallets=async e=>this.request("/public/v1/submit/delete_wallets",e),this.stampDeleteWallets=async e=>{let t=this.config.baseUrl+"/public/v1/submit/delete_wallets",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.emailAuth=async e=>this.request("/public/v1/submit/email_auth",e),this.stampEmailAuth=async e=>{let t=this.config.baseUrl+"/public/v1/submit/email_auth",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.exportPrivateKey=async e=>this.request("/public/v1/submit/export_private_key",e),this.stampExportPrivateKey=async e=>{let t=this.config.baseUrl+"/public/v1/submit/export_private_key",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.exportWallet=async e=>this.request("/public/v1/submit/export_wallet",e),this.stampExportWallet=async e=>{let t=this.config.baseUrl+"/public/v1/submit/export_wallet",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.exportWalletAccount=async e=>this.request("/public/v1/submit/export_wallet_account",e),this.stampExportWalletAccount=async e=>{let t=this.config.baseUrl+"/public/v1/submit/export_wallet_account",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.importPrivateKey=async e=>this.request("/public/v1/submit/import_private_key",e),this.stampImportPrivateKey=async e=>{let t=this.config.baseUrl+"/public/v1/submit/import_private_key",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.importWallet=async e=>this.request("/public/v1/submit/import_wallet",e),this.stampImportWallet=async e=>{let t=this.config.baseUrl+"/public/v1/submit/import_wallet",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.initImportPrivateKey=async e=>this.request("/public/v1/submit/init_import_private_key",e),this.stampInitImportPrivateKey=async e=>{let t=this.config.baseUrl+"/public/v1/submit/init_import_private_key",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.initImportWallet=async e=>this.request("/public/v1/submit/init_import_wallet",e),this.stampInitImportWallet=async e=>{let t=this.config.baseUrl+"/public/v1/submit/init_import_wallet",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.initOtpAuth=async e=>this.request("/public/v1/submit/init_otp_auth",e),this.stampInitOtpAuth=async e=>{let t=this.config.baseUrl+"/public/v1/submit/init_otp_auth",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.initUserEmailRecovery=async e=>this.request("/public/v1/submit/init_user_email_recovery",e),this.stampInitUserEmailRecovery=async e=>{let t=this.config.baseUrl+"/public/v1/submit/init_user_email_recovery",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.oauth=async e=>this.request("/public/v1/submit/oauth",e),this.stampOauth=async e=>{let t=this.config.baseUrl+"/public/v1/submit/oauth",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.otpAuth=async e=>this.request("/public/v1/submit/otp_auth",e),this.stampOtpAuth=async e=>{let t=this.config.baseUrl+"/public/v1/submit/otp_auth",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.recoverUser=async e=>this.request("/public/v1/submit/recover_user",e),this.stampRecoverUser=async e=>{let t=this.config.baseUrl+"/public/v1/submit/recover_user",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.rejectActivity=async e=>this.request("/public/v1/submit/reject_activity",e),this.stampRejectActivity=async e=>{let t=this.config.baseUrl+"/public/v1/submit/reject_activity",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.removeOrganizationFeature=async e=>this.request("/public/v1/submit/remove_organization_feature",e),this.stampRemoveOrganizationFeature=async e=>{let t=this.config.baseUrl+"/public/v1/submit/remove_organization_feature",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.setOrganizationFeature=async e=>this.request("/public/v1/submit/set_organization_feature",e),this.stampSetOrganizationFeature=async e=>{let t=this.config.baseUrl+"/public/v1/submit/set_organization_feature",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.signRawPayload=async e=>this.request("/public/v1/submit/sign_raw_payload",e),this.stampSignRawPayload=async e=>{let t=this.config.baseUrl+"/public/v1/submit/sign_raw_payload",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.signRawPayloads=async e=>this.request("/public/v1/submit/sign_raw_payloads",e),this.stampSignRawPayloads=async e=>{let t=this.config.baseUrl+"/public/v1/submit/sign_raw_payloads",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.signTransaction=async e=>this.request("/public/v1/submit/sign_transaction",e),this.stampSignTransaction=async e=>{let t=this.config.baseUrl+"/public/v1/submit/sign_transaction",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.updatePolicy=async e=>this.request("/public/v1/submit/update_policy",e),this.stampUpdatePolicy=async e=>{let t=this.config.baseUrl+"/public/v1/submit/update_policy",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.updatePrivateKeyTag=async e=>this.request("/public/v1/submit/update_private_key_tag",e),this.stampUpdatePrivateKeyTag=async e=>{let t=this.config.baseUrl+"/public/v1/submit/update_private_key_tag",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.updateRootQuorum=async e=>this.request("/public/v1/submit/update_root_quorum",e),this.stampUpdateRootQuorum=async e=>{let t=this.config.baseUrl+"/public/v1/submit/update_root_quorum",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.updateUser=async e=>this.request("/public/v1/submit/update_user",e),this.stampUpdateUser=async e=>{let t=this.config.baseUrl+"/public/v1/submit/update_user",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},this.updateUserTag=async e=>this.request("/public/v1/submit/update_user_tag",e),this.stampUpdateUserTag=async e=>{let t=this.config.baseUrl+"/public/v1/submit/update_user_tag",r=JSON.stringify(e),n=await this.stamper.stamp(r);return{body:r,stamp:n,url:t}},!e.baseUrl)throw Error("Missing base URL. Please verify env vars.");this.config=e,this.stamper=t}async request(e,t){let r=this.config.baseUrl+e,n=JSON.stringify(t),i=await this.stamper.stamp(n),s=await xN(r,{method:"POST",headers:{[i.stampHeaderName]:i.stampHeaderValue,"X-Client-Version":"@turnkey/[email protected]"},body:n,redirect:"follow"});if(!s.ok){let e;try{e=await s.json()}catch(e){throw Error(`${s.status} ${s.statusText}`)}throw new xq(e)}return await s.json()}}
43class x$ extends Error{constructor(e){let{message:t,cause:r,activityId:n,activityStatus:i,activityType:s}=e;super(t),this.name="TurnkeyActivityError",this.activityId=n??void 0,this.activityStatus=i??void 0,this.activityType=s??void 0,this.cause=r??void 0}}class xK extends Error{constructor(e){let{message:t,cause:r,activityId:n,activityStatus:i,activityType:s}=e;super(t),this.name="TurnkeyActivityConsensusNeededError",this.activityId=n??void 0,this.activityStatus=i??void 0,this.activityType=s??void 0,this.cause=r??void 0}}function xV(e){let{id:t,status:r}=e;if("ACTIVITY_STATUS_CONSENSUS_NEEDED"===r)throw new xK({message:"Activity requires consensus",activityId:t,activityStatus:r});if("ACTIVITY_STATUS_COMPLETED"!==r)throw new x$({message:`Expected COMPLETED status, got ${r}`,activityId:t,activityStatus:r});return!0}function xG(e){if(null==e)throw Error(`Got unexpected ${JSON.stringify(e)}`);return e}var xW=r(75927).hp;let xZ=e=>xW.from(e).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),xJ=()=>{let e=new Uint8Array(32);return crypto.getRandomValues(e),e.buffer};var xY=r(47624);let xX={AUTHENTICATOR_TRANSPORT_BLE:xY.Vm7.Ble,AUTHENTICATOR_TRANSPORT_HYBRID:xY.Vm7.Hybrid,AUTHENTICATOR_TRANSPORT_INTERNAL:xY.Vm7.Internal,AUTHENTICATOR_TRANSPORT_NFC:xY.Vm7.Nfc,AUTHENTICATOR_TRANSPORT_USB:xY.Vm7.Usb},xQ=e=>e.map(e=>xX[e]),x0="https://api.turnkey.com",x1=["Turnkey error 16: expired api key","Turnkey error 16: could not find public key"],x2=["The operation either timed out or was not allowed","The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.","Turnkey error 5: webauthn authenticator not found in organization or parent organization","The user cancelled the request"];class x6 extends O.V{error(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let[i]=r;(null==i?void 0:i.message)&&x2.some(e=>i.message.includes(e))?this.warn(e,...r):(O.V.events.emit("error",e),this.log(O.$.ERROR,e,...r))}constructor(e,t){super(e,t)}}let x3=new x6("Dynamic embedded wallets",O.$.INFO);!function(e){e.PublicKeyReady="PUBLIC_KEY_READY",e.InjectCredentialBundle="INJECT_CREDENTIAL_BUNDLE",e.InjectKeyExportBundle="INJECT_KEY_EXPORT_BUNDLE",e.InjectWalletExportBundle="INJECT_WALLET_EXPORT_BUNDLE",e.InjectImportBundle="INJECT_IMPORT_BUNDLE",e.ExtractWalletEncryptedBundle="EXTRACT_WALLET_ENCRYPTED_BUNDLE",e.ExtractKeyEncryptedBundle="EXTRACT_KEY_ENCRYPTED_BUNDLE",e.ApplySettings="APPLY_SETTINGS",e.BundleInjected="BUNDLE_INJECTED",e.EncryptedBundleExtracted="ENCRYPTED_BUNDLE_EXTRACTED",e.SettingsApplied="SETTINGS_APPLIED",e.StampRequest="STAMP_REQUEST",e.Stamp="STAMP",e.Error="ERROR"}(_8||(_8={})),function(e){e.Hexadecimal="HEXADECIMAL",e.Solana="SOLANA"}(_7||(_7={}));class x5{constructor(e){if("undefined"==typeof window)throw Error("Cannot initialize iframe in non-browser environment");if(!e.iframeContainer)throw Error("Iframe container cannot be found");if(this.container=e.iframeContainer,this.container.querySelector(`#${e.iframeElementId}`))throw Error(`Iframe element with ID ${e.iframeElementId} already exists`);let t=window.document.createElement("iframe");t.setAttribute("sandbox","allow-scripts allow-same-origin"),t.id=e.iframeElementId,t.src=e.iframeUrl,this.iframe=t;let r=new URL(e.iframeUrl);this.iframeOrigin=r.origin,this.iframePublicKey=null}async init(){return this.container.appendChild(this.iframe),new Promise((e,t)=>{window.addEventListener("message",t=>{t.origin===this.iframeOrigin&&t.data?.type===_8.PublicKeyReady&&(this.iframePublicKey=t.data.value,e(t.data.value))},!1)})}clear(){this.iframe.remove()}publicKey(){return this.iframePublicKey}async injectCredentialBundle(e){return new Promise((t,r)=>{this.iframe.contentWindow?.postMessage({type:_8.InjectCredentialBundle,value:e},"*"),window.addEventListener("message",e=>{e.origin===this.iframeOrigin&&(e.data?.type===_8.BundleInjected&&t(e.data.value),e.data?.type===_8.Error&&r(e.data.value))},!1)})}async injectKeyExportBundle(e,t,r){return this.iframe.contentWindow?.postMessage({type:_8.InjectKeyExportBundle,value:e,keyFormat:r,organizationId:t},"*"),new Promise((e,t)=>
43{window.addEventListener("message",r=>{r.origin===this.iframeOrigin&&(r.data?.type===_8.BundleInjected&&e(r.data.value),r.data?.type===_8.Error&&t(r.data.value))},!1)})}async injectWalletExportBundle(e,t){return this.iframe.contentWindow?.postMessage({type:_8.InjectWalletExportBundle,value:e,organizationId:t},"*"),new Promise((e,t)=>{window.addEventListener("message",r=>{r.origin===this.iframeOrigin&&(r.data?.type===_8.BundleInjected&&e(r.data.value),r.data?.type===_8.Error&&t(r.data.value))},!1)})}async injectImportBundle(e,t,r){return this.iframe.contentWindow?.postMessage({type:_8.InjectImportBundle,value:e,organizationId:t,userId:r},"*"),new Promise((e,t)=>{window.addEventListener("message",r=>{r.origin===this.iframeOrigin&&(r.data?.type===_8.BundleInjected&&e(r.data.value),r.data?.type===_8.Error&&t(r.data.value))},!1)})}async extractWalletEncryptedBundle(){return this.iframe.contentWindow?.postMessage({type:_8.ExtractWalletEncryptedBundle},"*"),new Promise((e,t)=>{window.addEventListener("message",r=>{r.origin===this.iframeOrigin&&(r.data?.type===_8.EncryptedBundleExtracted&&e(r.data.value),r.data?.type===_8.Error&&t(r.data.value))},!1)})}async extractKeyEncryptedBundle(e){return this.iframe.contentWindow?.postMessage({type:_8.ExtractKeyEncryptedBundle,keyFormat:e},"*"),new Promise((e,t)=>{window.addEventListener("message",r=>{r.origin===this.iframeOrigin&&(r.data?.type===_8.EncryptedBundleExtracted&&e(r.data.value),r.data?.type===_8.Error&&t(r.data.value))},!1)})}async applySettings(e){let t=JSON.stringify(e);return this.iframe.contentWindow?.postMessage({type:_8.ApplySettings,value:t},"*"),new Promise((e,t)=>{window.addEventListener("message",r=>{r.origin===this.iframeOrigin&&(r.data?.type===_8.SettingsApplied&&e(r.data.value),r.data?.type===_8.Error&&t(r.data.value))},!1)})}async stamp(e){if(null===this.iframePublicKey)throw Error("null iframe public key. Have you called/awaited .init()?");let t=this.iframeOrigin;return this.iframe.contentWindow?.postMessage({type:_8.StampRequest,value:e},"*"),new Promise(function(e,r){window.addEventListener("message",n=>{n.origin===t&&(n.data?.type===_8.Stamp&&e({stampHeaderName:"X-Stamp",stampHeaderValue:n.data.value}),n.data?.type===_8.Error&&r(n.data.value))},!1)})}}function x8(e){let t=new Uint8Array(e),r="";for(let e of t)r+=String.fromCharCode(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}let x7="copy",x4="convert";function x9(e){return{required:!0,schema:e}}function Ee(e){return{required:!1,schema:e}}let Et={appid:Ee(x7),appidExclude:Ee(x7),credProps:Ee(x7)},Er={type:x9(x7),id:x9(x7),rawId:x9(x4),authenticatorAttachment:Ee(x7),response:x9({clientDataJSON:x9(x4),authenticatorData:x9(x4),signature:x9(x4),userHandle:x9(x4)}),clientExtensionResults:{required:!0,schema:Et,derive:e=>e.getClientExtensionResults()}};async function En(e){let t=await navigator.credentials.get(e);return t.toJSON=()=>(function e(t,r,n){if(r===x7)return n;if(r===x4)return t(n);if(r instanceof Array)return n.map(n=>e(t,r[0],n));if(r instanceof Object){let i={};for(let[s,a]of Object.entries(r)){if(a.derive){let e=a.derive(n);void 0!==e&&(n[s]=e)}if(!(s in n)){if(a.required)throw Error(`Missing key: ${s}`);continue}if(null==n[s]){i[s]=null;continue}i[s]=e(t,a.schema,n[s])}return i}})(x8,Er,t),t}var Ei=r(33773);class Es{constructor(e){this.rpId=e.rpId,this.timeout=e.timeout||3e5,this.userVerification=e.userVerification||"preferred",this.allowCredentials=e.allowCredentials||[]}async stamp(e){let t=function(e){let t=(0,Ei.n)().update(e).digest("hex");return new TextEncoder().encode(t)}(e),r={publicKey:{rpId:this.rpId,challenge:t,allowCredentials:this.allowCredentials,timeout:this.timeout,userVerification:this.userVerification}},n=(await En(r)).toJSON();return{stampHeaderName:"X-Stamp-Webauthn",stampHeaderValue:JSON.stringify({authenticatorData:n.response.authenticatorData,clientDataJson:n.response.clientDataJSON,credentialId:n.id,signature:n.response.signature})}}}class Ea extends Error{constructor(){super("Webauthn is not supported on this device")}}function Eo(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}function El(e){let t=new Uint8Array(e),r="";for(let e of t)r+=String.fromCharCode(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ec(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,n=atob(t.padEnd(t.length+r,"=")),i=new ArrayBuffer(n.length),s=new Uint8Array(i);for(let e=0;e<n.length;e++)s[e]=n.charCodeAt(e);return i}function Eu(){return window?.PublicKeyCredential!==void 0&&"function"==typeof window.PublicKeyCredential}function Ed(e){let{id:t}=e;return{...e,id:Ec(t),transports:e.transports}}"function"==typeof SuppressedError&&SuppressedError;
43class Eh extends Error{constructor({message:e,code:t,cause:r,name:n}){super(e,{cause:r}),this.name=n??r.name,this.code=t}}class Ep{createNewAbortSignal(){if(this.controller){let e=Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}let Ef=new Ep,Em=["cross-platform","platform"];async function Ey(e){var t;let r,n,i,s,a;if(!Eu())throw Error("WebAuthn is not supported in this browser");let o={publicKey:{...e,challenge:Ec(e.challenge),user:{...e.user,id:(t=e.user.id,new TextEncoder().encode(t))},excludeCredentials:e.excludeCredentials?.map(Ed)}};o.signal=Ef.createNewAbortSignal();try{r=await navigator.credentials.create(o)}catch(e){throw function({error:e,options:t}){let{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new Eh({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("ConstraintError"===e.name){if(r.authenticatorSelection?.requireResidentKey===!0)return new Eh({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(r.authenticatorSelection?.userVerification==="required")return new Eh({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else if("InvalidStateError"===e.name)return new Eh({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});else if("NotAllowedError"===e.name)return new Eh({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("NotSupportedError"===e.name)return new Eh(0===r.pubKeyCredParams.filter(e=>"public-key"===e.type).length?{message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}:{message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});else if("SecurityError"===e.name){let t=window.location.hostname;if(!("localhost"===t||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)))return new Eh({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(r.rp.id!==t)return new Eh({message:`The RP ID "${r.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("TypeError"===e.name){if(r.user.id.byteLength<1||r.user.id.byteLength>64)return new Eh({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if("UnknownError"===e.name)return new Eh({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e});return e}({error:e,options:o})}if(!r)throw Error("Registration was not completed");let{id:l,rawId:c,response:u,type:d}=r;if("function"==typeof u.getTransports&&(i=u.getTransports()),"function"==typeof u.getPublicKeyAlgorithm)try{s=u.getPublicKeyAlgorithm()}catch(e){Eb("getPublicKeyAlgorithm()",e)}if("function"==typeof u.getPublicKey)try{let e=u.getPublicKey();null!==e&&(a=El(e))}catch(e){Eb("getPublicKey()",e)}if("function"==typeof u.getAuthenticatorData)try{n=El(u.getAuthenticatorData())}catch(e){Eb("getAuthenticatorData()",e)}return{id:l,rawId:El(c),response:{attestationObject:El(u.attestationObject),clientDataJSON:El(u.clientDataJSON),transports:i,publicKeyAlgorithm:s,publicKey:a,authenticatorData:n},type:d,clientExtensionResults:r.getClientExtensionResults(),authenticatorAttachment:function(e){if(!(!e||0>Em.indexOf(e)))return e}(r.authenticatorAttachment)}}function Eb(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
44`,t)}let Eg=new O.V("Webauthn"),Ev=e=>Eo(void 0,void 0,void 0,function*(){let t;if(!Eu())throw new Ea;try{t=yield Ey(e)}catch(e){throw Eg.debug("Failed to create webauthn credential",e),e}return t}),Ew=e=>{switch(e){case"internal":return"AUTHENTICATOR_TRANSPORT_INTERNAL";case"usb":return"AUTHENTICATOR_TRANSPORT_USB";case"nfc":return"AUTHENTICATOR_TRANSPORT_NFC";case"ble":return"AUTHENTICATOR_TRANSPORT_BLE";case"hybrid":return"AUTHENTICATOR_TRANSPORT_HYBRID";default:throw Error("unsupported transport format "+e)}},Ex=e=>Eo(void 0,void 0,void 0,function*(){if(!e.publicKey)throw Error("Invalid options. Public key attribute must be defined");return EE((yield Ev(E_(e.publicKey))))}),EE=e=>{var t;return{attestationObject:e.response.attestationObject,clientDataJson:e.response.clientDataJSON,credentialId:e.rawId,transports:(null===(t=e.response.transports)||void 0===t?void 0:t.map(Ew))||[]}},E_=e=>{var t;return Object.assign(Object.assign({},e),{challenge:EC(e.challenge),excludeCredentials:null===(t=e.excludeCredentials)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{id:EC(e.id)}
44)),user:Object.assign(Object.assign({},e.user),{id:EC(e.user.id)})})},EC=e=>e instanceof ArrayBuffer?El(e):El(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));(0,E.R)("@dynamic-labs/webauthn","4.6.3");let Ek=()=>({createWebauthnStamper:e=>new Es(e),getWebAuthnAttestation:Ex});class ES{static get implementation(){return xA(_4,_4,"f",_9)?xA(_4,_4,"f",_9):Ek()}static set implementation(e){!function(e,t,r,n,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");i?i.value=r:t.set(e,r)}(_4,_4,e,"f",_9)}static get getWebAuthnAttestation(){return _4.implementation.getWebAuthnAttestation}static get createWebauthnStamper(){return _4.implementation.createWebauthnStamper}}_4=ES,_9={value:void 0};class EA{get client(){return this.__turnkeyClient}get publicKey(){return this.__publicKey}clear(){var e;null===(e=this.__iframeStamper)||void 0===e||e.clear(),this.__iframeStamper=void 0,this.__publicKey=void 0,this.__turnkeyClient=void 0}}class ET extends EA{get recoveryType(){return this.__recoveryType}get recoveryUserId(){return this.__turnkeyRecoveryUserId||""}set recoveryUserId(e){this.__turnkeyRecoveryUserId=e}clear(){super.clear(),this.__recoveryType=void 0,this.__turnkeyRecoveryUserId=void 0,this.__createdAt=void 0}initRecovery(e,t,r,n){return xS(this,void 0,void 0,function*(){return this.__recoveryType&&this.clear(),this.__sessionExpiration=n,this.__recoveryType=e,this.__iframeStamper=new x5({iframeContainer:t,iframeElementId:r,iframeUrl:"passkey"===e?"https://recovery.turnkey.com":"https://auth.turnkey.com"}),yield this.__iframeStamper.init(),this.__publicKey=this.__iframeStamper.publicKey(),this.__publicKey})}verifyRecoveryCode(e,t){return xS(this,void 0,void 0,function*(){if(!this.__iframeStamper)throw new I.ii("Cannot proceed with your request");try{if(yield this.__iframeStamper.injectCredentialBundle(e),this.__turnkeyClient=new xH({baseUrl:x0},this.__iframeStamper),!t||!this.__turnkeyRecoveryUserId)throw new I.ii("Cannot proceed with your request");if(!(yield this.isValidCode(t)))throw new I.ii("The code is invalid or expired.")}catch(e){if(x3.error("Error while verifying recovery code",e),e instanceof I.ii)throw e;throw new I.ii("The code is invalid or expired.")}})}completeRecovery(e){return xS(this,arguments,void 0,function*(e){let{attestation:t,challenge:r,turnkeySubOrganizationId:n}=e;if(!this.__turnkeyClient||!this.__turnkeyRecoveryUserId)throw new I.ii("Cannot proceed with your request");try{return this.__turnkeyClient.recoverUser({organizationId:n,parameters:{authenticator:{attestation:t,authenticatorName:"Passkey",challenge:r},userId:this.__turnkeyRecoveryUserId},timestampMs:String(Date.now()),type:"ACTIVITY_TYPE_RECOVER_USER"})}catch(e){throw x3.error("[TK] Error while completing recovery process",e),e}})}addPasskeyAuthenticator(e){return xS(this,arguments,void 0,function*(e){let{attestation:t,challenge:r,turnkeySubOrganizationId:n}=e;if(!this.__turnkeyClient||!this.__turnkeyRecoveryUserId)throw new I.ii("Cannot proceed with your request");try{return this.__turnkeyClient.createAuthenticators({organizationId:n,parameters:{authenticators:[{attestation:t,authenticatorName:"Passkey",challenge:r}],userId:this.__turnkeyRecoveryUserId},timestampMs:String(Date.now()),type:"ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2"})}catch(e){throw x3.error("[TK] Error while creating new authenticator",e),e}})}addEmailRecovery(e){return xS(this,arguments,void 0,function*(e){let{organizationId:t,email:r,turnkeyUserId:n}=e,i=(0,I.fL)();i||(i=I.fP.getHostname());let s=new xH({baseUrl:x0},ES.createWebauthnStamper({rpId:i}));try{return{signedRequest:yield s.stampUpdateUser({organizationId:t,parameters:{userEmail:r,userId:n,userTagIds:[]},timestampMs:String(Date.now()),type:"ACTIVITY_TYPE_UPDATE_USER"}),userId:n}}catch(e){throw x3.error("Error while adding email recovery",e),e}})}constructor(){super(...arguments),this.isSessionActive=()=>!!this.__createdAt&&"email"===this.__recoveryType&&(!this.isExpired(this.__createdAt,this.__sessionExpiration||1800)||(this.clear(),!1)),this.isValidCode=e=>xS(this,void 0,void 0,function*(){var t,r,n,i;if(!e||!this.__turnkeyRecoveryUserId)throw new I.ii("Cannot proceed with your request");let s=yield null===(t=this.__turnkeyClient)||void 0===t?void 0:t.getUser({organizationId:e,userId:this.__turnkeyRecoveryUserId}),a={email:"CREDENTIAL_TYPE_API_KEY_P256",passkey:"CREDENTIAL_TYPE_RECOVER_USER_KEY_P256"},o=null===(i=null===(n=null===(r=null==s?void 0:s.user)||void 0===r?void 0:r.apiKeys)||void 0===n?void 0:n.filter(e=>e.credential.type===a[this.__recoveryType]))||void 0===i?void 0:i.pop();return!(!o||this.isExpired(parseInt(o.createdAt.seconds,10),900))&&(this.__createdAt=parseInt(o.createdAt.seconds,10),!0)}),this.isExpired=(e,t)=>{let r=new Date(1e3*(e+t));return new Date>=r}}}let EI=new ET;
44class EP extends EA{initExport(e,t){return xS(this,void 0,void 0,function*(){if(this.__iframeStamper=new x5({iframeContainer:e,iframeElementId:t,iframeUrl:"https://export.turnkey.com"}),yield this.__iframeStamper.init(),this.__publicKey=this.__iframeStamper.publicKey(),EI.isSessionActive())this.__turnkeyClient=EI.client;else{let e=(0,I.fL)();e||(e=I.fP.getHostname());let t=ES.createWebauthnStamper({rpId:e}),r=null==EP?void 0:EP.apiKeyStamper;this.__turnkeyClient=new xH({baseUrl:x0},null!=r?r:t)}return this.__publicKey})}verifyExportWallet(e){return xS(this,arguments,void 0,function*(e){let{exportBundle:t,organizationId:r}=e;if(!this.__iframeStamper)throw new I.ii("Cannot proceed with your request");try{return yield this.__iframeStamper.injectWalletExportBundle(t,r)}catch(e){throw x3.error("Error while verifying export wallet",e),e}})}verifyExportPrivateKey(e){return xS(this,arguments,void 0,function*(e){let{exportBundle:t,organizationId:r,chain:n}=e;if(!this.__iframeStamper)throw new I.ii("Cannot proceed with your request");let i="solana"===n||"SOL"===n?_7.Solana:_7.Hexadecimal;try{return yield this.__iframeStamper.injectKeyExportBundle(t,r,i)}catch(e){throw x3.error("Error while verifying export private key",e),e}})}exportPrivateKey(e){return xS(this,arguments,void 0,function*(e){let{privateKeyId:t,organizationId:r}=e,n=null==EP?void 0:EP.apiKeyStamper;if(n&&(this.__turnkeyClient=new xH({baseUrl:x0},n)),!this.__iframeStamper||!this.__publicKey||!this.__turnkeyClient||!t)throw new I.ii("Cannot proceed with your request");try{return(yield this.__turnkeyClient.exportPrivateKey({organizationId:r,parameters:{privateKeyId:t,targetPublicKey:this.__publicKey},timestampMs:String(Date.now()),type:"ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"})).activity}catch(e){throw x3.error("[TK] Error while completing export private key process",e),e}})}exportWallet(e){return xS(this,arguments,void 0,function*(e){let{walletId:t,organizationId:r,address:n}=e,i=null==EP?void 0:EP.apiKeyStamper;if(i&&(this.__turnkeyClient=new xH({baseUrl:x0},i)),!this.__iframeStamper||!this.__publicKey||!this.__turnkeyClient||!t)throw new I.ii("Cannot proceed with your request");try{if(n)return(yield this.__turnkeyClient.exportWalletAccount({organizationId:r,parameters:{address:n,targetPublicKey:this.__publicKey},timestampMs:String(Date.now()),type:"ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"})).activity;return(yield this.__turnkeyClient.exportWallet({organizationId:r,parameters:{targetPublicKey:this.__publicKey,walletId:t},timestampMs:String(Date.now()),type:"ACTIVITY_TYPE_EXPORT_WALLET"})).activity}catch(e){throw x3.error("[TK] Error while completing export wallet process",e),e}})}}class EO extends P.gy{getWebAuthnAttestation(){return xS(this,void 0,void 0,function*(){let e;let t=xJ(),r=xJ(),{email:n,passkeyIdentifier:i}=this;if(!n&&!i)throw Error("Email or passkeyIdentifier must be set to register a webauthn credential.");let s=n||"".concat(this.appName," - ").concat(i),a={publicKey:{authenticatorSelection:{authenticatorAttachment:void 0,requireResidentKey:!1,residentKey:"preferred",userVerification:"discouraged"},challenge:t,pubKeyCredParams:[{alg:-7,type:"public-key"}],rp:{id:(0,I.fL)(),name:this.appName},user:{displayName:s,id:r,name:n||"".concat(this.appName," - ").concat(i)}}};try{e=yield ES.getWebAuthnAttestation(a)}catch(t){x3.warn("Unable to register webauthn credential on the current page's TLD ".concat((0,I.fL)(),". Falling back to using hostname. ").concat(I.fP.getHostname()),t),a.publicKey.rp.id=I.fP.getHostname(),e=yield ES.getWebAuthnAttestation(a)}return{attestation:{attestationObject:e.attestationObject,clientDataJson:e.clientDataJson,credentialId:e.credentialId,transports:xQ(e.transports)},challenge:xZ(t),displayName:s}})}getAuthenticatorHandler(){return this.__authenticatorMethodHandler}getExportHandler(){return this.__exportHandler}get email(){return this._email}setEmail(e){this._email=e}get phone(){return this._phone}setPhone(e){this._phone=e}get passkeyIdentifier(){return this._passkeyIdentifier}setPasskeyIdentifier(e){this._passkeyIdentifier=e}clearEmail(){this._email=null}getAddress(){return xS(this,void 0,void 0,function*(){var e;return null===(e=this.verifiedCredential)||void 0===e?void 0:e.address})}getConnectedAccounts(){return xS(this,void 0,void 0,function*(){return(this.verifiedCredentials||[]).map(e=>null==e?void 0:e.address).filter(e=>"string"==typeof e)})}get turnkeyAddress(){var e;let{address:t}=null!==(e=this.verifiedCredential)&&void 0!==e?e:{};return t}get walletProperties(){let{walletProperties:e}=this.verifiedCredential||{};return e}set verifiedCredentials(e){this._verifiedCredentials=e}get verifiedCredentials(){return this._verifiedCredentials}set verifiedCredential(e){this._verifiedCredential=e}get verifiedCredential(){return this._verifiedCredential}setSessionKeyFetcher(e){this.createOrRestoreSessionFetcherFunction=e}setSessionKeyRemoveFunction(e){this.removeSessionKeysFunction=e}createOrRestoreSession(){return xS(this,arguments,void 0,function*(){let{ignoreRestore:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isSessionKeyCompatible()||EO.isLoadingSession)return;if(!this.createOrRestoreSessionFetcherFunction)throw new I.ii("Cannot register session key to init provider");let{sessionKeys:t}=EO;if((null==t?void 0:t.publicKey)&&!(new Date>=new Date(t.expirationDate)))return t.publicKey;try{EO.isLoadingSession=!0;let t=yield this.createOrRestoreSessionFetcherFunction({ignoreRestore:e});return EO.sessionKeys=t,EO.apiKeyStamper=new xU({apiPrivateKey:t.privateKey,apiPublicKey:t.publicKey}),EP.apiKeyStamper=EO.apiKeyStamper,x3.metaData.set("sessionApiPublicKey",t.publicKey),t.publicKey}catch(e){throw new I.ii("Failed to create or restore session")}finally{EO.isLoadingSession=!1}})}isSessionKeyCompatible(){var e;let t=null===(e=this.verifiedCredential)||void 0===e?void 0:e.walletProperties;return!!(null==t?void 0:t.isSessionKeyCompatible)}isSessionActive(){return xS(this,void 0,void 0,function*(){return!!((yield this.getAddress())&&EO.sessionKeys&&EO.apiKeyStamper)})}get sessionKeys(){return EO.sessionKeys}getTurnkeyClient(){var e;let t=(0,I.fL)();t||(t=I.fP.getHostname());let r=ES.createWebauthnStamper({rpId:t}),n=null==EO?void 0:EO.apiKeyStamper;return this.__turnkeyClient=null!==(e=this.getAuthenticatorHandler().client)&&void 0!==e?e:new xH({baseUrl:x0},null!=n?n:r),this.__turnkeyClient}setLoggerMetadata(){var e,t,r;x3.metaData.set("turnkeySubOrganizationId",null===(t=null===(e=this._verifiedCredential)||void 0===e?void 0:e.walletProperties)||void 0===t?void 0:t.turnkeySubOrganizationId),x3.metaData.set("walletId",null===(r=this._verifiedCredential)||void 0===r?void 0:r.id);let n="Unknown";this.isSessionKeyCompatible()?n="SessionKeys":"passkey"===this.__authenticatorMethodHandler.recoveryType?n="Passkey":"email"===this.__authenticatorMethodHandler.recoveryType&&(n="EmailAuth"),x3.metaData.set("authMethod",n)}constructor(e,t){if(super(t),this.requiresNonDynamicEmailOtp=!1,this.isEmbeddedWallet=!0,this.removeSessionKeys=()=>xS(this,void 0,void 0,function*(){EO.sessionKeys=void 0,EO.apiKeyStamper=void 0,EP.apiKeyStamper=void 0}),this.stampCreateWalletAccountRequest=e=>xS(this,[e],void 0,function*(e){let{request:t}=e;return yield this.createOrRestoreSession(),this.getTurnkeyClient().stampCreateWalletAccounts(t)}),this.stampDeleteSubOrganizationRequest=e=>xS(this,[e],void 0,function*(e){let{request:t}=e;return yield this.createOrRestoreSession(),this.getTurnkeyClient().stampDeleteSubOrganization(t)}),!t.appName)throw Error("appName not set");this.name=e.name,this.overrideKey=e.key,this.appName=t.appName,this.__authenticatorMethodHandler=EI,this.__exportHandler=new EP}}EO.isLoadingSession=!1;let ED={Turnkey:{key:"turnkey",name:"Turnkey"},TurnkeyHD:{key:"turnkeyhd",name:"Turnkey HD"}},EU=(e,t)=>null==e?void 0:e.reduce((r,n)=>{var i;if((null===(i=n.walletName)||void 0===i?void 0:i.startsWith("turnkey"))&&t===n.chain){let t=e.find(e=>e.signerRefId===n.id),i=null==t?void 0:t.id,s=null==t?void 0:t.address;r.push(Object.assign(Object.assign({},n),{smartWalletRefAddress:s,smartWalletRefId:i}))}return r},[]);function EN(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((n=n.apply(e,t||[])).next())})}(0,E.R)("@dynamic-labs/embedded-wallet","4.6.3"),"function"==typeof SuppressedError&&SuppressedError;class EM extends q.C{constructor({message:e="Turnkey activity requires consensus.",activityId:t,activityStatus:r}){super(e),this.name="TurnkeyConsensusNeededError",this.activityId=t,this.activityStatus=r}}class EB extends q.C{constructor({message:e="Received unexpected Turnkey activity status.",activityId:t,activityStatus:r}){super(e),this.name="TurnkeyActivityError",this.activityId=t,this.activityStatus=r}}async function ER(e){let{client:t,organizationId:r,signWith:n}=e,{ethereumAddress:i}=e;if(!n)throw new EB({message:"Missing signWith parameter"});if((0,A.P)(n))i=n;else if(!i){let e=await t.getPrivateKey({privateKeyId:n,organizationId:r});if("string"!=typeof(i=e.privateKey.addresses.find(e=>"ADDRESS_FORMAT_ETHEREUM"===e.format)?.address)||!i)throw new EB({message:`Unable to find Ethereum address for key ${n} under organization ${r}`})}return function(e){let{client:t,organizationId:r,signWith:n}=e,{ethereumAddress:i}=e;if(!n)throw new x$({message:"Missing signWith parameter"});if((0,A.P)(n))i=n;else if(!i)throw new EB({message:"Missing ethereumAddress parameter"});return T({address:i,signMessage:function({message:e}){return EL(t,e,r,n)}
44,signTransaction:function(e,i){return Ej(t,e,i?.serializer?i.serializer:el,r,n)},signTypedData:function(e){return EF(t,e,r,n)}})}({client:t,organizationId:r,signWith:n,ethereumAddress:i})}async function EL(e,t,r,n){let i=h1(t),s=await EH(e,i,r,n);return`${s}`}async function Ej(e,t,r,n,i){let s=r(t).replace(/^0x/,"");return await Ez(e,s,n,i)}async function EF(e,t,r,n){let i=h7(t);return await EH(e,i,r,n)}async function Ez(e,t,r,n){let i;try{i=await Eq(e,t,r,n)}catch(e){if(e instanceof x$)throw new EB({message:e.message,activityId:e.activityId,activityStatus:e.activityStatus});if(e instanceof xK)throw new EM({message:e.message,activityId:e.activityId,activityStatus:e.activityStatus});throw new EB({message:`Failed to sign: ${e.message}`})}return`0x${i}`}async function Eq(e,t,r,n){if(e instanceof xH){let{activity:i}=await e.signTransaction({type:"ACTIVITY_TYPE_SIGN_TRANSACTION_V2",organizationId:r,parameters:{signWith:n,type:"TRANSACTION_TYPE_ETHEREUM",unsignedTransaction:t},timestampMs:String(Date.now())});return xV(i),xG(i?.result?.signTransactionResult?.signedTransaction)}{let{activity:r,signedTransaction:i}=await e.signTransaction({signWith:n,type:"TRANSACTION_TYPE_ETHEREUM",unsignedTransaction:t});return xV(r),xG(i)}}async function EH(e,t,r,n){let i;try{i=await E$(e,t,r,n)}catch(e){if(e instanceof x$)throw new EB({message:e.message,activityId:e.activityId,activityStatus:e.activityStatus});if(e instanceof xK)throw new EM({message:e.message,activityId:e.activityId,activityStatus:e.activityStatus});throw new EB({message:`Failed to sign: ${e.message}`})}return i}async function E$(e,t,r,n){var i;let s;if(e instanceof xH){let{activity:i}=await e.signRawPayload({type:"ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",organizationId:r,parameters:{signWith:n,payload:t,encoding:"PAYLOAD_ENCODING_HEXADECIMAL",hashFunction:"HASH_FUNCTION_NO_OP"},timestampMs:String(Date.now())});xV(i),s=xG(i?.result?.signRawPayloadResult)}else{let{activity:r,r:i,s:a,v:o}=await e.signRawPayload({signWith:n,payload:t,encoding:"PAYLOAD_ENCODING_HEXADECIMAL",hashFunction:"HASH_FUNCTION_NO_OP"});xV(r),s={r:i,s:a,v:o}}return xG((i=s,h3({r:`0x${i.r}`,s:`0x${i.s}`,v:"00"===i.v?27n:28n})))}class EK extends EO{getLastUsedChainId(){var e;return this.lastUsedChainId?this.lastUsedChainId:(null===(e=this.evmNetworks)||void 0===e?void 0:e.length)?this.evmNetworks[0].chainId:void 0}getNetwork(){return EN(this,void 0,void 0,function*(){var e;return null===(e=yield this.getSigner())||void 0===e?void 0:e.getChainId()})}supportsNetworkSwitching(){return!0}switchNetwork(e){return EN(this,arguments,void 0,function*(e){let{networkChainId:t}=e;t&&("string"==typeof t&&(t=parseInt(t)),this.lastUsedChainId=t,this._selectedChainId=t,yield this.refreshTurnkeyAccount(),this.emit("chainChange",{chain:t.toString()}))})}setVerifiedCredentials(e){let t=EU(e,"eip155"),[r]=t;JSON.stringify(this.verifiedCredentials)!==JSON.stringify(t)&&(this.verifiedCredential=r,this.verifiedCredentials=t,this.refreshTurnkeyAccount())}validateActiveWallet(e){return EN(this,void 0,void 0,function*(){var t,r;let n=(null===(t=this.verifiedCredential)||void 0===t?void 0:t.address)||"";if(!(0,P.Lb)(n,e,this.connectedChain)){let t=null===(r=this.verifiedCredentials)||void 0===r?void 0:r.find(t=>(null==t?void 0:t.address)===e);if(!t)throw new I.ii("Account not found");this.verifiedCredential=t,this.refreshTurnkeyAccount()}})}getBalance(e){return EN(this,void 0,void 0,function*(){let t=yield this.getPublicClient();if(!t)return;let r=yield t.getBalance({address:e});return(0,k.c)(r)})}signMessage(e){return EN(this,void 0,void 0,function*(){let t=yield this.getSigner();if(!t)throw Error("Signer not found");return t.signMessage({message:e})})}getPublicClient(){return EN(this,void 0,void 0,function*(){var e,t;if(0===this.evmNetworks.length)return;let r=null!==(e=yield this.getNetwork())&&void 0!==e?e:1,n={cosmos:[],evm:this.evmNetworks,solana:[],starknet:void 0};if(!this.chainRpcProviders)return;let i=this.chainRpcProviders.getProviders(n);return null===(t=this.chainRpcProviders.getEvmProviderByChainId(i,r))||void 0===t?void 0:t.provider})}getSigner(){return EN(this,void 0,void 0,function*(){return yield this.getTurnkeyAccount(),this.getWalletClient()})}getAccount(){return EN(this,void 0,void 0,function*(){var e,t,r;return this.isSessionKeyCompatible()&&(null===(e=this.__turnkeyClient)||void 0===e?void 0:e.stamper)instanceof xU||("passkey"===this.getAuthenticatorHandler().recoveryType&&(null===(t=this.__turnkeyClient)||void 0===t?void 0:t.stamper)instanceof x5||"email"===this.getAuthenticatorHandler().recoveryType&&(null===(r=this.__turnkeyClient)||void 0===r?void 0:r.stamper)instanceof Es||this.__turnkeyClient!==this.getAuthenticatorHandler().client)&&(yield this.refreshTurnkeyAccount()),this._turnkeyAccount})}getWalletClient(){let e=this.networkRpcUrl,t=this._turnkeyAccount,r=this.currentEvmNetwork;if(t&&e&&r)return pp({account:this.getAccount.bind(this),address:this.turnkeyAddress,chain:cI(r),transport:(0,pc.L)(e),walletConnector:this,walletUiUtils:this.walletUiUtils})}get currentChainId(){var e,t,r;return null!==(e=this._selectedChainId)&&void 0!==e?e:null===(r=null===(t=this.evmNetworks)||void 0===t?void 0:t[0])||void 0===r?void 0:r.chainId}
44get lastUsedChainId(){let e=localStorage.getItem(EK.lastUsedChainIdStorageKey);if(e)try{let t=parseInt(e);if(isNaN(t))return;if(!this.evmNetworks.some(e=>e.chainId===t)){let e=this.evmNetworks[0].chainId;return this.lastUsedChainId=e,this.lastUsedChainId}return t}catch(e){x3.error(e);return}}set lastUsedChainId(e){void 0===e?localStorage.removeItem(EK.lastUsedChainIdStorageKey):localStorage.setItem(EK.lastUsedChainIdStorageKey,e.toString())}get networkRpcUrl(){let e=this.currentChainId;if(this.evmNetworks.find(t=>t.chainId===e))return(0,P.r8)({chainId:e,networks:this.evmNetworks})}get currentEvmNetwork(){let e=this.currentChainId;return this.evmNetworks.find(t=>t.chainId===e)}internalSignTransaction(e){return EN(this,arguments,void 0,function*(e){let{transaction:t,args:r,address:n,turnkeySubOrganizationId:i}=e;return this.doRetryableTurnkeyAction({action:e=>e.signTransaction(t,r),activityType:"SignTransaction",address:n,turnkeySubOrganizationId:i})})}internalSignTypedData(e){return EN(this,arguments,void 0,function*(e){let{typedData:t,address:r,turnkeySubOrganizationId:n}=e;return this.doRetryableTurnkeyAction({action:e=>e.signTypedData(t),activityType:"SignTypedData",address:r,turnkeySubOrganizationId:n})})}internalSignMessage(e){return EN(this,arguments,void 0,function*(e){let{message:t,address:r,turnkeySubOrganizationId:n}=e;return this.doRetryableTurnkeyAction({action:e=>e.signMessage({message:t}),activityType:"SignMessage",address:r,turnkeySubOrganizationId:n})})}doRetryableTurnkeyAction(e){return EN(this,arguments,void 0,function*(e){let{action:t,activityType:r,address:n,turnkeySubOrganizationId:i}=e;yield this.createOrRestoreSession();let s=yield this.createTurnkeyAccount({address:n,turnkeySubOrganizationId:i});try{return yield t(s)}catch(e){if(x1.some(t=>e.message.toLowerCase().includes(t.toLowerCase())))return yield this.removeSessionKeys(),yield this.createOrRestoreSession({ignoreRestore:!0}),t(s=yield this.createTurnkeyAccount({address:n,turnkeySubOrganizationId:i}));throw x3.error("[TK] failed to perform ".concat(r," activity"),e),e}})}createTurnkeyAccount(e){return EN(this,arguments,void 0,function*(e){let{address:t,turnkeySubOrganizationId:r}=e;return ER({client:this.getTurnkeyClient(),ethereumAddress:t,organizationId:r,signWith:t})})}refreshTurnkeyAccount(){return EN(this,void 0,void 0,function*(){return this._turnkeyAccount=void 0,this.getTurnkeyAccount()})}getTurnkeyAccount(){return EN(this,void 0,void 0,function*(){var e,t;if(this._turnkeyAccount)return this._turnkeyAccount;let{turnkeySubOrganizationId:r}=null!==(e=this.walletProperties)&&void 0!==e?e:{},{address:n}=null!==(t=this.verifiedCredential)&&void 0!==t?t:{};if(r&&n)return this._turnkeyAccount=T({address:n,signMessage:e=>EN(this,[e],void 0,function*(e){let{message:t}=e;return this.internalSignMessage({address:n,message:t,turnkeySubOrganizationId:r})}),signTransaction:(e,t)=>EN(this,void 0,void 0,function*(){return this.internalSignTransaction({address:n,args:t,transaction:e,turnkeySubOrganizationId:r})}),signTypedData:e=>EN(this,void 0,void 0,function*(){return this.internalSignTypedData({address:n,turnkeySubOrganizationId:r,typedData:e})})}),this.setLoggerMetadata(),this._turnkeyAccount})}createUiTransaction(e){return EN(this,void 0,void 0,function*(){yield this.validateActiveWallet(e);let t=this.getWalletClient(),r=yield this.getPublicClient();if(!r||!t)throw new I.ii("No public client available");return cS({from:e,publicClient:r,walletClient:t})})}getEnabledNetworks(){return this.evmNetworks}constructor(e,t){var r,n;super(e,t),this.walletFallback={brand:{alt:"Turnkey Wallet",spriteId:"turnkey"},name:"Turnkey HD"},this.ChainWallet=dc,this.connectedChain="EVM",this.supportedChains=["ETH","EVM"],this.verifiedCredentialChain="eip155",this.evmNetworks=(0,I.bb)(t.evmNetworks),this.walletUiUtils=t.walletUiUtils,this._turnkeyAccount=void 0,this._selectedChainId=this.getLastUsedChainId(),this.chainRpcProviders=t.chainRpcProviders,null===(r=this.chainRpcProviders)||void 0===r||r.registerEvmProviders(null!==(n=t.providersConfig)&&void 0!==n?n:{}),this.__turnkeyClient=this.getTurnkeyClient()}}
44EK.lastUsedChainIdStorageKey="turnkey-last-used-chain-id";let EV=e=>{var t;return(null===(t=e.apiProviders)||void 0===t?void 0:t.turnkey)?[class extends EK{constructor(t){super(ED.TurnkeyHD,Object.assign(Object.assign({},e),t))}},class extends EK{constructor(t){super(ED.Turnkey,Object.assign(Object.assign({},e),t))}}]:[]};(0,E.R)("@dynamic-labs/embedded-wallet-evm","4.6.3");let EG=e=>{var t;let{walletBook:r}=e;return Object.entries(null!==(t=null==r?void 0:r.wallets)&&void 0!==t?t:{}).filter(e=>{let[,t]=e;return t.walletConnect&&!t.filterFromWalletConnect}).map(e=>{let[t,r]=e,{shortName:n}=r,i=n||r.name;return class extends xp{constructor(e){super(Object.assign(Object.assign({},e),{walletName:i})),this.overrideKey=t}}})},EW=()=>{class e extends xp{constructor(e){super(Object.assign(Object.assign({},e),{walletName:"WalletConnect"}))}}return e},EZ=(e,t)=>{let r;switch(e){case"standard":default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3
44V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7
44h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`}};class EJ{constructor(e,t){this.scope=e,this.module=t}storeObject(e,t){this.setItem(e,JSON.stringify(t))}loadObject(e){let t=this.getItem(e);return t?JSON.parse(t):void 0}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),t=[];for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);"string"==typeof n&&n.startsWith(e)&&t.push(n)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new EJ("CBWSDK").clear(),new EJ("walletlink").clear()}}let EY={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},EX={"-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."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}},EQ="Unspecified error message.";function E0(e,t=EQ){if(e&&Number.isInteger(e)){let t=e.toString();if(E2(EX,t))return EX[t].message;if(e>=-32099&&e<=-32e3)return"Unspecified server error."}return t}function E1(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function E2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function E6(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}let E3={rpc:{parse:e=>E5(EY.rpc.parse,e),invalidRequest:e=>E5(EY.rpc.invalidRequest,e),invalidParams:e=>E5(EY.rpc.invalidParams,e),methodNotFound:e=>E5(EY.rpc.methodNotFound,e),internal:e=>E5(EY.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw Error('"code" must be an integer such that: -32099 <= code 
44<= -32005');return E5(t,e)},invalidInput:e=>E5(EY.rpc.invalidInput,e),resourceNotFound:e=>E5(EY.rpc.resourceNotFound,e),resourceUnavailable:e=>E5(EY.rpc.resourceUnavailable,e),transactionRejected:e=>E5(EY.rpc.transactionRejected,e),methodNotSupported:e=>E5(EY.rpc.methodNotSupported,e),limitExceeded:e=>E5(EY.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>E8(EY.provider.userRejectedRequest,e),unauthorized:e=>E8(EY.provider.unauthorized,e),unsupportedMethod:e=>E8(EY.provider.unsupportedMethod,e),disconnected:e=>E8(EY.provider.disconnected,e),chainDisconnected:e=>E8(EY.provider.chainDisconnected,e),unsupportedChain:e=>E8(EY.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw Error('"message" must be a nonempty string');return new E9(t,r,n)}}};function E5(e,t){let[r,n]=E7(t);return new E4(e,r||E0(e),n)}function E8(e,t){let[r,n]=E7(t);return new E9(e,r||E0(e),n)}function E7(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:r}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[t||void 0,r]}}return[]}class E4 extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}}class E9 extends E4{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}let _e=e=>e,_t=e=>e,_r=e=>e;function _n(e){return Math.floor(e)}var _i=r(75927).hp;let _s=/^[0-9]*$/,_a=/^[a-f0-9]*$/;function _o(e){return _l(crypto.getRandomValues(new Uint8Array(e)))}function _l(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}function _c(e){return new Uint8Array(e.match(/.{1,2}/g).map(e=>Number.parseInt(e,16)))}function _u(e,t=!1){let r=e.toString("hex");return _e(t?`0x${r}`:r)}function _d(e){return _u(_w(e),!0)}function _h(e){return _r(e.toString(10))}function _p(e){return _e(`0x${BigInt(e).toString(16)}`)}function _f(e){return e.startsWith("0x")||e.startsWith("0X")}function _m(e){return _f(e)?e.slice(2):e}function _y(e){return _f(e)?`0x${e.slice(2)}`:`0x${e}`}function _b(e){if("string"!=typeof e)return!1;let t=_m(e).toLowerCase();return _a.test(t)}function _g(e,t=!1){let r=function(e,t=!1){if("string"==typeof e){let r=_m(e).toLowerCase();if(_a.test(r))return _e(t?`0x${r}`:r)}throw E3.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}(e,!1);return r.length%2==1&&(r=_e(`0${r}`)),t?_e(`0x${r}`):r}function _v(e){if("string"==typeof e){let t=_m(e).toLowerCase();if(_b(t)&&40===t.length)return _t(_y(t))}throw E3.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}function _w(e){if(_i.isBuffer(e))return e;if("string"==typeof e){if(_b(e)){let t=_g(e,!1);return _i.from(t,"hex")}return _i.from(e,"utf8")}throw E3.rpc.invalidParams(`Not binary data: ${String(e)}`)}function _x(e){if("number"==typeof e&&Number.isInteger(e))return _n(e);if("string"==typeof e){if(_s.test(e))return _n(Number(e));if(_b(e))return _n(Number(BigInt(_g(e,!0))))}throw E3.rpc.invalidParams(`Not an integer: ${String(e)}`)}function _E(e){if(null!==e&&("bigint"==typeof e||function(e){if(null==e||"function"!=typeof e.constructor)return!1;let{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}(e)))return BigInt(e.toString(10));if("number"==typeof e)return BigInt(_x(e));if("string"==typeof e){if(_s.test(e))return BigInt(e);if(_b(e))return BigInt(_g(e,!0))}throw E3.rpc.invalidParams(`Not an integer: ${String(e)}`)}async function __(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function _C(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function _k(e,t){let r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,new TextEncoder().encode(t));return{iv:r,cipherText:n}}async function _S(e,{iv:t,cipherText:r}
44){let n=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,r);return new TextDecoder().decode(n)}function _A(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function _T(e,t){let r=_A(e);return _l(new Uint8Array(await crypto.subtle.exportKey(r,t)))}async function _I(e,t){let r=_A(e),n=_c(t).buffer;return await crypto.subtle.importKey(r,new Uint8Array(n),{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function _P(e,t){return _k(t,JSON.stringify(e,(e,t)=>t instanceof Error?Object.assign(Object.assign({},t.code?{code:t.code}:{}),{message:t.message}):t))}async function _O(e,t){return JSON.parse(await _S(t,e))}let _D={storageKey:"ownPrivateKey",keyType:"private"},_U={storageKey:"ownPublicKey",keyType:"public"},_N={storageKey:"peerPublicKey",keyType:"public"};class _M{constructor(){this.storage=new EJ("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(_N,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(_U.storageKey),this.storage.removeItem(_D.storageKey),this.storage.removeItem(_N.storageKey)}async generateKeyPair(){let e=await __();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(_D,e.privateKey),await this.storeKey(_U,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(_D)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(_U)),(null===this.ownPrivateKey||null===this.ownPublicKey)&&await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(_N)),null===this.sharedSecret&&null!==this.ownPrivateKey&&null!==this.peerPublicKey&&(this.sharedSecret=await _C(this.ownPrivateKey,this.peerPublicKey))}async loadKey(e){let t=this.storage.getItem(e.storageKey);return t?_I(e.keyType,t):null}async storeKey(e,t){let r=await _T(e.keyType,t);this.storage.setItem(e.storageKey,r)}}let _B="4.3.0",_R="@coinbase/wallet-sdk";async function _L(e,t){let r=Object.assign(Object.assign({},e),{jsonrpc:"2.0",id:crypto.randomUUID()}),n=await window.fetch(t,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":_B,"X-Cbw-Sdk-Platform":_R}}),{result:i,error:s}=await n.json();if(s)throw s;return i}let _j="accounts",_F="activeChain",_z="availableChains",_q="walletCapabilities";class _H{constructor(e){var t,r,n;this.metadata=e.metadata,this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new _M,this.storage=new EJ("CBWSDK","SCWStateManager"),this.accounts=null!==(t=this.storage.loadObject(_j))&&void 0!==t?t:[],this.chain=this.storage.loadObject(_F)||{id:null!==(n=null===(r=e.metadata.appChainIds)||void 0===r?void 0:r[0])&&void 0!==n?n:1},this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(e){var t,r,n,i;await (null===(r=(t=this.communicator).waitForPopupLoaded)||void 0===r?void 0:r.call(t));let s=await this.createRequestMessage({handshake:{method:e.method,params:Object.assign({},this.metadata,null!==(n=e.params)&&void 0!==n?n:{})}}),a=await this.communicator.postRequestAndWaitForResponse(s);if("failure"in a.content)throw a.content.failure;let o=await _I("public",a.sender);await this.keyManager.setPeerPublicKey(o);let l=(await this.decryptResponseMessage(a)).result;if("error"in l)throw l.error;if("eth_requestAccounts"===e.method){let e=l.value;this.accounts=e,this.storage.storeObject(_j,e),null===(i=this.callback)||void 0===i||i.call(this,"accountsChanged",e)}}async request(e){var t;if(0===this.accounts.length){if("wallet_sendCalls"===e.method)return this.sendRequestToPopup(e);throw E3.provider.unauthorized()}switch(e.method){case"eth_requestAccounts":return null===(t=this.callback)||void 0===t||t.call(this,"connect",{chainId:_p(this.chain.id)}),this.accounts;case"eth_accounts":return this.accounts;case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return _p(this.chain.id);case"wallet_getCapabilities":return this.storage.loadObject(_q);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"wallet_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);default:if(!this.chain.rpcUrl)throw E3.rpc.internal("No RPC URL set for chain");return _L(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){var t,r;await (null===(r=(t=this.communicator).waitForPopupLoaded)||void 0===r?void 0:r.call(t));let n=await this.sendEncryptedRequest(e),i=(await this.decryptResponseMessage(n)).result;if("error"in i)throw i.error;return i.value}async cleanup(){var e,t;this.storage.clear(),await this.keyManager.clear(),this.accounts=[],this.chain={id:null!==(t=null===(e=this.metadata.appChainIds)||void 0===e?void 0:e[0])&&void 0!==t?t:1}}async handleSwitchChainRequest(e){var t;let r=e.params;if(!r||!(null===(t=r[0])||void 0===t?void 0:t.chainId))throw E3.rpc.invalidParams();let n=_x(r[0].chainId);if(this.updateChain(n))return null;let i=await this.sendRequestToPopup(e);return null===i&&this.updateChain(n),i}async sendEncryptedRequest(e){let t=await this.keyManager.getSharedSecret();if(!t)throw E3.provider.unauthorized("No valid session found, try requestAccounts before other methods");let r=await _P({action:e,chainId:this.chain.id},t),n=await this.createRequestMessage({encrypted:r});return this.communicator.postRequestAndWaitForResponse(n)}async createRequestMessage(e){let t=await _T("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){var t,r;let n=e.content;if("failure"in n)throw n.failure;let i=await this.keyManager.getSharedSecret();if(!i)throw E3.provider.unauthorized("Invalid session");let s=await _O(n.encrypted,i),a=null===(t=s.data)||void 0===t?void 0:t.chains;if(a){let e=Object.entries(a).map(([e,t])=>({id:Number(e),rpcUrl:t}));this.storage.storeObject(_z,e),this.updateChain(this.chain.id,e)}let o=null===(r=s.data)||void 0===r?void 0:r.capabilities;return o&&this.storage.storeObject(_q,o),s}updateChain(e,t){var r;let n=null!=t?t:this.storage.loadObject(_z),i=null==n?void 0:n.find(t=>
44t.id===e);return!!i&&(i!==this.chain&&(this.chain=i,this.storage.storeObject(_F,i),null===(r=this.callback)||void 0===r||r.call(this,"chainChanged",_p(i.id))),!0)}}var _$=r(15875);let _K="Addresses";function _V(e){return void 0!==e.errorMessage}class _G{constructor(e){this.secret=e}async encrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");let r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",_c(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},n,i.encode(e)),a=s.slice(s.byteLength-16),o=s.slice(0,s.byteLength-16),l=new Uint8Array(a),c=new Uint8Array(o);return _l(new Uint8Array([...r,...l,...c]))}async decrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");return new Promise((r,n)=>{!async function(){let i=await crypto.subtle.importKey("raw",_c(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=_c(e),a=s.slice(0,12),o=s.slice(12,28),l=new Uint8Array([...s.slice(28),...o]),c={name:"AES-GCM",iv:new Uint8Array(a)};try{let e=await window.crypto.subtle.decrypt(c,i,l),t=new TextDecoder;r(t.decode(e))}catch(e){n(e)}}()})}}class _W{constructor(e,t,r){this.linkAPIUrl=e,this.sessionId=t;let n=`${t}:${r}`;this.auth=`Basic ${btoa(n)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(e=>fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(e=>console.error("Unabled to mark event as failed:",e))}async fetchUnseenEvents(){var e;let t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){let{events:r,error:n}=await t.json();if(n)throw Error(`Check unseen events failed: ${n}`);let i=null!==(e=null==r?void 0:r.filter(e=>"Web3Response"===e.event).map(e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data})))&&void 0!==e?e:[];return this.markUnseenEventsAsSeen(i),i}throw Error(`Check unseen events failed: ${t.status}`)}}!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(Ce||(Ce={}));class _Z{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw Error("webSocket object is not null");return new Promise((e,t)=>{var r;let n;try{this.webSocket=n=new this.WebSocketClass(this.url)}catch(e){t(e);return}null===(r=this.connectionStateListener)||void 0===r||r.call(this,Ce.CONNECTING),n.onclose
44=e=>{var r;this.clearWebSocket(),t(Error(`websocket error ${e.code}: ${e.reason}`)),null===(r=this.connectionStateListener)||void 0===r||r.call(this,Ce.DISCONNECTED)},n.onopen=t=>{var r;e(),null===(r=this.connectionStateListener)||void 0===r||r.call(this,Ce.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(e=>this.sendData(e)),this.pendingData=[])},n.onmessage=e=>{var t,r;if("h"===e.data)null===(t=this.incomingDataListener)||void 0===t||t.call(this,{type:"Heartbeat"});else try{let t=JSON.parse(e.data);null===(r=this.incomingDataListener)||void 0===r||r.call(this,t)}catch(e){}}})}disconnect(){var e;let{webSocket:t}=this;if(t){this.clearWebSocket(),null===(e=this.connectionStateListener)||void 0===e||e.call(this,Ce.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch(e){}}}sendData(e){let{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}class _J{constructor({session:e,linkAPIUrl:t,listener:r}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=_n(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{e&&new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",t=>e.JsonRpcUrl&&this.handleChainUpdated(t,e.JsonRpcUrl)]]).forEach((t,r)=>{let n=e[r];void 0!==n&&t(n)})},this.handleDestroyed=e=>{var t;"1"===e&&(null===(t=this.listener)||void 0===t||t.resetAndReload())},this.handleAccountUpdated=async e=>{var t;let r=await this.cipher.decrypt(e);null===(t=this.listener)||void 0===t||t.accountUpdated(r)},this.handleMetadataUpdated=async(e,t)=>{var r;let n=await this.cipher.decrypt(t);null===(r=this.listener)||void 0===r||r.metadataUpdated(e,n)},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated("walletUsername",e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated("AppVersion",e)},this.handleChainUpdated=async(e,t)=>{var r;let n=await this.cipher.decrypt(e),i=await this.cipher.decrypt(t);null===(r=this.listener)||void 0===r||r.chainUpdated(n,i)},this.session=e,this.cipher=new _G(e.secret),this.listener=r;let n=new _Z(`${t}/rpc`,WebSocket);n.setConnectionStateListener(async e=>{let t=!1;switch(e){case Ce.DISCONNECTED:if(!this.destroyed){let e=async()=>{await new Promise(e=>setTimeout(e,5e3)),this.destroyed||n.connect().catch(()=>{e()})};e()}break;case Ce.CONNECTED:t=await this.handleConnected(),this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case Ce.CONNECTING:}this.connected!==t&&(this.connected=t)}),n.setIncomingDataListener(e=>{var t;switch(e.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let t="IsLinkedOK"===e.type?e.linked:void 0;this.linked=t||e.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":this.handleSessionMetadataUpdated(e.metadata);break;case"Event":this.handleIncomingEvent(e)}void 0!==e.id&&(null===(t=this.requestResolutions.get(e.id))||void 0===t||t(e))}),this.ws=n,this.http=new _W(t,e.id,e.key)}connect(){if(this.destroyed)throw Error("instance is destroyed");this.ws.connect()}async destroy(){this.destroyed||(await this.makeRequest({type:"SetSessionConfig",id:_n(this.nextReqId++),sessionId:this.session.id,metadata:{__destroyed:"1"}},{timeout:1e3}),this.destroyed=!0,this.ws.disconnect(),this.listener=void 0)}get connected(){return this._connected}set connected(e){this._connected=e}get linked(){return this._linked}set linked(e){var t,r;this._linked=e,e&&(null===(t=this.onceLinked)||void 0===t||t.call(this)),null===(r=this.listener)||void 0===r||r.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if("Event"!==e.type||"Web3Response"!==e.event)return;let r=JSON.parse(await this.cipher.decrypt(e.data));if("WEB3_RESPONSE"!==r.type)return;let{id:n,response:i}=r;null===(t=this.listener)||void 0===t||t.handleWeb3ResponseMessage(n,i)}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEac
44h(e=>this.handleIncomingEvent(e))}async publishEvent(e,t,r=!1){let n=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,location:location.href,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:_n(this.nextReqId++),sessionId:this.session.id,event:e,data:n,callWebhook:r};return this.setOnceLinked(async()=>{let e=await this.makeRequest(i);if("Fail"===e.type)throw Error(e.error||"failed to publish event");return e.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4){this.ws.disconnect();return}try{this.ws.sendData("h")}catch(e){}}async makeRequest(e,t={timeout:6e4}){let r;let n=e.id;return this.sendData(e),Promise.race([new Promise((e,i)=>{r=window.setTimeout(()=>{i(Error(`request ${n} timed out`))},t.timeout)}),new Promise(e=>{this.requestResolutions.set(n,t=>{clearTimeout(r),e(t),this.requestResolutions.delete(n)})})])}async handleConnected(){return"Fail"!==(await this.makeRequest({type:"HostSession",id:_n(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key})).type&&(this.sendData({type:"IsLinked",id:_n(this.nextReqId++),sessionId:this.session.id}),this.sendData({type:"GetSessionConfig",id:_n(this.nextReqId++),sessionId:this.session.id}),!0)}}class _Y{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%0x7fffffff;let e=this._nextRequestId,t=_y(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}var _X=r(43331);let _Q="session:id",_0="session:secret",_1="session:linked";class _2{constructor(e,t,r,n=!1){this.storage=e,this.id=t,this.secret=r,this.key=(0,_X.My)((0,L.sc)(`${t}, ${r} WalletLink`)),this._linked=!!n}static create(e){return new _2(e,_o(16),_o(32)).save()}static load(e){let t=e.getItem(_Q),r=e.getItem(_1),n=e.getItem(_0);return t&&n?new _2(e,t,n,"1"===r):null}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this.storage.setItem(_Q,this.id),this.storage.setItem(_0,this.secret),this.persistLinked(),this}persistLinked(){this.storage.setItem(_1,this._linked?"1":"0")}}function _6(){var e,t;return null!==(t=null===(e=null==window?void 0:window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)&&void 0!==t&&t}function _3(){let e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode('@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}')),document.documentElement.appendChild(e)}function _5(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(n&&(n+=" "),n+=t);return n}
vendor: 9,383 bytes, line 44
44var _8,_7,_4,_9,Ce,Ct,Cr,Cn,Ci,Cs,Ca,Co,Cl,Cc,Cu,Cd,Ch={},Cp=[],Cf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cm=Array.isArray;function Cy(e,t){for(var r in t)e[r]=t[r];return e}function Cb(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Cg(e,t,r){var n,i,s,a={};for(s in t)"key"==s?n=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?Ct.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return Cv(e,a,n,i,null)}function Cv(e,t,r,n,i){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++Cn:i,__i:-1,__u:0};return null==i&&null!=Cr.vnode&&Cr.vnode(s),s}function Cw(e){return e.children}function Cx(e,t){this.props=e,this.context=t}function CE(e,t){if(null==t)return e.__?CE(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?CE(e):null}function C_(e){(!e.__d&&(e.__d=!0)&&Ci.push(e)&&!CC.__r++||Cs!==Cr.debounceRendering)&&((Cs=Cr.debounceRendering)||Ca)(CC)}function CC(){var e,t,r,n,i,s,a,o;for(Ci.sort(Co);e=Ci.shift();)e.__d&&(t=Ci.length,n=void 0,s=(i=(r=e).__v).__e,a=[],o=[],r.__P&&((n=Cy({},i)).__v=i.__v+1,Cr.vnode&&Cr.vnode(n),CI(r.__P,n,i,r.__n,r.__P.namespaceURI,32&i.__u?[s]:null,a,null==s?CE(i):s,!!(32&i.__u),o),n.__v=i.__v,n.__.__k[n.__i]=n,CP(a,n,o),n.__e!=s&&function e(t){var r,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,r=0;r<t.__k.length;r++)if(null!=(n=t.__k[r])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return e(t)}}(n)),Ci.length>t&&Ci.sort(Co));CC.__r=0}function Ck(e,t,r,n,i,s,a,o,l,c,u){var d,h,p,f,m,y,b=n&&n.__k||Cp,g=t.length;for(l=function(e,t,r,n,i){var s,a,o,l,c,u=r.length,d=u,h=0;for(e.__k=Array(i),s=0;s<i;s++)null!=(a=t[s])&&"boolean"!=typeof a&&"function"!=typeof a?(l=s+h,(a=e.__k[s]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?Cv(null,a,null,null,null):Cm(a)?Cv(Cw,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?Cv(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,o=null,-1!==(c=a.__i=function(e,t,r,n){var i,s,a=e.key,o=e.type,l=t[r];if(null===l||l&&a==l.key&&o===l.type&&0==(2&l.__u))return r;if(n>(null!=l&&0==(2&l.__u)?1:0))for(i=r-1,s=r+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&0==(2&l.__u)&&a==l.key&&o===l.type)return i;i--}if(s<t.length){if((l=t[s])&&0==(2&l.__u)&&a==l.key&&o===l.type)return s;s++}}return -1}(a,r,l,d))&&(d--,(o=r[c])&&(o.__u|=2)),null==o||null===o.__v?(-1==c&&h--,"function"!=typeof a.type&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<u;s++)null!=(o=r[s])&&0==(2&o.__u)&&(o.__e==n&&(n=CE(o)),function e(t,r,n){var i,s;if(Cr.unmount&&Cr.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||CO(i,null,r)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){Cr.__e(e,r)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&e(i[s],r,n||"function"!=typeof t.type);n||Cb(t.__e),t.__c=t.__=t.__e=void 0}(o,o));return n}(r,t,b,l,g),d=0;d<g;d++)null!=(p=r.__k[d])&&(h=-1===p.__i?Ch:b[p.__i]||Ch,p.__i=d,y=CI(e,p,h,i,s,a,o,l,c,u),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&CO(h.ref,null,p),u.push(p.ref,p.__c||f,p)),null==m&&null!=f&&(m=f),4&p.__u||h.__k===p.__k?l=function e(t,r,n){var i,s;if("function"==typeof t.type){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,r=e(i[s],r,n));return r}t.__e!=r&&(r&&t.type&&!n.contains(r)&&(r=CE(t)),n.insertBefore(t.__e,r||null),r=t.__e);do r=r&&r.nextSibling;while(null!=r&&8==r.nodeType);return r}(p,l,e):"function"==typeof p.type&&void 0!==y?l=y:f&&(l=f.nextSibling),p.__u&=-7);return r.__e=m,l}function CS(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||Cf.test(t)?r:r+"px"}function CA(e,t,r,n,i){var s;e:if("style"==t){if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||CS(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||CS(e.style,t,r[t])}}else if("o"==t[0]&&"n"==t[1])s=t!=(t=t.replace(Cl,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?n?r.u=n.u:(r.u=Cc,e.addEventListener(t,s?Cd:Cu,s)):e.removeEventListener(t,s?Cd:Cu,s);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function CT(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=Cc++;else if(t.t<r.u)return;return r(Cr.event?Cr.event(t):t)}}}function CI(e,t,r,n,i,s,a,o,l,c){var u,d,h,p,f,m,y,b,g,v,w,x,E,_,C,k,S,A=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(l=!!(32&r.__u),s=[o=t.__e=r.__e]),(u=Cr.__b)&&u(t);e:if("function"==typeof A)try{if(b=t.props,g="prototype"in A&&A.prototype.render,v=(u=A.contextType)&&n[u.__c],w=u?v?v.props.value:u.__:n,r.__c?y=(d=t.__c=r.__c).__=d.__E:(g?t.__c=d=new A(b,w):(t.__c=d=new Cx(b,w),d.constructor=A,d.render=CD),v&&v.sub(d),d.props=b,d.state||(d.state={}),d.context=w,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),g&&null==d.__s&&(d.__s=d.state),g&&null!=A.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Cy({},d.__s)),Cy(d.__s,A.getDerivedStateFromProps(b,d.__s))),p=d.props,f=d.state,d.__v=t,h)g&&null==A.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),g&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(g&&null==A.getDerivedStateFromProps&&b!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,w)||t.__v==r.__v)){for(t.__v!=r.__v&&(d.props=b,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),x=0;x<d._sb.length;x++)d.__h.push(d._sb[x]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,w),g&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(p,f,m)})}if(d.context=w,d.props=b,d.__P=e,d.__e=!1,E=Cr.__r,_=0,g){for(d.state=d.__s,d.__d=!1,E&&E(t),u=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do d.__d=!1,E&&E(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++_<25);d.state=d.__s,null!=d.getChildContext&&(n=Cy(Cy({},n),d.getChildContext())),g&&!h&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(p,f)),o=Ck(e,Cm(k=null!=u&&u.type===Cw&&null==u.key?u.props.children:u)?k:[k],t,r,n,i,s,a,o,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),y&&(d.__E=d.__=null)}catch(e){if(t.__v=null,l||null!=s){if(e.then){for(t.__u|=l?160:128;o&&8==o.nodeType&&o.nextSibling;)o=o.nextSibling;s[s.indexOf(o)]=null,t.__e=o}else for(S=s.length;S--;)Cb(s[S])}else t.__e=r.__e,t.__k=r.__k;Cr.__e(e,t,r)}else null==s&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):o=t.__e=function(e,t,r,n,i,s,a,o,l){var c,u,d,h,p,f,m,y=r.props,b=t.props,g=t.type;if("svg"==g?i="http://www.w3.org/2000/svg":"math"==g?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=s){for(c=0;c<s.length;c++)if((p=s[c])&&"setAttribute"in p==!!g&&(g?p.localName==g:3==p.nodeType)){e=p,s[c]=null;break}}if(null==e){if(null==g)return document.createTextNode(b);e=document.createElementNS(i,g,b.is&&b),o&&(Cr.__m&&Cr.__m(t,s),o=!1),s=null}if(null===g)y===b||o&&e.data===b||(e.data=b);else{if(s=s&&Ct.call(e.childNodes),y=r.props||Ch,!o&&null!=s)for(y={},c=0;c<e.attributes.length;c++)y[(p=e.attributes[c]).name]=p.value;for(c in y)if(p=y[c],"children"==c);else if("dangerouslySetInnerHTML"==c)d=p;else if(!(c in b)){if("value"==c&&"defaultValue"in b||"checked"==c&&"defaultChecked"in b)continue;CA(e,c,null,p,i)}for(c in b)p=b[c],"children"==c?h=p:"dangerouslySetInnerHTML"==c?u=p:"value"==c?f=p:"checked"==c?m=p:o&&"function"!=typeof p||y[c]===p||CA(e,c,p,y[c],i);if(u)o||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),Ck(e,Cm(h)?h:[h],t,r,n,"foreignObject"==g?"http://www.w3.org/1999/xhtml":i,s,a,s?s[0]:r.__k&&CE(r,0),o,l),null!=s)for(c=s.length;c--;)Cb(s[c]);o||(c="value","progress"==g&&null==f?e.removeAttribute("value"):void 0===f||f===e[c]&&("progress"!=g||f)&&("option"!=g||f===y[c])||CA(e,c,f,y[c],i),c="checked",void 0!==m&&m!==e[c]&&CA(e,c,m,y[c],i))}return e}(r.__e,t,r,n,i,s,a,l,c);return(u=Cr.diffed)&&u(t),128&t.__u?void 0:o}function CP(e,t,r){for(var n=0;n<r.length;n++)CO(r[n],r[++n],r[++n]);Cr.__c&&Cr.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Cr.__e(e,t.__v)}})}function CO(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Cr.__e(e,r)}}function CD(e,t,r){return this.constructor(e,r)}function CU(e,t,r){var n,i,s,a;t==document&&(t=document.documentElement),Cr.__&&Cr.__(e,t),i=(n="function"==typeof r)?null:r&&r.__k||t.__k,s=[],a=[],CI(t,e=(!n&&r||t).__k=Cg(Cw,null,[e]),i||Ch,Ch,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?Ct.call(t.childNodes):null,
vendor: 5,009 bytes, line 44
44s,!n&&r?r:i?i.__e:t.firstChild,n,a),CP(s,e,a)}function CN(e,t){CU(e,t,CN)}Ct=Cp.slice,Cr={__e:function(e,t,r,n){for(var i,s,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},Cn=0,Cx.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Cy({},this.state),"function"==typeof e&&(e=e(Cy({},r),this.props)),e&&Cy(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),C_(this))},Cx.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C_(this))},Cx.prototype.render=Cw,Ci=[],Ca="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Co=function(e,t){return e.__v.__b-t.__v.__b},CC.__r=0,Cl=/(PointerCapture)$|Capture$/i,Cc=0,Cu=CT(!1),Cd=CT(!0);var CM,CB,CR,CL,Cj=0,CF=[],Cz=Cr,Cq=Cz.__b,CH=Cz.__r,C$=Cz.diffed,CK=Cz.__c,CV=Cz.unmount,CG=Cz.__;function CW(e,t){Cz.__h&&Cz.__h(CB,e,Cj||t),Cj=0;var r=CB.__H||(CB.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function CZ(e){return Cj=1,function(e,t,r){var n=CW(CM++,2);if(n.t=e,!n.__c&&(n.__=[C0(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=CB,!CB.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!s||s.call(this,e,t,r);var a=n.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),s&&s.call(this,e,t,r)||a};CB.u=!0;var s=CB.shouldComponentUpdate,a=CB.componentWillUpdate;CB.componentWillUpdate=function(e,t,r){if(this.__e){var n=s;s=void 0,i(e,t,r),s=n}a&&a.call(this,e,t,r)},CB.shouldComponentUpdate=i}return n.__N||n.__}(C0,e)}function CJ(){for(var e;e=CF.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(CX),e.__H.__h.forEach(CQ),e.__H.__h=[]}catch(t){e.__H.__h=[],Cz.__e(t,e.__v)}}Cz.__b=function(e){CB=null,Cq&&Cq(e)},Cz.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),CG&&CG(e,t)},Cz.__r=function(e){CH&&CH(e),CM=0;var t=(CB=e.__c).__H;t&&(CR===CB?(t.__h=[],CB.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0})):(t.__h.forEach(CX),t.__h.forEach(CQ),t.__h=[],CM=0)),CR=CB},Cz.diffed=function(e){C$&&C$(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==CF.push(t)&&CL===Cz.requestAnimationFrame||((CL=Cz.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(n),CY&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);CY&&(t=requestAnimationFrame(r))})(CJ)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.i=void 0})),CR=CB=null},Cz.__c=function(e,t){t.some(function(e){try{e.__h.forEach(CX),e.__h=e.__h.filter(function(e){return!e.__||CQ(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],Cz.__e(r,e.__v)}}),CK&&CK(e,t)},Cz.unmount=function(e){CV&&CV(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(e){try{CX(e)}catch(e){t=e}}),r.__H=void 0,t&&Cz.__e(t,r.__v))};var CY="function"==typeof requestAnimationFrame;function CX(e){var t=CB,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),CB=t}function CQ(e){var t=CB;e.__c=e.__(),CB=t}function C0(e,t){return"function"==typeof t?t(e):t}class C1{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=_6()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&CU(Cg("div",null,Cg(C2,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,t])=>Cg(C6,Object.assign({},t,{key:e}))))),this.root)}}let C2=e=>Cg("div",{class:_5("-cbwsdk-snackbar-container")},Cg("style",null,".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;
44cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),Cg("div",{class:"-cbwsdk-snackbar"},e.children)),C6=({autoExpand:e,message:t,menuItems:r})=>{let[n,i]=CZ(!0),[s,a]=CZ(null!=e&&e);return!function(e,t){var r,n,i=CW(CM++,3);!Cz.__s&&(r=i.__H,n=void 0,!r||r.length!==n.length||n.some(function(e,t){return e!==r[t]}))&&(i.__=e,i.i=void 0,CB.__H.__h.push(i))}(()=>{let e=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{a(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),Cg("div",{class:_5("-cbwsdk-snackbar-instance",n&&"-cbwsdk-snackbar-instance-hidden",s&&"-cbwsdk-snackbar-instance-expanded")},Cg("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{a(!s)}},Cg("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",Cg("div",{class:"-cbwsdk-snackbar-instance-header-message"},t),Cg("div",{class:"-gear-container"},!s&&Cg("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Cg("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),Cg("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwu
44NTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&Cg("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map((e,t)=>Cg("div",{class:_5("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},Cg("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Cg("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),Cg("span",{class:_5("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info)))))};class C3{constructor(){this.attached=!1,this.snackbar=new C1}attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,_3()}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}class C5{constructor(){this.root=null,this.darkMode=_6()}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),_3()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&(CU(null,this.root),e&&CU(Cg(C8,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}let C8=({title:e,buttonText:t,darkMode:r,onButtonClick:n,onDismiss:i})=>Cg(C2,{darkMode:r},Cg("div",{class:"-cbwsdk-redirect-dialog"},Cg("style",null,".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}
44.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),Cg("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),Cg("div",{class:_5("-cbwsdk-redirect-dialog-box",r?"dark":"light")},Cg("p",null,e),Cg("button",{onClick:n},t)))),C7="https://www.walletlink.org";class C4{constructor(){this.attached=!1,this.redirectDialog=new C5}attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){let t=new URL("https://go.cb-w.com/walletlink");t.searchParams.append("redirect_url",function(){try{if(function(){try{return null!==window.frameElement}catch(e){return!1}}()&&window.top)return window.top.location;return window.location}catch(e){return window.location}}().href),e&&t.searchParams.append("wl_url",e);let r=document.createElement("a");r.target="cbw-opener",r.href=t.href,r.rel="noreferrer noopener",r.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}class C9{constructor(e){this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null===(e=null==window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)}(),this.linkedUpdated=e=>{this.isLinked=e;let t=this.storage.getItem(_K);if(e&&(this._session.linked=e),this.isUnlinkedErrorState=!1,t){let r=t.split(" "),n="true"===this.storage.getItem("IsStandaloneSigning");""===r[0]||e||!this._session.linked||n||(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(e,t)=>{this.storage.setItem(e,t)},this.chainUpdated=(e,t)=>{(this.chainCallbackParams.chainId!==e||this.chainCallbackParams.jsonRpcUrl!==t)&&(this.chainCallbackParams={chainId:e,jsonRpcUrl:t},this.chainCallback&&this.chainCallback(t,Number.parseInt(e,10)))},this.accountUpdated=e=>{this.accountsCallback&&this.accountsCallback([e]),C9.accountRequestCallbackIds.size>0&&(Array.from(C9.accountRequestCallbackIds.values()).forEach(t=>{this.invokeCallback(t,{method:"requestEthereumAccounts",result:[e]})}),C9.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.metadata=e.metadata,this.accountsCallback=e.accountsCallback,this.chainCallback=e.chainCallback;let{session:t,ui:r,connection:n}=this.subscribe();this._session=t,this.connection=n,this.relayEventManager=new _Y,this.ui=r,this.ui.attach()}subscribe(){let e=_2.load(this.storage)||_2.create(this.storage),{linkAPIUrl:t}=this,r=new _J({session:e,linkAPIUrl:t,listener:this}),n=this.isMobileWeb?new C4:new C3;return r.connect(),{session:e,ui:n,connection:r}}resetAndReload(){this.connection.destroy().then(()=>{let e=_2.load(this.storage);(null==e?void 0:e.id)===this._session.id&&EJ.clearAll(),document.location.reload()}).catch(e=>{})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:_h(e.weiValue),data:_u(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?_h(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?_h(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?_h(e.gasPriceInWei):null,gasLimit:e.gasLim
vendor: 4,186 bytes, line 44
44it?_h(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:_h(e.weiValue),data:_u(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?_h(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?_h(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?_h(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?_h(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:_u(e,!0),chainId:t}})}getWalletLinkSession(){return this._session}sendRequest(e){let t=null,r=_o(8),n=n=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,n),null==t||t()};return new Promise((i,s)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(r,e=>{if(null==t||t(),_V(e))return s(Error(e.errorMessage));i(e)}),this.publishWeb3RequestEvent(r,e)})}publishWeb3RequestEvent(e,t){let r={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",r,!0).then(e=>{}).catch(e=>{this.handleWeb3ResponseMessage(r.id,{method:t.method,errorMessage:e.message})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof C4)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink()}}publishWeb3RequestCanceledEvent(e){this.publishEvent("Web3RequestCanceled",{type:"WEB3_REQUEST_CANCELED",id:e},!1).then()}publishEvent(e,t,r){return this.connection.publishEvent(e,t,r)}handleWeb3ResponseMessage(e,t){if("requestEthereumAccounts"===t.method){C9.accountRequestCallbackIds.forEach(e=>this.invokeCallback(e,t)),C9.accountRequestCallbackIds.clear();return}this.invokeCallback(e,t)}handleErrorResponse(e,t,r){var n;let i=null!==(n=null==r?void 0:r.message)&&void 0!==n?n:"Unspecified error message.";this.handleWeb3ResponseMessage(e,{method:t,errorMessage:i})}invokeCallback(e,t){let r=this.relayEventManager.callbacks.get(e);r&&(r(t),this.relayEventManager.callbacks.delete(e))}requestEthereumAccounts(){let{appName:e,appLogoUrl:t}=this.metadata,r={method:"requestEthereumAccounts",params:{appName:e,appLogoUrl:t}},n=_o(8);return new Promise((e,t)=>{this.relayEventManager.callbacks.set(n,r=>{if(_V(r))return t(Error(r.errorMessage));e(r)}),C9.accountRequestCallbackIds.add(n),this.publishWeb3RequestEvent(n,r)})}watchAsset(e,t,r,n,i,s){let a={method:"watchAsset",params:{type:e,options:{address:t,symbol:r,decimals:n,image:i},chainId:s}},o=null,l=_o(8);return o=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:e=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,e),null==o||o()},onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(l,r=>{if(null==o||o(),_V(r))return t(Error(r.errorMessage));e(r)}),this.publishWeb3RequestEvent(l,a)})}addEthereumChain(e,t,r,n,i,s){let a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:i,iconUrls:r,nativeCurrency:s}},o=null,l=_o(8);return o=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:e=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,e),null==o||o()},onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(l,r=>{if(null==o||o(),_V(r))return t(Error(r.errorMessage));e(r)}),this.publishWeb3RequestEvent(l,a)})}switchEthereumChain(e,t){let r={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},n=null,i=_o(8);return n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:e=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,r.method,e),null==n||n()},onResetConnection:this.resetAndReload}),new Promise((e,t)=>
44{this.relayEventManager.callbacks.set(i,r=>(null==n||n(),_V(r)&&r.errorCode)?t(E3.provider.custom({code:r.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):_V(r)?t(Error(r.errorMessage)):void e(r)),this.publishWeb3RequestEvent(i,r)})}}C9.accountRequestCallbackIds=new Set;var ke=r(75927).hp;let kt="DefaultChainId",kr="DefaultJsonRpcUrl";class kn{constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new EJ("walletlink",C7),this.callback=e.callback||null;let t=this._storage.getItem(_K);if(t){let e=t.split(" ");""!==e[0]&&(this._addresses=e.map(e=>_v(e)))}this.initializeRelay()}getSession(){let{id:e,secret:t}=this.initializeRelay().getWalletLinkSession();return{id:e,secret:t}}async handshake(){await this._eth_requestAccounts()}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(kr))&&void 0!==e?e:void 0}set jsonRpcUrl(e){this._storage.setItem(kr,e)}updateProviderInfo(e,t){var r;this.jsonRpcUrl=e;let n=this.getChainId();this._storage.setItem(kt,t.toString(10)),_x(t)!==n&&(null===(r=this.callback)||void 0===r||r.call(this,"chainChanged",_p(t)))}async watchAsset(e){let t=Array.isArray(e)?e[0]:e;if(!t.type)throw E3.rpc.invalidParams("Type is required");if((null==t?void 0:t.type)!=="ERC20")throw E3.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(null==t?void 0:t.options))throw E3.rpc.invalidParams("Options are required");if(!(null==t?void 0:t.options.address))throw E3.rpc.invalidParams("Address is required");let r=this.getChainId(),{address:n,symbol:i,image:s,decimals:a}=t.options,o=this.initializeRelay(),l=await o.watchAsset(t.type,n,i,a,s,null==r?void 0:r.toString());return!_V(l)&&!!l.result}async addEthereumChain(e){var t,r;let n=e[0];if((null===(t=n.rpcUrls)||void 0===t?void 0:t.length)===0)throw E3.rpc.invalidParams("please pass in at least 1 rpcUrl");if(!n.chainName||""===n.chainName.trim())throw E3.rpc.invalidParams("chainName is a required field");if(!n.nativeCurrency)throw E3.rpc.invalidParams("nativeCurrency is a required field");let i=Number.parseInt(n.chainId,16);if(i===this.getChainId())return!1;let s=this.initializeRelay(),{rpcUrls:a=[],blockExplorerUrls:o=[],chainName:l,iconUrls:c=[],nativeCurrency:u}=n,d=await s.addEthereumChain(i.toString(),a,c,o,l,u);if(_V(d))return!1;if((null===(r=d.result)||void 0===r?void 0:r.isApproved)===!0)return this.updateProviderInfo(a[0],i),null;throw E3.rpc.internal("unable to add ethereum chain")}async switchEthereumChain(e){let t=Number.parseInt(e[0].chainId,16),r=this.initializeRelay(),n=await r.switchEthereumChain(t.toString(10),this.selectedAddress||void 0);if(_V(n))throw n;let i=n.result;return i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,t),null}async cleanup(){this.callback=null,this._relay&&this._relay.resetAndReload(),this._storage.clear()}_setAddresses(e,t){var r;if(!Array.isArray(e))throw Error("addresses is not an array");let n=e.map(e=>_v(e));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,null===(r=this.callback)||void 0===r||r.call(this,"accountsChanged",n),this._storage.setItem(_K,n.join(" ")))}async request(e){let t=e.params||[];switch(e.method){case"eth_accounts":return[...this._addresses];case"eth_coinbase":return this.selectedAddress||null;case"net_version":return this.getChainId().toString(10);case"eth_chainId":return _p(this.getChainId());case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_ecRecover":case"personal_ecRecover":return this.ecRecover(e);case"personal_sign":return this.personalSign(e);case"eth_signTransaction":return this._eth_signTransaction(t);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(t);case"eth_sendTransaction":return this._eth_sendTransaction(t);case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":return this.signTypedData(e);case"wallet_addEthereumChain":return this.addEthereumChain(t);case"wallet_switchEthereumChain":return this.switchEthereumChain(t);case"wallet_watchAsset":return this.watchAsset(t);default:if(!this.jsonRpcUrl)throw E3.rpc.internal("No RPC URL set for chain");return _L(e,this.jsonRpcUrl)}}_ensureKnownAddress(e){let t=_v(e);
44if(!this._addresses.map(e=>_v(e)).includes(t))throw Error("Unknown Ethereum address")}_prepareTransactionParams(e){let t=e.from?_v(e.from):this.selectedAddress;if(!t)throw Error("Ethereum address is unavailable");this._ensureKnownAddress(t);let r=e.to?_v(e.to):null,n=null!=e.value?_E(e.value):BigInt(0),i=e.data?_w(e.data):ke.alloc(0),s=null!=e.nonce?_x(e.nonce):null,a=null!=e.gasPrice?_E(e.gasPrice):null,o=null!=e.maxFeePerGas?_E(e.maxFeePerGas):null;return{fromAddress:t,toAddress:r,weiValue:n,data:i,nonce:s,gasPriceInWei:a,maxFeePerGas:o,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?_E(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?_E(e.gas):null,chainId:e.chainId?_x(e.chainId):this.getChainId()}}async ecRecover(e){let{method:t,params:r}=e;if(!Array.isArray(r))throw E3.rpc.invalidParams();let n=this.initializeRelay(),i=await n.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:_d(r[0]),signature:_d(r[1]),addPrefix:"personal_ecRecover"===t}});if(_V(i))throw i;return i.result}getChainId(){var e;return Number.parseInt(null!==(e=this._storage.getItem(kt))&&void 0!==e?e:"1",10)}async _eth_requestAccounts(){var e,t;if(this._addresses.length>0)return null===(e=this.callback)||void 0===e||e.call(this,"connect",{chainId:_p(this.getChainId())}),this._addresses;let r=this.initializeRelay(),n=await r.requestEthereumAccounts();if(_V(n))throw n;if(!n.result)throw Error("accounts received is empty");return this._setAddresses(n.result),null===(t=this.callback)||void 0===t||t.call(this,"connect",{chainId:_p(this.getChainId())}),this._addresses}async personalSign({params:e}){if(!Array.isArray(e))throw E3.rpc.invalidParams();let t=e[1],r=e[0];this._ensureKnownAddress(t);let n=this.initializeRelay(),i=await n.sendRequest({method:"signEthereumMessage",params:{address:_v(t),message:_d(r),addPrefix:!0,typedDataJson:null}});if(_V(i))throw i;return i.result}async _eth_signTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),r=this.initializeRelay(),n=await r.signEthereumTransaction(t);if(_V(n))throw n;return n.result}async _eth_sendRawTransaction(e){let t=_w(e[0]),r=this.initializeRelay(),n=await r.submitEthereumTransaction(t,this.getChainId());if(_V(n))throw n;return n.result}async _eth_sendTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),r=this.initializeRelay(),n=await r.signAndSubmitEthereumTransaction(t);if(_V(n))throw n;return n.result}async signTypedData(e){let{method:t,params:r}=e;if(!Array.isArray(r))throw E3.rpc.invalidParams();let n=r["eth_signTypedData_v1"===t?1:0],i=r["eth_signTypedData_v1"===t?0:1];this._ensureKnownAddress(n);let s=this.initializeRelay(),a=await s.sendRequest({method:"signEthereumMessage",params:{address:_v(n),message:_u(({eth_signTypedData_v1:_$.hashForSignTypedDataLegacy,eth_signTypedData_v3:_$.hashForSignTypedData_v3,eth_signTypedData_v4:_$.hashForSignTypedData_v4,eth_signTypedData:_$.hashForSignTypedData_v4})[t]({data:function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw E3.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}(i)}),!0),typedDataJson:JSON.stringify(i,null,2),addPrefix:!1}});if(_V(a))throw a;return a.result}initializeRelay(){return this._relay||(this._relay=new C9({linkAPIUrl:C7,storage:this._storage,metadata:this.metadata,accountsCallback:this._setAddresses.bind(this),chainCallback:this.updateProviderInfo.bind(this)})),this._relay}}let ki="SignerType",ks=new EJ("CBWSDK","SignerConfigurator");async function ka(e){let{communicator:t,metadata:r,handshakeRequest:n,callback:i}=e;ko(t,r,i).catch(()=>{});let s={id:crypto.randomUUID(),event:"selectSignerType",data:Object.assign(Object.assign({},e.preference),{handshakeRequest:n})},{data:a}=await t.postRequestAndWaitForResponse(s);return a}async function ko(e,t,r){await e.onMessage(({event:e})=>"WalletLinkSessionRequest"===e);let n=new kn({metadata:t,callback:r});e.postMessage({event:"WalletLinkUpdate",data:{session:n.getSession()}}),await n.handshake(),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}let kl=`Coinbase Wallet SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Coinbase Smart Wallet app.
45
46Please see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.`,{checkCrossOriginOpenerPolicy:kc,getCrossOriginOpenerPolicy:ku}=(()=>{let e;return{getCrossOriginOpenerPolicy:()=>void 0===e?"undefined":e,checkCrossOriginOpenerPolicy:async()=>
46{if("undefined"==typeof window){e="non-browser-env";return}try{let t=`${window.location.origin}${window.location.pathname}`,r=await fetch(t,{method:"HEAD"});if(!r.ok)throw Error(`HTTP error! status: ${r.status}`);let n=r.headers.get("Cross-Origin-Opener-Policy");e=null!=n?n:"null","same-origin"===e&&console.error(kl)}catch(t){console.error("Error checking Cross-Origin-Opener-Policy:",t.message),e="error"}}}})();class kd{constructor({url:e="https://keys.coinbase.com/connect",metadata:t,preference:r}){this.popup=null,this.listeners=new Map,this.postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)},this.postRequestAndWaitForResponse=async e=>{let t=this.onMessage(({requestId:t})=>t===e.id);return this.postMessage(e),await t},this.onMessage=async e=>new Promise((t,r)=>{let n=r=>{if(r.origin!==this.url.origin)return;let i=r.data;e(i)&&(t(i),window.removeEventListener("message",n),this.listeners.delete(n))};window.addEventListener("message",n),this.listeners.set(n,{reject:r})}),this.disconnect=()=>{(function(e){e&&!e.closed&&e.close()})(this.popup),this.popup=null,this.listeners.forEach(({reject:e},t)=>{e(E3.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(this.popup=function(e){let t=(window.innerWidth-420)/2+window.screenX,r=(window.innerHeight-540)/2+window.screenY;(function(e){for(let[t,r]of Object.entries({sdkName:_R,sdkVersion:_B,origin:window.location.origin,coop:ku()}))e.searchParams.append(t,r.toString())})(e);let n=`wallet_${crypto.randomUUID()}`,i=window.open(e,n,`width=420, height=540, left=${t}, top=${r}`);if(null==i||i.focus(),!i)throw E3.rpc.internal("Pop up window failed to open");return i}(this.url),this.onMessage(({event:e})=>"PopupUnload"===e).then(this.disconnect).catch(()=>{}),this.onMessage(({event:e})=>"PopupLoaded"===e).then(e=>{this.postMessage({requestId:e.id,data:{version:_B,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw E3.rpc.internal();return this.popup})),this.url=new URL(e),this.metadata=t,this.preference=r}}class kh extends xl.b{}var kp=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};class kf extends kh{constructor(e){var{metadata:t}=e,r=e.preference,{keysUrl:n}=r,i=kp(r,["keysUrl"]);super(),this.signer=null,this.isCoinbaseWallet=!0,this.metadata=t,this.preference=i,this.communicator=new kd({url:n,metadata:t,preference:i});let s=ks.getItem(ki);s&&(this.signer=this.initSigner(s))}async request(e){try{if(!function(e){if(!e||"object"!=typeof e||Array.isArray(e))throw E3.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw E3.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw E3.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e});switch(t){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw E3.provider.unsupportedMethod()}}(e),!this.signer)switch(e.method){case"eth_requestAccounts":{let t=await this.requestSignerSelection(e),r=this.initSigner(t);await r.handshake(e),this.signer=r,ks.setItem(ki,t);break}case"wallet_sendCalls":{let t=this.initSigner("scw");await t.handshake({method:"handshake"});let r=await t.request(e);return await t.cleanup(),r}case"wallet_getCallsStatus":return _L(e,"http://rpc.wallet.coinbase.com");case"net_version":return 1;case"eth_chainId":return _p(1);default:throw E3.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")}return await this.signer.request(e)}catch(t){let{code:e}=t;return e===EY.provider.unauthorized&&this.disconnect(),Promise.reject(function(e){let t=function(e,{shouldIncludeStack:t=!1}={}){var r,n;let i={};return e&&"object"==typeof e&&!Array.isArray(e)&&E2(e,"code")&&Number.isInteger(r=e.code)&&(EX[r.toString()]||(n=r)>=-32099&&n<=-32e3)?(i.code=e.code,e.message&&"string"==typeof e.message?(i.message=e.message,E2(e,"data")&&(i.data=e.data)):(i.message=E0(i.code),i.data={originalError:E1(e)})):(i.code=EY.rpc.internal,i.message=E6(e,"message")?e.message:EQ,i.data={originalError:E1(e)}),t&&(i.stack=E6(e,"stack")?e.stack:void 0),i}(function(e){var t;if("string"==typeof e)return{message:e,code:EY.rpc.internal};if(_V(e)){let r=e.errorMessage,n=null!==(t=e.errorCode)&&void 0!==t?t:r.match(/(denied|rejected)/i)?EY.provider.userRejectedRequest:void 0;return Object.assign(Object.assign({},e),{message:r,code:n,data:{method:e.method}})}return e}(e),{shouldIncludeStack:!0}
46),r=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");return r.searchParams.set("version",_B),r.searchParams.set("code",t.code.toString()),r.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:r.href})}(t))}}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){var e;await (null===(e=this.signer)||void 0===e?void 0:e.cleanup()),this.signer=null,EJ.clearAll(),this.emit("disconnect",E3.provider.disconnected("User initiated disconnection"))}requestSignerSelection(e){return ka({communicator:this.communicator,preference:this.preference,metadata:this.metadata,handshakeRequest:e,callback:this.emit.bind(this)})}initSigner(e){return function(e){let{signerType:t,metadata:r,communicator:n,callback:i}=e;switch(t){case"scw":return new _H({metadata:r,callback:i,communicator:n});case"walletlink":return new kn({metadata:r,callback:i})}}({signerType:e,metadata:this.metadata,communicator:this.communicator,callback:this.emit.bind(this)})}}class km{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||function(){let e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?`${t}//${r}/favicon.ico`:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}(),appChainIds:e.appChainIds||[]},this.storeLatestVersion(),kc()}makeWeb3Provider(e={options:"all"}){var t;!function(e){if(e){if(!["all","smartWalletOnly","eoaOnly"].includes(e.options))throw Error(`Invalid options: ${e.options}`);if(e.attribution&&void 0!==e.attribution.auto&&void 0!==e.attribution.dataSuffix)throw Error("Attribution cannot contain both auto and dataSuffix properties")}}(e);let r={metadata:this.metadata,preference:e};return null!==(t=function({metadata:e,preference:t}){var r,n;let{appName:i,appLogoUrl:s,appChainIds:a}=e;if("smartWalletOnly"!==t.options){let e=globalThis.coinbaseWalletExtension;if(e)return null===(r=e.setAppInfo)||void 0===r||r.call(e,i,s,a,t),e}let o=function(){var e,t;try{let r=globalThis;return null!==(e=r.ethereum)&&void 0!==e?e:null===(t=r.top)||void 0===t?void 0:t.ethereum}catch(e){return}}();if(null==o?void 0:o.isCoinbaseBrowser)return null===(n=o.setAppInfo)||void 0===n||n.call(o,i,s,a,t),o}(r))&&void 0!==t?t:new kf(r)}getCoinbaseWalletLogo(e,t=240){return EZ(e,t)}storeLatestVersion(){new EJ("CBWSDK").setItem("VERSION",_B)}}let ky=function(){let{appLogoUrl:e,appName:t,evmNetworks:r,walletPreference:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=null==r?void 0:r.map(e=>Number(e.chainId));return(null==r?void 0:r.some(e=>84532===e.chainId))&&(null==i||i.sort((e,t)=>84532===e?-1:84532===t?1:0)),(null==r?void 0:r.some(e=>8453===e.chainId))&&(null==i||i.sort((e,t)=>8453===e?-1:8453===t?1:0)),s||(s=new km({appChainIds:i,appLogoUrl:e,appName:t}).makeWeb3Provider({options:null!=n?n:"all"})),s};class kb extends du{get coinbaseProvider(){return ky(this.coinbaseProviderOpts)}getConnectedAccounts(){return pf(this,void 0,void 0,function*(){try{let e=yield this.coinbaseProvider.request({method:"eth_accounts"});return e[0]&&this.setActiveAccount(this.parseAddress(e[0])),e.map(this.parseAddress)}catch(e){return[]}})}isInstalledOnBrowser(){var e,t;return!!(null===(e=null==window?void 0:window.coinbaseWalletExtension)||void 0===e?void 0:e.isCoinbaseWallet)||!!(null===(t=null==window?void 0:window.ethereum)||void 0===t?void 0:t.isCoinbaseWallet)}getAddress(){return pf(this,void 0,void 0,function*(){let[e]=yield this.coinbaseProvider.request({method:"eth_requestAccounts"}),t=this.parseAddress(e);return this.setActiveAccount(t),t})}signMessage(e){return pf(this,void 0,void 0,function*(){let[t]=yield this.coinbaseProvider.request({method:"eth_requestAccounts"}),r=this.parseAddress(t);try{return yield this.coinbaseProvider.request({method:"personal_sign",params:[(0,M.nj)((0,N.ZJ)(e)),r]})}catch(e){return}})}setupEventListeners(){let{handleAccountChange:e,handleChainChange:t,handleDisconnect:r}=(0,P.AG)(this);this.coinbaseProvider.on("accountsChanged",e),this.coinbaseProvider.on("chainChanged",t),this.coinbaseProvider.on("disconnect",r),this.teardownEventListeners=()=>{this.coinbaseProvider.removeListener("accountsChanged",e),this.coinbaseProvider.removeListener("chainChanged",t),this.coinbaseProvider.removeListener("disconnect",r)}}getWalletClient(e){return dn({account:this.getActiveAccount(),chain:e?cc[e]:this.getActiveChain(),transport:(0,di.I)(this.coinbaseProvider)})}constructor(e){var{appName:t,appLogoUrl:r,evmNetworks:n,coinbaseWalletPreference:i}=e;super(Object.assign({evmNetworks:n},function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}(e,["appName","appLogoUrl","evmNetworks","coinbaseWalletPreference"]))),this.name="Coinbase",this.overrideKey="c
46oinbase",this.canConnectViaQrCode=!1,this.canConnectViaCustodialService=!this.isInstalledOnBrowser(),this.coinbaseProviderOpts={appLogoUrl:r,appName:t,evmNetworks:n,walletPreference:i}}}var kg=r(23512);let kv=e=>{let t=null,r=null;return e.on("display_uri",e=>{t!==e&&(t=e,r=e.trim())}),{consumeDisplayUri:()=>pf(void 0,void 0,void 0,function*(){let e=r;return e?(r=null,e):new Promise(e=>{let t=null,n=null,i=()=>{t&&clearTimeout(t),n&&clearInterval(n)};t=setTimeout(()=>{i(),e(void 0)},1e3),n=setInterval(()=>{r&&(i(),e(r),r=null)},10)})})}},kw=e=>new Promise(t=>{e.once("connect",()=>t())}),kx=e=>"object"==typeof e&&null!==e&&"message"in e&&e.message.includes("Request of type 'wallet_requestPermissions' already pending for origin"),kE=null,k_=null,kC=(0,I.yQ)();class kk extends xf{isInstalledOnBrowser(){var e;return!!(null===(e=this.ethProviderHelper)||void 0===e?void 0:e.eip6963ProviderLookup(this.rdns))}getSupportedNetworks(){return pf(this,void 0,void 0,function*(){return this.evmNetworks.map(e=>e.chainId.toString())})}get metaMaskSDK(){if(!kE)throw Error("MetaMaskSDK not initialized");return kE}set metaMaskSDK(e){kE=e}get metaMaskSDKDisplayUriState(){if(!k_)throw Error("MetaMaskSDKDisplayUriState not initialized");return k_}createMetaMaskSDK(){let e={iconUrl:this.appLogoUrl,name:this.appName,url:I.fP.getOrigin()};k_=kv(kE=new kg.MetaMaskSDK({checkInstallationImmediately:!0,dappMetadata:e,enableAnalytics:!1,extensionOnly:this.isInstalledOnBrowser(),headless:!0,injectProvider:!1,openDeeplink:I.fP.openURL,preferDesktop:!(0,I.Fr)(),readonlyRPCMap:kS(this.evmNetworkRpcMap()),useDeeplink:!0}))}endSession(){return pf(this,void 0,void 0,function*(){return(kC.postEvent("disconnect"),(0,I.Fr)())?this.metaMaskSDK.terminate().then(()=>(kE=null,k_=null,this.createMetaMaskSDK())):this.metaMaskSDK.terminate()})}getAddress(e){return pf(this,void 0,void 0,function*(){return new Promise((t,r)=>{if(!(0,I.Fr)()&&(null==e?void 0:e.onDisplayUri)&&this.metaMaskSDKDisplayUriState.consumeDisplayUri().then(t=>{var n;if(!t){r(Error("MetaMask display uri not found"));return}null===(n=null==e?void 0:e.onDisplayUri)||void 0===n||n.call(e,t)}),this.shouldDeepLinkToMetaMaskInAppBrowser()&&this.metadata.inAppBrowserUrl){window.location.href="".concat(this.metadata.inAppBrowserUrl,"/").concat(window.location.href),t(void 0);return}this.getConnectedAccountsSafely().then(e=>pf(this,void 0,void 0,function*(){if(e.length){t(this.parseAddress(e[0]));return}try{yield this.metaMaskSDK.connect()}catch(e){if(kx(e))yield kw(this.getProvider());else throw e}t((yield this.getConnectedAccounts())[0])}))})})}getConnectedAccountsSafely(){return pf(this,void 0,void 0,function*(){try{return yield this.getConnectedAccounts()}catch(e){return xv.error(e),[]}})}getConnectedAccounts(){return pf(this,void 0,void 0,function*(){yield this.metaMaskSDK.sdkInitPromise;let e=this.getProvider();if(!e)return[];let t=yield(0,I.Z8)(()=>e.request({method:"eth_accounts",params:[]}),{fallbackValue:[],timeoutMs:1e3});return(null==t?void 0:t.length)?t.map(this.parseAddress):[]})}signMessage(e){return pf(this,void 0,void 0,function*(){yield this.metaMaskSDK.sdkInitPromise;let t=!this.isInAppBrowser&&(0,I.Fr)()?kA():Promise.resolve();if(!this.getProvider())return;let[r]=yield this.getConnectedAccounts();if(!r)return;let n=this.getWalletClientForAddress(r);if(!n)return;let i=yield n.signMessage({message:e});return yield t,i})}chooseAccountsToConnect(){return pf(this,void 0,void 0,function*(){return[]})}getWalletClient(e){let t=this.getProvider();if(!t)return;let r=t.getSelectedAddress();return this.getWalletClientForAddress(r||void 0,e)}get rdns(){let{rdns:e}=this.metadata;if(!e)throw Error("rdns not found in metadata");return e}setupEventListeners(){return pf(this,void 0,void 0,function*(){yield this.metaMaskSDK.sdkInitPromise;let e=this.getProvider();if(!e)return;let{handleAccountChange:t,handleChainChange:r,handleDisconnect:n}=(0,P.AG)(this),i=e=>{kC.isEventRecent("disconnect",1e3)||t(e)};e.on("accountsChanged",i),e.on("chainChanged",r),e.on("disconnect",n),this.teardownEventListeners=()=>{e.off("accountsChanged",i),e.off("chainChanged",r),e.off("disconnect",n)}})}getNetwork(){let e=Object.create(null,{getNetwork:{get:()=>super.getNetwork}});return pf(this,void 0,void 0,function*(){return yield this.metaMaskSDK.sdkInitPromise,yield e.getNetwork.c
46all(this)})}getProvider(){var e;return null!==(e=this.metaMaskSDK.getProvider())&&void 0!==e?e:this.metaMaskSDK.getMobileProvider()}evmNetworkByChainId(e){return this.evmNetworks.find(t=>t.chainId===e)}getWalletClientForAddress(e,t){var r,n;let i=this.getProvider();if(!i)return;let s=null!==(n=null!==(r=this.toInt(t))&&void 0!==r?r:this.getCurrentChainId())&&void 0!==n?n:"1",a=this.evmNetworkByChainId(s);return dn({account:e,chain:a?cI(a):this.getActiveChain(),transport:(0,di.I)(i)})}toInt(e){if(e)try{return parseInt(e)}catch(e){xv.debug(e);return}}getCurrentChainId(){let e=this.getProvider();if(!e)return;let t=e.getChainId();return(0,j.q)(t)?parseInt(t):t}getIsInAppBrowser(){var e,t;return!!(0,I.Fr)()&&!!((null===(e=this.ethProviderHelper)||void 0===e?void 0:e.eip6963ProviderLookup(this.rdns))||(null===(t=this.ethProviderHelper)||void 0===t?void 0:t.getInjectedProvider()))}shouldDeepLinkToMetaMaskInAppBrowser(){return!!(!this.isInAppBrowser&&(0,I.Fr)())&&"in-app-browser"===this.mobileExperience&&!!this.metadata.inAppBrowserUrl}constructor(e){super(e),this.name="MetaMask",this.overrideKey="metamask",this.canConnectViaQrCode=!0,this.isInAppBrowser=!1,this.appName=e.appName,this.appLogoUrl=e.appLogoUrl,this.isInAppBrowser=this.getIsInAppBrowser(),kE||this.createMetaMaskSDK()}}let kS=e=>Object.keys(e).reduce((t,r)=>Object.assign(Object.assign({},t),{[(0,M.nj)(parseInt(r))]:e[r]}),{}),kA=()=>new Promise(e=>{window.addEventListener("focus",e)}).then(()=>new Promise(e=>setTimeout(e,1e3))),kT=e=>[...xx,...xk(e),...EG(e),...EV(e),kk,kb,xb,EW()];(0,E.R)("@dynamic-labs/ethereum","4.6.3")},2679:(e,t,r)=>{"use strict";r.d(t,{s:()=>S});var n=r(99393),i=r(43331);class s extends i.Vw{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.sd)(e);let r=(0,i.ZJ)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let s=this.blockLen,a=new Uint8Array(s);a.set(r.length>s?e.create().update(r).digest():r);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),a.fill(0)}update(e){return(0,n.CC)(this),this.iHash.update(e),this}digestInto(e){(0,n.CC)(this),(0,n.DO)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let a=(e,t,r)=>new s(e,t).update(r).digest();a.create=(e,t)=>new s(e,t);var o=r(7385),l=r(58002);let c=BigInt(0),u=BigInt(1);function d(e,t){let r=t.negate();return e?r:t}function h(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function p(e,t){return h(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}let f=new WeakMap,m=new WeakMap;function y(e){return m.get(e)||1}function b(e){return(0,o.jr)(e.Fp),(0,l.Q5)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,o.LH)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function g(e){void 0!==e.lowS&&(0,l.e8)("lowS",e.lowS),void 0!==e.prehash&&(0,l.e8)("prehash",e.prehash)}let{Ph:v,aT:w}=l;class x extends Error{constructor(e=""){super(e)}}let E={Err:x,_tlv:{encode:(e,t)=>{let{Err:r}=E;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=l.zW(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let s=n>127?l.zW(i.length/2|128):"";return l.zW(e)+s+i+t},decode(e,t){let{Err:r}=E,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],s=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let a=t.subarray(n,n+e);
46if(a.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===a[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of a)s=s<<8|e;if(n+=e,s<128)throw new r("tlv.decode(long): not minimal encoding")}else s=i;let a=t.subarray(n,n+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(n+s)}}},_int:{encode(e){let{Err:t}=E;if(e<_)throw new t("integer: negative integers are not allowed");let r=l.zW(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=E;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return v(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=E,i="string"==typeof e?w(e):e;l.DO(i);let{v:s,l:a}=n.decode(48,i);if(a.length)throw new t("invalid signature: left bytes after parsing");let{v:o,l:c}=n.decode(2,s),{v:u,l:d}=n.decode(2,c);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(o),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=E,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}},_=BigInt(0),C=BigInt(1),k=(BigInt(2),BigInt(3));function S(e,t){let r=t=>(function(e){let t=function(e){let t=b(e);return l.Q5(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,i=r.BYTES+1,s=2*r.BYTES+1;function a(e){return(0,o.zi)(e,n)}function v(e){return(0,o.B8)(e,n)}let{ProjectivePoint:w,normPrivateKeyToScalar:x,weierstrassEquation:S,isWithinCurveOrder:A}=function(e){var t;let r=function(e){let t=b(e);l.Q5(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=r,i=(0,o.D0)(r.n,r.nBitLength),s=r.toBytes||((e,t,r)=>{let i=t.toAffine();return l.Id(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),a=r.fromBytes||(e=>{let t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function g(e){let{a:t,b:i}=r,s=n.sqr(e),a=n.mul(s,e);return n.add(n.add(a,n.mul(e,t)),i)}if(!n.eql(n.sqr(r.Gy),g(r.Gx)))throw Error("bad generator point: equation left != right");function v(e){let t;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:s,n:a}=r;if(n&&"bigint"!=typeof e){if(l.aY(e)&&(e=l.My(e)),"string"!=typeof e||!n.includes(e.length))throw Error("invalid private key");e=e.padStart(2*i,"0")}try{t="bigint"==typeof e?e:l.Ph((0,l.qj)("private key",e,i))}catch(t){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof e)}return s&&(t=(0,o.zi)(t,a)),l.aK("private key",t,C,a),t}function w(e){if(!(e instanceof S))throw Error("ProjectivePoint expected")}let x=(0,l.x)((e,t)=>{let{px:r,py:i,pz:s}=e;if(n.eql(s,n.ONE))return{x:r,y:i};let a=e.is0();null==t&&(t=a?n.ONE:n.inv(s));let o=n.mul(r,t),l=n.mul(i,t),c=n.mul(s,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw Error("invZ was invalid");return{x:o,y:l}}),E=(0,l.x)(e=>{if(e.is0()){if(r.allowInfinityPoint&&!n.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:i}=e.toAffine();if(!n.isValid(t)||!n.isValid(i))throw Error("bad point: x or y not FE");let s=n.sqr(i),a=g(t);if(!n.eql(s,a))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class S{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw Error("x required");if(null==t||!n.isValid(t))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");Object.freeze(this)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof S)throw Error("projective point not allowed");let i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?S.ZERO:new S(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(S.fromAffine)}static fromHex(e){let t=S.fromAffine(a((0,l.qj)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return S.BASE.multiply(v(e))}static msm(e,t){return function(e,t,r,n){if(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})}(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(n,t),r.length!==n.length)throw Error("arrays of points and scalars must have equal length");let i=e.ZERO,s=(0,l.dJ)(BigInt(r.length)),a=s>12?s-3:s>4?s-2:s?2:1,o=(1<<a)-1,c=Array(o+1).fill(i),u=Math.floor((t.BITS-1)/a)*a,d=i;for(let e=u;e>=0;e-=a){c.fill(i);for(let t=0;t<n.length;t++){let i=Number(n[t]>>BigInt(e)&BigInt(o));c[i]=c[i].add(r[t])}let t=i;for(let e=c.length-1,r=i;e>0;e--)r=r.add(c[e]),t=t.add(r);if(d=d.add(t),0!==e)for(let e=0;e<a;e++)d=d.double()}return d}(S,i,e,t)}_setWindowSize(e){T.setWindowSize(this,e)}assertValidity(){E(this)}hasEvenY(){let{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){w(e);let{px:t,py:r,pz:i}=this,{px:s,py:a,pz:o}=e,l=n.eql(n.mul(t,o),n.mul(s,i)),c=n.eql(n.mul(r,o),n.mul(a,i));return l&&c}negate(){return new S(this.px,n.neg(this.py),this.pz)}double(){let{a:e,b:t}=r,i=n.mul(t,k),{px:s,py:a,pz:o}=this,l=n.ZERO,c=n.ZERO,u=n.ZERO,d=n.mul(s,s),h=n.mul(a,a),p=n.mul(o,o),f=n.mul(s,a);return f=n.add(f,f),u=n.mul(s,o),u=n.add(u,u),l=n.mul(e,u),c=n.mul(i,p),c=n.add(l,c),l=n.sub(h,c),c=n.add(h,c),c=n.mul(l,c),l=n.mul(f,l),u=n.mul(i,u),p=n.mul(e,p),f=n.sub(d,p),f=n.mul(e,f),f=n.add(f,u),u=n.add(d,d),d=n.add(u,d),d=n.add(d,p),d=n.mul(d,f),c=n.add(c,d),p=n.mul(a,o),p=n.add(p,p),d=n.mul(p,f),l=n.sub(l,d),u=n.mul(p,h),u=n.add(u,u),new S(l,c,u=n.add(u,u))}add(e){w(e);let{px:t,py:i,pz:s}=this,{px:a,py:o,pz:l}=e,c=n.ZERO,u=n.ZERO,d=n.ZERO,h=r.a,p=n.mul(r.b,k),f=n.mul(t,a),m=n.mul(i,o),y=n.mul(s,l),b=n.add(t,i),g=n.add(a,o);b=n.mul(b,g),g=n.add(f,m),b=n.sub(b,g),g=n.add(t,s);let v=n.add(a,l);return g=n.mul(g,v),v=n.add(f,y),g=n.sub(g,v),v=n.add(i,s),c=n.add(o,l),v=n.mul(v,c),c=n.add(m,y),v=n.sub(v,c),d=n.mul(h,g),c=n.mul(p,y),d=n.add(c,d),c=n.sub(m,d),d=n.add(m,d),u=n.mul(c,d),m=n.add(f,f),m=n.add(m,f),y=n.mul(h,y),g=n.mul(p,g),m=n.add(m,y),y=n.sub(f,y),y=n.mul(h,y),g=n.add(g,y
46),f=n.mul(m,g),u=n.add(u,f),f=n.mul(v,g),c=n.mul(b,c),c=n.sub(c,f),f=n.mul(b,m),d=n.mul(v,d),new S(c,u,d=n.add(d,f))}subtract(e){return this.add(e.negate())}is0(){return this.equals(S.ZERO)}wNAF(e){return T.wNAFCached(this,e,S.normalizeZ)}multiplyUnsafe(e){let{endo:t,n:i}=r;l.aK("scalar",e,_,i);let s=S.ZERO;if(e===_)return s;if(this.is0()||e===C)return this;if(!t||T.hasPrecomputes(this))return T.wNAFCachedUnsafe(this,e,S.normalizeZ);let{k1neg:a,k1:o,k2neg:c,k2:u}=t.splitScalar(e),d=s,h=s,p=this;for(;o>_||u>_;)o&C&&(d=d.add(p)),u&C&&(h=h.add(p)),p=p.double(),o>>=C,u>>=C;return a&&(d=d.negate()),c&&(h=h.negate()),h=new S(n.mul(h.px,t.beta),h.py,h.pz),d.add(h)}multiply(e){let t,i;let{endo:s,n:a}=r;if(l.aK("scalar",e,C,a),s){let{k1neg:r,k1:a,k2neg:o,k2:l}=s.splitScalar(e),{p:c,f:u}=this.wNAF(a),{p:d,f:h}=this.wNAF(l);c=T.constTimeNegate(r,c),d=T.constTimeNegate(o,d),d=new S(n.mul(d.px,s.beta),d.py,d.pz),t=c.add(d),i=u.add(h)}else{let{p:r,f:n}=this.wNAF(e);t=r,i=n}return S.normalizeZ([t,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=S.BASE,i=(e,t)=>t!==_&&t!==C&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,r));return s.is0()?void 0:s}toAffine(e){return x(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=r;if(e===C)return!0;if(t)return t(S,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=r;return e===C?this:t?t(S,this):this.multiplyUnsafe(r.h)}toRawBytes(e=!0){return(0,l.e8)("isCompressed",e),this.assertValidity(),s(S,this,e)}toHex(e=!0){return(0,l.e8)("isCompressed",e),l.My(this.toRawBytes(e))}}S.BASE=new S(r.Gx,r.Gy,n.ONE),S.ZERO=new S(n.ZERO,n.ONE,n.ZERO);let A=r.nBitLength,T=(t=r.endo?Math.ceil(A/2):A,{constTimeNegate:d,hasPrecomputes:e=>1!==y(e),unsafeLadder(e,t,r=S.ZERO){let n=e;for(;t>c;)t&u&&(r=r.add(n)),n=n.double(),t>>=u;return r},precomputeWindow(e,r){let{windows:n,windowSize:i}=p(r,t),s=[],a=e,o=a;for(let e=0;e<n;e++){o=a,s.push(o);for(let e=1;e<i;e++)o=o.add(a),s.push(o);a=o.double()}return s},wNAF(e,r,n){let{windows:i,windowSize:s}=p(e,t),a=S.ZERO,o=S.BASE,l=BigInt(2**e-1),c=2**e,h=BigInt(e);for(let e=0;e<i;e++){let t=e*s,i=Number(n&l);n>>=h,i>s&&(i-=c,n+=u);let p=t+Math.abs(i)-1,f=e%2!=0,m=i<0;0===i?o=o.add(d(f,r[t])):a=a.add(d(m,r[p]))}return{p:a,f:o}},wNAFUnsafe(e,r,n,i=S.ZERO){let{windows:s,windowSize:a}=p(e,t),o=BigInt(2**e-1),l=2**e,d=BigInt(e);for(let e=0;e<s;e++){let t=e*a;if(n===c)break;let s=Number(n&o);if(n>>=d,s>a&&(s-=l,n+=u),0===s)continue;let h=r[t+Math.abs(s)-1];s<0&&(h=h.negate()),i=i.add(h)}return i},getPrecomputes(e,t,r){let n=f.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&f.set(t,r(n))),n},wNAFCached(e,t,r){let n=y(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){let i=y(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,r){h(r,t),m.set(e,r),f.delete(e)}});return{CURVE:r,ProjectivePoint:S,normPrivateKeyToScalar:v,weierstrassEquation:g,isWithinCurveOrder:function(e){return l.r4(e,C,r.n)}}}({...t,toBytes(e,t,n){let i=t.toAffine(),s=r.toBytes(i.x),a=l.Id;return((0,l.e8)("isCompressed",n),n)?a(Uint8Array.from([t.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(i.y))},fromBytes(e){let t=e.length,n=e[0],a=e.subarray(1);if(t===i&&(2===n||3===n)){let e;let t=l.Ph(a);if(!l.r4(t,C,r.ORDER))throw Error("Point is not on curve");let i=S(t);try{e=r.sqrt(i)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&n)==1!=((e&C)===C)&&(e=r.neg(e)),{x:t,y:e}}if(t===s&&4===n)return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))};throw Error("invalid Point, expected length of "+i+", or uncompressed "+s+", got "+t)}}),T=e=>l.My(l.lq(e,t.nByteLength)),I=(e,t,r)=>l.Ph(e.slice(t,r));class P{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let r=t.nByteLength;return new P(I(e=(0,l.qj)("compactSignature",e,2*r),0,r),I(e,r,2*r))}static fromDER(e){let{r:t,s:r}=E.toSig((0,l.qj)("DER",e));return new P(t,r)}assertValidity(){l.aK("r",this.r,C,n),l.aK("s",this.s,C,n)}addRecoveryBit(e){return new P(this.r,this.s,e)}recoverPublicKey(e){let{r:n,s:i,recovery:s}=this,o=U((0,l.qj)("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw Error("recovery id invalid");let c=2===s||3===s?n+t.n:n;if(c>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let u=(1&s)==0?"02":"03",d=w.fromHex(u+T(c)),h=v(c),p=a(-o*h),f=a(i*h),m=w.BASE.multiplyAndAddUnsafe(d,p,f);
46if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>n>>C}normalizeS(){return this.hasHighS()?new P(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return l.aT(this.toDERHex())}toDERHex(){return E.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return l.aT(this.toCompactHex())}toCompactHex(){return T(this.r)+T(this.s)}}function O(e){let t=l.aY(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===s:r?n===2*i||n===2*s:e instanceof w}let D=t.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let r=l.Ph(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},U=t.bits2int_modN||function(e){return a(D(e))},N=l.OG(t.nBitLength);function M(e){return l.aK("num < 2^"+t.nBitLength,e,_,N),l.lq(e,t.nByteLength)}let B={lowS:t.lowS,prehash:!1},R={lowS:t.lowS,prehash:!1};return w.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return w.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(O(e))throw Error("first arg must be private key");if(!O(t))throw Error("second arg must be public key");return w.fromHex(t).multiply(x(e)).toRawBytes(r)},sign:function(e,i,s=B){let{seed:o,k2sig:c}=function(e,i,s=B){if(["recovered","canonical"].some(e=>e in s))throw Error("sign() legacy options not supported");let{hash:o,randomBytes:c}=t,{lowS:u,prehash:d,extraEntropy:h}=s;null==u&&(u=!0),e=(0,l.qj)("msgHash",e),g(s),d&&(e=(0,l.qj)("prehashed msgHash",o(e)));let p=U(e),f=x(i),m=[M(f),M(p)];if(null!=h&&!1!==h){let e=!0===h?c(r.BYTES):h;m.push((0,l.qj)("extraEntropy",e))}return{seed:l.Id(...m),k2sig:function(e){let t=D(e);if(!A(t))return;let r=v(t),i=w.BASE.multiply(t).toAffine(),s=a(i.x);if(s===_)return;let o=a(r*a(p+s*f));if(o===_)return;let l=(i.x===s?0:2)|Number(i.y&C),c=o;if(u&&o>n>>C)c=o>n>>C?a(-o):o,l^=1;return new P(s,c,l)}}}(e,i,s);return l.fg(t.hash.outputLen,t.nByteLength,t.hmac)(o,c)},verify:function(e,r,n,i=R){let s,o;r=(0,l.qj)("msgHash",r),n=(0,l.qj)("publicKey",n);let{lowS:c,prehash:u,format:d}=i;if(g(i),"strict"in i)throw Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw Error("format must be compact or der");let h="string"==typeof e||l.aY(e),p=!h&&!d&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!h&&!p)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(p&&(o=new P(e.r,e.s)),h){try{"compact"!==d&&(o=P.fromDER(e))}catch(e){if(!(e instanceof E.Err))throw e}o||"der"===d||(o=P.fromCompact(e))}s=w.fromHex(n)}catch(e){return!1}if(!o||c&&o.hasHighS())return!1;u&&(r=t.hash(r));let{r:f,s:m}=o,y=U(r),b=v(m),x=a(y*b),_=a(f*b),C=w.BASE.multiplyAndAddUnsafe(s,x,_)?.toAffine();return!!C&&a(C.x)===f},ProjectivePoint:w,Signature:P,utils:{isValidPrivateKey(e){try{return x(e),!0}catch(e){return!1}},normPrivateKeyToScalar:x,randomPrivateKey:()=>{let e=(0,o.Tp)(t.n);return(0,o.qy)(t.randomBytes(e),t.n)},precompute:(e=8,t=w.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...r)=>a(t,e,(0,i.Id)(...r)),randomBytes:i.po});return{...r(t),create:r}}BigInt(4)},7385:(e,t,r)=>{"use strict";r.d(t,{B8:()=>p,D0:()=>b,LH:()=>y,Tp:()=>v,jr:()=>m,qy:()=>w,zH:()=>h,zi:()=>d});var n=r(58002);let i=BigInt(0),s=BigInt(1),a=BigInt(2),o=BigInt(3),l=BigInt(4),c=BigInt(5),u=BigInt(8);function d(e,t){let r=e%t;return r>=i?r:t+r}function h(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n}function p(e,t){if(e===i)throw Error("invert: expected non-zero number");if(t<=i)throw Error("invert: expected positive modulus, got "+t);let r=d(e,t),n=t,a=i,o=s,l=s,c=i;for(;r!==i;){let e=n/r,t=n%r,i=a-l*e,s=o-c*e;n=r,r=t,a=l,o=c,l=i,c=s}if(n!==s)throw Error("invert: does not exist");return d(a,t)}let f=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e){let t=f.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.Q5)(e,t)}function y(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function b(e,t,r=!1,h={}){let f;if(e<=i)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:m,nByteLength:g}=y(e,t);if(g>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let v=Object.freeze({ORDER:e,isLE:r,BITS:m,BYTES:g,MASK:(0,n.OG)(m),ZERO:i,ONE:s,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&s)===s,neg:t=>d(-t,e),eql:(e,t)=>
46e===t,sqr:t=>d(t*t,e),add:(t,r)=>d(t+r,e),sub:(t,r)=>d(t-r,e),mul:(t,r)=>d(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<i)throw Error("invalid exponent, negatives unsupported");if(r===i)return e.ONE;if(r===s)return t;let n=e.ONE,a=t;for(;r>i;)r&s&&(n=e.mul(n,a)),a=e.sqr(a),r>>=s;return n})(v,e,t),div:(t,r)=>d(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:h.sqrt||(t=>(f||(f=function(e){if(e%l===o){let t=(e+s)/l;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%u===c){let t=(e-c)/u;return function(e,r){let n=e.mul(r,a),i=e.pow(n,t),s=e.mul(r,i),o=e.mul(e.mul(s,a),i),l=e.mul(s,e.sub(o,e.ONE));if(!e.eql(e.sqr(l),r))throw Error("Cannot find square root");return l}}return function(e){let t,r,n;let o=(e-s)/a;for(t=e-s,r=0;t%a===i;t/=a,r++);for(n=a;n<e&&function(e,t,r){if(t<i)throw Error("invalid exponent, negatives unsupported");if(r<=i)throw Error("invalid modulus");if(r===s)return i;let n=s;for(;t>i;)t&s&&(n=n*e%r),e=e*e%r,t>>=s;return n}(n,o,e)!==e-s;n++)if(n>1e3)throw Error("Cannot find square root: likely non-prime P");if(1===r){let t=(e+s)/l;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let c=(t+s)/a;return function(e,i){if(e.pow(i,o)===e.neg(e.ONE))throw Error("Cannot find square root");let a=r,l=e.pow(e.mul(e.ONE,n),t),u=e.pow(i,c),d=e.pow(i,t);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(l,s<<BigInt(a-t-1));l=e.sqr(r),u=e.mul(u,r),d=e.mul(d,l),a=t}return u}}(e)}(e)),f(v,t))),invertBatch:e=>(function(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r})(v,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.z)(e,g):(0,n.lq)(e,g),fromBytes:e=>{if(e.length!==g)throw Error("Field.fromBytes: expected "+g+" bytes, got "+e.length);return r?(0,n.lX)(e):(0,n.Ph)(e)}});return Object.freeze(v)}function g(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function v(e){let t=g(e);return t+Math.ceil(t/2)}function w(e,t,r=!1){let i=e.length,a=g(t),o=v(t);if(i<16||i<o||i>1024)throw Error("expected "+o+"-1024 bytes of input, got "+i);let l=d(r?(0,n.lX)(e):(0,n.Ph)(e),t-s)+s;return r?(0,n.z)(l,a):(0,n.lq)(l,a)}},58002:(e,t,r)=>{"use strict";r.d(t,{DO:()=>o,Id:()=>x,My:()=>u,OG:()=>S,Ph:()=>y,Q5:()=>O,aK:()=>C,aT:()=>m,aY:()=>a,dJ:()=>k,e8:()=>l,fg:()=>I,lX:()=>b,lq:()=>g,qj:()=>w,r4:()=>_,x:()=>D,z:()=>v,zW:()=>d});let n=BigInt(0),i=BigInt(1),s=BigInt(2);function a(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!a(e))throw Error("Uint8Array expected")}function l(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}let c=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e){o(e);let t="";for(let r=0;r<e.length;r++)t+=c[e[r]];return t}function d(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function h(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?n:BigInt("0x"+e)}let p={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=p._0&&e<=p._9?e-p._0:e>=p.A&&e<=p.F?e-(p.A-10):e>=p.a&&e<=p.f?e-(p.a-10):void 0}function m(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=f(e.charCodeAt(i)),s=f(e.charCodeAt(i+1));if(void 0===r||void 0===s)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+s}return n}function y(e){return h(u(e))}function b(e){return o(e),h(u(Uint8Array.from(e).reverse()))}function g(e,t){return m(e.toString(16).padStart(2*t,"0"))}function v(e,t){return g(e,t).reverse()}function w(e,t,r){let n;if("string"==typeof t)try{n=m(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(a(t))n=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(e+" of length "+r+" expected, got "+i);return n}function x(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];o(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}let E=e=>"bigint"==typeof e&&n<=e;function _(e,t,r){return E(e)&&E(t)&&E(r)&&t<=e&&e<r}function C(e,t,r,n){if(!_(t,r,n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function k(e){let t;for(t=0;e>n;e>>=i,t+=1);return t}let S=e=>(s<<BigInt(e-1))-i,A=e=>new Uint8Array(e),T=e=>Uint8Array.from(e);function I(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=A(e),i=A(e),s=0,a=()=>{n.fill(1),i.fill(0),s=0},o=(...e)=>r(i,n,...e),l=(e=A())=>{i=o(T([0]),e),n=o(),0!==e.length&&(i=o(T([1]),e),n=o())},c=()=>
46{if(s++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return x(...r)};return(e,t)=>{let r;for(a(),l(e);!(r=t(c()));)l();return a(),r}}let P={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||a(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function O(e,t,r={}){let n=(t,r,n)=>{let i=P[r];if("function"!=typeof i)throw Error("invalid validator function");let s=e[t];if((!n||void 0!==s)&&!i(s,e))throw Error("param "+String(t)+" is invalid. Expected "+r+", got "+s)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}function D(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let s=e(r,...n);return t.set(r,s),s}}},35542:(e,t,r)=>{"use strict";r.d(t,{secp256k1:()=>h});var n=r(48775),i=r(2679),s=r(7385);let a=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),o=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(1),c=BigInt(2),u=(e,t)=>(e+t/c)/t,d=(0,s.D0)(a,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),l=BigInt(44),u=BigInt(88),h=e*e*e%a,p=h*h*e%a,f=(0,s.zH)(p,t,a)*p%a,m=(0,s.zH)(f,t,a)*p%a,y=(0,s.zH)(m,c,a)*h%a,b=(0,s.zH)(y,n,a)*y%a,g=(0,s.zH)(b,i,a)*b%a,v=(0,s.zH)(g,l,a)*g%a,w=(0,s.zH)(v,u,a)*v%a,x=(0,s.zH)(w,l,a)*g%a,E=(0,s.zH)(x,t,a)*p%a,_=(0,s.zH)(E,o,a)*b%a,C=(0,s.zH)(_,r,a)*h%a,k=(0,s.zH)(C,c,a);if(!d.eql(d.sqr(k),e))throw Error("Cannot find square root");return k}}),h=(0,i.s)({a:BigInt(0),b:BigInt(7),Fp:d,n:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-l*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),a=u(t*e,o),c=u(-r*e,o),d=(0,s.zi)(e-a*t-c*n,o),h=(0,s.zi)(-a*r-c*t,o),p=d>i,f=h>i;if(p&&(d=o-d),f&&(h=o-h),d>i||h>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:d,k2neg:f,k2:h}}}},n.sc);BigInt(0),h.ProjectivePoint},48775:(e,t,r)=>{"use strict";r.d(t,{sc:()=>u});var n=r(99393),i=r(43331);class s extends i.Vw{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,n.CC)(this);let{view:t,buffer:r,blockLen:s}=this,a=(e=(0,i.ZJ)(e)).length;for(let n=0;n<a;){let o=Math.min(s-this.pos,a-n);if(o===s){let t=(0,i.O8)(e);for(;s<=a-n;n+=s)this.process(t,n);continue}r.set(e.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.CC)(this),(0,n.Ht)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:s,isLE:a}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>s-o&&(this.process(r,0),o=0);for(let e=o;e<s;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),s=BigInt(0xffffffff),a=Number(r>>i&s),o=Number(r&s),l=n?4:0,c=n?0:4;e.setUint32(t+l,a,n),e.setUint32(t+c,o,n)}(r,s-8,BigInt(8*this.length),a),this.process(r,0);let l=(0,i.O8)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,d=this.get();if(u>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)l.setUint32(4*e,d[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=i,e.destroyed=s,n%t&&e.buffer.set(r),e}}let a=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
4676c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),o=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),l=new Uint32Array(64);class c extends s{constructor(){super(64,32,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4],this.F=0|o[5],this.G=0|o[6],this.H=0|o[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:s,G:a,H:o}=this;return[e,t,r,n,i,s,a,o]}set(e,t,r,n,i,s,a,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|s,this.G=0|a,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=l[e-15],r=l[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,s=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;l[e]=s+l[e-7]+n+l[e-16]|0}let{A:r,B:n,C:s,D:o,E:c,F:u,G:d,H:h}=this;for(let e=0;e<64;e++){var p,f,m,y;let t=h+((0,i.Ow)(c,6)^(0,i.Ow)(c,11)^(0,i.Ow)(c,25))+((p=c)&u^~p&d)+a[e]+l[e]|0,b=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+((f=r)&(m=n)^f&(y=s)^m&y)|0;h=d,d=u,u=c,c=o+t|0,o=s,s=n,n=r,r=t+b|0}r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,o=o+this.D|0,c=c+this.E|0,u=u+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,s,o,c,u,d,h)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let u=(0,i.ld)(()=>new c)},49741:(e,t,r)=>{"use strict";r.d(t,{N:()=>l});var n=r(12115),i=r(18166),s=r(88068),a=r(12317),o=r(95155);function l(e){let t=e+"CollectionProvider",[r,l]=(0,i.A)(t),[c,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:r}=e,i=n.useRef(null),s=n.useRef(new Map).current;return(0,o.jsx)(c,{scope:t,itemMap:s,collectionRef:i,children:r})};d.displayName=t;let h=e+"CollectionSlot",p=n.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=u(h,r),l=(0,s.s)(t,i.collectionRef);return(0,o.jsx)(a.DX,{ref:l,children:n})});p.displayName=h;let f=e+"CollectionItemSlot",m="data-radix-collection-item",y=n.forwardRef((e,t)=>{let{scope:r,children:i,...l}=e,c=n.useRef(null),d=(0,s.s)(t,c),h=u(f,r);return n.useEffect(()=>(h.itemMap.set(c,{ref:c,...l}),()=>void h.itemMap.delete(c))),(0,o.jsx)(a.DX,{[m]:"",ref:d,children:i})});return y.displayName=f,[{Provider:d,Slot:p,ItemSlot:y},function(t){let r=u(e+"CollectionConsumer",t);return n.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(m,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},l]}},9930:(e,t,r)=>{"use strict";r.d(t,{Kq:()=>J,LM:()=>Y,VY:()=>ee,bL:()=>X,bm:()=>er,hE:()=>Q,rc:()=>et});var n=r(12115),i=r(47650),s=r(93610),a=r(88068),o=r(49741),l=r(18166),c=r(59674),u=r(17323),d=r(17028),h=r(23360),p=r(41524),f=r(1488),m=r(46611),y=r(63543),b=r(95155),g="ToastProvider",[v,w,x]=(0,o.N)("Toast"),[E,_]=(0,l.A)("Toast",[x]),[C,k]=E(g),S=e=>{let{__scopeToast:t,label:r="Notification",duration:i=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:o}=e,[l,c]=n.useState(null),[u,d]=n.useState(0),h=n.useRef(!1),p=n.useRef(!1);return r.trim()||console.error("Invalid prop `label` supplied to `".concat(g,"`. Expected non-empty `string`.")),(0,b.jsx)(v.Provider,{scope:t,children:(0,b.jsx)(C,{scope:t,label:r,duration:i,swipeDirection:s,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:n.useCallback(()=>d(e=>e+1),[]),onToastRemove:n.useCallback(()=>d(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};S.displayName=g;var A="ToastViewport",T=["F8"],I="toast.viewportPause",P="toast.viewportResume",O=n.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:i=T,label:s="Notifications ({hotkey})",...o}=e,l=k(A,r),u=w(r),d=n.useRef(null),p=n.useRef(null),f=n.useRef(null),m=n.useRef(null),y=(0,a.s)(t,m,l.onViewportChange),g=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=l.toastCount>0;n.useEffect(()=>{let e=e=>{var t;0!==i.length&&i.every(t=>e[t]||e.code===t)&&(null===(t=m.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),n.useEffect(()=>{let e=d.current,t=m.current;if(x&&e&&t){let r=()=>
46{if(!l.isClosePausedRef.current){let e=new CustomEvent(I);t.dispatchEvent(e),l.isClosePausedRef.current=!0}},n=()=>{if(l.isClosePausedRef.current){let e=new CustomEvent(P);t.dispatchEvent(e),l.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||n()},s=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",i),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",s),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",i),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}},[x,l.isClosePausedRef]);let E=n.useCallback(e=>{let{tabbingDirection:t}=e,r=u().map(e=>{let r=e.ref.current,n=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===t?n:n.reverse()});return("forwards"===t?r.reverse():r).flat()},[u]);return n.useEffect(()=>{let e=m.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){var n,i,s;let r=document.activeElement,a=t.shiftKey;if(t.target===e&&a){null===(n=p.current)||void 0===n||n.focus();return}let o=E({tabbingDirection:a?"backwards":"forwards"}),l=o.findIndex(e=>e===r);Z(o.slice(l+1))?t.preventDefault():a?null===(i=p.current)||void 0===i||i.focus():null===(s=f.current)||void 0===s||s.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[u,E]),(0,b.jsxs)(c.lg,{ref:d,role:"region","aria-label":s.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&(0,b.jsx)(U,{ref:p,onFocusFromOutsideViewport:()=>{Z(E({tabbingDirection:"forwards"}))}}),(0,b.jsx)(v.Slot,{scope:r,children:(0,b.jsx)(h.sG.ol,{tabIndex:-1,...o,ref:y})}),x&&(0,b.jsx)(U,{ref:f,onFocusFromOutsideViewport:()=>{Z(E({tabbingDirection:"backwards"}))}})]})});O.displayName=A;var D="ToastFocusProxy",U=n.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,s=k(D,r);return(0,b.jsx)(y.s,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:e=>{var t;let r=e.relatedTarget;(null===(t=s.viewport)||void 0===t?void 0:t.contains(r))||n()}})});U.displayName=D;var N="Toast",M=n.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:i,onOpenChange:a,...o}=e,[l=!0,c]=(0,f.i)({prop:n,defaultProp:i,onChange:a});return(0,b.jsx)(d.C,{present:r||l,children:(0,b.jsx)(L,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:(0,p.c)(e.onPause),onResume:(0,p.c)(e.onResume),onSwipeStart:(0,s.m)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,s.m)(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y","".concat(r,"px"))}),onSwipeCancel:(0,s.m)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,s.m)(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y","".concat(r,"px")),c(!1)})})})});M.displayName=N;var[B,R]=E(N,{onClose(){}}),L=n.forwardRef((e,t)=>{let{__scopeToast:r,type:o="foreground",duration:l,open:u,onClose:d,onEscapeKeyDown:f,onPause:m,onResume:y,onSwipeStart:g,onSwipeMove:w,onSwipeCancel:x,onSwipeEnd:E,..._}=e,C=k(N,r),[S,A]=n.useState(null),T=(0,a.s)(t,e=>A(e)),O=n.useRef(null),D=n.useRef(null),U=l||C.duration,M=n.useRef(0),R=n.useRef(U),L=n.useRef(0),{onToastAdd:F,onToastRemove:z}=C,q=(0,p.c)(()=>{var e;(null==S?void 0:S.contains(document.activeElement))&&(null===(e=C.viewport)||void 0===e||e.focus()),d()}),H=n.useCallback(e=>
46{e&&e!==1/0&&(window.clearTimeout(L.current),M.current=new Date().getTime(),L.current=window.setTimeout(q,e))},[q]);n.useEffect(()=>{let e=C.viewport;if(e){let t=()=>{H(R.current),null==y||y()},r=()=>{let e=new Date().getTime()-M.current;R.current=R.current-e,window.clearTimeout(L.current),null==m||m()};return e.addEventListener(I,r),e.addEventListener(P,t),()=>{e.removeEventListener(I,r),e.removeEventListener(P,t)}}},[C.viewport,U,m,y,H]),n.useEffect(()=>{u&&!C.isClosePausedRef.current&&H(U)},[u,U,C.isClosePausedRef,H]),n.useEffect(()=>(F(),()=>z()),[F,z]);let $=n.useMemo(()=>S?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),t.nodeType===t.ELEMENT_NODE){let n=t.ariaHidden||t.hidden||"none"===t.style.display,i=""===t.dataset.radixToastAnnounceExclude;if(!n){if(i){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}}),r}(S):null,[S]);return C.viewport?(0,b.jsxs)(b.Fragment,{children:[$&&(0,b.jsx)(j,{__scopeToast:r,role:"status","aria-live":"foreground"===o?"assertive":"polite","aria-atomic":!0,children:$}),(0,b.jsx)(B,{scope:r,onClose:q,children:i.createPortal((0,b.jsx)(v.ItemSlot,{scope:r,children:(0,b.jsx)(c.bL,{asChild:!0,onEscapeKeyDown:(0,s.m)(f,()=>{C.isFocusedToastEscapeKeyDownRef.current||q(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,b.jsx)(h.sG.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":C.swipeDirection,..._,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,s.m)(e.onKeyDown,e=>{"Escape"!==e.key||(null==f||f(e.nativeEvent),e.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:(0,s.m)(e.onPointerDown,e=>{0===e.button&&(O.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,s.m)(e.onPointerMove,e=>{if(!O.current)return;let t=e.clientX-O.current.x,r=e.clientY-O.current.y,n=!!D.current,i=["left","right"].includes(C.swipeDirection),s=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,a=i?s(0,t):0,o=i?0:s(0,r),l="touch"===e.pointerType?10:2,c={x:a,y:o},u={originalEvent:e,delta:c};n?(D.current=c,G("toast.swipeMove",w,u,{discrete:!1})):W(c,C.swipeDirection,l)?(D.current=c,G("toast.swipeStart",g,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(O.current=null)}),onPointerUp:(0,s.m)(e.onPointerUp,e=>{let t=D.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),D.current=null,O.current=null,t){let r=e.currentTarget,n={originalEvent:e,delta:t};W(t,C.swipeDirection,C.swipeThreshold)?G("toast.swipeEnd",E,n,{discrete:!0}):G("toast.swipeCancel",x,n,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),j=e=>{let{__scopeToast:t,children:r,...i}=e,s=k(N,t),[a,o]=n.useState(!1),[l,c]=n.useState(!1);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=(0,p.c)(e);(0,m.N)(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>o(!0)),n.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),l?null:(0,b.jsx)(u.Z,{asChild:!0,children:(0,b.jsx)(y.s,{...i,children:a&&(0,b.jsxs)(b.Fragment,{children:[s.label," ",r]})})})},F=n.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,b.jsx)(h.sG.div,{...n,ref:t})});F.displayName="ToastTitle";var z=n.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,b.jsx)(h.sG.div,{...n,ref:t})});z.displayName="ToastDescription";var q="ToastAction",H=n.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,b.jsx)(V,{altText:r,asChild:!0,children:(0,b.jsx)(K,{...n,ref:t})}):(console.error("Invalid prop `altText` supplied to `".concat(q,"`. Expected non-empty `string`.")),null)});H.displayName=q;var $="ToastClose",K=n.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,i=R($,r);return(0,b.jsx)(V,{asChild:!0,children:(0,b.jsx)(h.sG.button,{type:"button",...n,ref:t,onClick:(0,s.m)(e.onClick,i.onClose)})})});K.displayName=$;var V=n.forwardRef((e,t)=>
46{let{__scopeToast:r,altText:n,...i}=e;return(0,b.jsx)(h.sG.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function G(e,t,r,n){let{discrete:i}=n,s=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),i?(0,h.hO)(s,a):s.dispatchEvent(a)}var W=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=Math.abs(e.x),i=Math.abs(e.y),s=n>i;return"left"===t||"right"===t?s&&n>r:!s&&i>r};function Z(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var J=S,Y=O,X=M,Q=F,ee=z,et=H,er=K},63543:(e,t,r)=>{"use strict";r.d(t,{b:()=>o,s:()=>a});var n=r(12115),i=r(23360),s=r(95155),a=n.forwardRef((e,t)=>(0,s.jsx)(i.sG.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));a.displayName="VisuallyHidden";var o=a},90383:(e,t,r)=>{"use strict";r.d(t,{E:()=>M});var n="undefined"==typeof window||"Deno"in globalThis;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function a(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(n){if(t.queryHash!==l(a,t.options))return!1}else if(!u(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function o(e,t){let{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(c(t.options.mutationKey)!==c(s))return!1}else if(!u(t.options.mutationKey,s))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function l(e,t){return(t?.queryKeyHashFn||c)(e)}function c(e){return JSON.stringify(e,(e,t)=>h(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function u(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!u(e[r],t[r]))}function d(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h(e){if(!p(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(p(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function p(e){return"[object Object]"===Object.prototype.toString.call(e)}function f(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function m(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var y=Symbol();function b(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==y?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var g=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0),s=n=>{t?e.push(n):i(()=>{r(n)})},a=()=>{let t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||a()}return r},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),v=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},w=new class extends v{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!n&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},x=new class extends v{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!n&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}
46setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function E(e){return Math.min(1e3*2**e,3e4)}function _(e){return(e??"online")!=="online"||x.isOnline()}var C=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function k(e){return e instanceof C}function S(e){let t,r=!1,i=0,s=!1,a=function(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}(),o=()=>w.isFocused()&&("always"===e.networkMode||x.isOnline())&&e.canRun(),l=()=>_(e.networkMode)&&e.canRun(),c=r=>{s||(s=!0,e.onSuccess?.(r),t?.(),a.resolve(r))},u=r=>{s||(s=!0,e.onError?.(r),t?.(),a.reject(r))},d=()=>new Promise(r=>{t=e=>{(s||o())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,s||e.onContinue?.()}),h=()=>{let t;if(s)return;let a=0===i?e.initialPromise:void 0;try{t=a??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(c).catch(t=>{if(s)return;let a=e.retry??(n?0:3),l=e.retryDelay??E,c="function"==typeof l?l(i,t):l,p=!0===a||"number"==typeof a&&i<a||"function"==typeof a&&a(i,t);if(r||!p){u(t);return}i++,e.onFail?.(i,t),new Promise(e=>{setTimeout(e,c)}).then(()=>o()?void 0:d()).then(()=>{r?u(t):h()})})};return{promise:a,cancel:t=>{s||(u(new C(t)),e.abort?.())},continue:()=>(t?.(),a),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:l,start:()=>(l()?h():d().then(h),a)}}var A=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#i=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},T=class extends A{#s;#a;#o;#l;#c;#u;#d;constructor(e){super(),this.#d=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#o=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#s=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#s,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){var r,n;let i=(r=this.state.data,"function"==typeof(n=this.options).structuralSharing?n.structuralSharing(r,e):!1!==n.structuralSharing?function e(t,r){if(t===r)return t;let n=d(t)&&d(r);if(n||h(t)&&h(r)){let i=n?t:Object.keys(t),s=i.length,a=n?r:Object.keys(r),o=a.length,l=n?[]:{},c=0;for(let s=0;s<o;s++){let o=n?s:a[s];(!n&&i.includes(o)||n)&&void 0===t[o]&&void 0===r[o]?(l[o]=void 0,c++):(l[o]=e(t[o],r[o]),l[o]===t[o]&&void 0!==t[o]&&c++)}return s===o&&c===s?t:l}return r}(r,e):e);return this.#h({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e,t){this.#h({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(i).catch(i):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#s)}isActive(){return this.observers.some(e=>{var t;return!1!==("function"==typeof(t=e.options.enabled)?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#d?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#d=!0,r.signal)}
46)},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:()=>{let e=b(this.options,t),r={client:this.#l,queryKey:this.queryKey,meta:this.meta};return(n(r),this.#d=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};n(i),this.options.behavior?.onFetch(i,this),this.#a=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#h({type:"fetch",meta:i.fetchOptions?.meta});let s=e=>{k(e)&&e.silent||this.#h({type:"error",error:e}),k(e)||(this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=S({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){s(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){s(e);return}this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:s,onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#c.start()}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var r;return{...t,...(r=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_(this.options.networkMode)?"fetching":"paused",...void 0===r&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if(k(n)&&n.revert&&this.#a)return{...this.#a,fetchStatus:"idle"};return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),g.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}},I=class extends v{constructor(e={}){super(),this.config=e,this.#p=new Map}#p;build(e,t,r){let n=t.queryKey,i=t.queryHash??l(n,t),s=this.get(i);return s||(s=new T({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(s)),s}add(e){this.#p.has(e.queryHash)||(this.#p.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#p.get(e.queryHash);t&&(e.destroy(),t===e&&this.#p.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){g.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#p.get(e)}getAll(){return[...this.#p.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>a(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>a(e,t)):t}notify(e){g.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){g.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){g.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},P=class extends A{#f;#m;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#m=e.mutationCache,this.#f=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#f.includes(e)||(this.#f.push(e),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#f=this.#f.filter(t=>t!==e),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#f.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){this.#c=S({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});let t="pending"===this.state.status,r=!this.#c.canStart();try{if(!t){this.#h({type:"pending",variables:e,isPaused:r}),await this.#m.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#h({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#c.start();return await this.#m.config.onSuccess?.(n,e,this.state.context,this),await this.options.onSuccess?.(n,e,this.state.context),await this.#m.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,e,this.state.context),this.#h({type:"success",data:n}),n}catch(t){try{throw await this.#m.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#m.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#h({type:"error",error:t})}}finally{this.#m.runNext(this)}}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
46case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),g.batch(()=>{this.#f.forEach(t=>{t.onMutationUpdate(e)}),this.#m.notify({mutation:this,type:"updated",action:e})})}},O=class extends v{constructor(e={}){super(),this.config=e,this.#y=new Set,this.#b=new Map,this.#g=0}#y;#b;#g;build(e,t,r){let n=new P({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#y.add(e);let t=D(e);if("string"==typeof t){let r=this.#b.get(t);r?r.push(e):this.#b.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#y.delete(e)){let t=D(e);if("string"==typeof t){let r=this.#b.get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#b.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=D(e);if("string"!=typeof t)return!0;{let r=this.#b.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=D(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#b.get(t)?.find(t=>
46t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){g.batch(()=>{this.#y.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#y.clear(),this.#b.clear()})}getAll(){return Array.from(this.#y)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>o(t,e))}findAll(e={}){return this.getAll().filter(t=>o(e,t))}notify(e){g.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return g.batch(()=>Promise.all(e.map(e=>e.continue().catch(i))))}};function D(e){return e.options.scope?.id}function U(e){return{onFetch:(t,r)=>{let n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},l=0,c=async()=>{let r=!1,c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},u=b(t.options,t.fetchOptions),d=async(e,n,i)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let s={client:t.client,queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};c(s);let a=await u(s),{maxPages:o}=t.options,l=i?m:f;return{pages:l(e.pages,a,o),pageParams:l(e.pageParams,n,o)}};if(i&&s.length){let e="backward"===i,t={pages:s,pageParams:a},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:N)(n,t);o=await d(t,r,e)}else{let t=e??s.length;do{let e=0===l?a[0]??n.initialPageParam:N(n,o);if(l>0&&null==e)break;o=await d(o,e),l++}while(l<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function N(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var M=class{#v;#m;#u;#w;#x;#E;#_;#C;constructor(e={}){this.#v=e.queryCache||new I,this.#m=e.mutationCache||new O,this.#u=e.defaultOptions||{},this.#w=new Map,this.#x=new Map,this.#E=0}mount(){this.#E++,1===this.#E&&(this.#_=w.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#v.onFocus())}),this.#C=x.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#v.onOnline())}))}unmount(){this.#E--,0===this.#E&&(this.#_?.(),this.#_=void 0,this.#C?.(),this.#C=void 0)}isFetching(e){return this.#v.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#m.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#v.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#v.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(s(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#v.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=this.#v.get(n.queryHash),s=i?.state.data,a="function"==typeof t?t(s):t;if(void 0!==a)return this.#v.build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return g.batch(()=>this.#v.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#v.get(t.queryHash)?.state}removeQueries(e){let t=this.#v;g.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#v,n={type:"active",...e};return g.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(n,t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(g.batch(()=>this.#v.findAll(e).map(e=>e.cancel(r)))).then(i).catch(i)}invalidateQueries(e,t={}){return g.batch(()=>{if(this.#v.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")return Promise.resolve();let r={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(g.batch(()=>this.#v.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(i)),"paused"===e.state.fetchStatus?Promise.resolve():t}
46))).then(i)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#v.build(this,t);return r.isStaleByTime(s(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i).catch(i)}fetchInfiniteQuery(e){return e.behavior=U(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i).catch(i)}ensureInfiniteQueryData(e){return e.behavior=U(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return x.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#v}getMutationCache(){return this.#m}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#w.set(c(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#w.values()],r={};return t.forEach(t=>{u(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#x.set(c(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#x.values()],r={};return t.forEach(t=>{u(e,t.mutationKey)&&(r={...r,...t.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=l(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===y&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#v.clear(),this.#m.clear()}}},35906:(e,t,r)=>{"use strict";r.d(t,{Ht:()=>a});var n=r(12115),i=r(95155),s=n.createContext(void 0),a=e=>{let{client:t,children:r}=e;return n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:r})}},92601:(e,t,r)=>{"use strict";r.d(t,{Ev:()=>n,Ks:()=>o,el:()=>s,pD:()=>a,up:()=>i});let n=32;function i(e){return(function(e){let t;if(0==arguments.length)throw TypeError("1 argument required, but only 0 present.");for(t=0,e=`${e}`;t<e.length;t++)if(e.charCodeAt(t)>255)throw Error(`InvalidCharacterError: found code point greater than 255:${e.charCodeAt(t)} at position ${t}`);let r="";for(t=0;t<e.length;t+=3){let n=[void 0,void 0,void 0,void 0];n[0]=e.charCodeAt(t)>>2,n[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(n[1]|=e.charCodeAt(t+1)>>4,n[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(n[2]|=e.charCodeAt(t+2)>>6,n[3]=63&e.charCodeAt(t+2));for(let e=0;e<n.length;e++)void 0===n[e]?r+="=":r+=function(e){if(e>=0&&e<64)return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}(n[e])}return r})(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function s(e,t){return i(o(e.padStart(2*Math.ceil(e.length/2),"0"),t).reduce((e,t)=>e+String.fromCharCode(t),""))}function a(e){return e.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"")}let o=(e,t)=>{if(!e||e.length%2!=0||!/^[0-9A-Fa-f]+$/.test(e))throw Error(`cannot create uint8array from invalid hex string: "${e}"`);let r=new Uint8Array(e.match(/../g).map(e=>parseInt(e,16)));if(!t)return r;if(e.length/2>t)throw Error("hex value cannot fit in a buffer of "+t+" byte(s)");let n=new Uint8Array(t);return n.set(r,t-r.length),n}},98961:(e,t,r)=>{"use strict";r.d(t,{C:()=>n});class n extends Error{constructor(e,t={}){let r=t.cause instanceof n?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof n&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],"Version: [email protected]"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}},52076:(e,t,r)=>{"use strict";r.d(t,{UG:()=>a,xo:()=>i,zz:()=>s});var n=r(98961);class i extends n.C{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class s extends n.C{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class a extends n.C{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}},22858:(e,t,r)=>{"use strict";r.d(t,{NO:()=>a,Pj:()=>o,dV:()=>i,nx:()=>l,zd:()=>s});var n=r(98961);class i extends n.C{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class s extends n.C{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class a extends n.C{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class o extends n.C{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class l extends n.C{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
46d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}},97847:(e,t,r)=>{"use strict";r.d(t,{X9:()=>a,s7:()=>i,x8:()=>s});var n=r(98961);class i extends n.C{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class s extends n.C{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class a extends n.C{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}},96139:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var n=r(58275);function i(e){return"function"===e.type?`function ${e.name}(${(0,n.Q)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,n.Q)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,n.Q)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,n.Q)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,n.Q)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable"}},58275:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s});var n=r(6463);let i=/^tuple(?<array>(\[(\d*)\])*)$/;function s(e){let t="",r=e.length;for(let s=0;s<r;s++)t+=function e(t){let r=t.type;if(i.test(t.type)&&"components"in t){r="(";let s=t.components.length;for(let n=0;n<s;n++)r+=e(t.components[n]),n<s-1&&(r+=", ");let a=(0,n.Yv)(i,t.type);return r+=`)${a?.array??""}`,e({...t,type:r})}return("indexed"in t&&t.indexed&&(r=`${r}
46 indexed`),t.name)?`${r} ${t.name}`:r}(e[s]),s!==r-1&&(t+=", ");return t}},89071:(e,t,r)=>{"use strict";r.d(t,{FO:()=>m,If:()=>x,Ji:()=>d,Rv:()=>l,WL:()=>f,Yo:()=>g,ej:()=>h,fC:()=>C,iB:()=>c,kz:()=>a,l9:()=>b,pc:()=>s,sP:()=>_,v7:()=>k,v8:()=>w});var n=r(6463);let i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(e){return i.test(e)}function a(e){return(0,n.Yv)(i,e)}let o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function l(e){return o.test(e)}function c(e){return(0,n.Yv)(o,e)}let u=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function d(e){return u.test(e)}function h(e){return(0,n.Yv)(u,e)}let p=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(e){return p.test(e)}function m(e){return(0,n.Yv)(p,e)}let y=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function b(e){return y.test(e)}function g(e){return(0,n.Yv)(y,e)}let v=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function w(e){return v.test(e)}function x(e){return(0,n.Yv)(v,e)}let E=/^receive\(\) external payable$/;function _(e){return E.test(e)}let C=new Set(["indexed"]),k=new Set(["calldata","memory","storage"])},34494:(e,t,r)=>{"use strict";r.d(t,{e:()=>d});var n=r(6463),i=r(52076),s=r(22858),a=r(97847),o=r(98961);class l extends o.C{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}var c=r(89071),u=r(3133);function d(e){let t={},r=e.length;for(let n=0;n<r;n++){let r=e[n];if(!(0,c.WL)(r))continue;let i=(0,c.FO)(r);if(!i)throw new a.s7({signature:r,type:"struct"});let s=i.properties.split(";"),o=[],l=s.length;for(let e=0;e<l;e++){let t=s[e].trim();if(!t)continue;let r=(0,u.Pj)(t,{type:"struct"});o.push(r)}if(!o.length)throw new a.X9({signature:r});t[i.name]=o}let o={},d=Object.entries(t),p=d.length;for(let e=0;e<p;e++){let[r,a]=d[e];o[r]=function e(t,r,a=new Set){let o=[],c=t.length;for(let d=0;d<c;d++){let c=t[d];if(n.wj.test(c.type))o.push(c);else{let t=(0,n.Yv)(h,c.type);if(!t?.type)throw new s.nx({abiParameter:c});let{array:d,type:p}=t;if(p in r){if(a.has(p))throw new l({type:p});o.push({...c,type:`tuple${d??""}`,components:e(r[p]??[],r,new Set([...a,p]))})}else if((0,u._o)(p))o.push(c);else throw new i.zz({type:p})}}return o}(a,t)}return o}let h=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/},3133:(e,t,r)=>{"use strict";r.d(t,{_o:()=>b,Pj:()=>m,uT:()=>d});var n=r(6463),i=r(52076),s=r(22858),a=r(97847),o=r(98961);class l extends o.C{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let c=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);var u=r(89071);function d(e,t={}){if((0,u.Ji)(e))return function(e,t={}){let r=(0,u.ej)(e);if(!r)throw new a.s7({signature:e,type:"function"});let n=y(r.parameters),i=[],s=n.length;for(let e=0;e<s;e++)i.push(m(n[e],{modifiers:u.v7,structs:t,type:"function"}));let o=[];if(r.returns){let e=y(r.returns),n=e.length;for(let r=0;r<n;r++)o.push(m(e[r],{modifiers:u.v7,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:i,outputs:o}}(e,t);if((0,u.Rv)(e))return function(e,t={}){let r=(0,u.iB)(e);if(!r)throw new a.s7({signature:e,type:"event"});let n=y(r.parameters),i=[],s=n.length;for(let e=0;e<s;e++)i.push(m(n[e],{modifiers:u.fC,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:i}}(e,t);if((0,u.pc)(e))return function(e,t={}){let r=(0,u.kz)(e);if(!r)throw new a.s7({signature:e,type:"error"});let n=y(r.parameters),i=[],s=n.length;for(let e=0;e<s;e++)i.push(m(n[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:i}}(e,t);if((0,u.l9)(e))return function(e,t={}){let r=(0,u.Yo)(e);if(!r)throw new a.s7({signature:e,type:"constructor"});let n=y(r.parameters),i=[],s=n.length;for(let e=0;e<s;e++)i.push(m(n[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:i}}(e,t);if((0,u.v8)(e))return function(e){let t=(0,u.If)(e);if(!t)throw new a.s7({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}(e);if((0,u.sP)(e))return{type:"receive",stateMutability:"payable"};throw new a.x8({signature:e})}let h=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,f=/^u?int$/;function m(e,t){var r,a;let o;let l=function(e,t,r){let n="";if(r)for(let e of Object.entries(r)){if(!e)continue;let t="";for(let r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:e}(e,t?.type,t?.structs);if(c.has(l))return c.get(l);let d=n.wj.test(e),v=(0,n.Yv)(d?p:h,e);if(!v)throw new s.dV({param:e});if(v.name&&("address"===(r=v.name)||"bool"===r||"function"===r||"string"===r||"tuple"===r||n.BD.test(r)||n.Ge.test(r)||g.test(r)))throw new s.zd({param:e,name:v.name});let w=v.name?{name:v.name}:{},x="indexed"===v.modifier?{indexed:!0}:{},E=t?.structs??{},_={};if(d){o="tuple";let e=y(v.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(m(e[n],{structs:E}));_={components:t}}else if(v.type in E)o="tuple",_={components:E[v.type]};else if(f.test(v.type))o=`${v.type}256`;else if(o=v.type,t?.type!=="struct"&&!b(o))throw new i.UG({type:o});if(v.modifier){if(!t?.modifiers?.has?.(v.modifier))throw new s.NO({param:e,type:t?.type,modifier:v.modifier});if(u.v7.has(v.modifier)&&(a=o,!v.array&&"bytes"!==a&&"string"!==a&&"tuple"!==a)
46)throw new s.Pj({param:e,type:t?.type,modifier:v.modifier})}let C={type:`${o}${v.array??""}`,...w,...x,..._};return c.set(l,C),C}function y(e,t=[],r="",n=0){let i=e.trim().length;for(let s=0;s<i;s++){let i=e[s],a=e.slice(s+1);switch(i){case",":return 0===n?y(a,[...t,r.trim()]):y(a,t,`${r}${i}`,n);case"(":return y(a,t,`${r}${i}`,n+1);case")":return y(a,t,`${r}${i}`,n-1);default:return y(a,t,`${r}${i}`,n)}}if(""===r)return t;if(0!==n)throw new l({current:r,depth:n});return t.push(r.trim()),t}function b(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.BD.test(e)||n.Ge.test(e)}let g=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/},6463:(e,t,r)=>{"use strict";function n(e,t){let r=e.exec(t);return r?.groups}r.d(t,{BD:()=>i,Ge:()=>s,Yv:()=>n,wj:()=>a});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,s=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,a=/^\(.+?\).*?$/},14057:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(12115);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:c="",children:u,iconNode:d,...h}=e;return(0,n.createElement)("svg",{ref:t,...a,width:i,height:i,stroke:r,strokeWidth:l?24*Number(o)/Number(i):o,className:s("lucide",c),...h},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),l=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:l,...c}=r;return(0,n.createElement)(o,{ref:a,iconNode:t,className:s("lucide-".concat(i(e)),l),...c})});return r.displayName="".concat(e),r}},689:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(14057).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},33773:(e,t,r)=>{"use strict";let n;r.d(t,{n:()=>a});let i=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e],s={sha256:1};function a(e){if(e&&!s[e]&&!s[e.toLowerCase()])throw Error("Digest method not supported");return new o}class o{constructor(){this.A=0x6a09e667,this.B=-0x4498517b,this.C=0x3c6ef372,this.D=-0x5ab00ac6,this.E=0x510e527f,this.F=-0x64fa9774,this.G=0x1f83d9ab,this.H=0x5be0cd19,this._size=0,this._sp=0,(!n||c>=8e3)&&(n=new ArrayBuffer(8e3),c=0),this._byte=new Uint8Array(n,c,80),this._word=new Int32Array(n,c,20),c+=80}update(e){if("string"==typeof e)return this._utf8(e);if(null==e)throw TypeError("Invalid type: "+typeof e);let t=e.byteOffset,r=e.byteLength,n=r/64|0,i=0;if(n&&!(3&t)&&!(this._size%64)){let r=new Int32Array(e.buffer,t,16*n);for(;n--;)this._int32(r,i>>2),i+=64;this._size+=i}if(1!==e.BYTES_PER_ELEMENT&&e.buffer){let n=new Uint8Array(e.buffer,t+i,r-i);return this._uint8(n)}return i===r?this:this._uint8(e,i)}_uint8(e,t){let{_byte:r,_word:n}=this,i=e.length;for(t|=0;t<i;){let s=this._size%64,a=s;for(;t<i&&a<64;)r[a++]=e[t++];a>=64&&this._int32(n),this._size+=a-s}return this}_utf8(e){let{_byte:t,_word:r}=this,n=e.length,i=this._sp;for(let s=0;s<n;){let a=this._size%64,o=a;for(;s<n&&o<64;){let r=0|e.charCodeAt(s++);r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|63&r):r<55296||r>57343?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):i?(r=((1023&i)<<10)+(1023&r)+65536,t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r,i=0):i=r}o>=64&&(this._int32(r),r[0]=r[16]),this._size+=o-a}return this._sp=i,this}_int32(e,t){let{A:r,B:n,C:s,D:a,E:o,F:c,G:u,H:g}=this,v=0;for(t|=0;v<16;)l[v++]=d(e[t++]);for(v=16;v<64;v++)l[v]=b(l[v-2])+l[v-7]+y(l[v-15])+l[v-16]|0;for(v=0;v<64;v++){let e=g+m(o)+h(o,c,u)+i[v]+l[v]|0,t=f(r)+p(r,n,s)|0;g=u,u=c,c=o,o=a+e|0,a=s,s=n,n=r,r=e+t|0}this.A=r+this.A|0,this.B=n+this.B|0,this.C=s+this.C|0,this.D=a+this.D|0,this.E=o+this.E|0,this.F=c+this.F|0,this.G=u+this.G|0,this.H=g+this.H|0}digest(e){let{_byte:t,_word:r}=this,n=this._size%64|0;for(t[n++]=128;3&n;)t[n++]=0;if((n>>=2)>14){for(;n<16;)r[n++]=0;n=0,this._int32(r)}for(;n<16;)r[n++]=0;let i=8*this._size,s=(0xffffffff&i)>>>0,a=(i-s)/0x100000000;return a&&(r[14]=d(a)),s&&(r[15]=d(s)),this._int32(r),"hex"===e?this._hex():this._bin()}_hex(){let{A:e,B:t,C:r,D:n,E:i,F:s,G:a,H:o}=this;return u(e)+u(t)+u(r)+u(n)+u(i)+u(s)+u(a)+u(o)}_bin(){let{A:e,B:t,C:r,D:n,E:i,F:s,G:a,H:o,_byte:l,_word:c}=this;return c[0]=d(e),c[1]=d(t),c[2]=d(r),c[3]=d(n),c[4]=d(i),c[5]=d(s),c[6]=d(a),c[7]=d(o),l.slice(0,32)}}let l=new Int32Array(64),c=0,u=e=>(e+0x100000000).toString(16).substr(-8),d=254===new Uint8Array(new Uint16Array([65279]).buffer)[0]?e=>e:e=>e<<24&0xff000000|e<<8&0xff0000|e>>8&65280|e>>24&255,h=(e,t,r)=>r^e&(t^r),p=(e,t,r)=>e&t|r&(e|t),f=e=>(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),m=e=>(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7),y=e=>(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,b=e=>(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10},66750:(e,t,r)=>{"use strict";r.d(t,{T:()=>C});var n=r(89071),i=r(34494),s=r(3133);function a(e){let t=(0,i.e)(e),r=[],a=e.length;for(let i=0;i<a;i++){let a=e[i];(0,n.WL)(a)||r.push((0,s.uT)(a,t))}return r}var o=r(98722),l=r(38472),c=r(33726),u=r(80477),d=r(89780),h=r(88085),p=r(59719),f=r(62937),m=r(74046),y=r(40874),b=r(98979),g=r(14303),v=r(24058),w=r(53864),x=r(40304),E=r(52368),_=r(41953);async function C(e,t){let{account:n=e.account,batch:i=!!e.batch?.multicall,blockNumber:s,blockTag:l="latest",accessList:p,blobs:m,code:y,data:x,factory:C,factoryData:S,gas:A,gasPrice:T,maxFeePerBlobGas:I,maxFeePerGas:P,maxPriorityFeePerGas:O,nonce:D,to:U,value:N,stateOverride:M,...B}=t,R=n?(0,o.J)(n):void 0;if(y&&(C||S))throw new u.C("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(y&&U)throw new u.C("Cannot provide both `code` & `to` as parameters.");
46let L=y&&x,j=C&&S&&U&&x,F=L||j,z=L?function(e){let{code:t,data:r}=e;return(0,f.m)({abi:a(["constructor(bytes, bytes)"]),bytecode:c.LX,args:[t,r]})}({code:y,data:x}):j?function(e){let{data:t,factory:r,factoryData:n,to:i}=e;return(0,f.m)({abi:a(["constructor(address, bytes, address, bytes)"]),bytecode:c.WN,args:[i,t,r,n]})}({data:x,factory:C,factoryData:S,to:U}):x;try{(0,_.c)(t);let r=(s?(0,b.cK)(s):void 0)||l,n=(0,E.yH)(M),a=e.chain?.formatters?.transactionRequest?.format,o=(a||w.Bv)({...(0,v.o)(B,{format:a}),from:R?.address,accessList:p,blobs:m,data:z,gas:A,gasPrice:T,maxFeePerBlobGas:I,maxFeePerGas:P,maxPriorityFeePerGas:O,nonce:D,to:F?void 0:U,value:N});if(i&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:o})&&!n)try{return await k(e,{...o,blockNumber:s,blockTag:l})}catch(e){if(!(e instanceof d.YE)&&!(e instanceof d.rj))throw e}let c=await e.request({method:"eth_call",params:n?[o,r,n]:[o,r]});if("0x"===c)return{data:void 0};return{data:c}}catch(a){let n=function(e){if(!(e instanceof u.C))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(a),{offchainLookup:i,offchainLookupSignature:s}=await r.e(4496).then(r.bind(r,54496));if(!1!==e.ccipRead&&n?.slice(0,10)===s&&U)return{data:await i(e,{data:n,to:U})};if(F&&n?.slice(0,10)==="0x101bb98d")throw new h.Po({factory:C});throw(0,g.d)(a,{...t,account:R,chain:e.chain})}}async function k(e,t){let{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:a,multicallAddress:o,to:c}=t,u=o;if(!u){if(!e.chain)throw new d.YE;u=(0,y.M)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let f=(i?(0,b.cK)(i):void 0)||s,{schedule:g}=(0,x.u)({id:`${e.uid}.${f}`,wait:n,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*r,fn:async t=>{let r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,m.p)({abi:l.v2,args:[r],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:n,to:u},f]});return(0,p.e)({abi:l.v2,args:[r],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:v,success:w}]=await g({data:a,to:c});if(!w)throw new h.$S({data:v});return"0x"===v?{data:void 0}:{data:v}}},84273:(e,t,r)=>{"use strict";r.d(t,{L:()=>d});var n=r(40928),i=r(80477);class s extends i.C{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var a=r(40304),o=r(40772),l=r(66692);let c={current:0,take(){return this.current++},reset(){this.current=0}};var u=r(67128);function d(e,t={}){let{batch:r,fetchOptions:i,key:h="http",methods:p,name:f="HTTP JSON-RPC",onFetchRequest:m,onFetchResponse:y,retryDelay:b}=t;return({chain:d,retryCount:g,timeout:v})=>{let{batchSize:w=1e3,wait:x=0}="object"==typeof r?r:{},E=t.retryCount??g,_=v??t.timeout??1e4,C=e||d?.rpcUrls.default.http[0];if(!C)throw new s;let k=function(e,t={}){return{async request(r){let{body:i,onRequest:s=t.onRequest,onResponse:a=t.onResponse,timeout:u=t.timeout??1e4}=r,d={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:h,method:p,signal:f}=d;try{let t;let r=await (0,o.w)(async({signal:t})=>{let r={...d,body:Array.isArray(i)?(0,l.A)(i.map(e=>({jsonrpc:"2.0",id:e.id??c.take(),...e}))):(0,l.A)({jsonrpc:"2.0",id:i.id??c.take(),...i}),headers:{"Content-Type":"application/json",...h},method:p||"POST",signal:f||(u>0?t:null)},n=new Request(e,r),a=await s?.(n,r)??{...r,url:e};return await fetch(a.url??e,a)},{errorInstance:new n.MU({body:i,url:e}),timeout:u,signal:!0});if(a&&await a(r),r.headers.get("Content-Type")?.startsWith("application/json"))t=await r.json();else{t=await r.text();try{t=JSON.parse(t||"{}")}catch(e){if(r.ok)throw e;t={error:t}}}if(!r.ok)throw new n.Ci({body:i,details:(0,l.A)(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){if(t instanceof n.Ci||t instanceof n.MU)throw t;throw new n.Ci({body:i,cause:t,url:e})}}}}(C,{fetchOptions:i,onRequest:m,onResponse:y,timeout:_});return(0,u.o)({key:h,methods:p,name:f,async request({method:e,params:t}){let i={method:e,params:t},{schedule:s}=(0,a.u)({id:C,wait:x,shouldSplitBatch:e=>e.length>w,fn:e=>k.request({body:e}),sort:(e,t)=>e.id-t.id}),o=async e=>r?s(e):[await k.request({body:e})],[{error:l,result:c}]=await o(i);if(l)throw new n.J8({body:i,error:l,url:C});return c},retryCount:E,retryDelay:b,timeout:_,type:"http"},{fetchOptions:i,url:C})}}},38472:(e,t,r)=>{"use strict";r.d(t,{Ag:()=>s,Rm:()=>l,SJ:()=>o,_:()=>c,oX:()=>a,v2:()=>n});let n=[{inputs:[{components:[{name:"target",type:"address"}
46,{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],s=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],a=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],l=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],c=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}]},33726:(e,t,r)=>{"use strict";r.d(t,{LX:()=>n,WN:()=>i,nP:()=>s});let n="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",i="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de82602083
460160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",s="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
46603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},26542:(e,t,r)=>{"use strict";r.d(t,{Ao:()=>i,Au:()=>n});let n=2n**16n-1n,i=2n**256n-1n},4382:(e,t,r)=>{"use strict";r.d(t,{J9:()=>s,Mc:()=>i,fD:()=>n});let n={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},s={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},57317:(e,t,r)=>{"use strict";r.d(t,{eL:()=>n,sz:()=>i});let n={gwei:9,wei:18},i={ether:-9,wei:9}},36991:(e,t,r)=>{"use strict";r.d(t,{BI:()=>w,Iy:()=>l,Iz:()=>b,MR:()=>g,M_:()=>y,Nc:()=>u,O:()=>c,Wl:()=>A,Wq:()=>p,YE:()=>h,YF:()=>o,YW:()=>a,_z:()=>f,d_:()=>S,dm:()=>k,fo:()=>x,gH:()=>d,j:()=>C,kE:()=>m,l3:()=>E,nK:()=>_,nM:()=>v});var n=r(57880),i=r(91149),s=r(80477);class a extends s.C{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class o extends s.C{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class l extends s.C{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.A)(t,{includeName:!0})})`,`Data:   ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class c extends s.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class u extends s.C{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}.
47Expected length: ${e}
48Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends s.C{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.E)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class h extends s.C{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch.
49Expected length (params): ${e}
50Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class p extends s.C{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI.
51Make sure you are using the correct ABI and that the error exists on it.
52You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class f extends s.C{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class m extends s.C{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI.
53Make sure you are using the correct ABI and that the event exists on it.
54You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class y extends s.C{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI.
55Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}class b extends s.C{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI.
56Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class g extends s.C{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI.
57Cannot decode function result without knowing what the parameter types are.
58Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class v extends s.C{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.B)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.B)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class w extends s.C{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}class x extends s.C{constructor({abiItem:e,data:t,params:r,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,n.A)(r,{includeName:!0})})`,`Data:   ${t} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=i}}class E extends s.C{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.B)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class _ extends s.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type.
59Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class C extends s.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type.
60Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class k extends s.C{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class S extends s.C{constructor(e){super(`"${e}" is not a valid definition type.
61Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}class A extends s.C{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}},89780:(e,t,r)=>{"use strict";r.d(t,{EH:()=>s,YE:()=>o,jF:()=>a,qD:()=>l,rj:()=>i});var n=r(80477);class i extends n.C{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class s extends n.C{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class a extends n.C{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class o extends n.C{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class l extends n.C{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}
61" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},88085:(e,t,r)=>{"use strict";r.d(t,{zX:()=>b,bG:()=>g,M:()=>v,rR:()=>w,Po:()=>x,$S:()=>E});var n=r(98722),i=r(4382),s=r(17169),a=r(57880),o=r(66692);function l({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,o.A)(t[r]):t[r]}`).join(", ")})`}var c=r(4617),u=r(69595),d=r(18773),h=r(36991),p=r(80477),f=r(56044),m=r(45757),y=r(9740);class b extends p.C{constructor(e,{account:t,docsPath:r,chain:i,data:s,gas:a,gasPrice:o,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:h,to:p,value:y,stateOverride:b}){let g=t?(0,n.J)(t):void 0,v=(0,m.aO)({from:g?.address,to:p,value:void 0!==y&&`${(0,u.c)(y)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:a,gasPrice:void 0!==o&&`${(0,d.Q)(o)} gwei`,maxFeePerGas:void 0!==l&&`${(0,d.Q)(l)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,d.Q)(c)} gwei`,nonce:h});b&&(v+=`
62${(0,f.uj)(b)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(
vendor: 6,475 bytes, line 62
62Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class g extends p.C{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:s,sender:o}){let u=(0,c.iY)({abi:t,args:r,name:s}),d=u?l({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,h=u?(0,a.B)(u,{includeName:!0}):void 0,p=(0,m.aO)({address:n&&(0,y.R)(n),function:h,args:d&&"()"!==d&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:o});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=s,this.sender=o}}class v extends p.C{constructor({abi:e,data:t,functionName:r,message:n}){let o,c,u,d,p;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:o}=p=(0,s.W)({abi:e,data:t});if("Error"===n)u=o[0];else if("Panic"===n){let[e]=o;u=i.fD[e]}else{let e=r?(0,a.B)(r,{includeName:!0}):void 0,t=r&&o?l({abiItem:r,args:o,includeFunctionName:!1,includeName:!1}):void 0;c=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else n&&(u=n);o instanceof h.Wq&&(d=o.signature,c=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(u&&"execution reverted"!==u||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,u||d].join("\n"):`The contract function "${r}" reverted.`,{cause:o,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=p,this.raw=t,this.reason=u,this.signature=d}}class w extends p.C{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class x extends p.C{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class E extends p.C{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},90305:(e,t,r)=>{"use strict";r.d(t,{B4:()=>i,SK:()=>s,hX:()=>a});var n=r(80477);class i extends n.C{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class s extends n.C{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class a extends n.C{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},87939:(e,t,r)=>{"use strict";r.d(t,{A7:()=>s,BG:()=>a,Fo:()=>p,K0:()=>l,Oh:()=>c,RM:()=>y,jj:()=>o,k5:()=>d,lN:()=>m,lY:()=>h,uC:()=>f,vW:()=>u});var n=r(18773),i=r(80477);class s extends i.C{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class l extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
63Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.C{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class h extends i.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends i.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends i.C{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.C{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.Q)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class y extends i.C{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},56044:(e,t,r)=>{"use strict";r.d(t,{Hi:()=>i,ft:()=>s,uj:()=>o});var n=r(80477);class i extends n.C{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class s extends n.C{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function a(e){return e.reduce((e,{slot:t,value:r})=>`${e}        ${t}: ${r}
64`,"")}function o(e){return e.reduce((e,{address:t,...r})=>{let n=`${e}    ${t}:
65`;return r.nonce&&(n+=`      nonce: ${r.nonce}
66`),r.balance&&(n+=`      balance: ${r.balance}
67`),r.code&&(n+=`      code: ${r.code}
68`),r.state&&(n+="      state:\n",n+=a(r.state)),r.stateDiff&&(n+="      stateDiff:\n",n+=a(r.stateDiff)),n},"  State Override:\n").slice(0,-1)}},45757:(e,t,r)=>{"use strict";r.d(t,{$s:()=>d,Kc:()=>p,Kz:()=>h,Vg:()=>c,WA:()=>f,aO:()=>a,fZ:()=>u,n3:()=>o,zW:()=>l});var n=r(69595),i=r(18773),s=r(80477);function a(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>`  ${`${e}:`.padEnd(r+1)}  ${t}`).join("\n")}class o extends s.C{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class l extends s.C{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends s.C{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class u extends s.C{constructor({storageKey:e}){super(`Size for storage key "${e}
68" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class d extends s.C{constructor(e,{account:t,docsPath:r,chain:s,data:o,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",a({chain:s&&`${s?.name} (id: ${s?.id})`,from:t?.address,to:p,value:void 0!==f&&`${(0,n.c)(f)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:l,gasPrice:void 0!==c&&`${(0,i.Q)(c)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.Q)(u)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.Q)(d)} gwei`,nonce:h})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class h extends s.C{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let s="Transaction";r&&void 0!==i&&(s=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(s=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(s=`Transaction at block number "${t}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class p extends s.C{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class f extends s.C{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},68424:(e,t,r)=>{"use strict";r.d(t,{n:()=>m});var n=r(36991),i=r(40814),s=r(95389),a=r(91149),o=r(22162),l=r(67368),c=r(93970),u=r(45732),d=r(98979);function h(e,t={}){void 0!==t.size&&(0,u.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,u.ME)(r,t)}var p=r(76397),f=r(46304);function m(e,t){let r="string"==typeof t?(0,p.aT)(t):t,m=(0,s.l)(r);if(0===(0,a.E)(r)&&e.length>0)throw new n.O;if((0,a.E)(t)&&32>(0,a.E)(t))throw new n.Iy({data:"string"==typeof t?t:(0,d.My)(t),params:e,size:(0,a.E)(t)});let b=0,g=[];for(let t=0;t<e.length;++t){let r=e[t];m.setPosition(b);let[s,a]=function e(t,r,{staticPosition:s}){let a=(0,f.k)(r.type);if(a){let[n,i]=a;return function(t,r,{length:n,staticPosition:i}){if(!n){let n=i+h(t.readBytes(32)),s=n+32;t.setPosition(n);let a=h(t.readBytes(32)),o=y(r),l=0,c=[];for(let n=0;n<a;++n){t.setPosition(s+(o?32*n:l));let[i,a]=e(t,r,{staticPosition:s});l+=a,c.push(i)}return t.setPosition(i+32),[c,32]}if(y(r)){let s=i+h(t.readBytes(32)),a=[];for(let i=0;i<n;++i){t.setPosition(s+32*i);let[n]=e(t,r,{staticPosition:s});a.push(n)}return t.setPosition(i+32),[a,32]}let s=0,a=[];for(let o=0;o<n;++o){let[n,o]=e(t,r,{staticPosition:i+s});s+=o,a.push(n)}return[a,s]}(t,{...r,type:i},{length:n,staticPosition:s})}if("tuple"===r.type)return function(t,r,{staticPosition:n}){let i=0===r.components.length||r.components.some(({name:e})=>!e),s=i?[]:{},a=0;if(y(r)){let o=n+h(t.readBytes(32));for(let n=0;n<r.components.length;++n){let l=r.components[n];t.setPosition(o+a);let[c,u]=e(t,l,{staticPosition:o});a+=u,s[i?n:l?.name]=c}return t.setPosition(n+32),[s,32]}for(let o=0;o<r.components.length;++o){let l=r.components[o],[c,u]=e(t,l,{staticPosition:n});s[i?o:l?.name]=c,a+=u}return[s,a]}(t,r,{staticPosition:s});if("address"===r.type)return function(e){let t=e.readBytes(32);return[(0,i.o)((0,d.My)((0,o.A1)(t,-20))),32]}(t);if("bool"===r.type)return[function(e,t={}){let r=e;if(void 0!==t.size&&((0,u.Sl)(r,{size:t.size}),r=(0,l.B)(r)),r.length>1||r[0]>1)throw new c.xO(r);return!!r[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=h(e.readBytes(32));e.setPosition(r+t);let n=h(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.My)(i),32]}return[(0,d.My)(e.readBytes(Number.parseInt(i),32)),32]}(t,r,{staticPosition:s});if(r.type.startsWith("uint")||r.type.startsWith("int"))return function(e,t){let r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[n>48?function(e,t={}){void 0!==t.size&&(0,u.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,u.uU)(r,t)}(i,{signed:r}):h(i,{signed:r}),32]}(t,r);if("string"===r.type)return function(e,{staticPosition:t}){let r=h(e.readBytes(32));e.setPosition(t+r);let n=h(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=function(e,t={}){let r=e;return void 0!==t.size&&((0,u.Sl)(r,{size:t.size}),r=(0,l.B)(r,{dir:"right"})),new TextDecoder().decode(r)}((0,l.B)(i));return e.setPosition(t+32),[s,32]}(t,{staticPosition:s});throw new n.j(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(m,r,{staticPosition:0});b+=a,g.push(s)}return g}function y(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;
vendor: 11,433 bytes, line 68
68if("tuple"===t)return e.components?.some(y);let r=(0,f.k)(e.type);return!!(r&&y({...e,type:r[1]}))}},17169:(e,t,r)=>{"use strict";r.d(t,{W:()=>c});var n=r(4382),i=r(36991),s=r(22162),a=r(44720),o=r(68424),l=r(57880);function c(e){let{abi:t,data:r}=e,c=(0,s.di)(r,0,4);if("0x"===c)throw new i.O;let u=[...t||[],n.Mc,n.J9].find(e=>"error"===e.type&&c===(0,a.V)((0,l.B)(e)));if(!u)throw new i.Wq(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,o.n)(u.inputs,(0,s.di)(r,4)):void 0,errorName:u.name}}},59719:(e,t,r)=>{"use strict";r.d(t,{e:()=>o});var n=r(36991),i=r(68424),s=r(4617);let a="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:r,functionName:o,data:l}=e,c=t[0];if(o){let e=(0,s.iY)({abi:t,args:r,name:o});if(!e)throw new n.Iz(o,{docsPath:a});c=e}if("function"!==c.type)throw new n.Iz(void 0,{docsPath:a});if(!c.outputs)throw new n.MR(c.name,{docsPath:a});let u=(0,i.n)(c.outputs,l);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},46304:(e,t,r)=>{"use strict";r.d(t,{h:()=>f,k:()=>y});var n=r(36991),i=r(61117),s=r(80477),a=r(93970),o=r(34354),l=r(16704),c=r(33085),u=r(91149),d=r(22162),h=r(98979),p=r(7702);function f(e,t){if(e.length!==t.length)throw new n.YE({expectedLength:e.length,givenLength:t.length});let r=m(function({params:e,values:t}){let r=[];for(let f=0;f<e.length;f++)r.push(function e({param:t,value:r}){let f=y(t.type);if(f){let[i,s]=f;return function(t,{length:r,param:i}){let s=null===r;if(!Array.isArray(t))throw new n.dm(t);if(!s&&t.length!==r)throw new n.Nc({expectedLength:r,givenLength:t.length,type:`${i.type}[${r}]`});let a=!1,o=[];for(let r=0;r<t.length;r++){let n=e({param:i,value:t[r]});n.dynamic&&(a=!0),o.push(n)}if(s||a){let e=m(o);if(s){let t=(0,h.cK)(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?(0,l.xW)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,l.xW)(o.map(({encoded:e})=>e))}}(r,{length:i,param:{...t,type:s}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,i=[];for(let s=0;s<r.components.length;s++){let a=r.components[s],o=Array.isArray(t)?s:a.name,l=e({param:a,value:t[o]});i.push(l),l.dynamic&&(n=!0)}return{dynamic:n,encoded:n?m(i):(0,l.xW)(i.map(({encoded:e})=>e))}}(r,{param:t});if("address"===t.type)return function(e){if(!(0,o.P)(e))throw new i.M({address:e});return{dynamic:!1,encoded:(0,c.db)(e.toLowerCase())}}(r);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new s.C(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,c.db)((0,h.$P)(e))}}(r);if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,n="256"]=p.Ge.exec(t.type)??[];return function(e,{signed:t,size:r=256}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new a.Ty({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:(0,h.cK)(e,{size:32,signed:t})}}(r,{signed:e,size:Number(n)})}if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,r]=t.type.split("bytes"),i=(0,u.E)(e);if(!r){let t=e;return i%32!=0&&(t=(0,c.db)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,l.xW)([(0,c.db)((0,h.cK)(i,{size:32})),t])}}if(i!==Number.parseInt(r))throw new n.gH({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:(0,c.db)(e,{dir:"right"})}}(r,{param:t});if("string"===t.type)return function(e){let t=(0,h.i3)(e),r=Math.ceil((0,u.E)(t)/32),n=[];for(let e=0;e<r;e++)n.push((0,c.db)((0,d.di)(t,32*e,(e+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,l.xW)([(0,c.db)((0,h.cK)((0,u.E)(t),{size:32})),...n])}}(r);throw new n.nK(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[f],value:t[f]}));return r}({params:e,values:t}));return 0===r.length?"0x":r}function m(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=(0,u.E)(i)}let r=[],n=[],i=0;for(let s=0;s<e.length;s++){let{dynamic:a,encoded:o}=e[s];a?(r.push((0,h.cK)(t+i,{size:32})),n.push(o),i+=(0,u.E)(o)):r.push(o)}return(0,l.xW)([...r,...n])}function y(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},62937:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(36991),i=r(16704),s=r(46304);let a="/docs/contract/encodeDeployData";function o(e){let{abi:t,args:r,bytecode:o}=e;if(!r||0===r.length)return o;let l=t.find(e=>"type"in e&&"constructor"===e.type);if(!l)throw new n.YW({docsPath:a});if(!("inputs"in l)||!l.inputs||0===l.inputs.length)throw new n.YF({docsPath:a});let c=(0,s.h)(l.inputs,r);return(0,i.aP)([o,c])}},74046:(e,t,r)=>{"use strict";r.d(t,{p:()=>u});var n=r(16704),i=r(46304),s=r(36991),a=r(44720),o=r(57880),l=r(4617);let c="/docs/contract/encodeFunctionData";function u(e){let{args:t}=e,{abi:r,functionName:u}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:r,functionName:n}=e,i=t[0];if(n){let e=(0,l.iY)({abi:t,args:r,name:n});if(!e)throw new s.Iz(n,{docsPath:c});i=e}if("function"!==i.type)throw new s.Iz(void 0,{docsPath:c});return{abi:[i],functionName:(0,a.V)((0,o.B)(i))}}(e),d=r[0],h="inputs"in d&&d.inputs?(0,i.h)(d.inputs,t??[]):void 0;return(0,n.aP)([u,h??"0x"])}},57880:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,B:()=>i});var n=r(36991);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.d_(e.type);return`${e.name}(${s(e.inputs,{includeName:t})})`}function s(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${s(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},4617:(e,t,r)=>{"use strict";r.d(t,{iY:()=>l});var n=r(36991),i=r(11601),s=r(34354),a=r(94490),o=r(44720);function l(e){let t;let{abi:r,args:l=[],name:c}=e,u=(0,i.q)(c,{strict:!1}),d=r.filter(e=>u?"function"===e.type?(0,o.V)(e)===c:"event"===e.type&&(0,a.h)(e)===c:"name"in e&&e.name===c);if(0!==d.length){if(1===d.length)return d[0];for(let e of d)if("inputs"in e){if(!l||0===l.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===l.length&&l.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return(0,s.P)(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=function e(t,r,n){for(let i in t){let a=t[i],o=r[i];if("tuple"===a.type&&"tuple"===o.type&&"components"in a&&"components"in o)return e(a.components,o.components,n[i]);let l=[a.type,o.type];if(l.includes("address")&&l.includes("bytes20")||(l.includes("address")&&l.includes("string")||l.includes("address")&&l.includes("bytes"))&&(0,s.P)(n[i],{strict:!1}))return l}}(e.inputs,t.inputs,l);if(r)throw new n.nM({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}return t||d[0]}}},81770:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(61117),i=r(34354);function s(e,t){if(!(0,i.P)(e,{strict:!1}))throw new n.M({address:e});if(!(0,i.P)(t,{strict:!1}))throw new n.M({address:t});return e.toLowerCase()===t.toLowerCase()}},40874:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(89780);function i({blockNumber:e,chain:t,contract:r}){let i=t?.contracts?.[r];if(!i)throw new n.rj({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.rj({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},95389:(e,t,r)=>{"use strict";r.d(t,{l:()=>s});var n=r(90305);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new n.hX({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.SK({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.B4({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new n.B4({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function s(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(i);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}},16704:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;
68for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}r.d(t,{aP:()=>i,xW:()=>n})},22162:(e,t,r)=>{"use strict";r.d(t,{A1:()=>c,di:()=>a,iN:()=>u});var n=r(57643),i=r(11601),s=r(91149);function a(e,t,r,{strict:n}={}){return(0,i.q)(e,{strict:!1})?u(e,t,r,{strict:n}):c(e,t,r,{strict:n})}function o(e,t){if("number"==typeof t&&t>0&&t>(0,s.E)(e)-1)throw new n.ii({offset:t,position:"start",size:(0,s.E)(e)})}function l(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,s.E)(e)!==r-t)throw new n.ii({offset:r,position:"end",size:(0,s.E)(e)})}function c(e,t,r,{strict:n}={}){o(e,t);let i=e.slice(t,r);return n&&l(i,t,r),i}function u(e,t,r,{strict:n}={}){o(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&l(i,t,r),i}},14303:(e,t,r)=>{"use strict";r.d(t,{d:()=>a});var n=r(88085),i=r(87939),s=r(90563);function a(e,{docsPath:t,...r}){let a=(()=>{let t=(0,s.l)(e,r);return t instanceof i.RM?e:t})();return new n.zX(a,{docsPath:t,...r})}},90563:(e,t,r)=>{"use strict";r.d(t,{l:()=>s});var n=r(80477),i=r(87939);function s(e,t){let r=(e.details||"").toLowerCase(),s=e instanceof n.C?e.walk(e=>e?.code===i.A7.code):e;return s instanceof n.C?new i.A7({cause:e,message:s.details}):i.A7.nodeMessage.test(r)?new i.A7({cause:e,message:e.details}):i.BG.nodeMessage.test(r)?new i.BG({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.jj.nodeMessage.test(r)?new i.jj({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.K0.nodeMessage.test(r)?new i.K0({cause:e,nonce:t?.nonce}):i.Oh.nodeMessage.test(r)?new i.Oh({cause:e,nonce:t?.nonce}):i.vW.nodeMessage.test(r)?new i.vW({cause:e,nonce:t?.nonce}):i.k5.nodeMessage.test(r)?new i.k5({cause:e}):i.lY.nodeMessage.test(r)?new i.lY({cause:e,gas:t?.gas}):i.Fo.nodeMessage.test(r)?new i.Fo({cause:e,gas:t?.gas}):i.uC.nodeMessage.test(r)?new i.uC({cause:e}):i.lN.nodeMessage.test(r)?new i.lN({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.RM({cause:e})}},24058:(e,t,r)=>{"use strict";function n(e,{format:t}){if(!t)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(t(e||{})),r}r.d(t,{o:()=>n})},34897:(e,t,r)=>{"use strict";function n(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{let i=t(e);if(r)for(let e of r)delete i[e];return{...i,...n(e)}},type:e})}r.d(t,{q:()=>n})},53864:(e,t,r)=>{"use strict";r.d(t,{Bv:()=>a,bm:()=>o});var n=r(98979),i=r(34897);let s={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:(0,n.cK)(e.chainId),nonce:(0,n.cK)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.cK)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.cK)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,n.My)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,n.cK)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,n.cK)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,n.cK)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,n.cK)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,n.cK)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,n.cK)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=s[e.type]),void 0!==e.value&&(t.value=(0,n.cK)(e.value)),t}let o=(0,i.q)("transactionRequest",a)},94490:(e,t,r)=>{"use strict";r.d(t,{h:()=>n});let n=r(68155).k},44720:(e,t,r)=>{"use strict";r.d(t,{V:()=>s});var n=r(22162),i=r(68155);let s=e=>(0,n.di)((0,i.k)(e),0,4)},68155:(e,t,r)=>{"use strict";r.d(t,{k:()=>c});var n=r(76397),i=r(55207);let s=e=>(0,i.S)((0,n.ZJ)(e));var a=r(96139),o=r(80477);let l=e=>(function(e){let t=!0,r="",n=0,i="",s=!1;for(let a=0;a<e.length;a++){let o=e[a];if(["(",")",","].includes(o)&&(t=!0),"("===o&&n++,")"===o&&n--,t){if(0===n){if(" "===o&&["event","function",""].includes(i))i="";else if(i+=o,")"===o){s=!0;break}continue}if(" "===o){","!==e[a-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=o,r+=o}}if(!s)throw new o.C("Unable to normalize signature.");return i}
68)("string"==typeof e?e:(0,a.B)(e));function c(e){return s(l(e))}},40304:(e,t,r)=>{"use strict";r.d(t,{u:()=>s});var n=r(30400);let i=new Map;function s({fn:e,id:t,shouldSplitBatch:r,wait:s=0,sort:a}){let o=async()=>{let t=u();l();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{a&&Array.isArray(e)&&e.sort(a);for(let r=0;r<t.length;r++){let{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:n}=t[r];n?.(e)}})},l=()=>i.delete(t),c=()=>u().map(({args:e})=>e),u=()=>i.get(t)||[],d=e=>i.set(t,[...u(),e]);return{flush:l,async schedule(e){let{promise:t,resolve:i,reject:a}=(0,n.Y)();return(r?.([...c(),e])&&o(),u().length>0)?d({args:e,resolve:i,reject:a}):(d({args:e,resolve:i,reject:a}),setTimeout(o,s)),t}}}},30400:(e,t,r)=>{"use strict";function n(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}r.d(t,{Y:()=>n})},7702:(e,t,r)=>{"use strict";r.d(t,{BD:()=>i,D5:()=>n,Ge:()=>s});let n=/^(.*)\[([0-9]*)\]$/,i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,s=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},52368:(e,t,r)=>{"use strict";r.d(t,{yH:()=>c});var n=r(61117),i=r(57643),s=r(56044),a=r(34354),o=r(98979);function l(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new i.NV({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.NV({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function c(e){if(!e)return;let t={};for(let{address:r,...i}of e){if(!(0,a.P)(r,{strict:!1}))throw new n.M({address:r});if(t[r])throw new s.Hi({address:r});t[r]=function(e){let{balance:t,nonce:r,state:n,stateDiff:i,code:a}=e,c={};
68if(void 0!==a&&(c.code=a),void 0!==t&&(c.balance=(0,o.cK)(t)),void 0!==r&&(c.nonce=(0,o.cK)(r)),void 0!==n&&(c.state=l(n)),void 0!==i){if(c.state)throw new s.ft;c.stateDiff=l(i)}return c}(i)}return t}},41953:(e,t,r)=>{"use strict";r.d(t,{c:()=>c});var n=r(98722),i=r(26542),s=r(61117),a=r(87939),o=r(45757),l=r(34354);function c(e){let{account:t,gasPrice:r,maxFeePerGas:c,maxPriorityFeePerGas:u,to:d}=e,h=t?(0,n.J)(t):void 0;if(h&&!(0,l.P)(h.address))throw new s.M({address:h.address});if(d&&!(0,l.P)(d))throw new s.M({address:d});if(void 0!==r&&(void 0!==c||void 0!==u))throw new o.n3;if(c&&c>i.Ao)throw new a.BG({maxFeePerGas:c});if(u&&c&&u>c)throw new a.lN({maxFeePerGas:c,maxPriorityFeePerGas:u})}},69595:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var n=r(57317),i=r(89888);function s(e,t="wei"){return(0,i.J)(e,n.eL[t])}},18773:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s});var n=r(57317),i=r(89888);function s(e,t="wei"){return(0,i.J)(e,n.sz[t])}},89888:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[i,s]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}r.d(t,{J:()=>n})},24185:(e,t,r)=>{"use strict";r.d(t,{x:()=>l});var n=r(12115);let i=!1;async function s(e,t={}){let r;if(i)return[];i=!0,e.setState(e=>({...e,status:e.current?"reconnecting":"connecting"}));let n=[];if(t.connectors?.length)for(let r of t.connectors){let t;t="function"==typeof r?e._internal.connectors.setup(r):r,n.push(t)}else n.push(...e.connectors);try{r=await e.storage?.getItem("recentConnectorId")}catch{}let a={};for(let[,t]of e.state.connections)a[t.connector.id]=1;r&&(a[r]=0);let o=Object.keys(a).length>0?[...n].sort((e,t)=>(a[e.id]??10)-(a[t.id]??10)):n,l=!1,c=[],u=[];for(let t of o){let r=await t.getProvider().catch(()=>void 0);if(!r||u.some(e=>e===r)||!await t.isAuthorized())continue;let n=await t.connect({isReconnecting:!0}).catch(()=>null);n&&(t.emitter.off("connect",e._internal.events.connect),t.emitter.on("change",e._internal.events.change),t.emitter.on("disconnect",e._internal.events.disconnect),e.setState(e=>{let r=new Map(l?e.connections:new Map).set(t.uid,{accounts:n.accounts,chainId:n.chainId,connector:t});return{...e,current:l?e.current:t.uid,connections:r}}),c.push({accounts:n.accounts,chainId:n.chainId,connector:t}),u.push(r),l=!0)}return("reconnecting"===e.state.status||"connecting"===e.state.status)&&(l?e.setState(e=>({...e,status:"connected"})):e.setState(e=>({...e,connections:new Map,current:null,status:"disconnected"}))),i=!1,c}function a(e){let{children:t,config:r,initialState:i,reconnectOnMount:a=!0}=e,{onMount:o}=function(e,t){let{initialState:r,reconnectOnMount:n}=t;return r&&!e._internal.store.persist.hasHydrated()&&e.setState({...r,chainId:e.chains.some(e=>e.id===r.chainId)?r.chainId:e.chains[0].id,connections:n?r.connections:new Map,status:n?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(t=>{let r=new Set;for(let e of t??[])if(e.rdns)for(let t of Array.isArray(e.rdns)?e.rdns:[e.rdns])r.add(t);let n=[];for(let t of e._internal.mipd?.getProviders()??[]){if(r.has(t.info.rdns))continue;let i=e._internal.connectors.providerDetailToConnector(t),s=e._internal.connectors.setup(i);n.push(s)}return[...t,...n]})),n?s(e):e.storage&&e.setState(e=>({...e,connections:new Map}))}}}(r,{initialState:i,reconnectOnMount:a});r._internal.ssr||o();let l=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{if(l.current&&r._internal.ssr)return o(),()=>{l.current=!1}},[]),t}let o=(0,n.createContext)(void 0);function l(e){let{children:t,config:r}=e;return(0,n.createElement)(a,e,(0,n.createElement)(o.Provider,{value:r},t))}},23817:e=>{"use strict";e.exports=JSON.parse('{"id":"google-analytics","description":"Install a Google Analytics tag on your website","website":"https://analytics.google.com/analytics/web/","scripts":[{"url":"https://www.googletagmanager.com/gtag/js","params":["id"],"strategy":"worker","location":"head","action":"append"},{"code":"window.dataLayer=window.dataLayer||[];window.gtag=function gtag(){window.dataLayer.push(arguments);};gtag(\'js\',new Date());gtag(\'config\',\'${args.id}\')","strategy":"worker","location":"head","action":"append"}]}')},26802:e=>{"use strict";e.exports=JSON.parse('{"id":"google-maps-embed","description":"Embed a Google Maps embed on your webpage","website":"https://developers.google.com/maps/documentation/embed/get-started","html":{"element":"iframe","attributes":{"loading":"lazy","src":{"url":"https://www.google.com/maps/embed/v1/place","slugParam":"mode","params":["key","q","center","zoom","maptype","language","regi
68on"]},"referrerpolicy":"no-referrer-when-downgrade","frameborder":"0","style":"border:0","allowfullscreen":true,"width":null,"height":null}}}')},88246:e=>{"use strict";e.exports=JSON.parse('{"id":"youtube-embed","description":"Embed a YouTube embed on your webpage.","website":"https://github.com/paulirish/lite-youtube-embed","html":{"element":"lite-youtube","attributes":{"videoid":null,"playlabel":null}},"stylesheets":["https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.css"],"scripts":[{"url":"https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.js","strategy":"idle","location":"head","action":"append"}]}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.