import{a as nt,b as ji,c as Dy}from"./chunk-MAVBMFJK.js";import{a as Be,b as Z,c as Sy,d as SU,e as be,f as Wt,g as ne}from"./chunk-WX5TJIZK.js";import{J as Bc,Ja as v3,Ka as oh,a as xU,b as Lo,c as He,d as Dt,e as Dm,f as kt,g as qe,h as Ui,i as Vs,j as Ei,k as Yt,l as hA,m as ze,n as ut,o as ni,p as ye,q as Ct,r as Xt,s as $s,t as lt,u as Ot,v as Rm,x as IU,y as AU,z as de}from"./chunk-HBDXKH7K.js";import"./chunk-ZDKSIC7G.js";import{a as B,b as _e,c as bU,d as Ay,e as ma,f as F,g as An,h as ko,i as wr,j as St,k as Hs,l as Xa,m as w3,n as rs,o as y,p as sh,q as EU,r as _U,t as CU}from"./chunk-4FROKTGO.js";var j3={};An(j3,{__addDisposableResource:()=>hj,__assign:()=>P3,__asyncDelegator:()=>oj,__asyncGenerator:()=>B3,__asyncValues:()=>U3,__await:()=>Uc,__awaiter:()=>L3,__classPrivateFieldGet:()=>uj,__classPrivateFieldIn:()=>dj,__classPrivateFieldSet:()=>fj,__createBinding:()=>F3,__decorate:()=>jc,__disposeResources:()=>pj,__esDecorate:()=>Awe,__exportStar:()=>rj,__extends:()=>YU,__generator:()=>tj,__importDefault:()=>lj,__importStar:()=>cj,__makeTemplateObject:()=>aj,__metadata:()=>ej,__param:()=>XU,__propKey:()=>Dwe,__read:()=>DA,__rest:()=>QU,__runInitializers:()=>Swe,__setFunctionName:()=>Rwe,__spread:()=>nj,__spreadArray:()=>sj,__spreadArrays:()=>ij,__values:()=>k3,default:()=>Owe});function YU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");SA(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function QU(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function jc(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function XU(t,e){return function(r,n){e(r,n,t)}}function Awe(t,e,r,n,i,s){function o(R){if(R!==void 0&&typeof R!="function")throw new TypeError("Function expected");return R}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,d=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),h,m=!1,w=r.length-1;w>=0;w--){var _={};for(var C in n)_[C]=C==="access"?{}:n[C];for(var C in n.access)_.access[C]=n.access[C];_.addInitializer=function(R){if(m)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(R||null))};var A=(0,r[w])(a==="accessor"?{get:d.get,set:d.set}:d[c],_);if(a==="accessor"){if(A===void 0)continue;if(A===null||typeof A!="object")throw new TypeError("Object expected");(h=o(A.get))&&(d.get=h),(h=o(A.set))&&(d.set=h),(h=o(A.init))&&i.unshift(h)}else(h=o(A))&&(a==="field"?i.unshift(h):d[c]=h)}u&&Object.defineProperty(u,n.name,d),m=!0}function Swe(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function Dwe(t){return typeof t=="symbol"?t:"".concat(t)}function Rwe(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function ej(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function L3(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(h){o(h)}}function c(d){try{u(n.throw(d))}catch(h){o(h)}}function u(d){d.done?s(d.value):i(d.value).then(a,c)}u((n=n.apply(t,e||[])).next())})}function tj(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(d){u=[6,d],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function rj(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&F3(e,t,r)}function k3(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function DA(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function nj(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(DA(arguments[e]));return t}function ij(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function sj(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}function Uc(t){return this instanceof Uc?(this.v=t,this):new Uc(t)}function B3(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){n[m]&&(i[m]=function(w){return new Promise(function(_,C){s.push([m,w,_,C])>1||a(m,w)})})}function a(m,w){try{c(n[m](w))}catch(_){h(s[0][3],_)}}function c(m){m.value instanceof Uc?Promise.resolve(m.value.v).then(u,d):h(s[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function h(m,w){m(w),s.shift(),s.length&&a(s[0][0],s[0][1])}}function oj(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Uc(t[i](o)),done:!1}:s?s(o):o}:s}}function U3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof k3=="function"?k3(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(u){s({value:u,done:a})},o)}}function aj(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function cj(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&F3(e,t,r);return Twe(e,t),e}function lj(t){return t&&t.__esModule?t:{default:t}}function uj(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function fj(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function dj(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function hj(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}function pj(t){function e(n){t.error=t.hasError?new Nwe(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}function r(){for(;t.stack.length;){var n=t.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(s){return e(s),r()})}catch(s){e(s)}}if(t.hasError)throw t.error}return r()}var SA,P3,F3,Twe,Nwe,Owe,Hc=ma(()=>{"use strict";SA=function(t,e){return SA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},SA(t,e)};P3=function(){return P3=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},P3.apply(this,arguments)};F3=Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]};Twe=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};Nwe=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};Owe={__extends:YU,__assign:P3,__rest:QU,__decorate:jc,__param:XU,__metadata:ej,__awaiter:L3,__generator:tj,__createBinding:F3,__exportStar:rj,__values:k3,__read:DA,__spread:nj,__spreadArrays:ij,__spreadArray:sj,__await:Uc,__asyncGenerator:B3,__asyncDelegator:oj,__asyncValues:U3,__makeTemplateObject:aj,__importStar:cj,__importDefault:lj,__classPrivateFieldGet:uj,__classPrivateFieldSet:fj,__classPrivateFieldIn:dj,__addDisposableResource:hj,__disposeResources:pj}});var Gs=F((iwt,FT)=>{"use strict";var kg=typeof Reflect=="object"?Reflect:null,Jz=kg&&typeof kg.apply=="function"?kg.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},wC;kg&&typeof kg.ownKeys=="function"?wC=kg.ownKeys:Object.getOwnPropertySymbols?wC=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:wC=function(e){return Object.getOwnPropertyNames(e)};function a5e(t){console&&console.warn&&console.warn(t)}var Qz=Number.isNaN||function(e){return e!==e};function Qr(){Qr.init.call(this)}FT.exports=Qr;FT.exports.once=f5e;Qr.EventEmitter=Qr;Qr.prototype._events=void 0;Qr.prototype._eventsCount=0;Qr.prototype._maxListeners=void 0;var Yz=10;function vC(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Qr,"defaultMaxListeners",{enumerable:!0,get:function(){return Yz},set:function(t){if(typeof t!="number"||t<0||Qz(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Yz=t}});Qr.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Qr.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Qz(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Xz(t){return t._maxListeners===void 0?Qr.defaultMaxListeners:t._maxListeners}Qr.prototype.getMaxListeners=function(){return Xz(this)};Qr.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")Jz(c,this,r);else for(var u=c.length,d=iG(c,u),n=0;n<u;++n)Jz(d[n],this,r);return!0};function eG(t,e,r,n){var i,s,o;if(vC(r),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),o===void 0)o=s[e]=r,++t._eventsCount;else if(typeof o=="function"?o=s[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=Xz(t),i>0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=o.length,a5e(a)}return t}Qr.prototype.addListener=function(e,r){return eG(this,e,r,!1)};Qr.prototype.on=Qr.prototype.addListener;Qr.prototype.prependListener=function(e,r){return eG(this,e,r,!0)};function c5e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function tG(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c5e.bind(n);return i.listener=r,n.wrapFn=i,i}Qr.prototype.once=function(e,r){return vC(r),this.on(e,tG(this,e,r)),this};Qr.prototype.prependOnceListener=function(e,r){return vC(r),this.prependListener(e,tG(this,e,r)),this};Qr.prototype.removeListener=function(e,r){var n,i,s,o,a;if(vC(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():l5e(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||r)}return this};Qr.prototype.off=Qr.prototype.removeListener;Qr.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function rG(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?u5e(i):iG(i,i.length)}Qr.prototype.listeners=function(e){return rG(this,e,!0)};Qr.prototype.rawListeners=function(e){return rG(this,e,!1)};Qr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):nG.call(t,e)};Qr.prototype.listenerCount=nG;function nG(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Qr.prototype.eventNames=function(){return this._eventsCount>0?wC(this._events):[]};function iG(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function l5e(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function u5e(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function f5e(t,e){return new Promise(function(r,n){function i(o){t.removeListener(e,s),n(o)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}sG(t,e,s,{once:!0}),e!=="error"&&d5e(t,i,{once:!0})})}function d5e(t,e,r){typeof t.on=="function"&&sG(t,"error",e,r)}function sG(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(s){n.once&&t.removeEventListener(e,i),r(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var oG=F(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});function h5e(t,e){var r=t>>>16&65535,n=t&65535,i=e>>>16&65535,s=e&65535;return n*s+(r*s+n*i<<16>>>0)|0}Wo.mul=Math.imul||h5e;function p5e(t,e){return t+e|0}Wo.add=p5e;function m5e(t,e){return t-e|0}Wo.sub=m5e;function g5e(t,e){return t<<e|t>>>32-e}Wo.rotl=g5e;function y5e(t,e){return t<<32-e|t>>>e}Wo.rotr=y5e;function w5e(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}Wo.isInteger=Number.isInteger||w5e;Wo.MAX_SAFE_INTEGER=9007199254740991;Wo.isSafeInteger=function(t){return Wo.isInteger(t)&&t>=-Wo.MAX_SAFE_INTEGER&&t<=Wo.MAX_SAFE_INTEGER}});var Lg=F(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});var aG=oG();function v5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}rr.readInt16BE=v5e;function b5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}rr.readUint16BE=b5e;function E5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}rr.readInt16LE=E5e;function _5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}rr.readUint16LE=_5e;function cG(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}rr.writeUint16BE=cG;rr.writeInt16BE=cG;function lG(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}rr.writeUint16LE=lG;rr.writeInt16LE=lG;function BT(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}rr.readInt32BE=BT;function UT(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}rr.readUint32BE=UT;function jT(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}rr.readInt32LE=jT;function HT(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}rr.readUint32LE=HT;function bC(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}rr.writeUint32BE=bC;rr.writeInt32BE=bC;function EC(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}rr.writeUint32LE=EC;rr.writeInt32LE=EC;function C5e(t,e){e===void 0&&(e=0);var r=BT(t,e),n=BT(t,e+4);return r*4294967296+n-(n>>31)*4294967296}rr.readInt64BE=C5e;function x5e(t,e){e===void 0&&(e=0);var r=UT(t,e),n=UT(t,e+4);return r*4294967296+n}rr.readUint64BE=x5e;function I5e(t,e){e===void 0&&(e=0);var r=jT(t,e),n=jT(t,e+4);return n*4294967296+r-(r>>31)*4294967296}rr.readInt64LE=I5e;function A5e(t,e){e===void 0&&(e=0);var r=HT(t,e),n=HT(t,e+4);return n*4294967296+r}rr.readUint64LE=A5e;function uG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),bC(t/4294967296>>>0,e,r),bC(t>>>0,e,r+4),e}rr.writeUint64BE=uG;rr.writeInt64BE=uG;function fG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),EC(t>>>0,e,r),EC(t/4294967296>>>0,e,r+4),e}rr.writeUint64LE=fG;rr.writeInt64LE=fG;function S5e(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=t/8+r-1;s>=r;s--)n+=e[s]*i,i*=256;return n}rr.readUintBE=S5e;function D5e(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s<r+t/8;s++)n+=e[s]*i,i*=256;return n}rr.readUintLE=D5e;function R5e(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!aG.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,s=t/8+n-1;s>=n;s--)r[s]=e/i&255,i*=256;return r}rr.writeUintBE=R5e;function T5e(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!aG.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s<n+t/8;s++)r[s]=e/i&255,i*=256;return r}rr.writeUintLE=T5e;function N5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}rr.readFloat32BE=N5e;function O5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}rr.readFloat32LE=O5e;function M5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}rr.readFloat64BE=M5e;function P5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}rr.readFloat64LE=P5e;function k5e(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t),e}rr.writeFloat32BE=k5e;function L5e(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t,!0),e}rr.writeFloat32LE=L5e;function F5e(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t),e}rr.writeFloat64BE=F5e;function B5e(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t,!0),e}rr.writeFloat64LE=B5e});var Aa=F(VT=>{"use strict";Object.defineProperty(VT,"__esModule",{value:!0});function U5e(t){for(var e=0;e<t.length;e++)t[e]=0;return t}VT.wipe=U5e});var hG=F(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});var xs=Lg(),$T=Aa(),j5e=20;function H5e(t,e,r){for(var n=1634760805,i=857760878,s=2036477234,o=1797285236,a=r[3]<<24|r[2]<<16|r[1]<<8|r[0],c=r[7]<<24|r[6]<<16|r[5]<<8|r[4],u=r[11]<<24|r[10]<<16|r[9]<<8|r[8],d=r[15]<<24|r[14]<<16|r[13]<<8|r[12],h=r[19]<<24|r[18]<<16|r[17]<<8|r[16],m=r[23]<<24|r[22]<<16|r[21]<<8|r[20],w=r[27]<<24|r[26]<<16|r[25]<<8|r[24],_=r[31]<<24|r[30]<<16|r[29]<<8|r[28],C=e[3]<<24|e[2]<<16|e[1]<<8|e[0],A=e[7]<<24|e[6]<<16|e[5]<<8|e[4],R=e[11]<<24|e[10]<<16|e[9]<<8|e[8],L=e[15]<<24|e[14]<<16|e[13]<<8|e[12],U=n,V=i,Q=s,Y=o,k=a,q=c,ie=u,W=d,z=h,X=m,D=w,g=_,v=C,x=A,I=R,T=L,H=0;H<j5e;H+=2)U=U+k|0,v^=U,v=v>>>16|v<<16,z=z+v|0,k^=z,k=k>>>20|k<<12,V=V+q|0,x^=V,x=x>>>16|x<<16,X=X+x|0,q^=X,q=q>>>20|q<<12,Q=Q+ie|0,I^=Q,I=I>>>16|I<<16,D=D+I|0,ie^=D,ie=ie>>>20|ie<<12,Y=Y+W|0,T^=Y,T=T>>>16|T<<16,g=g+T|0,W^=g,W=W>>>20|W<<12,Q=Q+ie|0,I^=Q,I=I>>>24|I<<8,D=D+I|0,ie^=D,ie=ie>>>25|ie<<7,Y=Y+W|0,T^=Y,T=T>>>24|T<<8,g=g+T|0,W^=g,W=W>>>25|W<<7,V=V+q|0,x^=V,x=x>>>24|x<<8,X=X+x|0,q^=X,q=q>>>25|q<<7,U=U+k|0,v^=U,v=v>>>24|v<<8,z=z+v|0,k^=z,k=k>>>25|k<<7,U=U+q|0,T^=U,T=T>>>16|T<<16,D=D+T|0,q^=D,q=q>>>20|q<<12,V=V+ie|0,v^=V,v=v>>>16|v<<16,g=g+v|0,ie^=g,ie=ie>>>20|ie<<12,Q=Q+W|0,x^=Q,x=x>>>16|x<<16,z=z+x|0,W^=z,W=W>>>20|W<<12,Y=Y+k|0,I^=Y,I=I>>>16|I<<16,X=X+I|0,k^=X,k=k>>>20|k<<12,Q=Q+W|0,x^=Q,x=x>>>24|x<<8,z=z+x|0,W^=z,W=W>>>25|W<<7,Y=Y+k|0,I^=Y,I=I>>>24|I<<8,X=X+I|0,k^=X,k=k>>>25|k<<7,V=V+ie|0,v^=V,v=v>>>24|v<<8,g=g+v|0,ie^=g,ie=ie>>>25|ie<<7,U=U+q|0,T^=U,T=T>>>24|T<<8,D=D+T|0,q^=D,q=q>>>25|q<<7;xs.writeUint32LE(U+n|0,t,0),xs.writeUint32LE(V+i|0,t,4),xs.writeUint32LE(Q+s|0,t,8),xs.writeUint32LE(Y+o|0,t,12),xs.writeUint32LE(k+a|0,t,16),xs.writeUint32LE(q+c|0,t,20),xs.writeUint32LE(ie+u|0,t,24),xs.writeUint32LE(W+d|0,t,28),xs.writeUint32LE(z+h|0,t,32),xs.writeUint32LE(X+m|0,t,36),xs.writeUint32LE(D+w|0,t,40),xs.writeUint32LE(g+_|0,t,44),xs.writeUint32LE(v+C|0,t,48),xs.writeUint32LE(x+A|0,t,52),xs.writeUint32LE(I+R|0,t,56),xs.writeUint32LE(T+L|0,t,60)}function dG(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var s,o;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=new Uint8Array(16),o=s.length-e.length,s.set(e,o)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");s=e,o=i}for(var a=new Uint8Array(64),c=0;c<r.length;c+=64){H5e(a,s,t);for(var u=c;u<c+64&&u<r.length;u++)n[u]=r[u]^a[u-c];$5e(s,0,o)}return $T.wipe(a),i===0&&$T.wipe(s),n}_C.streamXOR=dG;function V5e(t,e,r,n){return n===void 0&&(n=0),$T.wipe(r),dG(t,e,r,r,n)}_C.stream=V5e;function $5e(t,e,r){for(var n=1;r--;)n=n+(t[e]&255)|0,t[e]=n&255,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}});var CC=F(Fg=>{"use strict";Object.defineProperty(Fg,"__esModule",{value:!0});function q5e(t,e,r){return~(t-1)&e|t-1&r}Fg.select=q5e;function W5e(t,e){return(t|0)-(e|0)-1>>>31&1}Fg.lessOrEqual=W5e;function pG(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}Fg.compare=pG;function z5e(t,e){return t.length===0||e.length===0?!1:pG(t,e)!==0}Fg.equal=z5e});var gG=F(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var G5e=CC(),xC=Aa();fu.DIGEST_LENGTH=16;var mG=function(){function t(e){this.digestLength=fu.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]=r&8191;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 o=e[8]|e[9]<<8;this._r[4]=(s>>>4|o<<12)&255,this._r[5]=o>>>1&8190;var a=e[10]|e[11]<<8;this._r[6]=(o>>>14|a<<2)&8191;var c=e[12]|e[13]<<8;this._r[7]=(a>>>11|c<<5)&8065;var u=e[14]|e[15]<<8;this._r[8]=(c>>>8|u<<8)&8191,this._r[9]=u>>>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 t.prototype._blocks=function(e,r,n){for(var i=this._fin?0:2048,s=this._h[0],o=this._h[1],a=this._h[2],c=this._h[3],u=this._h[4],d=this._h[5],h=this._h[6],m=this._h[7],w=this._h[8],_=this._h[9],C=this._r[0],A=this._r[1],R=this._r[2],L=this._r[3],U=this._r[4],V=this._r[5],Q=this._r[6],Y=this._r[7],k=this._r[8],q=this._r[9];n>=16;){var ie=e[r+0]|e[r+1]<<8;s+=ie&8191;var W=e[r+2]|e[r+3]<<8;o+=(ie>>>13|W<<3)&8191;var z=e[r+4]|e[r+5]<<8;a+=(W>>>10|z<<6)&8191;var X=e[r+6]|e[r+7]<<8;c+=(z>>>7|X<<9)&8191;var D=e[r+8]|e[r+9]<<8;u+=(X>>>4|D<<12)&8191,d+=D>>>1&8191;var g=e[r+10]|e[r+11]<<8;h+=(D>>>14|g<<2)&8191;var v=e[r+12]|e[r+13]<<8;m+=(g>>>11|v<<5)&8191;var x=e[r+14]|e[r+15]<<8;w+=(v>>>8|x<<8)&8191,_+=x>>>5|i;var I=0,T=I;T+=s*C,T+=o*(5*q),T+=a*(5*k),T+=c*(5*Y),T+=u*(5*Q),I=T>>>13,T&=8191,T+=d*(5*V),T+=h*(5*U),T+=m*(5*L),T+=w*(5*R),T+=_*(5*A),I+=T>>>13,T&=8191;var H=I;H+=s*A,H+=o*C,H+=a*(5*q),H+=c*(5*k),H+=u*(5*Y),I=H>>>13,H&=8191,H+=d*(5*Q),H+=h*(5*V),H+=m*(5*U),H+=w*(5*L),H+=_*(5*R),I+=H>>>13,H&=8191;var $=I;$+=s*R,$+=o*A,$+=a*C,$+=c*(5*q),$+=u*(5*k),I=$>>>13,$&=8191,$+=d*(5*Y),$+=h*(5*Q),$+=m*(5*V),$+=w*(5*U),$+=_*(5*L),I+=$>>>13,$&=8191;var N=I;N+=s*L,N+=o*R,N+=a*A,N+=c*C,N+=u*(5*q),I=N>>>13,N&=8191,N+=d*(5*k),N+=h*(5*Y),N+=m*(5*Q),N+=w*(5*V),N+=_*(5*U),I+=N>>>13,N&=8191;var E=I;E+=s*U,E+=o*L,E+=a*R,E+=c*A,E+=u*C,I=E>>>13,E&=8191,E+=d*(5*q),E+=h*(5*k),E+=m*(5*Y),E+=w*(5*Q),E+=_*(5*V),I+=E>>>13,E&=8191;var P=I;P+=s*V,P+=o*U,P+=a*L,P+=c*R,P+=u*A,I=P>>>13,P&=8191,P+=d*C,P+=h*(5*q),P+=m*(5*k),P+=w*(5*Y),P+=_*(5*Q),I+=P>>>13,P&=8191;var ae=I;ae+=s*Q,ae+=o*V,ae+=a*U,ae+=c*L,ae+=u*R,I=ae>>>13,ae&=8191,ae+=d*A,ae+=h*C,ae+=m*(5*q),ae+=w*(5*k),ae+=_*(5*Y),I+=ae>>>13,ae&=8191;var ce=I;ce+=s*Y,ce+=o*Q,ce+=a*V,ce+=c*U,ce+=u*L,I=ce>>>13,ce&=8191,ce+=d*R,ce+=h*A,ce+=m*C,ce+=w*(5*q),ce+=_*(5*k),I+=ce>>>13,ce&=8191;var se=I;se+=s*k,se+=o*Y,se+=a*Q,se+=c*V,se+=u*U,I=se>>>13,se&=8191,se+=d*L,se+=h*R,se+=m*A,se+=w*C,se+=_*(5*q),I+=se>>>13,se&=8191;var pe=I;pe+=s*q,pe+=o*k,pe+=a*Y,pe+=c*Q,pe+=u*V,I=pe>>>13,pe&=8191,pe+=d*U,pe+=h*L,pe+=m*R,pe+=w*A,pe+=_*C,I+=pe>>>13,pe&=8191,I=(I<<2)+I|0,I=I+T|0,T=I&8191,I=I>>>13,H+=I,s=T,o=H,a=$,c=N,u=E,d=P,h=ae,m=ce,w=se,_=pe,r+=16,n-=16}this._h[0]=s,this._h[1]=o,this._h[2]=a,this._h[3]=c,this._h[4]=u,this._h[5]=d,this._h[6]=h,this._h[7]=m,this._h[8]=w,this._h[9]=_},t.prototype.finish=function(e,r){r===void 0&&(r=0);var n=new Uint16Array(10),i,s,o,a;if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(i=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=i,i=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=i*5,i=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=i,i=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=i,n[0]=this._h[0]+5,i=n[0]>>>13,n[0]&=8191,a=1;a<10;a++)n[a]=this._h[a]+i,i=n[a]>>>13,n[a]&=8191;for(n[9]-=8192,s=(i^1)-1,a=0;a<10;a++)n[a]&=s;for(s=~s,a=0;a<10;a++)this._h[a]=this._h[a]&s|n[a];for(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,o=this._h[0]+this._pad[0],this._h[0]=o&65535,a=1;a<8;a++)o=(this._h[a]+this._pad[a]|0)+(o>>>16)|0,this._h[a]=o&65535;return e[r+0]=this._h[0]>>>0,e[r+1]=this._h[0]>>>8,e[r+2]=this._h[1]>>>0,e[r+3]=this._h[1]>>>8,e[r+4]=this._h[2]>>>0,e[r+5]=this._h[2]>>>8,e[r+6]=this._h[3]>>>0,e[r+7]=this._h[3]>>>8,e[r+8]=this._h[4]>>>0,e[r+9]=this._h[4]>>>8,e[r+10]=this._h[5]>>>0,e[r+11]=this._h[5]>>>8,e[r+12]=this._h[6]>>>0,e[r+13]=this._h[6]>>>8,e[r+14]=this._h[7]>>>0,e[r+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var r=0,n=e.length,i;if(this._leftover){i=16-this._leftover,i>n&&(i=n);for(var s=0;s<i;s++)this._buffer[this._leftover+s]=e[r+s];if(n-=i,r+=i,this._leftover+=i,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(i=n-n%16,this._blocks(e,r,i),r+=i,n-=i),n){for(var s=0;s<n;s++)this._buffer[this._leftover+s]=e[r+s];this._leftover+=n}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return xC.wipe(this._buffer),xC.wipe(this._r),xC.wipe(this._h),xC.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();fu.Poly1305=mG;function Z5e(t,e){var r=new mG(t);r.update(e);var n=r.digest();return r.clean(),n}fu.oneTimeAuth=Z5e;function K5e(t,e){return t.length!==fu.DIGEST_LENGTH||e.length!==fu.DIGEST_LENGTH?!1:G5e.equal(t,e)}fu.equal=K5e});var vG=F(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var IC=hG(),J5e=gG(),Gw=Aa(),yG=Lg(),Y5e=CC();du.KEY_LENGTH=32;du.NONCE_LENGTH=12;du.TAG_LENGTH=16;var wG=new Uint8Array(16),Q5e=function(){function t(e){if(this.nonceLength=du.NONCE_LENGTH,this.tagLength=du.TAG_LENGTH,e.length!==du.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return t.prototype.seal=function(e,r,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var o=new Uint8Array(32);IC.stream(this._key,s,o,4);var a=r.length+this.tagLength,c;if(i){if(i.length!==a)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(a);return IC.streamXOR(this._key,s,r,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),o,c.subarray(0,c.length-this.tagLength),n),Gw.wipe(s),c},t.prototype.open=function(e,r,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(r.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var o=new Uint8Array(32);IC.stream(this._key,s,o,4);var a=new Uint8Array(this.tagLength);if(this._authenticate(a,o,r.subarray(0,r.length-this.tagLength),n),!Y5e.equal(a,r.subarray(r.length-this.tagLength,r.length)))return null;var c=r.length-this.tagLength,u;if(i){if(i.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");u=i}else u=new Uint8Array(c);return IC.streamXOR(this._key,s,r.subarray(0,r.length-this.tagLength),u,4),Gw.wipe(s),u},t.prototype.clean=function(){return Gw.wipe(this._key),this},t.prototype._authenticate=function(e,r,n,i){var s=new J5e.Poly1305(r);i&&(s.update(i),i.length%16>0&&s.update(wG.subarray(i.length%16))),s.update(n),n.length%16>0&&s.update(wG.subarray(n.length%16));var o=new Uint8Array(8);i&&yG.writeUint64LE(i.length,o),s.update(o),yG.writeUint64LE(n.length,o),s.update(o);for(var a=s.digest(),c=0;c<a.length;c++)e[c]=a[c];s.clean(),Gw.wipe(a),Gw.wipe(o)},t}();du.ChaCha20Poly1305=Q5e});var bG=F(qT=>{"use strict";Object.defineProperty(qT,"__esModule",{value:!0});function X5e(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}qT.isSerializableHash=X5e});var _G=F(Zw=>{"use strict";Object.defineProperty(Zw,"__esModule",{value:!0});var el=bG(),eIe=CC(),tIe=Aa(),EG=function(){function t(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i<n.length;i++)n[i]^=54;this._inner.update(n);for(var i=0;i<n.length;i++)n[i]^=106;this._outer.update(n),el.isSerializableHash(this._inner)&&el.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),tIe.wipe(n)}return t.prototype.reset=function(){if(!el.isSerializableHash(this._inner)||!el.isSerializableHash(this._outer))throw new 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},t.prototype.clean=function(){el.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),el.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(e){return this._inner.update(e),this},t.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(!el.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(e){if(!el.isSerializableHash(this._inner)||!el.isSerializableHash(this._outer))throw new 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},t.prototype.cleanSavedState=function(e){if(!el.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();Zw.HMAC=EG;function rIe(t,e,r){var n=new EG(t,e);n.update(r);var i=n.digest();return n.clean(),i}Zw.hmac=rIe;Zw.equal=eIe.equal});var IG=F(WT=>{"use strict";Object.defineProperty(WT,"__esModule",{value:!0});var CG=_G(),xG=Aa(),nIe=function(){function t(e,r,n,i){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var s=CG.hmac(this._hash,n,r);this._hmac=new CG.HMAC(e,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(e===0)throw new 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},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n<r.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[n]=this._buffer[this._bufpos++];return r},t.prototype.clean=function(){this._hmac.clean(),xG.wipe(this._buffer),xG.wipe(this._counter),this._bufpos=0},t}();WT.HKDF=nIe});var SG=F(AC=>{"use strict";Object.defineProperty(AC,"__esModule",{value:!0});AC.BrowserRandomSource=void 0;var AG=65536,zT=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let r=new Uint8Array(e);for(let n=0;n<r.length;n+=AG)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,AG)));return r}};AC.BrowserRandomSource=zT});var DG=F(()=>{"use strict"});var RG=F(SC=>{"use strict";Object.defineProperty(SC,"__esModule",{value:!0});SC.NodeRandomSource=void 0;var iIe=Aa(),GT=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof bU<"u"){let e=DG();e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");let n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=r[i];return(0,iIe.wipe)(r),n}};SC.NodeRandomSource=GT});var TG=F(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.SystemRandomSource=void 0;var sIe=SG(),oIe=RG(),ZT=class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new sIe.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new oIe.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}};DC.SystemRandomSource=ZT});var Kw=F(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.randomStringForEntropy=Is.randomString=Is.randomUint32=Is.randomBytes=Is.defaultRandomSource=void 0;var aIe=TG(),cIe=Lg(),NG=Aa();Is.defaultRandomSource=new aIe.SystemRandomSource;function KT(t,e=Is.defaultRandomSource){return e.randomBytes(t)}Is.randomBytes=KT;function lIe(t=Is.defaultRandomSource){let e=KT(4,t),r=(0,cIe.readUint32LE)(e);return(0,NG.wipe)(e),r}Is.randomUint32=lIe;var OG="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function MG(t,e=OG,r=Is.defaultRandomSource){if(e.length<2)throw new Error("randomString charset is too short");if(e.length>256)throw new Error("randomString charset is too long");let n="",i=e.length,s=256-256%i;for(;t>0;){let o=KT(Math.ceil(t*256/s),r);for(let a=0;a<o.length&&t>0;a++){let c=o[a];c<s&&(n+=e.charAt(c%i),t--)}(0,NG.wipe)(o)}return n}Is.randomString=MG;function uIe(t,e=OG,r=Is.defaultRandomSource){let n=Math.ceil(t/(Math.log(e.length)/Math.LN2));return MG(n,e,r)}Is.randomStringForEntropy=uIe});var kG=F(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var TC=Lg(),RC=Aa();Wf.DIGEST_LENGTH=32;Wf.BLOCK_SIZE=64;var PG=function(){function t(){this.digestLength=Wf.DIGEST_LENGTH,this.blockSize=Wf.BLOCK_SIZE,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 t.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){RC.wipe(this._buffer),RC.wipe(this._temp),this.reset()},t.prototype.update=function(e,r){if(r===void 0&&(r=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(JT(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=JT(this._temp,this._state,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},t.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,i=r/536870912|0,s=r<<3,o=r%64<56?64:128;this._buffer[n]=128;for(var a=n+1;a<o-8;a++)this._buffer[a]=0;TC.writeUint32BE(i,this._buffer,o-8),TC.writeUint32BE(s,this._buffer,o-4),JT(this._temp,this._state,this._buffer,0,o),this._finished=!0}for(var a=0;a<this.digestLength/4;a++)TC.writeUint32BE(this._state[a],e,a*4);return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(this._finished)throw new 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}},t.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},t.prototype.cleanSavedState=function(e){RC.wipe(e.state),e.buffer&&RC.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},t}();Wf.SHA256=PG;var fIe=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function JT(t,e,r,n,i){for(;i>=64;){for(var s=e[0],o=e[1],a=e[2],c=e[3],u=e[4],d=e[5],h=e[6],m=e[7],w=0;w<16;w++){var _=n+w*4;t[w]=TC.readUint32BE(r,_)}for(var w=16;w<64;w++){var C=t[w-2],A=(C>>>17|C<<15)^(C>>>19|C<<13)^C>>>10;C=t[w-15];var R=(C>>>7|C<<25)^(C>>>18|C<<14)^C>>>3;t[w]=(A+t[w-7]|0)+(R+t[w-16]|0)}for(var w=0;w<64;w++){var A=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&d^~u&h)|0)+(m+(fIe[w]+t[w]|0)|0)|0,R=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&o^s&a^o&a)|0;m=h,h=d,d=u,u=c+A|0,c=a,a=o,o=s,s=A+R|0}e[0]+=s,e[1]+=o,e[2]+=a,e[3]+=c,e[4]+=u,e[5]+=d,e[6]+=h,e[7]+=m,n+=64,i-=64}return n}function dIe(t){var e=new PG;e.update(t);var r=e.digest();return e.clean(),r}Wf.hash=dIe});var UG=F(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.sharedKey=ci.generateKeyPair=ci.generateKeyPairFromSeed=ci.scalarMultBase=ci.scalarMult=ci.SHARED_KEY_LENGTH=ci.SECRET_KEY_LENGTH=ci.PUBLIC_KEY_LENGTH=void 0;var hIe=Kw(),pIe=Aa();ci.PUBLIC_KEY_LENGTH=32;ci.SECRET_KEY_LENGTH=32;ci.SHARED_KEY_LENGTH=32;function tl(t){let e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}var LG=new Uint8Array(32);LG[0]=9;var mIe=tl([56129,1]);function YT(t){let e=1;for(let r=0;r<16;r++){let n=t[r]+e+65535;e=Math.floor(n/65536),t[r]=n-e*65536}t[0]+=e-1+37*(e-1)}function Jw(t,e,r){let n=~(r-1);for(let i=0;i<16;i++){let s=n&(t[i]^e[i]);t[i]^=s,e[i]^=s}}function gIe(t,e){let r=tl(),n=tl();for(let i=0;i<16;i++)n[i]=e[i];YT(n),YT(n),YT(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let o=1;o<15;o++)r[o]=n[o]-65535-(r[o-1]>>16&1),r[o-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let s=r[15]>>16&1;r[14]&=65535,Jw(n,r,1-s)}for(let i=0;i<16;i++)t[2*i]=n[i]&255,t[2*i+1]=n[i]>>8}function yIe(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function NC(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}function OC(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}function hu(t,e,r){let n,i,s=0,o=0,a=0,c=0,u=0,d=0,h=0,m=0,w=0,_=0,C=0,A=0,R=0,L=0,U=0,V=0,Q=0,Y=0,k=0,q=0,ie=0,W=0,z=0,X=0,D=0,g=0,v=0,x=0,I=0,T=0,H=0,$=r[0],N=r[1],E=r[2],P=r[3],ae=r[4],ce=r[5],se=r[6],pe=r[7],De=r[8],Te=r[9],st=r[10],Ue=r[11],Oe=r[12],_t=r[13],Fe=r[14],Ye=r[15];n=e[0],s+=n*$,o+=n*N,a+=n*E,c+=n*P,u+=n*ae,d+=n*ce,h+=n*se,m+=n*pe,w+=n*De,_+=n*Te,C+=n*st,A+=n*Ue,R+=n*Oe,L+=n*_t,U+=n*Fe,V+=n*Ye,n=e[1],o+=n*$,a+=n*N,c+=n*E,u+=n*P,d+=n*ae,h+=n*ce,m+=n*se,w+=n*pe,_+=n*De,C+=n*Te,A+=n*st,R+=n*Ue,L+=n*Oe,U+=n*_t,V+=n*Fe,Q+=n*Ye,n=e[2],a+=n*$,c+=n*N,u+=n*E,d+=n*P,h+=n*ae,m+=n*ce,w+=n*se,_+=n*pe,C+=n*De,A+=n*Te,R+=n*st,L+=n*Ue,U+=n*Oe,V+=n*_t,Q+=n*Fe,Y+=n*Ye,n=e[3],c+=n*$,u+=n*N,d+=n*E,h+=n*P,m+=n*ae,w+=n*ce,_+=n*se,C+=n*pe,A+=n*De,R+=n*Te,L+=n*st,U+=n*Ue,V+=n*Oe,Q+=n*_t,Y+=n*Fe,k+=n*Ye,n=e[4],u+=n*$,d+=n*N,h+=n*E,m+=n*P,w+=n*ae,_+=n*ce,C+=n*se,A+=n*pe,R+=n*De,L+=n*Te,U+=n*st,V+=n*Ue,Q+=n*Oe,Y+=n*_t,k+=n*Fe,q+=n*Ye,n=e[5],d+=n*$,h+=n*N,m+=n*E,w+=n*P,_+=n*ae,C+=n*ce,A+=n*se,R+=n*pe,L+=n*De,U+=n*Te,V+=n*st,Q+=n*Ue,Y+=n*Oe,k+=n*_t,q+=n*Fe,ie+=n*Ye,n=e[6],h+=n*$,m+=n*N,w+=n*E,_+=n*P,C+=n*ae,A+=n*ce,R+=n*se,L+=n*pe,U+=n*De,V+=n*Te,Q+=n*st,Y+=n*Ue,k+=n*Oe,q+=n*_t,ie+=n*Fe,W+=n*Ye,n=e[7],m+=n*$,w+=n*N,_+=n*E,C+=n*P,A+=n*ae,R+=n*ce,L+=n*se,U+=n*pe,V+=n*De,Q+=n*Te,Y+=n*st,k+=n*Ue,q+=n*Oe,ie+=n*_t,W+=n*Fe,z+=n*Ye,n=e[8],w+=n*$,_+=n*N,C+=n*E,A+=n*P,R+=n*ae,L+=n*ce,U+=n*se,V+=n*pe,Q+=n*De,Y+=n*Te,k+=n*st,q+=n*Ue,ie+=n*Oe,W+=n*_t,z+=n*Fe,X+=n*Ye,n=e[9],_+=n*$,C+=n*N,A+=n*E,R+=n*P,L+=n*ae,U+=n*ce,V+=n*se,Q+=n*pe,Y+=n*De,k+=n*Te,q+=n*st,ie+=n*Ue,W+=n*Oe,z+=n*_t,X+=n*Fe,D+=n*Ye,n=e[10],C+=n*$,A+=n*N,R+=n*E,L+=n*P,U+=n*ae,V+=n*ce,Q+=n*se,Y+=n*pe,k+=n*De,q+=n*Te,ie+=n*st,W+=n*Ue,z+=n*Oe,X+=n*_t,D+=n*Fe,g+=n*Ye,n=e[11],A+=n*$,R+=n*N,L+=n*E,U+=n*P,V+=n*ae,Q+=n*ce,Y+=n*se,k+=n*pe,q+=n*De,ie+=n*Te,W+=n*st,z+=n*Ue,X+=n*Oe,D+=n*_t,g+=n*Fe,v+=n*Ye,n=e[12],R+=n*$,L+=n*N,U+=n*E,V+=n*P,Q+=n*ae,Y+=n*ce,k+=n*se,q+=n*pe,ie+=n*De,W+=n*Te,z+=n*st,X+=n*Ue,D+=n*Oe,g+=n*_t,v+=n*Fe,x+=n*Ye,n=e[13],L+=n*$,U+=n*N,V+=n*E,Q+=n*P,Y+=n*ae,k+=n*ce,q+=n*se,ie+=n*pe,W+=n*De,z+=n*Te,X+=n*st,D+=n*Ue,g+=n*Oe,v+=n*_t,x+=n*Fe,I+=n*Ye,n=e[14],U+=n*$,V+=n*N,Q+=n*E,Y+=n*P,k+=n*ae,q+=n*ce,ie+=n*se,W+=n*pe,z+=n*De,X+=n*Te,D+=n*st,g+=n*Ue,v+=n*Oe,x+=n*_t,I+=n*Fe,T+=n*Ye,n=e[15],V+=n*$,Q+=n*N,Y+=n*E,k+=n*P,q+=n*ae,ie+=n*ce,W+=n*se,z+=n*pe,X+=n*De,D+=n*Te,g+=n*st,v+=n*Ue,x+=n*Oe,I+=n*_t,T+=n*Fe,H+=n*Ye,s+=38*Q,o+=38*Y,a+=38*k,c+=38*q,u+=38*ie,d+=38*W,h+=38*z,m+=38*X,w+=38*D,_+=38*g,C+=38*v,A+=38*x,R+=38*I,L+=38*T,U+=38*H,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=w+i+65535,i=Math.floor(n/65536),w=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=C+i+65535,i=Math.floor(n/65536),C=n-i*65536,n=A+i+65535,i=Math.floor(n/65536),A=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=L+i+65535,i=Math.floor(n/65536),L=n-i*65536,n=U+i+65535,i=Math.floor(n/65536),U=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=w+i+65535,i=Math.floor(n/65536),w=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=C+i+65535,i=Math.floor(n/65536),C=n-i*65536,n=A+i+65535,i=Math.floor(n/65536),A=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=L+i+65535,i=Math.floor(n/65536),L=n-i*65536,n=U+i+65535,i=Math.floor(n/65536),U=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,s+=i-1+37*(i-1),t[0]=s,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=d,t[6]=h,t[7]=m,t[8]=w,t[9]=_,t[10]=C,t[11]=A,t[12]=R,t[13]=L,t[14]=U,t[15]=V}function Yw(t,e){hu(t,e,e)}function wIe(t,e){let r=tl();for(let n=0;n<16;n++)r[n]=e[n];for(let n=253;n>=0;n--)Yw(r,r),n!==2&&n!==4&&hu(r,r,e);for(let n=0;n<16;n++)t[n]=r[n]}function QT(t,e){let r=new Uint8Array(32),n=new Float64Array(80),i=tl(),s=tl(),o=tl(),a=tl(),c=tl(),u=tl();for(let w=0;w<31;w++)r[w]=t[w];r[31]=t[31]&127|64,r[0]&=248,yIe(n,e);for(let w=0;w<16;w++)s[w]=n[w];i[0]=a[0]=1;for(let w=254;w>=0;--w){let _=r[w>>>3]>>>(w&7)&1;Jw(i,s,_),Jw(o,a,_),NC(c,i,o),OC(i,i,o),NC(o,s,a),OC(s,s,a),Yw(a,c),Yw(u,i),hu(i,o,i),hu(o,s,c),NC(c,i,o),OC(i,i,o),Yw(s,i),OC(o,a,u),hu(i,o,mIe),NC(i,i,a),hu(o,o,i),hu(i,a,u),hu(a,s,n),Yw(s,c),Jw(i,s,_),Jw(o,a,_)}for(let w=0;w<16;w++)n[w+16]=i[w],n[w+32]=o[w],n[w+48]=s[w],n[w+64]=a[w];let d=n.subarray(32),h=n.subarray(16);wIe(d,d),hu(h,h,d);let m=new Uint8Array(32);return gIe(m,h),m}ci.scalarMult=QT;function FG(t){return QT(t,LG)}ci.scalarMultBase=FG;function BG(t){if(t.length!==ci.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${ci.SECRET_KEY_LENGTH} bytes`);let e=new Uint8Array(t);return{publicKey:FG(e),secretKey:e}}ci.generateKeyPairFromSeed=BG;function vIe(t){let e=(0,hIe.randomBytes)(32,t),r=BG(e);return(0,pIe.wipe)(e),r}ci.generateKeyPair=vIe;function bIe(t,e,r=!1){if(t.length!==ci.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(e.length!==ci.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let n=QT(t,e);if(r){let i=0;for(let s=0;s<n.length;s++)i|=n[s];if(i===0)throw new Error("X25519: invalid shared key")}return n}ci.sharedKey=bIe});var iv={};An(iv,{__assign:()=>EN,__asyncDelegator:()=>tSe,__asyncGenerator:()=>eSe,__asyncValues:()=>rSe,__await:()=>nv,__awaiter:()=>ZAe,__classPrivateFieldGet:()=>oSe,__classPrivateFieldSet:()=>aSe,__createBinding:()=>JAe,__decorate:()=>WAe,__exportStar:()=>YAe,__extends:()=>$Ae,__generator:()=>KAe,__importDefault:()=>sSe,__importStar:()=>iSe,__makeTemplateObject:()=>nSe,__metadata:()=>GAe,__param:()=>zAe,__read:()=>fZ,__rest:()=>qAe,__spread:()=>QAe,__spreadArrays:()=>XAe,__values:()=>_N});function $Ae(t,e){bN(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function qAe(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function WAe(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function zAe(t,e){return function(r,n){e(r,n,t)}}function GAe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function ZAe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(h){o(h)}}function c(d){try{u(n.throw(d))}catch(h){o(h)}}function u(d){d.done?s(d.value):i(d.value).then(a,c)}u((n=n.apply(t,e||[])).next())})}function KAe(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(d){u=[6,d],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function JAe(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function YAe(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function _N(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function fZ(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function QAe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(fZ(arguments[e]));return t}function XAe(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function nv(t){return this instanceof nv?(this.v=t,this):new nv(t)}function eSe(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){n[m]&&(i[m]=function(w){return new Promise(function(_,C){s.push([m,w,_,C])>1||a(m,w)})})}function a(m,w){try{c(n[m](w))}catch(_){h(s[0][3],_)}}function c(m){m.value instanceof nv?Promise.resolve(m.value.v).then(u,d):h(s[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function h(m,w){m(w),s.shift(),s.length&&a(s[0][0],s[0][1])}}function tSe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:nv(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function rSe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof _N=="function"?_N(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(u){s({value:u,done:a})},o)}}function nSe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function iSe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function sSe(t){return t&&t.__esModule?t:{default:t}}function oSe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function aSe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var bN,EN,sv=ma(()=>{"use strict";bN=function(t,e){return bN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},bN(t,e)};EN=function(){return EN=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},EN.apply(this,arguments)}});var dZ=F(BC=>{"use strict";Object.defineProperty(BC,"__esModule",{value:!0});BC.delay=void 0;function cSe(t){return new Promise(e=>{setTimeout(()=>{e(!0)},t)})}BC.delay=cSe});var hZ=F(qg=>{"use strict";Object.defineProperty(qg,"__esModule",{value:!0});qg.ONE_THOUSAND=qg.ONE_HUNDRED=void 0;qg.ONE_HUNDRED=100;qg.ONE_THOUSAND=1e3});var pZ=F($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ONE_YEAR=$e.FOUR_WEEKS=$e.THREE_WEEKS=$e.TWO_WEEKS=$e.ONE_WEEK=$e.THIRTY_DAYS=$e.SEVEN_DAYS=$e.FIVE_DAYS=$e.THREE_DAYS=$e.ONE_DAY=$e.TWENTY_FOUR_HOURS=$e.TWELVE_HOURS=$e.SIX_HOURS=$e.THREE_HOURS=$e.ONE_HOUR=$e.SIXTY_MINUTES=$e.THIRTY_MINUTES=$e.TEN_MINUTES=$e.FIVE_MINUTES=$e.ONE_MINUTE=$e.SIXTY_SECONDS=$e.THIRTY_SECONDS=$e.TEN_SECONDS=$e.FIVE_SECONDS=$e.ONE_SECOND=void 0;$e.ONE_SECOND=1;$e.FIVE_SECONDS=5;$e.TEN_SECONDS=10;$e.THIRTY_SECONDS=30;$e.SIXTY_SECONDS=60;$e.ONE_MINUTE=$e.SIXTY_SECONDS;$e.FIVE_MINUTES=$e.ONE_MINUTE*5;$e.TEN_MINUTES=$e.ONE_MINUTE*10;$e.THIRTY_MINUTES=$e.ONE_MINUTE*30;$e.SIXTY_MINUTES=$e.ONE_MINUTE*60;$e.ONE_HOUR=$e.SIXTY_MINUTES;$e.THREE_HOURS=$e.ONE_HOUR*3;$e.SIX_HOURS=$e.ONE_HOUR*6;$e.TWELVE_HOURS=$e.ONE_HOUR*12;$e.TWENTY_FOUR_HOURS=$e.ONE_HOUR*24;$e.ONE_DAY=$e.TWENTY_FOUR_HOURS;$e.THREE_DAYS=$e.ONE_DAY*3;$e.FIVE_DAYS=$e.ONE_DAY*5;$e.SEVEN_DAYS=$e.ONE_DAY*7;$e.THIRTY_DAYS=$e.ONE_DAY*30;$e.ONE_WEEK=$e.SEVEN_DAYS;$e.TWO_WEEKS=$e.ONE_WEEK*2;$e.THREE_WEEKS=$e.ONE_WEEK*3;$e.FOUR_WEEKS=$e.ONE_WEEK*4;$e.ONE_YEAR=$e.ONE_DAY*365});var CN=F(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});var mZ=(sv(),St(iv));mZ.__exportStar(hZ(),UC);mZ.__exportStar(pZ(),UC)});var yZ=F(Wg=>{"use strict";Object.defineProperty(Wg,"__esModule",{value:!0});Wg.fromMiliseconds=Wg.toMiliseconds=void 0;var gZ=CN();function lSe(t){return t*gZ.ONE_THOUSAND}Wg.toMiliseconds=lSe;function uSe(t){return Math.floor(t/gZ.ONE_THOUSAND)}Wg.fromMiliseconds=uSe});var vZ=F(jC=>{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});var wZ=(sv(),St(iv));wZ.__exportStar(dZ(),jC);wZ.__exportStar(yZ(),jC)});var bZ=F(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});ov.Watch=void 0;var HC=class{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let r=this.get(e);if(typeof r.elapsed<"u")throw new Error(`Watch already stopped for label: ${e}`);let n=Date.now()-r.started;this.timestamps.set(e,{started:r.started,elapsed:n})}get(e){let r=this.timestamps.get(e);if(typeof r>"u")throw new Error(`No timestamp found for label: ${e}`);return r}elapsed(e){let r=this.get(e);return r.elapsed||Date.now()-r.started}};ov.Watch=HC;ov.default=HC});var EZ=F(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});VC.IWatch=void 0;var xN=class{};VC.IWatch=xN});var _Z=F(IN=>{"use strict";Object.defineProperty(IN,"__esModule",{value:!0});var fSe=(sv(),St(iv));fSe.__exportStar(EZ(),IN)});var Hh=F(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});var $C=(sv(),St(iv));$C.__exportStar(vZ(),zg);$C.__exportStar(bZ(),zg);$C.__exportStar(_Z(),zg);$C.__exportStar(CN(),zg)});var AN=F(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.getLocalStorage=Rn.getLocalStorageOrThrow=Rn.getCrypto=Rn.getCryptoOrThrow=Rn.getLocation=Rn.getLocationOrThrow=Rn.getNavigator=Rn.getNavigatorOrThrow=Rn.getDocument=Rn.getDocumentOrThrow=Rn.getFromWindowOrThrow=Rn.getFromWindow=void 0;function Vh(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Rn.getFromWindow=Vh;function Gg(t){let e=Vh(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Rn.getFromWindowOrThrow=Gg;function dSe(){return Gg("document")}Rn.getDocumentOrThrow=dSe;function hSe(){return Vh("document")}Rn.getDocument=hSe;function pSe(){return Gg("navigator")}Rn.getNavigatorOrThrow=pSe;function mSe(){return Vh("navigator")}Rn.getNavigator=mSe;function gSe(){return Gg("location")}Rn.getLocationOrThrow=gSe;function ySe(){return Vh("location")}Rn.getLocation=ySe;function wSe(){return Gg("crypto")}Rn.getCryptoOrThrow=wSe;function vSe(){return Vh("crypto")}Rn.getCrypto=vSe;function bSe(){return Gg("localStorage")}Rn.getLocalStorageOrThrow=bSe;function ESe(){return Vh("localStorage")}Rn.getLocalStorage=ESe});var xZ=F(qC=>{"use strict";Object.defineProperty(qC,"__esModule",{value:!0});qC.getWindowMetadata=void 0;var CZ=AN();function _Se(){let t,e;try{t=CZ.getDocumentOrThrow(),e=CZ.getLocationOrThrow()}catch{return null}function r(){let h=t.getElementsByTagName("link"),m=[];for(let w=0;w<h.length;w++){let _=h[w],C=_.getAttribute("rel");if(C&&C.toLowerCase().indexOf("icon")>-1){let A=_.getAttribute("href");if(A)if(A.toLowerCase().indexOf("https:")===-1&&A.toLowerCase().indexOf("http:")===-1&&A.indexOf("//")!==0){let R=e.protocol+"//"+e.host;if(A.indexOf("/")===0)R+=A;else{let L=e.pathname.split("/");L.pop();let U=L.join("/");R+=U+"/"+A}m.push(R)}else if(A.indexOf("//")===0){let R=e.protocol+A;m.push(R)}else m.push(A)}}return m}function n(...h){let m=t.getElementsByTagName("meta");for(let w=0;w<m.length;w++){let _=m[w],C=["itemprop","property","name"].map(A=>_.getAttribute(A)).filter(A=>A?h.includes(A):!1);if(C.length&&C){let A=_.getAttribute("content");if(A)return A}}return""}function i(){let h=n("name","og:site_name","og:title","twitter:title");return h||(h=t.title),h}function s(){return n("description","og:description","twitter:description","keywords")}let o=i(),a=s(),c=e.origin,u=r();return{description:a,url:c,icons:u,name:o}}qC.getWindowMetadata=_Se});var AZ=F((Kvt,IZ)=>{"use strict";IZ.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)});var NZ=F((Jvt,TZ)=>{"use strict";var RZ="%[a-f0-9]{2}",SZ=new RegExp("("+RZ+")|([^%]+?)","gi"),DZ=new RegExp("("+RZ+")+","gi");function SN(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],SN(r),SN(n))}function CSe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(SZ)||[],r=1;r<e.length;r++)t=SN(e,r).join(""),e=t.match(SZ)||[];return t}}function xSe(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=DZ.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=CSe(r[0]);n!==r[0]&&(e[r[0]]=n)}r=DZ.exec(t)}e["%C2"]="\uFFFD";for(var i=Object.keys(e),s=0;s<i.length;s++){var o=i[s];t=t.replace(new RegExp(o,"g"),e[o])}return t}TZ.exports=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return xSe(t)}}});var MZ=F((Yvt,OZ)=>{"use strict";OZ.exports=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];let r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]}});var kZ=F((Qvt,PZ)=>{"use strict";PZ.exports=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),s=0;s<n.length;s++){var o=n[s],a=t[o];(i?e.indexOf(o)!==-1:e(o,a,t))&&(r[o]=a)}return r}});var $Z=F(yo=>{"use strict";var ISe=AZ(),ASe=NZ(),FZ=MZ(),SSe=kZ(),DSe=t=>t==null,DN=Symbol("encodeFragmentIdentifier");function RSe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{let i=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[gi(e,t),"[",i,"]"].join("")]:[...r,[gi(e,t),"[",gi(i,t),"]=",gi(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[gi(e,t),"[]"].join("")]:[...r,[gi(e,t),"[]=",gi(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[gi(e,t),":list="].join("")]:[...r,[gi(e,t),":list=",gi(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||t.skipNull&&i===null||t.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[gi(r,t),e,gi(i,t)].join("")]:[[n,gi(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,gi(e,t)]:[...r,[gi(e,t),"=",gi(n,t)].join("")]}}function TSe(t){let e;switch(t.arrayFormat){case"index":return(r,n,i)=>{if(e=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!e){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][e[1]]=n};case"bracket":return(r,n,i)=>{if(e=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"colon-list-separator":return(r,n,i)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"comma":case"separator":return(r,n,i)=>{let s=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!s&&mu(n,t).includes(t.arrayFormatSeparator);n=o?mu(n,t):n;let a=s||o?n.split(t.arrayFormatSeparator).map(c=>mu(c,t)):n===null?n:mu(n,t);i[r]=a};case"bracket-separator":return(r,n,i)=>{let s=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!s){i[r]=n&&mu(n,t);return}let o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>mu(a,t));if(i[r]===void 0){i[r]=o;return}i[r]=[].concat(i[r],o)};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[].concat(i[r],n)}}}function BZ(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function gi(t,e){return e.encode?e.strict?ISe(t):encodeURIComponent(t):t}function mu(t,e){return e.decode?ASe(t):t}function UZ(t){return Array.isArray(t)?t.sort():typeof t=="object"?UZ(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function jZ(t){let e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function NSe(t){let e="",r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function HZ(t){t=jZ(t);let e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function LZ(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function VZ(t,e){e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e),BZ(e.arrayFormatSeparator);let r=TSe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(let i of t.split("&")){if(i==="")continue;let[s,o]=FZ(e.decode?i.replace(/\+/g," "):i,"=");o=o===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?o:mu(o,e),r(mu(s,e),o,n)}for(let i of Object.keys(n)){let s=n[i];if(typeof s=="object"&&s!==null)for(let o of Object.keys(s))s[o]=LZ(s[o],e);else n[i]=LZ(s,e)}return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,s)=>{let o=n[s];return o&&typeof o=="object"&&!Array.isArray(o)?i[s]=UZ(o):i[s]=o,i},Object.create(null))}yo.extract=HZ;yo.parse=VZ;yo.stringify=(t,e)=>{if(!t)return"";e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e),BZ(e.arrayFormatSeparator);let r=o=>e.skipNull&&DSe(t[o])||e.skipEmptyString&&t[o]==="",n=RSe(e),i={};for(let o of Object.keys(t))r(o)||(i[o]=t[o]);let s=Object.keys(i);return e.sort!==!1&&s.sort(e.sort),s.map(o=>{let a=t[o];return a===void 0?"":a===null?gi(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?gi(o,e)+"[]":a.reduce(n(o),[]).join("&"):gi(o,e)+"="+gi(a,e)}).filter(o=>o.length>0).join("&")};yo.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[r,n]=FZ(t,"#");return Object.assign({url:r.split("?")[0]||"",query:VZ(HZ(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:mu(n,e)}:{})};yo.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0,[DN]:!0},e);let r=jZ(t.url).split("?")[0]||"",n=yo.extract(t.url),i=yo.parse(n,{sort:!1}),s=Object.assign(i,t.query),o=yo.stringify(s,e);o&&(o=`?${o}`);let a=NSe(t.url);return t.fragmentIdentifier&&(a=`#${e[DN]?gi(t.fragmentIdentifier,e):t.fragmentIdentifier}`),`${r}${o}${a}`};yo.pick=(t,e,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[DN]:!1},r);let{url:n,query:i,fragmentIdentifier:s}=yo.parseUrl(t,r);return yo.stringifyUrl({url:n,query:SSe(i,e),fragmentIdentifier:s},r)};yo.exclude=(t,e,r)=>{let n=Array.isArray(e)?i=>!e.includes(i):(i,s)=>!e(i,s);return yo.pick(t,n,r)}});var gv={};An(gv,{__assign:()=>eO,__asyncDelegator:()=>XDe,__asyncGenerator:()=>QDe,__asyncValues:()=>eRe,__await:()=>mv,__awaiter:()=>zDe,__classPrivateFieldGet:()=>iRe,__classPrivateFieldSet:()=>sRe,__createBinding:()=>ZDe,__decorate:()=>$De,__exportStar:()=>KDe,__extends:()=>HDe,__generator:()=>GDe,__importDefault:()=>nRe,__importStar:()=>rRe,__makeTemplateObject:()=>tRe,__metadata:()=>WDe,__param:()=>qDe,__read:()=>JK,__rest:()=>VDe,__spread:()=>JDe,__spreadArrays:()=>YDe,__values:()=>tO});function HDe(t,e){XN(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function VDe(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function $De(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function qDe(t,e){return function(r,n){e(r,n,t)}}function WDe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function zDe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(h){o(h)}}function c(d){try{u(n.throw(d))}catch(h){o(h)}}function u(d){d.done?s(d.value):i(d.value).then(a,c)}u((n=n.apply(t,e||[])).next())})}function GDe(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(d){u=[6,d],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ZDe(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function KDe(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function tO(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function JK(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function JDe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(JK(arguments[e]));return t}function YDe(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function mv(t){return this instanceof mv?(this.v=t,this):new mv(t)}function QDe(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){n[m]&&(i[m]=function(w){return new Promise(function(_,C){s.push([m,w,_,C])>1||a(m,w)})})}function a(m,w){try{c(n[m](w))}catch(_){h(s[0][3],_)}}function c(m){m.value instanceof mv?Promise.resolve(m.value.v).then(u,d):h(s[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function h(m,w){m(w),s.shift(),s.length&&a(s[0][0],s[0][1])}}function XDe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:mv(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function eRe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof tO=="function"?tO(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(u){s({value:u,done:a})},o)}}function tRe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function rRe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function nRe(t){return t&&t.__esModule?t:{default:t}}function iRe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function sRe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var XN,eO,yv=ma(()=>{"use strict";XN=function(t,e){return XN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},XN(t,e)};eO=function(){return eO=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},eO.apply(this,arguments)}});var sl,YK=ma(()=>{"use strict";sl=class{}});var QK={};An(QK,{IEvents:()=>sl});var rO=ma(()=>{"use strict";YK()});var XK=F(r6=>{"use strict";Object.defineProperty(r6,"__esModule",{value:!0});r6.IHeartBeat=void 0;var oRe=(rO(),St(QK)),nO=class extends oRe.IEvents{constructor(e){super()}};r6.IHeartBeat=nO});var sO=F(iO=>{"use strict";Object.defineProperty(iO,"__esModule",{value:!0});var aRe=(yv(),St(gv));aRe.__exportStar(XK(),iO)});var eJ=F(Xg=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});Xg.HEARTBEAT_EVENTS=Xg.HEARTBEAT_INTERVAL=void 0;var cRe=Hh();Xg.HEARTBEAT_INTERVAL=cRe.FIVE_SECONDS;Xg.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}});var aO=F(oO=>{"use strict";Object.defineProperty(oO,"__esModule",{value:!0});var lRe=(yv(),St(gv));lRe.__exportStar(eJ(),oO)});var tJ=F(n6=>{"use strict";Object.defineProperty(n6,"__esModule",{value:!0});n6.HeartBeat=void 0;var cO=(yv(),St(gv)),uRe=Gs(),fRe=Hh(),dRe=sO(),lO=aO(),uO=class t extends dRe.IHeartBeat{constructor(e){super(e),this.events=new uRe.EventEmitter,this.interval=lO.HEARTBEAT_INTERVAL,this.interval=e?.interval||lO.HEARTBEAT_INTERVAL}static init(e){return cO.__awaiter(this,void 0,void 0,function*(){let r=new t(e);return yield r.init(),r})}init(){return cO.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}initialize(){return cO.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),fRe.toMiliseconds(this.interval))})}pulse(){this.events.emit(lO.HEARTBEAT_EVENTS.pulse)}};n6.HeartBeat=uO});var rJ=F(wv=>{"use strict";Object.defineProperty(wv,"__esModule",{value:!0});var fO=(yv(),St(gv));fO.__exportStar(tJ(),wv);fO.__exportStar(sO(),wv);fO.__exportStar(aO(),wv)});var iJ={};An(iJ,{__assign:()=>hO,__asyncDelegator:()=>IRe,__asyncGenerator:()=>xRe,__asyncValues:()=>ARe,__await:()=>vv,__awaiter:()=>wRe,__classPrivateFieldGet:()=>TRe,__classPrivateFieldSet:()=>NRe,__createBinding:()=>bRe,__decorate:()=>mRe,__exportStar:()=>ERe,__extends:()=>hRe,__generator:()=>vRe,__importDefault:()=>RRe,__importStar:()=>DRe,__makeTemplateObject:()=>SRe,__metadata:()=>yRe,__param:()=>gRe,__read:()=>nJ,__rest:()=>pRe,__spread:()=>_Re,__spreadArrays:()=>CRe,__values:()=>pO});function hRe(t,e){dO(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function pRe(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function mRe(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function gRe(t,e){return function(r,n){e(r,n,t)}}function yRe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function wRe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(h){o(h)}}function c(d){try{u(n.throw(d))}catch(h){o(h)}}function u(d){d.done?s(d.value):i(d.value).then(a,c)}u((n=n.apply(t,e||[])).next())})}function vRe(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(d){u=[6,d],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function bRe(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function ERe(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function pO(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function nJ(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function _Re(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(nJ(arguments[e]));return t}function CRe(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function vv(t){return this instanceof vv?(this.v=t,this):new vv(t)}function xRe(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){n[m]&&(i[m]=function(w){return new Promise(function(_,C){s.push([m,w,_,C])>1||a(m,w)})})}function a(m,w){try{c(n[m](w))}catch(_){h(s[0][3],_)}}function c(m){m.value instanceof vv?Promise.resolve(m.value.v).then(u,d):h(s[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function h(m,w){m(w),s.shift(),s.length&&a(s[0][0],s[0][1])}}function IRe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:vv(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function ARe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof pO=="function"?pO(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(u){s({value:u,done:a})},o)}}function SRe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function DRe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function RRe(t){return t&&t.__esModule?t:{default:t}}function TRe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function NRe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var dO,hO,sJ=ma(()=>{"use strict";dO=function(t,e){return dO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dO(t,e)};hO=function(){return hO=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},hO.apply(this,arguments)}});var aJ=F((Y2t,oJ)=>{"use strict";function ORe(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}oJ.exports=MRe;function MRe(t,e,r){var n=r&&r.stringify||ORe,i=1;if(typeof t=="object"&&t!==null){var s=e.length+i;if(s===1)return t;var o=new Array(s);o[0]=n(t);for(var a=1;a<s;a++)o[a]=n(e[a]);return o.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var u="",d=1-i,h=-1,m=t&&t.length||0,w=0;w<m;){if(t.charCodeAt(w)===37&&w+1<m){switch(h=h>-1?h:0,t.charCodeAt(w+1)){case 100:case 102:if(d>=c||e[d]==null)break;h<w&&(u+=t.slice(h,w)),u+=Number(e[d]),h=w+2,w++;break;case 105:if(d>=c||e[d]==null)break;h<w&&(u+=t.slice(h,w)),u+=Math.floor(Number(e[d])),h=w+2,w++;break;case 79:case 111:case 106:if(d>=c||e[d]===void 0)break;h<w&&(u+=t.slice(h,w));var _=typeof e[d];if(_==="string"){u+="'"+e[d]+"'",h=w+2,w++;break}if(_==="function"){u+=e[d].name||"<anonymous>",h=w+2,w++;break}u+=n(e[d]),h=w+2,w++;break;case 115:if(d>=c)break;h<w&&(u+=t.slice(h,w)),u+=String(e[d]),h=w+2,w++;break;case 37:h<w&&(u+=t.slice(h,w)),u+="%",h=w+2,w++,d--;break}++d}++w}return h===-1?t:(h<m&&(u+=t.slice(h)),u)}});var dJ=F((Q2t,fJ)=>{"use strict";var cJ=aJ();fJ.exports=ol;var bv=$Re().console||{},PRe={mapHttpRequest:i6,mapHttpResponse:i6,wrapRequestSerializer:mO,wrapResponseSerializer:mO,wrapErrorSerializer:mO,req:i6,res:i6,err:URe};function kRe(t,e){return Array.isArray(t)?t.filter(function(n){return n!=="!stdSerializers.err"}):t===!0?Object.keys(e):!1}function ol(t){t=t||{},t.browser=t.browser||{};let e=t.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");let r=t.browser.write||bv;t.browser.write&&(t.browser.asObject=!0);let n=t.serializers||{},i=kRe(t.browser.serialize,n),s=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);let o=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),t.enabled===!1&&(t.level="silent");let a=t.level||"info",c=Object.create(r);c.log||(c.log=Ev),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:h,set:m});let u={transmit:e,serialize:i,asObject:t.browser.asObject,levels:o,timestamp:jRe(t)};c.levels=ol.levels,c.level=a,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Ev,c.serializers=n,c._serialize=i,c._stdErrSerialize=s,c.child=w,e&&(c._logEvent=gO());function d(){return this.level==="silent"?1/0:this.levels.values[this.level]}function h(){return this._level}function m(_){if(_!=="silent"&&!this.levels.values[_])throw Error("unknown level "+_);this._level=_,e0(u,c,"error","log"),e0(u,c,"fatal","error"),e0(u,c,"warn","error"),e0(u,c,"info","log"),e0(u,c,"debug","log"),e0(u,c,"trace","log")}function w(_,C){if(!_)throw new Error("missing bindings for child Pino");C=C||{},i&&_.serializers&&(C.serializers=_.serializers);let A=C.serializers;if(i&&A){var R=Object.assign({},n,A),L=t.browser.serialize===!0?Object.keys(R):i;delete _.serializers,s6([_],L,R,this._stdErrSerialize)}function U(V){this._childLevel=(V._childLevel|0)+1,this.error=t0(V,_,"error"),this.fatal=t0(V,_,"fatal"),this.warn=t0(V,_,"warn"),this.info=t0(V,_,"info"),this.debug=t0(V,_,"debug"),this.trace=t0(V,_,"trace"),R&&(this.serializers=R,this._serialize=L),e&&(this._logEvent=gO([].concat(V._logEvent.bindings,_)))}return U.prototype=this,new U(this)}return c}ol.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"}};ol.stdSerializers=PRe;ol.stdTimeFunctions=Object.assign({},{nullTime:lJ,epochTime:uJ,unixTime:HRe,isoTime:VRe});function e0(t,e,r,n){let i=Object.getPrototypeOf(e);e[r]=e.levelVal>e.levels.values[r]?Ev:i[r]?i[r]:bv[r]||bv[n]||Ev,LRe(t,e,r)}function LRe(t,e,r){!t.transmit&&e[r]===Ev||(e[r]=function(n){return function(){let s=t.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===bv?bv:this;for(var c=0;c<o.length;c++)o[c]=arguments[c];if(t.serialize&&!t.asObject&&s6(o,this._serialize,this.serializers,this._stdErrSerialize),t.asObject?n.call(a,FRe(this,r,o,s)):n.apply(a,o),t.transmit){let u=t.transmit.level||e.level,d=ol.levels.values[u],h=ol.levels.values[r];if(h<d)return;BRe(this,{ts:s,methodLevel:r,methodValue:h,transmitLevel:u,transmitValue:ol.levels.values[t.transmit.level||e.level],send:t.transmit.send,val:e.levelVal},o)}}}(e[r]))}function FRe(t,e,r,n){t._serialize&&s6(r,t._serialize,t.serializers,t._stdErrSerialize);let i=r.slice(),s=i[0],o={};n&&(o.time=n),o.level=ol.levels.values[e];let a=(t._childLevel|0)+1;if(a<1&&(a=1),s!==null&&typeof s=="object"){for(;a--&&typeof i[0]=="object";)Object.assign(o,i.shift());s=i.length?cJ(i.shift(),i):void 0}else typeof s=="string"&&(s=cJ(i.shift(),i));return s!==void 0&&(o.msg=s),o}function s6(t,e,r,n){for(let i in t)if(n&&t[i]instanceof Error)t[i]=ol.stdSerializers.err(t[i]);else if(typeof t[i]=="object"&&!Array.isArray(t[i]))for(let s in t[i])e&&e.indexOf(s)>-1&&s in r&&(t[i][s]=r[s](t[i][s]))}function t0(t,e,r){return function(){let n=new Array(1+arguments.length);n[0]=e;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return t[r].apply(this,n)}}function BRe(t,e,r){let n=e.send,i=e.ts,s=e.methodLevel,o=e.methodValue,a=e.val,c=t._logEvent.bindings;s6(r,t._serialize||Object.keys(t.serializers),t.serializers,t._stdErrSerialize===void 0?!0:t._stdErrSerialize),t._logEvent.ts=i,t._logEvent.messages=r.filter(function(u){return c.indexOf(u)===-1}),t._logEvent.level.label=s,t._logEvent.level.value=o,n(s,t._logEvent,a),t._logEvent=gO(c)}function gO(t){return{ts:0,messages:[],bindings:t||[],level:{label:"",value:0}}}function URe(t){let e={type:t.constructor.name,msg:t.message,stack:t.stack};for(let r in t)e[r]===void 0&&(e[r]=t[r]);return e}function jRe(t){return typeof t.timestamp=="function"?t.timestamp:t.timestamp===!1?lJ:uJ}function i6(){return{}}function mO(t){return t}function Ev(){}function lJ(){return!1}function uJ(){return Date.now()}function HRe(){return Math.round(Date.now()/1e3)}function VRe(){return new Date(Date.now()).toISOString()}function $Re(){function t(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return t(self)||t(window)||t(this)||{}}}});var yO=F(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.PINO_CUSTOM_CONTEXT_KEY=r0.PINO_LOGGER_DEFAULTS=void 0;r0.PINO_LOGGER_DEFAULTS={level:"info"};r0.PINO_CUSTOM_CONTEXT_KEY="custom_context"});var yJ=F(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.generateChildLogger=vo.formatChildLoggerContext=vo.getLoggerContext=vo.setBrowserLoggerContext=vo.getBrowserLoggerContext=vo.getDefaultLoggerOptions=void 0;var n0=yO();function qRe(t){return Object.assign(Object.assign({},t),{level:t?.level||n0.PINO_LOGGER_DEFAULTS.level})}vo.getDefaultLoggerOptions=qRe;function hJ(t,e=n0.PINO_CUSTOM_CONTEXT_KEY){return t[e]||""}vo.getBrowserLoggerContext=hJ;function pJ(t,e,r=n0.PINO_CUSTOM_CONTEXT_KEY){return t[r]=e,t}vo.setBrowserLoggerContext=pJ;function mJ(t,e=n0.PINO_CUSTOM_CONTEXT_KEY){let r="";return typeof t.bindings>"u"?r=hJ(t,e):r=t.bindings().context||"",r}vo.getLoggerContext=mJ;function gJ(t,e,r=n0.PINO_CUSTOM_CONTEXT_KEY){let n=mJ(t,r);return n.trim()?`${n}/${e}`:e}vo.formatChildLoggerContext=gJ;function WRe(t,e,r=n0.PINO_CUSTOM_CONTEXT_KEY){let n=gJ(t,e,r),i=t.child({context:n});return pJ(i,n,r)}vo.generateChildLogger=WRe});var o6=F(i0=>{"use strict";Object.defineProperty(i0,"__esModule",{value:!0});i0.pino=void 0;var wO=(sJ(),St(iJ)),zRe=wO.__importDefault(dJ());Object.defineProperty(i0,"pino",{enumerable:!0,get:function(){return zRe.default}});wO.__exportStar(yO(),i0);wO.__exportStar(yJ(),i0)});var EJ=F(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var o0=Lg(),s0=Aa();wu.DIGEST_LENGTH=64;wu.BLOCK_SIZE=128;var bJ=function(){function t(){this.digestLength=wu.DIGEST_LENGTH,this.blockSize=wu.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 t.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){s0.wipe(this._buffer),s0.wipe(this._tempHi),s0.wipe(this._tempLo),this.reset()},t.prototype.update=function(e,r){if(r===void 0&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<wu.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(vO(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=vO(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},t.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,i=r/536870912|0,s=r<<3,o=r%128<112?128:256;this._buffer[n]=128;for(var a=n+1;a<o-8;a++)this._buffer[a]=0;o0.writeUint32BE(i,this._buffer,o-8),o0.writeUint32BE(s,this._buffer,o-4),vO(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,o),this._finished=!0}for(var a=0;a<this.digestLength/8;a++)o0.writeUint32BE(this._stateHi[a],e,a*8),o0.writeUint32BE(this._stateLo[a],e,a*8+4);return this},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(this._finished)throw new 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}},t.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},t.prototype.cleanSavedState=function(e){s0.wipe(e.stateHi),s0.wipe(e.stateLo),e.buffer&&s0.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},t}();wu.SHA512=bJ;var vJ=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function vO(t,e,r,n,i,s,o){for(var a=r[0],c=r[1],u=r[2],d=r[3],h=r[4],m=r[5],w=r[6],_=r[7],C=n[0],A=n[1],R=n[2],L=n[3],U=n[4],V=n[5],Q=n[6],Y=n[7],k,q,ie,W,z,X,D,g;o>=128;){for(var v=0;v<16;v++){var x=8*v+s;t[v]=o0.readUint32BE(i,x),e[v]=o0.readUint32BE(i,x+4)}for(var v=0;v<80;v++){var I=a,T=c,H=u,$=d,N=h,E=m,P=w,ae=_,ce=C,se=A,pe=R,De=L,Te=U,st=V,Ue=Q,Oe=Y;if(k=_,q=Y,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=(h>>>14|U<<18)^(h>>>18|U<<14)^(U>>>9|h<<23),q=(U>>>14|h<<18)^(U>>>18|h<<14)^(h>>>9|U<<23),z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,k=h&m^~h&w,q=U&V^~U&Q,z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,k=vJ[v*2],q=vJ[v*2+1],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,k=t[v%16],q=e[v%16],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,ie=D&65535|g<<16,W=z&65535|X<<16,k=ie,q=W,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=(a>>>28|C<<4)^(C>>>2|a<<30)^(C>>>7|a<<25),q=(C>>>28|a<<4)^(a>>>2|C<<30)^(a>>>7|C<<25),z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,k=a&c^a&u^c&u,q=C&A^C&R^A&R,z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,ae=D&65535|g<<16,Oe=z&65535|X<<16,k=$,q=De,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=ie,q=W,z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,$=D&65535|g<<16,De=z&65535|X<<16,c=I,u=T,d=H,h=$,m=N,w=E,_=P,a=ae,A=ce,R=se,L=pe,U=De,V=Te,Q=st,Y=Ue,C=Oe,v%16===15)for(var x=0;x<16;x++)k=t[x],q=e[x],z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=t[(x+9)%16],q=e[(x+9)%16],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,ie=t[(x+1)%16],W=e[(x+1)%16],k=(ie>>>1|W<<31)^(ie>>>8|W<<24)^ie>>>7,q=(W>>>1|ie<<31)^(W>>>8|ie<<24)^(W>>>7|ie<<25),z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,ie=t[(x+14)%16],W=e[(x+14)%16],k=(ie>>>19|W<<13)^(W>>>29|ie<<3)^ie>>>6,q=(W>>>19|ie<<13)^(ie>>>29|W<<3)^(W>>>6|ie<<26),z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,t[x]=D&65535|g<<16,e[x]=z&65535|X<<16}k=a,q=C,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[0],q=n[0],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[0]=a=D&65535|g<<16,n[0]=C=z&65535|X<<16,k=c,q=A,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[1],q=n[1],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[1]=c=D&65535|g<<16,n[1]=A=z&65535|X<<16,k=u,q=R,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[2],q=n[2],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[2]=u=D&65535|g<<16,n[2]=R=z&65535|X<<16,k=d,q=L,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[3],q=n[3],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[3]=d=D&65535|g<<16,n[3]=L=z&65535|X<<16,k=h,q=U,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[4],q=n[4],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[4]=h=D&65535|g<<16,n[4]=U=z&65535|X<<16,k=m,q=V,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[5],q=n[5],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[5]=m=D&65535|g<<16,n[5]=V=z&65535|X<<16,k=w,q=Q,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[6],q=n[6],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[6]=w=D&65535|g<<16,n[6]=Q=z&65535|X<<16,k=_,q=Y,z=q&65535,X=q>>>16,D=k&65535,g=k>>>16,k=r[7],q=n[7],z+=q&65535,X+=q>>>16,D+=k&65535,g+=k>>>16,X+=z>>>16,D+=X>>>16,g+=D>>>16,r[7]=_=D&65535|g<<16,n[7]=Y=z&65535|X<<16,s+=128,o-=128}return s}function GRe(t){var e=new bJ;e.update(t);var r=e.digest();return e.clean(),r}wu.hash=GRe});var kJ=F(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.convertSecretKeyToX25519=kr.convertPublicKeyToX25519=kr.verify=kr.sign=kr.extractPublicKeyFromSecretKey=kr.generateKeyPair=kr.generateKeyPairFromSeed=kr.SEED_LENGTH=kr.SECRET_KEY_LENGTH=kr.PUBLIC_KEY_LENGTH=kr.SIGNATURE_LENGTH=void 0;var ZRe=Kw(),_v=EJ(),AJ=Aa();kr.SIGNATURE_LENGTH=64;kr.PUBLIC_KEY_LENGTH=32;kr.SECRET_KEY_LENGTH=64;kr.SEED_LENGTH=32;function at(t){let e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}var KRe=new Uint8Array(32);KRe[0]=9;var _O=at(),a0=at([1]),JRe=at([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),YRe=at([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),_J=at([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),CJ=at([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),QRe=at([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Yf(t,e){for(let r=0;r<16;r++)t[r]=e[r]|0}function bO(t){let e=1;for(let r=0;r<16;r++){let n=t[r]+e+65535;e=Math.floor(n/65536),t[r]=n-e*65536}t[0]+=e-1+37*(e-1)}function SJ(t,e,r){let n=~(r-1);for(let i=0;i<16;i++){let s=n&(t[i]^e[i]);t[i]^=s,e[i]^=s}}function Cv(t,e){let r=at(),n=at();for(let i=0;i<16;i++)n[i]=e[i];bO(n),bO(n),bO(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let o=1;o<15;o++)r[o]=n[o]-65535-(r[o-1]>>16&1),r[o-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let s=r[15]>>16&1;r[14]&=65535,SJ(n,r,1-s)}for(let i=0;i<16;i++)t[2*i]=n[i]&255,t[2*i+1]=n[i]>>8}function DJ(t,e){let r=0;for(let n=0;n<32;n++)r|=t[n]^e[n];return(1&r-1>>>8)-1}function xJ(t,e){let r=new Uint8Array(32),n=new Uint8Array(32);return Cv(r,t),Cv(n,e),DJ(r,n)}function RJ(t){let e=new Uint8Array(32);return Cv(e,t),e[0]&1}function XRe(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function Zh(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}function Jh(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}function en(t,e,r){let n,i,s=0,o=0,a=0,c=0,u=0,d=0,h=0,m=0,w=0,_=0,C=0,A=0,R=0,L=0,U=0,V=0,Q=0,Y=0,k=0,q=0,ie=0,W=0,z=0,X=0,D=0,g=0,v=0,x=0,I=0,T=0,H=0,$=r[0],N=r[1],E=r[2],P=r[3],ae=r[4],ce=r[5],se=r[6],pe=r[7],De=r[8],Te=r[9],st=r[10],Ue=r[11],Oe=r[12],_t=r[13],Fe=r[14],Ye=r[15];n=e[0],s+=n*$,o+=n*N,a+=n*E,c+=n*P,u+=n*ae,d+=n*ce,h+=n*se,m+=n*pe,w+=n*De,_+=n*Te,C+=n*st,A+=n*Ue,R+=n*Oe,L+=n*_t,U+=n*Fe,V+=n*Ye,n=e[1],o+=n*$,a+=n*N,c+=n*E,u+=n*P,d+=n*ae,h+=n*ce,m+=n*se,w+=n*pe,_+=n*De,C+=n*Te,A+=n*st,R+=n*Ue,L+=n*Oe,U+=n*_t,V+=n*Fe,Q+=n*Ye,n=e[2],a+=n*$,c+=n*N,u+=n*E,d+=n*P,h+=n*ae,m+=n*ce,w+=n*se,_+=n*pe,C+=n*De,A+=n*Te,R+=n*st,L+=n*Ue,U+=n*Oe,V+=n*_t,Q+=n*Fe,Y+=n*Ye,n=e[3],c+=n*$,u+=n*N,d+=n*E,h+=n*P,m+=n*ae,w+=n*ce,_+=n*se,C+=n*pe,A+=n*De,R+=n*Te,L+=n*st,U+=n*Ue,V+=n*Oe,Q+=n*_t,Y+=n*Fe,k+=n*Ye,n=e[4],u+=n*$,d+=n*N,h+=n*E,m+=n*P,w+=n*ae,_+=n*ce,C+=n*se,A+=n*pe,R+=n*De,L+=n*Te,U+=n*st,V+=n*Ue,Q+=n*Oe,Y+=n*_t,k+=n*Fe,q+=n*Ye,n=e[5],d+=n*$,h+=n*N,m+=n*E,w+=n*P,_+=n*ae,C+=n*ce,A+=n*se,R+=n*pe,L+=n*De,U+=n*Te,V+=n*st,Q+=n*Ue,Y+=n*Oe,k+=n*_t,q+=n*Fe,ie+=n*Ye,n=e[6],h+=n*$,m+=n*N,w+=n*E,_+=n*P,C+=n*ae,A+=n*ce,R+=n*se,L+=n*pe,U+=n*De,V+=n*Te,Q+=n*st,Y+=n*Ue,k+=n*Oe,q+=n*_t,ie+=n*Fe,W+=n*Ye,n=e[7],m+=n*$,w+=n*N,_+=n*E,C+=n*P,A+=n*ae,R+=n*ce,L+=n*se,U+=n*pe,V+=n*De,Q+=n*Te,Y+=n*st,k+=n*Ue,q+=n*Oe,ie+=n*_t,W+=n*Fe,z+=n*Ye,n=e[8],w+=n*$,_+=n*N,C+=n*E,A+=n*P,R+=n*ae,L+=n*ce,U+=n*se,V+=n*pe,Q+=n*De,Y+=n*Te,k+=n*st,q+=n*Ue,ie+=n*Oe,W+=n*_t,z+=n*Fe,X+=n*Ye,n=e[9],_+=n*$,C+=n*N,A+=n*E,R+=n*P,L+=n*ae,U+=n*ce,V+=n*se,Q+=n*pe,Y+=n*De,k+=n*Te,q+=n*st,ie+=n*Ue,W+=n*Oe,z+=n*_t,X+=n*Fe,D+=n*Ye,n=e[10],C+=n*$,A+=n*N,R+=n*E,L+=n*P,U+=n*ae,V+=n*ce,Q+=n*se,Y+=n*pe,k+=n*De,q+=n*Te,ie+=n*st,W+=n*Ue,z+=n*Oe,X+=n*_t,D+=n*Fe,g+=n*Ye,n=e[11],A+=n*$,R+=n*N,L+=n*E,U+=n*P,V+=n*ae,Q+=n*ce,Y+=n*se,k+=n*pe,q+=n*De,ie+=n*Te,W+=n*st,z+=n*Ue,X+=n*Oe,D+=n*_t,g+=n*Fe,v+=n*Ye,n=e[12],R+=n*$,L+=n*N,U+=n*E,V+=n*P,Q+=n*ae,Y+=n*ce,k+=n*se,q+=n*pe,ie+=n*De,W+=n*Te,z+=n*st,X+=n*Ue,D+=n*Oe,g+=n*_t,v+=n*Fe,x+=n*Ye,n=e[13],L+=n*$,U+=n*N,V+=n*E,Q+=n*P,Y+=n*ae,k+=n*ce,q+=n*se,ie+=n*pe,W+=n*De,z+=n*Te,X+=n*st,D+=n*Ue,g+=n*Oe,v+=n*_t,x+=n*Fe,I+=n*Ye,n=e[14],U+=n*$,V+=n*N,Q+=n*E,Y+=n*P,k+=n*ae,q+=n*ce,ie+=n*se,W+=n*pe,z+=n*De,X+=n*Te,D+=n*st,g+=n*Ue,v+=n*Oe,x+=n*_t,I+=n*Fe,T+=n*Ye,n=e[15],V+=n*$,Q+=n*N,Y+=n*E,k+=n*P,q+=n*ae,ie+=n*ce,W+=n*se,z+=n*pe,X+=n*De,D+=n*Te,g+=n*st,v+=n*Ue,x+=n*Oe,I+=n*_t,T+=n*Fe,H+=n*Ye,s+=38*Q,o+=38*Y,a+=38*k,c+=38*q,u+=38*ie,d+=38*W,h+=38*z,m+=38*X,w+=38*D,_+=38*g,C+=38*v,A+=38*x,R+=38*I,L+=38*T,U+=38*H,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=w+i+65535,i=Math.floor(n/65536),w=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=C+i+65535,i=Math.floor(n/65536),C=n-i*65536,n=A+i+65535,i=Math.floor(n/65536),A=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=L+i+65535,i=Math.floor(n/65536),L=n-i*65536,n=U+i+65535,i=Math.floor(n/65536),U=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=w+i+65535,i=Math.floor(n/65536),w=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=C+i+65535,i=Math.floor(n/65536),C=n-i*65536,n=A+i+65535,i=Math.floor(n/65536),A=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=L+i+65535,i=Math.floor(n/65536),L=n-i*65536,n=U+i+65535,i=Math.floor(n/65536),U=n-i*65536,n=V+i+65535,i=Math.floor(n/65536),V=n-i*65536,s+=i-1+37*(i-1),t[0]=s,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=d,t[6]=h,t[7]=m,t[8]=w,t[9]=_,t[10]=C,t[11]=A,t[12]=R,t[13]=L,t[14]=U,t[15]=V}function Kh(t,e){en(t,e,e)}function TJ(t,e){let r=at(),n;for(n=0;n<16;n++)r[n]=e[n];for(n=253;n>=0;n--)Kh(r,r),n!==2&&n!==4&&en(r,r,e);for(n=0;n<16;n++)t[n]=r[n]}function eTe(t,e){let r=at(),n;for(n=0;n<16;n++)r[n]=e[n];for(n=250;n>=0;n--)Kh(r,r),n!==1&&en(r,r,e);for(n=0;n<16;n++)t[n]=r[n]}function CO(t,e){let r=at(),n=at(),i=at(),s=at(),o=at(),a=at(),c=at(),u=at(),d=at();Jh(r,t[1],t[0]),Jh(d,e[1],e[0]),en(r,r,d),Zh(n,t[0],t[1]),Zh(d,e[0],e[1]),en(n,n,d),en(i,t[3],e[3]),en(i,i,YRe),en(s,t[2],e[2]),Zh(s,s,s),Jh(o,n,r),Jh(a,s,i),Zh(c,s,i),Zh(u,n,r),en(t[0],o,a),en(t[1],u,c),en(t[2],c,a),en(t[3],o,u)}function IJ(t,e,r){for(let n=0;n<4;n++)SJ(t[n],e[n],r)}function IO(t,e){let r=at(),n=at(),i=at();TJ(i,e[2]),en(r,e[0],i),en(n,e[1],i),Cv(t,n),t[31]^=RJ(r)<<7}function NJ(t,e,r){Yf(t[0],_O),Yf(t[1],a0),Yf(t[2],a0),Yf(t[3],_O);for(let n=255;n>=0;--n){let i=r[n/8|0]>>(n&7)&1;IJ(t,e,i),CO(e,t),CO(t,t),IJ(t,e,i)}}function AO(t,e){let r=[at(),at(),at(),at()];Yf(r[0],_J),Yf(r[1],CJ),Yf(r[2],a0),en(r[3],_J,CJ),NJ(t,r,e)}function OJ(t){if(t.length!==kr.SEED_LENGTH)throw new Error(`ed25519: seed must be ${kr.SEED_LENGTH} bytes`);let e=(0,_v.hash)(t);e[0]&=248,e[31]&=127,e[31]|=64;let r=new Uint8Array(32),n=[at(),at(),at(),at()];AO(n,e),IO(r,n);let i=new Uint8Array(64);return i.set(t),i.set(r,32),{publicKey:r,secretKey:i}}kr.generateKeyPairFromSeed=OJ;function tTe(t){let e=(0,ZRe.randomBytes)(32,t),r=OJ(e);return(0,AJ.wipe)(e),r}kr.generateKeyPair=tTe;function rTe(t){if(t.length!==kr.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${kr.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))}kr.extractPublicKeyFromSecretKey=rTe;var EO=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 MJ(t,e){let r,n,i,s;for(n=63;n>=32;--n){for(r=0,i=n-32,s=n-12;i<s;++i)e[i]+=r-16*e[n]*EO[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=r*256;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*EO[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*EO[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=e[n]&255}function xO(t){let e=new Float64Array(64);for(let r=0;r<64;r++)e[r]=t[r];for(let r=0;r<64;r++)t[r]=0;MJ(t,e)}function nTe(t,e){let r=new Float64Array(64),n=[at(),at(),at(),at()],i=(0,_v.hash)(t.subarray(0,32));i[0]&=248,i[31]&=127,i[31]|=64;let s=new Uint8Array(64);s.set(i.subarray(32),32);let o=new _v.SHA512;o.update(s.subarray(32)),o.update(e);let a=o.digest();o.clean(),xO(a),AO(n,a),IO(s,n),o.reset(),o.update(s.subarray(0,32)),o.update(t.subarray(32)),o.update(e);let c=o.digest();xO(c);for(let u=0;u<32;u++)r[u]=a[u];for(let u=0;u<32;u++)for(let d=0;d<32;d++)r[u+d]+=c[u]*i[d];return MJ(s.subarray(32),r),s}kr.sign=nTe;function PJ(t,e){let r=at(),n=at(),i=at(),s=at(),o=at(),a=at(),c=at();return Yf(t[2],a0),XRe(t[1],e),Kh(i,t[1]),en(s,i,JRe),Jh(i,i,t[2]),Zh(s,t[2],s),Kh(o,s),Kh(a,o),en(c,a,o),en(r,c,i),en(r,r,s),eTe(r,r),en(r,r,i),en(r,r,s),en(r,r,s),en(t[0],r,s),Kh(n,t[0]),en(n,n,s),xJ(n,i)&&en(t[0],t[0],QRe),Kh(n,t[0]),en(n,n,s),xJ(n,i)?-1:(RJ(t[0])===e[31]>>7&&Jh(t[0],_O,t[0]),en(t[3],t[0],t[1]),0)}function iTe(t,e,r){let n=new Uint8Array(32),i=[at(),at(),at(),at()],s=[at(),at(),at(),at()];if(r.length!==kr.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${kr.SIGNATURE_LENGTH} bytes`);if(PJ(s,t))return!1;let o=new _v.SHA512;o.update(r.subarray(0,32)),o.update(t),o.update(e);let a=o.digest();return xO(a),NJ(i,s,a),AO(s,r.subarray(32)),CO(i,s),IO(n,i),!DJ(r,n)}kr.verify=iTe;function sTe(t){let e=[at(),at(),at(),at()];if(PJ(e,t))throw new Error("Ed25519: invalid public key");let r=at(),n=at(),i=e[1];Zh(r,a0,i),Jh(n,a0,i),TJ(n,n),en(r,r,n);let s=new Uint8Array(32);return Cv(s,r),s}kr.convertPublicKeyToX25519=sTe;function oTe(t){let e=(0,_v.hash)(t.subarray(0,32));e[0]&=248,e[31]&=127,e[31]|=64;let r=new Uint8Array(e.subarray(0,32));return(0,AJ.wipe)(e),r}kr.convertSecretKeyToX25519=oTe});var rY={};An(rY,{__assign:()=>MO,__asyncDelegator:()=>xTe,__asyncGenerator:()=>CTe,__asyncValues:()=>ITe,__await:()=>Dv,__awaiter:()=>yTe,__classPrivateFieldGet:()=>RTe,__classPrivateFieldSet:()=>TTe,__createBinding:()=>vTe,__decorate:()=>pTe,__exportStar:()=>bTe,__extends:()=>dTe,__generator:()=>wTe,__importDefault:()=>DTe,__importStar:()=>STe,__makeTemplateObject:()=>ATe,__metadata:()=>gTe,__param:()=>mTe,__read:()=>tY,__rest:()=>hTe,__spread:()=>ETe,__spreadArrays:()=>_Te,__values:()=>PO});function dTe(t,e){OO(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function hTe(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function pTe(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function mTe(t,e){return function(r,n){e(r,n,t)}}function gTe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function yTe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(h){o(h)}}function c(d){try{u(n.throw(d))}catch(h){o(h)}}function u(d){d.done?s(d.value):i(d.value).then(a,c)}u((n=n.apply(t,e||[])).next())})}function wTe(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(d){u=[6,d],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function vTe(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function bTe(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function PO(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tY(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function ETe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(tY(arguments[e]));return t}function _Te(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function Dv(t){return this instanceof Dv?(this.v=t,this):new Dv(t)}function CTe(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){n[m]&&(i[m]=function(w){return new Promise(function(_,C){s.push([m,w,_,C])>1||a(m,w)})})}function a(m,w){try{c(n[m](w))}catch(_){h(s[0][3],_)}}function c(m){m.value instanceof Dv?Promise.resolve(m.value.v).then(u,d):h(s[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function h(m,w){m(w),s.shift(),s.length&&a(s[0][0],s[0][1])}}function xTe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Dv(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function ITe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof PO=="function"?PO(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(u){s({value:u,done:a})},o)}}function ATe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function STe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function DTe(t){return t&&t.__esModule?t:{default:t}}function RTe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function TTe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var OO,MO,nY=ma(()=>{"use strict";OO=function(t,e){return OO=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},OO(t,e)};MO=function(){return MO=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},MO.apply(this,arguments)}});var sY=F(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.isBrowserCryptoAvailable=Xf.getSubtleCrypto=Xf.getBrowerCrypto=void 0;function kO(){return(global==null?void 0:global.crypto)||(global==null?void 0:global.msCrypto)||{}}Xf.getBrowerCrypto=kO;function iY(){let t=kO();return t.subtle||t.webkitSubtle}Xf.getSubtleCrypto=iY;function NTe(){return!!kO()&&!!iY()}Xf.isBrowserCryptoAvailable=NTe});var cY=F(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.isBrowser=ed.isNode=ed.isReactNative=void 0;function oY(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ed.isReactNative=oY;function aY(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}ed.isNode=aY;function OTe(){return!oY()&&!aY()}ed.isBrowser=OTe});var LO=F(A6=>{"use strict";Object.defineProperty(A6,"__esModule",{value:!0});var lY=(nY(),St(rY));lY.__exportStar(sY(),A6);lY.__exportStar(cY(),A6)});var gY=F((c3t,mY)=>{"use strict";mY.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}});var eQ=F((Ov,f0)=>{"use strict";var $Te=200,JO="__lodash_hash_undefined__",j6=1,NY=2,OY=9007199254740991,M6="[object Arguments]",$O="[object Array]",qTe="[object AsyncFunction]",MY="[object Boolean]",PY="[object Date]",kY="[object Error]",LY="[object Function]",WTe="[object GeneratorFunction]",P6="[object Map]",FY="[object Number]",zTe="[object Null]",u0="[object Object]",bY="[object Promise]",GTe="[object Proxy]",BY="[object RegExp]",k6="[object Set]",UY="[object String]",ZTe="[object Symbol]",KTe="[object Undefined]",qO="[object WeakMap]",jY="[object ArrayBuffer]",L6="[object DataView]",JTe="[object Float32Array]",YTe="[object Float64Array]",QTe="[object Int8Array]",XTe="[object Int16Array]",eNe="[object Int32Array]",tNe="[object Uint8Array]",rNe="[object Uint8ClampedArray]",nNe="[object Uint16Array]",iNe="[object Uint32Array]",sNe=/[\\^$.*+?()[\]{}|]/g,oNe=/^\[object .+?Constructor\]$/,aNe=/^(?:0|[1-9]\d*)$/,kn={};kn[JTe]=kn[YTe]=kn[QTe]=kn[XTe]=kn[eNe]=kn[tNe]=kn[rNe]=kn[nNe]=kn[iNe]=!0;kn[M6]=kn[$O]=kn[jY]=kn[MY]=kn[L6]=kn[PY]=kn[kY]=kn[LY]=kn[P6]=kn[FY]=kn[u0]=kn[BY]=kn[k6]=kn[UY]=kn[qO]=!1;var HY=typeof global=="object"&&global&&global.Object===Object&&global,cNe=typeof self=="object"&&self&&self.Object===Object&&self,bu=HY||cNe||Function("return this")(),VY=typeof Ov=="object"&&Ov&&!Ov.nodeType&&Ov,EY=VY&&typeof f0=="object"&&f0&&!f0.nodeType&&f0,$Y=EY&&EY.exports===VY,jO=$Y&&HY.process,_Y=function(){try{return jO&&jO.binding&&jO.binding("util")}catch{}}(),CY=_Y&&_Y.isTypedArray;function lNe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,s=[];++r<n;){var o=t[r];e(o,r,t)&&(s[i++]=o)}return s}function uNe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function fNe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function dNe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function hNe(t){return function(e){return t(e)}}function pNe(t,e){return t.has(e)}function mNe(t,e){return t?.[e]}function gNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function yNe(t,e){return function(r){return t(e(r))}}function wNe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var vNe=Array.prototype,bNe=Function.prototype,H6=Object.prototype,HO=bu["__core-js_shared__"],qY=bNe.toString,cl=H6.hasOwnProperty,xY=function(){var t=/[^.]+$/.exec(HO&&HO.keys&&HO.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),WY=H6.toString,ENe=RegExp("^"+qY.call(cl).replace(sNe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),IY=$Y?bu.Buffer:void 0,F6=bu.Symbol,AY=bu.Uint8Array,zY=H6.propertyIsEnumerable,_Ne=vNe.splice,Yh=F6?F6.toStringTag:void 0,SY=Object.getOwnPropertySymbols,CNe=IY?IY.isBuffer:void 0,xNe=yNe(Object.keys,Object),WO=d0(bu,"DataView"),Mv=d0(bu,"Map"),zO=d0(bu,"Promise"),GO=d0(bu,"Set"),ZO=d0(bu,"WeakMap"),Pv=d0(Object,"create"),INe=ep(WO),ANe=ep(Mv),SNe=ep(zO),DNe=ep(GO),RNe=ep(ZO),DY=F6?F6.prototype:void 0,VO=DY?DY.valueOf:void 0;function Qh(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function TNe(){this.__data__=Pv?Pv(null):{},this.size=0}function NNe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ONe(t){var e=this.__data__;if(Pv){var r=e[t];return r===JO?void 0:r}return cl.call(e,t)?e[t]:void 0}function MNe(t){var e=this.__data__;return Pv?e[t]!==void 0:cl.call(e,t)}function PNe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Pv&&e===void 0?JO:e,this}Qh.prototype.clear=TNe;Qh.prototype.delete=NNe;Qh.prototype.get=ONe;Qh.prototype.has=MNe;Qh.prototype.set=PNe;function Eu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function kNe(){this.__data__=[],this.size=0}function LNe(t){var e=this.__data__,r=V6(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():_Ne.call(e,r,1),--this.size,!0}function FNe(t){var e=this.__data__,r=V6(e,t);return r<0?void 0:e[r][1]}function BNe(t){return V6(this.__data__,t)>-1}function UNe(t,e){var r=this.__data__,n=V6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}Eu.prototype.clear=kNe;Eu.prototype.delete=LNe;Eu.prototype.get=FNe;Eu.prototype.has=BNe;Eu.prototype.set=UNe;function Xh(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function jNe(){this.size=0,this.__data__={hash:new Qh,map:new(Mv||Eu),string:new Qh}}function HNe(t){var e=$6(this,t).delete(t);return this.size-=e?1:0,e}function VNe(t){return $6(this,t).get(t)}function $Ne(t){return $6(this,t).has(t)}function qNe(t,e){var r=$6(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}Xh.prototype.clear=jNe;Xh.prototype.delete=HNe;Xh.prototype.get=VNe;Xh.prototype.has=$Ne;Xh.prototype.set=qNe;function B6(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Xh;++e<r;)this.add(t[e])}function WNe(t){return this.__data__.set(t,JO),this}function zNe(t){return this.__data__.has(t)}B6.prototype.add=B6.prototype.push=WNe;B6.prototype.has=zNe;function id(t){var e=this.__data__=new Eu(t);this.size=e.size}function GNe(){this.__data__=new Eu,this.size=0}function ZNe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function KNe(t){return this.__data__.get(t)}function JNe(t){return this.__data__.has(t)}function YNe(t,e){var r=this.__data__;if(r instanceof Eu){var n=r.__data__;if(!Mv||n.length<$Te-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Xh(n)}return r.set(t,e),this.size=r.size,this}id.prototype.clear=GNe;id.prototype.delete=ZNe;id.prototype.get=KNe;id.prototype.has=JNe;id.prototype.set=YNe;function QNe(t,e){var r=U6(t),n=!r&&hOe(t),i=!r&&!n&&KO(t),s=!r&&!n&&!i&&XY(t),o=r||n||i||s,a=o?dNe(t.length,String):[],c=a.length;for(var u in t)(e||cl.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cOe(u,c)))&&a.push(u);return a}function V6(t,e){for(var r=t.length;r--;)if(KY(t[r][0],e))return r;return-1}function XNe(t,e,r){var n=e(t);return U6(t)?n:uNe(n,r(t))}function Lv(t){return t==null?t===void 0?KTe:zTe:Yh&&Yh in Object(t)?oOe(t):dOe(t)}function RY(t){return kv(t)&&Lv(t)==M6}function GY(t,e,r,n,i){return t===e?!0:t==null||e==null||!kv(t)&&!kv(e)?t!==t&&e!==e:eOe(t,e,r,n,GY,i)}function eOe(t,e,r,n,i,s){var o=U6(t),a=U6(e),c=o?$O:nd(t),u=a?$O:nd(e);c=c==M6?u0:c,u=u==M6?u0:u;var d=c==u0,h=u==u0,m=c==u;if(m&&KO(t)){if(!KO(e))return!1;o=!0,d=!1}if(m&&!d)return s||(s=new id),o||XY(t)?ZY(t,e,r,n,i,s):iOe(t,e,c,r,n,i,s);if(!(r&j6)){var w=d&&cl.call(t,"__wrapped__"),_=h&&cl.call(e,"__wrapped__");if(w||_){var C=w?t.value():t,A=_?e.value():e;return s||(s=new id),i(C,A,r,n,s)}}return m?(s||(s=new id),sOe(t,e,r,n,i,s)):!1}function tOe(t){if(!QY(t)||uOe(t))return!1;var e=JY(t)?ENe:oNe;return e.test(ep(t))}function rOe(t){return kv(t)&&YY(t.length)&&!!kn[Lv(t)]}function nOe(t){if(!fOe(t))return xNe(t);var e=[];for(var r in Object(t))cl.call(t,r)&&r!="constructor"&&e.push(r);return e}function ZY(t,e,r,n,i,s){var o=r&j6,a=t.length,c=e.length;if(a!=c&&!(o&&c>a))return!1;var u=s.get(t);if(u&&s.get(e))return u==e;var d=-1,h=!0,m=r&NY?new B6:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var w=t[d],_=e[d];if(n)var C=o?n(_,w,d,e,t,s):n(w,_,d,t,e,s);if(C!==void 0){if(C)continue;h=!1;break}if(m){if(!fNe(e,function(A,R){if(!pNe(m,R)&&(w===A||i(w,A,r,n,s)))return m.push(R)})){h=!1;break}}else if(!(w===_||i(w,_,r,n,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function iOe(t,e,r,n,i,s,o){switch(r){case L6:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case jY:return!(t.byteLength!=e.byteLength||!s(new AY(t),new AY(e)));case MY:case PY:case FY:return KY(+t,+e);case kY:return t.name==e.name&&t.message==e.message;case BY:case UY:return t==e+"";case P6:var a=gNe;case k6:var c=n&j6;if(a||(a=wNe),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;n|=NY,o.set(t,e);var d=ZY(a(t),a(e),n,i,s,o);return o.delete(t),d;case ZTe:if(VO)return VO.call(t)==VO.call(e)}return!1}function sOe(t,e,r,n,i,s){var o=r&j6,a=TY(t),c=a.length,u=TY(e),d=u.length;if(c!=d&&!o)return!1;for(var h=c;h--;){var m=a[h];if(!(o?m in e:cl.call(e,m)))return!1}var w=s.get(t);if(w&&s.get(e))return w==e;var _=!0;s.set(t,e),s.set(e,t);for(var C=o;++h<c;){m=a[h];var A=t[m],R=e[m];if(n)var L=o?n(R,A,m,e,t,s):n(A,R,m,t,e,s);if(!(L===void 0?A===R||i(A,R,r,n,s):L)){_=!1;break}C||(C=m=="constructor")}if(_&&!C){var U=t.constructor,V=e.constructor;U!=V&&"constructor"in t&&"constructor"in e&&!(typeof U=="function"&&U instanceof U&&typeof V=="function"&&V instanceof V)&&(_=!1)}return s.delete(t),s.delete(e),_}function TY(t){return XNe(t,gOe,aOe)}function $6(t,e){var r=t.__data__;return lOe(e)?r[typeof e=="string"?"string":"hash"]:r.map}function d0(t,e){var r=mNe(t,e);return tOe(r)?r:void 0}function oOe(t){var e=cl.call(t,Yh),r=t[Yh];try{t[Yh]=void 0;var n=!0}catch{}var i=WY.call(t);return n&&(e?t[Yh]=r:delete t[Yh]),i}var aOe=SY?function(t){return t==null?[]:(t=Object(t),lNe(SY(t),function(e){return zY.call(t,e)}))}:yOe,nd=Lv;(WO&&nd(new WO(new ArrayBuffer(1)))!=L6||Mv&&nd(new Mv)!=P6||zO&&nd(zO.resolve())!=bY||GO&&nd(new GO)!=k6||ZO&&nd(new ZO)!=qO)&&(nd=function(t){var e=Lv(t),r=e==u0?t.constructor:void 0,n=r?ep(r):"";if(n)switch(n){case INe:return L6;case ANe:return P6;case SNe:return bY;case DNe:return k6;case RNe:return qO}return e});function cOe(t,e){return e=e??OY,!!e&&(typeof t=="number"||aNe.test(t))&&t>-1&&t%1==0&&t<e}function lOe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function uOe(t){return!!xY&&xY in t}function fOe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||H6;return t===r}function dOe(t){return WY.call(t)}function ep(t){if(t!=null){try{return qY.call(t)}catch{}try{return t+""}catch{}}return""}function KY(t,e){return t===e||t!==t&&e!==e}var hOe=RY(function(){return arguments}())?RY:function(t){return kv(t)&&cl.call(t,"callee")&&!zY.call(t,"callee")},U6=Array.isArray;function pOe(t){return t!=null&&YY(t.length)&&!JY(t)}var KO=CNe||wOe;function mOe(t,e){return GY(t,e)}function JY(t){if(!QY(t))return!1;var e=Lv(t);return e==LY||e==WTe||e==qTe||e==GTe}function YY(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=OY}function QY(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function kv(t){return t!=null&&typeof t=="object"}var XY=CY?hNe(CY):rOe;function gOe(t){return pOe(t)?QNe(t):nOe(t)}function yOe(){return[]}function wOe(){return!1}f0.exports=mOe});var YO={};An(YO,{default:()=>vOe});function vOe(t,e){return e=e||{},new Promise(function(r,n){var i=new XMLHttpRequest,s=[],o=[],a={},c=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return s},entries:function(){return o},get:function(d){return a[d.toLowerCase()]},has:function(d){return d.toLowerCase()in a}}}};for(var u in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(d,h,m){s.push(h=h.toLowerCase()),o.push([h,m]),a[h]=a[h]?a[h]+","+m:m}),r(c())},i.onerror=n,i.withCredentials=e.credentials=="include",e.headers)i.setRequestHeader(u,e.headers[u]);i.send(e.body||null)})}var QO=ma(()=>{"use strict"});var rQ=F((h3t,tQ)=>{"use strict";tQ.exports=self.fetch||(self.fetch=(QO(),St(YO)).default||(QO(),St(YO)))});var WQ=F((Au,qQ)=>{"use strict";var $Q=typeof self<"u"?self:Au,Z6=function(){function t(){this.fetch=!1,this.DOMException=$Q.DOMException}return t.prototype=$Q,new t}();(function(t){var e=function(r){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(W){return W&&DataView.prototype.isPrototypeOf(W)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(W){return W&&s.indexOf(Object.prototype.toString.call(W))>-1};function a(W){if(typeof W!="string"&&(W=String(W)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(W))throw new TypeError("Invalid character in header field name");return W.toLowerCase()}function c(W){return typeof W!="string"&&(W=String(W)),W}function u(W){var z={next:function(){var X=W.shift();return{done:X===void 0,value:X}}};return n.iterable&&(z[Symbol.iterator]=function(){return z}),z}function d(W){this.map={},W instanceof d?W.forEach(function(z,X){this.append(X,z)},this):Array.isArray(W)?W.forEach(function(z){this.append(z[0],z[1])},this):W&&Object.getOwnPropertyNames(W).forEach(function(z){this.append(z,W[z])},this)}d.prototype.append=function(W,z){W=a(W),z=c(z);var X=this.map[W];this.map[W]=X?X+", "+z:z},d.prototype.delete=function(W){delete this.map[a(W)]},d.prototype.get=function(W){return W=a(W),this.has(W)?this.map[W]:null},d.prototype.has=function(W){return this.map.hasOwnProperty(a(W))},d.prototype.set=function(W,z){this.map[a(W)]=c(z)},d.prototype.forEach=function(W,z){for(var X in this.map)this.map.hasOwnProperty(X)&&W.call(z,this.map[X],X,this)},d.prototype.keys=function(){var W=[];return this.forEach(function(z,X){W.push(X)}),u(W)},d.prototype.values=function(){var W=[];return this.forEach(function(z){W.push(z)}),u(W)},d.prototype.entries=function(){var W=[];return this.forEach(function(z,X){W.push([X,z])}),u(W)},n.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function h(W){if(W.bodyUsed)return Promise.reject(new TypeError("Already read"));W.bodyUsed=!0}function m(W){return new Promise(function(z,X){W.onload=function(){z(W.result)},W.onerror=function(){X(W.error)}})}function w(W){var z=new FileReader,X=m(z);return z.readAsArrayBuffer(W),X}function _(W){var z=new FileReader,X=m(z);return z.readAsText(W),X}function C(W){for(var z=new Uint8Array(W),X=new Array(z.length),D=0;D<z.length;D++)X[D]=String.fromCharCode(z[D]);return X.join("")}function A(W){if(W.slice)return W.slice(0);var z=new Uint8Array(W.byteLength);return z.set(new Uint8Array(W)),z.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(W){this._bodyInit=W,W?typeof W=="string"?this._bodyText=W:n.blob&&Blob.prototype.isPrototypeOf(W)?this._bodyBlob=W:n.formData&&FormData.prototype.isPrototypeOf(W)?this._bodyFormData=W:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(W)?this._bodyText=W.toString():n.arrayBuffer&&n.blob&&i(W)?(this._bodyArrayBuffer=A(W.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(W)||o(W))?this._bodyArrayBuffer=A(W):this._bodyText=W=Object.prototype.toString.call(W):this._bodyText="",this.headers.get("content-type")||(typeof W=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(W)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var W=h(this);if(W)return W;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(w)}),this.text=function(){var W=h(this);if(W)return W;if(this._bodyBlob)return _(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(Q)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function U(W){var z=W.toUpperCase();return L.indexOf(z)>-1?z:W}function V(W,z){z=z||{};var X=z.body;if(W instanceof V){if(W.bodyUsed)throw new TypeError("Already read");this.url=W.url,this.credentials=W.credentials,z.headers||(this.headers=new d(W.headers)),this.method=W.method,this.mode=W.mode,this.signal=W.signal,!X&&W._bodyInit!=null&&(X=W._bodyInit,W.bodyUsed=!0)}else this.url=String(W);if(this.credentials=z.credentials||this.credentials||"same-origin",(z.headers||!this.headers)&&(this.headers=new d(z.headers)),this.method=U(z.method||this.method||"GET"),this.mode=z.mode||this.mode||null,this.signal=z.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})};function Q(W){var z=new FormData;return W.trim().split("&").forEach(function(X){if(X){var D=X.split("="),g=D.shift().replace(/\+/g," "),v=D.join("=").replace(/\+/g," ");z.append(decodeURIComponent(g),decodeURIComponent(v))}}),z}function Y(W){var z=new d,X=W.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(D){var g=D.split(":"),v=g.shift().trim();if(v){var x=g.join(":").trim();z.append(v,x)}}),z}R.call(V.prototype);function k(W,z){z||(z={}),this.type="default",this.status=z.status===void 0?200:z.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in z?z.statusText:"OK",this.headers=new d(z.headers),this.url=z.url||"",this._initBody(W)}R.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},k.error=function(){var W=new k(null,{status:0,statusText:""});return W.type="error",W};var q=[301,302,303,307,308];k.redirect=function(W,z){if(q.indexOf(z)===-1)throw new RangeError("Invalid status code");return new k(null,{status:z,headers:{location:W}})},r.DOMException=t.DOMException;try{new r.DOMException}catch{r.DOMException=function(z,X){this.message=z,this.name=X;var D=Error(z);this.stack=D.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function ie(W,z){return new Promise(function(X,D){var g=new V(W,z);if(g.signal&&g.signal.aborted)return D(new r.DOMException("Aborted","AbortError"));var v=new XMLHttpRequest;function x(){v.abort()}v.onload=function(){var I={status:v.status,statusText:v.statusText,headers:Y(v.getAllResponseHeaders()||"")};I.url="responseURL"in v?v.responseURL:I.headers.get("X-Request-URL");var T="response"in v?v.response:v.responseText;X(new k(T,I))},v.onerror=function(){D(new TypeError("Network request failed"))},v.ontimeout=function(){D(new TypeError("Network request failed"))},v.onabort=function(){D(new r.DOMException("Aborted","AbortError"))},v.open(g.method,g.url,!0),g.credentials==="include"?v.withCredentials=!0:g.credentials==="omit"&&(v.withCredentials=!1),"responseType"in v&&n.blob&&(v.responseType="blob"),g.headers.forEach(function(I,T){v.setRequestHeader(T,I)}),g.signal&&(g.signal.addEventListener("abort",x),v.onreadystatechange=function(){v.readyState===4&&g.signal.removeEventListener("abort",x)}),v.send(typeof g._bodyInit>"u"?null:g._bodyInit)})}return ie.polyfill=!0,t.fetch||(t.fetch=ie,t.Headers=d,t.Request=V,t.Response=k),r.Headers=d,r.Request=V,r.Response=k,r.fetch=ie,Object.defineProperty(r,"__esModule",{value:!0}),r}({})})(Z6);Z6.fetch.ponyfill=!0;delete Z6.fetch.polyfill;var m0=Z6;Au=m0.fetch;Au.default=m0.fetch;Au.fetch=m0.fetch;Au.Headers=m0.Headers;Au.Request=m0.Request;Au.Response=m0.Response;qQ.exports=Au});var v8=F(w8=>{"use strict";w8.byteLength=FLe;w8.toByteArray=ULe;w8.fromByteArray=VLe;var hl=[],Oa=[],LLe=typeof Uint8Array<"u"?Uint8Array:Array,rP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Rp=0,nre=rP.length;Rp<nre;++Rp)hl[Rp]=rP[Rp],Oa[rP.charCodeAt(Rp)]=Rp;var Rp,nre;Oa[45]=62;Oa[95]=63;function ire(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function FLe(t){var e=ire(t),r=e[0],n=e[1];return(r+n)*3/4-n}function BLe(t,e,r){return(e+r)*3/4-r}function ULe(t){var e,r=ire(t),n=r[0],i=r[1],s=new LLe(BLe(t,n,i)),o=0,a=i>0?n-4:n,c;for(c=0;c<a;c+=4)e=Oa[t.charCodeAt(c)]<<18|Oa[t.charCodeAt(c+1)]<<12|Oa[t.charCodeAt(c+2)]<<6|Oa[t.charCodeAt(c+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Oa[t.charCodeAt(c)]<<2|Oa[t.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=Oa[t.charCodeAt(c)]<<10|Oa[t.charCodeAt(c+1)]<<4|Oa[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function jLe(t){return hl[t>>18&63]+hl[t>>12&63]+hl[t>>6&63]+hl[t&63]}function HLe(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(jLe(n));return i.join("")}function VLe(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(HLe(t,o,o+s>a?a:o+s));return n===1?(e=t[r-1],i.push(hl[e>>2]+hl[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(hl[e>>10]+hl[e>>4&63]+hl[e<<2&63]+"=")),i.join("")}});var b8=F(nP=>{"use strict";nP.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,u=c>>1,d=-7,h=r?i-1:0,m=r?-1:1,w=t[e+h];for(h+=m,s=w&(1<<-d)-1,w>>=-d,d+=a;d>0;s=s*256+t[e+h],h+=m,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+h],h+=m,d-=8);if(s===0)s=1-u;else{if(s===c)return o?NaN:(w?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(w?-1:1)*o*Math.pow(2,s-n)};nP.write=function(t,e,r,n,i,s){var o,a,c,u=s*8-i-1,d=(1<<u)-1,h=d>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,_=n?1:-1,C=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+h>=1?e+=m/c:e+=m*Math.pow(2,1-h),e*c>=2&&(o++,c/=2),o+h>=d?(a=0,o=d):o+h>=1?(a=(e*c-1)*Math.pow(2,i),o=o+h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+w]=a&255,w+=_,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;t[r+w]=o&255,w+=_,o/=256,u-=8);t[r+w-_]|=C*128}});var Ere=F(Z0=>{"use strict";var iP=v8(),z0=b8(),sre=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Z0.Buffer=le;Z0.SlowBuffer=ZLe;Z0.INSPECT_MAX_BYTES=50;var E8=2147483647;Z0.kMaxLength=E8;le.TYPED_ARRAY_SUPPORT=$Le();!le.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function $Le(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(le.prototype,"parent",{enumerable:!0,get:function(){if(le.isBuffer(this))return this.buffer}});Object.defineProperty(le.prototype,"offset",{enumerable:!0,get:function(){if(le.isBuffer(this))return this.byteOffset}});function Bu(t){if(t>E8)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,le.prototype),e}function le(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return cP(t)}return lre(t,e,r)}le.poolSize=8192;function lre(t,e,r){if(typeof t=="string")return WLe(t,e);if(ArrayBuffer.isView(t))return zLe(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(pl(t,ArrayBuffer)||t&&pl(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pl(t,SharedArrayBuffer)||t&&pl(t.buffer,SharedArrayBuffer)))return oP(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return le.from(n,e,r);let i=GLe(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return le.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}le.from=function(t,e,r){return lre(t,e,r)};Object.setPrototypeOf(le.prototype,Uint8Array.prototype);Object.setPrototypeOf(le,Uint8Array);function ure(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function qLe(t,e,r){return ure(t),t<=0?Bu(t):e!==void 0?typeof r=="string"?Bu(t).fill(e,r):Bu(t).fill(e):Bu(t)}le.alloc=function(t,e,r){return qLe(t,e,r)};function cP(t){return ure(t),Bu(t<0?0:lP(t)|0)}le.allocUnsafe=function(t){return cP(t)};le.allocUnsafeSlow=function(t){return cP(t)};function WLe(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!le.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=fre(t,e)|0,n=Bu(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function sP(t){let e=t.length<0?0:lP(t.length)|0,r=Bu(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function zLe(t){if(pl(t,Uint8Array)){let e=new Uint8Array(t);return oP(e.buffer,e.byteOffset,e.byteLength)}return sP(t)}function oP(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,le.prototype),n}function GLe(t){if(le.isBuffer(t)){let e=lP(t.length)|0,r=Bu(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||fP(t.length)?Bu(0):sP(t);if(t.type==="Buffer"&&Array.isArray(t.data))return sP(t.data)}function lP(t){if(t>=E8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E8.toString(16)+" bytes");return t|0}function ZLe(t){return+t!=t&&(t=0),le.alloc(+t)}le.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==le.prototype};le.compare=function(e,r){if(pl(e,Uint8Array)&&(e=le.from(e,e.offset,e.byteLength)),pl(r,Uint8Array)&&(r=le.from(r,r.offset,r.byteLength)),!le.isBuffer(e)||!le.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==r[s]){n=e[s],i=r[s];break}return n<i?-1:i<n?1:0};le.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};le.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return le.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=le.allocUnsafe(r),s=0;for(n=0;n<e.length;++n){let o=e[n];if(pl(o,Uint8Array))s+o.length>i.length?(le.isBuffer(o)||(o=le.from(o)),o.copy(i,s)):Uint8Array.prototype.set.call(i,o,s);else if(le.isBuffer(o))o.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=o.length}return i};function fre(t,e){if(le.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||pl(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return aP(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return bre(t).length;default:if(i)return n?-1:aP(t).length;e=(""+e).toLowerCase(),i=!0}}le.byteLength=fre;function KLe(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return sFe(this,e,r);case"utf8":case"utf-8":return hre(this,e,r);case"ascii":return nFe(this,e,r);case"latin1":case"binary":return iFe(this,e,r);case"base64":return tFe(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oFe(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}le.prototype._isBuffer=!0;function Tp(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}le.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)Tp(this,r,r+1);return this};le.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)Tp(this,r,r+3),Tp(this,r+1,r+2);return this};le.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)Tp(this,r,r+7),Tp(this,r+1,r+6),Tp(this,r+2,r+5),Tp(this,r+3,r+4);return this};le.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?hre(this,0,e):KLe.apply(this,arguments)};le.prototype.toLocaleString=le.prototype.toString;le.prototype.equals=function(e){if(!le.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:le.compare(this,e)===0};le.prototype.inspect=function(){let e="",r=Z0.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};sre&&(le.prototype[sre]=le.prototype.inspect);le.prototype.compare=function(e,r,n,i,s){if(pl(e,Uint8Array)&&(e=le.from(e,e.offset,e.byteLength)),!le.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),r<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;let o=s-i,a=n-r,c=Math.min(o,a),u=this.slice(i,s),d=e.slice(r,n);for(let h=0;h<c;++h)if(u[h]!==d[h]){o=u[h],a=d[h];break}return o<a?-1:a<o?1:0};function dre(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,fP(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=le.from(e,n)),le.isBuffer(e))return e.length===0?-1:ore(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):ore(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ore(t,e,r,n,i){let s=1,o=t.length,a=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;s=2,o/=2,a/=2,r/=2}function c(d,h){return s===1?d[h]:d.readUInt16BE(h*s)}let u;if(i){let d=-1;for(u=r;u<o;u++)if(c(t,u)===c(e,d===-1?0:u-d)){if(d===-1&&(d=u),u-d+1===a)return d*s}else d!==-1&&(u-=u-d),d=-1}else for(r+a>o&&(r=o-a),u=r;u>=0;u--){let d=!0;for(let h=0;h<a;h++)if(c(t,u+h)!==c(e,h)){d=!1;break}if(d)return u}return-1}le.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};le.prototype.indexOf=function(e,r,n){return dre(this,e,r,n,!0)};le.prototype.lastIndexOf=function(e,r,n){return dre(this,e,r,n,!1)};function JLe(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let s=e.length;n>s/2&&(n=s/2);let o;for(o=0;o<n;++o){let a=parseInt(e.substr(o*2,2),16);if(fP(a))return o;t[r+o]=a}return o}function YLe(t,e,r,n){return _8(aP(e,t.length-r),t,r,n)}function QLe(t,e,r,n){return _8(uFe(e),t,r,n)}function XLe(t,e,r,n){return _8(bre(e),t,r,n)}function eFe(t,e,r,n){return _8(fFe(e,t.length-r),t,r,n)}le.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-r;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return JLe(this,e,r,n);case"utf8":case"utf-8":return YLe(this,e,r,n);case"ascii":case"latin1":case"binary":return QLe(this,e,r,n);case"base64":return XLe(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return eFe(this,e,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};le.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tFe(t,e,r){return e===0&&r===t.length?iP.fromByteArray(t):iP.fromByteArray(t.slice(e,r))}function hre(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){let c,u,d,h;switch(a){case 1:s<128&&(o=s);break;case 2:c=t[i+1],(c&192)===128&&(h=(s&31)<<6|c&63,h>127&&(o=h));break;case 3:c=t[i+1],u=t[i+2],(c&192)===128&&(u&192)===128&&(h=(s&15)<<12|(c&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:c=t[i+1],u=t[i+2],d=t[i+3],(c&192)===128&&(u&192)===128&&(d&192)===128&&(h=(s&15)<<18|(c&63)<<12|(u&63)<<6|d&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=a}return rFe(n)}var are=4096;function rFe(t){let e=t.length;if(e<=are)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=are));return r}function nFe(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function iFe(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function sFe(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let s=e;s<r;++s)i+=dFe[t[s]];return i}function oFe(t,e,r){let n=t.slice(e,r),i="";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}le.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,le.prototype),i};function Gi(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}le.prototype.readUintLE=le.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Gi(e,r,this.length);let i=this[e],s=1,o=0;for(;++o<r&&(s*=256);)i+=this[e+o]*s;return i};le.prototype.readUintBE=le.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Gi(e,r,this.length);let i=this[e+--r],s=1;for(;r>0&&(s*=256);)i+=this[e+--r]*s;return i};le.prototype.readUint8=le.prototype.readUInt8=function(e,r){return e=e>>>0,r||Gi(e,1,this.length),this[e]};le.prototype.readUint16LE=le.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Gi(e,2,this.length),this[e]|this[e+1]<<8};le.prototype.readUint16BE=le.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Gi(e,2,this.length),this[e]<<8|this[e+1]};le.prototype.readUint32LE=le.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Gi(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};le.prototype.readUint32BE=le.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Gi(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};le.prototype.readBigUInt64LE=Id(function(e){e=e>>>0,G0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I2(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,s=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))});le.prototype.readBigUInt64BE=Id(function(e){e=e>>>0,G0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I2(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],s=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(s)});le.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Gi(e,r,this.length);let i=this[e],s=1,o=0;for(;++o<r&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*r)),i};le.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Gi(e,r,this.length);let i=r,s=1,o=this[e+--i];for(;i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*r)),o};le.prototype.readInt8=function(e,r){return e=e>>>0,r||Gi(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};le.prototype.readInt16LE=function(e,r){e=e>>>0,r||Gi(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};le.prototype.readInt16BE=function(e,r){e=e>>>0,r||Gi(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};le.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Gi(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};le.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Gi(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};le.prototype.readBigInt64LE=Id(function(e){e=e>>>0,G0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I2(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});le.prototype.readBigInt64BE=Id(function(e){e=e>>>0,G0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I2(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});le.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Gi(e,4,this.length),z0.read(this,e,!0,23,4)};le.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Gi(e,4,this.length),z0.read(this,e,!1,23,4)};le.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Gi(e,8,this.length),z0.read(this,e,!0,52,8)};le.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Gi(e,8,this.length),z0.read(this,e,!1,52,8)};function _o(t,e,r,n,i,s){if(!le.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}le.prototype.writeUintLE=le.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;_o(this,e,r,n,a,0)}let s=1,o=0;for(this[r]=e&255;++o<n&&(s*=256);)this[r+o]=e/s&255;return r+n};le.prototype.writeUintBE=le.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;_o(this,e,r,n,a,0)}let s=n-1,o=1;for(this[r+s]=e&255;--s>=0&&(o*=256);)this[r+s]=e/o&255;return r+n};le.prototype.writeUint8=le.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,1,255,0),this[r]=e&255,r+1};le.prototype.writeUint16LE=le.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};le.prototype.writeUint16BE=le.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};le.prototype.writeUint32LE=le.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};le.prototype.writeUint32BE=le.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function pre(t,e,r,n,i){vre(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,r}function mre(t,e,r,n,i){vre(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s=s>>8,t[r+6]=s,s=s>>8,t[r+5]=s,s=s>>8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o=o>>8,t[r+2]=o,o=o>>8,t[r+1]=o,o=o>>8,t[r]=o,r+8}le.prototype.writeBigUInt64LE=Id(function(e,r=0){return pre(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});le.prototype.writeBigUInt64BE=Id(function(e,r=0){return mre(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});le.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);_o(this,e,r,n,c-1,-c)}let s=0,o=1,a=0;for(this[r]=e&255;++s<n&&(o*=256);)e<0&&a===0&&this[r+s-1]!==0&&(a=1),this[r+s]=(e/o>>0)-a&255;return r+n};le.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);_o(this,e,r,n,c-1,-c)}let s=n-1,o=1,a=0;for(this[r+s]=e&255;--s>=0&&(o*=256);)e<0&&a===0&&this[r+s+1]!==0&&(a=1),this[r+s]=(e/o>>0)-a&255;return r+n};le.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};le.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};le.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};le.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};le.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||_o(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};le.prototype.writeBigInt64LE=Id(function(e,r=0){return pre(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});le.prototype.writeBigInt64BE=Id(function(e,r=0){return mre(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function gre(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function yre(t,e,r,n,i){return e=+e,r=r>>>0,i||gre(t,e,r,4,34028234663852886e22,-34028234663852886e22),z0.write(t,e,r,n,23,4),r+4}le.prototype.writeFloatLE=function(e,r,n){return yre(this,e,r,!0,n)};le.prototype.writeFloatBE=function(e,r,n){return yre(this,e,r,!1,n)};function wre(t,e,r,n,i){return e=+e,r=r>>>0,i||gre(t,e,r,8,17976931348623157e292,-17976931348623157e292),z0.write(t,e,r,n,52,8),r+8}le.prototype.writeDoubleLE=function(e,r,n){return wre(this,e,r,!0,n)};le.prototype.writeDoubleBE=function(e,r,n){return wre(this,e,r,!1,n)};le.prototype.copy=function(e,r,n,i){if(!le.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);let s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),s};le.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!le.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let o=e.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(e=o)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let s;if(typeof e=="number")for(s=r;s<n;++s)this[s]=e;else{let o=le.isBuffer(e)?e:le.from(e,i),a=o.length;if(a===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-r;++s)this[s+r]=o[s%a]}return this};var W0={};function uP(t,e,r){W0[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}uP("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);uP("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);uP("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=cre(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=cre(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function cre(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function aFe(t,e,r){G0(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&I2(e,t.length-(r+1))}function vre(t,e,r,n,i,s){if(t>r||t<e){let o=typeof e=="bigint"?"n":"",a;throw s>3?e===0||e===BigInt(0)?a=`>= 0${o} and < 2${o} ** ${(s+1)*8}${o}`:a=`>= -(2${o} ** ${(s+1)*8-1}${o}) and < 2 ** ${(s+1)*8-1}${o}`:a=`>= ${e}${o} and <= ${r}${o}`,new W0.ERR_OUT_OF_RANGE("value",a,t)}aFe(n,i,s)}function G0(t,e){if(typeof t!="number")throw new W0.ERR_INVALID_ARG_TYPE(e,"number",t)}function I2(t,e,r){throw Math.floor(t)!==t?(G0(t,r),new W0.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new W0.ERR_BUFFER_OUT_OF_BOUNDS:new W0.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var cFe=/[^+/0-9A-Za-z-_]/g;function lFe(t){if(t=t.split("=")[0],t=t.trim().replace(cFe,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function aP(t,e){e=e||1/0;let r,n=t.length,i=null,s=[];for(let o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function uFe(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function fFe(t,e){let r,n,i,s=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function bre(t){return iP.toByteArray(lFe(t))}function _8(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function pl(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function fP(t){return t!==t}var dFe=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Id(t){return typeof BigInt>"u"?hFe:t}function hFe(){throw new Error("BigInt not supported")}});var Cre=F(C8=>{"use strict";Object.defineProperty(C8,"__esModule",{value:!0});C8.walletLogo=void 0;var pFe=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' 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=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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.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.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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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.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"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' 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 `}};C8.walletLogo=pFe});var xre=F(x8=>{"use strict";Object.defineProperty(x8,"__esModule",{value:!0});x8.LINK_API_URL=void 0;x8.LINK_API_URL="https://www.walletlink.org"});var Hre=F(Q0=>{"use strict";var dP=v8(),J0=b8(),Ire=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Q0.Buffer=ue;Q0.SlowBuffer=bFe;Q0.INSPECT_MAX_BYTES=50;var I8=2147483647;Q0.kMaxLength=I8;ue.TYPED_ARRAY_SUPPORT=mFe();!ue.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function mFe(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(ue.prototype,"parent",{enumerable:!0,get:function(){if(ue.isBuffer(this))return this.buffer}});Object.defineProperty(ue.prototype,"offset",{enumerable:!0,get:function(){if(ue.isBuffer(this))return this.byteOffset}});function Uu(t){if(t>I8)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,ue.prototype),e}function ue(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return gP(t)}return Rre(t,e,r)}ue.poolSize=8192;function Rre(t,e,r){if(typeof t=="string")return yFe(t,e);if(ArrayBuffer.isView(t))return wFe(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(ml(t,ArrayBuffer)||t&&ml(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ml(t,SharedArrayBuffer)||t&&ml(t.buffer,SharedArrayBuffer)))return pP(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return ue.from(n,e,r);let i=vFe(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return ue.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}ue.from=function(t,e,r){return Rre(t,e,r)};Object.setPrototypeOf(ue.prototype,Uint8Array.prototype);Object.setPrototypeOf(ue,Uint8Array);function Tre(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function gFe(t,e,r){return Tre(t),t<=0?Uu(t):e!==void 0?typeof r=="string"?Uu(t).fill(e,r):Uu(t).fill(e):Uu(t)}ue.alloc=function(t,e,r){return gFe(t,e,r)};function gP(t){return Tre(t),Uu(t<0?0:yP(t)|0)}ue.allocUnsafe=function(t){return gP(t)};ue.allocUnsafeSlow=function(t){return gP(t)};function yFe(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!ue.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Nre(t,e)|0,n=Uu(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function hP(t){let e=t.length<0?0:yP(t.length)|0,r=Uu(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function wFe(t){if(ml(t,Uint8Array)){let e=new Uint8Array(t);return pP(e.buffer,e.byteOffset,e.byteLength)}return hP(t)}function pP(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,ue.prototype),n}function vFe(t){if(ue.isBuffer(t)){let e=yP(t.length)|0,r=Uu(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||vP(t.length)?Uu(0):hP(t);if(t.type==="Buffer"&&Array.isArray(t.data))return hP(t.data)}function yP(t){if(t>=I8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I8.toString(16)+" bytes");return t|0}function bFe(t){return+t!=t&&(t=0),ue.alloc(+t)}ue.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==ue.prototype};ue.compare=function(e,r){if(ml(e,Uint8Array)&&(e=ue.from(e,e.offset,e.byteLength)),ml(r,Uint8Array)&&(r=ue.from(r,r.offset,r.byteLength)),!ue.isBuffer(e)||!ue.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==r[s]){n=e[s],i=r[s];break}return n<i?-1:i<n?1:0};ue.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};ue.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return ue.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=ue.allocUnsafe(r),s=0;for(n=0;n<e.length;++n){let o=e[n];if(ml(o,Uint8Array))s+o.length>i.length?(ue.isBuffer(o)||(o=ue.from(o)),o.copy(i,s)):Uint8Array.prototype.set.call(i,o,s);else if(ue.isBuffer(o))o.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=o.length}return i};function Nre(t,e){if(ue.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||ml(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return mP(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return jre(t).length;default:if(i)return n?-1:mP(t).length;e=(""+e).toLowerCase(),i=!0}}ue.byteLength=Nre;function EFe(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return NFe(this,e,r);case"utf8":case"utf-8":return Mre(this,e,r);case"ascii":return RFe(this,e,r);case"latin1":case"binary":return TFe(this,e,r);case"base64":return SFe(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return OFe(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}ue.prototype._isBuffer=!0;function Np(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}ue.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)Np(this,r,r+1);return this};ue.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)Np(this,r,r+3),Np(this,r+1,r+2);return this};ue.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)Np(this,r,r+7),Np(this,r+1,r+6),Np(this,r+2,r+5),Np(this,r+3,r+4);return this};ue.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Mre(this,0,e):EFe.apply(this,arguments)};ue.prototype.toLocaleString=ue.prototype.toString;ue.prototype.equals=function(e){if(!ue.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:ue.compare(this,e)===0};ue.prototype.inspect=function(){let e="",r=Q0.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};Ire&&(ue.prototype[Ire]=ue.prototype.inspect);ue.prototype.compare=function(e,r,n,i,s){if(ml(e,Uint8Array)&&(e=ue.from(e,e.offset,e.byteLength)),!ue.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),r<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;let o=s-i,a=n-r,c=Math.min(o,a),u=this.slice(i,s),d=e.slice(r,n);for(let h=0;h<c;++h)if(u[h]!==d[h]){o=u[h],a=d[h];break}return o<a?-1:a<o?1:0};function Ore(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,vP(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=ue.from(e,n)),ue.isBuffer(e))return e.length===0?-1:Are(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Are(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Are(t,e,r,n,i){let s=1,o=t.length,a=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;s=2,o/=2,a/=2,r/=2}function c(d,h){return s===1?d[h]:d.readUInt16BE(h*s)}let u;if(i){let d=-1;for(u=r;u<o;u++)if(c(t,u)===c(e,d===-1?0:u-d)){if(d===-1&&(d=u),u-d+1===a)return d*s}else d!==-1&&(u-=u-d),d=-1}else for(r+a>o&&(r=o-a),u=r;u>=0;u--){let d=!0;for(let h=0;h<a;h++)if(c(t,u+h)!==c(e,h)){d=!1;break}if(d)return u}return-1}ue.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};ue.prototype.indexOf=function(e,r,n){return Ore(this,e,r,n,!0)};ue.prototype.lastIndexOf=function(e,r,n){return Ore(this,e,r,n,!1)};function _Fe(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let s=e.length;n>s/2&&(n=s/2);let o;for(o=0;o<n;++o){let a=parseInt(e.substr(o*2,2),16);if(vP(a))return o;t[r+o]=a}return o}function CFe(t,e,r,n){return A8(mP(e,t.length-r),t,r,n)}function xFe(t,e,r,n){return A8(LFe(e),t,r,n)}function IFe(t,e,r,n){return A8(jre(e),t,r,n)}function AFe(t,e,r,n){return A8(FFe(e,t.length-r),t,r,n)}ue.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-r;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return _Fe(this,e,r,n);case"utf8":case"utf-8":return CFe(this,e,r,n);case"ascii":case"latin1":case"binary":return xFe(this,e,r,n);case"base64":return IFe(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return AFe(this,e,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ue.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function SFe(t,e,r){return e===0&&r===t.length?dP.fromByteArray(t):dP.fromByteArray(t.slice(e,r))}function Mre(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){let c,u,d,h;switch(a){case 1:s<128&&(o=s);break;case 2:c=t[i+1],(c&192)===128&&(h=(s&31)<<6|c&63,h>127&&(o=h));break;case 3:c=t[i+1],u=t[i+2],(c&192)===128&&(u&192)===128&&(h=(s&15)<<12|(c&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:c=t[i+1],u=t[i+2],d=t[i+3],(c&192)===128&&(u&192)===128&&(d&192)===128&&(h=(s&15)<<18|(c&63)<<12|(u&63)<<6|d&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=a}return DFe(n)}var Sre=4096;function DFe(t){let e=t.length;if(e<=Sre)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Sre));return r}function RFe(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function TFe(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function NFe(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let s=e;s<r;++s)i+=BFe[t[s]];return i}function OFe(t,e,r){let n=t.slice(e,r),i="";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}ue.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,ue.prototype),i};function Zi(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}ue.prototype.readUintLE=ue.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Zi(e,r,this.length);let i=this[e],s=1,o=0;for(;++o<r&&(s*=256);)i+=this[e+o]*s;return i};ue.prototype.readUintBE=ue.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Zi(e,r,this.length);let i=this[e+--r],s=1;for(;r>0&&(s*=256);)i+=this[e+--r]*s;return i};ue.prototype.readUint8=ue.prototype.readUInt8=function(e,r){return e=e>>>0,r||Zi(e,1,this.length),this[e]};ue.prototype.readUint16LE=ue.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Zi(e,2,this.length),this[e]|this[e+1]<<8};ue.prototype.readUint16BE=ue.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Zi(e,2,this.length),this[e]<<8|this[e+1]};ue.prototype.readUint32LE=ue.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Zi(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};ue.prototype.readUint32BE=ue.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Zi(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};ue.prototype.readBigUInt64LE=Ad(function(e){e=e>>>0,Y0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&A2(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,s=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))});ue.prototype.readBigUInt64BE=Ad(function(e){e=e>>>0,Y0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&A2(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],s=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(s)});ue.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Zi(e,r,this.length);let i=this[e],s=1,o=0;for(;++o<r&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*r)),i};ue.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Zi(e,r,this.length);let i=r,s=1,o=this[e+--i];for(;i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*r)),o};ue.prototype.readInt8=function(e,r){return e=e>>>0,r||Zi(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};ue.prototype.readInt16LE=function(e,r){e=e>>>0,r||Zi(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};ue.prototype.readInt16BE=function(e,r){e=e>>>0,r||Zi(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};ue.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Zi(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};ue.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Zi(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};ue.prototype.readBigInt64LE=Ad(function(e){e=e>>>0,Y0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&A2(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});ue.prototype.readBigInt64BE=Ad(function(e){e=e>>>0,Y0(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&A2(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});ue.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Zi(e,4,this.length),J0.read(this,e,!0,23,4)};ue.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Zi(e,4,this.length),J0.read(this,e,!1,23,4)};ue.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Zi(e,8,this.length),J0.read(this,e,!0,52,8)};ue.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Zi(e,8,this.length),J0.read(this,e,!1,52,8)};function Co(t,e,r,n,i,s){if(!ue.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}ue.prototype.writeUintLE=ue.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;Co(this,e,r,n,a,0)}let s=1,o=0;for(this[r]=e&255;++o<n&&(s*=256);)this[r+o]=e/s&255;return r+n};ue.prototype.writeUintBE=ue.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;Co(this,e,r,n,a,0)}let s=n-1,o=1;for(this[r+s]=e&255;--s>=0&&(o*=256);)this[r+s]=e/o&255;return r+n};ue.prototype.writeUint8=ue.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,1,255,0),this[r]=e&255,r+1};ue.prototype.writeUint16LE=ue.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};ue.prototype.writeUint16BE=ue.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};ue.prototype.writeUint32LE=ue.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};ue.prototype.writeUint32BE=ue.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Pre(t,e,r,n,i){Ure(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,r}function kre(t,e,r,n,i){Ure(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s=s>>8,t[r+6]=s,s=s>>8,t[r+5]=s,s=s>>8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o=o>>8,t[r+2]=o,o=o>>8,t[r+1]=o,o=o>>8,t[r]=o,r+8}ue.prototype.writeBigUInt64LE=Ad(function(e,r=0){return Pre(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});ue.prototype.writeBigUInt64BE=Ad(function(e,r=0){return kre(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});ue.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Co(this,e,r,n,c-1,-c)}let s=0,o=1,a=0;for(this[r]=e&255;++s<n&&(o*=256);)e<0&&a===0&&this[r+s-1]!==0&&(a=1),this[r+s]=(e/o>>0)-a&255;return r+n};ue.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Co(this,e,r,n,c-1,-c)}let s=n-1,o=1,a=0;for(this[r+s]=e&255;--s>=0&&(o*=256);)e<0&&a===0&&this[r+s+1]!==0&&(a=1),this[r+s]=(e/o>>0)-a&255;return r+n};ue.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};ue.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};ue.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};ue.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};ue.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||Co(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};ue.prototype.writeBigInt64LE=Ad(function(e,r=0){return Pre(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ue.prototype.writeBigInt64BE=Ad(function(e,r=0){return kre(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Lre(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Fre(t,e,r,n,i){return e=+e,r=r>>>0,i||Lre(t,e,r,4,34028234663852886e22,-34028234663852886e22),J0.write(t,e,r,n,23,4),r+4}ue.prototype.writeFloatLE=function(e,r,n){return Fre(this,e,r,!0,n)};ue.prototype.writeFloatBE=function(e,r,n){return Fre(this,e,r,!1,n)};function Bre(t,e,r,n,i){return e=+e,r=r>>>0,i||Lre(t,e,r,8,17976931348623157e292,-17976931348623157e292),J0.write(t,e,r,n,52,8),r+8}ue.prototype.writeDoubleLE=function(e,r,n){return Bre(this,e,r,!0,n)};ue.prototype.writeDoubleBE=function(e,r,n){return Bre(this,e,r,!1,n)};ue.prototype.copy=function(e,r,n,i){if(!ue.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);let s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),s};ue.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!ue.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let o=e.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(e=o)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let s;if(typeof e=="number")for(s=r;s<n;++s)this[s]=e;else{let o=ue.isBuffer(e)?e:ue.from(e,i),a=o.length;if(a===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-r;++s)this[s+r]=o[s%a]}return this};var K0={};function wP(t,e,r){K0[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}wP("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);wP("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);wP("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Dre(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Dre(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Dre(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function MFe(t,e,r){Y0(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&A2(e,t.length-(r+1))}function Ure(t,e,r,n,i,s){if(t>r||t<e){let o=typeof e=="bigint"?"n":"",a;throw s>3?e===0||e===BigInt(0)?a=`>= 0${o} and < 2${o} ** ${(s+1)*8}${o}`:a=`>= -(2${o} ** ${(s+1)*8-1}${o}) and < 2 ** ${(s+1)*8-1}${o}`:a=`>= ${e}${o} and <= ${r}${o}`,new K0.ERR_OUT_OF_RANGE("value",a,t)}MFe(n,i,s)}function Y0(t,e){if(typeof t!="number")throw new K0.ERR_INVALID_ARG_TYPE(e,"number",t)}function A2(t,e,r){throw Math.floor(t)!==t?(Y0(t,r),new K0.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new K0.ERR_BUFFER_OUT_OF_BOUNDS:new K0.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var PFe=/[^+/0-9A-Za-z-_]/g;function kFe(t){if(t=t.split("=")[0],t=t.trim().replace(PFe,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function mP(t,e){e=e||1/0;let r,n=t.length,i=null,s=[];for(let o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function LFe(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function FFe(t,e){let r,n,i,s=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function jre(t){return dP.toByteArray(kFe(t))}function A8(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function ml(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function vP(t){return t!==t}var BFe=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Ad(t){return typeof BigInt>"u"?UFe:t}function UFe(){throw new Error("BigInt not supported")}});var S2=F((Vre,bP)=>{"use strict";(function(t,e){"use strict";function r(D,g){if(!D)throw new Error(g||"Assertion failed")}function n(D,g){D.super_=g;var v=function(){};v.prototype=g.prototype,D.prototype=new v,D.prototype.constructor=D}function i(D,g,v){if(i.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((g==="le"||g==="be")&&(v=g,g=10),this._init(D||0,g||10,v||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var s;try{typeof window<"u"&&typeof window.Buffer<"u"?s=window.Buffer:s=Hre().Buffer}catch{}i.isBN=function(g){return g instanceof i?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===i.wordSize&&Array.isArray(g.words)},i.max=function(g,v){return g.cmp(v)>0?g:v},i.min=function(g,v){return g.cmp(v)<0?g:v},i.prototype._init=function(g,v,x){if(typeof g=="number")return this._initNumber(g,v,x);if(typeof g=="object")return this._initArray(g,v,x);v==="hex"&&(v=16),r(v===(v|0)&&v>=2&&v<=36),g=g.toString().replace(/\s+/g,"");var I=0;g[0]==="-"&&(I++,this.negative=1),I<g.length&&(v===16?this._parseHex(g,I,x):(this._parseBase(g,v,I),x==="le"&&this._initArray(this.toArray(),v,x)))},i.prototype._initNumber=function(g,v,x){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),x==="le"&&this._initArray(this.toArray(),v,x)},i.prototype._initArray=function(g,v,x){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var T,H,$=0;if(x==="be")for(I=g.length-1,T=0;I>=0;I-=3)H=g[I]|g[I-1]<<8|g[I-2]<<16,this.words[T]|=H<<$&67108863,this.words[T+1]=H>>>26-$&67108863,$+=24,$>=26&&($-=26,T++);else if(x==="le")for(I=0,T=0;I<g.length;I+=3)H=g[I]|g[I+1]<<8|g[I+2]<<16,this.words[T]|=H<<$&67108863,this.words[T+1]=H>>>26-$&67108863,$+=24,$>=26&&($-=26,T++);return this._strip()};function o(D,g){var v=D.charCodeAt(g);if(v>=48&&v<=57)return v-48;if(v>=65&&v<=70)return v-55;if(v>=97&&v<=102)return v-87;r(!1,"Invalid character in "+D)}function a(D,g,v){var x=o(D,v);return v-1>=g&&(x|=o(D,v-1)<<4),x}i.prototype._parseHex=function(g,v,x){this.length=Math.ceil((g.length-v)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var T=0,H=0,$;if(x==="be")for(I=g.length-1;I>=v;I-=2)$=a(g,v,I)<<T,this.words[H]|=$&67108863,T>=18?(T-=18,H+=1,this.words[H]|=$>>>26):T+=8;else{var N=g.length-v;for(I=N%2===0?v+1:v;I<g.length;I+=2)$=a(g,v,I)<<T,this.words[H]|=$&67108863,T>=18?(T-=18,H+=1,this.words[H]|=$>>>26):T+=8}this._strip()};function c(D,g,v,x){for(var I=0,T=0,H=Math.min(D.length,v),$=g;$<H;$++){var N=D.charCodeAt($)-48;I*=x,N>=49?T=N-49+10:N>=17?T=N-17+10:T=N,r(N>=0&&T<x,"Invalid character"),I+=T}return I}i.prototype._parseBase=function(g,v,x){this.words=[0],this.length=1;for(var I=0,T=1;T<=67108863;T*=v)I++;I--,T=T/v|0;for(var H=g.length-x,$=H%I,N=Math.min(H,H-$)+x,E=0,P=x;P<N;P+=I)E=c(g,P,P+I,v),this.imuln(T),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if($!==0){var ae=1;for(E=c(g,P,g.length,v),P=0;P<$;P++)ae*=v;this.imuln(ae),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},i.prototype.copy=function(g){g.words=new Array(this.length);for(var v=0;v<this.length;v++)g.words[v]=this.words[v];g.length=this.length,g.negative=this.negative,g.red=this.red};function u(D,g){D.words=g.words,D.length=g.length,D.negative=g.negative,D.red=g.red}if(i.prototype._move=function(g){u(g,this)},i.prototype.clone=function(){var g=new i(null);return this.copy(g),g},i.prototype._expand=function(g){for(;this.length<g;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],m=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(g,v){g=g||10,v=v|0||1;var x;if(g===16||g==="hex"){x="";for(var I=0,T=0,H=0;H<this.length;H++){var $=this.words[H],N=(($<<I|T)&16777215).toString(16);T=$>>>24-I&16777215,I+=2,I>=26&&(I-=26,H--),T!==0||H!==this.length-1?x=h[6-N.length]+N+x:x=N+x}for(T!==0&&(x=T.toString(16)+x);x.length%v!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(g===(g|0)&&g>=2&&g<=36){var E=m[g],P=w[g];x="";var ae=this.clone();for(ae.negative=0;!ae.isZero();){var ce=ae.modrn(P).toString(g);ae=ae.idivn(P),ae.isZero()?x=ce+x:x=h[E-ce.length]+ce+x}for(this.isZero()&&(x="0"+x);x.length%v!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(g,v){return this.toArrayLike(s,g,v)}),i.prototype.toArray=function(g,v){return this.toArrayLike(Array,g,v)};var _=function(g,v){return g.allocUnsafe?g.allocUnsafe(v):new g(v)};i.prototype.toArrayLike=function(g,v,x){this._strip();var I=this.byteLength(),T=x||Math.max(1,I);r(I<=T,"byte array longer than desired length"),r(T>0,"Requested array length <= 0");var H=_(g,T),$=v==="le"?"LE":"BE";return this["_toArrayLike"+$](H,I),H},i.prototype._toArrayLikeLE=function(g,v){for(var x=0,I=0,T=0,H=0;T<this.length;T++){var $=this.words[T]<<H|I;g[x++]=$&255,x<g.length&&(g[x++]=$>>8&255),x<g.length&&(g[x++]=$>>16&255),H===6?(x<g.length&&(g[x++]=$>>24&255),I=0,H=0):(I=$>>>24,H+=2)}if(x<g.length)for(g[x++]=I;x<g.length;)g[x++]=0},i.prototype._toArrayLikeBE=function(g,v){for(var x=g.length-1,I=0,T=0,H=0;T<this.length;T++){var $=this.words[T]<<H|I;g[x--]=$&255,x>=0&&(g[x--]=$>>8&255),x>=0&&(g[x--]=$>>16&255),H===6?(x>=0&&(g[x--]=$>>24&255),I=0,H=0):(I=$>>>24,H+=2)}if(x>=0)for(g[x--]=I;x>=0;)g[x--]=0},Math.clz32?i.prototype._countBits=function(g){return 32-Math.clz32(g)}:i.prototype._countBits=function(g){var v=g,x=0;return v>=4096&&(x+=13,v>>>=13),v>=64&&(x+=7,v>>>=7),v>=8&&(x+=4,v>>>=4),v>=2&&(x+=2,v>>>=2),x+v},i.prototype._zeroBits=function(g){if(g===0)return 26;var v=g,x=0;return v&8191||(x+=13,v>>>=13),v&127||(x+=7,v>>>=7),v&15||(x+=4,v>>>=4),v&3||(x+=2,v>>>=2),v&1||x++,x},i.prototype.bitLength=function(){var g=this.words[this.length-1],v=this._countBits(g);return(this.length-1)*26+v};function C(D){for(var g=new Array(D.bitLength()),v=0;v<g.length;v++){var x=v/26|0,I=v%26;g[v]=D.words[x]>>>I&1}return g}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,v=0;v<this.length;v++){var x=this._zeroBits(this.words[v]);if(g+=x,x!==26)break}return g},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},i.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var v=0;v<g.length;v++)this.words[v]=this.words[v]|g.words[v];return this._strip()},i.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},i.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},i.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},i.prototype.iuand=function(g){var v;this.length>g.length?v=g:v=this;for(var x=0;x<v.length;x++)this.words[x]=this.words[x]&g.words[x];return this.length=v.length,this._strip()},i.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},i.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},i.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},i.prototype.iuxor=function(g){var v,x;this.length>g.length?(v=this,x=g):(v=g,x=this);for(var I=0;I<x.length;I++)this.words[I]=v.words[I]^x.words[I];if(this!==v)for(;I<v.length;I++)this.words[I]=v.words[I];return this.length=v.length,this._strip()},i.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},i.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},i.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},i.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var v=Math.ceil(g/26)|0,x=g%26;this._expand(v),x>0&&v--;for(var I=0;I<v;I++)this.words[I]=~this.words[I]&67108863;return x>0&&(this.words[I]=~this.words[I]&67108863>>26-x),this._strip()},i.prototype.notn=function(g){return this.clone().inotn(g)},i.prototype.setn=function(g,v){r(typeof g=="number"&&g>=0);var x=g/26|0,I=g%26;return this._expand(x+1),v?this.words[x]=this.words[x]|1<<I:this.words[x]=this.words[x]&~(1<<I),this._strip()},i.prototype.iadd=function(g){var v;if(this.negative!==0&&g.negative===0)return this.negative=0,v=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,v=this.isub(g),g.negative=1,v._normSign();var x,I;this.length>g.length?(x=this,I=g):(x=g,I=this);for(var T=0,H=0;H<I.length;H++)v=(x.words[H]|0)+(I.words[H]|0)+T,this.words[H]=v&67108863,T=v>>>26;for(;T!==0&&H<x.length;H++)v=(x.words[H]|0)+T,this.words[H]=v&67108863,T=v>>>26;if(this.length=x.length,T!==0)this.words[this.length]=T,this.length++;else if(x!==this)for(;H<x.length;H++)this.words[H]=x.words[H];return this},i.prototype.add=function(g){var v;return g.negative!==0&&this.negative===0?(g.negative=0,v=this.sub(g),g.negative^=1,v):g.negative===0&&this.negative!==0?(this.negative=0,v=g.sub(this),this.negative=1,v):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},i.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var v=this.iadd(g);return g.negative=1,v._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var x=this.cmp(g);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,T;x>0?(I=this,T=g):(I=g,T=this);for(var H=0,$=0;$<T.length;$++)v=(I.words[$]|0)-(T.words[$]|0)+H,H=v>>26,this.words[$]=v&67108863;for(;H!==0&&$<I.length;$++)v=(I.words[$]|0)+H,H=v>>26,this.words[$]=v&67108863;if(H===0&&$<I.length&&I!==this)for(;$<I.length;$++)this.words[$]=I.words[$];return this.length=Math.max(this.length,$),I!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(g){return this.clone().isub(g)};function A(D,g,v){v.negative=g.negative^D.negative;var x=D.length+g.length|0;v.length=x,x=x-1|0;var I=D.words[0]|0,T=g.words[0]|0,H=I*T,$=H&67108863,N=H/67108864|0;v.words[0]=$;for(var E=1;E<x;E++){for(var P=N>>>26,ae=N&67108863,ce=Math.min(E,g.length-1),se=Math.max(0,E-D.length+1);se<=ce;se++){var pe=E-se|0;I=D.words[pe]|0,T=g.words[se]|0,H=I*T+ae,P+=H/67108864|0,ae=H&67108863}v.words[E]=ae|0,N=P|0}return N!==0?v.words[E]=N|0:v.length--,v._strip()}var R=function(g,v,x){var I=g.words,T=v.words,H=x.words,$=0,N,E,P,ae=I[0]|0,ce=ae&8191,se=ae>>>13,pe=I[1]|0,De=pe&8191,Te=pe>>>13,st=I[2]|0,Ue=st&8191,Oe=st>>>13,_t=I[3]|0,Fe=_t&8191,Ye=_t>>>13,Dc=I[4]|0,yr=Dc&8191,dn=Dc>>>13,Kd=I[5]|0,Br=Kd&8191,hr=Kd>>>13,Ga=I[6]|0,$r=Ga&8191,Nn=Ga>>>13,Za=I[7]|0,On=Za&8191,Ur=Za>>>13,Do=I[8]|0,qr=Do&8191,Wr=Do>>>13,Rc=I[9]|0,zr=Rc&8191,Gr=Rc>>>13,Tc=T[0]|0,Zr=Tc&8191,Kr=Tc>>>13,Nc=T[1]|0,hn=Nc&8191,pn=Nc>>>13,Yu=T[2]|0,tn=Yu&8191,rn=Yu>>>13,Qu=T[3]|0,mn=Qu&8191,gn=Qu>>>13,Xu=T[4]|0,nn=Xu&8191,yn=Xu>>>13,ef=T[5]|0,wn=ef&8191,Jr=ef>>>13,tf=T[6]|0,Yr=tf&8191,vn=tf>>>13,rf=T[7]|0,bn=rf&8191,En=rf>>>13,nf=T[8]|0,_n=nf&8191,Cn=nf>>>13,sf=T[9]|0,sn=sf&8191,xn=sf>>>13;x.negative=g.negative^v.negative,x.length=19,N=Math.imul(ce,Zr),E=Math.imul(ce,Kr),E=E+Math.imul(se,Zr)|0,P=Math.imul(se,Kr);var Nl=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Nl>>>26)|0,Nl&=67108863,N=Math.imul(De,Zr),E=Math.imul(De,Kr),E=E+Math.imul(Te,Zr)|0,P=Math.imul(Te,Kr),N=N+Math.imul(ce,hn)|0,E=E+Math.imul(ce,pn)|0,E=E+Math.imul(se,hn)|0,P=P+Math.imul(se,pn)|0;var Ol=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Ol>>>26)|0,Ol&=67108863,N=Math.imul(Ue,Zr),E=Math.imul(Ue,Kr),E=E+Math.imul(Oe,Zr)|0,P=Math.imul(Oe,Kr),N=N+Math.imul(De,hn)|0,E=E+Math.imul(De,pn)|0,E=E+Math.imul(Te,hn)|0,P=P+Math.imul(Te,pn)|0,N=N+Math.imul(ce,tn)|0,E=E+Math.imul(ce,rn)|0,E=E+Math.imul(se,tn)|0,P=P+Math.imul(se,rn)|0;var Ml=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Ml>>>26)|0,Ml&=67108863,N=Math.imul(Fe,Zr),E=Math.imul(Fe,Kr),E=E+Math.imul(Ye,Zr)|0,P=Math.imul(Ye,Kr),N=N+Math.imul(Ue,hn)|0,E=E+Math.imul(Ue,pn)|0,E=E+Math.imul(Oe,hn)|0,P=P+Math.imul(Oe,pn)|0,N=N+Math.imul(De,tn)|0,E=E+Math.imul(De,rn)|0,E=E+Math.imul(Te,tn)|0,P=P+Math.imul(Te,rn)|0,N=N+Math.imul(ce,mn)|0,E=E+Math.imul(ce,gn)|0,E=E+Math.imul(se,mn)|0,P=P+Math.imul(se,gn)|0;var Pl=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Pl>>>26)|0,Pl&=67108863,N=Math.imul(yr,Zr),E=Math.imul(yr,Kr),E=E+Math.imul(dn,Zr)|0,P=Math.imul(dn,Kr),N=N+Math.imul(Fe,hn)|0,E=E+Math.imul(Fe,pn)|0,E=E+Math.imul(Ye,hn)|0,P=P+Math.imul(Ye,pn)|0,N=N+Math.imul(Ue,tn)|0,E=E+Math.imul(Ue,rn)|0,E=E+Math.imul(Oe,tn)|0,P=P+Math.imul(Oe,rn)|0,N=N+Math.imul(De,mn)|0,E=E+Math.imul(De,gn)|0,E=E+Math.imul(Te,mn)|0,P=P+Math.imul(Te,gn)|0,N=N+Math.imul(ce,nn)|0,E=E+Math.imul(ce,yn)|0,E=E+Math.imul(se,nn)|0,P=P+Math.imul(se,yn)|0;var kl=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(kl>>>26)|0,kl&=67108863,N=Math.imul(Br,Zr),E=Math.imul(Br,Kr),E=E+Math.imul(hr,Zr)|0,P=Math.imul(hr,Kr),N=N+Math.imul(yr,hn)|0,E=E+Math.imul(yr,pn)|0,E=E+Math.imul(dn,hn)|0,P=P+Math.imul(dn,pn)|0,N=N+Math.imul(Fe,tn)|0,E=E+Math.imul(Fe,rn)|0,E=E+Math.imul(Ye,tn)|0,P=P+Math.imul(Ye,rn)|0,N=N+Math.imul(Ue,mn)|0,E=E+Math.imul(Ue,gn)|0,E=E+Math.imul(Oe,mn)|0,P=P+Math.imul(Oe,gn)|0,N=N+Math.imul(De,nn)|0,E=E+Math.imul(De,yn)|0,E=E+Math.imul(Te,nn)|0,P=P+Math.imul(Te,yn)|0,N=N+Math.imul(ce,wn)|0,E=E+Math.imul(ce,Jr)|0,E=E+Math.imul(se,wn)|0,P=P+Math.imul(se,Jr)|0;var sa=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(sa>>>26)|0,sa&=67108863,N=Math.imul($r,Zr),E=Math.imul($r,Kr),E=E+Math.imul(Nn,Zr)|0,P=Math.imul(Nn,Kr),N=N+Math.imul(Br,hn)|0,E=E+Math.imul(Br,pn)|0,E=E+Math.imul(hr,hn)|0,P=P+Math.imul(hr,pn)|0,N=N+Math.imul(yr,tn)|0,E=E+Math.imul(yr,rn)|0,E=E+Math.imul(dn,tn)|0,P=P+Math.imul(dn,rn)|0,N=N+Math.imul(Fe,mn)|0,E=E+Math.imul(Fe,gn)|0,E=E+Math.imul(Ye,mn)|0,P=P+Math.imul(Ye,gn)|0,N=N+Math.imul(Ue,nn)|0,E=E+Math.imul(Ue,yn)|0,E=E+Math.imul(Oe,nn)|0,P=P+Math.imul(Oe,yn)|0,N=N+Math.imul(De,wn)|0,E=E+Math.imul(De,Jr)|0,E=E+Math.imul(Te,wn)|0,P=P+Math.imul(Te,Jr)|0,N=N+Math.imul(ce,Yr)|0,E=E+Math.imul(ce,vn)|0,E=E+Math.imul(se,Yr)|0,P=P+Math.imul(se,vn)|0;var Ll=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Ll>>>26)|0,Ll&=67108863,N=Math.imul(On,Zr),E=Math.imul(On,Kr),E=E+Math.imul(Ur,Zr)|0,P=Math.imul(Ur,Kr),N=N+Math.imul($r,hn)|0,E=E+Math.imul($r,pn)|0,E=E+Math.imul(Nn,hn)|0,P=P+Math.imul(Nn,pn)|0,N=N+Math.imul(Br,tn)|0,E=E+Math.imul(Br,rn)|0,E=E+Math.imul(hr,tn)|0,P=P+Math.imul(hr,rn)|0,N=N+Math.imul(yr,mn)|0,E=E+Math.imul(yr,gn)|0,E=E+Math.imul(dn,mn)|0,P=P+Math.imul(dn,gn)|0,N=N+Math.imul(Fe,nn)|0,E=E+Math.imul(Fe,yn)|0,E=E+Math.imul(Ye,nn)|0,P=P+Math.imul(Ye,yn)|0,N=N+Math.imul(Ue,wn)|0,E=E+Math.imul(Ue,Jr)|0,E=E+Math.imul(Oe,wn)|0,P=P+Math.imul(Oe,Jr)|0,N=N+Math.imul(De,Yr)|0,E=E+Math.imul(De,vn)|0,E=E+Math.imul(Te,Yr)|0,P=P+Math.imul(Te,vn)|0,N=N+Math.imul(ce,bn)|0,E=E+Math.imul(ce,En)|0,E=E+Math.imul(se,bn)|0,P=P+Math.imul(se,En)|0;var oa=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(oa>>>26)|0,oa&=67108863,N=Math.imul(qr,Zr),E=Math.imul(qr,Kr),E=E+Math.imul(Wr,Zr)|0,P=Math.imul(Wr,Kr),N=N+Math.imul(On,hn)|0,E=E+Math.imul(On,pn)|0,E=E+Math.imul(Ur,hn)|0,P=P+Math.imul(Ur,pn)|0,N=N+Math.imul($r,tn)|0,E=E+Math.imul($r,rn)|0,E=E+Math.imul(Nn,tn)|0,P=P+Math.imul(Nn,rn)|0,N=N+Math.imul(Br,mn)|0,E=E+Math.imul(Br,gn)|0,E=E+Math.imul(hr,mn)|0,P=P+Math.imul(hr,gn)|0,N=N+Math.imul(yr,nn)|0,E=E+Math.imul(yr,yn)|0,E=E+Math.imul(dn,nn)|0,P=P+Math.imul(dn,yn)|0,N=N+Math.imul(Fe,wn)|0,E=E+Math.imul(Fe,Jr)|0,E=E+Math.imul(Ye,wn)|0,P=P+Math.imul(Ye,Jr)|0,N=N+Math.imul(Ue,Yr)|0,E=E+Math.imul(Ue,vn)|0,E=E+Math.imul(Oe,Yr)|0,P=P+Math.imul(Oe,vn)|0,N=N+Math.imul(De,bn)|0,E=E+Math.imul(De,En)|0,E=E+Math.imul(Te,bn)|0,P=P+Math.imul(Te,En)|0,N=N+Math.imul(ce,_n)|0,E=E+Math.imul(ce,Cn)|0,E=E+Math.imul(se,_n)|0,P=P+Math.imul(se,Cn)|0;var Fl=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Fl>>>26)|0,Fl&=67108863,N=Math.imul(zr,Zr),E=Math.imul(zr,Kr),E=E+Math.imul(Gr,Zr)|0,P=Math.imul(Gr,Kr),N=N+Math.imul(qr,hn)|0,E=E+Math.imul(qr,pn)|0,E=E+Math.imul(Wr,hn)|0,P=P+Math.imul(Wr,pn)|0,N=N+Math.imul(On,tn)|0,E=E+Math.imul(On,rn)|0,E=E+Math.imul(Ur,tn)|0,P=P+Math.imul(Ur,rn)|0,N=N+Math.imul($r,mn)|0,E=E+Math.imul($r,gn)|0,E=E+Math.imul(Nn,mn)|0,P=P+Math.imul(Nn,gn)|0,N=N+Math.imul(Br,nn)|0,E=E+Math.imul(Br,yn)|0,E=E+Math.imul(hr,nn)|0,P=P+Math.imul(hr,yn)|0,N=N+Math.imul(yr,wn)|0,E=E+Math.imul(yr,Jr)|0,E=E+Math.imul(dn,wn)|0,P=P+Math.imul(dn,Jr)|0,N=N+Math.imul(Fe,Yr)|0,E=E+Math.imul(Fe,vn)|0,E=E+Math.imul(Ye,Yr)|0,P=P+Math.imul(Ye,vn)|0,N=N+Math.imul(Ue,bn)|0,E=E+Math.imul(Ue,En)|0,E=E+Math.imul(Oe,bn)|0,P=P+Math.imul(Oe,En)|0,N=N+Math.imul(De,_n)|0,E=E+Math.imul(De,Cn)|0,E=E+Math.imul(Te,_n)|0,P=P+Math.imul(Te,Cn)|0,N=N+Math.imul(ce,sn)|0,E=E+Math.imul(ce,xn)|0,E=E+Math.imul(se,sn)|0,P=P+Math.imul(se,xn)|0;var Bl=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Bl>>>26)|0,Bl&=67108863,N=Math.imul(zr,hn),E=Math.imul(zr,pn),E=E+Math.imul(Gr,hn)|0,P=Math.imul(Gr,pn),N=N+Math.imul(qr,tn)|0,E=E+Math.imul(qr,rn)|0,E=E+Math.imul(Wr,tn)|0,P=P+Math.imul(Wr,rn)|0,N=N+Math.imul(On,mn)|0,E=E+Math.imul(On,gn)|0,E=E+Math.imul(Ur,mn)|0,P=P+Math.imul(Ur,gn)|0,N=N+Math.imul($r,nn)|0,E=E+Math.imul($r,yn)|0,E=E+Math.imul(Nn,nn)|0,P=P+Math.imul(Nn,yn)|0,N=N+Math.imul(Br,wn)|0,E=E+Math.imul(Br,Jr)|0,E=E+Math.imul(hr,wn)|0,P=P+Math.imul(hr,Jr)|0,N=N+Math.imul(yr,Yr)|0,E=E+Math.imul(yr,vn)|0,E=E+Math.imul(dn,Yr)|0,P=P+Math.imul(dn,vn)|0,N=N+Math.imul(Fe,bn)|0,E=E+Math.imul(Fe,En)|0,E=E+Math.imul(Ye,bn)|0,P=P+Math.imul(Ye,En)|0,N=N+Math.imul(Ue,_n)|0,E=E+Math.imul(Ue,Cn)|0,E=E+Math.imul(Oe,_n)|0,P=P+Math.imul(Oe,Cn)|0,N=N+Math.imul(De,sn)|0,E=E+Math.imul(De,xn)|0,E=E+Math.imul(Te,sn)|0,P=P+Math.imul(Te,xn)|0;var Ul=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Ul>>>26)|0,Ul&=67108863,N=Math.imul(zr,tn),E=Math.imul(zr,rn),E=E+Math.imul(Gr,tn)|0,P=Math.imul(Gr,rn),N=N+Math.imul(qr,mn)|0,E=E+Math.imul(qr,gn)|0,E=E+Math.imul(Wr,mn)|0,P=P+Math.imul(Wr,gn)|0,N=N+Math.imul(On,nn)|0,E=E+Math.imul(On,yn)|0,E=E+Math.imul(Ur,nn)|0,P=P+Math.imul(Ur,yn)|0,N=N+Math.imul($r,wn)|0,E=E+Math.imul($r,Jr)|0,E=E+Math.imul(Nn,wn)|0,P=P+Math.imul(Nn,Jr)|0,N=N+Math.imul(Br,Yr)|0,E=E+Math.imul(Br,vn)|0,E=E+Math.imul(hr,Yr)|0,P=P+Math.imul(hr,vn)|0,N=N+Math.imul(yr,bn)|0,E=E+Math.imul(yr,En)|0,E=E+Math.imul(dn,bn)|0,P=P+Math.imul(dn,En)|0,N=N+Math.imul(Fe,_n)|0,E=E+Math.imul(Fe,Cn)|0,E=E+Math.imul(Ye,_n)|0,P=P+Math.imul(Ye,Cn)|0,N=N+Math.imul(Ue,sn)|0,E=E+Math.imul(Ue,xn)|0,E=E+Math.imul(Oe,sn)|0,P=P+Math.imul(Oe,xn)|0;var Oc=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Oc>>>26)|0,Oc&=67108863,N=Math.imul(zr,mn),E=Math.imul(zr,gn),E=E+Math.imul(Gr,mn)|0,P=Math.imul(Gr,gn),N=N+Math.imul(qr,nn)|0,E=E+Math.imul(qr,yn)|0,E=E+Math.imul(Wr,nn)|0,P=P+Math.imul(Wr,yn)|0,N=N+Math.imul(On,wn)|0,E=E+Math.imul(On,Jr)|0,E=E+Math.imul(Ur,wn)|0,P=P+Math.imul(Ur,Jr)|0,N=N+Math.imul($r,Yr)|0,E=E+Math.imul($r,vn)|0,E=E+Math.imul(Nn,Yr)|0,P=P+Math.imul(Nn,vn)|0,N=N+Math.imul(Br,bn)|0,E=E+Math.imul(Br,En)|0,E=E+Math.imul(hr,bn)|0,P=P+Math.imul(hr,En)|0,N=N+Math.imul(yr,_n)|0,E=E+Math.imul(yr,Cn)|0,E=E+Math.imul(dn,_n)|0,P=P+Math.imul(dn,Cn)|0,N=N+Math.imul(Fe,sn)|0,E=E+Math.imul(Fe,xn)|0,E=E+Math.imul(Ye,sn)|0,P=P+Math.imul(Ye,xn)|0;var Mc=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Mc>>>26)|0,Mc&=67108863,N=Math.imul(zr,nn),E=Math.imul(zr,yn),E=E+Math.imul(Gr,nn)|0,P=Math.imul(Gr,yn),N=N+Math.imul(qr,wn)|0,E=E+Math.imul(qr,Jr)|0,E=E+Math.imul(Wr,wn)|0,P=P+Math.imul(Wr,Jr)|0,N=N+Math.imul(On,Yr)|0,E=E+Math.imul(On,vn)|0,E=E+Math.imul(Ur,Yr)|0,P=P+Math.imul(Ur,vn)|0,N=N+Math.imul($r,bn)|0,E=E+Math.imul($r,En)|0,E=E+Math.imul(Nn,bn)|0,P=P+Math.imul(Nn,En)|0,N=N+Math.imul(Br,_n)|0,E=E+Math.imul(Br,Cn)|0,E=E+Math.imul(hr,_n)|0,P=P+Math.imul(hr,Cn)|0,N=N+Math.imul(yr,sn)|0,E=E+Math.imul(yr,xn)|0,E=E+Math.imul(dn,sn)|0,P=P+Math.imul(dn,xn)|0;var Pc=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(Pc>>>26)|0,Pc&=67108863,N=Math.imul(zr,wn),E=Math.imul(zr,Jr),E=E+Math.imul(Gr,wn)|0,P=Math.imul(Gr,Jr),N=N+Math.imul(qr,Yr)|0,E=E+Math.imul(qr,vn)|0,E=E+Math.imul(Wr,Yr)|0,P=P+Math.imul(Wr,vn)|0,N=N+Math.imul(On,bn)|0,E=E+Math.imul(On,En)|0,E=E+Math.imul(Ur,bn)|0,P=P+Math.imul(Ur,En)|0,N=N+Math.imul($r,_n)|0,E=E+Math.imul($r,Cn)|0,E=E+Math.imul(Nn,_n)|0,P=P+Math.imul(Nn,Cn)|0,N=N+Math.imul(Br,sn)|0,E=E+Math.imul(Br,xn)|0,E=E+Math.imul(hr,sn)|0,P=P+Math.imul(hr,xn)|0;var ay=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(ay>>>26)|0,ay&=67108863,N=Math.imul(zr,Yr),E=Math.imul(zr,vn),E=E+Math.imul(Gr,Yr)|0,P=Math.imul(Gr,vn),N=N+Math.imul(qr,bn)|0,E=E+Math.imul(qr,En)|0,E=E+Math.imul(Wr,bn)|0,P=P+Math.imul(Wr,En)|0,N=N+Math.imul(On,_n)|0,E=E+Math.imul(On,Cn)|0,E=E+Math.imul(Ur,_n)|0,P=P+Math.imul(Ur,Cn)|0,N=N+Math.imul($r,sn)|0,E=E+Math.imul($r,xn)|0,E=E+Math.imul(Nn,sn)|0,P=P+Math.imul(Nn,xn)|0;var cy=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(cy>>>26)|0,cy&=67108863,N=Math.imul(zr,bn),E=Math.imul(zr,En),E=E+Math.imul(Gr,bn)|0,P=Math.imul(Gr,En),N=N+Math.imul(qr,_n)|0,E=E+Math.imul(qr,Cn)|0,E=E+Math.imul(Wr,_n)|0,P=P+Math.imul(Wr,Cn)|0,N=N+Math.imul(On,sn)|0,E=E+Math.imul(On,xn)|0,E=E+Math.imul(Ur,sn)|0,P=P+Math.imul(Ur,xn)|0;var ly=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(ly>>>26)|0,ly&=67108863,N=Math.imul(zr,_n),E=Math.imul(zr,Cn),E=E+Math.imul(Gr,_n)|0,P=Math.imul(Gr,Cn),N=N+Math.imul(qr,sn)|0,E=E+Math.imul(qr,xn)|0,E=E+Math.imul(Wr,sn)|0,P=P+Math.imul(Wr,xn)|0;var uy=($+N|0)+((E&8191)<<13)|0;$=(P+(E>>>13)|0)+(uy>>>26)|0,uy&=67108863,N=Math.imul(zr,sn),E=Math.imul(zr,xn),E=E+Math.imul(Gr,sn)|0,P=Math.imul(Gr,xn);var hm=($+N|0)+((E&8191)<<13)|0;return $=(P+(E>>>13)|0)+(hm>>>26)|0,hm&=67108863,H[0]=Nl,H[1]=Ol,H[2]=Ml,H[3]=Pl,H[4]=kl,H[5]=sa,H[6]=Ll,H[7]=oa,H[8]=Fl,H[9]=Bl,H[10]=Ul,H[11]=Oc,H[12]=Mc,H[13]=Pc,H[14]=ay,H[15]=cy,H[16]=ly,H[17]=uy,H[18]=hm,$!==0&&(H[19]=$,x.length++),x};Math.imul||(R=A);function L(D,g,v){v.negative=g.negative^D.negative,v.length=D.length+g.length;for(var x=0,I=0,T=0;T<v.length-1;T++){var H=I;I=0;for(var $=x&67108863,N=Math.min(T,g.length-1),E=Math.max(0,T-D.length+1);E<=N;E++){var P=T-E,ae=D.words[P]|0,ce=g.words[E]|0,se=ae*ce,pe=se&67108863;H=H+(se/67108864|0)|0,pe=pe+$|0,$=pe&67108863,H=H+(pe>>>26)|0,I+=H>>>26,H&=67108863}v.words[T]=$,x=H,H=I}return x!==0?v.words[T]=x:v.length--,v._strip()}function U(D,g,v){return L(D,g,v)}i.prototype.mulTo=function(g,v){var x,I=this.length+g.length;return this.length===10&&g.length===10?x=R(this,g,v):I<63?x=A(this,g,v):I<1024?x=L(this,g,v):x=U(this,g,v),x};function V(D,g){this.x=D,this.y=g}V.prototype.makeRBT=function(g){for(var v=new Array(g),x=i.prototype._countBits(g)-1,I=0;I<g;I++)v[I]=this.revBin(I,x,g);return v},V.prototype.revBin=function(g,v,x){if(g===0||g===x-1)return g;for(var I=0,T=0;T<v;T++)I|=(g&1)<<v-T-1,g>>=1;return I},V.prototype.permute=function(g,v,x,I,T,H){for(var $=0;$<H;$++)I[$]=v[g[$]],T[$]=x[g[$]]},V.prototype.transform=function(g,v,x,I,T,H){this.permute(H,g,v,x,I,T);for(var $=1;$<T;$<<=1)for(var N=$<<1,E=Math.cos(2*Math.PI/N),P=Math.sin(2*Math.PI/N),ae=0;ae<T;ae+=N)for(var ce=E,se=P,pe=0;pe<$;pe++){var De=x[ae+pe],Te=I[ae+pe],st=x[ae+pe+$],Ue=I[ae+pe+$],Oe=ce*st-se*Ue;Ue=ce*Ue+se*st,st=Oe,x[ae+pe]=De+st,I[ae+pe]=Te+Ue,x[ae+pe+$]=De-st,I[ae+pe+$]=Te-Ue,pe!==N&&(Oe=E*ce-P*se,se=E*se+P*ce,ce=Oe)}},V.prototype.guessLen13b=function(g,v){var x=Math.max(v,g)|1,I=x&1,T=0;for(x=x/2|0;x;x=x>>>1)T++;return 1<<T+1+I},V.prototype.conjugate=function(g,v,x){if(!(x<=1))for(var I=0;I<x/2;I++){var T=g[I];g[I]=g[x-I-1],g[x-I-1]=T,T=v[I],v[I]=-v[x-I-1],v[x-I-1]=-T}},V.prototype.normalize13b=function(g,v){for(var x=0,I=0;I<v/2;I++){var T=Math.round(g[2*I+1]/v)*8192+Math.round(g[2*I]/v)+x;g[I]=T&67108863,T<67108864?x=0:x=T/67108864|0}return g},V.prototype.convert13b=function(g,v,x,I){for(var T=0,H=0;H<v;H++)T=T+(g[H]|0),x[2*H]=T&8191,T=T>>>13,x[2*H+1]=T&8191,T=T>>>13;for(H=2*v;H<I;++H)x[H]=0;r(T===0),r((T&-8192)===0)},V.prototype.stub=function(g){for(var v=new Array(g),x=0;x<g;x++)v[x]=0;return v},V.prototype.mulp=function(g,v,x){var I=2*this.guessLen13b(g.length,v.length),T=this.makeRBT(I),H=this.stub(I),$=new Array(I),N=new Array(I),E=new Array(I),P=new Array(I),ae=new Array(I),ce=new Array(I),se=x.words;se.length=I,this.convert13b(g.words,g.length,$,I),this.convert13b(v.words,v.length,P,I),this.transform($,H,N,E,I,T),this.transform(P,H,ae,ce,I,T);for(var pe=0;pe<I;pe++){var De=N[pe]*ae[pe]-E[pe]*ce[pe];E[pe]=N[pe]*ce[pe]+E[pe]*ae[pe],N[pe]=De}return this.conjugate(N,E,I),this.transform(N,E,se,H,I,T),this.conjugate(se,H,I),this.normalize13b(se,I),x.negative=g.negative^v.negative,x.length=g.length+v.length,x._strip()},i.prototype.mul=function(g){var v=new i(null);return v.words=new Array(this.length+g.length),this.mulTo(g,v)},i.prototype.mulf=function(g){var v=new i(null);return v.words=new Array(this.length+g.length),U(this,g,v)},i.prototype.imul=function(g){return this.clone().mulTo(g,this)},i.prototype.imuln=function(g){var v=g<0;v&&(g=-g),r(typeof g=="number"),r(g<67108864);for(var x=0,I=0;I<this.length;I++){var T=(this.words[I]|0)*g,H=(T&67108863)+(x&67108863);x>>=26,x+=T/67108864|0,x+=H>>>26,this.words[I]=H&67108863}return x!==0&&(this.words[I]=x,this.length++),v?this.ineg():this},i.prototype.muln=function(g){return this.clone().imuln(g)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(g){var v=C(g);if(v.length===0)return new i(1);for(var x=this,I=0;I<v.length&&v[I]===0;I++,x=x.sqr());if(++I<v.length)for(var T=x.sqr();I<v.length;I++,T=T.sqr())v[I]!==0&&(x=x.mul(T));return x},i.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var v=g%26,x=(g-v)/26,I=67108863>>>26-v<<26-v,T;if(v!==0){var H=0;for(T=0;T<this.length;T++){var $=this.words[T]&I,N=(this.words[T]|0)-$<<v;this.words[T]=N|H,H=$>>>26-v}H&&(this.words[T]=H,this.length++)}if(x!==0){for(T=this.length-1;T>=0;T--)this.words[T+x]=this.words[T];for(T=0;T<x;T++)this.words[T]=0;this.length+=x}return this._strip()},i.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},i.prototype.iushrn=function(g,v,x){r(typeof g=="number"&&g>=0);var I;v?I=(v-v%26)/26:I=0;var T=g%26,H=Math.min((g-T)/26,this.length),$=67108863^67108863>>>T<<T,N=x;if(I-=H,I=Math.max(0,I),N){for(var E=0;E<H;E++)N.words[E]=this.words[E];N.length=H}if(H!==0)if(this.length>H)for(this.length-=H,E=0;E<this.length;E++)this.words[E]=this.words[E+H];else this.words[0]=0,this.length=1;var P=0;for(E=this.length-1;E>=0&&(P!==0||E>=I);E--){var ae=this.words[E]|0;this.words[E]=P<<26-T|ae>>>T,P=ae&$}return N&&P!==0&&(N.words[N.length++]=P),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(g,v,x){return r(this.negative===0),this.iushrn(g,v,x)},i.prototype.shln=function(g){return this.clone().ishln(g)},i.prototype.ushln=function(g){return this.clone().iushln(g)},i.prototype.shrn=function(g){return this.clone().ishrn(g)},i.prototype.ushrn=function(g){return this.clone().iushrn(g)},i.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var v=g%26,x=(g-v)/26,I=1<<v;if(this.length<=x)return!1;var T=this.words[x];return!!(T&I)},i.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var v=g%26,x=(g-v)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(v!==0&&x++,this.length=Math.min(x,this.length),v!==0){var I=67108863^67108863>>>v<<v;this.words[this.length-1]&=I}return this._strip()},i.prototype.maskn=function(g){return this.clone().imaskn(g)},i.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<=g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},i.prototype._iaddn=function(g){this.words[0]+=g;for(var v=0;v<this.length&&this.words[v]>=67108864;v++)this.words[v]-=67108864,v===this.length-1?this.words[v+1]=1:this.words[v+1]++;return this.length=Math.max(this.length,v+1),this},i.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var v=0;v<this.length&&this.words[v]<0;v++)this.words[v]+=67108864,this.words[v+1]-=1;return this._strip()},i.prototype.addn=function(g){return this.clone().iaddn(g)},i.prototype.subn=function(g){return this.clone().isubn(g)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(g,v,x){var I=g.length+x,T;this._expand(I);var H,$=0;for(T=0;T<g.length;T++){H=(this.words[T+x]|0)+$;var N=(g.words[T]|0)*v;H-=N&67108863,$=(H>>26)-(N/67108864|0),this.words[T+x]=H&67108863}for(;T<this.length-x;T++)H=(this.words[T+x]|0)+$,$=H>>26,this.words[T+x]=H&67108863;if($===0)return this._strip();for(r($===-1),$=0,T=0;T<this.length;T++)H=-(this.words[T]|0)+$,$=H>>26,this.words[T]=H&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(g,v){var x=this.length-g.length,I=this.clone(),T=g,H=T.words[T.length-1]|0,$=this._countBits(H);x=26-$,x!==0&&(T=T.ushln(x),I.iushln(x),H=T.words[T.length-1]|0);var N=I.length-T.length,E;if(v!=="mod"){E=new i(null),E.length=N+1,E.words=new Array(E.length);for(var P=0;P<E.length;P++)E.words[P]=0}var ae=I.clone()._ishlnsubmul(T,1,N);ae.negative===0&&(I=ae,E&&(E.words[N]=1));for(var ce=N-1;ce>=0;ce--){var se=(I.words[T.length+ce]|0)*67108864+(I.words[T.length+ce-1]|0);for(se=Math.min(se/H|0,67108863),I._ishlnsubmul(T,se,ce);I.negative!==0;)se--,I.negative=0,I._ishlnsubmul(T,1,ce),I.isZero()||(I.negative^=1);E&&(E.words[ce]=se)}return E&&E._strip(),I._strip(),v!=="div"&&x!==0&&I.iushrn(x),{div:E||null,mod:I}},i.prototype.divmod=function(g,v,x){if(r(!g.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var I,T,H;return this.negative!==0&&g.negative===0?(H=this.neg().divmod(g,v),v!=="mod"&&(I=H.div.neg()),v!=="div"&&(T=H.mod.neg(),x&&T.negative!==0&&T.iadd(g)),{div:I,mod:T}):this.negative===0&&g.negative!==0?(H=this.divmod(g.neg(),v),v!=="mod"&&(I=H.div.neg()),{div:I,mod:H.mod}):this.negative&g.negative?(H=this.neg().divmod(g.neg(),v),v!=="div"&&(T=H.mod.neg(),x&&T.negative!==0&&T.isub(g)),{div:H.div,mod:T}):g.length>this.length||this.cmp(g)<0?{div:new i(0),mod:this}:g.length===1?v==="div"?{div:this.divn(g.words[0]),mod:null}:v==="mod"?{div:null,mod:new i(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new i(this.modrn(g.words[0]))}:this._wordDiv(g,v)},i.prototype.div=function(g){return this.divmod(g,"div",!1).div},i.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},i.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},i.prototype.divRound=function(g){var v=this.divmod(g);if(v.mod.isZero())return v.div;var x=v.div.negative!==0?v.mod.isub(g):v.mod,I=g.ushrn(1),T=g.andln(1),H=x.cmp(I);return H<0||T===1&&H===0?v.div:v.div.negative!==0?v.div.isubn(1):v.div.iaddn(1)},i.prototype.modrn=function(g){var v=g<0;v&&(g=-g),r(g<=67108863);for(var x=(1<<26)%g,I=0,T=this.length-1;T>=0;T--)I=(x*I+(this.words[T]|0))%g;return v?-I:I},i.prototype.modn=function(g){return this.modrn(g)},i.prototype.idivn=function(g){var v=g<0;v&&(g=-g),r(g<=67108863);for(var x=0,I=this.length-1;I>=0;I--){var T=(this.words[I]|0)+x*67108864;this.words[I]=T/g|0,x=T%g}return this._strip(),v?this.ineg():this},i.prototype.divn=function(g){return this.clone().idivn(g)},i.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var v=this,x=g.clone();v.negative!==0?v=v.umod(g):v=v.clone();for(var I=new i(1),T=new i(0),H=new i(0),$=new i(1),N=0;v.isEven()&&x.isEven();)v.iushrn(1),x.iushrn(1),++N;for(var E=x.clone(),P=v.clone();!v.isZero();){for(var ae=0,ce=1;!(v.words[0]&ce)&&ae<26;++ae,ce<<=1);if(ae>0)for(v.iushrn(ae);ae-- >0;)(I.isOdd()||T.isOdd())&&(I.iadd(E),T.isub(P)),I.iushrn(1),T.iushrn(1);for(var se=0,pe=1;!(x.words[0]&pe)&&se<26;++se,pe<<=1);if(se>0)for(x.iushrn(se);se-- >0;)(H.isOdd()||$.isOdd())&&(H.iadd(E),$.isub(P)),H.iushrn(1),$.iushrn(1);v.cmp(x)>=0?(v.isub(x),I.isub(H),T.isub($)):(x.isub(v),H.isub(I),$.isub(T))}return{a:H,b:$,gcd:x.iushln(N)}},i.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var v=this,x=g.clone();v.negative!==0?v=v.umod(g):v=v.clone();for(var I=new i(1),T=new i(0),H=x.clone();v.cmpn(1)>0&&x.cmpn(1)>0;){for(var $=0,N=1;!(v.words[0]&N)&&$<26;++$,N<<=1);if($>0)for(v.iushrn($);$-- >0;)I.isOdd()&&I.iadd(H),I.iushrn(1);for(var E=0,P=1;!(x.words[0]&P)&&E<26;++E,P<<=1);if(E>0)for(x.iushrn(E);E-- >0;)T.isOdd()&&T.iadd(H),T.iushrn(1);v.cmp(x)>=0?(v.isub(x),I.isub(T)):(x.isub(v),T.isub(I))}var ae;return v.cmpn(1)===0?ae=I:ae=T,ae.cmpn(0)<0&&ae.iadd(g),ae},i.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var v=this.clone(),x=g.clone();v.negative=0,x.negative=0;for(var I=0;v.isEven()&&x.isEven();I++)v.iushrn(1),x.iushrn(1);do{for(;v.isEven();)v.iushrn(1);for(;x.isEven();)x.iushrn(1);var T=v.cmp(x);if(T<0){var H=v;v=x,x=H}else if(T===0||x.cmpn(1)===0)break;v.isub(x)}while(!0);return x.iushln(I)},i.prototype.invm=function(g){return this.egcd(g).a.umod(g)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(g){return this.words[0]&g},i.prototype.bincn=function(g){r(typeof g=="number");var v=g%26,x=(g-v)/26,I=1<<v;if(this.length<=x)return this._expand(x+1),this.words[x]|=I,this;for(var T=I,H=x;T!==0&&H<this.length;H++){var $=this.words[H]|0;$+=T,T=$>>>26,$&=67108863,this.words[H]=$}return T!==0&&(this.words[H]=T,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(g){var v=g<0;if(this.negative!==0&&!v)return-1;if(this.negative===0&&v)return 1;this._strip();var x;if(this.length>1)x=1;else{v&&(g=-g),r(g<=67108863,"Number is too big");var I=this.words[0]|0;x=I===g?0:I<g?-1:1}return this.negative!==0?-x|0:x},i.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var v=this.ucmp(g);return this.negative!==0?-v|0:v},i.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var v=0,x=this.length-1;x>=0;x--){var I=this.words[x]|0,T=g.words[x]|0;if(I!==T){I<T?v=-1:I>T&&(v=1);break}}return v},i.prototype.gtn=function(g){return this.cmpn(g)===1},i.prototype.gt=function(g){return this.cmp(g)===1},i.prototype.gten=function(g){return this.cmpn(g)>=0},i.prototype.gte=function(g){return this.cmp(g)>=0},i.prototype.ltn=function(g){return this.cmpn(g)===-1},i.prototype.lt=function(g){return this.cmp(g)===-1},i.prototype.lten=function(g){return this.cmpn(g)<=0},i.prototype.lte=function(g){return this.cmp(g)<=0},i.prototype.eqn=function(g){return this.cmpn(g)===0},i.prototype.eq=function(g){return this.cmp(g)===0},i.red=function(g){return new z(g)},i.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(g){return this.red=g,this},i.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},i.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},i.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},i.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},i.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},i.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},i.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},i.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var Q={k256:null,p224:null,p192:null,p25519:null};function Y(D,g){this.name=D,this.p=new i(g,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var g=new i(null);return g.words=new Array(Math.ceil(this.n/13)),g},Y.prototype.ireduce=function(g){var v=g,x;do this.split(v,this.tmp),v=this.imulK(v),v=v.iadd(this.tmp),x=v.bitLength();while(x>this.n);var I=x<this.n?-1:v.ucmp(this.p);return I===0?(v.words[0]=0,v.length=1):I>0?v.isub(this.p):v.strip!==void 0?v.strip():v._strip(),v},Y.prototype.split=function(g,v){g.iushrn(this.n,0,v)},Y.prototype.imulK=function(g){return g.imul(this.k)};function k(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(k,Y),k.prototype.split=function(g,v){for(var x=4194303,I=Math.min(g.length,9),T=0;T<I;T++)v.words[T]=g.words[T];if(v.length=I,g.length<=9){g.words[0]=0,g.length=1;return}var H=g.words[9];for(v.words[v.length++]=H&x,T=10;T<g.length;T++){var $=g.words[T]|0;g.words[T-10]=($&x)<<4|H>>>22,H=$}H>>>=22,g.words[T-10]=H,H===0&&g.length>10?g.length-=10:g.length-=9},k.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var v=0,x=0;x<g.length;x++){var I=g.words[x]|0;v+=I*977,g.words[x]=v&67108863,v=I*64+(v/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(q,Y);function ie(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(ie,Y);function W(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(W,Y),W.prototype.imulK=function(g){for(var v=0,x=0;x<g.length;x++){var I=(g.words[x]|0)*19+v,T=I&67108863;I>>>=26,g.words[x]=T,v=I}return v!==0&&(g.words[g.length++]=v),g},i._prime=function(g){if(Q[g])return Q[g];var v;if(g==="k256")v=new k;else if(g==="p224")v=new q;else if(g==="p192")v=new ie;else if(g==="p25519")v=new W;else throw new Error("Unknown prime "+g);return Q[g]=v,v};function z(D){if(typeof D=="string"){var g=i._prime(D);this.m=g.p,this.prime=g}else r(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}z.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},z.prototype._verify2=function(g,v){r((g.negative|v.negative)===0,"red works only with positives"),r(g.red&&g.red===v.red,"red works only with red numbers")},z.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(u(g,g.umod(this.m)._forceRed(this)),g)},z.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},z.prototype.add=function(g,v){this._verify2(g,v);var x=g.add(v);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},z.prototype.iadd=function(g,v){this._verify2(g,v);var x=g.iadd(v);return x.cmp(this.m)>=0&&x.isub(this.m),x},z.prototype.sub=function(g,v){this._verify2(g,v);var x=g.sub(v);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},z.prototype.isub=function(g,v){this._verify2(g,v);var x=g.isub(v);return x.cmpn(0)<0&&x.iadd(this.m),x},z.prototype.shl=function(g,v){return this._verify1(g),this.imod(g.ushln(v))},z.prototype.imul=function(g,v){return this._verify2(g,v),this.imod(g.imul(v))},z.prototype.mul=function(g,v){return this._verify2(g,v),this.imod(g.mul(v))},z.prototype.isqr=function(g){return this.imul(g,g.clone())},z.prototype.sqr=function(g){return this.mul(g,g)},z.prototype.sqrt=function(g){if(g.isZero())return g.clone();var v=this.m.andln(3);if(r(v%2===1),v===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(g,x)}for(var I=this.m.subn(1),T=0;!I.isZero()&&I.andln(1)===0;)T++,I.iushrn(1);r(!I.isZero());var H=new i(1).toRed(this),$=H.redNeg(),N=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new i(2*E*E).toRed(this);this.pow(E,N).cmp($)!==0;)E.redIAdd($);for(var P=this.pow(E,I),ae=this.pow(g,I.addn(1).iushrn(1)),ce=this.pow(g,I),se=T;ce.cmp(H)!==0;){for(var pe=ce,De=0;pe.cmp(H)!==0;De++)pe=pe.redSqr();r(De<se);var Te=this.pow(P,new i(1).iushln(se-De-1));ae=ae.redMul(Te),P=Te.redSqr(),ce=ce.redMul(P),se=De}return ae},z.prototype.invm=function(g){var v=g._invmp(this.m);return v.negative!==0?(v.negative=0,this.imod(v).redNeg()):this.imod(v)},z.prototype.pow=function(g,v){if(v.isZero())return new i(1).toRed(this);if(v.cmpn(1)===0)return g.clone();var x=4,I=new Array(1<<x);I[0]=new i(1).toRed(this),I[1]=g;for(var T=2;T<I.length;T++)I[T]=this.mul(I[T-1],g);var H=I[0],$=0,N=0,E=v.bitLength()%26;for(E===0&&(E=26),T=v.length-1;T>=0;T--){for(var P=v.words[T],ae=E-1;ae>=0;ae--){var ce=P>>ae&1;if(H!==I[0]&&(H=this.sqr(H)),ce===0&&$===0){N=0;continue}$<<=1,$|=ce,N++,!(N!==x&&(T!==0||ae!==0))&&(H=this.mul(H,I[$]),N=0,$=0)}E=26}return H},z.prototype.convertTo=function(g){var v=g.umod(this.m);return v===g?v.clone():v},z.prototype.convertFrom=function(g){var v=g.clone();return v.red=null,v},i.mont=function(g){return new X(g)};function X(D){z.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(X,z),X.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},X.prototype.convertFrom=function(g){var v=this.imod(g.mul(this.rinv));return v.red=null,v},X.prototype.imul=function(g,v){if(g.isZero()||v.isZero())return g.words[0]=0,g.length=1,g;var x=g.imul(v),I=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=x.isub(I).iushrn(this.shift),H=T;return T.cmp(this.m)>=0?H=T.isub(this.m):T.cmpn(0)<0&&(H=T.iadd(this.m)),H._forceRed(this)},X.prototype.mul=function(g,v){if(g.isZero()||v.isZero())return new i(0)._forceRed(this);var x=g.mul(v),I=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=x.isub(I).iushrn(this.shift),H=T;return T.cmp(this.m)>=0?H=T.isub(this.m):T.cmpn(0)<0&&(H=T.iadd(this.m)),H._forceRed(this)},X.prototype.invm=function(g){var v=this.imod(g._invmp(this.m).mul(this.r2));return v._forceRed(this)}})(typeof bP>"u"||bP,Vre)});var D2=F(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.errorValues=X0.standardErrorCodes=void 0;X0.standardErrorCodes={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}};X0.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}});var D8=F(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.serialize=Xo.getErrorCode=Xo.isValidCode=Xo.getMessageFromCode=Xo.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var S8=D2(),Wre="Unspecified error message.";Xo.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function zre(t,e=Wre){if(t&&Number.isInteger(t)){let r=t.toString();if(EP(S8.errorValues,r))return S8.errorValues[r].message;if(Zre(t))return Xo.JSON_RPC_SERVER_ERROR_MESSAGE}return e}Xo.getMessageFromCode=zre;function Gre(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(S8.errorValues[e]||Zre(t))}Xo.isValidCode=Gre;function jFe(t){var e;if(typeof t=="number")return t;if(HFe(t))return(e=t.code)!==null&&e!==void 0?e:t.errorCode}Xo.getErrorCode=jFe;function HFe(t){return typeof t=="object"&&t!==null&&(typeof t.code=="number"||typeof t.errorCode=="number")}function VFe(t,{shouldIncludeStack:e=!1}={}){let r={};if(t&&typeof t=="object"&&!Array.isArray(t)&&EP(t,"code")&&Gre(t.code)){let n=t;r.code=n.code,n.message&&typeof n.message=="string"?(r.message=n.message,EP(n,"data")&&(r.data=n.data)):(r.message=zre(r.code),r.data={originalError:$re(t)})}else r.code=S8.standardErrorCodes.rpc.internal,r.message=qre(t,"message")?t.message:Wre,r.data={originalError:$re(t)};return e&&(r.stack=qre(t,"stack")?t.stack:void 0),r}Xo.serialize=VFe;function Zre(t){return t>=-32099&&t<=-32e3}function $re(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t}function EP(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function qre(t,e){return typeof t=="object"&&t!==null&&e in t&&typeof t[e]=="string"}});var Yre=F(N8=>{"use strict";Object.defineProperty(N8,"__esModule",{value:!0});N8.standardErrors=void 0;var ms=D2(),Kre=D8();N8.standardErrors={rpc:{parse:t=>Ma(ms.standardErrorCodes.rpc.parse,t),invalidRequest:t=>Ma(ms.standardErrorCodes.rpc.invalidRequest,t),invalidParams:t=>Ma(ms.standardErrorCodes.rpc.invalidParams,t),methodNotFound:t=>Ma(ms.standardErrorCodes.rpc.methodNotFound,t),internal:t=>Ma(ms.standardErrorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ma(e,t)},invalidInput:t=>Ma(ms.standardErrorCodes.rpc.invalidInput,t),resourceNotFound:t=>Ma(ms.standardErrorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>Ma(ms.standardErrorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>Ma(ms.standardErrorCodes.rpc.transactionRejected,t),methodNotSupported:t=>Ma(ms.standardErrorCodes.rpc.methodNotSupported,t),limitExceeded:t=>Ma(ms.standardErrorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>e1(ms.standardErrorCodes.provider.userRejectedRequest,t),unauthorized:t=>e1(ms.standardErrorCodes.provider.unauthorized,t),unsupportedMethod:t=>e1(ms.standardErrorCodes.provider.unsupportedMethod,t),disconnected:t=>e1(ms.standardErrorCodes.provider.disconnected,t),chainDisconnected:t=>e1(ms.standardErrorCodes.provider.chainDisconnected,t),unsupportedChain:t=>e1(ms.standardErrorCodes.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new T8(e,r,n)}}};function Ma(t,e){let[r,n]=Jre(e);return new R8(t,r||(0,Kre.getMessageFromCode)(t),n)}function e1(t,e){let[r,n]=Jre(e);return new T8(t,r||(0,Kre.getMessageFromCode)(t),n)}function Jre(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}var R8=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}},T8=class extends R8{constructor(e,r,n){if(!$Fe(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};function $Fe(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}});var M8=F(O8=>{"use strict";Object.defineProperty(O8,"__esModule",{value:!0});O8.isErrorResponse=void 0;function qFe(t){return t.errorMessage!==void 0}O8.isErrorResponse=qFe});var k8=F(P8=>{"use strict";Object.defineProperty(P8,"__esModule",{value:!0});P8.LIB_VERSION=void 0;P8.LIB_VERSION="3.9.1"});var Qre=F(L8=>{"use strict";Object.defineProperty(L8,"__esModule",{value:!0});L8.serializeError=void 0;var WFe=M8(),zFe=k8(),GFe=D2(),ZFe=D8();function KFe(t,e){let r=(0,ZFe.serialize)(JFe(t),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",zFe.LIB_VERSION),n.searchParams.set("code",r.code.toString());let i=YFe(r.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}L8.serializeError=KFe;function JFe(t){return typeof t=="string"?{message:t,code:GFe.standardErrorCodes.rpc.internal}:(0,WFe.isErrorResponse)(t)?Object.assign(Object.assign({},t),{message:t.errorMessage,code:t.errorCode,data:{method:t.method}}):t}function YFe(t,e){let r=t?.method;if(r)return r;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}});var R2=F(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.standardErrors=Pa.standardErrorCodes=Pa.serializeError=Pa.getMessageFromCode=Pa.getErrorCode=void 0;var QFe=D2();Object.defineProperty(Pa,"standardErrorCodes",{enumerable:!0,get:function(){return QFe.standardErrorCodes}});var XFe=Yre();Object.defineProperty(Pa,"standardErrors",{enumerable:!0,get:function(){return XFe.standardErrors}});var eBe=Qre();Object.defineProperty(Pa,"serializeError",{enumerable:!0,get:function(){return eBe.serializeError}});var Xre=D8();Object.defineProperty(Pa,"getErrorCode",{enumerable:!0,get:function(){return Xre.getErrorCode}});Object.defineProperty(Pa,"getMessageFromCode",{enumerable:!0,get:function(){return Xre.getMessageFromCode}})});var N2=F(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.ProviderType=Ms.RegExpString=Ms.IntNumber=Ms.BigIntString=Ms.AddressString=Ms.HexString=Ms.OpaqueType=void 0;function T2(){return t=>t}Ms.OpaqueType=T2;Ms.HexString=T2();Ms.AddressString=T2();Ms.BigIntString=T2();function tBe(t){return Math.floor(t)}Ms.IntNumber=tBe;Ms.RegExpString=T2();var ene=function(t){return t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected="",t}(ene||(Ms.ProviderType=ene={}))});var gl=F(ct=>{"use strict";var rBe=ct&&ct.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ct,"__esModule",{value:!0});ct.isMobileWeb=ct.getLocation=ct.isInIFrame=ct.createQrUrl=ct.getFavicon=ct.range=ct.isBigNumber=ct.ensureParsedJSONObject=ct.ensureBN=ct.ensureRegExpString=ct.ensureIntNumber=ct.ensureBuffer=ct.ensureAddressString=ct.ensureEvenLengthHexString=ct.ensureHexString=ct.isHexString=ct.prepend0x=ct.strip0x=ct.has0xPrefix=ct.hexStringFromIntNumber=ct.intNumberFromHexString=ct.bigIntStringFromBN=ct.hexStringFromBuffer=ct.hexStringToUint8Array=ct.uint8ArrayToHex=ct.randomBytesHex=void 0;var Sd=rBe(S2()),Op=R2(),ka=N2(),tne=/^[0-9]*$/,rne=/^[a-f0-9]*$/;function nBe(t){return nne(crypto.getRandomValues(new Uint8Array(t)))}ct.randomBytesHex=nBe;function nne(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}ct.uint8ArrayToHex=nne;function iBe(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}ct.hexStringToUint8Array=iBe;function sBe(t,e=!1){let r=t.toString("hex");return(0,ka.HexString)(e?`0x${r}`:r)}ct.hexStringFromBuffer=sBe;function oBe(t){return(0,ka.BigIntString)(t.toString(10))}ct.bigIntStringFromBN=oBe;function aBe(t){return(0,ka.IntNumber)(new Sd.default(M2(t,!1),16).toNumber())}ct.intNumberFromHexString=aBe;function cBe(t){return(0,ka.HexString)(`0x${new Sd.default(t).toString(16)}`)}ct.hexStringFromIntNumber=cBe;function _P(t){return t.startsWith("0x")||t.startsWith("0X")}ct.has0xPrefix=_P;function F8(t){return _P(t)?t.slice(2):t}ct.strip0x=F8;function ine(t){return _P(t)?`0x${t.slice(2)}`:`0x${t}`}ct.prepend0x=ine;function O2(t){if(typeof t!="string")return!1;let e=F8(t).toLowerCase();return rne.test(e)}ct.isHexString=O2;function sne(t,e=!1){if(typeof t=="string"){let r=F8(t).toLowerCase();if(rne.test(r))return(0,ka.HexString)(e?`0x${r}`:r)}throw Op.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}ct.ensureHexString=sne;function M2(t,e=!1){let r=sne(t,!1);return r.length%2===1&&(r=(0,ka.HexString)(`0${r}`)),e?(0,ka.HexString)(`0x${r}`):r}ct.ensureEvenLengthHexString=M2;function lBe(t){if(typeof t=="string"){let e=F8(t).toLowerCase();if(O2(e)&&e.length===40)return(0,ka.AddressString)(ine(e))}throw Op.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}ct.ensureAddressString=lBe;function uBe(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string"){if(O2(t)){let e=M2(t,!1);return Buffer.from(e,"hex")}return Buffer.from(t,"utf8")}throw Op.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}ct.ensureBuffer=uBe;function one(t){if(typeof t=="number"&&Number.isInteger(t))return(0,ka.IntNumber)(t);if(typeof t=="string"){if(tne.test(t))return(0,ka.IntNumber)(Number(t));if(O2(t))return(0,ka.IntNumber)(new Sd.default(M2(t,!1),16).toNumber())}throw Op.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}ct.ensureIntNumber=one;function fBe(t){if(t instanceof RegExp)return(0,ka.RegExpString)(t.toString());throw Op.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}ct.ensureRegExpString=fBe;function dBe(t){if(t!==null&&(Sd.default.isBN(t)||ane(t)))return new Sd.default(t.toString(10),10);if(typeof t=="number")return new Sd.default(one(t));if(typeof t=="string"){if(tne.test(t))return new Sd.default(t,10);if(O2(t))return new Sd.default(M2(t,!1),16)}throw Op.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}ct.ensureBN=dBe;function hBe(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw Op.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}ct.ensureParsedJSONObject=hBe;function ane(t){if(t==null||typeof t.constructor!="function")return!1;let{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}ct.isBigNumber=ane;function pBe(t,e){return Array.from({length:e-t},(r,n)=>t+n)}ct.range=pBe;function mBe(){let t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}ct.getFavicon=mBe;function gBe(t,e,r,n,i,s){let o=n?"parent-id":"id",a=new URLSearchParams({[o]:t,secret:e,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${a}`}ct.createQrUrl=gBe;function cne(){try{return window.frameElement!==null}catch{return!1}}ct.isInIFrame=cne;function yBe(){try{return cne()&&window.top?window.top.location:window.location}catch{return window.location}}ct.getLocation=yBe;function wBe(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window?.navigator)===null||t===void 0?void 0:t.userAgent)}ct.isMobileWeb=wBe});var lne=F(B8=>{"use strict";Object.defineProperty(B8,"__esModule",{value:!0});B8.ScopedLocalStorage=void 0;var CP=class{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){let i=localStorage.key(n);typeof i=="string"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}};B8.ScopedLocalStorage=CP});var fne=F((R5t,xP)=>{"use strict";var vBe=Object.prototype.hasOwnProperty,no="~";function P2(){}Object.create&&(P2.prototype=Object.create(null),new P2().__proto__||(no=!1));function bBe(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function une(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new bBe(r,n||t,i),o=no?no+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],s]:t._events[o].push(s):(t._events[o]=s,t._eventsCount++),t}function U8(t,e){--t._eventsCount===0?t._events=new P2:delete t._events[e]}function Ps(){this._events=new P2,this._eventsCount=0}Ps.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)vBe.call(r,n)&&e.push(no?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};Ps.prototype.listeners=function(e){var r=no?no+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};Ps.prototype.listenerCount=function(e){var r=no?no+e:e,n=this._events[r];return n?n.fn?1:n.length:0};Ps.prototype.emit=function(e,r,n,i,s,o){var a=no?no+e:e;if(!this._events[a])return!1;var c=this._events[a],u=arguments.length,d,h;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,s),!0;case 6:return c.fn.call(c.context,r,n,i,s,o),!0}for(h=1,d=new Array(u-1);h<u;h++)d[h-1]=arguments[h];c.fn.apply(c.context,d)}else{var m=c.length,w;for(h=0;h<m;h++)switch(c[h].once&&this.removeListener(e,c[h].fn,void 0,!0),u){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,r);break;case 3:c[h].fn.call(c[h].context,r,n);break;case 4:c[h].fn.call(c[h].context,r,n,i);break;default:if(!d)for(w=1,d=new Array(u-1);w<u;w++)d[w-1]=arguments[w];c[h].fn.apply(c[h].context,d)}}return!0};Ps.prototype.on=function(e,r,n){return une(this,e,r,n,!1)};Ps.prototype.once=function(e,r,n){return une(this,e,r,n,!0)};Ps.prototype.removeListener=function(e,r,n,i){var s=no?no+e:e;if(!this._events[s])return this;if(!r)return U8(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&U8(this,s);else{for(var a=0,c=[],u=o.length;a<u;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:U8(this,s)}return this};Ps.prototype.removeAllListeners=function(e){var r;return e?(r=no?no+e:e,this._events[r]&&U8(this,r)):(this._events=new P2,this._eventsCount=0),this};Ps.prototype.off=Ps.prototype.removeListener;Ps.prototype.addListener=Ps.prototype.on;Ps.prefixed=no;Ps.EventEmitter=Ps;typeof xP<"u"&&(xP.exports=Ps)});var H8=F(j8=>{"use strict";Object.defineProperty(j8,"__esModule",{value:!0});j8.EVENTS=void 0;j8.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}});var V8=F(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.RelayAbstract=yl.APP_VERSION_KEY=yl.LOCAL_STORAGE_ADDRESSES_KEY=yl.WALLET_USER_NAME_KEY=void 0;var dne=R2();yl.WALLET_USER_NAME_KEY="walletUsername";yl.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";yl.APP_VERSION_KEY="AppVersion";var IP=class{makeEthereumJSONRPCRequest(e,r){return y(this,null,function*(){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw dne.standardErrors.rpc.parse({});let i=n,{error:s}=i;if(s)throw(0,dne.serializeError)(s,e.method);return i})})}};yl.RelayAbstract=IP});var La=F((M5t,AP)=>{"use strict";typeof Object.create=="function"?AP.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:AP.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var k2=F(r1=>{"use strict";var SP=v8(),t1=b8(),hne=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r1.Buffer=he;r1.SlowBuffer=ABe;r1.INSPECT_MAX_BYTES=50;var $8=2147483647;r1.kMaxLength=$8;he.TYPED_ARRAY_SUPPORT=EBe();!he.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function EBe(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(he.prototype,"parent",{enumerable:!0,get:function(){if(he.isBuffer(this))return this.buffer}});Object.defineProperty(he.prototype,"offset",{enumerable:!0,get:function(){if(he.isBuffer(this))return this.byteOffset}});function ju(t){if(t>$8)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,he.prototype),e}function he(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return NP(t)}return gne(t,e,r)}he.poolSize=8192;function gne(t,e,r){if(typeof t=="string")return CBe(t,e);if(ArrayBuffer.isView(t))return xBe(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(wl(t,ArrayBuffer)||t&&wl(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(wl(t,SharedArrayBuffer)||t&&wl(t.buffer,SharedArrayBuffer)))return RP(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return he.from(n,e,r);var i=IBe(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return he.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}he.from=function(t,e,r){return gne(t,e,r)};Object.setPrototypeOf(he.prototype,Uint8Array.prototype);Object.setPrototypeOf(he,Uint8Array);function yne(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function _Be(t,e,r){return yne(t),t<=0?ju(t):e!==void 0?typeof r=="string"?ju(t).fill(e,r):ju(t).fill(e):ju(t)}he.alloc=function(t,e,r){return _Be(t,e,r)};function NP(t){return yne(t),ju(t<0?0:OP(t)|0)}he.allocUnsafe=function(t){return NP(t)};he.allocUnsafeSlow=function(t){return NP(t)};function CBe(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!he.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=wne(t,e)|0,n=ju(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function DP(t){for(var e=t.length<0?0:OP(t.length)|0,r=ju(e),n=0;n<e;n+=1)r[n]=t[n]&255;return r}function xBe(t){if(wl(t,Uint8Array)){var e=new Uint8Array(t);return RP(e.buffer,e.byteOffset,e.byteLength)}return DP(t)}function RP(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,he.prototype),n}function IBe(t){if(he.isBuffer(t)){var e=OP(t.length)|0,r=ju(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||MP(t.length)?ju(0):DP(t);if(t.type==="Buffer"&&Array.isArray(t.data))return DP(t.data)}function OP(t){if(t>=$8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$8.toString(16)+" bytes");return t|0}function ABe(t){return+t!=t&&(t=0),he.alloc(+t)}he.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==he.prototype};he.compare=function(e,r){if(wl(e,Uint8Array)&&(e=he.from(e,e.offset,e.byteLength)),wl(r,Uint8Array)&&(r=he.from(r,r.offset,r.byteLength)),!he.isBuffer(e)||!he.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,i=r.length,s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==r[s]){n=e[s],i=r[s];break}return n<i?-1:i<n?1:0};he.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};he.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return he.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=he.allocUnsafe(r),s=0;for(n=0;n<e.length;++n){var o=e[n];if(wl(o,Uint8Array))s+o.length>i.length?he.from(o).copy(i,s):Uint8Array.prototype.set.call(i,o,s);else if(he.isBuffer(o))o.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=o.length}return i};function wne(t,e){if(he.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||wl(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return TP(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return xne(t).length;default:if(i)return n?-1:TP(t).length;e=(""+e).toLowerCase(),i=!0}}he.byteLength=wne;function SBe(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return FBe(this,e,r);case"utf8":case"utf-8":return bne(this,e,r);case"ascii":return kBe(this,e,r);case"latin1":case"binary":return LBe(this,e,r);case"base64":return MBe(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return BBe(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}he.prototype._isBuffer=!0;function Mp(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}he.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)Mp(this,r,r+1);return this};he.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)Mp(this,r,r+3),Mp(this,r+1,r+2);return this};he.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)Mp(this,r,r+7),Mp(this,r+1,r+6),Mp(this,r+2,r+5),Mp(this,r+3,r+4);return this};he.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?bne(this,0,e):SBe.apply(this,arguments)};he.prototype.toLocaleString=he.prototype.toString;he.prototype.equals=function(e){if(!he.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:he.compare(this,e)===0};he.prototype.inspect=function(){var e="",r=r1.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};hne&&(he.prototype[hne]=he.prototype.inspect);he.prototype.compare=function(e,r,n,i,s){if(wl(e,Uint8Array)&&(e=he.from(e,e.offset,e.byteLength)),!he.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),r<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;for(var o=s-i,a=n-r,c=Math.min(o,a),u=this.slice(i,s),d=e.slice(r,n),h=0;h<c;++h)if(u[h]!==d[h]){o=u[h],a=d[h];break}return o<a?-1:a<o?1:0};function vne(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,MP(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=he.from(e,n)),he.isBuffer(e))return e.length===0?-1:pne(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):pne(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function pne(t,e,r,n,i){var s=1,o=t.length,a=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;s=2,o/=2,a/=2,r/=2}function c(w,_){return s===1?w[_]:w.readUInt16BE(_*s)}var u;if(i){var d=-1;for(u=r;u<o;u++)if(c(t,u)===c(e,d===-1?0:u-d)){if(d===-1&&(d=u),u-d+1===a)return d*s}else d!==-1&&(u-=u-d),d=-1}else for(r+a>o&&(r=o-a),u=r;u>=0;u--){for(var h=!0,m=0;m<a;m++)if(c(t,u+m)!==c(e,m)){h=!1;break}if(h)return u}return-1}he.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};he.prototype.indexOf=function(e,r,n){return vne(this,e,r,n,!0)};he.prototype.lastIndexOf=function(e,r,n){return vne(this,e,r,n,!1)};function DBe(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var s=e.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(o*2,2),16);if(MP(a))return o;t[r+o]=a}return o}function RBe(t,e,r,n){return q8(TP(e,t.length-r),t,r,n)}function TBe(t,e,r,n){return q8(HBe(e),t,r,n)}function NBe(t,e,r,n){return q8(xne(e),t,r,n)}function OBe(t,e,r,n){return q8(VBe(e,t.length-r),t,r,n)}he.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-r;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return DBe(this,e,r,n);case"utf8":case"utf-8":return RBe(this,e,r,n);case"ascii":case"latin1":case"binary":return TBe(this,e,r,n);case"base64":return NBe(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return OBe(this,e,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function MBe(t,e,r){return e===0&&r===t.length?SP.fromByteArray(t):SP.fromByteArray(t.slice(e,r))}function bne(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){var c,u,d,h;switch(a){case 1:s<128&&(o=s);break;case 2:c=t[i+1],(c&192)===128&&(h=(s&31)<<6|c&63,h>127&&(o=h));break;case 3:c=t[i+1],u=t[i+2],(c&192)===128&&(u&192)===128&&(h=(s&15)<<12|(c&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:c=t[i+1],u=t[i+2],d=t[i+3],(c&192)===128&&(u&192)===128&&(d&192)===128&&(h=(s&15)<<18|(c&63)<<12|(u&63)<<6|d&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=a}return PBe(n)}var mne=4096;function PBe(t){var e=t.length;if(e<=mne)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=mne));return r}function kBe(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function LBe(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function FBe(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=$Be[t[s]];return i}function BBe(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}he.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return Object.setPrototypeOf(i,he.prototype),i};function Ki(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}he.prototype.readUintLE=he.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ki(e,r,this.length);for(var i=this[e],s=1,o=0;++o<r&&(s*=256);)i+=this[e+o]*s;return i};he.prototype.readUintBE=he.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ki(e,r,this.length);for(var i=this[e+--r],s=1;r>0&&(s*=256);)i+=this[e+--r]*s;return i};he.prototype.readUint8=he.prototype.readUInt8=function(e,r){return e=e>>>0,r||Ki(e,1,this.length),this[e]};he.prototype.readUint16LE=he.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Ki(e,2,this.length),this[e]|this[e+1]<<8};he.prototype.readUint16BE=he.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Ki(e,2,this.length),this[e]<<8|this[e+1]};he.prototype.readUint32LE=he.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Ki(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};he.prototype.readUint32BE=he.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Ki(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};he.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ki(e,r,this.length);for(var i=this[e],s=1,o=0;++o<r&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*r)),i};he.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Ki(e,r,this.length);for(var i=r,s=1,o=this[e+--i];i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*r)),o};he.prototype.readInt8=function(e,r){return e=e>>>0,r||Ki(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};he.prototype.readInt16LE=function(e,r){e=e>>>0,r||Ki(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};he.prototype.readInt16BE=function(e,r){e=e>>>0,r||Ki(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};he.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Ki(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};he.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Ki(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};he.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Ki(e,4,this.length),t1.read(this,e,!0,23,4)};he.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Ki(e,4,this.length),t1.read(this,e,!1,23,4)};he.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Ki(e,8,this.length),t1.read(this,e,!0,52,8)};he.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Ki(e,8,this.length),t1.read(this,e,!1,52,8)};function xo(t,e,r,n,i,s){if(!he.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}he.prototype.writeUintLE=he.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;xo(this,e,r,n,s,0)}var o=1,a=0;for(this[r]=e&255;++a<n&&(o*=256);)this[r+a]=e/o&255;return r+n};he.prototype.writeUintBE=he.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;xo(this,e,r,n,s,0)}var o=n-1,a=1;for(this[r+o]=e&255;--o>=0&&(a*=256);)this[r+o]=e/a&255;return r+n};he.prototype.writeUint8=he.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,1,255,0),this[r]=e&255,r+1};he.prototype.writeUint16LE=he.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};he.prototype.writeUint16BE=he.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};he.prototype.writeUint32LE=he.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};he.prototype.writeUint32BE=he.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};he.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){var s=Math.pow(2,8*n-1);xo(this,e,r,n,s-1,-s)}var o=0,a=1,c=0;for(this[r]=e&255;++o<n&&(a*=256);)e<0&&c===0&&this[r+o-1]!==0&&(c=1),this[r+o]=(e/a>>0)-c&255;return r+n};he.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){var s=Math.pow(2,8*n-1);xo(this,e,r,n,s-1,-s)}var o=n-1,a=1,c=0;for(this[r+o]=e&255;--o>=0&&(a*=256);)e<0&&c===0&&this[r+o+1]!==0&&(c=1),this[r+o]=(e/a>>0)-c&255;return r+n};he.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};he.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};he.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};he.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};he.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||xo(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Ene(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _ne(t,e,r,n,i){return e=+e,r=r>>>0,i||Ene(t,e,r,4,34028234663852886e22,-34028234663852886e22),t1.write(t,e,r,n,23,4),r+4}he.prototype.writeFloatLE=function(e,r,n){return _ne(this,e,r,!0,n)};he.prototype.writeFloatBE=function(e,r,n){return _ne(this,e,r,!1,n)};function Cne(t,e,r,n,i){return e=+e,r=r>>>0,i||Ene(t,e,r,8,17976931348623157e292,-17976931348623157e292),t1.write(t,e,r,n,52,8),r+8}he.prototype.writeDoubleLE=function(e,r,n){return Cne(this,e,r,!0,n)};he.prototype.writeDoubleBE=function(e,r,n){return Cne(this,e,r,!1,n)};he.prototype.copy=function(e,r,n,i){if(!he.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),s};he.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!he.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){var s=e.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(e=s)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=r;o<n;++o)this[o]=e;else{var a=he.isBuffer(e)?e:he.from(e,i),c=a.length;if(c===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=a[o%c]}return this};var UBe=/[^+/0-9A-Za-z-_]/g;function jBe(t){if(t=t.split("=")[0],t=t.trim().replace(UBe,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function TP(t,e){e=e||1/0;for(var r,n=t.length,i=null,s=[],o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function HBe(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function VBe(t,e){for(var r,n,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function xne(t){return SP.toByteArray(jBe(t))}function q8(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function wl(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function MP(t){return t!==t}var $Be=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=r*16,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()});var Hu=F((PP,Ane)=>{"use strict";var W8=k2(),vl=W8.Buffer;function Ine(t,e){for(var r in t)e[r]=t[r]}vl.from&&vl.alloc&&vl.allocUnsafe&&vl.allocUnsafeSlow?Ane.exports=W8:(Ine(W8,PP),PP.Buffer=Pp);function Pp(t,e,r){return vl(t,e,r)}Pp.prototype=Object.create(vl.prototype);Ine(vl,Pp);Pp.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return vl(t,e,r)};Pp.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=vl(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pp.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return vl(t)};Pp.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return W8.SlowBuffer(t)}});var kp=F((k5t,Dne)=>{"use strict";var Sne=Hu().Buffer;function z8(t,e){this._block=Sne.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}z8.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Sne.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,s=this._len,o=0;o<i;){for(var a=s%n,c=Math.min(i-o,n-a),u=0;u<c;u++)r[a+u]=t[o+u];s+=c,o+=c,s%n===0&&this._update(r)}return this._len+=i,this};z8.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s};z8.prototype._update=function(){throw new Error("_update must be implemented by subclass")};Dne.exports=z8});var Nne=F((L5t,Tne)=>{"use strict";var qBe=La(),Rne=kp(),WBe=Hu().Buffer,zBe=[1518500249,1859775393,-1894007588,-899497514],GBe=new Array(80);function L2(){this.init(),this._w=GBe,Rne.call(this,64,56)}qBe(L2,Rne);L2.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function ZBe(t){return t<<5|t>>>27}function KBe(t){return t<<30|t>>>2}function JBe(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}L2.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var u=~~(c/20),d=ZBe(r)+JBe(u,n,i,s)+o+e[c]+zBe[u]|0;o=s,s=i,i=KBe(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};L2.prototype._hash=function(){var t=WBe.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};Tne.exports=L2});var Pne=F((F5t,Mne)=>{"use strict";var YBe=La(),One=kp(),QBe=Hu().Buffer,XBe=[1518500249,1859775393,-1894007588,-899497514],eUe=new Array(80);function F2(){this.init(),this._w=eUe,One.call(this,64,56)}YBe(F2,One);F2.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function tUe(t){return t<<1|t>>>31}function rUe(t){return t<<5|t>>>27}function nUe(t){return t<<30|t>>>2}function iUe(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}F2.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=tUe(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var u=~~(c/20),d=rUe(r)+iUe(u,n,i,s)+o+e[c]+XBe[u]|0;o=s,s=i,i=nUe(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};F2.prototype._hash=function(){var t=QBe.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};Mne.exports=F2});var kP=F((B5t,Lne)=>{"use strict";var sUe=La(),kne=kp(),oUe=Hu().Buffer,aUe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],cUe=new Array(64);function B2(){this.init(),this._w=cUe,kne.call(this,64,56)}sUe(B2,kne);B2.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function lUe(t,e,r){return r^t&(e^r)}function uUe(t,e,r){return t&e|r&(t|e)}function fUe(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function dUe(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function hUe(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function pUe(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}B2.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,u=this._h|0,d=0;d<16;++d)e[d]=t.readInt32BE(d*4);for(;d<64;++d)e[d]=pUe(e[d-2])+e[d-7]+hUe(e[d-15])+e[d-16]|0;for(var h=0;h<64;++h){var m=u+dUe(o)+lUe(o,a,c)+aUe[h]+e[h]|0,w=fUe(r)+uUe(r,n,i)|0;u=c,c=a,a=o,o=s+m|0,s=i,i=n,n=r,r=m+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=u+this._h|0};B2.prototype._hash=function(){var t=oUe.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};Lne.exports=B2});var Bne=F((U5t,Fne)=>{"use strict";var mUe=La(),gUe=kP(),yUe=kp(),wUe=Hu().Buffer,vUe=new Array(64);function G8(){this.init(),this._w=vUe,yUe.call(this,64,56)}mUe(G8,gUe);G8.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};G8.prototype._hash=function(){var t=wUe.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};Fne.exports=G8});var LP=F((j5t,Wne)=>{"use strict";var bUe=La(),qne=kp(),EUe=Hu().Buffer,Une=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_Ue=new Array(160);function U2(){this.init(),this._w=_Ue,qne.call(this,128,112)}bUe(U2,qne);U2.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function jne(t,e,r){return r^t&(e^r)}function Hne(t,e,r){return t&e|r&(t|e)}function Vne(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function $ne(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function CUe(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function xUe(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function IUe(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function AUe(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ji(t,e){return t>>>0<e>>>0?1:0}U2.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,u=this._hh|0,d=this._al|0,h=this._bl|0,m=this._cl|0,w=this._dl|0,_=this._el|0,C=this._fl|0,A=this._gl|0,R=this._hl|0,L=0;L<32;L+=2)e[L]=t.readInt32BE(L*4),e[L+1]=t.readInt32BE(L*4+4);for(;L<160;L+=2){var U=e[L-30],V=e[L-15*2+1],Q=CUe(U,V),Y=xUe(V,U);U=e[L-2*2],V=e[L-2*2+1];var k=IUe(U,V),q=AUe(V,U),ie=e[L-7*2],W=e[L-7*2+1],z=e[L-16*2],X=e[L-16*2+1],D=Y+W|0,g=Q+ie+Ji(D,Y)|0;D=D+q|0,g=g+k+Ji(D,q)|0,D=D+X|0,g=g+z+Ji(D,X)|0,e[L]=g,e[L+1]=D}for(var v=0;v<160;v+=2){g=e[v],D=e[v+1];var x=Hne(r,n,i),I=Hne(d,h,m),T=Vne(r,d),H=Vne(d,r),$=$ne(o,_),N=$ne(_,o),E=Une[v],P=Une[v+1],ae=jne(o,a,c),ce=jne(_,C,A),se=R+N|0,pe=u+$+Ji(se,R)|0;se=se+ce|0,pe=pe+ae+Ji(se,ce)|0,se=se+P|0,pe=pe+E+Ji(se,P)|0,se=se+D|0,pe=pe+g+Ji(se,D)|0;var De=H+I|0,Te=T+x+Ji(De,H)|0;u=c,R=A,c=a,A=C,a=o,C=_,_=w+se|0,o=s+pe+Ji(_,w)|0,s=i,w=m,i=n,m=h,n=r,h=d,d=se+De|0,r=pe+Te+Ji(d,se)|0}this._al=this._al+d|0,this._bl=this._bl+h|0,this._cl=this._cl+m|0,this._dl=this._dl+w|0,this._el=this._el+_|0,this._fl=this._fl+C|0,this._gl=this._gl+A|0,this._hl=this._hl+R|0,this._ah=this._ah+r+Ji(this._al,d)|0,this._bh=this._bh+n+Ji(this._bl,h)|0,this._ch=this._ch+i+Ji(this._cl,m)|0,this._dh=this._dh+s+Ji(this._dl,w)|0,this._eh=this._eh+o+Ji(this._el,_)|0,this._fh=this._fh+a+Ji(this._fl,C)|0,this._gh=this._gh+c+Ji(this._gl,A)|0,this._hh=this._hh+u+Ji(this._hl,R)|0};U2.prototype._hash=function(){var t=EUe.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};Wne.exports=U2});var Gne=F((H5t,zne)=>{"use strict";var SUe=La(),DUe=LP(),RUe=kp(),TUe=Hu().Buffer,NUe=new Array(160);function Z8(){this.init(),this._w=NUe,RUe.call(this,128,112)}SUe(Z8,DUe);Z8.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Z8.prototype._hash=function(){var t=TUe.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};zne.exports=Z8});var Kne=F((Vu,Zne)=>{"use strict";var Vu=Zne.exports=function(e){e=e.toLowerCase();var r=Vu[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};Vu.sha=Nne();Vu.sha1=Pne();Vu.sha224=Bne();Vu.sha256=kP();Vu.sha384=Gne();Vu.sha512=LP()});var J8=F(K8=>{"use strict";Object.defineProperty(K8,"__esModule",{value:!0});K8.Session=void 0;var Jne=Kne(),Yne=gl(),Qne="session:id",Xne="session:secret",eie="session:linked",FP=class t{constructor(e,r,n,i){this._storage=e,this._id=r||(0,Yne.randomBytesHex)(16),this._secret=n||(0,Yne.randomBytesHex)(32),this._key=new Jne.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){let r=e.getItem(Qne),n=e.getItem(eie),i=e.getItem(Xne);return r&&i?new t(e,r,i,n==="1"):null}static hash(e){return new Jne.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(Qne,this._id),this._storage.setItem(Xne,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(eie,this._linked?"1":"0")}};K8.Session=FP});var tie=F(Q8=>{"use strict";Object.defineProperty(Q8,"__esModule",{value:!0});Q8.Cipher=void 0;var Y8=gl(),BP=class{constructor(e){this.secret=e}encrypt(e){return y(this,null,function*(){let r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");let n=crypto.getRandomValues(new Uint8Array(12)),i=yield crypto.subtle.importKey("raw",(0,Y8.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=yield window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),a=16,c=o.slice(o.byteLength-a),u=o.slice(0,o.byteLength-a),d=new Uint8Array(c),h=new Uint8Array(u),m=new Uint8Array([...n,...d,...h]);return(0,Y8.uint8ArrayToHex)(m)})}decrypt(e){return y(this,null,function*(){let r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(function(){return y(this,null,function*(){let s=yield crypto.subtle.importKey("raw",(0,Y8.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,Y8.hexStringToUint8Array)(e),a=o.slice(0,12),c=o.slice(12,28),u=o.slice(28),d=new Uint8Array([...u,...c]),h={name:"AES-GCM",iv:new Uint8Array(a)};try{let m=yield window.crypto.subtle.decrypt(h,s,d),w=new TextDecoder;n(w.decode(m))}catch(m){i(m)}})})()})})}};Q8.Cipher=BP});var rie=F(X8=>{"use strict";Object.defineProperty(X8,"__esModule",{value:!0});X8.WalletLinkHTTP=void 0;var UP=class{constructor(e,r,n){this.linkAPIUrl=e,this.sessionId=r;let i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}markUnseenEventsAsSeen(e){return y(this,null,function*(){return Promise.all(e.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))})}fetchUnseenEvents(){return y(this,null,function*(){var e;let r=yield fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){let{events:n,error:i}=yield r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);let s=(e=n?.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${r.status}`)})}};X8.WalletLinkHTTP=UP});var nie=F(i1=>{"use strict";Object.defineProperty(i1,"__esModule",{value:!0});i1.WalletLinkWebSocket=i1.ConnectionState=void 0;var n1=function(t){return t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t}(n1||(i1.ConnectionState=n1={})),jP=class{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}connect(){return y(this,null,function*(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){r(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,n1.CONNECTING),i.onclose=s=>{var o;this.clearWebSocket(),r(new Error(`websocket error ${s.code}: ${s.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,n1.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,n1.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},i.onmessage=s=>{var o,a;if(s.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{let c=JSON.parse(s.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})})}disconnect(){var e;let{webSocket:r}=this;if(r){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,n1.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){let{webSocket:r}=this;if(!r){this.pendingData.push(e),this.connect();return}r.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}};i1.WalletLinkWebSocket=jP});var oie=F(t4=>{"use strict";Object.defineProperty(t4,"__esModule",{value:!0});t4.WalletLinkConnection=void 0;var s1=N2(),OUe=tie(),bl=H8(),iie=V8(),o1=J8(),MUe=rie(),e4=nie(),sie=1e4,PUe=6e4,HP=class{constructor({session:e,linkAPIUrl:r,listener:n,diagnostic:i,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,s1.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",u=>a.JsonRpcUrl&&this.handleChainUpdated(u,a.JsonRpcUrl)]]).forEach((u,d)=>{let h=a[d];h!==void 0&&u(h)})},this.handleDestroyed=a=>{var c,u;a==="1"&&((c=this.listener)===null||c===void 0||c.resetAndReload(),(u=this.diagnostic)===null||u===void 0||u.log(bl.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:o1.Session.hash(this.session.id)}))},this.handleAccountUpdated=a=>y(this,null,function*(){var c,u;try{let d=yield this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.accountUpdated(d)}catch{(u=this.diagnostic)===null||u===void 0||u.log(bl.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}}),this.handleMetadataUpdated=(a,c)=>y(this,null,function*(){var u,d;try{let h=yield this.cipher.decrypt(c);(u=this.listener)===null||u===void 0||u.metadataUpdated(a,h)}catch{(d=this.diagnostic)===null||d===void 0||d.log(bl.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:a})}}),this.handleWalletUsernameUpdated=a=>y(this,null,function*(){this.handleMetadataUpdated(iie.WALLET_USER_NAME_KEY,a)}),this.handleAppVersionUpdated=a=>y(this,null,function*(){this.handleMetadataUpdated(iie.APP_VERSION_KEY,a)}),this.handleChainUpdated=(a,c)=>y(this,null,function*(){var u,d;try{let h=yield this.cipher.decrypt(a),m=yield this.cipher.decrypt(c);(u=this.listener)===null||u===void 0||u.chainUpdated(h,m)}catch{(d=this.diagnostic)===null||d===void 0||d.log(bl.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}}),this.session=e,this.cipher=new OUe.Cipher(e.secret),this.diagnostic=i,this.listener=n;let o=new e4.WalletLinkWebSocket(`${r}/rpc`,s);o.setConnectionStateListener(a=>y(this,null,function*(){var c;(c=this.diagnostic)===null||c===void 0||c.log(bl.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:o1.Session.hash(e.id)});let u=!1;switch(a){case e4.ConnectionState.DISCONNECTED:if(!this.destroyed){let d=()=>y(this,null,function*(){yield new Promise(h=>setTimeout(h,5e3)),this.destroyed||o.connect().catch(()=>{d()})});d()}break;case e4.ConnectionState.CONNECTED:try{yield this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),u=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},sie),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case e4.ConnectionState.CONNECTING:break}this.connected!==u&&(this.connected=u)})),o.setIncomingDataListener(a=>{var c,u,d;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let h=a.type==="IsLinkedOK"?a.linked:void 0;(c=this.diagnostic)===null||c===void 0||c.log(bl.EVENTS.LINKED,{sessionIdHash:o1.Session.hash(e.id),linked:h,type:a.type,onlineGuests:a.onlineGuests}),this.linked=h||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(u=this.diagnostic)===null||u===void 0||u.log(bl.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o1.Session.hash(e.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((d=this.requestResolutions.get(a.id))===null||d===void 0||d(a))}),this.ws=o,this.http=new MUe.WalletLinkHTTP(r,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(bl.EVENTS.STARTED_CONNECTING,{sessionIdHash:o1.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(bl.EVENTS.DISCONNECTED,{sessionIdHash:o1.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var r,n;this._connected=e,e&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(e)}setOnceConnected(e){return new Promise(r=>{this.connected?e().then(r):this.onceConnected=()=>{e().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var r,n;this._linked=e,e&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(r=>{this.linked?e().then(r):this.onceLinked=()=>{e().then(r),this.onceLinked=void 0}})}handleIncomingEvent(e){return y(this,null,function*(){var r,n;if(!(e.type!=="Event"||e.event!=="Web3Response"))try{let i=yield this.cipher.decrypt(e.data),s=JSON.parse(i);if(s.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(s)}catch{(n=this.diagnostic)===null||n===void 0||n.log(bl.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}})}checkUnseenEvents(){return y(this,null,function*(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}yield new Promise(e=>setTimeout(e,250));try{yield this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}})}fetchUnseenEventsAPI(){return y(this,null,function*(){this.shouldFetchUnseenEventsOnConnect=!1,(yield this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))})}setSessionMetadata(e,r){return y(this,null,function*(){let n={type:"SetSessionConfig",id:(0,s1.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:r}};return this.setOnceConnected(()=>y(this,null,function*(){let i=yield this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")}))})}publishEvent(e,r,n=!1){return y(this,null,function*(){let i=yield this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,s1.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(()=>y(this,null,function*(){let o=yield this.makeRequest(s);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId}))})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>sie*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}makeRequest(n){return y(this,arguments,function*(e,r=PUe){let i=e.id;this.sendData(e);let s;return Promise.race([new Promise((o,a)=>{s=window.setTimeout(()=>{a(new Error(`request ${i} timed out`))},r)}),new Promise(o=>{this.requestResolutions.set(i,a=>{clearTimeout(s),o(a),this.requestResolutions.delete(i)})})])})}authenticate(){return y(this,null,function*(){let e={type:"HostSession",id:(0,s1.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=yield this.makeRequest(e);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")})}sendIsLinked(){let e={type:"IsLinked",id:(0,s1.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){let e={type:"GetSessionConfig",id:(0,s1.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}};t4.WalletLinkConnection=HP});var aie=F(VP=>{"use strict";Object.defineProperty(VP,"__esModule",{value:!0});VP.default='@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}'});var $P=F(a1=>{"use strict";var kUe=a1&&a1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(a1,"__esModule",{value:!0});a1.injectCssReset=void 0;var LUe=kUe(aie());function FUe(){let t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(LUe.default)),document.documentElement.appendChild(t)}a1.injectCssReset=FUe});var io={};An(io,{Component:()=>H2,Fragment:()=>q2,cloneElement:()=>WUe,createContext:()=>zUe,createElement:()=>yie,createRef:()=>UUe,h:()=>yie,hydrate:()=>Cie,isValidElement:()=>hie,options:()=>Vr,render:()=>_ie,toChildArray:()=>Eie});function $u(t,e){for(var r in e)t[r]=e[r];return t}function gie(t){var e=t.parentNode;e&&e.removeChild(t)}function yie(t,e,r){var n,i,s,o={};for(s in e)s=="key"?n=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?$2.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return j2(t,o,n,i,null)}function j2(t,e,r,n,i){var s={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++die,__i:-1,__u:0};return i==null&&Vr.vnode!=null&&Vr.vnode(s),s}function UUe(){return{current:null}}function q2(t){return t.children}function H2(t,e){this.props=t,this.context=e}function c1(t,e){if(e==null)return t.__?c1(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?c1(t):null}function jUe(t,e,r){var n,i=t.__v,s=i.__e,o=t.__P;if(o)return(n=$u({},i)).__v=i.__v+1,Vr.vnode&&Vr.vnode(n),KP(o,n,i,t.__n,o.ownerSVGElement!==void 0,32&i.__u?[s]:null,e,s??c1(i),!!(32&i.__u),r),n.__v=i.__v,n.__.__k[n.__i]=n,n.__d=void 0,n.__e!=s&&wie(n),n}function wie(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return wie(t)}}function WP(t){(!t.__d&&(t.__d=!0)&&Lp.push(t)&&!n4.__r++||cie!==Vr.debounceRendering)&&((cie=Vr.debounceRendering)||pie)(n4)}function n4(){var t,e,r,n=[],i=[];for(Lp.sort(qP);t=Lp.shift();)t.__d&&(r=Lp.length,e=jUe(t,n,i)||e,r===0||Lp.length>r?(zP(n,e,i),i.length=n.length=0,e=void 0,Lp.sort(qP)):e&&Vr.__c&&Vr.__c(e,ZP));e&&zP(n,e,i),n4.__r=0}function vie(t,e,r,n,i,s,o,a,c,u,d){var h,m,w,_,C,A=n&&n.__k||ZP,R=e.length;for(r.__d=c,HUe(r,e,A),c=r.__d,h=0;h<R;h++)(w=r.__k[h])!=null&&typeof w!="boolean"&&typeof w!="function"&&(m=w.__i===-1?V2:A[w.__i]||V2,w.__i=h,KP(t,w,m,i,s,o,a,c,u,d),_=w.__e,w.ref&&m.ref!=w.ref&&(m.ref&&JP(m.ref,null,w),d.push(w.ref,w.__c||_,w)),C==null&&_!=null&&(C=_),65536&w.__u||m.__k===w.__k?c=bie(w,c,t):typeof w.type=="function"&&w.__d!==void 0?c=w.__d:_&&(c=_.nextSibling),w.__d=void 0,w.__u&=-196609);r.__d=c,r.__e=C}function HUe(t,e,r){var n,i,s,o,a,c=e.length,u=r.length,d=u,h=0;for(t.__k=[],n=0;n<c;n++)o=n+h,(i=t.__k[n]=(i=e[n])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?j2(null,i,null,null,null):i4(i)?j2(q2,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?j2(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=t,i.__b=t.__b+1,a=VUe(i,r,o,d),i.__i=a,s=null,a!==-1&&(d--,(s=r[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&h--,typeof i.type!="function"&&(i.__u|=65536)):a!==o&&(a===o+1?h++:a>o?d>c-o?h+=a-o:h--:a<o?a==o-1&&(h=a-o):h=0,a!==n+h&&(i.__u|=65536))):(s=r[o])&&s.key==null&&s.__e&&!(131072&s.__u)&&(s.__e==t.__d&&(t.__d=c1(s)),GP(s,s,!1),r[o]=null,d--);if(d)for(n=0;n<u;n++)(s=r[n])!=null&&!(131072&s.__u)&&(s.__e==t.__d&&(t.__d=c1(s)),GP(s,s))}function bie(t,e,r){var n,i;if(typeof t.type=="function"){for(n=t.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=t,e=bie(n[i],e,r));return e}t.__e!=e&&(r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function Eie(t,e){return e=e||[],t==null||typeof t=="boolean"||(i4(t)?t.some(function(r){Eie(r,e)}):e.push(t)),e}function VUe(t,e,r,n){var i=t.key,s=t.type,o=r-1,a=r+1,c=e[r];if(c===null||c&&i==c.key&&s===c.type&&!(131072&c.__u))return r;if(n>(c!=null&&!(131072&c.__u)?1:0))for(;o>=0||a<e.length;){if(o>=0){if((c=e[o])&&!(131072&c.__u)&&i==c.key&&s===c.type)return o;o--}if(a<e.length){if((c=e[a])&&!(131072&c.__u)&&i==c.key&&s===c.type)return a;a++}}return-1}function lie(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||BUe.test(e)?r:r+"px"}function r4(t,e,r,n,i){var s;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||lie(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||lie(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r.u=n.u:(r.u=Date.now(),t.addEventListener(e,s?fie:uie,s)):t.removeEventListener(e,s?fie:uie,s);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function uie(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(Vr.event?Vr.event(t):t)}}function fie(t){if(this.l)return this.l[t.type+!0](Vr.event?Vr.event(t):t)}function KP(t,e,r,n,i,s,o,a,c,u){var d,h,m,w,_,C,A,R,L,U,V,Q,Y,k,q,ie=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[a=e.__e=r.__e]),(d=Vr.__b)&&d(e);e:if(typeof ie=="function")try{if(R=e.props,L=(d=ie.contextType)&&n[d.__c],U=d?L?L.props.value:d.__:n,r.__c?A=(h=e.__c=r.__c).__=h.__E:("prototype"in ie&&ie.prototype.render?e.__c=h=new ie(R,U):(e.__c=h=new H2(R,U),h.constructor=ie,h.render=qUe),L&&L.sub(h),h.props=R,h.state||(h.state={}),h.context=U,h.__n=n,m=h.__d=!0,h.__h=[],h._sb=[]),h.__s==null&&(h.__s=h.state),ie.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=$u({},h.__s)),$u(h.__s,ie.getDerivedStateFromProps(R,h.__s))),w=h.props,_=h.state,h.__v=e,m)ie.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(ie.getDerivedStateFromProps==null&&R!==w&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(R,U),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(R,h.__s,U)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(h.props=R,h.state=h.__s,h.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(W){W&&(W.__=e)}),V=0;V<h._sb.length;V++)h.__h.push(h._sb[V]);h._sb=[],h.__h.length&&o.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(R,h.__s,U),h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(w,_,C)})}if(h.context=U,h.props=R,h.__P=t,h.__e=!1,Q=Vr.__r,Y=0,"prototype"in ie&&ie.prototype.render){for(h.state=h.__s,h.__d=!1,Q&&Q(e),d=h.render(h.props,h.state,h.context),k=0;k<h._sb.length;k++)h.__h.push(h._sb[k]);h._sb=[]}else do h.__d=!1,Q&&Q(e),d=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++Y<25);h.state=h.__s,h.getChildContext!=null&&(n=$u($u({},n),h.getChildContext())),m||h.getSnapshotBeforeUpdate==null||(C=h.getSnapshotBeforeUpdate(w,_)),vie(t,i4(q=d!=null&&d.type===q2&&d.key==null?d.props.children:d)?q:[q],e,r,n,i,s,o,a,c,u),h.base=e.__e,e.__u&=-161,h.__h.length&&o.push(h),A&&(h.__E=h.__=null)}catch(W){e.__v=null,c||s!=null?(e.__e=a,e.__u|=c?160:32,s[s.indexOf(a)]=null):(e.__e=r.__e,e.__k=r.__k),Vr.__e(W,e,r)}else s==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=$Ue(r.__e,e,r,n,i,s,o,c,u);(d=Vr.diffed)&&d(e)}function zP(t,e,r){for(var n=0;n<r.length;n++)JP(r[n],r[++n],r[++n]);Vr.__c&&Vr.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){Vr.__e(s,i.__v)}})}function $Ue(t,e,r,n,i,s,o,a,c){var u,d,h,m,w,_,C,A=r.props,R=e.props,L=e.type;if(L==="svg"&&(i=!0),s!=null){for(u=0;u<s.length;u++)if((w=s[u])&&"setAttribute"in w==!!L&&(L?w.localName===L:w.nodeType===3)){t=w,s[u]=null;break}}if(t==null){if(L===null)return document.createTextNode(R);t=i?document.createElementNS("http://www.w3.org/2000/svg",L):document.createElement(L,R.is&&R),s=null,a=!1}if(L===null)A===R||a&&t.data===R||(t.data=R);else{if(s=s&&$2.call(t.childNodes),A=r.props||V2,!a&&s!=null)for(A={},u=0;u<t.attributes.length;u++)A[(w=t.attributes[u]).name]=w.value;for(u in A)w=A[u],u=="children"||(u=="dangerouslySetInnerHTML"?h=w:u==="key"||u in R||r4(t,u,null,w,i));for(u in R)w=R[u],u=="children"?m=w:u=="dangerouslySetInnerHTML"?d=w:u=="value"?_=w:u=="checked"?C=w:u==="key"||a&&typeof w!="function"||A[u]===w||r4(t,u,w,A[u],i);if(d)a||h&&(d.__html===h.__html||d.__html===t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(h&&(t.innerHTML=""),vie(t,i4(m)?m:[m],e,r,n,i&&L!=="foreignObject",s,o,s?s[0]:r.__k&&c1(r,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&gie(s[u]);a||(u="value",_!==void 0&&(_!==t[u]||L==="progress"&&!_||L==="option"&&_!==A[u])&&r4(t,u,_,A[u],!1),u="checked",C!==void 0&&C!==t[u]&&r4(t,u,C,A[u],!1))}return t}function JP(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(n){Vr.__e(n,r)}}function GP(t,e,r){var n,i;if(Vr.unmount&&Vr.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||JP(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){Vr.__e(s,e)}n.base=n.__P=null,t.__c=void 0}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&GP(n[i],e,r||typeof t.type!="function");r||t.__e==null||gie(t.__e),t.__=t.__e=t.__d=void 0}function qUe(t,e,r){return this.constructor(t,r)}function _ie(t,e,r){var n,i,s,o;Vr.__&&Vr.__(t,e),i=(n=typeof r=="function")?null:r&&r.__k||e.__k,s=[],o=[],KP(e,t=(!n&&r||e).__k=yie(q2,null,[t]),i||V2,V2,e.ownerSVGElement!==void 0,!n&&r?[r]:i?null:e.firstChild?$2.call(e.childNodes):null,s,!n&&r?r:i?i.__e:e.firstChild,n,o),t.__d=void 0,zP(s,t,o)}function Cie(t,e){_ie(t,e,Cie)}function WUe(t,e,r){var n,i,s,o,a=$u({},t.props);for(s in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)s=="key"?n=e[s]:s=="ref"?i=e[s]:a[s]=e[s]===void 0&&o!==void 0?o[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?$2.call(arguments,2):r),j2(t.type,a,n||t.key,i||t.ref,null)}function zUe(t,e){var r={__c:e="__cC"+mie++,__:t,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(a){a.__e=!0,WP(a)})},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}var $2,Vr,die,hie,Lp,cie,pie,qP,mie,V2,ZP,BUe,i4,ks=ma(()=>{"use strict";V2={},ZP=[],BUe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,i4=Array.isArray;$2=ZP.slice,Vr={__e:function(t,e,r,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},die=0,hie=function(t){return t!=null&&t.constructor==null},H2.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$u({},this.state),typeof t=="function"&&(t=t($u({},r),this.props)),t&&$u(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),WP(this))},H2.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),WP(this))},H2.prototype.render=q2,Lp=[],pie=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qP=function(t,e){return t.__v.__b-e.__v.__b},n4.__r=0,mie=0});var l1={};An(l1,{clsx:()=>Iie,default:()=>GUe});function xie(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=xie(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Iie(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=xie(t))&&(n&&(n+=" "),n+=e);return n}var GUe,u1=ma(()=>{"use strict";GUe=Iie});var W2={};An(W2,{useCallback:()=>YUe,useContext:()=>QUe,useDebugValue:()=>XUe,useEffect:()=>ZUe,useErrorBoundary:()=>eje,useId:()=>tje,useImperativeHandle:()=>JUe,useLayoutEffect:()=>Fie,useMemo:()=>XP,useReducer:()=>Lie,useRef:()=>KUe,useState:()=>kie});function Fp(t,e){Jn.__h&&Jn.__h(fn,t,f1||e),f1=0;var r=fn.__H||(fn.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:s4}),r.__[t]}function kie(t){return f1=1,Lie(Bie,t)}function Lie(t,e,r){var n=Fp(qu++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):Bie(void 0,e),function(a){var c=n.__N?n.__N[0]:n.__[0],u=n.t(c,a);c!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=fn,!fn.u)){var i=function(a,c,u){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!s||s.call(this,a,c,u);var h=!1;return d.forEach(function(m){if(m.__N){var w=m.__[0];m.__=m.__N,m.__N=void 0,w!==m.__[0]&&(h=!0)}}),!(!h&&n.__c.props===a)&&(!s||s.call(this,a,c,u))};fn.u=!0;var s=fn.shouldComponentUpdate,o=fn.componentWillUpdate;fn.componentWillUpdate=function(a,c,u){if(this.__e){var d=s;s=void 0,i(a,c,u),s=d}o&&o.call(this,a,c,u)},fn.shouldComponentUpdate=i}return n.__N||n.__}function ZUe(t,e){var r=Fp(qu++,3);!Jn.__s&&e7(r.__H,e)&&(r.__=t,r.i=e,fn.__H.__h.push(r))}function Fie(t,e){var r=Fp(qu++,4);!Jn.__s&&e7(r.__H,e)&&(r.__=t,r.i=e,fn.__h.push(r))}function KUe(t){return f1=5,XP(function(){return{current:t}},[])}function JUe(t,e,r){f1=6,Fie(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function XP(t,e){var r=Fp(qu++,7);return e7(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function YUe(t,e){return f1=8,XP(function(){return t},e)}function QUe(t){var e=fn.context[t.__c],r=Fp(qu++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(fn)),e.props.value):t.__}function XUe(t,e){Jn.useDebugValue&&Jn.useDebugValue(e?e(t):t)}function eje(t){var e=Fp(qu++,10),r=kie();return e.__=t,fn.componentDidCatch||(fn.componentDidCatch=function(n,i){e.__&&e.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function tje(){var t=Fp(qu++,11);if(!t.__){for(var e=fn.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function rje(){for(var t;t=Pie.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(o4),t.__H.__h.forEach(QP),t.__H.__h=[]}catch(e){t.__H.__h=[],Jn.__e(e,t.__v)}}function nje(t){var e,r=function(){clearTimeout(n),Mie&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);Mie&&(e=requestAnimationFrame(r))}function o4(t){var e=fn,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),fn=e}function QP(t){var e=fn;t.__c=t.__(),fn=e}function e7(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Bie(t,e){return typeof e=="function"?e(t):e}var qu,fn,YP,Aie,f1,Pie,s4,Jn,Sie,Die,Rie,Tie,Nie,Oie,Mie,z2=ma(()=>{"use strict";ks();f1=0,Pie=[],s4=[],Jn=Vr,Sie=Jn.__b,Die=Jn.__r,Rie=Jn.diffed,Tie=Jn.__c,Nie=Jn.unmount,Oie=Jn.__;Jn.__b=function(t){fn=null,Sie&&Sie(t)},Jn.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Oie&&Oie(t,e)},Jn.__r=function(t){Die&&Die(t),qu=0;var e=(fn=t.__c).__H;e&&(YP===fn?(e.__h=[],fn.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=s4,r.__N=r.i=void 0})):(e.__h.forEach(o4),e.__h.forEach(QP),e.__h=[],qu=0)),YP=fn},Jn.diffed=function(t){Rie&&Rie(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Pie.push(e)!==1&&Aie===Jn.requestAnimationFrame||((Aie=Jn.requestAnimationFrame)||nje)(rje)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==s4&&(r.__=r.__V),r.i=void 0,r.__V=s4})),YP=fn=null},Jn.__c=function(t,e){e.some(function(r){try{r.__h.forEach(o4),r.__h=r.__h.filter(function(n){return!n.__||QP(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Jn.__e(n,r.__v)}}),Tie&&Tie(t,e)},Jn.unmount=function(t){Nie&&Nie(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{o4(n)}catch(i){e=i}}),r.__H=void 0,e&&Jn.__e(e,r.__v))};Mie=typeof requestAnimationFrame=="function"});var jie=F(a4=>{"use strict";Object.defineProperty(a4,"__esModule",{value:!0});a4.CloseIcon=void 0;var Uie=(ks(),St(io));function ije(t){return(0,Uie.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,Uie.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}a4.CloseIcon=ije});var Hie=F(l4=>{"use strict";Object.defineProperty(l4,"__esModule",{value:!0});l4.CoinbaseWalletRound=void 0;var c4=(ks(),St(io));function sje(t){return(0,c4.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,c4.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,c4.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,c4.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}l4.CoinbaseWalletRound=sje});var Vie=F(u4=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});u4.QRCodeIcon=void 0;var G2=(ks(),St(io));function oje(t){return(0,G2.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),(0,G2.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,G2.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,G2.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,G2.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}u4.QRCodeIcon=oje});var Gie=F((nIt,zie)=>{"use strict";function $ie(t){this.mode=ea.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var n=[],i=this.data.charCodeAt(e);i>65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}$ie.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}};function _l(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}_l.prototype={addData:function(t){var e=new $ie(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=_l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=Yn.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*i,a=0;a<this.modules[s].length;a++){var c=a*i,u=this.modules[s][a];u&&(n.beginFill(0,100),n.moveTo(c,o),n.lineTo(c+i,o),n.lineTo(c+i,o+i),n.lineTo(c,o+i),n.endFill())}return n},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=Yn.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];if(this.modules[n][i]==null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)s==-2||s==2||o==-2||o==2||s==0&&o==0?this.modules[n+s][i+o]=!0:this.modules[n+s][i+o]=!1}},setupTypeNumber:function(t){for(var e=Yn.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=Yn.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var c=!1;s<t.length&&(c=(t[s]>>>i&1)==1);var u=Yn.getMask(e,n,o-a);u&&(c=!c),this.modules[n][o-a]=c,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};_l.PAD0=236;_l.PAD1=17;_l.createData=function(t,e,r){for(var n=El.getRSBlocks(t,e),i=new qie,s=0;s<r.length;s++){var o=r[s];i.put(o.mode,4),i.put(o.getLength(),Yn.getLengthInBits(o.mode,t)),o.write(i)}for(var a=0,s=0;s<n.length;s++)a+=n[s].dataCount;if(i.getLengthInBits()>a*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+a*8+")");for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(_l.PAD0,8),i.getLengthInBits()>=a*8));)i.put(_l.PAD1,8);return _l.createBytes(i,n)};_l.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),a=0;a<e.length;a++){var c=e[a].dataCount,u=e[a].totalCount-c;n=Math.max(n,c),i=Math.max(i,u),s[a]=new Array(c);for(var d=0;d<s[a].length;d++)s[a][d]=255&t.buffer[d+r];r+=c;var h=Yn.getErrorCorrectPolynomial(u),m=new d1(s[a],h.getLength()-1),w=m.mod(h);o[a]=new Array(h.getLength()-1);for(var d=0;d<o[a].length;d++){var _=d+w.getLength()-o[a].length;o[a][d]=_>=0?w.get(_):0}}for(var C=0,d=0;d<e.length;d++)C+=e[d].totalCount;for(var A=new Array(C),R=0,d=0;d<n;d++)for(var a=0;a<e.length;a++)d<s[a].length&&(A[R++]=s[a][d]);for(var d=0;d<i;d++)for(var a=0;a<e.length;a++)d<o[a].length&&(A[R++]=o[a][d]);return A};var ea={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Rd={L:1,M:0,Q:3,H:2},Dd={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Yn={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;Yn.getBCHDigit(e)-Yn.getBCHDigit(Yn.G15)>=0;)e^=Yn.G15<<Yn.getBCHDigit(e)-Yn.getBCHDigit(Yn.G15);return(t<<10|e)^Yn.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;Yn.getBCHDigit(e)-Yn.getBCHDigit(Yn.G18)>=0;)e^=Yn.G18<<Yn.getBCHDigit(e)-Yn.getBCHDigit(Yn.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;t!=0;)e++,t>>>=1;return e},getPatternPosition:function(t){return Yn.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case Dd.PATTERN000:return(e+r)%2==0;case Dd.PATTERN001:return e%2==0;case Dd.PATTERN010:return r%3==0;case Dd.PATTERN011:return(e+r)%3==0;case Dd.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case Dd.PATTERN101:return e*r%2+e*r%3==0;case Dd.PATTERN110:return(e*r%2+e*r%3)%2==0;case Dd.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new d1([1],0),r=0;r<t;r++)e=e.multiply(new d1([1,Yi.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case ea.MODE_NUMBER:return 10;case ea.MODE_ALPHA_NUM:return 9;case ea.MODE_8BIT_BYTE:return 8;case ea.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case ea.MODE_NUMBER:return 12;case ea.MODE_ALPHA_NUM:return 11;case ea.MODE_8BIT_BYTE:return 16;case ea.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else if(e<41)switch(t){case ea.MODE_NUMBER:return 14;case ea.MODE_ALPHA_NUM:return 13;case ea.MODE_8BIT_BYTE:return 16;case ea.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}else throw new Error("type:"+e)},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(n,i),a=-1;a<=1;a++)if(!(n+a<0||e<=n+a))for(var c=-1;c<=1;c++)i+c<0||e<=i+c||a==0&&c==0||o==t.isDark(n+a,i+c)&&s++;s>5&&(r+=3+s-5)}for(var n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var u=0;t.isDark(n,i)&&u++,t.isDark(n+1,i)&&u++,t.isDark(n,i+1)&&u++,t.isDark(n+1,i+1)&&u++,(u==0||u==4)&&(r+=3)}for(var n=0;n<e;n++)for(var i=0;i<e-6;i++)t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var n=0;n<e-6;n++)t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(r+=40);for(var d=0,i=0;i<e;i++)for(var n=0;n<e;n++)t.isDark(n,i)&&d++;var h=Math.abs(100*d/e/e-50)/5;return r+=h*10,r}},Yi={glog:function(t){if(t<1)throw new Error("glog("+t+")");return Yi.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return Yi.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(Ai=0;Ai<8;Ai++)Yi.EXP_TABLE[Ai]=1<<Ai;var Ai;for(Ai=8;Ai<256;Ai++)Yi.EXP_TABLE[Ai]=Yi.EXP_TABLE[Ai-4]^Yi.EXP_TABLE[Ai-5]^Yi.EXP_TABLE[Ai-6]^Yi.EXP_TABLE[Ai-8];var Ai;for(Ai=0;Ai<255;Ai++)Yi.LOG_TABLE[Yi.EXP_TABLE[Ai]]=Ai;var Ai;function d1(t,e){if(t.length==null)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(var n=0;n<t.length-r;n++)this.num[n]=t[n+r]}d1.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<t.getLength();n++)e[r+n]^=Yi.gexp(Yi.glog(this.get(r))+Yi.glog(t.get(n)));return new d1(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=Yi.glog(this.get(0))-Yi.glog(t.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<t.getLength();n++)r[n]^=Yi.gexp(Yi.glog(t.get(n))+e);return new d1(r,0).mod(t)}};function El(t,e){this.totalCount=t,this.dataCount=e}El.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];El.getRSBlocks=function(t,e){var r=El.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=r.length/3,i=[],s=0;s<n;s++)for(var o=r[s*3+0],a=r[s*3+1],c=r[s*3+2],u=0;u<o;u++)i.push(new El(a,c));return i};El.getRsBlockTable=function(t,e){switch(e){case Rd.L:return El.RS_BLOCK_TABLE[(t-1)*4+0];case Rd.M:return El.RS_BLOCK_TABLE[(t-1)*4+1];case Rd.Q:return El.RS_BLOCK_TABLE[(t-1)*4+2];case Rd.H:return El.RS_BLOCK_TABLE[(t-1)*4+3];default:return}};function qie(){this.buffer=[],this.length=0}qie.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var t7=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Wie(t){var e=this;if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof t=="string"&&(t={content:t}),t)for(var r in t)this.options[r]=t[r];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function n(u){switch(u){case"L":return Rd.L;case"M":return Rd.M;case"Q":return Rd.Q;case"H":return Rd.H;default:throw new Error("Unknwon error correction level: "+u)}}function i(u,d){for(var h=s(u),m=1,w=0,_=0,C=t7.length;_<=C;_++){var A=t7[_];if(!A)throw new Error("Content too long: expected "+w+" but got "+h);switch(d){case"L":w=A[0];break;case"M":w=A[1];break;case"Q":w=A[2];break;case"H":w=A[3];break;default:throw new Error("Unknwon error correction level: "+d)}if(h<=w)break;m++}if(m>t7.length)throw new Error("Content too long");return m}function s(u){var d=encodeURI(u).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return d.length+(d.length!=u?3:0)}var o=this.options.content,a=i(o,this.options.ecl),c=n(this.options.ecl);this.qrcode=new _l(a,c),this.qrcode.addData(o),this.qrcode.make()}Wie.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;typeof t>"u"&&(t={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?"  ":"",s=n?`\r
`:"",o=e.width,a=e.height,c=r.length,u=o/(c+2*e.padding),d=a/(c+2*e.padding),h=typeof e.join<"u"?!!e.join:!1,m=typeof e.swap<"u"?!!e.swap:!1,w=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,_=typeof e.predefined<"u"?!!e.predefined:!1,C=_?i+'<defs><path id="qrmodule" d="M0 0 h'+d+" v"+u+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+s:"",A=i+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+s,R="",L="",U=0;U<c;U++)for(var V=0;V<c;V++){var Q=r[V][U];if(Q){var Y=V*u+e.padding*u,k=U*d+e.padding*d;if(m){var q=Y;Y=k,k=q}if(h){var ie=u+Y,W=d+k;Y=Number.isInteger(Y)?Number(Y):Y.toFixed(2),k=Number.isInteger(k)?Number(k):k.toFixed(2),ie=Number.isInteger(ie)?Number(ie):ie.toFixed(2),W=Number.isInteger(W)?Number(W):W.toFixed(2),L+="M"+Y+","+k+" V"+W+" H"+ie+" V"+k+" H"+Y+" Z "}else _?R+=i+'<use x="'+Y.toString()+'" y="'+k.toString()+'" href="#qrmodule" />'+s:R+=i+'<rect x="'+Y.toString()+'" y="'+k.toString()+'" width="'+u+'" height="'+d+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+s}}h&&(R=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+L+'" />');let z="";if(this.options.image!==void 0&&this.options.image.svg){let D=o*this.options.image.width/100,g=a*this.options.image.height/100,v=o/2-D/2,x=a/2-g/2;z+=`<svg x="${v}" y="${x}" width="${D}" height="${g}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,z+=this.options.image.svg+s,z+="</svg>"}var X="";switch(t.container){case"svg":w&&(X+='<?xml version="1.0" standalone="yes"?>'+s),X+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+s,X+=C+A+R,X+=z,X+="</svg>";break;case"svg-viewbox":w&&(X+='<?xml version="1.0" standalone="yes"?>'+s),X+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+s,X+=C+A+R,X+=z,X+="</svg>";break;case"g":X+='<g width="'+o+'" height="'+a+'">'+s,X+=C+A+R,X+=z,X+="</g>";break;default:X+=(C+A+R+z).replace(/^\s+/,"");break}return X};zie.exports=Wie});var Kie=F(h1=>{"use strict";var aje=h1&&h1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(h1,"__esModule",{value:!0});h1.QRCode=void 0;var cje=(ks(),St(io)),Zie=(z2(),St(W2)),lje=aje(Gie()),uje=t=>{let[e,r]=(0,Zie.useState)("");return(0,Zie.useEffect)(()=>{var n,i;let s=new lje.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:(n=t.width)!==null&&n!==void 0?n:256,height:(i=t.height)!==null&&i!==void 0?i:256,padding:0,image:t.image}),o=Buffer.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)},[t.bgColor,t.content,t.fgColor,t.height,t.image,t.width]),e?(0,cje.h)("img",{src:e,alt:"QR Code"}):null};h1.QRCode=uje});var Jie=F(r7=>{"use strict";Object.defineProperty(r7,"__esModule",{value:!0});r7.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"});var Yie=F(p1=>{"use strict";var fje=p1&&p1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(p1,"__esModule",{value:!0});p1.Spinner=void 0;var f4=(ks(),St(io)),dje=fje(Jie()),hje=t=>{var e;let r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||"#000";return(0,f4.h)("div",{class:"-cbwsdk-spinner"},(0,f4.h)("style",null,dje.default),(0,f4.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,f4.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};p1.Spinner=hje});var Qie=F(n7=>{"use strict";Object.defineProperty(n7,"__esModule",{value:!0});n7.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"});var tse=F(Td=>{"use strict";var Xie=Td&&Td.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Td,"__esModule",{value:!0});Td.CoinbaseWalletSteps=Td.ConnectContent=void 0;var Bp=Xie((u1(),St(l1))),Cr=(ks(),St(io)),pje=gl(),mje=k8(),gje=jie(),yje=Hie(),wje=Vie(),vje=Kie(),bje=Yie(),Eje=Xie(Qie()),i7={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:ese},_je=t=>t==="light"?"#FFFFFF":"#0A0B0D";function Cje(t){let{theme:e}=t,r=(0,pje.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),n=i7.steps;return(0,Cr.h)("div",{"data-testid":"connect-content",className:(0,Bp.default)("-cbwsdk-connect-content",e)},(0,Cr.h)("style",null,Eje.default),(0,Cr.h)("div",{className:"-cbwsdk-connect-content-header"},(0,Cr.h)("h2",{className:(0,Bp.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with our mobile app"),t.onCancel&&(0,Cr.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,Cr.h)(gje.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Cr.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,Cr.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,Cr.h)(xje,{title:i7.title,description:i7.description,theme:e})),(0,Cr.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,Cr.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,Cr.h)(vje.QRCode,{content:r,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,Cr.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:mje.LIB_VERSION}),(0,Cr.h)("input",{type:"hidden",value:r})),(0,Cr.h)(n,{theme:e}),!t.isConnected&&(0,Cr.h)("div",{"data-testid":"connecting-spinner",className:(0,Bp.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,Cr.h)(bje.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,Cr.h)("p",null,"Connecting...")))))}Td.ConnectContent=Cje;function xje({title:t,description:e,theme:r}){return(0,Cr.h)("div",{className:(0,Bp.default)("-cbwsdk-connect-item",r)},(0,Cr.h)("div",null,(0,Cr.h)(yje.CoinbaseWalletRound,null)),(0,Cr.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,Cr.h)("h3",{className:"-cbwsdk-connect-item-title"},t),(0,Cr.h)("p",{className:"-cbwsdk-connect-item-description"},e)))}function ese({theme:t}){return(0,Cr.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,Cr.h)("li",{className:(0,Bp.default)("-cbwsdk-wallet-steps-item",t)},(0,Cr.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,Cr.h)("li",{className:(0,Bp.default)("-cbwsdk-wallet-steps-item",t)},(0,Cr.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,Cr.h)("span",null,"Tap ",(0,Cr.h)("strong",null,"Scan")," "),(0,Cr.h)("span",{className:(0,Bp.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,Cr.h)(wje.QRCodeIcon,{fill:_je(t)})))))}Td.CoinbaseWalletSteps=ese});var nse=F(d4=>{"use strict";Object.defineProperty(d4,"__esModule",{value:!0});d4.ArrowLeftIcon=void 0;var rse=(ks(),St(io));function Ije(t){return(0,rse.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(0,rse.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}d4.ArrowLeftIcon=Ije});var ise=F(h4=>{"use strict";Object.defineProperty(h4,"__esModule",{value:!0});h4.LaptopIcon=void 0;var s7=(ks(),St(io));function Aje(t){return(0,s7.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,s7.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,s7.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}h4.LaptopIcon=Aje});var ose=F(p4=>{"use strict";Object.defineProperty(p4,"__esModule",{value:!0});p4.SafeIcon=void 0;var sse=(ks(),St(io));function Sje(t){return(0,sse.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,sse.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}p4.SafeIcon=Sje});var ase=F(o7=>{"use strict";Object.defineProperty(o7,"__esModule",{value:!0});o7.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"});var lse=F(m1=>{"use strict";var cse=m1&&m1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(m1,"__esModule",{value:!0});m1.TryExtensionContent=void 0;var Up=cse((u1(),St(l1))),Si=(ks(),St(io)),a7=(z2(),St(W2)),Dje=nse(),Rje=ise(),Tje=ose(),Nje=cse(ase());function Oje({theme:t}){let[e,r]=(0,a7.useState)(!1),n=(0,a7.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,a7.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,Si.h)("div",{class:(0,Up.default)("-cbwsdk-try-extension",t)},(0,Si.h)("style",null,Nje.default),(0,Si.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Si.h)("h3",{class:(0,Up.default)("-cbwsdk-try-extension-heading",t)},"Or try the Coinbase Wallet browser extension"),(0,Si.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,Si.h)("button",{class:(0,Up.default)("-cbwsdk-try-extension-cta",t),onClick:i},e?"Refresh":"Install"),(0,Si.h)("div",null,!e&&(0,Si.h)(Dje.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:t==="light"?"#0052FF":"#588AF5"})))),(0,Si.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Si.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,Si.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Si.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Si.h)("span",{class:(0,Up.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,Si.h)(Rje.LaptopIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Si.h)("div",{class:(0,Up.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,Si.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Si.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Si.h)("span",{class:(0,Up.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,Si.h)(Tje.SafeIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Si.h)("div",{class:(0,Up.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}m1.TryExtensionContent=Oje});var use=F(c7=>{"use strict";Object.defineProperty(c7,"__esModule",{value:!0});c7.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"});var dse=F(g1=>{"use strict";var fse=g1&&g1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g1,"__esModule",{value:!0});g1.ConnectDialog=void 0;var l7=fse((u1(),St(l1))),jp=(ks(),St(io)),u7=(z2(),St(W2)),Mje=tse(),Pje=lse(),kje=fse(use()),Lje=t=>{let{isOpen:e,darkMode:r}=t,[n,i]=(0,u7.useState)(!e),[s,o]=(0,u7.useState)(!e);(0,u7.useEffect)(()=>{let c=[window.setTimeout(()=>{o(!e)},10)];return e?i(!1):c.push(window.setTimeout(()=>{i(!0)},360)),()=>{c.forEach(window.clearTimeout)}},[e]);let a=r?"dark":"light";return(0,jp.h)("div",{class:(0,l7.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,jp.h)("style",null,kje.default),(0,jp.h)("div",{class:(0,l7.default)("-cbwsdk-connect-dialog-backdrop",a,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,jp.h)("div",{class:"-cbwsdk-connect-dialog"},(0,jp.h)("div",{class:(0,l7.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,jp.h)(Mje.ConnectContent,{theme:a,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,jp.h)(Pje.TryExtensionContent,{theme:a}))))};g1.ConnectDialog=Lje});var hse=F(m4=>{"use strict";Object.defineProperty(m4,"__esModule",{value:!0});m4.LinkFlow=void 0;var f7=(ks(),St(io)),Fje=dse(),d7=class{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,f7.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,f7.render)((0,f7.h)(Fje.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};m4.LinkFlow=d7});var pse=F(h7=>{"use strict";Object.defineProperty(h7,"__esModule",{value:!0});h7.default=".-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;cursor: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}"});var g7=F(Fa=>{"use strict";var mse=Fa&&Fa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.SnackbarInstance=Fa.SnackbarContainer=Fa.Snackbar=void 0;var g4=mse((u1(),St(l1))),Di=(ks(),St(io)),p7=(z2(),St(W2)),Bje=mse(pse()),Uje="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",jje="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",m7=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let r=this.nextItemKey++;return this.items.set(r,e),this.render(),()=>{this.items.delete(r),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,Di.render)((0,Di.h)("div",null,(0,Di.h)(Fa.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,r])=>(0,Di.h)(Fa.SnackbarInstance,Object.assign({},r,{key:e}))))),this.root)}};Fa.Snackbar=m7;var Hje=t=>(0,Di.h)("div",{class:(0,g4.default)("-cbwsdk-snackbar-container")},(0,Di.h)("style",null,Bje.default),(0,Di.h)("div",{class:"-cbwsdk-snackbar"},t.children));Fa.SnackbarContainer=Hje;var Vje=({autoExpand:t,message:e,menuItems:r})=>{let[n,i]=(0,p7.useState)(!0),[s,o]=(0,p7.useState)(t??!1);(0,p7.useEffect)(()=>{let c=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{o(!0)},1e4)];return()=>{c.forEach(window.clearTimeout)}});let a=()=>{o(!s)};return(0,Di.h)("div",{class:(0,g4.default)("-cbwsdk-snackbar-instance",n&&"-cbwsdk-snackbar-instance-hidden",s&&"-cbwsdk-snackbar-instance-expanded")},(0,Di.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:a},(0,Di.h)("img",{src:Uje,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,Di.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),(0,Di.h)("div",{class:"-gear-container"},!s&&(0,Di.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,Di.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,Di.h)("img",{src:jje,class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,Di.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map((c,u)=>(0,Di.h)("div",{class:(0,g4.default)("-cbwsdk-snackbar-instance-menu-item",c.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:c.onClick,key:u},(0,Di.h)("svg",{width:c.svgWidth,height:c.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,Di.h)("path",{"fill-rule":c.defaultFillRule,"clip-rule":c.defaultClipRule,d:c.path,fill:"#AAAAAA"})),(0,Di.h)("span",{class:(0,g4.default)("-cbwsdk-snackbar-instance-menu-item-info",c.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},c.info)))))};Fa.SnackbarInstance=Vje});var w7=F(y4=>{"use strict";Object.defineProperty(y4,"__esModule",{value:!0});y4.WalletLinkRelayUI=void 0;var $je=$P(),qje=hse(),Wje=g7(),y7=class{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new Wje.Snackbar({darkMode:e.darkMode}),this.linkFlow=new qje.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,$je.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={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}]}:r={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(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}};y4.WalletLinkRelayUI=y7});var v7=F(v4=>{"use strict";Object.defineProperty(v4,"__esModule",{value:!0});v4.WalletLinkRelay=void 0;var y1=R2(),zje=N2(),Qn=gl(),Hp=H8(),gse=V8(),Nd=J8(),Gje=oie(),Vp=M8(),Zje=w7(),w4=class t extends gse.RelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=o=>{var a;this.isLinked=o;let c=this.storage.getItem(gse.LOCAL_STORAGE_ADDRESSES_KEY);if(o&&(this.session.linked=o),this.isUnlinkedErrorState=!1,c){let u=c.split(" "),d=this.storage.getItem("IsStandaloneSigning")==="true";if(u[0]!==""&&!o&&this.session.linked&&!d){this.isUnlinkedErrorState=!0;let h=this.getSessionIdHash();(a=this.diagnostic)===null||a===void 0||a.log(Hp.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:h})}}},this.metadataUpdated=(o,a)=>{this.storage.setItem(o,a)},this.chainUpdated=(o,a)=>{this.chainCallbackParams.chainId===o&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:o,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(o,a))},this.accountUpdated=o=>{this.accountsCallback&&this.accountsCallback([o]),t.accountRequestCallbackIds.size>0&&(Array.from(t.accountRequestCallbackIds.values()).forEach(a=>{let c={type:"WEB3_RESPONSE",id:a,response:{method:"requestEthereumAccounts",result:[o]}};this.invokeCallback(Object.assign(Object.assign({},c),{id:a}))}),t.accountRequestCallbackIds.clear())},this.connectedUpdated=o=>{this.ui.setConnected(o)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;let{session:n,ui:i,connection:s}=this.subscribe();this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){let e=Nd.Session.load(this.storage)||new Nd.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,i=new Gje.WalletLinkConnection({session:e,linkAPIUrl:r,diagnostic:n,listener:this}),{version:s,darkMode:o}=this.options,a=this.options.uiConstructor({linkAPIUrl:r,version:s,darkMode:o,session:e});return i.connect(),{session:e,ui:a,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{var e,r;let n=this.ui.isStandalone();(e=this.diagnostic)===null||e===void 0||e.log(Hp.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();let i=Nd.Session.load(this.storage);if(i?.id===this._session.id?this.storage.clear():i&&((r=this.diagnostic)===null||r===void 0||r.log(Hp.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:Nd.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);let{session:s,ui:o,connection:a}=this.subscribe();this._session=s,this.connection=a,this.ui=o,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}).catch(e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(Hp.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,Qn.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,Qn.hexStringFromBuffer)(e,!0),signature:(0,Qn.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Qn.bigIntStringFromBN)(e.weiValue),data:(0,Qn.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Qn.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,Qn.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,Qn.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,Qn.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Qn.bigIntStringFromBN)(e.weiValue),data:(0,Qn.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Qn.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,Qn.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,Qn.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,Qn.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,Qn.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getQRCodeUrl(){return(0,Qn.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:"generic",params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null,n=(0,Qn.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r?.()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,c=>{if(r?.(),(0,Vp.isErrorResponse)(c))return a(new Error(c.errorMessage));o(c)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof Zje.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,r){var n;let i={type:"WEB3_REQUEST",id:e,request:r},s=Nd.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(Hp.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?Nd.Session.hash(s.id):"",isSessionMismatched:(s?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then(o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(Hp.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?Nd.Session.hash(s.id):"",isSessionMismatched:(s?.id!==this._session.id).toString()})}).catch(o=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:r.method,errorMessage:o.message}})})}publishWeb3RequestCanceledEvent(e){let r={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(e,r,n){return this.connection.publishEvent(e,r,n)}handleWeb3ResponseMessage(e){var r;let{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log(Hp.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){t.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),t.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var s;let o=(s=n?.message)!==null&&s!==void 0?s:(0,y1.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:r,errorMessage:o,errorCode:i}})}invokeCallback(e){let r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){let e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=null,n=(0,Qn.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r?.()};return{promise:new Promise((o,a)=>{if(this.relayEventManager.callbacks.set(n,c=>{if(this.ui.hideRequestEthereumAccounts(),r?.(),(0,Vp.isErrorResponse)(c))return a(new Error(c.errorMessage));o(c)}),this.ui.inlineAccountsResponse()){let c=u=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"requestEthereumAccounts",result:u}})};this.ui.requestEthereumAccounts({onCancel:i,onAccounts:c})}else{let c=y1.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>i(c)})}t.accountRequestCallbackIds.add(n),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(n,e)}),cancel:i}}selectProvider(e){let r={method:"selectProvider",params:{providerOptions:e}},n=(0,Qn.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},s=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,d=>{if((0,Vp.isErrorResponse)(d))return a(new Error(d.errorMessage));o(d)});let c=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:zje.ProviderType.Unselected}})},u=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:d}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:u,onCancel:c,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,r,n,i,s,o){let a={method:"watchAsset",params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:o}},c=null,u=(0,Qn.randomBytesHex)(8),d=m=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,m),c?.()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));let h=new Promise((m,w)=>{this.relayEventManager.callbacks.set(u,A=>{if(c?.(),(0,Vp.isErrorResponse)(A))return w(new Error(A.errorMessage));m(A)});let _=A=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!1}})},C=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:C,onCancel:_,type:e,address:r,symbol:n,decimals:i,image:s,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)});return{cancel:d,promise:h}}addEthereumChain(e,r,n,i,s,o){let a={method:"addEthereumChain",params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}},c=null,u=(0,Qn.randomBytesHex)(8),d=m=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,m),c?.()};return this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((m,w)=>{this.relayEventManager.callbacks.set(u,A=>{if(c?.(),(0,Vp.isErrorResponse)(A))return w(new Error(A.errorMessage));m(A)});let _=A=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},C=A=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:A}}})};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:_,onApprove:C,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)}),cancel:d}}switchEthereumChain(e,r){let n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:r})},i=(0,Qn.randomBytesHex)(8),s=a=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,a)};return{promise:new Promise((a,c)=>{this.relayEventManager.callbacks.set(i,h=>{if((0,Vp.isErrorResponse)(h)&&h.errorCode)return c(y1.standardErrors.provider.custom({code:h.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,Vp.isErrorResponse)(h))return c(new Error(h.errorMessage));a(h)});let u=h=>{var m;if(h){let w=(m=(0,y1.getErrorCode)(h))!==null&&m!==void 0?m:y1.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,"switchEthereumChain",h instanceof Error?h:y1.standardErrors.provider.unsupportedChain(e),w)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},d=h=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:h}}})};this.ui.switchEthereumChain({onCancel:u,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return Nd.Session.hash(this._session.id)}sendRequestStandalone(e,r){let n=s=>{this.handleErrorResponse(e,r.method,s)},i=s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:s})};switch(r.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}};v4.WalletLinkRelay=w4;w4.accountRequestCallbackIds=new Set});var yse=F($p=>{"use strict";var Kje=$p&&$p.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Jje=$p&&$p.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Kje(e,t,r)};Object.defineProperty($p,"__esModule",{value:!0});Jje(g7(),$p)});var wse=F(b7=>{"use strict";Object.defineProperty(b7,"__esModule",{value:!0});b7.default=".-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}.-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}"});var bse=F(w1=>{"use strict";var vse=w1&&w1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(w1,"__esModule",{value:!0});w1.RedirectDialog=void 0;var Yje=vse((u1(),St(l1))),Cl=(ks(),St(io)),Qje=$P(),Xje=yse(),eHe=vse(wse()),E7=class{constructor(){this.root=null}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,Qje.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,Cl.render)(null,this.root),e&&(0,Cl.render)((0,Cl.h)(tHe,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}};w1.RedirectDialog=E7;var tHe=({title:t,buttonText:e,darkMode:r,onButtonClick:n,onDismiss:i})=>{let s=r?"dark":"light";return(0,Cl.h)(Xje.SnackbarContainer,{darkMode:r},(0,Cl.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,Cl.h)("style",null,eHe.default),(0,Cl.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,Cl.h)("div",{class:(0,Yje.default)("-cbwsdk-redirect-dialog-box",s)},(0,Cl.h)("p",null,t),(0,Cl.h)("button",{onClick:n},e))))}});var C7=F(b4=>{"use strict";Object.defineProperty(b4,"__esModule",{value:!0});b4.MobileRelayUI=void 0;var rHe=bse(),_7=class{constructor(e){this.attached=!1,this.darkMode=!1,this.openedWindow=null,this.redirectDialog=new rHe.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}closeOpenedWindow(){var e;(e=this.openedWindow)===null||e===void 0||e.close(),this.openedWindow=null}redirectToCoinbaseWallet(e){let r=new URL("https://go.cb-w.com/walletlink");r.searchParams.append("redirect_url",window.location.href),e&&r.searchParams.append("wl_url",e),this.openedWindow=window.open(r.href,"cbw-opener"),this.openedWindow&&setTimeout(()=>this.closeOpenedWindow(),5e3)}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.closeOpenedWindow(),this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.closeOpenedWindow(),this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};b4.MobileRelayUI=_7});var I7=F(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});E4.MobileRelay=void 0;var nHe=gl(),iHe=v7(),Ese=C7(),x7=class extends iHe.WalletLinkRelay{constructor(e){var r;super(e),this._enableMobileWalletLink=(r=e.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{let e=(0,nHe.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(e,r){if(super.publishWeb3RequestEvent(e,r),!(this._enableMobileWalletLink&&this.ui instanceof Ese.MobileRelayUI))return;let n=!1;switch(r.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e),this._enableMobileWalletLink&&this.ui instanceof Ese.MobileRelayUI&&this.ui.closeOpenedWindow()}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:e.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}};E4.MobileRelay=x7});var A7=F((AIt,_se)=>{"use strict";_se.exports=Gs().EventEmitter});var S7=F((SIt,Cse)=>{"use strict";Cse.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var _4=F((DIt,xse)=>{"use strict";var sHe=S7();xse.exports=function(){return sHe()&&!!Symbol.toStringTag}});var Sse=F((RIt,Ase)=>{"use strict";var Ise=typeof Symbol<"u"&&Symbol,oHe=S7();Ase.exports=function(){return typeof Ise!="function"||typeof Symbol!="function"||typeof Ise("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oHe()}});var Tse=F((TIt,Rse)=>{"use strict";var Dse={foo:{}},aHe=Object;Rse.exports=function(){return{__proto__:Dse}.foo===Dse.foo&&!({__proto__:null}instanceof aHe)}});var Ose=F((NIt,Nse)=>{"use strict";var cHe="Function.prototype.bind called on incompatible ",D7=Array.prototype.slice,lHe=Object.prototype.toString,uHe="[object Function]";Nse.exports=function(e){var r=this;if(typeof r!="function"||lHe.call(r)!==uHe)throw new TypeError(cHe+r);for(var n=D7.call(arguments,1),i,s=function(){if(this instanceof i){var d=r.apply(this,n.concat(D7.call(arguments)));return Object(d)===d?d:this}else return r.apply(e,n.concat(D7.call(arguments)))},o=Math.max(0,r.length-n.length),a=[],c=0;c<o;c++)a.push("$"+c);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var C4=F((OIt,Mse)=>{"use strict";var fHe=Ose();Mse.exports=Function.prototype.bind||fHe});var kse=F((MIt,Pse)=>{"use strict";var dHe=C4();Pse.exports=dHe.call(Function.call,Object.prototype.hasOwnProperty)});var A4=F((PIt,jse)=>{"use strict";var dr,_1=SyntaxError,Use=Function,E1=TypeError,R7=function(t){try{return Use('"use strict"; return ('+t+").constructor;")()}catch{}},qp=Object.getOwnPropertyDescriptor;if(qp)try{qp({},"")}catch{qp=null}var T7=function(){throw new E1},hHe=qp?function(){try{return arguments.callee,T7}catch{try{return qp(arguments,"callee").get}catch{return T7}}}():T7,v1=Sse()(),pHe=Tse()(),Qi=Object.getPrototypeOf||(pHe?function(t){return t.__proto__}:null),b1={},mHe=typeof Uint8Array>"u"||!Qi?dr:Qi(Uint8Array),Wp={"%AggregateError%":typeof AggregateError>"u"?dr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?dr:ArrayBuffer,"%ArrayIteratorPrototype%":v1&&Qi?Qi([][Symbol.iterator]()):dr,"%AsyncFromSyncIteratorPrototype%":dr,"%AsyncFunction%":b1,"%AsyncGenerator%":b1,"%AsyncGeneratorFunction%":b1,"%AsyncIteratorPrototype%":b1,"%Atomics%":typeof Atomics>"u"?dr:Atomics,"%BigInt%":typeof BigInt>"u"?dr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?dr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?dr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?dr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?dr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?dr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?dr:FinalizationRegistry,"%Function%":Use,"%GeneratorFunction%":b1,"%Int8Array%":typeof Int8Array>"u"?dr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?dr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?dr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v1&&Qi?Qi(Qi([][Symbol.iterator]())):dr,"%JSON%":typeof JSON=="object"?JSON:dr,"%Map%":typeof Map>"u"?dr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v1||!Qi?dr:Qi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?dr:Promise,"%Proxy%":typeof Proxy>"u"?dr:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?dr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?dr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v1||!Qi?dr:Qi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?dr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v1&&Qi?Qi(""[Symbol.iterator]()):dr,"%Symbol%":v1?Symbol:dr,"%SyntaxError%":_1,"%ThrowTypeError%":hHe,"%TypedArray%":mHe,"%TypeError%":E1,"%Uint8Array%":typeof Uint8Array>"u"?dr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?dr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?dr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?dr:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?dr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?dr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?dr:WeakSet};if(Qi)try{null.error}catch(t){Lse=Qi(Qi(t)),Wp["%Error.prototype%"]=Lse}var Lse,gHe=function t(e){var r;if(e==="%AsyncFunction%")r=R7("async function () {}");else if(e==="%GeneratorFunction%")r=R7("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=R7("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Qi&&(r=Qi(i.prototype))}return Wp[e]=r,r},Fse={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Z2=C4(),x4=kse(),yHe=Z2.call(Function.call,Array.prototype.concat),wHe=Z2.call(Function.apply,Array.prototype.splice),Bse=Z2.call(Function.call,String.prototype.replace),I4=Z2.call(Function.call,String.prototype.slice),vHe=Z2.call(Function.call,RegExp.prototype.exec),bHe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,EHe=/\\(\\)?/g,_He=function(e){var r=I4(e,0,1),n=I4(e,-1);if(r==="%"&&n!=="%")throw new _1("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new _1("invalid intrinsic syntax, expected opening `%`");var i=[];return Bse(e,bHe,function(s,o,a,c){i[i.length]=a?Bse(c,EHe,"$1"):o||s}),i},CHe=function(e,r){var n=e,i;if(x4(Fse,n)&&(i=Fse[n],n="%"+i[0]+"%"),x4(Wp,n)){var s=Wp[n];if(s===b1&&(s=gHe(n)),typeof s>"u"&&!r)throw new E1("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new _1("intrinsic "+e+" does not exist!")};jse.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new E1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new E1('"allowMissing" argument must be a boolean');if(vHe(/^%?[^%]*%?$/,e)===null)throw new _1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_He(e),i=n.length>0?n[0]:"",s=CHe("%"+i+"%",r),o=s.name,a=s.value,c=!1,u=s.alias;u&&(i=u[0],wHe(n,yHe([0,1],u)));for(var d=1,h=!0;d<n.length;d+=1){var m=n[d],w=I4(m,0,1),_=I4(m,-1);if((w==='"'||w==="'"||w==="`"||_==='"'||_==="'"||_==="`")&&w!==_)throw new _1("property names with quotes must have matching quotes");if((m==="constructor"||!h)&&(c=!0),i+="."+m,o="%"+i+"%",x4(Wp,o))a=Wp[o];else if(a!=null){if(!(m in a)){if(!r)throw new E1("base intrinsic for "+e+" exists, but the property is not available.");return}if(qp&&d+1>=n.length){var C=qp(a,m);h=!!C,h&&"get"in C&&!("originalValue"in C.get)?a=C.get:a=a[m]}else h=x4(a,m),a=a[m];h&&!c&&(Wp[o]=a)}}return a}});var O7=F((kIt,S4)=>{"use strict";var N7=C4(),C1=A4(),$se=C1("%Function.prototype.apply%"),qse=C1("%Function.prototype.call%"),Wse=C1("%Reflect.apply%",!0)||N7.call(qse,$se),Hse=C1("%Object.getOwnPropertyDescriptor%",!0),zp=C1("%Object.defineProperty%",!0),xHe=C1("%Math.max%");if(zp)try{zp({},"a",{value:1})}catch{zp=null}S4.exports=function(e){var r=Wse(N7,qse,arguments);if(Hse&&zp){var n=Hse(r,"length");n.configurable&&zp(r,"length",{value:1+xHe(0,e.length-(arguments.length-1))})}return r};var Vse=function(){return Wse(N7,$se,arguments)};zp?zp(S4.exports,"apply",{value:Vse}):S4.exports.apply=Vse});var M7=F((LIt,Zse)=>{"use strict";var zse=A4(),Gse=O7(),IHe=Gse(zse("String.prototype.indexOf"));Zse.exports=function(e,r){var n=zse(e,!!r);return typeof n=="function"&&IHe(e,".prototype.")>-1?Gse(n):n}});var Yse=F((FIt,Jse)=>{"use strict";var AHe=_4()(),SHe=M7(),P7=SHe("Object.prototype.toString"),D4=function(e){return AHe&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:P7(e)==="[object Arguments]"},Kse=function(e){return D4(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&P7(e)!=="[object Array]"&&P7(e.callee)==="[object Function]"},DHe=function(){return D4(arguments)}();D4.isLegacyArguments=Kse;Jse.exports=DHe?D4:Kse});var eoe=F((BIt,Xse)=>{"use strict";var RHe=Object.prototype.toString,THe=Function.prototype.toString,NHe=/^\s*(?:function)?\*/,Qse=_4()(),k7=Object.getPrototypeOf,OHe=function(){if(!Qse)return!1;try{return Function("return function*() {}")()}catch{}},L7;Xse.exports=function(e){if(typeof e!="function")return!1;if(NHe.test(THe.call(e)))return!0;if(!Qse){var r=RHe.call(e);return r==="[object GeneratorFunction]"}if(!k7)return!1;if(typeof L7>"u"){var n=OHe();L7=n?k7(n):!1}return k7(e)===L7}});var ioe=F((UIt,noe)=>{"use strict";var roe=Function.prototype.toString,x1=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,B7,R4;if(typeof x1=="function"&&typeof Object.defineProperty=="function")try{B7=Object.defineProperty({},"length",{get:function(){throw R4}}),R4={},x1(function(){throw 42},null,B7)}catch(t){t!==R4&&(x1=null)}else x1=null;var MHe=/^\s*class\b/,U7=function(e){try{var r=roe.call(e);return MHe.test(r)}catch{return!1}},F7=function(e){try{return U7(e)?!1:(roe.call(e),!0)}catch{return!1}},T4=Object.prototype.toString,PHe="[object Object]",kHe="[object Function]",LHe="[object GeneratorFunction]",FHe="[object HTMLAllCollection]",BHe="[object HTML document.all class]",UHe="[object HTMLCollection]",jHe=typeof Symbol=="function"&&!!Symbol.toStringTag,HHe=!(0 in[,]),j7=function(){return!1};typeof document=="object"&&(toe=document.all,T4.call(toe)===T4.call(document.all)&&(j7=function(e){if((HHe||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=T4.call(e);return(r===FHe||r===BHe||r===UHe||r===PHe)&&e("")==null}catch{}return!1}));var toe;noe.exports=x1?function(e){if(j7(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{x1(e,null,B7)}catch(r){if(r!==R4)return!1}return!U7(e)&&F7(e)}:function(e){if(j7(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(jHe)return F7(e);if(U7(e))return!1;var r=T4.call(e);return r!==kHe&&r!==LHe&&!/^\[object HTML/.test(r)?!1:F7(e)}});var aoe=F((jIt,ooe)=>{"use strict";var VHe=ioe(),$He=Object.prototype.toString,soe=Object.prototype.hasOwnProperty,qHe=function(e,r,n){for(var i=0,s=e.length;i<s;i++)soe.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},WHe=function(e,r,n){for(var i=0,s=e.length;i<s;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},zHe=function(e,r,n){for(var i in e)soe.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},GHe=function(e,r,n){if(!VHe(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),$He.call(e)==="[object Array]"?qHe(e,r,i):typeof e=="string"?WHe(e,r,i):zHe(e,r,i)};ooe.exports=GHe});var loe=F((HIt,coe)=>{"use strict";var H7=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],ZHe=typeof globalThis>"u"?global:globalThis;coe.exports=function(){for(var e=[],r=0;r<H7.length;r++)typeof ZHe[H7[r]]=="function"&&(e[e.length]=H7[r]);return e}});var foe=F((VIt,uoe)=>{"use strict";var KHe=A4(),N4=KHe("%Object.getOwnPropertyDescriptor%",!0);if(N4)try{N4([],"length")}catch{N4=null}uoe.exports=N4});var z7=F(($It,moe)=>{"use strict";var M4=aoe(),JHe=loe(),doe=O7(),q7=M7(),O4=foe(),YHe=q7("Object.prototype.toString"),poe=_4()(),hoe=typeof globalThis>"u"?global:globalThis,$7=JHe(),W7=q7("String.prototype.slice"),V7=Object.getPrototypeOf,QHe=q7("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},P4={__proto__:null};poe&&O4&&V7?M4($7,function(t){var e=new hoe[t];if(Symbol.toStringTag in e){var r=V7(e),n=O4(r,Symbol.toStringTag);if(!n){var i=V7(r);n=O4(i,Symbol.toStringTag)}P4["$"+t]=doe(n.get)}}):M4($7,function(t){var e=new hoe[t];P4["$"+t]=doe(e.slice)});var XHe=function(e){var r=!1;return M4(P4,function(n,i){if(!r)try{"$"+n(e)===i&&(r=W7(i,1))}catch{}}),r},eVe=function(e){var r=!1;return M4(P4,function(n,i){if(!r)try{n(e),r=W7(i,1)}catch{}}),r};moe.exports=function(e){if(!e||typeof e!="object")return!1;if(!poe){var r=W7(YHe(e),8,-1);return QHe($7,r)>-1?r:r!=="Object"?!1:eVe(e)}return O4?XHe(e):null}});var yoe=F((qIt,goe)=>{"use strict";var tVe=z7();goe.exports=function(e){return!!tVe(e)}});var Noe=F(lr=>{"use strict";var rVe=Yse(),nVe=eoe(),Cc=z7(),woe=yoe();function I1(t){return t.call.bind(t)}var voe=typeof BigInt<"u",boe=typeof Symbol<"u",Ba=I1(Object.prototype.toString),iVe=I1(Number.prototype.valueOf),sVe=I1(String.prototype.valueOf),oVe=I1(Boolean.prototype.valueOf);voe&&(Eoe=I1(BigInt.prototype.valueOf));var Eoe;boe&&(_oe=I1(Symbol.prototype.valueOf));var _oe;function J2(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}lr.isArgumentsObject=rVe;lr.isGeneratorFunction=nVe;lr.isTypedArray=woe;function aVe(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}lr.isPromise=aVe;function cVe(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):woe(t)||xoe(t)}lr.isArrayBufferView=cVe;function lVe(t){return Cc(t)==="Uint8Array"}lr.isUint8Array=lVe;function uVe(t){return Cc(t)==="Uint8ClampedArray"}lr.isUint8ClampedArray=uVe;function fVe(t){return Cc(t)==="Uint16Array"}lr.isUint16Array=fVe;function dVe(t){return Cc(t)==="Uint32Array"}lr.isUint32Array=dVe;function hVe(t){return Cc(t)==="Int8Array"}lr.isInt8Array=hVe;function pVe(t){return Cc(t)==="Int16Array"}lr.isInt16Array=pVe;function mVe(t){return Cc(t)==="Int32Array"}lr.isInt32Array=mVe;function gVe(t){return Cc(t)==="Float32Array"}lr.isFloat32Array=gVe;function yVe(t){return Cc(t)==="Float64Array"}lr.isFloat64Array=yVe;function wVe(t){return Cc(t)==="BigInt64Array"}lr.isBigInt64Array=wVe;function vVe(t){return Cc(t)==="BigUint64Array"}lr.isBigUint64Array=vVe;function k4(t){return Ba(t)==="[object Map]"}k4.working=typeof Map<"u"&&k4(new Map);function bVe(t){return typeof Map>"u"?!1:k4.working?k4(t):t instanceof Map}lr.isMap=bVe;function L4(t){return Ba(t)==="[object Set]"}L4.working=typeof Set<"u"&&L4(new Set);function EVe(t){return typeof Set>"u"?!1:L4.working?L4(t):t instanceof Set}lr.isSet=EVe;function F4(t){return Ba(t)==="[object WeakMap]"}F4.working=typeof WeakMap<"u"&&F4(new WeakMap);function _Ve(t){return typeof WeakMap>"u"?!1:F4.working?F4(t):t instanceof WeakMap}lr.isWeakMap=_Ve;function Z7(t){return Ba(t)==="[object WeakSet]"}Z7.working=typeof WeakSet<"u"&&Z7(new WeakSet);function CVe(t){return Z7(t)}lr.isWeakSet=CVe;function B4(t){return Ba(t)==="[object ArrayBuffer]"}B4.working=typeof ArrayBuffer<"u"&&B4(new ArrayBuffer);function Coe(t){return typeof ArrayBuffer>"u"?!1:B4.working?B4(t):t instanceof ArrayBuffer}lr.isArrayBuffer=Coe;function U4(t){return Ba(t)==="[object DataView]"}U4.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U4(new DataView(new ArrayBuffer(1),0,1));function xoe(t){return typeof DataView>"u"?!1:U4.working?U4(t):t instanceof DataView}lr.isDataView=xoe;var G7=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function K2(t){return Ba(t)==="[object SharedArrayBuffer]"}function Ioe(t){return typeof G7>"u"?!1:(typeof K2.working>"u"&&(K2.working=K2(new G7)),K2.working?K2(t):t instanceof G7)}lr.isSharedArrayBuffer=Ioe;function xVe(t){return Ba(t)==="[object AsyncFunction]"}lr.isAsyncFunction=xVe;function IVe(t){return Ba(t)==="[object Map Iterator]"}lr.isMapIterator=IVe;function AVe(t){return Ba(t)==="[object Set Iterator]"}lr.isSetIterator=AVe;function SVe(t){return Ba(t)==="[object Generator]"}lr.isGeneratorObject=SVe;function DVe(t){return Ba(t)==="[object WebAssembly.Module]"}lr.isWebAssemblyCompiledModule=DVe;function Aoe(t){return J2(t,iVe)}lr.isNumberObject=Aoe;function Soe(t){return J2(t,sVe)}lr.isStringObject=Soe;function Doe(t){return J2(t,oVe)}lr.isBooleanObject=Doe;function Roe(t){return voe&&J2(t,Eoe)}lr.isBigIntObject=Roe;function Toe(t){return boe&&J2(t,_oe)}lr.isSymbolObject=Toe;function RVe(t){return Aoe(t)||Soe(t)||Doe(t)||Roe(t)||Toe(t)}lr.isBoxedPrimitive=RVe;function TVe(t){return typeof Uint8Array<"u"&&(Coe(t)||Ioe(t))}lr.isAnyArrayBuffer=TVe;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(lr,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Moe=F((zIt,Ooe)=>{"use strict";Ooe.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var Poe=F((GIt,K7)=>{"use strict";typeof Object.create=="function"?K7.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:K7.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var tk=F(ur=>{"use strict";var koe=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(e,r[i]);return n},NVe=/%[sdj%]/g;ur.format=function(t){if(!z4(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(Od(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,s=String(t).replace(NVe,function(a){if(a==="%%")return"%";if(r>=i)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return a}}),o=n[r];r<i;o=n[++r])W4(o)||!A1(o)?s+=" "+o:s+=" "+Od(o);return s};ur.deprecate=function(t,e){if(typeof process<"u"&&process.noDeprecation===!0)return t;if(typeof process>"u")return function(){return ur.deprecate(t,e).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n};var j4={},Loe=/^$/;process.env.NODE_DEBUG&&(H4=process.env.NODE_DEBUG,H4=H4.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Loe=new RegExp("^"+H4+"$","i"));var H4;ur.debuglog=function(t){if(t=t.toUpperCase(),!j4[t])if(Loe.test(t)){var e=process.pid;j4[t]=function(){var r=ur.format.apply(ur,arguments);console.error("%s %d: %s",t,e,r)}}else j4[t]=function(){};return j4[t]};function Od(t,e){var r={seen:[],stylize:MVe};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),X7(e)?r.showHidden=e:e&&ur._extend(r,e),Zp(r.showHidden)&&(r.showHidden=!1),Zp(r.depth)&&(r.depth=2),Zp(r.colors)&&(r.colors=!1),Zp(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=OVe),$4(r,t,r.depth)}ur.inspect=Od;Od.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};Od.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function OVe(t,e){var r=Od.styles[e];return r?"\x1B["+Od.colors[r][0]+"m"+t+"\x1B["+Od.colors[r][1]+"m":t}function MVe(t,e){return t}function PVe(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function $4(t,e,r){if(t.customInspect&&e&&V4(e.inspect)&&e.inspect!==ur.inspect&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return z4(n)||(n=$4(t,n,r)),n}var i=kVe(t,e);if(i)return i;var s=Object.keys(e),o=PVe(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),Q2(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return J7(e);if(s.length===0){if(V4(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(Y2(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(q4(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Q2(e))return J7(e)}var c="",u=!1,d=["{","}"];if(Foe(e)&&(u=!0,d=["[","]"]),V4(e)){var h=e.name?": "+e.name:"";c=" [Function"+h+"]"}if(Y2(e)&&(c=" "+RegExp.prototype.toString.call(e)),q4(e)&&(c=" "+Date.prototype.toUTCString.call(e)),Q2(e)&&(c=" "+J7(e)),s.length===0&&(!u||e.length==0))return d[0]+c+d[1];if(r<0)return Y2(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var m;return u?m=LVe(t,e,r,o,s):m=s.map(function(w){return Q7(t,e,r,o,w,u)}),t.seen.pop(),FVe(m,c,d)}function kVe(t,e){if(Zp(e))return t.stylize("undefined","undefined");if(z4(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Boe(e))return t.stylize(""+e,"number");if(X7(e))return t.stylize(""+e,"boolean");if(W4(e))return t.stylize("null","null")}function J7(t){return"["+Error.prototype.toString.call(t)+"]"}function LVe(t,e,r,n,i){for(var s=[],o=0,a=e.length;o<a;++o)Uoe(e,String(o))?s.push(Q7(t,e,r,n,String(o),!0)):s.push("");return i.forEach(function(c){c.match(/^\d+$/)||s.push(Q7(t,e,r,n,c,!0))}),s}function Q7(t,e,r,n,i,s){var o,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?c.set?a=t.stylize("[Getter/Setter]","special"):a=t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),Uoe(n,i)||(o="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(W4(r)?a=$4(t,c.value,null):a=$4(t,c.value,r-1),a.indexOf(`
`)>-1&&(s?a=a.split(`
`).map(function(u){return"  "+u}).join(`
`).slice(2):a=`
`+a.split(`
`).map(function(u){return"   "+u}).join(`
`))):a=t.stylize("[Circular]","special")),Zp(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function FVe(t,e,r){var n=0,i=t.reduce(function(s,o){return n++,o.indexOf(`
`)>=0&&n++,s+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(e===""?"":e+`
 `)+" "+t.join(`,
  `)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}ur.types=Noe();function Foe(t){return Array.isArray(t)}ur.isArray=Foe;function X7(t){return typeof t=="boolean"}ur.isBoolean=X7;function W4(t){return t===null}ur.isNull=W4;function BVe(t){return t==null}ur.isNullOrUndefined=BVe;function Boe(t){return typeof t=="number"}ur.isNumber=Boe;function z4(t){return typeof t=="string"}ur.isString=z4;function UVe(t){return typeof t=="symbol"}ur.isSymbol=UVe;function Zp(t){return t===void 0}ur.isUndefined=Zp;function Y2(t){return A1(t)&&ek(t)==="[object RegExp]"}ur.isRegExp=Y2;ur.types.isRegExp=Y2;function A1(t){return typeof t=="object"&&t!==null}ur.isObject=A1;function q4(t){return A1(t)&&ek(t)==="[object Date]"}ur.isDate=q4;ur.types.isDate=q4;function Q2(t){return A1(t)&&(ek(t)==="[object Error]"||t instanceof Error)}ur.isError=Q2;ur.types.isNativeError=Q2;function V4(t){return typeof t=="function"}ur.isFunction=V4;function jVe(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ur.isPrimitive=jVe;ur.isBuffer=Moe();function ek(t){return Object.prototype.toString.call(t)}function Y7(t){return t<10?"0"+t.toString(10):t.toString(10)}var HVe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function VVe(){var t=new Date,e=[Y7(t.getHours()),Y7(t.getMinutes()),Y7(t.getSeconds())].join(":");return[t.getDate(),HVe[t.getMonth()],e].join(" ")}ur.log=function(){console.log("%s - %s",VVe(),ur.format.apply(ur,arguments))};ur.inherits=Poe();ur._extend=function(t,e){if(!e||!A1(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};function Uoe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Gp=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;ur.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(Gp&&e[Gp]){var r=e[Gp];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,Gp,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,s=new Promise(function(c,u){n=c,i=u}),o=[],a=0;a<arguments.length;a++)o.push(arguments[a]);o.push(function(c,u){c?i(c):n(u)});try{e.apply(this,o)}catch(c){i(c)}return s}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Gp&&Object.defineProperty(r,Gp,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,koe(e))};ur.promisify.custom=Gp;function $Ve(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function qVe(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!="function")throw new TypeError("The last argument must be of type Function");var s=this,o=function(){return i.apply(s,arguments)};t.apply(this,r).then(function(a){process.nextTick(o.bind(null,null,a))},function(a){process.nextTick($Ve.bind(null,a,o))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,koe(t)),e}ur.callbackify=qVe});var Woe=F((KIt,qoe)=>{"use strict";function joe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hoe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?joe(Object(r),!0).forEach(function(n){WVe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):joe(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function WVe(t,e,r){return e=$oe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zVe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Voe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$oe(n.key),n)}}function GVe(t,e,r){return e&&Voe(t.prototype,e),r&&Voe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $oe(t){var e=ZVe(t,"string");return typeof e=="symbol"?e:String(e)}function ZVe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var KVe=k2(),G4=KVe.Buffer,JVe=tk(),rk=JVe.inspect,YVe=rk&&rk.custom||"inspect";function QVe(t,e,r){G4.prototype.copy.call(t,e,r)}qoe.exports=function(){function t(){zVe(this,t),this.head=null,this.tail=null,this.length=0}return GVe(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return G4.alloc(0);for(var n=G4.allocUnsafe(r>>>0),i=this.head,s=0;i;)QVe(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;for(r-=s.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=G4.allocUnsafe(r),i=this.head,s=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){a===o.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++s}return this.length-=s,n}},{key:YVe,value:function(r,n){return rk(this,Hoe(Hoe({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var ik=F((JIt,Goe)=>{"use strict";function XVe(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(nk,this,t)):process.nextTick(nk,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Z4,r):(r._writableState.errorEmitted=!0,process.nextTick(zoe,r,s)):process.nextTick(zoe,r,s):e?(process.nextTick(Z4,r),e(s)):process.nextTick(Z4,r)}),this)}function zoe(t,e){nk(t,e),Z4(t)}function Z4(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function e$e(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function nk(t,e){t.emit("error",e)}function t$e(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}Goe.exports={destroy:XVe,undestroy:e$e,errorOrDestroy:t$e}});var Kp=F((YIt,Joe)=>{"use strict";function r$e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Koe={};function Ua(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){r$e(o,s);function o(a,c,u){return s.call(this,n(a,c,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=t,Koe[t]=i}function Zoe(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function n$e(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function i$e(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function s$e(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ua("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ua("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&n$e(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(i$e(t," argument"))i="The ".concat(t," ").concat(n," ").concat(Zoe(e,"type"));else{var s=s$e(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(Zoe(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Ua("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ua("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ua("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ua("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ua("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ua("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ua("ERR_STREAM_WRITE_AFTER_END","write after end");Ua("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ua("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ua("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Joe.exports.codes=Koe});var sk=F((QIt,Yoe)=>{"use strict";var o$e=Kp().codes.ERR_INVALID_OPT_VALUE;function a$e(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function c$e(t,e,r,n){var i=a$e(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new o$e(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Yoe.exports={getHighWaterMark:c$e}});var Xoe=F((XIt,Qoe)=>{"use strict";Qoe.exports=l$e;function l$e(t,e){if(ok("noDeprecation"))return t;var r=!1;function n(){if(!r){if(ok("throwDeprecation"))throw new Error(e);ok("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function ok(t){try{if(!global.localStorage)return!1}catch{return!1}var e=global.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var lk=F((eAt,sae)=>{"use strict";sae.exports=hi;function tae(t){var e=this;this.next=null,this.entry=null,this.finish=function(){L$e(e,t)}}var S1;hi.WritableState=eb;var u$e={deprecate:Xoe()},rae=A7(),J4=k2().Buffer,f$e=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function d$e(t){return J4.from(t)}function h$e(t){return J4.isBuffer(t)||t instanceof f$e}var ck=ik(),p$e=sk(),m$e=p$e.getHighWaterMark,Md=Kp().codes,g$e=Md.ERR_INVALID_ARG_TYPE,y$e=Md.ERR_METHOD_NOT_IMPLEMENTED,w$e=Md.ERR_MULTIPLE_CALLBACK,v$e=Md.ERR_STREAM_CANNOT_PIPE,b$e=Md.ERR_STREAM_DESTROYED,E$e=Md.ERR_STREAM_NULL_VALUES,_$e=Md.ERR_STREAM_WRITE_AFTER_END,C$e=Md.ERR_UNKNOWN_ENCODING,D1=ck.errorOrDestroy;La()(hi,rae);function x$e(){}function eb(t,e,r){S1=S1||Jp(),t=t||{},typeof r!="boolean"&&(r=e instanceof S1),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=m$e(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){N$e(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new tae(this)}eb.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(eb.prototype,"buffer",{get:u$e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var K4;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(K4=Function.prototype[Symbol.hasInstance],Object.defineProperty(hi,Symbol.hasInstance,{value:function(e){return K4.call(this,e)?!0:this!==hi?!1:e&&e._writableState instanceof eb}})):K4=function(e){return e instanceof this};function hi(t){S1=S1||Jp();var e=this instanceof S1;if(!e&&!K4.call(hi,this))return new hi(t);this._writableState=new eb(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),rae.call(this)}hi.prototype.pipe=function(){D1(this,new v$e)};function I$e(t,e){var r=new _$e;D1(t,r),process.nextTick(e,r)}function A$e(t,e,r,n){var i;return r===null?i=new E$e:typeof r!="string"&&!e.objectMode&&(i=new g$e("chunk",["string","Buffer"],r)),i?(D1(t,i),process.nextTick(n,i),!1):!0}hi.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&h$e(t);return s&&!J4.isBuffer(t)&&(t=d$e(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=x$e),n.ending?I$e(this,r):(s||A$e(this,n,t,r))&&(n.pendingcb++,i=D$e(this,n,s,t,e,r)),i};hi.prototype.cork=function(){this._writableState.corked++};hi.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&nae(this,t))};hi.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new C$e(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(hi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function S$e(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=J4.from(e,r)),e}Object.defineProperty(hi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function D$e(t,e,r,n,i,s){if(!r){var o=S$e(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else ak(t,e,!1,a,n,i,s);return c}function ak(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b$e("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function R$e(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(X2,t,e),t._writableState.errorEmitted=!0,D1(t,n)):(i(n),t._writableState.errorEmitted=!0,D1(t,n),X2(t,e))}function T$e(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function N$e(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new w$e;if(T$e(r),e)R$e(t,r,n,e,i);else{var s=iae(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nae(t,r),n?process.nextTick(eae,t,r,s,i):eae(t,r,s,i)}}function eae(t,e,r,n){r||O$e(t,e),e.pendingcb--,n(),X2(t,e)}function O$e(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nae(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,ak(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new tae(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,d=r.callback,h=e.objectMode?1:c.length;if(ak(t,e,!1,h,c,u,d),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}hi.prototype._write=function(t,e,r){r(new y$e("_write()"))};hi.prototype._writev=null;hi.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||k$e(this,n,r),this};Object.defineProperty(hi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function iae(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function M$e(t,e){t._final(function(r){e.pendingcb--,r&&D1(t,r),e.prefinished=!0,t.emit("prefinish"),X2(t,e)})}function P$e(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(M$e,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function X2(t,e){var r=iae(e);if(r&&(P$e(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function k$e(t,e,r){e.ending=!0,X2(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function L$e(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(hi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});hi.prototype.destroy=ck.destroy;hi.prototype._undestroy=ck.undestroy;hi.prototype._destroy=function(t,e){e(t)}});var Jp=F((tAt,aae)=>{"use strict";var F$e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};aae.exports=xl;var oae=dk(),fk=lk();La()(xl,oae);for(uk=F$e(fk.prototype),Y4=0;Y4<uk.length;Y4++)Q4=uk[Y4],xl.prototype[Q4]||(xl.prototype[Q4]=fk.prototype[Q4]);var uk,Q4,Y4;function xl(t){if(!(this instanceof xl))return new xl(t);oae.call(this,t),fk.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",B$e)))}Object.defineProperty(xl.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(xl.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(xl.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function B$e(){this._writableState.ended||process.nextTick(U$e,this)}function U$e(t){t.end()}Object.defineProperty(xl.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var mk=F(lae=>{"use strict";var pk=Hu().Buffer,cae=pk.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function j$e(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function H$e(t){var e=j$e(t);if(typeof e!="string"&&(pk.isEncoding===cae||!cae(t)))throw new Error("Unknown encoding: "+t);return e||t}lae.StringDecoder=tb;function tb(t){this.encoding=H$e(t);var e;switch(this.encoding){case"utf16le":this.text=G$e,this.end=Z$e,e=4;break;case"utf8":this.fillLast=q$e,e=4;break;case"base64":this.text=K$e,this.end=J$e,e=3;break;default:this.write=Y$e,this.end=Q$e;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=pk.allocUnsafe(e)}tb.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};tb.prototype.end=z$e;tb.prototype.text=W$e;tb.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function hk(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function V$e(t,e,r){var n=e.length-1;if(n<r)return 0;var i=hk(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=hk(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=hk(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function $$e(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function q$e(t){var e=this.lastTotal-this.lastNeed,r=$$e(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function W$e(t,e){var r=V$e(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function z$e(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function G$e(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Z$e(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function K$e(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function J$e(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Y$e(t){return t.toString(this.encoding)}function Q$e(t){return t&&t.length?this.write(t):""}});var X4=F((nAt,dae)=>{"use strict";var uae=Kp().codes.ERR_STREAM_PREMATURE_CLOSE;function X$e(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function eqe(){}function tqe(t){return t.setHeader&&typeof t.abort=="function"}function fae(t,e,r){if(typeof e=="function")return fae(t,null,e);e||(e={}),r=X$e(r||eqe);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){i=!1,o=!0,n||r.call(t)},c=t._readableState&&t._readableState.endEmitted,u=function(){n=!1,c=!0,i||r.call(t)},d=function(_){r.call(t,_)},h=function(){var _;if(n&&!c)return(!t._readableState||!t._readableState.ended)&&(_=new uae),r.call(t,_);if(i&&!o)return(!t._writableState||!t._writableState.ended)&&(_=new uae),r.call(t,_)},m=function(){t.req.on("finish",a)};return tqe(t)?(t.on("complete",a),t.on("abort",h),t.req?m():t.on("request",m)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",d),t.on("close",h),function(){t.removeListener("complete",a),t.removeListener("abort",h),t.removeListener("request",m),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",d),t.removeListener("close",h)}}dae.exports=fae});var pae=F((iAt,hae)=>{"use strict";var e5;function Pd(t,e,r){return e=rqe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rqe(t){var e=nqe(t,"string");return typeof e=="symbol"?e:String(e)}function nqe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var iqe=X4(),kd=Symbol("lastResolve"),Yp=Symbol("lastReject"),rb=Symbol("error"),t5=Symbol("ended"),Qp=Symbol("lastPromise"),gk=Symbol("handlePromise"),Xp=Symbol("stream");function Ld(t,e){return{value:t,done:e}}function sqe(t){var e=t[kd];if(e!==null){var r=t[Xp].read();r!==null&&(t[Qp]=null,t[kd]=null,t[Yp]=null,e(Ld(r,!1)))}}function oqe(t){process.nextTick(sqe,t)}function aqe(t,e){return function(r,n){t.then(function(){if(e[t5]){r(Ld(void 0,!0));return}e[gk](r,n)},n)}}var cqe=Object.getPrototypeOf(function(){}),lqe=Object.setPrototypeOf((e5={get stream(){return this[Xp]},next:function(){var e=this,r=this[rb];if(r!==null)return Promise.reject(r);if(this[t5])return Promise.resolve(Ld(void 0,!0));if(this[Xp].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[rb]?a(e[rb]):o(Ld(void 0,!0))})});var n=this[Qp],i;if(n)i=new Promise(aqe(n,this));else{var s=this[Xp].read();if(s!==null)return Promise.resolve(Ld(s,!1));i=new Promise(this[gk])}return this[Qp]=i,i}},Pd(e5,Symbol.asyncIterator,function(){return this}),Pd(e5,"return",function(){var e=this;return new Promise(function(r,n){e[Xp].destroy(null,function(i){if(i){n(i);return}r(Ld(void 0,!0))})})}),e5),cqe),uqe=function(e){var r,n=Object.create(lqe,(r={},Pd(r,Xp,{value:e,writable:!0}),Pd(r,kd,{value:null,writable:!0}),Pd(r,Yp,{value:null,writable:!0}),Pd(r,rb,{value:null,writable:!0}),Pd(r,t5,{value:e._readableState.endEmitted,writable:!0}),Pd(r,gk,{value:function(s,o){var a=n[Xp].read();a?(n[Qp]=null,n[kd]=null,n[Yp]=null,s(Ld(a,!1))):(n[kd]=s,n[Yp]=o)},writable:!0}),r));return n[Qp]=null,iqe(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[Yp];s!==null&&(n[Qp]=null,n[kd]=null,n[Yp]=null,s(i)),n[rb]=i;return}var o=n[kd];o!==null&&(n[Qp]=null,n[kd]=null,n[Yp]=null,o(Ld(void 0,!0))),n[t5]=!0}),e.on("readable",oqe.bind(null,n)),n};hae.exports=uqe});var gae=F((sAt,mae)=>{"use strict";mae.exports=function(){throw new Error("Readable.from is not available in the browser")}});var dk=F((aAt,Aae)=>{"use strict";Aae.exports=xr;var R1;xr.ReadableState=bae;var oAt=Gs().EventEmitter,vae=function(e,r){return e.listeners(r).length},ib=A7(),r5=k2().Buffer,fqe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function dqe(t){return r5.from(t)}function hqe(t){return r5.isBuffer(t)||t instanceof fqe}var yk=tk(),ir;yk&&yk.debuglog?ir=yk.debuglog("stream"):ir=function(){};var pqe=Woe(),xk=ik(),mqe=sk(),gqe=mqe.getHighWaterMark,n5=Kp().codes,yqe=n5.ERR_INVALID_ARG_TYPE,wqe=n5.ERR_STREAM_PUSH_AFTER_EOF,vqe=n5.ERR_METHOD_NOT_IMPLEMENTED,bqe=n5.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,T1,wk,vk;La()(xr,ib);var nb=xk.errorOrDestroy,bk=["error","close","destroy","pause","resume"];function Eqe(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function bae(t,e,r){R1=R1||Jp(),t=t||{},typeof r!="boolean"&&(r=e instanceof R1),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=gqe(this,t,"readableHighWaterMark",r),this.buffer=new pqe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(T1||(T1=mk().StringDecoder),this.decoder=new T1(t.encoding),this.encoding=t.encoding)}function xr(t){if(R1=R1||Jp(),!(this instanceof xr))return new xr(t);var e=this instanceof R1;this._readableState=new bae(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ib.call(this)}Object.defineProperty(xr.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});xr.prototype.destroy=xk.destroy;xr.prototype._undestroy=xk.undestroy;xr.prototype._destroy=function(t,e){e(t)};xr.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=r5.from(t,e),e=""),n=!0),Eae(this,t,e,!1,n)};xr.prototype.unshift=function(t){return Eae(this,t,null,!0,!1)};function Eae(t,e,r,n,i){ir("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,xqe(t,s);else{var o;if(i||(o=_qe(s,e)),o)nb(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==r5.prototype&&(e=dqe(e)),n)s.endEmitted?nb(t,new bqe):Ek(t,s,e,!0);else if(s.ended)nb(t,new wqe);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ek(t,s,e,!1):Ck(t,s)):Ek(t,s,e,!1)}else n||(s.reading=!1,Ck(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ek(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&i5(t)),Ck(t,e)}function _qe(t,e){var r;return!hqe(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new yqe("chunk",["string","Buffer","Uint8Array"],e)),r}xr.prototype.isPaused=function(){return this._readableState.flowing===!1};xr.prototype.setEncoding=function(t){T1||(T1=mk().StringDecoder);var e=new T1(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var yae=1073741824;function Cqe(t){return t>=yae?t=yae:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wae(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Cqe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}xr.prototype.read=function(t){ir("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return ir("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?_k(this):i5(this),null;if(t=wae(t,e),t===0&&e.ended)return e.length===0&&_k(this),null;var n=e.needReadable;ir("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,ir("length less than watermark",n)),e.ended||e.reading?(n=!1,ir("reading or ended",n)):n&&(ir("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=wae(r,e)));var i;return t>0?i=xae(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&_k(this)),i!==null&&this.emit("data",i),i};function xqe(t,e){if(ir("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?i5(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,_ae(t)))}}function i5(t){var e=t._readableState;ir("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(ir("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(_ae,t))}function _ae(t){var e=t._readableState;ir("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Ik(t)}function Ck(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Iqe,t,e))}function Iqe(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(ir("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}xr.prototype._read=function(t){nb(this,new vqe("_read()"))};xr.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,ir("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=i?a:C;n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(A,R){ir("onunpipe"),A===r&&R&&R.hasUnpiped===!1&&(R.hasUnpiped=!0,d())}function a(){ir("onend"),t.end()}var c=Aqe(r);t.on("drain",c);var u=!1;function d(){ir("cleanup"),t.removeListener("close",w),t.removeListener("finish",_),t.removeListener("drain",c),t.removeListener("error",m),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",C),r.removeListener("data",h),u=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&c()}r.on("data",h);function h(A){ir("ondata");var R=t.write(A);ir("dest.write",R),R===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Iae(n.pipes,t)!==-1)&&!u&&(ir("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function m(A){ir("onerror",A),C(),t.removeListener("error",m),vae(t,"error")===0&&nb(t,A)}Eqe(t,"error",m);function w(){t.removeListener("finish",_),C()}t.once("close",w);function _(){ir("onfinish"),t.removeListener("close",w),C()}t.once("finish",_);function C(){ir("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(ir("pipe resume"),r.resume()),t};function Aqe(t){return function(){var r=t._readableState;ir("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&vae(t,"data")&&(r.flowing=!0,Ik(t))}}xr.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Iae(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};xr.prototype.on=function(t,e){var r=ib.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ir("on readable",n.length,n.reading),n.length?i5(this):n.reading||process.nextTick(Sqe,this)),r};xr.prototype.addListener=xr.prototype.on;xr.prototype.removeListener=function(t,e){var r=ib.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Cae,this),r};xr.prototype.removeAllListeners=function(t){var e=ib.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Cae,this),e};function Cae(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Sqe(t){ir("readable nexttick read 0"),t.read(0)}xr.prototype.resume=function(){var t=this._readableState;return t.flowing||(ir("resume"),t.flowing=!t.readableListening,Dqe(this,t)),t.paused=!1,this};function Dqe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Rqe,t,e))}function Rqe(t,e){ir("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ik(t),e.flowing&&!e.reading&&t.read(0)}xr.prototype.pause=function(){return ir("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ir("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ik(t){var e=t._readableState;for(ir("flow",e.flowing);e.flowing&&t.read()!==null;);}xr.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(ir("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(ir("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(a){return function(){return t[a].apply(t,arguments)}}(i));for(var s=0;s<bk.length;s++)t.on(bk[s],this.emit.bind(this,bk[s]));return this._read=function(o){ir("wrapped _read",o),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(xr.prototype[Symbol.asyncIterator]=function(){return wk===void 0&&(wk=pae()),wk(this)});Object.defineProperty(xr.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(xr.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(xr.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});xr._fromList=xae;Object.defineProperty(xr.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xae(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function _k(t){var e=t._readableState;ir("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Tqe,e,t))}function Tqe(t,e){if(ir("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(xr.from=function(t,e){return vk===void 0&&(vk=gae()),vk(xr,t,e)});function Iae(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Ak=F((cAt,Dae)=>{"use strict";Dae.exports=Wu;var s5=Kp().codes,Nqe=s5.ERR_METHOD_NOT_IMPLEMENTED,Oqe=s5.ERR_MULTIPLE_CALLBACK,Mqe=s5.ERR_TRANSFORM_ALREADY_TRANSFORMING,Pqe=s5.ERR_TRANSFORM_WITH_LENGTH_0,o5=Jp();La()(Wu,o5);function kqe(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Oqe);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Wu(t){if(!(this instanceof Wu))return new Wu(t);o5.call(this,t),this._transformState={afterTransform:kqe.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Lqe)}function Lqe(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Sae(t,e,r)}):Sae(this,null,null)}Wu.prototype.push=function(t,e){return this._transformState.needTransform=!1,o5.prototype.push.call(this,t,e)};Wu.prototype._transform=function(t,e,r){r(new Nqe("_transform()"))};Wu.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Wu.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Wu.prototype._destroy=function(t,e){o5.prototype._destroy.call(this,t,function(r){e(r)})};function Sae(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Pqe;if(t._transformState.transforming)throw new Mqe;return t.push(null)}});var Nae=F((lAt,Tae)=>{"use strict";Tae.exports=sb;var Rae=Ak();La()(sb,Rae);function sb(t){if(!(this instanceof sb))return new sb(t);Rae.call(this,t)}sb.prototype._transform=function(t,e,r){r(null,t)}});var Lae=F((uAt,kae)=>{"use strict";var Sk;function Fqe(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Pae=Kp().codes,Bqe=Pae.ERR_MISSING_ARGS,Uqe=Pae.ERR_STREAM_DESTROYED;function Oae(t){if(t)throw t}function jqe(t){return t.setHeader&&typeof t.abort=="function"}function Hqe(t,e,r,n){n=Fqe(n);var i=!1;t.on("close",function(){i=!0}),Sk===void 0&&(Sk=X4()),Sk(t,{readable:e,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,jqe(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(o||new Uqe("pipe"))}}}function Mae(t){t()}function Vqe(t,e){return t.pipe(e)}function $qe(t){return!t.length||typeof t[t.length-1]!="function"?Oae:t.pop()}function qqe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=$qe(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Bqe("streams");var i,s=e.map(function(o,a){var c=a<e.length-1,u=a>0;return Hqe(o,c,u,function(d){i||(i=d),d&&s.forEach(Mae),!c&&(s.forEach(Mae),n(i))})});return e.reduce(Vqe)}kae.exports=qqe});var Dk=F((ja,Fae)=>{"use strict";ja=Fae.exports=dk();ja.Stream=ja;ja.Readable=ja;ja.Writable=lk();ja.Duplex=Jp();ja.Transform=Ak();ja.PassThrough=Nae();ja.finished=X4();ja.pipeline=Lae()});var jae=F((fAt,Uae)=>{"use strict";var{Transform:Wqe}=Dk();Uae.exports=t=>class Bae extends Wqe{constructor(r,n,i,s,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new Bae(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var $ae=F((dAt,Vae)=>{"use strict";var{Transform:zqe}=Dk();Vae.exports=t=>class Hae extends zqe{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new Hae(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var Wae=F((hAt,qae)=>{"use strict";var Gqe=jae(),Zqe=$ae();qae.exports=function(t){let e=Gqe(t),r=Zqe(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}}});var Zae=F(Gae=>{"use strict";var zae=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];Gae.p1600=function(t){for(let e=0;e<24;++e){let r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49],m=d^(i<<1|s>>>31),w=h^(s<<1|i>>>31),_=t[0]^m,C=t[1]^w,A=t[10]^m,R=t[11]^w,L=t[20]^m,U=t[21]^w,V=t[30]^m,Q=t[31]^w,Y=t[40]^m,k=t[41]^w;m=r^(o<<1|a>>>31),w=n^(a<<1|o>>>31);let q=t[2]^m,ie=t[3]^w,W=t[12]^m,z=t[13]^w,X=t[22]^m,D=t[23]^w,g=t[32]^m,v=t[33]^w,x=t[42]^m,I=t[43]^w;m=i^(c<<1|u>>>31),w=s^(u<<1|c>>>31);let T=t[4]^m,H=t[5]^w,$=t[14]^m,N=t[15]^w,E=t[24]^m,P=t[25]^w,ae=t[34]^m,ce=t[35]^w,se=t[44]^m,pe=t[45]^w;m=o^(d<<1|h>>>31),w=a^(h<<1|d>>>31);let De=t[6]^m,Te=t[7]^w,st=t[16]^m,Ue=t[17]^w,Oe=t[26]^m,_t=t[27]^w,Fe=t[36]^m,Ye=t[37]^w,Dc=t[46]^m,yr=t[47]^w;m=c^(r<<1|n>>>31),w=u^(n<<1|r>>>31);let dn=t[8]^m,Kd=t[9]^w,Br=t[18]^m,hr=t[19]^w,Ga=t[28]^m,$r=t[29]^w,Nn=t[38]^m,Za=t[39]^w,On=t[48]^m,Ur=t[49]^w,Do=_,qr=C,Wr=R<<4|A>>>28,Rc=A<<4|R>>>28,zr=L<<3|U>>>29,Gr=U<<3|L>>>29,Tc=Q<<9|V>>>23,Zr=V<<9|Q>>>23,Kr=Y<<18|k>>>14,Nc=k<<18|Y>>>14,hn=q<<1|ie>>>31,pn=ie<<1|q>>>31,Yu=z<<12|W>>>20,tn=W<<12|z>>>20,rn=X<<10|D>>>22,Qu=D<<10|X>>>22,mn=v<<13|g>>>19,gn=g<<13|v>>>19,Xu=x<<2|I>>>30,nn=I<<2|x>>>30,yn=H<<30|T>>>2,ef=T<<30|H>>>2,wn=$<<6|N>>>26,Jr=N<<6|$>>>26,tf=P<<11|E>>>21,Yr=E<<11|P>>>21,vn=ae<<15|ce>>>17,rf=ce<<15|ae>>>17,bn=pe<<29|se>>>3,En=se<<29|pe>>>3,nf=De<<28|Te>>>4,_n=Te<<28|De>>>4,Cn=Ue<<23|st>>>9,sf=st<<23|Ue>>>9,sn=Oe<<25|_t>>>7,xn=_t<<25|Oe>>>7,Nl=Fe<<21|Ye>>>11,Ol=Ye<<21|Fe>>>11,Ml=yr<<24|Dc>>>8,Pl=Dc<<24|yr>>>8,kl=dn<<27|Kd>>>5,sa=Kd<<27|dn>>>5,Ll=Br<<20|hr>>>12,oa=hr<<20|Br>>>12,Fl=$r<<7|Ga>>>25,Bl=Ga<<7|$r>>>25,Ul=Nn<<8|Za>>>24,Oc=Za<<8|Nn>>>24,Mc=On<<14|Ur>>>18,Pc=Ur<<14|On>>>18;t[0]=Do^~Yu&tf,t[1]=qr^~tn&Yr,t[10]=nf^~Ll&zr,t[11]=_n^~oa&Gr,t[20]=hn^~wn&sn,t[21]=pn^~Jr&xn,t[30]=kl^~Wr&rn,t[31]=sa^~Rc&Qu,t[40]=yn^~Cn&Fl,t[41]=ef^~sf&Bl,t[2]=Yu^~tf&Nl,t[3]=tn^~Yr&Ol,t[12]=Ll^~zr&mn,t[13]=oa^~Gr&gn,t[22]=wn^~sn&Ul,t[23]=Jr^~xn&Oc,t[32]=Wr^~rn&vn,t[33]=Rc^~Qu&rf,t[42]=Cn^~Fl&Tc,t[43]=sf^~Bl&Zr,t[4]=tf^~Nl&Mc,t[5]=Yr^~Ol&Pc,t[14]=zr^~mn&bn,t[15]=Gr^~gn&En,t[24]=sn^~Ul&Kr,t[25]=xn^~Oc&Nc,t[34]=rn^~vn&Ml,t[35]=Qu^~rf&Pl,t[44]=Fl^~Tc&Xu,t[45]=Bl^~Zr&nn,t[6]=Nl^~Mc&Do,t[7]=Ol^~Pc&qr,t[16]=mn^~bn&nf,t[17]=gn^~En&_n,t[26]=Ul^~Kr&hn,t[27]=Oc^~Nc&pn,t[36]=vn^~Ml&kl,t[37]=rf^~Pl&sa,t[46]=Tc^~Xu&yn,t[47]=Zr^~nn&ef,t[8]=Mc^~Do&Yu,t[9]=Pc^~qr&tn,t[18]=bn^~nf&Ll,t[19]=En^~_n&oa,t[28]=Kr^~hn&wn,t[29]=Nc^~pn&Jr,t[38]=Ml^~kl&Wr,t[39]=Pl^~sa&Rc,t[48]=Xu^~yn&Cn,t[49]=nn^~ef&sf,t[0]^=zae[e*2],t[1]^=zae[e*2+1]}}});var Jae=F((mAt,Kae)=>{"use strict";var a5=Zae();function N1(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}N1.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};N1.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(a5.p1600(this.state),this.count=0)};N1.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&a5.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),a5.p1600(this.state),this.count=0,this.squeezing=!0};N1.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);let e=Buffer.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(a5.p1600(this.state),this.count=0);return e};N1.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};Kae.exports=N1});var Qae=F((gAt,Yae)=>{"use strict";Yae.exports=Wae()(Jae())});var Rk=F((yAt,nce)=>{"use strict";var Kqe=Qae(),Jqe=S2();function Xae(t){return Buffer.allocUnsafe(t).fill(0)}function ece(t,e,r){let n=Xae(e);return t=c5(t),r?t.length<e?(t.copy(n),n):t.slice(0,e):t.length<e?(t.copy(n,e-t.length),n):t.slice(-e)}function Yqe(t,e){return ece(t,e,!0)}function c5(t){if(!Buffer.isBuffer(t))if(Array.isArray(t))t=Buffer.from(t);else if(typeof t=="string")tce(t)?t=Buffer.from(eWe(rce(t)),"hex"):t=Buffer.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=Buffer.allocUnsafe(0);else if(Jqe.isBN(t))t=t.toArrayLike(Buffer);else if(t.toArray)t=Buffer.from(t.toArray());else throw new Error("invalid type");return t}function Qqe(t){return t=c5(t),"0x"+t.toString("hex")}function Xqe(t,e){return t=c5(t),e||(e=256),Kqe("keccak"+e).update(t).digest()}function eWe(t){return t.length%2?"0"+t:t}function tce(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function rce(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}nce.exports={zeros:Xae,setLength:ece,setLengthRight:Yqe,isHexString:tce,stripHexPrefix:rce,toBuffer:c5,bufferToHex:Qqe,keccak:Xqe}});var lce=F((wAt,cce)=>{"use strict";var rm=Rk(),tm=S2();function sce(t){return t.startsWith("int[")?"int256"+t.slice(3):t==="int"?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):t==="uint"?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):t==="fixed"?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):t==="ufixed"?"ufixed128x128":t}function O1(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function ice(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function oce(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function em(t){var e=typeof t;if(e==="string")return rm.isHexString(t)?new tm(rm.stripHexPrefix(t),16):new tm(t,10);if(e==="number")return new tm(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function Il(t,e){var r,n,i,s;if(t==="address")return Il("uint160",em(e));if(t==="bool")return Il("uint8",e?1:0);if(t==="string")return Il("bytes",new Buffer(e,"utf8"));if(rWe(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=oce(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(Il(t,e[s]));if(r==="dynamic"){var o=Il("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([Il("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,rm.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=O1(t),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return rm.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=O1(t),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=em(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(Buffer,"be",32)}else if(t.startsWith("int")){if(r=O1(t),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=em(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(Buffer,"be",32)}else if(t.startsWith("ufixed")){if(r=ice(t),n=em(e),n<0)throw new Error("Supplied ufixed is negative");return Il("uint256",n.mul(new tm(2).pow(new tm(r[1]))))}else if(t.startsWith("fixed"))return r=ice(t),Il("int256",em(e).mul(new tm(2).pow(new tm(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function tWe(t){return t==="string"||t==="bytes"||oce(t)==="dynamic"}function rWe(t){return t.lastIndexOf("]")===t.length-1}function nWe(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=sce(t[s]),a=e[s],c=Il(o,a);tWe(o)?(r.push(Il("uint256",i)),n.push(c),i+=c.length):r.push(c)}return Buffer.concat(r.concat(n))}function ace(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s<t.length;s++){var o=sce(t[s]),a=e[s];if(o==="bytes")i.push(a);else if(o==="string")i.push(new Buffer(a,"utf8"));else if(o==="bool")i.push(new Buffer(a?"01":"00","hex"));else if(o==="address")i.push(rm.setLength(a,20));else if(o.startsWith("bytes")){if(r=O1(o),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);i.push(rm.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=O1(o),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=em(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(Buffer,"be",r/8))}else if(o.startsWith("int")){if(r=O1(o),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=em(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(Buffer,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return Buffer.concat(i)}function iWe(t,e){return rm.keccak(ace(t,e))}cce.exports={rawEncode:nWe,solidityPack:ace,soliditySHA3:iWe}});var dce=F((vAt,fce)=>{"use strict";var xc=Rk(),ob=lce(),uce={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"]},Tk={encodeData(t,e,r,n=!0){let i=["bytes32"],s=[this.hashType(t,r)];if(n){let o=(a,c,u)=>{if(r[c]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":xc.keccak(this.encodeData(c,u,r,n))];if(u===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",xc.keccak(u)];if(c==="string")return typeof u=="string"&&(u=Buffer.from(u,"utf8")),["bytes32",xc.keccak(u)];if(c.lastIndexOf("]")===c.length-1){let d=c.slice(0,c.lastIndexOf("[")),h=u.map(m=>o(a,d,m));return["bytes32",xc.keccak(ob.rawEncode(h.map(([m])=>m),h.map(([,m])=>m)))]}return[c,u]};for(let a of r[t]){let[c,u]=o(a.name,a.type,e[a.name]);i.push(c),s.push(u)}}else for(let o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=xc.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Buffer.from(a,"utf8")),a=xc.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push("bytes32"),a=xc.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return ob.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(let i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(let n of e[t])for(let i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return xc.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return xc.keccak(this.encodeType(t,e))},sanitizeData(t){let e={};for(let r in uce.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){let r=this.sanitizeData(t),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),xc.keccak(Buffer.concat(n))}};fce.exports={TYPED_MESSAGE_SCHEMA:uce,TypedDataUtils:Tk,hashForSignTypedDataLegacy:function(t){return sWe(t.data)},hashForSignTypedData_v3:function(t){return Tk.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return Tk.hash(t.data)}};function sWe(t){let e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;let r=t.map(function(s){return s.type==="bytes"?xc.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return ob.soliditySHA3(["bytes32","bytes32"],[ob.soliditySHA3(new Array(t.length).fill("string"),i),ob.soliditySHA3(n,r)])}});var yce=F(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0});P1.filterFromParam=P1.FilterPolyfill=void 0;var M1=N2(),so=gl(),oWe=5*60*1e3,nm={jsonrpc:"2.0",id:0},Nk=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,M1.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}newFilter(e){return y(this,null,function*(){let r=gce(e),n=this.makeFilterId(),i=yield this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,so.hexStringFromIntNumber)(n)})}newBlockFilter(){return y(this,null,function*(){let e=this.makeFilterId(),r=yield this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,so.hexStringFromIntNumber)(e)})}newPendingTransactionFilter(){return y(this,null,function*(){let e=this.makeFilterId(),r=yield this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,so.hexStringFromIntNumber)(e)})}uninstallFilter(e){let r=(0,so.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){let r=(0,so.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(l5())}getFilterLogs(e){return y(this,null,function*(){let r=(0,so.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},nm),{method:"eth_getLogs",params:[hce(n)]})):l5()})}makeFilterId(){return(0,M1.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}getLogFilterChanges(e){return y(this,null,function*(){let r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return l5();let i=yield this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>Number(r.toBlock))return u5();console.info(`Fetching logs from ${n} to ${s} for filter ${e}`);let o=yield this.sendAsyncPromise(Object.assign(Object.assign({},nm),{method:"eth_getLogs",params:[hce(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){let a=o.result.map(u=>(0,so.intNumberFromHexString)(u.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){let u=(0,M1.IntNumber)(c+1);console.info(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return o})}getBlockFilterChanges(e){return y(this,null,function*(){let r=this.cursors.get(e);if(!r)return l5();let n=yield this.getCurrentBlockHeight();if(r>n)return u5();console.info(`Fetching blocks from ${r} to ${n} for filter (${e})`);let i=(yield Promise.all((0,so.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,M1.IntNumber)(o))))).filter(o=>!!o),s=(0,M1.IntNumber)(r+i.length);return console.info(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},nm),{result:i})})}getPendingTransactionFilterChanges(e){return y(this,null,function*(){return Promise.resolve(u5())})}setInitialCursorPosition(e,r){return y(this,null,function*(){let n=yield this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i})}setFilterTimeout(e){let r=this.timeouts.get(e);r&&window.clearTimeout(r);let n=window.setTimeout(()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)},oWe);this.timeouts.set(e,n)}getCurrentBlockHeight(){return y(this,null,function*(){let e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;let r=yield this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))})}_getCurrentBlockHeight(){return y(this,null,function*(){let{result:e}=yield this.sendAsyncPromise(Object.assign(Object.assign({},nm),{method:"eth_blockNumber",params:[]}));return(0,so.intNumberFromHexString)((0,so.ensureHexString)(e))})}getBlockHashByNumber(e){return y(this,null,function*(){let r=yield this.sendAsyncPromise(Object.assign(Object.assign({},nm),{method:"eth_getBlockByNumber",params:[(0,so.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,so.ensureHexString)(r.result.hash):null})}};P1.FilterPolyfill=Nk;function gce(t){return{fromBlock:pce(t.fromBlock),toBlock:pce(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}P1.filterFromParam=gce;function hce(t){let e={fromBlock:mce(t.fromBlock),toBlock:mce(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function pce(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,M1.IntNumber)(0);if((0,so.isHexString)(t))return(0,so.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function mce(t){return t==="latest"?t:(0,so.hexStringFromIntNumber)(t)}function l5(){return Object.assign(Object.assign({},nm),{error:{code:-32e3,message:"filter not found"}})}function u5(){return Object.assign(Object.assign({},nm),{result:[]})}});var f5=F((_At,wce)=>{"use strict";wce.exports=aWe;function aWe(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}});var Ece=F((CAt,bce)=>{"use strict";var vce=(t,e)=>function(){let r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{e.errorFirst?n.push(function(o,a){if(e.multiArgs){let c=new Array(arguments.length-1);for(let u=1;u<arguments.length;u++)c[u-1]=arguments[u];o?(c.unshift(o),s(c)):i(c)}else o?s(o):i(a)}):n.push(function(o){if(e.multiArgs){let a=new Array(arguments.length-1);for(let c=0;c<arguments.length;c++)a[c]=arguments[c];i(a)}else i(o)}),t.apply(this,n)})};bce.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)},n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):vce(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(let i in t){let s=t[i];n[i]=typeof s=="function"&&r(i)?vce(s,e):s}return n}});var Cce=F(Mk=>{"use strict";Object.defineProperty(Mk,"__esModule",{value:!0});var cWe=Gs();function _ce(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function lWe(t){let e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}var Ok=class extends cWe.EventEmitter{emit(e,...r){let n=e==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;let a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}let s=i[e];if(s===void 0)return!1;if(typeof s=="function")_ce(s,this,r);else{let o=s.length,a=lWe(s);for(let c=0;c<o;c+=1)_ce(a[c],this,r)}return!0}};Mk.default=Ok});var kk=F(k1=>{"use strict";var uWe=k1&&k1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(k1,"__esModule",{value:!0});k1.BaseBlockTracker=void 0;var fWe=uWe(Cce()),dWe=1e3,hWe=(t,e)=>t+e,xce=["sync","latest"],Pk=class t extends fWe.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*dWe,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}destroy(){return y(this,null,function*(){this._cancelBlockResetTimeout(),yield this._maybeEnd(),rs(t.prototype,this,"removeAllListeners").call(this)})}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}getLatestBlock(){return y(this,null,function*(){return this._currentBlock?this._currentBlock:yield new Promise(r=>this.once("latest",r))})}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){xce.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){return y(this,null,function*(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),yield this._start(),this.emit("_started"))})}_maybeEnd(){return y(this,null,function*(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),yield this._end(),this.emit("_ended"))})}_getBlockTrackerEventCount(){return xce.map(e=>this.listenerCount(e)).reduce(hWe)}_shouldUseNewBlock(e){let r=this._currentBlock;if(!r)return!0;let n=Ice(e),i=Ice(r);return this._usePastBlocks&&n<i||n>i}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){let r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};k1.BaseBlockTracker=Pk;function Ice(t){return Number.parseInt(t,16)}});var Fd={};An(Fd,{Struct:()=>Xn,StructError:()=>d5,any:()=>IWe,array:()=>AWe,assert:()=>Sce,assign:()=>yWe,bigint:()=>SWe,boolean:()=>DWe,coerce:()=>jk,create:()=>Dce,date:()=>RWe,defaulted:()=>qWe,define:()=>Io,deprecated:()=>wWe,dynamic:()=>vWe,empty:()=>zWe,enums:()=>TWe,func:()=>NWe,instance:()=>OWe,integer:()=>MWe,intersection:()=>PWe,is:()=>Bk,lazy:()=>bWe,literal:()=>kWe,map:()=>LWe,mask:()=>Rce,max:()=>GWe,min:()=>ZWe,never:()=>Uk,nonempty:()=>KWe,nullable:()=>FWe,number:()=>BWe,object:()=>ab,omit:()=>EWe,optional:()=>Tce,partial:()=>_We,pattern:()=>JWe,pick:()=>CWe,record:()=>UWe,refine:()=>im,regexp:()=>jWe,set:()=>HWe,size:()=>YWe,string:()=>Nce,struct:()=>xWe,trimmed:()=>WWe,tuple:()=>VWe,type:()=>cb,union:()=>$We,unknown:()=>Oce,validate:()=>L1});function pWe(t){return Ha(t)&&typeof t[Symbol.iterator]=="function"}function Ha(t){return typeof t=="object"&&t!=null}function Ace(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Fi(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function mWe(t){let{done:e,value:r}=t.next();return e?void 0:r}function gWe(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});let{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${Fi(n)}\``}=t;return _e(B({value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s},t),{message:c})}function*Lk(t,e,r,n){pWe(t)||(t=[t]);for(let i of t){let s=gWe(i,e,r,n);s&&(yield s)}}function*Fk(t,e,r={}){let{path:n=[],branch:i=[t],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),o&&e.type!=="type"&&Ha(e.schema)&&Ha(t)&&!Array.isArray(t)))for(let u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(let u of e.validator(t,a))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,d,h]of e.entries(t,a)){let m=Fk(d,h,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,d],coerce:s,mask:o,message:r.message});for(let w of m)w[0]?(c=w[0].refinement!=null?"not_refined":"not_valid",yield[w[0],void 0]):s&&(d=w[1],u===void 0?t=d:t instanceof Map?t.set(u,d):t instanceof Set?t.add(d):Ha(t)&&(d!==void 0||u in t)&&(t[u]=d))}if(c!=="not_valid")for(let u of e.refiner(t,a))u.explanation=r.message,c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}function Sce(t,e,r){let n=L1(t,e,{message:r});if(n[0])throw n[0]}function Dce(t,e,r){let n=L1(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Rce(t,e,r){let n=L1(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Bk(t,e){return!L1(t,e)[0]}function L1(t,e,r={}){let n=Fk(t,e,r),i=mWe(n);return i[0]?[new d5(i[0],function*(){for(let o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function yWe(...t){let e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?cb(n):ab(n)}function Io(t,e){return new Xn({type:t,schema:null,validator:e})}function wWe(t,e){return new Xn(_e(B({},t),{refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}}))}function vWe(t){return new Xn({type:"dynamic",schema:null,*entries(e,r){let n=t(e,r);yield*sh(n.entries(e,r))},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function bWe(t){let e;return new Xn({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*sh(e.entries(r,n))},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function EWe(t,e){let{schema:r}=t,n=B({},r);for(let i of e)delete n[i];switch(t.type){case"type":return cb(n);default:return ab(n)}}function _We(t){let e=t instanceof Xn,r=e?B({},t.schema):B({},t);for(let n in r)r[n]=Tce(r[n]);return e&&t.type==="type"?cb(r):ab(r)}function CWe(t,e){let{schema:r}=t,n={};for(let i of e)n[i]=r[i];switch(t.type){case"type":return cb(n);default:return ab(n)}}function xWe(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Io(t,e)}function IWe(){return Io("any",()=>!0)}function AWe(t){return new Xn({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(let[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${Fi(e)}`}})}function SWe(){return Io("bigint",t=>typeof t=="bigint")}function DWe(){return Io("boolean",t=>typeof t=="boolean")}function RWe(){return Io("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${Fi(t)}`)}function TWe(t){let e={},r=t.map(n=>Fi(n)).join();for(let n of t)e[n]=n;return new Xn({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${Fi(n)}`}})}function NWe(){return Io("func",t=>typeof t=="function"||`Expected a function, but received: ${Fi(t)}`)}function OWe(t){return Io("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${Fi(e)}`)}function MWe(){return Io("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${Fi(t)}`)}function PWe(t){return new Xn({type:"intersection",schema:null,*entries(e,r){for(let n of t)yield*sh(n.entries(e,r))},*validator(e,r){for(let n of t)yield*sh(n.validator(e,r))},*refiner(e,r){for(let n of t)yield*sh(n.refiner(e,r))}})}function kWe(t){let e=Fi(t),r=typeof t;return new Xn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${Fi(n)}`}})}function LWe(t,e){return new Xn({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(let[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${Fi(r)}`}})}function Uk(){return Io("never",()=>!1)}function FWe(t){return new Xn(_e(B({},t),{validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)}))}function BWe(){return Io("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${Fi(t)}`)}function ab(t){let e=t?Object.keys(t):[],r=Uk();return new Xn({type:"object",schema:t||null,*entries(n){if(t&&Ha(n)){let i=new Set(Object.keys(n));for(let s of e)i.delete(s),yield[s,n[s],t[s]];for(let s of i)yield[s,n[s],r]}},validator(n){return Ha(n)||`Expected an object, but received: ${Fi(n)}`},coercer(n){return Ha(n)?B({},n):n}})}function Tce(t){return new Xn(_e(B({},t),{validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)}))}function UWe(t,e){return new Xn({type:"record",schema:null,*entries(r){if(Ha(r))for(let n in r){let i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return Ha(r)||`Expected an object, but received: ${Fi(r)}`}})}function jWe(){return Io("regexp",t=>t instanceof RegExp)}function HWe(t){return new Xn({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(let r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${Fi(e)}`}})}function Nce(){return Io("string",t=>typeof t=="string"||`Expected a string, but received: ${Fi(t)}`)}function VWe(t){let e=Uk();return new Xn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Fi(r)}`}})}function cb(t){let e=Object.keys(t);return new Xn({type:"type",schema:t,*entries(r){if(Ha(r))for(let n of e)yield[n,r[n],t[n]]},validator(r){return Ha(r)||`Expected an object, but received: ${Fi(r)}`},coercer(r){return Ha(r)?B({},r):r}})}function $We(t){let e=t.map(r=>r.type).join(" | ");return new Xn({type:"union",schema:null,coercer(r){for(let n of t){let[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){let i=[];for(let s of t){let[...o]=Fk(r,s,n),[a]=o;if(a[0])for(let[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${Fi(r)}`,...i]}})}function Oce(){return Io("unknown",()=>!0)}function jk(t,e,r){return new Xn(_e(B({},t),{coercer:(n,i)=>Bk(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)}))}function qWe(t,e,r={}){return jk(t,Oce(),n=>{let i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&Ace(n)&&Ace(i)){let s=B({},n),o=!1;for(let a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function WWe(t){return jk(t,Nce(),e=>e.trim())}function zWe(t){return im(t,"empty",e=>{let r=Mce(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function Mce(t){return t instanceof Map||t instanceof Set?t.size:t.length}function GWe(t,e,r={}){let{exclusive:n}=r;return im(t,"max",i=>n?i<e:i<=e||`Expected a ${t.type} less than ${n?"":"or equal to "}${e} but received \`${i}\``)}function ZWe(t,e,r={}){let{exclusive:n}=r;return im(t,"min",i=>n?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function KWe(t){return im(t,"nonempty",e=>Mce(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function JWe(t,e){return im(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function YWe(t,e,r=e){let n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return im(t,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){let{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}else{let{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function im(t,e,r){return new Xn(_e(B({},t),{*refiner(n,i){yield*sh(t.refiner(n,i));let s=r(n,i),o=Lk(s,i,t,n);for(let a of o)yield _e(B({},a),{refinement:e})}}))}var d5,Xn,Bd=ma(()=>{"use strict";d5=class extends TypeError{constructor(e,r){let n,u=e,{message:i,explanation:s}=u,o=Ay(u,["message","explanation"]),{path:a}=e,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}};Xn=class{constructor(e){let{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,u)=>{let d=i(c,u);return Lk(d,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{let d=s(c,u);return Lk(d,u,this,c)}:this.refiner=()=>[]}assert(e,r){return Sce(e,this,r)}create(e,r){return Dce(e,this,r)}is(e){return Bk(e,this)}mask(e,r){return Rce(e,this,r)}validate(e,r={}){return L1(e,this,r)}}});var zu=F(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.assertExhaustive=Al.assertStruct=Al.assert=Al.AssertionError=void 0;var QWe=(Bd(),St(Fd));function XWe(t){return typeof t=="object"&&t!==null&&"message"in t}function eze(t){var e,r;return typeof((r=(e=t?.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function tze(t){let e=XWe(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function Pce(t,e){return eze(t)?new t({message:e}):t({message:e})}var lb=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};Al.AssertionError=lb;function rze(t,e="Assertion failed.",r=lb){if(!t)throw e instanceof Error?e:Pce(r,e)}Al.assert=rze;function nze(t,e,r="Assertion failed",n=lb){try{(0,QWe.assert)(t,e)}catch(i){throw Pce(n,`${r}: ${tze(i)}.`)}}Al.assertStruct=nze;function ize(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}Al.assertExhaustive=ize});var Hk=F(h5=>{"use strict";Object.defineProperty(h5,"__esModule",{value:!0});h5.base64=void 0;var sze=(Bd(),St(Fd)),oze=zu(),aze=(t,e={})=>{var r,n;let i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64",o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,oze.assert)(s==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,sze.pattern)(t,a)};h5.base64=aze});var ub=F(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.remove0x=Ri.add0x=Ri.assertIsStrictHexString=Ri.assertIsHexString=Ri.isStrictHexString=Ri.isHexString=Ri.StrictHexStruct=Ri.HexStruct=void 0;var F1=(Bd(),St(Fd)),kce=zu();Ri.HexStruct=(0,F1.pattern)((0,F1.string)(),/^(?:0x)?[0-9a-f]+$/iu);Ri.StrictHexStruct=(0,F1.pattern)((0,F1.string)(),/^0x[0-9a-f]+$/iu);function Lce(t){return(0,F1.is)(t,Ri.HexStruct)}Ri.isHexString=Lce;function Fce(t){return(0,F1.is)(t,Ri.StrictHexStruct)}Ri.isStrictHexString=Fce;function cze(t){(0,kce.assert)(Lce(t),"Value must be a hexadecimal string.")}Ri.assertIsHexString=cze;function lze(t){(0,kce.assert)(Fce(t),'Value must be a hexadecimal string, starting with "0x".')}Ri.assertIsStrictHexString=lze;function uze(t){return t.startsWith("0x")?t:t.startsWith("0X")?`0x${t.substring(2)}`:`0x${t}`}Ri.add0x=uze;function fze(t){return t.startsWith("0x")||t.startsWith("0X")?t.substring(2):t}Ri.remove0x=fze});var qk=F(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.createDataView=Dr.concatBytes=Dr.valueToBytes=Dr.stringToBytes=Dr.numberToBytes=Dr.signedBigIntToBytes=Dr.bigIntToBytes=Dr.hexToBytes=Dr.bytesToString=Dr.bytesToNumber=Dr.bytesToSignedBigInt=Dr.bytesToBigInt=Dr.bytesToHex=Dr.assertIsBytes=Dr.isBytes=void 0;var ta=zu(),Vk=ub(),Bce=48,Uce=58,jce=87;function dze(){let t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}var hze=dze();function $k(t){return t instanceof Uint8Array}Dr.isBytes=$k;function B1(t){(0,ta.assert)($k(t),"Value must be a Uint8Array.")}Dr.assertIsBytes=B1;function Hce(t){if(B1(t),t.length===0)return"0x";let e=hze(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,Vk.add0x)(r.join(""))}Dr.bytesToHex=Hce;function Vce(t){B1(t);let e=Hce(t);return BigInt(e)}Dr.bytesToBigInt=Vce;function pze(t){B1(t);let e=BigInt(0);for(let r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(t.length*8,e)}Dr.bytesToSignedBigInt=pze;function mze(t){B1(t);let e=Vce(t);return(0,ta.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)}Dr.bytesToNumber=mze;function gze(t){return B1(t),new TextDecoder().decode(t)}Dr.bytesToString=gze;function p5(t){var e;if(((e=t?.toLowerCase)===null||e===void 0?void 0:e.call(t))==="0x")return new Uint8Array;(0,Vk.assertIsHexString)(t);let r=(0,Vk.remove0x)(t).toLowerCase(),n=r.length%2===0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let s=0;s<i.length;s++){let o=n.charCodeAt(s*2),a=n.charCodeAt(s*2+1),c=o-(o<Uce?Bce:jce),u=a-(a<Uce?Bce:jce);i[s]=c*16+u}return i}Dr.hexToBytes=p5;function $ce(t){(0,ta.assert)(typeof t=="bigint","Value must be a bigint."),(0,ta.assert)(t>=BigInt(0),"Value must be a non-negative bigint.");let e=t.toString(16);return p5(e)}Dr.bigIntToBytes=$ce;function yze(t,e){(0,ta.assert)(e>0);let r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function wze(t,e){(0,ta.assert)(typeof t=="bigint","Value must be a bigint."),(0,ta.assert)(typeof e=="number","Byte length must be a number."),(0,ta.assert)(e>0,"Byte length must be greater than 0."),(0,ta.assert)(yze(t,e),"Byte length is too small to represent the given value.");let r=t,n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()}Dr.signedBigIntToBytes=wze;function qce(t){(0,ta.assert)(typeof t=="number","Value must be a number."),(0,ta.assert)(t>=0,"Value must be a non-negative number."),(0,ta.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");let e=t.toString(16);return p5(e)}Dr.numberToBytes=qce;function Wce(t){return(0,ta.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}Dr.stringToBytes=Wce;function zce(t){if(typeof t=="bigint")return $ce(t);if(typeof t=="number")return qce(t);if(typeof t=="string")return t.startsWith("0x")?p5(t):Wce(t);if($k(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}Dr.valueToBytes=zce;function vze(t){let e=new Array(t.length),r=0;for(let i=0;i<t.length;i++){let s=zce(t[i]);e[i]=s,r+=s.length}let n=new Uint8Array(r);for(let i=0,s=0;i<e.length;i++)n.set(e[i],s),s+=e[i].length;return n}Dr.concatBytes=vze;function bze(t){if(typeof Buffer<"u"&&t instanceof Buffer){let e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}Dr.createDataView=bze});var Zce=F(m5=>{"use strict";Object.defineProperty(m5,"__esModule",{value:!0});m5.ChecksumStruct=void 0;var Gce=(Bd(),St(Fd)),Eze=Hk();m5.ChecksumStruct=(0,Gce.size)((0,Eze.base64)((0,Gce.string)(),{paddingRequired:!0}),44,44)});var Yce=F(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.createHex=Sl.createBytes=Sl.createBigInt=Sl.createNumber=void 0;var ei=(Bd(),St(Fd)),_ze=zu(),Kce=qk(),g5=ub(),Jce=(0,ei.union)([(0,ei.number)(),(0,ei.bigint)(),(0,ei.string)(),g5.StrictHexStruct]),Cze=(0,ei.coerce)((0,ei.number)(),Jce,Number),xze=(0,ei.coerce)((0,ei.bigint)(),Jce,BigInt),MAt=(0,ei.union)([g5.StrictHexStruct,(0,ei.instance)(Uint8Array)]),Ize=(0,ei.coerce)((0,ei.instance)(Uint8Array),(0,ei.union)([g5.StrictHexStruct]),Kce.hexToBytes),Aze=(0,ei.coerce)(g5.StrictHexStruct,(0,ei.instance)(Uint8Array),Kce.bytesToHex);function Sze(t){try{let e=(0,ei.create)(t,Cze);return(0,_ze.assert)(Number.isFinite(e),`Expected a number-like value, got "${t}".`),e}catch(e){throw e instanceof ei.StructError?new Error(`Expected a number-like value, got "${t}".`):e}}Sl.createNumber=Sze;function Dze(t){try{return(0,ei.create)(t,xze)}catch(e){throw e instanceof ei.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}Sl.createBigInt=Dze;function Rze(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,ei.create)(t,Ize)}catch(e){throw e instanceof ei.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}Sl.createBytes=Rze;function Tze(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,ei.create)(t,Aze)}catch(e){throw e instanceof ei.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}Sl.createHex=Tze});var Xce=F(Rl=>{"use strict";var Qce=Rl&&Rl.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},oo=Rl&&Rl.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ic,Dl;Object.defineProperty(Rl,"__esModule",{value:!0});Rl.FrozenSet=Rl.FrozenMap=void 0;var fb=class{constructor(e){Ic.set(this,void 0),Qce(this,Ic,new Map(e),"f"),Object.freeze(this)}get size(){return oo(this,Ic,"f").size}[(Ic=new WeakMap,Symbol.iterator)](){return oo(this,Ic,"f")[Symbol.iterator]()}entries(){return oo(this,Ic,"f").entries()}forEach(e,r){return oo(this,Ic,"f").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return oo(this,Ic,"f").get(e)}has(e){return oo(this,Ic,"f").has(e)}keys(){return oo(this,Ic,"f").keys()}values(){return oo(this,Ic,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}};Rl.FrozenMap=fb;var db=class{constructor(e){Dl.set(this,void 0),Qce(this,Dl,new Set(e),"f"),Object.freeze(this)}get size(){return oo(this,Dl,"f").size}[(Dl=new WeakMap,Symbol.iterator)](){return oo(this,Dl,"f")[Symbol.iterator]()}entries(){return oo(this,Dl,"f").entries()}forEach(e,r){return oo(this,Dl,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return oo(this,Dl,"f").has(e)}keys(){return oo(this,Dl,"f").keys()}values(){return oo(this,Dl,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}};Rl.FrozenSet=db;Object.freeze(fb);Object.freeze(fb.prototype);Object.freeze(db);Object.freeze(db.prototype)});var tle=F(ele=>{"use strict";Object.defineProperty(ele,"__esModule",{value:!0})});var rle=F(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.getJsonRpcIdValidator=Ce.assertIsJsonRpcError=Ce.isJsonRpcError=Ce.assertIsJsonRpcFailure=Ce.isJsonRpcFailure=Ce.assertIsJsonRpcSuccess=Ce.isJsonRpcSuccess=Ce.assertIsJsonRpcResponse=Ce.isJsonRpcResponse=Ce.assertIsPendingJsonRpcResponse=Ce.isPendingJsonRpcResponse=Ce.JsonRpcResponseStruct=Ce.JsonRpcFailureStruct=Ce.JsonRpcSuccessStruct=Ce.PendingJsonRpcResponseStruct=Ce.assertIsJsonRpcRequest=Ce.isJsonRpcRequest=Ce.assertIsJsonRpcNotification=Ce.isJsonRpcNotification=Ce.JsonRpcNotificationStruct=Ce.JsonRpcRequestStruct=Ce.JsonRpcParamsStruct=Ce.JsonRpcErrorStruct=Ce.JsonRpcIdStruct=Ce.JsonRpcVersionStruct=Ce.jsonrpc2=Ce.getJsonSize=Ce.isValidJson=Ce.JsonStruct=Ce.UnsafeJsonStruct=void 0;var At=(Bd(),St(Fd)),Ud=zu(),Nze=()=>(0,At.define)("finite number",t=>(0,At.is)(t,(0,At.number)())&&Number.isFinite(t));Ce.UnsafeJsonStruct=(0,At.union)([(0,At.literal)(null),(0,At.boolean)(),Nze(),(0,At.string)(),(0,At.array)((0,At.lazy)(()=>Ce.UnsafeJsonStruct)),(0,At.record)((0,At.string)(),(0,At.lazy)(()=>Ce.UnsafeJsonStruct))]);Ce.JsonStruct=(0,At.define)("Json",(t,e)=>{function r(n,i){let o=[...i.validator(n,e)];return o.length>0?o:!0}try{let n=r(t,Ce.UnsafeJsonStruct);return n!==!0?n:r(JSON.parse(JSON.stringify(t)),Ce.UnsafeJsonStruct)}catch(n){return n instanceof RangeError?"Circular reference detected":!1}});function Oze(t){return(0,At.is)(t,Ce.JsonStruct)}Ce.isValidJson=Oze;function Mze(t){(0,Ud.assertStruct)(t,Ce.JsonStruct,"Invalid JSON value");let e=JSON.stringify(t);return new TextEncoder().encode(e).byteLength}Ce.getJsonSize=Mze;Ce.jsonrpc2="2.0";Ce.JsonRpcVersionStruct=(0,At.literal)(Ce.jsonrpc2);Ce.JsonRpcIdStruct=(0,At.nullable)((0,At.union)([(0,At.number)(),(0,At.string)()]));Ce.JsonRpcErrorStruct=(0,At.object)({code:(0,At.integer)(),message:(0,At.string)(),data:(0,At.optional)(Ce.JsonStruct),stack:(0,At.optional)((0,At.string)())});Ce.JsonRpcParamsStruct=(0,At.optional)((0,At.union)([(0,At.record)((0,At.string)(),Ce.JsonStruct),(0,At.array)(Ce.JsonStruct)]));Ce.JsonRpcRequestStruct=(0,At.object)({id:Ce.JsonRpcIdStruct,jsonrpc:Ce.JsonRpcVersionStruct,method:(0,At.string)(),params:Ce.JsonRpcParamsStruct});Ce.JsonRpcNotificationStruct=(0,At.omit)(Ce.JsonRpcRequestStruct,["id"]);function Pze(t){return(0,At.is)(t,Ce.JsonRpcNotificationStruct)}Ce.isJsonRpcNotification=Pze;function kze(t,e){(0,Ud.assertStruct)(t,Ce.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",e)}Ce.assertIsJsonRpcNotification=kze;function Lze(t){return(0,At.is)(t,Ce.JsonRpcRequestStruct)}Ce.isJsonRpcRequest=Lze;function Fze(t,e){(0,Ud.assertStruct)(t,Ce.JsonRpcRequestStruct,"Invalid JSON-RPC request",e)}Ce.assertIsJsonRpcRequest=Fze;Ce.PendingJsonRpcResponseStruct=(0,At.object)({id:Ce.JsonRpcIdStruct,jsonrpc:Ce.JsonRpcVersionStruct,result:(0,At.optional)((0,At.unknown)()),error:(0,At.optional)(Ce.JsonRpcErrorStruct)});Ce.JsonRpcSuccessStruct=(0,At.object)({id:Ce.JsonRpcIdStruct,jsonrpc:Ce.JsonRpcVersionStruct,result:Ce.JsonStruct});Ce.JsonRpcFailureStruct=(0,At.object)({id:Ce.JsonRpcIdStruct,jsonrpc:Ce.JsonRpcVersionStruct,error:Ce.JsonRpcErrorStruct});Ce.JsonRpcResponseStruct=(0,At.union)([Ce.JsonRpcSuccessStruct,Ce.JsonRpcFailureStruct]);function Bze(t){return(0,At.is)(t,Ce.PendingJsonRpcResponseStruct)}Ce.isPendingJsonRpcResponse=Bze;function Uze(t,e){(0,Ud.assertStruct)(t,Ce.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",e)}Ce.assertIsPendingJsonRpcResponse=Uze;function jze(t){return(0,At.is)(t,Ce.JsonRpcResponseStruct)}Ce.isJsonRpcResponse=jze;function Hze(t,e){(0,Ud.assertStruct)(t,Ce.JsonRpcResponseStruct,"Invalid JSON-RPC response",e)}Ce.assertIsJsonRpcResponse=Hze;function Vze(t){return(0,At.is)(t,Ce.JsonRpcSuccessStruct)}Ce.isJsonRpcSuccess=Vze;function $ze(t,e){(0,Ud.assertStruct)(t,Ce.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",e)}Ce.assertIsJsonRpcSuccess=$ze;function qze(t){return(0,At.is)(t,Ce.JsonRpcFailureStruct)}Ce.isJsonRpcFailure=qze;function Wze(t,e){(0,Ud.assertStruct)(t,Ce.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",e)}Ce.assertIsJsonRpcFailure=Wze;function zze(t){return(0,At.is)(t,Ce.JsonRpcErrorStruct)}Ce.isJsonRpcError=zze;function Gze(t,e){(0,Ud.assertStruct)(t,Ce.JsonRpcErrorStruct,"Invalid JSON-RPC error",e)}Ce.assertIsJsonRpcError=Gze;function Zze(t){let{permitEmptyString:e,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},t);return s=>!!(typeof s=="number"&&(r||Number.isInteger(s))||typeof s=="string"&&(e||s.length>0)||n&&s===null)}Ce.getJsonRpcIdValidator=Zze});var ile=F(nle=>{"use strict";Object.defineProperty(nle,"__esModule",{value:!0})});var ole=F((UAt,sle)=>{"use strict";var U1=1e3,j1=U1*60,H1=j1*60,sm=H1*24,Kze=sm*7,Jze=sm*365.25;sle.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Yze(t);if(r==="number"&&isFinite(t))return e.long?Xze(t):Qze(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Yze(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Jze;case"weeks":case"week":case"w":return r*Kze;case"days":case"day":case"d":return r*sm;case"hours":case"hour":case"hrs":case"hr":case"h":return r*H1;case"minutes":case"minute":case"mins":case"min":case"m":return r*j1;case"seconds":case"second":case"secs":case"sec":case"s":return r*U1;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Qze(t){var e=Math.abs(t);return e>=sm?Math.round(t/sm)+"d":e>=H1?Math.round(t/H1)+"h":e>=j1?Math.round(t/j1)+"m":e>=U1?Math.round(t/U1)+"s":t+"ms"}function Xze(t){var e=Math.abs(t);return e>=sm?y5(t,e,sm,"day"):e>=H1?y5(t,e,H1,"hour"):e>=j1?y5(t,e,j1,"minute"):e>=U1?y5(t,e,U1,"second"):t+" ms"}function y5(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var cle=F((jAt,ale)=>{"use strict";function eGe(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=ole(),r.destroy=u,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let h=0;for(let m=0;m<d.length;m++)h=(h<<5)-h+d.charCodeAt(m),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=e;function r(d){let h,m=null,w,_;function C(...A){if(!C.enabled)return;let R=C,L=Number(new Date),U=L-(h||L);R.diff=U,R.prev=h,R.curr=L,h=L,A[0]=r.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");let V=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,(Y,k)=>{if(Y==="%%")return"%";V++;let q=r.formatters[k];if(typeof q=="function"){let ie=A[V];Y=q.call(R,ie),A.splice(V,1),V--}return Y}),r.formatArgs.call(R,A),(R.log||r.log).apply(R,A)}return C.namespace=d,C.useColors=r.useColors(),C.color=r.selectColor(d),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(w!==r.namespaces&&(w=r.namespaces,_=r.enabled(d)),_),set:A=>{m=A}}),typeof r.init=="function"&&r.init(C),C}function n(d,h){let m=r(this.namespace+(typeof h>"u"?":":h)+d);return m.log=this.log,m}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let h,m=(typeof d=="string"?d:"").split(/[\s,]+/),w=m.length;for(h=0;h<w;h++)m[h]&&(d=m[h].replace(/\*/g,".*?"),d[0]==="-"?r.skips.push(new RegExp("^"+d.slice(1)+"$")):r.names.push(new RegExp("^"+d+"$")))}function s(){let d=[...r.names.map(a),...r.skips.map(a).map(h=>"-"+h)].join(",");return r.enable(""),d}function o(d){if(d[d.length-1]==="*")return!0;let h,m;for(h=0,m=r.skips.length;h<m;h++)if(r.skips[h].test(d))return!1;for(h=0,m=r.names.length;h<m;h++)if(r.names[h].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function c(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}ale.exports=eGe});var lle=F((ra,w5)=>{"use strict";ra.formatArgs=rGe;ra.save=nGe;ra.load=iGe;ra.useColors=tGe;ra.storage=sGe();ra.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ra.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function tGe(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function rGe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+w5.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}ra.log=console.debug||console.log||(()=>{});function nGe(t){try{t?ra.storage.setItem("debug",t):ra.storage.removeItem("debug")}catch{}}function iGe(){let t;try{t=ra.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function sGe(){try{return localStorage}catch{}}w5.exports=cle()(ra);var{formatters:oGe}=w5.exports;oGe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var ule=F(jd=>{"use strict";var aGe=jd&&jd.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jd,"__esModule",{value:!0});jd.createModuleLogger=jd.createProjectLogger=void 0;var cGe=aGe(lle()),lGe=(0,cGe.default)("metamask");function uGe(t){return lGe.extend(t)}jd.createProjectLogger=uGe;function fGe(t,e){return t.extend(e)}jd.createModuleLogger=fGe});var dle=F(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.calculateNumberSize=Vn.calculateStringSize=Vn.isASCII=Vn.isPlainObject=Vn.ESCAPE_CHARACTERS_REGEXP=Vn.JsonSize=Vn.hasProperty=Vn.isObject=Vn.isNullOrUndefined=Vn.isNonEmptyArray=void 0;function dGe(t){return Array.isArray(t)&&t.length>0}Vn.isNonEmptyArray=dGe;function hGe(t){return t==null}Vn.isNullOrUndefined=hGe;function pGe(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}Vn.isObject=pGe;var mGe=(t,e)=>Object.hasOwnProperty.call(t,e);Vn.hasProperty=mGe;var gGe;(function(t){t[t.Null=4]="Null",t[t.Comma=1]="Comma",t[t.Wrapper=1]="Wrapper",t[t.True=4]="True",t[t.False=5]="False",t[t.Quote=1]="Quote",t[t.Colon=1]="Colon",t[t.Date=24]="Date"})(gGe=Vn.JsonSize||(Vn.JsonSize={}));Vn.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function yGe(t){if(typeof t!="object"||t===null)return!1;try{let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch{return!1}}Vn.isPlainObject=yGe;function fle(t){return t.charCodeAt(0)<=127}Vn.isASCII=fle;function wGe(t){var e;return t.split("").reduce((n,i)=>fle(i)?n+1:n+2,0)+((e=t.match(Vn.ESCAPE_CHARACTERS_REGEXP))!==null&&e!==void 0?e:[]).length}Vn.calculateStringSize=wGe;function vGe(t){return t.toString().length}Vn.calculateNumberSize=vGe});var hle=F(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.hexToBigInt=Tl.hexToNumber=Tl.bigIntToHex=Tl.numberToHex=void 0;var V1=zu(),hb=ub(),bGe=t=>((0,V1.assert)(typeof t=="number","Value must be a number."),(0,V1.assert)(t>=0,"Value must be a non-negative number."),(0,V1.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,hb.add0x)(t.toString(16)));Tl.numberToHex=bGe;var EGe=t=>((0,V1.assert)(typeof t=="bigint","Value must be a bigint."),(0,V1.assert)(t>=0,"Value must be a non-negative bigint."),(0,hb.add0x)(t.toString(16)));Tl.bigIntToHex=EGe;var _Ge=t=>{(0,hb.assertIsHexString)(t);let e=parseInt(t,16);return(0,V1.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};Tl.hexToNumber=_Ge;var CGe=t=>((0,hb.assertIsHexString)(t),BigInt((0,hb.add0x)(t)));Tl.hexToBigInt=CGe});var mle=F(ple=>{"use strict";Object.defineProperty(ple,"__esModule",{value:!0})});var yle=F(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.timeSince=Gu.inMilliseconds=Gu.Duration=void 0;var xGe;(function(t){t[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year"})(xGe=Gu.Duration||(Gu.Duration={}));var IGe=t=>Number.isInteger(t)&&t>=0,gle=(t,e)=>{if(!IGe(t))throw new Error(`"${e}" must be a non-negative integer. Received: "${t}".`)};function AGe(t,e){return gle(t,"count"),t*e}Gu.inMilliseconds=AGe;function SGe(t){return gle(t,"timestamp"),Date.now()-t}Gu.timeSince=SGe});var vle=F(wle=>{"use strict";Object.defineProperty(wle,"__esModule",{value:!0})});var pb=F((GAt,ble)=>{"use strict";var DGe="2.0.0",RGe=Number.MAX_SAFE_INTEGER||9007199254740991,TGe=16,NGe=250,OGe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ble.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:TGe,MAX_SAFE_BUILD_LENGTH:NGe,MAX_SAFE_INTEGER:RGe,RELEASE_TYPES:OGe,SEMVER_SPEC_VERSION:DGe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var mb=F((ZAt,Ele)=>{"use strict";var MGe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ele.exports=MGe});var $1=F((Zu,_le)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Wk,MAX_SAFE_BUILD_LENGTH:PGe,MAX_LENGTH:kGe}=pb(),LGe=mb();Zu=_le.exports={};var FGe=Zu.re=[],BGe=Zu.safeRe=[],Ge=Zu.src=[],Ze=Zu.t={},UGe=0,zk="[a-zA-Z0-9-]",jGe=[["\\s",1],["\\d",kGe],[zk,PGe]],HGe=t=>{for(let[e,r]of jGe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Ut=(t,e,r)=>{let n=HGe(e),i=UGe++;LGe(t,i,e),Ze[t]=i,Ge[i]=e,FGe[i]=new RegExp(e,r?"g":void 0),BGe[i]=new RegExp(n,r?"g":void 0)};Ut("NUMERICIDENTIFIER","0|[1-9]\\d*");Ut("NUMERICIDENTIFIERLOOSE","\\d+");Ut("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${zk}*`);Ut("MAINVERSION",`(${Ge[Ze.NUMERICIDENTIFIER]})\\.(${Ge[Ze.NUMERICIDENTIFIER]})\\.(${Ge[Ze.NUMERICIDENTIFIER]})`);Ut("MAINVERSIONLOOSE",`(${Ge[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${Ge[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${Ge[Ze.NUMERICIDENTIFIERLOOSE]})`);Ut("PRERELEASEIDENTIFIER",`(?:${Ge[Ze.NUMERICIDENTIFIER]}|${Ge[Ze.NONNUMERICIDENTIFIER]})`);Ut("PRERELEASEIDENTIFIERLOOSE",`(?:${Ge[Ze.NUMERICIDENTIFIERLOOSE]}|${Ge[Ze.NONNUMERICIDENTIFIER]})`);Ut("PRERELEASE",`(?:-(${Ge[Ze.PRERELEASEIDENTIFIER]}(?:\\.${Ge[Ze.PRERELEASEIDENTIFIER]})*))`);Ut("PRERELEASELOOSE",`(?:-?(${Ge[Ze.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Ge[Ze.PRERELEASEIDENTIFIERLOOSE]})*))`);Ut("BUILDIDENTIFIER",`${zk}+`);Ut("BUILD",`(?:\\+(${Ge[Ze.BUILDIDENTIFIER]}(?:\\.${Ge[Ze.BUILDIDENTIFIER]})*))`);Ut("FULLPLAIN",`v?${Ge[Ze.MAINVERSION]}${Ge[Ze.PRERELEASE]}?${Ge[Ze.BUILD]}?`);Ut("FULL",`^${Ge[Ze.FULLPLAIN]}$`);Ut("LOOSEPLAIN",`[v=\\s]*${Ge[Ze.MAINVERSIONLOOSE]}${Ge[Ze.PRERELEASELOOSE]}?${Ge[Ze.BUILD]}?`);Ut("LOOSE",`^${Ge[Ze.LOOSEPLAIN]}$`);Ut("GTLT","((?:<|>)?=?)");Ut("XRANGEIDENTIFIERLOOSE",`${Ge[Ze.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ut("XRANGEIDENTIFIER",`${Ge[Ze.NUMERICIDENTIFIER]}|x|X|\\*`);Ut("XRANGEPLAIN",`[v=\\s]*(${Ge[Ze.XRANGEIDENTIFIER]})(?:\\.(${Ge[Ze.XRANGEIDENTIFIER]})(?:\\.(${Ge[Ze.XRANGEIDENTIFIER]})(?:${Ge[Ze.PRERELEASE]})?${Ge[Ze.BUILD]}?)?)?`);Ut("XRANGEPLAINLOOSE",`[v=\\s]*(${Ge[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Ge[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Ge[Ze.XRANGEIDENTIFIERLOOSE]})(?:${Ge[Ze.PRERELEASELOOSE]})?${Ge[Ze.BUILD]}?)?)?`);Ut("XRANGE",`^${Ge[Ze.GTLT]}\\s*${Ge[Ze.XRANGEPLAIN]}$`);Ut("XRANGELOOSE",`^${Ge[Ze.GTLT]}\\s*${Ge[Ze.XRANGEPLAINLOOSE]}$`);Ut("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Wk}})(?:\\.(\\d{1,${Wk}}))?(?:\\.(\\d{1,${Wk}}))?`);Ut("COERCE",`${Ge[Ze.COERCEPLAIN]}(?:$|[^\\d])`);Ut("COERCEFULL",Ge[Ze.COERCEPLAIN]+`(?:${Ge[Ze.PRERELEASE]})?(?:${Ge[Ze.BUILD]})?(?:$|[^\\d])`);Ut("COERCERTL",Ge[Ze.COERCE],!0);Ut("COERCERTLFULL",Ge[Ze.COERCEFULL],!0);Ut("LONETILDE","(?:~>?)");Ut("TILDETRIM",`(\\s*)${Ge[Ze.LONETILDE]}\\s+`,!0);Zu.tildeTrimReplace="$1~";Ut("TILDE",`^${Ge[Ze.LONETILDE]}${Ge[Ze.XRANGEPLAIN]}$`);Ut("TILDELOOSE",`^${Ge[Ze.LONETILDE]}${Ge[Ze.XRANGEPLAINLOOSE]}$`);Ut("LONECARET","(?:\\^)");Ut("CARETTRIM",`(\\s*)${Ge[Ze.LONECARET]}\\s+`,!0);Zu.caretTrimReplace="$1^";Ut("CARET",`^${Ge[Ze.LONECARET]}${Ge[Ze.XRANGEPLAIN]}$`);Ut("CARETLOOSE",`^${Ge[Ze.LONECARET]}${Ge[Ze.XRANGEPLAINLOOSE]}$`);Ut("COMPARATORLOOSE",`^${Ge[Ze.GTLT]}\\s*(${Ge[Ze.LOOSEPLAIN]})$|^$`);Ut("COMPARATOR",`^${Ge[Ze.GTLT]}\\s*(${Ge[Ze.FULLPLAIN]})$|^$`);Ut("COMPARATORTRIM",`(\\s*)${Ge[Ze.GTLT]}\\s*(${Ge[Ze.LOOSEPLAIN]}|${Ge[Ze.XRANGEPLAIN]})`,!0);Zu.comparatorTrimReplace="$1$2$3";Ut("HYPHENRANGE",`^\\s*(${Ge[Ze.XRANGEPLAIN]})\\s+-\\s+(${Ge[Ze.XRANGEPLAIN]})\\s*$`);Ut("HYPHENRANGELOOSE",`^\\s*(${Ge[Ze.XRANGEPLAINLOOSE]})\\s+-\\s+(${Ge[Ze.XRANGEPLAINLOOSE]})\\s*$`);Ut("STAR","(<|>)?=?\\s*\\*");Ut("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ut("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var v5=F((KAt,Cle)=>{"use strict";var VGe=Object.freeze({loose:!0}),$Ge=Object.freeze({}),qGe=t=>t?typeof t!="object"?VGe:t:$Ge;Cle.exports=qGe});var Gk=F((JAt,Ale)=>{"use strict";var xle=/^[0-9]+$/,Ile=(t,e)=>{let r=xle.test(t),n=xle.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},WGe=(t,e)=>Ile(e,t);Ale.exports={compareIdentifiers:Ile,rcompareIdentifiers:WGe}});var Ls=F((YAt,Tle)=>{"use strict";var b5=mb(),{MAX_LENGTH:Sle,MAX_SAFE_INTEGER:E5}=pb(),{safeRe:Dle,t:Rle}=$1(),zGe=v5(),{compareIdentifiers:q1}=Gk(),Zk=class t{constructor(e,r){if(r=zGe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Sle)throw new TypeError(`version is longer than ${Sle} characters`);b5("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Dle[Rle.LOOSE]:Dle[Rle.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>E5||this.major<0)throw new TypeError("Invalid major version");if(this.minor>E5||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>E5||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<E5)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(b5("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),q1(this.major,e.major)||q1(this.minor,e.minor)||q1(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(b5("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return q1(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(b5("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return q1(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),q1(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Tle.exports=Zk});var om=F((QAt,Ole)=>{"use strict";var Nle=Ls(),GGe=(t,e,r=!1)=>{if(t instanceof Nle)return t;try{return new Nle(t,e)}catch(n){if(!r)return null;throw n}};Ole.exports=GGe});var Ple=F((XAt,Mle)=>{"use strict";var ZGe=om(),KGe=(t,e)=>{let r=ZGe(t,e);return r?r.version:null};Mle.exports=KGe});var Lle=F((eSt,kle)=>{"use strict";var JGe=om(),YGe=(t,e)=>{let r=JGe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};kle.exports=YGe});var Ule=F((tSt,Ble)=>{"use strict";var Fle=Ls(),QGe=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Fle(t instanceof Fle?t.version:t,r).inc(e,n,i).version}catch{return null}};Ble.exports=QGe});var Vle=F((rSt,Hle)=>{"use strict";var jle=om(),XGe=(t,e)=>{let r=jle(t,null,!0),n=jle(e,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";let d=c?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};Hle.exports=XGe});var qle=F((nSt,$le)=>{"use strict";var eZe=Ls(),tZe=(t,e)=>new eZe(t,e).major;$le.exports=tZe});var zle=F((iSt,Wle)=>{"use strict";var rZe=Ls(),nZe=(t,e)=>new rZe(t,e).minor;Wle.exports=nZe});var Zle=F((sSt,Gle)=>{"use strict";var iZe=Ls(),sZe=(t,e)=>new iZe(t,e).patch;Gle.exports=sZe});var Jle=F((oSt,Kle)=>{"use strict";var oZe=om(),aZe=(t,e)=>{let r=oZe(t,e);return r&&r.prerelease.length?r.prerelease:null};Kle.exports=aZe});var Va=F((aSt,Qle)=>{"use strict";var Yle=Ls(),cZe=(t,e,r)=>new Yle(t,r).compare(new Yle(e,r));Qle.exports=cZe});var eue=F((cSt,Xle)=>{"use strict";var lZe=Va(),uZe=(t,e,r)=>lZe(e,t,r);Xle.exports=uZe});var rue=F((lSt,tue)=>{"use strict";var fZe=Va(),dZe=(t,e)=>fZe(t,e,!0);tue.exports=dZe});var _5=F((uSt,iue)=>{"use strict";var nue=Ls(),hZe=(t,e,r)=>{let n=new nue(t,r),i=new nue(e,r);return n.compare(i)||n.compareBuild(i)};iue.exports=hZe});var oue=F((fSt,sue)=>{"use strict";var pZe=_5(),mZe=(t,e)=>t.sort((r,n)=>pZe(r,n,e));sue.exports=mZe});var cue=F((dSt,aue)=>{"use strict";var gZe=_5(),yZe=(t,e)=>t.sort((r,n)=>gZe(n,r,e));aue.exports=yZe});var gb=F((hSt,lue)=>{"use strict";var wZe=Va(),vZe=(t,e,r)=>wZe(t,e,r)>0;lue.exports=vZe});var C5=F((pSt,uue)=>{"use strict";var bZe=Va(),EZe=(t,e,r)=>bZe(t,e,r)<0;uue.exports=EZe});var Kk=F((mSt,fue)=>{"use strict";var _Ze=Va(),CZe=(t,e,r)=>_Ze(t,e,r)===0;fue.exports=CZe});var Jk=F((gSt,due)=>{"use strict";var xZe=Va(),IZe=(t,e,r)=>xZe(t,e,r)!==0;due.exports=IZe});var x5=F((ySt,hue)=>{"use strict";var AZe=Va(),SZe=(t,e,r)=>AZe(t,e,r)>=0;hue.exports=SZe});var I5=F((wSt,pue)=>{"use strict";var DZe=Va(),RZe=(t,e,r)=>DZe(t,e,r)<=0;pue.exports=RZe});var Yk=F((vSt,mue)=>{"use strict";var TZe=Kk(),NZe=Jk(),OZe=gb(),MZe=x5(),PZe=C5(),kZe=I5(),LZe=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return TZe(t,r,n);case"!=":return NZe(t,r,n);case">":return OZe(t,r,n);case">=":return MZe(t,r,n);case"<":return PZe(t,r,n);case"<=":return kZe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};mue.exports=LZe});var yue=F((bSt,gue)=>{"use strict";var FZe=Ls(),BZe=om(),{safeRe:A5,t:S5}=$1(),UZe=(t,e)=>{if(t instanceof FZe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?A5[S5.COERCEFULL]:A5[S5.COERCE]);else{let c=e.includePrerelease?A5[S5.COERCERTLFULL]:A5[S5.COERCERTL],u;for(;(u=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return BZe(`${n}.${i}.${s}${o}${a}`,e)};gue.exports=UZe});var vue=F((ESt,wue)=>{"use strict";wue.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Eue=F((_St,bue)=>{"use strict";bue.exports=Rr;Rr.Node=am;Rr.create=Rr;function Rr(t){var e=this;if(e instanceof Rr||(e=new Rr),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}Rr.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Rr.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Rr.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Rr.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)HZe(this,arguments[t]);return this.length};Rr.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)VZe(this,arguments[t]);return this.length};Rr.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Rr.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Rr.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};Rr.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};Rr.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Rr.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Rr.prototype.map=function(t,e){e=e||this;for(var r=new Rr,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};Rr.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Rr,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};Rr.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};Rr.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};Rr.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Rr.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Rr.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Rr;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};Rr.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Rr;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};Rr.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=jZe(this,i,r[n]);return s};Rr.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function jZe(t,e,r){var n=e===t.head?new am(r,null,e,t):new am(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function HZe(t,e){t.tail=new am(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function VZe(t,e){t.head=new am(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function am(t,e,r,n){if(!(this instanceof am))return new am(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{vue()(Rr)}catch{}});var Aue=F((CSt,Iue)=>{"use strict";var $Ze=Eue(),cm=Symbol("max"),Ju=Symbol("length"),W1=Symbol("lengthCalculator"),wb=Symbol("allowStale"),lm=Symbol("maxAge"),Ku=Symbol("dispose"),_ue=Symbol("noDisposeOnSet"),Xi=Symbol("lruList"),Ac=Symbol("cache"),xue=Symbol("updateAgeOnGet"),Qk=()=>1,eL=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[cm]=e.max||1/0,n=e.length||Qk;if(this[W1]=typeof n!="function"?Qk:n,this[wb]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[lm]=e.maxAge||0,this[Ku]=e.dispose,this[_ue]=e.noDisposeOnSet||!1,this[xue]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[cm]=e||1/0,yb(this)}get max(){return this[cm]}set allowStale(e){this[wb]=!!e}get allowStale(){return this[wb]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[lm]=e,yb(this)}get maxAge(){return this[lm]}set lengthCalculator(e){typeof e!="function"&&(e=Qk),e!==this[W1]&&(this[W1]=e,this[Ju]=0,this[Xi].forEach(r=>{r.length=this[W1](r.value,r.key),this[Ju]+=r.length})),yb(this)}get lengthCalculator(){return this[W1]}get length(){return this[Ju]}get itemCount(){return this[Xi].length}rforEach(e,r){r=r||this;for(let n=this[Xi].tail;n!==null;){let i=n.prev;Cue(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[Xi].head;n!==null;){let i=n.next;Cue(this,e,n,r),n=i}}keys(){return this[Xi].toArray().map(e=>e.key)}values(){return this[Xi].toArray().map(e=>e.value)}reset(){this[Ku]&&this[Xi]&&this[Xi].length&&this[Xi].forEach(e=>this[Ku](e.key,e.value)),this[Ac]=new Map,this[Xi]=new $Ze,this[Ju]=0}dump(){return this[Xi].map(e=>D5(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Xi]}set(e,r,n){if(n=n||this[lm],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,s=this[W1](r,e);if(this[Ac].has(e)){if(s>this[cm])return z1(this,this[Ac].get(e)),!1;let c=this[Ac].get(e).value;return this[Ku]&&(this[_ue]||this[Ku](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[Ju]+=s-c.length,c.length=s,this.get(e),yb(this),!0}let o=new tL(e,r,s,i,n);return o.length>this[cm]?(this[Ku]&&this[Ku](e,r),!1):(this[Ju]+=o.length,this[Xi].unshift(o),this[Ac].set(e,this[Xi].head),yb(this),!0)}has(e){if(!this[Ac].has(e))return!1;let r=this[Ac].get(e).value;return!D5(this,r)}get(e){return Xk(this,e,!0)}peek(e){return Xk(this,e,!1)}pop(){let e=this[Xi].tail;return e?(z1(this,e),e.value):null}del(e){z1(this,this[Ac].get(e))}load(e){this.reset();let r=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{let o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[Ac].forEach((e,r)=>Xk(this,r,!1))}},Xk=(t,e,r)=>{let n=t[Ac].get(e);if(n){let i=n.value;if(D5(t,i)){if(z1(t,n),!t[wb])return}else r&&(t[xue]&&(n.value.now=Date.now()),t[Xi].unshiftNode(n));return i.value}},D5=(t,e)=>{if(!e||!e.maxAge&&!t[lm])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[lm]&&r>t[lm]},yb=t=>{if(t[Ju]>t[cm])for(let e=t[Xi].tail;t[Ju]>t[cm]&&e!==null;){let r=e.prev;z1(t,e),e=r}},z1=(t,e)=>{if(e){let r=e.value;t[Ku]&&t[Ku](r.key,r.value),t[Ju]-=r.length,t[Ac].delete(r.key),t[Xi].removeNode(e)}},tL=class{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}},Cue=(t,e,r,n)=>{let i=r.value;D5(t,i)&&(z1(t,r),t[wb]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};Iue.exports=eL});var $a=F((xSt,Tue)=>{"use strict";var rL=class t{constructor(e,r){if(r=WZe(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof nL)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!Due(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&QZe(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&JZe)|(this.options.loose&&YZe))+":"+e,i=Sue.get(n);if(i)return i;let s=this.options.loose,o=s?Ao[ao.HYPHENRANGELOOSE]:Ao[ao.HYPHENRANGE];e=e.replace(o,cKe(this.options.includePrerelease)),Bn("hyphen replace",e),e=e.replace(Ao[ao.COMPARATORTRIM],GZe),Bn("comparator trim",e),e=e.replace(Ao[ao.TILDETRIM],ZZe),Bn("tilde trim",e),e=e.replace(Ao[ao.CARETTRIM],KZe),Bn("caret trim",e);let a=e.split(" ").map(h=>XZe(h,this.options)).join(" ").split(/\s+/).map(h=>aKe(h,this.options));s&&(a=a.filter(h=>(Bn("loose invalid filter",h,this.options),!!h.match(Ao[ao.COMPARATORLOOSE])))),Bn("range list",a);let c=new Map,u=a.map(h=>new nL(h,this.options));for(let h of u){if(Due(h))return[h];c.set(h.value,h)}c.size>1&&c.has("")&&c.delete("");let d=[...c.values()];return Sue.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Rue(n,r)&&e.set.some(i=>Rue(i,r)&&n.every(s=>i.every(o=>s.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new zZe(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(lKe(this.set[r],e,this.options))return!0;return!1}};Tue.exports=rL;var qZe=Aue(),Sue=new qZe({max:1e3}),WZe=v5(),nL=vb(),Bn=mb(),zZe=Ls(),{safeRe:Ao,t:ao,comparatorTrimReplace:GZe,tildeTrimReplace:ZZe,caretTrimReplace:KZe}=$1(),{FLAG_INCLUDE_PRERELEASE:JZe,FLAG_LOOSE:YZe}=pb(),Due=t=>t.value==="<0.0.0-0",QZe=t=>t.value==="",Rue=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,e)),i=n.pop();return r},XZe=(t,e)=>(Bn("comp",t,e),t=rKe(t,e),Bn("caret",t),t=eKe(t,e),Bn("tildes",t),t=iKe(t,e),Bn("xrange",t),t=oKe(t,e),Bn("stars",t),t),co=t=>!t||t.toLowerCase()==="x"||t==="*",eKe=(t,e)=>t.trim().split(/\s+/).map(r=>tKe(r,e)).join(" "),tKe=(t,e)=>{let r=e.loose?Ao[ao.TILDELOOSE]:Ao[ao.TILDE];return t.replace(r,(n,i,s,o,a)=>{Bn("tilde",t,n,i,s,o,a);let c;return co(i)?c="":co(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:co(o)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:a?(Bn("replaceTilde pr",a),c=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`,Bn("tilde return",c),c})},rKe=(t,e)=>t.trim().split(/\s+/).map(r=>nKe(r,e)).join(" "),nKe=(t,e)=>{Bn("caret",t,e);let r=e.loose?Ao[ao.CARETLOOSE]:Ao[ao.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,s,o,a,c)=>{Bn("caret",t,i,s,o,a,c);let u;return co(s)?u="":co(o)?u=`>=${s}.0.0${n} <${+s+1}.0.0-0`:co(a)?s==="0"?u=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:u=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`:c?(Bn("replaceCaret pr",c),s==="0"?o==="0"?u=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`:u=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`:u=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`):(Bn("no pr"),s==="0"?o==="0"?u=`>=${s}.${o}.${a}${n} <${s}.${o}.${+a+1}-0`:u=`>=${s}.${o}.${a}${n} <${s}.${+o+1}.0-0`:u=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Bn("caret return",u),u})},iKe=(t,e)=>(Bn("replaceXRanges",t,e),t.split(/\s+/).map(r=>sKe(r,e)).join(" ")),sKe=(t,e)=>{t=t.trim();let r=e.loose?Ao[ao.XRANGELOOSE]:Ao[ao.XRANGE];return t.replace(r,(n,i,s,o,a,c)=>{Bn("xRange",t,n,i,s,o,a,c);let u=co(s),d=u||co(o),h=d||co(a),m=h;return i==="="&&m&&(i=""),c=e.includePrerelease?"-0":"",u?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(d&&(o=0),a=0,i===">"?(i=">=",d?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",d?s=+s+1:o=+o+1),i==="<"&&(c="-0"),n=`${i+s}.${o}.${a}${c}`):d?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`),Bn("xRange return",n),n})},oKe=(t,e)=>(Bn("replaceStars",t,e),t.trim().replace(Ao[ao.STAR],"")),aKe=(t,e)=>(Bn("replaceGTE0",t,e),t.trim().replace(Ao[e.includePrerelease?ao.GTE0PRE:ao.GTE0],"")),cKe=t=>(e,r,n,i,s,o,a,c,u,d,h,m,w)=>(co(n)?r="":co(i)?r=`>=${n}.0.0${t?"-0":""}`:co(s)?r=`>=${n}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,co(u)?c="":co(d)?c=`<${+u+1}.0.0-0`:co(h)?c=`<${u}.${+d+1}.0-0`:m?c=`<=${u}.${d}.${h}-${m}`:t?c=`<${u}.${d}.${+h+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),lKe=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Bn(t[n].semver),t[n].semver!==nL.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var vb=F((ISt,Lue)=>{"use strict";var bb=Symbol("SemVer ANY"),oL=class t{static get ANY(){return bb}constructor(e,r){if(r=Nue(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),sL("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===bb?this.value="":this.value=this.operator+this.semver.version,sL("comp",this)}parse(e){let r=this.options.loose?Oue[Mue.COMPARATORLOOSE]:Oue[Mue.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Pue(n[2],this.options.loose):this.semver=bb}toString(){return this.value}test(e){if(sL("Comparator.test",e,this.options.loose),this.semver===bb||e===bb)return!0;if(typeof e=="string")try{e=new Pue(e,this.options)}catch{return!1}return iL(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new kue(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new kue(this.value,r).test(e.semver):(r=Nue(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||iL(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||iL(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Lue.exports=oL;var Nue=v5(),{safeRe:Oue,t:Mue}=$1(),iL=Yk(),sL=mb(),Pue=Ls(),kue=$a()});var Eb=F((ASt,Fue)=>{"use strict";var uKe=$a(),fKe=(t,e,r)=>{try{e=new uKe(e,r)}catch{return!1}return e.test(t)};Fue.exports=fKe});var Uue=F((SSt,Bue)=>{"use strict";var dKe=$a(),hKe=(t,e)=>new dKe(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Bue.exports=hKe});var Hue=F((DSt,jue)=>{"use strict";var pKe=Ls(),mKe=$a(),gKe=(t,e,r)=>{let n=null,i=null,s=null;try{s=new mKe(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new pKe(n,r))}),n};jue.exports=gKe});var $ue=F((RSt,Vue)=>{"use strict";var yKe=Ls(),wKe=$a(),vKe=(t,e,r)=>{let n=null,i=null,s=null;try{s=new wKe(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new yKe(n,r))}),n};Vue.exports=vKe});var zue=F((TSt,Wue)=>{"use strict";var aL=Ls(),bKe=$a(),que=gb(),EKe=(t,e)=>{t=new bKe(t,e);let r=new aL("0.0.0");if(t.test(r)||(r=new aL("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],s=null;i.forEach(o=>{let a=new aL(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||que(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||que(r,s))&&(r=s)}return r&&t.test(r)?r:null};Wue.exports=EKe});var Zue=F((NSt,Gue)=>{"use strict";var _Ke=$a(),CKe=(t,e)=>{try{return new _Ke(t,e).range||"*"}catch{return null}};Gue.exports=CKe});var R5=F((OSt,Que)=>{"use strict";var xKe=Ls(),Yue=vb(),{ANY:IKe}=Yue,AKe=$a(),SKe=Eb(),Kue=gb(),Jue=C5(),DKe=I5(),RKe=x5(),TKe=(t,e,r,n)=>{t=new xKe(t,n),e=new AKe(e,n);let i,s,o,a,c;switch(r){case">":i=Kue,s=DKe,o=Jue,a=">",c=">=";break;case"<":i=Jue,s=RKe,o=Kue,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(SKe(t,e,n))return!1;for(let u=0;u<e.set.length;++u){let d=e.set[u],h=null,m=null;if(d.forEach(w=>{w.semver===IKe&&(w=new Yue(">=0.0.0")),h=h||w,m=m||w,i(w.semver,h.semver,n)?h=w:o(w.semver,m.semver,n)&&(m=w)}),h.operator===a||h.operator===c||(!m.operator||m.operator===a)&&s(t,m.semver))return!1;if(m.operator===c&&o(t,m.semver))return!1}return!0};Que.exports=TKe});var efe=F((MSt,Xue)=>{"use strict";var NKe=R5(),OKe=(t,e,r)=>NKe(t,e,">",r);Xue.exports=OKe});var rfe=F((PSt,tfe)=>{"use strict";var MKe=R5(),PKe=(t,e,r)=>MKe(t,e,"<",r);tfe.exports=PKe});var sfe=F((kSt,ife)=>{"use strict";var nfe=$a(),kKe=(t,e,r)=>(t=new nfe(t,r),e=new nfe(e,r),t.intersects(e,r));ife.exports=kKe});var afe=F((LSt,ofe)=>{"use strict";var LKe=Eb(),FKe=Va();ofe.exports=(t,e,r)=>{let n=[],i=null,s=null,o=t.sort((d,h)=>FKe(d,h,r));for(let d of o)LKe(d,e,r)?(s=d,i||(i=d)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let a=[];for(let[d,h]of n)d===h?a.push(d):!h&&d===o[0]?a.push("*"):h?d===o[0]?a.push(`<=${h}`):a.push(`${d} - ${h}`):a.push(`>=${d}`);let c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e}});var hfe=F((FSt,dfe)=>{"use strict";var cfe=$a(),lL=vb(),{ANY:cL}=lL,_b=Eb(),uL=Va(),BKe=(t,e,r={})=>{if(t===e)return!0;t=new cfe(t,r),e=new cfe(e,r);let n=!1;e:for(let i of t.set){for(let s of e.set){let o=jKe(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},UKe=[new lL(">=0.0.0-0")],lfe=[new lL(">=0.0.0")],jKe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===cL){if(e.length===1&&e[0].semver===cL)return!0;r.includePrerelease?t=UKe:t=lfe}if(e.length===1&&e[0].semver===cL){if(r.includePrerelease)return!0;e=lfe}let n=new Set,i,s;for(let w of t)w.operator===">"||w.operator===">="?i=ufe(i,w,r):w.operator==="<"||w.operator==="<="?s=ffe(s,w,r):n.add(w.semver);if(n.size>1)return null;let o;if(i&&s){if(o=uL(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let w of n){if(i&&!_b(w,String(i),r)||s&&!_b(w,String(s),r))return null;for(let _ of e)if(!_b(w,String(_),r))return!1;return!0}let a,c,u,d,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&s.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let w of e){if(d=d||w.operator===">"||w.operator===">=",u=u||w.operator==="<"||w.operator==="<=",i){if(m&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===m.major&&w.semver.minor===m.minor&&w.semver.patch===m.patch&&(m=!1),w.operator===">"||w.operator===">="){if(a=ufe(i,w,r),a===w&&a!==i)return!1}else if(i.operator===">="&&!_b(i.semver,String(w),r))return!1}if(s){if(h&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===h.major&&w.semver.minor===h.minor&&w.semver.patch===h.patch&&(h=!1),w.operator==="<"||w.operator==="<="){if(c=ffe(s,w,r),c===w&&c!==s)return!1}else if(s.operator==="<="&&!_b(s.semver,String(w),r))return!1}if(!w.operator&&(s||i)&&o!==0)return!1}return!(i&&u&&!s&&o!==0||s&&d&&!i&&o!==0||m||h)},ufe=(t,e,r)=>{if(!t)return e;let n=uL(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},ffe=(t,e,r)=>{if(!t)return e;let n=uL(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};dfe.exports=BKe});var yfe=F((BSt,gfe)=>{"use strict";var fL=$1(),pfe=pb(),HKe=Ls(),mfe=Gk(),VKe=om(),$Ke=Ple(),qKe=Lle(),WKe=Ule(),zKe=Vle(),GKe=qle(),ZKe=zle(),KKe=Zle(),JKe=Jle(),YKe=Va(),QKe=eue(),XKe=rue(),eJe=_5(),tJe=oue(),rJe=cue(),nJe=gb(),iJe=C5(),sJe=Kk(),oJe=Jk(),aJe=x5(),cJe=I5(),lJe=Yk(),uJe=yue(),fJe=vb(),dJe=$a(),hJe=Eb(),pJe=Uue(),mJe=Hue(),gJe=$ue(),yJe=zue(),wJe=Zue(),vJe=R5(),bJe=efe(),EJe=rfe(),_Je=sfe(),CJe=afe(),xJe=hfe();gfe.exports={parse:VKe,valid:$Ke,clean:qKe,inc:WKe,diff:zKe,major:GKe,minor:ZKe,patch:KKe,prerelease:JKe,compare:YKe,rcompare:QKe,compareLoose:XKe,compareBuild:eJe,sort:tJe,rsort:rJe,gt:nJe,lt:iJe,eq:sJe,neq:oJe,gte:aJe,lte:cJe,cmp:lJe,coerce:uJe,Comparator:fJe,Range:dJe,satisfies:hJe,toComparators:pJe,maxSatisfying:mJe,minSatisfying:gJe,minVersion:yJe,validRange:wJe,outside:vJe,gtr:bJe,ltr:EJe,intersects:_Je,simplifyRange:CJe,subset:xJe,SemVer:HKe,re:fL.re,src:fL.src,tokens:fL.t,SEMVER_SPEC_VERSION:pfe.SEMVER_SPEC_VERSION,RELEASE_TYPES:pfe.RELEASE_TYPES,compareIdentifiers:mfe.compareIdentifiers,rcompareIdentifiers:mfe.rcompareIdentifiers}});var vfe=F($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.satisfiesVersionRange=$n.gtRange=$n.gtVersion=$n.assertIsSemVerRange=$n.assertIsSemVerVersion=$n.isValidSemVerRange=$n.isValidSemVerVersion=$n.VersionRangeStruct=$n.VersionStruct=void 0;var Cb=yfe(),G1=(Bd(),St(Fd)),wfe=zu();$n.VersionStruct=(0,G1.refine)((0,G1.string)(),"Version",t=>(0,Cb.valid)(t)===null?`Expected SemVer version, got "${t}"`:!0);$n.VersionRangeStruct=(0,G1.refine)((0,G1.string)(),"Version range",t=>(0,Cb.validRange)(t)===null?`Expected SemVer range, got "${t}"`:!0);function IJe(t){return(0,G1.is)(t,$n.VersionStruct)}$n.isValidSemVerVersion=IJe;function AJe(t){return(0,G1.is)(t,$n.VersionRangeStruct)}$n.isValidSemVerRange=AJe;function SJe(t){(0,wfe.assertStruct)(t,$n.VersionStruct)}$n.assertIsSemVerVersion=SJe;function DJe(t){(0,wfe.assertStruct)(t,$n.VersionRangeStruct)}$n.assertIsSemVerRange=DJe;function RJe(t,e){return(0,Cb.gt)(t,e)}$n.gtVersion=RJe;function TJe(t,e){return(0,Cb.gtr)(t,e)}$n.gtRange=TJe;function NJe(t,e){return(0,Cb.satisfies)(t,e,{includePrerelease:!0})}$n.satisfiesVersionRange=NJe});var bfe=F(ti=>{"use strict";var OJe=ti&&ti.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),gs=ti&&ti.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&OJe(e,t,r)};Object.defineProperty(ti,"__esModule",{value:!0});gs(zu(),ti);gs(Hk(),ti);gs(qk(),ti);gs(Zce(),ti);gs(Yce(),ti);gs(Xce(),ti);gs(tle(),ti);gs(ub(),ti);gs(rle(),ti);gs(ile(),ti);gs(ule(),ti);gs(dle(),ti);gs(hle(),ti);gs(mle(),ti);gs(yle(),ti);gs(vle(),ti);gs(vfe(),ti)});var _fe=F(Z1=>{"use strict";Object.defineProperty(Z1,"__esModule",{value:!0});Z1.createModuleLogger=Z1.projectLogger=void 0;var Efe=bfe();Object.defineProperty(Z1,"createModuleLogger",{enumerable:!0,get:function(){return Efe.createModuleLogger}});Z1.projectLogger=(0,Efe.createProjectLogger)("eth-block-tracker")});var Sfe=F(K1=>{"use strict";var Afe=K1&&K1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K1,"__esModule",{value:!0});K1.PollingBlockTracker=void 0;var MJe=Afe(f5()),PJe=Afe(Ece()),kJe=kk(),Cfe=_fe(),xfe=(0,Cfe.createModuleLogger)(Cfe.projectLogger,"polling-block-tracker"),LJe=(0,MJe.default)(),FJe=1e3,dL=class extends kJe.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},e),{blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*FJe,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}checkForLatestBlock(){return y(this,null,function*(){return yield this._updateLatestBlock(),yield this.getLatestBlock()})}_start(){return y(this,null,function*(){this._synchronize()})}_end(){return y(this,null,function*(){})}_synchronize(){return y(this,null,function*(){for(var e;this._isRunning;)try{yield this._updateLatestBlock();let r=Ife(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),yield r}catch(r){let n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit("error",n)}catch{console.error(n)}let i=Ife(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),yield i}})}_updateLatestBlock(){return y(this,null,function*(){let e=yield this._fetchLatestBlock();this._newPotentialLatest(e)})}_fetchLatestBlock(){return y(this,null,function*(){let e={jsonrpc:"2.0",id:LJe(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),xfe("Making request",e);let r=yield(0,PJe.default)(n=>this._provider.sendAsync(e,n))();if(xfe("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
${r.error.message}`);return r.result})}};K1.PollingBlockTracker=dL;function Ife(t,e){return new Promise(r=>{let n=setTimeout(r,t);n.unref&&e&&n.unref()})}});var Dfe=F(J1=>{"use strict";var BJe=J1&&J1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(J1,"__esModule",{value:!0});J1.SubscribeBlockTracker=void 0;var UJe=BJe(f5()),jJe=kk(),HJe=(0,UJe.default)(),hL=class extends jJe.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}checkForLatestBlock(){return y(this,null,function*(){return yield this.getLatestBlock()})}_start(){return y(this,null,function*(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{let e=yield this._call("eth_blockNumber");this._subscriptionId=yield this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}})}_end(){return y(this,null,function*(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{yield this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}})}_call(e,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:HJe(),method:e,params:r,jsonrpc:"2.0"},(s,o)=>{s?i(s):n(o.result)})})}_handleSubData(e,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}};J1.SubscribeBlockTracker=hL});var Tfe=F(Hd=>{"use strict";var VJe=Hd&&Hd.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Rfe=Hd&&Hd.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&VJe(e,t,r)};Object.defineProperty(Hd,"__esModule",{value:!0});Rfe(Sfe(),Hd);Rfe(Dfe(),Hd)});var gL=F(mL=>{"use strict";Object.defineProperty(mL,"__esModule",{value:!0});var $Je=Gs();function Nfe(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function qJe(t){let e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}var pL=class extends $Je.EventEmitter{emit(e,...r){let n=e==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;let a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}let s=i[e];if(s===void 0)return!1;if(typeof s=="function")Nfe(s,this,r);else{let o=s.length,a=qJe(s);for(let c=0;c<o;c+=1)Nfe(a[c],this,r)}return!0}};mL.default=pL});var wL=F(T5=>{"use strict";Object.defineProperty(T5,"__esModule",{value:!0});T5.getUniqueId=void 0;var Ofe=4294967295,yL=Math.floor(Math.random()*Ofe);function WJe(){return yL=(yL+1)%Ofe,yL}T5.getUniqueId=WJe});var Mfe=F(N5=>{"use strict";Object.defineProperty(N5,"__esModule",{value:!0});N5.createIdRemapMiddleware=void 0;var zJe=wL();function GJe(){return(t,e,r,n)=>{let i=t.id,s=zJe.getUniqueId();t.id=s,e.id=s,r(o=>{t.id=i,e.id=i,o()})}}N5.createIdRemapMiddleware=GJe});var Pfe=F(O5=>{"use strict";Object.defineProperty(O5,"__esModule",{value:!0});O5.createAsyncMiddleware=void 0;function ZJe(t){return(e,r,n,i)=>y(this,null,function*(){let s,o=new Promise(d=>{s=d}),a=null,c=!1,u=()=>y(this,null,function*(){c=!0,n(d=>{a=d,s()}),yield o});try{yield t(e,r,u),c?(yield o,a(null)):i(null)}catch(d){a?a(d):i(d)}})}O5.createAsyncMiddleware=ZJe});var kfe=F(M5=>{"use strict";Object.defineProperty(M5,"__esModule",{value:!0});M5.createScaffoldMiddleware=void 0;function KJe(t){return(e,r,n,i)=>{let s=t[e.method];return s===void 0?n():typeof s=="function"?s(e,r,n,i):(r.result=s,i())}}M5.createScaffoldMiddleware=KJe});var Ffe=F(bL=>{"use strict";Object.defineProperty(bL,"__esModule",{value:!0});var JJe=Gs();function Lfe(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function YJe(t){let e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}var vL=class extends JJe.EventEmitter{emit(e,...r){let n=e==="error",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;let a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}let s=i[e];if(s===void 0)return!1;if(typeof s=="function")Lfe(s,this,r);else{let o=s.length,a=YJe(s);for(let c=0;c<o;c+=1)Lfe(a[c],this,r)}return!0}};bL.default=vL});var $fe=F((eDt,Vfe)=>{"use strict";Vfe.exports=xb;xb.default=xb;xb.stable=jfe;xb.stableStringify=jfe;var P5="[...]",Bfe="[Circular]",fm=[],um=[];function Ufe(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function xb(t,e,r,n){typeof n>"u"&&(n=Ufe()),EL(t,"",0,[],void 0,0,n);var i;try{um.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,Hfe(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;fm.length!==0;){var s=fm.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Y1(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),fm.push([n,r,e,i])):um.push([e,r,t]):(n[r]=t,fm.push([n,r,e]))}function EL(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){Y1(Bfe,t,e,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Y1(P5,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Y1(P5,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)EL(t[a],a,a,n,t,s,o);else{var c=Object.keys(t);for(a=0;a<c.length;a++){var u=c[a];EL(t[u],u,a,n,t,s,o)}}n.pop()}}function QJe(t,e){return t<e?-1:t>e?1:0}function jfe(t,e,r,n){typeof n>"u"&&(n=Ufe());var i=_L(t,"",0,[],void 0,0,n)||t,s;try{um.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,Hfe(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;fm.length!==0;){var o=fm.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function _L(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){Y1(Bfe,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Y1(P5,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Y1(P5,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)_L(t[a],a,a,n,t,s,o);else{var c={},u=Object.keys(t).sort(QJe);for(a=0;a<u.length;a++){var d=u[a];_L(t[d],d,a,n,t,s,o),c[d]=t[d]}if(typeof i<"u")fm.push([i,e,t]),i[e]=c;else return c}n.pop()}}function Hfe(t){return t=typeof t<"u"?t:function(e,r){return r},function(e,r){if(um.length>0)for(var n=0;n<um.length;n++){var i=um[n];if(i[1]===e&&i[0]===r){r=i[2],um.splice(n,1);break}}return t.call(this,e,r)}}});var L5=F(Q1=>{"use strict";Object.defineProperty(Q1,"__esModule",{value:!0});Q1.EthereumProviderError=Q1.EthereumRpcError=void 0;var XJe=$fe(),k5=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return XJe.default(this.serialize(),tYe,2)}};Q1.EthereumRpcError=k5;var CL=class extends k5{constructor(e,r,n){if(!eYe(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};Q1.EthereumProviderError=CL;function eYe(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function tYe(t,e){if(e!=="[Circular]")return e}});var F5=F(X1=>{"use strict";Object.defineProperty(X1,"__esModule",{value:!0});X1.errorValues=X1.errorCodes=void 0;X1.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};X1.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}});var AL=F(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.serializeError=Sc.isValidCode=Sc.getMessageFromCode=Sc.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var B5=F5(),rYe=L5(),qfe=B5.errorCodes.rpc.internal,nYe="Unspecified error message. This is a bug, please report it.",iYe={code:qfe,message:IL(qfe)};Sc.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function IL(t,e=nYe){if(Number.isInteger(t)){let r=t.toString();if(xL(B5.errorValues,r))return B5.errorValues[r].message;if(Gfe(t))return Sc.JSON_RPC_SERVER_ERROR_MESSAGE}return e}Sc.getMessageFromCode=IL;function zfe(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(B5.errorValues[e]||Gfe(t))}Sc.isValidCode=zfe;function sYe(t,{fallbackError:e=iYe,shouldIncludeStack:r=!1}={}){var n,i;if(!e||!Number.isInteger(e.code)||typeof e.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof rYe.EthereumRpcError)return t.serialize();let s={};if(t&&typeof t=="object"&&!Array.isArray(t)&&xL(t,"code")&&zfe(t.code)){let a=t;s.code=a.code,a.message&&typeof a.message=="string"?(s.message=a.message,xL(a,"data")&&(s.data=a.data)):(s.message=IL(s.code),s.data={originalError:Wfe(t)})}else{s.code=e.code;let a=(n=t)===null||n===void 0?void 0:n.message;s.message=a&&typeof a=="string"?a:e.message,s.data={originalError:Wfe(t)}}let o=(i=t)===null||i===void 0?void 0:i.stack;return r&&t&&o&&typeof o=="string"&&(s.stack=o),s}Sc.serializeError=sYe;function Gfe(t){return t>=-32099&&t<=-32e3}function Wfe(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t}function xL(t,e){return Object.prototype.hasOwnProperty.call(t,e)}});var Jfe=F(U5=>{"use strict";Object.defineProperty(U5,"__esModule",{value:!0});U5.ethErrors=void 0;var SL=L5(),Zfe=AL(),Fs=F5();U5.ethErrors={rpc:{parse:t=>qa(Fs.errorCodes.rpc.parse,t),invalidRequest:t=>qa(Fs.errorCodes.rpc.invalidRequest,t),invalidParams:t=>qa(Fs.errorCodes.rpc.invalidParams,t),methodNotFound:t=>qa(Fs.errorCodes.rpc.methodNotFound,t),internal:t=>qa(Fs.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return qa(e,t)},invalidInput:t=>qa(Fs.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>qa(Fs.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>qa(Fs.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>qa(Fs.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>qa(Fs.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>qa(Fs.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Ib(Fs.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Ib(Fs.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Ib(Fs.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Ib(Fs.errorCodes.provider.disconnected,t),chainDisconnected:t=>Ib(Fs.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new SL.EthereumProviderError(e,r,n)}}};function qa(t,e){let[r,n]=Kfe(e);return new SL.EthereumRpcError(t,r||Zfe.getMessageFromCode(t),n)}function Ib(t,e){let[r,n]=Kfe(e);return new SL.EthereumProviderError(t,r||Zfe.getMessageFromCode(t),n)}function Kfe(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}});var Xfe=F(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.getMessageFromCode=So.serializeError=So.EthereumProviderError=So.EthereumRpcError=So.ethErrors=So.errorCodes=void 0;var Yfe=L5();Object.defineProperty(So,"EthereumRpcError",{enumerable:!0,get:function(){return Yfe.EthereumRpcError}});Object.defineProperty(So,"EthereumProviderError",{enumerable:!0,get:function(){return Yfe.EthereumProviderError}});var Qfe=AL();Object.defineProperty(So,"serializeError",{enumerable:!0,get:function(){return Qfe.serializeError}});Object.defineProperty(So,"getMessageFromCode",{enumerable:!0,get:function(){return Qfe.getMessageFromCode}});var oYe=Jfe();Object.defineProperty(So,"ethErrors",{enumerable:!0,get:function(){return oYe.ethErrors}});var aYe=F5();Object.defineProperty(So,"errorCodes",{enumerable:!0,get:function(){return aYe.errorCodes}})});var TL=F(ey=>{"use strict";var cYe=ey&&ey.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ey,"__esModule",{value:!0});ey.JsonRpcEngine=void 0;var lYe=cYe(Ffe()),Wa=Xfe(),RL=class t extends lYe.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?r?this._handleBatch(e,r):this._handleBatch(e):r?this._handle(e,r):this._promiseHandle(e)}asMiddleware(){return(e,r,n,i)=>y(this,null,function*(){try{let[s,o,a]=yield t._runAllMiddleware(e,r,this._middleware);return o?(yield t._runReturnHandlers(a),i(s)):n(c=>y(this,null,function*(){try{yield t._runReturnHandlers(a)}catch(u){return c(u)}return c()}))}catch(s){return i(s)}})}_handleBatch(e,r){return y(this,null,function*(){try{let n=yield Promise.all(e.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}})}_promiseHandle(e){return new Promise(r=>{this._handle(e,(n,i)=>{r(i)})})}_handle(e,r){return y(this,null,function*(){if(!e||Array.isArray(e)||typeof e!="object"){let o=new Wa.EthereumRpcError(Wa.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return r(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof e.method!="string"){let o=new Wa.EthereumRpcError(Wa.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return r(o,{id:e.id,jsonrpc:"2.0",error:o})}let n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc},s=null;try{yield this._processRequest(n,i)}catch(o){s=o}return s&&(delete i.result,i.error||(i.error=Wa.serializeError(s))),r(s,i)})}_processRequest(e,r){return y(this,null,function*(){let[n,i,s]=yield t._runAllMiddleware(e,r,this._middleware);if(t._checkForCompletion(e,r,i),yield t._runReturnHandlers(s),n)throw n})}static _runAllMiddleware(e,r,n){return y(this,null,function*(){let i=[],s=null,o=!1;for(let a of n)if([s,o]=yield t._runMiddleware(e,r,a,i),o)break;return[s,o,i.reverse()]})}static _runMiddleware(e,r,n,i){return new Promise(s=>{let o=c=>{let u=c||r.error;u&&(r.error=Wa.serializeError(u)),s([u,!0])},a=c=>{r.error?o(r.error):(c&&(typeof c!="function"&&o(new Wa.EthereumRpcError(Wa.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof c}" for request:
${DL(e)}`,{request:e})),i.push(c)),s([null,!1]))};try{n(e,r,a,o)}catch(c){o(c)}})}static _runReturnHandlers(e){return y(this,null,function*(){for(let r of e)yield new Promise((n,i)=>{r(s=>s?i(s):n())})})}static _checkForCompletion(e,r,n){if(!("result"in r)&&!("error"in r))throw new Wa.EthereumRpcError(Wa.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
${DL(e)}`,{request:e});if(!n)throw new Wa.EthereumRpcError(Wa.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
${DL(e)}`,{request:e})}};ey.JsonRpcEngine=RL;function DL(t){return JSON.stringify(t,null,2)}});var ede=F(j5=>{"use strict";Object.defineProperty(j5,"__esModule",{value:!0});j5.mergeMiddleware=void 0;var uYe=TL();function fYe(t){let e=new uYe.JsonRpcEngine;return t.forEach(r=>e.push(r)),e.asMiddleware()}j5.mergeMiddleware=fYe});var NL=F(za=>{"use strict";var dYe=za&&za.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),ty=za&&za.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dYe(e,t,r)};Object.defineProperty(za,"__esModule",{value:!0});ty(Mfe(),za);ty(Pfe(),za);ty(kfe(),za);ty(wL(),za);ty(TL(),za);ty(ede(),za)});var ML=F(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var tde=(Hc(),St(j3)),hYe=function(){function t(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return t.prototype.acquire=function(){var e=this,r=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return r||this._dispatch(),n},t.prototype.runExclusive=function(e){return tde.__awaiter(this,void 0,void 0,function(){var r,n,i;return tde.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:r=s.sent(),n=r[0],i=r[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},t.prototype._dispatch=function(){var e=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},r([this._value--,this._currentReleaser])}},t}();OL.default=hYe});var nde=F(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var rde=(Hc(),St(j3)),pYe=ML(),mYe=function(){function t(){this._semaphore=new pYe.default(1)}return t.prototype.acquire=function(){return rde.__awaiter(this,void 0,void 0,function(){var e,r;return rde.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),r=e[1],[2,r]}})})},t.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();PL.default=mYe});var ide=F(V5=>{"use strict";Object.defineProperty(V5,"__esModule",{value:!0});V5.withTimeout=void 0;var H5=(Hc(),St(j3));function gYe(t,e,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return H5.__awaiter(n,void 0,void 0,function(){var o,a,c;return H5.__generator(this,function(u){switch(u.label){case 0:return o=!1,setTimeout(function(){o=!0,s(r)},e),[4,t.acquire()];case 1:return a=u.sent(),o?(c=Array.isArray(a)?a[1]:a,c()):i(a),[2]}})})})},runExclusive:function(i){return H5.__awaiter(this,void 0,void 0,function(){var s,o;return H5.__generator(this,function(a){switch(a.label){case 0:s=function(){},a.label=1;case 1:return a.trys.push([1,,7,8]),[4,this.acquire()];case 2:return o=a.sent(),Array.isArray(o)?(s=o[1],[4,i(o[0])]):[3,4];case 3:return[2,a.sent()];case 4:return s=o,[4,i()];case 5:return[2,a.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}V5.withTimeout=gYe});var sde=F(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.withTimeout=Vd.Semaphore=Vd.Mutex=void 0;var yYe=nde();Object.defineProperty(Vd,"Mutex",{enumerable:!0,get:function(){return yYe.default}});var wYe=ML();Object.defineProperty(Vd,"Semaphore",{enumerable:!0,get:function(){return wYe.default}});var vYe=ide();Object.defineProperty(Vd,"withTimeout",{enumerable:!0,get:function(){return vYe.withTimeout}})});var ade=F((pDt,ode)=>{"use strict";ode.exports=EYe;var bYe=Object.prototype.hasOwnProperty;function EYe(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)bYe.call(r,n)&&(t[n]=r[n])}return t}});var lde=F((mDt,cde)=>{"use strict";var _Ye=ade(),CYe=f5()();cde.exports=Tt;function Tt(t){let e=this;e.currentProvider=t}Tt.prototype.getBalance=Ab(2,"eth_getBalance");Tt.prototype.getCode=Ab(2,"eth_getCode");Tt.prototype.getTransactionCount=Ab(2,"eth_getTransactionCount");Tt.prototype.getStorageAt=Ab(3,"eth_getStorageAt");Tt.prototype.call=Ab(2,"eth_call");Tt.prototype.protocolVersion=sr("eth_protocolVersion");Tt.prototype.syncing=sr("eth_syncing");Tt.prototype.coinbase=sr("eth_coinbase");Tt.prototype.mining=sr("eth_mining");Tt.prototype.hashrate=sr("eth_hashrate");Tt.prototype.gasPrice=sr("eth_gasPrice");Tt.prototype.accounts=sr("eth_accounts");Tt.prototype.blockNumber=sr("eth_blockNumber");Tt.prototype.getBlockTransactionCountByHash=sr("eth_getBlockTransactionCountByHash");Tt.prototype.getBlockTransactionCountByNumber=sr("eth_getBlockTransactionCountByNumber");Tt.prototype.getUncleCountByBlockHash=sr("eth_getUncleCountByBlockHash");Tt.prototype.getUncleCountByBlockNumber=sr("eth_getUncleCountByBlockNumber");Tt.prototype.sign=sr("eth_sign");Tt.prototype.sendTransaction=sr("eth_sendTransaction");Tt.prototype.sendRawTransaction=sr("eth_sendRawTransaction");Tt.prototype.estimateGas=sr("eth_estimateGas");Tt.prototype.getBlockByHash=sr("eth_getBlockByHash");Tt.prototype.getBlockByNumber=sr("eth_getBlockByNumber");Tt.prototype.getTransactionByHash=sr("eth_getTransactionByHash");Tt.prototype.getTransactionByBlockHashAndIndex=sr("eth_getTransactionByBlockHashAndIndex");Tt.prototype.getTransactionByBlockNumberAndIndex=sr("eth_getTransactionByBlockNumberAndIndex");Tt.prototype.getTransactionReceipt=sr("eth_getTransactionReceipt");Tt.prototype.getUncleByBlockHashAndIndex=sr("eth_getUncleByBlockHashAndIndex");Tt.prototype.getUncleByBlockNumberAndIndex=sr("eth_getUncleByBlockNumberAndIndex");Tt.prototype.getCompilers=sr("eth_getCompilers");Tt.prototype.compileLLL=sr("eth_compileLLL");Tt.prototype.compileSolidity=sr("eth_compileSolidity");Tt.prototype.compileSerpent=sr("eth_compileSerpent");Tt.prototype.newFilter=sr("eth_newFilter");Tt.prototype.newBlockFilter=sr("eth_newBlockFilter");Tt.prototype.newPendingTransactionFilter=sr("eth_newPendingTransactionFilter");Tt.prototype.uninstallFilter=sr("eth_uninstallFilter");Tt.prototype.getFilterChanges=sr("eth_getFilterChanges");Tt.prototype.getFilterLogs=sr("eth_getFilterLogs");Tt.prototype.getLogs=sr("eth_getLogs");Tt.prototype.getWork=sr("eth_getWork");Tt.prototype.submitWork=sr("eth_submitWork");Tt.prototype.submitHashrate=sr("eth_submitHashrate");Tt.prototype.sendAsync=function(t,e){this.currentProvider.sendAsync(xYe(t),function(n,i){if(!n&&i.error&&(n=new Error("EthQuery - RPC Error - "+i.error.message)),n)return e(n);e(null,i.result)})};function sr(t){return function(){let e=this;var r=[].slice.call(arguments),n=r.pop();e.sendAsync({method:t,params:r},n)}}function Ab(t,e){return function(){let r=this;var n=[].slice.call(arguments),i=n.pop();n.length<t&&n.push("latest"),r.sendAsync({method:e,params:n},i)}}function xYe(t){return _Ye({id:CYe(),jsonrpc:"2.0",params:[]},t)}});var hde=F((gDt,dde)=>{"use strict";var ude=(t,e,r,n)=>function(...i){let s=e.promiseModule;return new s((o,a)=>{e.multiArgs?i.push((...u)=>{e.errorFirst?u[0]?a(u):(u.shift(),o(u)):o(u)}):e.errorFirst?i.push((u,d)=>{u?a(u):o(d)}):i.push(o),Reflect.apply(t,this===r?n:this,i)})},fde=new WeakMap;dde.exports=(t,e)=>{e=B({exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);let n=(o,a)=>{let c=fde.get(o);if(c||(c={},fde.set(o,c)),a in c)return c[a];let u=_=>typeof _=="string"||typeof a=="symbol"?a===_:_.test(a),d=Reflect.getOwnPropertyDescriptor(o,a),h=d===void 0||d.writable||d.configurable,w=(e.include?e.include.some(u):!e.exclude.some(u))&&h;return c[a]=w,w},i=new WeakMap,s=new Proxy(t,{apply(o,a,c){let u=i.get(o);if(u)return Reflect.apply(u,a,c);let d=e.excludeMain?o:ude(o,e,s,o);return i.set(o,d),Reflect.apply(d,a,c)},get(o,a){let c=o[a];if(!n(o,a)||c===Function.prototype[a])return c;let u=i.get(c);if(u)return u;if(typeof c=="function"){let d=ude(c,e,s,o);return i.set(c,d),d}return c}});return s}});var $5=F((wDt,pde)=>{"use strict";var IYe=gL().default,kL=class extends IYe{constructor(){super(),this.updates=[]}initialize(){return y(this,null,function*(){})}update(){return y(this,null,function*(){throw new Error("BaseFilter - no update method specified")})}addResults(e){this.updates=this.updates.concat(e),e.forEach(r=>this.emit("update",r))}addInitialResults(e){}getChangesAndClear(){let e=this.updates;return this.updates=[],e}};pde.exports=kL});var gde=F((bDt,mde)=>{"use strict";var AYe=$5(),LL=class extends AYe{constructor(){super(),this.allResults=[]}update(){return y(this,null,function*(){throw new Error("BaseFilterWithHistory - no update method specified")})}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}};mde.exports=LL});var ry=F((_Dt,vde)=>{"use strict";vde.exports={minBlockRef:SYe,maxBlockRef:DYe,sortBlockRefs:FL,bnToHex:RYe,blockRefIsNumber:TYe,hexToInt:q5,incrementHexInt:NYe,intToHex:wde,unsafeRandomBytes:OYe};function SYe(...t){return FL(t)[0]}function DYe(...t){let e=FL(t);return e[e.length-1]}function FL(t){return t.sort((e,r)=>e==="latest"||r==="earliest"?1:r==="latest"||e==="earliest"?-1:q5(e)-q5(r))}function RYe(t){return"0x"+t.toString(16)}function TYe(t){return t&&!["earliest","latest","pending"].includes(t)}function q5(t){return t==null?t:Number.parseInt(t,16)}function NYe(t){if(t==null)return t;let e=q5(t);return wde(e+1)}function wde(t){if(t==null)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function OYe(t){let e="0x";for(let r=0;r<t;r++)e+=yde(),e+=yde();return e}function yde(){return Math.floor(Math.random()*16).toString(16)}});var Ede=F((xDt,bde)=>{"use strict";var MYe=lde(),PYe=hde(),kYe=gde(),{bnToHex:CDt,hexToInt:W5,incrementHexInt:LYe,minBlockRef:FYe,blockRefIsNumber:BYe}=ry(),BL=class extends kYe{constructor({provider:e,params:r}){super(),this.type="log",this.ethQuery=new MYe(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},r),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(n=>n.toLowerCase()))}initialize(r){return y(this,arguments,function*({currentBlock:e}){let n=this.params.fromBlock;["latest","pending"].includes(n)&&(n=e),n==="earliest"&&(n="0x0"),this.params.fromBlock=n;let i=FYe(this.params.toBlock,e),s=Object.assign({},this.params,{toBlock:i}),o=yield this._fetchLogs(s);this.addInitialResults(o)})}update(n){return y(this,arguments,function*({oldBlock:e,newBlock:r}){let i=r,s;e?s=LYe(e):s=r;let o=Object.assign({},this.params,{fromBlock:s,toBlock:i}),c=(yield this._fetchLogs(o)).filter(u=>this.matchLog(u));this.addResults(c)})}_fetchLogs(e){return y(this,null,function*(){return yield PYe(n=>this.ethQuery.getLogs(e,n))()})}matchLog(e){if(W5(this.params.fromBlock)>=W5(e.blockNumber)||BYe(this.params.toBlock)&&W5(this.params.toBlock)<=W5(e.blockNumber))return!1;let r=e.address&&e.address.toLowerCase();return this.params.address&&r&&!this.params.address.includes(r)?!1:this.params.topics.every((i,s)=>{let o=e.topics[s];if(!o)return!1;o=o.toLowerCase();let a=Array.isArray(i)?i:[i];return a.includes(null)?!0:(a=a.map(d=>d.toLowerCase()),a.includes(o))})}};bde.exports=BL});var z5=F((ADt,Cde)=>{"use strict";Cde.exports=UYe;function UYe(n){return y(this,arguments,function*({provider:t,fromBlock:e,toBlock:r}){e||(e=r);let i=_de(e),o=_de(r)-i+1,a=Array(o).fill().map((u,d)=>i+d).map(jYe),c=yield Promise.all(a.map(u=>VYe(t,"eth_getBlockByNumber",[u,!1])));return c=c.filter(u=>u!==null),c})}function _de(t){return t==null?t:Number.parseInt(t,16)}function jYe(t){return t==null?t:"0x"+t.toString(16)}function HYe(t,e){return new Promise((r,n)=>{t.sendAsync(e,(i,s)=>{i?n(i):s.error?n(s.error):s.result?r(s.result):n(new Error("Result was empty"))})})}function VYe(t,e,r){return y(this,null,function*(){for(let n=0;n<3;n++)try{return yield HYe(t,{id:1,jsonrpc:"2.0",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null})}});var Ide=F((DDt,xde)=>{"use strict";var $Ye=$5(),qYe=z5(),{incrementHexInt:WYe}=ry(),UL=class extends $Ye{constructor({provider:e,params:r}){super(),this.type="block",this.provider=e}update(n){return y(this,arguments,function*({oldBlock:e,newBlock:r}){let i=r,s=WYe(e),a=(yield qYe({provider:this.provider,fromBlock:s,toBlock:i})).map(c=>c.hash);this.addResults(a)})}};xde.exports=UL});var Sde=F((TDt,Ade)=>{"use strict";var zYe=$5(),GYe=z5(),{incrementHexInt:ZYe}=ry(),jL=class extends zYe{constructor({provider:e}){super(),this.type="tx",this.provider=e}update(r){return y(this,arguments,function*({oldBlock:e}){let n=e,i=ZYe(e),s=yield GYe({provider:this.provider,fromBlock:i,toBlock:n}),o=[];for(let a of s)o.push(...a.transactions);this.addResults(o)})}};Ade.exports=jL});var Tde=F((ODt,Rde)=>{"use strict";var KYe=sde().Mutex,{createAsyncMiddleware:JYe,createScaffoldMiddleware:YYe}=NL(),QYe=Ede(),XYe=Ide(),eQe=Sde(),{intToHex:Dde,hexToInt:HL}=ry();Rde.exports=tQe;function tQe({blockTracker:t,provider:e}){let r=0,n={},i=new KYe,s=rQe({mutex:i}),o=YYe({eth_newFilter:s(VL(c)),eth_newBlockFilter:s(VL(u)),eth_newPendingTransactionFilter:s(VL(d)),eth_uninstallFilter:s(G5(w)),eth_getFilterChanges:s(G5(h)),eth_getFilterLogs:s(G5(m))}),a=V=>y(this,[V],function*({oldBlock:L,newBlock:U}){if(n.length===0)return;let Q=yield i.acquire();try{yield Promise.all(ny(n).map(Y=>y(this,null,function*(){try{yield Y.update({oldBlock:L,newBlock:U})}catch(k){console.error(k)}})))}catch(Y){console.error(Y)}Q()});return o.newLogFilter=c,o.newBlockFilter=u,o.newPendingTransactionFilter=d,o.uninstallFilter=w,o.getFilterChanges=h,o.getFilterLogs=m,o.destroy=()=>{A()},o;function c(L){return y(this,null,function*(){let U=new QYe({provider:e,params:L}),V=yield _(U);return U})}function u(){return y(this,null,function*(){let L=new XYe({provider:e}),U=yield _(L);return L})}function d(){return y(this,null,function*(){let L=new eQe({provider:e}),U=yield _(L);return L})}function h(L){return y(this,null,function*(){let U=HL(L),V=n[U];if(!V)throw new Error(`No filter for index "${U}"`);return V.getChangesAndClear()})}function m(L){return y(this,null,function*(){let U=HL(L),V=n[U];if(!V)throw new Error(`No filter for index "${U}"`);let Q=[];return V.type==="log"&&(Q=V.getAllResults()),Q})}function w(L){return y(this,null,function*(){let U=HL(L),Q=!!n[U];return Q&&(yield C(U)),Q})}function _(L){return y(this,null,function*(){let U=ny(n).length,V=yield t.getLatestBlock();yield L.initialize({currentBlock:V}),r++,n[r]=L,L.id=r,L.idHex=Dde(r);let Q=ny(n).length;return R({prevFilterCount:U,newFilterCount:Q}),r})}function C(L){return y(this,null,function*(){let U=ny(n).length;delete n[L];let V=ny(n).length;R({prevFilterCount:U,newFilterCount:V})})}function A(){return y(this,null,function*(){let L=ny(n).length;n={},R({prevFilterCount:L,newFilterCount:0})})}function R({prevFilterCount:L,newFilterCount:U}){if(L===0&&U>0){t.on("sync",a);return}if(L>0&&U===0){t.removeListener("sync",a);return}}}function VL(t){return G5((...e)=>y(this,null,function*(){let r=yield t(...e);return Dde(r.id)}))}function G5(t){return JYe((e,r)=>y(this,null,function*(){let n=yield t.apply(null,e.params);r.result=n}))}function rQe({mutex:t}){return e=>(r,n,i,s)=>y(this,null,function*(){(yield t.acquire())(),e(r,n,i,s)})}function ny(t,e){let r=[];for(let n in t)r.push(t[n]);return r}});var Mde=F((PDt,Ode)=>{"use strict";var nQe=gL().default,{createAsyncMiddleware:Nde,createScaffoldMiddleware:iQe}=NL(),sQe=Tde(),{unsafeRandomBytes:oQe,incrementHexInt:aQe}=ry(),cQe=z5();Ode.exports=lQe;function lQe({blockTracker:t,provider:e}){let r={},n=sQe({blockTracker:t,provider:e}),i=!1,s=new nQe,o=iQe({eth_subscribe:Nde(a),eth_unsubscribe:Nde(c)});return o.destroy=d,{events:s,middleware:o};function a(h,m){return y(this,null,function*(){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");let w=h.params[0],_=oQe(16),C;switch(w){case"newHeads":C=A({subId:_});break;case"logs":let L=h.params[1],U=yield n.newLogFilter(L);C=R({subId:_,filter:U});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${w}"`)}r[_]=C,m.result=_;return;function A({subId:L}){let U={type:w,destroy:()=>y(this,null,function*(){t.removeListener("sync",U.update)}),update:Y=>y(this,[Y],function*({oldBlock:V,newBlock:Q}){let k=Q,q=aQe(V);(yield cQe({provider:e,fromBlock:q,toBlock:k})).map(uQe).filter(z=>z!==null).forEach(z=>{u(L,z)})})};return t.on("sync",U.update),U}function R({subId:L,filter:U}){return U.on("update",Q=>u(L,Q)),{type:w,destroy:()=>y(this,null,function*(){return yield n.uninstallFilter(U.idHex)})}}})}function c(h,m){return y(this,null,function*(){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");let w=h.params[0],_=r[w];if(!_){m.result=!1;return}delete r[w],yield _.destroy(),m.result=!0})}function u(h,m){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:h,result:m}})}function d(){s.removeAllListeners();for(let h in r)r[h].destroy(),delete r[h];i=!0}}function uQe(t){return t==null?null:{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}});var kde=F(Z5=>{"use strict";Object.defineProperty(Z5,"__esModule",{value:!0});Z5.SubscriptionManager=void 0;var fQe=Tfe(),dQe=Mde(),Pde=()=>{},$L=class{constructor(e){let r=new fQe.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=dQe({blockTracker:r,provider:e});this.events=n,this.subscriptionMiddleware=i}handleRequest(e){return y(this,null,function*(){let r={};return yield this.subscriptionMiddleware(e,r,Pde,Pde),r})}destroy(){this.subscriptionMiddleware.destroy()}};Z5.SubscriptionManager=$L});var J5=F(iy=>{"use strict";var Ude=iy&&iy.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iy,"__esModule",{value:!0});iy.CoinbaseWalletProvider=void 0;var hQe=Ude(S2()),pQe=fne(),Ir=R2(),Kt=gl(),mQe=I7(),Lde=V8(),K5=J8(),na=M8(),qL=Ude(dce()),Sb=H8(),gQe=yce(),yQe=kde(),Fde="DefaultChainId",Bde="DefaultJsonRpcUrl",WL=class extends pQe.EventEmitter{constructor(e){var r,n;super(),this._filterPolyfill=new gQe.FilterPolyfill(this),this._subscriptionManager=new yQe.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;let i=this.getChainId(),s=(0,Kt.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});let o=this._storage.getItem(Lde.LOCAL_STORAGE_ADDRESSES_KEY);if(o){let a=o.split(" ");a[0]!==""&&(this._addresses=a.map(c=>(0,Kt.ensureAddressString)(c)),this.emit("accountsChanged",a))}this._subscriptionManager.events.on("notification",a=>{this.emit("message",{type:a.method,data:a.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",a=>{var c;if(!(a.origin!==location.origin||a.source!==window)&&a.data.type==="walletLinkMessage"&&a.data.data.action==="dappChainSwitched"){let u=a.data.data.chainId,d=(c=a.data.data.jsonRpcUrl)!==null&&c!==void 0?c:this.jsonRpcUrl;this.updateProviderInfo(d,Number(u))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,Kt.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(Bde))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(Bde,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,r){this.isCoinbaseBrowser||(this._chainIdFromOpts=r,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,r){this.jsonRpcUrl=e;let n=this.getChainId();this._storage.setItem(Fde,r.toString(10)),((0,Kt.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}watchAsset(e,r,n,i,s,o){return y(this,null,function*(){let c=yield(yield this.initializeRelay()).watchAsset(e,r,n,i,s,o?.toString()).promise;return(0,na.isErrorResponse)(c)?!1:!!c.result})}addEthereumChain(e,r,n,i,s,o){return y(this,null,function*(){var a,c;if((0,Kt.ensureIntNumber)(e)===this.getChainId())return!1;let u=yield this.initializeRelay(),d=u.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!d&&(yield u.requestEthereumAccounts().promise);let h=yield u.addEthereumChain(e.toString(),r,s,n,i,o).promise;return(0,na.isErrorResponse)(h)?!1:(((a=h.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(r[0],e),((c=h.result)===null||c===void 0?void 0:c.isApproved)===!0)})}switchEthereumChain(e){return y(this,null,function*(){let n=yield(yield this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,na.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===Ir.standardErrorCodes.provider.unsupportedChain?Ir.standardErrors.provider.unsupportedChain():Ir.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}let i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)})}setAppInfo(e,r){this.initializeRelay().then(n=>n.setAppInfo(e,r))}enable(){return y(this,null,function*(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(Sb.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?K5.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:yield this.send("eth_requestAccounts")})}close(){return y(this,null,function*(){(yield this.initializeRelay()).resetAndReload()})}send(e,r){try{let n=this._send(e,r);if(n instanceof Promise)return n.catch(i=>{throw(0,Ir.serializeError)(i,e)})}catch(n){throw(0,Ir.serializeError)(n,e)}}_send(e,r){if(typeof e=="string"){let i=e,s=Array.isArray(r)?r:r!==void 0?[r]:[],o={jsonrpc:"2.0",id:0,method:i,params:s};return this._sendRequestAsync(o).then(a=>a.result)}if(typeof r=="function"){let i=e,s=r;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));let n=e;return this._sendRequest(n)}sendAsync(e,r){return y(this,null,function*(){try{return this._sendAsync(e,r).catch(n=>{throw(0,Ir.serializeError)(n,e)})}catch(n){return Promise.reject((0,Ir.serializeError)(n,e))}})}_sendAsync(e,r){return y(this,null,function*(){if(typeof r!="function")throw new Error("callback is required");if(Array.isArray(e)){let i=r;this._sendMultipleRequestsAsync(e).then(s=>i(null,s)).catch(s=>i(s,null));return}let n=r;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))})}request(e){return y(this,null,function*(){try{return this._request(e).catch(r=>{throw(0,Ir.serializeError)(r,e.method)})}catch(r){return Promise.reject((0,Ir.serializeError)(r,e.method))}})}_request(e){return y(this,null,function*(){if(!e||typeof e!="object"||Array.isArray(e))throw Ir.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});let{method:r,params:n}=e;if(typeof r!="string"||r.length===0)throw Ir.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw Ir.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});let i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(yield this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:s})).result})}scanQRCode(e){return y(this,null,function*(){let n=yield(yield this.initializeRelay()).scanQRCode((0,Kt.ensureRegExpString)(e)).promise;if((0,na.isErrorResponse)(n))throw(0,Ir.serializeError)(n.errorMessage,"scanQRCode");if(typeof n.result!="string")throw(0,Ir.serializeError)("result was not a string","scanQRCode");return n.result})}genericRequest(e,r){return y(this,null,function*(){let i=yield(yield this.initializeRelay()).genericRequest(e,r).promise;if((0,na.isErrorResponse)(i))throw(0,Ir.serializeError)(i.errorMessage,"generic");if(typeof i.result!="string")throw(0,Ir.serializeError)("result was not a string","generic");return i.result})}connectAndSignIn(e){return y(this,null,function*(){var r;(r=this.diagnostic)===null||r===void 0||r.log(Sb.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?K5.Session.hash(this._relay.session.id):void 0});let n;try{let s=yield this.initializeRelay();if(!(s instanceof mQe.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(n=yield s.connectAndSignIn(e).promise,(0,na.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?Ir.standardErrors.provider.userRejectedRequest("User denied account authorization"):s}if(!n.result)throw new Error("accounts received is empty");let{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||(yield this.switchEthereumChain(this.getChainId())),n.result})}selectProvider(e){return y(this,null,function*(){let n=yield(yield this.initializeRelay()).selectProvider(e).promise;if((0,na.isErrorResponse)(n))throw(0,Ir.serializeError)(n.errorMessage,"selectProvider");if(typeof n.result!="string")throw(0,Ir.serializeError)("result was not a string","selectProvider");return n.result})}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){let r={jsonrpc:"2.0",id:e.id},{method:n}=e;if(r.result=this._handleSynchronousMethods(e),r.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return r}_setAddresses(e,r){if(!Array.isArray(e))throw new Error("addresses is not an array");let n=e.map(i=>(0,Kt.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(Lde.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{let i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:"2.0",id:e.id,result:i});let s=this._handleAsynchronousFilterMethods(e);if(s!==void 0){s.then(a=>r(Object.assign(Object.assign({},a),{id:e.id}))).catch(a=>n(a));return}let o=this._handleSubscriptionMethods(e);if(o!==void 0){o.then(a=>r({jsonrpc:"2.0",id:e.id,result:a.result})).catch(a=>n(a));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&r(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(r=>this._sendRequestAsync(r)))}_handleSynchronousMethods(e){let{method:r}=e,n=e.params||[];switch(r){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(n);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}_handleAsynchronousMethods(e){return y(this,null,function*(){let{method:r}=e,n=e.params||[];switch(r){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}return(yield this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch(s=>{var o;throw(s.code===Ir.standardErrorCodes.rpc.methodNotFound||s.code===Ir.standardErrorCodes.rpc.methodNotSupported)&&((o=this.diagnostic)===null||o===void 0||o.log(Sb.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?K5.Session.hash(this._relay.session.id):void 0})),s})})}_handleAsynchronousFilterMethods(e){let{method:r}=e,n=e.params||[];switch(r){case"eth_newFilter":return this._eth_newFilter(n);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(n);case"eth_getFilterLogs":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{let r=(0,Kt.ensureAddressString)(e);return this._addresses.map(i=>(0,Kt.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(e){var r;if(!this._isKnownAddress(e))throw(r=this.diagnostic)===null||r===void 0||r.log(Sb.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){let r=e.from?(0,Kt.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);let n=e.to?(0,Kt.ensureAddressString)(e.to):null,i=e.value!=null?(0,Kt.ensureBN)(e.value):new hQe.default(0),s=e.data?(0,Kt.ensureBuffer)(e.data):Buffer.alloc(0),o=e.nonce!=null?(0,Kt.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,Kt.ensureBN)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,Kt.ensureBN)(e.maxFeePerGas):null,u=e.maxPriorityFeePerGas!=null?(0,Kt.ensureBN)(e.maxPriorityFeePerGas):null,d=e.gas!=null?(0,Kt.ensureBN)(e.gas):null,h=e.chainId?(0,Kt.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:u,gasLimit:d,chainId:h}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw Ir.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw Ir.standardErrors.provider.unsupportedMethod({})}_signEthereumMessage(e,r,n,i){return y(this,null,function*(){this._ensureKnownAddress(r);try{let o=yield(yield this.initializeRelay()).signEthereumMessage(e,r,n,i).promise;if((0,na.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:"2.0",id:0,result:o.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?Ir.standardErrors.provider.userRejectedRequest("User denied message signature"):s}})}_ethereumAddressFromSignedMessage(e,r,n){return y(this,null,function*(){let s=yield(yield this.initializeRelay()).ethereumAddressFromSignedMessage(e,r,n).promise;if((0,na.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}})}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,Kt.hexStringFromIntNumber)(this.getChainId())}getChainId(){let e=this._storage.getItem(Fde);if(!e)return(0,Kt.ensureIntNumber)(this._chainIdFromOpts);let r=parseInt(e,10);return(0,Kt.ensureIntNumber)(r)}_eth_requestAccounts(){return y(this,null,function*(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(Sb.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?K5.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let r;try{if(r=yield(yield this.initializeRelay()).requestEthereumAccounts().promise,(0,na.isErrorResponse)(r))throw new Error(r.errorMessage)}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ir.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!r.result)throw new Error("accounts received is empty");return this._setAddresses(r.result),this.isCoinbaseBrowser||(yield this.switchEthereumChain(this.getChainId())),{jsonrpc:"2.0",id:0,result:this._addresses}})}_eth_sign(e){this._requireAuthorization();let r=(0,Kt.ensureAddressString)(e[0]),n=(0,Kt.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){let r=(0,Kt.ensureBuffer)(e[0]),n=(0,Kt.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();let r=(0,Kt.ensureBuffer)(e[0]),n=(0,Kt.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){let r=(0,Kt.ensureBuffer)(e[0]),n=(0,Kt.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}_eth_signTransaction(e){return y(this,null,function*(){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=yield(yield this.initializeRelay()).signEthereumTransaction(r).promise;if((0,na.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ir.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}})}_eth_sendRawTransaction(e){return y(this,null,function*(){let r=(0,Kt.ensureBuffer)(e[0]),i=yield(yield this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise;if((0,na.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}})}_eth_sendTransaction(e){return y(this,null,function*(){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=yield(yield this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise;if((0,na.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?Ir.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}})}_eth_signTypedData_v1(e){return y(this,null,function*(){this._requireAuthorization();let r=(0,Kt.ensureParsedJSONObject)(e[0]),n=(0,Kt.ensureAddressString)(e[1]);this._ensureKnownAddress(n);let i=qL.default.hashForSignTypedDataLegacy({data:r}),s=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,s)})}_eth_signTypedData_v3(e){return y(this,null,function*(){this._requireAuthorization();let r=(0,Kt.ensureAddressString)(e[0]),n=(0,Kt.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=qL.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)})}_eth_signTypedData_v4(e){return y(this,null,function*(){this._requireAuthorization();let r=(0,Kt.ensureAddressString)(e[0]),n=(0,Kt.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=qL.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)})}_cbwallet_arbitrary(e){return y(this,null,function*(){let r=e[0],n=e[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof r!="object"||r===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:yield this.genericRequest(r,n)}})}_wallet_addEthereumChain(e){return y(this,null,function*(){var r,n,i,s;let o=e[0];if(((r=o.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||o.chainName.trim()==="")throw Ir.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw Ir.standardErrors.rpc.invalidParams("nativeCurrency is a required field");let a=parseInt(o.chainId,16);return(yield this.addEthereumChain(a,(n=o.rpcUrls)!==null&&n!==void 0?n:[],(i=o.blockExplorerUrls)!==null&&i!==void 0?i:[],o.chainName,(s=o.iconUrls)!==null&&s!==void 0?s:[],o.nativeCurrency))?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}})}_wallet_switchEthereumChain(e){return y(this,null,function*(){let r=e[0];return yield this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}})}_wallet_watchAsset(e){return y(this,null,function*(){let r=Array.isArray(e)?e[0]:e;if(!r.type)throw Ir.standardErrors.rpc.invalidParams("Type is required");if(r?.type!=="ERC20")throw Ir.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!r?.options)throw Ir.standardErrors.rpc.invalidParams("Options are required");if(!r?.options.address)throw Ir.standardErrors.rpc.invalidParams("Address is required");let n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=r.options;return{jsonrpc:"2.0",id:0,result:yield this.watchAsset(r.type,i,s,a,o,n)}})}_eth_uninstallFilter(e){let r=(0,Kt.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(r)}_eth_newFilter(e){return y(this,null,function*(){let r=e[0];return{jsonrpc:"2.0",id:0,result:yield this._filterPolyfill.newFilter(r)}})}_eth_newBlockFilter(){return y(this,null,function*(){return{jsonrpc:"2.0",id:0,result:yield this._filterPolyfill.newBlockFilter()}})}_eth_newPendingTransactionFilter(){return y(this,null,function*(){return{jsonrpc:"2.0",id:0,result:yield this._filterPolyfill.newPendingTransactionFilter()}})}_eth_getFilterChanges(e){let r=(0,Kt.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(e){let r=(0,Kt.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(r)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((r,n)=>this._setAddresses(r,n)),e.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}};iy.CoinbaseWalletProvider=WL});var jde=F(Y5=>{"use strict";Object.defineProperty(Y5,"__esModule",{value:!0});Y5.RelayEventManager=void 0;var wQe=gl(),zL=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,r=(0,wQe.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}};Y5.RelayEventManager=zL});var GL=F(X5=>{"use strict";Object.defineProperty(X5,"__esModule",{value:!0});X5.CoinbaseWalletSDK=void 0;var vQe=Cre(),bQe=xre(),Hde=gl(),EQe=lne(),_Qe=J5(),CQe=I7(),xQe=C7(),IQe=jde(),AQe=w7(),SQe=v7(),Vde=k8(),Q5=class t{constructor(e){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let s=e.linkAPIUrl||bQe.LINK_API_URL;typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;let o=new URL(s),a=`${o.protocol}//${o.host}`;if(this._storage=new EQe.ScopedLocalStorage(`-walletlink:${a}`),this._storage.setItem("version",t.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new IQe.RelayEventManager;let c=(0,Hde.isMobileWeb)(),u=e.uiConstructor||(h=>c?new xQe.MobileRelayUI(h):new AQe.WalletLinkRelayUI(h)),d={linkAPIUrl:s,version:Vde.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};this._relay=c?new CQe.MobileRelay(d):new SQe.WalletLinkRelay(d),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e="",r=1){let n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;let i=this.coinbaseBrowser;if(i)return i;let s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new _Qe.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,r){var n;this._appName=e||"DApp",this._appLogoUrl=r||(0,Hde.getFavicon)();let i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;let r=this===null||this===void 0?void 0:this.walletExtension;r?r.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,r;return(r=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(e,r=240){return(0,vQe.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{let n=(e=window.ethereum)!==null&&e!==void 0?e:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}};X5.CoinbaseWalletSDK=Q5;Q5.VERSION=Vde.LIB_VERSION});var qde=F(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.CoinbaseWalletProvider=dm.CoinbaseWalletSDK=void 0;var ZL=GL(),$de=J5(),DQe=GL();Object.defineProperty(dm,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return DQe.CoinbaseWalletSDK}});var RQe=J5();Object.defineProperty(dm,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return RQe.CoinbaseWalletProvider}});dm.default=ZL.CoinbaseWalletSDK;typeof window<"u"&&(window.CoinbaseWalletSDK=ZL.CoinbaseWalletSDK,window.CoinbaseWalletProvider=$de.CoinbaseWalletProvider,window.WalletLink=ZL.CoinbaseWalletSDK,window.WalletLinkProvider=$de.CoinbaseWalletProvider)});function pwe(t,e){return Object.is(t,e)}var Hi=null,b3=!1,E3=1,Nm=Symbol("SIGNAL");function vr(t){let e=Hi;return Hi=t,e}var pA={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function DU(t){if(b3)throw new Error("");if(Hi===null)return;Hi.consumerOnSignalRead(t);let e=Hi.nextProducerIndex++;if(Tm(Hi),e<Hi.producerNode.length&&Hi.producerNode[e]!==t&&Ry(Hi)){let r=Hi.producerNode[e];_3(r,Hi.producerIndexOfThis[e])}Hi.producerNode[e]!==t&&(Hi.producerNode[e]=t,Hi.producerIndexOfThis[e]=Ry(Hi)?PU(t,Hi,e):0),Hi.producerLastReadVersion[e]=t.version}function mwe(){E3++}function gwe(t){if(!(Ry(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===E3)){if(!t.producerMustRecompute(t)&&!mA(t)){t.dirty=!1,t.lastCleanEpoch=E3;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=E3}}function RU(t){if(t.liveConsumerNode===void 0)return;let e=b3;b3=!0;try{for(let r of t.liveConsumerNode)r.dirty||ywe(r)}finally{b3=e}}function TU(){return Hi?.consumerAllowSignalWrites!==!1}function ywe(t){t.dirty=!0,RU(t),t.consumerMarkedDirty?.(t)}function NU(t){return t&&(t.nextProducerIndex=0),vr(t)}function OU(t,e){if(vr(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Ry(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)_3(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function mA(t){Tm(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==r.version||(gwe(r),n!==r.version))return!0}return!1}function MU(t){if(Tm(t),Ry(t))for(let e=0;e<t.producerNode.length;e++)_3(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function PU(t,e,r){if(kU(t),Tm(t),t.liveConsumerNode.length===0)for(let n=0;n<t.producerNode.length;n++)t.producerIndexOfThis[n]=PU(t.producerNode[n],t,n);return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function _3(t,e){if(kU(t),Tm(t),t.liveConsumerNode.length===1)for(let n=0;n<t.producerNode.length;n++)_3(t.producerNode[n],t.producerIndexOfThis[n]);let r=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[r],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[r],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];Tm(i),i.producerIndexOfThis[n]=e}}function Ry(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function Tm(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function kU(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function wwe(){throw new Error}var LU=wwe;function FU(){LU()}function BU(t){LU=t}var vwe=null;function UU(t){let e=Object.create(HU);e.value=t;let r=()=>(DU(e),e.value);return r[Nm]=e,r}function gA(t,e){TU()||FU(),t.equal(t.value,e)||(t.value=e,bwe(t))}function jU(t,e){TU()||FU(),gA(t,e(t.value))}var HU=_e(B({},pA),{equal:pwe,value:void 0});function bwe(t){t.version++,mwe(),RU(t),vwe?.()}function Lt(t){return typeof t=="function"}function Om(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var C3=Om(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription:
${r.map((n,i)=>`${i+1}) ${n.toString()}`).join(`
  `)}`:"",this.name="UnsubscriptionError",this.errors=r});function ah(t,e){if(t){let r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Wn=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let s of r)s.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(Lt(n))try{n()}catch(s){e=s instanceof C3?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{VU(s)}catch(o){e=e??[],o instanceof C3?e=[...e,...o.errors]:e.push(o)}}if(e)throw new C3(e)}}add(e){var r;if(e&&e!==this)if(this.closed)VU(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}}_hasParent(e){let{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){let{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&ah(r,e)}remove(e){let{_finalizers:r}=this;r&&ah(r,e),e instanceof t&&e._removeParent(this)}};Wn.EMPTY=(()=>{let t=new Wn;return t.closed=!0,t})();var yA=Wn.EMPTY;function x3(t){return t instanceof Wn||t&&"closed"in t&&Lt(t.remove)&&Lt(t.add)&&Lt(t.unsubscribe)}function VU(t){Lt(t)?t():t.unsubscribe()}var ec={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Mm={setTimeout(t,e,...r){let{delegate:n}=Mm;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=Mm;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function I3(t){Mm.setTimeout(()=>{let{onUnhandledError:e}=ec;if(e)e(t);else throw t})}function ch(){}var $U=wA("C",void 0,void 0);function qU(t){return wA("E",void 0,t)}function WU(t){return wA("N",t,void 0)}function wA(t,e,r){return{kind:t,value:e,error:r}}var lh=null;function Pm(t){if(ec.useDeprecatedSynchronousErrorHandling){let e=!lh;if(e&&(lh={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=lh;if(lh=null,r)throw n}}else t()}function zU(t){ec.useDeprecatedSynchronousErrorHandling&&lh&&(lh.errorThrown=!0,lh.error=t)}var uh=class extends Wn{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,x3(e)&&e.add(this)):this.destination=Cwe}static create(e,r,n){return new Kl(e,r,n)}next(e){this.isStopped?bA(WU(e),this):this._next(e)}error(e){this.isStopped?bA(qU(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?bA($U,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Ewe=Function.prototype.bind;function vA(t,e){return Ewe.call(t,e)}var EA=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(n){A3(n)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(n){A3(n)}else A3(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){A3(r)}}},Kl=class extends uh{constructor(e,r,n){super();let i;if(Lt(e)||!e)i={next:e??void 0,error:r??void 0,complete:n??void 0};else{let s;this&&ec.useDeprecatedNextContext?(s=Object.create(e),s.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&vA(e.next,s),error:e.error&&vA(e.error,s),complete:e.complete&&vA(e.complete,s)}):i=e}this.destination=new EA(i)}};function A3(t){ec.useDeprecatedSynchronousErrorHandling?zU(t):I3(t)}function _we(t){throw t}function bA(t,e){let{onStoppedNotification:r}=ec;r&&Mm.setTimeout(()=>r(t,e))}var Cwe={closed:!0,next:ch,error:_we,complete:ch};var km=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ns(t){return t}function _A(...t){return CA(t)}function CA(t){return t.length===0?ns:t.length===1?t[0]:function(r){return t.reduce((n,i)=>i(n),r)}}var er=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,i){let s=Iwe(r)?r:new Kl(r,n,i);return Pm(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=GU(n),new n((i,s)=>{let o=new Kl({next:a=>{try{r(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[km](){return this}pipe(...r){return CA(r)(this)}toPromise(r){return r=GU(r),new r((n,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>n(s))})}}return t.create=e=>new t(e),t})();function GU(t){var e;return(e=t??ec.Promise)!==null&&e!==void 0?e:Promise}function xwe(t){return t&&Lt(t.next)&&Lt(t.error)&&Lt(t.complete)}function Iwe(t){return t&&t instanceof uh||xwe(t)&&x3(t)}function xA(t){return Lt(t?.lift)}function jt(t){return e=>{if(xA(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ft(t,e,r,n,i){return new IA(t,e,r,n,i)}var IA=class extends uh{constructor(e,r,n,i,s,o){super(e),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=r?function(a){try{r(a)}catch(c){e.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){e.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Lm(){return jt((t,e)=>{let r=null;t._refCount++;let n=Ft(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){r=null;return}let i=t._connection,s=r;r=null,i&&(!s||i===s)&&i.unsubscribe(),e.unsubscribe()});t.subscribe(n),n.closed||(r=t.connect())})}var Fm=class extends er{constructor(e,r){super(),this.source=e,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,xA(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Wn;let r=this.getSubject();e.add(this.source.subscribe(Ft(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Wn.EMPTY)}return e}refCount(){return Lm()(this)}};var ZU=Om(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var ii=(()=>{class t extends er{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new S3(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new ZU}next(r){Pm(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){Pm(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){Pm(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:s}=this;return n||i?yA:(this.currentObservers=null,s.push(r),new Wn(()=>{this.currentObservers=null,ah(s,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:s}=this;n?r.error(i):s&&r.complete()}asObservable(){let r=new er;return r.source=this,r}}return t.create=(e,r)=>new S3(e,r),t})(),S3=class extends ii{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,e)}error(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&n!==void 0?n:yA}};var Oi=class extends ii{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){let{hasError:e,thrownError:r,_value:n}=this;if(e)throw r;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var Ty={now(){return(Ty.delegate||Date).now()},delegate:void 0};var D3=class extends ii{constructor(e=1/0,r=1/0,n=Ty){super(),this._bufferSize=e,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,r)}next(e){let{isStopped:r,_buffer:n,_infiniteTimeWindow:i,_timestampProvider:s,_windowTime:o}=this;r||(n.push(e),!i&&n.push(s.now()+o)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:i}=this,s=i.slice();for(let o=0;o<s.length&&!e.closed;o+=n?1:2)e.next(s[o]);return this._checkFinalizedStatuses(e),r}_trimBuffer(){let{_bufferSize:e,_timestampProvider:r,_buffer:n,_infiniteTimeWindow:i}=this,s=(i?1:2)*e;if(e<1/0&&s<n.length&&n.splice(0,n.length-s),!i){let o=r.now(),a=0;for(let c=1;c<n.length&&n[c]<=o;c+=2)a=c;a&&n.splice(0,a+1)}}};var R3=class extends Wn{constructor(e,r){super()}schedule(e,r=0){return this}};var Ny={setInterval(t,e,...r){let{delegate:n}=Ny;return n?.setInterval?n.setInterval(t,e,...r):setInterval(t,e,...r)},clearInterval(t){let{delegate:e}=Ny;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};var T3=class extends R3{constructor(e,r){super(e,r),this.scheduler=e,this.work=r,this.pending=!1}schedule(e,r=0){var n;if(this.closed)return this;this.state=e;let i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,r)),this.pending=!0,this.delay=r,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(s,this.id,r),this}requestAsyncId(e,r,n=0){return Ny.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,r,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return r;r!=null&&Ny.clearInterval(r)}execute(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,r);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,r){let n=!1,i;try{this.work(e)}catch(s){n=!0,i=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){let{id:e,scheduler:r}=this,{actions:n}=r;this.work=this.state=this.scheduler=null,this.pending=!1,ah(n,this),e!=null&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,super.unsubscribe()}}};var Bm=class t{constructor(e,r=t.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};Bm.now=Ty.now;var N3=class extends Bm{constructor(e,r=Bm.now){super(e,r),this.actions=[],this._active=!1}flush(e){let{actions:r}=this;if(this._active){r.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,n){for(;e=r.shift();)e.unsubscribe();throw n}}};var AA=new N3(T3),KU=AA;var vs=new er(t=>t.complete());function O3(t){return t&&Lt(t.schedule)}function JU(t){return t[t.length-1]}function M3(t){return Lt(JU(t))?t.pop():void 0}function mf(t){return O3(JU(t))?t.pop():void 0}Hc();var H3=t=>t&&typeof t.length=="number"&&typeof t!="function";function V3(t){return Lt(t?.then)}function $3(t){return Lt(t[km])}function q3(t){return Symbol.asyncIterator&&Lt(t?.[Symbol.asyncIterator])}function W3(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Mwe(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var z3=Mwe();function G3(t){return Lt(t?.[z3])}Hc();function Z3(t){return B3(this,arguments,function*(){let r=t.getReader();try{for(;;){let{value:n,done:i}=yield Uc(r.read());if(i)return yield Uc(void 0);yield yield Uc(n)}}finally{r.releaseLock()}})}function K3(t){return Lt(t?.getReader)}function an(t){if(t instanceof er)return t;if(t!=null){if($3(t))return Pwe(t);if(H3(t))return kwe(t);if(V3(t))return Lwe(t);if(q3(t))return mj(t);if(G3(t))return Fwe(t);if(K3(t))return Bwe(t)}throw W3(t)}function Pwe(t){return new er(e=>{let r=t[km]();if(Lt(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function kwe(t){return new er(e=>{for(let r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function Lwe(t){return new er(e=>{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,I3)})}function Fwe(t){return new er(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function mj(t){return new er(e=>{Uwe(t,e).catch(r=>e.error(r))})}function Bwe(t){return mj(Z3(t))}function Uwe(t,e){var r,n,i,s;return L3(this,void 0,void 0,function*(){try{for(r=U3(t);n=yield r.next(),!n.done;){let o=n.value;if(e.next(o),e.closed)return}}catch(o){i={error:o}}finally{try{n&&!n.done&&(s=r.return)&&(yield s.call(r))}finally{if(i)throw i.error}}e.complete()})}function po(t,e,r,n=0,i=!1){let s=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!i)return s}function J3(t,e=0){return jt((r,n)=>{r.subscribe(Ft(n,i=>po(n,t,()=>n.next(i),e),()=>po(n,t,()=>n.complete(),e),i=>po(n,t,()=>n.error(i),e)))})}function Y3(t,e=0){return jt((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function gj(t,e){return an(t).pipe(Y3(e),J3(e))}function yj(t,e){return an(t).pipe(Y3(e),J3(e))}function wj(t,e){return new er(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function vj(t,e){return new er(r=>{let n;return po(r,e,()=>{n=t[z3](),po(r,e,()=>{let i,s;try{({value:i,done:s}=n.next())}catch(o){r.error(o);return}s?r.complete():r.next(i)},0,!0)}),()=>Lt(n?.return)&&n.return()})}function Q3(t,e){if(!t)throw new Error("Iterable cannot be null");return new er(r=>{po(r,e,()=>{let n=t[Symbol.asyncIterator]();po(r,e,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function bj(t,e){return Q3(Z3(t),e)}function Ej(t,e){if(t!=null){if($3(t))return gj(t,e);if(H3(t))return wj(t,e);if(V3(t))return yj(t,e);if(q3(t))return Q3(t,e);if(G3(t))return vj(t,e);if(K3(t))return bj(t,e)}throw W3(t)}function Sn(t,e){return e?Ej(t,e):an(t)}function mt(...t){let e=mf(t);return Sn(t,e)}function Um(t,e){let r=Lt(t)?t:()=>t,n=i=>i.error(r());return new er(e?i=>e.schedule(n,0,i):n)}function RA(t){return!!t&&(t instanceof er||Lt(t.lift)&&Lt(t.subscribe))}var Jl=Om(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function _j(t){return t instanceof Date&&!isNaN(t)}function ft(t,e){return jt((r,n)=>{let i=0;r.subscribe(Ft(n,s=>{n.next(t.call(e,s,i++))}))})}var{isArray:jwe}=Array;function Hwe(t,e){return jwe(e)?t(...e):t(e)}function X3(t){return ft(e=>Hwe(t,e))}var{isArray:Vwe}=Array,{getPrototypeOf:$we,prototype:qwe,keys:Wwe}=Object;function eE(t){if(t.length===1){let e=t[0];if(Vwe(e))return{args:e,keys:null};if(zwe(e)){let r=Wwe(e);return{args:r.map(n=>e[n]),keys:r}}}return{args:t,keys:null}}function zwe(t){return t&&typeof t=="object"&&$we(t)===qwe}function tE(t,e){return t.reduce((r,n,i)=>(r[n]=e[i],r),{})}function jm(...t){let e=mf(t),r=M3(t),{args:n,keys:i}=eE(t);if(n.length===0)return Sn([],e);let s=new er(Gwe(n,e,i?o=>tE(i,o):ns));return r?s.pipe(X3(r)):s}function Gwe(t,e,r=ns){return n=>{Cj(e,()=>{let{length:i}=t,s=new Array(i),o=i,a=i;for(let c=0;c<i;c++)Cj(e,()=>{let u=Sn(t[c],e),d=!1;u.subscribe(Ft(n,h=>{s[c]=h,d||(d=!0,a--),a||n.next(r(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}function Cj(t,e,r){t?po(r,t,e):e()}function xj(t,e,r,n,i,s,o,a){let c=[],u=0,d=0,h=!1,m=()=>{h&&!c.length&&!u&&e.complete()},w=C=>u<n?_(C):c.push(C),_=C=>{s&&e.next(C),u++;let A=!1;an(r(C,d++)).subscribe(Ft(e,R=>{i?.(R),s?w(R):e.next(R)},()=>{A=!0},void 0,()=>{if(A)try{for(u--;c.length&&u<n;){let R=c.shift();o?po(e,o,()=>_(R)):_(R)}m()}catch(R){e.error(R)}}))};return t.subscribe(Ft(e,w,()=>{h=!0,m()})),()=>{a?.()}}function jn(t,e,r=1/0){return Lt(e)?jn((n,i)=>ft((s,o)=>e(n,s,i,o))(an(t(n,i))),r):(typeof e=="number"&&(r=e),jt((n,i)=>xj(n,i,t,r)))}function TA(t=1/0){return jn(ns,t)}function Ij(){return TA(1)}function gf(...t){return Ij()(Sn(t,mf(t)))}function Hm(t){return new er(e=>{an(t()).subscribe(e)})}function rE(...t){let e=M3(t),{args:r,keys:n}=eE(t),i=new er(s=>{let{length:o}=r;if(!o){s.complete();return}let a=new Array(o),c=o,u=o;for(let d=0;d<o;d++){let h=!1;an(r[d]).subscribe(Ft(s,m=>{h||(h=!0,u--),a[d]=m},()=>c--,void 0,()=>{(!c||!h)&&(u||s.next(n?tE(n,a):a),s.complete())}))}});return e?i.pipe(X3(e)):i}function nE(t=0,e,r=KU){let n=-1;return e!=null&&(O3(e)?r=e:n=e),new er(i=>{let s=_j(t)?+t-r.now():t;s<0&&(s=0);let o=0;return r.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},s)})}function _i(t,e){return jt((r,n)=>{let i=0;r.subscribe(Ft(n,s=>t.call(e,s,i++)&&n.next(s)))})}function tc(t){return jt((e,r)=>{let n=null,i=!1,s;n=e.subscribe(Ft(r,void 0,void 0,o=>{s=an(t(o,tc(t)(e))),n?(n.unsubscribe(),n=null,s.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(r))})}function Aj(t,e,r,n,i){return(s,o)=>{let a=r,c=e,u=0;s.subscribe(Ft(o,d=>{let h=u++;c=a?t(c,d,h):(a=!0,d),n&&o.next(c)},i&&(()=>{a&&o.next(c),o.complete()})))}}function yf(t,e){return Lt(e)?jn(t,e,1):jn(t,1)}function wf(t){return jt((e,r)=>{let n=!1;e.subscribe(Ft(r,i=>{n=!0,r.next(i)},()=>{n||r.next(t),r.complete()}))})}function qs(t){return t<=0?()=>vs:jt((e,r)=>{let n=0;e.subscribe(Ft(r,i=>{++n<=t&&(r.next(i),t<=n&&r.complete())}))})}function Sj(){return jt((t,e)=>{t.subscribe(Ft(e,ch))})}function Oy(t){return ft(()=>t)}function NA(t,e){return e?r=>gf(e.pipe(qs(1),Sj()),r.pipe(NA(t))):jn((r,n)=>an(t(r,n)).pipe(qs(1),Oy(r)))}function OA(t,e=AA){let r=nE(t,e);return NA(()=>r)}function MA(t,e=ns){return t=t??Zwe,jt((r,n)=>{let i,s=!0;r.subscribe(Ft(n,o=>{let a=e(o);(s||!t(i,a))&&(s=!1,i=a,n.next(o))}))})}function Zwe(t,e){return t===e}function iE(t=Kwe){return jt((e,r)=>{let n=!1;e.subscribe(Ft(r,i=>{n=!0,r.next(i)},()=>n?r.complete():r.error(t())))})}function Kwe(){return new Jl}function fh(t){return jt((e,r)=>{try{e.subscribe(r)}finally{r.add(t)}})}function Fo(t,e){let r=arguments.length>=2;return n=>n.pipe(t?_i((i,s)=>t(i,s,n)):ns,qs(1),r?wf(e):iE(()=>new Jl))}function Vm(t){return t<=0?()=>vs:jt((e,r)=>{let n=[];e.subscribe(Ft(r,i=>{n.push(i),t<n.length&&n.shift()},()=>{for(let i of n)r.next(i);r.complete()},void 0,()=>{n=null}))})}function PA(t,e){let r=arguments.length>=2;return n=>n.pipe(t?_i((i,s)=>t(i,s,n)):ns,Vm(1),r?wf(e):iE(()=>new Jl))}function kA(t=1/0){let e;t&&typeof t=="object"?e=t:e={count:t};let{count:r=1/0,delay:n,resetOnSuccess:i=!1}=e;return r<=0?ns:jt((s,o)=>{let a=0,c,u=()=>{let d=!1;c=s.subscribe(Ft(o,h=>{i&&(a=0),o.next(h)},void 0,h=>{if(a++<r){let m=()=>{c?(c.unsubscribe(),c=null,u()):d=!0};if(n!=null){let w=typeof n=="number"?nE(n):an(n(h,a)),_=Ft(o,()=>{_.unsubscribe(),m()},()=>{o.complete()});w.subscribe(_)}else m()}else o.error(h)})),d&&(c.unsubscribe(),c=null,u())};u()})}function LA(t,e){return jt(Aj(t,e,arguments.length>=2,!0))}function Dj(t={}){let{connector:e=()=>new ii,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:i=!0}=t;return s=>{let o,a,c,u=0,d=!1,h=!1,m=()=>{a?.unsubscribe(),a=void 0},w=()=>{m(),o=c=void 0,d=h=!1},_=()=>{let C=o;w(),C?.unsubscribe()};return jt((C,A)=>{u++,!h&&!d&&m();let R=c=c??e();A.add(()=>{u--,u===0&&!h&&!d&&(a=FA(_,i))}),R.subscribe(A),!o&&u>0&&(o=new Kl({next:L=>R.next(L),error:L=>{h=!0,m(),a=FA(w,r,L),R.error(L)},complete:()=>{d=!0,m(),a=FA(w,n),R.complete()}}),an(C).subscribe(o))})(s)}}function FA(t,e,...r){if(e===!0){t();return}if(e===!1)return;let n=new Kl({next:()=>{n.unsubscribe(),t()}});return an(e(...r)).subscribe(n)}function vf(t,e,r){let n,i=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:i=!1,scheduler:r}=t:n=t??1/0,Dj({connector:()=>new D3(n,e,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function BA(t){return _i((e,r)=>t<=r)}function UA(...t){let e=mf(t);return jt((r,n)=>{(e?gf(t,r,e):gf(t,r)).subscribe(n)})}function Dn(t,e){return jt((r,n)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&n.complete();r.subscribe(Ft(n,c=>{i?.unsubscribe();let u=0,d=s++;an(t(c,d)).subscribe(i=Ft(n,h=>n.next(e?e(c,h,d,u++):h),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function bf(t){return jt((e,r)=>{an(t).subscribe(Ft(r,()=>r.complete(),ch)),!r.closed&&e.subscribe(r)})}function si(t,e,r){let n=Lt(t)||e||r?{next:t,error:e,complete:r}:t;return n?jt((i,s)=>{var o;(o=n.subscribe)===null||o===void 0||o.call(n);let a=!0;i.subscribe(Ft(s,c=>{var u;(u=n.next)===null||u===void 0||u.call(n,c),s.next(c)},()=>{var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},c=>{var u;a=!1,(u=n.error)===null||u===void 0||u.call(n,c),s.error(c)},()=>{var c,u;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):ns}var mH="https://g.co/ng/security#xss",gt=class extends Error{constructor(e,r){super(kE(e,r)),this.code=e}};function kE(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}var tS=class extends ii{constructor(e=!1){super(),this.__isAsync=e}emit(e){let r=vr(null);try{super.next(e)}finally{vr(r)}}subscribe(e,r,n){let i=e,s=r||(()=>null),o=n;if(e&&typeof e=="object"){let c=e;i=c.next?.bind(c),s=c.error?.bind(c),o=c.complete?.bind(c)}this.__isAsync&&(s=jA(s),i&&(i=jA(i)),o&&(o=jA(o)));let a=super.subscribe({next:i,error:s,complete:o});return e instanceof Wn&&e.add(a),a}};function jA(t){return e=>{setTimeout(t,void 0,e)}}var nc=tS;var tr=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(tr||{});function Ws(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(Ws).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(`
`);return r===-1?e:e.substring(0,r)}function Rj(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var gH=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(gH||{}),qc=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(qc||{});function Ky(t){return{toString:t}.toString()}var ic=globalThis;var Ly={},ga=[];function cn(t){for(let e in t)if(t[e]===cn)return e;throw Error("Could not find renamed property on target object.")}var Jwe=cn({\u0275cmp:cn}),Ywe=cn({\u0275dir:cn}),WS=cn({\u0275pipe:cn}),Qwe=cn({\u0275mod:cn}),mE=cn({\u0275fac:cn}),My=cn({__NG_ELEMENT_ID__:cn}),Tj=cn({__NG_ENV_ID__:cn}),is=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(is||{});function yH(t,e,r){let n=t.length;for(;;){let i=t.indexOf(e,r);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let s=e.length;if(i+s===n||t.charCodeAt(i+s)<=32)return i}r=i+1}}function rS(t,e,r){let n=0;for(;n<r.length;){let i=r[n];if(typeof i=="number"){if(i!==0)break;n++;let s=r[n++],o=r[n++],a=r[n++];t.setAttribute(e,o,a,s)}else{let s=i,o=r[++n];eve(s)?t.setProperty(e,s,o):t.setAttribute(e,s,o),n++}}return n}function Xwe(t){return t===3||t===4||t===6}function eve(t){return t.charCodeAt(0)===64}function zS(t,e){if(!(e===null||e.length===0))if(t===null||t.length===0)t=e.slice();else{let r=-1;for(let n=0;n<e.length;n++){let i=e[n];typeof i=="number"?r=i:r===0||(r===-1||r===2?Nj(t,r,i,null,e[++n]):Nj(t,r,i,null,null))}}return t}function Nj(t,e,r,n,i){let s=0,o=t.length;if(e===-1)o=-1;else for(;s<t.length;){let a=t[s++];if(typeof a=="number"){if(a===e){o=-1;break}else if(a>e){o=s-1;break}}}for(;s<t.length;){let a=t[s];if(typeof a=="number")break;if(a===r){if(n===null){i!==null&&(t[s+1]=i);return}else if(n===t[s+1]){t[s+2]=i;return}}s++,n!==null&&s++,i!==null&&s++}o!==-1&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,r),n!==null&&t.splice(s++,0,n),i!==null&&t.splice(s++,0,i)}var wH="ng-template";function tve(t,e,r){let n=0,i=!0;for(;n<t.length;){let s=t[n++];if(typeof s=="string"&&i){let o=t[n++];if(r&&s==="class"&&yH(o.toLowerCase(),e,0)!==-1)return!0}else if(s===1){for(;n<t.length&&typeof(s=t[n++])=="string";)if(s.toLowerCase()===e)return!0;return!1}else typeof s=="number"&&(i=!1)}return!1}function vH(t){return t.type===4&&t.value!==wH}function rve(t,e,r){let n=t.type===4&&!r?wH:t.value;return e===n}function nve(t,e,r){let n=4,i=t.attrs||[],s=ove(i),o=!1;for(let a=0;a<e.length;a++){let c=e[a];if(typeof c=="number"){if(!o&&!rc(n)&&!rc(c))return!1;if(o&&rc(c))continue;o=!1,n=c|n&1;continue}if(!o)if(n&4){if(n=2|n&1,c!==""&&!rve(t,c,r)||c===""&&e.length===1){if(rc(n))return!1;o=!0}}else{let u=n&8?c:e[++a];if(n&8&&t.attrs!==null){if(!tve(t.attrs,u,r)){if(rc(n))return!1;o=!0}continue}let d=n&8?"class":c,h=ive(d,i,vH(t),r);if(h===-1){if(rc(n))return!1;o=!0;continue}if(u!==""){let m;h>s?m="":m=i[h+1].toLowerCase();let w=n&8?m:null;if(w&&yH(w,u,0)!==-1||n&2&&u!==m){if(rc(n))return!1;o=!0}}}}return rc(n)||o}function rc(t){return(t&1)===0}function ive(t,e,r,n){if(e===null)return-1;let i=0;if(n||!r){let s=!1;for(;i<e.length;){let o=e[i];if(o===t)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=e[++i];for(;typeof a=="string";)a=e[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return ave(e,t)}function bH(t,e,r=!1){for(let n=0;n<e.length;n++)if(nve(t,e[n],r))return!0;return!1}function sve(t){let e=t.attrs;if(e!=null){let r=e.indexOf(5);if(!(r&1))return e[r+1]}return null}function ove(t){for(let e=0;e<t.length;e++){let r=t[e];if(Xwe(r))return e}return t.length}function ave(t,e){let r=t.indexOf(4);if(r>-1)for(r++;r<t.length;){let n=t[r];if(typeof n=="number")return-1;if(n===e)return r;r++}return-1}function cve(t,e){e:for(let r=0;r<e.length;r++){let n=e[r];if(t.length===n.length){for(let i=0;i<t.length;i++)if(t[i]!==n[i])continue e;return!0}}return!1}function Oj(t,e){return t?":not("+e.trim()+")":e}function lve(t){let e=t[0],r=1,n=2,i="",s=!1;for(;r<t.length;){let o=t[r];if(typeof o=="string")if(n&2){let a=t[++r];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else n&8?i+="."+o:n&4&&(i+=" "+o);else i!==""&&!rc(o)&&(e+=Oj(s,i),i=""),n=o,s=s||!rc(n);r++}return i!==""&&(e+=Oj(s,i)),e}function uve(t){return t.map(lve).join(",")}function fve(t){let e=[],r=[],n=1,i=2;for(;n<t.length;){let s=t[n];if(typeof s=="string")i===2?s!==""&&e.push(s,t[++n]):i===8&&r.push(s);else{if(!rc(i))break;i=s}n++}return{attrs:e,classes:r}}function ar(t){return Ky(()=>{let e=IH(t),r=_e(B({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===gH.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||qc.Emulated,styles:t.styles||ga,_:null,schemas:t.schemas||null,tView:null,id:""});AH(r);let n=t.dependencies;return r.directiveDefs=Pj(n,!1),r.pipeDefs=Pj(n,!0),r.id=pve(r),r})}function dve(t){return Cf(t)||EH(t)}function hve(t){return t!==null}function Xm(t){return Ky(()=>({type:t.type,bootstrap:t.bootstrap||ga,declarations:t.declarations||ga,imports:t.imports||ga,exports:t.exports||ga,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function Mj(t,e){if(t==null)return Ly;let r={};for(let n in t)if(t.hasOwnProperty(n)){let i=t[n],s,o,a=is.None;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s):(s=i,o=i),e?(r[s]=a!==is.None?[n,a]:n,e[s]=o):r[s]=n}return r}function ac(t){return Ky(()=>{let e=IH(t);return AH(e),e})}function LE(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone===!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function Cf(t){return t[Jwe]||null}function EH(t){return t[Ywe]||null}function _H(t){return t[WS]||null}function CH(t){let e=Cf(t)||EH(t)||_H(t);return e!==null?e.standalone:!1}function xH(t,e){let r=t[Qwe]||null;if(!r&&e===!0)throw new Error(`Type ${Ws(t)} does not have '\u0275mod' property.`);return r}function IH(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||Ly,exportAs:t.exportAs||null,standalone:t.standalone===!0,signals:t.signals===!0,selectors:t.selectors||ga,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Mj(t.inputs,e),outputs:Mj(t.outputs),debugInfo:null}}function AH(t){t.features?.forEach(e=>e(t))}function Pj(t,e){if(!t)return null;let r=e?_H:dve;return()=>(typeof t=="function"?t():t).map(n=>r(n)).filter(hve)}function pve(t){let e=0,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(let i of r)e=Math.imul(31,e)+i.charCodeAt(0)<<0;return e+=2147483648,"c"+e}var Xl=0,zt=1,Rt=2,bs=3,sc=4,jo=5,Fy=6,By=7,go=8,Gm=9,Yl=10,Vi=11,Uy=12,kj=13,eg=14,oc=15,FE=16,$m=17,Zm=18,Jy=19,SH=20,Py=21,HA=22,hh=23,$i=25,DH=1;var ph=7,gE=8,yE=9,Bo=10,GS=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(GS||{});function _f(t){return Array.isArray(t)&&typeof t[DH]=="object"}function eu(t){return Array.isArray(t)&&t[DH]===!0}function ZS(t){return(t.flags&4)!==0}function BE(t){return t.componentOffset>-1}function UE(t){return(t.flags&1)===1}function Yy(t){return!!t.template}function mve(t){return(t[Rt]&512)!==0}var RH="svg",gve="math",yve=!1;function wve(){return yve}function Uo(t){for(;Array.isArray(t);)t=t[Xl];return t}function TH(t,e){return Uo(e[t])}function cc(t,e){return Uo(e[t.index])}function KS(t,e){return t.data[e]}function NH(t,e){return t[e]}function Wc(t,e){let r=e[t];return _f(r)?r:r[Xl]}function JS(t){return(t[Rt]&128)===128}function vve(t){return eu(t[bs])}function Km(t,e){return e==null?null:t[e]}function OH(t){t[$m]=0}function bve(t){t[Rt]&1024||(t[Rt]|=1024,JS(t)&&jy(t))}function Eve(t,e){for(;t>0;)e=e[eg],t--;return e}function YS(t){return!!(t[Rt]&9216||t[hh]?.dirty)}function nS(t){YS(t)?jy(t):t[Rt]&64&&(wve()?(t[Rt]|=1024,jy(t)):t[Yl].changeDetectionScheduler?.notify())}function jy(t){t[Yl].changeDetectionScheduler?.notify();let e=Hy(t);for(;e!==null&&!(e[Rt]&8192||(e[Rt]|=8192,!JS(e)));)e=Hy(e)}function _ve(t,e){if((t[Rt]&256)===256)throw new gt(911,!1);t[Py]===null&&(t[Py]=[]),t[Py].push(e)}function Hy(t){let e=t[bs];return eu(e)?e[bs]:e}var Qt={lFrame:UH(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function Cve(){return Qt.lFrame.elementDepthCount}function xve(){Qt.lFrame.elementDepthCount++}function Ive(){Qt.lFrame.elementDepthCount--}function MH(){return Qt.bindingsEnabled}function PH(){return Qt.skipHydrationRootTNode!==null}function Ave(t){return Qt.skipHydrationRootTNode===t}function Sve(){Qt.skipHydrationRootTNode=null}function Hr(){return Qt.lFrame.lView}function va(){return Qt.lFrame.tView}function If(t){return Qt.lFrame.contextLView=t,t[go]}function Af(t){return Qt.lFrame.contextLView=null,t}function ba(){let t=kH();for(;t!==null&&t.type===64;)t=t.parent;return t}function kH(){return Qt.lFrame.currentTNode}function Dve(){let t=Qt.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function bh(t,e){let r=Qt.lFrame;r.currentTNode=t,r.isParent=e}function QS(){return Qt.lFrame.isParent}function XS(){Qt.lFrame.isParent=!1}function jE(){let t=Qt.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Rve(t){return Qt.lFrame.bindingIndex=t}function eD(){return Qt.lFrame.bindingIndex++}function Tve(t){let e=Qt.lFrame,r=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,r}function Nve(){return Qt.lFrame.inI18n}function Ove(t,e){let r=Qt.lFrame;r.bindingIndex=r.bindingRootIndex=t,iS(e)}function Mve(){return Qt.lFrame.currentDirectiveIndex}function iS(t){Qt.lFrame.currentDirectiveIndex=t}function Pve(t){let e=Qt.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function LH(t){Qt.lFrame.currentQueryIndex=t}function kve(t){let e=t[zt];return e.type===2?e.declTNode:e.type===1?t[jo]:null}function FH(t,e,r){if(r&tr.SkipSelf){let i=e,s=t;for(;i=i.parent,i===null&&!(r&tr.Host);)if(i=kve(s),i===null||(s=s[eg],i.type&10))break;if(i===null)return!1;e=i,t=s}let n=Qt.lFrame=BH();return n.currentTNode=e,n.lView=t,!0}function tD(t){let e=BH(),r=t[zt];Qt.lFrame=e,e.currentTNode=r.firstChild,e.lView=t,e.tView=r,e.contextLView=t,e.bindingIndex=r.bindingStartIndex,e.inI18n=!1}function BH(){let t=Qt.lFrame,e=t===null?null:t.child;return e===null?UH(t):e}function UH(t){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function jH(){let t=Qt.lFrame;return Qt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var HH=jH;function rD(){let t=jH();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Lve(t){return(Qt.lFrame.contextLView=Eve(t,Qt.lFrame.contextLView))[go]}function tg(){return Qt.lFrame.selectedIndex}function mh(t){Qt.lFrame.selectedIndex=t}function Fve(){let t=Qt.lFrame;return KS(t.tView,t.selectedIndex)}function Gc(){Qt.lFrame.currentNamespace=RH}function VH(){Bve()}function Bve(){Qt.lFrame.currentNamespace=null}function Uve(){return Qt.lFrame.currentNamespace}var $H=!0;function HE(){return $H}function VE(t){$H=t}function jve(){return $E(ba(),Hr())}function $E(t,e){return new Sf(cc(t,e))}var Sf=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=jve;let t=e;return t})();function nD(t,e){t.forEach(r=>Array.isArray(r)?nD(r,e):e(r))}function qH(t,e,r){e>=t.length?t.push(r):t.splice(e,0,r)}function wE(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Hve(t,e){let r=[];for(let n=0;n<t;n++)r.push(e);return r}function Vve(t,e,r,n){let i=t.length;if(i==e)t.push(r,n);else if(i===1)t.push(n,t[0]),t[0]=r;else{for(i--,t.push(t[i-1],t[i]);i>e;){let s=i-2;t[i]=t[s],i--}t[e]=r,t[e+1]=n}}function $ve(t,e,r){let n=Qy(t,e);return n>=0?t[n|1]=r:(n=~n,Vve(t,n,e,r)),n}function VA(t,e){let r=Qy(t,e);if(r>=0)return t[r|1]}function Qy(t,e){return qve(t,e,1)}function qve(t,e,r){let n=0,i=t.length>>r;for(;i!==n;){let s=n+(i-n>>1),o=t[s<<r];if(e===o)return s<<r;o>e?i=s:n=s+1}return~(i<<r)}function WH(t){return(t.flags&128)===128}var sS;function zH(t){sS=t}function GH(){if(sS!==void 0)return sS;if(typeof document<"u")return document;throw new gt(210,!1)}function Xe(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function rg(t){return{providers:t.providers||[],imports:t.imports||[]}}function qE(t){return Lj(t,KH)||Lj(t,JH)}function ZH(t){return qE(t)!==null}function Lj(t,e){return t.hasOwnProperty(e)?t[e]:null}function Wve(t){let e=t&&(t[KH]||t[JH]);return e||null}function Fj(t){return t&&(t.hasOwnProperty(Bj)||t.hasOwnProperty(zve))?t[Bj]:null}var KH=cn({\u0275prov:cn}),Bj=cn({\u0275inj:cn}),JH=cn({ngInjectableDef:cn}),zve=cn({ngInjectorDef:cn}),ot=class{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=Xe({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}},iD=new ot("",{providedIn:"root",factory:()=>Gve}),Gve="ng",sD=new ot(""),tu=new ot("",{providedIn:"platform",factory:()=>"unknown"});var oD=new ot("",{providedIn:"root",factory:()=>GH().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),aD={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840],placeholderResolution:30,disableImageSizeWarning:!1,disableImageLazyLoadWarning:!1},YH=new ot("",{providedIn:"root",factory:()=>aD}),Zve=cn({__forward_ref__:cn});function QH(t){return t.__forward_ref__=QH,t.toString=function(){return Ws(this())},t}function ya(t){return XH(t)?t():t}function XH(t){return typeof t=="function"&&t.hasOwnProperty(Zve)&&t.__forward_ref__===QH}function eV(t){return t&&!!t.\u0275providers}function WE(t){return typeof t=="string"?t:t==null?"":String(t)}function Kve(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():WE(t)}function Jve(t,e){let r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new gt(-200,t)}function cD(t,e){throw new gt(-201,!1)}var oS;function Yve(){return oS}function mo(t){let e=oS;return oS=t,e}function tV(t,e,r){let n=qE(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&tr.Optional)return null;if(e!==void 0)return e;cD(t,"Injector")}var Qve={},Vy=Qve,aS="__NG_DI_FLAG__",vE="ngTempTokenPath",Xve="ngTokenPath",e2e=/\n/gm,t2e="\u0275",Uj="__source",ky;function Ef(t){let e=ky;return ky=t,e}function r2e(t,e=tr.Default){if(ky===void 0)throw new gt(-203,!1);return ky===null?tV(t,void 0,e):ky.get(t,e&tr.Optional?null:void 0,e)}function yt(t,e=tr.Default){return(Yve()||r2e)(ya(t),e)}function xe(t,e=tr.Default){return yt(t,zE(e))}function zE(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function cS(t){let e=[];for(let r=0;r<t.length;r++){let n=ya(t[r]);if(Array.isArray(n)){if(n.length===0)throw new gt(900,!1);let i,s=tr.Default;for(let o=0;o<n.length;o++){let a=n[o],c=n2e(a);typeof c=="number"?c===-1?i=a.token:s|=c:i=a}e.push(yt(i,s))}else e.push(yt(n))}return e}function rV(t,e){return t[aS]=e,t.prototype[aS]=e,t}function n2e(t){return t[aS]}function i2e(t,e,r,n){let i=t[vE];throw e[Uj]&&i.unshift(e[Uj]),t.message=s2e(`
`+t.message,i,r,n),t[Xve]=i,t[vE]=null,t}function s2e(t,e,r,n=null){t=t&&t.charAt(0)===`
`&&t.charAt(1)==t2e?t.slice(2):t;let i=Ws(e);if(Array.isArray(e))i=e.map(Ws).join(" -> ");else if(typeof e=="object"){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):Ws(a)))}i=`{${s.join(", ")}}`}return`${r}${n?"("+n+")":""}[${i}]: ${t.replace(e2e,`
  `)}`}var o2e="h",a2e="b";var c2e=()=>null;function lD(t,e,r=!1){return c2e(t,e,r)}var sE="__parameters__";function l2e(t){return function(...r){if(t){let n=t(...r);for(let i in n)this[i]=n[i]}}}function nV(t,e,r){return Ky(()=>{let n=l2e(e);function i(...s){if(this instanceof i)return n.apply(this,s),this;let o=new i(...s);return a.annotation=o,a;function a(c,u,d){let h=c.hasOwnProperty(sE)?c[sE]:Object.defineProperty(c,sE,{value:[]})[sE];for(;h.length<=d;)h.push(null);return(h[d]=h[d]||[]).push(o),c}}return r&&(i.prototype=Object.create(r.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}var GE=rV(nV("Optional"),8);var uD=rV(nV("SkipSelf"),4);function gh(t,e){let r=t.hasOwnProperty(mE);return r?t[mE]:null}var Jm=new ot(""),iV=new ot("",-1),sV=new ot(""),bE=class{get(e,r=Vy){if(r===Vy){let n=new Error(`NullInjectorError: No provider for ${Ws(e)}!`);throw n.name="NullInjectorError",n}return r}};function Ho(t){return{\u0275providers:t}}function u2e(...t){return{\u0275providers:oV(!0,t),\u0275fromNgModule:!0}}function oV(t,...e){let r=[],n=new Set,i,s=o=>{r.push(o)};return nD(e,o=>{let a=o;lS(a,s,[],n)&&(i||=[],i.push(a))}),i!==void 0&&aV(i,s),r}function aV(t,e){for(let r=0;r<t.length;r++){let{ngModule:n,providers:i}=t[r];fD(i,s=>{e(s,n)})}}function lS(t,e,r,n){if(t=ya(t),!t)return!1;let i=null,s=Fj(t),o=!s&&Cf(t);if(!s&&!o){let c=t.ngModule;if(s=Fj(c),s)i=c;else return!1}else{if(o&&!o.standalone)return!1;i=t}let a=n.has(i);if(o){if(a)return!1;if(n.add(i),o.dependencies){let c=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let u of c)lS(u,e,r,n)}}else if(s){if(s.imports!=null&&!a){n.add(i);let u;try{nD(s.imports,d=>{lS(d,e,r,n)&&(u||=[],u.push(d))})}finally{}u!==void 0&&aV(u,e)}if(!a){let u=gh(i)||(()=>new i);e({provide:i,useFactory:u,deps:ga},i),e({provide:sV,useValue:i,multi:!0},i),e({provide:Jm,useValue:()=>yt(i),multi:!0},i)}let c=s.providers;if(c!=null&&!a){let u=t;fD(c,d=>{e(d,u)})}}else return!1;return i!==t&&t.providers!==void 0}function fD(t,e){for(let r of t)eV(r)&&(r=r.\u0275providers),Array.isArray(r)?fD(r,e):e(r)}var f2e=cn({provide:String,useValue:cn});function cV(t){return t!==null&&typeof t=="object"&&f2e in t}function d2e(t){return!!(t&&t.useExisting)}function h2e(t){return!!(t&&t.useFactory)}function uS(t){return typeof t=="function"}var ZE=new ot(""),uE={},p2e={},$A;function KE(){return $A===void 0&&($A=new bE),$A}var Es=class{},$y=class extends Es{get destroyed(){return this._destroyed}constructor(e,r,n,i){super(),this.parent=r,this.source=n,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,dS(e,o=>this.processProvider(o)),this.records.set(iV,qm(void 0,this)),i.has("environment")&&this.records.set(Es,qm(void 0,this));let s=this.records.get(ZE);s!=null&&typeof s.value=="string"&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(sV,ga,tr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=vr(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let r=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of r)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),vr(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let r=Ef(this),n=mo(void 0),i;try{return e()}finally{Ef(r),mo(n)}}get(e,r=Vy,n=tr.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(Tj))return e[Tj](this);n=zE(n);let i,s=Ef(this),o=mo(void 0);try{if(!(n&tr.SkipSelf)){let c=this.records.get(e);if(c===void 0){let u=b2e(e)&&qE(e);u&&this.injectableDefInScope(u)?c=qm(fS(e),uE):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c)}let a=n&tr.Self?KE():this.parent;return r=n&tr.Optional&&r===Vy?null:r,a.get(e,r)}catch(a){if(a.name==="NullInjectorError"){if((a[vE]=a[vE]||[]).unshift(Ws(e)),s)throw a;return i2e(a,e,"R3InjectorError",this.source)}else throw a}finally{mo(o),Ef(s)}}resolveInjectorInitializers(){let e=vr(null),r=Ef(this),n=mo(void 0),i;try{let s=this.get(Jm,ga,tr.Self);for(let o of s)o()}finally{Ef(r),mo(n),vr(e)}}toString(){let e=[],r=this.records;for(let n of r.keys())e.push(Ws(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new gt(205,!1)}processProvider(e){e=ya(e);let r=uS(e)?e:ya(e&&e.provide),n=g2e(e);if(!uS(e)&&e.multi===!0){let i=this.records.get(r);i||(i=qm(void 0,uE,!0),i.factory=()=>cS(i.multi),this.records.set(r,i)),r=e,i.multi.push(e)}this.records.set(r,n)}hydrate(e,r){let n=vr(null);try{return r.value===uE&&(r.value=p2e,r.value=r.factory()),typeof r.value=="object"&&r.value&&v2e(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}finally{vr(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let r=ya(e.providedIn);return typeof r=="string"?r==="any"||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(e){let r=this._onDestroyHooks.indexOf(e);r!==-1&&this._onDestroyHooks.splice(r,1)}};function fS(t){let e=qE(t),r=e!==null?e.factory:gh(t);if(r!==null)return r;if(t instanceof ot)throw new gt(204,!1);if(t instanceof Function)return m2e(t);throw new gt(204,!1)}function m2e(t){if(t.length>0)throw new gt(204,!1);let r=Wve(t);return r!==null?()=>r.factory(t):()=>new t}function g2e(t){if(cV(t))return qm(void 0,t.useValue);{let e=y2e(t);return qm(e,uE)}}function y2e(t,e,r){let n;if(uS(t)){let i=ya(t);return gh(i)||fS(i)}else if(cV(t))n=()=>ya(t.useValue);else if(h2e(t))n=()=>t.useFactory(...cS(t.deps||[]));else if(d2e(t))n=()=>yt(ya(t.useExisting));else{let i=ya(t&&(t.useClass||t.provide));if(w2e(t))n=()=>new i(...cS(t.deps));else return gh(i)||fS(i)}return n}function qm(t,e,r=!1){return{factory:t,value:e,multi:r?[]:void 0}}function w2e(t){return!!t.deps}function v2e(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function b2e(t){return typeof t=="function"||typeof t=="object"&&t instanceof ot}function dS(t,e){for(let r of t)Array.isArray(r)?dS(r,e):r&&eV(r)?dS(r.\u0275providers,e):e(r)}function ru(t,e){t instanceof $y&&t.assertNotDestroyed();let r,n=Ef(t),i=mo(void 0);try{return e()}finally{Ef(n),mo(i)}}function E2e(t){return typeof t=="function"}var hS=class{constructor(e,r,n){this.previousValue=e,this.currentValue=r,this.firstChange=n}isFirstChange(){return this.firstChange}};function lV(t,e,r,n){e!==null?e.applyValueToInputSignal(e,n):t[r]=n}function ng(){return uV}function uV(t){return t.type.prototype.ngOnChanges&&(t.setInput=C2e),_2e}ng.ngInherit=!0;function _2e(){let t=dV(this),e=t?.current;if(e){let r=t.previous;if(r===Ly)t.previous=e;else for(let n in e)r[n]=e[n];t.current=null,this.ngOnChanges(e)}}function C2e(t,e,r,n,i){let s=this.declaredInputs[n],o=dV(t)||x2e(t,{previous:Ly,current:null}),a=o.current||(o.current={}),c=o.previous,u=c[s];a[s]=new hS(u&&u.currentValue,r,c===Ly),lV(t,e,i,r)}var fV="__ngSimpleChanges__";function dV(t){return t[fV]||null}function x2e(t,e){return t[fV]=e}var jj=null;var Vc=function(t,e,r){jj?.(t,e,r)};function I2e(t,e,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:s}=e.type.prototype;if(n){let o=uV(e);(r.preOrderHooks??=[]).push(t,o),(r.preOrderCheckHooks??=[]).push(t,o)}i&&(r.preOrderHooks??=[]).push(0-t,i),s&&((r.preOrderHooks??=[]).push(t,s),(r.preOrderCheckHooks??=[]).push(t,s))}function JE(t,e){for(let r=e.directiveStart,n=e.directiveEnd;r<n;r++){let s=t.data[r].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:u,ngOnDestroy:d}=s;o&&(t.contentHooks??=[]).push(-r,o),a&&((t.contentHooks??=[]).push(r,a),(t.contentCheckHooks??=[]).push(r,a)),c&&(t.viewHooks??=[]).push(-r,c),u&&((t.viewHooks??=[]).push(r,u),(t.viewCheckHooks??=[]).push(r,u)),d!=null&&(t.destroyHooks??=[]).push(r,d)}}function fE(t,e,r){hV(t,e,3,r)}function dE(t,e,r,n){(t[Rt]&3)===r&&hV(t,e,r,n)}function qA(t,e){let r=t[Rt];(r&3)===e&&(r&=16383,r+=1,t[Rt]=r)}function hV(t,e,r,n){let i=n!==void 0?t[$m]&65535:0,s=n??-1,o=e.length-1,a=0;for(let c=i;c<o;c++)if(typeof e[c+1]=="number"){if(a=e[c],n!=null&&a>=n)break}else e[c]<0&&(t[$m]+=65536),(a<s||s==-1)&&(A2e(t,r,e,c),t[$m]=(t[$m]&4294901760)+c+2),c++}function Hj(t,e){Vc(4,t,e);let r=vr(null);try{e.call(t)}finally{vr(r),Vc(5,t,e)}}function A2e(t,e,r,n){let i=r[n]<0,s=r[n+1],o=i?-r[n]:r[n],a=t[o];i?t[Rt]>>14<t[$m]>>16&&(t[Rt]&3)===e&&(t[Rt]+=16384,Hj(a,s)):Hj(a,s)}var zm=-1,qy=class{constructor(e,r,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=n}};function S2e(t){return t instanceof qy}function D2e(t){return(t.flags&8)!==0}function R2e(t){return(t.flags&16)!==0}function pV(t){return t!==zm}function EE(t){return t&32767}function T2e(t){return t>>16}function _E(t,e){let r=T2e(t),n=e;for(;r>0;)n=n[eg],r--;return n}var pS=!0;function CE(t){let e=pS;return pS=t,e}var N2e=256,mV=N2e-1,gV=5,O2e=0,$c={};function M2e(t,e,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(My)&&(n=r[My]),n==null&&(n=r[My]=O2e++);let i=n&mV,s=1<<i;e.data[t+(i>>gV)]|=s}function yV(t,e){let r=wV(t,e);if(r!==-1)return r;let n=e[zt];n.firstCreatePass&&(t.injectorIndex=e.length,WA(n.data,t),WA(e,null),WA(n.blueprint,null));let i=dD(t,e),s=t.injectorIndex;if(pV(i)){let o=EE(i),a=_E(i,e),c=a[zt].data;for(let u=0;u<8;u++)e[s+u]=a[o+u]|c[o+u]}return e[s+8]=i,s}function WA(t,e){t.push(0,0,0,0,0,0,0,0,e)}function wV(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function dD(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let r=0,n=null,i=e;for(;i!==null;){if(n=CV(i),n===null)return zm;if(r++,i=i[eg],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return zm}function P2e(t,e,r){M2e(t,e,r)}function vV(t,e,r){if(r&tr.Optional||t!==void 0)return t;cD(e,"NodeInjector")}function bV(t,e,r,n){if(r&tr.Optional&&n===void 0&&(n=null),!(r&(tr.Self|tr.Host))){let i=t[Gm],s=mo(void 0);try{return i?i.get(e,n,r&tr.Optional):tV(e,n,r&tr.Optional)}finally{mo(s)}}return vV(n,e,r)}function EV(t,e,r,n=tr.Default,i){if(t!==null){if(e[Rt]&2048&&!(n&tr.Self)){let o=U2e(t,e,r,n,$c);if(o!==$c)return o}let s=_V(t,e,r,n,$c);if(s!==$c)return s}return bV(e,r,n,i)}function _V(t,e,r,n,i){let s=F2e(r);if(typeof s=="function"){if(!FH(e,t,n))return n&tr.Host?vV(i,r,n):bV(e,r,n,i);try{let o;if(o=s(n),o==null&&!(n&tr.Optional))cD(r);else return o}finally{HH()}}else if(typeof s=="number"){let o=null,a=wV(t,e),c=zm,u=n&tr.Host?e[oc][jo]:null;for((a===-1||n&tr.SkipSelf)&&(c=a===-1?dD(t,e):e[a+8],c===zm||!$j(n,!1)?a=-1:(o=e[zt],a=EE(c),e=_E(c,e)));a!==-1;){let d=e[zt];if(Vj(s,a,d.data)){let h=k2e(a,e,r,o,n,u);if(h!==$c)return h}c=e[a+8],c!==zm&&$j(n,e[zt].data[a+8]===u)&&Vj(s,a,e)?(o=d,a=EE(c),e=_E(c,e)):a=-1}}return i}function k2e(t,e,r,n,i,s){let o=e[zt],a=o.data[t+8],c=n==null?BE(a)&&pS:n!=o&&(a.type&3)!==0,u=i&tr.Host&&s===a,d=L2e(a,o,r,c,u);return d!==null?Wy(e,o,d,a):$c}function L2e(t,e,r,n,i){let s=t.providerIndexes,o=e.data,a=s&1048575,c=t.directiveStart,u=t.directiveEnd,d=s>>20,h=n?a:a+d,m=i?a+d:u;for(let w=h;w<m;w++){let _=o[w];if(w<c&&r===_||w>=c&&_.type===r)return w}if(i){let w=o[c];if(w&&Yy(w)&&w.type===r)return c}return null}function Wy(t,e,r,n){let i=t[r],s=e.data;if(S2e(i)){let o=i;o.resolving&&Jve(Kve(s[r]));let a=CE(o.canSeeViewProviders);o.resolving=!0;let c,u=o.injectImpl?mo(o.injectImpl):null,d=FH(t,n,tr.Default);try{i=t[r]=o.factory(void 0,s,t,n),e.firstCreatePass&&r>=n.directiveStart&&I2e(r,s[r],e)}finally{u!==null&&mo(u),CE(a),o.resolving=!1,HH()}}return i}function F2e(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(My)?t[My]:void 0;return typeof e=="number"?e>=0?e&mV:B2e:e}function Vj(t,e,r){let n=1<<t;return!!(r[e+(t>>gV)]&n)}function $j(t,e){return!(t&tr.Self)&&!(t&tr.Host&&e)}var dh=class{constructor(e,r){this._tNode=e,this._lView=r}get(e,r,n){return EV(this._tNode,this._lView,e,zE(n),r)}};function B2e(){return new dh(ba(),Hr())}function YE(t){return Ky(()=>{let e=t.prototype.constructor,r=e[mE]||mS(e),n=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==n;){let s=i[mE]||mS(i);if(s&&s!==r)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function mS(t){return XH(t)?()=>{let e=mS(ya(t));return e&&e()}:gh(t)}function U2e(t,e,r,n,i){let s=t,o=e;for(;s!==null&&o!==null&&o[Rt]&2048&&!(o[Rt]&512);){let a=_V(s,o,r,n|tr.Self,$c);if(a!==$c)return a;let c=s.parent;if(!c){let u=o[SH];if(u){let d=u.get(r,$c,n);if(d!==$c)return d}c=CV(o),o=o[eg]}s=c}return i}function CV(t){let e=t[zt],r=e.type;return r===2?e.declTNode:r===1?t[jo]:null}function qj(t,e=null,r=null,n){let i=xV(t,e,r,n);return i.resolveInjectorInitializers(),i}function xV(t,e=null,r=null,n,i=new Set){let s=[r||ga,u2e(t)];return n=n||(typeof t=="object"?void 0:Ws(t)),new $y(s,e||KE(),n||null,i)}var nu=(()=>{let e=class e{static create(n,i){if(Array.isArray(n))return qj({name:""},i,n,"");{let s=n.name??"";return qj({name:s},n.parent,n.providers,s)}}};e.THROW_IF_NOT_FOUND=Vy,e.NULL=new bE,e.\u0275prov=Xe({token:e,providedIn:"any",factory:()=>yt(iV)}),e.__NG_ELEMENT_ID__=-1;let t=e;return t})(),j2e="ngOriginalError";function zA(t){return t[j2e]}var Ql=class{constructor(){this._console=console}handleError(e){let r=this._findOriginalError(e);this._console.error("ERROR",e),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(e){let r=e&&zA(e);for(;r&&zA(r);)r=zA(r);return r||null}},IV=new ot("",{providedIn:"root",factory:()=>xe(Ql).handleError.bind(void 0)});var AV=!1,H2e=new ot("",{providedIn:"root",factory:()=>AV}),oE;function V2e(){if(oE===void 0&&(oE=null,ic.trustedTypes))try{oE=ic.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return oE}function QE(t){return V2e()?.createHTML(t)||t}var aE;function $2e(){if(aE===void 0&&(aE=null,ic.trustedTypes))try{aE=ic.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return aE}function Wj(t){return $2e()?.createHTML(t)||t}var xE=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${mH})`}};function ig(t){return t instanceof xE?t.changingThisBreaksApplicationSecurity:t}function hD(t,e){let r=q2e(t);if(r!=null&&r!==e){if(r==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${r} (see ${mH})`)}return r===e}function q2e(t){return t instanceof xE&&t.getTypeName()||null}function W2e(t){let e=new yS(t);return z2e()?new gS(e):e}var gS=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let r=new window.DOMParser().parseFromString(QE(e),"text/html").body;return r===null?this.inertDocumentHelper.getInertBodyElement(e):(r.removeChild(r.firstChild),r)}catch{return null}}},yS=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let r=this.inertDocument.createElement("template");return r.innerHTML=QE(e),r}};function z2e(){try{return!!new window.DOMParser().parseFromString(QE(""),"text/html")}catch{return!1}}var G2e=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function pD(t){return t=String(t),t.match(G2e)?t:"unsafe:"+t}function iu(t){let e={};for(let r of t.split(","))e[r]=!0;return e}function Xy(...t){let e={};for(let r of t)for(let n in r)r.hasOwnProperty(n)&&(e[n]=!0);return e}var SV=iu("area,br,col,hr,img,wbr"),DV=iu("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),RV=iu("rp,rt"),Z2e=Xy(RV,DV),K2e=Xy(DV,iu("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),J2e=Xy(RV,iu("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),zj=Xy(SV,K2e,J2e,Z2e),TV=iu("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Y2e=iu("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Q2e=iu("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),X2e=Xy(TV,Y2e,Q2e),ebe=iu("script,style,template"),wS=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let r=e.firstChild,n=!0;for(;r;){if(r.nodeType===Node.ELEMENT_NODE?n=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,n&&r.firstChild){r=r.firstChild;continue}for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let i=this.checkClobberedElement(r,r.nextSibling);if(i){r=i;break}r=this.checkClobberedElement(r,r.parentNode)}}return this.buf.join("")}startElement(e){let r=e.nodeName.toLowerCase();if(!zj.hasOwnProperty(r))return this.sanitizedSomething=!0,!ebe.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);let n=e.attributes;for(let i=0;i<n.length;i++){let s=n.item(i),o=s.name,a=o.toLowerCase();if(!X2e.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let c=s.value;TV[a]&&(c=pD(c)),this.buf.push(" ",o,'="',Gj(c),'"')}return this.buf.push(">"),!0}endElement(e){let r=e.nodeName.toLowerCase();zj.hasOwnProperty(r)&&!SV.hasOwnProperty(r)&&(this.buf.push("</"),this.buf.push(r),this.buf.push(">"))}chars(e){this.buf.push(Gj(e))}checkClobberedElement(e,r){if(r&&(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return r}},tbe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rbe=/([^\#-~ |!])/g;function Gj(t){return t.replace(/&/g,"&amp;").replace(tbe,function(e){let r=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(rbe,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var cE;function NV(t,e){let r=null;try{cE=cE||W2e(t);let n=e?String(e):"";r=cE.getInertBodyElement(n);let i=5,s=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=s,s=r.innerHTML,r=cE.getInertBodyElement(n)}while(n!==s);let a=new wS().sanitizeChildren(Zj(r)||r);return QE(a)}finally{if(r){let n=Zj(r)||r;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Zj(t){return"content"in t&&nbe(t)?t.content:null}function nbe(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var XE=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(XE||{});function mD(t){let e=MV();return e?Wj(e.sanitize(XE.HTML,t)||""):hD(t,"HTML")?Wj(ig(t)):NV(GH(),WE(t))}function OV(t){let e=MV();return e?e.sanitize(XE.URL,t)||"":hD(t,"URL")?ig(t):pD(WE(t))}function MV(){let t=Hr();return t&&t[Yl].sanitizer}var ibe=/^>|^->|<!--|-->|--!>|<!-$/g,sbe=/(<|>)/g,obe="\u200B$1\u200B";function abe(t){return t.replace(ibe,e=>e.replace(sbe,obe))}var gD=new Map,cbe=0;function lbe(){return cbe++}function ube(t){gD.set(t[Jy],t)}function PV(t){return gD.get(t)||null}function fbe(t){gD.delete(t[Jy])}var vS=class{get lView(){return PV(this.lViewId)}constructor(e,r,n){this.lViewId=e,this.nodeIndex=r,this.native=n}};function kV(t){let e=GA(t);if(e){if(_f(e)){let r=e,n,i,s;if(LV(t)){if(n=pbe(r,t),n==-1)throw new Error("The provided component was not found in the application");i=t}else if(dbe(t)){if(n=mbe(r,t),n==-1)throw new Error("The provided directive was not found in the application");s=gbe(n,r)}else if(n=Jj(r,t),n==-1)return null;let o=Uo(r[n]),a=GA(o),c=a&&!Array.isArray(a)?a:Kj(r,n,o);if(i&&c.component===void 0&&(c.component=i,wa(c.component,c)),s&&c.directives===void 0){c.directives=s;for(let u=0;u<s.length;u++)wa(s[u],c)}wa(c.native,c),e=c}}else{let r=t,n=r;for(;n=n.parentNode;){let i=GA(n);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=Jj(s,r);if(o>=0){let a=Uo(s[o]),c=Kj(s,o,a);wa(a,c),e=c;break}}}}return e||null}function Kj(t,e,r){return new vS(t[Jy],e,r)}var bS="__ngContext__";function wa(t,e){_f(e)?(t[bS]=e[Jy],ube(e)):t[bS]=e}function GA(t){let e=t[bS];return typeof e=="number"?PV(e):e||null}function LV(t){return t&&t.constructor&&t.constructor.\u0275cmp}function dbe(t){return t&&t.constructor&&t.constructor.\u0275dir}function Jj(t,e){let r=t[zt];for(let n=$i;n<r.bindingStartIndex;n++)if(Uo(t[n])===e)return n;return-1}function hbe(t){if(t.child)return t.child;if(t.next)return t.next;for(;t.parent&&!t.parent.next;)t=t.parent;return t.parent&&t.parent.next}function pbe(t,e){let r=t[zt].components;if(r)for(let n=0;n<r.length;n++){let i=r[n];if(Wc(i,t)[go]===e)return i}else if(Wc($i,t)[go]===e)return $i;return-1}function mbe(t,e){let r=t[zt].firstChild;for(;r;){let n=r.directiveStart,i=r.directiveEnd;for(let s=n;s<i;s++)if(t[s]===e)return r.index;r=hbe(r)}return-1}function gbe(t,e){let r=e[zt].data[t];if(r.directiveStart===0)return ga;let n=[];for(let i=r.directiveStart;i<r.directiveEnd;i++){let s=e[i];LV(s)||n.push(s)}return n}function FV(t){return t instanceof Function?t():t}var zc=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(zc||{}),ybe;function yD(t,e){return ybe(t,e)}function Wm(t,e,r,n,i){if(n!=null){let s,o=!1;eu(n)?s=n:_f(n)&&(o=!0,n=n[Xl]);let a=Uo(n);t===0&&r!==null?i==null?VV(e,r,a):AE(e,r,a,i||null,!0):t===1&&r!==null?AE(e,r,a,i||null,!0):t===2?Mbe(e,a,o):t===3&&e.destroyNode(a),s!=null&&kbe(e,t,s,r,i)}}function wbe(t,e){return t.createText(e)}function vbe(t,e,r){t.setValue(e,r)}function bbe(t,e){return t.createComment(abe(e))}function BV(t,e,r){return t.createElement(e,r)}function Ebe(t,e){UV(t,e),e[Xl]=null,e[jo]=null}function _be(t,e,r,n,i,s){n[Xl]=i,n[jo]=e,t_(t,n,r,1,i,s)}function UV(t,e){t_(t,e,e[Vi],2,null,null)}function Cbe(t){let e=t[Uy];if(!e)return ZA(t[zt],t);for(;e;){let r=null;if(_f(e))r=e[Uy];else{let n=e[Bo];n&&(r=n)}if(!r){for(;e&&!e[sc]&&e!==t;)_f(e)&&ZA(e[zt],e),e=e[bs];e===null&&(e=t),_f(e)&&ZA(e[zt],e),r=e&&e[sc]}e=r}}function xbe(t,e,r,n){let i=Bo+n,s=r.length;n>0&&(r[i-1][sc]=e),n<s-Bo?(e[sc]=r[i],qH(r,Bo+n,e)):(r.push(e),e[sc]=null),e[bs]=r;let o=e[FE];o!==null&&r!==o&&Ibe(o,e);let a=e[Zm];a!==null&&a.insertView(t),nS(e),e[Rt]|=128}function Ibe(t,e){let r=t[yE],i=e[bs][bs][oc];e[oc]!==i&&(t[Rt]|=GS.HasTransplantedViews),r===null?t[yE]=[e]:r.push(e)}function jV(t,e){let r=t[yE],n=r.indexOf(e);r.splice(n,1)}function IE(t,e){if(t.length<=Bo)return;let r=Bo+e,n=t[r];if(n){let i=n[FE];i!==null&&i!==t&&jV(i,n),e>0&&(t[r-1][sc]=n[sc]);let s=wE(t,Bo+e);Ebe(n[zt],n);let o=s[Zm];o!==null&&o.detachView(s[zt]),n[bs]=null,n[sc]=null,n[Rt]&=-129}return n}function wD(t,e){if(!(e[Rt]&256)){let r=e[Vi];r.destroyNode&&t_(t,e,r,3,null,null),Cbe(e)}}function ZA(t,e){if(e[Rt]&256)return;let r=vr(null);try{e[Rt]&=-129,e[Rt]|=256,e[hh]&&MU(e[hh]),Sbe(t,e),Abe(t,e),e[zt].type===1&&e[Vi].destroy();let n=e[FE];if(n!==null&&eu(e[bs])){n!==e[bs]&&jV(n,e);let i=e[Zm];i!==null&&i.detachView(t)}fbe(e)}finally{vr(r)}}function Abe(t,e){let r=t.cleanup,n=e[By];if(r!==null)for(let s=0;s<r.length-1;s+=2)if(typeof r[s]=="string"){let o=r[s+3];o>=0?n[o]():n[-o].unsubscribe(),s+=2}else{let o=n[r[s+1]];r[s].call(o)}n!==null&&(e[By]=null);let i=e[Py];if(i!==null){e[Py]=null;for(let s=0;s<i.length;s++){let o=i[s];o()}}}function Sbe(t,e){let r;if(t!=null&&(r=t.destroyHooks)!=null)for(let n=0;n<r.length;n+=2){let i=e[r[n]];if(!(i instanceof qy)){let s=r[n+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],c=s[o+1];Vc(4,a,c);try{c.call(a)}finally{Vc(5,a,c)}}else{Vc(4,i,s);try{s.call(i)}finally{Vc(5,i,s)}}}}}function HV(t,e,r){return Dbe(t,e.parent,r)}function Dbe(t,e,r){let n=e;for(;n!==null&&n.type&40;)e=n,n=e.parent;if(n===null)return r[Xl];{let{componentOffset:i}=n;if(i>-1){let{encapsulation:s}=t.data[n.directiveStart+i];if(s===qc.None||s===qc.Emulated)return null}return cc(n,r)}}function AE(t,e,r,n,i){t.insertBefore(e,r,n,i)}function VV(t,e,r){t.appendChild(e,r)}function Yj(t,e,r,n,i){n!==null?AE(t,e,r,n,i):VV(t,e,r)}function Rbe(t,e,r,n){t.removeChild(e,r,n)}function vD(t,e){return t.parentNode(e)}function Tbe(t,e){return t.nextSibling(e)}function $V(t,e,r){return Obe(t,e,r)}function Nbe(t,e,r){return t.type&40?cc(t,r):null}var Obe=Nbe,Qj;function e_(t,e,r,n){let i=HV(t,n,e),s=e[Vi],o=n.parent||e[jo],a=$V(o,n,e);if(i!=null)if(Array.isArray(r))for(let c=0;c<r.length;c++)Yj(s,i,r[c],a,!1);else Yj(s,i,r,a,!1);Qj!==void 0&&Qj(s,n,e,r,i)}function hE(t,e){if(e!==null){let r=e.type;if(r&3)return cc(e,t);if(r&4)return ES(-1,t[e.index]);if(r&8){let n=e.child;if(n!==null)return hE(t,n);{let i=t[e.index];return eu(i)?ES(-1,i):Uo(i)}}else{if(r&32)return yD(e,t)()||Uo(t[e.index]);{let n=qV(t,e);if(n!==null){if(Array.isArray(n))return n[0];let i=Hy(t[oc]);return hE(i,n)}else return hE(t,e.next)}}}return null}function qV(t,e){if(e!==null){let n=t[oc][jo],i=e.projection;return n.projection[i]}return null}function ES(t,e){let r=Bo+t+1;if(r<e.length){let n=e[r],i=n[zt].firstChild;if(i!==null)return hE(n,i)}return e[ph]}function Mbe(t,e,r){let n=vD(t,e);n&&Rbe(t,n,e,r)}function bD(t,e,r,n,i,s,o){for(;r!=null;){let a=n[r.index],c=r.type;if(o&&e===0&&(a&&wa(Uo(a),n),r.flags|=2),(r.flags&32)!==32)if(c&8)bD(t,e,r.child,n,i,s,!1),Wm(e,t,i,a,s);else if(c&32){let u=yD(r,n),d;for(;d=u();)Wm(e,t,i,d,s);Wm(e,t,i,a,s)}else c&16?WV(t,e,n,r,i,s):Wm(e,t,i,a,s);r=o?r.projectionNext:r.next}}function t_(t,e,r,n,i,s){bD(r,n,t.firstChild,e,i,s,!1)}function Pbe(t,e,r){let n=e[Vi],i=HV(t,r,e),s=r.parent||e[jo],o=$V(s,r,e);WV(n,0,e,r,i,o)}function WV(t,e,r,n,i,s){let o=r[oc],c=o[jo].projection[n.projection];if(Array.isArray(c))for(let u=0;u<c.length;u++){let d=c[u];Wm(e,t,i,d,s)}else{let u=c,d=o[bs];WH(n)&&(u.flags|=128),bD(t,e,u,d,i,s,!0)}}function kbe(t,e,r,n,i){let s=r[ph],o=Uo(r);s!==o&&Wm(e,t,n,s,i);for(let a=Bo;a<r.length;a++){let c=r[a];t_(c[zt],c,t,e,n,s)}}function Lbe(t,e,r,n,i){if(e)i?t.addClass(r,n):t.removeClass(r,n);else{let s=n.indexOf("-")===-1?void 0:zc.DashCase;i==null?t.removeStyle(r,n,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=zc.Important),t.setStyle(r,n,i,s))}}function Fbe(t,e,r){t.setAttribute(e,"style",r)}function zV(t,e,r){r===""?t.removeAttribute(e,"class"):t.setAttribute(e,"class",r)}function GV(t,e,r){let{mergedAttrs:n,classes:i,styles:s}=r;n!==null&&rS(t,e,n),i!==null&&zV(t,e,i),s!==null&&Fbe(t,e,s)}var Df={};function Ie(t=1){ZV(va(),Hr(),tg()+t,!1)}function ZV(t,e,r,n){if(!n)if((e[Rt]&3)===3){let s=t.preOrderCheckHooks;s!==null&&fE(e,s,r)}else{let s=t.preOrderHooks;s!==null&&dE(e,s,0,r)}mh(r)}function Mr(t,e=tr.Default){let r=Hr();if(r===null)return yt(t,e);let n=ba();return EV(n,r,ya(t),e)}function KV(t,e,r,n,i,s){let o=vr(null);try{let a=null;i&is.SignalBased&&(a=e[n][Nm]),a!==null&&a.transformFn!==void 0&&(s=a.transformFn(s)),i&is.HasDecoratorInputTransform&&(s=t.inputTransforms[n].call(e,s)),t.setInput!==null?t.setInput(e,a,s,r,n):lV(e,a,n,s)}finally{vr(o)}}function Bbe(t,e){let r=t.hostBindingOpCodes;if(r!==null)try{for(let n=0;n<r.length;n++){let i=r[n];if(i<0)mh(~i);else{let s=i,o=r[++n],a=r[++n];Ove(o,s);let c=e[s];a(2,c)}}}finally{mh(-1)}}function r_(t,e,r,n,i,s,o,a,c,u,d){let h=e.blueprint.slice();return h[Xl]=i,h[Rt]=n|4|128|8|64,(u!==null||t&&t[Rt]&2048)&&(h[Rt]|=2048),OH(h),h[bs]=h[eg]=t,h[go]=r,h[Yl]=o||t&&t[Yl],h[Vi]=a||t&&t[Vi],h[Gm]=c||t&&t[Gm]||null,h[jo]=s,h[Jy]=lbe(),h[Fy]=d,h[SH]=u,h[oc]=e.type==2?t[oc]:h,h}function sg(t,e,r,n,i){let s=t.data[e];if(s===null)s=Ube(t,e,r,n,i),Nve()&&(s.flags|=32);else if(s.type&64){s.type=r,s.value=n,s.attrs=i;let o=Dve();s.injectorIndex=o===null?-1:o.injectorIndex}return bh(s,!0),s}function Ube(t,e,r,n,i){let s=kH(),o=QS(),a=o?s:s&&s.parent,c=t.data[e]=qbe(t,a,r,e,n,i);return t.firstChild===null&&(t.firstChild=c),s!==null&&(o?s.child==null&&c.parent!==null&&(s.child=c):s.next===null&&(s.next=c,c.prev=s)),c}function JV(t,e,r,n){if(r===0)return-1;let i=e.length;for(let s=0;s<r;s++)e.push(n),t.blueprint.push(n),t.data.push(null);return i}function YV(t,e,r,n,i){let s=tg(),o=n&2;try{mh(-1),o&&e.length>$i&&ZV(t,e,$i,!1),Vc(o?2:0,i),r(n,i)}finally{mh(s),Vc(o?3:1,i)}}function ED(t,e,r){if(ZS(e)){let n=vr(null);try{let i=e.directiveStart,s=e.directiveEnd;for(let o=i;o<s;o++){let a=t.data[o];if(a.contentQueries){let c=r[o];a.contentQueries(1,c,o)}}}finally{vr(n)}}}function _D(t,e,r){MH()&&(Ybe(t,e,r,cc(r,e)),(r.flags&64)===64&&e$(t,e,r))}function CD(t,e,r=cc){let n=e.localNames;if(n!==null){let i=e.index+1;for(let s=0;s<n.length;s+=2){let o=n[s+1],a=o===-1?r(e,t):t[o];t[i++]=a}}}function QV(t){let e=t.tView;return e===null||e.incompleteFirstPass?t.tView=xD(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):e}function xD(t,e,r,n,i,s,o,a,c,u,d){let h=$i+n,m=h+i,w=jbe(h,m),_=typeof u=="function"?u():u;return w[zt]={type:t,blueprint:w,template:r,queries:null,viewQuery:a,declTNode:e,data:w.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:m,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:c,consts:_,incompleteFirstPass:!1,ssrId:d}}function jbe(t,e){let r=[];for(let n=0;n<e;n++)r.push(n<t?null:Df);return r}function Hbe(t,e,r,n){let s=n.get(H2e,AV)||r===qc.ShadowDom,o=t.selectRootElement(e,s);return Vbe(o),o}function Vbe(t){$be(t)}var $be=()=>null;function qbe(t,e,r,n,i,s){let o=e?e.injectorIndex:-1,a=0;return PH()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Xj(t,e,r,n,i){for(let s in e){if(!e.hasOwnProperty(s))continue;let o=e[s];if(o===void 0)continue;n??={};let a,c=is.None;Array.isArray(o)?(a=o[0],c=o[1]):a=o;let u=s;if(i!==null){if(!i.hasOwnProperty(s))continue;u=i[s]}t===0?eH(n,r,u,a,c):eH(n,r,u,a)}return n}function eH(t,e,r,n,i){let s;t.hasOwnProperty(r)?(s=t[r]).push(e,n):s=t[r]=[e,n],i!==void 0&&s.push(i)}function Wbe(t,e,r){let n=e.directiveStart,i=e.directiveEnd,s=t.data,o=e.attrs,a=[],c=null,u=null;for(let d=n;d<i;d++){let h=s[d],m=r?r.get(h):null,w=m?m.inputs:null,_=m?m.outputs:null;c=Xj(0,h.inputs,d,c,w),u=Xj(1,h.outputs,d,u,_);let C=c!==null&&o!==null&&!vH(e)?o3e(c,d,o):null;a.push(C)}c!==null&&(c.hasOwnProperty("class")&&(e.flags|=8),c.hasOwnProperty("style")&&(e.flags|=16)),e.initialInputs=a,e.inputs=c,e.outputs=u}function zbe(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function Gbe(t,e,r,n,i,s,o,a){let c=cc(e,r),u=e.inputs,d;!a&&u!=null&&(d=u[n])?(AD(t,r,d,n,i),BE(e)&&Zbe(r,e.index)):e.type&3?(n=zbe(n),i=o!=null?o(i,e.value||"",n):i,s.setProperty(c,n,i)):e.type&12}function Zbe(t,e){let r=Wc(e,t);r[Rt]&16||(r[Rt]|=64)}function ID(t,e,r,n){if(MH()){let i=n===null?null:{"":-1},s=Xbe(t,r),o,a;s===null?o=a=null:[o,a]=s,o!==null&&XV(t,e,r,o,i,a),i&&e3e(r,n,i)}r.mergedAttrs=zS(r.mergedAttrs,r.attrs)}function XV(t,e,r,n,i,s){for(let u=0;u<n.length;u++)P2e(yV(r,e),t,n[u].type);r3e(r,t.data.length,n.length);for(let u=0;u<n.length;u++){let d=n[u];d.providersResolver&&d.providersResolver(d)}let o=!1,a=!1,c=JV(t,e,n.length,null);for(let u=0;u<n.length;u++){let d=n[u];r.mergedAttrs=zS(r.mergedAttrs,d.hostAttrs),n3e(t,r,e,c,d),t3e(c,d,i),d.contentQueries!==null&&(r.flags|=4),(d.hostBindings!==null||d.hostAttrs!==null||d.hostVars!==0)&&(r.flags|=64);let h=d.type.prototype;!o&&(h.ngOnChanges||h.ngOnInit||h.ngDoCheck)&&((t.preOrderHooks??=[]).push(r.index),o=!0),!a&&(h.ngOnChanges||h.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(r.index),a=!0),c++}Wbe(t,r,s)}function Kbe(t,e,r,n,i){let s=i.hostBindings;if(s){let o=t.hostBindingOpCodes;o===null&&(o=t.hostBindingOpCodes=[]);let a=~e.index;Jbe(o)!=a&&o.push(a),o.push(r,n,s)}}function Jbe(t){let e=t.length;for(;e>0;){let r=t[--e];if(typeof r=="number"&&r<0)return r}return 0}function Ybe(t,e,r,n){let i=r.directiveStart,s=r.directiveEnd;BE(r)&&i3e(e,r,t.data[i+r.componentOffset]),t.firstCreatePass||yV(r,e),wa(n,e);let o=r.initialInputs;for(let a=i;a<s;a++){let c=t.data[a],u=Wy(e,t,a,r);if(wa(u,e),o!==null&&s3e(e,a-i,u,c,r,o),Yy(c)){let d=Wc(r.index,e);d[go]=Wy(e,t,a,r)}}}function e$(t,e,r){let n=r.directiveStart,i=r.directiveEnd,s=r.index,o=Mve();try{mh(s);for(let a=n;a<i;a++){let c=t.data[a],u=e[a];iS(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&Qbe(c,u)}}finally{mh(-1),iS(o)}}function Qbe(t,e){t.hostBindings!==null&&t.hostBindings(1,e)}function Xbe(t,e){let r=t.directiveRegistry,n=null,i=null;if(r)for(let s=0;s<r.length;s++){let o=r[s];if(bH(e,o.selectors,!1))if(n||(n=[]),Yy(o))if(o.findHostDirectiveDefs!==null){let a=[];i=i||new Map,o.findHostDirectiveDefs(o,a,i),n.unshift(...a,o);let c=a.length;_S(t,e,c)}else n.unshift(o),_S(t,e,0);else i=i||new Map,o.findHostDirectiveDefs?.(o,n,i),n.push(o)}return n===null?null:[n,i]}function _S(t,e,r){e.componentOffset=r,(t.components??=[]).push(e.index)}function e3e(t,e,r){if(e){let n=t.localNames=[];for(let i=0;i<e.length;i+=2){let s=r[e[i+1]];if(s==null)throw new gt(-301,!1);n.push(e[i],s)}}}function t3e(t,e,r){if(r){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)r[e.exportAs[n]]=t;Yy(e)&&(r[""]=t)}}function r3e(t,e,r){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+r,t.providerIndexes=e}function n3e(t,e,r,n,i){t.data[n]=i;let s=i.factory||(i.factory=gh(i.type,!0)),o=new qy(s,Yy(i),Mr);t.blueprint[n]=o,r[n]=o,Kbe(t,e,n,JV(t,r,i.hostVars,Df),i)}function i3e(t,e,r){let n=cc(e,t),i=QV(r),s=t[Yl].rendererFactory,o=16;r.signals?o=4096:r.onPush&&(o=64);let a=n_(t,r_(t,i,null,o,n,e,null,s.createRenderer(n,r),null,null,null));t[e.index]=a}function s3e(t,e,r,n,i,s){let o=s[e];if(o!==null)for(let a=0;a<o.length;){let c=o[a++],u=o[a++],d=o[a++],h=o[a++];KV(n,r,c,u,d,h)}}function o3e(t,e,r){let n=null,i=0;for(;i<r.length;){let s=r[i];if(s===0){i+=4;continue}else if(s===5){i+=2;continue}if(typeof s=="number")break;if(t.hasOwnProperty(s)){n===null&&(n=[]);let o=t[s];for(let a=0;a<o.length;a+=3)if(o[a]===e){n.push(s,o[a+1],o[a+2],r[i+1]);break}}i+=2}return n}function t$(t,e,r,n){return[t,!0,0,e,null,n,null,r,null,null]}function r$(t,e){let r=t.contentQueries;if(r!==null){let n=vr(null);try{for(let i=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o!==-1){let a=t.data[o];LH(s),a.contentQueries(2,e[o],o)}}}finally{vr(n)}}}function n_(t,e){return t[Uy]?t[kj][sc]=e:t[Uy]=e,t[kj]=e,e}function CS(t,e,r){LH(0);let n=vr(null);try{e(t,r)}finally{vr(n)}}function a3e(t){return t[By]||(t[By]=[])}function c3e(t){return t.cleanup||(t.cleanup=[])}function n$(t,e){let r=t[Gm],n=r?r.get(Ql,null):null;n&&n.handleError(e)}function AD(t,e,r,n,i){for(let s=0;s<r.length;){let o=r[s++],a=r[s++],c=r[s++],u=e[o],d=t.data[o];KV(d,u,n,a,c,i)}}function l3e(t,e,r){let n=TH(e,t);vbe(t[Vi],n,r)}function u3e(t,e){let r=Wc(e,t),n=r[zt];f3e(n,r);let i=r[Xl];i!==null&&r[Fy]===null&&(r[Fy]=lD(i,r[Gm])),SD(n,r,r[go])}function f3e(t,e){for(let r=e.length;r<t.blueprint.length;r++)e.push(t.blueprint[r])}function SD(t,e,r){tD(e);try{let n=t.viewQuery;n!==null&&CS(1,n,r);let i=t.template;i!==null&&YV(t,e,i,1,r),t.firstCreatePass&&(t.firstCreatePass=!1),e[Zm]?.finishViewCreation(t),t.staticContentQueries&&r$(t,e),t.staticViewQueries&&CS(2,t.viewQuery,r);let s=t.components;s!==null&&d3e(e,s)}catch(n){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),n}finally{e[Rt]&=-5,rD()}}function d3e(t,e){for(let r=0;r<e.length;r++)u3e(t,e[r])}function i$(t,e,r,n){let i=vr(null);try{let s=e.tView,a=t[Rt]&4096?4096:16,c=r_(t,s,r,a,null,e,null,null,null,n?.injector??null,n?.dehydratedView??null),u=t[e.index];c[FE]=u;let d=t[Zm];return d!==null&&(c[Zm]=d.createEmbeddedView(s)),SD(s,c,r),c}finally{vr(i)}}function h3e(t,e){let r=Bo+e;if(r<t.length)return t[r]}function xS(t,e){return!e||e.firstChild===null||WH(t)}function s$(t,e,r,n=!0){let i=e[zt];if(xbe(i,e,t,r),n){let o=ES(r,t),a=e[Vi],c=vD(a,t[ph]);c!==null&&_be(i,t[jo],a,e,c,o)}let s=e[Fy];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function p3e(t,e){let r=IE(t,e);return r!==void 0&&wD(r[zt],r),r}function SE(t,e,r,n,i=!1){for(;r!==null;){let s=e[r.index];s!==null&&n.push(Uo(s)),eu(s)&&m3e(s,n);let o=r.type;if(o&8)SE(t,e,r.child,n);else if(o&32){let a=yD(r,e),c;for(;c=a();)n.push(c)}else if(o&16){let a=qV(e,r);if(Array.isArray(a))n.push(...a);else{let c=Hy(e[oc]);SE(c[zt],c,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function m3e(t,e){for(let r=Bo;r<t.length;r++){let n=t[r],i=n[zt].firstChild;i!==null&&SE(n[zt],n,i,e)}t[ph]!==t[Xl]&&e.push(t[ph])}var o$=[];function g3e(t){return t[hh]??y3e(t)}function y3e(t){let e=o$.pop()??Object.create(v3e);return e.lView=t,e}function w3e(t){t.lView[hh]!==t&&(t.lView=null,o$.push(t))}var v3e=_e(B({},pA),{consumerIsAlwaysLive:!0,consumerMarkedDirty:t=>{jy(t.lView)},consumerOnSignalRead(){this.lView[hh]=this}});function a$(t){return l$(t[Uy])}function c$(t){return l$(t[sc])}function l$(t){for(;t!==null&&!eu(t);)t=t[sc];return t}var u$=100;function f$(t,e=!0,r=0){let n=t[Yl],i=n.rendererFactory,s=!1;s||i.begin?.();try{b3e(t,r)}catch(o){throw e&&n$(t,o),o}finally{s||(i.end?.(),n.inlineEffectRunner?.flush())}}function b3e(t,e){IS(t,e);let r=0;for(;YS(t);){if(r===u$)throw new gt(103,!1);r++,IS(t,1)}}function E3e(t,e,r,n){let i=e[Rt];if((i&256)===256)return;let s=!1;!s&&e[Yl].inlineEffectRunner?.flush(),tD(e);let o=null,a=null;!s&&_3e(t)&&(a=g3e(e),o=NU(a));try{OH(e),Rve(t.bindingStartIndex),r!==null&&YV(t,e,r,2,n);let c=(i&3)===3;if(!s)if(c){let h=t.preOrderCheckHooks;h!==null&&fE(e,h,null)}else{let h=t.preOrderHooks;h!==null&&dE(e,h,0,null),qA(e,0)}if(C3e(e),d$(e,0),t.contentQueries!==null&&r$(t,e),!s)if(c){let h=t.contentCheckHooks;h!==null&&fE(e,h)}else{let h=t.contentHooks;h!==null&&dE(e,h,1),qA(e,1)}Bbe(t,e);let u=t.components;u!==null&&p$(e,u,0);let d=t.viewQuery;if(d!==null&&CS(2,d,n),!s)if(c){let h=t.viewCheckHooks;h!==null&&fE(e,h)}else{let h=t.viewHooks;h!==null&&dE(e,h,2),qA(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[HA]){for(let h of e[HA])h();e[HA]=null}s||(e[Rt]&=-73)}catch(c){throw jy(e),c}finally{a!==null&&(OU(a,o),w3e(a)),rD()}}function _3e(t){return t.type!==2}function d$(t,e){for(let r=a$(t);r!==null;r=c$(r))for(let n=Bo;n<r.length;n++){let i=r[n];h$(i,e)}}function C3e(t){for(let e=a$(t);e!==null;e=c$(e)){if(!(e[Rt]&GS.HasTransplantedViews))continue;let r=e[yE];for(let n=0;n<r.length;n++){let i=r[n],s=i[bs];bve(i)}}}function x3e(t,e,r){let n=Wc(e,t);h$(n,r)}function h$(t,e){JS(t)&&IS(t,e)}function IS(t,e){let n=t[zt],i=t[Rt],s=t[hh],o=!!(e===0&&i&16);if(o||=!!(i&64&&e===0),o||=!!(i&1024),o||=!!(s?.dirty&&mA(s)),s&&(s.dirty=!1),t[Rt]&=-9217,o)E3e(n,t,n.template,t[go]);else if(i&8192){d$(t,1);let a=n.components;a!==null&&p$(t,a,1)}}function p$(t,e,r){for(let n=0;n<e.length;n++)x3e(t,e[n],r)}function DD(t){for(t[Yl].changeDetectionScheduler?.notify();t;){t[Rt]|=64;let e=Hy(t);if(mve(t)&&!e)return t;t=e}return null}var yh=class{get rootNodes(){let e=this._lView,r=e[zt];return SE(r,e,r.firstChild,[])}constructor(e,r,n=!0){this._lView=e,this._cdRefInjectingView=r,this.notifyErrorHandler=n,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[go]}set context(e){this._lView[go]=e}get destroyed(){return(this._lView[Rt]&256)===256}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[bs];if(eu(e)){let r=e[gE],n=r?r.indexOf(this):-1;n>-1&&(IE(e,n),wE(r,n))}this._attachedToViewContainer=!1}wD(this._lView[zt],this._lView)}onDestroy(e){_ve(this._lView,e)}markForCheck(){DD(this._cdRefInjectingView||this._lView)}detach(){this._lView[Rt]&=-129}reattach(){nS(this._lView),this._lView[Rt]|=128}detectChanges(){this._lView[Rt]|=1024,f$(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new gt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,UV(this._lView[zt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new gt(902,!1);this._appRef=e,nS(this._lView)}},og=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=S3e;let t=e;return t})(),I3e=og,A3e=class extends I3e{constructor(e,r,n){super(),this._declarationLView=e,this._declarationTContainer=r,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,n){let i=i$(this._declarationLView,this._declarationTContainer,e,{injector:r,dehydratedView:n});return new yh(i)}};function S3e(){return D3e(ba(),Hr())}function D3e(t,e){return t.type&4?new A3e(e,t,$E(t,e)):null}var Aot=new RegExp(`^(\\d+)*(${a2e}|${o2e})*(.*)`);var R3e=()=>null;function AS(t,e){return R3e(t,e)}var SS=class{},DS=class{},DE=class{};function T3e(t){let e=Error(`No component factory found for ${Ws(t)}.`);return e[N3e]=t,e}var N3e="ngComponent";var RS=class{resolveComponentFactory(e){throw T3e(e)}},i_=(()=>{let e=class e{};e.NULL=new RS;let t=e;return t})(),zy=class{},Eh=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>O3e();let t=e;return t})();function O3e(){let t=Hr(),e=ba(),r=Wc(e.index,t);return(_f(r)?r:t)[Vi]}var M3e=(()=>{let e=class e{};e.\u0275prov=Xe({token:e,providedIn:"root",factory:()=>null});let t=e;return t})(),KA={};var tH=new Set;function ag(t){tH.has(t)||(tH.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}function rH(...t){}function P3e(){let t=typeof ic.requestAnimationFrame=="function",e=ic[t?"requestAnimationFrame":"setTimeout"],r=ic[t?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&e&&r){let n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);let i=r[Zone.__symbol__("OriginalDelegate")];i&&(r=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:r}}var oi=class t{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new nc(!1),this.onMicrotaskEmpty=new nc(!1),this.onStable=new nc(!1),this.onError=new nc(!1),typeof Zone>"u")throw new gt(908,!1);Zone.assertZonePatched();let i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!n&&r,i.shouldCoalesceRunChangeDetection=n,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=P3e().nativeRequestAnimationFrame,F3e(i)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new gt(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new gt(909,!1)}run(e,r,n){return this._inner.run(e,r,n)}runTask(e,r,n,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,e,k3e,rH,rH);try{return s.runTask(o,r,n)}finally{s.cancelTask(o)}}runGuarded(e,r,n){return this._inner.runGuarded(e,r,n)}runOutsideAngular(e){return this._outer.run(e)}},k3e={};function RD(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function L3e(t){t.isCheckStableRunning||t.lastRequestAnimationFrameId!==-1||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(ic,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,TS(t),t.isCheckStableRunning=!0,RD(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),TS(t))}function F3e(t){let e=()=>{L3e(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,n,i,s,o,a)=>{if(B3e(a))return r.invokeTask(i,s,o,a);try{return nH(t),r.invokeTask(i,s,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),iH(t)}},onInvoke:(r,n,i,s,o,a,c)=>{try{return nH(t),r.invoke(i,s,o,a,c)}finally{t.shouldCoalesceRunChangeDetection&&e(),iH(t)}},onHasTask:(r,n,i,s)=>{r.hasTask(i,s),n===i&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,TS(t),RD(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,n,i,s)=>(r.handleError(i,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function TS(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.lastRequestAnimationFrameId!==-1?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function nH(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function iH(t){t._nesting--,RD(t)}function B3e(t){return!Array.isArray(t)||t.length!==1?!1:t[0].data?.__ignore_ng_zone__===!0}var m$=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let i of n)i()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=Xe({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();function RE(t,e,r){let n=r?t.styles:null,i=r?t.classes:null,s=0;if(e!==null)for(let o=0;o<e.length;o++){let a=e[o];if(typeof a=="number")s=a;else if(s==1)i=Rj(i,a);else if(s==2){let c=a,u=e[++o];n=Rj(n,c+": "+u+";")}}r?t.styles=n:t.stylesWithoutHost=n,r?t.classes=i:t.classesWithoutHost=i}var TE=class extends i_{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let r=Cf(e);return new Ym(r,this.ngModule)}};function sH(t){let e=[];for(let r in t){if(!t.hasOwnProperty(r))continue;let n=t[r];n!==void 0&&e.push({propName:Array.isArray(n)?n[0]:n,templateName:r})}return e}function U3e(t){let e=t.toLowerCase();return e==="svg"?RH:e==="math"?gve:null}var NS=class{constructor(e,r){this.injector=e,this.parentInjector=r}get(e,r,n){n=zE(n);let i=this.injector.get(e,KA,n);return i!==KA||r===KA?i:this.parentInjector.get(e,r,n)}},Ym=class extends DE{get inputs(){let e=this.componentDef,r=e.inputTransforms,n=sH(e.inputs);if(r!==null)for(let i of n)r.hasOwnProperty(i.propName)&&(i.transform=r[i.propName]);return n}get outputs(){return sH(this.componentDef.outputs)}constructor(e,r){super(),this.componentDef=e,this.ngModule=r,this.componentType=e.type,this.selector=uve(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!r}create(e,r,n,i){let s=vr(null);try{i=i||this.ngModule;let o=i instanceof Es?i:i?.injector;o&&this.componentDef.getStandaloneInjector!==null&&(o=this.componentDef.getStandaloneInjector(o)||o);let a=o?new NS(e,o):e,c=a.get(zy,null);if(c===null)throw new gt(407,!1);let u=a.get(M3e,null),d=a.get(m$,null),h=a.get(SS,null),m={rendererFactory:c,sanitizer:u,inlineEffectRunner:null,afterRenderEventManager:d,changeDetectionScheduler:h},w=c.createRenderer(null,this.componentDef),_=this.componentDef.selectors[0][0]||"div",C=n?Hbe(w,n,this.componentDef.encapsulation,a):BV(w,_,U3e(_)),A=512;this.componentDef.signals?A|=4096:this.componentDef.onPush||(A|=16);let R=null;C!==null&&(R=lD(C,a,!0));let L=xD(0,null,null,1,0,null,null,null,null,null,null),U=r_(null,L,null,A,null,null,m,w,a,null,R);tD(U);let V,Q;try{let Y=this.componentDef,k,q=null;Y.findHostDirectiveDefs?(k=[],q=new Map,Y.findHostDirectiveDefs(Y,k,q),k.push(Y)):k=[Y];let ie=j3e(U,C),W=H3e(ie,C,Y,k,U,m,w);Q=KS(L,$i),C&&q3e(w,Y,C,n),r!==void 0&&W3e(Q,this.ngContentSelectors,r),V=$3e(W,Y,k,q,U,[z3e]),SD(L,U,null)}finally{rD()}return new OS(this.componentType,V,$E(Q,U),U,Q)}finally{vr(s)}}},OS=class extends DS{constructor(e,r,n,i,s){super(),this.location=n,this._rootLView=i,this._tNode=s,this.previousInputValues=null,this.instance=r,this.hostView=this.changeDetectorRef=new yh(i,void 0,!1),this.componentType=e}setInput(e,r){let n=this._tNode.inputs,i;if(n!==null&&(i=n[e])){if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),r))return;let s=this._rootLView;AD(s[zt],s,i,e,r),this.previousInputValues.set(e,r);let o=Wc(this._tNode.index,s);DD(o)}}get injector(){return new dh(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function j3e(t,e){let r=t[zt],n=$i;return t[n]=e,sg(r,n,2,"#host",null)}function H3e(t,e,r,n,i,s,o){let a=i[zt];V3e(n,t,e,o);let c=null;e!==null&&(c=lD(e,i[Gm]));let u=s.rendererFactory.createRenderer(e,r),d=16;r.signals?d=4096:r.onPush&&(d=64);let h=r_(i,QV(r),null,d,i[t.index],t,s,u,null,null,c);return a.firstCreatePass&&_S(a,t,n.length-1),n_(i,h),i[t.index]=h}function V3e(t,e,r,n){for(let i of t)e.mergedAttrs=zS(e.mergedAttrs,i.hostAttrs);e.mergedAttrs!==null&&(RE(e,e.mergedAttrs,!0),r!==null&&GV(n,r,e))}function $3e(t,e,r,n,i,s){let o=ba(),a=i[zt],c=cc(o,i);XV(a,i,o,r,null,n);for(let d=0;d<r.length;d++){let h=o.directiveStart+d,m=Wy(i,a,h,o);wa(m,i)}e$(a,i,o),c&&wa(c,i);let u=Wy(i,a,o.directiveStart+o.componentOffset,o);if(t[go]=i[go]=u,s!==null)for(let d of s)d(u,e);return ED(a,o,i),u}function q3e(t,e,r,n){if(n)rS(t,r,["ng-version","17.2.4"]);else{let{attrs:i,classes:s}=fve(e.selectors[0]);i&&rS(t,r,i),s&&s.length>0&&zV(t,r,s.join(" "))}}function W3e(t,e,r){let n=t.projection=[];for(let i=0;i<e.length;i++){let s=r[i];n.push(s!=null?Array.from(s):null)}}function z3e(){let t=ba();JE(Hr()[zt],t)}var Rf=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=G3e;let t=e;return t})();function G3e(){let t=ba();return K3e(t,Hr())}var Z3e=Rf,g$=class extends Z3e{constructor(e,r,n){super(),this._lContainer=e,this._hostTNode=r,this._hostLView=n}get element(){return $E(this._hostTNode,this._hostLView)}get injector(){return new dh(this._hostTNode,this._hostLView)}get parentInjector(){let e=dD(this._hostTNode,this._hostLView);if(pV(e)){let r=_E(e,this._hostLView),n=EE(e),i=r[zt].data[n+8];return new dh(i,r)}else return new dh(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let r=oH(this._lContainer);return r!==null&&r[e]||null}get length(){return this._lContainer.length-Bo}createEmbeddedView(e,r,n){let i,s;typeof n=="number"?i=n:n!=null&&(i=n.index,s=n.injector);let o=AS(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(r||{},s,o);return this.insertImpl(a,i,xS(this._hostTNode,o)),a}createComponent(e,r,n,i,s){let o=e&&!E2e(e),a;if(o)a=r;else{let _=r||{};a=_.index,n=_.injector,i=_.projectableNodes,s=_.environmentInjector||_.ngModuleRef}let c=o?e:new Ym(Cf(e)),u=n||this.parentInjector;if(!s&&c.ngModule==null){let C=(o?u:this.parentInjector).get(Es,null);C&&(s=C)}let d=Cf(c.componentType??{}),h=AS(this._lContainer,d?.id??null),m=h?.firstChild??null,w=c.create(u,i,m,s);return this.insertImpl(w.hostView,a,xS(this._hostTNode,h)),w}insert(e,r){return this.insertImpl(e,r,!0)}insertImpl(e,r,n){let i=e._lView;if(vve(i)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let c=i[bs],u=new g$(c,c[jo],c[bs]);u.detach(u.indexOf(e))}}let s=this._adjustIndex(r),o=this._lContainer;return s$(o,i,s,n),e.attachToViewContainerRef(),qH(JA(o),s,e),e}move(e,r){return this.insert(e,r)}indexOf(e){let r=oH(this._lContainer);return r!==null?r.indexOf(e):-1}remove(e){let r=this._adjustIndex(e,-1),n=IE(this._lContainer,r);n&&(wE(JA(this._lContainer),r),wD(n[zt],n))}detach(e){let r=this._adjustIndex(e,-1),n=IE(this._lContainer,r);return n&&wE(JA(this._lContainer),r)!=null?new yh(n):null}_adjustIndex(e,r=0){return e??this.length+r}};function oH(t){return t[gE]}function JA(t){return t[gE]||(t[gE]=[])}function K3e(t,e){let r,n=e[t.index];return eu(n)?r=n:(r=t$(n,e,null,t),e[t.index]=r,n_(e,r)),Y3e(r,e,t,n),new g$(r,t,e)}function J3e(t,e){let r=t[Vi],n=r.createComment(""),i=cc(e,t),s=vD(r,i);return AE(r,s,n,Tbe(r,i),!1),n}var Y3e=eEe,Q3e=()=>!1;function X3e(t,e,r){return Q3e(t,e,r)}function eEe(t,e,r,n){if(t[ph])return;let i;r.type&8?i=Uo(n):i=J3e(e,r),t[ph]=i}function Zc(t,e){ag("NgSignals");let r=UU(t),n=r[Nm];return e?.equal&&(n.equal=e.equal),r.set=i=>gA(n,i),r.update=i=>jU(n,i),r.asReadonly=tEe.bind(r),r}function tEe(){let t=this[Nm];if(t.readonlyFn===void 0){let e=()=>this();e[Nm]=t,t.readonlyFn=e}return t.readonlyFn}function TD(t){let e=t.inputConfig,r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];Array.isArray(i)&&i[3]&&(r[n]=i[3])}t.inputTransforms=r}var xf=class{},Gy=class{};var MS=class extends xf{constructor(e,r,n){super(),this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new TE(this);let i=xH(e);this._bootstrapComponents=FV(i.bootstrap),this._r3Injector=xV(e,r,[{provide:xf,useValue:this},{provide:i_,useValue:this.componentFactoryResolver},...n],Ws(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},PS=class extends Gy{constructor(e){super(),this.moduleType=e}create(e){return new MS(this.moduleType,e,[])}};var NE=class extends xf{constructor(e){super(),this.componentFactoryResolver=new TE(this),this.instance=null;let r=new $y([...e.providers,{provide:xf,useValue:this},{provide:i_,useValue:this.componentFactoryResolver}],e.parent||KE(),e.debugName,new Set(["environment"]));this.injector=r,e.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ND(t,e,r=null){return new NE({providers:t,parent:e,debugName:r,runEnvironmentInitializers:!0}).injector}var cg=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Oi(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function y$(t){return OD(t)?Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t:!1}function rEe(t,e){if(Array.isArray(t))for(let r=0;r<t.length;r++)e(t[r]);else{let r=t[Symbol.iterator](),n;for(;!(n=r.next()).done;)e(n.value)}}function OD(t){return t!==null&&(typeof t=="function"||typeof t=="object")}function MD(t,e,r){return t[e]=r}function nEe(t,e){return t[e]}function wh(t,e,r){let n=t[e];return Object.is(n,r)?!1:(t[e]=r,!0)}function iEe(t,e,r,n){let i=wh(t,e,r);return wh(t,e+1,n)||i}function sEe(t,e,r,n,i,s,o,a,c){let u=e.consts,d=sg(e,t,4,o||null,Km(u,a));ID(e,r,d,Km(u,c)),JE(e,d);let h=d.tView=xD(2,d,n,i,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,u,null);return e.queries!==null&&(e.queries.template(e,d),h.queries=e.queries.embeddedTView(d)),d}function _s(t,e,r,n,i,s,o,a){let c=Hr(),u=va(),d=t+$i,h=u.firstCreatePass?sEe(d,u,c,e,r,n,i,s,o):u.data[d];bh(h,!1);let m=oEe(u,c,h,t);HE()&&e_(u,c,m,h),wa(m,c);let w=t$(m,c,m,h);return c[d]=w,n_(c,w),X3e(w,h,c),UE(h)&&_D(u,c,h),o!=null&&CD(c,h,a),_s}var oEe=aEe;function aEe(t,e,r,n){return VE(!0),e[Vi].createComment("")}function cEe(t,e,r,n){return wh(t,eD(),r)?e+WE(r)+n:Df}function lE(t,e){return t<<17|e<<2}function vh(t){return t>>17&32767}function lEe(t){return(t&2)==2}function uEe(t,e){return t&131071|e<<17}function kS(t){return t|2}function Qm(t){return(t&131068)>>2}function YA(t,e){return t&-131069|e<<2}function fEe(t){return(t&1)===1}function LS(t){return t|1}function dEe(t,e,r,n,i,s){let o=s?e.classBindings:e.styleBindings,a=vh(o),c=Qm(o);t[n]=r;let u=!1,d;if(Array.isArray(r)){let h=r;d=h[1],(d===null||Qy(h,d)>0)&&(u=!0)}else d=r;if(i)if(c!==0){let m=vh(t[a+1]);t[n+1]=lE(m,a),m!==0&&(t[m+1]=YA(t[m+1],n)),t[a+1]=uEe(t[a+1],n)}else t[n+1]=lE(a,0),a!==0&&(t[a+1]=YA(t[a+1],n)),a=n;else t[n+1]=lE(c,0),a===0?a=n:t[c+1]=YA(t[c+1],n),c=n;u&&(t[n+1]=kS(t[n+1])),aH(t,d,n,!0),aH(t,d,n,!1),hEe(e,d,t,n,s),o=lE(a,c),s?e.classBindings=o:e.styleBindings=o}function hEe(t,e,r,n,i){let s=i?t.residualClasses:t.residualStyles;s!=null&&typeof e=="string"&&Qy(s,e)>=0&&(r[n+1]=LS(r[n+1]))}function aH(t,e,r,n){let i=t[r+1],s=e===null,o=n?vh(i):Qm(i),a=!1;for(;o!==0&&(a===!1||s);){let c=t[o],u=t[o+1];pEe(c,e)&&(a=!0,t[o+1]=n?LS(u):kS(u)),o=n?vh(u):Qm(u)}a&&(t[r+1]=n?kS(i):LS(i))}function pEe(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?Qy(t,e)>=0:!1}function Ht(t,e,r){let n=Hr(),i=eD();if(wh(n,i,e)){let s=va(),o=Fve();Gbe(s,o,n,t,e,n[Vi],r,!1)}return Ht}function cH(t,e,r,n,i){let s=e.inputs,o=i?"class":"style";AD(t,r,s[o],o,n)}function PD(t,e,r){return mEe(t,e,r,!1),PD}function mEe(t,e,r,n){let i=Hr(),s=va(),o=Tve(2);if(s.firstUpdatePass&&yEe(s,t,o,n),e!==Df&&wh(i,o,e)){let a=s.data[tg()];_Ee(s,a,i,i[Vi],t,i[o+1]=CEe(e,r),n,o)}}function gEe(t,e){return e>=t.expandoStartIndex}function yEe(t,e,r,n){let i=t.data;if(i[r+1]===null){let s=i[tg()],o=gEe(t,r);xEe(s,n)&&e===null&&!o&&(e=!1),e=wEe(i,s,e,n),dEe(i,s,e,r,o,n)}}function wEe(t,e,r,n){let i=Pve(t),s=n?e.residualClasses:e.residualStyles;if(i===null)(n?e.classBindings:e.styleBindings)===0&&(r=QA(null,t,e,r,n),r=Zy(r,e.attrs,n),s=null);else{let o=e.directiveStylingLast;if(o===-1||t[o]!==i)if(r=QA(i,t,e,r,n),s===null){let c=vEe(t,e,n);c!==void 0&&Array.isArray(c)&&(c=QA(null,t,e,c[1],n),c=Zy(c,e.attrs,n),bEe(t,e,n,c))}else s=EEe(t,e,n)}return s!==void 0&&(n?e.residualClasses=s:e.residualStyles=s),r}function vEe(t,e,r){let n=r?e.classBindings:e.styleBindings;if(Qm(n)!==0)return t[vh(n)]}function bEe(t,e,r,n){let i=r?e.classBindings:e.styleBindings;t[vh(i)]=n}function EEe(t,e,r){let n,i=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<i;s++){let o=t[s].hostAttrs;n=Zy(n,o,r)}return Zy(n,e.attrs,r)}function QA(t,e,r,n,i){let s=null,o=r.directiveEnd,a=r.directiveStylingLast;for(a===-1?a=r.directiveStart:a++;a<o&&(s=e[a],n=Zy(n,s.hostAttrs,i),s!==t);)a++;return t!==null&&(r.directiveStylingLast=a),n}function Zy(t,e,r){let n=r?1:2,i=-1;if(e!==null)for(let s=0;s<e.length;s++){let o=e[s];typeof o=="number"?i=o:i===n&&(Array.isArray(t)||(t=t===void 0?[]:["",t]),$ve(t,o,r?!0:e[++s]))}return t===void 0?null:t}function _Ee(t,e,r,n,i,s,o,a){if(!(e.type&3))return;let c=t.data,u=c[a+1],d=fEe(u)?lH(c,e,r,i,Qm(u),o):void 0;if(!OE(d)){OE(s)||lEe(u)&&(s=lH(c,null,r,i,a,o));let h=TH(tg(),r);Lbe(n,o,h,i,s)}}function lH(t,e,r,n,i,s){let o=e===null,a;for(;i>0;){let c=t[i],u=Array.isArray(c),d=u?c[1]:c,h=d===null,m=r[i+1];m===Df&&(m=h?ga:void 0);let w=h?VA(m,n):d===n?m:void 0;if(u&&!OE(w)&&(w=VA(c,n)),OE(w)&&(a=w,o))return a;let _=t[i+1];i=o?vh(_):Qm(_)}if(e!==null){let c=s?e.residualClasses:e.residualStyles;c!=null&&(a=VA(c,n))}return a}function OE(t){return t!==void 0}function CEe(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=Ws(ig(t)))),t}function xEe(t,e){return(t.flags&(e?8:16))!==0}function s_(t,e,r){ag("NgControlFlow");let n=Hr(),i=eD(),s=IEe(n,$i+t),o=0;if(wh(n,i,e)){let a=vr(null);try{if(p3e(s,o),e!==-1){let c=AEe(n[zt],$i+e),u=AS(s,c.tView.ssrId),d=i$(n,c,r,{dehydratedView:u});s$(s,d,o,xS(c,u))}}finally{vr(a)}}else{let a=h3e(s,o);a!==void 0&&(a[go]=r)}}function IEe(t,e){return t[e]}function AEe(t,e){return KS(t,e)}function SEe(t,e,r,n,i,s){let o=e.consts,a=Km(o,i),c=sg(e,t,2,n,a);return ID(e,r,c,Km(o,s)),c.attrs!==null&&RE(c,c.attrs,!1),c.mergedAttrs!==null&&RE(c,c.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,c),c}function we(t,e,r,n){let i=Hr(),s=va(),o=$i+t,a=i[Vi],c=s.firstCreatePass?SEe(o,s,i,e,r,n):s.data[o],u=DEe(s,i,c,a,e,t);i[o]=u;let d=UE(c);return bh(c,!0),GV(a,u,c),(c.flags&32)!==32&&HE()&&e_(s,i,u,c),Cve()===0&&wa(u,i),xve(),d&&(_D(s,i,c),ED(s,c,i)),n!==null&&CD(i,c),we}function ve(){let t=ba();QS()?XS():(t=t.parent,bh(t,!1));let e=t;Ave(e)&&Sve(),Ive();let r=va();return r.firstCreatePass&&(JE(r,t),ZS(t)&&r.queries.elementEnd(t)),e.classesWithoutHost!=null&&D2e(e)&&cH(r,e,Hr(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&R2e(e)&&cH(r,e,Hr(),e.stylesWithoutHost,!1),ve}function rt(t,e,r,n){return we(t,e,r,n),ve(),rt}var DEe=(t,e,r,n,i,s)=>(VE(!0),BV(n,i,Uve()));function REe(t,e,r,n,i){let s=e.consts,o=Km(s,n),a=sg(e,t,8,"ng-container",o);o!==null&&RE(a,o,!0);let c=Km(s,i);return ID(e,r,a,c),e.queries!==null&&e.queries.elementStart(e,a),a}function kD(t,e,r){let n=Hr(),i=va(),s=t+$i,o=i.firstCreatePass?REe(s,i,n,e,r):i.data[s];bh(o,!0);let a=TEe(i,n,o,t);return n[s]=a,HE()&&e_(i,n,a,o),wa(a,n),UE(o)&&(_D(i,n,o),ED(i,o,n)),r!=null&&CD(n,o),kD}function LD(){let t=ba(),e=va();return QS()?XS():(t=t.parent,bh(t,!1)),e.firstCreatePass&&(JE(e,t),ZS(t)&&e.queries.elementEnd(t)),LD}var TEe=(t,e,r,n)=>(VE(!0),bbe(e[Vi],""));function Tf(){return Hr()}var ME="en-US";var NEe=ME;function OEe(t){typeof t=="string"&&(NEe=t.toLowerCase().replace(/_/g,"-"))}function zn(t,e,r,n){let i=Hr(),s=va(),o=ba();return PEe(s,i,i[Vi],o,t,e,n),zn}function MEe(t,e,r,n){let i=t.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===r&&i[s+1]===n){let a=e[By],c=i[s+2];return a.length>c?a[c]:null}typeof o=="string"&&(s+=2)}return null}function PEe(t,e,r,n,i,s,o){let a=UE(n),u=t.firstCreatePass&&c3e(t),d=e[go],h=a3e(e),m=!0;if(n.type&3||o){let C=cc(n,e),A=o?o(C):C,R=h.length,L=o?V=>o(Uo(V[n.index])):n.index,U=null;if(!o&&a&&(U=MEe(t,e,i,n.index)),U!==null){let V=U.__ngLastListenerFn__||U;V.__ngNextListenerFn__=s,U.__ngLastListenerFn__=s,m=!1}else{s=fH(n,e,d,s,!1);let V=r.listen(A,i,s);h.push(s,V),u&&u.push(i,L,R,R+1)}}else s=fH(n,e,d,s,!1);let w=n.outputs,_;if(m&&w!==null&&(_=w[i])){let C=_.length;if(C)for(let A=0;A<C;A+=2){let R=_[A],L=_[A+1],Q=e[R][L].subscribe(s),Y=h.length;if(h.push(s,Q),u){let k=typeof Q=="function"?Y+1:-(Y+1);u.push(i,n.index,Y,k)}}}}function uH(t,e,r,n){let i=vr(null);try{return Vc(6,e,r),r(n)!==!1}catch(s){return n$(t,s),!1}finally{Vc(7,e,r),vr(i)}}function fH(t,e,r,n,i){return function s(o){if(o===Function)return n;let a=t.componentOffset>-1?Wc(t.index,e):e;DD(a);let c=uH(e,r,n,o),u=s.__ngNextListenerFn__;for(;u;)c=uH(e,r,u,o)&&c,u=u.__ngNextListenerFn__;return i&&c===!1&&o.preventDefault(),c}}function ss(t=1){return Lve(t)}function kEe(t,e){let r=null,n=sve(t);for(let i=0;i<e.length;i++){let s=e[i];if(s==="*"){r=i;continue}if(n===null?bH(t,s,!0):cve(n,s))return i}return r}function w$(t){let e=Hr()[oc][jo];if(!e.projection){let r=t?t.length:1,n=e.projection=Hve(r,null),i=n.slice(),s=e.child;for(;s!==null;){let o=t?kEe(s,t):0;o!==null&&(i[o]?i[o].projectionNext=s:n[o]=s,i[o]=s),s=s.next}}}function v$(t,e=0,r){let n=Hr(),i=va(),s=sg(i,$i+t,16,null,r||null);s.projection===null&&(s.projection=e),XS(),(!n[Fy]||PH())&&(s.flags&32)!==32&&Pbe(i,n,s)}function LEe(t,e,r,n){r>=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=n}function je(t,e=""){let r=Hr(),n=va(),i=t+$i,s=n.firstCreatePass?sg(n,i,1,e,null):n.data[i],o=FEe(n,r,s,e,t);r[i]=o,HE()&&e_(n,r,o,s),bh(s,!1)}var FEe=(t,e,r,n,i)=>(VE(!0),wbe(e[Vi],n));function ln(t){return Bt("",t,""),ln}function Bt(t,e,r){let n=Hr(),i=cEe(n,t,e,r);return i!==Df&&l3e(n,tg(),i),Bt}var BEe=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let i=oV(!1,n.type),s=i.length>0?ND([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,s)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=Xe({token:e,providedIn:"environment",factory:()=>new e(yt(Es))});let t=e;return t})();function cr(t){ag("NgStandalone"),t.getStandaloneInjector=e=>e.get(BEe).getOrCreateStandaloneInjector(t)}function Nf(t,e,r){let n=jE()+t,i=Hr();return i[n]===Df?MD(i,n,r?e.call(r):e()):nEe(i,n)}function b$(t,e,r,n,i){return _$(Hr(),jE(),t,e,r,n,i)}function E$(t,e){let r=t[e];return r===Df?void 0:r}function UEe(t,e,r,n,i,s){let o=e+r;return wh(t,o,i)?MD(t,o+1,s?n.call(s,i):n(i)):E$(t,o+1)}function _$(t,e,r,n,i,s,o){let a=e+r;return iEe(t,a,i,s)?MD(t,a+2,o?n.call(o,i,s):n(i,s)):E$(t,a+2)}function et(t,e){let r=va(),n,i=t+$i;r.firstCreatePass?(n=jEe(e,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let s=n.factory||(n.factory=gh(n.type,!0)),o,a=mo(Mr);try{let c=CE(!1),u=s();return CE(c),LEe(r,Hr(),i,u),u}finally{mo(a)}}function jEe(t,e){if(e)for(let r=e.length-1;r>=0;r--){let n=e[r];if(t===n.name)return n}}function it(t,e,r){let n=t+$i,i=Hr(),s=NH(i,n);return C$(i,n)?UEe(i,jE(),e,s.transform,r,s):s.transform(r)}function Of(t,e,r,n){let i=t+$i,s=Hr(),o=NH(s,i);return C$(s,i)?_$(s,jE(),e,o.transform,r,n,o):o.transform(r,n)}function C$(t,e){return t[zt].data[e].pure}var o_=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"platform"});let t=e;return t})();var x$=new ot("");function ew(t){return!!t&&typeof t.then=="function"}function I$(t){return!!t&&typeof t.subscribe=="function"}var FD=new ot(""),A$=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i}),this.appInits=xe(FD,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let s of this.appInits){let o=s();if(ew(o))n.push(o);else if(I$(o)){let a=new Promise((c,u)=>{o.subscribe({complete:c,error:u})});n.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(s=>{this.reject(s)}),n.length===0&&i(),this.initialized=!0}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),a_=new ot("");function HEe(){BU(()=>{throw new gt(600,!1)})}function VEe(t){return t.isBoundToModule}function $Ee(t,e,r){try{let n=r();return ew(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}var Mf=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=xe(IV),this.afterRenderEffectManager=xe(m$),this.componentTypes=[],this.components=[],this.isStable=xe(cg).hasPendingTasks.pipe(ft(n=>!n)),this._injector=xe(Es)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,i){let s=n instanceof DE;if(!this._injector.get(A$).done){let w=!s&&CH(n),_=!1;throw new gt(405,_)}let a;s?a=n:a=this._injector.get(i_).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let c=VEe(a)?void 0:this._injector.get(xf),u=i||a.selector,d=a.create(nu.NULL,[],u,c),h=d.location.nativeElement,m=d.injector.get(x$,null);return m?.registerApplication(h),d.onDestroy(()=>{this.detachView(d.hostView),XA(this.components,d),m?.unregisterApplication(h)}),this._loadComponent(d),d}tick(){if(this._runningTick)throw new gt(101,!1);let n=vr(null);try{this._runningTick=!0,this.detectChangesInAttachedViews()}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,vr(n)}}detectChangesInAttachedViews(){let n=0,i=this.afterRenderEffectManager;for(;;){if(n===u$)throw new gt(103,!1);let s=n===0;for(let{_lView:o,notifyErrorHandler:a}of this._views)!s&&!eS(o)||this.detectChangesInView(o,a,s);if(n++,i.executeInternalCallbacks(),!this._views.some(({_lView:o})=>eS(o))&&(i.execute(),!this._views.some(({_lView:o})=>eS(o))))break}}detectChangesInView(n,i,s){let o;s?(o=0,n[Rt]|=1024):n[Rt]&64?o=0:o=1,f$(n,i,o)}attachView(n){let i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){let i=n;XA(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let i=this._injector.get(a_,[]);[...this._bootstrapListeners,...i].forEach(s=>s(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>XA(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new gt(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function XA(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function eS(t){return YS(t)}var FS=class{constructor(e,r){this.ngModuleFactory=e,this.componentFactories=r}},BD=(()=>{let e=class e{compileModuleSync(n){return new PS(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let i=this.compileModuleSync(n),s=xH(n),o=FV(s.declarations).reduce((a,c)=>{let u=Cf(c);return u&&a.push(new Ym(u)),a},[]);return new FS(i,o)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var qEe=(()=>{let e=class e{constructor(){this.zone=xe(oi),this.applicationRef=xe(Mf)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function WEe(t){return[{provide:oi,useFactory:t},{provide:Jm,multi:!0,useFactory:()=>{let e=xe(qEe,{optional:!0});return()=>e.initialize()}},{provide:Jm,multi:!0,useFactory:()=>{let e=xe(KEe);return()=>{e.initialize()}}},{provide:IV,useFactory:zEe}]}function zEe(){let t=xe(oi),e=xe(Ql);return r=>t.runOutsideAngular(()=>e.handleError(r))}function GEe(t){let e=WEe(()=>new oi(ZEe(t)));return Ho([[],e])}function ZEe(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var KEe=(()=>{let e=class e{constructor(){this.subscription=new Wn,this.initialized=!1,this.zone=xe(oi),this.pendingTasks=xe(cg)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{oi.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{oi.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function JEe(){return typeof $localize<"u"&&$localize.locale||ME}var UD=new ot("",{providedIn:"root",factory:()=>xe(UD,tr.Optional|tr.SkipSelf)||JEe()});var S$=new ot("");var pE=null;function YEe(t=[],e){return nu.create({name:e,providers:[{provide:ZE,useValue:"platform"},{provide:S$,useValue:new Set([()=>pE=null])},...t]})}function QEe(t=[]){if(pE)return pE;let e=YEe(t);return pE=e,HEe(),XEe(e),e}function XEe(t){t.get(sD,null)?.forEach(r=>r())}function D$(){return!1}var su=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=e_e;let t=e;return t})();function e_e(t){return t_e(ba(),Hr(),(t&16)===16)}function t_e(t,e,r){if(BE(t)&&!r){let n=Wc(t.index,e);return new yh(n,n)}else if(t.type&47){let n=e[oc];return new yh(n,e)}return null}var BS=class{constructor(){}supports(e){return y$(e)}create(e){return new US(e)}},r_e=(t,e)=>e,US=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||r_e}forEachItem(e){let r;for(r=this._itHead;r!==null;r=r._next)e(r)}forEachOperation(e){let r=this._itHead,n=this._removalsHead,i=0,s=null;for(;r||n;){let o=!n||r&&r.currentIndex<dH(n,i,s)?r:n,a=dH(o,i,s),c=o.currentIndex;if(o===n)i--,n=n._nextRemoved;else if(r=r._next,o.previousIndex==null)i++;else{s||(s=[]);let u=a-i,d=c-i;if(u!=d){for(let m=0;m<u;m++){let w=m<s.length?s[m]:s[m]=0,_=w+m;d<=_&&_<u&&(s[m]=w+1)}let h=o.previousIndex;s[h]=d-u}}a!==c&&e(o,a,c)}}forEachPreviousItem(e){let r;for(r=this._previousItHead;r!==null;r=r._nextPrevious)e(r)}forEachAddedItem(e){let r;for(r=this._additionsHead;r!==null;r=r._nextAdded)e(r)}forEachMovedItem(e){let r;for(r=this._movesHead;r!==null;r=r._nextMoved)e(r)}forEachRemovedItem(e){let r;for(r=this._removalsHead;r!==null;r=r._nextRemoved)e(r)}forEachIdentityChange(e){let r;for(r=this._identityChangesHead;r!==null;r=r._nextIdentityChange)e(r)}diff(e){if(e==null&&(e=[]),!y$(e))throw new gt(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let r=this._itHead,n=!1,i,s,o;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)s=e[a],o=this._trackByFn(a,s),r===null||!Object.is(r.trackById,o)?(r=this._mismatch(r,s,o,a),n=!0):(n&&(r=this._verifyReinsertion(r,s,o,a)),Object.is(r.item,s)||this._addIdentityChange(r,s)),r=r._next}else i=0,rEe(e,a=>{o=this._trackByFn(i,a),r===null||!Object.is(r.trackById,o)?(r=this._mismatch(r,a,o,i),n=!0):(n&&(r=this._verifyReinsertion(r,a,o,i)),Object.is(r.item,a)||this._addIdentityChange(r,a)),r=r._next,i++}),this.length=i;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,r,n,i){let s;return e===null?s=this._itTail:(s=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._reinsertAfter(e,s,i)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,i),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._moveAfter(e,s,i)):e=this._addAfter(new jS(r,n),s,i)),e}_verifyReinsertion(e,r,n,i){let s=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return s!==null?e=this._reinsertAfter(s,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;e!==null;){let r=e._next;this._addToRemovals(this._unlink(e)),e=r}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,r,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let i=e._prevRemoved,s=e._nextRemoved;return i===null?this._removalsHead=s:i._nextRemoved=s,s===null?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(e,r,n),this._addToMoves(e,n),e}_moveAfter(e,r,n){return this._unlink(e),this._insertAfter(e,r,n),this._addToMoves(e,n),e}_addAfter(e,r,n){return this._insertAfter(e,r,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,r,n){let i=r===null?this._itHead:r._next;return e._next=i,e._prev=r,i===null?this._itTail=e:i._prev=e,r===null?this._itHead=e:r._next=e,this._linkedRecords===null&&(this._linkedRecords=new PE),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let r=e._prev,n=e._next;return r===null?this._itHead=n:r._next=n,n===null?this._itTail=r:n._prev=r,e}_addToMoves(e,r){return e.previousIndex===r||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new PE),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,r){return e.item=r,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},jS=class{constructor(e,r){this.item=e,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},HS=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,r){let n;for(n=this._head;n!==null;n=n._nextDup)if((r===null||r<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let r=e._prevDup,n=e._nextDup;return r===null?this._head=n:r._nextDup=n,n===null?this._tail=r:n._prevDup=r,this._head===null}},PE=class{constructor(){this.map=new Map}put(e){let r=e.trackById,n=this.map.get(r);n||(n=new HS,this.map.set(r,n)),n.add(e)}get(e,r){let n=e,i=this.map.get(n);return i?i.get(e,r):null}remove(e){let r=e.trackById;return this.map.get(r).remove(e)&&this.map.delete(r),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function dH(t,e,r){let n=t.previousIndex;if(n===null)return n;let i=0;return r&&n<r.length&&(i=r[n]),n+e+i}var VS=class{constructor(){}supports(e){return e instanceof Map||OD(e)}create(){return new $S}},$S=class{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let r;for(r=this._mapHead;r!==null;r=r._next)e(r)}forEachPreviousItem(e){let r;for(r=this._previousMapHead;r!==null;r=r._nextPrevious)e(r)}forEachChangedItem(e){let r;for(r=this._changesHead;r!==null;r=r._nextChanged)e(r)}forEachAddedItem(e){let r;for(r=this._additionsHead;r!==null;r=r._nextAdded)e(r)}forEachRemovedItem(e){let r;for(r=this._removalsHead;r!==null;r=r._nextRemoved)e(r)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||OD(e)))throw new gt(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let r=this._mapHead;if(this._appendAfter=null,this._forEach(e,(n,i)=>{if(r&&r.key===i)this._maybeAddToChanges(r,n),this._appendAfter=r,r=r._next;else{let s=this._getOrCreateRecordForKey(i,n);r=this._insertBeforeOrAppend(r,s)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let n=r;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,r){if(e){let n=e._prev;return r._next=e,r._prev=n,e._prev=r,n&&(n._next=r),e===this._mapHead&&(this._mapHead=r),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(e,r){if(this._records.has(e)){let i=this._records.get(e);this._maybeAddToChanges(i,r);let s=i._prev,o=i._next;return s&&(s._next=o),o&&(o._prev=s),i._next=null,i._prev=null,i}let n=new qS(e);return this._records.set(e,n),n.currentValue=r,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,r){Object.is(r,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=r,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,r){e instanceof Map?e.forEach(r):Object.keys(e).forEach(n=>r(e[n],n))}},qS=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function hH(){return new jD([new BS])}var jD=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,i){if(i!=null){let s=i.factories.slice();n=n.concat(s)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||hH()),deps:[[e,new uD,new GE]]}}find(n){let i=this.factories.find(s=>s.supports(n));if(i!=null)return i;throw new gt(901,!1)}};e.\u0275prov=Xe({token:e,providedIn:"root",factory:hH});let t=e;return t})();function pH(){return new HD([new VS])}var HD=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,i){if(i){let s=i.factories.slice();n=n.concat(s)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||pH()),deps:[[e,new uD,new GE]]}}find(n){let i=this.factories.find(s=>s.supports(n));if(i)return i;throw new gt(901,!1)}};e.\u0275prov=Xe({token:e,providedIn:"root",factory:pH});let t=e;return t})();function R$(t){try{let{rootComponent:e,appProviders:r,platformProviders:n}=t,i=QEe(n),s=[GEe(),...r||[]],a=new NE({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,c=a.get(oi);return c.run(()=>{a.resolveInjectorInitializers();let u=a.get(Ql,null),d;c.runOutsideAngular(()=>{d=c.onError.subscribe({next:w=>{u.handleError(w)}})});let h=()=>a.destroy(),m=i.get(S$);return m.add(h),a.onDestroy(()=>{d.unsubscribe(),m.delete(h)}),$Ee(u,c,()=>{let w=a.get(A$);return w.runInitializers(),w.donePromise.then(()=>{let _=a.get(UD,ME);OEe(_||ME);let C=a.get(Mf);return e!==void 0&&C.bootstrap(e),C})})})}catch(e){return Promise.reject(e)}}function lg(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function VD(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function T$(t,e){let r=Cf(t),n=e.elementInjector||KE();return new Ym(r).create(n,e.projectableNodes,e.hostElement,e.environmentInjector)}var F$=null;function ug(){return F$}function B$(t){F$??=t}var c_=class{};var os=new ot(""),U$=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>xe(i_e),providedIn:"platform"});let t=e;return t})();var i_e=(()=>{let e=class e extends U${constructor(){super(),this._doc=xe(os),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ug().getBaseHref(this._doc)}onPopState(n){let i=ug().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=ug().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,i,s){this._history.pushState(n,i,s)}replaceState(n,i,s){this._history.replaceState(n,i,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>new e,providedIn:"platform"});let t=e;return t})();function j$(t,e){if(t.length==0)return e;if(e.length==0)return t;let r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,r==2?t+e.substring(1):r==1?t+e:t+"/"+e}function N$(t){let e=t.match(/#|\?|$/),r=e&&e.index||t.length,n=r-(t[r-1]==="/"?1:0);return t.slice(0,n)+t.slice(r)}function _h(t){return t&&t[0]!=="?"?"?"+t:t}var l_=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>xe(H$),providedIn:"root"});let t=e;return t})(),s_e=new ot(""),H$=(()=>{let e=class e extends l_{constructor(n,i){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??xe(os).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return j$(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+_h(this._platformLocation.search),s=this._platformLocation.hash;return s&&n?`${i}${s}`:i}pushState(n,i,s,o){let a=this.prepareExternalUrl(s+_h(o));this._platformLocation.pushState(n,i,a)}replaceState(n,i,s,o){let a=this.prepareExternalUrl(s+_h(o));this._platformLocation.replaceState(n,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(i){return new(i||e)(yt(U$),yt(s_e,8))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var tw=(()=>{let e=class e{constructor(n){this._subject=new nc,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=c_e(N$(O$(i))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+_h(i))}normalize(n){return e.stripTrailingSlash(a_e(this._basePath,O$(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",s=null){this._locationStrategy.pushState(s,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+_h(i)),s)}replaceState(n,i="",s=null){this._locationStrategy.replaceState(s,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+_h(i)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(s=>s(n,i))}subscribe(n,i,s){return this._subject.subscribe({next:n,error:i,complete:s})}};e.normalizeQueryParams=_h,e.joinWithSlash=j$,e.stripTrailingSlash=N$,e.\u0275fac=function(i){return new(i||e)(yt(l_))},e.\u0275prov=Xe({token:e,factory:()=>o_e(),providedIn:"root"});let t=e;return t})();function o_e(){return new tw(yt(l_))}function a_e(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function O$(t){return t.replace(/\/index.html$/,"")}function c_e(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}function u_(t,e){e=encodeURIComponent(e);for(let r of t.split(";")){let n=r.indexOf("="),[i,s]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===e)return decodeURIComponent(s)}return null}var $D=/\s+/,M$=[],dg=(()=>{let e=class e{constructor(n,i){this._ngEl=n,this._renderer=i,this.initialClasses=M$,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split($D):M$}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split($D):n}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let i of n)this._updateState(i,!0);else if(n!=null)for(let i of Object.keys(n))this._updateState(i,!!n[i]);this._applyStateDiff()}_updateState(n,i){let s=this.stateMap.get(n);s!==void 0?(s.enabled!==i&&(s.changed=!0,s.enabled=i),s.touched=!0):this.stateMap.set(n,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let i=n[0],s=n[1];s.changed?(this._toggleClass(i,s.enabled),s.changed=!1):s.touched||(s.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),s.touched=!1}}_toggleClass(n,i){n=n.trim(),n.length>0&&n.split($D).forEach(s=>{i?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}};e.\u0275fac=function(i){return new(i||e)(Mr(Sf),Mr(Eh))},e.\u0275dir=ac({type:e,selectors:[["","ngClass",""]],inputs:{klass:[is.None,"class","klass"],ngClass:"ngClass"},standalone:!0});let t=e;return t})();var qD=class{constructor(e,r,n,i){this.$implicit=e,this.ngForOf=r,this.index=n,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},f_=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,i,s){this._viewContainer=n,this._template=i,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let i=this._viewContainer;n.forEachOperation((s,o,a)=>{if(s.previousIndex==null)i.createEmbeddedView(this._template,new qD(s.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(o===null?void 0:o);else if(o!==null){let c=i.get(o);i.move(c,a),P$(c,s)}});for(let s=0,o=i.length;s<o;s++){let c=i.get(s).context;c.index=s,c.count=o,c.ngForOf=this._ngForOf}n.forEachIdentityChange(s=>{let o=i.get(s.currentIndex);P$(o,s)})}static ngTemplateContextGuard(n,i){return!0}};e.\u0275fac=function(i){return new(i||e)(Mr(Rf),Mr(og),Mr(jD))},e.\u0275dir=ac({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let t=e;return t})();function P$(t,e){t.context.$implicit=e.item}var V$=(()=>{let e=class e{constructor(n,i){this._viewContainer=n,this._context=new WD,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){k$("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){k$("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,i){return!0}};e.\u0275fac=function(i){return new(i||e)(Mr(Rf),Mr(og))},e.\u0275dir=ac({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let t=e;return t})(),WD=class{constructor(){this.$implicit=null,this.ngIf=null}};function k$(t,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${Ws(e)}'.`)}var l_e=!0,zD=class{constructor(e,r){this._viewContainerRef=e,this._templateRef=r,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},GD=(()=>{let e=class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){let i=l_e?n===this._ngSwitch:n==this._ngSwitch;return this._lastCasesMatched||=i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(let i of this._defaultViews)i.enforceState(n)}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ac({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});let t=e;return t})(),$$=(()=>{let e=class e{constructor(n,i,s){this.ngSwitch=s,s._addCase(),this._view=new zD(n,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}};e.\u0275fac=function(i){return new(i||e)(Mr(Rf),Mr(og),Mr(GD,9))},e.\u0275dir=ac({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});let t=e;return t})();var q$=(()=>{let e=class e{constructor(n,i,s){this._ngEl=n,this._differs=i,this._renderer=s,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){let[s,o]=n.split("."),a=s.indexOf("-")===-1?void 0:zc.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,s,o?`${i}${o}`:i,a):this._renderer.removeStyle(this._ngEl.nativeElement,s,a)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}};e.\u0275fac=function(i){return new(i||e)(Mr(Sf),Mr(HD),Mr(Eh))},e.\u0275dir=ac({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let t=e;return t})();function u_e(t,e){return new gt(2100,!1)}var Pf=(()=>{let e=class e{transform(n){if(n==null)return null;if(typeof n!="string")throw u_e(e,n);return n.toUpperCase()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=LE({name:"uppercase",type:e,pure:!0,standalone:!0});let t=e;return t})();var ZD=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=Xm({type:e}),e.\u0275inj=rg({});let t=e;return t})(),W$="browser",f_e="server";function d_(t){return t===f_e}var fg=class{};var z$=t=>t.src,d_e=new ot("",{providedIn:"root",factory:()=>z$});var h_e=new ot("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set}),p_e=(()=>{let e=class e{constructor(){this.preloadedImages=xe(h_e),this.document=xe(os)}createPreloadLinkTag(n,i,s,o){if(this.preloadedImages.has(i))return;this.preloadedImages.add(i);let a=n.createElement("link");n.setAttribute(a,"as","image"),n.setAttribute(a,"href",i),n.setAttribute(a,"rel","preload"),n.setAttribute(a,"fetchpriority","high"),o&&n.setAttribute(a,"imageSizes",o),s&&n.setAttribute(a,"imageSrcset",s),n.appendChild(this.document.head,a)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var m_e=/^((\s*\d+w\s*(,|$)){1,})$/;var g_e=[1,2],y_e=640;var w_e=1920,v_e=1080;var G$=(()=>{let e=class e{constructor(){this.imageLoader=xe(d_e),this.config=b_e(xe(YH)),this.renderer=xe(Eh),this.imgElement=xe(Sf).nativeElement,this.injector=xe(nu),this.isServer=d_(xe(tu)),this.preloadLinkCreator=xe(p_e),this.lcpObserver=null,this._renderedSrc=null,this.priority=!1,this.disableOptimizedSrcset=!1,this.fill=!1}ngOnInit(){ag("NgOptimizedImage"),this.placeholder&&this.removePlaceholderOnLoad(this.imgElement),this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||="100vw":(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");let n=this.updateSrcAndSrcset();this.sizes&&this.setHostAttribute("sizes",this.sizes),this.isServer&&this.priority&&this.preloadLinkCreator.createPreloadLinkTag(this.renderer,this.getRewrittenSrc(),n,this.sizes)}ngOnChanges(n){if(n.ngSrc&&!n.ngSrc.isFirstChange()){let i=this._renderedSrc;this.updateSrcAndSrcset(!0);let s=this._renderedSrc;this.lcpObserver!==null&&i&&s&&i!==s&&this.injector.get(oi).runOutsideAngular(()=>{this.lcpObserver?.updateImage(i,s)})}}callImageLoader(n){let i=n;return this.loaderParams&&(i.loaderParams=this.loaderParams),this.imageLoader(i)}getLoadingBehavior(){return!this.priority&&this.loading!==void 0?this.loading:this.priority?"eager":"lazy"}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){let n={src:this.ngSrc};this._renderedSrc=this.callImageLoader(n)}return this._renderedSrc}getRewrittenSrcset(){let n=m_e.test(this.ngSrcset);return this.ngSrcset.split(",").filter(s=>s!=="").map(s=>{s=s.trim();let o=n?parseFloat(s):parseFloat(s)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:o})} ${s}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){let{breakpoints:n}=this.config,i=n;return this.sizes?.trim()==="100vw"&&(i=n.filter(o=>o>=y_e)),i.map(o=>`${this.callImageLoader({src:this.ngSrc,width:o})} ${o}w`).join(", ")}updateSrcAndSrcset(n=!1){n&&(this._renderedSrc=null);let i=this.getRewrittenSrc();this.setHostAttribute("src",i);let s;return this.ngSrcset?s=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(s=this.getAutomaticSrcset()),s&&this.setHostAttribute("srcset",s),s}getFixedSrcset(){return g_e.map(i=>`${this.callImageLoader({src:this.ngSrc,width:this.width*i})} ${i}x`).join(", ")}shouldGenerateAutomaticSrcset(){let n=!1;return this.sizes||(n=this.width>w_e||this.height>v_e),!this.disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==z$&&!n}generatePlaceholder(n){let{placeholderResolution:i}=this.config;return n===!0?`url(${this.callImageLoader({src:this.ngSrc,width:i,isPlaceholder:!0})})`:typeof n=="string"&&n.startsWith("data:")?`url(${n})`:null}shouldBlurPlaceholder(n){return!n||!n.hasOwnProperty("blur")?!0:!!n.blur}removePlaceholderOnLoad(n){let i=()=>{let a=this.injector.get(su);s(),o(),this.placeholder=!1,a.markForCheck()},s=this.renderer.listen(n,"load",i),o=this.renderer.listen(n,"error",i)}ngOnDestroy(){}setHostAttribute(n,i){this.renderer.setAttribute(this.imgElement,n,i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ac({type:e,selectors:[["img","ngSrc",""]],hostVars:18,hostBindings:function(i,s){i&2&&PD("position",s.fill?"absolute":null)("width",s.fill?"100%":null)("height",s.fill?"100%":null)("inset",s.fill?"0":null)("background-size",s.placeholder?"cover":null)("background-position",s.placeholder?"50% 50%":null)("background-repeat",s.placeholder?"no-repeat":null)("background-image",s.placeholder?s.generatePlaceholder(s.placeholder):null)("filter",s.placeholder&&s.shouldBlurPlaceholder(s.placeholderConfig)?"blur(15px)":null)},inputs:{ngSrc:[is.HasDecoratorInputTransform,"ngSrc","ngSrc",E_e],ngSrcset:"ngSrcset",sizes:"sizes",width:[is.HasDecoratorInputTransform,"width","width",VD],height:[is.HasDecoratorInputTransform,"height","height",VD],loading:"loading",priority:[is.HasDecoratorInputTransform,"priority","priority",lg],loaderParams:"loaderParams",disableOptimizedSrcset:[is.HasDecoratorInputTransform,"disableOptimizedSrcset","disableOptimizedSrcset",lg],fill:[is.HasDecoratorInputTransform,"fill","fill",lg],placeholder:[is.HasDecoratorInputTransform,"placeholder","placeholder",__e],placeholderConfig:"placeholderConfig",src:"src",srcset:"srcset"},standalone:!0,features:[TD,ng]});let t=e;return t})();function b_e(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((r,n)=>r-n)),Object.assign({},aD,t,e)}function E_e(t){return typeof t=="string"?t:ig(t)}function __e(t){return typeof t=="string"&&t.startsWith("data:")?t:lg(t)}var nw=class{},p_=class{},Ch=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
`).forEach(r=>{let n=r.indexOf(":");if(n>0){let i=r.slice(0,n),s=i.toLowerCase(),o=r.slice(n+1).trim();this.maybeSetNormalizedName(i,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((r,n)=>{this.setHeaderEntries(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let r=this.headers.get(e.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,r){return this.clone({name:e,value:r,op:"a"})}set(e,r){return this.clone({name:e,value:r,op:"s"})}delete(e,r){return this.clone({name:e,value:r,op:"d"})}maybeSetNormalizedName(e,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(r=>{this.headers.set(r,e.headers.get(r)),this.normalizedNames.set(r,e.normalizedNames.get(r))})}clone(e){let r=new t;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([e]),r}applyUpdate(e){let r=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,r);let i=(e.op==="a"?this.headers.get(r):void 0)||[];i.push(...n),this.headers.set(r,i);break;case"d":let s=e.value;if(!s)this.headers.delete(r),this.normalizedNames.delete(r);else{let o=this.headers.get(r);if(!o)return;o=o.filter(a=>s.indexOf(a)===-1),o.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,o)}break}}setHeaderEntries(e,r){let n=(Array.isArray(r)?r:[r]).map(s=>s.toString()),i=e.toLowerCase();this.headers.set(i,n),this.maybeSetNormalizedName(e,i)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>e(this.normalizedNames.get(r),this.headers.get(r)))}};var JD=class{encodeKey(e){return K$(e)}encodeValue(e){return K$(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function I_e(t,e){let r=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(i=>{let s=i.indexOf("="),[o,a]=s==-1?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,s)),e.decodeValue(i.slice(s+1))],c=r.get(o)||[];c.push(a),r.set(o,c)}),r}var A_e=/%(\d[a-f0-9])/gi,S_e={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function K$(t){return encodeURIComponent(t).replace(A_e,(e,r)=>S_e[r]??e)}function h_(t){return`${t}`}var kf=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new JD,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=I_e(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(r=>{let n=e.fromObject[r],i=Array.isArray(n)?n.map(h_):[h_(n)];this.map.set(r,i)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let r=this.map.get(e);return r?r[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,r){return this.clone({param:e,value:r,op:"a"})}appendAll(e){let r=[];return Object.keys(e).forEach(n=>{let i=e[n];Array.isArray(i)?i.forEach(s=>{r.push({param:n,value:s,op:"a"})}):r.push({param:n,value:i,op:"a"})}),this.clone(r)}set(e,r){return this.clone({param:e,value:r,op:"s"})}delete(e,r){return this.clone({param:e,value:r,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let r=this.encoder.encodeKey(e);return this.map.get(e).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let r=new t({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(e),r}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let r=(e.op==="a"?this.map.get(e.param):void 0)||[];r.push(h_(e.value)),this.map.set(e.param,r);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],i=n.indexOf(h_(e.value));i!==-1&&n.splice(i,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var YD=class{constructor(){this.map=new Map}set(e,r){return this.map.set(e,r),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function D_e(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function J$(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Y$(t){return typeof Blob<"u"&&t instanceof Blob}function Q$(t){return typeof FormData<"u"&&t instanceof FormData}function R_e(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var rw=class t{constructor(e,r,n,i){this.url=r,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let s;if(D_e(this.method)||i?(this.body=n!==void 0?n:null,s=i):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new Ch,this.context??=new YD,!this.params)this.params=new kf,this.urlWithParams=r;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=r;else{let a=r.indexOf("?"),c=a===-1?"?":a<r.length-1?"&":"";this.urlWithParams=r+c+o}}}serializeBody(){return this.body===null?null:J$(this.body)||Y$(this.body)||Q$(this.body)||R_e(this.body)||typeof this.body=="string"?this.body:this.body instanceof kf?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Q$(this.body)?null:Y$(this.body)?this.body.type||null:J$(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof kf?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(e={}){let r=e.method||this.method,n=e.url||this.url,i=e.responseType||this.responseType,s=e.body!==void 0?e.body:this.body,o=e.withCredentials!==void 0?e.withCredentials:this.withCredentials,a=e.reportProgress!==void 0?e.reportProgress:this.reportProgress,c=e.headers||this.headers,u=e.params||this.params,d=e.context??this.context;return e.setHeaders!==void 0&&(c=Object.keys(e.setHeaders).reduce((h,m)=>h.set(m,e.setHeaders[m]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((h,m)=>h.set(m,e.setParams[m]),u)),new t(r,n,s,{params:u,headers:c,context:d,reportProgress:a,responseType:i,withCredentials:o})}},hg=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(hg||{}),iw=class{constructor(e,r=y_.Ok,n="OK"){this.headers=e.headers||new Ch,this.status=e.status!==void 0?e.status:r,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},QD=class t extends iw{constructor(e={}){super(e),this.type=hg.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},m_=class t extends iw{constructor(e={}){super(e),this.type=hg.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},g_=class extends iw{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},y_=function(t){return t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Processing=102]="Processing",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultiStatus=207]="MultiStatus",t[t.AlreadyReported=208]="AlreadyReported",t[t.ImUsed=226]="ImUsed",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.Unused=306]="Unused",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.Locked=423]="Locked",t[t.FailedDependency=424]="FailedDependency",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",t}(y_||{});function KD(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var sw=(()=>{let e=class e{constructor(n){this.handler=n}request(n,i,s={}){let o;if(n instanceof rw)o=n;else{let u;s.headers instanceof Ch?u=s.headers:u=new Ch(s.headers);let d;s.params&&(s.params instanceof kf?d=s.params:d=new kf({fromObject:s.params})),o=new rw(n,i,s.body!==void 0?s.body:null,{headers:u,context:s.context,params:d,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let a=mt(o).pipe(yf(u=>this.handler.handle(u)));if(n instanceof rw||s.observe==="events")return a;let c=a.pipe(_i(u=>u instanceof m_));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(ft(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return u.body}));case"blob":return c.pipe(ft(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new Error("Response is not a Blob.");return u.body}));case"text":return c.pipe(ft(u=>{if(u.body!==null&&typeof u.body!="string")throw new Error("Response is not a string.");return u.body}));case"json":default:return c.pipe(ft(u=>u.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:new kf().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,s={}){return this.request("PATCH",n,KD(s,i))}post(n,i,s={}){return this.request("POST",n,KD(s,i))}put(n,i,s={}){return this.request("PUT",n,KD(s,i))}};e.\u0275fac=function(i){return new(i||e)(yt(nw))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})();function T_e(t,e){return e(t)}function N_e(t,e,r){return(n,i)=>ru(r,()=>e(n,s=>t(s,i)))}var tq=new ot(""),O_e=new ot(""),M_e=new ot("");var X$=(()=>{let e=class e extends nw{constructor(n,i){super(),this.backend=n,this.injector=i,this.chain=null,this.pendingTasks=xe(cg);let s=xe(M_e,{optional:!0});this.backend=s??n}handle(n){if(this.chain===null){let s=Array.from(new Set([...this.injector.get(tq),...this.injector.get(O_e,[])]));this.chain=s.reduceRight((o,a)=>N_e(o,a,this.injector),T_e)}let i=this.pendingTasks.add();return this.chain(n,s=>this.backend.handle(s)).pipe(fh(()=>this.pendingTasks.remove(i)))}};e.\u0275fac=function(i){return new(i||e)(yt(p_),yt(Es))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})();var P_e=/^\)\]\}',?\n/;function k_e(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var eq=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new gt(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?Sn(i.\u0275loadImpl()):mt(null)).pipe(Dn(()=>new er(o=>{let a=i.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((A,R)=>a.setRequestHeader(A,R.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let A=n.detectContentTypeHeader();A!==null&&a.setRequestHeader("Content-Type",A)}if(n.responseType){let A=n.responseType.toLowerCase();a.responseType=A!=="json"?A:"text"}let c=n.serializeBody(),u=null,d=()=>{if(u!==null)return u;let A=a.statusText||"OK",R=new Ch(a.getAllResponseHeaders()),L=k_e(a)||n.url;return u=new QD({headers:R,status:a.status,statusText:A,url:L}),u},h=()=>{let{headers:A,status:R,statusText:L,url:U}=d(),V=null;R!==y_.NoContent&&(V=typeof a.response>"u"?a.responseText:a.response),R===0&&(R=V?y_.Ok:0);let Q=R>=200&&R<300;if(n.responseType==="json"&&typeof V=="string"){let Y=V;V=V.replace(P_e,"");try{V=V!==""?JSON.parse(V):null}catch(k){V=Y,Q&&(Q=!1,V={error:k,text:V})}}Q?(o.next(new m_({body:V,headers:A,status:R,statusText:L,url:U||void 0})),o.complete()):o.error(new g_({error:V,headers:A,status:R,statusText:L,url:U||void 0}))},m=A=>{let{url:R}=d(),L=new g_({error:A,status:a.status||0,statusText:a.statusText||"Unknown Error",url:R||void 0});o.error(L)},w=!1,_=A=>{w||(o.next(d()),w=!0);let R={type:hg.DownloadProgress,loaded:A.loaded};A.lengthComputable&&(R.total=A.total),n.responseType==="text"&&a.responseText&&(R.partialText=a.responseText),o.next(R)},C=A=>{let R={type:hg.UploadProgress,loaded:A.loaded};A.lengthComputable&&(R.total=A.total),o.next(R)};return a.addEventListener("load",h),a.addEventListener("error",m),a.addEventListener("timeout",m),a.addEventListener("abort",m),n.reportProgress&&(a.addEventListener("progress",_),c!==null&&a.upload&&a.upload.addEventListener("progress",C)),a.send(c),o.next({type:hg.Sent}),()=>{a.removeEventListener("error",m),a.removeEventListener("abort",m),a.removeEventListener("load",h),a.removeEventListener("timeout",m),n.reportProgress&&(a.removeEventListener("progress",_),c!==null&&a.upload&&a.upload.removeEventListener("progress",C)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(i){return new(i||e)(yt(fg))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})(),rq=new ot(""),L_e="XSRF-TOKEN",F_e=new ot("",{providedIn:"root",factory:()=>L_e}),B_e="X-XSRF-TOKEN",U_e=new ot("",{providedIn:"root",factory:()=>B_e}),w_=class{},j_e=(()=>{let e=class e{constructor(n,i,s){this.doc=n,this.platform=i,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=u_(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(i){return new(i||e)(yt(os),yt(tu),yt(F_e))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})();function H_e(t,e){let r=t.url.toLowerCase();if(!xe(rq)||t.method==="GET"||t.method==="HEAD"||r.startsWith("http://")||r.startsWith("https://"))return e(t);let n=xe(w_).getToken(),i=xe(U_e);return n!=null&&!t.headers.has(i)&&(t=t.clone({headers:t.headers.set(i,n)})),e(t)}function nq(...t){let e=[sw,eq,X$,{provide:nw,useExisting:X$},{provide:p_,useExisting:eq},{provide:tq,useValue:H_e,multi:!0},{provide:rq,useValue:!0},{provide:w_,useClass:j_e}];for(let r of t)e.push(...r.\u0275providers);return Ho(e)}var tR=class extends c_{constructor(){super(...arguments),this.supportsDOMEvents=!0}},rR=class t extends tR{static makeCurrent(){B$(new t)}onAndCancel(e,r,n){return e.addEventListener(r,n),()=>{e.removeEventListener(r,n)}}dispatchEvent(e,r){e.dispatchEvent(r)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,r){return r=r||this.getDefaultDocument(),r.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,r){return r==="window"?window:r==="document"?e:r==="body"?e.body:null}getBaseHref(e){let r=V_e();return r==null?null:$_e(r)}resetBaseElement(){ow=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return u_(document.cookie,e)}},ow=null;function V_e(){return ow=ow||document.querySelector("base"),ow?ow.getAttribute("href"):null}function $_e(t){return new URL(t,document.baseURI).pathname}var q_e=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})(),nR=new ot(""),aq=(()=>{let e=class e{constructor(n,i){this._zone=i,this._eventNameToPlugin=new Map,n.forEach(s=>{s.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,s){return this._findPluginFor(i).addEventListener(n,i,s)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(o=>o.supports(n)),!i)throw new gt(5101,!1);return this._eventNameToPlugin.set(n,i),i}};e.\u0275fac=function(i){return new(i||e)(yt(nR),yt(oi))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})(),v_=class{constructor(e){this._doc=e}},XD="ng-app-id",cq=(()=>{let e=class e{constructor(n,i,s,o={}){this.doc=n,this.appId=i,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=d_(o),this.resetHostNodes()}addStyles(n){for(let i of n)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(n){for(let i of n)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(i=>i.remove()),n.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let i of this.getAllStyles())this.addStyleToHost(n,i)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let i of this.hostNodes)this.addStyleToHost(i,n)}onStyleRemoved(n){let i=this.styleRef;i.get(n)?.elements?.forEach(s=>s.remove()),i.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${XD}="${this.appId}"]`);if(n?.length){let i=new Map;return n.forEach(s=>{s.textContent!=null&&i.set(s.textContent,s)}),i}return null}changeUsageCount(n,i){let s=this.styleRef;if(s.has(n)){let o=s.get(n);return o.usage+=i,o.usage}return s.set(n,{usage:i,elements:[]}),i}getStyleElement(n,i){let s=this.styleNodesInDOM,o=s?.get(i);if(o?.parentNode===n)return s.delete(i),o.removeAttribute(XD),o;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(XD,this.appId),n.appendChild(a),a}}addStyleToHost(n,i){let s=this.getStyleElement(n,i),o=this.styleRef,a=o.get(i)?.elements;a?a.push(s):o.set(i,{elements:[s],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(i){return new(i||e)(yt(os),yt(iD),yt(oD,8),yt(tu))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})(),eR={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},sR=/%COMP%/g,lq="%COMP%",W_e=`_nghost-${lq}`,z_e=`_ngcontent-${lq}`,G_e=!0,Z_e=new ot("",{providedIn:"root",factory:()=>G_e});function K_e(t){return z_e.replace(sR,t)}function J_e(t){return W_e.replace(sR,t)}function uq(t,e){return e.map(r=>r.replace(sR,t))}var iq=(()=>{let e=class e{constructor(n,i,s,o,a,c,u,d=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=c,this.ngZone=u,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=d_(c),this.defaultRenderer=new aw(n,a,u,this.platformIsServer)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===qc.ShadowDom&&(i=_e(B({},i),{encapsulation:qc.Emulated}));let s=this.getOrCreateRenderer(n,i);return s instanceof b_?s.applyToHost(n):s instanceof cw&&s.applyStyles(),s}getOrCreateRenderer(n,i){let s=this.rendererByCompId,o=s.get(i.id);if(!o){let a=this.doc,c=this.ngZone,u=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,m=this.platformIsServer;switch(i.encapsulation){case qc.Emulated:o=new b_(u,d,i,this.appId,h,a,c,m);break;case qc.ShadowDom:return new iR(u,d,n,i,a,c,this.nonce,m);default:o=new cw(u,d,i,h,a,c,m);break}s.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(i){return new(i||e)(yt(aq),yt(cq),yt(iD),yt(Z_e),yt(os),yt(tu),yt(oi),yt(oD))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})(),aw=class{constructor(e,r,n,i){this.eventManager=e,this.doc=r,this.ngZone=n,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,r){return r?this.doc.createElementNS(eR[r]||r,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,r){(sq(e)?e.content:e).appendChild(r)}insertBefore(e,r,n){e&&(sq(e)?e.content:e).insertBefore(r,n)}removeChild(e,r){e&&e.removeChild(r)}selectRootElement(e,r){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new gt(-5104,!1);return r||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,r,n,i){if(i){r=i+":"+r;let s=eR[i];s?e.setAttributeNS(s,r,n):e.setAttribute(r,n)}else e.setAttribute(r,n)}removeAttribute(e,r,n){if(n){let i=eR[n];i?e.removeAttributeNS(i,r):e.removeAttribute(`${n}:${r}`)}else e.removeAttribute(r)}addClass(e,r){e.classList.add(r)}removeClass(e,r){e.classList.remove(r)}setStyle(e,r,n,i){i&(zc.DashCase|zc.Important)?e.style.setProperty(r,n,i&zc.Important?"important":""):e.style[r]=n}removeStyle(e,r,n){n&zc.DashCase?e.style.removeProperty(r):e.style[r]=""}setProperty(e,r,n){e!=null&&(e[r]=n)}setValue(e,r){e.nodeValue=r}listen(e,r,n){if(typeof e=="string"&&(e=ug().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${r}`);return this.eventManager.addEventListener(e,r,this.decoratePreventDefault(n))}decoratePreventDefault(e){return r=>{if(r==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(r)):e(r))===!1&&r.preventDefault()}}};function sq(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var iR=class extends aw{constructor(e,r,n,i,s,o,a,c){super(e,s,o,c),this.sharedStylesHost=r,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=uq(i.id,i.styles);for(let d of u){let h=document.createElement("style");a&&h.setAttribute("nonce",a),h.textContent=d,this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,r){return super.appendChild(this.nodeOrShadowRoot(e),r)}insertBefore(e,r,n){return super.insertBefore(this.nodeOrShadowRoot(e),r,n)}removeChild(e,r){return super.removeChild(this.nodeOrShadowRoot(e),r)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},cw=class extends aw{constructor(e,r,n,i,s,o,a,c){super(e,s,o,a),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=i,this.styles=c?uq(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},b_=class extends cw{constructor(e,r,n,i,s,o,a,c){let u=i+"-"+n.id;super(e,r,n,s,o,a,c,u),this.contentAttr=K_e(u),this.hostAttr=J_e(u)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,r){let n=super.createElement(e,r);return super.setAttribute(n,this.contentAttr,""),n}},Y_e=(()=>{let e=class e extends v_{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,s){return n.addEventListener(i,s,!1),()=>this.removeEventListener(n,i,s)}removeEventListener(n,i,s){return n.removeEventListener(i,s)}};e.\u0275fac=function(i){return new(i||e)(yt(os))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})(),oq=["alt","control","meta","shift"],Q_e={"\b":"Backspace","	":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},X_e={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},eCe=(()=>{let e=class e extends v_{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,i,s){let o=e.parseEventName(i),a=e.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ug().onAndCancel(n,o.domEventName,a))}static parseEventName(n){let i=n.toLowerCase().split("."),s=i.shift();if(i.length===0||!(s==="keydown"||s==="keyup"))return null;let o=e._normalizeKey(i.pop()),a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),oq.forEach(d=>{let h=i.indexOf(d);h>-1&&(i.splice(h,1),a+=d+".")}),a+=o,i.length!=0||o.length===0)return null;let u={};return u.domEventName=s,u.fullKey=a,u}static matchEventFullKeyCode(n,i){let s=Q_e[n.key]||n.key,o="";return i.indexOf("code.")>-1&&(s=n.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),oq.forEach(a=>{if(a!==s){let c=X_e[a];c(n)&&(o+=a+".")}}),o+=s,o===i)}static eventCallback(n,i,s){return o=>{e.matchEventFullKeyCode(o,n)&&s.runGuarded(()=>i(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(i){return new(i||e)(yt(os))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac});let t=e;return t})();function fq(t,e){return R$(B({rootComponent:t},tCe(e)))}function tCe(t){return{appProviders:[...oCe,...t?.providers??[]],platformProviders:sCe}}function rCe(){rR.makeCurrent()}function nCe(){return new Ql}function iCe(){return zH(document),document}var sCe=[{provide:tu,useValue:W$},{provide:sD,useValue:rCe,multi:!0},{provide:os,useFactory:iCe,deps:[]}];var oCe=[{provide:ZE,useValue:"root"},{provide:Ql,useFactory:nCe,deps:[]},{provide:nR,useClass:Y_e,multi:!0,deps:[os,oi,tu]},{provide:nR,useClass:eCe,multi:!0,deps:[os]},iq,cq,aq,{provide:zy,useExisting:iq},{provide:fg,useClass:q_e,deps:[]},[]];var dq=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(i){return new(i||e)(yt(os))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Gt="primary",Cw=Symbol("RouteTitle"),uR=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r[0]:r}return null}getAll(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function wg(t){return new uR(t)}function cCe(t,e,r){let n=r.path.split("/");if(n.length>t.length||r.pathMatch==="full"&&(e.hasChildren()||n.length<t.length))return null;let i={};for(let s=0;s<n.length;s++){let o=n[s],a=t[s];if(o.startsWith(":"))i[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:t.slice(0,n.length),posParams:i}}function lCe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Kc(t[r],e[r]))return!1;return!0}function Kc(t,e){let r=t?fR(t):void 0,n=e?fR(e):void 0;if(!r||!n||r.length!=n.length)return!1;let i;for(let s=0;s<r.length;s++)if(i=r[s],!wq(t[i],e[i]))return!1;return!0}function fR(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function wq(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;let r=[...t].sort(),n=[...e].sort();return r.every((i,s)=>n[s]===i)}else return t===e}function vq(t){return t.length>0?t[t.length-1]:null}function Bf(t){return RA(t)?t:ew(t)?Sn(Promise.resolve(t)):mt(t)}var uCe={exact:Eq,subset:_q},bq={exact:fCe,subset:dCe,ignored:()=>!0};function hq(t,e,r){return uCe[r.paths](t.root,e.root,r.matrixParams)&&bq[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function fCe(t,e){return Kc(t,e)}function Eq(t,e,r){if(!Ih(t.segments,e.segments)||!C_(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!Eq(t.children[n],e.children[n],r))return!1;return!0}function dCe(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>wq(t[r],e[r]))}function _q(t,e,r){return Cq(t,e,e.segments,r)}function Cq(t,e,r,n){if(t.segments.length>r.length){let i=t.segments.slice(0,r.length);return!(!Ih(i,r)||e.hasChildren()||!C_(i,r,n))}else if(t.segments.length===r.length){if(!Ih(t.segments,r)||!C_(t.segments,r,n))return!1;for(let i in e.children)if(!t.children[i]||!_q(t.children[i],e.children[i],n))return!1;return!0}else{let i=r.slice(0,t.segments.length),s=r.slice(t.segments.length);return!Ih(t.segments,i)||!C_(t.segments,i,n)||!t.children[Gt]?!1:Cq(t.children[Gt],e,s,n)}}function C_(t,e,r){return e.every((n,i)=>bq[r](t[i].parameters,n.parameters))}var Lf=class{constructor(e=new Pr([],{}),r={},n=null){this.root=e,this.queryParams=r,this.fragment=n}get queryParamMap(){return this._queryParamMap??=wg(this.queryParams),this._queryParamMap}toString(){return mCe.serialize(this)}},Pr=class{constructor(e,r){this.segments=e,this.children=r,this.parent=null,Object.values(r).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return x_(this)}},xh=class{constructor(e,r){this.path=e,this.parameters=r}get parameterMap(){return this._parameterMap??=wg(this.parameters),this._parameterMap}toString(){return Iq(this)}};function hCe(t,e){return Ih(t,e)&&t.every((r,n)=>Kc(r.parameters,e[n].parameters))}function Ih(t,e){return t.length!==e.length?!1:t.every((r,n)=>r.path===e[n].path)}function pCe(t,e){let r=[];return Object.entries(t.children).forEach(([n,i])=>{n===Gt&&(r=r.concat(e(i,n)))}),Object.entries(t.children).forEach(([n,i])=>{n!==Gt&&(r=r.concat(e(i,n)))}),r}var FR=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>new A_,providedIn:"root"});let t=e;return t})(),A_=class{parse(e){let r=new hR(e);return new Lf(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${lw(e.root,!0)}`,n=wCe(e.queryParams),i=typeof e.fragment=="string"?`#${gCe(e.fragment)}`:"";return`${r}${n}${i}`}},mCe=new A_;function x_(t){return t.segments.map(e=>Iq(e)).join("/")}function lw(t,e){if(!t.hasChildren())return x_(t);if(e){let r=t.children[Gt]?lw(t.children[Gt],!1):"",n=[];return Object.entries(t.children).forEach(([i,s])=>{i!==Gt&&n.push(`${i}:${lw(s,!1)}`)}),n.length>0?`${r}(${n.join("//")})`:r}else{let r=pCe(t,(n,i)=>i===Gt?[lw(t.children[Gt],!1)]:[`${i}:${lw(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[Gt]!=null?`${x_(t)}/${r[0]}`:`${x_(t)}/(${r.join("//")})`}}function xq(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function E_(t){return xq(t).replace(/%3B/gi,";")}function gCe(t){return encodeURI(t)}function dR(t){return xq(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function I_(t){return decodeURIComponent(t)}function pq(t){return I_(t.replace(/\+/g,"%20"))}function Iq(t){return`${dR(t.path)}${yCe(t.parameters)}`}function yCe(t){return Object.entries(t).map(([e,r])=>`;${dR(e)}=${dR(r)}`).join("")}function wCe(t){let e=Object.entries(t).map(([r,n])=>Array.isArray(n)?n.map(i=>`${E_(r)}=${E_(i)}`).join("&"):`${E_(r)}=${E_(n)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var vCe=/^[^\/()?;#]+/;function oR(t){let e=t.match(vCe);return e?e[0]:""}var bCe=/^[^\/()?;=#]+/;function ECe(t){let e=t.match(bCe);return e?e[0]:""}var _Ce=/^[^=?&#]+/;function CCe(t){let e=t.match(_Ce);return e?e[0]:""}var xCe=/^[^&#]+/;function ICe(t){let e=t.match(xCe);return e?e[0]:""}var hR=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Pr([],{}):new Pr([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(r).length>0)&&(n[Gt]=new Pr(e,r)),n}parseSegment(){let e=oR(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new gt(4009,!1);return this.capture(e),new xh(I_(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=ECe(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let i=oR(this.remaining);i&&(n=i,this.capture(n))}e[I_(r)]=I_(n)}parseQueryParam(e){let r=CCe(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let o=ICe(this.remaining);o&&(n=o,this.capture(n))}let i=pq(r),s=pq(n);if(e.hasOwnProperty(i)){let o=e[i];Array.isArray(o)||(o=[o],e[i]=o),o.push(s)}else e[i]=s}parseParens(e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=oR(this.remaining),i=this.remaining[n.length];if(i!=="/"&&i!==")"&&i!==";")throw new gt(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=Gt);let o=this.parseChildren();r[s]=Object.keys(o).length===1?o[Gt]:new Pr([],o),this.consumeOptional("//")}return r}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new gt(4011,!1)}};function Aq(t){return t.segments.length>0?new Pr([],{[Gt]:t}):t}function Sq(t){let e={};for(let[n,i]of Object.entries(t.children)){let s=Sq(i);if(n===Gt&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))e[o]=a;else(s.segments.length>0||s.hasChildren())&&(e[n]=s)}let r=new Pr(t.segments,e);return ACe(r)}function ACe(t){if(t.numberOfChildren===1&&t.children[Gt]){let e=t.children[Gt];return new Pr(t.segments.concat(e.segments),e.children)}return t}function vg(t){return t instanceof Lf}function SCe(t,e,r=null,n=null){let i=Dq(t);return Rq(i,e,r,n)}function Dq(t){let e;function r(s){let o={};for(let c of s.children){let u=r(c);o[c.outlet]=u}let a=new Pr(s.url,o);return s===t&&(e=a),a}let n=r(t.root),i=Aq(n);return e??i}function Rq(t,e,r,n){let i=t;for(;i.parent;)i=i.parent;if(e.length===0)return aR(i,i,i,r,n);let s=DCe(e);if(s.toRoot())return aR(i,i,new Pr([],{}),r,n);let o=RCe(s,i,t),a=o.processChildren?dw(o.segmentGroup,o.index,s.commands):Nq(o.segmentGroup,o.index,s.commands);return aR(i,o.segmentGroup,a,r,n)}function S_(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function mw(t){return typeof t=="object"&&t!=null&&t.outlets}function aR(t,e,r,n,i){let s={};n&&Object.entries(n).forEach(([c,u])=>{s[c]=Array.isArray(u)?u.map(d=>`${d}`):`${u}`});let o;t===e?o=r:o=Tq(t,e,r);let a=Aq(Sq(o));return new Lf(a,s,i)}function Tq(t,e,r){let n={};return Object.entries(t.children).forEach(([i,s])=>{s===e?n[i]=r:n[i]=Tq(s,e,r)}),new Pr(t.segments,n)}var D_=class{constructor(e,r,n){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=n,e&&n.length>0&&S_(n[0]))throw new gt(4003,!1);let i=n.find(mw);if(i&&i!==vq(n))throw new gt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function DCe(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new D_(!0,0,t);let e=0,r=!1,n=t.reduce((i,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(s.segmentPath)return[...i,s.segmentPath]}return typeof s!="string"?[...i,s]:o===0?(s.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?r=!0:a===".."?e++:a!=""&&i.push(a))}),i):[...i,s]},[]);return new D_(r,e,n)}var gg=class{constructor(e,r,n){this.segmentGroup=e,this.processChildren=r,this.index=n}};function RCe(t,e,r){if(t.isAbsolute)return new gg(e,!0,0);if(!r)return new gg(e,!1,NaN);if(r.parent===null)return new gg(r,!0,0);let n=S_(t.commands[0])?0:1,i=r.segments.length-1+n;return TCe(r,i,t.numberOfDoubleDots)}function TCe(t,e,r){let n=t,i=e,s=r;for(;s>i;){if(s-=i,n=n.parent,!n)throw new gt(4005,!1);i=n.segments.length}return new gg(n,!1,i-s)}function NCe(t){return mw(t[0])?t[0].outlets:{[Gt]:t}}function Nq(t,e,r){if(t??=new Pr([],{}),t.segments.length===0&&t.hasChildren())return dw(t,e,r);let n=OCe(t,e,r),i=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let s=new Pr(t.segments.slice(0,n.pathIndex),{});return s.children[Gt]=new Pr(t.segments.slice(n.pathIndex),t.children),dw(s,0,i)}else return n.match&&i.length===0?new Pr(t.segments,{}):n.match&&!t.hasChildren()?pR(t,e,r):n.match?dw(t,0,i):pR(t,e,r)}function dw(t,e,r){if(r.length===0)return new Pr(t.segments,{});{let n=NCe(r),i={};if(Object.keys(n).some(s=>s!==Gt)&&t.children[Gt]&&t.numberOfChildren===1&&t.children[Gt].segments.length===0){let s=dw(t.children[Gt],e,r);return new Pr(t.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(i[s]=Nq(t.children[s],e,o))}),Object.entries(t.children).forEach(([s,o])=>{n[s]===void 0&&(i[s]=o)}),new Pr(t.segments,i)}}function OCe(t,e,r){let n=0,i=e,s={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(n>=r.length)return s;let o=t.segments[i],a=r[n];if(mw(a))break;let c=`${a}`,u=n<r.length-1?r[n+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!gq(c,u,o))return s;n+=2}else{if(!gq(c,{},o))return s;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function pR(t,e,r){let n=t.segments.slice(0,e),i=0;for(;i<r.length;){let s=r[i];if(mw(s)){let c=MCe(s.outlets);return new Pr(n,c)}if(i===0&&S_(r[0])){let c=t.segments[e];n.push(new xh(c.path,mq(r[0]))),i++;continue}let o=mw(s)?s.outlets[Gt]:`${s}`,a=i<r.length-1?r[i+1]:null;o&&a&&S_(a)?(n.push(new xh(o,mq(a))),i+=2):(n.push(new xh(o,{})),i++)}return new Pr(n,{})}function MCe(t){let e={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(e[r]=pR(new Pr([],{}),0,n))}),e}function mq(t){let e={};return Object.entries(t).forEach(([r,n])=>e[r]=`${n}`),e}function gq(t,e,r){return t==r.path&&Kc(e,r.parameters)}var hw="imperative",as=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(as||{}),_a=class{constructor(e,r){this.id=e,this.url=r}},gw=class extends _a{constructor(e,r,n="imperative",i=null){super(e,r),this.type=as.NavigationStart,this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Ah=class extends _a{constructor(e,r,n){super(e,r),this.urlAfterRedirects=n,this.type=as.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Ea=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Ea||{}),mR=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(mR||{}),Ff=class extends _a{constructor(e,r,n,i){super(e,r),this.reason=n,this.code=i,this.type=as.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Sh=class extends _a{constructor(e,r,n,i){super(e,r),this.reason=n,this.code=i,this.type=as.NavigationSkipped}},yw=class extends _a{constructor(e,r,n,i){super(e,r),this.error=n,this.target=i,this.type=as.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},R_=class extends _a{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=as.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},gR=class extends _a{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=as.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},yR=class extends _a{constructor(e,r,n,i,s){super(e,r),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=s,this.type=as.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},wR=class extends _a{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=as.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},vR=class extends _a{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=as.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},bR=class{constructor(e){this.route=e,this.type=as.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ER=class{constructor(e){this.route=e,this.type=as.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},_R=class{constructor(e){this.snapshot=e,this.type=as.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},CR=class{constructor(e){this.snapshot=e,this.type=as.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},xR=class{constructor(e){this.snapshot=e,this.type=as.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},IR=class{constructor(e){this.snapshot=e,this.type=as.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var ww=class{},vw=class{constructor(e){this.url=e}};var AR=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new k_,this.attachRef=null}},k_=(()=>{let e=class e{constructor(){this.contexts=new Map}onChildOutletCreated(n,i){let s=this.getOrCreateContext(n);s.outlet=i,this.contexts.set(n,s)}onChildOutletDestroyed(n){let i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new AR,this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),T_=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let r=this.pathFromRoot(e);return r.length>1?r[r.length-2]:null}children(e){let r=SR(e,this._root);return r?r.children.map(n=>n.value):[]}firstChild(e){let r=SR(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=DR(e,this._root);return r.length<2?[]:r[r.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return DR(e,this._root).map(r=>r.value)}};function SR(t,e){if(t===e.value)return e;for(let r of e.children){let n=SR(t,r);if(n)return n}return null}function DR(t,e){if(t===e.value)return[e];for(let r of e.children){let n=DR(t,r);if(n.length)return n.unshift(e),n}return[]}var Vo=class{constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function mg(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var N_=class extends T_{constructor(e,r){super(e),this.snapshot=r,UR(this,e)}toString(){return this.snapshot.toString()}};function Oq(t){let e=PCe(t),r=new Oi([new xh("",{})]),n=new Oi({}),i=new Oi({}),s=new Oi({}),o=new Oi(""),a=new bg(r,n,s,o,i,Gt,t,e.root);return a.snapshot=e.root,new N_(new Vo(a,[]),e)}function PCe(t){let e={},r={},n={},i="",s=new bw([],e,n,i,r,Gt,t,null,{});return new O_("",new Vo(s,[]))}var bg=class{constructor(e,r,n,i,s,o,a,c){this.urlSubject=e,this.paramsSubject=r,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(ft(u=>u[Cw]))??mt(void 0),this.url=e,this.params=r,this.queryParams=n,this.fragment=i,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(ft(e=>wg(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(ft(e=>wg(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function BR(t,e,r="emptyOnly"){let n,{routeConfig:i}=t;return e!==null&&(r==="always"||i?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:B(B({},e.params),t.params),data:B(B({},e.data),t.data),resolve:B(B(B(B({},t.data),e.data),i?.data),t._resolvedData)}:n={params:B({},t.params),data:B({},t.data),resolve:B(B({},t.data),t._resolvedData??{})},i&&Pq(i)&&(n.resolve[Cw]=i.title),n}var bw=class{get title(){return this.data?.[Cw]}constructor(e,r,n,i,s,o,a,c,u){this.url=e,this.params=r,this.queryParams=n,this.fragment=i,this.data=s,this.outlet=o,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=wg(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=wg(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${r}')`}},O_=class extends T_{constructor(e,r){super(r),this.url=e,UR(this,r)}toString(){return Mq(this._root)}};function UR(t,e){e.value._routerState=t,e.children.forEach(r=>UR(t,r))}function Mq(t){let e=t.children.length>0?` { ${t.children.map(Mq).join(", ")} } `:"";return`${t.value}${e}`}function cR(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,Kc(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),Kc(e.params,r.params)||t.paramsSubject.next(r.params),lCe(e.url,r.url)||t.urlSubject.next(r.url),Kc(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function RR(t,e){let r=Kc(t.params,e.params)&&hCe(t.url,e.url),n=!t.parent!=!e.parent;return r&&!n&&(!t.parent||RR(t.parent,e.parent))}function Pq(t){return typeof t.title=="string"||t.title===null}var jR=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=Gt,this.activateEvents=new nc,this.deactivateEvents=new nc,this.attachEvents=new nc,this.detachEvents=new nc,this.parentContexts=xe(k_),this.location=xe(Rf),this.changeDetector=xe(su),this.environmentInjector=xe(Es),this.inputBinder=xe(HR,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:i,previousValue:s}=n.name;if(i)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new gt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new gt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new gt(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new gt(4013,!1);this._activatedRoute=n;let s=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,u=new TR(n,c,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:u,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ac({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[ng]});let t=e;return t})(),TR=class{constructor(e,r,n){this.route=e,this.childContexts=r,this.parent=n}get(e,r){return e===bg?this.route:e===k_?this.childContexts:this.parent.get(e,r)}},HR=new ot("");function kCe(t,e,r){let n=Ew(t,e._root,r?r._root:void 0);return new N_(n,e)}function Ew(t,e,r){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let i=LCe(t,e,r);return new Vo(n,i)}else{if(t.shouldAttach(e.value)){let s=t.retrieve(e.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>Ew(t,a)),o}}let n=FCe(e.value),i=e.children.map(s=>Ew(t,s));return new Vo(n,i)}}function LCe(t,e,r){return e.children.map(n=>{for(let i of r.children)if(t.shouldReuseRoute(n.value,i.value.snapshot))return Ew(t,n,i);return Ew(t,n)})}function FCe(t){return new bg(new Oi(t.url),new Oi(t.params),new Oi(t.queryParams),new Oi(t.fragment),new Oi(t.data),t.outlet,t.component,t)}var kq="ngNavigationCancelingError";function Lq(t,e){let{redirectTo:r,navigationBehaviorOptions:n}=vg(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,i=Fq(!1,Ea.Redirect);return i.url=r,i.navigationBehaviorOptions=n,i}function Fq(t,e){let r=new Error(`NavigationCancelingError: ${t||""}`);return r[kq]=!0,r.cancellationCode=e,r}function BCe(t){return Bq(t)&&vg(t.url)}function Bq(t){return!!t&&t[kq]}var UCe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["ng-component"]],standalone:!0,features:[cr],decls:1,vars:0,template:function(i,s){i&1&&rt(0,"router-outlet")},dependencies:[jR],encapsulation:2});let t=e;return t})();function jCe(t,e){return t.providers&&!t._injector&&(t._injector=ND(t.providers,e,`Route: ${t.path}`)),t._injector??e}function VR(t){let e=t.children&&t.children.map(VR),r=e?_e(B({},t),{children:e}):B({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==Gt&&(r.component=UCe),r}function Jc(t){return t.outlet||Gt}function HCe(t,e){let r=t.filter(n=>Jc(n)===e);return r.push(...t.filter(n=>Jc(n)!==e)),r}function xw(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let r=e.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}var VCe=(t,e,r,n)=>ft(i=>(new NR(e,i.targetRouterState,i.currentRouterState,r,n).activate(t),i)),NR=class{constructor(e,r,n,i,s){this.routeReuseStrategy=e,this.futureState=r,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=s}activate(e){let r=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,n,e),cR(this.futureState.root),this.activateChildRoutes(r,n,e)}deactivateChildRoutes(e,r,n){let i=mg(r);e.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,i[o],n),delete i[o]}),Object.values(i).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(e,r,n){let i=e.value,s=r?r.value:null;if(i===s)if(i.component){let o=n.getContext(i.outlet);o&&this.deactivateChildRoutes(e,r,o.children)}else this.deactivateChildRoutes(e,r,n);else s&&this.deactivateRouteAndItsChildren(r,n)}deactivateRouteAndItsChildren(e,r){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,r):this.deactivateRouteAndOutlet(e,r)}detachAndStoreRouteSubtree(e,r){let n=r.getContext(e.value.outlet),i=n&&e.value.component?n.children:r,s=mg(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,i);if(n&&n.outlet){let o=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,r){let n=r.getContext(e.value.outlet),i=n&&e.value.component?n.children:r,s=mg(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,r,n){let i=mg(r);e.children.forEach(s=>{this.activateRoutes(s,i[s.value.outlet],n),this.forwardEvent(new IR(s.value.snapshot))}),e.children.length&&this.forwardEvent(new CR(e.value.snapshot))}activateRoutes(e,r,n){let i=e.value,s=r?r.value:null;if(cR(i),i===s)if(i.component){let o=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,r,o.children)}else this.activateChildRoutes(e,r,n);else if(i.component){let o=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),cR(a.route.value),this.activateChildRoutes(e,null,o.children)}else{let a=xw(i.snapshot);o.attachRef=null,o.route=i,o.injector=a,o.outlet&&o.outlet.activateWith(i,o.injector),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,n)}},M_=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},yg=class{constructor(e,r){this.component=e,this.route=r}};function $Ce(t,e,r){let n=t._root,i=e?e._root:null;return uw(n,i,r,[n.value])}function qCe(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function _g(t,e){let r=Symbol(),n=e.get(t,r);return n===r?typeof t=="function"&&!ZH(t)?t:e.get(t):n}function uw(t,e,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let s=mg(e);return t.children.forEach(o=>{WCe(o,s[o.value.outlet],r,n.concat([o.value]),i),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>pw(a,r.getContext(o),i)),i}function WCe(t,e,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let s=t.value,o=e?e.value:null,a=r?r.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let c=zCe(o,s,s.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new M_(n)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?uw(t,e,a?a.children:null,n,i):uw(t,e,r,n,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new yg(a.outlet.component,o))}else o&&pw(e,a,i),i.canActivateChecks.push(new M_(n)),s.component?uw(t,null,a?a.children:null,n,i):uw(t,null,r,n,i);return i}function zCe(t,e,r){if(typeof r=="function")return r(t,e);switch(r){case"pathParamsChange":return!Ih(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Ih(t.url,e.url)||!Kc(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!RR(t,e)||!Kc(t.queryParams,e.queryParams);case"paramsChange":default:return!RR(t,e)}}function pw(t,e,r){let n=mg(t),i=t.value;Object.entries(n).forEach(([s,o])=>{i.component?e?pw(o,e.children.getContext(s),r):pw(o,null,r):pw(o,e,r)}),i.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new yg(e.outlet.component,i)):r.canDeactivateChecks.push(new yg(null,i)):r.canDeactivateChecks.push(new yg(null,i))}function Iw(t){return typeof t=="function"}function GCe(t){return typeof t=="boolean"}function ZCe(t){return t&&Iw(t.canLoad)}function KCe(t){return t&&Iw(t.canActivate)}function JCe(t){return t&&Iw(t.canActivateChild)}function YCe(t){return t&&Iw(t.canDeactivate)}function QCe(t){return t&&Iw(t.canMatch)}function Uq(t){return t instanceof Jl||t?.name==="EmptyError"}var __=Symbol("INITIAL_VALUE");function Eg(){return Dn(t=>jm(t.map(e=>e.pipe(qs(1),UA(__)))).pipe(ft(e=>{for(let r of e)if(r!==!0){if(r===__)return __;if(r===!1||r instanceof Lf)return r}return!0}),_i(e=>e!==__),qs(1)))}function XCe(t,e){return jn(r=>{let{targetSnapshot:n,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:o}}=r;return o.length===0&&s.length===0?mt(_e(B({},r),{guardsResult:!0})):e6e(o,n,i,t).pipe(jn(a=>a&&GCe(a)?t6e(n,s,t,e):mt(a)),ft(a=>_e(B({},r),{guardsResult:a})))})}function e6e(t,e,r,n){return Sn(t).pipe(jn(i=>o6e(i.component,i.route,r,e,n)),Fo(i=>i!==!0,!0))}function t6e(t,e,r,n){return Sn(e).pipe(yf(i=>gf(n6e(i.route.parent,n),r6e(i.route,n),s6e(t,i.path,r),i6e(t,i.route,r))),Fo(i=>i!==!0,!0))}function r6e(t,e){return t!==null&&e&&e(new xR(t)),mt(!0)}function n6e(t,e){return t!==null&&e&&e(new _R(t)),mt(!0)}function i6e(t,e,r){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return mt(!0);let i=n.map(s=>Hm(()=>{let o=xw(e)??r,a=_g(s,o),c=KCe(a)?a.canActivate(e,t):ru(o,()=>a(e,t));return Bf(c).pipe(Fo())}));return mt(i).pipe(Eg())}function s6e(t,e,r){let n=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>qCe(o)).filter(o=>o!==null).map(o=>Hm(()=>{let a=o.guards.map(c=>{let u=xw(o.node)??r,d=_g(c,u),h=JCe(d)?d.canActivateChild(n,t):ru(u,()=>d(n,t));return Bf(h).pipe(Fo())});return mt(a).pipe(Eg())}));return mt(s).pipe(Eg())}function o6e(t,e,r,n,i){let s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||s.length===0)return mt(!0);let o=s.map(a=>{let c=xw(e)??i,u=_g(a,c),d=YCe(u)?u.canDeactivate(t,e,r,n):ru(c,()=>u(t,e,r,n));return Bf(d).pipe(Fo())});return mt(o).pipe(Eg())}function a6e(t,e,r,n){let i=e.canLoad;if(i===void 0||i.length===0)return mt(!0);let s=i.map(o=>{let a=_g(o,t),c=ZCe(a)?a.canLoad(e,r):ru(t,()=>a(e,r));return Bf(c)});return mt(s).pipe(Eg(),jq(n))}function jq(t){return _A(si(e=>{if(vg(e))throw Lq(t,e)}),ft(e=>e===!0))}function c6e(t,e,r,n){let i=e.canMatch;if(!i||i.length===0)return mt(!0);let s=i.map(o=>{let a=_g(o,t),c=QCe(a)?a.canMatch(e,r):ru(t,()=>a(e,r));return Bf(c)});return mt(s).pipe(Eg(),jq(n))}var _w=class{constructor(e){this.segmentGroup=e||null}},P_=class extends Error{constructor(e){super(),this.urlTree=e}};function pg(t){return Um(new _w(t))}function l6e(t){return Um(new gt(4e3,!1))}function u6e(t){return Um(Fq(!1,Ea.GuardRejected))}var OR=class{constructor(e,r){this.urlSerializer=e,this.urlTree=r}lineralizeSegments(e,r){let n=[],i=r.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return mt(n);if(i.numberOfChildren>1||!i.children[Gt])return l6e(e.redirectTo);i=i.children[Gt]}}applyRedirectCommands(e,r,n){let i=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),e,n);if(r.startsWith("/"))throw new P_(i);return i}applyRedirectCreateUrlTree(e,r,n,i){let s=this.createSegmentGroup(e,r.root,n,i);return new Lf(s,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(e,r){let n={};return Object.entries(e).forEach(([i,s])=>{if(typeof s=="string"&&s.startsWith(":")){let a=s.substring(1);n[i]=r[a]}else n[i]=s}),n}createSegmentGroup(e,r,n,i){let s=this.createSegments(e,r.segments,n,i),o={};return Object.entries(r.children).forEach(([a,c])=>{o[a]=this.createSegmentGroup(e,c,n,i)}),new Pr(s,o)}createSegments(e,r,n,i){return r.map(s=>s.path.startsWith(":")?this.findPosParam(e,s,i):this.findOrReturn(s,n))}findPosParam(e,r,n){let i=n[r.path.substring(1)];if(!i)throw new gt(4001,!1);return i}findOrReturn(e,r){let n=0;for(let i of r){if(i.path===e.path)return r.splice(n),i;n++}return e}},MR={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function f6e(t,e,r,n,i){let s=$R(t,e,r);return s.matched?(n=jCe(e,n),c6e(n,e,r,i).pipe(ft(o=>o===!0?s:B({},MR)))):mt(s)}function $R(t,e,r){if(e.path==="**")return d6e(r);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?B({},MR):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let i=(e.matcher||cCe)(r,t,e);if(!i)return B({},MR);let s={};Object.entries(i.posParams??{}).forEach(([a,c])=>{s[a]=c.path});let o=i.consumed.length>0?B(B({},s),i.consumed[i.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:i.consumed,remainingSegments:r.slice(i.consumed.length),parameters:o,positionalParamSegments:i.posParams??{}}}function d6e(t){return{matched:!0,parameters:t.length>0?vq(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function yq(t,e,r,n){return r.length>0&&m6e(t,r,n)?{segmentGroup:new Pr(e,p6e(n,new Pr(r,t.children))),slicedSegments:[]}:r.length===0&&g6e(t,r,n)?{segmentGroup:new Pr(t.segments,h6e(t,r,n,t.children)),slicedSegments:r}:{segmentGroup:new Pr(t.segments,t.children),slicedSegments:r}}function h6e(t,e,r,n){let i={};for(let s of r)if(L_(t,e,s)&&!n[Jc(s)]){let o=new Pr([],{});i[Jc(s)]=o}return B(B({},n),i)}function p6e(t,e){let r={};r[Gt]=e;for(let n of t)if(n.path===""&&Jc(n)!==Gt){let i=new Pr([],{});r[Jc(n)]=i}return r}function m6e(t,e,r){return r.some(n=>L_(t,e,n)&&Jc(n)!==Gt)}function g6e(t,e,r){return r.some(n=>L_(t,e,n))}function L_(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function y6e(t,e,r,n){return Jc(t)!==n&&(n===Gt||!L_(e,r,t))?!1:$R(e,t,r).matched}function w6e(t,e,r){return e.length===0&&!t.children[r]}var PR=class{};function v6e(t,e,r,n,i,s,o="emptyOnly"){return new kR(t,e,r,n,i,o,s).recognize()}var b6e=31,kR=class{constructor(e,r,n,i,s,o,a){this.injector=e,this.configLoader=r,this.rootComponentType=n,this.config=i,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new OR(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new gt(4002,`'${e.segmentGroup}'`)}recognize(){let e=yq(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(ft(r=>{let n=new bw([],Object.freeze({}),Object.freeze(B({},this.urlTree.queryParams)),this.urlTree.fragment,{},Gt,this.rootComponentType,null,{}),i=new Vo(n,r),s=new O_("",i),o=SCe(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),this.inheritParamsAndData(s._root,null),{state:s,tree:o}}))}match(e){return this.processSegmentGroup(this.injector,this.config,e,Gt).pipe(tc(n=>{if(n instanceof P_)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof _w?this.noMatchError(n):n}))}inheritParamsAndData(e,r){let n=e.value,i=BR(n,r,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),e.children.forEach(s=>this.inheritParamsAndData(s,n))}processSegmentGroup(e,r,n,i){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,r,n):this.processSegment(e,r,n,n.segments,i,!0).pipe(ft(s=>s instanceof Vo?[s]:[]))}processChildren(e,r,n){let i=[];for(let s of Object.keys(n.children))s==="primary"?i.unshift(s):i.push(s);return Sn(i).pipe(yf(s=>{let o=n.children[s],a=HCe(r,s);return this.processSegmentGroup(e,a,o,s)}),LA((s,o)=>(s.push(...o),s)),wf(null),PA(),jn(s=>{if(s===null)return pg(n);let o=Hq(s);return E6e(o),mt(o)}))}processSegment(e,r,n,i,s,o){return Sn(r).pipe(yf(a=>this.processSegmentAgainstRoute(a._injector??e,r,a,n,i,s,o).pipe(tc(c=>{if(c instanceof _w)return mt(null);throw c}))),Fo(a=>!!a),tc(a=>{if(Uq(a))return w6e(n,i,s)?mt(new PR):pg(n);throw a}))}processSegmentAgainstRoute(e,r,n,i,s,o,a){return y6e(n,i,s,o)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,i,n,s,o):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,i,r,n,s,o):pg(i):pg(i)}expandSegmentAgainstRouteUsingRedirect(e,r,n,i,s,o){let{matched:a,consumedSegments:c,positionalParamSegments:u,remainingSegments:d}=$R(r,i,s);if(!a)return pg(r);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>b6e&&(this.allowRedirects=!1));let h=this.applyRedirects.applyRedirectCommands(c,i.redirectTo,u);return this.applyRedirects.lineralizeSegments(i,h).pipe(jn(m=>this.processSegment(e,n,r,m.concat(d),o,!1)))}matchSegmentAgainstRoute(e,r,n,i,s){let o=f6e(r,n,i,e,this.urlSerializer);return n.path==="**"&&(r.children={}),o.pipe(Dn(a=>a.matched?(e=n._injector??e,this.getChildConfig(e,n,i).pipe(Dn(({routes:c})=>{let u=n._loadedInjector??e,{consumedSegments:d,remainingSegments:h,parameters:m}=a,w=new bw(d,m,Object.freeze(B({},this.urlTree.queryParams)),this.urlTree.fragment,C6e(n),Jc(n),n.component??n._loadedComponent??null,n,x6e(n)),{segmentGroup:_,slicedSegments:C}=yq(r,d,h,c);if(C.length===0&&_.hasChildren())return this.processChildren(u,c,_).pipe(ft(R=>R===null?null:new Vo(w,R)));if(c.length===0&&C.length===0)return mt(new Vo(w,[]));let A=Jc(n)===s;return this.processSegment(u,c,_,C,A?Gt:s,!0).pipe(ft(R=>new Vo(w,R instanceof Vo?[R]:[])))}))):pg(r)))}getChildConfig(e,r,n){return r.children?mt({routes:r.children,injector:e}):r.loadChildren?r._loadedRoutes!==void 0?mt({routes:r._loadedRoutes,injector:r._loadedInjector}):a6e(e,r,n,this.urlSerializer).pipe(jn(i=>i?this.configLoader.loadChildren(e,r).pipe(si(s=>{r._loadedRoutes=s.routes,r._loadedInjector=s.injector})):u6e(r))):mt({routes:[],injector:e})}};function E6e(t){t.sort((e,r)=>e.value.outlet===Gt?-1:r.value.outlet===Gt?1:e.value.outlet.localeCompare(r.value.outlet))}function _6e(t){let e=t.value.routeConfig;return e&&e.path===""}function Hq(t){let e=[],r=new Set;for(let n of t){if(!_6e(n)){e.push(n);continue}let i=e.find(s=>n.value.routeConfig===s.value.routeConfig);i!==void 0?(i.children.push(...n.children),r.add(i)):e.push(n)}for(let n of r){let i=Hq(n.children);e.push(new Vo(n.value,i))}return e.filter(n=>!r.has(n))}function C6e(t){return t.data||{}}function x6e(t){return t.resolve||{}}function I6e(t,e,r,n,i,s){return jn(o=>v6e(t,e,r,n,o.extractedUrl,i,s).pipe(ft(({state:a,tree:c})=>_e(B({},o),{targetSnapshot:a,urlAfterRedirects:c}))))}function A6e(t,e){return jn(r=>{let{targetSnapshot:n,guards:{canActivateChecks:i}}=r;if(!i.length)return mt(r);let s=new Set(i.map(c=>c.route)),o=new Set;for(let c of s)if(!o.has(c))for(let u of Vq(c))o.add(u);let a=0;return Sn(o).pipe(yf(c=>s.has(c)?S6e(c,n,t,e):(c.data=BR(c,c.parent,t).resolve,mt(void 0))),si(()=>a++),Vm(1),jn(c=>a===o.size?mt(r):vs))})}function Vq(t){let e=t.children.map(r=>Vq(r)).flat();return[t,...e]}function S6e(t,e,r,n){let i=t.routeConfig,s=t._resolve;return i?.title!==void 0&&!Pq(i)&&(s[Cw]=i.title),D6e(s,t,e,n).pipe(ft(o=>(t._resolvedData=o,t.data=BR(t,t.parent,r).resolve,null)))}function D6e(t,e,r,n){let i=fR(t);if(i.length===0)return mt({});let s={};return Sn(i).pipe(jn(o=>R6e(t[o],e,r,n).pipe(Fo(),si(a=>{s[o]=a}))),Vm(1),Oy(s),tc(o=>Uq(o)?vs:Um(o)))}function R6e(t,e,r,n){let i=xw(e)??n,s=_g(t,i),o=s.resolve?s.resolve(e,r):ru(i,()=>s(e,r));return Bf(o)}function lR(t){return Dn(e=>{let r=t(e);return r?Sn(r).pipe(ft(()=>e)):mt(e)})}var $q=(()=>{let e=class e{buildTitle(n){let i,s=n.root;for(;s!==void 0;)i=this.getResolvedTitleForRoute(s)??i,s=s.children.find(o=>o.outlet===Gt);return i}getResolvedTitleForRoute(n){return n.data[Cw]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>xe(T6e),providedIn:"root"});let t=e;return t})(),T6e=(()=>{let e=class e extends $q{constructor(n){super(),this.title=n}updateTitle(n){let i=this.buildTitle(n);i!==void 0&&this.title.setTitle(i)}};e.\u0275fac=function(i){return new(i||e)(yt(dq))},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qR=new ot("",{providedIn:"root",factory:()=>({})}),WR=new ot(""),N6e=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=xe(BD)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return mt(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let i=Bf(n.loadComponent()).pipe(ft(qq),si(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),fh(()=>{this.componentLoaders.delete(n)})),s=new Fm(i,()=>new ii).pipe(Lm());return this.componentLoaders.set(n,s),s}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return mt({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let o=O6e(i,this.compiler,n,this.onLoadEndListener).pipe(fh(()=>{this.childrenLoaders.delete(i)})),a=new Fm(o,()=>new ii).pipe(Lm());return this.childrenLoaders.set(i,a),a}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function O6e(t,e,r,n){return Bf(t.loadChildren()).pipe(ft(qq),jn(i=>i instanceof Gy||Array.isArray(i)?mt(i):Sn(e.compileModuleAsync(i))),ft(i=>{n&&n(t);let s,o,a=!1;return Array.isArray(i)?(o=i,a=!0):(s=i.create(r).injector,o=s.get(WR,[],{optional:!0,self:!0}).flat()),{routes:o.map(VR),injector:s}}))}function M6e(t){return t&&typeof t=="object"&&"default"in t}function qq(t){return M6e(t)?t.default:t}var zR=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>xe(P6e),providedIn:"root"});let t=e;return t})(),P6e=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),k6e=new ot("");var L6e=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new ii,this.transitionAbortSubject=new ii,this.configLoader=xe(N6e),this.environmentInjector=xe(Es),this.urlSerializer=xe(FR),this.rootContexts=xe(k_),this.location=xe(tw),this.inputBindingEnabled=xe(HR,{optional:!0})!==null,this.titleStrategy=xe($q),this.options=xe(qR,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=xe(zR),this.createViewTransition=xe(k6e,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>mt(void 0),this.rootComponentType=null;let n=s=>this.events.next(new bR(s)),i=s=>this.events.next(new ER(s));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let i=++this.navigationId;this.transitions?.next(_e(B(B({},this.transitions.value),n),{id:i}))}setupNavigations(n,i,s){return this.transitions=new Oi({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:hw,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(_i(o=>o.id!==0),ft(o=>_e(B({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),Dn(o=>{this.currentTransition=o;let a=!1,c=!1;return mt(o).pipe(si(u=>{this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?_e(B({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Dn(u=>{let d=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!d&&h!=="reload"){let m="";return this.events.next(new Sh(u.id,this.urlSerializer.serialize(u.rawUrl),m,mR.IgnoredSameUrlNavigation)),u.resolve(null),vs}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return mt(u).pipe(Dn(m=>{let w=this.transitions?.getValue();return this.events.next(new gw(m.id,this.urlSerializer.serialize(m.extractedUrl),m.source,m.restoredState)),w!==this.transitions?.getValue()?vs:Promise.resolve(m)}),I6e(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),si(m=>{o.targetSnapshot=m.targetSnapshot,o.urlAfterRedirects=m.urlAfterRedirects,this.currentNavigation=_e(B({},this.currentNavigation),{finalUrl:m.urlAfterRedirects});let w=new R_(m.id,this.urlSerializer.serialize(m.extractedUrl),this.urlSerializer.serialize(m.urlAfterRedirects),m.targetSnapshot);this.events.next(w)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:m,extractedUrl:w,source:_,restoredState:C,extras:A}=u,R=new gw(m,this.urlSerializer.serialize(w),_,C);this.events.next(R);let L=Oq(this.rootComponentType).snapshot;return this.currentTransition=o=_e(B({},u),{targetSnapshot:L,urlAfterRedirects:w,extras:_e(B({},A),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=w,mt(o)}else{let m="";return this.events.next(new Sh(u.id,this.urlSerializer.serialize(u.extractedUrl),m,mR.IgnoredByUrlHandlingStrategy)),u.resolve(null),vs}}),si(u=>{let d=new gR(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}),ft(u=>(this.currentTransition=o=_e(B({},u),{guards:$Ce(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),o)),XCe(this.environmentInjector,u=>this.events.next(u)),si(u=>{if(o.guardsResult=u.guardsResult,vg(u.guardsResult))throw Lq(this.urlSerializer,u.guardsResult);let d=new yR(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(d)}),_i(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",Ea.GuardRejected),!1)),lR(u=>{if(u.guards.canActivateChecks.length)return mt(u).pipe(si(d=>{let h=new wR(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}),Dn(d=>{let h=!1;return mt(d).pipe(A6e(this.paramsInheritanceStrategy,this.environmentInjector),si({next:()=>h=!0,complete:()=>{h||this.cancelNavigationTransition(d,"",Ea.NoDataFromResolver)}}))}),si(d=>{let h=new vR(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(h)}))}),lR(u=>{let d=h=>{let m=[];h.routeConfig?.loadComponent&&!h.routeConfig._loadedComponent&&m.push(this.configLoader.loadComponent(h.routeConfig).pipe(si(w=>{h.component=w}),ft(()=>{})));for(let w of h.children)m.push(...d(w));return m};return jm(d(u.targetSnapshot.root)).pipe(wf(null),qs(1))}),lR(()=>this.afterPreactivation()),Dn(()=>{let{currentSnapshot:u,targetSnapshot:d}=o,h=this.createViewTransition?.(this.environmentInjector,u.root,d.root);return h?Sn(h).pipe(ft(()=>o)):mt(o)}),ft(u=>{let d=kCe(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=o=_e(B({},u),{targetRouterState:d}),this.currentNavigation.targetRouterState=d,o}),si(()=>{this.events.next(new ww)}),VCe(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),qs(1),si({next:u=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Ah(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),bf(this.transitionAbortSubject.pipe(si(u=>{throw u}))),fh(()=>{!a&&!c&&this.cancelNavigationTransition(o,"",Ea.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),tc(u=>{if(c=!0,Bq(u))this.events.next(new Ff(o.id,this.urlSerializer.serialize(o.extractedUrl),u.message,u.cancellationCode)),BCe(u)?this.events.next(new vw(u.url)):o.resolve(!1);else{this.events.next(new yw(o.id,this.urlSerializer.serialize(o.extractedUrl),u,o.targetSnapshot??void 0));try{o.resolve(n.errorHandler(u))}catch(d){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(d)}}return vs}))}))}cancelNavigationTransition(n,i,s){let o=new Ff(n.id,this.urlSerializer.serialize(n.extractedUrl),i,s);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function F6e(t){return t!==hw}var B6e=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>xe(U6e),providedIn:"root"});let t=e;return t})(),LR=class{shouldDetach(e){return!1}store(e,r){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,r){return e.routeConfig===r.routeConfig}},U6e=(()=>{let e=class e extends LR{};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=YE(e)))(s||e)}})(),e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Wq=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:()=>xe(j6e),providedIn:"root"});let t=e;return t})(),j6e=(()=>{let e=class e extends Wq{constructor(){super(...arguments),this.location=xe(tw),this.urlSerializer=xe(FR),this.options=xe(qR,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=xe(zR),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Lf,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Oq(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{i.type==="popstate"&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof gw)this.stateMemento=this.createStateMemento();else if(n instanceof Sh)this.rawUrlTree=i.initialUrl;else if(n instanceof R_){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let s=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(s,i)}}else n instanceof ww?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):n instanceof Ff&&(n.code===Ea.GuardRejected||n.code===Ea.NoDataFromResolver)?this.restoreHistory(i):n instanceof yw?this.restoreHistory(i,!0):n instanceof Ah&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){let s=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(s)||i.extras.replaceUrl){let o=this.browserPageId,a=B(B({},i.extras.state),this.generateNgRouterState(i.id,o));this.location.replaceState(s,"",a)}else{let o=B(B({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(s,"",o)}}restoreHistory(n,i=!1){if(this.canceledNavigationResolution==="computed"){let s=this.browserPageId,o=this.currentPageId-s;o!==0?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&o===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(s){return(n||(n=YE(e)))(s||e)}})(),e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),fw=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(fw||{});function H6e(t,e){t.events.pipe(_i(r=>r instanceof Ah||r instanceof Ff||r instanceof yw||r instanceof Sh),ft(r=>r instanceof Ah||r instanceof Sh?fw.COMPLETE:(r instanceof Ff?r.code===Ea.Redirect||r.code===Ea.SupersededByNewNavigation:!1)?fw.REDIRECTING:fw.FAILED),_i(r=>r!==fw.REDIRECTING),qs(1)).subscribe(()=>{e()})}function V6e(t){throw t}var $6e={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},q6e={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},zq=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=xe(o_),this.stateManager=xe(Wq),this.options=xe(qR,{optional:!0})||{},this.pendingTasks=xe(cg),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=xe(L6e),this.urlSerializer=xe(FR),this.location=xe(tw),this.urlHandlingStrategy=xe(zR),this._events=new ii,this.errorHandler=this.options.errorHandler||V6e,this.navigated=!1,this.routeReuseStrategy=xe(B6e),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=xe(WR,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!xe(HR,{optional:!0}),this.eventsSubscription=new Wn,this.isNgZoneEnabled=xe(oi)instanceof oi&&oi.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(i=>{try{let s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(s!==null&&o!==null){if(this.stateManager.handleRouterEvent(i,o),i instanceof Ff&&i.code!==Ea.Redirect&&i.code!==Ea.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Ah)this.navigated=!0;else if(i instanceof vw){let a=this.urlHandlingStrategy.merge(i.url,s.currentRawUrl),c={info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||F6e(s.source)};this.scheduleNavigation(a,hw,null,c,{resolve:s.resolve,reject:s.reject,promise:s.promise})}}z6e(i)&&this._events.next(i)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),hw,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,s){let o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){let u=B({},s);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let c=this.parseUrl(n);this.scheduleNavigation(c,i,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(VR),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){let{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:u}=i,d=u?this.currentUrlTree.fragment:a,h=null;switch(c){case"merge":h=B(B({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let m;try{let w=s?s.snapshot:this.routerState.snapshot.root;m=Dq(w)}catch{(typeof n[0]!="string"||!n[0].startsWith("/"))&&(n=[]),m=this.currentUrlTree.root}return Rq(m,n,h,d??null)}navigateByUrl(n,i={skipLocationChange:!1}){let s=vg(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,hw,null,i)}navigate(n,i={skipLocationChange:!1}){return W6e(n),this.navigateByUrl(this.createUrlTree(n,i),i)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,i){let s;if(i===!0?s=B({},$6e):i===!1?s=B({},q6e):s=i,vg(n))return hq(this.currentUrlTree,n,s);let o=this.parseUrl(n);return hq(this.currentUrlTree,o,s)}removeEmptyProps(n){return Object.entries(n).reduce((i,[s,o])=>(o!=null&&(i[s]=o),i),{})}scheduleNavigation(n,i,s,o,a){if(this.disposed)return Promise.resolve(!1);let c,u,d;a?(c=a.resolve,u=a.reject,d=a.promise):d=new Promise((m,w)=>{c=m,u=w});let h=this.pendingTasks.add();return H6e(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:c,reject:u,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(m=>Promise.reject(m))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function W6e(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new gt(4008,!1)}function z6e(t){return!(t instanceof ww)&&!(t instanceof vw)}var G6e=new ot("");function Gq(t,...e){return Ho([{provide:WR,multi:!0,useValue:t},[],{provide:bg,useFactory:Z6e,deps:[zq]},{provide:a_,multi:!0,useFactory:K6e},e.map(r=>r.\u0275providers)])}function Z6e(t){return t.routerState.root}function K6e(){let t=xe(nu);return e=>{let r=t.get(Mf);if(e!==r.components[0])return;let n=t.get(zq),i=t.get(J6e);t.get(Y6e)===1&&n.initialNavigation(),t.get(Q6e,null,tr.Optional)?.setUpPreloading(),t.get(G6e,null,tr.Optional)?.init(),n.resetRootComponentType(r.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var J6e=new ot("",{factory:()=>new ii}),Y6e=new ot("",{providedIn:"root",factory:()=>1});var Q6e=new ot("");function Zq(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Kq(t){return t}function GR(t,e){e=e||{};let r=e.delimiter||".",n=e.maxDepth,i=e.transformKey||Kq,s={};function o(a,c,u){u=u||1,Object.keys(a).forEach(function(d){let h=a[d],m=e.safe&&Array.isArray(h),w=Object.prototype.toString.call(h),_=Zq(h),C=w==="[object Object]"||w==="[object Array]",A=c?c+r+i(d):i(d);if(!m&&!_&&C&&Object.keys(h).length&&(!e.maxDepth||u<n))return o(h,A,u+1);s[A]=h})}return o(t),s}function ZR(t,e){e=e||{};let r=e.delimiter||".",n=e.overwrite||!1,i=e.transformKey||Kq,s={};if(Zq(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(d){let h=Number(d);return isNaN(h)||d.indexOf(".")!==-1||e.object?d:h}function c(d,h,m){return Object.keys(m).reduce(function(w,_){return w[d+r+_]=m[_],w},h)}function u(d){let h=Object.prototype.toString.call(d),m=h==="[object Array]",w=h==="[object Object]";if(d){if(m)return!d.length;if(w)return!Object.keys(d).length}else return!0}return t=Object.keys(t).reduce(function(d,h){let m=Object.prototype.toString.call(t[h]);return!(m==="[object Object]"||m==="[object Array]")||u(t[h])?(d[h]=t[h],d):c(h,d,GR(t[h],e))},{}),Object.keys(t).forEach(function(d){let h=d.split(r).map(i),m=a(h.shift()),w=a(h[0]),_=s;for(;w!==void 0;){if(m==="__proto__")return;let C=Object.prototype.toString.call(_[m]),A=C==="[object Object]"||C==="[object Array]";if(!n&&!A&&typeof _[m]<"u")return;(n&&!A||!n&&_[m]==null)&&(_[m]=typeof w=="number"&&!e.object?[]:{}),_=_[m],h.length>0&&(m=a(h.shift()),w=a(h[0]))}_[m]=ZR(t[d],e)}),s}var JR=class{translations;constructor(e){this.translations=e}getTranslation(e){return mt(this.translations.get(e)||{})}},Xq=new ot("TRANSLOCO_LOADER");function Jq(t,e){return t&&(Object.prototype.hasOwnProperty.call(t,e)?t[e]:e.split(".").reduce((r,n)=>r?.[n],t))}function X6e(t,e,r){t=B({},t);let n=e.split("."),i=n.length-1;return n.reduce((s,o,a)=>(a===i?s[o]=r:s[o]=Array.isArray(s[o])?s[o].slice():B({},s[o]),s&&s[o]),t),t}function eW(t){return t?Array.isArray(t)?t.length:tT(t)?Object.keys(t).length:t?t.length:0:0}function exe(t){return eW(t)===0}function txe(t){return typeof t=="function"}function Aw(t){return typeof t=="string"}function tT(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function tW(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,r)=>r==0?e.toLowerCase():e.toUpperCase()).replace(/\s+|_|-|\//g,"")}function YR(t){return t==null}function Yq(t){return YR(t)===!1}function rT(t){return t&&typeof t.scope=="string"}function rxe(t){return Array.isArray(t)&&t.every(rT)}function nxe(t){return t&&tT(t.loader)}function ixe(t){return ZR(t)}function Qq(t){return GR(t,{safe:!0})}var Cg=new ot("TRANSLOCO_CONFIG",{providedIn:"root",factory:()=>Sw}),Sw={defaultLang:"en",reRenderOnLangChange:!1,prodMode:!1,failedRetries:2,fallbackLang:[],availableLangs:[],missingHandler:{logMissingKey:!0,useFallbackTranslation:!1,allowEmpty:!1},flatten:{aot:!1},interpolation:["{{","}}"]};function sxe(t={}){return _e(B(B({},Sw),t),{missingHandler:B(B({},Sw.missingHandler),t.missingHandler),flatten:B(B({},Sw.flatten),t.flatten)})}var rW=new ot("TRANSLOCO_TRANSPILER"),oxe=(()=>{class t{interpolationMatcher;constructor(r){this.interpolationMatcher=axe(r??Sw)}transpile(r,n={},i,s){return Aw(r)?r.replace(this.interpolationMatcher,(o,a)=>(a=a.trim(),Yq(n[a])?n[a]:Yq(i[a])?this.transpile(i[a],n,i,s):"")):(n&&(tT(r)?r=this.handleObject(r,n,i,s):Array.isArray(r)&&(r=this.handleArray(r,n,i,s))),r)}handleObject(r,n={},i,s){let o=r;return Object.keys(n).forEach(a=>{let c=Jq(o,a),u=Jq(n,a),d=this.transpile(c,u,i,s);o=X6e(o,a,d)}),o}handleArray(r,n={},i,s){return r.map(o=>this.transpile(o,n,i,s))}static \u0275fac=function(n){return new(n||t)(yt(Cg,8))};static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})();function axe(t){let[e,r]=t.interpolation;return new RegExp(`${e}(.*?)${r}`,"g")}var nW=new ot("TRANSLOCO_MISSING_HANDLER"),cxe=(()=>{class t{handle(r,n){if(n.missingHandler.logMissingKey&&!n.prodMode){let i=`Missing translation for '${r}'`;console.warn(`%c ${i}`,"font-size: 12px; color: red")}return r}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})(),iW=new ot("TRANSLOCO_INTERCEPTOR"),lxe=(()=>{class t{preSaveTranslation(r){return r}preSaveTranslationKey(r,n){return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})(),sW=new ot("TRANSLOCO_FALLBACK_STRATEGY"),uxe=(()=>{class t{userConfig;constructor(r){this.userConfig=r}getNextLangs(){let r=this.userConfig.fallbackLang;if(!r)throw new Error("When using the default fallback, a fallback language must be provided in the config!");return Array.isArray(r)?r:[r]}static \u0275fac=function(n){return new(n||t)(yt(Cg))};static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})();function Dw(t){if(!t)return"";let e=t.split("/");return e.pop(),e.join("/")}function Uf(t){return t?t.split("/").pop():""}function QR(t,e,r="|"){if(Aw(t)){let n=t.split(r),i=n.pop();return i===e?[!0,n.toString()]:[!1,i]}return[!1,""]}function fxe(t,e){let[r]=QR(e,"static");return r?!1:!!t.config.reRenderOnLangChange}function dxe(t){return t?e=>e:qs(1)}function hxe(t,e){return Object.keys(t).reduce((r,n)=>(r[`${e}/${n}`]=t[n],r),{})}function oW(t,e){return nxe(t)?hxe(t.loader,e):void 0}function KR(t){return{scope:Dw(t)||null,langName:Uf(t)}}function aW(t){let{path:e,inlineLoader:r,mainLoader:n,data:i}=t;if(r){let s=r[e];if(txe(s)===!1)throw`You're using an inline loader but didn't provide a loader for ${e}`;return r[e]().then(o=>o.default?o.default:o)}return n.getTranslation(e,i)}function pxe({mainLoader:t,path:e,data:r,fallbackPath:n,inlineLoader:i}){return(n?[e,n]:[e]).map(o=>{let a=aW({path:o,mainLoader:t,inlineLoader:i,data:r});return Sn(a).pipe(ft(c=>({translation:c,lang:o})))})}var mxe;var gxe=(()=>{class t{loader;parser;missingHandler;interceptor;fallbackStrategy;langChanges$;subscription=null;translations=new Map;cache=new Map;firstFallbackLang;defaultLang="";availableLangs=[];isResolvedMissingOnce=!1;lang;failedLangs=new Set;events=new ii;events$=this.events.asObservable();config;constructor(r,n,i,s,o,a){this.loader=r,this.parser=n,this.missingHandler=i,this.interceptor=s,this.fallbackStrategy=a,this.loader||(this.loader=new JR(this.translations)),mxe=this,this.config=JSON.parse(JSON.stringify(o)),this.setAvailableLangs(this.config.availableLangs||[]),this.setFallbackLangForMissingTranslation(this.config),this.setDefaultLang(this.config.defaultLang),this.lang=new Oi(this.getDefaultLang()),this.langChanges$=this.lang.asObservable(),this.subscription=this.events$.subscribe(c=>{c.type==="translationLoadSuccess"&&c.wasFailure&&this.setActiveLang(c.payload.langName)})}getDefaultLang(){return this.defaultLang}setDefaultLang(r){this.defaultLang=r}getActiveLang(){return this.lang.getValue()}setActiveLang(r){return this.parser.onLangChanged?.(r),this.lang.next(r),this.events.next({type:"langChanged",payload:KR(r)}),this}setAvailableLangs(r){this.availableLangs=r}getAvailableLangs(){return this.availableLangs}load(r,n={}){let i=this.cache.get(r);if(i)return i;let s,o=this._isLangScoped(r),a;o&&(a=Dw(r));let c={path:r,mainLoader:this.loader,inlineLoader:n.inlineLoader,data:o?{scope:a}:void 0};if(this.useFallbackTranslation(r)){let d=o?`${a}/${this.firstFallbackLang}`:this.firstFallbackLang,h=pxe(_e(B({},c),{fallbackPath:d}));s=rE(h)}else{let d=aW(c);s=Sn(d)}let u=s.pipe(kA(this.config.failedRetries),si(d=>{if(Array.isArray(d)){d.forEach(h=>{this.handleSuccess(h.lang,h.translation),h.lang!==r&&this.cache.set(h.lang,mt({}))});return}this.handleSuccess(r,d)}),tc(d=>(this.config.prodMode||console.error(`Error while trying to load "${r}"`,d),this.handleFailure(r,n))),vf(1));return this.cache.set(r,u),u}translate(r,n={},i=this.getActiveLang()){if(!r)return r;let{scope:s,resolveLang:o}=this.resolveLangAndScope(i);if(Array.isArray(r))return r.map(u=>this.translate(s?`${s}.${u}`:u,n,o));r=s?`${s}.${r}`:r;let a=this.getTranslation(o),c=a[r];return c?this.parser.transpile(c,n,a,r):this._handleMissingKey(r,c,n)}selectTranslate(r,n,i,s=!1){let o,a=(u,d)=>this.load(u,d).pipe(ft(()=>s?this.translateObject(r,n,u):this.translate(r,n,u)));if(YR(i))return this.langChanges$.pipe(Dn(u=>a(u)));if(rxe(i)||rT(i)){let u=Array.isArray(i)?i[0]:i;i=u.scope,o=oW(u,u.scope)}if(i=i,this.isLang(i)||this.isScopeWithLang(i))return a(i);let c=i;return this.langChanges$.pipe(Dn(u=>a(`${c}/${u}`,{inlineLoader:o})))}isScopeWithLang(r){return this.isLang(Uf(r))}translateObject(r,n={},i=this.getActiveLang()){if(Aw(r)||Array.isArray(r)){let{resolveLang:o,scope:a}=this.resolveLangAndScope(i);if(Array.isArray(r))return r.map(d=>this.translateObject(a?`${a}.${d}`:d,n,o));let c=this.getTranslation(o);r=a?`${a}.${r}`:r;let u=ixe(this.getObjectByKey(c,r));return exe(u)?this.translate(r,n,i):this.parser.transpile(u,n,c,r)}let s=[];for(let[o,a]of this.getEntries(r))s.push(this.translateObject(o,a,i));return s}selectTranslateObject(r,n,i){if(Aw(r)||Array.isArray(r))return this.selectTranslate(r,n,i,!0);let[[s,o],...a]=this.getEntries(r);return this.selectTranslateObject(s,o,i).pipe(ft(c=>{let u=[c];for(let[d,h]of a)u.push(this.translateObject(d,h,i));return u}))}getTranslation(r){if(r){if(this.isLang(r))return this.translations.get(r)||{};{let{scope:n,resolveLang:i}=this.resolveLangAndScope(r),s=this.translations.get(i)||{};return this.getObjectByKey(s,n)}}return this.translations}selectTranslation(r){let n=this.langChanges$;if(r){let i=Uf(r)!==r;this.isLang(r)||i?n=mt(r):n=this.langChanges$.pipe(ft(s=>`${r}/${s}`))}return n.pipe(Dn(i=>this.load(i).pipe(ft(()=>this.getTranslation(i)))))}setTranslation(r,n=this.getActiveLang(),i={}){let o=B(B({},{merge:!0,emitChange:!0}),i),a=Dw(n),c=r;if(a){let w=this.getMappedScope(a);c=Qq({[w]:r})}let u=a?Uf(n):n,d=B(B({},o.merge&&this.getTranslation(u)),c),h=this.config.flatten.aot?d:Qq(d),m=this.interceptor.preSaveTranslation(h,u);this.translations.set(u,m),o.emitChange&&this.setActiveLang(this.getActiveLang())}setTranslationKey(r,n,i=this.getActiveLang(),s={}){let o=this.interceptor.preSaveTranslationKey(r,n,i),a={[r]:o};this.setTranslation(a,i,_e(B({},s),{merge:!0}))}setFallbackLangForMissingTranslation({fallbackLang:r}){let n=Array.isArray(r)?r[0]:r;r&&this.useFallbackTranslation(n)&&(this.firstFallbackLang=n)}_handleMissingKey(r,n,i){if(this.config.missingHandler.allowEmpty&&n==="")return"";if(!this.isResolvedMissingOnce&&this.useFallbackTranslation()){this.isResolvedMissingOnce=!0;let s=this.translate(r,i,this.firstFallbackLang);return this.isResolvedMissingOnce=!1,s}return this.missingHandler.handle(r,this.getMissingHandlerData(),i)}_isLangScoped(r){return this.getAvailableLangsIds().indexOf(r)===-1}isLang(r){return this.getAvailableLangsIds().indexOf(r)!==-1}_loadDependencies(r,n){let i=Uf(r);return this._isLangScoped(r)&&!this.isLoadedTranslation(i)?jm([this.load(i),this.load(r,{inlineLoader:n})]):this.load(r,{inlineLoader:n})}_completeScopeWithLang(r){return this._isLangScoped(r)&&!this.isLang(Uf(r))?`${r}/${this.getActiveLang()}`:r}_setScopeAlias(r,n){this.config.scopeMapping||(this.config.scopeMapping={}),this.config.scopeMapping[r]=n}ngOnDestroy(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cache.clear()}isLoadedTranslation(r){return eW(this.getTranslation(r))}getAvailableLangsIds(){let r=this.getAvailableLangs()[0];return Aw(r)?this.getAvailableLangs():this.getAvailableLangs().map(n=>n.id)}getMissingHandlerData(){return _e(B({},this.config),{activeLang:this.getActiveLang(),availableLangs:this.availableLangs,defaultLang:this.defaultLang})}useFallbackTranslation(r){return this.config.missingHandler.useFallbackTranslation&&r!==this.firstFallbackLang}handleSuccess(r,n){this.setTranslation(n,r,{emitChange:!1}),this.events.next({wasFailure:!!this.failedLangs.size,type:"translationLoadSuccess",payload:KR(r)}),this.failedLangs.forEach(i=>this.cache.delete(i)),this.failedLangs.clear()}handleFailure(r,n){YR(n.failedCounter)&&(n.failedCounter=0,n.fallbackLangs||(n.fallbackLangs=this.fallbackStrategy.getNextLangs(r)));let i=r.split("/"),o=n.fallbackLangs[n.failedCounter];if(this.failedLangs.add(r),this.cache.has(o))return this.handleSuccess(o,this.getTranslation(o)),vs;let a=o===i[i.length-1];if(!o||a){let u="Unable to load translation and all the fallback languages";throw i.length>1&&(u+=", did you misspelled the scope name?"),new Error(u)}let c=o;return i.length>1&&(i[i.length-1]=o,c=i.join("/")),n.failedCounter++,this.events.next({type:"translationLoadFailure",payload:KR(r)}),this.load(c,n)}getMappedScope(r){let{scopeMapping:n={}}=this.config;return n[r]||tW(r)}resolveLangAndScope(r){let n=r,i;if(this._isLangScoped(r)){let s=Uf(r),o=this.isLang(s);n=o?s:this.getActiveLang(),i=this.getMappedScope(o?Dw(r):r)}return{scope:i,resolveLang:n}}getObjectByKey(r,n){let i={},s=`${n}.`;for(let o in r)o.startsWith(s)&&(i[o.replace(s,"")]=r[o]);return i}getEntries(r){return r instanceof Map?r.entries():Object.entries(r)}static \u0275fac=function(n){return new(n||t)(yt(Xq,8),yt(rW),yt(nW),yt(iW),yt(Cg),yt(sW))};static \u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var yxe=new ot("TRANSLOCO_LANG"),mct=new ot("TRANSLOCO_LOADING_TEMPLATE"),wxe=new ot("TRANSLOCO_SCOPE"),XR=class{initialized=!1;resolve({inline:e,provider:r,active:n}){let i=n;if(this.initialized)return i=n,i;if(r){let[,s]=QR(r,"static");i=s}if(e){let[,s]=QR(e,"static");i=s}return this.initialized=!0,i}resolveLangBasedOnScope(e){return Dw(e)?Uf(e):e}resolveLangPath(e,r){return r?`${r}/${e}`:e}},eT=class{service;constructor(e){this.service=e}resolve(e){let{inline:r,provider:n}=e;if(r)return r;if(n){if(rT(n)){let{scope:i,alias:s=tW(i)}=n;return this.service._setScopeAlias(i,s),i}return n}}};var qi=(()=>{class t{service;providerScope;providerLang;cdr;subscription=null;lastValue="";lastKey;path;langResolver=new XR;scopeResolver;constructor(r,n,i,s){this.service=r,this.providerScope=n,this.providerLang=i,this.cdr=s,this.scopeResolver=new eT(this.service)}transform(r,n,i){if(!r)return r;let s=n?`${r}${JSON.stringify(n)}`:r;if(s===this.lastKey)return this.lastValue;this.lastKey=s,this.subscription?.unsubscribe();let o=fxe(this.service,this.providerLang||i);return this.subscription=this.service.langChanges$.pipe(Dn(a=>{let c=this.langResolver.resolve({inline:i,provider:this.providerLang,active:a});return Array.isArray(this.providerScope)?rE(this.providerScope.map(u=>this.resolveScope(c,u))):this.resolveScope(c,this.providerScope)}),dxe(o)).subscribe(()=>this.updateValue(r,n)),this.lastValue}ngOnDestroy(){this.subscription?.unsubscribe(),this.subscription=null}updateValue(r,n){let i=this.langResolver.resolveLangBasedOnScope(this.path);this.lastValue=this.service.translate(r,n,i),this.cdr.markForCheck()}resolveScope(r,n){let i=this.scopeResolver.resolve({inline:void 0,provider:n});this.path=this.langResolver.resolveLangPath(r,i);let s=oW(n,i);return this.service._loadDependencies(this.path,s)}static \u0275fac=function(n){return new(n||t)(Mr(gxe,16),Mr(wxe,24),Mr(yxe,24),Mr(su,16))};static \u0275pipe=LE({name:"transloco",type:t,pure:!1,standalone:!0})}return t})();function cW(t){let e=[Exe(oxe),Cxe(cxe),xxe(lxe),_xe(uxe)];return t.config&&e.push(vxe(t.config)),t.loader&&e.push(bxe(t.loader)),e}function vxe(t){return Ho([{provide:Cg,useValue:sxe(t)}])}function bxe(t){return Ho([{provide:Xq,useClass:t}])}function Exe(t){return Ho([{provide:rW,useClass:t,deps:[Cg]}])}function _xe(t){return Ho([{provide:sW,useClass:t,deps:[Cg]}])}function Cxe(t){return Ho([{provide:nW,useClass:t}])}function xxe(t){return Ho([{provide:iW,useClass:t}])}var gct=new ot("TRANSLOCO_TEST_LANGS - Available testing languages"),yct=new ot("TRANSLOCO_TEST_OPTIONS - Testing options");var lW=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-footer"]],standalone:!0,features:[cr],decls:61,vars:41,consts:[[1,"footer"],[1,"container","flex","flex-col","md:flex-row","justify-between"],[1,"logo"],[1,"socials"],[1,"title","sm:mb-2","sm:mt-4","md:mb-4","md:mt-0"],["href","https://twitter.com/LayerAIorg","target","_blank",1,"mb-1"],["href","https://t.me/LayerAI_org","target","_blank",1,"mb-1"],["href","https://layerai.org/","target","_blank",1,"mb-1"],[1,"pages"],["href","https://layerai.org/business","target","_blank",1,"mb-1"],["href","https://layerai.org/economy","target","_blank",1,"mb-1"],["href","https://layerai.org/technology","target","_blank",1,"mb-1"],["href","https://farm.layerai.org/","target","_blank"],[1,"token-contract","sm:mb-2","sm:mt-4","md:mb-4","md:mt-0"],[1,"title","sm:mb-2","md:mb-4"],["href","https://etherscan.io/token/0x168e209D7b2F58f1f24b8Ae7B7d35E662bBF11Cc","target","_blank",1,"mb-1"],["href","https://bscscan.com/address/0x776F9987D9DEED90eeD791cbD824D971FD5CCF09","target","_blank",1,"mb-1"],[1,"container"],[1,"banner-wrapper","flex","flex-col","md:flex-row","justify-between"],["href","https://x.com/LayerAIorg/","target","_blank",1,"share-feedback"],["ngSrc","./assets/icons/arrow-right-white.svg","alt","Arrow","width","20","height","20"],[1,"banner","sm:mt-2","md:mt-0"],[1,"cover","left"],[1,"scroll"],[1,"m-scroll"],[3,"innerHTML"],[1,"cover","right"],[1,"socials-links","flex","flex-row","sm:justify-center","sm:mt-2","md:mt-0"],["href","https://twitter.com/LayerAIorg","target","_blank",1,"me-2"],["ngSrc","./assets/icons/x.svg","height","40","width","40","alt","X"],["href","https://t.me/LayerAI_org","target","_blank",1,"me-2"],["ngSrc","./assets/icons/telegram.svg","height","40","width","40","alt","Telegram"]],template:function(i,s){i&1&&(we(0,"div",0)(1,"div",1)(2,"div",2),je(3),et(4,"transloco"),ve(),we(5,"div",3)(6,"div",4),je(7),et(8,"transloco"),ve(),we(9,"a",5),je(10),et(11,"transloco"),ve(),we(12,"a",6),je(13),et(14,"transloco"),ve(),we(15,"a",7),je(16),et(17,"transloco"),ve()(),we(18,"div",8)(19,"div",4),je(20),et(21,"transloco"),ve(),we(22,"a",9),je(23),et(24,"transloco"),ve(),we(25,"a",10),je(26),et(27,"transloco"),ve(),we(28,"a",11),je(29),et(30,"transloco"),ve(),we(31,"a",12),je(32),et(33,"transloco"),ve()(),we(34,"div",13)(35,"div",14),je(36),et(37,"transloco"),ve(),we(38,"a",15),je(39,"LAI Contract (ERC-20)"),ve(),we(40,"a",16),je(41,"LAI Contract (BEP-20)"),ve()()(),we(42,"div",17)(43,"div",18)(44,"a",19),je(45),et(46,"uppercase"),et(47,"transloco"),rt(48,"img",20),ve(),we(49,"div",21),rt(50,"div",22),we(51,"div",23)(52,"div",24),rt(53,"span",25),et(54,"transloco"),ve()(),rt(55,"div",26),ve(),we(56,"div",27)(57,"a",28),rt(58,"img",29),ve(),we(59,"a",30),rt(60,"img",31),ve()()()()()),i&2&&(Ie(3),Bt(" ",it(4,13,"landingPage.footer.joinTheRevolution")," "),Ie(4),ln(it(8,15,"landingPage.footer.socials")),Ie(3),ln(it(11,17,"landingPage.footer.x")),Ie(3),ln(it(14,19,"landingPage.footer.telegram")),Ie(3),ln(it(17,21,"landingPage.footer.app")),Ie(4),ln(it(21,23,"landingPage.footer.pages")),Ie(3),ln(it(24,25,"landingPage.footer.business")),Ie(3),ln(it(27,27,"landingPage.footer.economy")),Ie(3),ln(it(30,29,"landingPage.footer.technology")),Ie(3),ln(it(33,31,"landingPage.footer.staking")),Ie(4),ln(it(37,33,"landingPage.footer.tokenContract")),Ie(9),Bt("",it(46,35,it(47,37,"landingPage.footer.shareFeedback"))," "),Ie(8),Ht("innerHTML",it(54,39,"landingPage.footer.bannerText"),mD))},dependencies:[qi,G$,Pf],styles:[".footer[_ngcontent-%COMP%]{background:#000;padding:50px 0 10px;color:#fff}.footer[_ngcontent-%COMP%]   .logo[_ngcontent-%COMP%]{font-size:4rem;line-height:4.2rem;max-width:400px;font-family:Mansory,sans-serif}.footer[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex}.footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:#ccc}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]{margin-top:60px;margin-bottom:15px;position:relative;align-items:center}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .share-feedback[_ngcontent-%COMP%]{border:1px solid rgba(255,255,255,.3);border-radius:50px;padding:8px 25px;min-width:260px}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .share-feedback[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:inline-block}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .banner[_ngcontent-%COMP%]{width:100%;justify-content:center;display:flex;inset:0;overflow:hidden;z-index:3;position:relative}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .cover[_ngcontent-%COMP%]{z-index:2;width:20%;height:100%;position:absolute;top:0;bottom:0}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .cover.left[_ngcontent-%COMP%]{background-image:linear-gradient(to right,black 25%,transparent);left:0;right:auto}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .cover.right[_ngcontent-%COMP%]{background-image:linear-gradient(to left,black 25%,transparent);right:0;left:auto}.footer[_ngcontent-%COMP%]   .banner-wrapper[_ngcontent-%COMP%]   .socials-links[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{min-width:40px}.scroll[_ngcontent-%COMP%]{position:relative;overflow:hidden;z-index:1;padding:0;margin-left:10px;margin-right:10px}.scroll[_ngcontent-%COMP%]   .m-scroll[_ngcontent-%COMP%]{overflow:hidden;height:100%;white-space:nowrap;animation:_ngcontent-%COMP%_scrollText 30s infinite linear;margin:0;font-size:0;display:inline-block}.scroll[_ngcontent-%COMP%]   .m-scroll[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:14px;display:inline-block;min-width:100vw;margin:0;padding:0;color:#fff}@keyframes _ngcontent-%COMP%_scrollText{0%{transform:translate(0)}to{transform:translate(-50%)}}"],changeDetection:0});let t=e;return t})();var uW=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-dotted-circles"]],standalone:!0,features:[cr],decls:7,vars:0,consts:[[1,"w-[944px]","h-[944px]","relative"],["width","944","height","944","viewBox","0 0 944 944","fill","none","xmlns","http://www.w3.org/2000/svg",1,"absolute","left-1/2","-translate-x-1/2","top-1/2","-translate-y-1/2"],["cx","472","cy","472","r","471","stroke","white","stroke-width","2","stroke-dasharray","2 20"],["width","660","height","660","viewBox","0 0 660 660","fill","none","xmlns","http://www.w3.org/2000/svg",1,"absolute","left-1/2","-translate-x-1/2","top-1/2","-translate-y-1/2"],["cx","330","cy","330","r","329","stroke","white","stroke-width","2","stroke-dasharray","2 20"],["width","386","height","386","viewBox","0 0 386 386","fill","none","xmlns","http://www.w3.org/2000/svg",1,"absolute","left-1/2","-translate-x-1/2","top-1/2","-translate-y-1/2"],["cx","193","cy","193","r","192","stroke","white","stroke-width","2","stroke-dasharray","2 20"]],template:function(i,s){i&1&&(we(0,"div",0),Gc(),we(1,"svg",1),rt(2,"circle",2),ve(),we(3,"svg",3),rt(4,"circle",4),ve(),we(5,"svg",5),rt(6,"circle",6),ve()())},encapsulation:2,changeDetection:0});let t=e;return t})();var fW=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-shadow-ellipse"]],standalone:!0,features:[cr],decls:8,vars:0,consts:[["width","530","height","530","viewBox","0 0 530 530","fill","none","xmlns","http://www.w3.org/2000/svg"],["filter","url(#filter0_f_530_1690)"],["cx","265","cy","265","r","191","fill","black","fill-opacity","0.8"],["id","filter0_f_530_1690","x","0","y","0","width","530","height","530","filterUnits","userSpaceOnUse","color-interpolation-filters","sRGB"],["flood-opacity","0","result","BackgroundImageFix"],["mode","normal","in","SourceGraphic","in2","BackgroundImageFix","result","shape"],["stdDeviation","37","result","effect1_foregroundBlur_530_1690"]],template:function(i,s){i&1&&(Gc(),we(0,"svg",0)(1,"g",1),rt(2,"circle",2),ve(),we(3,"defs")(4,"filter",3),rt(5,"feFlood",4)(6,"feBlend",5)(7,"feGaussianBlur",6),ve()()())},encapsulation:2,changeDetection:0});let t=e;return t})();var Ve=t=>t??Sy;var Ca=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},$o=class extends be{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=qe.state.address,this.balanceVal=qe.state.balance,this.balanceSymbol=qe.state.balanceSymbol,this.profileName=qe.state.profileName,this.profileImage=qe.state.profileImage,this.network=ut.state.caipNetwork,this.isUnsupportedChain=ut.state.isUnsupportedChain,this.unsubscribe.push(qe.subscribe(e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")}),ut.subscribeKey("caipNetwork",e=>this.network=e),ut.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=Ot.getNetworkImage(this.network),r=this.balance==="show";return Z`
      <wui-account-button
        .disabled=${!!this.disabled}
        .isUnsupportedChain=${this.isUnsupportedChain}
        address=${Ve(this.profileName??this.address)}
        ?isProfileName=${!!this.profileName}
        networkSrc=${Ve(e)}
        avatarSrc=${Ve(this.profileImage)}
        balance=${r?He.formatBalance(this.balanceVal,this.balanceSymbol):""}
        @click=${this.onClick.bind(this)}
        data-testid="account-button"
        .charsStart=${this.charsStart}
        .charsEnd=${this.charsEnd}
      >
      </wui-account-button>
    `}onClick(){this.isUnsupportedChain?Ct.open({view:"UnsupportedChain"}):Ct.open()}};Ca([Wt({type:Boolean})],$o.prototype,"disabled",void 0);Ca([Wt()],$o.prototype,"balance",void 0);Ca([Wt()],$o.prototype,"charsStart",void 0);Ca([Wt()],$o.prototype,"charsEnd",void 0);Ca([ne()],$o.prototype,"address",void 0);Ca([ne()],$o.prototype,"balanceVal",void 0);Ca([ne()],$o.prototype,"balanceSymbol",void 0);Ca([ne()],$o.prototype,"profileName",void 0);Ca([ne()],$o.prototype,"profileImage",void 0);Ca([ne()],$o.prototype,"network",void 0);Ca([ne()],$o.prototype,"isUnsupportedChain",void 0);$o=Ca([de("w3m-account-button")],$o);var dW=Be`
  :host {
    display: block;
    width: max-content;
  }
`;var ou=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},lc=class extends be{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=qe.state.isConnected,this.unsubscribe.push(qe.subscribeKey("isConnected",e=>{this.isAccount=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.isAccount?Z`
          <w3m-account-button
            .disabled=${!!this.disabled}
            balance=${Ve(this.balance)}
            .charsStart=${Ve(this.charsStart)}
            .charsEnd=${Ve(this.charsEnd)}
          >
          </w3m-account-button>
        `:Z`
          <w3m-connect-button
            size=${Ve(this.size)}
            label=${Ve(this.label)}
            loadingLabel=${Ve(this.loadingLabel)}
          ></w3m-connect-button>
        `}};lc.styles=dW;ou([Wt({type:Boolean})],lc.prototype,"disabled",void 0);ou([Wt()],lc.prototype,"balance",void 0);ou([Wt()],lc.prototype,"size",void 0);ou([Wt()],lc.prototype,"label",void 0);ou([Wt()],lc.prototype,"loadingLabel",void 0);ou([Wt()],lc.prototype,"charsStart",void 0);ou([Wt()],lc.prototype,"charsEnd",void 0);ou([ne()],lc.prototype,"isAccount",void 0);lc=ou([de("w3m-button")],lc);var xg=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Dh=class extends be{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=Ct.state.open,this.loading=Ct.state.loading,this.unsubscribe.push(Ct.subscribe(e=>{this.open=e.open,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.loading||this.open;return Z`
      <wui-connect-button
        size=${Ve(this.size)}
        .loading=${e}
        @click=${this.onClick.bind(this)}
        data-testid="connect-button"
      >
        ${e?this.loadingLabel:this.label}
      </wui-connect-button>
    `}onClick(){this.open?Ct.close():this.loading||Ct.open()}};xg([Wt()],Dh.prototype,"size",void 0);xg([Wt()],Dh.prototype,"label",void 0);xg([Wt()],Dh.prototype,"loadingLabel",void 0);xg([ne()],Dh.prototype,"open",void 0);xg([ne()],Dh.prototype,"loading",void 0);Dh=xg([de("w3m-connect-button")],Dh);var hW=Be`
  :host {
    display: block;
    width: max-content;
  }
`;var Ig=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},jf=class extends be{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=ut.state.caipNetwork,this.connected=qe.state.isConnected,this.loading=Ct.state.loading,this.isUnsupportedChain=ut.state.isUnsupportedChain,this.unsubscribe.push(ut.subscribeKey("caipNetwork",e=>this.network=e),qe.subscribeKey("isConnected",e=>this.connected=e),Ct.subscribeKey("loading",e=>this.loading=e),ut.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-network-button
        .disabled=${!!(this.disabled||this.loading)}
        .isUnsupportedChain=${this.isUnsupportedChain}
        imageSrc=${Ve(Ot.getNetworkImage(this.network))}
        @click=${this.onClick.bind(this)}
      >
        ${this.isUnsupportedChain?"Switch Network":this.network?.name??(this.connected?"Unknown Network":"Select Network")}
      </wui-network-button>
    `}onClick(){this.loading||(ze.sendEvent({type:"track",event:"CLICK_NETWORKS"}),Ct.open({view:"Networks"}))}};jf.styles=hW;Ig([Wt({type:Boolean})],jf.prototype,"disabled",void 0);Ig([ne()],jf.prototype,"network",void 0);Ig([ne()],jf.prototype,"connected",void 0);Ig([ne()],jf.prototype,"loading",void 0);Ig([ne()],jf.prototype,"isUnsupportedChain",void 0);jf=Ig([de("w3m-network-button")],jf);var pW=Be`
  :host {
    display: block;
    will-change: transform, opacity;
  }
`;var mW=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},F_=class extends be{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=ye.state.view,this.unsubscribe.push(ye.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(r=>y(this,[r],function*([e]){let n=`${e?.contentRect.height}px`;this.prevHeight!=="0px"&&(yield this.animate([{height:this.prevHeight},{height:n}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=n})),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach(e=>e())}render(){return Z`<div>${this.viewTemplate()}</div>`}viewTemplate(){switch(this.view){case"Connect":return Z`<w3m-connect-view></w3m-connect-view>`;case"ConnectingWalletConnect":return Z`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingExternal":return Z`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return Z`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"AllWallets":return Z`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"Networks":return Z`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return Z`<w3m-network-switch-view></w3m-network-switch-view>`;case"Account":return Z`<w3m-account-view></w3m-account-view>`;case"AccountSettings":return Z`<w3m-account-settings-view></w3m-account-settings-view>`;case"WhatIsAWallet":return Z`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"WhatIsANetwork":return Z`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"GetWallet":return Z`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Downloads":return Z`<w3m-downloads-view></w3m-downloads-view>`;case"EmailVerifyOtp":return Z`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return Z`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"ApproveTransaction":return Z`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"Transactions":return Z`<w3m-transactions-view></w3m-transactions-view>`;case"UpgradeEmailWallet":return Z`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpgradeToSmartAccount":return Z`<w3m-upgrade-to-smart-account-view></w3m-upgrade-to-smart-account-view>`;case"UpdateEmailWallet":return Z`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return Z`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return Z`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return Z`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"OnRampProviders":return Z`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return Z`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return Z`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return Z`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"WhatIsABuy":return Z`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"BuyInProgress":return Z`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"WalletReceive":return Z`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return Z`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;default:return Z`<w3m-connect-view></w3m-connect-view>`}}onViewChange(e){return y(this,null,function*(){let{history:r}=ye.state,n=-10,i=10;r.length<this.prevHistoryLength&&(n=10,i=-10),this.prevHistoryLength=r.length,yield this.animate([{opacity:1,transform:"translateX(0px)"},{opacity:0,transform:`translateX(${n}px)`}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.view=e,yield this.animate([{opacity:0,transform:`translateX(${i}px)`},{opacity:1,transform:"translateX(0px)"}],{duration:150,easing:"ease",fill:"forwards",delay:50}).finished})}getWrapper(){return this.shadowRoot?.querySelector("div")}};F_.styles=pW;mW([ne()],F_.prototype,"view",void 0);F_=mW([de("w3m-router")],F_);var gW=Be`
  :host > wui-flex {
    width: 100%;
    max-width: 360px;
  }

  :host > wui-flex > wui-flex {
    border-radius: var(--wui-border-radius-l);
    width: 100%;
  }

  .amounts-container {
    width: 100%;
  }
`;var Hf=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Ixe={USD:"$",EUR:"\u20AC",GBP:"\xA3"},Axe=[100,250,500,1e3],Yc=class extends be{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=qe.state.isConnected,this.loading=Ct.state.loading,this.paymentCurrency=Xt.state.paymentCurrency,this.paymentAmount=Xt.state.paymentAmount,this.purchaseAmount=Xt.state.purchaseAmount,this.quoteLoading=Xt.state.quotesLoading,this.unsubscribe.push(qe.subscribeKey("isConnected",e=>{this.connected=e}),Ct.subscribeKey("loading",e=>{this.loading=e}),Xt.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-flex flexDirection="column" justifyContent="center" alignItems="center">
        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <w3m-swap-input
            type="Fiat"
            @inputChange=${this.onPaymentAmountChange.bind(this)}
            .value=${this.paymentAmount||0}
          ></w3m-swap-input>
          <w3m-swap-input
            type="Token"
            .value=${this.purchaseAmount||0}
            .loading=${this.quoteLoading}
          ></w3m-swap-input>
          <wui-flex justifyContent="space-evenly" class="amounts-container" gap="xs">
            ${Axe.map(e=>Z`<wui-button
                  variant=${this.paymentAmount===e?"accentBg":"shade"}
                  size="xs"
                  textVariant="paragraph-600"
                  fullWidth
                  @click=${()=>this.selectPresetAmount(e)}
                  >${`${Ixe[this.paymentCurrency?.id||"USD"]} ${e}`}</wui-button
                >`)}
          </wui-flex>
          ${this.templateButton()}
        </wui-flex>
      </wui-flex>
    `}templateButton(){return this.connected?Z`<wui-button
          @click=${this.getQuotes.bind(this)}
          variant="fill"
          fullWidth
          size="lg"
          borderRadius="xs"
        >
          Get quotes
        </wui-button>`:Z`<wui-button
          @click=${this.openModal.bind(this)}
          variant="accentBg"
          fullWidth
          size="lg"
          borderRadius="xs"
        >
          Connect wallet
        </wui-button>`}getQuotes(){this.loading||Ct.open({view:"OnRampProviders"})}openModal(){Ct.open({view:"Connect"})}onPaymentAmountChange(e){return y(this,null,function*(){Xt.setPaymentAmount(Number(e.detail)),yield Xt.getQuote()})}selectPresetAmount(e){return y(this,null,function*(){Xt.setPaymentAmount(e),yield Xt.getQuote()})}};Yc.styles=gW;Hf([Wt({type:Boolean})],Yc.prototype,"disabled",void 0);Hf([ne()],Yc.prototype,"connected",void 0);Hf([ne()],Yc.prototype,"loading",void 0);Hf([ne()],Yc.prototype,"paymentCurrency",void 0);Hf([ne()],Yc.prototype,"paymentAmount",void 0);Hf([ne()],Yc.prototype,"purchaseAmount",void 0);Hf([ne()],Yc.prototype,"quoteLoading",void 0);Yc=Hf([de("w3m-onramp-widget")],Yc);var yW=Be`
  wui-flex {
    width: 100%;
  }

  wui-icon-link {
    margin-right: calc(var(--wui-icon-box-size-md) * -1);
  }

  .account-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .account-links wui-flex {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: red;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 10px;
    flex: 1 0 0;

    border-radius: var(--XS, 16px);
    border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    transition: background 0.2s linear;
  }

  .account-links wui-flex:hover {
    background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));
  }

  .account-links wui-flex wui-icon {
    width: var(--S, 20px);
    height: var(--S, 20px);
  }

  .account-links wui-flex wui-icon svg path {
    stroke: #47a1ff;
  }
`;var Ag=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Vf=class extends be{constructor(){super(),this.usubscribe=[],this.networkImages=Vs.state.networkImages,this.address=qe.state.address,this.profileImage=qe.state.profileImage,this.profileName=qe.state.profileName,this.network=ut.state.caipNetwork,this.disconnecting=!1,this.usubscribe.push(qe.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName):Ct.close()}),ut.subscribeKey("caipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-account-settings-view: No account provided");let e=this.networkImages[this.network?.imageId??""];return Z`
      <wui-flex
        flexDirection="column"
        .padding=${["0","xl","m","xl"]}
        alignItems="center"
        gap="l"
      >
        <wui-avatar
          alt=${this.address}
          address=${this.address}
          imageSrc=${Ve(this.profileImage)}
        ></wui-avatar>
        <wui-flex flexDirection="column" alignItems="center">
          <wui-flex gap="3xs" alignItems="center" justifyContent="center">
            <wui-text variant="large-600" color="fg-100">
              ${this.profileName?Bc.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):Bc.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})}
            </wui-text>
            <wui-icon-link
              size="md"
              icon="copy"
              iconColor="fg-200"
              @click=${this.onCopyAddress}
            ></wui-icon-link>
          </wui-flex>
        </wui-flex>
      </wui-flex>

      <wui-flex flexDirection="column" gap="m">
        <wui-flex flexDirection="column" gap="xs" .padding=${["0","xl","m","xl"]}>
          ${this.emailBtnTemplate()}
          <wui-list-item
            .variant=${e?"image":"icon"}
            iconVariant="overlay"
            icon="networkPlaceholder"
            imageSrc=${Ve(e)}
            ?chevron=${this.isAllowedNetworkSwitch()}
            @click=${this.onNetworks.bind(this)}
          >
            <wui-text variant="paragraph-500" color="fg-100">
              ${this.network?.name??"Unknown"}
            </wui-text>
          </wui-list-item>
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="disconnect"
            ?chevron=${!1}
            .loading=${this.disconnecting}
            @click=${this.onDisconnect.bind(this)}
            data-testid="disconnect-button"
          >
            <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
          </wui-list-item>
        </wui-flex>
      </wui-flex>
    `}isAllowedNetworkSwitch(){let{requestedCaipNetworks:e}=ut.state,r=e?e.length>1:!1,n=e?.find(({id:i})=>i===this.network?.id);return r||!n}onCopyAddress(){try{this.address&&(He.copyToClopboard(this.address),kt.showSuccess("Address copied"))}catch{kt.showError("Failed to copy")}}emailBtnTemplate(){let e=Ui.getConnectedConnector(),r=Yt.getEmailConnector();if(!r||e!=="EMAIL")return null;let n=r.provider.getEmail()??"";return Z`
      <wui-list-item
        variant="icon"
        iconVariant="overlay"
        icon="mail"
        iconSize="sm"
        ?chevron=${!0}
        @click=${()=>this.onGoToUpdateEmail(n)}
      >
        <wui-text variant="paragraph-500" color="fg-100">${n}</wui-text>
      </wui-list-item>
    `}onGoToUpdateEmail(e){ye.push("UpdateEmailWallet",{email:e})}onNetworks(){this.isAllowedNetworkSwitch()&&ye.push("Networks")}onDisconnect(){return y(this,null,function*(){try{this.disconnecting=!0,yield lt.disconnect(),ze.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Ct.close()}catch{ze.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),kt.showError("Failed to disconnect")}finally{this.disconnecting=!1}})}};Vf.styles=yW;Ag([ne()],Vf.prototype,"address",void 0);Ag([ne()],Vf.prototype,"profileImage",void 0);Ag([ne()],Vf.prototype,"profileName",void 0);Ag([ne()],Vf.prototype,"network",void 0);Ag([ne()],Vf.prototype,"disconnecting",void 0);Vf=Ag([de("w3m-account-settings-view")],Vf);var Sxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},wW=class extends be{render(){let e=Ui.getConnectedConnector();return Z`
      ${Dt.state.enableWalletFeatures&&e==="EMAIL"?this.walletFeaturesTemplate():this.defaultTemplate()}
    `}walletFeaturesTemplate(){return Z`<w3m-account-wallet-features-widget></w3m-account-wallet-features-widget>`}defaultTemplate(){return Z`<w3m-account-default-widget></w3m-account-default-widget>`}};wW=Sxe([de("w3m-account-view")],wW);var vW=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},nT=class extends be{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=He.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return Z`
      <wui-flex padding="s" gap="s">
        <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
        ${this.qrButtonTemplate()}
      </wui-flex>
      ${e?Z`<w3m-all-wallets-search query=${this.search}></w3m-all-wallets-search>`:Z`<w3m-all-wallets-list></w3m-all-wallets-list>`}
    `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return He.isMobile()?Z`
        <wui-icon-box
          size="lg"
          iconSize="xl"
          iconColor="accent-100"
          backgroundColor="accent-100"
          icon="qrCode"
          background="transparent"
          border
          borderColor="wui-accent-glass-010"
          @click=${this.onWalletConnectQr.bind(this)}
        ></wui-icon-box>
      `:null}onWalletConnectQr(){ye.push("ConnectingWalletConnect")}};vW([ne()],nT.prototype,"search",void 0);nT=vW([de("w3m-all-wallets-view")],nT);var bW=Be`
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }

  wui-loading-thumbnail {
    position: absolute;
  }

  wui-visual {
    width: var(--wui-wallet-image-size-lg);
    height: var(--wui-wallet-image-size-lg);
    border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
    position: relative;
    overflow: hidden;
  }

  wui-visual::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
    box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
  }

  wui-icon-box {
    position: absolute;
    right: calc(var(--wui-spacing-3xs) * -1);
    bottom: calc(var(--wui-spacing-3xs) * -1);
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
  }

  wui-text[align='center'] {
    width: 100%;
    padding: 0px var(--wui-spacing-l);
  }

  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }

  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  [data-retry='false'] wui-link {
    display: none;
  }

  [data-retry='true'] wui-link {
    display: block;
    opacity: 1;
  }

  wui-link {
    padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
  }
`;var uc=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},qo=class extends be{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=Xt.state.selectedProvider,this.uri=lt.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Xt.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e})),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${this.selectedOnRampProvider?.label}`);let r=this.error?"Buy can be declined from your side or due to and error on the provider app":"We\u2019ll notify you once your Buy is processed";return Z`
      <wui-flex
        data-error=${Ve(this.error)}
        data-retry=${this.showRetry}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-visual
            name=${Ve(this.selectedOnRampProvider?.name)}
            size="lg"
            class="provider-image"
          >
          </wui-visual>

          ${this.error?null:this.loaderTemplate()}

          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            border
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>

        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
            ${e}
          </wui-text>
          <wui-text align="center" variant="small-500" color="fg-200">${r}</wui-text>
        </wui-flex>

        ${this.error?this.tryAgainTemplate():null}
      </wui-flex>

      <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
        <wui-link @click=${this.onCopyUri} color="fg-200">
          <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
          Copy link
        </wui-link>
      </wui-flex>
    `}watchTransactions(){if(this.selectedOnRampProvider)switch(this.selectedOnRampProvider.name){case"coinbase":this.startTime=Date.now(),this.initializeCoinbaseTransactions();break;default:break}}initializeCoinbaseTransactions(){return y(this,null,function*(){yield this.watchCoinbaseTransactions(),this.intervalId=setInterval(()=>this.watchCoinbaseTransactions(),4e3)})}watchCoinbaseTransactions(){return y(this,null,function*(){try{let e=qe.state.address,r=Dt.state.projectId;if(!e)throw new Error("No address found");(yield Dm.fetchTransactions({account:e,onramp:"coinbase",projectId:r})).data.filter(s=>new Date(s.metadata.minedAt)>new Date(this.startTime)||s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length?(clearInterval(this.intervalId),ye.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){kt.showError(e)}})}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,He.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){return this.selectedOnRampProvider?.url?Z`<wui-button variant="accent" @click=${this.onTryAgain.bind(this)}>
      <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
      Try again
    </wui-button>`:null}loaderTemplate(){let e=Ei.state.themeVariables["--w3m-border-radius-master"],r=e?parseInt(e.replace("px",""),10):4;return Z`<wui-loading-thumbnail radius=${r*9}></wui-loading-thumbnail>`}onCopyUri(){if(!this.selectedOnRampProvider?.url){kt.showError("No link found"),ye.goBack();return}try{He.copyToClopboard(this.selectedOnRampProvider.url),kt.showSuccess("Link copied")}catch{kt.showError("Failed to copy")}}};qo.styles=bW;uc([ne()],qo.prototype,"selectedOnRampProvider",void 0);uc([ne()],qo.prototype,"uri",void 0);uc([ne()],qo.prototype,"ready",void 0);uc([ne()],qo.prototype,"showRetry",void 0);uc([ne()],qo.prototype,"buffering",void 0);uc([ne()],qo.prototype,"error",void 0);uc([ne()],qo.prototype,"intervalId",void 0);uc([ne()],qo.prototype,"startTime",void 0);uc([Wt({type:Boolean})],qo.prototype,"isMobile",void 0);uc([Wt()],qo.prototype,"onRetry",void 0);qo=uc([de("w3m-buy-in-progress-view")],qo);var EW=Be`
  wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }

  wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var _W=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},B_=class extends be{constructor(){super(),this.unsubscribe=[],this.connectors=Yt.state.connectors,this.unsubscribe.push(Yt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        <w3m-email-login-widget></w3m-email-login-widget>

        ${this.walletConnectConnectorTemplate()} ${this.recentTemplate()}
        ${this.announcedTemplate()} ${this.injectedTemplate()} ${this.featuredTemplate()}
        ${this.customTemplate()} ${this.recommendedTemplate()} ${this.externalTemplate()}
        ${this.allWalletsTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}walletConnectConnectorTemplate(){if(He.isMobile())return null;let e=this.connectors.find(r=>r.type==="WALLET_CONNECT");return e?Z`
      <wui-list-wallet
        imageSrc=${Ve(Ot.getConnectorImage(e))}
        name=${e.name??"Unknown"}
        @click=${()=>this.onConnector(e)}
        tagLabel="qr code"
        tagVariant="main"
        data-testid="wallet-selector-walletconnect"
      >
      </wui-list-wallet>
    `:null}customTemplate(){let{customWallets:e}=Dt.state;return e?.length?this.filterOutDuplicateWallets(e).map(n=>Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getWalletImage(n))}
          name=${n.name??"Unknown"}
          @click=${()=>this.onConnectWallet(n)}
          data-testid=${`wallet-selector-${n.id}`}
        >
        </wui-list-wallet>
      `):null}featuredTemplate(){if(!this.connectors.find(i=>i.type==="WALLET_CONNECT"))return null;let{featured:r}=ni.state;return r.length?this.filterOutDuplicateWallets(r).map(i=>Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getWalletImage(i))}
          name=${i.name??"Unknown"}
          @click=${()=>this.onConnectWallet(i)}
        >
        </wui-list-wallet>
      `):null}recentTemplate(){return Ui.getRecentWallets().map(r=>Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getWalletImage(r))}
          name=${r.name??"Unknown"}
          @click=${()=>this.onConnectWallet(r)}
          tagLabel="recent"
          tagVariant="shade"
        >
        </wui-list-wallet>
      `)}announcedTemplate(){return this.connectors.map(e=>e.type!=="ANNOUNCED"?null:Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getConnectorImage(e))}
          name=${e.name??"Unknown"}
          @click=${()=>this.onConnector(e)}
          tagVariant="success"
          .installed=${!0}
        >
        </wui-list-wallet>
      `)}injectedTemplate(){return this.connectors.map(e=>e.type!=="INJECTED"||!lt.checkInstalled()?null:Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getConnectorImage(e))}
          .installed=${!0}
          name=${e.name??"Unknown"}
          @click=${()=>this.onConnector(e)}
        >
        </wui-list-wallet>
      `)}externalTemplate(){let e=Yt.getAnnouncedConnectorRdns();return this.connectors.map(r=>["WALLET_CONNECT","INJECTED","ANNOUNCED","EMAIL"].includes(r.type)||e.includes(Lo.CONNECTOR_RDNS_MAP[r.id])?null:Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getConnectorImage(r))}
          name=${r.name??"Unknown"}
          @click=${()=>this.onConnector(r)}
        >
        </wui-list-wallet>
      `)}allWalletsTemplate(){let e=this.connectors.find(c=>c.type==="WALLET_CONNECT"),{allWallets:r}=Dt.state;if(!e||r==="HIDE"||r==="ONLY_MOBILE"&&!He.isMobile())return null;let n=ni.state.count,i=ni.state.featured.length,s=n+i,o=s<10?s:Math.floor(s/10)*10,a=o<s?`${o}+`:`${o}`;return Z`
      <wui-list-wallet
        name="All Wallets"
        walletIcon="allWallets"
        showAllWallets
        @click=${this.onAllWallets.bind(this)}
        tagLabel=${a}
        tagVariant="shade"
        data-testid="all-wallets"
      ></wui-list-wallet>
    `}recommendedTemplate(){if(!this.connectors.find(m=>m.type==="WALLET_CONNECT"))return null;let{recommended:r}=ni.state,{customWallets:n,featuredWalletIds:i}=Dt.state,{connectors:s}=Yt.state,o=Ui.getRecentWallets(),c=s.filter(m=>m.type==="INJECTED").filter(m=>m.name!=="Browser Wallet");if(i||n||!r.length)return null;let u=c.length+o.length,d=Math.max(0,2-u);return this.filterOutDuplicateWallets(r).slice(0,d).map(m=>Z`
        <wui-list-wallet
          imageSrc=${Ve(Ot.getWalletImage(m))}
          name=${m?.name??"Unknown"}
          @click=${()=>this.onConnectWallet(m)}
        >
        </wui-list-wallet>
      `)}onConnector(e){e.type==="WALLET_CONNECT"?He.isMobile()?ye.push("AllWallets"):ye.push("ConnectingWalletConnect"):ye.push("ConnectingExternal",{connector:e})}filterOutDuplicateWallets(e){let n=Ui.getRecentWallets().map(s=>s.id);return e.filter(s=>!n.includes(s.id))}onAllWallets(){ze.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),ye.push("AllWallets")}onConnectWallet(e){ye.push("ConnectingWalletConnect",{wallet:e})}};B_.styles=EW;_W([ne()],B_.prototype,"connectors",void 0);B_=_W([de("w3m-connect-view")],B_);var CW=Be`
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }

  wui-loading-thumbnail {
    position: absolute;
  }

  wui-icon-box {
    position: absolute;
    right: calc(var(--wui-spacing-3xs) * -1);
    bottom: calc(var(--wui-spacing-3xs) * -1);
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
  }

  wui-text[align='center'] {
    width: 100%;
    padding: 0px var(--wui-spacing-l);
  }

  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }

  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  [data-retry='false'] wui-link {
    display: none;
  }

  [data-retry='true'] wui-link {
    display: block;
    opacity: 1;
  }
`;var Rh=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},ai=class extends be{constructor(){super(),this.wallet=ye.state.data?.wallet,this.connector=ye.state.data?.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=Ot.getWalletImage(this.wallet)??Ot.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=lt.state.wcUri,this.error=lt.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(lt.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),lt.subscribeKey("wcError",e=>this.error=e),lt.subscribeKey("buffering",e=>this.buffering=e))}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,r=`Continue in ${this.name}`;return this.buffering&&(r="Connecting..."),this.error&&(r="Connection declined"),Z`
      <wui-flex
        data-error=${Ve(this.error)}
        data-retry=${this.showRetry}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-wallet-image size="lg" imageSrc=${Ve(this.imageSrc)}></wui-wallet-image>

          ${this.error?null:this.loaderTemplate()}

          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            border
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>

        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
            ${r}
          </wui-text>
          <wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text>
        </wui-flex>

        <wui-button
          variant="accent"
          ?disabled=${!this.error&&this.buffering}
          @click=${this.onTryAgain.bind(this)}
        >
          <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon>
          ${this.secondaryBtnLabel}
        </wui-button>
      </wui-flex>

      ${this.isWalletConnect?Z`
            <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
              <wui-link @click=${this.onCopyUri} color="fg-200">
                <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
                Copy link
              </wui-link>
            </wui-flex>
          `:null}

      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
    `}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector("wui-button")?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"}))}onTryAgain(){this.buffering||(lt.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.())}loaderTemplate(){let e=Ei.state.themeVariables["--w3m-border-radius-master"],r=e?parseInt(e.replace("px",""),10):4;return Z`<wui-loading-thumbnail radius=${r*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(He.copyToClopboard(this.uri),kt.showSuccess("Link copied"))}catch{kt.showError("Failed to copy")}}};ai.styles=CW;Rh([ne()],ai.prototype,"uri",void 0);Rh([ne()],ai.prototype,"error",void 0);Rh([ne()],ai.prototype,"ready",void 0);Rh([ne()],ai.prototype,"showRetry",void 0);Rh([ne()],ai.prototype,"buffering",void 0);Rh([Wt({type:Boolean})],ai.prototype,"isMobile",void 0);Rh([Wt()],ai.prototype,"onRetry",void 0);var Dxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},xW=class extends ai{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}onConnectProxy(){return y(this,null,function*(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&Ui.setConnectedWalletImageUrl(this.connector.imageUrl),yield lt.connectExternal(this.connector),Dt.state.isSiweEnabled?ye.push("ConnectingSiwe"):Ct.close(),ze.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){ze.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}})}};xW=Dxe([de("w3m-connecting-external-view")],xW);var iT=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},U_=class extends be{constructor(){super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=ye.state.data?.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),Lo.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),Z`
      ${this.headerTemplate()}
      <div>${this.platformTemplate()}</div>
    `):Z`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`}initializeConnection(e=!1){return y(this,null,function*(){try{let{wcPairingExpiry:r}=lt.state;if(e||He.isPairingExpired(r)){if(lt.connectWalletConnect(),this.wallet){let n=Ot.getWalletImage(this.wallet);n&&Ui.setConnectedWalletImageUrl(n)}else{let i=Yt.state.connectors.find(o=>o.type==="WALLET_CONNECT"),s=Ot.getConnectorImage(i);s&&Ui.setConnectedWalletImageUrl(s)}yield lt.state.wcPromise,this.finalizeConnection(),Dt.state.isSiweEnabled?ye.push("ConnectingSiwe"):Ct.close()}}catch(r){ze.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:r?.message??"Unknown"}}),lt.setWcError(!0),He.isAllowedRetry(this.lastRetry)&&(kt.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}})}finalizeConnection(){let{wcLinking:e,recentWallet:r}=lt.state;e&&Ui.setWalletConnectDeepLink(e),r&&Ui.setWeb3ModalRecent(r),ze.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:this.wallet?.name||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;let{mobile_link:e,desktop_link:r,webapp_link:n,injected:i,rdns:s}=this.wallet,o=i?.map(({injected_id:_})=>_).filter(Boolean),a=s?[s]:o??[],c=a.length,u=e,d=n,h=lt.checkInstalled(a),m=c&&h,w=r&&!He.isMobile();m&&this.platforms.push("browser"),u&&this.platforms.push(He.isMobile()?"mobile":"qrcode"),d&&this.platforms.push("web"),w&&this.platforms.push("desktop"),!m&&c&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return Z`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"desktop":return Z`
          <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
          </w3m-connecting-wc-desktop>
        `;case"web":return Z`
          <w3m-connecting-wc-web .onRetry=${()=>this.initializeConnection(!0)}>
          </w3m-connecting-wc-web>
        `;case"mobile":return Z`
          <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
          </w3m-connecting-wc-mobile>
        `;case"qrcode":return Z`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return Z`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?Z`
      <w3m-connecting-header
        .platforms=${this.platforms}
        .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
      >
      </w3m-connecting-header>
    `:null}onSelectPlatform(e){return y(this,null,function*(){let r=this.shadowRoot?.querySelector("div");r&&(yield r.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))})}};iT([ne()],U_.prototype,"platform",void 0);iT([ne()],U_.prototype,"platforms",void 0);U_=iT([de("w3m-connecting-wc-view")],U_);var Rxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},IW=class extends be{constructor(){super(...arguments),this.wallet=ye.state.data?.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return Z`
      <wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}>
        ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
        ${this.homepageTemplate()}
      </wui-flex>
    `}chromeTemplate(){return this.wallet?.chrome_store?Z`<wui-list-item
      variant="icon"
      icon="chromeStore"
      iconVariant="square"
      @click=${this.onChromeStore.bind(this)}
      chevron
    >
      <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text>
    </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?Z`<wui-list-item
      variant="icon"
      icon="appStore"
      iconVariant="square"
      @click=${this.onAppStore.bind(this)}
      chevron
    >
      <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text>
    </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?Z`<wui-list-item
      variant="icon"
      icon="playStore"
      iconVariant="square"
      @click=${this.onPlayStore.bind(this)}
      chevron
    >
      <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text>
    </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?Z`
      <wui-list-item
        variant="icon"
        icon="browser"
        iconVariant="square-blue"
        @click=${this.onHomePage.bind(this)}
        chevron
      >
        <wui-text variant="paragraph-500" color="fg-100">Website</wui-text>
      </wui-list-item>
    `:null}onChromeStore(){this.wallet?.chrome_store&&He.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){this.wallet?.app_store&&He.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&He.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&He.openHref(this.wallet.homepage,"_blank")}};IW=Rxe([de("w3m-downloads-view")],IW);var Txe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Nxe="https://walletconnect.com/explorer",AW=class extends be{render(){return Z`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        ${this.recommendedWalletsTemplate()}
        <wui-list-wallet
          name="Explore all"
          showAllWallets
          walletIcon="allWallets"
          icon="externalLink"
          @click=${()=>{He.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}}
        ></wui-list-wallet>
      </wui-flex>
    `}recommendedWalletsTemplate(){let{recommended:e,featured:r}=ni.state,{customWallets:n}=Dt.state;return[...r,...n??[],...e].slice(0,4).map(s=>Z`
        <wui-list-wallet
          name=${s.name??"Unknown"}
          tagVariant="main"
          imageSrc=${Ve(Ot.getWalletImage(s))}
          @click=${()=>{He.openHref(s.homepage??Nxe,"_blank")}}
        ></wui-list-wallet>
      `)}};AW=Txe([de("w3m-get-wallet-view")],AW);var SW=Be`
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }

  wui-loading-hexagon {
    position: absolute;
  }

  wui-icon-box {
    position: absolute;
    right: 4px;
    bottom: 0;
    opacity: 0;
    transform: scale(0.5);
    z-index: 1;
    transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
  }

  wui-button {
    display: none;
  }

  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }

  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  wui-button[data-retry='true'] {
    display: block;
    opacity: 1;
  }
`;var sT=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Rw=class extends be{constructor(){super(),this.network=ye.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();let e=this.error?"Switch declined":"Approve in wallet",r=this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet";return Z`
      <wui-flex
        data-error=${this.error}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","3xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-network-image
            size="lg"
            imageSrc=${Ve(Ot.getNetworkImage(this.network))}
          ></wui-network-image>

          ${this.error?null:Z`<wui-loading-hexagon></wui-loading-hexagon>`}

          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            ?border=${!0}
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>

        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text align="center" variant="paragraph-500" color="fg-100">${e}</wui-text>
          <wui-text align="center" variant="small-500" color="fg-200">${r}</wui-text>
        </wui-flex>

        <wui-button
          data-retry=${this.showRetry}
          variant="fill"
          .disabled=${!this.error}
          @click=${this.onSwitchNetwork.bind(this)}
        >
          <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
          Try again
        </wui-button>
      </wui-flex>
    `}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector("wui-button")?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"}))}onSwitchNetwork(){return y(this,null,function*(){try{this.error=!1,this.network&&(yield ut.switchActiveNetwork(this.network),Dt.state.isSiweEnabled||Rm.navigateAfterNetworkSwitch())}catch{this.error=!0}})}};Rw.styles=SW;sT([ne()],Rw.prototype,"showRetry",void 0);sT([ne()],Rw.prototype,"error",void 0);Rw=sT([de("w3m-network-switch-view")],Rw);var DW=Be`
  :host > wui-grid {
    max-height: 360px;
    overflow: auto;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }
`;var RW=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},j_=class extends be{constructor(){super(),this.unsubscribe=[],this.caipNetwork=ut.state.caipNetwork,this.unsubscribe.push(ut.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-grid padding="s" gridTemplateColumns="repeat(4, 1fr)" rowGap="l" columnGap="xs">
        ${this.networksTemplate()}
      </wui-grid>

      <wui-separator></wui-separator>

      <wui-flex padding="s" flexDirection="column" gap="m" alignItems="center">
        <wui-text variant="small-400" color="fg-300" align="center">
          Your connected wallet may not support some of the networks available for this dApp
        </wui-text>
        <wui-link @click=${this.onNetworkHelp.bind(this)}>
          <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
          What is a network
        </wui-link>
      </wui-flex>
    `}onNetworkHelp(){ze.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),ye.push("WhatIsANetwork")}networksTemplate(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:r,supportsAllNetworks:n}=ut.state;return He.sortRequestedNetworks(e,r)?.map(s=>Z`
        <wui-card-select
          .selected=${this.caipNetwork?.id===s.id}
          imageSrc=${Ve(Ot.getNetworkImage(s))}
          type="network"
          name=${s.name??s.id}
          @click=${()=>this.onSwitchNetwork(s)}
          .disabled=${!n&&!e?.includes(s.id)}
          data-testid=${`w3m-network-switch-${s.name??s.id}`}
        ></wui-card-select>
      `)}onSwitchNetwork(e){return y(this,null,function*(){let{isConnected:r}=qe.state,{approvedCaipNetworkIds:n,supportsAllNetworks:i,caipNetwork:s}=ut.state,{data:o}=ye.state;r&&s?.id!==e.id?n?.includes(e.id)?(yield ut.switchActiveNetwork(e),Rm.navigateAfterNetworkSwitch()):i&&ye.push("SwitchNetwork",_e(B({},o),{network:e})):r||(ut.setCaipNetwork(e),ye.push("Connect"))})}};j_.styles=DW;RW([ne()],j_.prototype,"caipNetwork",void 0);j_=RW([de("w3m-networks-view")],j_);var TW=Be`
  :host > wui-flex {
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: var(--wui-spacing-m);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  :host > wui-flex > wui-flex {
    width: 100%;
  }

  wui-transaction-list-item-loader {
    width: 100%;
  }
`;var Tw=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Oxe=7,Th=class extends be{constructor(){super(),this.unsubscribe=[],this.refetchTimeout=void 0,this.selectedOnRampProvider=Xt.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=$s.state.coinbaseTransactions,this.tokenImages=Vs.state.tokenImages,this.unsubscribe.push(Xt.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}),Vs.subscribeKey("tokenImages",e=>this.tokenImages=e),()=>{clearTimeout(this.refetchTimeout)},$s.subscribe(e=>{this.coinbaseTransactions=B({},e.coinbaseTransactions)})),this.fetchTransactions()}render(){return Z`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        ${this.loading?this.templateLoading():this.templateTransactionsByYear()}
      </wui-flex>
    `}templateTransactions(e){return e?.map(r=>{let n=v3.formatDate(r?.metadata?.minedAt),i=r.transfers[0],s=i?.fungible_info;if(!s)return null;let o=s?.icon?.url||this.tokenImages?.[s.symbol||""];return Z`
        <wui-onramp-activity-item
          label="Bought"
          .completed=${r.metadata.status==="ONRAMP_TRANSACTION_STATUS_SUCCESS"}
          .inProgress=${r.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"}
          .failed=${r.metadata.status==="ONRAMP_TRANSACTION_STATUS_FAILED"}
          purchaseCurrency=${Ve(s.symbol)}
          purchaseValue=${i.quantity.numeric}
          date=${n}
          icon=${Ve(o)}
          symbol=${Ve(s.symbol)}
        ></wui-onramp-activity-item>
      `})}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map(r=>{let n=parseInt(r,10);return new Array(12).fill(null).map((s,o)=>o).reverse().map(s=>{let o=oh.getTransactionGroupTitle(n,s),a=this.coinbaseTransactions[n]?.[s];return a?Z`
          <wui-flex flexDirection="column">
            <wui-flex
              alignItems="center"
              flexDirection="row"
              .padding=${["xs","s","s","s"]}
            >
              <wui-text variant="paragraph-500" color="fg-200">${o}</wui-text>
            </wui-flex>
            <wui-flex flexDirection="column" gap="xs">
              ${this.templateTransactions(a)}
            </wui-flex>
          </wui-flex>
        `:null})})}fetchTransactions(){return y(this,null,function*(){"coinbase"==="coinbase"&&(yield this.fetchCoinbaseTransactions())})}fetchCoinbaseTransactions(){return y(this,null,function*(){let e=qe.state.address,r=Dt.state.projectId;if(!e)throw new Error("No address found");if(!r)throw new Error("No projectId found");this.loading=!0,yield $s.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()})}refetchLoadingTransactions(){let e=new Date;if((this.coinbaseTransactions[e.getFullYear()]?.[e.getMonth()]||[]).filter(i=>i.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length===0){clearTimeout(this.refetchTimeout);return}this.refetchTimeout=setTimeout(()=>y(this,null,function*(){let i=qe.state.address;yield $s.fetchTransactions(i,"coinbase"),this.refetchLoadingTransactions()}),3e3)}templateLoading(){return Array(Oxe).fill(Z` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(e=>e)}};Th.styles=TW;Tw([ne()],Th.prototype,"selectedOnRampProvider",void 0);Tw([ne()],Th.prototype,"loading",void 0);Tw([ne()],Th.prototype,"coinbaseTransactions",void 0);Tw([ne()],Th.prototype,"tokenImages",void 0);Th=Tw([de("w3m-onramp-activity-view")],Th);var NW=Be`
  :host > wui-grid {
    max-height: 360px;
    overflow: auto;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }
`;var H_=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Sg=class extends be{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Xt.state.paymentCurrency,this.currencies=Xt.state.paymentCurrencies,this.currencyImages=Vs.state.currencyImages,this.unsubscribe.push(Xt.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),Vs.subscribeKey("currencyImages",e=>this.currencyImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        ${this.currenciesTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}currenciesTemplate(){return this.currencies.map(e=>Z`
        <wui-list-item
          imageSrc=${Ve(this.currencyImages?.[e.id])}
          @click=${()=>this.selectCurrency(e)}
          variant="image"
        >
          <wui-text variant="paragraph-500" color="fg-100">${e.id}</wui-text>
        </wui-list-item>
      `)}selectCurrency(e){e&&(Xt.setPaymentCurrency(e),Ct.close())}};Sg.styles=NW;H_([ne()],Sg.prototype,"selectedCurrency",void 0);H_([ne()],Sg.prototype,"currencies",void 0);H_([ne()],Sg.prototype,"currencyImages",void 0);Sg=H_([de("w3m-onramp-fiat-select-view")],Sg);var OW=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},oT=class extends be{constructor(){super(),this.unsubscribe=[],this.providers=Xt.state.providers,this.unsubscribe.push(Xt.subscribeKey("providers",e=>{this.providers=e}))}firstUpdated(){let e=this.providers.map(r=>y(this,null,function*(){return r.name==="coinbase"?yield this.getCoinbaseOnRampURL():Promise.resolve(r?.url)}));Promise.all(e).then(r=>{this.providers=this.providers.map((n,i)=>_e(B({},n),{url:r[i]||""}))})}render(){return Z`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        ${this.onRampProvidersTemplate()}
      </wui-flex>
      <w3m-onramp-providers-footer></w3m-onramp-providers-footer>
    `}onRampProvidersTemplate(){return this.providers.map(e=>Z`
        <wui-onramp-provider-item
          label=${e.label}
          name=${e.name}
          feeRange=${e.feeRange}
          @click=${()=>{this.onClickProvider(e)}}
          ?disabled=${!e.url}
        ></wui-onramp-provider-item>
      `)}onClickProvider(e){Xt.setSelectedProvider(e),ye.push("BuyInProgress"),He.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes")}getCoinbaseOnRampURL(){return y(this,null,function*(){let e=qe.state.address,r=ut.state.caipNetwork;if(!e)throw new Error("No address found");if(!r?.name)throw new Error("No network found");let n=Lo.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[r.name]??Lo.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,i=Xt.state.purchaseCurrency,s=i?[i.symbol]:Xt.state.purchaseCurrencies.map(o=>o.symbol);return yield Dm.generateOnRampURL({defaultNetwork:n,destinationWallets:[{address:e,blockchains:Lo.WC_COINBASE_PAY_SDK_CHAINS,assets:s}],partnerUserId:e,purchaseAmount:Xt.state.purchaseAmount})})}};OW([ne()],oT.prototype,"providers",void 0);oT=OW([de("w3m-onramp-providers-view")],oT);var MW=Be`
  :host > wui-grid {
    max-height: 360px;
    overflow: auto;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }
`;var V_=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Dg=class extends be{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Xt.state.purchaseCurrencies,this.tokens=Xt.state.purchaseCurrencies,this.tokenImages=Vs.state.tokenImages,this.unsubscribe.push(Xt.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),Vs.subscribeKey("tokenImages",e=>this.tokenImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        ${this.currenciesTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}currenciesTemplate(){return this.tokens.map(e=>Z`
        <wui-list-item
          imageSrc=${Ve(this.tokenImages?.[e.symbol])}
          @click=${()=>this.selectToken(e)}
          variant="image"
        >
          <wui-flex gap="3xs" alignItems="center">
            <wui-text variant="paragraph-500" color="fg-100">${e.name}</wui-text>
            <wui-text variant="small-400" color="fg-200">${e.symbol}</wui-text>
          </wui-flex>
        </wui-list-item>
      `)}selectToken(e){e&&(Xt.setPurchaseCurrency(e),Ct.close())}};Dg.styles=MW;V_([ne()],Dg.prototype,"selectedCurrency",void 0);V_([ne()],Dg.prototype,"tokens",void 0);V_([ne()],Dg.prototype,"tokenImages",void 0);Dg=V_([de("w3m-onramp-token-select-view")],Dg);var PW=Be`
  :host > wui-flex:first-child {
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: var(--wui-spacing-m);
  }

  :host > wui-flex:first-child::-webkit-scrollbar {
    display: none;
  }
`;var Mxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},aT=class extends be{render(){return Z`
      <wui-flex flexDirection="column" gap="s">
        <w3m-activity-list page="activity"></w3m-activity-list>
      </wui-flex>
    `}};aT.styles=PW;aT=Mxe([de("w3m-transactions-view")],aT);var Pxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},kxe=[{images:["network","layers","system"],title:"The system\u2019s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}],kW=class extends be{render(){return Z`
      <wui-flex
        flexDirection="column"
        .padding=${["xxl","xl","xl","xl"]}
        alignItems="center"
        gap="xl"
      >
        <w3m-help-widget .data=${kxe}></w3m-help-widget>
        <wui-button
          variant="fill"
          size="sm"
          @click=${()=>{He.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}}
        >
          Learn more
          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
        </wui-button>
      </wui-flex>
    `}};kW=Pxe([de("w3m-what-is-a-network-view")],kW);var Lxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Fxe=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}],LW=class extends be{render(){return Z`
      <wui-flex
        flexDirection="column"
        .padding=${["xxl","xl","xl","xl"]}
        alignItems="center"
        gap="xl"
      >
        <w3m-help-widget .data=${Fxe}></w3m-help-widget>
        <wui-button variant="fill" size="sm" @click=${this.onGetWallet.bind(this)}>
          <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon>
          Get a wallet
        </wui-button>
      </wui-flex>
    `}onGetWallet(){ze.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),ye.push("GetWallet")}};LW=Lxe([de("w3m-what-is-a-wallet-view")],LW);var Bxe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},FW=class extends be{render(){return Z`
      <wui-flex
        flexDirection="column"
        .padding=${["xxl","3xl","xl","3xl"]}
        alignItems="center"
        gap="xl"
      >
        <wui-visual name="onrampCard"></wui-visual>
        <wui-flex flexDirection="column" gap="xs" alignItems="center">
          <wui-text align="center" variant="paragraph-500" color="fg-100">
            Quickly and easily buy digital assets!
          </wui-text>
          <wui-text align="center" variant="small-400" color="fg-200">
            Simply select your preferred onramp provider and add digital assets to your account
            using your credit card or bank transfer
          </wui-text>
        </wui-flex>
        <wui-button @click=${ye.goBack}>
          <wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon>
          Buy
        </wui-button>
      </wui-flex>
    `}};FW=Bxe([de("w3m-what-is-a-buy-view")],FW);var BW=Be`
  wui-loading-spinner {
    margin: 9px auto;
  }
`;var Se={SECURE_SITE_SDK:"https://secure.walletconnect.com/sdk",APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR"},Qc={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed"};var Ar;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(let a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(let o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ar||(Ar={}));var HW=function(t){return t.mergeShapes=(e,r)=>B(B({},e),r),t}(HW||{}),We=Ar.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$f=t=>{switch(typeof t){case"undefined":return We.undefined;case"string":return We.string;case"number":return isNaN(t)?We.nan:We.number;case"boolean":return We.boolean;case"function":return We.function;case"bigint":return We.bigint;case"symbol":return We.symbol;case"object":return Array.isArray(t)?We.array:t===null?We.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?We.promise:typeof Map<"u"&&t instanceof Map?We.map:typeof Set<"u"&&t instanceof Set?We.set:typeof Date<"u"&&t instanceof Date?We.date:We.object;default:return We.unknown}},Ae=Ar.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Uxe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),au=(()=>{class t extends Error{constructor(r){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=r}get errors(){return this.issues}format(r){let n=r||function(o){return o.message},i={_errors:[]},s=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)i._errors.push(n(a));else{let c=i,u=0;for(;u<a.path.length;){let d=a.path[u];u===a.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(n(a))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}};return s(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ar.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=n=>n.message){let n={},i=[];for(let s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(r(s))):i.push(r(s));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}return t.create=e=>new t(e),t})(),Ow=(t,e)=>{let r;switch(t.code){case Ae.invalid_type:t.received===We.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Ae.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ar.jsonStringifyReplacer)}`;break;case Ae.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ar.joinValues(t.keys,", ")}`;break;case Ae.invalid_union:r="Invalid input";break;case Ae.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ar.joinValues(t.options)}`;break;case Ae.invalid_enum_value:r=`Invalid enum value. Expected ${Ar.joinValues(t.options)}, received '${t.received}'`;break;case Ae.invalid_arguments:r="Invalid function arguments";break;case Ae.invalid_return_type:r="Invalid function return type";break;case Ae.invalid_date:r="Invalid date";break;case Ae.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ar.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Ae.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Ae.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Ae.custom:r="Invalid input";break;case Ae.invalid_intersection_types:r="Intersection results could not be merged";break;case Ae.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Ae.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ar.assertNever(t)}return{message:r}},VW=Ow;function jxe(t){VW=t}function q_(){return VW}var W_=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o=_e(B({},i),{path:s}),a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:e,defaultError:a}).message;return _e(B({},i),{path:s,message:i.message||a})},Hxe=[];function Je(t,e){let r=W_({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,q_(),Ow].filter(n=>!!n)});t.common.issues.push(r)}var Cs=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Mt;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static mergeObjectAsync(e,r){return y(this,null,function*(){let n=[];for(let i of r)n.push({key:yield i.key,value:yield i.value});return t.mergeObjectSync(e,n)})}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Mt;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}},Mt=Object.freeze({status:"aborted"}),$W=t=>({status:"dirty",value:t}),zs=t=>({status:"valid",value:t}),lT=t=>t.status==="aborted",uT=t=>t.status==="dirty",Mw=t=>t.status==="valid",z_=t=>typeof Promise<"u"&&t instanceof Promise,dt=function(t){return t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message,t}(dt||{}),xa=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},UW=(t,e)=>{if(Mw(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new au(t.common.issues);return this._error=r,this._error}}};function Vt(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n??a.defaultError}:{message:r??a.defaultError},description:i}}var $t=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return $f(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:$f(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Cs,ctx:{common:e.parent.common,data:e.data,parsedType:$f(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(z_(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$f(e)},s=this._parseSync({data:e,path:i.path,parent:i});return UW(i,s)}parseAsync(e,r){return y(this,null,function*(){let n=yield this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error})}safeParseAsync(e,r){return y(this,null,function*(){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$f(e)},i=this._parse({data:e,path:n.path,parent:n}),s=yield z_(i)?i:Promise.resolve(i);return UW(n,s)})}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let o=e(i),a=()=>s.addIssue(B({code:Ae.custom},n(i)));return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Mh({schema:this,typeName:xt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Oh.create(this,this._def)}nullable(){return kw.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pw.create(this,this._def)}promise(){return eC.create(this,this._def)}or(e){return wT.create([this,e],this._def)}and(e){return vT.create(this,e,this._def)}transform(e){return new Mh(_e(B({},Vt(this._def)),{schema:this,typeName:xt.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){let r=typeof e=="function"?e:()=>e;return new CT(_e(B({},Vt(this._def)),{innerType:this,defaultValue:r,typeName:xt.ZodDefault}))}brand(){return new Y_(B({typeName:xt.ZodBranded,type:this},Vt(this._def)))}catch(e){let r=typeof e=="function"?e:()=>e;return new KW(_e(B({},Vt(this._def)),{innerType:this,catchValue:r,typeName:xt.ZodCatch}))}describe(e){let r=this.constructor;return new r(_e(B({},this._def),{description:e}))}pipe(e){return Lw.create(this,e)}readonly(){return YW.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Vxe=/^c[^\s-]{8,}$/i,$xe=/^[a-z][a-z0-9]*$/,qxe=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wxe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zxe=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gxe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",cT,Zxe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Kxe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Jxe=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Yxe(t,e){return!!((e==="v4"||!e)&&Zxe.test(t)||(e==="v6"||!e)&&Kxe.test(t))}var Q_=(()=>{class t extends $t{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==We.string){let o=this._getOrReturnCtx(r);return Je(o,{code:Ae.invalid_type,expected:We.string,received:o.parsedType}),Mt}let i=new Cs,s;for(let o of this._def.checks)if(o.kind==="min")r.data.length<o.value&&(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")r.data.length>o.value&&(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){let a=r.data.length>o.value,c=r.data.length<o.value;(a||c)&&(s=this._getOrReturnCtx(r,s),a?Je(s,{code:Ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&Je(s,{code:Ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")zxe.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"email",code:Ae.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")cT||(cT=new RegExp(Gxe,"u")),cT.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"emoji",code:Ae.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")Wxe.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"uuid",code:Ae.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")Vxe.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"cuid",code:Ae.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")$xe.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"cuid2",code:Ae.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")qxe.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"ulid",code:Ae.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(r.data)}catch{s=this._getOrReturnCtx(r,s),Je(s,{validation:"url",code:Ae.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"regex",code:Ae.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?r.data=r.data.trim():o.kind==="includes"?r.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?r.data=r.data.toLowerCase():o.kind==="toUpperCase"?r.data=r.data.toUpperCase():o.kind==="startsWith"?r.data.startsWith(o.value)||(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?r.data.endsWith(o.value)||(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?Jxe(o).test(r.data)||(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="ip"?Yxe(r.data,o.version)||(s=this._getOrReturnCtx(r,s),Je(s,{validation:"ip",code:Ae.invalid_string,message:o.message}),i.dirty()):Ar.assertNever(o);return{status:i.value,value:r.data}}_regex(r,n,i){return this.refinement(s=>r.test(s),B({validation:n,code:Ae.invalid_string},dt.errToObj(i)))}_addCheck(r){return new t(_e(B({},this._def),{checks:[...this._def.checks,r]}))}email(r){return this._addCheck(B({kind:"email"},dt.errToObj(r)))}url(r){return this._addCheck(B({kind:"url"},dt.errToObj(r)))}emoji(r){return this._addCheck(B({kind:"emoji"},dt.errToObj(r)))}uuid(r){return this._addCheck(B({kind:"uuid"},dt.errToObj(r)))}cuid(r){return this._addCheck(B({kind:"cuid"},dt.errToObj(r)))}cuid2(r){return this._addCheck(B({kind:"cuid2"},dt.errToObj(r)))}ulid(r){return this._addCheck(B({kind:"ulid"},dt.errToObj(r)))}ip(r){return this._addCheck(B({kind:"ip"},dt.errToObj(r)))}datetime(r){var n;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:r}):this._addCheck(B({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:(n=r?.offset)!==null&&n!==void 0?n:!1},dt.errToObj(r?.message)))}regex(r,n){return this._addCheck(B({kind:"regex",regex:r},dt.errToObj(n)))}includes(r,n){return this._addCheck(B({kind:"includes",value:r,position:n?.position},dt.errToObj(n?.message)))}startsWith(r,n){return this._addCheck(B({kind:"startsWith",value:r},dt.errToObj(n)))}endsWith(r,n){return this._addCheck(B({kind:"endsWith",value:r},dt.errToObj(n)))}min(r,n){return this._addCheck(B({kind:"min",value:r},dt.errToObj(n)))}max(r,n){return this._addCheck(B({kind:"max",value:r},dt.errToObj(n)))}length(r,n){return this._addCheck(B({kind:"length",value:r},dt.errToObj(n)))}nonempty(r){return this.min(1,dt.errToObj(r))}trim(){return new t(_e(B({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new t(_e(B({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new t(_e(B({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get minLength(){let r=null;for(let n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r}get maxLength(){let r=null;for(let n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r}}return t.create=e=>{var r;return new t(B({checks:[],typeName:xt.ZodString,coerce:(r=e?.coerce)!==null&&r!==void 0?r:!1},Vt(e)))},t})();function Qxe(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}var dT=(()=>{class t extends $t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==We.number){let o=this._getOrReturnCtx(r);return Je(o,{code:Ae.invalid_type,expected:We.number,received:o.parsedType}),Mt}let i,s=new Cs;for(let o of this._def.checks)o.kind==="int"?Ar.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?r.data<o.value:r.data<=o.value)&&(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?r.data>o.value:r.data>=o.value)&&(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Qxe(r.data,o.value)!==0&&(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.not_finite,message:o.message}),s.dirty()):Ar.assertNever(o);return{status:s.value,value:r.data}}gte(r,n){return this.setLimit("min",r,!0,dt.toString(n))}gt(r,n){return this.setLimit("min",r,!1,dt.toString(n))}lte(r,n){return this.setLimit("max",r,!0,dt.toString(n))}lt(r,n){return this.setLimit("max",r,!1,dt.toString(n))}setLimit(r,n,i,s){return new t(_e(B({},this._def),{checks:[...this._def.checks,{kind:r,value:n,inclusive:i,message:dt.toString(s)}]}))}_addCheck(r){return new t(_e(B({},this._def),{checks:[...this._def.checks,r]}))}int(r){return this._addCheck({kind:"int",message:dt.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(r)})}multipleOf(r,n){return this._addCheck({kind:"multipleOf",value:r,message:dt.toString(n)})}finite(r){return this._addCheck({kind:"finite",message:dt.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(r)})}get minValue(){let r=null;for(let n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r}get maxValue(){let r=null;for(let n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&Ar.isInteger(r.value))}get isFinite(){let r=null,n=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(r===null||i.value<r)&&(r=i.value)}return Number.isFinite(n)&&Number.isFinite(r)}}return t.create=e=>new t(B({checks:[],typeName:xt.ZodNumber,coerce:e?.coerce||!1},Vt(e))),t})(),hT=(()=>{class t extends $t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce&&(r.data=BigInt(r.data)),this._getType(r)!==We.bigint){let o=this._getOrReturnCtx(r);return Je(o,{code:Ae.invalid_type,expected:We.bigint,received:o.parsedType}),Mt}let i,s=new Cs;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?r.data<o.value:r.data<=o.value)&&(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?r.data>o.value:r.data>=o.value)&&(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?r.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),Je(i,{code:Ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ar.assertNever(o);return{status:s.value,value:r.data}}gte(r,n){return this.setLimit("min",r,!0,dt.toString(n))}gt(r,n){return this.setLimit("min",r,!1,dt.toString(n))}lte(r,n){return this.setLimit("max",r,!0,dt.toString(n))}lt(r,n){return this.setLimit("max",r,!1,dt.toString(n))}setLimit(r,n,i,s){return new t(_e(B({},this._def),{checks:[...this._def.checks,{kind:r,value:n,inclusive:i,message:dt.toString(s)}]}))}_addCheck(r){return new t(_e(B({},this._def),{checks:[...this._def.checks,r]}))}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(r)})}multipleOf(r,n){return this._addCheck({kind:"multipleOf",value:r,message:dt.toString(n)})}get minValue(){let r=null;for(let n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r}get maxValue(){let r=null;for(let n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r}}return t.create=e=>{var r;return new t(B({checks:[],typeName:xt.ZodBigInt,coerce:(r=e?.coerce)!==null&&r!==void 0?r:!1},Vt(e)))},t})(),pT=(()=>{class t extends $t{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==We.boolean){let i=this._getOrReturnCtx(r);return Je(i,{code:Ae.invalid_type,expected:We.boolean,received:i.parsedType}),Mt}return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodBoolean,coerce:e?.coerce||!1},Vt(e))),t})(),mT=(()=>{class t extends $t{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==We.date){let o=this._getOrReturnCtx(r);return Je(o,{code:Ae.invalid_type,expected:We.date,received:o.parsedType}),Mt}if(isNaN(r.data.getTime())){let o=this._getOrReturnCtx(r);return Je(o,{code:Ae.invalid_date}),Mt}let i=new Cs,s;for(let o of this._def.checks)o.kind==="min"?r.data.getTime()<o.value&&(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?r.data.getTime()>o.value&&(s=this._getOrReturnCtx(r,s),Je(s,{code:Ae.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):Ar.assertNever(o);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new t(_e(B({},this._def),{checks:[...this._def.checks,r]}))}min(r,n){return this._addCheck({kind:"min",value:r.getTime(),message:dt.toString(n)})}max(r,n){return this._addCheck({kind:"max",value:r.getTime(),message:dt.toString(n)})}get minDate(){let r=null;for(let n of this._def.checks)n.kind==="min"&&(r===null||n.value>r)&&(r=n.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(let n of this._def.checks)n.kind==="max"&&(r===null||n.value<r)&&(r=n.value);return r!=null?new Date(r):null}}return t.create=e=>new t(B({checks:[],coerce:e?.coerce||!1,typeName:xt.ZodDate},Vt(e))),t})(),qW=(()=>{class t extends $t{_parse(r){if(this._getType(r)!==We.symbol){let i=this._getOrReturnCtx(r);return Je(i,{code:Ae.invalid_type,expected:We.symbol,received:i.parsedType}),Mt}return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodSymbol},Vt(e))),t})(),gT=(()=>{class t extends $t{_parse(r){if(this._getType(r)!==We.undefined){let i=this._getOrReturnCtx(r);return Je(i,{code:Ae.invalid_type,expected:We.undefined,received:i.parsedType}),Mt}return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodUndefined},Vt(e))),t})(),yT=(()=>{class t extends $t{_parse(r){if(this._getType(r)!==We.null){let i=this._getOrReturnCtx(r);return Je(i,{code:Ae.invalid_type,expected:We.null,received:i.parsedType}),Mt}return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodNull},Vt(e))),t})(),G_=(()=>{class t extends $t{constructor(){super(...arguments),this._any=!0}_parse(r){return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodAny},Vt(e))),t})(),Nw=(()=>{class t extends $t{constructor(){super(...arguments),this._unknown=!0}_parse(r){return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodUnknown},Vt(e))),t})(),Nh=(()=>{class t extends $t{_parse(r){let n=this._getOrReturnCtx(r);return Je(n,{code:Ae.invalid_type,expected:We.never,received:n.parsedType}),Mt}}return t.create=e=>new t(B({typeName:xt.ZodNever},Vt(e))),t})(),WW=(()=>{class t extends $t{_parse(r){if(this._getType(r)!==We.undefined){let i=this._getOrReturnCtx(r);return Je(i,{code:Ae.invalid_type,expected:We.void,received:i.parsedType}),Mt}return zs(r.data)}}return t.create=e=>new t(B({typeName:xt.ZodVoid},Vt(e))),t})(),Pw=(()=>{class t extends $t{_parse(r){let{ctx:n,status:i}=this._processInputParams(r),s=this._def;if(n.parsedType!==We.array)return Je(n,{code:Ae.invalid_type,expected:We.array,received:n.parsedType}),Mt;if(s.exactLength!==null){let a=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(a||c)&&(Je(n,{code:a?Ae.too_big:Ae.too_small,minimum:c?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),i.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Je(n,{code:Ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),i.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Je(n,{code:Ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>s.type._parseAsync(new xa(n,a,n.path,c)))).then(a=>Cs.mergeArray(i,a));let o=[...n.data].map((a,c)=>s.type._parseSync(new xa(n,a,n.path,c)));return Cs.mergeArray(i,o)}get element(){return this._def.type}min(r,n){return new t(_e(B({},this._def),{minLength:{value:r,message:dt.toString(n)}}))}max(r,n){return new t(_e(B({},this._def),{maxLength:{value:r,message:dt.toString(n)}}))}length(r,n){return new t(_e(B({},this._def),{exactLength:{value:r,message:dt.toString(n)}}))}nonempty(r){return this.min(1,r)}}return t.create=(e,r)=>new t(B({type:e,minLength:null,maxLength:null,exactLength:null,typeName:xt.ZodArray},Vt(r))),t})();function Rg(t){if(t instanceof Tg){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Oh.create(Rg(n))}return new Tg(_e(B({},t._def),{shape:()=>e}))}else return t instanceof Pw?new Pw(_e(B({},t._def),{type:Rg(t.element)})):t instanceof Oh?Oh.create(Rg(t.unwrap())):t instanceof kw?kw.create(Rg(t.unwrap())):t instanceof Ng?Ng.create(t.items.map(e=>Rg(e))):t}var Tg=(()=>{class t extends $t{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let r=this._def.shape(),n=Ar.objectKeys(r);return this._cached={shape:r,keys:n}}_parse(r){if(this._getType(r)!==We.object){let d=this._getOrReturnCtx(r);return Je(d,{code:Ae.invalid_type,expected:We.object,received:d.parsedType}),Mt}let{status:i,ctx:s}=this._processInputParams(r),{shape:o,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Nh&&this._def.unknownKeys==="strip"))for(let d in s.data)a.includes(d)||c.push(d);let u=[];for(let d of a){let h=o[d],m=s.data[d];u.push({key:{status:"valid",value:d},value:h._parse(new xa(s,m,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof Nh){let d=this._def.unknownKeys;if(d==="passthrough")for(let h of c)u.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(d==="strict")c.length>0&&(Je(s,{code:Ae.unrecognized_keys,keys:c}),i.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let h of c){let m=s.data[h];u.push({key:{status:"valid",value:h},value:d._parse(new xa(s,m,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(()=>y(this,null,function*(){let d=[];for(let h of u){let m=yield h.key;d.push({key:m,value:yield h.value,alwaysSet:h.alwaysSet})}return d})).then(d=>Cs.mergeObjectSync(i,d)):Cs.mergeObjectSync(i,u)}get shape(){return this._def.shape()}strict(r){return dt.errToObj,new t(B(_e(B({},this._def),{unknownKeys:"strict"}),r!==void 0?{errorMap:(n,i)=>{var s,o,a,c;let u=(a=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,i).message)!==null&&a!==void 0?a:i.defaultError;return n.code==="unrecognized_keys"?{message:(c=dt.errToObj(r).message)!==null&&c!==void 0?c:u}:{message:u}}}:{}))}strip(){return new t(_e(B({},this._def),{unknownKeys:"strip"}))}passthrough(){return new t(_e(B({},this._def),{unknownKeys:"passthrough"}))}extend(r){return new t(_e(B({},this._def),{shape:()=>B(B({},this._def.shape()),r)}))}merge(r){return new t({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>B(B({},this._def.shape()),r._def.shape()),typeName:xt.ZodObject})}setKey(r,n){return this.augment({[r]:n})}catchall(r){return new t(_e(B({},this._def),{catchall:r}))}pick(r){let n={};return Ar.objectKeys(r).forEach(i=>{r[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new t(_e(B({},this._def),{shape:()=>n}))}omit(r){let n={};return Ar.objectKeys(this.shape).forEach(i=>{r[i]||(n[i]=this.shape[i])}),new t(_e(B({},this._def),{shape:()=>n}))}deepPartial(){return Rg(this)}partial(r){let n={};return Ar.objectKeys(this.shape).forEach(i=>{let s=this.shape[i];r&&!r[i]?n[i]=s:n[i]=s.optional()}),new t(_e(B({},this._def),{shape:()=>n}))}required(r){let n={};return Ar.objectKeys(this.shape).forEach(i=>{if(r&&!r[i])n[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof Oh;)o=o._def.innerType;n[i]=o}}),new t(_e(B({},this._def),{shape:()=>n}))}keyof(){return ZW(Ar.objectKeys(this.shape))}}return t.create=(e,r)=>new t(B({shape:()=>e,unknownKeys:"strip",catchall:Nh.create(),typeName:xt.ZodObject},Vt(r))),t.strictCreate=(e,r)=>new t(B({shape:()=>e,unknownKeys:"strict",catchall:Nh.create(),typeName:xt.ZodObject},Vt(r))),t.lazycreate=(e,r)=>new t(B({shape:e,unknownKeys:"strip",catchall:Nh.create(),typeName:xt.ZodObject},Vt(r))),t})(),wT=(()=>{class t extends $t{_parse(r){let{ctx:n}=this._processInputParams(r),i=this._def.options;function s(o){for(let c of o)if(c.result.status==="valid")return c.result;for(let c of o)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=o.map(c=>new au(c.ctx.common.issues));return Je(n,{code:Ae.invalid_union,unionErrors:a}),Mt}if(n.common.async)return Promise.all(i.map(o=>y(this,null,function*(){let a=_e(B({},n),{common:_e(B({},n.common),{issues:[]}),parent:null});return{result:yield o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}}))).then(s);{let o,a=[];for(let u of i){let d=_e(B({},n),{common:_e(B({},n.common),{issues:[]}),parent:null}),h=u._parseSync({data:n.data,path:n.path,parent:d});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,ctx:d}),d.common.issues.length&&a.push(d.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let c=a.map(u=>new au(u));return Je(n,{code:Ae.invalid_union,unionErrors:c}),Mt}}get options(){return this._def.options}}return t.create=(e,r)=>new t(B({options:e,typeName:xt.ZodUnion},Vt(r))),t})(),$_=t=>t instanceof bT?$_(t.schema):t instanceof Mh?$_(t.innerType()):t instanceof ET?[t.value]:t instanceof X_?t.options:t instanceof _T?Object.keys(t.enum):t instanceof CT?$_(t._def.innerType):t instanceof gT?[void 0]:t instanceof yT?[null]:null,Z_=class t extends $t{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==We.object)return Je(r,{code:Ae.invalid_type,expected:We.object,received:r.parsedType}),Mt;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Je(r,{code:Ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Mt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let o=$_(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new t(B({typeName:xt.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i},Vt(n)))}};function fT(t,e){let r=$f(t),n=$f(e);if(t===e)return{valid:!0,data:t};if(r===We.object&&n===We.object){let i=Ar.objectKeys(e),s=Ar.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o=B(B({},t),e);for(let a of s){let c=fT(t[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===We.array&&n===We.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let o=t[s],a=e[s],c=fT(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===We.date&&n===We.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var vT=(()=>{class t extends $t{_parse(r){let{status:n,ctx:i}=this._processInputParams(r),s=(o,a)=>{if(lT(o)||lT(a))return Mt;let c=fT(o.value,a.value);return c.valid?((uT(o)||uT(a))&&n.dirty(),{status:n.value,value:c.data}):(Je(i,{code:Ae.invalid_intersection_types}),Mt)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}return t.create=(e,r,n)=>new t(B({left:e,right:r,typeName:xt.ZodIntersection},Vt(n))),t})(),Ng=(()=>{class t extends $t{_parse(r){let{status:n,ctx:i}=this._processInputParams(r);if(i.parsedType!==We.array)return Je(i,{code:Ae.invalid_type,expected:We.array,received:i.parsedType}),Mt;if(i.data.length<this._def.items.length)return Je(i,{code:Ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Mt;!this._def.rest&&i.data.length>this._def.items.length&&(Je(i,{code:Ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...i.data].map((a,c)=>{let u=this._def.items[c]||this._def.rest;return u?u._parse(new xa(i,a,i.path,c)):null}).filter(a=>!!a);return i.common.async?Promise.all(o).then(a=>Cs.mergeArray(n,a)):Cs.mergeArray(n,o)}get items(){return this._def.items}rest(r){return new t(_e(B({},this._def),{rest:r}))}}return t.create=(e,r)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new t(B({items:e,typeName:xt.ZodTuple,rest:null},Vt(r)))},t})(),K_=class t extends $t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==We.object)return Je(n,{code:Ae.invalid_type,expected:We.object,received:n.parsedType}),Mt;let i=[],s=this._def.keyType,o=this._def.valueType;for(let a in n.data)i.push({key:s._parse(new xa(n,a,n.path,a)),value:o._parse(new xa(n,n.data[a],n.path,a))});return n.common.async?Cs.mergeObjectAsync(r,i):Cs.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof $t?new t(B({keyType:e,valueType:r,typeName:xt.ZodRecord},Vt(n))):new t(B({keyType:Q_.create(),valueType:e,typeName:xt.ZodRecord},Vt(r)))}},zW=(()=>{class t extends $t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){let{status:n,ctx:i}=this._processInputParams(r);if(i.parsedType!==We.map)return Je(i,{code:Ae.invalid_type,expected:We.map,received:i.parsedType}),Mt;let s=this._def.keyType,o=this._def.valueType,a=[...i.data.entries()].map(([c,u],d)=>({key:s._parse(new xa(i,c,i.path,[d,"key"])),value:o._parse(new xa(i,u,i.path,[d,"value"]))}));if(i.common.async){let c=new Map;return Promise.resolve().then(()=>y(this,null,function*(){for(let u of a){let d=yield u.key,h=yield u.value;if(d.status==="aborted"||h.status==="aborted")return Mt;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(d.value,h.value)}return{status:n.value,value:c}}))}else{let c=new Map;for(let u of a){let d=u.key,h=u.value;if(d.status==="aborted"||h.status==="aborted")return Mt;(d.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(d.value,h.value)}return{status:n.value,value:c}}}}return t.create=(e,r,n)=>new t(B({valueType:r,keyType:e,typeName:xt.ZodMap},Vt(n))),t})(),GW=(()=>{class t extends $t{_parse(r){let{status:n,ctx:i}=this._processInputParams(r);if(i.parsedType!==We.set)return Je(i,{code:Ae.invalid_type,expected:We.set,received:i.parsedType}),Mt;let s=this._def;s.minSize!==null&&i.data.size<s.minSize.value&&(Je(i,{code:Ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&i.data.size>s.maxSize.value&&(Je(i,{code:Ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let o=this._def.valueType;function a(u){let d=new Set;for(let h of u){if(h.status==="aborted")return Mt;h.status==="dirty"&&n.dirty(),d.add(h.value)}return{status:n.value,value:d}}let c=[...i.data.values()].map((u,d)=>o._parse(new xa(i,u,i.path,d)));return i.common.async?Promise.all(c).then(u=>a(u)):a(c)}min(r,n){return new t(_e(B({},this._def),{minSize:{value:r,message:dt.toString(n)}}))}max(r,n){return new t(_e(B({},this._def),{maxSize:{value:r,message:dt.toString(n)}}))}size(r,n){return this.min(r,n).max(r,n)}nonempty(r){return this.min(1,r)}}return t.create=(e,r)=>new t(B({valueType:e,minSize:null,maxSize:null,typeName:xt.ZodSet},Vt(r))),t})(),J_=class t extends $t{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==We.function)return Je(r,{code:Ae.invalid_type,expected:We.function,received:r.parsedType}),Mt;function n(a,c){return W_({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,q_(),Ow].filter(u=>!!u),issueData:{code:Ae.invalid_arguments,argumentsError:c}})}function i(a,c){return W_({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,q_(),Ow].filter(u=>!!u),issueData:{code:Ae.invalid_return_type,returnTypeError:c}})}let s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof eC){let a=this;return zs(function(...c){return y(this,null,function*(){let u=new au([]),d=yield a._def.args.parseAsync(c,s).catch(w=>{throw u.addIssue(n(c,w)),u}),h=yield Reflect.apply(o,this,d);return yield a._def.returns._def.type.parseAsync(h,s).catch(w=>{throw u.addIssue(i(h,w)),u})})})}else{let a=this;return zs(function(...c){let u=a._def.args.safeParse(c,s);if(!u.success)throw new au([n(c,u.error)]);let d=Reflect.apply(o,this,u.data),h=a._def.returns.safeParse(d,s);if(!h.success)throw new au([i(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t(_e(B({},this._def),{args:Ng.create(e).rest(Nw.create())}))}returns(e){return new t(_e(B({},this._def),{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t(B({args:e||Ng.create([]).rest(Nw.create()),returns:r||Nw.create(),typeName:xt.ZodFunction},Vt(n)))}},bT=(()=>{class t extends $t{get schema(){return this._def.getter()}_parse(r){let{ctx:n}=this._processInputParams(r);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}return t.create=(e,r)=>new t(B({getter:e,typeName:xt.ZodLazy},Vt(r))),t})(),ET=(()=>{class t extends $t{_parse(r){if(r.data!==this._def.value){let n=this._getOrReturnCtx(r);return Je(n,{received:n.data,code:Ae.invalid_literal,expected:this._def.value}),Mt}return{status:"valid",value:r.data}}get value(){return this._def.value}}return t.create=(e,r)=>new t(B({value:e,typeName:xt.ZodLiteral},Vt(r))),t})();function ZW(t,e){return new X_(B({values:t,typeName:xt.ZodEnum},Vt(e)))}var X_=(()=>{class t extends $t{_parse(r){if(typeof r.data!="string"){let n=this._getOrReturnCtx(r),i=this._def.values;return Je(n,{expected:Ar.joinValues(i),received:n.parsedType,code:Ae.invalid_type}),Mt}if(this._def.values.indexOf(r.data)===-1){let n=this._getOrReturnCtx(r),i=this._def.values;return Je(n,{received:n.data,code:Ae.invalid_enum_value,options:i}),Mt}return zs(r.data)}get options(){return this._def.values}get enum(){let r={};for(let n of this._def.values)r[n]=n;return r}get Values(){let r={};for(let n of this._def.values)r[n]=n;return r}get Enum(){let r={};for(let n of this._def.values)r[n]=n;return r}extract(r){return t.create(r)}exclude(r){return t.create(this.options.filter(n=>!r.includes(n)))}}return t.create=ZW,t})(),_T=(()=>{class t extends $t{_parse(r){let n=Ar.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(r);if(i.parsedType!==We.string&&i.parsedType!==We.number){let s=Ar.objectValues(n);return Je(i,{expected:Ar.joinValues(s),received:i.parsedType,code:Ae.invalid_type}),Mt}if(n.indexOf(r.data)===-1){let s=Ar.objectValues(n);return Je(i,{received:i.data,code:Ae.invalid_enum_value,options:s}),Mt}return zs(r.data)}get enum(){return this._def.values}}return t.create=(e,r)=>new t(B({values:e,typeName:xt.ZodNativeEnum},Vt(r))),t})(),eC=(()=>{class t extends $t{unwrap(){return this._def.type}_parse(r){let{ctx:n}=this._processInputParams(r);if(n.parsedType!==We.promise&&n.common.async===!1)return Je(n,{code:Ae.invalid_type,expected:We.promise,received:n.parsedType}),Mt;let i=n.parsedType===We.promise?n.data:Promise.resolve(n.data);return zs(i.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}return t.create=(e,r)=>new t(B({type:e,typeName:xt.ZodPromise},Vt(r))),t})(),Mh=(()=>{class t extends $t{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){let{status:n,ctx:i}=this._processInputParams(r),s=this._def.effect||null,o={addIssue:a=>{Je(i,a),a.fatal?n.abort():n.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let a=s.transform(i.data,o);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(c=>this._def.schema._parseAsync({data:c,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(s.type==="refinement"){let a=c=>{let u=s.refinement(c,o);if(i.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(i.common.async===!1){let c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return c.status==="aborted"?Mt:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>c.status==="aborted"?Mt:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Mw(a))return a;let c=s.transform(a.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>Mw(a)?Promise.resolve(s.transform(a.value,o)).then(c=>({status:n.value,value:c})):a);Ar.assertNever(s)}}return t.create=(e,r,n)=>new t(B({schema:e,typeName:xt.ZodEffects,effect:r},Vt(n))),t.createWithPreprocess=(e,r,n)=>new t(B({schema:r,effect:{type:"preprocess",transform:e},typeName:xt.ZodEffects},Vt(n))),t})(),Oh=(()=>{class t extends $t{_parse(r){return this._getType(r)===We.undefined?zs(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}return t.create=(e,r)=>new t(B({innerType:e,typeName:xt.ZodOptional},Vt(r))),t})(),kw=(()=>{class t extends $t{_parse(r){return this._getType(r)===We.null?zs(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}return t.create=(e,r)=>new t(B({innerType:e,typeName:xt.ZodNullable},Vt(r))),t})(),CT=(()=>{class t extends $t{_parse(r){let{ctx:n}=this._processInputParams(r),i=n.data;return n.parsedType===We.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}return t.create=(e,r)=>new t(B({innerType:e,typeName:xt.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default},Vt(r))),t})(),KW=(()=>{class t extends $t{_parse(r){let{ctx:n}=this._processInputParams(r),i=_e(B({},n),{common:_e(B({},n.common),{issues:[]})}),s=this._def.innerType._parse({data:i.data,path:i.path,parent:B({},i)});return z_(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new au(i.common.issues)},input:i.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new au(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}return t.create=(e,r)=>new t(B({innerType:e,typeName:xt.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch},Vt(r))),t})(),JW=(()=>{class t extends $t{_parse(r){if(this._getType(r)!==We.nan){let i=this._getOrReturnCtx(r);return Je(i,{code:Ae.invalid_type,expected:We.nan,received:i.parsedType}),Mt}return{status:"valid",value:r.data}}}return t.create=e=>new t(B({typeName:xt.ZodNaN},Vt(e))),t})(),Xxe=Symbol("zod_brand"),Y_=class extends $t{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Lw=class t extends $t{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return y(this,null,function*(){let s=yield this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Mt:s.status==="dirty"?(r.dirty(),$W(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})});{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Mt:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:xt.ZodPipeline})}},YW=(()=>{class t extends $t{_parse(r){let n=this._def.innerType._parse(r);return Mw(n)&&(n.value=Object.freeze(n.value)),n}}return t.create=(e,r)=>new t(B({innerType:e,typeName:xt.ZodReadonly},Vt(r))),t})(),QW=(t,e={},r)=>t?G_.create().superRefine((n,i)=>{var s,o;if(!t(n)){let a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;i.addIssue(_e(B({code:"custom"},u),{fatal:c}))}}):G_.create(),e8e={object:Tg.lazycreate},xt=function(t){return t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly",t}(xt||{}),t8e=(t,e={message:`Input not instance of ${t.name}`})=>QW(r=>r instanceof t,e),XW=Q_.create,ez=dT.create,r8e=JW.create,n8e=hT.create,tz=pT.create,i8e=mT.create,s8e=qW.create,o8e=gT.create,a8e=yT.create,c8e=G_.create,l8e=Nw.create,u8e=Nh.create,f8e=WW.create,d8e=Pw.create,h8e=Tg.create,p8e=Tg.strictCreate,m8e=wT.create,g8e=Z_.create,y8e=vT.create,w8e=Ng.create,v8e=K_.create,b8e=zW.create,E8e=GW.create,_8e=J_.create,C8e=bT.create,x8e=ET.create,I8e=X_.create,A8e=_T.create,S8e=eC.create,jW=Mh.create,D8e=Oh.create,R8e=kw.create,T8e=Mh.createWithPreprocess,N8e=Lw.create,O8e=()=>XW().optional(),M8e=()=>ez().optional(),P8e=()=>tz().optional(),k8e={string:t=>Q_.create(_e(B({},t),{coerce:!0})),number:t=>dT.create(_e(B({},t),{coerce:!0})),boolean:t=>pT.create(_e(B({},t),{coerce:!0})),bigint:t=>hT.create(_e(B({},t),{coerce:!0})),date:t=>mT.create(_e(B({},t),{coerce:!0}))},L8e=Mt,j=Object.freeze({__proto__:null,defaultErrorMap:Ow,setErrorMap:jxe,getErrorMap:q_,makeIssue:W_,EMPTY_PATH:Hxe,addIssueToContext:Je,ParseStatus:Cs,INVALID:Mt,DIRTY:$W,OK:zs,isAborted:lT,isDirty:uT,isValid:Mw,isAsync:z_,get util(){return Ar},get objectUtil(){return HW},ZodParsedType:We,getParsedType:$f,ZodType:$t,ZodString:Q_,ZodNumber:dT,ZodBigInt:hT,ZodBoolean:pT,ZodDate:mT,ZodSymbol:qW,ZodUndefined:gT,ZodNull:yT,ZodAny:G_,ZodUnknown:Nw,ZodNever:Nh,ZodVoid:WW,ZodArray:Pw,ZodObject:Tg,ZodUnion:wT,ZodDiscriminatedUnion:Z_,ZodIntersection:vT,ZodTuple:Ng,ZodRecord:K_,ZodMap:zW,ZodSet:GW,ZodFunction:J_,ZodLazy:bT,ZodLiteral:ET,ZodEnum:X_,ZodNativeEnum:_T,ZodPromise:eC,ZodEffects:Mh,ZodTransformer:Mh,ZodOptional:Oh,ZodNullable:kw,ZodDefault:CT,ZodCatch:KW,ZodNaN:JW,BRAND:Xxe,ZodBranded:Y_,ZodPipeline:Lw,ZodReadonly:YW,custom:QW,Schema:$t,ZodSchema:$t,late:e8e,get ZodFirstPartyTypeKind(){return xt},coerce:k8e,any:c8e,array:d8e,bigint:n8e,boolean:tz,date:i8e,discriminatedUnion:g8e,effect:jW,enum:I8e,function:_8e,instanceof:t8e,intersection:y8e,lazy:C8e,literal:x8e,map:b8e,nan:r8e,nativeEnum:A8e,never:u8e,null:a8e,nullable:R8e,number:ez,object:h8e,oboolean:P8e,onumber:M8e,optional:D8e,ostring:O8e,pipeline:N8e,preprocess:T8e,promise:S8e,record:v8e,set:E8e,strictObject:p8e,string:XW,symbol:s8e,transformer:jW,tuple:w8e,undefined:o8e,union:m8e,unknown:l8e,void:f8e,NEVER:L8e,ZodIssueCode:Ae,quotelessJson:Uxe,ZodError:au});var cs=j.object({message:j.string()});function ht(t){return j.literal(Se[t])}var Odt=j.object({accessList:j.array(j.string()),blockHash:j.string().nullable(),blockNumber:j.string().nullable(),chainId:j.string(),from:j.string(),gas:j.string(),hash:j.string(),input:j.string().nullable(),maxFeePerGas:j.string(),maxPriorityFeePerGas:j.string(),nonce:j.string(),r:j.string(),s:j.string(),to:j.string(),transactionIndex:j.string().nullable(),type:j.string(),v:j.string(),value:j.string()}),F8e=j.object({chainId:j.number()}),B8e=j.object({email:j.string().email()}),U8e=j.object({otp:j.string()}),j8e=j.object({chainId:j.optional(j.number())}),H8e=j.object({email:j.string().email()}),V8e=j.object({otp:j.string()}),$8e=j.object({otp:j.string()}),q8e=j.object({themeMode:j.optional(j.enum(["light","dark"])),themeVariables:j.optional(j.record(j.string(),j.string().or(j.number())))}),W8e=j.object({metadata:j.object({name:j.string(),description:j.string(),url:j.string(),icons:j.array(j.string())}).optional(),sdkVersion:j.string(),projectId:j.string()}),z8e=j.object({type:j.string()}),G8e=j.object({action:j.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),Z8e=j.object({email:j.string().email(),address:j.string(),chainId:j.number()}),K8e=j.object({isConnected:j.boolean()}),J8e=j.object({chainId:j.number()}),Y8e=j.object({chainId:j.number()}),Q8e=j.object({newEmail:j.string().email()}),X8e=j.object({smartAccountEnabledNetworks:j.array(j.number())}),e4e=j.object({address:j.string(),isDeployed:j.boolean()}),t4e=j.object({type:j.string()}),r4e=j.any(),n4e=j.object({method:j.literal("eth_accounts")}),i4e=j.object({method:j.literal("eth_blockNumber")}),s4e=j.object({method:j.literal("eth_call"),params:j.array(j.any())}),o4e=j.object({method:j.literal("eth_chainId")}),a4e=j.object({method:j.literal("eth_estimateGas"),params:j.array(j.any())}),c4e=j.object({method:j.literal("eth_feeHistory"),params:j.array(j.any())}),l4e=j.object({method:j.literal("eth_gasPrice")}),u4e=j.object({method:j.literal("eth_getAccount"),params:j.array(j.any())}),f4e=j.object({method:j.literal("eth_getBalance"),params:j.array(j.any())}),d4e=j.object({method:j.literal("eth_getBlockByHash"),params:j.array(j.any())}),h4e=j.object({method:j.literal("eth_getBlockByNumber"),params:j.array(j.any())}),p4e=j.object({method:j.literal("eth_getBlockReceipts"),params:j.array(j.any())}),m4e=j.object({method:j.literal("eth_getBlockTransactionCountByHash"),params:j.array(j.any())}),g4e=j.object({method:j.literal("eth_getBlockTransactionCountByNumber"),params:j.array(j.any())}),y4e=j.object({method:j.literal("eth_getCode"),params:j.array(j.any())}),w4e=j.object({method:j.literal("eth_getFilterChanges"),params:j.array(j.any())}),v4e=j.object({method:j.literal("eth_getFilterLogs"),params:j.array(j.any())}),b4e=j.object({method:j.literal("eth_getLogs"),params:j.array(j.any())}),E4e=j.object({method:j.literal("eth_getProof"),params:j.array(j.any())}),_4e=j.object({method:j.literal("eth_getStorageAt"),params:j.array(j.any())}),C4e=j.object({method:j.literal("eth_getTransactionByBlockHashAndIndex"),params:j.array(j.any())}),x4e=j.object({method:j.literal("eth_getTransactionByBlockNumberAndIndex"),params:j.array(j.any())}),I4e=j.object({method:j.literal("eth_getTransactionByHash"),params:j.array(j.any())}),A4e=j.object({method:j.literal("eth_getTransactionCount"),params:j.array(j.any())}),S4e=j.object({method:j.literal("eth_getTransactionReceipt"),params:j.array(j.any())}),D4e=j.object({method:j.literal("eth_getUncleCountByBlockHash"),params:j.array(j.any())}),R4e=j.object({method:j.literal("eth_getUncleCountByBlockNumber"),params:j.array(j.any())}),T4e=j.object({method:j.literal("eth_maxPriorityFeePerGas")}),N4e=j.object({method:j.literal("eth_newBlockFilter")}),O4e=j.object({method:j.literal("eth_newFilter"),params:j.array(j.any())}),M4e=j.object({method:j.literal("eth_newPendingTransactionFilter")}),P4e=j.object({method:j.literal("eth_sendRawTransaction"),params:j.array(j.any())}),k4e=j.object({method:j.literal("eth_syncing"),params:j.array(j.any())}),L4e=j.object({method:j.literal("eth_uninstallFilter"),params:j.array(j.any())}),rz=j.object({method:j.literal("personal_sign"),params:j.array(j.any())}),F4e=j.object({method:j.literal("eth_signTypedData_v4"),params:j.array(j.any())}),nz=j.object({method:j.literal("eth_sendTransaction"),params:j.array(j.any())}),iz=j.object({token:j.string()}),Og={appEvent:j.object({type:ht("APP_SWITCH_NETWORK"),payload:F8e}).or(j.object({type:ht("APP_CONNECT_EMAIL"),payload:B8e})).or(j.object({type:ht("APP_CONNECT_DEVICE")})).or(j.object({type:ht("APP_CONNECT_OTP"),payload:U8e})).or(j.object({type:ht("APP_GET_USER"),payload:j.optional(j8e)})).or(j.object({type:ht("APP_SIGN_OUT")})).or(j.object({type:ht("APP_IS_CONNECTED"),payload:j.optional(iz)})).or(j.object({type:ht("APP_GET_CHAIN_ID")})).or(j.object({type:ht("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(j.object({type:ht("APP_INIT_SMART_ACCOUNT")})).or(j.object({type:ht("APP_SET_PREFERRED_ACCOUNT"),payload:z8e})).or(j.object({type:ht("APP_RPC_REQUEST"),payload:rz.or(nz).or(n4e).or(i4e).or(s4e).or(o4e).or(a4e).or(c4e).or(l4e).or(u4e).or(f4e).or(d4e).or(h4e).or(p4e).or(m4e).or(g4e).or(y4e).or(w4e).or(v4e).or(b4e).or(E4e).or(_4e).or(C4e).or(x4e).or(I4e).or(A4e).or(S4e).or(D4e).or(R4e).or(T4e).or(N4e).or(O4e).or(M4e).or(P4e).or(k4e).or(L4e).or(rz).or(F4e).or(nz)})).or(j.object({type:ht("APP_UPDATE_EMAIL"),payload:H8e})).or(j.object({type:ht("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:V8e})).or(j.object({type:ht("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:$8e})).or(j.object({type:ht("APP_SYNC_THEME"),payload:q8e})).or(j.object({type:ht("APP_SYNC_DAPP_DATA"),payload:W8e})),frameEvent:j.object({type:ht("FRAME_SWITCH_NETWORK_ERROR"),payload:cs}).or(j.object({type:ht("FRAME_SWITCH_NETWORK_SUCCESS"),payload:Y8e})).or(j.object({type:ht("FRAME_CONNECT_EMAIL_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_CONNECT_EMAIL_SUCCESS"),payload:G8e})).or(j.object({type:ht("FRAME_CONNECT_OTP_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_CONNECT_OTP_SUCCESS")})).or(j.object({type:ht("FRAME_CONNECT_DEVICE_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_CONNECT_DEVICE_SUCCESS")})).or(j.object({type:ht("FRAME_GET_USER_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_GET_USER_SUCCESS"),payload:Z8e})).or(j.object({type:ht("FRAME_SIGN_OUT_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_SIGN_OUT_SUCCESS")})).or(j.object({type:ht("FRAME_IS_CONNECTED_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_IS_CONNECTED_SUCCESS"),payload:K8e})).or(j.object({type:ht("FRAME_GET_CHAIN_ID_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_GET_CHAIN_ID_SUCCESS"),payload:J8e})).or(j.object({type:ht("FRAME_RPC_REQUEST_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_RPC_REQUEST_SUCCESS"),payload:r4e})).or(j.object({type:ht("FRAME_SESSION_UPDATE"),payload:iz})).or(j.object({type:ht("FRAME_UPDATE_EMAIL_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_UPDATE_EMAIL_SUCCESS")})).or(j.object({type:ht("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(j.object({type:ht("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:Q8e})).or(j.object({type:ht("FRAME_SYNC_THEME_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_SYNC_THEME_SUCCESS")})).or(j.object({type:ht("FRAME_SYNC_DAPP_DATA_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(j.object({type:ht("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:X8e})).or(j.object({type:ht("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_INIT_SMART_ACCOUNT_SUCCESS"),payload:e4e})).or(j.object({type:ht("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:cs})).or(j.object({type:ht("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:t4e})).or(j.object({type:ht("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:cs}))};var ls={set(t,e){Gn.isClient&&localStorage.setItem(`${Se.STORAGE_KEY}${t}`,e)},get(t){return Gn.isClient?localStorage.getItem(`${Se.STORAGE_KEY}${t}`):null},delete(t){Gn.isClient&&localStorage.removeItem(`${Se.STORAGE_KEY}${t}`)}};var B4e=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],tC=30*1e3,Gn={getBlockchainApiUrl(){try{let{timeZone:t}=new Intl.DateTimeFormat().resolvedOptions(),e=t.toUpperCase();return B4e.includes(e)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){let t=ls.get(Se.LAST_EMAIL_LOGIN_TIME);if(t){let e=Date.now()-Number(t);if(e<tC){let r=Math.ceil((tC-e)/1e3);throw new Error(`Please try again after ${r} seconds`)}}},getTimeToNextEmailLogin(){let t=ls.get(Se.LAST_EMAIL_LOGIN_TIME);if(t){let e=Date.now()-Number(t);if(e<tC)return Math.ceil((tC-e)/1e3)}return 0},checkIfRequestExists(t){let e=this.getRequestMethod(t);return Qc.NOT_SAFE_RPC_METHODS.includes(e)||Qc.SAFE_RPC_METHODS.includes(e)},getRequestMethod(t){return t?.payload?.method},checkIfRequestIsAllowed(t){let e=this.getRequestMethod(t);return Qc.SAFE_RPC_METHODS.includes(e)},isClient:typeof window<"u"};var Fw=class{constructor(e,r=!1){if(this.iframe=null,this.rpcUrl=Gn.getBlockchainApiUrl(),this.events={onFrameEvent:n=>{Gn.isClient&&window.addEventListener("message",({data:i})=>{if(!i.type?.includes(Se.FRAME_EVENT_KEY))return;let s=Og.frameEvent.parse(i);n(s)})},onAppEvent:n=>{Gn.isClient&&window.addEventListener("message",({data:i})=>{if(!i.type?.includes(Se.APP_EVENT_KEY))return;let s=Og.appEvent.parse(i);n(s)})},postAppEvent:n=>{if(Gn.isClient){if(!this.iframe?.contentWindow)throw new Error("W3mFrame: iframe is not set");Og.appEvent.parse(n),window.postMessage(n),this.iframe.contentWindow.postMessage(n,"*")}},postFrameEvent:n=>{if(Gn.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");Og.frameEvent.parse(n),parent.postMessage(n,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((n,i)=>{this.frameLoadPromiseResolver={resolve:n,reject:i}}),r&&(this.frameLoadPromise=new Promise((n,i)=>{this.frameLoadPromiseResolver={resolve:n,reject:i}}),Gn.isClient)){let n=document.createElement("iframe");n.id="w3m-iframe",n.src=`${Se.SECURE_SITE_SDK}?projectId=${e}`,n.style.position="fixed",n.style.zIndex="999999",n.style.display="none",n.style.opacity="0",n.style.borderRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(n),this.iframe=n,this.iframe.onload=()=>{this.frameLoadPromiseResolver?.resolve(void 0)},this.iframe.onerror=()=>{this.frameLoadPromiseResolver?.reject("Unable to load email login dependency")}}}get networks(){let e=[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,324,280,100,8453,84531,7777777,999].map(r=>({[r]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=eip155:${r}&projectId=${this.projectId}`,chainId:r}}));return Object.assign({},...e)}};var Bw=class{constructor(e){this.connectEmailResolver=void 0,this.connectDeviceResolver=void 0,this.connectOtpResolver=void 0,this.connectResolver=void 0,this.disconnectResolver=void 0,this.isConnectedResolver=void 0,this.getChainIdResolver=void 0,this.switchChainResolver=void 0,this.rpcRequestResolver=void 0,this.updateEmailResolver=void 0,this.updateEmailPrimaryOtpResolver=void 0,this.updateEmailSecondaryOtpResolver=void 0,this.syncThemeResolver=void 0,this.syncDappDataResolver=void 0,this.smartAccountEnabledNetworksResolver=void 0,this.initSmartAccountResolver=void 0,this.setPreferredAccountResolver=void 0,this.w3mFrame=new Fw(e,!0),this.w3mFrame.events.onFrameEvent(r=>{switch(console.log("\u{1F4BB} received",r),r.type){case Se.FRAME_CONNECT_EMAIL_SUCCESS:return this.onConnectEmailSuccess(r);case Se.FRAME_CONNECT_EMAIL_ERROR:return this.onConnectEmailError(r);case Se.FRAME_CONNECT_DEVICE_SUCCESS:return this.onConnectDeviceSuccess();case Se.FRAME_CONNECT_DEVICE_ERROR:return this.onConnectDeviceError(r);case Se.FRAME_CONNECT_OTP_SUCCESS:return this.onConnectOtpSuccess();case Se.FRAME_CONNECT_OTP_ERROR:return this.onConnectOtpError(r);case Se.FRAME_GET_USER_SUCCESS:return this.onConnectSuccess(r);case Se.FRAME_GET_USER_ERROR:return this.onConnectError(r);case Se.FRAME_IS_CONNECTED_SUCCESS:return this.onIsConnectedSuccess(r);case Se.FRAME_IS_CONNECTED_ERROR:return this.onIsConnectedError(r);case Se.FRAME_GET_CHAIN_ID_SUCCESS:return this.onGetChainIdSuccess(r);case Se.FRAME_GET_CHAIN_ID_ERROR:return this.onGetChainIdError(r);case Se.FRAME_SIGN_OUT_SUCCESS:return this.onSignOutSuccess();case Se.FRAME_SIGN_OUT_ERROR:return this.onSignOutError(r);case Se.FRAME_SWITCH_NETWORK_SUCCESS:return this.onSwitchChainSuccess(r);case Se.FRAME_SWITCH_NETWORK_ERROR:return this.onSwitchChainError(r);case Se.FRAME_RPC_REQUEST_SUCCESS:return this.onRpcRequestSuccess(r);case Se.FRAME_RPC_REQUEST_ERROR:return this.onRpcRequestError(r);case Se.FRAME_SESSION_UPDATE:return this.onSessionUpdate(r);case Se.FRAME_UPDATE_EMAIL_SUCCESS:return this.onUpdateEmailSuccess();case Se.FRAME_UPDATE_EMAIL_ERROR:return this.onUpdateEmailError(r);case Se.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:return this.onUpdateEmailPrimaryOtpSuccess();case Se.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:return this.onUpdateEmailPrimaryOtpError(r);case Se.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:return this.onUpdateEmailSecondaryOtpSuccess(r);case Se.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:return this.onUpdateEmailSecondaryOtpError(r);case Se.FRAME_SYNC_THEME_SUCCESS:return this.onSyncThemeSuccess();case Se.FRAME_SYNC_THEME_ERROR:return this.onSyncThemeError(r);case Se.FRAME_SYNC_DAPP_DATA_SUCCESS:return this.onSyncDappDataSuccess();case Se.FRAME_SYNC_DAPP_DATA_ERROR:return this.onSyncDappDataError(r);case Se.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:return this.onSmartAccountEnabledNetworksSuccess(r);case Se.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:return this.onSmartAccountEnabledNetworksError(r);case Se.FRAME_INIT_SMART_ACCOUNT_SUCCESS:return this.onInitSmartAccountSuccess(r);case Se.FRAME_INIT_SMART_ACCOUNT_ERROR:return this.onInitSmartAccountError(r);case Se.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:return this.onPreferSmartAccountSuccess(r);case Se.FRAME_SET_PREFERRED_ACCOUNT_ERROR:return this.onPreferSmartAccountError();default:return null}})}getLoginEmailUsed(){return!!ls.get(Se.EMAIL_LOGIN_USED_KEY)}getEmail(){return ls.get(Se.EMAIL)}rejectRpcRequest(){this.rpcRequestResolver?.reject()}connectEmail(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,Gn.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Se.APP_CONNECT_EMAIL,payload:e}),new Promise((r,n)=>{this.connectEmailResolver={resolve:r,reject:n}})})}connectDevice(){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_CONNECT_DEVICE}),new Promise((e,r)=>{this.connectDeviceResolver={resolve:e,reject:r}})})}connectOtp(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_CONNECT_OTP,payload:e}),new Promise((r,n)=>{this.connectOtpResolver={resolve:r,reject:n}})})}isConnected(){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_IS_CONNECTED,payload:void 0}),new Promise((e,r)=>{this.isConnectedResolver={resolve:e,reject:r}})})}getChainId(){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_GET_CHAIN_ID}),new Promise((e,r)=>{this.getChainIdResolver={resolve:e,reject:r}})})}updateEmail(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,Gn.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Se.APP_UPDATE_EMAIL,payload:e}),new Promise((r,n)=>{this.updateEmailResolver={resolve:r,reject:n}})})}updateEmailPrimaryOtp(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e}),new Promise((r,n)=>{this.updateEmailPrimaryOtpResolver={resolve:r,reject:n}})})}updateEmailSecondaryOtp(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e}),new Promise((r,n)=>{this.updateEmailSecondaryOtpResolver={resolve:r,reject:n}})})}syncTheme(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_SYNC_THEME,payload:e}),new Promise((r,n)=>{this.syncThemeResolver={resolve:r,reject:n}})})}syncDappData(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_SYNC_DAPP_DATA,payload:e}),new Promise((r,n)=>{this.syncDappDataResolver={resolve:r,reject:n}})})}getSmartAccountEnabledNetworks(){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS}),new Promise((e,r)=>{this.smartAccountEnabledNetworksResolver={resolve:e,reject:r}})})}initSmartAccount(){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_INIT_SMART_ACCOUNT}),new Promise((e,r)=>{this.initSmartAccountResolver={resolve:e,reject:r}})})}setPreferredAccount(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}}),new Promise((r,n)=>{this.setPreferredAccountResolver={resolve:r,reject:n}})})}connect(e){return y(this,null,function*(){let r=e?.chainId??this.getLastUsedChainId()??1;return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_GET_USER,payload:{chainId:r}}),new Promise((n,i)=>{this.connectResolver={resolve:n,reject:i}})})}switchNetwork(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_SWITCH_NETWORK,payload:{chainId:e}}),new Promise((r,n)=>{this.switchChainResolver={resolve:r,reject:n}})})}disconnect(){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Se.APP_SIGN_OUT}),new Promise((e,r)=>{this.disconnectResolver={resolve:e,reject:r}})})}request(e){return y(this,null,function*(){return yield this.w3mFrame.frameLoadPromise,Qc.GET_CHAIN_ID===e.method?this.getLastUsedChainId():(this.w3mFrame.events.postAppEvent({type:Se.APP_RPC_REQUEST,payload:e}),new Promise((r,n)=>{this.rpcRequestResolver={resolve:r,reject:n}}))})}onRpcRequest(e){this.w3mFrame.events.onAppEvent(r=>{r.type.includes(Se.RPC_METHOD_KEY)&&e(r)})}onRpcResponse(e){this.w3mFrame.events.onFrameEvent(r=>{r.type.includes(Se.RPC_METHOD_KEY)&&e(r)})}onIsConnected(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===Se.FRAME_GET_USER_SUCCESS&&e()})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===Se.FRAME_IS_CONNECTED_ERROR&&e(),r.type===Se.FRAME_IS_CONNECTED_SUCCESS&&!r.payload.isConnected&&e()})}onInitSmartAccount(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===Se.FRAME_INIT_SMART_ACCOUNT_SUCCESS?e(r.payload.isDeployed):r.type===Se.FRAME_INIT_SMART_ACCOUNT_ERROR&&e(!1)})}onConnectEmailSuccess(e){this.connectEmailResolver?.resolve(e.payload),this.setNewLastEmailLoginTime()}onConnectEmailError(e){this.connectEmailResolver?.reject(e.payload.message)}onConnectDeviceSuccess(){this.connectDeviceResolver?.resolve(void 0)}onConnectDeviceError(e){this.connectDeviceResolver?.reject(e.payload.message)}onConnectOtpSuccess(){this.connectOtpResolver?.resolve(void 0)}onConnectOtpError(e){this.connectOtpResolver?.reject(e.payload.message)}onConnectSuccess(e){this.setEmailLoginSuccess(e.payload.email),this.setLastUsedChainId(e.payload.chainId),this.connectResolver?.resolve(e.payload)}onConnectError(e){this.connectResolver?.reject(e.payload.message)}onIsConnectedSuccess(e){e.payload.isConnected||this.deleteEmailLoginCache(),this.isConnectedResolver?.resolve(e.payload)}onIsConnectedError(e){this.isConnectedResolver?.reject(e.payload.message)}onGetChainIdSuccess(e){this.setLastUsedChainId(e.payload.chainId),this.getChainIdResolver?.resolve(e.payload)}onGetChainIdError(e){this.getChainIdResolver?.reject(e.payload.message)}onSignOutSuccess(){this.disconnectResolver?.resolve(void 0),this.deleteEmailLoginCache()}onSignOutError(e){this.disconnectResolver?.reject(e.payload.message)}onSwitchChainSuccess(e){this.setLastUsedChainId(e.payload.chainId),this.switchChainResolver?.resolve(e.payload)}onSwitchChainError(e){this.switchChainResolver?.reject(e.payload.message)}onRpcRequestSuccess(e){this.rpcRequestResolver?.resolve(e.payload)}onRpcRequestError(e){this.rpcRequestResolver?.reject(e.payload.message)}onSessionUpdate(e){let{payload:r}=e}onUpdateEmailSuccess(){this.updateEmailResolver?.resolve(void 0),this.setNewLastEmailLoginTime()}onUpdateEmailError(e){this.updateEmailResolver?.reject(e.payload.message)}onUpdateEmailPrimaryOtpSuccess(){this.updateEmailPrimaryOtpResolver?.resolve(void 0)}onUpdateEmailPrimaryOtpError(e){this.updateEmailPrimaryOtpResolver?.reject(e.payload.message)}onUpdateEmailSecondaryOtpSuccess(e){let{newEmail:r}=e.payload;this.setEmailLoginSuccess(r),this.updateEmailSecondaryOtpResolver?.resolve({newEmail:r})}onUpdateEmailSecondaryOtpError(e){this.updateEmailSecondaryOtpResolver?.reject(e.payload.message)}onSyncThemeSuccess(){this.syncThemeResolver?.resolve(void 0)}onSyncThemeError(e){this.syncThemeResolver?.reject(e.payload.message)}onSyncDappDataSuccess(){this.syncDappDataResolver?.resolve(void 0)}onSyncDappDataError(e){this.syncDappDataResolver?.reject(e.payload.message)}onSmartAccountEnabledNetworksSuccess(e){this.smartAccountEnabledNetworksResolver?.resolve(e.payload)}onSmartAccountEnabledNetworksError(e){this.smartAccountEnabledNetworksResolver?.reject(e.payload.message)}onInitSmartAccountSuccess(e){this.initSmartAccountResolver?.resolve(e.payload)}onInitSmartAccountError(e){this.initSmartAccountResolver?.reject(e.payload.message)}onPreferSmartAccountSuccess(e){this.persistPreferredAccount(e.payload.type),this.setPreferredAccountResolver?.resolve(void 0)}onPreferSmartAccountError(){this.setPreferredAccountResolver?.reject()}setNewLastEmailLoginTime(){ls.set(Se.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setEmailLoginSuccess(e){ls.set(Se.EMAIL,e),ls.set(Se.EMAIL_LOGIN_USED_KEY,"true"),ls.delete(Se.LAST_EMAIL_LOGIN_TIME)}deleteEmailLoginCache(){ls.delete(Se.EMAIL_LOGIN_USED_KEY),ls.delete(Se.EMAIL),ls.delete(Se.LAST_USED_CHAIN_KEY)}setLastUsedChainId(e){ls.set(Se.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){return Number(ls.get(Se.LAST_USED_CHAIN_KEY))}persistPreferredAccount(e){ls.set(Se.PREFERRED_ACCOUNT_TYPE,e)}};var rC=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},U4e=6,Ia=class extends be{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=Gn.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=ye.state.data?.email,this.emailConnector=Yt.getEmailConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");let e=!!this.timeoutTimeLeft,r=this.getFooterLabels(e);return Z`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["l","0","l","0"]}
        gap="l"
      >
        <wui-flex flexDirection="column" alignItems="center">
          <wui-text variant="paragraph-400" color="fg-100">Enter the code we sent to</wui-text>
          <wui-text variant="paragraph-500" color="fg-100">${this.email}</wui-text>
        </wui-flex>

        <wui-text variant="small-400" color="fg-200">The code expires in 20 minutes</wui-text>

        ${this.loading?Z`<wui-loading-spinner size="xl" color="accent-100"></wui-loading-spinner>`:Z` <wui-flex flexDirection="column" alignItems="center" gap="xs">
              <wui-otp
                dissabled
                length="6"
                @inputChange=${this.onOtpInputChange.bind(this)}
                .otp=${this.otp}
              ></wui-otp>
              ${this.error?Z`
                    <wui-text variant="small-400" align="center" color="error-100">
                      ${this.error}. Try Again
                    </wui-text>
                  `:null}
            </wui-flex>`}

        <wui-flex alignItems="center">
          <wui-text variant="small-400" color="fg-200">${r.title}</wui-text>
          <wui-link @click=${this.onResendCode.bind(this)} .disabled=${e}>
            ${r.action}
          </wui-link>
        </wui-flex>
      </wui-flex>
    `}startOTPTimeout(){this.timeoutTimeLeft=Gn.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=Gn.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}onOtpInputChange(e){return y(this,null,function*(){try{this.loading||(this.otp=e.detail,this.emailConnector&&this.otp.length===U4e&&(this.loading=!0,yield this.onOtpSubmit?.(this.otp)))}catch(r){this.error=He.parseError(r),this.loading=!1}})}onResendCode(){return y(this,null,function*(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!Yt.getEmailConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,yield this.onOtpResend(this.email),this.startOTPTimeout(),kt.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){kt.showError(e)}finally{this.loading=!1}})}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}};Ia.styles=BW;rC([ne()],Ia.prototype,"loading",void 0);rC([ne()],Ia.prototype,"timeoutTimeLeft",void 0);rC([ne()],Ia.prototype,"error",void 0);Ia=rC([de("w3m-email-otp-widget")],Ia);var j4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},sz=class extends Ia{constructor(){super(),this.onOtpSubmit=e=>y(this,null,function*(){try{this.emailConnector&&(yield this.emailConnector.provider.connectOtp({otp:e}),ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),yield lt.connectExternal(this.emailConnector),Ct.close(),ze.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.emailConnector.name||"Unknown"}}))}catch(r){throw ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),r}}),this.onOtpResend=e=>y(this,null,function*(){this.emailConnector&&(yield this.emailConnector.provider.connectEmail({email:e}),ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))})}};sz=j4e([de("w3m-email-verify-otp-view")],sz);var oz=Be`
  wui-icon-box {
    height: var(--wui-icon-box-size-xl);
    width: var(--wui-icon-box-size-xl);
  }
`;var az=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},nC=class extends be{constructor(){super(),this.email=ye.state.data?.email,this.emailConnector=Yt.getEmailConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.emailConnector)throw new Error("w3m-email-verify-device-view: No email connector provided");return Z`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["xxl","s","xxl","s"]}
        gap="l"
      >
        <wui-icon-box
          size="xl"
          iconcolor="accent-100"
          backgroundcolor="accent-100"
          icon="verify"
          background="opaque"
        ></wui-icon-box>

        <wui-flex flexDirection="column" alignItems="center" gap="s">
          <wui-flex flexDirection="column" alignItems="center">
            <wui-text variant="paragraph-400" color="fg-100">
              Approve the login link we sent to
            </wui-text>
            <wui-text variant="paragraph-400" color="fg-100"><b>${this.email}</b></wui-text>
          </wui-flex>

          <wui-text variant="small-400" color="fg-200" align="center">
            The code expires in 20 minutes
          </wui-text>

          <wui-flex alignItems="center" id="w3m-resend-section">
            <wui-text variant="small-400" color="fg-100" align="center">
              Didn't receive it?
            </wui-text>
            <wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}>
              Resend email
            </wui-link>
          </wui-flex>
        </wui-flex>
      </wui-flex>
    `}listenForDeviceApproval(){return y(this,null,function*(){if(this.emailConnector)try{yield this.emailConnector.provider.connectDevice(),ze.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),ye.replace("EmailVerifyOtp",{email:this.email})}catch{ye.goBack()}})}onResendCode(){return y(this,null,function*(){try{if(!this.loading){if(!this.emailConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,yield this.emailConnector.provider.connectEmail({email:this.email}),kt.showSuccess("Code email resent")}}catch(e){kt.showError(e)}finally{this.loading=!1}})}};nC.styles=oz;az([ne()],nC.prototype,"loading",void 0);nC=az([de("w3m-email-verify-device-view")],nC);var cz=Be`
  div {
    width: 100%;
    height: 400px;
  }

  [data-ready='false'] {
    transform: scale(1.05);
  }

  @media (max-width: 430px) {
    [data-ready='false'] {
      transform: translateY(-50px);
    }
  }
`;var lz=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},iC=class extends be{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(Ct.subscribeKey("open",e=>{e||this.onHideIframe()}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.bodyObserver?.unobserve(window.document.body)}firstUpdated(){return y(this,null,function*(){yield this.syncTheme(),this.iframe.style.display="block";let r=this.renderRoot.querySelector("div");this.bodyObserver=new ResizeObserver(()=>{let i=r?.getBoundingClientRect()??{left:0,top:0,width:0,height:0};this.iframe.style.width=`${i.width}px`,this.iframe.style.height=`${i.height-10}px`,this.iframe.style.left=`${i.left}px`,this.iframe.style.top=`${i.top+10/2}px`,this.ready=!0}),this.bodyObserver.observe(window.document.body)})}render(){return this.ready&&this.onShowIframe(),Z`<div data-ready=${this.ready}></div>`}onShowIframe(){let e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards",delay:300})}onHideIframe(){return y(this,null,function*(){yield this.iframe.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,this.iframe.style.display="none"})}syncTheme(){return y(this,null,function*(){let e=Yt.getEmailConnector();e&&(yield e.provider.syncTheme({themeVariables:Ei.getSnapshot().themeVariables}))})}};iC.styles=cz;lz([ne()],iC.prototype,"ready",void 0);iC=lz([de("w3m-approve-transaction-view")],iC);var H4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},uz=class extends be{render(){return Z`
      <wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl">
        <wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text>
        <wui-chip
          icon="externalLink"
          variant="fill"
          href=${Lo.SECURE_SITE_DASHBOARD}
          imageSrc=${Lo.SECURE_SITE_FAVICON}
          data-testid="w3m-secure-website-button"
        >
        </wui-chip>
        <wui-text variant="small-400" color="fg-200">
          You will have to reconnect for security reasons
        </wui-text>
      </wui-flex>
    `}};uz=H4e([de("w3m-upgrade-wallet-view")],uz);var V4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},fz=class extends be{render(){return Z`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        gap="xxl"
        .padding=${["0","0","l","0"]}
      >
        ${this.onboardingTemplate()} ${this.buttonsTemplate()}
        <wui-link>
          Learn more
          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
        </wui-link>
      </wui-flex>
    `}onboardingTemplate(){return Z` <wui-flex
      flexDirection="column"
      gap="xxl"
      alignItems="center"
      .padding=${["0","xxl","0","xxl"]}
    >
      <wui-flex gap="s" alignItems="center" justifyContent="center">
        <wui-visual name="onrampCard"></wui-visual>
        <wui-visual name="onrampCard"></wui-visual>
        <wui-visual name="onrampCard"></wui-visual>
      </wui-flex>
      <wui-flex flexDirection="column" alignItems="center" gap="s">
        <wui-text align="center" variant="medium-600" color="fg-100">
          Discover Smart Accounts
        </wui-text>
        <wui-text align="center" variant="paragraph-400" color="fg-100">
          Access advanced features such as username, social login, improved security and a smoother
          user experience!
        </wui-text>
      </wui-flex>
    </wui-flex>`}buttonsTemplate(){return Z`<wui-flex .padding=${["0","2l","0","2l"]} gap="s">
      <wui-button variant="accentBg" @click=${ye.goBack} size="lg" borderRadius="xs">
        Do it later
      </wui-button>
      <wui-button size="lg" borderRadius="xs"> Continue </wui-button>
    </wui-flex>`}};fz=V4e([de("w3m-upgrade-to-smart-account-view")],fz);var{I:Kht}=SU;var dz=t=>t.strings===void 0;var xT={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},IT=t=>(...e)=>({_$litDirective$:t,values:e}),Uw=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var jw=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(e,!1),jw(n,e);return!0},sC=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},hz=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),W4e(e)}};function $4e(t){this._$AN!==void 0?(sC(this),this._$AM=t,hz(this)):this._$AM=t}function q4e(t,e=!1,r=0){let n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=r;s<n.length;s++)jw(n[s],!1),sC(n[s]);else n!=null&&(jw(n,!1),sC(n));else jw(this,t)}var W4e=t=>{t.type==xT.CHILD&&(t._$AP??=q4e,t._$AQ??=$4e)},oC=class extends Uw{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),hz(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(jw(this,e),sC(this))}setValue(e){if(dz(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var aC=()=>new ST,ST=class{},AT=new WeakMap,cC=IT(class extends oC{render(t){return Sy}update(t,[e]){let r=e!==this.Y;return r&&this.Y!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),Sy}rt(t){if(typeof this.Y=="function"){let e=this.ht??globalThis,r=AT.get(e);r===void 0&&(r=new WeakMap,AT.set(e,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return typeof this.Y=="function"?AT.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var pz=Be`
  wui-email-input {
    width: 100%;
  }

  form {
    width: 100%;
    display: block;
    position: relative;
  }
`;var DT=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Hw=class extends be{constructor(){super(...arguments),this.formRef=aC(),this.initialEmail=ye.state.data?.email??"",this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{e.key==="Enter"&&this.onSubmitEmail(e)})}render(){let e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return Z`
      <wui-flex flexDirection="column" padding="m" gap="m">
        <form ${cC(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
          <wui-email-input
            value=${this.initialEmail}
            .disabled=${this.loading}
            @inputChange=${this.onEmailInputChange.bind(this)}
          >
          </wui-email-input>
          <input type="submit" hidden />
        </form>

        <wui-flex gap="s">
          <wui-button size="md" variant="shade" fullWidth @click=${ye.goBack}>
            Cancel
          </wui-button>

          <wui-button
            size="md"
            variant="fill"
            fullWidth
            @click=${this.onSubmitEmail.bind(this)}
            .disabled=${!e}
            .loading=${this.loading}
          >
            Save
          </wui-button>
        </wui-flex>
      </wui-flex>
    `}onEmailInputChange(e){this.email=e.detail}onSubmitEmail(e){return y(this,null,function*(){try{if(this.loading)return;this.loading=!0,e.preventDefault();let r=Yt.getEmailConnector();if(!r)throw new Error("w3m-update-email-wallet: Email connector not found");yield r.provider.updateEmail({email:this.email}),ze.sendEvent({type:"track",event:"EMAIL_EDIT"}),ye.replace("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(r){kt.showError(r),this.loading=!1}})}};Hw.styles=pz;DT([ne()],Hw.prototype,"email",void 0);DT([ne()],Hw.prototype,"loading",void 0);Hw=DT([de("w3m-update-email-wallet-view")],Hw);var z4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},mz=class extends Ia{constructor(){super(),this.email=ye.state.data?.email,this.onOtpSubmit=e=>y(this,null,function*(){try{this.emailConnector&&(yield this.emailConnector.provider.updateEmailPrimaryOtp({otp:e}),ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),ye.replace("UpdateEmailSecondaryOtp",ye.state.data))}catch(r){throw ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),r}}),this.onStartOver=()=>{ye.replace("UpdateEmailWallet",ye.state.data)}}};mz=z4e([de("w3m-update-email-primary-otp-view")],mz);var G4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},gz=class extends Ia{constructor(){super(),this.email=ye.state.data?.newEmail,this.onOtpSubmit=e=>y(this,null,function*(){try{this.emailConnector&&(yield this.emailConnector.provider.updateEmailSecondaryOtp({otp:e}),ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),ye.reset("Account"))}catch(r){throw ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),r}}),this.onStartOver=()=>{ye.replace("UpdateEmailWallet",ye.state.data)}}};gz=G4e([de("w3m-update-email-secondary-otp-view")],gz);var yz=Be`
  :host > wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }

  :host > wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var wz=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},lC=class extends be{constructor(){super(...arguments),this.disconecting=!1}render(){return Z`
      <wui-flex class="container" flexDirection="column" gap="0">
        <wui-flex
          class="container"
          flexDirection="column"
          .padding=${["m","xl","xs","xl"]}
          alignItems="center"
          gap="xl"
        >
          <wui-text variant="small-400" color="fg-200" align="center">
            This app doesn’t support your current network. Switch to an available option following
            to continue.
          </wui-text>
        </wui-flex>

        <wui-flex flexDirection="column" padding="s" gap="xs">
          ${this.networksTemplate()}
        </wui-flex>

        <wui-separator text="or"></wui-separator>
        <wui-flex flexDirection="column" padding="s" gap="xs">
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="disconnect"
            ?chevron=${!1}
            .loading=${this.disconecting}
            @click=${this.onDisconnect.bind(this)}
            data-testid="disconnect-button"
          >
            <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
          </wui-list-item>
        </wui-flex>
      </wui-flex>
    `}networksTemplate(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:r}=ut.state;return He.sortRequestedNetworks(e,r).map(i=>Z`
        <wui-list-network
          imageSrc=${Ve(Ot.getNetworkImage(i))}
          name=${i.name??"Unknown"}
          @click=${()=>this.onSwitchNetwork(i)}
        >
        </wui-list-network>
      `)}onDisconnect(){return y(this,null,function*(){try{this.disconecting=!0,yield lt.disconnect(),ze.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Ct.close()}catch{ze.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),kt.showError("Failed to disconnect")}finally{this.disconecting=!1}})}onSwitchNetwork(e){return y(this,null,function*(){let{isConnected:r}=qe.state,{approvedCaipNetworkIds:n,supportsAllNetworks:i,caipNetwork:s}=ut.state,{data:o}=ye.state;r&&s?.id!==e.id?n?.includes(e.id)?(yield ut.switchActiveNetwork(e),Rm.navigateAfterNetworkSwitch()):i&&ye.push("SwitchNetwork",_e(B({},o),{network:e})):r||(ut.setCaipNetwork(e),ye.push("Connect"))})}};lC.styles=yz;wz([ne()],lC.prototype,"disconecting",void 0);lC=wz([de("w3m-unsupported-chain-view")],lC);var vz=Be`
  wui-compatible-network {
    margin-top: var(--wui-spacing-l);
  }
`;var uC=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Mg=class extends be{constructor(){super(),this.unsubscribe=[],this.address=qe.state.address,this.profileName=qe.state.profileName,this.network=ut.state.caipNetwork,this.unsubscribe.push(qe.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName):kt.showError("Account not found")}),ut.subscribeKey("caipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");let e=Ot.getNetworkImage(this.network);return Z` <wui-flex
      flexDirection="column"
      .padding=${["xl","l","l","l"]}
      alignItems="center"
    >
      <wui-chip-button
        @click=${this.onCopyClick.bind(this)}
        text=${Bc.getTruncateString({string:this.address??"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
        icon="copy"
        imageSrc=${e||""}
        variant="shadeSmall"
      ></wui-chip-button>
      <wui-flex
        flexDirection="column"
        .padding=${["l","0","0","0"]}
        alignItems="center"
        gap="s"
      >
        <wui-qr-code
          size=${232}
          theme=${Ei.state.themeMode}
          uri=${this.address}
          ?arenaClear=${!0}
          data-testid="wui-qr-code"
        ></wui-qr-code>
        <wui-text variant="paragraph-500" color="fg-100" align="center">
          Copy your address or scan this QR code
        </wui-text>
      </wui-flex>
      ${this.networkTemplate()}
    </wui-flex>`}networkTemplate(){let n=(ut.getRequestedCaipNetworks()?.filter(i=>i?.imageId)?.slice(0,5)).map(Ot.getNetworkImage).filter(Boolean);return Z`<wui-compatible-network
      @click=${this.onReceiveClick.bind(this)}
      text="Only receive assets on these networks"
      .networkImages=${n}
    ></wui-compatible-network>`}onReceiveClick(){ye.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(He.copyToClopboard(this.address),kt.showSuccess("Address copied"))}catch{kt.showError("Failed to copy")}}};Mg.styles=vz;uC([ne()],Mg.prototype,"address",void 0);uC([ne()],Mg.prototype,"profileName",void 0);uC([ne()],Mg.prototype,"network",void 0);Mg=uC([de("w3m-wallet-receive-view")],Mg);var bz=Be`
  :host > wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }

  :host > wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var Z4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},RT=class extends be{render(){return Z` <wui-flex
      flexDirection="column"
      .padding=${["xs","s","m","s"]}
      gap="xs"
    >
      <wui-banner
        icon="warningCircle"
        text="You can only receive assets on these networks"
      ></wui-banner>
      ${this.networkTemplate()}
    </wui-flex>`}networkTemplate(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:r}=ut.state;return He.sortRequestedNetworks(e,r).map(i=>Z`
        <wui-list-network
          imageSrc=${Ve(Ot.getNetworkImage(i))}
          name=${i.name??"Unknown"}
          ?transparent=${!0}
        >
        </wui-list-network>
      `)}};RT.styles=bz;RT=Z4e([de("w3m-wallet-compatible-networks-view")],RT);var Ez=Be`
  wui-grid {
    max-height: clamp(360px, 400px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
    grid-auto-rows: min-content;
    grid-template-columns: repeat(auto-fill, 76px);
  }

  @media (max-width: 435px) {
    wui-grid {
      grid-template-columns: repeat(auto-fill, 77px);
    }
  }

  wui-grid[data-scroll='false'] {
    overflow: hidden;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }

  wui-loading-spinner {
    padding-top: var(--wui-spacing-l);
    padding-bottom: var(--wui-spacing-l);
    justify-content: center;
    grid-column: 1 / span 4;
  }
`;function fC(t){let{connectors:e}=Yt.state,r=e.filter(s=>s.type==="ANNOUNCED").reduce((s,o)=>(o.info?.rdns&&(s[o.info.rdns]=!0),s),{});return t.map(s=>_e(B({},s),{installed:!!s.rdns&&!!r[s.rdns??""]})).sort((s,o)=>Number(o.installed)-Number(s.installed))}var Vw=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},_z="local-paginator",Ph=class extends be{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!ni.state.wallets.length,this.wallets=ni.state.wallets,this.recommended=ni.state.recommended,this.featured=ni.state.featured,this.unsubscribe.push(ni.subscribeKey("wallets",e=>this.wallets=e),ni.subscribeKey("recommended",e=>this.recommended=e),ni.subscribeKey("featured",e=>this.featured=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return Z`
      <wui-grid
        data-scroll=${!this.initial}
        .padding=${["0","s","s","s"]}
        columnGap="xxs"
        rowGap="l"
        justifyContent="space-between"
      >
        ${this.initial?this.shimmerTemplate(16):this.walletsTemplate()}
        ${this.paginationLoaderTemplate()}
      </wui-grid>
    `}initialFetch(){return y(this,null,function*(){let e=this.shadowRoot?.querySelector("wui-grid");this.initial&&e&&(yield ni.fetchWallets({page:1}),yield e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))})}shimmerTemplate(e,r){return[...Array(e)].map(()=>Z`
        <wui-card-select-loader type="wallet" id=${Ve(r)}></wui-card-select-loader>
      `)}walletsTemplate(){let e=[...this.featured,...this.recommended,...this.wallets];return fC(e).map(n=>Z`
        <wui-card-select
          imageSrc=${Ve(Ot.getWalletImage(n))}
          type="wallet"
          name=${n.name}
          @click=${()=>this.onConnectWallet(n)}
          .installed=${n.installed}
        ></wui-card-select>
      `)}paginationLoaderTemplate(){let{wallets:e,recommended:r,featured:n,count:i}=ni.state,s=window.innerWidth<352?3:4,o=e.length+r.length,c=Math.ceil(o/s)*s-o+s;return c-=e.length?n.length%s:0,i===0&&n.length>0?null:i===0||[...n,...e,...r].length<i?this.shimmerTemplate(c,_z):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${_z}`);e&&(this.paginationObserver=new IntersectionObserver(([r])=>{if(r?.isIntersecting&&!this.initial){let{page:n,count:i,wallets:s}=ni.state;s.length<i&&ni.fetchWallets({page:n+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){let{connectors:r}=Yt.state,n=r.find(({explorerId:i})=>i===e.id);n?ye.push("ConnectingExternal",{connector:n}):ye.push("ConnectingWalletConnect",{wallet:e})}};Ph.styles=Ez;Vw([ne()],Ph.prototype,"initial",void 0);Vw([ne()],Ph.prototype,"wallets",void 0);Vw([ne()],Ph.prototype,"recommended",void 0);Vw([ne()],Ph.prototype,"featured",void 0);Ph=Vw([de("w3m-all-wallets-list")],Ph);var Cz=Be`
  wui-grid,
  wui-loading-spinner,
  wui-flex {
    height: 360px;
  }

  wui-grid {
    overflow: scroll;
    scrollbar-width: none;
    grid-auto-rows: min-content;
  }

  wui-grid[data-scroll='false'] {
    overflow: hidden;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }

  wui-loading-spinner {
    justify-content: center;
    align-items: center;
  }
`;var TT=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},$w=class extends be{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?Z`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}onSearch(){return y(this,null,function*(){this.query!==this.prevQuery&&(this.prevQuery=this.query,this.loading=!0,yield ni.searchWallet({search:this.query}),this.loading=!1)})}walletsTemplate(){let{search:e}=ni.state,r=fC(e);return e.length?Z`
      <wui-grid
        .padding=${["0","s","s","s"]}
        gridTemplateColumns="repeat(4, 1fr)"
        rowGap="l"
        columnGap="xs"
      >
        ${r.map(n=>Z`
            <wui-card-select
              imageSrc=${Ve(Ot.getWalletImage(n))}
              type="wallet"
              name=${n.name}
              @click=${()=>this.onConnectWallet(n)}
              .installed=${n.installed}
            ></wui-card-select>
          `)}
      </wui-grid>
    `:Z`
        <wui-flex justifyContent="center" alignItems="center" gap="s" flexDirection="column">
          <wui-icon-box
            size="lg"
            iconColor="fg-200"
            backgroundColor="fg-300"
            icon="wallet"
            background="transparent"
          ></wui-icon-box>
          <wui-text color="fg-200" variant="paragraph-500">No Wallet found</wui-text>
        </wui-flex>
      `}onConnectWallet(e){let{connectors:r}=Yt.state,n=r.find(({explorerId:i})=>i===e.id);n?ye.push("ConnectingExternal",{connector:n}):ye.push("ConnectingWalletConnect",{wallet:e})}};$w.styles=Cz;TT([ne()],$w.prototype,"loading",void 0);TT([Wt()],$w.prototype,"query",void 0);$w=TT([de("w3m-all-wallets-search")],$w);var dC=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},qw=class extends be{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(lt.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return Z`
      <wui-flex justifyContent="center" .padding=${["l","0","0","0"]}>
        <wui-tabs
          ?disabled=${this.buffering}
          .tabs=${e}
          .onTabChange=${this.onTabChange.bind(this)}
        ></wui-tabs>
      </wui-flex>
    `}generateTabs(){let e=this.platforms.map(r=>r==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:r==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:r==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:r==="web"?{label:"Webapp",icon:"browser",platform:"web"}:r==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:r})=>r),e}onTabChange(e){let r=this.platformTabs[e];r&&this.onSelectPlatfrom?.(r)}};dC([Wt({type:Array})],qw.prototype,"platforms",void 0);dC([Wt()],qw.prototype,"onSelectPlatfrom",void 0);dC([ne()],qw.prototype,"buffering",void 0);qw=dC([de("w3m-connecting-header")],qw);var K4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},xz=class extends ai{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}onConnectProxy(){return y(this,null,function*(){try{this.error=!1;let{connectors:e}=Yt.state,r=e.find(i=>i.type==="ANNOUNCED"&&i.info?.rdns===this.wallet?.rdns),n=e.find(i=>i.type==="INJECTED");r?yield lt.connectExternal(r):n&&(yield lt.connectExternal(n)),Ct.close(),ze.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(e){ze.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}})}};xz=K4e([de("w3m-connecting-wc-browser")],xz);var J4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Iz=class extends ai{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.timeout=setTimeout(()=>{this.onConnect?.()},200))}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:r}=this.wallet,{redirect:n,href:i}=He.formatNativeUrl(e,this.uri);lt.setWcLinking({name:r,href:i}),lt.setRecentWallet(this.wallet),He.openHref(n,"_blank")}catch{this.error=!0}}};Iz=J4e([de("w3m-connecting-wc-desktop")],Iz);var Y4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Az=class extends ai{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,name:r}=this.wallet,{redirect:n,href:i}=He.formatNativeUrl(e,this.uri);lt.setWcLinking({name:r,href:i}),lt.setRecentWallet(this.wallet),He.openHref(n,"_self")}catch{this.error=!0}}onBuffering(){let e=He.isIos();document?.visibilityState==="visible"&&!this.error&&e&&(lt.setBuffering(!0),setTimeout(()=>{lt.setBuffering(!1)},5e3))}};Az=Y4e([de("w3m-connecting-wc-mobile")],Az);var Sz=Be`
  @keyframes fadein {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  wui-shimmer {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
  }

  wui-qr-code {
    opacity: 0;
    animation-duration: 200ms;
    animation-timing-function: ease;
    animation-name: fadein;
    animation-fill-mode: forwards;
  }
`;var Q4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},NT=class extends ai{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),Z`
      <wui-flex padding="xl" flexDirection="column" gap="xl" alignItems="center">
        <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>

        <wui-text variant="paragraph-500" color="fg-100">
          Scan this QR Code with your phone
        </wui-text>
        ${this.copyTemplate()}
      </wui-flex>

      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
    `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,r=this.wallet?this.wallet.name:void 0;return lt.setWcLinking(void 0),lt.setRecentWallet(this.wallet),Z` <wui-qr-code
      size=${e}
      theme=${Ei.state.themeMode}
      uri=${this.uri}
      imageSrc=${Ve(Ot.getWalletImage(this.wallet))}
      alt=${Ve(r)}
      data-testid="wui-qr-code"
    ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return Z`<wui-link
      .disabled=${e}
      @click=${this.onCopyUri}
      color="fg-200"
      data-testid="copy-wc2-uri"
    >
      <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
      Copy link
    </wui-link>`}};NT.styles=Sz;NT=Q4e([de("w3m-connecting-wc-qrcode")],NT);var X4e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Dz=class extends be{constructor(){if(super(),this.wallet=ye.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return Z`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-wallet-image
          size="lg"
          imageSrc=${Ve(Ot.getWalletImage(this.wallet))}
        ></wui-wallet-image>

        <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text>
      </wui-flex>

      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
    `}};Dz=X4e([de("w3m-connecting-wc-unsupported")],Dz);var e5e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Rz=class extends ai{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",ze.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:r}=this.wallet,{redirect:n,href:i}=He.formatUniversalUrl(e,this.uri);lt.setWcLinking({name:r,href:i}),lt.setRecentWallet(this.wallet),He.openHref(n,"_blank")}catch{this.error=!0}}};Rz=e5e([de("w3m-connecting-wc-web")],Rz);var Tz=Be`
  wui-icon-link[data-hidden='true'] {
    opacity: 0 !important;
    pointer-events: none;
  }
`;var hC=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};function Nz(){let t=ye.state.data?.connector?.name,e=ye.state.data?.wallet?.name,r=ye.state.data?.network?.name,n=e??t,i=Yt.getConnectors();return{Connect:`Connect ${i.length===1&&i[0]?.id==="w3m-email"?"Email":""} Wallet`,Account:void 0,AccountSettings:void 0,ConnectingExternal:n??"Connect Wallet",ConnectingWalletConnect:n??"WalletConnect",ConnectingSiwe:"Sign In",Networks:"Choose Network",SwitchNetwork:r??"Switch Network",AllWallets:"All Wallets",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",GetWallet:"Get a wallet",Downloads:n?`Get ${n}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",ApproveTransaction:"Approve Transaction",Transactions:"Activity",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",UnsupportedChain:"Switch Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",WhatIsABuy:"What is Buy?",BuyInProgress:"Buy",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks"}}var Pg=class extends be{constructor(){super(),this.unsubscribe=[],this.heading=Nz()[ye.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(ye.subscribeKey("view",e=>{this.onViewChange(e),this.onHistoryChange()}),lt.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z`
      <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
        ${this.dynamicButtonTemplate()} ${this.titleTemplate()}
        <wui-icon-link
          ?disabled=${this.buffering}
          icon="close"
          @click=${this.onClose.bind(this)}
          data-testid="w3m-header-close"
        ></wui-icon-link>
      </wui-flex>
      ${this.separatorTemplate()}
    `}onWalletHelp(){ze.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),ye.push("WhatIsAWallet")}onClose(){return y(this,null,function*(){if(Dt.state.isSiweEnabled){let{SIWEController:e}=yield import("./chunk-NGBSEEBK.js");e.state.status!=="success"&&(yield lt.disconnect())}Ct.close()})}titleTemplate(){return Z`<wui-text variant="paragraph-700" color="fg-100">${this.heading}</wui-text>`}dynamicButtonTemplate(){let{view:e}=ye.state,r=e==="Connect",s=e==="ApproveTransaction"||e==="UpgradeToSmartAccount";return this.showBack&&!s?Z`<wui-icon-link
        id="dynamic"
        icon="chevronLeft"
        ?disabled=${this.buffering}
        @click=${this.onGoBack.bind(this)}
      ></wui-icon-link>`:Z`<wui-icon-link
      data-hidden=${!r}
      id="dynamic"
      icon="helpCircle"
      @click=${this.onWalletHelp.bind(this)}
    ></wui-icon-link>`}separatorTemplate(){return this.heading?Z`<wui-separator></wui-separator>`:null}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}onViewChange(e){return y(this,null,function*(){let r=this.shadowRoot?.querySelector("wui-text");if(r){let n=Nz()[e];yield r.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=n,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}})}onHistoryChange(){return y(this,null,function*(){let{history:e}=ye.state,r=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&r?(yield r.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&r&&(yield r.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))})}onGoBack(){ye.state.view==="ConnectingSiwe"?ye.push("Connect"):ye.goBack()}};Pg.styles=[Tz];hC([ne()],Pg.prototype,"heading",void 0);hC([ne()],Pg.prototype,"buffering",void 0);hC([ne()],Pg.prototype,"showBack",void 0);Pg=hC([de("w3m-header")],Pg);var Oz=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},OT=class extends be{constructor(){super(...arguments),this.data=[]}render(){return Z`
      <wui-flex flexDirection="column" alignItems="center" gap="l">
        ${this.data.map(e=>Z`
            <wui-flex flexDirection="column" alignItems="center" gap="xl">
              <wui-flex flexDirection="row" justifyContent="center" gap="1xs">
                ${e.images.map(r=>Z`<wui-visual name=${r}></wui-visual>`)}
              </wui-flex>
            </wui-flex>
            <wui-flex flexDirection="column" alignItems="center" gap="xxs">
              <wui-text variant="paragraph-500" color="fg-100" align="center">
                ${e.title}
              </wui-text>
              <wui-text variant="small-500" color="fg-200" align="center">${e.text}</wui-text>
            </wui-flex>
          `)}
      </wui-flex>
    `}};Oz([Wt({type:Array})],OT.prototype,"data",void 0);OT=Oz([de("w3m-help-widget")],OT);var Mz=Be`
  :host {
    width: 100%;
  }

  wui-loading-spinner {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
  }

  .currency-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all var(--wui-ease-in-power-2) var(--wui-duration-md);
    right: var(--wui-spacing-1xs);
    height: 40px;
    padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs)
      var(--wui-spacing-xs);
    min-width: 95px;
    border-radius: var(--FULL, 1000px);
    border: 1px solid var(--wui-gray-glass-002);
    background: var(--wui-gray-glass-002);
    cursor: pointer;
  }

  .currency-container > wui-image {
    height: 24px;
    width: 24px;
    border-radius: 50%;
  }
`;var kh=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},cu=class extends be{constructor(){super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=this.currencies?.[0],this.currencyImages=Vs.state.currencyImages,this.tokenImages=Vs.state.tokenImages,this.unsubscribe.push(Xt.subscribeKey("purchaseCurrency",e=>{!e||this.type==="Fiat"||(this.selectedCurrency=this.formatPurchaseCurrency(e))}),Xt.subscribeKey("paymentCurrency",e=>{!e||this.type==="Token"||(this.selectedCurrency=this.formatPaymentCurrency(e))}),Xt.subscribe(e=>{this.type==="Fiat"?this.currencies=e.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=e.paymentCurrencies.map(this.formatPaymentCurrency)}),Vs.subscribe(e=>{this.currencyImages=B({},e.currencyImages),this.tokenImages=B({},e.tokenImages)}))}firstUpdated(){Xt.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.selectedCurrency?.symbol||"",r=this.currencyImages[e]||this.tokenImages[e];return Z` <wui-input-text type="number" size="lg" value=${this.value}>
      ${this.selectedCurrency?Z` <wui-flex
            class="currency-container"
            justifyContent="space-between"
            alignItems="center"
            gap="xxs"
            @click=${()=>Ct.open({view:`OnRamp${this.type}Select`})}
          >
            <wui-image src=${Ve(r)}></wui-image>
            <wui-text color="fg-100"> ${this.selectedCurrency.symbol} </wui-text>
          </wui-flex>`:Z`<wui-loading-spinner></wui-loading-spinner>`}
    </wui-input-text>`}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};cu.styles=Mz;kh([Wt({type:String})],cu.prototype,"type",void 0);kh([Wt({type:Number})],cu.prototype,"value",void 0);kh([ne()],cu.prototype,"currencies",void 0);kh([ne()],cu.prototype,"selectedCurrency",void 0);kh([ne()],cu.prototype,"currencyImages",void 0);kh([ne()],cu.prototype,"tokenImages",void 0);cu=kh([de("w3m-swap-input")],cu);var Pz=Be`
  wui-flex {
    background-color: var(--wui-gray-glass-005);
  }

  a {
    text-decoration: none;
    color: var(--wui-color-fg-175);
    font-weight: 500;
  }
`;var t5e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},MT=class extends be{render(){let{termsConditionsUrl:e,privacyPolicyUrl:r}=Dt.state;return!e&&!r?null:Z`
      <wui-flex .padding=${["m","s","s","s"]} justifyContent="center">
        <wui-text color="fg-250" variant="small-400" align="center">
          By connecting your wallet, you agree to our <br />
          ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
        </wui-text>
      </wui-flex>
    `}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:r}=Dt.state;return e&&r?"and":""}termsTemplate(){let{termsConditionsUrl:e}=Dt.state;return e?Z`<a href=${e}>Terms of Service</a>`:null}privacyTemplate(){let{privacyPolicyUrl:e}=Dt.state;return e?Z`<a href=${e}>Privacy Policy</a>`:null}};MT.styles=[Pz];MT=t5e([de("w3m-legal-footer")],MT);var kz=Be`
  :host {
    display: block;
    padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);
  }
`;var Lz=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},pC=class extends be{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:r,play_store:n,chrome_store:i,homepage:s}=this.wallet,o=He.isMobile(),a=He.isIos(),c=He.isAndroid(),u=[r,n,s,i].filter(Boolean).length>1,d=Bc.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!o?Z`
        <wui-cta-button
          label=${`Don't have ${d}?`}
          buttonLabel="Get"
          @click=${()=>ye.push("Downloads",{wallet:this.wallet})}
        ></wui-cta-button>
      `:!u&&s?Z`
        <wui-cta-button
          label=${`Don't have ${d}?`}
          buttonLabel="Get"
          @click=${this.onHomePage.bind(this)}
        ></wui-cta-button>
      `:r&&a?Z`
        <wui-cta-button
          label=${`Don't have ${d}?`}
          buttonLabel="Get"
          @click=${this.onAppStore.bind(this)}
        ></wui-cta-button>
      `:n&&c?Z`
        <wui-cta-button
          label=${`Don't have ${d}?`}
          buttonLabel="Get"
          @click=${this.onPlayStore.bind(this)}
        ></wui-cta-button>
      `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&He.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&He.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&He.openHref(this.wallet.homepage,"_blank")}};pC.styles=[kz];Lz([Wt({type:Object})],pC.prototype,"wallet",void 0);pC=Lz([de("w3m-mobile-download-links")],pC);var Fz=Be`
  wui-flex {
    border-top: 1px solid var(--wui-gray-glass-005);
  }

  a {
    text-decoration: none;
    color: var(--wui-color-fg-175);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wui-spacing-3xs);
  }
`;var r5e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},PT=class extends be{render(){let{termsConditionsUrl:e,privacyPolicyUrl:r}=Dt.state;return!e&&!r?null:Z`
      <wui-flex
        .padding=${["m","s","s","s"]}
        flexDirection="column"
        alignItems="center"
        justifyContent="center"
        gap="s"
      >
        <wui-text color="fg-250" variant="small-400" align="center">
          We work with the best providers to fit your buyer needs, region, and to get you the lowest
          fees
        </wui-text>

        ${this.whatIsBuyTemplate()}
      </wui-flex>
    `}whatIsBuyTemplate(){return Z` <wui-link @click=${this.onWhatIsBuy.bind(this)}>
      <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
      What is Buy
    </wui-link>`}onWhatIsBuy(){ye.push("WhatIsABuy")}};PT.styles=[Fz];PT=r5e([de("w3m-onramp-providers-footer")],PT);var Bz=Be`
  :host {
    display: block;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    top: 11px;
    left: 50%;
    width: max-content;
  }
`;var Uz=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},n5e={success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}},mC=class extends be{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=kt.state.open,this.unsubscribe.push(kt.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:r}=kt.state,n=n5e[r];return Z`
      <wui-snackbar
        message=${e}
        backgroundColor=${n.backgroundColor}
        iconColor=${n.iconColor}
        icon=${n.icon}
      ></wui-snackbar>
    `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout(()=>kt.hide(),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};mC.styles=Bz;Uz([ne()],mC.prototype,"open",void 0);mC=Uz([de("w3m-snackbar")],mC);var jz=Be`
  wui-separator {
    margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1);
    width: calc(100% + var(--wui-spacing-s) * 2);
  }

  wui-email-input {
    width: 100%;
  }

  form {
    width: 100%;
    display: block;
    position: relative;
  }

  wui-icon-link,
  wui-loading-spinner {
    position: absolute;
    top: 21px;
    transform: translateY(-50%);
  }

  wui-icon-link {
    right: var(--wui-spacing-xs);
  }

  wui-loading-spinner {
    right: var(--wui-spacing-m);
  }
`;var Ww=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Lh=class extends be{constructor(){super(),this.unsubscribe=[],this.formRef=aC(),this.connectors=Yt.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(Yt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{e.key==="Enter"&&this.onSubmitEmail(e)})}render(){let e=this.connectors.length>1;return this.connectors.find(n=>n.type==="EMAIL")?Z`
      <form ${cC(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
        <wui-email-input
          @focus=${this.onFocusEvent.bind(this)}
          .disabled=${this.loading}
          @inputChange=${this.onEmailInputChange.bind(this)}
          .errorMessage=${this.error}
        >
        </wui-email-input>

        ${this.submitButtonTemplate()}${this.loadingTemplate()}
        <input type="submit" hidden />
      </form>

      ${e?Z`<wui-separator text="or"></wui-separator>`:null}
    `:null}submitButtonTemplate(){return!this.loading&&this.email.length>3?Z`
          <wui-icon-link
            size="sm"
            icon="chevronRight"
            iconcolor="accent-100"
            @click=${this.onSubmitEmail.bind(this)}
          >
          </wui-icon-link>
        `:null}loadingTemplate(){return this.loading?Z`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}onEmailInputChange(e){this.email=e.detail,this.error=""}onSubmitEmail(e){return y(this,null,function*(){try{if(this.loading)return;this.loading=!0,e.preventDefault();let r=Yt.getEmailConnector();if(!r)throw new Error("w3m-email-login-widget: Email connector not found");let{action:n}=yield r.provider.connectEmail({email:this.email});ze.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),n==="VERIFY_OTP"?(ze.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),ye.push("EmailVerifyOtp",{email:this.email})):n==="VERIFY_DEVICE"&&ye.push("EmailVerifyDevice",{email:this.email})}catch(r){He.parseError(r)?.includes("Invalid email")?this.error="Invalid email. Try again.":kt.showError(r)}finally{this.loading=!1}})}onFocusEvent(){ze.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};Lh.styles=jz;Ww([ne()],Lh.prototype,"connectors",void 0);Ww([ne()],Lh.prototype,"email",void 0);Ww([ne()],Lh.prototype,"loading",void 0);Ww([ne()],Lh.prototype,"error",void 0);Lh=Ww([de("w3m-email-login-widget")],Lh);var Hz=Be`
  wui-flex {
    width: 100%;
  }

  :host > wui-flex:first-child {
    transform: translateY(calc(var(--wui-spacing-xxs) * -1));
  }

  wui-icon-link {
    margin-right: calc(var(--wui-icon-box-size-md) * -1);
  }

  wui-notice-card {
    margin-bottom: var(--wui-spacing-3xs);
  }

  w3m-transactions-view {
    max-height: 200px;
  }

  .tab-content-container {
    height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .account-button {
    width: auto;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wui-spacing-s);
    height: 48px;
    padding: var(--wui-spacing-xs);
    padding-right: var(--wui-spacing-s);
    box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);
    background-color: var(--wui-gray-glass-002);
    border-radius: 24px;
    transaction: background-color 0.2s linear;
  }

  .account-button:hover {
    background-color: var(--wui-gray-glass-005);
  }

  .avatar-container {
    position: relative;
  }

  wui-avatar.avatar {
    width: 32px;
    height: 32px;
    box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
  }

  wui-avatar.network-avatar {
    width: 16px;
    height: 16px;
    position: absolute;
    left: 100%;
    top: 100%;
    transform: translate(-75%, -75%);
    box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
  }

  .account-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .account-links wui-flex {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: red;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 10px;
    flex: 1 0 0;

    border-radius: var(--XS, 16px);
    border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    transition: background 0.2s linear;
  }

  .account-links wui-flex:hover {
    background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));
  }

  .account-links wui-flex wui-icon {
    width: var(--S, 20px);
    height: var(--S, 20px);
  }

  .account-links wui-flex wui-icon svg path {
    stroke: #47a1ff;
  }
`;var qf=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Xc=class extends be{constructor(){super(),this.unsubscribe=[],this.address=qe.state.address,this.profileImage=qe.state.profileImage,this.profileName=qe.state.profileName,this.network=ut.state.caipNetwork,this.disconnecting=!1,this.balance=qe.state.balance,this.balanceSymbol=qe.state.balanceSymbol,this.unsubscribe.push(qe.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.balance=e.balance,this.balanceSymbol=e.balanceSymbol):kt.showError("Account not found")}),ut.subscribeKey("caipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");let e=Ot.getNetworkImage(this.network);return Z`<wui-flex
        flexDirection="column"
        .padding=${["0","xl","m","xl"]}
        alignItems="center"
        gap="l"
      >
        <wui-avatar
          alt=${Ve(this.address)}
          address=${Ve(this.address)}
          imageSrc=${Ve(this.profileImage===null?void 0:this.profileImage)}
        ></wui-avatar>
        <wui-flex flexDirection="column" alignItems="center">
          <wui-flex gap="3xs" alignItems="center" justifyContent="center">
            <wui-text variant="medium-title-600" color="fg-100">
              ${this.profileName?Bc.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):Bc.getTruncateString({string:this.address?this.address:"",charsStart:4,charsEnd:4,truncate:"middle"})}
            </wui-text>
            <wui-icon-link
              size="md"
              icon="copy"
              iconColor="fg-200"
              @click=${this.onCopyAddress}
            ></wui-icon-link>
          </wui-flex>
          <wui-text variant="paragraph-500" color="fg-200"
            >${He.formatBalance(this.balance,this.balanceSymbol)}</wui-text
          >
        </wui-flex>
        ${this.explorerBtnTemplate()}
      </wui-flex>

      <wui-flex flexDirection="column" gap="xs" .padding=${["0","s","s","s"]}>
        ${this.emailCardTemplate()} ${this.emailBtnTemplate()}

        <wui-list-item
          .variant=${e?"image":"icon"}
          iconVariant="overlay"
          icon="networkPlaceholder"
          imageSrc=${Ve(e)}
          ?chevron=${this.isAllowedNetworkSwitch()}
          @click=${this.onNetworks.bind(this)}
          data-testid="w3m-account-select-network"
        >
          <wui-text variant="paragraph-500" color="fg-100">
            ${this.network?.name??"Unknown"}
          </wui-text>
        </wui-list-item>
        ${this.onrampTemplate()}
        <wui-list-item
          iconVariant="blue"
          icon="swapHorizontalMedium"
          iconSize="sm"
          ?chevron=${!0}
          @click=${this.onTransactions.bind(this)}
        >
          <wui-text variant="paragraph-500" color="fg-100">Activity</wui-text>
        </wui-list-item>
        <wui-list-item
          variant="icon"
          iconVariant="overlay"
          icon="disconnect"
          ?chevron=${!1}
          .loading=${this.disconnecting}
          @click=${this.onDisconnect.bind(this)}
          data-testid="disconnect-button"
        >
          <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
        </wui-list-item>
      </wui-flex>`}onrampTemplate(){let{enableOnramp:e}=Dt.state;return e?Z`
      <wui-list-item
        iconVariant="blue"
        icon="card"
        ?chevron=${!0}
        @click=${this.handleClickPay.bind(this)}
      >
        <wui-text variant="paragraph-500" color="fg-100">Buy crypto</wui-text>
      </wui-list-item>
    `:null}emailCardTemplate(){let e=Ui.getConnectedConnector(),r=Yt.getEmailConnector(),{origin:n}=location;return!r||e!=="EMAIL"||n.includes(Lo.SECURE_SITE)?null:Z`
      <wui-notice-card
        @click=${this.onGoToUpgradeView.bind(this)}
        label="Upgrade your wallet"
        description="Transition to a self-custodial wallet"
        icon="wallet"
        data-testid="w3m-wallet-upgrade-card"
      ></wui-notice-card>
    `}handleClickPay(){ye.push("OnRampProviders")}explorerBtnTemplate(){let{addressExplorerUrl:e}=qe.state;return e?Z`
      <wui-button size="sm" variant="shade" @click=${this.onExplorer.bind(this)}>
        <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon>
        Block Explorer
        <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon>
      </wui-button>
    `:null}emailBtnTemplate(){let e=Ui.getConnectedConnector(),r=Yt.getEmailConnector();if(!r||e!=="EMAIL")return null;let n=r.provider.getEmail()??"";return Z`
      <wui-list-item
        variant="icon"
        iconVariant="overlay"
        icon="mail"
        iconSize="sm"
        ?chevron=${!0}
        @click=${()=>this.onGoToUpdateEmail(n)}
      >
        <wui-text variant="paragraph-500" color="fg-100">${n}</wui-text>
      </wui-list-item>
    `}isAllowedNetworkSwitch(){let{requestedCaipNetworks:e}=ut.state,r=e?e.length>1:!1,n=e?.find(({id:i})=>i===this.network?.id);return r||!n}onCopyAddress(){try{this.address&&(He.copyToClopboard(this.address),kt.showSuccess("Address copied"))}catch{kt.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&(ze.sendEvent({type:"track",event:"CLICK_NETWORKS"}),ye.push("Networks"))}onTransactions(){ze.sendEvent({type:"track",event:"CLICK_TRANSACTIONS"}),ye.push("Transactions")}onDisconnect(){return y(this,null,function*(){try{this.disconnecting=!0,yield lt.disconnect(),ze.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),Ct.close()}catch{ze.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),kt.showError("Failed to disconnect")}finally{this.disconnecting=!1}})}onExplorer(){let{addressExplorerUrl:e}=qe.state;e&&He.openHref(e,"_blank")}onGoToUpgradeView(){ze.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),ye.push("UpgradeEmailWallet")}onGoToUpdateEmail(e){ye.push("UpdateEmailWallet",{email:e})}};Xc.styles=Hz;qf([ne()],Xc.prototype,"address",void 0);qf([ne()],Xc.prototype,"profileImage",void 0);qf([ne()],Xc.prototype,"profileName",void 0);qf([ne()],Xc.prototype,"network",void 0);qf([ne()],Xc.prototype,"disconnecting",void 0);qf([ne()],Xc.prototype,"balance",void 0);qf([ne()],Xc.prototype,"balanceSymbol",void 0);Xc=qf([de("w3m-account-default-widget")],Xc);var Vz=Be`
  wui-flex {
    width: 100%;
  }

  wui-promo {
    position: absolute;
    top: -32px;
  }

  wui-profile-button {
    margin-top: var(--wui-spacing-2l);
  }

  wui-tooltip-select {
    width: 100%;
  }

  wui-tabs {
    width: 100%;
  }

  .contentContainer {
    height: 280px;
  }

  .contentContainer > wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }

  .contentContainer > .textContent {
    width: 65%;
  }
`;var $z={ACCOUNT_TABS:[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}]};var Fh=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},lu=class extends be{constructor(){super(),this.unsubscribe=[],this.address=qe.state.address,this.profileImage=qe.state.profileImage,this.profileName=qe.state.profileName,this.network=ut.state.caipNetwork,this.currentTab=qe.state.currentTab,this.tokenBalance=qe.state.tokenBalance,this.unsubscribe.push(qe.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance):Ct.close()}),ut.subscribeKey("caipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");let e=Ot.getNetworkImage(this.network);return Z`<wui-flex
      flexDirection="column"
      .padding=${["0","xl","m","xl"]}
      alignItems="center"
      gap="m"
    >
      ${this.activateAccountTemplate()}
      <wui-profile-button
        @click=${this.onProfileButtonClick.bind(this)}
        address=${Ve(this.address)}
        networkSrc=${Ve(e)}
        icon="chevronBottom"
        avatarSrc=${Ve(this.profileImage?this.profileImage:void 0)}
        ?isprofilename=${!!this.profileName}
      ></wui-profile-button>
      ${this.tokenBalanceTemplate()}
      <wui-flex gap="s">
        <wui-tooltip-select
          @click=${this.onBuyClick.bind(this)}
          text="Buy"
          icon="card"
        ></wui-tooltip-select>
        <wui-tooltip-select text="Convert" icon="recycleHorizontal"></wui-tooltip-select>
        <wui-tooltip-select
          @click=${this.onReceiveClick.bind(this)}
          text="Receive"
          icon="arrowBottomCircle"
        ></wui-tooltip-select>
        <wui-tooltip-select text="Send" icon="send"></wui-tooltip-select>
      </wui-flex>

      <wui-tabs
        .onTabChange=${this.onTabChange.bind(this)}
        .activeTab=${this.currentTab}
        localTabWidth="104px"
        .tabs=${$z.ACCOUNT_TABS}
      ></wui-tabs>
      ${this.listContentTemplate()}
    </wui-flex>`}listContentTemplate(){return this.currentTab===0?Z`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:this.currentTab===1?Z`<w3m-account-nfts-widget></w3m-account-nfts-widget>`:this.currentTab===2?Z`<w3m-account-activity-widget></w3m-account-activity-widget>`:Z`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){let e=He.calculateBalance(this.tokenBalance),{dollars:r="0",pennies:n="00"}=He.formatTokenBalance(e);return Z`<wui-balance dollars=${r} pennies=${n}></wui-balance>`}return Z`<wui-balance dollars="0" pennies="00"></wui-balance>`}activateAccountTemplate(){return Z` <wui-promo text="Activate your account"></wui-promo>`}onTabChange(e){qe.setCurrentTab(e)}onProfileButtonClick(){ye.push("AccountSettings")}onBuyClick(){ye.push("OnRampProviders")}onReceiveClick(){ye.push("WalletReceive")}};lu.styles=Vz;Fh([ne()],lu.prototype,"address",void 0);Fh([ne()],lu.prototype,"profileImage",void 0);Fh([ne()],lu.prototype,"profileName",void 0);Fh([ne()],lu.prototype,"network",void 0);Fh([ne()],lu.prototype,"currentTab",void 0);Fh([ne()],lu.prototype,"tokenBalance",void 0);lu=Fh([de("w3m-account-wallet-features-widget")],lu);var qz=Be`
  :host {
    width: 100%;
    max-height: 280px;
    overflow: scroll;
    scrollbar-width: none;
  }
`;var i5e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},kT=class extends be{render(){return Z`<w3m-activity-list page="account"></w3m-activity-list>`}};kT.styles=qz;kT=i5e([de("w3m-account-activity-widget")],kT);var Wz=Be`
  .contentContainer {
    height: 280px;
  }

  .contentContainer > wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }

  .contentContainer > .textContent {
    width: 65%;
  }
`;var s5e=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},LT=class extends be{render(){return Z`${this.nftTemplate()}`}nftTemplate(){return Z` <wui-flex
      class="contentContainer"
      alignItems="center"
      justifyContent="center"
      flexDirection="column"
      gap="l"
    >
      <wui-icon-box
        icon="wallet"
        size="inherit"
        iconColor="fg-200"
        backgroundColor="fg-200"
        iconSize="lg"
      ></wui-icon-box>
      <wui-flex
        class="textContent"
        gap="xs"
        flexDirection="column"
        justifyContent="center"
        flexDirection="column"
      >
        <wui-text variant="paragraph-500" align="center" color="fg-100">No NFTs yet</wui-text>
        <wui-text variant="small-400" align="center" color="fg-200"
          >Transfer from another wallets to get started</wui-text
        >
      </wui-flex>
      <wui-link @click=${this.onReceiveClick.bind(this)}>Receive NFTs</wui-link>
    </wui-flex>`}onReceiveClick(){ye.push("WalletReceive")}};LT.styles=Wz;LT=s5e([de("w3m-account-nfts-widget")],LT);var zz=Be`
  :host {
    width: 100%;
  }

  wui-flex {
    width: 100%;
  }

  .contentContainer {
    max-height: 280px;
    overflow: scroll;
    scrollbar-width: none;
  }
`;var Gz=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},gC=class extends be{constructor(){super(),this.unsubscribe=[],this.tokenBalance=qe.state.tokenBalance,this.unsubscribe.push(qe.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){qe.fetchTokenBalance()}render(){return Z`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?Z`<wui-flex class="contentContainer" flexDirection="column" gap="xs">
        ${this.tokenItemTemplate()}
      </wui-flex>`:Z` <wui-flex flexDirection="column" gap="xs"
      ><wui-list-description
        @click=${this.onBuyClick.bind(this)}
        text="Buy Crypto"
        description="Easy with card or bank account"
        icon="card"
        iconColor="success-100"
        iconBackgroundColor="success-100"
        tag="popular"
      ></wui-list-description
      ><wui-list-description
        @click=${this.onReceiveClick.bind(this)}
        text="Receive funds"
        description="Transfer tokens on your wallet"
        icon="arrowBottomCircle"
        iconColor="fg-200"
        iconBackgroundColor="fg-200"
      ></wui-list-description
    ></wui-flex>`}tokenItemTemplate(){return this.tokenBalance?.map(e=>Z`<wui-list-token
          tokenName=${e.name}
          tokenImageUrl=${e.iconUrl}
          tokenAmount=${e.quantity.numeric}
          tokenValue=${e.value}
          tokenCurrency=${e.symbol}
        ></wui-list-token>`)}onReceiveClick(){ye.push("WalletReceive")}onBuyClick(){ye.push("OnRampProviders")}};gC.styles=zz;Gz([ne()],gC.prototype,"tokenBalance",void 0);gC=Gz([de("w3m-account-tokens-widget")],gC);var Zz=Be`
  :host {
    height: 100%;
  }

  .contentContainer {
    height: 280px;
  }

  .contentContainer > wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }

  .contentContainer > .textContent {
    width: 65%;
  }
`;var Bh=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},yC="last-transaction",o5e=7,uu=class extends be{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.address=qe.state.address,this.transactionsByYear=$s.state.transactionsByYear,this.loading=$s.state.loading,this.empty=$s.state.empty,this.next=$s.state.next,this.unsubscribe.push(qe.subscribe(e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,$s.resetTransactions(),$s.fetchTransactions(e.address))}),$s.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){$s.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return Z` ${this.empty?null:this.templateTransactionsByYear()}
    ${this.loading?this.templateLoading():null}
    ${!this.loading&&this.empty?this.templateEmpty():null}`}templateTransactionsByYear(){let e=Object.keys(this.transactionsByYear).sort().reverse();return e.map((r,n)=>{let i=n===e.length-1,s=parseInt(r,10);return new Array(12).fill(null).map((a,c)=>c).reverse().map(a=>{let c=oh.getTransactionGroupTitle(s,a),u=this.transactionsByYear[s]?.[a];return u?Z`
          <wui-flex flexDirection="column">
            <wui-flex
              alignItems="center"
              flexDirection="row"
              .padding=${["xs","s","s","s"]}
            >
              <wui-text variant="paragraph-500" color="fg-200">${c}</wui-text>
            </wui-flex>
            <wui-flex flexDirection="column" gap="xs">
              ${this.templateTransactions(u,i)}
            </wui-flex>
          </wui-flex>
        `:null})})}templateRenderTransaction(e,r){let{date:n,descriptions:i,direction:s,isAllNFT:o,images:a,status:c,transfers:u,type:d}=this.getTransactionListItemProps(e),h=u?.length>1;return u?.length===2&&!o?Z`
        <wui-transaction-list-item
          date=${n}
          .direction=${s}
          id=${r&&this.next?yC:""}
          status=${c}
          type=${d}
          .images=${a}
          .descriptions=${i}
        ></wui-transaction-list-item>
      `:h?u.map((w,_)=>{let C=oh.getTransferDescription(w),A=r&&_===u.length-1;return Z` <wui-transaction-list-item
          date=${n}
          direction=${w.direction}
          id=${A&&this.next?yC:""}
          status=${c}
          type=${d}
          .onlyDirectionIcon=${!0}
          .images=${[a[_]]}
          .descriptions=${[C]}
        ></wui-transaction-list-item>`}):Z`
      <wui-transaction-list-item
        date=${n}
        .direction=${s}
        id=${r&&this.next?yC:""}
        status=${c}
        type=${d}
        .images=${a}
        .descriptions=${i}
      ></wui-transaction-list-item>
    `}templateTransactions(e,r){return e.map((n,i)=>{let s=r&&i===e.length-1;return Z`${this.templateRenderTransaction(n,s)}`})}emptyStateActivity(){return Z`<wui-flex
      flexGrow="1"
      flexDirection="column"
      justifyContent="center"
      alignItems="center"
      .padding=${["3xl","xl","3xl","xl"]}
      gap="xl"
    >
      <wui-icon-box
        backgroundColor="glass-005"
        background="gray"
        iconColor="fg-200"
        icon="wallet"
        size="lg"
        ?border=${!0}
        borderColor="wui-color-bg-125"
      ></wui-icon-box>
      <wui-flex flexDirection="column" alignItems="center" gap="xs">
        <wui-text align="center" variant="paragraph-500" color="fg-100"
          >No Transactions yet</wui-text
        >
        <wui-text align="center" variant="small-500" color="fg-200"
          >Start trading on dApps <br />
          to grow your wallet!</wui-text
        >
      </wui-flex>
    </wui-flex>`}emptyStateAccount(){return Z`<wui-flex
      class="contentContainer"
      alignItems="center"
      justifyContent="center"
      flexDirection="column"
      gap="l"
    >
      <wui-icon-box
        icon="swapHorizontal"
        size="inherit"
        iconColor="fg-200"
        backgroundColor="fg-200"
        iconSize="lg"
      ></wui-icon-box>
      <wui-flex
        class="textContent"
        gap="xs"
        flexDirection="column"
        justifyContent="center"
        flexDirection="column"
      >
        <wui-text variant="paragraph-500" align="center" color="fg-100">No activity yet</wui-text>
        <wui-text variant="small-400" align="center" color="fg-200"
          >Your next transactions will appear here</wui-text
        >
      </wui-flex>
      <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
    </wui-flex>`}templateEmpty(){return this.page==="account"?Z`${this.emptyStateAccount()}`:Z`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?Array(o5e).fill(Z` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(e=>e):null}onReceiveClick(){ye.push("WalletReceive")}createPaginationObserver(){let{projectId:e}=Dt.state;this.paginationObserver=new IntersectionObserver(([r])=>{r?.isIntersecting&&!this.loading&&($s.fetchTransactions(this.address),ze.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next}}))},{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();let e=this.shadowRoot?.querySelector(`#${yC}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){let r=v3.formatDate(e?.metadata?.minedAt),n=oh.getTransactionDescriptions(e),i=e?.transfers,s=e?.transfers?.[0],o=!!s&&e?.transfers?.every(c=>!!c.nft_info),a=oh.getTransactionImages(i);return{date:r,direction:s?.direction,descriptions:n,isAllNFT:o,images:a,status:e.metadata?.status,transfers:i,type:e.metadata?.operationType}}};uu.styles=Zz;Bh([Wt()],uu.prototype,"page",void 0);Bh([ne()],uu.prototype,"address",void 0);Bh([ne()],uu.prototype,"transactionsByYear",void 0);Bh([ne()],uu.prototype,"loading",void 0);Bh([ne()],uu.prototype,"empty",void 0);Bh([ne()],uu.prototype,"next",void 0);uu=Bh([de("w3m-activity-list")],uu);var Kz=!1,zw=class{constructor(e){this.initPromise=void 0,this.setIsConnected=r=>{qe.setIsConnected(r)},this.setCaipAddress=r=>{qe.setCaipAddress(r)},this.setBalance=(r,n)=>{qe.setBalance(r,n)},this.fetchTokenBalance=()=>{qe.fetchTokenBalance()},this.setProfileName=r=>{qe.setProfileName(r)},this.setProfileImage=r=>{qe.setProfileImage(r)},this.resetAccount=()=>{qe.resetAccount()},this.setCaipNetwork=r=>{ut.setCaipNetwork(r)},this.getCaipNetwork=()=>ut.state.caipNetwork,this.setRequestedCaipNetworks=r=>{ut.setRequestedCaipNetworks(r)},this.getApprovedCaipNetworksData=()=>ut.getApprovedCaipNetworksData(),this.resetNetwork=()=>{ut.resetNetwork()},this.setConnectors=r=>{Yt.setConnectors(r)},this.addConnector=r=>{Yt.addConnector(r)},this.getConnectors=()=>Yt.getConnectors(),this.resetWcConnection=()=>{lt.resetWcConnection()},this.fetchIdentity=r=>Dm.fetchIdentity(r),this.setAddressExplorerUrl=r=>{qe.setAddressExplorerUrl(r)},this.setSmartAccountDeployed=r=>{qe.setSmartAccountDeployed(r)},this.initControllers(e),this.initOrContinue()}open(e){return y(this,null,function*(){yield this.initOrContinue(),Ct.open(e)})}close(){return y(this,null,function*(){yield this.initOrContinue(),Ct.close()})}setLoading(e){Ct.setLoading(e)}getThemeMode(){return Ei.state.themeMode}getThemeVariables(){return Ei.state.themeVariables}setThemeMode(e){Ei.setThemeMode(e),IU(Ei.state.themeMode)}setThemeVariables(e){Ei.setThemeVariables(e),AU(Ei.state.themeVariables)}subscribeTheme(e){return Ei.subscribe(e)}getState(){return B({},hA.state)}subscribeState(e){return hA.subscribe(e)}showErrorMessage(e){kt.showError(e)}showSuccessMessage(e){kt.showSuccess(e)}getEvent(){return B({},ze.state)}subscribeEvents(e){return ze.subscribe(e)}initControllers(e){return y(this,null,function*(){if(ut.setClient(e.networkControllerClient),ut.setDefaultCaipNetwork(e.defaultChain),Dt.setProjectId(e.projectId),Dt.setAllWallets(e.allWallets),Dt.setIncludeWalletIds(e.includeWalletIds),Dt.setExcludeWalletIds(e.excludeWalletIds),Dt.setFeaturedWalletIds(e.featuredWalletIds),Dt.setTokens(e.tokens),Dt.setTermsConditionsUrl(e.termsConditionsUrl),Dt.setPrivacyPolicyUrl(e.privacyPolicyUrl),Dt.setCustomWallets(e.customWallets),Dt.setEnableAnalytics(e.enableAnalytics),Dt.setSdkVersion(e._sdkVersion),lt.setClient(e.connectionControllerClient),e.siweControllerClient){let{SIWEController:r}=yield import("./chunk-NGBSEEBK.js");r.setSIWEClient(e.siweControllerClient)}e.metadata&&Dt.setMetadata(e.metadata),e.themeMode&&Ei.setThemeMode(e.themeMode),e.themeVariables&&Ei.setThemeVariables(e.themeVariables),e.enableOnramp&&Dt.setOnrampEnabled(!!e.enableOnramp),e.enableWalletFeatures&&Dt.setWalletFeaturesEnabled(!!e.enableWalletFeatures),e.allowUnsupportedChain&&ut.setAllowUnsupportedChain(e.allowUnsupportedChain)})}initOrContinue(){return y(this,null,function*(){return!this.initPromise&&!Kz&&He.isClient()&&(Kz=!0,this.initPromise=new Promise(e=>y(this,null,function*(){yield Promise.all([import("./chunk-TOLAPDYK.js"),import("./chunk-V3BFGP2J.js")]);let r=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",r),e()}))),this.initPromise})}};var fX=wr(Gs());var ON=wr(vG()),XZ=wr(IG()),MN=wr(Kw()),av=wr(kG()),zC=wr(UG());function Uh(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Qw(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Uh(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Bg(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));let r=Qw(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return Uh(r)}var nN={};An(nN,{identity:()=>AIe});function EIe(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function h(_){if(_ instanceof Uint8Array||(ArrayBuffer.isView(_)?_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength):Array.isArray(_)&&(_=Uint8Array.from(_))),!(_ instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(_.length===0)return"";for(var C=0,A=0,R=0,L=_.length;R!==L&&_[R]===0;)R++,C++;for(var U=(L-R)*d+1>>>0,V=new Uint8Array(U);R!==L;){for(var Q=_[R],Y=0,k=U-1;(Q!==0||Y<A)&&k!==-1;k--,Y++)Q+=256*V[k]>>>0,V[k]=Q%a>>>0,Q=Q/a>>>0;if(Q!==0)throw new Error("Non-zero carry");A=Y,R++}for(var q=U-A;q!==U&&V[q]===0;)q++;for(var ie=c.repeat(C);q<U;++q)ie+=t.charAt(V[q]);return ie}function m(_){if(typeof _!="string")throw new TypeError("Expected String");if(_.length===0)return new Uint8Array;var C=0;if(_[C]!==" "){for(var A=0,R=0;_[C]===c;)A++,C++;for(var L=(_.length-C)*u+1>>>0,U=new Uint8Array(L);_[C];){var V=r[_.charCodeAt(C)];if(V===255)return;for(var Q=0,Y=L-1;(V!==0||Q<R)&&Y!==-1;Y--,Q++)V+=a*U[Y]>>>0,U[Y]=V%256>>>0,V=V/256>>>0;if(V!==0)throw new Error("Non-zero carry");R=Q,C++}if(_[C]!==" "){for(var k=L-R;k!==L&&U[k]===0;)k++;for(var q=new Uint8Array(A+(L-k)),ie=A;k!==L;)q[ie++]=U[k++];return q}}}function w(_){var C=m(_);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:w}}var _Ie=EIe,CIe=_Ie,jG=CIe;var Mwt=new Uint8Array(0);var HG=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},pu=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};var VG=t=>new TextEncoder().encode(t),$G=t=>new TextDecoder().decode(t);var XT=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},eN=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){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))}else throw Error("Can only multibase decode strings")}or(e){return WG(this,e)}},tN=class{constructor(e){this.decoders=e}or(e){return WG(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},WG=(t,e)=>new tN(B(B({},t.decoders||{[t.prefix]:t}),e.decoders||{[e.prefix]:e})),rN=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new XT(e,r,n),this.decoder=new eN(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},Ug=({name:t,prefix:e,encode:r,decode:n})=>new rN(t,e,r,n),zf=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=jG(r,e);return Ug({prefix:t,name:e,encode:n,decode:s=>pu(i(s))})},xIe=(t,e,r,n)=>{let i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let s=t.length;for(;t[s-1]==="=";)--s;let o=new Uint8Array(s*r/8|0),a=0,c=0,u=0;for(let d=0;d<s;++d){let h=i[t[d]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|h,a+=r,a>=8&&(a-=8,o[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},IIe=(t,e,r)=>{let n=e[e.length-1]==="=",i=(1<<r)-1,s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},li=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Ug({prefix:e,name:t,encode(i){return IIe(i,n,r)},decode(i){return xIe(i,n,r,t)}});var AIe=Ug({prefix:"\0",name:"identity",encode:t=>$G(t),decode:t=>VG(t)});var iN={};An(iN,{base2:()=>SIe});var SIe=li({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var sN={};An(sN,{base8:()=>DIe});var DIe=li({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var oN={};An(oN,{base10:()=>RIe});var RIe=zf({prefix:"9",name:"base10",alphabet:"0123456789"});var aN={};An(aN,{base16:()=>TIe,base16upper:()=>NIe});var TIe=li({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),NIe=li({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var cN={};An(cN,{base32:()=>jg,base32hex:()=>kIe,base32hexpad:()=>FIe,base32hexpadupper:()=>BIe,base32hexupper:()=>LIe,base32pad:()=>MIe,base32padupper:()=>PIe,base32upper:()=>OIe,base32z:()=>UIe});var jg=li({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),OIe=li({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),MIe=li({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),PIe=li({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),kIe=li({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),LIe=li({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),FIe=li({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),BIe=li({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),UIe=li({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var lN={};An(lN,{base36:()=>jIe,base36upper:()=>HIe});var jIe=zf({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),HIe=zf({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var uN={};An(uN,{base58btc:()=>rl,base58flickr:()=>VIe});var rl=zf({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),VIe=zf({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var fN={};An(fN,{base64:()=>$Ie,base64pad:()=>qIe,base64url:()=>WIe,base64urlpad:()=>zIe});var $Ie=li({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),qIe=li({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),WIe=li({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),zIe=li({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var dN={};An(dN,{base256emoji:()=>YIe});var zG=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),GIe=zG.reduce((t,e,r)=>(t[r]=e,t),[]),ZIe=zG.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function KIe(t){return t.reduce((e,r)=>(e+=GIe[r],e),"")}function JIe(t){let e=[];for(let r of t){let n=ZIe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}var YIe=Ug({prefix:"\u{1F680}",name:"base256emoji",encode:KIe,decode:JIe});var gN={};An(gN,{sha256:()=>gAe,sha512:()=>yAe});var QIe=KG,GG=128,XIe=127,eAe=~XIe,tAe=Math.pow(2,31);function KG(t,e,r){e=e||[],r=r||0;for(var n=r;t>=tAe;)e[r++]=t&255|GG,t/=128;for(;t&eAe;)e[r++]=t&255|GG,t>>>=7;return e[r]=t|0,KG.bytes=r-n+1,e}var rAe=hN,nAe=128,ZG=127;function hN(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw hN.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&ZG)<<i:(o&ZG)*Math.pow(2,i),i+=7}while(o>=nAe);return hN.bytes=s-n,r}var iAe=Math.pow(2,7),sAe=Math.pow(2,14),oAe=Math.pow(2,21),aAe=Math.pow(2,28),cAe=Math.pow(2,35),lAe=Math.pow(2,42),uAe=Math.pow(2,49),fAe=Math.pow(2,56),dAe=Math.pow(2,63),hAe=function(t){return t<iAe?1:t<sAe?2:t<oAe?3:t<aAe?4:t<cAe?5:t<lAe?6:t<uAe?7:t<fAe?8:t<dAe?9:10},pAe={encode:QIe,decode:rAe,encodingLength:hAe},mAe=pAe,Xw=mAe;var ev=(t,e=0)=>[Xw.decode(t,e),Xw.decode.bytes],Hg=(t,e,r=0)=>(Xw.encode(t,e,r),e),Vg=t=>Xw.encodingLength(t);var jh=(t,e)=>{let r=e.byteLength,n=Vg(t),i=n+Vg(r),s=new Uint8Array(i+r);return Hg(t,s,0),Hg(r,s,n),s.set(e,i),new $g(t,r,e,s)},JG=t=>{let e=pu(t),[r,n]=ev(e),[i,s]=ev(e.subarray(n)),o=e.subarray(n+s);if(o.byteLength!==i)throw new Error("Incorrect length");return new $g(r,i,o,e)},YG=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&HG(t.bytes,e.bytes),$g=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};var mN=({name:t,code:e,encode:r})=>new pN(t,e,r),pN=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?jh(this.code,r):r.then(n=>jh(this.code,n))}else throw Error("Unknown type, must be binary type")}};var XG=t=>e=>y(void 0,null,function*(){return new Uint8Array(yield crypto.subtle.digest(t,e))}),gAe=mN({name:"sha2-256",code:18,encode:XG("SHA-256")}),yAe=mN({name:"sha2-512",code:19,encode:XG("SHA-512")});var yN={};An(yN,{identity:()=>bAe});var eZ=0,wAe="identity",tZ=pu,vAe=t=>jh(eZ,tZ(t)),bAe={code:eZ,name:wAe,encode:tZ,digest:vAe};var rvt=new TextEncoder,nvt=new TextDecoder;var LC=class t{constructor(e,r,n,i){this.code=r,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:kC,byteLength:kC,code:PC,version:PC,multihash:PC,bytes:PC,_baseCache:kC,asCID:kC})}toV0(){switch(this.version){case 0:return this;default:{let{code:e,multihash:r}=this;if(e!==rv)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==AAe)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return t.createV0(r)}}}toV1(){switch(this.version){case 0:{let{code:e,digest:r}=this.multihash,n=jh(e,r);return t.createV1(this.code,n)}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&&YG(this.multihash,e.multihash)}toString(e){let{bytes:r,version:n,_baseCache:i}=this;switch(n){case 0:return xAe(r,i,e||rl.encoder);default:return IAe(r,i,e||jg.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 DAe(/^0\.0/,RAe),!!(e&&(e[nZ]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof t)return e;if(e!=null&&e.asCID===e){let{version:r,code:n,multihash:i,bytes:s}=e;return new t(r,n,i,s||rZ(r,n,i.bytes))}else if(e!=null&&e[nZ]===!0){let{version:r,multihash:n,code:i}=e,s=JG(n);return t.create(r,i,s)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==rv)throw new Error(`Version 0 CID must use dag-pb (code: ${rv}) block encoding`);return new t(e,r,n,n.bytes)}case 1:{let i=rZ(e,r,n.bytes);return new t(e,r,n,i)}default:throw new Error("Invalid version")}}static createV0(e){return t.create(0,rv,e)}static createV1(e,r){return t.create(1,e,r)}static decode(e){let[r,n]=t.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){let r=t.inspectBytes(e),n=r.size-r.multihashSize,i=pu(e.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");let s=i.subarray(r.multihashSize-r.digestSize),o=new $g(r.multihashCode,r.digestSize,s,i);return[r.version===0?t.createV0(o):t.createV1(r.codec,o),e.subarray(r.size)]}static inspectBytes(e){let r=0,n=()=>{let[h,m]=ev(e.subarray(r));return r+=m,h},i=n(),s=rv;if(i===18?(i=0,r=0):i===1&&(s=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let o=r,a=n(),c=n(),u=r+c,d=u-o;return{version:i,codec:s,multihashCode:a,digestSize:c,multihashSize:d,size:u}}static parse(e,r){let[n,i]=CAe(e,r),s=t.decode(i);return s._baseCache.set(n,e),s}},CAe=(t,e)=>{switch(t[0]){case"Q":{let r=e||rl;return[rl.prefix,r.decode(`${rl.prefix}${t}`)]}case rl.prefix:{let r=e||rl;return[rl.prefix,r.decode(t)]}case jg.prefix:{let r=e||jg;return[jg.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},xAe=(t,e,r)=>{let{prefix:n}=r;if(n!==rl.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=e.get(n);if(i==null){let s=r.encode(t).slice(1);return e.set(n,s),s}else return i},IAe=(t,e,r)=>{let{prefix:n}=r,i=e.get(n);if(i==null){let s=r.encode(t);return e.set(n,s),s}else return i},rv=112,AAe=18,rZ=(t,e,r)=>{let n=Vg(t),i=n+Vg(e),s=new Uint8Array(i+r.byteLength);return Hg(t,s,0),Hg(e,s,n),s.set(r,i),s},nZ=Symbol.for("@ipld/js-cid/CID"),PC={writable:!1,configurable:!1,enumerable:!0},kC={writable:!1,enumerable:!1,configurable:!1},SAe="0.0.0-dev",DAe=(t,e)=>{if(t.test(SAe))console.warn(e);else throw new Error(e)},RAe=`CID.isCID(v) is deprecated and will be removed in the next major release.
Following code pattern:

if (CID.isCID(value)) {
  doSomethingWithCID(value)
}

Is replaced with:

const cid = CID.asCID(value)
if (cid) {
  // Make sure to use cid instead of value
  doSomethingWithCID(cid)
}
`;var wN=B(B(B(B(B(B(B(B(B(B({},nN),iN),sN),oN),aN),cN),lN),uN),fN),dN),fvt=B(B({},gN),yN);function sZ(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}var iZ=sZ("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),vN=sZ("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=Qw(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),TAe=B({utf8:iZ,"utf-8":iZ,hex:wN.base16,latin1:vN,ascii:vN,binary:vN},wN),FC=TAe;function us(t,e="utf8"){let r=FC[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Uh(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function Mi(t,e="utf8"){let r=FC[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var oZ=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},NAe=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}();var OAe=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}();var MAe=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}();var PAe=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}();var kAe=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}();var LAe=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,FAe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,aZ=3,BAe=[["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;\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",LAe]],cZ=[["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/]];function uZ(t){return t?lZ(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new kAe:typeof navigator<"u"?lZ(navigator.userAgent):HAe()}function UAe(t){return t!==""&&BAe.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var s=i.exec(t);return!!s&&[n,s]},!1)}function lZ(t){var e=UAe(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new PAe;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<aZ&&(i=oZ(oZ([],i,!0),VAe(aZ-i.length),!0)):i=[];var s=i.join("."),o=jAe(t),a=FAe.exec(t);return a&&a[1]?new MAe(r,s,o,a[1]):new NAe(r,s,o)}function jAe(t){for(var e=0,r=cZ.length;e<r;e++){var n=cZ[e],i=n[0],s=n[1],o=s.exec(t);if(o)return i}return null}function HAe(){var t=typeof process<"u"&&process.version;return t?new OAe(process.version.slice(1)):null}function VAe(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var gu=wr(Hh()),Gf=wr(AN()),eK=wr(xZ()),Zg=wr($Z());var qZ={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};var OSe=":";function tK(t){let[e,r]=t.split(OSe);return{namespace:e,reference:r}}function rK(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...i.accounts)}),r}function nK(t,e){return t.includes(":")?[t]:e.chains||[]}var iK="base10",As="base16",TN="base64pad",PN="utf8",sK=0,yu=1,MSe=0,WZ=1,NN=12,kN=32;function oK(){let t=zC.generateKeyPair();return{privateKey:Mi(t.secretKey,As),publicKey:Mi(t.publicKey,As)}}function GC(){let t=(0,MN.randomBytes)(kN);return Mi(t,As)}function aK(t,e){let r=zC.sharedKey(us(t,As),us(e,As),!0),n=new XZ.HKDF(av.SHA256,r).expand(kN);return Mi(n,As)}function cK(t){let e=(0,av.hash)(us(t,As));return Mi(e,As)}function Zf(t){let e=(0,av.hash)(us(t,PN));return Mi(e,As)}function PSe(t){return us(`${t}`,iK)}function Kg(t){return Number(Mi(t,iK))}function lK(t){let e=PSe(typeof t.type<"u"?t.type:sK);if(Kg(e)===yu&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");let r=typeof t.senderPublicKey<"u"?us(t.senderPublicKey,As):void 0,n=typeof t.iv<"u"?us(t.iv,As):(0,MN.randomBytes)(NN),i=new ON.ChaCha20Poly1305(us(t.symKey,As)).seal(n,us(t.message,PN));return kSe({type:e,sealed:i,iv:n,senderPublicKey:r})}function uK(t){let e=new ON.ChaCha20Poly1305(us(t.symKey,As)),{sealed:r,iv:n}=cv(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return Mi(i,PN)}function kSe(t){if(Kg(t.type)===yu){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Mi(Bg([t.type,t.senderPublicKey,t.iv,t.sealed]),TN)}return Mi(Bg([t.type,t.iv,t.sealed]),TN)}function cv(t){let e=us(t,TN),r=e.slice(MSe,WZ),n=WZ;if(Kg(r)===yu){let a=n+kN,c=a+NN,u=e.slice(n,a),d=e.slice(a,c),h=e.slice(c);return{type:r,sealed:h,iv:d,senderPublicKey:u}}let i=n+NN,s=e.slice(n,i),o=e.slice(i);return{type:r,sealed:o,iv:s}}function fK(t,e){let r=cv(t);return LN({type:Kg(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Mi(r.senderPublicKey,As):void 0,receiverPublicKey:e?.receiverPublicKey})}function LN(t){let e=t?.type||sK;if(e===yu){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function FN(t){return t.type===yu&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var LSe=Object.defineProperty,zZ=Object.getOwnPropertySymbols,FSe=Object.prototype.hasOwnProperty,BSe=Object.prototype.propertyIsEnumerable,GZ=(t,e,r)=>e in t?LSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ZZ=(t,e)=>{for(var r in e||(e={}))FSe.call(e,r)&&GZ(t,r,e[r]);if(zZ)for(var r of zZ(e))BSe.call(e,r)&&GZ(t,r,e[r]);return t},USe="ReactNative",wo={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};var jSe="js";function ZC(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Wh(){return!(0,Gf.getDocument)()&&!!(0,Gf.getNavigator)()&&navigator.product===USe}function Kf(){return!ZC()&&!!(0,Gf.getNavigator)()&&!!(0,Gf.getDocument)()}function lv(){return Wh()?wo.reactNative:ZC()?wo.node:Kf()?wo.browser:wo.unknown}function dK(){var t;try{return Wh()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(t=global.Application)==null?void 0:t.applicationId:void 0}catch{return}}function HSe(t,e){let r=Zg.parse(t);return r=ZZ(ZZ({},r),e),t=Zg.stringify(r),t}function hK(){return(0,eK.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]}}function VSe(){if(lv()===wo.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){let{OS:r,Version:n}=global.Platform;return[r,n].join("-")}let t=uZ();if(t===null)return"unknown";let e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function $Se(){var t;let e=lv();return e===wo.browser?[e,((t=(0,Gf.getLocation)())==null?void 0:t.host)||"unknown"].join(":"):e}function qSe(t,e,r){let n=VSe(),i=$Se();return[[t,e].join("-"),[jSe,r].join("-"),n,i].join("/")}function pK({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a}){let c=r.split("?"),u=qSe(t,e,n),d={auth:i,ua:u,projectId:s,useOnCloseEvent:o||void 0,origin:a||void 0},h=HSe(c[1]||"",d);return c[0]+"?"+h}function $h(t,e){return t.filter(r=>e.includes(r)).length===t.length}function BN(t){return Object.fromEntries(t.entries())}function UN(t){return new Map(Object.entries(t))}function Jf(t=gu.FIVE_MINUTES,e){let r=(0,gu.toMiliseconds)(t||gu.FIVE_MINUTES),n,i,s;return{resolve:o=>{s&&n&&(clearTimeout(s),n(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},r),n=o,i=a})}}function Jg(t,e,r){return new Promise((n,i)=>y(this,null,function*(){let s=setTimeout(()=>i(new Error(r)),e);try{let o=yield t;n(o)}catch(o){i(o)}clearTimeout(s)}))}function mK(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function gK(t){return mK("topic",t)}function yK(t){return mK("id",t)}function KC(t){let[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function Zs(t,e){return(0,gu.fromMiliseconds)((e||Date.now())+(0,gu.toMiliseconds)(t))}function nl(t){return Date.now()>=(0,gu.toMiliseconds)(t)}function Zn(t,e){return`${t}${e?`:${e}`:""}`}function JC(t=[],e=[]){return[...new Set([...t,...e])]}function wK(n){return y(this,arguments,function*({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;let s=(typeof r=="string"?JSON.parse(r):r)?.href;if(typeof s!="string")return;s.endsWith("/")&&(s=s.slice(0,-1));let o=`${s}/wc?requestId=${t}&sessionTopic=${e}`,a=lv();a===wo.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):a===wo.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(o))}catch(i){console.error(i)}})}function vK(t,e){return y(this,null,function*(){try{return(yield t.getItem(e))||(Kf()?localStorage.getItem(e):void 0)}catch(r){console.error(r)}})}var WSe="irn";function YC(t){return t?.relay||{protocol:WSe}}function uv(t){let e=qZ[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var zSe=Object.defineProperty,GSe=Object.defineProperties,ZSe=Object.getOwnPropertyDescriptors,KZ=Object.getOwnPropertySymbols,KSe=Object.prototype.hasOwnProperty,JSe=Object.prototype.propertyIsEnumerable,JZ=(t,e,r)=>e in t?zSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,YSe=(t,e)=>{for(var r in e||(e={}))KSe.call(e,r)&&JZ(t,r,e[r]);if(KZ)for(var r of KZ(e))JSe.call(e,r)&&JZ(t,r,e[r]);return t},QSe=(t,e)=>GSe(t,ZSe(e));function XSe(t,e="-"){let r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){let s=i.replace(n,""),o=t[i];r[s]=o}}),r}function jN(t){t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;let e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=Zg.parse(s);return{protocol:n,topic:eDe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:XSe(o),expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function eDe(t){return t.startsWith("//")?t.substring(2):t}function tDe(t,e="-"){let r="relay",n={};return Object.keys(t).forEach(i=>{let s=r+e+i;t[i]&&(n[s]=t[i])}),n}function bK(t){return`${t.protocol}:${t.topic}@${t.version}?`+Zg.stringify(QSe(YSe({symKey:t.symKey},tDe(t.relay)),{expiryTimestamp:t.expiryTimestamp}))}function Yg(t){let e=[];return t.forEach(r=>{let[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function rDe(t){let e=[];return Object.values(t).forEach(r=>{e.push(...Yg(r.accounts))}),e}function nDe(t,e){let r=[];return Object.values(t).forEach(n=>{Yg(n.accounts).includes(e)&&r.push(...n.methods)}),r}function iDe(t,e){let r=[];return Object.values(t).forEach(n=>{Yg(n.accounts).includes(e)&&r.push(...n.events)}),r}function QC(t){return t.includes(":")}function Qg(t){return QC(t)?t.split(":")[0]:t}var sDe={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}},oDe={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 Ne(t,e){let{message:r,code:n}=oDe[t];return{message:e?`${r} ${e}`:r,code:n}}function Xr(t,e){let{message:r,code:n}=sDe[t];return{message:e?`${r} ${e}`:r,code:n}}function zo(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function zh(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function fs(t){return typeof t>"u"}function Ci(t,e){return e&&fs(t)?!0:typeof t=="string"&&!!t.trim().length}function HN(t,e){return e&&fs(t)?!0:typeof t=="number"&&!isNaN(t)}function EK(t,e){let{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r),s=!0;return $h(i,n)?(n.forEach(o=>{let{accounts:a,methods:c,events:u}=t.namespaces[o],d=Yg(a),h=r[o];(!$h(nK(o,h),d)||!$h(h.methods,c)||!$h(h.events,u))&&(s=!1)}),s):!1}function WC(t){return Ci(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function aDe(t){if(Ci(t,!1)&&t.includes(":")){let e=t.split(":");if(e.length===3){let r=e[0]+":"+e[1];return!!e[2]&&WC(r)}}return!1}function _K(t){if(Ci(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function CK(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function xK(t){return t?.topic}function IK(t,e){let r=null;return Ci(t?.publicKey,!1)||(r=Ne("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function YZ(t){let e=!0;return zo(t)?t.length&&(e=t.every(r=>Ci(r,!1))):e=!1,e}function cDe(t,e,r){let n=null;return zo(e)&&e.length?e.forEach(i=>{n||WC(i)||(n=Xr("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):WC(t)||(n=Xr("UNSUPPORTED_CHAINS",`${r}, 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"] }`)),n}function lDe(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;let o=cDe(i,nK(i,s),`${e} ${r}`);o&&(n=o)}),n}function uDe(t,e){let r=null;return zo(t)?t.forEach(n=>{r||aDe(n)||(r=Xr("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Xr("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function fDe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;let i=uDe(n?.accounts,`${e} namespace`);i&&(r=i)}),r}function dDe(t,e){let r=null;return YZ(t?.methods)?YZ(t?.events)||(r=Xr("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Xr("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function AK(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;let i=dDe(n,`${e}, namespace`);i&&(r=i)}),r}function SK(t,e,r){let n=null;if(t&&zh(t)){let i=AK(t,e);i&&(n=i);let s=lDe(t,e,r);s&&(n=s)}else n=Ne("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function XC(t,e){let r=null;if(t&&zh(t)){let n=AK(t,e);n&&(r=n);let i=fDe(t,e);i&&(r=i)}else r=Ne("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function VN(t){return Ci(t.protocol,!0)}function DK(t,e){let r=!1;return e&&!t?r=!0:t&&zo(t)&&t.length&&t.forEach(n=>{r=VN(n)}),r}function RK(t){return typeof t=="number"}function Ss(t){return typeof t<"u"&&typeof t!==null}function TK(t){return!(!t||typeof t!="object"||!t.code||!HN(t.code,!1)||!t.message||!Ci(t.message,!1))}function NK(t){return!(fs(t)||!Ci(t.method,!1))}function OK(t){return!(fs(t)||fs(t.result)&&fs(t.error)||!HN(t.id,!1)||!Ci(t.jsonrpc,!1))}function MK(t){return!(fs(t)||!Ci(t.name,!1))}function $N(t,e){return!(!WC(e)||!rDe(t).includes(e))}function PK(t,e,r){return Ci(r,!1)?nDe(t,e).includes(r):!1}function kK(t,e,r){return Ci(r,!1)?iDe(t,e).includes(r):!1}function qN(t,e,r){let n=null,i=hDe(t),s=pDe(e),o=Object.keys(i),a=Object.keys(s),c=QZ(Object.keys(t)),u=QZ(Object.keys(e)),d=c.filter(h=>!u.includes(h));return d.length&&(n=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
      Required: ${d.toString()}
      Received: ${Object.keys(e).toString()}`)),$h(o,a)||(n=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
      Required: ${o.toString()}
      Approved: ${a.toString()}`)),Object.keys(e).forEach(h=>{if(!h.includes(":")||n)return;let m=Yg(e[h].accounts);m.includes(h)||(n=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${h}
        Required: ${h}
        Approved: ${m.toString()}`))}),o.forEach(h=>{n||($h(i[h].methods,s[h].methods)?$h(i[h].events,s[h].events)||(n=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${h}`)):n=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${h}`))}),n}function hDe(t){let e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function QZ(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function pDe(t){let e={};return Object.keys(t).forEach(r=>{r.includes(":")?e[r]=t[r]:Yg(t[r].accounts)?.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}),e}function LK(t,e){return HN(t,!1)&&t<=e.max&&t>=e.min}function WN(){let t=lv();return new Promise(e=>{switch(t){case wo.browser:e(mDe());break;case wo.reactNative:e(gDe());break;case wo.node:e(yDe());break;default:e(!0)}})}function mDe(){return Kf()&&navigator?.onLine}function gDe(){return y(this,null,function*(){return Wh()&&typeof global<"u"&&global!=null&&global.NetInfo?(yield global==null?void 0:global.NetInfo.fetch())?.isConnected:!0})}function yDe(){return!0}function FK(t){switch(lv()){case wo.browser:wDe(t);break;case wo.reactNative:vDe(t);break;case wo.node:break}}function wDe(t){!Wh()&&Kf()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function vDe(t){Wh()&&typeof global<"u"&&global!=null&&global.NetInfo&&global?.NetInfo.addEventListener(e=>t(e?.isConnected))}var RN={},qh=class{static get(e){return RN[e]}static set(e,r){RN[e]=r}static delete(e){delete RN[e]}};var Cu=wr(Gs());var bDe=/"(?:_|\\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*:/,EDe=/"(?: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*:/,_De=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function CDe(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){xDe(t);return}return e}function xDe(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function fv(t,e={}){if(typeof t!="string")return t;let r=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return r.slice(1,-1);if(r.length<=9){let n=r.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!_De.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(bDe.test(t)||EDe.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,CDe)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}function IDe(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function Pi(t,...e){try{return IDe(t(...e))}catch(r){return Promise.reject(r)}}function ADe(t){let e=typeof t;return t===null||e!=="object"&&e!=="function"}function SDe(t){let e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}function dv(t){if(ADe(t))return String(t);if(SDe(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return dv(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function BK(){if(typeof Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}var zN="base64:";function UK(t){if(typeof t=="string")return t;BK();let e=Buffer.from(t).toString("base64");return zN+e}function jK(t){return typeof t!="string"||!t.startsWith(zN)?t:(BK(),Buffer.from(t.slice(zN.length),"base64"))}function Ks(t){return t?t.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function HK(...t){return Ks(t.join(":"))}function hv(t){return t=Ks(t),t?t+":":""}var DDe="memory",RDe=()=>{let t=new Map;return{name:DDe,options:{},hasItem(e){return t.has(e)},getItem(e){return t.get(e)??null},getItemRaw(e){return t.get(e)??null},setItem(e,r){t.set(e,r)},setItemRaw(e,r){t.set(e,r)},removeItem(e){t.delete(e)},getKeys(){return Array.from(t.keys())},clear(){t.clear()},dispose(){t.clear()}}};function qK(t={}){let e={mounts:{"":t.driver||RDe()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=d=>{for(let h of e.mountpoints)if(d.startsWith(h))return{base:h,relativeKey:d.slice(h.length),driver:e.mounts[h]};return{base:"",relativeKey:d,driver:e.mounts[""]}},n=(d,h)=>e.mountpoints.filter(m=>m.startsWith(d)||h&&d.startsWith(m)).map(m=>({relativeBase:d.length>m.length?d.slice(m.length):void 0,mountpoint:m,driver:e.mounts[m]})),i=(d,h)=>{if(e.watching){h=Ks(h);for(let m of e.watchListeners)m(d,h)}},s=()=>y(this,null,function*(){if(!e.watching){e.watching=!0;for(let d in e.mounts)e.unwatch[d]=yield VK(e.mounts[d],i,d)}}),o=()=>y(this,null,function*(){if(e.watching){for(let d in e.unwatch)yield e.unwatch[d]();e.unwatch={},e.watching=!1}}),a=(d,h,m)=>{let w=new Map,_=C=>{let A=w.get(C.base);return A||(A={driver:C.driver,base:C.base,items:[]},w.set(C.base,A)),A};for(let C of d){let A=typeof C=="string",R=Ks(A?C:C.key),L=A?void 0:C.value,U=A||!C.options?h:B(B({},h),C.options),V=r(R);_(V).items.push({key:R,value:L,relativeKey:V.relativeKey,options:U})}return Promise.all([...w.values()].map(C=>m(C))).then(C=>C.flat())},c={hasItem(d,h={}){d=Ks(d);let{relativeKey:m,driver:w}=r(d);return Pi(w.hasItem,m,h)},getItem(d,h={}){d=Ks(d);let{relativeKey:m,driver:w}=r(d);return Pi(w.getItem,m,h).then(_=>fv(_))},getItems(d,h){return a(d,h,m=>m.driver.getItems?Pi(m.driver.getItems,m.items.map(w=>({key:w.relativeKey,options:w.options})),h).then(w=>w.map(_=>({key:HK(m.base,_.key),value:fv(_.value)}))):Promise.all(m.items.map(w=>Pi(m.driver.getItem,w.relativeKey,w.options).then(_=>({key:w.key,value:fv(_)})))))},getItemRaw(d,h={}){d=Ks(d);let{relativeKey:m,driver:w}=r(d);return w.getItemRaw?Pi(w.getItemRaw,m,h):Pi(w.getItem,m,h).then(_=>jK(_))},setItem(w,_){return y(this,arguments,function*(d,h,m={}){if(h===void 0)return c.removeItem(d);d=Ks(d);let{relativeKey:C,driver:A}=r(d);A.setItem&&(yield Pi(A.setItem,C,dv(h),m),A.watch||i("update",d))})},setItems(d,h){return y(this,null,function*(){yield a(d,h,m=>y(this,null,function*(){m.driver.setItems&&(yield Pi(m.driver.setItems,m.items.map(w=>({key:w.relativeKey,value:dv(w.value),options:w.options})),h)),m.driver.setItem&&(yield Promise.all(m.items.map(w=>Pi(m.driver.setItem,w.relativeKey,dv(w.value),w.options))))}))})},setItemRaw(w,_){return y(this,arguments,function*(d,h,m={}){if(h===void 0)return c.removeItem(d,m);d=Ks(d);let{relativeKey:C,driver:A}=r(d);if(A.setItemRaw)yield Pi(A.setItemRaw,C,h,m);else if(A.setItem)yield Pi(A.setItem,C,UK(h),m);else return;A.watch||i("update",d)})},removeItem(m){return y(this,arguments,function*(d,h={}){typeof h=="boolean"&&(h={removeMeta:h}),d=Ks(d);let{relativeKey:w,driver:_}=r(d);_.removeItem&&(yield Pi(_.removeItem,w,h),(h.removeMeta||h.removeMata)&&(yield Pi(_.removeItem,w+"$",h)),_.watch||i("remove",d))})},getMeta(m){return y(this,arguments,function*(d,h={}){typeof h=="boolean"&&(h={nativeOnly:h}),d=Ks(d);let{relativeKey:w,driver:_}=r(d),C=Object.create(null);if(_.getMeta&&Object.assign(C,yield Pi(_.getMeta,w,h)),!h.nativeOnly){let A=yield Pi(_.getItem,w+"$",h).then(R=>fv(R));A&&typeof A=="object"&&(typeof A.atime=="string"&&(A.atime=new Date(A.atime)),typeof A.mtime=="string"&&(A.mtime=new Date(A.mtime)),Object.assign(C,A))}return C})},setMeta(d,h,m={}){return this.setItem(d+"$",h,m)},removeMeta(d,h={}){return this.removeItem(d+"$",h)},getKeys(m){return y(this,arguments,function*(d,h={}){d=hv(d);let w=n(d,!0),_=[],C=[];for(let A of w){let L=(yield Pi(A.driver.getKeys,A.relativeBase,h)).map(U=>A.mountpoint+Ks(U)).filter(U=>!_.some(V=>U.startsWith(V)));C.push(...L),_=[A.mountpoint,..._.filter(U=>!U.startsWith(A.mountpoint))]}return d?C.filter(A=>A.startsWith(d)&&!A.endsWith("$")):C.filter(A=>!A.endsWith("$"))})},clear(m){return y(this,arguments,function*(d,h={}){d=hv(d),yield Promise.all(n(d,!1).map(w=>y(this,null,function*(){if(w.driver.clear)return Pi(w.driver.clear,w.relativeBase,h);if(w.driver.removeItem){let _=yield w.driver.getKeys(w.relativeBase||"",h);return Promise.all(_.map(C=>w.driver.removeItem(C,h)))}})))})},dispose(){return y(this,null,function*(){yield Promise.all(Object.values(e.mounts).map(d=>$K(d)))})},watch(d){return y(this,null,function*(){return yield s(),e.watchListeners.push(d),()=>y(this,null,function*(){e.watchListeners=e.watchListeners.filter(h=>h!==d),e.watchListeners.length===0&&(yield o())})})},unwatch(){return y(this,null,function*(){e.watchListeners=[],yield o()})},mount(d,h){if(d=hv(d),d&&e.mounts[d])throw new Error(`already mounted at ${d}`);return d&&(e.mountpoints.push(d),e.mountpoints.sort((m,w)=>w.length-m.length)),e.mounts[d]=h,e.watching&&Promise.resolve(VK(h,i,d)).then(m=>{e.unwatch[d]=m}).catch(console.error),c},unmount(d,h=!0){return y(this,null,function*(){d=hv(d),!(!d||!e.mounts[d])&&(e.watching&&d in e.unwatch&&(e.unwatch[d](),delete e.unwatch[d]),h&&(yield $K(e.mounts[d])),e.mountpoints=e.mountpoints.filter(m=>m!==d),delete e.mounts[d])})},getMount(d=""){d=Ks(d)+":";let h=r(d);return{driver:h.driver,base:h.base}},getMounts(d="",h={}){return d=Ks(d),n(d,h.parents).map(w=>({driver:w.driver,base:w.mountpoint}))}};return c}function VK(t,e,r){return t.watch?t.watch((n,i)=>e(n,r+i)):()=>{}}function $K(t){return y(this,null,function*(){typeof t.dispose=="function"&&(yield Pi(t.dispose))})}function Gh(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function ZN(t,e){let r=indexedDB.open(t);r.onupgradeneeded=()=>r.result.createObjectStore(e);let n=Gh(r);return(i,s)=>n.then(o=>s(o.transaction(e,i).objectStore(e)))}var GN;function pv(){return GN||(GN=ZN("keyval-store","keyval")),GN}function KN(t,e=pv()){return e("readonly",r=>Gh(r.get(t)))}function WK(t,e,r=pv()){return r("readwrite",n=>(n.put(e,t),Gh(n.transaction)))}function zK(t,e=pv()){return e("readwrite",r=>(r.delete(t),Gh(r.transaction)))}function GK(t=pv()){return t("readwrite",e=>(e.clear(),Gh(e.transaction)))}function TDe(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Gh(t.transaction)}function ZK(t=pv()){return t("readonly",e=>{if(e.getAllKeys)return Gh(e.getAllKeys());let r=[];return TDe(e,n=>r.push(n.key)).then(()=>r)})}var NDe=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),ODe=t=>{let e=/([\[:])?(\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,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function il(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return ODe(t)}catch{return t}}function Sa(t){return typeof t=="string"?t:NDe(t)||""}var MDe="idb-keyval",PDe=(t={})=>{let e=t.base&&t.base.length>0?`${t.base}:`:"",r=s=>e+s,n;return t.dbName&&t.storeName&&(n=ZN(t.dbName,t.storeName)),{name:MDe,options:t,hasItem(s){return y(this,null,function*(){return!(typeof(yield KN(r(s),n))>"u")})},getItem(s){return y(this,null,function*(){return(yield KN(r(s),n))??null})},setItem(s,o){return WK(r(s),o,n)},removeItem(s){return zK(r(s),n)},getKeys(){return ZK(n)},clear(){return GK(n)}}},kDe="WALLET_CONNECT_V2_INDEXED_DB",LDe="keyvaluestorage",YN=class{constructor(){this.indexedDb=qK({driver:PDe({dbName:kDe,storeName:LDe})})}getKeys(){return y(this,null,function*(){return this.indexedDb.getKeys()})}getEntries(){return y(this,null,function*(){return(yield this.indexedDb.getItems(yield this.indexedDb.getKeys())).map(e=>[e.key,e.value])})}getItem(e){return y(this,null,function*(){let r=yield this.indexedDb.getItem(e);if(r!==null)return r})}setItem(e,r){return y(this,null,function*(){yield this.indexedDb.setItem(e,Sa(r))})}removeItem(e){return y(this,null,function*(){yield this.indexedDb.removeItem(e)})}},JN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e6={exports:{}};(function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){let r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof JN<"u"&&JN.localStorage?e6.exports=JN.localStorage:typeof window<"u"&&window.localStorage?e6.exports=window.localStorage:e6.exports=new e})();function FDe(t){var e;return[t[0],il((e=t[1])!=null?e:"")]}var QN=class{constructor(){this.localStorage=e6.exports}getKeys(){return y(this,null,function*(){return Object.keys(this.localStorage)})}getEntries(){return y(this,null,function*(){return Object.entries(this.localStorage).map(FDe)})}getItem(e){return y(this,null,function*(){let r=this.localStorage.getItem(e);if(r!==null)return il(r)})}setItem(e,r){return y(this,null,function*(){this.localStorage.setItem(e,Sa(r))})}removeItem(e){return y(this,null,function*(){this.localStorage.removeItem(e)})}},BDe="wc_storage_version",KK=1,UDe=(t,e,r)=>y(void 0,null,function*(){let n=BDe,i=yield e.getItem(n);if(i&&i>=KK){r(e);return}let s=yield t.getKeys();if(!s.length){r(e);return}let o=[];for(;s.length;){let a=s.shift();if(!a)continue;let c=a.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){let u=yield t.getItem(a);yield e.setItem(a,u),o.push(a)}}yield e.setItem(n,KK),r(e),jDe(t,o)}),jDe=(t,e)=>y(void 0,null,function*(){e.length&&e.forEach(r=>y(void 0,null,function*(){yield t.removeItem(r)}))}),t6=class{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};let e=new QN;this.storage=e;try{let r=new YN;UDe(e,r,this.setInitialized)}catch{this.initialized=!0}}getKeys(){return y(this,null,function*(){return yield this.initialize(),this.storage.getKeys()})}getEntries(){return y(this,null,function*(){return yield this.initialize(),this.storage.getEntries()})}getItem(e){return y(this,null,function*(){return yield this.initialize(),this.storage.getItem(e)})}setItem(e,r){return y(this,null,function*(){return yield this.initialize(),this.storage.setItem(e,r)})}removeItem(e){return y(this,null,function*(){return yield this.initialize(),this.storage.removeItem(e)})}initialize(){return y(this,null,function*(){this.initialized||(yield new Promise(e=>{let r=setInterval(()=>{this.initialized&&(clearInterval(r),e())},20)}))})}};var np=wr(rJ()),br=wr(o6());rO();var wJ=wr(Gs()),a6=class extends sl{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}};var c6=class extends sl{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}},l6=class{constructor(e,r){this.logger=e,this.core=r}},u6=class extends sl{constructor(e,r){super(),this.relayer=e,this.logger=r}},f6=class extends sl{constructor(e){super()}},d6=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}};var h6=class extends sl{constructor(e,r){super(),this.relayer=e,this.logger=r}};var p6=class extends sl{constructor(e,r){super(),this.core=e,this.logger=r}};var m6=class{constructor(e,r){this.projectId=e,this.logger=r}},g6=class{constructor(e,r){this.projectId=e,this.logger=r}};var y6=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}};var w6=class{constructor(e){this.client=e}};var xv=wr(kJ()),GJ=wr(Kw()),ZJ=wr(Hh());var LJ="EdDSA",FJ="JWT",SO=".",DO="base64url",BJ="utf8",UJ="utf8",jJ=":",HJ="did",VJ="key",RO="base58btc",$J="z",qJ="K36";function v6(t){return Mi(us(Sa(t),BJ),DO)}function b6(t){let e=us(qJ,RO),r=$J+Mi(Bg([e,t]),RO);return[HJ,VJ,r].join(jJ)}function aTe(t){return Mi(t,DO)}function WJ(t){return us([v6(t.header),v6(t.payload)].join(SO),UJ)}function zJ(t){return[v6(t.header),v6(t.payload),aTe(t.signature)].join(SO)}function TO(t=(0,GJ.randomBytes)(32)){return xv.generateKeyPairFromSeed(t)}function KJ(s,o,a,c){return y(this,arguments,function*(t,e,r,n,i=(0,ZJ.fromMiliseconds)(Date.now())){let u={alg:LJ,typ:FJ},d=b6(n.publicKey),h=i+r,m={iss:d,sub:t,aud:e,iat:i,exp:h},w=WJ({header:u,payload:m}),_=xv.sign(n.secretKey,w);return zJ({header:u,payload:m,signature:_})})}var mr=wr(Hh());var pY=wr(Gs());var Wi={};An(Wi,{DEFAULT_ERROR:()=>Av,IBaseJsonRpcProvider:()=>R6,IEvents:()=>c0,IJsonRpcConnection:()=>FO,IJsonRpcProvider:()=>Nv,INTERNAL_ERROR:()=>E6,INVALID_PARAMS:()=>XJ,INVALID_REQUEST:()=>YJ,METHOD_NOT_FOUND:()=>QJ,PARSE_ERROR:()=>JJ,RESERVED_ERROR_CODES:()=>NO,SERVER_ERROR:()=>Iv,SERVER_ERROR_CODE_RANGE:()=>_6,STANDARD_ERROR_MAP:()=>Qf,formatErrorMessage:()=>dY,formatJsonRpcError:()=>vu,formatJsonRpcRequest:()=>al,formatJsonRpcResult:()=>td,getBigIntRpcId:()=>Tv,getError:()=>x6,getErrorByCode:()=>I6,isHttpUrl:()=>T6,isJsonRpcError:()=>Ys,isJsonRpcPayload:()=>UO,isJsonRpcRequest:()=>l0,isJsonRpcResponse:()=>rd,isJsonRpcResult:()=>Da,isJsonRpcValidationInvalid:()=>UTe,isLocalhostUrl:()=>BO,isNodeJs:()=>fY,isReservedErrorCode:()=>C6,isServerErrorCode:()=>uTe,isValidDefaultRoute:()=>S6,isValidErrorCode:()=>eY,isValidLeadingWildcardRoute:()=>PTe,isValidRoute:()=>MTe,isValidTrailingWildcardRoute:()=>kTe,isValidWildcardRoute:()=>D6,isWsUrl:()=>N6,parseConnectionError:()=>Sv,payloadId:()=>Rv,validateJsonRpcError:()=>fTe});var JJ="PARSE_ERROR",YJ="INVALID_REQUEST",QJ="METHOD_NOT_FOUND",XJ="INVALID_PARAMS",E6="INTERNAL_ERROR",Iv="SERVER_ERROR",NO=[-32700,-32600,-32601,-32602,-32603],_6=[-32e3,-32099],Qf={[JJ]:{code:-32700,message:"Parse error"},[YJ]:{code:-32600,message:"Invalid Request"},[QJ]:{code:-32601,message:"Method not found"},[XJ]:{code:-32602,message:"Invalid params"},[E6]:{code:-32603,message:"Internal error"},[Iv]:{code:-32e3,message:"Server error"}},Av=Iv;function uTe(t){return t<=_6[0]&&t>=_6[1]}function C6(t){return NO.includes(t)}function eY(t){return typeof t=="number"}function x6(t){return Object.keys(Qf).includes(t)?Qf[t]:Qf[Av]}function I6(t){let e=Object.values(Qf).find(r=>r.code===t);return e||Qf[Av]}function fTe(t){if(typeof t.error.code>"u")return{valid:!1,error:"Missing code for JSON-RPC error"};if(typeof t.error.message>"u")return{valid:!1,error:"Missing message for JSON-RPC error"};if(!eY(t.error.code))return{valid:!1,error:`Invalid error code type for JSON-RPC: ${t.error.code}`};if(C6(t.error.code)){let e=I6(t.error.code);if(e.message!==Qf[Av].message&&t.error.message===e.message)return{valid:!1,error:`Invalid error code message for JSON-RPC: ${t.error.code}`}}return{valid:!0}}function Sv(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var Js={};An(Js,{isNodeJs:()=>fY});var uY=wr(LO());ko(Js,wr(LO()));var fY=uY.isNode;ko(Wi,Js);function Rv(t=3){let e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Tv(t=6){return BigInt(Rv(t))}function al(t,e,r){return{id:r||Rv(),jsonrpc:"2.0",method:t,params:e}}function td(t,e){return{id:t,jsonrpc:"2.0",result:e}}function vu(t,e,r){return{id:t,jsonrpc:"2.0",error:dY(e,r)}}function dY(t,e){return typeof t>"u"?x6(E6):(typeof t=="string"&&(t=Object.assign(Object.assign({},x6(Iv)),{message:t})),typeof e<"u"&&(t.data=e),C6(t.code)&&(t=I6(t.code)),t)}function MTe(t){return t.includes("*")?D6(t):!/\W/g.test(t)}function S6(t){return t==="*"}function D6(t){return S6(t)?!0:!(!t.includes("*")||t.split("*").length!==2||t.split("*").filter(e=>e.trim()==="").length!==1)}function PTe(t){return!S6(t)&&D6(t)&&!t.split("*")[0].trim()}function kTe(t){return!S6(t)&&D6(t)&&!t.split("*")[1].trim()}var c0=class{};var FO=class extends c0{constructor(e){super()}},R6=class extends c0{constructor(){super()}},Nv=class extends R6{constructor(e){super()}};var LTe="^https?:",FTe="^wss?:";function BTe(t){let e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function hY(t,e){let r=BTe(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function T6(t){return hY(t,LTe)}function N6(t){return hY(t,FTe)}function BO(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function UO(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function l0(t){return UO(t)&&"method"in t}function rd(t){return UO(t)&&(Da(t)||Ys(t))}function Da(t){return"result"in t}function Ys(t){return"error"in t}function UTe(t){return"error"in t&&t.valid===!1}var Go=class extends Nv{constructor(e){super(e),this.events=new pY.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(){return y(this,arguments,function*(e=this.connection){yield this.open(e)})}disconnect(){return y(this,null,function*(){yield this.close()})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}request(e,r){return y(this,null,function*(){return this.requestStrict(al(e.method,e.params||[],e.id||Tv().toString()),r)})}requestStrict(e,r){return y(this,null,function*(){return new Promise((n,i)=>y(this,null,function*(){if(!this.connection.connected)try{yield this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{Ys(s)?i(s.error):n(s.result)});try{yield this.connection.send(e,r)}catch(s){i(s)}}))})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),rd(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(){return y(this,arguments,function*(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(yield this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),yield this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))})}close(){return y(this,null,function*(){yield 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)}};var vY=wr(Gs());var jTe=()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:gY(),HTe=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",yY=t=>t.split("?")[0],wY=10,VTe=jTe(),O6=class{constructor(e){if(this.url=e,this.events=new vY.EventEmitter,this.registering=!1,!N6(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}open(){return y(this,arguments,function*(e=this.url){yield this.register(e)})}close(){return y(this,null,function*(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})})}send(e){return y(this,null,function*(){typeof this.socket>"u"&&(this.socket=yield this.register());try{this.socket.send(Sa(e))}catch(r){this.onError(e.id,r)}})}register(e=this.url){if(!N6(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{let i=new URLSearchParams(e).get("origin"),s=(0,Wi.isReactNative)()?{headers:{origin:i}}:{rejectUnauthorized:!BO(e)},o=new VTe(e,[],s);HTe()?o.onerror=a=>{let c=a;n(this.emitError(c.error))}:o.on("error",a=>{n(this.emitError(a))}),o.onopen=()=>{this.onOpen(o),r(o)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),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 r=typeof e.data=="string"?il(e.data):e.data;this.events.emit("payload",r)}onError(e,r){let n=this.parseError(r),i=n.message||n.toString(),s=vu(e,i);this.events.emit("payload",s)}parseError(e,r=this.url){return Sv(e,yY(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>wY&&this.events.setMaxListeners(wY)}emitError(e){let r=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${yY(this.url)}`));return this.events.emit("register_error",r),r}};var EQ=wr(eQ()),_Q=wr(rQ());function bOe(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function h(_){if(_ instanceof Uint8Array||(ArrayBuffer.isView(_)?_=new Uint8Array(_.buffer,_.byteOffset,_.byteLength):Array.isArray(_)&&(_=Uint8Array.from(_))),!(_ instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(_.length===0)return"";for(var C=0,A=0,R=0,L=_.length;R!==L&&_[R]===0;)R++,C++;for(var U=(L-R)*d+1>>>0,V=new Uint8Array(U);R!==L;){for(var Q=_[R],Y=0,k=U-1;(Q!==0||Y<A)&&k!==-1;k--,Y++)Q+=256*V[k]>>>0,V[k]=Q%a>>>0,Q=Q/a>>>0;if(Q!==0)throw new Error("Non-zero carry");A=Y,R++}for(var q=U-A;q!==U&&V[q]===0;)q++;for(var ie=c.repeat(C);q<U;++q)ie+=t.charAt(V[q]);return ie}function m(_){if(typeof _!="string")throw new TypeError("Expected String");if(_.length===0)return new Uint8Array;var C=0;if(_[C]!==" "){for(var A=0,R=0;_[C]===c;)A++,C++;for(var L=(_.length-C)*u+1>>>0,U=new Uint8Array(L);_[C];){var V=r[_.charCodeAt(C)];if(V===255)return;for(var Q=0,Y=L-1;(V!==0||Q<R)&&Y!==-1;Y--,Q++)V+=a*U[Y]>>>0,U[Y]=V%256>>>0,V=V/256>>>0;if(V!==0)throw new Error("Non-zero carry");R=Q,C++}if(_[C]!==" "){for(var k=L-R;k!==L&&U[k]===0;)k++;for(var q=new Uint8Array(A+(L-k)),ie=A;k!==L;)q[ie++]=U[k++];return q}}}function w(_){var C=m(_);if(C)return C;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:w}}var EOe=bOe,_Oe=EOe,CQ=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},COe=t=>new TextEncoder().encode(t),xOe=t=>new TextDecoder().decode(t),r9=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},n9=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){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))}else throw Error("Can only multibase decode strings")}or(e){return xQ(this,e)}},i9=class{constructor(e){this.decoders=e}or(e){return xQ(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},xQ=(t,e)=>new i9(B(B({},t.decoders||{[t.prefix]:t}),e.decoders||{[e.prefix]:e})),s9=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new r9(e,r,n),this.decoder=new n9(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},q6=({name:t,prefix:e,encode:r,decode:n})=>new s9(t,e,r,n),Uv=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=_Oe(r,e);return q6({prefix:t,name:e,encode:n,decode:s=>CQ(i(s))})},IOe=(t,e,r,n)=>{let i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let s=t.length;for(;t[s-1]==="=";)--s;let o=new Uint8Array(s*r/8|0),a=0,c=0,u=0;for(let d=0;d<s;++d){let h=i[t[d]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|h,a+=r,a>=8&&(a-=8,o[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},AOe=(t,e,r)=>{let n=e[e.length-1]==="=",i=(1<<r)-1,s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},hs=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>q6({prefix:e,name:t,encode(i){return AOe(i,n,r)},decode(i){return IOe(i,n,r,t)}}),SOe=q6({prefix:"\0",name:"identity",encode:t=>xOe(t),decode:t=>COe(t)}),DOe=Object.freeze({__proto__:null,identity:SOe}),ROe=hs({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),TOe=Object.freeze({__proto__:null,base2:ROe}),NOe=hs({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),OOe=Object.freeze({__proto__:null,base8:NOe}),MOe=Uv({prefix:"9",name:"base10",alphabet:"0123456789"}),POe=Object.freeze({__proto__:null,base10:MOe}),kOe=hs({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),LOe=hs({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),FOe=Object.freeze({__proto__:null,base16:kOe,base16upper:LOe}),BOe=hs({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),UOe=hs({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),jOe=hs({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),HOe=hs({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),VOe=hs({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),$Oe=hs({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),qOe=hs({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),WOe=hs({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zOe=hs({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),GOe=Object.freeze({__proto__:null,base32:BOe,base32upper:UOe,base32pad:jOe,base32padupper:HOe,base32hex:VOe,base32hexupper:$Oe,base32hexpad:qOe,base32hexpadupper:WOe,base32z:zOe}),ZOe=Uv({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),KOe=Uv({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),JOe=Object.freeze({__proto__:null,base36:ZOe,base36upper:KOe}),YOe=Uv({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),QOe=Uv({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),XOe=Object.freeze({__proto__:null,base58btc:YOe,base58flickr:QOe}),e9e=hs({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),t9e=hs({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),r9e=hs({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),n9e=hs({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),i9e=Object.freeze({__proto__:null,base64:e9e,base64pad:t9e,base64url:r9e,base64urlpad:n9e}),IQ=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),s9e=IQ.reduce((t,e,r)=>(t[r]=e,t),[]),o9e=IQ.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function a9e(t){return t.reduce((e,r)=>(e+=s9e[r],e),"")}function c9e(t){let e=[];for(let r of t){let n=o9e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}var l9e=q6({prefix:"\u{1F680}",name:"base256emoji",encode:a9e,decode:c9e}),u9e=Object.freeze({__proto__:null,base256emoji:l9e}),f9e=AQ,nQ=128,d9e=127,h9e=~d9e,p9e=Math.pow(2,31);function AQ(t,e,r){e=e||[],r=r||0;for(var n=r;t>=p9e;)e[r++]=t&255|nQ,t/=128;for(;t&h9e;)e[r++]=t&255|nQ,t>>>=7;return e[r]=t|0,AQ.bytes=r-n+1,e}var m9e=o9,g9e=128,iQ=127;function o9(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw o9.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&iQ)<<i:(o&iQ)*Math.pow(2,i),i+=7}while(o>=g9e);return o9.bytes=s-n,r}var y9e=Math.pow(2,7),w9e=Math.pow(2,14),v9e=Math.pow(2,21),b9e=Math.pow(2,28),E9e=Math.pow(2,35),_9e=Math.pow(2,42),C9e=Math.pow(2,49),x9e=Math.pow(2,56),I9e=Math.pow(2,63),A9e=function(t){return t<y9e?1:t<w9e?2:t<v9e?3:t<b9e?4:t<E9e?5:t<_9e?6:t<C9e?7:t<x9e?8:t<I9e?9:10},S9e={encode:f9e,decode:m9e,encodingLength:A9e},SQ=S9e,sQ=(t,e,r=0)=>(SQ.encode(t,e,r),e),oQ=t=>SQ.encodingLength(t),a9=(t,e)=>{let r=e.byteLength,n=oQ(t),i=n+oQ(r),s=new Uint8Array(i+r);return sQ(t,s,0),sQ(r,s,n),s.set(e,i),new c9(t,r,e,s)},c9=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}},DQ=({name:t,code:e,encode:r})=>new l9(t,e,r),l9=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?a9(this.code,r):r.then(n=>a9(this.code,n))}else throw Error("Unknown type, must be binary type")}},RQ=t=>e=>y(void 0,null,function*(){return new Uint8Array(yield crypto.subtle.digest(t,e))}),D9e=DQ({name:"sha2-256",code:18,encode:RQ("SHA-256")}),R9e=DQ({name:"sha2-512",code:19,encode:RQ("SHA-512")}),T9e=Object.freeze({__proto__:null,sha256:D9e,sha512:R9e}),TQ=0,N9e="identity",NQ=CQ,O9e=t=>a9(TQ,NQ(t)),M9e={code:TQ,name:N9e,encode:NQ,digest:O9e},P9e=Object.freeze({__proto__:null,identity:M9e});new TextEncoder,new TextDecoder;var aQ=B(B(B(B(B(B(B(B(B(B({},DOe),TOe),OOe),POe),FOe),GOe),JOe),XOe),i9e),u9e);B(B({},T9e),P9e);function OQ(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function k9e(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?OQ(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function MQ(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}var cQ=MQ("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),XO=MQ("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=k9e(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),L9e=B({utf8:cQ,"utf-8":cQ,hex:aQ.base16,latin1:XO,ascii:XO,binary:XO},aQ);function F9e(t,e="utf8"){let r=L9e[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?OQ(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}var PQ="wc",B9e=2,x9="core",sd=`${PQ}@2:${x9}:`,U9e={name:x9,logger:"error"},j9e={database:":memory:"},H9e="crypto",lQ="client_ed25519_seed",V9e=mr.ONE_DAY,$9e="keychain",q9e="0.3",W9e="messages",z9e="0.3",G9e=mr.SIX_HOURS,Z9e="publisher",I9="irn",K9e="error",kQ="wss://relay.walletconnect.com",uQ="wss://relay.walletconnect.org",J9e="relayer",ds={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},Y9e="_subscription",_u={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Q9e=mr.ONE_SECOND;var X9e="2.11.1",eMe=1e4,tMe="0.3",rMe="WALLETCONNECT_CLIENT_ID",fc={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"};var nMe="subscription",iMe="0.3",sMe=mr.FIVE_SECONDS*1e3,oMe="pairing",aMe="0.3";var Fv={wc_pairingDelete:{req:{ttl:mr.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:mr.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:mr.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:mr.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:mr.ONE_DAY,prompt:!1,tag:0},res:{ttl:mr.ONE_DAY,prompt:!1,tag:0}}},h0={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},ll={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},cMe="history",lMe="0.3",uMe="expirer",Zo={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},fMe="0.3";var e9="verify-api",tp="https://verify.walletconnect.com",u9="https://verify.walletconnect.org",dMe=[tp,u9],hMe="echo",pMe="https://echo.walletconnect.com",f9=class{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=$9e,this.version=q9e,this.initialized=!1,this.storagePrefix=sd,this.init=()=>y(this,null,function*(){if(!this.initialized){let n=yield this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}}),this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=(n,i)=>y(this,null,function*(){this.isInitialized(),this.keychain.set(n,i),yield this.persist()}),this.get=n=>{this.isInitialized();let i=this.keychain.get(n);if(typeof i>"u"){let{message:s}=Ne("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i},this.del=n=>y(this,null,function*(){this.isInitialized(),this.keychain.delete(n),yield this.persist()}),this.core=e,this.logger=(0,br.generateChildLogger)(r,this.name)}get context(){return(0,br.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){return y(this,null,function*(){yield this.core.storage.setItem(this.storageKey,BN(e))})}getKeyChain(){return y(this,null,function*(){let e=yield this.core.storage.getItem(this.storageKey);return typeof e<"u"?UN(e):void 0})}persist(){return y(this,null,function*(){yield this.setKeyChain(this.keychain)})}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}},d9=class{constructor(e,r,n){this.core=e,this.logger=r,this.name=H9e,this.initialized=!1,this.init=()=>y(this,null,function*(){this.initialized||(yield this.keychain.init(),this.initialized=!0)}),this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=()=>y(this,null,function*(){this.isInitialized();let i=yield this.getClientSeed(),s=TO(i);return b6(s.publicKey)}),this.generateKeyPair=()=>{this.isInitialized();let i=oK();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=i=>y(this,null,function*(){this.isInitialized();let s=yield this.getClientSeed(),o=TO(s),a=GC();return yield KJ(a,i,V9e,o)}),this.generateSharedKey=(i,s,o)=>{this.isInitialized();let a=this.getPrivateKey(i),c=aK(a,s);return this.setSymKey(c,o)},this.setSymKey=(i,s)=>y(this,null,function*(){this.isInitialized();let o=s||cK(i);return yield this.keychain.set(o,i),o}),this.deleteKeyPair=i=>y(this,null,function*(){this.isInitialized(),yield this.keychain.del(i)}),this.deleteSymKey=i=>y(this,null,function*(){this.isInitialized(),yield this.keychain.del(i)}),this.encode=(i,s,o)=>y(this,null,function*(){this.isInitialized();let a=LN(o),c=Sa(s);if(FN(a)){let m=a.senderPublicKey,w=a.receiverPublicKey;i=yield this.generateSharedKey(m,w)}let u=this.getSymKey(i),{type:d,senderPublicKey:h}=a;return lK({type:d,symKey:u,message:c,senderPublicKey:h})}),this.decode=(i,s,o)=>y(this,null,function*(){this.isInitialized();let a=fK(s,o);if(FN(a)){let c=a.receiverPublicKey,u=a.senderPublicKey;i=yield this.generateSharedKey(c,u)}try{let c=this.getSymKey(i),u=uK({symKey:c,encoded:s});return il(u)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${yield this.getClientId()}'`),this.logger.error(c)}}),this.getPayloadType=i=>{let s=cv(i);return Kg(s.type)},this.getPayloadSenderPublicKey=i=>{let s=cv(i);return s.senderPublicKey?Mi(s.senderPublicKey,As):void 0},this.core=e,this.logger=(0,br.generateChildLogger)(r,this.name),this.keychain=n||new f9(this.core,this.logger)}get context(){return(0,br.getLoggerContext)(this.logger)}setPrivateKey(e,r){return y(this,null,function*(){return yield this.keychain.set(e,r),e})}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){return y(this,null,function*(){let e="";try{e=this.keychain.get(lQ)}catch{e=GC(),yield this.keychain.set(lQ,e)}return F9e(e,"base16")})}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}},h9=class extends l6{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=W9e,this.version=z9e,this.initialized=!1,this.storagePrefix=sd,this.init=()=>y(this,null,function*(){if(!this.initialized){this.logger.trace("Initialized");try{let n=yield this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),this.set=(n,i)=>y(this,null,function*(){this.isInitialized();let s=Zf(i),o=this.messages.get(n);return typeof o>"u"&&(o={}),typeof o[s]<"u"||(o[s]=i,this.messages.set(n,o),yield this.persist()),s}),this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();let s=this.get(n),o=Zf(i);return typeof s[o]<"u"},this.del=n=>y(this,null,function*(){this.isInitialized(),this.messages.delete(n),yield this.persist()}),this.logger=(0,br.generateChildLogger)(e,this.name),this.core=r}get context(){return(0,br.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){return y(this,null,function*(){yield this.core.storage.setItem(this.storageKey,BN(e))})}getRelayerMessages(){return y(this,null,function*(){let e=yield this.core.storage.getItem(this.storageKey);return typeof e<"u"?UN(e):void 0})}persist(){return y(this,null,function*(){yield this.setRelayerMessages(this.messages)})}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}},p9=class extends u6{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new Cu.EventEmitter,this.name=Z9e,this.queue=new Map,this.publishTimeout=(0,mr.toMiliseconds)(mr.TEN_SECONDS*2),this.needsTransportRestart=!1,this.publish=(n,i,s)=>y(this,null,function*(){var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});try{let a=s?.ttl||G9e,c=YC(s),u=s?.prompt||!1,d=s?.tag||0,h=s?.id||Tv().toString(),m={topic:n,message:i,opts:{ttl:a,relay:c,prompt:u,tag:d,id:h}},w=setTimeout(()=>this.queue.set(h,m),this.publishTimeout);try{yield yield Jg(this.rpcPublish(n,i,a,c,u,d,h),this.publishTimeout,`Failed to publish payload, please try again. id:${h} tag:${d}`),this.removeRequestFromQueue(h),this.relayer.events.emit(ds.publish,m)}catch(_){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(o=s?.internal)!=null&&o.throwOnFailedPublish)throw this.removeRequestFromQueue(h),_;return}finally{clearTimeout(w)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}})}catch(a){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(a),a}}),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=(0,br.generateChildLogger)(r,this.name),this.registerEventListeners()}get context(){return(0,br.getLoggerContext)(this.logger)}rpcPublish(e,r,n,i,s,o,a){var c,u,d,h;let m={method:uv(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:s,tag:o},id:a};return fs((c=m.params)==null?void 0:c.prompt)&&((u=m.params)==null||delete u.prompt),fs((d=m.params)==null?void 0:d.tag)&&((h=m.params)==null||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:m}),this.relayer.request(m)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(e=>y(this,null,function*(){let{topic:r,message:n,opts:i}=e;yield this.publish(r,n,i)}))}registerEventListeners(){this.relayer.core.heartbeat.on(np.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(ds.connection_stalled);return}this.checkQueue()}),this.relayer.on(ds.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},m9=class{constructor(){this.map=new Map,this.set=(e,r)=>{let n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])},this.get=e=>this.map.get(e)||[],this.exists=(e,r)=>this.get(e).includes(r),this.delete=(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;let n=this.get(e);if(!this.exists(e,r))return;let i=n.filter(s=>s!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}},mMe=Object.defineProperty,gMe=Object.defineProperties,yMe=Object.getOwnPropertyDescriptors,fQ=Object.getOwnPropertySymbols,wMe=Object.prototype.hasOwnProperty,vMe=Object.prototype.propertyIsEnumerable,dQ=(t,e,r)=>e in t?mMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Bv=(t,e)=>{for(var r in e||(e={}))wMe.call(e,r)&&dQ(t,r,e[r]);if(fQ)for(var r of fQ(e))vMe.call(e,r)&&dQ(t,r,e[r]);return t},t9=(t,e)=>gMe(t,yMe(e)),g9=class extends h6{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new m9,this.events=new Cu.EventEmitter,this.name=nMe,this.version=iMe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=sd,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=()=>y(this,null,function*(){this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=yield this.relayer.core.crypto.getClientId())}),this.subscribe=(n,i)=>y(this,null,function*(){yield this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{let s=YC(i),o={topic:n,relay:s};this.pending.set(n,o);let a=yield this.rpcSubscribe(n,s);return this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}}),this.unsubscribe=(n,i)=>y(this,null,function*(){yield this.restartToComplete(),this.isInitialized(),typeof i?.id<"u"?yield this.unsubscribeById(n,i.id,i):yield this.unsubscribeByTopic(n,i)}),this.isSubscribed=n=>y(this,null,function*(){if(this.topics.includes(n))return!0;let i=`${this.pendingSubscriptionWatchLabel}_${n}`;return yield new Promise((s,o)=>{let a=new mr.Watch;a.start(i);let c=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(c),a.stop(i),s(!0)),a.elapsed(i)>=sMe&&(clearInterval(c),a.stop(i),o(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)}),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=()=>y(this,null,function*(){this.restartInProgress=!0,yield this.restore(),yield this.reset(),this.restartInProgress=!1}),this.relayer=e,this.logger=(0,br.generateChildLogger)(r,this.name),this.clientId=""}get context(){return(0,br.getLoggerContext)(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,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,r){return y(this,null,function*(){let n=this.topicMap.get(e);yield Promise.all(n.map(i=>y(this,null,function*(){return yield this.unsubscribeById(e,i,r)})))})}unsubscribeById(e,r,n){return y(this,null,function*(){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{let i=YC(n);yield this.rpcUnsubscribe(e,r,i);let s=Xr("USER_DISCONNECTED",`${this.name}, ${e}`);yield this.onUnsubscribe(e,r,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}})}rpcSubscribe(e,r){return y(this,null,function*(){let n={method:uv(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{yield yield Jg(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(ds.connection_stalled)}return Zf(e+this.clientId)})}rpcBatchSubscribe(e){return y(this,null,function*(){if(!e.length)return;let r=e[0].relay,n={method:uv(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return yield yield Jg(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(ds.connection_stalled)}})}rpcUnsubscribe(e,r,n){let i={method:uv(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,t9(Bv({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,Bv({},r)),this.pending.delete(r.topic)})}onUnsubscribe(e,r,n){return y(this,null,function*(){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),yield this.relayer.messages.del(e)})}setRelayerSubscriptions(e){return y(this,null,function*(){yield this.relayer.core.storage.setItem(this.storageKey,e)})}getRelayerSubscriptions(){return y(this,null,function*(){return yield this.relayer.core.storage.getItem(this.storageKey)})}setSubscription(e,r){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r))}addSubscription(e,r){this.subscriptions.set(e,Bv({},r)),this.topicMap.set(r.topic,e),this.events.emit(fc.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});let r=this.subscriptions.get(e);if(!r){let{message:n}=Ne("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});let n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(fc.deleted,t9(Bv({},n),{reason:r}))}persist(){return y(this,null,function*(){yield this.setRelayerSubscriptions(this.values),this.events.emit(fc.sync)})}reset(){return y(this,null,function*(){if(this.cached.length){let e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){let n=this.cached.splice(0,this.batchSubscribeTopicsLimit);yield this.batchSubscribe(n)}}this.events.emit(fc.resubscribed)})}restore(){return y(this,null,function*(){try{let e=yield this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){let{message:r}=Ne("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}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)}})}batchSubscribe(e){return y(this,null,function*(){if(!e.length)return;let r=yield this.rpcBatchSubscribe(e);zo(r)&&this.onBatchSubscribe(r.map((n,i)=>t9(Bv({},e[i]),{id:n})))})}onConnect(){return y(this,null,function*(){this.restartInProgress||(yield this.restart(),this.onEnable())})}onDisconnect(){this.onDisable()}checkPending(){return y(this,null,function*(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;let e=[];this.pending.forEach(r=>{e.push(r)}),yield this.batchSubscribe(e)})}registerEventListeners(){this.relayer.core.heartbeat.on(np.HEARTBEAT_EVENTS.pulse,()=>y(this,null,function*(){yield this.checkPending()})),this.relayer.on(ds.connect,()=>y(this,null,function*(){yield this.onConnect()})),this.relayer.on(ds.disconnect,()=>{this.onDisconnect()}),this.events.on(fc.created,e=>y(this,null,function*(){let r=fc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),yield this.persist()})),this.events.on(fc.deleted,e=>y(this,null,function*(){let r=fc.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),yield this.persist()}))}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){return y(this,null,function*(){this.restartInProgress&&(yield new Promise(e=>{let r=setInterval(()=>{this.restartInProgress||(clearInterval(r),e())},this.pollingInterval)}))})}},bMe=Object.defineProperty,hQ=Object.getOwnPropertySymbols,EMe=Object.prototype.hasOwnProperty,_Me=Object.prototype.propertyIsEnumerable,pQ=(t,e,r)=>e in t?bMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,CMe=(t,e)=>{for(var r in e||(e={}))EMe.call(e,r)&&pQ(t,r,e[r]);if(hQ)for(var r of hQ(e))_Me.call(e,r)&&pQ(t,r,e[r]);return t},y9=class extends f6{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Cu.EventEmitter,this.name=J9e,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=r=>y(this,null,function*(){this.logger.debug("Publishing Request Payload");let n=r.id,i=this.provider.request(r);this.requestsInFlight.set(n,{promise:i,request:r});try{return yield this.toEstablishConnection(),yield i}catch(s){throw this.logger.debug("Failed to Publish Request"),this.logger.error(s),s}finally{this.requestsInFlight.delete(n)}}),this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(ds.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(ds.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(_u.payload,this.onPayloadHandler),this.provider.on(_u.connect,this.onConnectHandler),this.provider.on(_u.disconnect,this.onDisconnectHandler),this.provider.on(_u.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?(0,br.generateChildLogger)(e.logger,this.name):(0,br.pino)((0,br.getDefaultLoggerOptions)({level:e.logger||K9e})),this.messages=new h9(this.logger,e.core),this.subscriber=new g9(this,this.logger),this.publisher=new p9(this,this.logger),this.relayUrl=e?.relayUrl||kQ,this.projectId=e.projectId,this.bundleId=dK(),this.provider={}}init(){return y(this,null,function*(){this.logger.trace("Initialized"),this.registerEventListeners(),yield this.createProvider(),yield Promise.all([this.messages.init(),this.subscriber.init()]);try{yield this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${uQ}...`),yield this.restartTransport(uQ)}this.initialized=!0,setTimeout(()=>y(this,null,function*(){this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),yield this.transportClose(),this.transportExplicitlyClosed=!1)}),eMe)})}get context(){return(0,br.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,r,n){return y(this,null,function*(){this.isInitialized(),yield this.publisher.publish(e,r,n),yield this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})})}subscribe(e,r){return y(this,null,function*(){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"";if(i)return i;let s,o=a=>{a.topic===e&&(this.subscriber.off(fc.created,o),s())};return yield Promise.all([new Promise(a=>{s=a,this.subscriber.on(fc.created,o)}),new Promise(a=>y(this,null,function*(){i=yield this.subscriber.subscribe(e,r),a()}))]),i})}unsubscribe(e,r){return y(this,null,function*(){this.isInitialized(),yield this.subscriber.unsubscribe(e,r)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}transportClose(){return y(this,null,function*(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach(e=>y(this,null,function*(){yield e.promise}))),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?yield Jg(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&(yield this.provider.disconnect())})}transportOpen(e){return y(this,null,function*(){if(this.transportExplicitlyClosed=!1,yield this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,yield this.transportClose(),yield this.createProvider()),this.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(r=>{if(!this.initialized)return r();this.subscriber.once(fc.resubscribed,()=>{r()})}),new Promise((r,n)=>y(this,null,function*(){try{yield Jg(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(i){n(i);return}r()}))])}catch(r){this.logger.error(r);let n=r;if(!this.isConnectionStalled(n.message))throw r;this.provider.events.emit(_u.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}})}restartTransport(e){return y(this,null,function*(){yield this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,yield this.transportClose(),yield this.createProvider(),yield this.transportOpen())})}confirmOnlineStateOrThrow(){return y(this,null,function*(){if(!(yield WN()))throw new Error("No internet connection detected. Please restart your network and try again.")})}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}createProvider(){return y(this,null,function*(){this.provider.connection&&this.unregisterProviderListeners();let e=yield this.core.crypto.signJWT(this.relayUrl);this.provider=new Go(new O6(pK({sdkVersion:X9e,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()})}recordMessageEvent(e){return y(this,null,function*(){let{topic:r,message:n}=e;yield this.messages.set(r,n)})}shouldIgnoreMessageEvent(e){return y(this,null,function*(){let{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!(yield this.subscriber.isSubscribed(r)))return this.logger.debug(`Ignoring message for non-subscribed topic ${r}`),!0;let i=this.messages.has(r,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i})}onProviderPayload(e){return y(this,null,function*(){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),l0(e)){if(!e.method.endsWith(Y9e))return;let r=e.params,{topic:n,message:i,publishedAt:s}=r.data,o={topic:n,message:i,publishedAt:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(CMe({type:"event",event:r.id},o)),this.events.emit(r.id,o),yield this.acknowledgePayload(e),yield this.onMessageEvent(o)}else rd(e)&&this.events.emit(ds.message_ack,e)})}onMessageEvent(e){return y(this,null,function*(){(yield this.shouldIgnoreMessageEvent(e))||(this.events.emit(ds.message,e),yield this.recordMessageEvent(e))})}acknowledgePayload(e){return y(this,null,function*(){let r=td(e.id,!0);yield this.provider.connection.send(r)})}unregisterProviderListeners(){this.provider.off(_u.payload,this.onPayloadHandler),this.provider.off(_u.connect,this.onConnectHandler),this.provider.off(_u.disconnect,this.onDisconnectHandler),this.provider.off(_u.error,this.onProviderErrorHandler)}registerEventListeners(){return y(this,null,function*(){this.events.on(ds.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let e=yield WN();FK(r=>y(this,null,function*(){this.initialized&&e!==r&&(e=r,r?yield this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,yield this.transportClose().catch(n=>this.logger.error(n))))}))})}onProviderDisconnect(){this.events.emit(ds.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(()=>y(this,null,function*(){yield this.restartTransport().catch(e=>this.logger.error(e))}),(0,mr.toMiliseconds)(Q9e)))}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){return y(this,null,function*(){if(yield this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return yield new Promise(e=>{let r=setInterval(()=>{this.connected&&(clearInterval(r),e())},this.connectionStatusPollingInterval)});yield this.restartTransport()}})}},xMe=Object.defineProperty,mQ=Object.getOwnPropertySymbols,IMe=Object.prototype.hasOwnProperty,AMe=Object.prototype.propertyIsEnumerable,gQ=(t,e,r)=>e in t?xMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yQ=(t,e)=>{for(var r in e||(e={}))IMe.call(e,r)&&gQ(t,r,e[r]);if(mQ)for(var r of mQ(e))AMe.call(e,r)&&gQ(t,r,e[r]);return t},rp=class extends d6{constructor(e,r,n,i=sd,s=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=tMe,this.cached=[],this.initialized=!1,this.storagePrefix=sd,this.init=()=>y(this,null,function*(){this.initialized||(this.logger.trace("Initialized"),yield this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!fs(o)?this.map.set(this.getKey(o),o):CK(o)?this.map.set(o.id,o):xK(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),this.set=(o,a)=>y(this,null,function*(){this.isInitialized(),this.map.has(o)?yield this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),yield this.persist())}),this.get=o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>(0,EQ.default)(a[c],o[c]))):this.values),this.update=(o,a)=>y(this,null,function*(){this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});let c=yQ(yQ({},this.getData(o)),a);this.map.set(o,c),yield this.persist()}),this.delete=(o,a)=>y(this,null,function*(){this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),yield this.persist())}),this.logger=(0,br.generateChildLogger)(r,this.name),this.storagePrefix=i,this.getKey=s}get context(){return(0,br.getLoggerContext)(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())}setDataStore(e){return y(this,null,function*(){yield this.core.storage.setItem(this.storageKey,e)})}getDataStore(){return y(this,null,function*(){return yield this.core.storage.getItem(this.storageKey)})}getData(e){let r=this.map.get(e);if(!r){let{message:n}=Ne("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}persist(){return y(this,null,function*(){yield this.setDataStore(this.values)})}restore(){return y(this,null,function*(){try{let e=yield this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){let{message:r}=Ne("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}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}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}},w9=class{constructor(e,r){this.core=e,this.logger=r,this.name=oMe,this.version=aMe,this.events=new Cu.default,this.initialized=!1,this.storagePrefix=sd,this.ignoredPayloadTypes=[yu],this.registeredMethods=[],this.init=()=>y(this,null,function*(){this.initialized||(yield this.pairings.init(),yield this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=()=>y(this,null,function*(){this.isInitialized();let n=GC(),i=yield this.core.crypto.setSymKey(n),s=Zs(mr.FIVE_MINUTES),o={protocol:I9},a={topic:i,expiry:s,relay:o,active:!1},c=bK({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:o,expiryTimestamp:s});return yield this.pairings.set(i,a),yield this.core.relayer.subscribe(i),this.core.expirer.set(i,s),{topic:i,uri:c}}),this.pair=n=>y(this,null,function*(){this.isInitialized(),this.isValidPair(n);let{topic:i,symKey:s,relay:o,expiryTimestamp:a}=jN(n.uri),c;if(this.pairings.keys.includes(i)&&(c=this.pairings.get(i),c.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);let u=a||Zs(mr.FIVE_MINUTES),d={topic:i,relay:o,expiry:u,active:!1};return yield this.pairings.set(i,d),this.core.expirer.set(i,u),n.activatePairing&&(yield this.activate({topic:i})),this.events.emit(h0.create,d),this.core.crypto.keychain.has(i)||(yield this.core.crypto.setSymKey(s,i),yield this.core.relayer.subscribe(i,{relay:o})),d}),this.activate=i=>y(this,[i],function*({topic:n}){this.isInitialized();let s=Zs(mr.THIRTY_DAYS);yield this.pairings.update(n,{active:!0,expiry:s}),this.core.expirer.set(n,s)}),this.ping=n=>y(this,null,function*(){this.isInitialized(),yield this.isValidPing(n);let{topic:i}=n;if(this.pairings.keys.includes(i)){let s=yield this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:c}=Jf();this.events.once(Zn("pairing_ping",s),({error:u})=>{u?c(u):a()}),yield o()}}),this.updateExpiry=s=>y(this,[s],function*({topic:n,expiry:i}){this.isInitialized(),yield this.pairings.update(n,{expiry:i})}),this.updateMetadata=s=>y(this,[s],function*({topic:n,metadata:i}){this.isInitialized(),yield this.pairings.update(n,{peerMetadata:i})}),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=n=>y(this,null,function*(){this.isInitialized(),yield this.isValidDisconnect(n);let{topic:i}=n;this.pairings.keys.includes(i)&&(yield this.sendRequest(i,"wc_pairingDelete",Xr("USER_DISCONNECTED")),yield this.deletePairing(i))}),this.sendRequest=(n,i,s)=>y(this,null,function*(){let o=al(i,s),a=yield this.core.crypto.encode(n,o),c=Fv[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id}),this.sendResult=(n,i,s)=>y(this,null,function*(){let o=td(n,s),a=yield this.core.crypto.encode(i,o),c=yield this.core.history.get(i,n),u=Fv[c.request.method].res;yield this.core.relayer.publish(i,a,u),yield this.core.history.resolve(o)}),this.sendError=(n,i,s)=>y(this,null,function*(){let o=vu(n,s),a=yield this.core.crypto.encode(i,o),c=yield this.core.history.get(i,n),u=Fv[c.request.method]?Fv[c.request.method].res:Fv.unregistered_method.res;yield this.core.relayer.publish(i,a,u),yield this.core.history.resolve(o)}),this.deletePairing=(n,i)=>y(this,null,function*(){yield this.core.relayer.unsubscribe(n),yield Promise.all([this.pairings.delete(n,Xr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),this.cleanup=()=>y(this,null,function*(){let n=this.pairings.getAll().filter(i=>nl(i.expiry));yield Promise.all(n.map(i=>this.deletePairing(i.topic)))}),this.onRelayEventRequest=n=>{let{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=n=>y(this,null,function*(){let{topic:i,payload:s}=n,o=(yield this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}}),this.onPairingPingRequest=(n,i)=>y(this,null,function*(){let{id:s}=i;try{this.isValidPing({topic:n}),yield this.sendResult(s,n,!0),this.events.emit(h0.ping,{id:s,topic:n})}catch(o){yield this.sendError(s,n,o),this.logger.error(o)}}),this.onPairingPingResponse=(n,i)=>{let{id:s}=i;setTimeout(()=>{Da(i)?this.events.emit(Zn("pairing_ping",s),{}):Ys(i)&&this.events.emit(Zn("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=(n,i)=>y(this,null,function*(){let{id:s}=i;try{this.isValidDisconnect({topic:n}),yield this.deletePairing(n),this.events.emit(h0.delete,{id:s,topic:n})}catch(o){yield this.sendError(s,n,o),this.logger.error(o)}}),this.onUnknownRpcMethodRequest=(n,i)=>y(this,null,function*(){let{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;let a=Xr("WC_METHOD_UNSUPPORTED",o);yield this.sendError(s,n,a),this.logger.error(a)}catch(a){yield this.sendError(s,n,a),this.logger.error(a)}}),this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(Xr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{var i;if(!Ss(n)){let{message:o}=Ne("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!_K(n.uri)){let{message:o}=Ne("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}let s=jN(n.uri);if(!((i=s?.relay)!=null&&i.protocol)){let{message:o}=Ne("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(o)}if(!(s!=null&&s.symKey)){let{message:o}=Ne("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(o)}if(s!=null&&s.expiryTimestamp&&(0,mr.toMiliseconds)(s?.expiryTimestamp)<Date.now()){let{message:o}=Ne("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(o)}},this.isValidPing=n=>y(this,null,function*(){if(!Ss(n)){let{message:s}=Ne("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}let{topic:i}=n;yield this.isValidPairingTopic(i)}),this.isValidDisconnect=n=>y(this,null,function*(){if(!Ss(n)){let{message:s}=Ne("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}let{topic:i}=n;yield this.isValidPairingTopic(i)}),this.isValidPairingTopic=n=>y(this,null,function*(){if(!Ci(n,!1)){let{message:i}=Ne("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){let{message:i}=Ne("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(nl(this.pairings.get(n).expiry)){yield this.deletePairing(n);let{message:i}=Ne("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=(0,br.generateChildLogger)(r,this.name),this.pairings=new rp(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,br.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(ds.message,e=>y(this,null,function*(){let{topic:r,message:n}=e;if(!this.pairings.keys.includes(r)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;let i=yield this.core.crypto.decode(r,n);try{l0(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):rd(i)&&(yield this.core.history.resolve(i),yield this.onRelayEventResponse({topic:r,payload:i}),this.core.history.delete(r,i.id))}catch(s){this.logger.error(s)}}))}registerExpirerEvents(){this.core.expirer.on(Zo.expired,e=>y(this,null,function*(){let{topic:r}=KC(e.target);r&&this.pairings.keys.includes(r)&&(yield this.deletePairing(r,!0),this.events.emit(h0.expire,{topic:r}))}))}},v9=class extends c6{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new Cu.EventEmitter,this.name=cMe,this.version=lMe,this.cached=[],this.initialized=!1,this.storagePrefix=sd,this.init=()=>y(this,null,function*(){this.initialized||(this.logger.trace("Initialized"),yield this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),this.set=(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;let o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:Zs(mr.THIRTY_DAYS)};this.records.set(o.id,o),this.events.emit(ll.created,o)},this.resolve=n=>y(this,null,function*(){if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;let i=yield this.getRecord(n.id);typeof i.response>"u"&&(i.response=Ys(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(ll.updated,i))}),this.get=(n,i)=>y(this,null,function*(){return this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),yield this.getRecord(i)}),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(ll.deleted,s)}})},this.exists=(n,i)=>y(this,null,function*(){return this.isInitialized(),this.records.has(i)?(yield this.getRecord(i)).topic===n:!1}),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=(0,br.generateChildLogger)(r,this.name)}get context(){return(0,br.getLoggerContext)(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(r=>{if(typeof r.response<"u")return;let n={topic:r.topic,request:al(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}setJsonRpcRecords(e){return y(this,null,function*(){yield this.core.storage.setItem(this.storageKey,e)})}getJsonRpcRecords(){return y(this,null,function*(){return yield this.core.storage.getItem(this.storageKey)})}getRecord(e){this.isInitialized();let r=this.records.get(e);if(!r){let{message:n}=Ne("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}persist(){return y(this,null,function*(){yield this.setJsonRpcRecords(this.values),this.events.emit(ll.sync)})}restore(){return y(this,null,function*(){try{let e=yield this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:r}=Ne("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}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(ll.created,e=>{let r=ll.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(ll.updated,e=>{let r=ll.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(ll.deleted,e=>{let r=ll.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.core.heartbeat.on(np.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{(0,mr.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}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}},b9=class extends p6{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new Cu.EventEmitter,this.name=uMe,this.version=fMe,this.cached=[],this.initialized=!1,this.storagePrefix=sd,this.init=()=>y(this,null,function*(){this.initialized||(this.logger.trace("Initialized"),yield this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),this.has=n=>{try{let i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();let s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(Zo.created,{target:s,expiration:o})},this.get=n=>{this.isInitialized();let i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){let i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Zo.deleted,{target:i,expiration:s})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=(0,br.generateChildLogger)(r,this.name)}get context(){return(0,br.getLoggerContext)(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(typeof e=="string")return gK(e);if(typeof e=="number")return yK(e);let{message:r}=Ne("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}setExpirations(e){return y(this,null,function*(){yield this.core.storage.setItem(this.storageKey,e)})}getExpirations(){return y(this,null,function*(){return yield this.core.storage.getItem(this.storageKey)})}persist(){return y(this,null,function*(){yield this.setExpirations(this.values),this.events.emit(Zo.sync)})}restore(){return y(this,null,function*(){try{let e=yield this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:r}=Ne("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}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 r=this.expirations.get(e);if(!r){let{message:n}=Ne("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(e,r){let{expiry:n}=r;(0,mr.toMiliseconds)(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(Zo.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(np.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Zo.created,e=>{let r=Zo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Zo.expired,e=>{let r=Zo.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Zo.deleted,e=>{let r=Zo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}}},E9=class extends m6{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=e9,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=n=>y(this,null,function*(){if(this.verifyDisabled||Wh()||!Kf())return;let i=this.getVerifyUrl(n?.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{yield this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s)}if(!this.initialized){this.removeIframe(),this.verifyUrl=u9;try{yield this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s),this.verifyDisabled=!0}}}),this.register=n=>y(this,null,function*(){this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),yield this.init())}),this.resolve=n=>y(this,null,function*(){if(this.isDevEnv)return"";let i=this.getVerifyUrl(n?.verifyUrl),s;try{s=yield this.fetchAttestation(n.attestationId,i)}catch(o){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${i}`),this.logger.info(o),s=yield this.fetchAttestation(n.attestationId,u9)}return s}),this.fetchAttestation=(n,i)=>y(this,null,function*(){this.logger.info(`resolving attestation: ${n} from url: ${i}`);let s=this.startAbortTimer(mr.ONE_SECOND*2),o=yield fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(s),o.status===200?yield o.json():void 0}),this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=()=>y(this,null,function*(){let n,i=s=>{s.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",i),n())};yield Promise.race([new Promise(s=>{if(document.getElementById(e9))return s();window.addEventListener("message",i);let o=document.createElement("iframe");o.id=e9,o.src=`${this.verifyUrl}/${this.projectId}`,o.style.display="none",document.body.append(o),this.iframe=o,n=s}),new Promise((s,o)=>setTimeout(()=>{window.removeEventListener("message",i),o("verify iframe load timeout")},(0,mr.toMiliseconds)(mr.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||tp;return dMe.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${tp}`),i=tp),i},this.logger=(0,br.generateChildLogger)(r,this.name),this.verifyUrl=tp,this.abortController=new AbortController,this.isDevEnv=ZC()&&process.env.IS_VITEST}get context(){return(0,br.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,mr.toMiliseconds)(e))}},_9=class extends g6{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.context=hMe,this.registerDeviceToken=n=>y(this,null,function*(){let{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${pMe}/${this.projectId}/clients`;yield(0,_Q.default)(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})}),this.logger=(0,br.generateChildLogger)(r,this.context)}},SMe=Object.defineProperty,wQ=Object.getOwnPropertySymbols,DMe=Object.prototype.hasOwnProperty,RMe=Object.prototype.propertyIsEnumerable,vQ=(t,e,r)=>e in t?SMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,bQ=(t,e)=>{for(var r in e||(e={}))DMe.call(e,r)&&vQ(t,r,e[r]);if(wQ)for(var r of wQ(e))RMe.call(e,r)&&vQ(t,r,e[r]);return t},C9=class t extends a6{constructor(e){super(e),this.protocol=PQ,this.version=B9e,this.name=x9,this.events=new Cu.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||kQ,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";let r=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:(0,br.pino)((0,br.getDefaultLoggerOptions)({level:e?.logger||U9e.logger}));this.logger=(0,br.generateChildLogger)(r,this.name),this.heartbeat=new np.HeartBeat,this.crypto=new d9(this,this.logger,e?.keychain),this.history=new v9(this,this.logger),this.expirer=new b9(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new t6(bQ(bQ({},j9e),e?.storageOptions)),this.relayer=new y9({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new w9(this,this.logger),this.verify=new E9(this.projectId||"",this.logger),this.echoClient=new _9(this.projectId||"",this.logger)}static init(e){return y(this,null,function*(){let r=new t(e);yield r.initialize();let n=yield r.crypto.getClientId();return yield r.storage.setItem(rMe,n),r})}get context(){return(0,br.getLoggerContext)(this.logger)}start(){return y(this,null,function*(){this.initialized||(yield this.initialize())})}initialize(){return y(this,null,function*(){this.logger.trace("Initialized");try{yield this.crypto.init(),yield this.history.init(),yield this.expirer.init(),yield this.relayer.init(),yield this.heartbeat.init(),yield 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}})}},LQ=C9;var od=wr(o6());var G6=wr(Gs()),Lr=wr(Hh());var jQ="wc",HQ=2,VQ="client",O9=`${jQ}@${HQ}:${VQ}:`,A9={name:VQ,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"};var FQ="WALLETCONNECT_DEEPLINK_CHOICE";var TMe="proposal";var M9="Proposal expired",NMe="session",W6=Lr.SEVEN_DAYS,OMe="engine",xu={wc_sessionPropose:{req:{ttl:Lr.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Lr.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Lr.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Lr.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Lr.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Lr.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Lr.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Lr.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Lr.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Lr.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Lr.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Lr.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Lr.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Lr.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Lr.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Lr.THIRTY_SECONDS,prompt:!1,tag:1115}}},S9={min:Lr.FIVE_MINUTES,max:Lr.SEVEN_DAYS},Iu={idle:"IDLE",active:"ACTIVE"},MMe="request",PMe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"],kMe=Object.defineProperty,LMe=Object.defineProperties,FMe=Object.getOwnPropertyDescriptors,BQ=Object.getOwnPropertySymbols,BMe=Object.prototype.hasOwnProperty,UMe=Object.prototype.propertyIsEnumerable,UQ=(t,e,r)=>e in t?kMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qs=(t,e)=>{for(var r in e||(e={}))BMe.call(e,r)&&UQ(t,r,e[r]);if(BQ)for(var r of BQ(e))UMe.call(e,r)&&UQ(t,r,e[r]);return t},p0=(t,e)=>LMe(t,FMe(e)),D9=class extends w6{constructor(e){super(e),this.name=OMe,this.events=new G6.default,this.initialized=!1,this.ignoredPayloadTypes=[yu],this.requestQueue={state:Iu.idle,queue:[]},this.sessionRequestQueue={state:Iu.idle,queue:[]},this.requestQueueDelay=Lr.ONE_SECOND,this.init=()=>y(this,null,function*(){this.initialized||(yield this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(xu)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,Lr.toMiliseconds)(this.requestQueueDelay)))}),this.connect=r=>y(this,null,function*(){yield this.isInitialized();let n=p0(Qs({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});yield this.isValidConnect(n);let{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,relays:c}=n,u=i,d,h=!1;if(u&&(h=this.client.core.pairing.pairings.get(u).active),!u||!h){let{topic:V,uri:Q}=yield this.client.core.pairing.create();u=V,d=Q}let m=yield this.client.core.crypto.generateKeyPair(),w=xu.wc_sessionPropose.req.ttl||Lr.FIVE_MINUTES,_=Zs(w),C=Qs({requiredNamespaces:s,optionalNamespaces:o,relays:c??[{protocol:I9}],proposer:{publicKey:m,metadata:this.client.metadata},expiryTimestamp:_},a&&{sessionProperties:a}),{reject:A,resolve:R,done:L}=Jf(w,M9);if(this.events.once(Zn("session_connect"),Y=>y(this,[Y],function*({error:V,session:Q}){if(V)A(V);else if(Q){Q.self.publicKey=m;let k=p0(Qs({},Q),{requiredNamespaces:C.requiredNamespaces,optionalNamespaces:C.optionalNamespaces});yield this.client.session.set(Q.topic,k),yield this.setExpiry(Q.topic,Q.expiry),u&&(yield this.client.core.pairing.updateMetadata({topic:u,metadata:Q.peer.metadata})),R(k)}})),!u){let{message:V}=Ne("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(V)}let U=yield this.sendRequest({topic:u,method:"wc_sessionPropose",params:C,throwOnFailedPublish:!0});return yield this.setProposal(U,Qs({id:U},C)),{uri:d,approval:L}}),this.pair=r=>y(this,null,function*(){return yield this.isInitialized(),yield this.client.core.pairing.pair(r)}),this.approve=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidApprove(r);let{id:n,relayProtocol:i,namespaces:s,sessionProperties:o}=r,a=this.client.proposal.get(n),{pairingTopic:c,proposer:u,requiredNamespaces:d,optionalNamespaces:h}=a;c=c||"";let m=yield this.client.core.crypto.generateKeyPair(),w=u.publicKey,_=yield this.client.core.crypto.generateSharedKey(m,w);c&&n&&(yield this.client.core.pairing.updateMetadata({topic:c,metadata:u.metadata}),yield this.sendResult({id:n,topic:c,result:{relay:{protocol:i??"irn"},responderPublicKey:m}}),yield this.client.proposal.delete(n,Xr("USER_DISCONNECTED")),yield this.client.core.pairing.activate({topic:c}));let C=Qs({relay:{protocol:i??"irn"},namespaces:s,pairingTopic:c,controller:{publicKey:m,metadata:this.client.metadata},expiry:Zs(W6)},o&&{sessionProperties:o});yield this.client.core.relayer.subscribe(_);let A=p0(Qs({},C),{topic:_,requiredNamespaces:d,optionalNamespaces:h,pairingTopic:c,acknowledged:!1,self:C.controller,peer:{publicKey:u.publicKey,metadata:u.metadata},controller:m});yield this.client.session.set(_,A);try{yield this.sendRequest({topic:_,method:"wc_sessionSettle",params:C,throwOnFailedPublish:!0})}catch(R){throw this.client.logger.error(R),this.client.session.delete(_,Xr("USER_DISCONNECTED")),yield this.client.core.relayer.unsubscribe(_),R}return yield this.setExpiry(_,Zs(W6)),{topic:_,acknowledged:()=>new Promise(R=>setTimeout(()=>R(this.client.session.get(_)),500))}}),this.reject=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidReject(r);let{id:n,reason:i}=r,{pairingTopic:s}=this.client.proposal.get(n);s&&(yield this.sendError(n,s,i),yield this.client.proposal.delete(n,Xr("USER_DISCONNECTED")))}),this.update=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidUpdate(r);let{topic:n,namespaces:i}=r,s=yield this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i}}),{done:o,resolve:a,reject:c}=Jf();return this.events.once(Zn("session_update",s),({error:u})=>{u?c(u):a()}),yield this.client.session.update(n,{namespaces:i}),{acknowledged:o}}),this.extend=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidExtend(r);let{topic:n}=r,i=yield this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:s,resolve:o,reject:a}=Jf();return this.events.once(Zn("session_extend",i),({error:c})=>{c?a(c):o()}),yield this.setExpiry(n,Zs(W6)),{acknowledged:s}}),this.request=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidRequest(r);let{chainId:n,request:i,topic:s,expiry:o=xu.wc_sessionRequest.req.ttl}=r,a=Rv(),{done:c,resolve:u,reject:d}=Jf(o,"Request expired. Please try again.");return this.events.once(Zn("session_request",a),({error:h,result:m})=>{h?d(h):u(m)}),yield Promise.all([new Promise(h=>y(this,null,function*(){yield this.sendRequest({clientRpcId:a,topic:s,method:"wc_sessionRequest",params:{request:p0(Qs({},i),{expiryTimestamp:Zs(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0}).catch(m=>d(m)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:a}),h()})),new Promise(h=>y(this,null,function*(){let m=yield vK(this.client.core.storage,FQ);wK({id:a,topic:s,wcDeepLink:m}),h()})),c()]).then(h=>h[2])}),this.respond=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidRespond(r);let{topic:n,response:i}=r,{id:s}=i;Da(i)?yield this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0}):Ys(i)&&(yield this.sendError(s,n,i.error)),this.cleanupAfterResponse(r)}),this.ping=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidPing(r);let{topic:n}=r;if(this.client.session.keys.includes(n)){let i=yield this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:s,resolve:o,reject:a}=Jf();this.events.once(Zn("session_ping",i),({error:c})=>{c?a(c):o()}),yield s()}else this.client.core.pairing.pairings.keys.includes(n)&&(yield this.client.core.pairing.ping({topic:n}))}),this.emit=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidEmit(r);let{topic:n,event:i,chainId:s}=r;yield this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s}})}),this.disconnect=r=>y(this,null,function*(){yield this.isInitialized(),yield this.isValidDisconnect(r);let{topic:n}=r;if(this.client.session.keys.includes(n))yield this.sendRequest({topic:n,method:"wc_sessionDelete",params:Xr("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))yield this.client.core.pairing.disconnect({topic:n});else{let{message:i}=Ne("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>EK(n,r))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=r=>y(this,null,function*(){if(r.pairingTopic)try{let n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===r.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),yield Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}}),this.deleteSession=r=>y(this,null,function*(){let{topic:n,expirerHasDeleted:i=!1,emitEvent:s=!0,id:o=0}=r,{self:a}=this.client.session.get(n);yield this.client.core.relayer.unsubscribe(n),yield this.client.session.delete(n,Xr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&(yield this.client.core.crypto.deleteKeyPair(a.publicKey)),this.client.core.crypto.keychain.has(n)&&(yield this.client.core.crypto.deleteSymKey(n)),i||this.client.core.expirer.del(n),this.client.core.storage.removeItem(FQ).catch(c=>this.client.logger.warn(c)),this.getPendingSessionRequests().forEach(c=>{c.topic===n&&this.deletePendingSessionRequest(c.id,Xr("USER_DISCONNECTED"))}),s&&this.client.events.emit("session_delete",{id:o,topic:n})}),this.deleteProposal=(r,n)=>y(this,null,function*(){yield Promise.all([this.client.proposal.delete(r,Xr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])}),this.deletePendingSessionRequest=(r,n,i=!1)=>y(this,null,function*(){yield Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==r),i&&(this.sessionRequestQueue.state=Iu.idle,this.client.events.emit("session_request_expire",{id:r}))}),this.setExpiry=(r,n)=>y(this,null,function*(){this.client.session.keys.includes(r)&&(yield this.client.session.update(r,{expiry:n})),this.client.core.expirer.set(r,n)}),this.setProposal=(r,n)=>y(this,null,function*(){yield this.client.proposal.set(r,n),this.client.core.expirer.set(r,Zs(xu.wc_sessionPropose.req.ttl))}),this.setPendingSessionRequest=r=>y(this,null,function*(){let{id:n,topic:i,params:s,verifyContext:o}=r,a=s.request.expiryTimestamp||Zs(xu.wc_sessionRequest.req.ttl);yield this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o}),a&&this.client.core.expirer.set(n,a)}),this.sendRequest=r=>y(this,null,function*(){let{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:u}=r,d=al(i,s,c);if(Kf()&&PMe.includes(i)){let w=Zf(JSON.stringify(d));this.client.core.verify.register({attestationId:w})}let h=yield this.client.core.crypto.encode(n,d),m=xu[i].req;return o&&(m.ttl=o),a&&(m.id=a),this.client.core.history.set(n,d),u?(m.internal=p0(Qs({},m.internal),{throwOnFailedPublish:!0}),yield this.client.core.relayer.publish(n,h,m)):this.client.core.relayer.publish(n,h,m).catch(w=>this.client.logger.error(w)),d.id}),this.sendResult=r=>y(this,null,function*(){let{id:n,topic:i,result:s,throwOnFailedPublish:o}=r,a=td(n,s),c=yield this.client.core.crypto.encode(i,a),u=yield this.client.core.history.get(i,n),d=xu[u.request.method].res;o?(d.internal=p0(Qs({},d.internal),{throwOnFailedPublish:!0}),yield this.client.core.relayer.publish(i,c,d)):this.client.core.relayer.publish(i,c,d).catch(h=>this.client.logger.error(h)),yield this.client.core.history.resolve(a)}),this.sendError=(r,n,i)=>y(this,null,function*(){let s=vu(r,i),o=yield this.client.core.crypto.encode(n,s),a=yield this.client.core.history.get(n,r),c=xu[a.request.method].res;this.client.core.relayer.publish(n,o,c),yield this.client.core.history.resolve(s)}),this.cleanup=()=>y(this,null,function*(){let r=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;nl(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{nl(i.expiryTimestamp)&&n.push(i.id)}),yield Promise.all([...r.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),this.onRelayEventRequest=r=>y(this,null,function*(){this.requestQueue.queue.push(r),yield this.processRequestsQueue()}),this.processRequestsQueue=()=>y(this,null,function*(){if(this.requestQueue.state===Iu.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=Iu.active;let r=this.requestQueue.queue.shift();if(r)try{this.processRequest(r),yield new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=Iu.idle}),this.processRequest=r=>{let{topic:n,payload:i}=r,s=i.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=r=>y(this,null,function*(){let{topic:n,payload:i}=r,s=(yield this.client.core.history.get(n,i.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${s}`)}}),this.onRelayEventUnknownPayload=r=>{let{topic:n}=r,{message:i}=Ne("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.onSessionProposeRequest=(r,n)=>y(this,null,function*(){let{params:i,id:s}=n;try{this.isValidConnect(Qs({},n.params));let o=i.expiryTimestamp||Zs(xu.wc_sessionPropose.req.ttl),a=Qs({id:s,pairingTopic:r,expiryTimestamp:o},i);yield this.setProposal(s,a);let c=Zf(JSON.stringify(n)),u=yield this.getVerifyContext(c,a.proposer.metadata);this.client.events.emit("session_proposal",{id:s,params:a,verifyContext:u})}catch(o){yield this.sendError(s,r,o),this.client.logger.error(o)}}),this.onSessionProposeResponse=(r,n)=>y(this,null,function*(){let{id:i}=n;if(Da(n)){let{result:s}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});let o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});let a=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});let c=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:c});let u=yield this.client.core.crypto.generateSharedKey(a,c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});let d=yield this.client.core.relayer.subscribe(u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:d}),yield this.client.core.pairing.activate({topic:r})}else Ys(n)&&(yield this.client.proposal.delete(i,Xr("USER_DISCONNECTED")),this.events.emit(Zn("session_connect"),{error:n.error}))}),this.onSessionSettleRequest=(r,n)=>y(this,null,function*(){let{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);let{relay:o,controller:a,expiry:c,namespaces:u,sessionProperties:d,pairingTopic:h}=n.params,m=Qs({topic:r,relay:o,expiry:c,namespaces:u,acknowledged:!0,pairingTopic:h,requiredNamespaces:{},optionalNamespaces:{},controller:a.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},d&&{sessionProperties:d});yield this.sendResult({id:n.id,topic:r,result:!0}),this.events.emit(Zn("session_connect"),{session:m}),this.cleanupDuplicatePairings(m)}catch(o){yield this.sendError(i,r,o),this.client.logger.error(o)}}),this.onSessionSettleResponse=(r,n)=>y(this,null,function*(){let{id:i}=n;Da(n)?(yield this.client.session.update(r,{acknowledged:!0}),this.events.emit(Zn("session_approve",i),{})):Ys(n)&&(yield this.client.session.delete(r,Xr("USER_DISCONNECTED")),this.events.emit(Zn("session_approve",i),{error:n.error}))}),this.onSessionUpdateRequest=(r,n)=>y(this,null,function*(){let{params:i,id:s}=n;try{let o=`${r}_session_update`,a=qh.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.info(`Discarding out of sync request - ${s}`);return}this.isValidUpdate(Qs({topic:r},i)),yield this.client.session.update(r,{namespaces:i.namespaces}),yield this.sendResult({id:s,topic:r,result:!0}),this.client.events.emit("session_update",{id:s,topic:r,params:i}),qh.set(o,s)}catch(o){yield this.sendError(s,r,o),this.client.logger.error(o)}}),this.isRequestOutOfSync=(r,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,n)=>{let{id:i}=n;Da(n)?this.events.emit(Zn("session_update",i),{}):Ys(n)&&this.events.emit(Zn("session_update",i),{error:n.error})},this.onSessionExtendRequest=(r,n)=>y(this,null,function*(){let{id:i}=n;try{this.isValidExtend({topic:r}),yield this.setExpiry(r,Zs(W6)),yield this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(s){yield this.sendError(i,r,s),this.client.logger.error(s)}}),this.onSessionExtendResponse=(r,n)=>{let{id:i}=n;Da(n)?this.events.emit(Zn("session_extend",i),{}):Ys(n)&&this.events.emit(Zn("session_extend",i),{error:n.error})},this.onSessionPingRequest=(r,n)=>y(this,null,function*(){let{id:i}=n;try{this.isValidPing({topic:r}),yield this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(s){yield this.sendError(i,r,s),this.client.logger.error(s)}}),this.onSessionPingResponse=(r,n)=>{let{id:i}=n;setTimeout(()=>{Da(n)?this.events.emit(Zn("session_ping",i),{}):Ys(n)&&this.events.emit(Zn("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=(r,n)=>y(this,null,function*(){let{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),yield Promise.all([new Promise(s=>{this.client.core.relayer.once(ds.publish,()=>y(this,null,function*(){s(yield this.deleteSession({topic:r,id:i}))}))}),this.sendResult({id:i,topic:r,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:r,error:Xr("USER_DISCONNECTED")})])}catch(s){this.client.logger.error(s)}}),this.onSessionRequest=(r,n)=>y(this,null,function*(){let{id:i,params:s}=n;try{this.isValidRequest(Qs({topic:r},s));let o=Zf(JSON.stringify(al("wc_sessionRequest",s,i))),a=this.client.session.get(r),c=yield this.getVerifyContext(o,a.peer.metadata),u={id:i,topic:r,params:s,verifyContext:c};yield this.setPendingSessionRequest(u),this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue()}catch(o){yield this.sendError(i,r,o),this.client.logger.error(o)}}),this.onSessionRequestResponse=(r,n)=>{let{id:i}=n;Da(n)?this.events.emit(Zn("session_request",i),{result:n.result}):Ys(n)&&this.events.emit(Zn("session_request",i),{error:n.error})},this.onSessionEventRequest=(r,n)=>y(this,null,function*(){let{id:i,params:s}=n;try{let o=`${r}_session_event_${s.event.name}`,a=qh.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Qs({topic:r},s)),this.client.events.emit("session_event",{id:i,topic:r,params:s}),qh.set(o,i)}catch(o){yield this.sendError(i,r,o),this.client.logger.error(o)}}),this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Iu.idle,this.processSessionRequestQueue()},(0,Lr.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:r,error:n})=>{let i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===r&&s.request.method==="wc_sessionRequest").forEach(s=>{this.events.emit(Zn("session_request",s.request.id),{error:n})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Iu.active){this.client.logger.info("session request queue is already active.");return}let r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Iu.active,this.client.events.emit("session_request",r)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=r=>{if(r.active)return;let n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);n&&this.onSessionProposeRequest(r.topic,al("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id))},this.isValidConnect=r=>y(this,null,function*(){if(!Ss(r)){let{message:c}=Ne("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(c)}let{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,relays:a}=r;if(fs(n)||(yield this.isValidPairingTopic(n)),!DK(a,!0)){let{message:c}=Ne("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(c)}!fs(i)&&zh(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!fs(s)&&zh(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),fs(o)||this.validateSessionProps(o,"sessionProperties")}),this.validateNamespaces=(r,n)=>{let i=SK(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=r=>y(this,null,function*(){if(!Ss(r))throw new Error(Ne("MISSING_OR_INVALID",`approve() params: ${r}`).message);let{id:n,namespaces:i,relayProtocol:s,sessionProperties:o}=r;yield this.isValidProposalId(n);let a=this.client.proposal.get(n),c=XC(i,"approve()");if(c)throw new Error(c.message);let u=qN(a.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Ci(s,!0)){let{message:d}=Ne("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(d)}fs(o)||this.validateSessionProps(o,"sessionProperties")}),this.isValidReject=r=>y(this,null,function*(){if(!Ss(r)){let{message:s}=Ne("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(s)}let{id:n,reason:i}=r;if(yield this.isValidProposalId(n),!TK(i)){let{message:s}=Ne("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),this.isValidSessionSettleRequest=r=>{if(!Ss(r)){let{message:u}=Ne("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(u)}let{relay:n,controller:i,namespaces:s,expiry:o}=r;if(!VN(n)){let{message:u}=Ne("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}let a=IK(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);let c=XC(s,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(nl(o)){let{message:u}=Ne("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=r=>y(this,null,function*(){if(!Ss(r)){let{message:c}=Ne("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}let{topic:n,namespaces:i}=r;yield this.isValidSessionTopic(n);let s=this.client.session.get(n),o=XC(i,"update()");if(o)throw new Error(o.message);let a=qN(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)}),this.isValidExtend=r=>y(this,null,function*(){if(!Ss(r)){let{message:i}=Ne("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}let{topic:n}=r;yield this.isValidSessionTopic(n)}),this.isValidRequest=r=>y(this,null,function*(){if(!Ss(r)){let{message:c}=Ne("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}let{topic:n,request:i,chainId:s,expiry:o}=r;yield this.isValidSessionTopic(n);let{namespaces:a}=this.client.session.get(n);if(!$N(a,s)){let{message:c}=Ne("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(c)}if(!NK(i)){let{message:c}=Ne("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!PK(a,s,i.method)){let{message:c}=Ne("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!LK(o,S9)){let{message:c}=Ne("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${S9.min} and ${S9.max}`);throw new Error(c)}}),this.isValidRespond=r=>y(this,null,function*(){var n;if(!Ss(r)){let{message:o}=Ne("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(o)}let{topic:i,response:s}=r;try{yield this.isValidSessionTopic(i)}catch(o){throw(n=r?.response)!=null&&n.id&&this.cleanupAfterResponse(r),o}if(!OK(s)){let{message:o}=Ne("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),this.isValidPing=r=>y(this,null,function*(){if(!Ss(r)){let{message:i}=Ne("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}let{topic:n}=r;yield this.isValidSessionOrPairingTopic(n)}),this.isValidEmit=r=>y(this,null,function*(){if(!Ss(r)){let{message:a}=Ne("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(a)}let{topic:n,event:i,chainId:s}=r;yield this.isValidSessionTopic(n);let{namespaces:o}=this.client.session.get(n);if(!$N(o,s)){let{message:a}=Ne("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!MK(i)){let{message:a}=Ne("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!kK(o,s,i.name)){let{message:a}=Ne("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}}),this.isValidDisconnect=r=>y(this,null,function*(){if(!Ss(r)){let{message:i}=Ne("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}let{topic:n}=r;yield this.isValidSessionOrPairingTopic(n)}),this.getVerifyContext=(r,n)=>y(this,null,function*(){let i={verified:{verifyUrl:n.verifyUrl||tp,validation:"UNKNOWN",origin:n.url||""}};try{let s=yield this.client.core.verify.resolve({attestationId:r,verifyUrl:n.verifyUrl});s&&(i.verified.origin=s.origin,i.verified.isScam=s.isScam,i.verified.validation=s.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(s){this.client.logger.info(s)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i}),this.validateSessionProps=(r,n)=>{Object.values(r).forEach(i=>{if(!Ci(i,!1)){let{message:s}=Ne("MISSING_OR_INVALID",`${n} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})}}isInitialized(){return y(this,null,function*(){if(!this.initialized){let{message:e}=Ne("NOT_INITIALIZED",this.name);throw new Error(e)}yield this.client.core.relayer.confirmOnlineStateOrThrow()})}registerRelayerEvents(){this.client.core.relayer.on(ds.message,e=>y(this,null,function*(){let{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;let i=yield this.client.core.crypto.decode(r,n);try{l0(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):rd(i)?(yield this.client.core.history.resolve(i),yield this.onRelayEventResponse({topic:r,payload:i}),this.client.core.history.delete(r,i.id)):this.onRelayEventUnknownPayload({topic:r,payload:i})}catch(s){this.client.logger.error(s)}}))}registerExpirerEvents(){this.client.core.expirer.on(Zo.expired,e=>y(this,null,function*(){let{topic:r,id:n}=KC(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return yield this.deletePendingSessionRequest(n,Ne("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(yield this.deleteSession({topic:r,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:r})):n&&(yield this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))}))}registerPairingEvents(){this.client.core.pairing.events.on(h0.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Ci(e,!1)){let{message:r}=Ne("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:r}=Ne("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(nl(this.client.core.pairing.pairings.get(e).expiry)){let{message:r}=Ne("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}isValidSessionTopic(e){return y(this,null,function*(){if(!Ci(e,!1)){let{message:r}=Ne("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!this.client.session.keys.includes(e)){let{message:r}=Ne("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(nl(this.client.session.get(e).expiry)){yield this.deleteSession({topic:e});let{message:r}=Ne("EXPIRED",`session topic: ${e}`);throw new Error(r)}if(!this.client.core.crypto.keychain.has(e)){let{message:r}=Ne("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw yield this.deleteSession({topic:e}),new Error(r)}})}isValidSessionOrPairingTopic(e){return y(this,null,function*(){if(this.client.session.keys.includes(e))yield this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Ci(e,!1)){let{message:r}=Ne("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{let{message:r}=Ne("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}})}isValidProposalId(e){return y(this,null,function*(){if(!RK(e)){let{message:r}=Ne("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){let{message:r}=Ne("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(nl(this.client.proposal.get(e).expiryTimestamp)){yield this.deleteProposal(e);let{message:r}=Ne("EXPIRED",`proposal id: ${e}`);throw new Error(r)}})}},R9=class extends rp{constructor(e,r){super(e,r,TMe,O9),this.core=e,this.logger=r}},T9=class extends rp{constructor(e,r){super(e,r,NMe,O9),this.core=e,this.logger=r}},N9=class extends rp{constructor(e,r){super(e,r,MMe,O9,n=>n.id),this.core=e,this.logger=r}},z6=class t extends y6{constructor(e){super(e),this.protocol=jQ,this.version=HQ,this.name=A9.name,this.events=new G6.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=n=>y(this,null,function*(){try{return yield this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),this.pair=n=>y(this,null,function*(){try{return yield this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),this.approve=n=>y(this,null,function*(){try{return yield this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),this.reject=n=>y(this,null,function*(){try{return yield this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),this.update=n=>y(this,null,function*(){try{return yield this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),this.extend=n=>y(this,null,function*(){try{return yield this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),this.request=n=>y(this,null,function*(){try{return yield this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),this.respond=n=>y(this,null,function*(){try{return yield this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),this.ping=n=>y(this,null,function*(){try{return yield this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),this.emit=n=>y(this,null,function*(){try{return yield this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),this.disconnect=n=>y(this,null,function*(){try{return yield this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=e?.name||A9.name,this.metadata=e?.metadata||hK();let r=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:(0,od.pino)((0,od.getDefaultLoggerOptions)({level:e?.logger||A9.logger}));this.core=e?.core||new LQ(e),this.logger=(0,od.generateChildLogger)(r,this.name),this.session=new T9(this.core,this.logger),this.proposal=new R9(this.core,this.logger),this.pendingRequest=new N9(this.core,this.logger),this.engine=new D9(this)}static init(e){return y(this,null,function*(){let r=new t(e);return yield r.initialize(),r})}get context(){return(0,od.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){return y(this,null,function*(){this.logger.trace("Initialized");try{yield this.core.start(),yield this.session.init(),yield this.proposal.init(),yield this.pendingRequest.init(),yield 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 Y6=wr(o6());var ZQ=wr(Gs()),P9=wr(WQ());var jMe={Accept:"application/json","Content-Type":"application/json"},HMe="POST",zQ={headers:jMe,method:HMe},GQ=10,jv=class{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new ZQ.EventEmitter,this.isAvailable=!1,this.registering=!1,!T6(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}open(){return y(this,arguments,function*(e=this.url){yield this.register(e)})}close(){return y(this,null,function*(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()})}send(e,r){return y(this,null,function*(){this.isAvailable||(yield this.register());try{let n=Sa(e),s=yield(yield(0,P9.default)(this.url,Object.assign(Object.assign({},zQ),{body:n}))).json();this.onPayload({data:s})}catch(n){this.onError(e.id,n)}})}register(){return y(this,arguments,function*(e=this.url){if(!T6(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let r=Sa({id:1,jsonrpc:"2.0",method:"test",params:[]});yield(0,P9.default)(e,Object.assign(Object.assign({},zQ),{body:r}))}this.onOpen()}catch(r){let n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}})}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 r=typeof e.data=="string"?il(e.data):e.data;this.events.emit("payload",r)}onError(e,r){let n=this.parseError(r),i=n.message||n.toString(),s=vu(e,i);this.events.emit("payload",s)}parseError(e,r=this.url){return Sv(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>GQ&&this.events.setMaxListeners(GQ)}},KQ=jv;var ad=KQ;var iX=wr(Gs());var JQ="error",VMe="wss://relay.walletconnect.com",$Me="wc",qMe="universal_provider",YQ=`${$Me}@2:${qMe}:`,WMe="https://rpc.walletconnect.com/v1/",Su={DEFAULT_CHAIN_CHANGED:"default_chain_changed"},Hv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},B9={exports:{}};(function(t,e){(function(){var r,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,m=2,w=4,_=1,C=2,A=1,R=2,L=4,U=8,V=16,Q=32,Y=64,k=128,q=256,ie=512,W=30,z="...",X=800,D=16,g=1,v=2,x=3,I=1/0,T=9007199254740991,H=17976931348623157e292,$=NaN,N=4294967295,E=N-1,P=N>>>1,ae=[["ary",k],["bind",A],["bindKey",R],["curry",U],["curryRight",V],["flip",ie],["partial",Q],["partialRight",Y],["rearg",q]],ce="[object Arguments]",se="[object Array]",pe="[object AsyncFunction]",De="[object Boolean]",Te="[object Date]",st="[object DOMException]",Ue="[object Error]",Oe="[object Function]",_t="[object GeneratorFunction]",Fe="[object Map]",Ye="[object Number]",Dc="[object Null]",yr="[object Object]",dn="[object Promise]",Kd="[object Proxy]",Br="[object RegExp]",hr="[object Set]",Ga="[object String]",$r="[object Symbol]",Nn="[object Undefined]",Za="[object WeakMap]",On="[object WeakSet]",Ur="[object ArrayBuffer]",Do="[object DataView]",qr="[object Float32Array]",Wr="[object Float64Array]",Rc="[object Int8Array]",zr="[object Int16Array]",Gr="[object Int32Array]",Tc="[object Uint8Array]",Zr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",Nc="[object Uint32Array]",hn=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,Yu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tn=/&(?:amp|lt|gt|quot|#39);/g,rn=/[&<>"']/g,Qu=RegExp(tn.source),mn=RegExp(rn.source),gn=/<%-([\s\S]+?)%>/g,Xu=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ef=/^\w*$/,wn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jr=/[\\^$.*+?()[\]{}|]/g,tf=RegExp(Jr.source),Yr=/^\s+/,vn=/\s/,rf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bn=/\{\n\/\* \[wrapped with (.+)\] \*/,En=/,? & /,nf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_n=/[()=,{}\[\]\/\s]/,Cn=/\\(\\)?/g,sf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sn=/\w*$/,xn=/^[-+]0x[0-9a-f]+$/i,Nl=/^0b[01]+$/i,Ol=/^\[object .+?Constructor\]$/,Ml=/^0o[0-7]+$/i,Pl=/^(?:0|[1-9]\d*)$/,kl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sa=/($^)/,Ll=/['\n\r\u2028\u2029\\]/g,oa="\\ud800-\\udfff",Fl="\\u0300-\\u036f",Bl="\\ufe20-\\ufe2f",Ul="\\u20d0-\\u20ff",Oc=Fl+Bl+Ul,Mc="\\u2700-\\u27bf",Pc="a-z\\xdf-\\xf6\\xf8-\\xff",ay="\\xac\\xb1\\xd7\\xf7",cy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ly="\\u2000-\\u206f",uy=" \\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",hm="A-Z\\xc0-\\xd6\\xd8-\\xde",XL="\\ufe0e\\ufe0f",eF=ay+cy+ly+uy,nI="['\u2019]",phe="["+oa+"]",tF="["+eF+"]",Ob="["+Oc+"]",rF="\\d+",mhe="["+Mc+"]",nF="["+Pc+"]",iF="[^"+oa+eF+rF+Mc+Pc+hm+"]",iI="\\ud83c[\\udffb-\\udfff]",ghe="(?:"+Ob+"|"+iI+")",sF="[^"+oa+"]",sI="(?:\\ud83c[\\udde6-\\uddff]){2}",oI="[\\ud800-\\udbff][\\udc00-\\udfff]",pm="["+hm+"]",oF="\\u200d",aF="(?:"+nF+"|"+iF+")",yhe="(?:"+pm+"|"+iF+")",cF="(?:"+nI+"(?:d|ll|m|re|s|t|ve))?",lF="(?:"+nI+"(?:D|LL|M|RE|S|T|VE))?",uF=ghe+"?",fF="["+XL+"]?",whe="(?:"+oF+"(?:"+[sF,sI,oI].join("|")+")"+fF+uF+")*",vhe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bhe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",dF=fF+uF+whe,Ehe="(?:"+[mhe,sI,oI].join("|")+")"+dF,_he="(?:"+[sF+Ob+"?",Ob,sI,oI,phe].join("|")+")",Che=RegExp(nI,"g"),xhe=RegExp(Ob,"g"),aI=RegExp(iI+"(?="+iI+")|"+_he+dF,"g"),Ihe=RegExp([pm+"?"+nF+"+"+cF+"(?="+[tF,pm,"$"].join("|")+")",yhe+"+"+lF+"(?="+[tF,pm+aF,"$"].join("|")+")",pm+"?"+aF+"+"+cF,pm+"+"+lF,bhe,vhe,rF,Ehe].join("|"),"g"),Ahe=RegExp("["+oF+oa+Oc+XL+"]"),She=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Dhe=["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"],Rhe=-1,Mn={};Mn[qr]=Mn[Wr]=Mn[Rc]=Mn[zr]=Mn[Gr]=Mn[Tc]=Mn[Zr]=Mn[Kr]=Mn[Nc]=!0,Mn[ce]=Mn[se]=Mn[Ur]=Mn[De]=Mn[Do]=Mn[Te]=Mn[Ue]=Mn[Oe]=Mn[Fe]=Mn[Ye]=Mn[yr]=Mn[Br]=Mn[hr]=Mn[Ga]=Mn[Za]=!1;var In={};In[ce]=In[se]=In[Ur]=In[Do]=In[De]=In[Te]=In[qr]=In[Wr]=In[Rc]=In[zr]=In[Gr]=In[Fe]=In[Ye]=In[yr]=In[Br]=In[hr]=In[Ga]=In[$r]=In[Tc]=In[Zr]=In[Kr]=In[Nc]=!0,In[Ue]=In[Oe]=In[Za]=!1;var The={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Nhe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ohe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Mhe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Phe=parseFloat,khe=parseInt,hF=typeof Hv=="object"&&Hv&&Hv.Object===Object&&Hv,Lhe=typeof self=="object"&&self&&self.Object===Object&&self,es=hF||Lhe||Function("return this")(),cI=e&&!e.nodeType&&e,Jd=cI&&!0&&t&&!t.nodeType&&t,pF=Jd&&Jd.exports===cI,lI=pF&&hF.process,aa=function(){try{var ee=Jd&&Jd.require&&Jd.require("util").types;return ee||lI&&lI.binding&&lI.binding("util")}catch{}}(),mF=aa&&aa.isArrayBuffer,gF=aa&&aa.isDate,yF=aa&&aa.isMap,wF=aa&&aa.isRegExp,vF=aa&&aa.isSet,bF=aa&&aa.isTypedArray;function Ro(ee,fe,re){switch(re.length){case 0:return ee.call(fe);case 1:return ee.call(fe,re[0]);case 2:return ee.call(fe,re[0],re[1]);case 3:return ee.call(fe,re[0],re[1],re[2])}return ee.apply(fe,re)}function Fhe(ee,fe,re,Ke){for(var Nt=-1,Tr=ee==null?0:ee.length;++Nt<Tr;){var Ti=ee[Nt];fe(Ke,Ti,re(Ti),ee)}return Ke}function ca(ee,fe){for(var re=-1,Ke=ee==null?0:ee.length;++re<Ke&&fe(ee[re],re,ee)!==!1;);return ee}function Bhe(ee,fe){for(var re=ee==null?0:ee.length;re--&&fe(ee[re],re,ee)!==!1;);return ee}function EF(ee,fe){for(var re=-1,Ke=ee==null?0:ee.length;++re<Ke;)if(!fe(ee[re],re,ee))return!1;return!0}function of(ee,fe){for(var re=-1,Ke=ee==null?0:ee.length,Nt=0,Tr=[];++re<Ke;){var Ti=ee[re];fe(Ti,re,ee)&&(Tr[Nt++]=Ti)}return Tr}function Mb(ee,fe){var re=ee==null?0:ee.length;return!!re&&mm(ee,fe,0)>-1}function uI(ee,fe,re){for(var Ke=-1,Nt=ee==null?0:ee.length;++Ke<Nt;)if(re(fe,ee[Ke]))return!0;return!1}function Un(ee,fe){for(var re=-1,Ke=ee==null?0:ee.length,Nt=Array(Ke);++re<Ke;)Nt[re]=fe(ee[re],re,ee);return Nt}function af(ee,fe){for(var re=-1,Ke=fe.length,Nt=ee.length;++re<Ke;)ee[Nt+re]=fe[re];return ee}function fI(ee,fe,re,Ke){var Nt=-1,Tr=ee==null?0:ee.length;for(Ke&&Tr&&(re=ee[++Nt]);++Nt<Tr;)re=fe(re,ee[Nt],Nt,ee);return re}function Uhe(ee,fe,re,Ke){var Nt=ee==null?0:ee.length;for(Ke&&Nt&&(re=ee[--Nt]);Nt--;)re=fe(re,ee[Nt],Nt,ee);return re}function dI(ee,fe){for(var re=-1,Ke=ee==null?0:ee.length;++re<Ke;)if(fe(ee[re],re,ee))return!0;return!1}var jhe=hI("length");function Hhe(ee){return ee.split("")}function Vhe(ee){return ee.match(nf)||[]}function _F(ee,fe,re){var Ke;return re(ee,function(Nt,Tr,Ti){if(fe(Nt,Tr,Ti))return Ke=Tr,!1}),Ke}function Pb(ee,fe,re,Ke){for(var Nt=ee.length,Tr=re+(Ke?1:-1);Ke?Tr--:++Tr<Nt;)if(fe(ee[Tr],Tr,ee))return Tr;return-1}function mm(ee,fe,re){return fe===fe?epe(ee,fe,re):Pb(ee,CF,re)}function $he(ee,fe,re,Ke){for(var Nt=re-1,Tr=ee.length;++Nt<Tr;)if(Ke(ee[Nt],fe))return Nt;return-1}function CF(ee){return ee!==ee}function xF(ee,fe){var re=ee==null?0:ee.length;return re?mI(ee,fe)/re:$}function hI(ee){return function(fe){return fe==null?r:fe[ee]}}function pI(ee){return function(fe){return ee==null?r:ee[fe]}}function IF(ee,fe,re,Ke,Nt){return Nt(ee,function(Tr,Ti,on){re=Ke?(Ke=!1,Tr):fe(re,Tr,Ti,on)}),re}function qhe(ee,fe){var re=ee.length;for(ee.sort(fe);re--;)ee[re]=ee[re].value;return ee}function mI(ee,fe){for(var re,Ke=-1,Nt=ee.length;++Ke<Nt;){var Tr=fe(ee[Ke]);Tr!==r&&(re=re===r?Tr:re+Tr)}return re}function gI(ee,fe){for(var re=-1,Ke=Array(ee);++re<ee;)Ke[re]=fe(re);return Ke}function Whe(ee,fe){return Un(fe,function(re){return[re,ee[re]]})}function AF(ee){return ee&&ee.slice(0,TF(ee)+1).replace(Yr,"")}function To(ee){return function(fe){return ee(fe)}}function yI(ee,fe){return Un(fe,function(re){return ee[re]})}function fy(ee,fe){return ee.has(fe)}function SF(ee,fe){for(var re=-1,Ke=ee.length;++re<Ke&&mm(fe,ee[re],0)>-1;);return re}function DF(ee,fe){for(var re=ee.length;re--&&mm(fe,ee[re],0)>-1;);return re}function zhe(ee,fe){for(var re=ee.length,Ke=0;re--;)ee[re]===fe&&++Ke;return Ke}var Ghe=pI(The),Zhe=pI(Nhe);function Khe(ee){return"\\"+Mhe[ee]}function Jhe(ee,fe){return ee==null?r:ee[fe]}function gm(ee){return Ahe.test(ee)}function Yhe(ee){return She.test(ee)}function Qhe(ee){for(var fe,re=[];!(fe=ee.next()).done;)re.push(fe.value);return re}function wI(ee){var fe=-1,re=Array(ee.size);return ee.forEach(function(Ke,Nt){re[++fe]=[Nt,Ke]}),re}function RF(ee,fe){return function(re){return ee(fe(re))}}function cf(ee,fe){for(var re=-1,Ke=ee.length,Nt=0,Tr=[];++re<Ke;){var Ti=ee[re];(Ti===fe||Ti===d)&&(ee[re]=d,Tr[Nt++]=re)}return Tr}function kb(ee){var fe=-1,re=Array(ee.size);return ee.forEach(function(Ke){re[++fe]=Ke}),re}function Xhe(ee){var fe=-1,re=Array(ee.size);return ee.forEach(function(Ke){re[++fe]=[Ke,Ke]}),re}function epe(ee,fe,re){for(var Ke=re-1,Nt=ee.length;++Ke<Nt;)if(ee[Ke]===fe)return Ke;return-1}function tpe(ee,fe,re){for(var Ke=re+1;Ke--;)if(ee[Ke]===fe)return Ke;return Ke}function ym(ee){return gm(ee)?npe(ee):jhe(ee)}function Ka(ee){return gm(ee)?ipe(ee):Hhe(ee)}function TF(ee){for(var fe=ee.length;fe--&&vn.test(ee.charAt(fe)););return fe}var rpe=pI(Ohe);function npe(ee){for(var fe=aI.lastIndex=0;aI.test(ee);)++fe;return fe}function ipe(ee){return ee.match(aI)||[]}function spe(ee){return ee.match(Ihe)||[]}var ope=function ee(fe){fe=fe==null?es:wm.defaults(es.Object(),fe,wm.pick(es,Dhe));var re=fe.Array,Ke=fe.Date,Nt=fe.Error,Tr=fe.Function,Ti=fe.Math,on=fe.Object,vI=fe.RegExp,ape=fe.String,la=fe.TypeError,Lb=re.prototype,cpe=Tr.prototype,vm=on.prototype,Fb=fe["__core-js_shared__"],Bb=cpe.toString,jr=vm.hasOwnProperty,lpe=0,NF=function(){var l=/[^.]+$/.exec(Fb&&Fb.keys&&Fb.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Ub=vm.toString,upe=Bb.call(on),fpe=es._,dpe=vI("^"+Bb.call(jr).replace(Jr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jb=pF?fe.Buffer:r,lf=fe.Symbol,Hb=fe.Uint8Array,OF=jb?jb.allocUnsafe:r,Vb=RF(on.getPrototypeOf,on),MF=on.create,PF=vm.propertyIsEnumerable,$b=Lb.splice,kF=lf?lf.isConcatSpreadable:r,dy=lf?lf.iterator:r,Yd=lf?lf.toStringTag:r,qb=function(){try{var l=rh(on,"defineProperty");return l({},"",{}),l}catch{}}(),hpe=fe.clearTimeout!==es.clearTimeout&&fe.clearTimeout,ppe=Ke&&Ke.now!==es.Date.now&&Ke.now,mpe=fe.setTimeout!==es.setTimeout&&fe.setTimeout,Wb=Ti.ceil,zb=Ti.floor,bI=on.getOwnPropertySymbols,gpe=jb?jb.isBuffer:r,LF=fe.isFinite,ype=Lb.join,wpe=RF(on.keys,on),Ni=Ti.max,ys=Ti.min,vpe=Ke.now,bpe=fe.parseInt,FF=Ti.random,Epe=Lb.reverse,EI=rh(fe,"DataView"),hy=rh(fe,"Map"),_I=rh(fe,"Promise"),bm=rh(fe,"Set"),py=rh(fe,"WeakMap"),my=rh(on,"create"),Gb=py&&new py,Em={},_pe=nh(EI),Cpe=nh(hy),xpe=nh(_I),Ipe=nh(bm),Ape=nh(py),Zb=lf?lf.prototype:r,gy=Zb?Zb.valueOf:r,BF=Zb?Zb.toString:r;function O(l){if(ri(l)&&!Pt(l)&&!(l instanceof fr)){if(l instanceof ua)return l;if(jr.call(l,"__wrapped__"))return UB(l)}return new ua(l)}var _m=function(){function l(){}return function(f){if(!qn(f))return{};if(MF)return MF(f);l.prototype=f;var p=new l;return l.prototype=r,p}}();function Kb(){}function ua(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}O.templateSettings={escape:gn,evaluate:Xu,interpolate:nn,variable:"",imports:{_:O}},O.prototype=Kb.prototype,O.prototype.constructor=O,ua.prototype=_m(Kb.prototype),ua.prototype.constructor=ua;function fr(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=N,this.__views__=[]}function Spe(){var l=new fr(this.__wrapped__);return l.__actions__=lo(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=lo(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=lo(this.__views__),l}function Dpe(){if(this.__filtered__){var l=new fr(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function Rpe(){var l=this.__wrapped__.value(),f=this.__dir__,p=Pt(l),b=f<0,S=p?l.length:0,M=Hme(0,S,this.__views__),G=M.start,J=M.end,te=J-G,me=b?J:G-1,ge=this.__iteratees__,Ee=ge.length,Le=0,tt=ys(te,this.__takeCount__);if(!p||!b&&S==te&&tt==te)return cB(l,this.__actions__);var vt=[];e:for(;te--&&Le<tt;){me+=f;for(var Zt=-1,bt=l[me];++Zt<Ee;){var or=ge[Zt],pr=or.iteratee,Mo=or.type,js=pr(bt);if(Mo==v)bt=js;else if(!js){if(Mo==g)continue e;break e}}vt[Le++]=bt}return vt}fr.prototype=_m(Kb.prototype),fr.prototype.constructor=fr;function Qd(l){var f=-1,p=l==null?0:l.length;for(this.clear();++f<p;){var b=l[f];this.set(b[0],b[1])}}function Tpe(){this.__data__=my?my(null):{},this.size=0}function Npe(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function Ope(l){var f=this.__data__;if(my){var p=f[l];return p===c?r:p}return jr.call(f,l)?f[l]:r}function Mpe(l){var f=this.__data__;return my?f[l]!==r:jr.call(f,l)}function Ppe(l,f){var p=this.__data__;return this.size+=this.has(l)?0:1,p[l]=my&&f===r?c:f,this}Qd.prototype.clear=Tpe,Qd.prototype.delete=Npe,Qd.prototype.get=Ope,Qd.prototype.has=Mpe,Qd.prototype.set=Ppe;function jl(l){var f=-1,p=l==null?0:l.length;for(this.clear();++f<p;){var b=l[f];this.set(b[0],b[1])}}function kpe(){this.__data__=[],this.size=0}function Lpe(l){var f=this.__data__,p=Jb(f,l);if(p<0)return!1;var b=f.length-1;return p==b?f.pop():$b.call(f,p,1),--this.size,!0}function Fpe(l){var f=this.__data__,p=Jb(f,l);return p<0?r:f[p][1]}function Bpe(l){return Jb(this.__data__,l)>-1}function Upe(l,f){var p=this.__data__,b=Jb(p,l);return b<0?(++this.size,p.push([l,f])):p[b][1]=f,this}jl.prototype.clear=kpe,jl.prototype.delete=Lpe,jl.prototype.get=Fpe,jl.prototype.has=Bpe,jl.prototype.set=Upe;function Hl(l){var f=-1,p=l==null?0:l.length;for(this.clear();++f<p;){var b=l[f];this.set(b[0],b[1])}}function jpe(){this.size=0,this.__data__={hash:new Qd,map:new(hy||jl),string:new Qd}}function Hpe(l){var f=c3(this,l).delete(l);return this.size-=f?1:0,f}function Vpe(l){return c3(this,l).get(l)}function $pe(l){return c3(this,l).has(l)}function qpe(l,f){var p=c3(this,l),b=p.size;return p.set(l,f),this.size+=p.size==b?0:1,this}Hl.prototype.clear=jpe,Hl.prototype.delete=Hpe,Hl.prototype.get=Vpe,Hl.prototype.has=$pe,Hl.prototype.set=qpe;function Xd(l){var f=-1,p=l==null?0:l.length;for(this.__data__=new Hl;++f<p;)this.add(l[f])}function Wpe(l){return this.__data__.set(l,c),this}function zpe(l){return this.__data__.has(l)}Xd.prototype.add=Xd.prototype.push=Wpe,Xd.prototype.has=zpe;function Ja(l){var f=this.__data__=new jl(l);this.size=f.size}function Gpe(){this.__data__=new jl,this.size=0}function Zpe(l){var f=this.__data__,p=f.delete(l);return this.size=f.size,p}function Kpe(l){return this.__data__.get(l)}function Jpe(l){return this.__data__.has(l)}function Ype(l,f){var p=this.__data__;if(p instanceof jl){var b=p.__data__;if(!hy||b.length<i-1)return b.push([l,f]),this.size=++p.size,this;p=this.__data__=new Hl(b)}return p.set(l,f),this.size=p.size,this}Ja.prototype.clear=Gpe,Ja.prototype.delete=Zpe,Ja.prototype.get=Kpe,Ja.prototype.has=Jpe,Ja.prototype.set=Ype;function UF(l,f){var p=Pt(l),b=!p&&ih(l),S=!p&&!b&&pf(l),M=!p&&!b&&!S&&Am(l),G=p||b||S||M,J=G?gI(l.length,ape):[],te=J.length;for(var me in l)(f||jr.call(l,me))&&!(G&&(me=="length"||S&&(me=="offset"||me=="parent")||M&&(me=="buffer"||me=="byteLength"||me=="byteOffset")||Wl(me,te)))&&J.push(me);return J}function jF(l){var f=l.length;return f?l[MI(0,f-1)]:r}function Qpe(l,f){return l3(lo(l),eh(f,0,l.length))}function Xpe(l){return l3(lo(l))}function CI(l,f,p){(p!==r&&!Ya(l[f],p)||p===r&&!(f in l))&&Vl(l,f,p)}function yy(l,f,p){var b=l[f];(!(jr.call(l,f)&&Ya(b,p))||p===r&&!(f in l))&&Vl(l,f,p)}function Jb(l,f){for(var p=l.length;p--;)if(Ya(l[p][0],f))return p;return-1}function eme(l,f,p,b){return uf(l,function(S,M,G){f(b,S,p(S),G)}),b}function HF(l,f){return l&&Lc(f,Bi(f),l)}function tme(l,f){return l&&Lc(f,fo(f),l)}function Vl(l,f,p){f=="__proto__"&&qb?qb(l,f,{configurable:!0,enumerable:!0,value:p,writable:!0}):l[f]=p}function xI(l,f){for(var p=-1,b=f.length,S=re(b),M=l==null;++p<b;)S[p]=M?r:iA(l,f[p]);return S}function eh(l,f,p){return l===l&&(p!==r&&(l=l<=p?l:p),f!==r&&(l=l>=f?l:f)),l}function fa(l,f,p,b,S,M){var G,J=f&h,te=f&m,me=f&w;if(p&&(G=S?p(l,b,S,M):p(l)),G!==r)return G;if(!qn(l))return l;var ge=Pt(l);if(ge){if(G=$me(l),!J)return lo(l,G)}else{var Ee=ws(l),Le=Ee==Oe||Ee==_t;if(pf(l))return fB(l,J);if(Ee==yr||Ee==ce||Le&&!S){if(G=te||Le?{}:TB(l),!J)return te?Ome(l,tme(G,l)):Nme(l,HF(G,l))}else{if(!In[Ee])return S?l:{};G=qme(l,Ee,J)}}M||(M=new Ja);var tt=M.get(l);if(tt)return tt;M.set(l,G),sU(l)?l.forEach(function(bt){G.add(fa(bt,f,p,bt,l,M))}):nU(l)&&l.forEach(function(bt,or){G.set(or,fa(bt,f,p,or,l,M))});var vt=me?te?qI:$I:te?fo:Bi,Zt=ge?r:vt(l);return ca(Zt||l,function(bt,or){Zt&&(or=bt,bt=l[or]),yy(G,or,fa(bt,f,p,or,l,M))}),G}function rme(l){var f=Bi(l);return function(p){return VF(p,l,f)}}function VF(l,f,p){var b=p.length;if(l==null)return!b;for(l=on(l);b--;){var S=p[b],M=f[S],G=l[S];if(G===r&&!(S in l)||!M(G))return!1}return!0}function $F(l,f,p){if(typeof l!="function")throw new la(o);return xy(function(){l.apply(r,p)},f)}function wy(l,f,p,b){var S=-1,M=Mb,G=!0,J=l.length,te=[],me=f.length;if(!J)return te;p&&(f=Un(f,To(p))),b?(M=uI,G=!1):f.length>=i&&(M=fy,G=!1,f=new Xd(f));e:for(;++S<J;){var ge=l[S],Ee=p==null?ge:p(ge);if(ge=b||ge!==0?ge:0,G&&Ee===Ee){for(var Le=me;Le--;)if(f[Le]===Ee)continue e;te.push(ge)}else M(f,Ee,b)||te.push(ge)}return te}var uf=gB(kc),qF=gB(AI,!0);function nme(l,f){var p=!0;return uf(l,function(b,S,M){return p=!!f(b,S,M),p}),p}function Yb(l,f,p){for(var b=-1,S=l.length;++b<S;){var M=l[b],G=f(M);if(G!=null&&(J===r?G===G&&!Oo(G):p(G,J)))var J=G,te=M}return te}function ime(l,f,p,b){var S=l.length;for(p=qt(p),p<0&&(p=-p>S?0:S+p),b=b===r||b>S?S:qt(b),b<0&&(b+=S),b=p>b?0:aU(b);p<b;)l[p++]=f;return l}function WF(l,f){var p=[];return uf(l,function(b,S,M){f(b,S,M)&&p.push(b)}),p}function ts(l,f,p,b,S){var M=-1,G=l.length;for(p||(p=zme),S||(S=[]);++M<G;){var J=l[M];f>0&&p(J)?f>1?ts(J,f-1,p,b,S):af(S,J):b||(S[S.length]=J)}return S}var II=yB(),zF=yB(!0);function kc(l,f){return l&&II(l,f,Bi)}function AI(l,f){return l&&zF(l,f,Bi)}function Qb(l,f){return of(f,function(p){return zl(l[p])})}function th(l,f){f=df(f,l);for(var p=0,b=f.length;l!=null&&p<b;)l=l[Fc(f[p++])];return p&&p==b?l:r}function GF(l,f,p){var b=f(l);return Pt(l)?b:af(b,p(l))}function Bs(l){return l==null?l===r?Nn:Dc:Yd&&Yd in on(l)?jme(l):Xme(l)}function SI(l,f){return l>f}function sme(l,f){return l!=null&&jr.call(l,f)}function ome(l,f){return l!=null&&f in on(l)}function ame(l,f,p){return l>=ys(f,p)&&l<Ni(f,p)}function DI(l,f,p){for(var b=p?uI:Mb,S=l[0].length,M=l.length,G=M,J=re(M),te=1/0,me=[];G--;){var ge=l[G];G&&f&&(ge=Un(ge,To(f))),te=ys(ge.length,te),J[G]=!p&&(f||S>=120&&ge.length>=120)?new Xd(G&&ge):r}ge=l[0];var Ee=-1,Le=J[0];e:for(;++Ee<S&&me.length<te;){var tt=ge[Ee],vt=f?f(tt):tt;if(tt=p||tt!==0?tt:0,!(Le?fy(Le,vt):b(me,vt,p))){for(G=M;--G;){var Zt=J[G];if(!(Zt?fy(Zt,vt):b(l[G],vt,p)))continue e}Le&&Le.push(vt),me.push(tt)}}return me}function cme(l,f,p,b){return kc(l,function(S,M,G){f(b,p(S),M,G)}),b}function vy(l,f,p){f=df(f,l),l=PB(l,f);var b=l==null?l:l[Fc(ha(f))];return b==null?r:Ro(b,l,p)}function ZF(l){return ri(l)&&Bs(l)==ce}function lme(l){return ri(l)&&Bs(l)==Ur}function ume(l){return ri(l)&&Bs(l)==Te}function by(l,f,p,b,S){return l===f?!0:l==null||f==null||!ri(l)&&!ri(f)?l!==l&&f!==f:fme(l,f,p,b,by,S)}function fme(l,f,p,b,S,M){var G=Pt(l),J=Pt(f),te=G?se:ws(l),me=J?se:ws(f);te=te==ce?yr:te,me=me==ce?yr:me;var ge=te==yr,Ee=me==yr,Le=te==me;if(Le&&pf(l)){if(!pf(f))return!1;G=!0,ge=!1}if(Le&&!ge)return M||(M=new Ja),G||Am(l)?SB(l,f,p,b,S,M):Bme(l,f,te,p,b,S,M);if(!(p&_)){var tt=ge&&jr.call(l,"__wrapped__"),vt=Ee&&jr.call(f,"__wrapped__");if(tt||vt){var Zt=tt?l.value():l,bt=vt?f.value():f;return M||(M=new Ja),S(Zt,bt,p,b,M)}}return Le?(M||(M=new Ja),Ume(l,f,p,b,S,M)):!1}function dme(l){return ri(l)&&ws(l)==Fe}function RI(l,f,p,b){var S=p.length,M=S,G=!b;if(l==null)return!M;for(l=on(l);S--;){var J=p[S];if(G&&J[2]?J[1]!==l[J[0]]:!(J[0]in l))return!1}for(;++S<M;){J=p[S];var te=J[0],me=l[te],ge=J[1];if(G&&J[2]){if(me===r&&!(te in l))return!1}else{var Ee=new Ja;if(b)var Le=b(me,ge,te,l,f,Ee);if(!(Le===r?by(ge,me,_|C,b,Ee):Le))return!1}}return!0}function KF(l){if(!qn(l)||Zme(l))return!1;var f=zl(l)?dpe:Ol;return f.test(nh(l))}function hme(l){return ri(l)&&Bs(l)==Br}function pme(l){return ri(l)&&ws(l)==hr}function mme(l){return ri(l)&&m3(l.length)&&!!Mn[Bs(l)]}function JF(l){return typeof l=="function"?l:l==null?ho:typeof l=="object"?Pt(l)?XF(l[0],l[1]):QF(l):wU(l)}function TI(l){if(!Cy(l))return wpe(l);var f=[];for(var p in on(l))jr.call(l,p)&&p!="constructor"&&f.push(p);return f}function gme(l){if(!qn(l))return Qme(l);var f=Cy(l),p=[];for(var b in l)b=="constructor"&&(f||!jr.call(l,b))||p.push(b);return p}function NI(l,f){return l<f}function YF(l,f){var p=-1,b=uo(l)?re(l.length):[];return uf(l,function(S,M,G){b[++p]=f(S,M,G)}),b}function QF(l){var f=zI(l);return f.length==1&&f[0][2]?OB(f[0][0],f[0][1]):function(p){return p===l||RI(p,l,f)}}function XF(l,f){return ZI(l)&&NB(f)?OB(Fc(l),f):function(p){var b=iA(p,l);return b===r&&b===f?sA(p,l):by(f,b,_|C)}}function Xb(l,f,p,b,S){l!==f&&II(f,function(M,G){if(S||(S=new Ja),qn(M))yme(l,f,G,p,Xb,b,S);else{var J=b?b(JI(l,G),M,G+"",l,f,S):r;J===r&&(J=M),CI(l,G,J)}},fo)}function yme(l,f,p,b,S,M,G){var J=JI(l,p),te=JI(f,p),me=G.get(te);if(me){CI(l,p,me);return}var ge=M?M(J,te,p+"",l,f,G):r,Ee=ge===r;if(Ee){var Le=Pt(te),tt=!Le&&pf(te),vt=!Le&&!tt&&Am(te);ge=te,Le||tt||vt?Pt(J)?ge=J:pi(J)?ge=lo(J):tt?(Ee=!1,ge=fB(te,!0)):vt?(Ee=!1,ge=dB(te,!0)):ge=[]:Iy(te)||ih(te)?(ge=J,ih(J)?ge=cU(J):(!qn(J)||zl(J))&&(ge=TB(te))):Ee=!1}Ee&&(G.set(te,ge),S(ge,te,b,M,G),G.delete(te)),CI(l,p,ge)}function eB(l,f){var p=l.length;if(p)return f+=f<0?p:0,Wl(f,p)?l[f]:r}function tB(l,f,p){f.length?f=Un(f,function(M){return Pt(M)?function(G){return th(G,M.length===1?M[0]:M)}:M}):f=[ho];var b=-1;f=Un(f,To(pt()));var S=YF(l,function(M,G,J){var te=Un(f,function(me){return me(M)});return{criteria:te,index:++b,value:M}});return qhe(S,function(M,G){return Tme(M,G,p)})}function wme(l,f){return rB(l,f,function(p,b){return sA(l,b)})}function rB(l,f,p){for(var b=-1,S=f.length,M={};++b<S;){var G=f[b],J=th(l,G);p(J,G)&&Ey(M,df(G,l),J)}return M}function vme(l){return function(f){return th(f,l)}}function OI(l,f,p,b){var S=b?$he:mm,M=-1,G=f.length,J=l;for(l===f&&(f=lo(f)),p&&(J=Un(l,To(p)));++M<G;)for(var te=0,me=f[M],ge=p?p(me):me;(te=S(J,ge,te,b))>-1;)J!==l&&$b.call(J,te,1),$b.call(l,te,1);return l}function nB(l,f){for(var p=l?f.length:0,b=p-1;p--;){var S=f[p];if(p==b||S!==M){var M=S;Wl(S)?$b.call(l,S,1):LI(l,S)}}return l}function MI(l,f){return l+zb(FF()*(f-l+1))}function bme(l,f,p,b){for(var S=-1,M=Ni(Wb((f-l)/(p||1)),0),G=re(M);M--;)G[b?M:++S]=l,l+=p;return G}function PI(l,f){var p="";if(!l||f<1||f>T)return p;do f%2&&(p+=l),f=zb(f/2),f&&(l+=l);while(f);return p}function Jt(l,f){return YI(MB(l,f,ho),l+"")}function Eme(l){return jF(Sm(l))}function _me(l,f){var p=Sm(l);return l3(p,eh(f,0,p.length))}function Ey(l,f,p,b){if(!qn(l))return l;f=df(f,l);for(var S=-1,M=f.length,G=M-1,J=l;J!=null&&++S<M;){var te=Fc(f[S]),me=p;if(te==="__proto__"||te==="constructor"||te==="prototype")return l;if(S!=G){var ge=J[te];me=b?b(ge,te,J):r,me===r&&(me=qn(ge)?ge:Wl(f[S+1])?[]:{})}yy(J,te,me),J=J[te]}return l}var iB=Gb?function(l,f){return Gb.set(l,f),l}:ho,Cme=qb?function(l,f){return qb(l,"toString",{configurable:!0,enumerable:!1,value:aA(f),writable:!0})}:ho;function xme(l){return l3(Sm(l))}function da(l,f,p){var b=-1,S=l.length;f<0&&(f=-f>S?0:S+f),p=p>S?S:p,p<0&&(p+=S),S=f>p?0:p-f>>>0,f>>>=0;for(var M=re(S);++b<S;)M[b]=l[b+f];return M}function Ime(l,f){var p;return uf(l,function(b,S,M){return p=f(b,S,M),!p}),!!p}function e3(l,f,p){var b=0,S=l==null?b:l.length;if(typeof f=="number"&&f===f&&S<=P){for(;b<S;){var M=b+S>>>1,G=l[M];G!==null&&!Oo(G)&&(p?G<=f:G<f)?b=M+1:S=M}return S}return kI(l,f,ho,p)}function kI(l,f,p,b){var S=0,M=l==null?0:l.length;if(M===0)return 0;f=p(f);for(var G=f!==f,J=f===null,te=Oo(f),me=f===r;S<M;){var ge=zb((S+M)/2),Ee=p(l[ge]),Le=Ee!==r,tt=Ee===null,vt=Ee===Ee,Zt=Oo(Ee);if(G)var bt=b||vt;else me?bt=vt&&(b||Le):J?bt=vt&&Le&&(b||!tt):te?bt=vt&&Le&&!tt&&(b||!Zt):tt||Zt?bt=!1:bt=b?Ee<=f:Ee<f;bt?S=ge+1:M=ge}return ys(M,E)}function sB(l,f){for(var p=-1,b=l.length,S=0,M=[];++p<b;){var G=l[p],J=f?f(G):G;if(!p||!Ya(J,te)){var te=J;M[S++]=G===0?0:G}}return M}function oB(l){return typeof l=="number"?l:Oo(l)?$:+l}function No(l){if(typeof l=="string")return l;if(Pt(l))return Un(l,No)+"";if(Oo(l))return BF?BF.call(l):"";var f=l+"";return f=="0"&&1/l==-I?"-0":f}function ff(l,f,p){var b=-1,S=Mb,M=l.length,G=!0,J=[],te=J;if(p)G=!1,S=uI;else if(M>=i){var me=f?null:Lme(l);if(me)return kb(me);G=!1,S=fy,te=new Xd}else te=f?[]:J;e:for(;++b<M;){var ge=l[b],Ee=f?f(ge):ge;if(ge=p||ge!==0?ge:0,G&&Ee===Ee){for(var Le=te.length;Le--;)if(te[Le]===Ee)continue e;f&&te.push(Ee),J.push(ge)}else S(te,Ee,p)||(te!==J&&te.push(Ee),J.push(ge))}return J}function LI(l,f){return f=df(f,l),l=PB(l,f),l==null||delete l[Fc(ha(f))]}function aB(l,f,p,b){return Ey(l,f,p(th(l,f)),b)}function t3(l,f,p,b){for(var S=l.length,M=b?S:-1;(b?M--:++M<S)&&f(l[M],M,l););return p?da(l,b?0:M,b?M+1:S):da(l,b?M+1:0,b?S:M)}function cB(l,f){var p=l;return p instanceof fr&&(p=p.value()),fI(f,function(b,S){return S.func.apply(S.thisArg,af([b],S.args))},p)}function FI(l,f,p){var b=l.length;if(b<2)return b?ff(l[0]):[];for(var S=-1,M=re(b);++S<b;)for(var G=l[S],J=-1;++J<b;)J!=S&&(M[S]=wy(M[S]||G,l[J],f,p));return ff(ts(M,1),f,p)}function lB(l,f,p){for(var b=-1,S=l.length,M=f.length,G={};++b<S;){var J=b<M?f[b]:r;p(G,l[b],J)}return G}function BI(l){return pi(l)?l:[]}function UI(l){return typeof l=="function"?l:ho}function df(l,f){return Pt(l)?l:ZI(l,f)?[l]:BB(Or(l))}var Ame=Jt;function hf(l,f,p){var b=l.length;return p=p===r?b:p,!f&&p>=b?l:da(l,f,p)}var uB=hpe||function(l){return es.clearTimeout(l)};function fB(l,f){if(f)return l.slice();var p=l.length,b=OF?OF(p):new l.constructor(p);return l.copy(b),b}function jI(l){var f=new l.constructor(l.byteLength);return new Hb(f).set(new Hb(l)),f}function Sme(l,f){var p=f?jI(l.buffer):l.buffer;return new l.constructor(p,l.byteOffset,l.byteLength)}function Dme(l){var f=new l.constructor(l.source,sn.exec(l));return f.lastIndex=l.lastIndex,f}function Rme(l){return gy?on(gy.call(l)):{}}function dB(l,f){var p=f?jI(l.buffer):l.buffer;return new l.constructor(p,l.byteOffset,l.length)}function hB(l,f){if(l!==f){var p=l!==r,b=l===null,S=l===l,M=Oo(l),G=f!==r,J=f===null,te=f===f,me=Oo(f);if(!J&&!me&&!M&&l>f||M&&G&&te&&!J&&!me||b&&G&&te||!p&&te||!S)return 1;if(!b&&!M&&!me&&l<f||me&&p&&S&&!b&&!M||J&&p&&S||!G&&S||!te)return-1}return 0}function Tme(l,f,p){for(var b=-1,S=l.criteria,M=f.criteria,G=S.length,J=p.length;++b<G;){var te=hB(S[b],M[b]);if(te){if(b>=J)return te;var me=p[b];return te*(me=="desc"?-1:1)}}return l.index-f.index}function pB(l,f,p,b){for(var S=-1,M=l.length,G=p.length,J=-1,te=f.length,me=Ni(M-G,0),ge=re(te+me),Ee=!b;++J<te;)ge[J]=f[J];for(;++S<G;)(Ee||S<M)&&(ge[p[S]]=l[S]);for(;me--;)ge[J++]=l[S++];return ge}function mB(l,f,p,b){for(var S=-1,M=l.length,G=-1,J=p.length,te=-1,me=f.length,ge=Ni(M-J,0),Ee=re(ge+me),Le=!b;++S<ge;)Ee[S]=l[S];for(var tt=S;++te<me;)Ee[tt+te]=f[te];for(;++G<J;)(Le||S<M)&&(Ee[tt+p[G]]=l[S++]);return Ee}function lo(l,f){var p=-1,b=l.length;for(f||(f=re(b));++p<b;)f[p]=l[p];return f}function Lc(l,f,p,b){var S=!p;p||(p={});for(var M=-1,G=f.length;++M<G;){var J=f[M],te=b?b(p[J],l[J],J,p,l):r;te===r&&(te=l[J]),S?Vl(p,J,te):yy(p,J,te)}return p}function Nme(l,f){return Lc(l,GI(l),f)}function Ome(l,f){return Lc(l,DB(l),f)}function r3(l,f){return function(p,b){var S=Pt(p)?Fhe:eme,M=f?f():{};return S(p,l,pt(b,2),M)}}function Cm(l){return Jt(function(f,p){var b=-1,S=p.length,M=S>1?p[S-1]:r,G=S>2?p[2]:r;for(M=l.length>3&&typeof M=="function"?(S--,M):r,G&&Us(p[0],p[1],G)&&(M=S<3?r:M,S=1),f=on(f);++b<S;){var J=p[b];J&&l(f,J,b,M)}return f})}function gB(l,f){return function(p,b){if(p==null)return p;if(!uo(p))return l(p,b);for(var S=p.length,M=f?S:-1,G=on(p);(f?M--:++M<S)&&b(G[M],M,G)!==!1;);return p}}function yB(l){return function(f,p,b){for(var S=-1,M=on(f),G=b(f),J=G.length;J--;){var te=G[l?J:++S];if(p(M[te],te,M)===!1)break}return f}}function Mme(l,f,p){var b=f&A,S=_y(l);function M(){var G=this&&this!==es&&this instanceof M?S:l;return G.apply(b?p:this,arguments)}return M}function wB(l){return function(f){f=Or(f);var p=gm(f)?Ka(f):r,b=p?p[0]:f.charAt(0),S=p?hf(p,1).join(""):f.slice(1);return b[l]()+S}}function xm(l){return function(f){return fI(gU(mU(f).replace(Che,"")),l,"")}}function _y(l){return function(){var f=arguments;switch(f.length){case 0:return new l;case 1:return new l(f[0]);case 2:return new l(f[0],f[1]);case 3:return new l(f[0],f[1],f[2]);case 4:return new l(f[0],f[1],f[2],f[3]);case 5:return new l(f[0],f[1],f[2],f[3],f[4]);case 6:return new l(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new l(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var p=_m(l.prototype),b=l.apply(p,f);return qn(b)?b:p}}function Pme(l,f,p){var b=_y(l);function S(){for(var M=arguments.length,G=re(M),J=M,te=Im(S);J--;)G[J]=arguments[J];var me=M<3&&G[0]!==te&&G[M-1]!==te?[]:cf(G,te);if(M-=me.length,M<p)return CB(l,f,n3,S.placeholder,r,G,me,r,r,p-M);var ge=this&&this!==es&&this instanceof S?b:l;return Ro(ge,this,G)}return S}function vB(l){return function(f,p,b){var S=on(f);if(!uo(f)){var M=pt(p,3);f=Bi(f),p=function(J){return M(S[J],J,S)}}var G=l(f,p,b);return G>-1?S[M?f[G]:G]:r}}function bB(l){return ql(function(f){var p=f.length,b=p,S=ua.prototype.thru;for(l&&f.reverse();b--;){var M=f[b];if(typeof M!="function")throw new la(o);if(S&&!G&&a3(M)=="wrapper")var G=new ua([],!0)}for(b=G?b:p;++b<p;){M=f[b];var J=a3(M),te=J=="wrapper"?WI(M):r;te&&KI(te[0])&&te[1]==(k|U|Q|q)&&!te[4].length&&te[9]==1?G=G[a3(te[0])].apply(G,te[3]):G=M.length==1&&KI(M)?G[J]():G.thru(M)}return function(){var me=arguments,ge=me[0];if(G&&me.length==1&&Pt(ge))return G.plant(ge).value();for(var Ee=0,Le=p?f[Ee].apply(this,me):ge;++Ee<p;)Le=f[Ee].call(this,Le);return Le}})}function n3(l,f,p,b,S,M,G,J,te,me){var ge=f&k,Ee=f&A,Le=f&R,tt=f&(U|V),vt=f&ie,Zt=Le?r:_y(l);function bt(){for(var or=arguments.length,pr=re(or),Mo=or;Mo--;)pr[Mo]=arguments[Mo];if(tt)var js=Im(bt),Po=zhe(pr,js);if(b&&(pr=pB(pr,b,S,tt)),M&&(pr=mB(pr,M,G,tt)),or-=Po,tt&&or<me){var mi=cf(pr,js);return CB(l,f,n3,bt.placeholder,p,pr,mi,J,te,me-or)}var Qa=Ee?p:this,Zl=Le?Qa[l]:l;return or=pr.length,J?pr=ege(pr,J):vt&&or>1&&pr.reverse(),ge&&te<or&&(pr.length=te),this&&this!==es&&this instanceof bt&&(Zl=Zt||_y(Zl)),Zl.apply(Qa,pr)}return bt}function EB(l,f){return function(p,b){return cme(p,l,f(b),{})}}function i3(l,f){return function(p,b){var S;if(p===r&&b===r)return f;if(p!==r&&(S=p),b!==r){if(S===r)return b;typeof p=="string"||typeof b=="string"?(p=No(p),b=No(b)):(p=oB(p),b=oB(b)),S=l(p,b)}return S}}function HI(l){return ql(function(f){return f=Un(f,To(pt())),Jt(function(p){var b=this;return l(f,function(S){return Ro(S,b,p)})})})}function s3(l,f){f=f===r?" ":No(f);var p=f.length;if(p<2)return p?PI(f,l):f;var b=PI(f,Wb(l/ym(f)));return gm(f)?hf(Ka(b),0,l).join(""):b.slice(0,l)}function kme(l,f,p,b){var S=f&A,M=_y(l);function G(){for(var J=-1,te=arguments.length,me=-1,ge=b.length,Ee=re(ge+te),Le=this&&this!==es&&this instanceof G?M:l;++me<ge;)Ee[me]=b[me];for(;te--;)Ee[me++]=arguments[++J];return Ro(Le,S?p:this,Ee)}return G}function _B(l){return function(f,p,b){return b&&typeof b!="number"&&Us(f,p,b)&&(p=b=r),f=Gl(f),p===r?(p=f,f=0):p=Gl(p),b=b===r?f<p?1:-1:Gl(b),bme(f,p,b,l)}}function o3(l){return function(f,p){return typeof f=="string"&&typeof p=="string"||(f=pa(f),p=pa(p)),l(f,p)}}function CB(l,f,p,b,S,M,G,J,te,me){var ge=f&U,Ee=ge?G:r,Le=ge?r:G,tt=ge?M:r,vt=ge?r:M;f|=ge?Q:Y,f&=~(ge?Y:Q),f&L||(f&=~(A|R));var Zt=[l,f,S,tt,Ee,vt,Le,J,te,me],bt=p.apply(r,Zt);return KI(l)&&kB(bt,Zt),bt.placeholder=b,LB(bt,l,f)}function VI(l){var f=Ti[l];return function(p,b){if(p=pa(p),b=b==null?0:ys(qt(b),292),b&&LF(p)){var S=(Or(p)+"e").split("e"),M=f(S[0]+"e"+(+S[1]+b));return S=(Or(M)+"e").split("e"),+(S[0]+"e"+(+S[1]-b))}return f(p)}}var Lme=bm&&1/kb(new bm([,-0]))[1]==I?function(l){return new bm(l)}:uA;function xB(l){return function(f){var p=ws(f);return p==Fe?wI(f):p==hr?Xhe(f):Whe(f,l(f))}}function $l(l,f,p,b,S,M,G,J){var te=f&R;if(!te&&typeof l!="function")throw new la(o);var me=b?b.length:0;if(me||(f&=~(Q|Y),b=S=r),G=G===r?G:Ni(qt(G),0),J=J===r?J:qt(J),me-=S?S.length:0,f&Y){var ge=b,Ee=S;b=S=r}var Le=te?r:WI(l),tt=[l,f,p,b,S,ge,Ee,M,G,J];if(Le&&Yme(tt,Le),l=tt[0],f=tt[1],p=tt[2],b=tt[3],S=tt[4],J=tt[9]=tt[9]===r?te?0:l.length:Ni(tt[9]-me,0),!J&&f&(U|V)&&(f&=~(U|V)),!f||f==A)var vt=Mme(l,f,p);else f==U||f==V?vt=Pme(l,f,J):(f==Q||f==(A|Q))&&!S.length?vt=kme(l,f,p,b):vt=n3.apply(r,tt);var Zt=Le?iB:kB;return LB(Zt(vt,tt),l,f)}function IB(l,f,p,b){return l===r||Ya(l,vm[p])&&!jr.call(b,p)?f:l}function AB(l,f,p,b,S,M){return qn(l)&&qn(f)&&(M.set(f,l),Xb(l,f,r,AB,M),M.delete(f)),l}function Fme(l){return Iy(l)?r:l}function SB(l,f,p,b,S,M){var G=p&_,J=l.length,te=f.length;if(J!=te&&!(G&&te>J))return!1;var me=M.get(l),ge=M.get(f);if(me&&ge)return me==f&&ge==l;var Ee=-1,Le=!0,tt=p&C?new Xd:r;for(M.set(l,f),M.set(f,l);++Ee<J;){var vt=l[Ee],Zt=f[Ee];if(b)var bt=G?b(Zt,vt,Ee,f,l,M):b(vt,Zt,Ee,l,f,M);if(bt!==r){if(bt)continue;Le=!1;break}if(tt){if(!dI(f,function(or,pr){if(!fy(tt,pr)&&(vt===or||S(vt,or,p,b,M)))return tt.push(pr)})){Le=!1;break}}else if(!(vt===Zt||S(vt,Zt,p,b,M))){Le=!1;break}}return M.delete(l),M.delete(f),Le}function Bme(l,f,p,b,S,M,G){switch(p){case Do:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case Ur:return!(l.byteLength!=f.byteLength||!M(new Hb(l),new Hb(f)));case De:case Te:case Ye:return Ya(+l,+f);case Ue:return l.name==f.name&&l.message==f.message;case Br:case Ga:return l==f+"";case Fe:var J=wI;case hr:var te=b&_;if(J||(J=kb),l.size!=f.size&&!te)return!1;var me=G.get(l);if(me)return me==f;b|=C,G.set(l,f);var ge=SB(J(l),J(f),b,S,M,G);return G.delete(l),ge;case $r:if(gy)return gy.call(l)==gy.call(f)}return!1}function Ume(l,f,p,b,S,M){var G=p&_,J=$I(l),te=J.length,me=$I(f),ge=me.length;if(te!=ge&&!G)return!1;for(var Ee=te;Ee--;){var Le=J[Ee];if(!(G?Le in f:jr.call(f,Le)))return!1}var tt=M.get(l),vt=M.get(f);if(tt&&vt)return tt==f&&vt==l;var Zt=!0;M.set(l,f),M.set(f,l);for(var bt=G;++Ee<te;){Le=J[Ee];var or=l[Le],pr=f[Le];if(b)var Mo=G?b(pr,or,Le,f,l,M):b(or,pr,Le,l,f,M);if(!(Mo===r?or===pr||S(or,pr,p,b,M):Mo)){Zt=!1;break}bt||(bt=Le=="constructor")}if(Zt&&!bt){var js=l.constructor,Po=f.constructor;js!=Po&&"constructor"in l&&"constructor"in f&&!(typeof js=="function"&&js instanceof js&&typeof Po=="function"&&Po instanceof Po)&&(Zt=!1)}return M.delete(l),M.delete(f),Zt}function ql(l){return YI(MB(l,r,VB),l+"")}function $I(l){return GF(l,Bi,GI)}function qI(l){return GF(l,fo,DB)}var WI=Gb?function(l){return Gb.get(l)}:uA;function a3(l){for(var f=l.name+"",p=Em[f],b=jr.call(Em,f)?p.length:0;b--;){var S=p[b],M=S.func;if(M==null||M==l)return S.name}return f}function Im(l){var f=jr.call(O,"placeholder")?O:l;return f.placeholder}function pt(){var l=O.iteratee||cA;return l=l===cA?JF:l,arguments.length?l(arguments[0],arguments[1]):l}function c3(l,f){var p=l.__data__;return Gme(f)?p[typeof f=="string"?"string":"hash"]:p.map}function zI(l){for(var f=Bi(l),p=f.length;p--;){var b=f[p],S=l[b];f[p]=[b,S,NB(S)]}return f}function rh(l,f){var p=Jhe(l,f);return KF(p)?p:r}function jme(l){var f=jr.call(l,Yd),p=l[Yd];try{l[Yd]=r;var b=!0}catch{}var S=Ub.call(l);return b&&(f?l[Yd]=p:delete l[Yd]),S}var GI=bI?function(l){return l==null?[]:(l=on(l),of(bI(l),function(f){return PF.call(l,f)}))}:fA,DB=bI?function(l){for(var f=[];l;)af(f,GI(l)),l=Vb(l);return f}:fA,ws=Bs;(EI&&ws(new EI(new ArrayBuffer(1)))!=Do||hy&&ws(new hy)!=Fe||_I&&ws(_I.resolve())!=dn||bm&&ws(new bm)!=hr||py&&ws(new py)!=Za)&&(ws=function(l){var f=Bs(l),p=f==yr?l.constructor:r,b=p?nh(p):"";if(b)switch(b){case _pe:return Do;case Cpe:return Fe;case xpe:return dn;case Ipe:return hr;case Ape:return Za}return f});function Hme(l,f,p){for(var b=-1,S=p.length;++b<S;){var M=p[b],G=M.size;switch(M.type){case"drop":l+=G;break;case"dropRight":f-=G;break;case"take":f=ys(f,l+G);break;case"takeRight":l=Ni(l,f-G);break}}return{start:l,end:f}}function Vme(l){var f=l.match(bn);return f?f[1].split(En):[]}function RB(l,f,p){f=df(f,l);for(var b=-1,S=f.length,M=!1;++b<S;){var G=Fc(f[b]);if(!(M=l!=null&&p(l,G)))break;l=l[G]}return M||++b!=S?M:(S=l==null?0:l.length,!!S&&m3(S)&&Wl(G,S)&&(Pt(l)||ih(l)))}function $me(l){var f=l.length,p=new l.constructor(f);return f&&typeof l[0]=="string"&&jr.call(l,"index")&&(p.index=l.index,p.input=l.input),p}function TB(l){return typeof l.constructor=="function"&&!Cy(l)?_m(Vb(l)):{}}function qme(l,f,p){var b=l.constructor;switch(f){case Ur:return jI(l);case De:case Te:return new b(+l);case Do:return Sme(l,p);case qr:case Wr:case Rc:case zr:case Gr:case Tc:case Zr:case Kr:case Nc:return dB(l,p);case Fe:return new b;case Ye:case Ga:return new b(l);case Br:return Dme(l);case hr:return new b;case $r:return Rme(l)}}function Wme(l,f){var p=f.length;if(!p)return l;var b=p-1;return f[b]=(p>1?"& ":"")+f[b],f=f.join(p>2?", ":" "),l.replace(rf,`{
/* [wrapped with `+f+`] */
`)}function zme(l){return Pt(l)||ih(l)||!!(kF&&l&&l[kF])}function Wl(l,f){var p=typeof l;return f=f??T,!!f&&(p=="number"||p!="symbol"&&Pl.test(l))&&l>-1&&l%1==0&&l<f}function Us(l,f,p){if(!qn(p))return!1;var b=typeof f;return(b=="number"?uo(p)&&Wl(f,p.length):b=="string"&&f in p)?Ya(p[f],l):!1}function ZI(l,f){if(Pt(l))return!1;var p=typeof l;return p=="number"||p=="symbol"||p=="boolean"||l==null||Oo(l)?!0:ef.test(l)||!yn.test(l)||f!=null&&l in on(f)}function Gme(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function KI(l){var f=a3(l),p=O[f];if(typeof p!="function"||!(f in fr.prototype))return!1;if(l===p)return!0;var b=WI(p);return!!b&&l===b[0]}function Zme(l){return!!NF&&NF in l}var Kme=Fb?zl:dA;function Cy(l){var f=l&&l.constructor,p=typeof f=="function"&&f.prototype||vm;return l===p}function NB(l){return l===l&&!qn(l)}function OB(l,f){return function(p){return p==null?!1:p[l]===f&&(f!==r||l in on(p))}}function Jme(l){var f=h3(l,function(b){return p.size===u&&p.clear(),b}),p=f.cache;return f}function Yme(l,f){var p=l[1],b=f[1],S=p|b,M=S<(A|R|k),G=b==k&&p==U||b==k&&p==q&&l[7].length<=f[8]||b==(k|q)&&f[7].length<=f[8]&&p==U;if(!(M||G))return l;b&A&&(l[2]=f[2],S|=p&A?0:L);var J=f[3];if(J){var te=l[3];l[3]=te?pB(te,J,f[4]):J,l[4]=te?cf(l[3],d):f[4]}return J=f[5],J&&(te=l[5],l[5]=te?mB(te,J,f[6]):J,l[6]=te?cf(l[5],d):f[6]),J=f[7],J&&(l[7]=J),b&k&&(l[8]=l[8]==null?f[8]:ys(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=S,l}function Qme(l){var f=[];if(l!=null)for(var p in on(l))f.push(p);return f}function Xme(l){return Ub.call(l)}function MB(l,f,p){return f=Ni(f===r?l.length-1:f,0),function(){for(var b=arguments,S=-1,M=Ni(b.length-f,0),G=re(M);++S<M;)G[S]=b[f+S];S=-1;for(var J=re(f+1);++S<f;)J[S]=b[S];return J[f]=p(G),Ro(l,this,J)}}function PB(l,f){return f.length<2?l:th(l,da(f,0,-1))}function ege(l,f){for(var p=l.length,b=ys(f.length,p),S=lo(l);b--;){var M=f[b];l[b]=Wl(M,p)?S[M]:r}return l}function JI(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var kB=FB(iB),xy=mpe||function(l,f){return es.setTimeout(l,f)},YI=FB(Cme);function LB(l,f,p){var b=f+"";return YI(l,Wme(b,tge(Vme(b),p)))}function FB(l){var f=0,p=0;return function(){var b=vpe(),S=D-(b-p);if(p=b,S>0){if(++f>=X)return arguments[0]}else f=0;return l.apply(r,arguments)}}function l3(l,f){var p=-1,b=l.length,S=b-1;for(f=f===r?b:f;++p<f;){var M=MI(p,S),G=l[M];l[M]=l[p],l[p]=G}return l.length=f,l}var BB=Jme(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(wn,function(p,b,S,M){f.push(S?M.replace(Cn,"$1"):b||p)}),f});function Fc(l){if(typeof l=="string"||Oo(l))return l;var f=l+"";return f=="0"&&1/l==-I?"-0":f}function nh(l){if(l!=null){try{return Bb.call(l)}catch{}try{return l+""}catch{}}return""}function tge(l,f){return ca(ae,function(p){var b="_."+p[0];f&p[1]&&!Mb(l,b)&&l.push(b)}),l.sort()}function UB(l){if(l instanceof fr)return l.clone();var f=new ua(l.__wrapped__,l.__chain__);return f.__actions__=lo(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function rge(l,f,p){(p?Us(l,f,p):f===r)?f=1:f=Ni(qt(f),0);var b=l==null?0:l.length;if(!b||f<1)return[];for(var S=0,M=0,G=re(Wb(b/f));S<b;)G[M++]=da(l,S,S+=f);return G}function nge(l){for(var f=-1,p=l==null?0:l.length,b=0,S=[];++f<p;){var M=l[f];M&&(S[b++]=M)}return S}function ige(){var l=arguments.length;if(!l)return[];for(var f=re(l-1),p=arguments[0],b=l;b--;)f[b-1]=arguments[b];return af(Pt(p)?lo(p):[p],ts(f,1))}var sge=Jt(function(l,f){return pi(l)?wy(l,ts(f,1,pi,!0)):[]}),oge=Jt(function(l,f){var p=ha(f);return pi(p)&&(p=r),pi(l)?wy(l,ts(f,1,pi,!0),pt(p,2)):[]}),age=Jt(function(l,f){var p=ha(f);return pi(p)&&(p=r),pi(l)?wy(l,ts(f,1,pi,!0),r,p):[]});function cge(l,f,p){var b=l==null?0:l.length;return b?(f=p||f===r?1:qt(f),da(l,f<0?0:f,b)):[]}function lge(l,f,p){var b=l==null?0:l.length;return b?(f=p||f===r?1:qt(f),f=b-f,da(l,0,f<0?0:f)):[]}function uge(l,f){return l&&l.length?t3(l,pt(f,3),!0,!0):[]}function fge(l,f){return l&&l.length?t3(l,pt(f,3),!0):[]}function dge(l,f,p,b){var S=l==null?0:l.length;return S?(p&&typeof p!="number"&&Us(l,f,p)&&(p=0,b=S),ime(l,f,p,b)):[]}function jB(l,f,p){var b=l==null?0:l.length;if(!b)return-1;var S=p==null?0:qt(p);return S<0&&(S=Ni(b+S,0)),Pb(l,pt(f,3),S)}function HB(l,f,p){var b=l==null?0:l.length;if(!b)return-1;var S=b-1;return p!==r&&(S=qt(p),S=p<0?Ni(b+S,0):ys(S,b-1)),Pb(l,pt(f,3),S,!0)}function VB(l){var f=l==null?0:l.length;return f?ts(l,1):[]}function hge(l){var f=l==null?0:l.length;return f?ts(l,I):[]}function pge(l,f){var p=l==null?0:l.length;return p?(f=f===r?1:qt(f),ts(l,f)):[]}function mge(l){for(var f=-1,p=l==null?0:l.length,b={};++f<p;){var S=l[f];b[S[0]]=S[1]}return b}function $B(l){return l&&l.length?l[0]:r}function gge(l,f,p){var b=l==null?0:l.length;if(!b)return-1;var S=p==null?0:qt(p);return S<0&&(S=Ni(b+S,0)),mm(l,f,S)}function yge(l){var f=l==null?0:l.length;return f?da(l,0,-1):[]}var wge=Jt(function(l){var f=Un(l,BI);return f.length&&f[0]===l[0]?DI(f):[]}),vge=Jt(function(l){var f=ha(l),p=Un(l,BI);return f===ha(p)?f=r:p.pop(),p.length&&p[0]===l[0]?DI(p,pt(f,2)):[]}),bge=Jt(function(l){var f=ha(l),p=Un(l,BI);return f=typeof f=="function"?f:r,f&&p.pop(),p.length&&p[0]===l[0]?DI(p,r,f):[]});function Ege(l,f){return l==null?"":ype.call(l,f)}function ha(l){var f=l==null?0:l.length;return f?l[f-1]:r}function _ge(l,f,p){var b=l==null?0:l.length;if(!b)return-1;var S=b;return p!==r&&(S=qt(p),S=S<0?Ni(b+S,0):ys(S,b-1)),f===f?tpe(l,f,S):Pb(l,CF,S,!0)}function Cge(l,f){return l&&l.length?eB(l,qt(f)):r}var xge=Jt(qB);function qB(l,f){return l&&l.length&&f&&f.length?OI(l,f):l}function Ige(l,f,p){return l&&l.length&&f&&f.length?OI(l,f,pt(p,2)):l}function Age(l,f,p){return l&&l.length&&f&&f.length?OI(l,f,r,p):l}var Sge=ql(function(l,f){var p=l==null?0:l.length,b=xI(l,f);return nB(l,Un(f,function(S){return Wl(S,p)?+S:S}).sort(hB)),b});function Dge(l,f){var p=[];if(!(l&&l.length))return p;var b=-1,S=[],M=l.length;for(f=pt(f,3);++b<M;){var G=l[b];f(G,b,l)&&(p.push(G),S.push(b))}return nB(l,S),p}function QI(l){return l==null?l:Epe.call(l)}function Rge(l,f,p){var b=l==null?0:l.length;return b?(p&&typeof p!="number"&&Us(l,f,p)?(f=0,p=b):(f=f==null?0:qt(f),p=p===r?b:qt(p)),da(l,f,p)):[]}function Tge(l,f){return e3(l,f)}function Nge(l,f,p){return kI(l,f,pt(p,2))}function Oge(l,f){var p=l==null?0:l.length;if(p){var b=e3(l,f);if(b<p&&Ya(l[b],f))return b}return-1}function Mge(l,f){return e3(l,f,!0)}function Pge(l,f,p){return kI(l,f,pt(p,2),!0)}function kge(l,f){var p=l==null?0:l.length;if(p){var b=e3(l,f,!0)-1;if(Ya(l[b],f))return b}return-1}function Lge(l){return l&&l.length?sB(l):[]}function Fge(l,f){return l&&l.length?sB(l,pt(f,2)):[]}function Bge(l){var f=l==null?0:l.length;return f?da(l,1,f):[]}function Uge(l,f,p){return l&&l.length?(f=p||f===r?1:qt(f),da(l,0,f<0?0:f)):[]}function jge(l,f,p){var b=l==null?0:l.length;return b?(f=p||f===r?1:qt(f),f=b-f,da(l,f<0?0:f,b)):[]}function Hge(l,f){return l&&l.length?t3(l,pt(f,3),!1,!0):[]}function Vge(l,f){return l&&l.length?t3(l,pt(f,3)):[]}var $ge=Jt(function(l){return ff(ts(l,1,pi,!0))}),qge=Jt(function(l){var f=ha(l);return pi(f)&&(f=r),ff(ts(l,1,pi,!0),pt(f,2))}),Wge=Jt(function(l){var f=ha(l);return f=typeof f=="function"?f:r,ff(ts(l,1,pi,!0),r,f)});function zge(l){return l&&l.length?ff(l):[]}function Gge(l,f){return l&&l.length?ff(l,pt(f,2)):[]}function Zge(l,f){return f=typeof f=="function"?f:r,l&&l.length?ff(l,r,f):[]}function XI(l){if(!(l&&l.length))return[];var f=0;return l=of(l,function(p){if(pi(p))return f=Ni(p.length,f),!0}),gI(f,function(p){return Un(l,hI(p))})}function WB(l,f){if(!(l&&l.length))return[];var p=XI(l);return f==null?p:Un(p,function(b){return Ro(f,r,b)})}var Kge=Jt(function(l,f){return pi(l)?wy(l,f):[]}),Jge=Jt(function(l){return FI(of(l,pi))}),Yge=Jt(function(l){var f=ha(l);return pi(f)&&(f=r),FI(of(l,pi),pt(f,2))}),Qge=Jt(function(l){var f=ha(l);return f=typeof f=="function"?f:r,FI(of(l,pi),r,f)}),Xge=Jt(XI);function e0e(l,f){return lB(l||[],f||[],yy)}function t0e(l,f){return lB(l||[],f||[],Ey)}var r0e=Jt(function(l){var f=l.length,p=f>1?l[f-1]:r;return p=typeof p=="function"?(l.pop(),p):r,WB(l,p)});function zB(l){var f=O(l);return f.__chain__=!0,f}function n0e(l,f){return f(l),l}function u3(l,f){return f(l)}var i0e=ql(function(l){var f=l.length,p=f?l[0]:0,b=this.__wrapped__,S=function(M){return xI(M,l)};return f>1||this.__actions__.length||!(b instanceof fr)||!Wl(p)?this.thru(S):(b=b.slice(p,+p+(f?1:0)),b.__actions__.push({func:u3,args:[S],thisArg:r}),new ua(b,this.__chain__).thru(function(M){return f&&!M.length&&M.push(r),M}))});function s0e(){return zB(this)}function o0e(){return new ua(this.value(),this.__chain__)}function a0e(){this.__values__===r&&(this.__values__=oU(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function c0e(){return this}function l0e(l){for(var f,p=this;p instanceof Kb;){var b=UB(p);b.__index__=0,b.__values__=r,f?S.__wrapped__=b:f=b;var S=b;p=p.__wrapped__}return S.__wrapped__=l,f}function u0e(){var l=this.__wrapped__;if(l instanceof fr){var f=l;return this.__actions__.length&&(f=new fr(this)),f=f.reverse(),f.__actions__.push({func:u3,args:[QI],thisArg:r}),new ua(f,this.__chain__)}return this.thru(QI)}function f0e(){return cB(this.__wrapped__,this.__actions__)}var d0e=r3(function(l,f,p){jr.call(l,p)?++l[p]:Vl(l,p,1)});function h0e(l,f,p){var b=Pt(l)?EF:nme;return p&&Us(l,f,p)&&(f=r),b(l,pt(f,3))}function p0e(l,f){var p=Pt(l)?of:WF;return p(l,pt(f,3))}var m0e=vB(jB),g0e=vB(HB);function y0e(l,f){return ts(f3(l,f),1)}function w0e(l,f){return ts(f3(l,f),I)}function v0e(l,f,p){return p=p===r?1:qt(p),ts(f3(l,f),p)}function GB(l,f){var p=Pt(l)?ca:uf;return p(l,pt(f,3))}function ZB(l,f){var p=Pt(l)?Bhe:qF;return p(l,pt(f,3))}var b0e=r3(function(l,f,p){jr.call(l,p)?l[p].push(f):Vl(l,p,[f])});function E0e(l,f,p,b){l=uo(l)?l:Sm(l),p=p&&!b?qt(p):0;var S=l.length;return p<0&&(p=Ni(S+p,0)),g3(l)?p<=S&&l.indexOf(f,p)>-1:!!S&&mm(l,f,p)>-1}var _0e=Jt(function(l,f,p){var b=-1,S=typeof f=="function",M=uo(l)?re(l.length):[];return uf(l,function(G){M[++b]=S?Ro(f,G,p):vy(G,f,p)}),M}),C0e=r3(function(l,f,p){Vl(l,p,f)});function f3(l,f){var p=Pt(l)?Un:YF;return p(l,pt(f,3))}function x0e(l,f,p,b){return l==null?[]:(Pt(f)||(f=f==null?[]:[f]),p=b?r:p,Pt(p)||(p=p==null?[]:[p]),tB(l,f,p))}var I0e=r3(function(l,f,p){l[p?0:1].push(f)},function(){return[[],[]]});function A0e(l,f,p){var b=Pt(l)?fI:IF,S=arguments.length<3;return b(l,pt(f,4),p,S,uf)}function S0e(l,f,p){var b=Pt(l)?Uhe:IF,S=arguments.length<3;return b(l,pt(f,4),p,S,qF)}function D0e(l,f){var p=Pt(l)?of:WF;return p(l,p3(pt(f,3)))}function R0e(l){var f=Pt(l)?jF:Eme;return f(l)}function T0e(l,f,p){(p?Us(l,f,p):f===r)?f=1:f=qt(f);var b=Pt(l)?Qpe:_me;return b(l,f)}function N0e(l){var f=Pt(l)?Xpe:xme;return f(l)}function O0e(l){if(l==null)return 0;if(uo(l))return g3(l)?ym(l):l.length;var f=ws(l);return f==Fe||f==hr?l.size:TI(l).length}function M0e(l,f,p){var b=Pt(l)?dI:Ime;return p&&Us(l,f,p)&&(f=r),b(l,pt(f,3))}var P0e=Jt(function(l,f){if(l==null)return[];var p=f.length;return p>1&&Us(l,f[0],f[1])?f=[]:p>2&&Us(f[0],f[1],f[2])&&(f=[f[0]]),tB(l,ts(f,1),[])}),d3=ppe||function(){return es.Date.now()};function k0e(l,f){if(typeof f!="function")throw new la(o);return l=qt(l),function(){if(--l<1)return f.apply(this,arguments)}}function KB(l,f,p){return f=p?r:f,f=l&&f==null?l.length:f,$l(l,k,r,r,r,r,f)}function JB(l,f){var p;if(typeof f!="function")throw new la(o);return l=qt(l),function(){return--l>0&&(p=f.apply(this,arguments)),l<=1&&(f=r),p}}var eA=Jt(function(l,f,p){var b=A;if(p.length){var S=cf(p,Im(eA));b|=Q}return $l(l,b,f,p,S)}),YB=Jt(function(l,f,p){var b=A|R;if(p.length){var S=cf(p,Im(YB));b|=Q}return $l(f,b,l,p,S)});function QB(l,f,p){f=p?r:f;var b=$l(l,U,r,r,r,r,r,f);return b.placeholder=QB.placeholder,b}function XB(l,f,p){f=p?r:f;var b=$l(l,V,r,r,r,r,r,f);return b.placeholder=XB.placeholder,b}function eU(l,f,p){var b,S,M,G,J,te,me=0,ge=!1,Ee=!1,Le=!0;if(typeof l!="function")throw new la(o);f=pa(f)||0,qn(p)&&(ge=!!p.leading,Ee="maxWait"in p,M=Ee?Ni(pa(p.maxWait)||0,f):M,Le="trailing"in p?!!p.trailing:Le);function tt(mi){var Qa=b,Zl=S;return b=S=r,me=mi,G=l.apply(Zl,Qa),G}function vt(mi){return me=mi,J=xy(or,f),ge?tt(mi):G}function Zt(mi){var Qa=mi-te,Zl=mi-me,vU=f-Qa;return Ee?ys(vU,M-Zl):vU}function bt(mi){var Qa=mi-te,Zl=mi-me;return te===r||Qa>=f||Qa<0||Ee&&Zl>=M}function or(){var mi=d3();if(bt(mi))return pr(mi);J=xy(or,Zt(mi))}function pr(mi){return J=r,Le&&b?tt(mi):(b=S=r,G)}function Mo(){J!==r&&uB(J),me=0,b=te=S=J=r}function js(){return J===r?G:pr(d3())}function Po(){var mi=d3(),Qa=bt(mi);if(b=arguments,S=this,te=mi,Qa){if(J===r)return vt(te);if(Ee)return uB(J),J=xy(or,f),tt(te)}return J===r&&(J=xy(or,f)),G}return Po.cancel=Mo,Po.flush=js,Po}var L0e=Jt(function(l,f){return $F(l,1,f)}),F0e=Jt(function(l,f,p){return $F(l,pa(f)||0,p)});function B0e(l){return $l(l,ie)}function h3(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new la(o);var p=function(){var b=arguments,S=f?f.apply(this,b):b[0],M=p.cache;if(M.has(S))return M.get(S);var G=l.apply(this,b);return p.cache=M.set(S,G)||M,G};return p.cache=new(h3.Cache||Hl),p}h3.Cache=Hl;function p3(l){if(typeof l!="function")throw new la(o);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function U0e(l){return JB(2,l)}var j0e=Ame(function(l,f){f=f.length==1&&Pt(f[0])?Un(f[0],To(pt())):Un(ts(f,1),To(pt()));var p=f.length;return Jt(function(b){for(var S=-1,M=ys(b.length,p);++S<M;)b[S]=f[S].call(this,b[S]);return Ro(l,this,b)})}),tA=Jt(function(l,f){var p=cf(f,Im(tA));return $l(l,Q,r,f,p)}),tU=Jt(function(l,f){var p=cf(f,Im(tU));return $l(l,Y,r,f,p)}),H0e=ql(function(l,f){return $l(l,q,r,r,r,f)});function V0e(l,f){if(typeof l!="function")throw new la(o);return f=f===r?f:qt(f),Jt(l,f)}function $0e(l,f){if(typeof l!="function")throw new la(o);return f=f==null?0:Ni(qt(f),0),Jt(function(p){var b=p[f],S=hf(p,0,f);return b&&af(S,b),Ro(l,this,S)})}function q0e(l,f,p){var b=!0,S=!0;if(typeof l!="function")throw new la(o);return qn(p)&&(b="leading"in p?!!p.leading:b,S="trailing"in p?!!p.trailing:S),eU(l,f,{leading:b,maxWait:f,trailing:S})}function W0e(l){return KB(l,1)}function z0e(l,f){return tA(UI(f),l)}function G0e(){if(!arguments.length)return[];var l=arguments[0];return Pt(l)?l:[l]}function Z0e(l){return fa(l,w)}function K0e(l,f){return f=typeof f=="function"?f:r,fa(l,w,f)}function J0e(l){return fa(l,h|w)}function Y0e(l,f){return f=typeof f=="function"?f:r,fa(l,h|w,f)}function Q0e(l,f){return f==null||VF(l,f,Bi(f))}function Ya(l,f){return l===f||l!==l&&f!==f}var X0e=o3(SI),e1e=o3(function(l,f){return l>=f}),ih=ZF(function(){return arguments}())?ZF:function(l){return ri(l)&&jr.call(l,"callee")&&!PF.call(l,"callee")},Pt=re.isArray,t1e=mF?To(mF):lme;function uo(l){return l!=null&&m3(l.length)&&!zl(l)}function pi(l){return ri(l)&&uo(l)}function r1e(l){return l===!0||l===!1||ri(l)&&Bs(l)==De}var pf=gpe||dA,n1e=gF?To(gF):ume;function i1e(l){return ri(l)&&l.nodeType===1&&!Iy(l)}function s1e(l){if(l==null)return!0;if(uo(l)&&(Pt(l)||typeof l=="string"||typeof l.splice=="function"||pf(l)||Am(l)||ih(l)))return!l.length;var f=ws(l);if(f==Fe||f==hr)return!l.size;if(Cy(l))return!TI(l).length;for(var p in l)if(jr.call(l,p))return!1;return!0}function o1e(l,f){return by(l,f)}function a1e(l,f,p){p=typeof p=="function"?p:r;var b=p?p(l,f):r;return b===r?by(l,f,r,p):!!b}function rA(l){if(!ri(l))return!1;var f=Bs(l);return f==Ue||f==st||typeof l.message=="string"&&typeof l.name=="string"&&!Iy(l)}function c1e(l){return typeof l=="number"&&LF(l)}function zl(l){if(!qn(l))return!1;var f=Bs(l);return f==Oe||f==_t||f==pe||f==Kd}function rU(l){return typeof l=="number"&&l==qt(l)}function m3(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=T}function qn(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function ri(l){return l!=null&&typeof l=="object"}var nU=yF?To(yF):dme;function l1e(l,f){return l===f||RI(l,f,zI(f))}function u1e(l,f,p){return p=typeof p=="function"?p:r,RI(l,f,zI(f),p)}function f1e(l){return iU(l)&&l!=+l}function d1e(l){if(Kme(l))throw new Nt(s);return KF(l)}function h1e(l){return l===null}function p1e(l){return l==null}function iU(l){return typeof l=="number"||ri(l)&&Bs(l)==Ye}function Iy(l){if(!ri(l)||Bs(l)!=yr)return!1;var f=Vb(l);if(f===null)return!0;var p=jr.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&Bb.call(p)==upe}var nA=wF?To(wF):hme;function m1e(l){return rU(l)&&l>=-T&&l<=T}var sU=vF?To(vF):pme;function g3(l){return typeof l=="string"||!Pt(l)&&ri(l)&&Bs(l)==Ga}function Oo(l){return typeof l=="symbol"||ri(l)&&Bs(l)==$r}var Am=bF?To(bF):mme;function g1e(l){return l===r}function y1e(l){return ri(l)&&ws(l)==Za}function w1e(l){return ri(l)&&Bs(l)==On}var v1e=o3(NI),b1e=o3(function(l,f){return l<=f});function oU(l){if(!l)return[];if(uo(l))return g3(l)?Ka(l):lo(l);if(dy&&l[dy])return Qhe(l[dy]());var f=ws(l),p=f==Fe?wI:f==hr?kb:Sm;return p(l)}function Gl(l){if(!l)return l===0?l:0;if(l=pa(l),l===I||l===-I){var f=l<0?-1:1;return f*H}return l===l?l:0}function qt(l){var f=Gl(l),p=f%1;return f===f?p?f-p:f:0}function aU(l){return l?eh(qt(l),0,N):0}function pa(l){if(typeof l=="number")return l;if(Oo(l))return $;if(qn(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=qn(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=AF(l);var p=Nl.test(l);return p||Ml.test(l)?khe(l.slice(2),p?2:8):xn.test(l)?$:+l}function cU(l){return Lc(l,fo(l))}function E1e(l){return l?eh(qt(l),-T,T):l===0?l:0}function Or(l){return l==null?"":No(l)}var _1e=Cm(function(l,f){if(Cy(f)||uo(f)){Lc(f,Bi(f),l);return}for(var p in f)jr.call(f,p)&&yy(l,p,f[p])}),lU=Cm(function(l,f){Lc(f,fo(f),l)}),y3=Cm(function(l,f,p,b){Lc(f,fo(f),l,b)}),C1e=Cm(function(l,f,p,b){Lc(f,Bi(f),l,b)}),x1e=ql(xI);function I1e(l,f){var p=_m(l);return f==null?p:HF(p,f)}var A1e=Jt(function(l,f){l=on(l);var p=-1,b=f.length,S=b>2?f[2]:r;for(S&&Us(f[0],f[1],S)&&(b=1);++p<b;)for(var M=f[p],G=fo(M),J=-1,te=G.length;++J<te;){var me=G[J],ge=l[me];(ge===r||Ya(ge,vm[me])&&!jr.call(l,me))&&(l[me]=M[me])}return l}),S1e=Jt(function(l){return l.push(r,AB),Ro(uU,r,l)});function D1e(l,f){return _F(l,pt(f,3),kc)}function R1e(l,f){return _F(l,pt(f,3),AI)}function T1e(l,f){return l==null?l:II(l,pt(f,3),fo)}function N1e(l,f){return l==null?l:zF(l,pt(f,3),fo)}function O1e(l,f){return l&&kc(l,pt(f,3))}function M1e(l,f){return l&&AI(l,pt(f,3))}function P1e(l){return l==null?[]:Qb(l,Bi(l))}function k1e(l){return l==null?[]:Qb(l,fo(l))}function iA(l,f,p){var b=l==null?r:th(l,f);return b===r?p:b}function L1e(l,f){return l!=null&&RB(l,f,sme)}function sA(l,f){return l!=null&&RB(l,f,ome)}var F1e=EB(function(l,f,p){f!=null&&typeof f.toString!="function"&&(f=Ub.call(f)),l[f]=p},aA(ho)),B1e=EB(function(l,f,p){f!=null&&typeof f.toString!="function"&&(f=Ub.call(f)),jr.call(l,f)?l[f].push(p):l[f]=[p]},pt),U1e=Jt(vy);function Bi(l){return uo(l)?UF(l):TI(l)}function fo(l){return uo(l)?UF(l,!0):gme(l)}function j1e(l,f){var p={};return f=pt(f,3),kc(l,function(b,S,M){Vl(p,f(b,S,M),b)}),p}function H1e(l,f){var p={};return f=pt(f,3),kc(l,function(b,S,M){Vl(p,S,f(b,S,M))}),p}var V1e=Cm(function(l,f,p){Xb(l,f,p)}),uU=Cm(function(l,f,p,b){Xb(l,f,p,b)}),$1e=ql(function(l,f){var p={};if(l==null)return p;var b=!1;f=Un(f,function(M){return M=df(M,l),b||(b=M.length>1),M}),Lc(l,qI(l),p),b&&(p=fa(p,h|m|w,Fme));for(var S=f.length;S--;)LI(p,f[S]);return p});function q1e(l,f){return fU(l,p3(pt(f)))}var W1e=ql(function(l,f){return l==null?{}:wme(l,f)});function fU(l,f){if(l==null)return{};var p=Un(qI(l),function(b){return[b]});return f=pt(f),rB(l,p,function(b,S){return f(b,S[0])})}function z1e(l,f,p){f=df(f,l);var b=-1,S=f.length;for(S||(S=1,l=r);++b<S;){var M=l==null?r:l[Fc(f[b])];M===r&&(b=S,M=p),l=zl(M)?M.call(l):M}return l}function G1e(l,f,p){return l==null?l:Ey(l,f,p)}function Z1e(l,f,p,b){return b=typeof b=="function"?b:r,l==null?l:Ey(l,f,p,b)}var dU=xB(Bi),hU=xB(fo);function K1e(l,f,p){var b=Pt(l),S=b||pf(l)||Am(l);if(f=pt(f,4),p==null){var M=l&&l.constructor;S?p=b?new M:[]:qn(l)?p=zl(M)?_m(Vb(l)):{}:p={}}return(S?ca:kc)(l,function(G,J,te){return f(p,G,J,te)}),p}function J1e(l,f){return l==null?!0:LI(l,f)}function Y1e(l,f,p){return l==null?l:aB(l,f,UI(p))}function Q1e(l,f,p,b){return b=typeof b=="function"?b:r,l==null?l:aB(l,f,UI(p),b)}function Sm(l){return l==null?[]:yI(l,Bi(l))}function X1e(l){return l==null?[]:yI(l,fo(l))}function eye(l,f,p){return p===r&&(p=f,f=r),p!==r&&(p=pa(p),p=p===p?p:0),f!==r&&(f=pa(f),f=f===f?f:0),eh(pa(l),f,p)}function tye(l,f,p){return f=Gl(f),p===r?(p=f,f=0):p=Gl(p),l=pa(l),ame(l,f,p)}function rye(l,f,p){if(p&&typeof p!="boolean"&&Us(l,f,p)&&(f=p=r),p===r&&(typeof f=="boolean"?(p=f,f=r):typeof l=="boolean"&&(p=l,l=r)),l===r&&f===r?(l=0,f=1):(l=Gl(l),f===r?(f=l,l=0):f=Gl(f)),l>f){var b=l;l=f,f=b}if(p||l%1||f%1){var S=FF();return ys(l+S*(f-l+Phe("1e-"+((S+"").length-1))),f)}return MI(l,f)}var nye=xm(function(l,f,p){return f=f.toLowerCase(),l+(p?pU(f):f)});function pU(l){return oA(Or(l).toLowerCase())}function mU(l){return l=Or(l),l&&l.replace(kl,Ghe).replace(xhe,"")}function iye(l,f,p){l=Or(l),f=No(f);var b=l.length;p=p===r?b:eh(qt(p),0,b);var S=p;return p-=f.length,p>=0&&l.slice(p,S)==f}function sye(l){return l=Or(l),l&&mn.test(l)?l.replace(rn,Zhe):l}function oye(l){return l=Or(l),l&&tf.test(l)?l.replace(Jr,"\\$&"):l}var aye=xm(function(l,f,p){return l+(p?"-":"")+f.toLowerCase()}),cye=xm(function(l,f,p){return l+(p?" ":"")+f.toLowerCase()}),lye=wB("toLowerCase");function uye(l,f,p){l=Or(l),f=qt(f);var b=f?ym(l):0;if(!f||b>=f)return l;var S=(f-b)/2;return s3(zb(S),p)+l+s3(Wb(S),p)}function fye(l,f,p){l=Or(l),f=qt(f);var b=f?ym(l):0;return f&&b<f?l+s3(f-b,p):l}function dye(l,f,p){l=Or(l),f=qt(f);var b=f?ym(l):0;return f&&b<f?s3(f-b,p)+l:l}function hye(l,f,p){return p||f==null?f=0:f&&(f=+f),bpe(Or(l).replace(Yr,""),f||0)}function pye(l,f,p){return(p?Us(l,f,p):f===r)?f=1:f=qt(f),PI(Or(l),f)}function mye(){var l=arguments,f=Or(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var gye=xm(function(l,f,p){return l+(p?"_":"")+f.toLowerCase()});function yye(l,f,p){return p&&typeof p!="number"&&Us(l,f,p)&&(f=p=r),p=p===r?N:p>>>0,p?(l=Or(l),l&&(typeof f=="string"||f!=null&&!nA(f))&&(f=No(f),!f&&gm(l))?hf(Ka(l),0,p):l.split(f,p)):[]}var wye=xm(function(l,f,p){return l+(p?" ":"")+oA(f)});function vye(l,f,p){return l=Or(l),p=p==null?0:eh(qt(p),0,l.length),f=No(f),l.slice(p,p+f.length)==f}function bye(l,f,p){var b=O.templateSettings;p&&Us(l,f,p)&&(f=r),l=Or(l),f=y3({},f,b,IB);var S=y3({},f.imports,b.imports,IB),M=Bi(S),G=yI(S,M),J,te,me=0,ge=f.interpolate||sa,Ee="__p += '",Le=vI((f.escape||sa).source+"|"+ge.source+"|"+(ge===nn?sf:sa).source+"|"+(f.evaluate||sa).source+"|$","g"),tt="//# sourceURL="+(jr.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Rhe+"]")+`
`;l.replace(Le,function(bt,or,pr,Mo,js,Po){return pr||(pr=Mo),Ee+=l.slice(me,Po).replace(Ll,Khe),or&&(J=!0,Ee+=`' +
__e(`+or+`) +
'`),js&&(te=!0,Ee+=`';
`+js+`;
__p += '`),pr&&(Ee+=`' +
((__t = (`+pr+`)) == null ? '' : __t) +
'`),me=Po+bt.length,bt}),Ee+=`';
`;var vt=jr.call(f,"variable")&&f.variable;if(!vt)Ee=`with (obj) {
`+Ee+`
}
`;else if(_n.test(vt))throw new Nt(a);Ee=(te?Ee.replace(hn,""):Ee).replace(pn,"$1").replace(Yu,"$1;"),Ee="function("+(vt||"obj")+`) {
`+(vt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(J?", __e = _.escape":"")+(te?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Ee+`return __p
}`;var Zt=yU(function(){return Tr(M,tt+"return "+Ee).apply(r,G)});if(Zt.source=Ee,rA(Zt))throw Zt;return Zt}function Eye(l){return Or(l).toLowerCase()}function _ye(l){return Or(l).toUpperCase()}function Cye(l,f,p){if(l=Or(l),l&&(p||f===r))return AF(l);if(!l||!(f=No(f)))return l;var b=Ka(l),S=Ka(f),M=SF(b,S),G=DF(b,S)+1;return hf(b,M,G).join("")}function xye(l,f,p){if(l=Or(l),l&&(p||f===r))return l.slice(0,TF(l)+1);if(!l||!(f=No(f)))return l;var b=Ka(l),S=DF(b,Ka(f))+1;return hf(b,0,S).join("")}function Iye(l,f,p){if(l=Or(l),l&&(p||f===r))return l.replace(Yr,"");if(!l||!(f=No(f)))return l;var b=Ka(l),S=SF(b,Ka(f));return hf(b,S).join("")}function Aye(l,f){var p=W,b=z;if(qn(f)){var S="separator"in f?f.separator:S;p="length"in f?qt(f.length):p,b="omission"in f?No(f.omission):b}l=Or(l);var M=l.length;if(gm(l)){var G=Ka(l);M=G.length}if(p>=M)return l;var J=p-ym(b);if(J<1)return b;var te=G?hf(G,0,J).join(""):l.slice(0,J);if(S===r)return te+b;if(G&&(J+=te.length-J),nA(S)){if(l.slice(J).search(S)){var me,ge=te;for(S.global||(S=vI(S.source,Or(sn.exec(S))+"g")),S.lastIndex=0;me=S.exec(ge);)var Ee=me.index;te=te.slice(0,Ee===r?J:Ee)}}else if(l.indexOf(No(S),J)!=J){var Le=te.lastIndexOf(S);Le>-1&&(te=te.slice(0,Le))}return te+b}function Sye(l){return l=Or(l),l&&Qu.test(l)?l.replace(tn,rpe):l}var Dye=xm(function(l,f,p){return l+(p?" ":"")+f.toUpperCase()}),oA=wB("toUpperCase");function gU(l,f,p){return l=Or(l),f=p?r:f,f===r?Yhe(l)?spe(l):Vhe(l):l.match(f)||[]}var yU=Jt(function(l,f){try{return Ro(l,r,f)}catch(p){return rA(p)?p:new Nt(p)}}),Rye=ql(function(l,f){return ca(f,function(p){p=Fc(p),Vl(l,p,eA(l[p],l))}),l});function Tye(l){var f=l==null?0:l.length,p=pt();return l=f?Un(l,function(b){if(typeof b[1]!="function")throw new la(o);return[p(b[0]),b[1]]}):[],Jt(function(b){for(var S=-1;++S<f;){var M=l[S];if(Ro(M[0],this,b))return Ro(M[1],this,b)}})}function Nye(l){return rme(fa(l,h))}function aA(l){return function(){return l}}function Oye(l,f){return l==null||l!==l?f:l}var Mye=bB(),Pye=bB(!0);function ho(l){return l}function cA(l){return JF(typeof l=="function"?l:fa(l,h))}function kye(l){return QF(fa(l,h))}function Lye(l,f){return XF(l,fa(f,h))}var Fye=Jt(function(l,f){return function(p){return vy(p,l,f)}}),Bye=Jt(function(l,f){return function(p){return vy(l,p,f)}});function lA(l,f,p){var b=Bi(f),S=Qb(f,b);p==null&&!(qn(f)&&(S.length||!b.length))&&(p=f,f=l,l=this,S=Qb(f,Bi(f)));var M=!(qn(p)&&"chain"in p)||!!p.chain,G=zl(l);return ca(S,function(J){var te=f[J];l[J]=te,G&&(l.prototype[J]=function(){var me=this.__chain__;if(M||me){var ge=l(this.__wrapped__),Ee=ge.__actions__=lo(this.__actions__);return Ee.push({func:te,args:arguments,thisArg:l}),ge.__chain__=me,ge}return te.apply(l,af([this.value()],arguments))})}),l}function Uye(){return es._===this&&(es._=fpe),this}function uA(){}function jye(l){return l=qt(l),Jt(function(f){return eB(f,l)})}var Hye=HI(Un),Vye=HI(EF),$ye=HI(dI);function wU(l){return ZI(l)?hI(Fc(l)):vme(l)}function qye(l){return function(f){return l==null?r:th(l,f)}}var Wye=_B(),zye=_B(!0);function fA(){return[]}function dA(){return!1}function Gye(){return{}}function Zye(){return""}function Kye(){return!0}function Jye(l,f){if(l=qt(l),l<1||l>T)return[];var p=N,b=ys(l,N);f=pt(f),l-=N;for(var S=gI(b,f);++p<l;)f(p);return S}function Yye(l){return Pt(l)?Un(l,Fc):Oo(l)?[l]:lo(BB(Or(l)))}function Qye(l){var f=++lpe;return Or(l)+f}var Xye=i3(function(l,f){return l+f},0),ewe=VI("ceil"),twe=i3(function(l,f){return l/f},1),rwe=VI("floor");function nwe(l){return l&&l.length?Yb(l,ho,SI):r}function iwe(l,f){return l&&l.length?Yb(l,pt(f,2),SI):r}function swe(l){return xF(l,ho)}function owe(l,f){return xF(l,pt(f,2))}function awe(l){return l&&l.length?Yb(l,ho,NI):r}function cwe(l,f){return l&&l.length?Yb(l,pt(f,2),NI):r}var lwe=i3(function(l,f){return l*f},1),uwe=VI("round"),fwe=i3(function(l,f){return l-f},0);function dwe(l){return l&&l.length?mI(l,ho):0}function hwe(l,f){return l&&l.length?mI(l,pt(f,2)):0}return O.after=k0e,O.ary=KB,O.assign=_1e,O.assignIn=lU,O.assignInWith=y3,O.assignWith=C1e,O.at=x1e,O.before=JB,O.bind=eA,O.bindAll=Rye,O.bindKey=YB,O.castArray=G0e,O.chain=zB,O.chunk=rge,O.compact=nge,O.concat=ige,O.cond=Tye,O.conforms=Nye,O.constant=aA,O.countBy=d0e,O.create=I1e,O.curry=QB,O.curryRight=XB,O.debounce=eU,O.defaults=A1e,O.defaultsDeep=S1e,O.defer=L0e,O.delay=F0e,O.difference=sge,O.differenceBy=oge,O.differenceWith=age,O.drop=cge,O.dropRight=lge,O.dropRightWhile=uge,O.dropWhile=fge,O.fill=dge,O.filter=p0e,O.flatMap=y0e,O.flatMapDeep=w0e,O.flatMapDepth=v0e,O.flatten=VB,O.flattenDeep=hge,O.flattenDepth=pge,O.flip=B0e,O.flow=Mye,O.flowRight=Pye,O.fromPairs=mge,O.functions=P1e,O.functionsIn=k1e,O.groupBy=b0e,O.initial=yge,O.intersection=wge,O.intersectionBy=vge,O.intersectionWith=bge,O.invert=F1e,O.invertBy=B1e,O.invokeMap=_0e,O.iteratee=cA,O.keyBy=C0e,O.keys=Bi,O.keysIn=fo,O.map=f3,O.mapKeys=j1e,O.mapValues=H1e,O.matches=kye,O.matchesProperty=Lye,O.memoize=h3,O.merge=V1e,O.mergeWith=uU,O.method=Fye,O.methodOf=Bye,O.mixin=lA,O.negate=p3,O.nthArg=jye,O.omit=$1e,O.omitBy=q1e,O.once=U0e,O.orderBy=x0e,O.over=Hye,O.overArgs=j0e,O.overEvery=Vye,O.overSome=$ye,O.partial=tA,O.partialRight=tU,O.partition=I0e,O.pick=W1e,O.pickBy=fU,O.property=wU,O.propertyOf=qye,O.pull=xge,O.pullAll=qB,O.pullAllBy=Ige,O.pullAllWith=Age,O.pullAt=Sge,O.range=Wye,O.rangeRight=zye,O.rearg=H0e,O.reject=D0e,O.remove=Dge,O.rest=V0e,O.reverse=QI,O.sampleSize=T0e,O.set=G1e,O.setWith=Z1e,O.shuffle=N0e,O.slice=Rge,O.sortBy=P0e,O.sortedUniq=Lge,O.sortedUniqBy=Fge,O.split=yye,O.spread=$0e,O.tail=Bge,O.take=Uge,O.takeRight=jge,O.takeRightWhile=Hge,O.takeWhile=Vge,O.tap=n0e,O.throttle=q0e,O.thru=u3,O.toArray=oU,O.toPairs=dU,O.toPairsIn=hU,O.toPath=Yye,O.toPlainObject=cU,O.transform=K1e,O.unary=W0e,O.union=$ge,O.unionBy=qge,O.unionWith=Wge,O.uniq=zge,O.uniqBy=Gge,O.uniqWith=Zge,O.unset=J1e,O.unzip=XI,O.unzipWith=WB,O.update=Y1e,O.updateWith=Q1e,O.values=Sm,O.valuesIn=X1e,O.without=Kge,O.words=gU,O.wrap=z0e,O.xor=Jge,O.xorBy=Yge,O.xorWith=Qge,O.zip=Xge,O.zipObject=e0e,O.zipObjectDeep=t0e,O.zipWith=r0e,O.entries=dU,O.entriesIn=hU,O.extend=lU,O.extendWith=y3,lA(O,O),O.add=Xye,O.attempt=yU,O.camelCase=nye,O.capitalize=pU,O.ceil=ewe,O.clamp=eye,O.clone=Z0e,O.cloneDeep=J0e,O.cloneDeepWith=Y0e,O.cloneWith=K0e,O.conformsTo=Q0e,O.deburr=mU,O.defaultTo=Oye,O.divide=twe,O.endsWith=iye,O.eq=Ya,O.escape=sye,O.escapeRegExp=oye,O.every=h0e,O.find=m0e,O.findIndex=jB,O.findKey=D1e,O.findLast=g0e,O.findLastIndex=HB,O.findLastKey=R1e,O.floor=rwe,O.forEach=GB,O.forEachRight=ZB,O.forIn=T1e,O.forInRight=N1e,O.forOwn=O1e,O.forOwnRight=M1e,O.get=iA,O.gt=X0e,O.gte=e1e,O.has=L1e,O.hasIn=sA,O.head=$B,O.identity=ho,O.includes=E0e,O.indexOf=gge,O.inRange=tye,O.invoke=U1e,O.isArguments=ih,O.isArray=Pt,O.isArrayBuffer=t1e,O.isArrayLike=uo,O.isArrayLikeObject=pi,O.isBoolean=r1e,O.isBuffer=pf,O.isDate=n1e,O.isElement=i1e,O.isEmpty=s1e,O.isEqual=o1e,O.isEqualWith=a1e,O.isError=rA,O.isFinite=c1e,O.isFunction=zl,O.isInteger=rU,O.isLength=m3,O.isMap=nU,O.isMatch=l1e,O.isMatchWith=u1e,O.isNaN=f1e,O.isNative=d1e,O.isNil=p1e,O.isNull=h1e,O.isNumber=iU,O.isObject=qn,O.isObjectLike=ri,O.isPlainObject=Iy,O.isRegExp=nA,O.isSafeInteger=m1e,O.isSet=sU,O.isString=g3,O.isSymbol=Oo,O.isTypedArray=Am,O.isUndefined=g1e,O.isWeakMap=y1e,O.isWeakSet=w1e,O.join=Ege,O.kebabCase=aye,O.last=ha,O.lastIndexOf=_ge,O.lowerCase=cye,O.lowerFirst=lye,O.lt=v1e,O.lte=b1e,O.max=nwe,O.maxBy=iwe,O.mean=swe,O.meanBy=owe,O.min=awe,O.minBy=cwe,O.stubArray=fA,O.stubFalse=dA,O.stubObject=Gye,O.stubString=Zye,O.stubTrue=Kye,O.multiply=lwe,O.nth=Cge,O.noConflict=Uye,O.noop=uA,O.now=d3,O.pad=uye,O.padEnd=fye,O.padStart=dye,O.parseInt=hye,O.random=rye,O.reduce=A0e,O.reduceRight=S0e,O.repeat=pye,O.replace=mye,O.result=z1e,O.round=uwe,O.runInContext=ee,O.sample=R0e,O.size=O0e,O.snakeCase=gye,O.some=M0e,O.sortedIndex=Tge,O.sortedIndexBy=Nge,O.sortedIndexOf=Oge,O.sortedLastIndex=Mge,O.sortedLastIndexBy=Pge,O.sortedLastIndexOf=kge,O.startCase=wye,O.startsWith=vye,O.subtract=fwe,O.sum=dwe,O.sumBy=hwe,O.template=bye,O.times=Jye,O.toFinite=Gl,O.toInteger=qt,O.toLength=aU,O.toLower=Eye,O.toNumber=pa,O.toSafeInteger=E1e,O.toString=Or,O.toUpper=_ye,O.trim=Cye,O.trimEnd=xye,O.trimStart=Iye,O.truncate=Aye,O.unescape=Sye,O.uniqueId=Qye,O.upperCase=Dye,O.upperFirst=oA,O.each=GB,O.eachRight=ZB,O.first=$B,lA(O,function(){var l={};return kc(O,function(f,p){jr.call(O.prototype,p)||(l[p]=f)}),l}(),{chain:!1}),O.VERSION=n,ca(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){O[l].placeholder=O}),ca(["drop","take"],function(l,f){fr.prototype[l]=function(p){p=p===r?1:Ni(qt(p),0);var b=this.__filtered__&&!f?new fr(this):this.clone();return b.__filtered__?b.__takeCount__=ys(p,b.__takeCount__):b.__views__.push({size:ys(p,N),type:l+(b.__dir__<0?"Right":"")}),b},fr.prototype[l+"Right"]=function(p){return this.reverse()[l](p).reverse()}}),ca(["filter","map","takeWhile"],function(l,f){var p=f+1,b=p==g||p==x;fr.prototype[l]=function(S){var M=this.clone();return M.__iteratees__.push({iteratee:pt(S,3),type:p}),M.__filtered__=M.__filtered__||b,M}}),ca(["head","last"],function(l,f){var p="take"+(f?"Right":"");fr.prototype[l]=function(){return this[p](1).value()[0]}}),ca(["initial","tail"],function(l,f){var p="drop"+(f?"":"Right");fr.prototype[l]=function(){return this.__filtered__?new fr(this):this[p](1)}}),fr.prototype.compact=function(){return this.filter(ho)},fr.prototype.find=function(l){return this.filter(l).head()},fr.prototype.findLast=function(l){return this.reverse().find(l)},fr.prototype.invokeMap=Jt(function(l,f){return typeof l=="function"?new fr(this):this.map(function(p){return vy(p,l,f)})}),fr.prototype.reject=function(l){return this.filter(p3(pt(l)))},fr.prototype.slice=function(l,f){l=qt(l);var p=this;return p.__filtered__&&(l>0||f<0)?new fr(p):(l<0?p=p.takeRight(-l):l&&(p=p.drop(l)),f!==r&&(f=qt(f),p=f<0?p.dropRight(-f):p.take(f-l)),p)},fr.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},fr.prototype.toArray=function(){return this.take(N)},kc(fr.prototype,function(l,f){var p=/^(?:filter|find|map|reject)|While$/.test(f),b=/^(?:head|last)$/.test(f),S=O[b?"take"+(f=="last"?"Right":""):f],M=b||/^find/.test(f);S&&(O.prototype[f]=function(){var G=this.__wrapped__,J=b?[1]:arguments,te=G instanceof fr,me=J[0],ge=te||Pt(G),Ee=function(or){var pr=S.apply(O,af([or],J));return b&&Le?pr[0]:pr};ge&&p&&typeof me=="function"&&me.length!=1&&(te=ge=!1);var Le=this.__chain__,tt=!!this.__actions__.length,vt=M&&!Le,Zt=te&&!tt;if(!M&&ge){G=Zt?G:new fr(this);var bt=l.apply(G,J);return bt.__actions__.push({func:u3,args:[Ee],thisArg:r}),new ua(bt,Le)}return vt&&Zt?l.apply(this,J):(bt=this.thru(Ee),vt?b?bt.value()[0]:bt.value():bt)})}),ca(["pop","push","shift","sort","splice","unshift"],function(l){var f=Lb[l],p=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",b=/^(?:pop|shift)$/.test(l);O.prototype[l]=function(){var S=arguments;if(b&&!this.__chain__){var M=this.value();return f.apply(Pt(M)?M:[],S)}return this[p](function(G){return f.apply(Pt(G)?G:[],S)})}}),kc(fr.prototype,function(l,f){var p=O[f];if(p){var b=p.name+"";jr.call(Em,b)||(Em[b]=[]),Em[b].push({name:f,func:p})}}),Em[n3(r,R).name]=[{name:"wrapper",func:r}],fr.prototype.clone=Spe,fr.prototype.reverse=Dpe,fr.prototype.value=Rpe,O.prototype.at=i0e,O.prototype.chain=s0e,O.prototype.commit=o0e,O.prototype.next=a0e,O.prototype.plant=l0e,O.prototype.reverse=u0e,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=f0e,O.prototype.first=O.prototype.head,dy&&(O.prototype[dy]=c0e),O},wm=ope();Jd?((Jd.exports=wm)._=wm,cI._=wm):es._=wm}).call(Hv)})(B9,B9.exports);var zMe=Object.defineProperty,GMe=Object.defineProperties,ZMe=Object.getOwnPropertyDescriptors,QQ=Object.getOwnPropertySymbols,KMe=Object.prototype.hasOwnProperty,JMe=Object.prototype.propertyIsEnumerable,XQ=(t,e,r)=>e in t?zMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,K6=(t,e)=>{for(var r in e||(e={}))KMe.call(e,r)&&XQ(t,r,e[r]);if(QQ)for(var r of QQ(e))JMe.call(e,r)&&XQ(t,r,e[r]);return t},YMe=(t,e)=>GMe(t,ZMe(e));function cd(t,e,r){var n;let i=tK(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${WMe}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function ip(t){return t.includes(":")?t.split(":")[1]:t}function sX(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function QMe(t,e){let r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];let n=[];return r.forEach(i=>{let s=e.namespaces[i].accounts;n.push(...s)}),n}function eX(t={},e={}){let r=tX(t),n=tX(e);return B9.exports.merge(r,n)}function tX(t){var e,r,n,i;let s={};if(!zh(t))return s;for(let[o,a]of Object.entries(t)){let c=QC(o)?[o]:a.chains,u=a.methods||[],d=a.events||[],h=a.rpcMap||{},m=Qg(o);s[m]=YMe(K6(K6({},s[m]),a),{chains:JC(c,(e=s[m])==null?void 0:e.chains),methods:JC(u,(r=s[m])==null?void 0:r.methods),events:JC(d,(n=s[m])==null?void 0:n.events),rpcMap:K6(K6({},h),(i=s[m])==null?void 0:i.rpcMap)})}return s}function XMe(t){return t.includes(":")?t.split(":")[2]:t}function ePe(t){let e={};for(let[r,n]of Object.entries(t)){let i=n.methods||[],s=n.events||[],o=n.accounts||[],a=QC(r)?[r]:n.chains?n.chains:sX(n.accounts);e[r]={chains:a,methods:i,events:s,accounts:o}}return e}function k9(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):(t=t.includes(":")?t.split(":")[1]:t,isNaN(Number(t))?t:Number(t))}var oX={},Hn=t=>oX[t],L9=(t,e)=>{oX[t]=e},U9=class{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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 new 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,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Su.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=ip(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||cd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new ad(n,Hn("disableProviderPing")))}},j9=class{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}request(e){return y(this,null,function*(){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return yield this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?yield this.client.request(e):this.getHttpProvider().request(e.request)})}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(Su.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 new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){let n=r||cd(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new jv(n,Hn("disableProviderPing")))}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=parseInt(ip(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){let e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}handleSwitchChain(e){return y(this,null,function*(){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;let s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))yield this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. 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}`)}},H9=class{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Su.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 new Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=ip(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||cd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new ad(n,Hn("disableProviderPing")))}},V9=class{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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 new 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,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Su.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=ip(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||cd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new ad(n,Hn("disableProviderPing")))}},$9=class{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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 new 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,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Su.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{let n=this.getCardanoRPCUrl(r),i=ip(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){let r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new ad(n,Hn("disableProviderPing")))}},q9=class{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Su.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 new Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=ip(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||cd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new ad(n,Hn("disableProviderPing")))}},W9=class{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Su.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 new Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=ip(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||cd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Go(new ad(n,Hn("disableProviderPing")))}},z9=class{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Hn("events"),this.client=Hn("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 new 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,r){if(this.chainId=e,!this.httpProviders[e]){let n=r||cd(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Su.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||cd(e,this.namespace);return typeof n>"u"?void 0:new Go(new ad(n,Hn("disableProviderPing")))}},tPe=Object.defineProperty,rPe=Object.defineProperties,nPe=Object.getOwnPropertyDescriptors,rX=Object.getOwnPropertySymbols,iPe=Object.prototype.hasOwnProperty,sPe=Object.prototype.propertyIsEnumerable,nX=(t,e,r)=>e in t?tPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J6=(t,e)=>{for(var r in e||(e={}))iPe.call(e,r)&&nX(t,r,e[r]);if(rX)for(var r of rX(e))sPe.call(e,r)&&nX(t,r,e[r]);return t},F9=(t,e)=>rPe(t,nPe(e)),G9=class t{constructor(e){this.events=new iX.default,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:(0,Y6.pino)((0,Y6.getDefaultLoggerOptions)({level:e?.logger||JQ})),this.disableProviderPing=e?.disableProviderPing||!1}static init(e){return y(this,null,function*(){let r=new t(e);return yield r.initialize(),r})}request(e,r,n){return y(this,null,function*(){let[i,s]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return yield this.getProvider(i).request({request:J6({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})})}sendAsync(e,r,n,i){let s=new Date().getTime();this.request(e,n,i).then(o=>r(null,td(s,o))).catch(o=>r(o,void 0))}enable(){return y(this,null,function*(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||(yield this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties})),yield this.requestAccounts()})}disconnect(){return y(this,null,function*(){var e;if(!this.session)throw new Error("Please call connect() before enable()");yield this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Xr("USER_DISCONNECTED")}),yield this.cleanup()})}connect(e){return y(this,null,function*(){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),yield this.cleanupPendingPairings(),!e.skipPairing)return yield this.pair(e.pairingTopic)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}pair(e){return y(this,null,function*(){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");let{uri:n,approval:i}=yield this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),yield i().then(s=>{this.session=s;let o=ePe(s.namespaces);this.namespaces=eX(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==M9)throw s;r++})}while(!this.session);return this.onConnect(),this.session})}setDefaultChain(e,r){try{if(!this.session)return;let[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}cleanupPendingPairings(){return y(this,arguments,function*(e={}){this.logger.info("Cleaning up inactive pairings...");let r=this.client.pairing.getAll();if(zo(r)){for(let n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):yield this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}})}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}checkStorage(){return y(this,null,function*(){if(this.namespaces=yield this.getFromStore("namespaces"),this.optionalNamespaces=(yield 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()}})}initialize(){return y(this,null,function*(){this.logger.trace("Initialized"),yield this.createClient(),yield this.checkStorage(),this.registerEventListeners()})}createClient(){return y(this,null,function*(){this.client=this.providerOpts.client||(yield z6.init({logger:this.providerOpts.logger||JQ,relayUrl:this.providerOpts.relayUrl||VMe,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 new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map(r=>Qg(r)))];L9("client",this.client),L9("events",this.events),L9("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;let n=QMe(r,this.session),i=sX(n),s=eX(this.namespaces,this.optionalNamespaces),o=F9(J6({},s[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new j9({namespace:o});break;case"solana":this.rpcProviders[r]=new H9({namespace:o});break;case"cosmos":this.rpcProviders[r]=new V9({namespace:o});break;case"polkadot":this.rpcProviders[r]=new U9({namespace:o});break;case"cip34":this.rpcProviders[r]=new $9({namespace:o});break;case"elrond":this.rpcProviders[r]=new q9({namespace:o});break;case"multiversx":this.rpcProviders[r]=new W9({namespace:o});break;case"near":this.rpcProviders[r]=new z9({namespace:o});break}})}registerEventListeners(){if(typeof this.client>"u")throw new 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:r}=e,{event:n}=r;if(n.name==="accountsChanged"){let i=n.data;i&&zo(i)&&this.events.emit("accountsChanged",i.map(XMe))}else if(n.name==="chainChanged"){let i=r.chainId,s=r.event.data,o=Qg(i),a=k9(i)!==k9(s)?`${o}:${k9(s)}`:i;this.onChainChanged(a)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n;let{namespaces:i}=r,s=(n=this.client)==null?void 0:n.session.get(e);this.session=F9(J6({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",e=>y(this,null,function*(){yield this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",F9(J6({},Xr("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Su.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){let{namespaces:r,optionalNamespaces:n,sessionProperties:i}=e;r&&Object.keys(r).length&&(this.namespaces=r),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",r),this.persist("optionalNamespaces",n)}validateChain(e){let[r,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>Qg(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];let i=Qg(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}requestAccounts(){return y(this,null,function*(){let[e]=this.validateChain();return yield this.getProvider(e).requestAccounts()})}onChainChanged(e,r=!1){if(!this.namespaces)return;let[n,i]=this.validateChain(e);i&&(r||this.getProvider(n).setDefaultChain(i),this.namespaces[n]?this.namespaces[n].defaultChain=i:this.namespaces[`${n}:${i}`]?this.namespaces[`${n}:${i}`].defaultChain=i:this.namespaces[`${n}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}cleanup(){return y(this,null,function*(){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),yield this.cleanupPendingPairings({deletePairings:!0})})}persist(e,r){this.client.core.storage.setItem(`${YQ}/${e}`,r)}getFromStore(e){return y(this,null,function*(){return yield this.client.core.storage.getItem(`${YQ}/${e}`)})}},aX=G9;var oPe="wc",aPe="ethereum_provider",cPe=`${oPe}@2:${aPe}:`,lPe="https://rpc.walletconnect.com/v1/",K9=["eth_sendTransaction","personal_sign"],uPe=["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"],J9=["chainChanged","accountsChanged"],fPe=["chainChanged","accountsChanged","message","disconnect","connect"],dPe=Object.defineProperty,hPe=Object.defineProperties,pPe=Object.getOwnPropertyDescriptors,cX=Object.getOwnPropertySymbols,mPe=Object.prototype.hasOwnProperty,gPe=Object.prototype.propertyIsEnumerable,lX=(t,e,r)=>e in t?dPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Vv=(t,e)=>{for(var r in e||(e={}))mPe.call(e,r)&&lX(t,r,e[r]);if(cX)for(var r of cX(e))gPe.call(e,r)&&lX(t,r,e[r]);return t},uX=(t,e)=>hPe(t,pPe(e));function Q6(t){return Number(t[0].split(":")[1])}function Z9(t){return`0x${t.toString(16)}`}function yPe(t){let{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=t;if(!zo(e))throw new Error("Invalid chains");let c={chains:e,methods:n||K9,events:s||J9,rpcMap:Vv({},e.length?{[Q6(e)]:a[Q6(e)]}:{})},u=s?.filter(w=>!J9.includes(w)),d=n?.filter(w=>!K9.includes(w));if(!r&&!o&&!i&&!(u!=null&&u.length)&&!(d!=null&&d.length))return{required:e.length?c:void 0};let h=u?.length&&d?.length||!r,m={chains:[...new Set(h?c.chains.concat(r||[]):r)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:uPe))],events:[...new Set(c.events.concat(o!=null&&o.length?o:fPe))],rpcMap:a};return{required:e.length?c:void 0,optional:r.length?m:void 0}}var X6=class t{constructor(){this.events=new fX.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=cPe,this.on=(e,r)=>(this.events.on(e,r),this),this.once=(e,r)=>(this.events.once(e,r),this),this.removeListener=(e,r)=>(this.events.removeListener(e,r),this),this.off=(e,r)=>(this.events.off(e,r),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return y(this,null,function*(){let r=new t;return yield r.initialize(e),r})}request(e,r){return y(this,null,function*(){return yield this.signer.request(e,this.formatChainId(this.chainId),r)})}sendAsync(e,r,n){this.signer.sendAsync(e,r,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}enable(){return y(this,null,function*(){return this.session||(yield this.connect()),yield this.request({method:"eth_requestAccounts"})})}connect(e){return y(this,null,function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);let{required:r,optional:n}=yPe(this.rpc);try{let i=yield new Promise((o,a)=>y(this,null,function*(){var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),yield this.signer.connect(uX(Vv({namespaces:Vv({},r&&{[this.namespace]:r})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e?.pairingTopic})).then(u=>{o(u)}).catch(u=>{a(new Error(u.message))})}));if(!i)return;let s=rK(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:Z9(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}})}disconnect(){return y(this,null,function*(){this.session&&(yield this.signer.disconnect()),this.reset()})}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{let{params:r}=e,{event:n}=r;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{let r=parseInt(e);this.chainId=r,this.events.emit("chainChanged",Z9(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",uX(Vv({},Xr("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var r,n;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){let r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",Z9(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){let r=this.parseChainId(e);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(e){let[r,n,i]=e.split(":");return{chainId:`${r}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var r,n;let i=(r=e?.chains)!=null?r:[],s=(n=e?.optionalChains)!=null?n:[],o=i.concat(s);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");let a=i.length?e?.methods||K9:[],c=i.length?e?.events||J9:[],u=e?.optionalMethods||[],d=e?.optionalEvents||[],h=e?.rpcMap||this.buildRpcMap(o,e.projectId),m=e?.qrModalOptions||void 0;return{chains:i?.map(w=>this.formatChainId(w)),optionalChains:s.map(w=>this.formatChainId(w)),methods:a,events:c,optionalMethods:u,optionalEvents:d,rpcMap:h,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:m,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,r){let n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,r)}),n}initialize(e){return y(this,null,function*(){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?Q6(this.rpc.chains):Q6(this.rpc.optionalChains),this.signer=yield aX.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession(),this.rpc.showQrModal){let r;try{let{WalletConnectModal:n}=yield import("./chunk-I73GJ2WE.js");r=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(Vv({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}})}loadConnectOpts(e){if(!e)return;let{chains:r,optionalChains:n,rpcMap:i}=e;r&&zo(r)&&(this.rpc.chains=r.map(s=>this.formatChainId(s)),r.forEach(s=>{this.rpc.rpcMap[s]=i?.[s]||this.getRpcUrl(s)})),n&&zo(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n?.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=i?.[s]||this.getRpcUrl(s)}))}getRpcUrl(e,r){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${lPe}?chainId=eip155:${e}&projectId=${r||this.rpc.projectId}`}loadPersistedSession(){return y(this,null,function*(){if(!this.session)return;let e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:r?.accounts),this.setAccounts(r?.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 typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(r=>this.parseAccount(r))}};var dX="6.11.1";function wPe(t,e,r){let n=e.split("|").map(s=>s.trim());for(let s=0;s<n.length;s++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}let i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=t,i}function ui(t){return y(this,null,function*(){let e=Object.keys(t);return(yield Promise.all(e.map(n=>Promise.resolve(t[n])))).reduce((n,i,s)=>(n[e[s]]=i,n),{})})}function ke(t,e,r){for(let n in e){let i=e[n],s=r?r[n]:null;s&&wPe(i,s,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function g0(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(g0).join(", ")+" ]";if(t instanceof Uint8Array){let e="0123456789abcdef",r="0x";for(let n=0;n<t.length;n++)r+=e[t[n]>>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return g0(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{let e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${g0(r)}: ${g0(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Ln(t,e){return t&&t.code===e}function sp(t){return Ln(t,"CALL_EXCEPTION")}function Fr(t,e,r){let n=t;{let s=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${g0(r)}`);for(let o in r){if(o==="shortMessage")continue;let a=r[o];s.push(o+"="+g0(a))}}s.push(`code=${e}`),s.push(`version=${dX}`),s.length&&(t+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return ke(i,{code:e}),r&&Object.assign(i,r),i.shortMessage==null&&ke(i,{shortMessage:n}),i}function oe(t,e,r,n){if(!t)throw Fr(e,r,n)}function K(t,e,r,n){oe(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function y0(t,e,r){r==null&&(r=""),r&&(r=": "+r),oe(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),oe(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}var vPe=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken");t.push(e)}catch{}return t},[]);function ex(t){oe(vPe.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function dc(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),oe(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function pX(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){let n=new Uint8Array((t.length-2)/2),i=2;for(let s=0;s<n.length;s++)n[s]=parseInt(t.substring(i,i+2),16),i+=2;return n}K(!1,"invalid BytesLike value",e||"value",t)}function Et(t,e){return pX(t,e,!1)}function fi(t,e){return pX(t,e,!0)}function nr(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function tx(t){return nr(t,!0)||t instanceof Uint8Array}var hX="0123456789abcdef";function Pe(t){let e=Et(t),r="0x";for(let n=0;n<e.length;n++){let i=e[n];r+=hX[(i&240)>>4]+hX[i&15]}return r}function Nr(t){return"0x"+t.map(e=>Pe(e).substring(2)).join("")}function hc(t){return nr(t,!0)?(t.length-2)/2:Et(t).length}function un(t,e,r){let n=Et(t);return r!=null&&r>n.length&&oe(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),Pe(n.slice(e??0,r??n.length))}function mX(t,e,r){let n=Et(t);oe(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});let i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),Pe(i)}function bo(t,e){return mX(t,e,!0)}function rx(t,e){return mX(t,e,!1)}var nx=BigInt(0),pc=BigInt(1),w0=9007199254740991;function ld(t,e){let r=b0(t,"value"),n=BigInt(wt(e,"width"));if(oe(r>>n===nx,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-pc){let i=(pc<<n)-pc;return-((~r&i)+pc)}return r}function v0(t,e){let r=Me(t,"value"),n=BigInt(wt(e,"width")),i=pc<<n-pc;if(r<nx){r=-r,oe(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});let s=(pc<<n)-pc;return(~r&s)+pc}else oe(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function Ra(t,e){let r=b0(t,"value"),n=BigInt(wt(e,"bits"));return r&(pc<<n)-pc}function Me(t,e){switch(typeof t){case"bigint":return t;case"number":return K(Number.isInteger(t),"underflow",e||"value",t),K(t>=-w0&&t<=w0,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){K(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}K(!1,"invalid BigNumberish value",e||"value",t)}function b0(t,e){let r=Me(t,e);return oe(r>=nx,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}var gX="0123456789abcdef";function Du(t){if(t instanceof Uint8Array){let e="0x0";for(let r of t)e+=gX[r>>4],e+=gX[r&15];return BigInt(e)}return Me(t)}function wt(t,e){switch(typeof t){case"bigint":return K(t>=-w0&&t<=w0,"overflow",e||"value",t),Number(t);case"number":return K(Number.isInteger(t),"underflow",e||"value",t),K(t>=-w0&&t<=w0,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return wt(BigInt(t),e)}catch(r){K(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}K(!1,"invalid numeric value",e||"value",t)}function ix(t){return wt(Du(t))}function Xs(t,e){let n=b0(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{let i=wt(e,"width");for(oe(i*2>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length<i*2;)n="0"+n}return"0x"+n}function yi(t){let e=b0(t,"value");if(e===nx)return new Uint8Array([]);let r=e.toString(16);r.length%2&&(r="0"+r);let n=new Uint8Array(r.length/2);for(let i=0;i<n.length;i++){let s=i*2;n[i]=parseInt(r.substring(s,s+2),16)}return n}function mc(t){let e=Pe(tx(t)?t:yi(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}var yX="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var aEt=BigInt(0),wX=BigInt(58);function sx(t){let e=Et(t),r=Du(e),n="";for(;r;)n=yX[Number(r%wX)]+n,r/=wX;for(let i=0;i<e.length&&!e[i];i++)n=yX[0]+n;return n}function Y9(t){t=atob(t);let e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return Et(e)}function Q9(t){let e=Et(t),r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var ud=class{filter;emitter;#e;constructor(e,r,n){this.#e=r,ke(this,{emitter:e,filter:n})}removeListener(){return y(this,null,function*(){this.#e!=null&&(yield this.emitter.off(this.filter,this.#e))})}};function bPe(t,e,r,n,i){K(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function vX(t,e,r,n,i){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let s=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)s++;return s}return t==="OVERRUN"?r.length-e-1:0}function EPe(t,e,r,n,i){return t==="OVERLONG"?(K(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),vX(t,e,r,n,i))}var X9=Object.freeze({error:bPe,ignore:vX,replace:EPe});function _Pe(t,e){e==null&&(e=X9.error);let r=Et(t,"bytes"),n=[],i=0;for(;i<r.length;){let s=r[i++];if(!(s>>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+o>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let c=s&(1<<8-o-1)-1;for(let u=0;u<o;u++){let d=r[i];if((d&192)!=128){i+=e("MISSING_CONTINUE",i,r,n),c=null;break}c=c<<6|d&63,i++}if(c!==null){if(c>1114111){i+=e("OUT_OF_RANGE",i-1-o,r,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,r,n,c);continue}if(c<=a){i+=e("OVERLONG",i-1-o,r,n,c);continue}n.push(c)}}return n}function Ds(t,e){K(typeof t=="string","invalid string value","str",t),e!=null&&(ex(e),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;let s=t.charCodeAt(n);K(n<t.length&&(s&64512)===56320,"invalid surrogate pair","str",t);let o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function CPe(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ru(t,e){return CPe(_Pe(t,e))}function ox(t){function e(r,n){return y(this,null,function*(){let i=r.url.split(":")[0].toLowerCase();oe(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),oe(i==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s;if(n){let h=new AbortController;s=h.signal,n.addListener(()=>{h.abort()})}let o={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:s},a=yield fetch(r.url,o),c={};a.headers.forEach((h,m)=>{c[m.toLowerCase()]=h});let u=yield a.arrayBuffer(),d=u==null?null:new Uint8Array(u);return{statusCode:a.status,statusMessage:a.statusText,headers:c,body:d}})}return e}var wEt=ox({});var xPe=12,IPe=250,bX=ox(),APe=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),SPe=new RegExp("^ipfs://(ipfs/)?(.*)$","i"),eM=!1;function _X(t,e){return y(this,null,function*(){try{let r=t.match(APe);if(!r)throw new Error("invalid data");return new ul(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Y9(r[3]):DPe(r[3]))}catch{return new ul(599,"BAD REQUEST (invalid data: URI)",{},null,new Rs(t))}})}function CX(t){function e(r,n){return y(this,null,function*(){try{let i=r.match(SPe);if(!i)throw new Error("invalid link");return new Rs(`${t}${i[2]}`)}catch{return new ul(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Rs(r))}})}return e}var ax={data:_X,ipfs:CX("https://gateway.ipfs.io/ipfs/")},xX=new WeakMap,$v=class{#e;#t;constructor(e){this.#e=[],this.#t=!1,xX.set(e,()=>{if(!this.#t){this.#t=!0;for(let r of this.#e)setTimeout(()=>{r()},0);this.#e=[]}})}addListener(e){oe(!this.#t,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#e.push(e)}get cancelled(){return this.#t}checkSignal(){oe(!this.cancelled,"cancelled","CANCELLED",{})}};function cx(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Rs=class t{#e;#t;#r;#n;#i;#o;#s;#a;#u;#l;#d;#h;#c;#f;#m;get url(){return this.#o}set url(e){this.#o=String(e)}get body(){return this.#s==null?null:new Uint8Array(this.#s)}set body(e){if(e==null)this.#s=void 0,this.#a=void 0;else if(typeof e=="string")this.#s=Ds(e),this.#a="text/plain";else if(e instanceof Uint8Array)this.#s=e,this.#a="application/octet-stream";else if(typeof e=="object")this.#s=Ds(JSON.stringify(e)),this.#a="application/json";else throw new Error("invalid body")}hasBody(){return this.#s!=null}get method(){return this.#n?this.#n:this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),this.#n=String(e).toUpperCase()}get headers(){let e=Object.assign({},this.#r);return this.#u&&(e.authorization=`Basic ${Q9(Ds(this.#u))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&this.#a&&(e["content-type"]=this.#a),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){this.#r[String(e).toLowerCase()]=String(r)}clearHeaders(){this.#r={}}[Symbol.iterator](){let e=this.headers,r=Object.keys(e),n=0;return{next:()=>{if(n<r.length){let i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#u||null}setCredentials(e,r){K(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#u=`${e}:${r}`}get allowGzip(){return this.#t}set allowGzip(e){this.#t=!!e}get allowInsecureAuthentication(){return!!this.#e}set allowInsecureAuthentication(e){this.#e=!!e}get timeout(){return this.#i}set timeout(e){K(e>=0,"timeout must be non-zero","timeout",e),this.#i=e}get preflightFunc(){return this.#l||null}set preflightFunc(e){this.#l=e}get processFunc(){return this.#d||null}set processFunc(e){this.#d=e}get retryFunc(){return this.#h||null}set retryFunc(e){this.#h=e}get getUrlFunc(){return this.#m||bX}set getUrlFunc(e){this.#m=e}constructor(e){this.#o=String(e),this.#e=!1,this.#t=!0,this.#r={},this.#n="",this.#i=3e5,this.#f={slotInterval:IPe,maxAttempts:xPe},this.#m=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#s?Pe(this.#s):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(this.#f.slotInterval=e.slotInterval),e.maxAttempts!=null&&(this.#f.maxAttempts=e.maxAttempts)}#p(e,r,n,i,s){return y(this,null,function*(){if(e>=this.#f.maxAttempts)return s.makeServerError("exceeded maximum retry limit");oe(EX()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&(yield RPe(n));let o=this.clone(),a=(o.url.split(":")[0]||"").toLowerCase();if(a in ax){let d=yield ax[a](o.url,cx(i.#c));if(d instanceof ul){let h=d;if(this.processFunc){cx(i.#c);try{h=yield this.processFunc(o,h)}catch(m){(m.throttle==null||typeof m.stall!="number")&&h.makeServerError("error in post-processing function",m).assertOk()}}return h}o=d}this.preflightFunc&&(o=yield this.preflightFunc(o));let c=yield this.getUrlFunc(o,cx(i.#c)),u=new ul(c.statusCode,c.statusMessage,c.headers,c.body,i);if(u.statusCode===301||u.statusCode===302){try{let d=u.headers.location||"";return o.redirect(d).#p(e+1,r,0,i,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||(yield this.retryFunc(o,u,e)))){let d=u.headers["retry-after"],h=this.#f.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof d=="string"&&d.match(/^[1-9][0-9]*$/)&&(h=parseInt(d)),o.clone().#p(e+1,r,h,i,u)}if(this.processFunc){cx(i.#c);try{u=yield this.processFunc(o,u)}catch(d){(d.throttle==null||typeof d.stall!="number")&&u.makeServerError("error in post-processing function",d).assertOk();let h=this.#f.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return d.stall>=0&&(h=d.stall),o.clone().#p(e+1,r,h,i,u)}}return u})}send(){return oe(this.#c==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#c=new $v(this),this.#p(0,EX()+this.timeout,0,this,new ul(0,"",{},null,this))}cancel(){oe(this.#c!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});let e=xX.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){let r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();oe(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});let i=new t(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,i.#r=Object.assign({},this.#r),this.#s&&(i.#s=new Uint8Array(this.#s)),i.#a=this.#a,i}clone(){let e=new t(this.url);return e.#n=this.#n,this.#s&&(e.#s=this.#s),e.#a=this.#a,e.#r=Object.assign({},this.#r),e.#u=this.#u,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#l=this.#l,e.#d=this.#d,e.#h=this.#h,e.#m=this.#m,e}static lockConfig(){eM=!0}static getGateway(e){return ax[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(eM)throw new Error("gateways locked");ax[e]=r}static registerGetUrl(e){if(eM)throw new Error("gateways locked");bX=e}static createGetUrlFunc(e){return ox(e)}static createDataGateway(){return _X}static createIpfsGatewayFunc(e){return CX(e)}},ul=class t{#e;#t;#r;#n;#i;#o;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#n?Pe(this.#n):"null"}>`}get statusCode(){return this.#e}get statusMessage(){return this.#t}get headers(){return Object.assign({},this.#r)}get body(){return this.#n==null?null:new Uint8Array(this.#n)}get bodyText(){try{return this.#n==null?"":Ru(this.#n)}catch{oe(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{oe(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){let e=this.headers,r=Object.keys(e),n=0;return{next:()=>{if(n<r.length){let i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,r,n,i,s){this.#e=e,this.#t=r,this.#r=Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{}),this.#n=i==null?null:new Uint8Array(i),this.#i=s||null,this.#o={message:""}}makeServerError(e,r){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);let i=new t(599,n,this.headers,this.body,this.#i||void 0);return i.#o={message:e,error:r},i}throwThrottleError(e,r){r==null?r=-1:K(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);let n=new Error(e||"throttling requests");throw ke(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return this.#n!=null}get request(){return this.#i}ok(){return this.#o.message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=this.#o;e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{this.#n&&(i=Ru(this.#n))}catch{}oe(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};function EX(){return new Date().getTime()}function DPe(t){return Ds(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function RPe(t){return new Promise(e=>setTimeout(e,t))}var TPe=BigInt(-1),gc=BigInt(0),_0=BigInt(1),NPe=BigInt(5),E0={},C0="0000";for(;C0.length<80;)C0+=C0;function op(t){let e=C0;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function qv(t,e,r){let n=BigInt(e.width);if(e.signed){let i=_0<<n-_0;oe(r==null||t>=-i&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t>gc?t=ld(Ra(t,n),n):t=-ld(Ra(-t,n),n)}else{let i=_0<<n;oe(r==null||t>=0&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t=(t%i+i)%i&i-_0}return t}function tM(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{let s=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);K(s,"invalid fixed format","format",t),e=s[1]!=="u",r=parseInt(s[2]),n=parseInt(s[3])}}else if(t){let s=t,o=(a,c,u)=>s[a]==null?u:(K(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}K(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),K(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);let i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function OPe(t,e){let r="";t<gc&&(r="-",t*=TPe);let n=t.toString();if(e===0)return r+n;for(;n.length<=e;)n=C0+n;let i=n.length-e;for(n=n.substring(0,i)+"."+n.substring(i);n[0]==="0"&&n[1]!==".";)n=n.substring(1);for(;n[n.length-1]==="0"&&n[n.length-2]!==".";)n=n.substring(0,n.length-1);return r+n}var Wv=class t{format;#e;#t;#r;_value;constructor(e,r,n){dc(e,E0,"FixedNumber"),this.#t=r,this.#e=n;let i=OPe(r,n.decimals);ke(this,{format:n.name,_value:i}),this.#r=op(n.decimals)}get signed(){return this.#e.signed}get width(){return this.#e.width}get decimals(){return this.#e.decimals}get value(){return this.#t}#n(e){K(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#i(e,r){return e=qv(e,this.#e,r),new t(E0,e,this.#e)}#o(e,r){return this.#n(e),this.#i(this.#t+e.#t,r)}addUnsafe(e){return this.#o(e)}add(e){return this.#o(e,"add")}#s(e,r){return this.#n(e),this.#i(this.#t-e.#t,r)}subUnsafe(e){return this.#s(e)}sub(e){return this.#s(e,"sub")}#a(e,r){return this.#n(e),this.#i(this.#t*e.#t/this.#r,r)}mulUnsafe(e){return this.#a(e)}mul(e){return this.#a(e,"mul")}mulSignal(e){this.#n(e);let r=this.#t*e.#t;return oe(r%this.#r===gc,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#i(r/this.#r,"mulSignal")}#u(e,r){return oe(e.#t!==gc,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#n(e),this.#i(this.#t*this.#r/e.#t,r)}divUnsafe(e){return this.#u(e)}div(e){return this.#u(e,"div")}divSignal(e){oe(e.#t!==gc,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#n(e);let r=this.#t*this.#r;return oe(r%e.#t===gc,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#i(r/e.#t,"divSignal")}cmp(e){let r=this.value,n=e.value,i=this.decimals-e.decimals;return i>0?n*=op(i):i<0&&(r*=op(-i)),r<n?-1:r>n?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#t;return this.#t<gc&&(e-=this.#r-_0),e=this.#t/this.#r*this.#r,this.#i(e,"floor")}ceiling(){let e=this.#t;return this.#t>gc&&(e+=this.#r-_0),e=this.#t/this.#r*this.#r,this.#i(e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;let r=this.decimals-e,n=NPe*op(r-1),i=this.value+n,s=op(r);return i=i/s*s,qv(i,this.#e,"round"),new t(E0,i,this.#e)}isZero(){return this.#t===gc}isNegative(){return this.#t<gc}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return t.fromString(this.toString(),e)}static fromValue(e,r,n){let i=r==null?0:wt(r),s=tM(n),o=Me(e,"value"),a=i-s.decimals;if(a>0){let c=op(a);oe(o%c===gc,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=op(-a));return qv(o,s,"fromValue"),new t(E0,o,s)}static fromString(e,r){let n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);K(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);let i=tM(r),s=n[2]||"0",o=n[3]||"";for(;o.length<i.decimals;)o+=C0;oe(o.substring(i.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),o=o.substring(0,i.decimals);let a=BigInt(n[1]+s+o);return qv(a,i,"fromString"),new t(E0,a,i)}static fromBytes(e,r){let n=Du(Et(e,"value")),i=tM(r);return i.signed&&(n=ld(n,i.width)),qv(n,i,"fromBytes"),new t(E0,n,i)}};function MPe(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function IX(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function AX(t,e,r,n){let i=[];for(;r<e+1+n;){let s=SX(t,r);i.push(s.result),r+=s.consumed,oe(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:i}}function SX(t,e){oe(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});let r=n=>{oe(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){let n=t[e]-247;r(e+1+n);let i=IX(t,e+1,n);return r(e+1+n+i),AX(t,e,e+1+n,n+i)}else if(t[e]>=192){let n=t[e]-192;return r(e+1+n),AX(t,e,e+1,n)}else if(t[e]>=184){let n=t[e]-183;r(e+1+n);let i=IX(t,e+1,n);r(e+1+n+i);let s=Pe(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(t[e]>=128){let n=t[e]-128;r(e+1+n);let i=Pe(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:MPe(t[e])}}function ap(t){let e=Et(t,"data"),r=SX(e,0);return K(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function DX(t){let e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function TX(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(s){n=n.concat(TX(s))}),n.length<=55)return n.unshift(192+n.length),n;let i=DX(n.length);return i.unshift(247+i.length),i.concat(n)}let e=Array.prototype.slice.call(Et(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;let r=DX(e.length);return r.unshift(183+r.length),r.concat(e)}var RX="0123456789abcdef";function fl(t){let e="0x";for(let r of TX(t))e+=RX[r>>4],e+=RX[r&15];return e}var PPe=["wei","kwei","mwei","gwei","szabo","finney","ether"];function rM(t,e){let r=18;if(typeof e=="string"){let n=PPe.indexOf(e);K(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=wt(e,"unit"));return Wv.fromValue(t,r,{decimals:r,width:512}).toString()}function lx(t){return rM(t,18)}var ps=32,nM=new Uint8Array(ps),jPe=["then"],ux={};function zv(t,e){let r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var cp=class t extends Array{#e;constructor(...e){let r=e[0],n=e[1],i=(e[2]||[]).slice(),s=!0;r!==ux&&(n=e,i=[],s=!1),super(n.length),n.forEach((a,c)=>{this[c]=a});let o=i.reduce((a,c)=>(typeof c=="string"&&a.set(c,(a.get(c)||0)+1),a),new Map);if(this.#e=Object.freeze(n.map((a,c)=>{let u=i[c];return u!=null&&o.get(u)===1?u:null})),!!s)return Object.freeze(this),new Proxy(this,{get:(a,c,u)=>{if(typeof c=="string"){if(c.match(/^[0-9]+$/)){let h=wt(c,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");let m=a[h];return m instanceof Error&&zv(`index ${h}`,m),m}if(jPe.indexOf(c)>=0)return Reflect.get(a,c,u);let d=a[c];if(d instanceof Function)return function(...h){return d.apply(this===u?a:this,h)};if(!(c in a))return a.getValue.apply(this===u?a:this,[c])}return Reflect.get(a,c,u)}})}toArray(){let e=[];return this.forEach((r,n)=>{r instanceof Error&&zv(`index ${n}`,r),e.push(r)}),e}toObject(){return this.#e.reduce((e,r,n)=>(oe(r!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),r in e||(e[r]=this.getValue(r)),e),{})}slice(e,r){e==null&&(e=0),e<0&&(e+=this.length,e<0&&(e=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);let n=[],i=[];for(let s=e;s<r;s++)n.push(this[s]),i.push(this.#e[s]);return new t(ux,n,i)}filter(e,r){let n=[],i=[];for(let s=0;s<this.length;s++){let o=this[s];o instanceof Error&&zv(`index ${s}`,o),e.call(r,o,s,this)&&(n.push(o),i.push(this.#e[s]))}return new t(ux,n,i)}map(e,r){let n=[];for(let i=0;i<this.length;i++){let s=this[i];s instanceof Error&&zv(`index ${i}`,s),n.push(e.call(r,s,i,this))}return n}getValue(e){let r=this.#e.indexOf(e);if(r===-1)return;let n=this[r];return n instanceof Error&&zv(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,r){return new t(ux,e,r)}};function NX(t){let e=yi(t);return oe(e.length<=ps,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:ps,offset:e.length}),e.length!==ps&&(e=fi(Nr([nM.slice(e.length%ps),e]))),e}var xi=class{name;type;localName;dynamic;constructor(e,r,n,i){ke(this,{name:e,type:r,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){K(!1,e,this.localName,r)}},lp=class{#e;#t;constructor(){this.#e=[],this.#t=0}get data(){return Nr(this.#e)}get length(){return this.#t}#r(e){return this.#e.push(e),this.#t+=e.length,e.length}appendWriter(e){return this.#r(fi(e.data))}writeBytes(e){let r=fi(e),n=r.length%ps;return n&&(r=fi(Nr([r,nM.slice(n)]))),this.#r(r)}writeValue(e){return this.#r(NX(e))}writeUpdatableValue(){let e=this.#e.length;return this.#e.push(nM),this.#t+=ps,r=>{this.#e[e]=NX(r)}}},fx=class t{allowLoose;#e;#t;#r;#n;#i;constructor(e,r,n){ke(this,{allowLoose:!!r}),this.#e=fi(e),this.#r=0,this.#n=null,this.#i=n??1024,this.#t=0}get data(){return Pe(this.#e)}get dataLength(){return this.#e.length}get consumed(){return this.#t}get bytes(){return new Uint8Array(this.#e)}#o(e){if(this.#n)return this.#n.#o(e);this.#r+=e,oe(this.#i<1||this.#r<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:fi(this.#e),offset:this.#t,length:e,info:{bytesRead:this.#r,dataLength:this.dataLength}})}#s(e,r,n){let i=Math.ceil(r/ps)*ps;return this.#t+i>this.#e.length&&(this.allowLoose&&n&&this.#t+r<=this.#e.length?i=r:oe(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:fi(this.#e),length:this.#e.length,offset:this.#t+i})),this.#e.slice(this.#t,this.#t+i)}subReader(e){let r=new t(this.#e.slice(this.#t+e),this.allowLoose,this.#i);return r.#n=this,r}readBytes(e,r){let n=this.#s(0,e,!!r);return this.#o(e),this.#t+=n.length,n.slice(0,e)}readValue(){return Du(this.readBytes(ps))}readIndex(){return ix(this.readBytes(ps))}};function Gv(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function Zv(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function OX(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Gv(t.outputLen),Gv(t.blockLen)}function Tu(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function dx(t,e){Zv(t);let r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var hx=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;var MX=t=>t instanceof Uint8Array;var PX=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),px=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),yc=(t,e)=>t<<32-e|t>>>e,HPe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!HPe)throw new Error("Non little-endian hardware is not supported");function VPe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function dd(t){if(typeof t=="string"&&(t=VPe(t)),!MX(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function kX(...t){let e=new Uint8Array(t.reduce((n,i)=>n+i.length,0)),r=0;return t.forEach(n=>{if(!MX(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}var fd=class{clone(){return this._cloneInto()}},a_t={}.toString;function mx(t){let e=n=>t().update(dd(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function LX(t){let e=(n,i)=>t(i).update(dd(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function FX(t=32){if(hx&&typeof hx.getRandomValues=="function")return hx.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}var gx=class extends fd{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,OX(e);let n=dd(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return Tu(this),this.iHash.update(e),this}digestInto(e){Tu(this),Zv(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:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},iM=(t,e,r)=>new gx(t,e).update(r).digest();iM.create=(t,e)=>new gx(t,e);function $Pe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,u=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+u,a,n)}var yx=class extends fd{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=px(this.buffer)}update(e){Tu(this);let{view:r,buffer:n,blockLen:i}=this;e=dd(e);let s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=px(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Tu(this),dx(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let h=o;h<i;h++)r[h]=0;$Pe(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=px(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<u;h++)a.setUint32(4*h,d[h],s)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}};var qPe=(t,e,r)=>t&e^~t&r,WPe=(t,e,r)=>t&e^t&r^e&r,zPe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),hd=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pd=new Uint32Array(64),sM=class extends yx{constructor(){super(64,32,8,!1),this.A=hd[0]|0,this.B=hd[1]|0,this.C=hd[2]|0,this.D=hd[3]|0,this.E=hd[4]|0,this.F=hd[5]|0,this.G=hd[6]|0,this.H=hd[7]|0}get(){let{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let h=0;h<16;h++,r+=4)pd[h]=e.getUint32(r,!1);for(let h=16;h<64;h++){let m=pd[h-15],w=pd[h-2],_=yc(m,7)^yc(m,18)^m>>>3,C=yc(w,17)^yc(w,19)^w>>>10;pd[h]=C+pd[h-7]+_+pd[h-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:u,H:d}=this;for(let h=0;h<64;h++){let m=yc(a,6)^yc(a,11)^yc(a,25),w=d+m+qPe(a,c,u)+zPe[h]+pd[h]|0,C=(yc(n,2)^yc(n,13)^yc(n,22))+WPe(n,i,s)|0;d=u,u=c,c=a,a=o+w|0,o=s,s=i,i=n,n=w+C|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(n,i,s,o,a,c,u,d)}roundClean(){pd.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var BX=mx(()=>new sM);var wx=BigInt(4294967295),UX=BigInt(32);function GPe(t,e=!1){return e?{h:Number(t&wx),l:Number(t>>UX&wx)}:{h:Number(t>>UX&wx)|0,l:Number(t&wx)|0}}function jX(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:s,l:o}=GPe(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}var HX=(t,e,r)=>t<<r|e>>>32-r,VX=(t,e,r)=>e<<r|t>>>32-r,$X=(t,e,r)=>e<<r-32|t>>>64-r,qX=(t,e,r)=>t<<r-32|e>>>64-r;var[GX,ZX,KX]=[[],[],[]],ZPe=BigInt(0),Kv=BigInt(1),KPe=BigInt(2),JPe=BigInt(7),YPe=BigInt(256),QPe=BigInt(113);for(let t=0,e=Kv,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],GX.push(2*(5*n+r)),ZX.push((t+1)*(t+2)/2%64);let i=ZPe;for(let s=0;s<7;s++)e=(e<<Kv^(e>>JPe)*QPe)%YPe,e&KPe&&(i^=Kv<<(Kv<<BigInt(s))-Kv);KX.push(i)}var[XPe,e7e]=jX(KX,!0),WX=(t,e,r)=>r>32?$X(t,e,r):HX(t,e,r),zX=(t,e,r)=>r>32?qX(t,e,r):VX(t,e,r);function t7e(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){let a=(o+8)%10,c=(o+2)%10,u=r[c],d=r[c+1],h=WX(u,d,1)^r[a],m=zX(u,d,1)^r[a+1];for(let w=0;w<50;w+=10)t[o+w]^=h,t[o+w+1]^=m}let i=t[2],s=t[3];for(let o=0;o<24;o++){let a=ZX[o],c=WX(i,s,a),u=zX(i,s,a),d=GX[o];i=t[d],s=t[d+1],t[d]=c,t[d+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=XPe[n],t[1]^=e7e[n]}r.fill(0)}var vx=class t extends fd{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Gv(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=PX(this.state)}keccak(){t7e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Tu(this);let{blockLen:r,state:n}=this;e=dd(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Tu(this,!1),Zv(e),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Gv(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(dx(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new t(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}},md=(t,e,r)=>mx(()=>new vx(e,t,r)),C_t=md(6,144,224/8),x_t=md(6,136,256/8),I_t=md(6,104,384/8),A_t=md(6,72,512/8),S_t=md(1,144,224/8),JX=md(1,136,256/8),D_t=md(1,104,384/8),R_t=md(1,72,512/8),YX=(t,e,r)=>LX((n={})=>new vx(e,t,n.dkLen===void 0?r:n.dkLen,!0)),T_t=YX(31,168,128/8),N_t=YX(31,136,256/8);var QX=!1,XX=function(t){return JX(t)},eee=XX;function Er(t){let e=Et(t,"data");return Pe(eee(e))}Er._=XX;Er.lock=function(){QX=!0};Er.register=function(t){if(QX)throw new TypeError("keccak256 is locked");eee=t};Object.freeze(Er);var lM={};An(lM,{bitGet:()=>c7e,bitLen:()=>a7e,bitMask:()=>Jv,bitSet:()=>l7e,bytesToHex:()=>up,bytesToNumberBE:()=>Nu,bytesToNumberLE:()=>_x,concatBytes:()=>x0,createHmacDrbg:()=>cM,ensureBytes:()=>Ko,equalBytes:()=>s7e,hexToBytes:()=>fp,hexToNumber:()=>aM,numberToBytesBE:()=>gd,numberToBytesLE:()=>Cx,numberToHexUnpadded:()=>nee,numberToVarBytesBE:()=>i7e,utf8ToBytes:()=>o7e,validateObject:()=>yd});var ree=BigInt(0),bx=BigInt(1),r7e=BigInt(2),Ex=t=>t instanceof Uint8Array,n7e=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function up(t){if(!Ex(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=n7e[t[r]];return e}function nee(t){let e=t.toString(16);return e.length&1?`0${e}`:e}function aM(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function fp(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);let r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){let i=n*2,s=t.slice(i,i+2),o=Number.parseInt(s,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function Nu(t){return aM(up(t))}function _x(t){if(!Ex(t))throw new Error("Uint8Array expected");return aM(up(Uint8Array.from(t).reverse()))}function gd(t,e){return fp(t.toString(16).padStart(e*2,"0"))}function Cx(t,e){return gd(t,e).reverse()}function i7e(t){return fp(nee(t))}function Ko(t,e,r){let n;if(typeof e=="string")try{n=fp(e)}catch(s){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${s}`)}else if(Ex(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);let i=n.length;if(typeof r=="number"&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function x0(...t){let e=new Uint8Array(t.reduce((n,i)=>n+i.length,0)),r=0;return t.forEach(n=>{if(!Ex(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function s7e(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function o7e(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function a7e(t){let e;for(e=0;t>ree;t>>=bx,e+=1);return e}function c7e(t,e){return t>>BigInt(e)&bx}var l7e=(t,e,r)=>t|(r?bx:ree)<<BigInt(e),Jv=t=>(r7e<<BigInt(t-1))-bx,oM=t=>new Uint8Array(t),tee=t=>Uint8Array.from(t);function cM(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=oM(t),i=oM(t),s=0,o=()=>{n.fill(1),i.fill(0),s=0},a=(...h)=>r(i,n,...h),c=(h=oM())=>{i=a(tee([0]),h),n=a(),h.length!==0&&(i=a(tee([1]),h),n=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let h=0,m=[];for(;h<e;){n=a();let w=n.slice();m.push(w),h+=n.length}return x0(...m)};return(h,m)=>{o(),c(h);let w;for(;!(w=m(u()));)c();return o(),w}}var u7e={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function yd(t,e,r={}){let n=(i,s,o)=>{let a=u7e[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);let c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(let[i,s]of Object.entries(e))n(i,s,!1);for(let[i,s]of Object.entries(r))n(i,s,!0);return t}var ki=BigInt(0),di=BigInt(1),dp=BigInt(2),f7e=BigInt(3),uM=BigInt(4),iee=BigInt(5),see=BigInt(8),d7e=BigInt(9),h7e=BigInt(16);function Ts(t,e){let r=t%e;return r>=ki?r:e+r}function p7e(t,e,r){if(r<=ki||e<ki)throw new Error("Expected power/modulo > 0");if(r===di)return ki;let n=di;for(;e>ki;)e&di&&(n=n*t%r),t=t*t%r,e>>=di;return n}function Jo(t,e,r){let n=t;for(;e-- >ki;)n*=n,n%=r;return n}function xx(t,e){if(t===ki||e<=ki)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=Ts(t,e),n=e,i=ki,s=di,o=di,a=ki;for(;r!==ki;){let u=n/r,d=n%r,h=i-o*u,m=s-a*u;n=r,r=d,i=o,s=a,o=h,a=m}if(n!==di)throw new Error("invert: does not exist");return Ts(i,e)}function m7e(t){let e=(t-di)/dp,r,n,i;for(r=t-di,n=0;r%dp===ki;r/=dp,n++);for(i=dp;i<t&&p7e(i,e,t)!==t-di;i++);if(n===1){let o=(t+di)/uM;return function(c,u){let d=c.pow(u,o);if(!c.eql(c.sqr(d),u))throw new Error("Cannot find square root");return d}}let s=(r+di)/dp;return function(a,c){if(a.pow(c,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,d=a.pow(a.mul(a.ONE,i),r),h=a.pow(c,s),m=a.pow(c,r);for(;!a.eql(m,a.ONE);){if(a.eql(m,a.ZERO))return a.ZERO;let w=1;for(let C=a.sqr(m);w<u&&!a.eql(C,a.ONE);w++)C=a.sqr(C);let _=a.pow(d,di<<BigInt(u-w-1));d=a.sqr(_),h=a.mul(h,_),m=a.mul(m,d),u=w}return h}}function g7e(t){if(t%uM===f7e){let e=(t+di)/uM;return function(n,i){let s=n.pow(i,e);if(!n.eql(n.sqr(s),i))throw new Error("Cannot find square root");return s}}if(t%see===iee){let e=(t-iee)/see;return function(n,i){let s=n.mul(i,dp),o=n.pow(s,e),a=n.mul(i,o),c=n.mul(n.mul(a,dp),o),u=n.mul(a,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),i))throw new Error("Cannot find square root");return u}}return t%h7e,m7e(t)}var y7e=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fM(t){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=y7e.reduce((n,i)=>(n[i]="function",n),e);return yd(t,r)}function w7e(t,e,r){if(r<ki)throw new Error("Expected power > 0");if(r===ki)return t.ONE;if(r===di)return e;let n=t.ONE,i=e;for(;r>ki;)r&di&&(n=t.mul(n,i)),i=t.sqr(i),r>>=di;return n}function v7e(t,e){let r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function dM(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function oee(t,e,r=!1,n={}){if(t<=ki)throw new Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:i,nByteLength:s}=dM(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");let o=g7e(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:s,MASK:Jv(i),ZERO:ki,ONE:di,create:c=>Ts(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return ki<=c&&c<t},is0:c=>c===ki,isOdd:c=>(c&di)===di,neg:c=>Ts(-c,t),eql:(c,u)=>c===u,sqr:c=>Ts(c*c,t),add:(c,u)=>Ts(c+u,t),sub:(c,u)=>Ts(c-u,t),mul:(c,u)=>Ts(c*u,t),pow:(c,u)=>w7e(a,c,u),div:(c,u)=>Ts(c*xx(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>xx(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>v7e(a,c),cmov:(c,u,d)=>d?u:c,toBytes:c=>r?Cx(c,s):gd(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return r?_x(c):Nu(c)}});return Object.freeze(a)}function aee(t){if(typeof t!="bigint")throw new Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function hM(t){let e=aee(t);return e+Math.ceil(e/2)}function cee(t,e,r=!1){let n=t.length,i=aee(e),s=hM(e);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);let o=r?Nu(t):_x(t),a=Ts(o,e-di)+di;return r?Cx(a,i):gd(a,i)}var E7e=BigInt(0),pM=BigInt(1);function lee(t,e){let r=(i,s)=>{let o=s.negate();return i?o:s},n=i=>{let s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:r,unsafeLadder(i,s){let o=t.ZERO,a=i;for(;s>E7e;)s&pM&&(o=o.add(a)),a=a.double(),s>>=pM;return o},precomputeWindow(i,s){let{windows:o,windowSize:a}=n(s),c=[],u=i,d=u;for(let h=0;h<o;h++){d=u,c.push(d);for(let m=1;m<a;m++)d=d.add(u),c.push(d);u=d.double()}return c},wNAF(i,s,o){let{windows:a,windowSize:c}=n(i),u=t.ZERO,d=t.BASE,h=BigInt(2**i-1),m=2**i,w=BigInt(i);for(let _=0;_<a;_++){let C=_*c,A=Number(o&h);o>>=w,A>c&&(A-=m,o+=pM);let R=C,L=C+Math.abs(A)-1,U=_%2!==0,V=A<0;A===0?d=d.add(r(U,s[R])):u=u.add(r(V,s[L]))}return{p:u,f:d}},wNAFCached(i,s,o,a){let c=i._WINDOW_SIZE||1,u=s.get(i);return u||(u=this.precomputeWindow(i,c),c!==1&&s.set(i,a(u))),this.wNAF(c,u,o)}}}function mM(t){return fM(t.Fp),yd(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(_e(B(B({},dM(t.n,t.nBitLength)),t),{p:t.Fp.ORDER}))}function _7e(t){let e=mM(t);yd(e,{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}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(B({},e))}var{bytesToNumberBE:C7e,hexToBytes:x7e}=lM,hp={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){let{Err:e}=hp;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");let r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:C7e(n),l:t.subarray(r+2)}},toSig(t){let{Err:e}=hp,r=typeof t=="string"?x7e(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:i,l:s}=hp._parseInt(r.subarray(2)),{d:o,l:a}=hp._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){let e=u=>Number.parseInt(u[0],16)&8?"00"+u:u,r=u=>{let d=u.toString(16);return d.length&1?`0${d}`:d},n=e(r(t.s)),i=e(r(t.r)),s=n.length/2,o=i.length/2,a=r(s),c=r(o);return`30${r(o+s+4)}02${c}${i}02${a}${n}`}},Ou=BigInt(0),Ta=BigInt(1),q_t=BigInt(2),uee=BigInt(3),W_t=BigInt(4);function I7e(t){let e=_7e(t),{Fp:r}=e,n=e.toBytes||((_,C,A)=>{let R=C.toAffine();return x0(Uint8Array.from([4]),r.toBytes(R.x),r.toBytes(R.y))}),i=e.fromBytes||(_=>{let C=_.subarray(1),A=r.fromBytes(C.subarray(0,r.BYTES)),R=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:A,y:R}});function s(_){let{a:C,b:A}=e,R=r.sqr(_),L=r.mul(R,_);return r.add(r.add(L,r.mul(_,C)),A)}if(!r.eql(r.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(_){return typeof _=="bigint"&&Ou<_&&_<e.n}function a(_){if(!o(_))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(_){let{allowedPrivateKeyLengths:C,nByteLength:A,wrapPrivateKey:R,n:L}=e;if(C&&typeof _!="bigint"){if(_ instanceof Uint8Array&&(_=up(_)),typeof _!="string"||!C.includes(_.length))throw new Error("Invalid key");_=_.padStart(A*2,"0")}let U;try{U=typeof _=="bigint"?_:Nu(Ko("private key",_,A))}catch{throw new Error(`private key must be ${A} bytes, hex or bigint, not ${typeof _}`)}return R&&(U=Ts(U,L)),a(U),U}let u=new Map;function d(_){if(!(_ instanceof h))throw new Error("ProjectivePoint expected")}class h{constructor(C,A,R){if(this.px=C,this.py=A,this.pz=R,C==null||!r.isValid(C))throw new Error("x required");if(A==null||!r.isValid(A))throw new Error("y required");if(R==null||!r.isValid(R))throw new Error("z required")}static fromAffine(C){let{x:A,y:R}=C||{};if(!C||!r.isValid(A)||!r.isValid(R))throw new Error("invalid affine point");if(C instanceof h)throw new Error("projective point not allowed");let L=U=>r.eql(U,r.ZERO);return L(A)&&L(R)?h.ZERO:new h(A,R,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){let A=r.invertBatch(C.map(R=>R.pz));return C.map((R,L)=>R.toAffine(A[L])).map(h.fromAffine)}static fromHex(C){let A=h.fromAffine(i(Ko("pointHex",C)));return A.assertValidity(),A}static fromPrivateKey(C){return h.BASE.multiply(c(C))}_setWindowSize(C){this._WINDOW_SIZE=C,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:C,y:A}=this.toAffine();if(!r.isValid(C)||!r.isValid(A))throw new Error("bad point: x or y not FE");let R=r.sqr(A),L=s(C);if(!r.eql(R,L))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:C}=this.toAffine();if(r.isOdd)return!r.isOdd(C);throw new Error("Field doesn't support isOdd")}equals(C){d(C);let{px:A,py:R,pz:L}=this,{px:U,py:V,pz:Q}=C,Y=r.eql(r.mul(A,Q),r.mul(U,L)),k=r.eql(r.mul(R,Q),r.mul(V,L));return Y&&k}negate(){return new h(this.px,r.neg(this.py),this.pz)}double(){let{a:C,b:A}=e,R=r.mul(A,uee),{px:L,py:U,pz:V}=this,Q=r.ZERO,Y=r.ZERO,k=r.ZERO,q=r.mul(L,L),ie=r.mul(U,U),W=r.mul(V,V),z=r.mul(L,U);return z=r.add(z,z),k=r.mul(L,V),k=r.add(k,k),Q=r.mul(C,k),Y=r.mul(R,W),Y=r.add(Q,Y),Q=r.sub(ie,Y),Y=r.add(ie,Y),Y=r.mul(Q,Y),Q=r.mul(z,Q),k=r.mul(R,k),W=r.mul(C,W),z=r.sub(q,W),z=r.mul(C,z),z=r.add(z,k),k=r.add(q,q),q=r.add(k,q),q=r.add(q,W),q=r.mul(q,z),Y=r.add(Y,q),W=r.mul(U,V),W=r.add(W,W),q=r.mul(W,z),Q=r.sub(Q,q),k=r.mul(W,ie),k=r.add(k,k),k=r.add(k,k),new h(Q,Y,k)}add(C){d(C);let{px:A,py:R,pz:L}=this,{px:U,py:V,pz:Q}=C,Y=r.ZERO,k=r.ZERO,q=r.ZERO,ie=e.a,W=r.mul(e.b,uee),z=r.mul(A,U),X=r.mul(R,V),D=r.mul(L,Q),g=r.add(A,R),v=r.add(U,V);g=r.mul(g,v),v=r.add(z,X),g=r.sub(g,v),v=r.add(A,L);let x=r.add(U,Q);return v=r.mul(v,x),x=r.add(z,D),v=r.sub(v,x),x=r.add(R,L),Y=r.add(V,Q),x=r.mul(x,Y),Y=r.add(X,D),x=r.sub(x,Y),q=r.mul(ie,v),Y=r.mul(W,D),q=r.add(Y,q),Y=r.sub(X,q),q=r.add(X,q),k=r.mul(Y,q),X=r.add(z,z),X=r.add(X,z),D=r.mul(ie,D),v=r.mul(W,v),X=r.add(X,D),D=r.sub(z,D),D=r.mul(ie,D),v=r.add(v,D),z=r.mul(X,v),k=r.add(k,z),z=r.mul(x,v),Y=r.mul(g,Y),Y=r.sub(Y,z),z=r.mul(g,X),q=r.mul(x,q),q=r.add(q,z),new h(Y,k,q)}subtract(C){return this.add(C.negate())}is0(){return this.equals(h.ZERO)}wNAF(C){return w.wNAFCached(this,u,C,A=>{let R=r.invertBatch(A.map(L=>L.pz));return A.map((L,U)=>L.toAffine(R[U])).map(h.fromAffine)})}multiplyUnsafe(C){let A=h.ZERO;if(C===Ou)return A;if(a(C),C===Ta)return this;let{endo:R}=e;if(!R)return w.unsafeLadder(this,C);let{k1neg:L,k1:U,k2neg:V,k2:Q}=R.splitScalar(C),Y=A,k=A,q=this;for(;U>Ou||Q>Ou;)U&Ta&&(Y=Y.add(q)),Q&Ta&&(k=k.add(q)),q=q.double(),U>>=Ta,Q>>=Ta;return L&&(Y=Y.negate()),V&&(k=k.negate()),k=new h(r.mul(k.px,R.beta),k.py,k.pz),Y.add(k)}multiply(C){a(C);let A=C,R,L,{endo:U}=e;if(U){let{k1neg:V,k1:Q,k2neg:Y,k2:k}=U.splitScalar(A),{p:q,f:ie}=this.wNAF(Q),{p:W,f:z}=this.wNAF(k);q=w.constTimeNegate(V,q),W=w.constTimeNegate(Y,W),W=new h(r.mul(W.px,U.beta),W.py,W.pz),R=q.add(W),L=ie.add(z)}else{let{p:V,f:Q}=this.wNAF(A);R=V,L=Q}return h.normalizeZ([R,L])[0]}multiplyAndAddUnsafe(C,A,R){let L=h.BASE,U=(Q,Y)=>Y===Ou||Y===Ta||!Q.equals(L)?Q.multiplyUnsafe(Y):Q.multiply(Y),V=U(this,A).add(U(C,R));return V.is0()?void 0:V}toAffine(C){let{px:A,py:R,pz:L}=this,U=this.is0();C==null&&(C=U?r.ONE:r.inv(L));let V=r.mul(A,C),Q=r.mul(R,C),Y=r.mul(L,C);if(U)return{x:r.ZERO,y:r.ZERO};if(!r.eql(Y,r.ONE))throw new Error("invZ was invalid");return{x:V,y:Q}}isTorsionFree(){let{h:C,isTorsionFree:A}=e;if(C===Ta)return!0;if(A)return A(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:C,clearCofactor:A}=e;return C===Ta?this:A?A(h,this):this.multiplyUnsafe(e.h)}toRawBytes(C=!0){return this.assertValidity(),n(h,this,C)}toHex(C=!0){return up(this.toRawBytes(C))}}h.BASE=new h(e.Gx,e.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);let m=e.nBitLength,w=lee(h,e.endo?Math.ceil(m/2):m);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function A7e(t){let e=mM(t);return yd(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze(B({lowS:!0},e))}function fee(t){let e=A7e(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(v){return Ou<v&&v<r.ORDER}function a(v){return Ts(v,n)}function c(v){return xx(v,n)}let{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:h,isWithinCurveOrder:m}=I7e(_e(B({},e),{toBytes(v,x,I){let T=x.toAffine(),H=r.toBytes(T.x),$=x0;return I?$(Uint8Array.from([x.hasEvenY()?2:3]),H):$(Uint8Array.from([4]),H,r.toBytes(T.y))},fromBytes(v){let x=v.length,I=v[0],T=v.subarray(1);if(x===i&&(I===2||I===3)){let H=Nu(T);if(!o(H))throw new Error("Point is not on curve");let $=h(H),N=r.sqrt($),E=(N&Ta)===Ta;return(I&1)===1!==E&&(N=r.neg(N)),{x:H,y:N}}else if(x===s&&I===4){let H=r.fromBytes(T.subarray(0,r.BYTES)),$=r.fromBytes(T.subarray(r.BYTES,2*r.BYTES));return{x:H,y:$}}else throw new Error(`Point of length ${x} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}})),w=v=>up(gd(v,e.nByteLength));function _(v){let x=n>>Ta;return v>x}function C(v){return _(v)?a(-v):v}let A=(v,x,I)=>Nu(v.slice(x,I));class R{constructor(x,I,T){this.r=x,this.s=I,this.recovery=T,this.assertValidity()}static fromCompact(x){let I=e.nByteLength;return x=Ko("compactSignature",x,I*2),new R(A(x,0,I),A(x,I,2*I))}static fromDER(x){let{r:I,s:T}=hp.toSig(Ko("DER",x));return new R(I,T)}assertValidity(){if(!m(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!m(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(x){return new R(this.r,this.s,x)}recoverPublicKey(x){let{r:I,s:T,recovery:H}=this,$=k(Ko("msgHash",x));if(H==null||![0,1,2,3].includes(H))throw new Error("recovery id invalid");let N=H===2||H===3?I+e.n:I;if(N>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let E=H&1?"03":"02",P=u.fromHex(E+w(N)),ae=c(N),ce=a(-$*ae),se=a(T*ae),pe=u.BASE.multiplyAndAddUnsafe(P,ce,se);if(!pe)throw new Error("point at infinify");return pe.assertValidity(),pe}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new R(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return fp(this.toDERHex())}toDERHex(){return hp.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return fp(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}let L={isValidPrivateKey(v){try{return d(v),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let v=hM(e.n);return cee(e.randomBytes(v),e.n)},precompute(v=8,x=u.BASE){return x._setWindowSize(v),x.multiply(BigInt(3)),x}};function U(v,x=!0){return u.fromPrivateKey(v).toRawBytes(x)}function V(v){let x=v instanceof Uint8Array,I=typeof v=="string",T=(x||I)&&v.length;return x?T===i||T===s:I?T===2*i||T===2*s:v instanceof u}function Q(v,x,I=!0){if(V(v))throw new Error("first arg must be private key");if(!V(x))throw new Error("second arg must be public key");return u.fromHex(x).multiply(d(v)).toRawBytes(I)}let Y=e.bits2int||function(v){let x=Nu(v),I=v.length*8-e.nBitLength;return I>0?x>>BigInt(I):x},k=e.bits2int_modN||function(v){return a(Y(v))},q=Jv(e.nBitLength);function ie(v){if(typeof v!="bigint")throw new Error("bigint expected");if(!(Ou<=v&&v<q))throw new Error(`bigint expected < 2^${e.nBitLength}`);return gd(v,e.nByteLength)}function W(v,x,I=z){if(["recovered","canonical"].some(Te=>Te in I))throw new Error("sign() legacy options not supported");let{hash:T,randomBytes:H}=e,{lowS:$,prehash:N,extraEntropy:E}=I;$==null&&($=!0),v=Ko("msgHash",v),N&&(v=Ko("prehashed msgHash",T(v)));let P=k(v),ae=d(x),ce=[ie(ae),ie(P)];if(E!=null){let Te=E===!0?H(r.BYTES):E;ce.push(Ko("extraEntropy",Te))}let se=x0(...ce),pe=P;function De(Te){let st=Y(Te);if(!m(st))return;let Ue=c(st),Oe=u.BASE.multiply(st).toAffine(),_t=a(Oe.x);if(_t===Ou)return;let Fe=a(Ue*a(pe+_t*ae));if(Fe===Ou)return;let Ye=(Oe.x===_t?0:2)|Number(Oe.y&Ta),Dc=Fe;return $&&_(Fe)&&(Dc=C(Fe),Ye^=1),new R(_t,Dc,Ye)}return{seed:se,k2sig:De}}let z={lowS:e.lowS,prehash:!1},X={lowS:e.lowS,prehash:!1};function D(v,x,I=z){let{seed:T,k2sig:H}=W(v,x,I),$=e;return cM($.hash.outputLen,$.nByteLength,$.hmac)(T,H)}u.BASE._setWindowSize(8);function g(v,x,I,T=X){let H=v;if(x=Ko("msgHash",x),I=Ko("publicKey",I),"strict"in T)throw new Error("options.strict was renamed to lowS");let{lowS:$,prehash:N}=T,E,P;try{if(typeof H=="string"||H instanceof Uint8Array)try{E=R.fromDER(H)}catch(Oe){if(!(Oe instanceof hp.Err))throw Oe;E=R.fromCompact(H)}else if(typeof H=="object"&&typeof H.r=="bigint"&&typeof H.s=="bigint"){let{r:Oe,s:_t}=H;E=new R(Oe,_t)}else throw new Error("PARSE");P=u.fromHex(I)}catch(Oe){if(Oe.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if($&&E.hasHighS())return!1;N&&(x=e.hash(x));let{r:ae,s:ce}=E,se=k(x),pe=c(ce),De=a(se*pe),Te=a(ae*pe),st=u.BASE.multiplyAndAddUnsafe(P,De,Te)?.toAffine();return st?a(st.x)===ae:!1}return{CURVE:e,getPublicKey:U,getSharedSecret:Q,sign:D,verify:g,ProjectivePoint:u,Signature:R,utils:L}}function S7e(t){return{hash:t,hmac:(e,...r)=>iM(t,e,kX(...r)),randomBytes:FX}}function dee(t,e){let r=n=>fee(B(B({},t),S7e(n)));return Object.freeze(_e(B({},r(e)),{create:r}))}var mee=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),hee=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),D7e=BigInt(1),gM=BigInt(2),pee=(t,e)=>(t+e/gM)/e;function R7e(t){let e=mee,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),u=t*t*t%e,d=u*u*t%e,h=Jo(d,r,e)*d%e,m=Jo(h,r,e)*d%e,w=Jo(m,gM,e)*u%e,_=Jo(w,i,e)*w%e,C=Jo(_,s,e)*_%e,A=Jo(C,a,e)*C%e,R=Jo(A,c,e)*A%e,L=Jo(R,a,e)*C%e,U=Jo(L,r,e)*d%e,V=Jo(U,o,e)*_%e,Q=Jo(V,n,e)*u%e,Y=Jo(Q,gM,e);if(!yM.eql(yM.sqr(Y),t))throw new Error("Cannot find square root");return Y}var yM=oee(mee,void 0,void 0,{sqrt:R7e}),Mu=dee({a:BigInt(0),b:BigInt(7),Fp:yM,n:hee,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=hee,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-D7e*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,o=BigInt("0x100000000000000000000000000000000"),a=pee(s*t,e),c=pee(-n*t,e),u=Ts(t-a*r-c*i,e),d=Ts(-a*n-c*s,e),h=u>o,m=d>o;if(h&&(u=e-u),m&&(d=e-d),u>o||d>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:h,k1:u,k2neg:m,k2:d}}}},BX),rCt=BigInt(0);var nCt=Mu.ProjectivePoint;var Pu="0x0000000000000000000000000000000000000000";var Ix="0x0000000000000000000000000000000000000000000000000000000000000000";var gee=BigInt(0),yee=BigInt(1),wee=BigInt(2),vee=BigInt(27),bee=BigInt(28),Ax=BigInt(35),I0={};function Eee(t){return bo(yi(t),32)}var eo=class t{#e;#t;#r;#n;get r(){return this.#e}set r(e){K(hc(e)===32,"invalid r","value",e),this.#e=Pe(e)}get s(){return this.#t}set s(e){K(hc(e)===32,"invalid s","value",e);let r=Pe(e);K(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),this.#t=r}get v(){return this.#r}set v(e){let r=wt(e,"value");K(r===27||r===28,"invalid v","v",e),this.#r=r}get networkV(){return this.#n}get legacyChainId(){let e=this.networkV;return e==null?null:t.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){let e=Et(this.s);return this.yParity&&(e[0]|=128),Pe(e)}get compactSerialized(){return Nr([this.r,this.yParityAndS])}get serialized(){return Nr([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,r,n,i){dc(e,I0,"Signature"),this.#e=r,this.#t=n,this.#r=i,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){let e=new t(I0,this.r,this.s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){let e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){let r=Me(e,"v");return r==vee||r==bee?gee:(K(r>=Ax,"invalid EIP-155 v","v",e),(r-Ax)/wee)}static getChainIdV(e,r){return Me(e)*wee+BigInt(35+r-27)}static getNormalizedV(e){let r=Me(e);return r===gee||r===vee?27:r===yee||r===bee?28:(K(r>=Ax,"invalid v","v",e),r&yee?27:28)}static from(e){function r(u,d){K(u,d,"signature",e)}if(e==null)return new t(I0,Ix,Ix,27);if(typeof e=="string"){let u=Et(e,"signature");if(u.length===64){let d=Pe(u.slice(0,32)),h=u.slice(32,64),m=h[0]&128?28:27;return h[0]&=127,new t(I0,d,Pe(h),m)}if(u.length===65){let d=Pe(u.slice(0,32)),h=u.slice(32,64);r((h[0]&128)===0,"non-canonical s");let m=t.getNormalizedV(u[64]);return new t(I0,d,Pe(h),m)}r(!1,"invalid raw signature length")}if(e instanceof t)return e.clone();let n=e.r;r(n!=null,"missing r");let i=Eee(n),s=function(u,d){if(u!=null)return Eee(u);if(d!=null){r(nr(d,32),"invalid yParityAndS");let h=Et(d);return h[0]&=127,Pe(h)}r(!1,"missing s")}(e.s,e.yParityAndS);r((Et(s)[0]&128)==0,"non-canonical s");let{networkV:o,v:a}=function(u,d,h){if(u!=null){let m=Me(u);return{networkV:m>=Ax?m:void 0,v:t.getNormalizedV(m)}}if(d!=null)return r(nr(d,32),"invalid yParityAndS"),{v:Et(d)[0]&128?28:27};if(h!=null){switch(wt(h,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new t(I0,i,s,a);return o&&(c.#n=o),r(e.yParity==null||wt(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};var wd=class t{#e;constructor(e){K(hc(e)===32,"invalid private key","privateKey","[REDACTED]"),this.#e=Pe(e)}get privateKey(){return this.#e}get publicKey(){return t.computePublicKey(this.#e)}get compressedPublicKey(){return t.computePublicKey(this.#e,!0)}sign(e){K(hc(e)===32,"invalid digest length","digest",e);let r=Mu.sign(fi(e),fi(this.#e),{lowS:!0});return eo.from({r:Xs(r.r,32),s:Xs(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){let r=t.computePublicKey(e);return Pe(Mu.getSharedSecret(fi(this.#e),Et(r),!1))}static computePublicKey(e,r){let n=Et(e,"key");if(n.length===32){let s=Mu.getPublicKey(n,!!r);return Pe(s)}if(n.length===64){let s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}let i=Mu.ProjectivePoint.fromHex(n);return Pe(i.toRawBytes(r))}static recoverPublicKey(e,r){K(hc(e)===32,"invalid digest length","digest",e);let n=eo.from(r),i=Mu.Signature.fromCompact(fi(Nr([n.r,n.s])));i=i.addRecoveryBit(n.yParity);let s=i.recoverPublicKey(fi(e));return K(s!=null,"invalid signautre for digest","signature",r),"0x"+s.toHex(!1)}static addPoints(e,r,n){let i=Mu.ProjectivePoint.fromHex(t.computePublicKey(e).substring(2)),s=Mu.ProjectivePoint.fromHex(t.computePublicKey(r).substring(2));return"0x"+i.add(s).toHex(!!n)}};var T7e=BigInt(0),N7e=BigInt(36);function _ee(t){t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);let n=Et(Er(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var wM={};for(let t=0;t<10;t++)wM[String(t)]=String(t);for(let t=0;t<26;t++)wM[String.fromCharCode(65+t)]=String(10+t);var Cee=15;function O7e(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>wM[n]).join("");for(;e.length>=Cee;){let n=e.substring(0,Cee);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}var M7e=function(){let t={};for(let e=0;e<36;e++){let r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function P7e(t){t=t.toLowerCase();let e=T7e;for(let r=0;r<t.length;r++)e=e*N7e+M7e[t[r]];return e}function It(t){if(K(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);let e=_ee(t);return K(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){K(t.substring(2,4)===O7e(t),"bad icap checksum","address",t);let e=P7e(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return _ee("0x"+e)}K(!1,"invalid address","address",t)}function Sx(t){let e=It(t.from),n=Me(t.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,It(un(Er(fl([e,n])),12))}function Yv(t){return t&&typeof t.getAddress=="function"}function vM(t,e){return y(this,null,function*(){let r=yield e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(oe(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),K(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),It(r)})}function wi(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?It(t):(oe(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),vM(t,e.resolveName(t)));if(Yv(t))return vM(t,t.getAddress());if(t&&typeof t.then=="function")return vM(t,t);K(!1,"unsupported addressable value","target",t)}var wc={};function Qe(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new Tn(wc,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function Sr(t,e){return new Tn(wc,`bytes${e||""}`,t,{size:e})}var xee=Symbol.for("_ethers_typed"),Tn=class t{type;value;#e;_typedSymbol;constructor(e,r,n,i){i==null&&(i=null),dc(wc,e,"Typed"),ke(this,{_typedSymbol:xee,type:r,value:n}),this.#e=i,this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return this.#e}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return this.#e===!0?-1:this.#e===!1?this.value.length:null}static from(e,r){return new t(wc,e,r)}static uint8(e){return Qe(e,8)}static uint16(e){return Qe(e,16)}static uint24(e){return Qe(e,24)}static uint32(e){return Qe(e,32)}static uint40(e){return Qe(e,40)}static uint48(e){return Qe(e,48)}static uint56(e){return Qe(e,56)}static uint64(e){return Qe(e,64)}static uint72(e){return Qe(e,72)}static uint80(e){return Qe(e,80)}static uint88(e){return Qe(e,88)}static uint96(e){return Qe(e,96)}static uint104(e){return Qe(e,104)}static uint112(e){return Qe(e,112)}static uint120(e){return Qe(e,120)}static uint128(e){return Qe(e,128)}static uint136(e){return Qe(e,136)}static uint144(e){return Qe(e,144)}static uint152(e){return Qe(e,152)}static uint160(e){return Qe(e,160)}static uint168(e){return Qe(e,168)}static uint176(e){return Qe(e,176)}static uint184(e){return Qe(e,184)}static uint192(e){return Qe(e,192)}static uint200(e){return Qe(e,200)}static uint208(e){return Qe(e,208)}static uint216(e){return Qe(e,216)}static uint224(e){return Qe(e,224)}static uint232(e){return Qe(e,232)}static uint240(e){return Qe(e,240)}static uint248(e){return Qe(e,248)}static uint256(e){return Qe(e,256)}static uint(e){return Qe(e,256)}static int8(e){return Qe(e,-8)}static int16(e){return Qe(e,-16)}static int24(e){return Qe(e,-24)}static int32(e){return Qe(e,-32)}static int40(e){return Qe(e,-40)}static int48(e){return Qe(e,-48)}static int56(e){return Qe(e,-56)}static int64(e){return Qe(e,-64)}static int72(e){return Qe(e,-72)}static int80(e){return Qe(e,-80)}static int88(e){return Qe(e,-88)}static int96(e){return Qe(e,-96)}static int104(e){return Qe(e,-104)}static int112(e){return Qe(e,-112)}static int120(e){return Qe(e,-120)}static int128(e){return Qe(e,-128)}static int136(e){return Qe(e,-136)}static int144(e){return Qe(e,-144)}static int152(e){return Qe(e,-152)}static int160(e){return Qe(e,-160)}static int168(e){return Qe(e,-168)}static int176(e){return Qe(e,-176)}static int184(e){return Qe(e,-184)}static int192(e){return Qe(e,-192)}static int200(e){return Qe(e,-200)}static int208(e){return Qe(e,-208)}static int216(e){return Qe(e,-216)}static int224(e){return Qe(e,-224)}static int232(e){return Qe(e,-232)}static int240(e){return Qe(e,-240)}static int248(e){return Qe(e,-248)}static int256(e){return Qe(e,-256)}static int(e){return Qe(e,-256)}static bytes1(e){return Sr(e,1)}static bytes2(e){return Sr(e,2)}static bytes3(e){return Sr(e,3)}static bytes4(e){return Sr(e,4)}static bytes5(e){return Sr(e,5)}static bytes6(e){return Sr(e,6)}static bytes7(e){return Sr(e,7)}static bytes8(e){return Sr(e,8)}static bytes9(e){return Sr(e,9)}static bytes10(e){return Sr(e,10)}static bytes11(e){return Sr(e,11)}static bytes12(e){return Sr(e,12)}static bytes13(e){return Sr(e,13)}static bytes14(e){return Sr(e,14)}static bytes15(e){return Sr(e,15)}static bytes16(e){return Sr(e,16)}static bytes17(e){return Sr(e,17)}static bytes18(e){return Sr(e,18)}static bytes19(e){return Sr(e,19)}static bytes20(e){return Sr(e,20)}static bytes21(e){return Sr(e,21)}static bytes22(e){return Sr(e,22)}static bytes23(e){return Sr(e,23)}static bytes24(e){return Sr(e,24)}static bytes25(e){return Sr(e,25)}static bytes26(e){return Sr(e,26)}static bytes27(e){return Sr(e,27)}static bytes28(e){return Sr(e,28)}static bytes29(e){return Sr(e,29)}static bytes30(e){return Sr(e,30)}static bytes31(e){return Sr(e,31)}static bytes32(e){return Sr(e,32)}static address(e){return new t(wc,"address",e)}static bool(e){return new t(wc,"bool",!!e)}static bytes(e){return new t(wc,"bytes",e)}static string(e){return new t(wc,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new t(wc,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===xee}static dereference(e,r){if(t.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};var Dx=class extends xi{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Tn.dereference(r,"string");try{n=It(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return It(Xs(e.readValue(),20))}};var Rx=class extends xi{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}};function bM(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(u=>{let d=u.localName;return oe(d,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),oe(!c[d],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),c[d]=!0,r[d]})}else K(!1,"invalid tuple value","tuple",r);K(e.length===n.length,"types/value length mismatch","tuple",r);let i=new lp,s=new lp,o=[];e.forEach((c,u)=>{let d=n[u];if(c.dynamic){let h=s.length;c.encode(s,d);let m=i.writeUpdatableValue();o.push(w=>{m(w+h)})}else c.encode(i,d)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function EM(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readIndex(),c=i.subReader(a);try{o=s.decode(c)}catch(u){if(Ln(u,"BUFFER_OVERRUN"))throw u;o=u,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(Ln(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");r.push(o),n.push(s.localName||null)}),cp.fromItems(r,n)}var Tx=class extends xi{coder;length;constructor(e,r,n){let i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),ke(this,{coder:e,length:r})}defaultValue(){let e=this.coder.defaultValue(),r=[];for(let n=0;n<this.length;n++)r.push(e);return r}encode(e,r){let n=Tn.dereference(r,"array");Array.isArray(n)||this._throwError("expected array value",n);let i=this.length;i===-1&&(i=n.length,e.writeValue(n.length)),y0(n.length,i,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let o=0;o<n.length;o++)s.push(this.coder);return bM(e,s,n)}decode(e){let r=this.length;r===-1&&(r=e.readIndex(),oe(r*ps<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:r*ps,length:e.dataLength}));let n=[];for(let i=0;i<r;i++)n.push(new Rx(this.coder));return EM(e,n)}};var Nx=class extends xi{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){let n=Tn.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}};var Qv=class extends xi{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=fi(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}},Ox=class extends Qv{constructor(e){super("bytes",e)}decode(e){return Pe(super.decode(e))}};var Mx=class extends xi{size;constructor(e,r){let n="bytes"+String(e);super(n,n,r,!1),ke(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let n=fi(Tn.dereference(r,this.type));return n.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(n)}decode(e){return Pe(e.readBytes(this.size))}};var B7e=new Uint8Array([]),Px=class extends xi{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(B7e)}decode(e){return e.readBytes(0),null}};var U7e=BigInt(0),j7e=BigInt(1),H7e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),kx=class extends xi{size;signed;constructor(e,r,n){let i=(r?"int":"uint")+e*8;super(i,i,n,!1),ke(this,{size:e,signed:r},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,r){let n=Me(Tn.dereference(r,this.type)),i=Ra(H7e,ps*8);if(this.signed){let s=Ra(i,this.size*8-1);(n>s||n<-(s+j7e))&&this._throwError("value out-of-bounds",r),n=v0(n,8*ps)}else(n<U7e||n>Ra(i,this.size*8))&&this._throwError("value out-of-bounds",r);return e.writeValue(n)}decode(e){let r=Ra(e.readValue(),this.size*8);return this.signed&&(r=ld(r,this.size*8)),r}};var Lx=class extends Qv{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Ds(Tn.dereference(r,"string")))}decode(e){return Ru(super.decode(e))}};var pp=class extends xi{coders;constructor(e,r){let n=!1,i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});let s="tuple("+i.join(",")+")";super("tuple",s,r,n),ke(this,{coders:Object.freeze(e.slice())})}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let r=this.coders.reduce((n,i)=>{let s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){let n=Tn.dereference(r,"tuple");return bM(e,this.coders,n)}decode(e){return EM(e,this.coders)}};function vc(t){return Er(Ds(t))}var V7e="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI",Iee=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Aee=4;function $7e(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,s=[0,1];for(let Q=1;Q<n;Q++)s.push(i+=r());let o=r(),a=e;e+=o;let c=0,u=0;function d(){return c==0&&(u=u<<8|t[e++],c=8),u>>--c&1}let h=31,m=2**h,w=m>>>1,_=w>>1,C=m-1,A=0;for(let Q=0;Q<h;Q++)A=A<<1|d();let R=[],L=0,U=m;for(;;){let Q=Math.floor(((A-L+1)*i-1)/U),Y=0,k=n;for(;k-Y>1;){let W=Y+k>>>1;Q<s[W]?k=W:Y=W}if(Y==0)break;R.push(Y);let q=L+Math.floor(U*s[Y]/i),ie=L+Math.floor(U*s[Y+1]/i)-1;for(;!((q^ie)&w);)A=A<<1&C|d(),q=q<<1&C,ie=ie<<1&C|1;for(;q&~ie&_;)A=A&w|A<<1&C>>>1|d(),q=q<<1^w,ie=(ie^w)<<1|w|1;L=q,U=1+ie-q}let V=n-4;return R.map(Q=>{switch(Q-V){case 3:return V+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return V+256+(t[a++]<<8|t[a++]);case 1:return V+t[a++];default:return Q-1}})}function q7e(t){let e=0;return()=>t[e++]}function Tee(t){return q7e($7e(W7e(t)))}function W7e(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,s=0,o=0,a=0;i<r;i++)a=a<<6|e[t.charCodeAt(i)],o+=6,o>=8&&(n[s++]=a>>(o-=8));return n}function z7e(t){return t&1?~t>>1:t>>1}function G7e(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=z7e(e());return r}function t2(t,e=0){let r=[];for(;;){let n=t(),i=t();if(!i)break;e+=n;for(let s=0;s<i;s++)r.push(e+s);e+=i+1}return r}function Nee(t){return r2(()=>{let e=t2(t);if(e.length)return e})}function Oee(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Z7e(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(K7e(r,t))}return e.flat()}function r2(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function Mee(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)G7e(t,r).forEach((s,o)=>n[o].push(s));return n}function Z7e(t,e){let r=1+e(),n=e(),i=r2(e);return Mee(i.length,1+t,e).flatMap((o,a)=>{let[c,...u]=o;return Array(i[a]).fill().map((d,h)=>{let m=h*n;return[c+h*r,u.map(w=>w+m)]})})}function K7e(t,e){let r=1+e();return Mee(r,1+t,e).map(i=>[i[0],i.slice(1)])}function J7e(t){let e=[],r=t2(t);return i(n([]),[]),e;function n(s){let o=t(),a=r2(()=>{let c=t2(t).map(u=>r[u]);if(c.length)return n(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let u of o)for(let d of u.Q)i(u,[...a,d],c)}}}function Y7e(t){return t.toString(16).toUpperCase().padStart(2,"0")}function Pee(t){return`{${Y7e(t)}}`}function Q7e(t){let e=[];for(let r=0,n=t.length;r<n;){let i=t.codePointAt(r);r+=i<65536?1:2,e.push(i)}return e}function D0(t){let r=t.length;if(r<4096)return String.fromCodePoint(...t);let n=[];for(let i=0;i<r;)n.push(String.fromCodePoint(...t.slice(i,i+=4096)));return n.join("")}function X7e(t,e){let r=t.length,n=r-e.length;for(let i=0;n==0&&i<r;i++)n=t[i]-e[i];return n}var eke="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g",n2=44032,Bx=4352,Ux=4449,jx=4519,kee=19,Lee=21,R0=28,Hx=Lee*R0,tke=kee*Hx,rke=n2+tke,nke=Bx+kee,ike=Ux+Lee,ske=jx+R0;function Xv(t){return t>>24&255}function Fee(t){return t&16777215}var CM,See,xM,Fx;function oke(){let t=Tee(eke);CM=new Map(Nee(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),See=new Set(t2(t)),xM=new Map,Fx=new Map;for(let[e,r]of Oee(t)){if(!See.has(e)&&r.length==2){let[n,i]=r,s=Fx.get(n);s||(s=new Map,Fx.set(n,s)),s.set(i,e)}xM.set(e,r.reverse())}}function Bee(t){return t>=n2&&t<rke}function ake(t,e){if(t>=Bx&&t<nke&&e>=Ux&&e<ike)return n2+(t-Bx)*Hx+(e-Ux)*R0;if(Bee(t)&&e>jx&&e<ske&&(t-n2)%R0==0)return t+(e-jx);{let r=Fx.get(t);return r&&(r=r.get(e),r)?r:-1}}function Uee(t){CM||oke();let e=[],r=[],n=!1;function i(s){let o=CM.get(s);o&&(n=!0,s|=o),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if(Bee(s)){let o=s-n2,a=o/Hx|0,c=o%Hx/R0|0,u=o%R0;i(Bx+a),i(Ux+c),u>0&&i(jx+u)}else{let o=xM.get(s);o?r.push(...o):i(s)}if(!r.length)break;s=r.pop()}if(n&&e.length>1){let s=Xv(e[0]);for(let o=1;o<e.length;o++){let a=Xv(e[o]);if(a==0||s<=a){s=a;continue}let c=o-1;for(;;){let u=e[c+1];if(e[c+1]=e[c],e[c]=u,!c||(s=Xv(e[--c]),s<=a))break}s=Xv(e[o])}}return e}function cke(t){let e=[],r=[],n=-1,i=0;for(let s of t){let o=Xv(s),a=Fee(s);if(n==-1)o==0?n=a:e.push(a);else if(i>0&&i>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),i=o;else{let c=ake(n,a);c>=0?n=c:i==0&&o==0?(e.push(n),n=a):(r.push(a),i=o)}}return n>=0&&e.push(n,...r),e}function jee(t){return Uee(t).map(Fee)}function lke(t){return cke(Uee(t))}var Dee=45;var Hee=".",Vee=65039,$ee=1,Vx=t=>Array.from(t);function i2(t,e){return t.P.has(e)||t.Q.has(e)}var IM=class extends Array{get is_emoji(){return!0}},AM,qee,gp,SM,Wee,uke,S0,_M,A0,mp,Ree,DM;function RM(){if(AM)return;let t=Tee(V7e),e=()=>t2(t),r=()=>new Set(e()),n=(d,h)=>h.forEach(m=>d.add(m));AM=new Map(Oee(t)),qee=r(),gp=e(),SM=new Set(e().map(d=>gp[d])),gp=new Set(gp),Wee=r(),uke=r();let i=Nee(t),s=t(),o=()=>{let d=new Set;return e().forEach(h=>n(d,i[h])),n(d,e()),d};S0=r2(d=>{let h=r2(t).map(m=>m+96);if(h.length){let m=d>=s;h[0]-=32,h=D0(h),m&&(h=`Restricted[${h}]`);let w=o(),_=o(),C=!t();return{N:h,P:w,Q:_,M:C,R:m}}}),_M=r(),A0=new Map;let a=e().concat(Vx(_M)).sort((d,h)=>d-h);a.forEach((d,h)=>{let m=t(),w=a[h]=m?a[h-m]:{V:[],M:new Map};w.V.push(d),_M.has(d)||A0.set(d,w)});for(let{V:d,M:h}of new Set(A0.values())){let m=[];for(let _ of d){let C=S0.filter(R=>i2(R,_)),A=m.find(({G:R})=>C.some(L=>R.has(L)));A||(A={G:new Set,V:[]},m.push(A)),A.V.push(_),n(A.G,C)}let w=m.flatMap(_=>Vx(_.G));for(let{G:_,V:C}of m){let A=new Set(w.filter(R=>!_.has(R)));for(let R of C)h.set(R,A)}}mp=new Set;let c=new Set,u=d=>mp.has(d)?c.add(d):mp.add(d);for(let d of S0){for(let h of d.P)u(h);for(let h of d.Q)u(h)}for(let d of mp)!A0.has(d)&&!c.has(d)&&A0.set(d,$ee);n(mp,jee(mp)),Ree=J7e(t).map(d=>IM.from(d)).sort(X7e),DM=new Map;for(let d of Ree){let h=[DM];for(let m of d){let w=h.map(_=>{let C=_.get(m);return C||(C=new Map,_.set(m,C)),C});m===Vee?h.push(...w):h=w}for(let m of h)m.V=d}}function TM(t){return(zee(t)?"":`${NM($x([t]))} `)+Pee(t)}function NM(t){return`"${t}"\u200E`}function fke(t){if(t.length>=4&&t[2]==Dee&&t[3]==Dee)throw new Error(`invalid label extension: "${D0(t.slice(0,4))}"`)}function dke(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function hke(t){let e=t[0],r=Iee.get(e);if(r)throw e2(`leading ${r}`);let n=t.length,i=-1;for(let s=1;s<n;s++){e=t[s];let o=Iee.get(e);if(o){if(i==s)throw e2(`${r} + ${o}`);i=s+1,r=o}}if(i==n)throw e2(`trailing ${r}`)}function $x(t,e=1/0,r=Pee){let n=[];pke(t[0])&&n.push("\u25CC"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,s=t.length;for(let o=0;o<s;o++){let a=t[o];zee(a)&&(n.push(D0(t.slice(i,o))),n.push(r(a)),i=o+1)}return n.push(D0(t.slice(i,s))),n.join("")}function pke(t){return RM(),gp.has(t)}function zee(t){return RM(),Wee.has(t)}function Gee(t){return wke(mke(t,lke,Eke))}function mke(t,e,r){if(!t)return[];RM();let n=0;return t.split(Hee).map(i=>{let s=Q7e(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=bke(s,e,r),c=a.length,u;if(!c)throw new Error("empty label");let d=o.output=a.flat();if(dke(d),!(o.emoji=c>1||a[0].is_emoji)&&d.every(m=>m<128))fke(d),u="ASCII";else{let m=a.flatMap(w=>w.is_emoji?[]:w);if(!m.length)u="Emoji";else{if(gp.has(d[0]))throw e2("leading combining mark");for(let C=1;C<c;C++){let A=a[C];if(!A.is_emoji&&gp.has(A[0]))throw e2(`emoji + combining mark: "${D0(a[C-1])} + ${$x([A[0]])}"`)}hke(d);let w=Vx(new Set(m)),[_]=yke(w);vke(_,m),gke(_,w),u=_.N}}o.type=u}catch(a){o.error=a}return o})}function gke(t,e){let r,n=[];for(let i of e){let s=A0.get(i);if(s===$ee)return;if(s){let o=s.M.get(i);if(r=r?r.filter(a=>o.has(a)):Vx(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(s=>i2(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function yke(t){let e=S0;for(let r of t){let n=e.filter(i=>i2(i,r));if(!n.length)throw S0.some(i=>i2(i,r))?Kee(e[0],r):Zee(r);if(e=n,n.length==1)break}return e}function wke(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${NM($x(e,63))}: ${i}`)}return D0(n)}).join(Hee)}function Zee(t){return new Error(`disallowed character: ${TM(t)}`)}function Kee(t,e){let r=TM(e),n=S0.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function e2(t){return new Error(`illegal placement: ${t}`)}function vke(t,e){for(let r of e)if(!i2(t,r))throw Kee(t,r);if(t.M){let r=jee(e);for(let n=1,i=r.length;n<i;n++)if(SM.has(r[n])){let s=n+1;for(let o;s<i&&SM.has(o=r[s]);s++)for(let a=n;a<s;a++)if(r[a]==o)throw new Error(`duplicate non-spacing marks: ${TM(o)}`);if(s-n>Aee)throw new Error(`excessive non-spacing marks: ${NM($x(r.slice(n-1,s)))} (${s-n}/${Aee})`);n=s}}}function bke(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let s=_ke(t);if(s)i.length&&(n.push(e(i)),i=[]),n.push(r(s));else{let o=t.pop();if(mp.has(o))i.push(o);else{let a=AM.get(o);if(a)i.push(...a);else if(!qee.has(o))throw Zee(o)}}}return i.length&&n.push(e(i)),n}function Eke(t){return t.filter(e=>e!=Vee)}function _ke(t,e){let r=DM,n,i=t.length;for(;i&&(r=r.get(t[--i]),!!r);){let{V:s}=r;s&&(n=s,e&&e.push(...t.slice(i).reverse()),t.length=i)}return n}var Yee=new Uint8Array(32);Yee.fill(0);function Jee(t){return K(t.length!==0,"invalid ENS name; empty component","comp",t),t}function Qee(t){let e=Ds(Xee(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(Jee(e.slice(n,i))),n=i+1);return K(n<e.length,"invalid ENS name; empty component","name",t),r.push(Jee(e.slice(n))),r}function Xee(t){try{if(t.length===0)throw new Error("empty label");return Gee(t)}catch(e){K(!1,`invalid ENS name (${e.message})`,"name",t)}}function T0(t){K(typeof t=="string","invalid ENS name; not a string","name",t),K(t.length,"invalid ENS name (empty label)","name",t);let e=Yee,r=Qee(t);for(;r.length;)e=Er(Nr([e,Er(r.pop())]));return Pe(e)}function OM(t,e){let r=e??63;return K(r<=255,"DNS encoded label cannot exceed 255","length",r),Pe(Nr(Qee(t).map(n=>{K(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);let i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function MM(t,e){return{address:It(t),storageKeys:e.map((r,n)=>(K(nr(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Yo(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(K(r.length===2,"invalid slot set",`value[${n}]`,r),MM(r[0],r[1])):(K(r!=null&&typeof r=="object","invalid address-slot set","value",t),MM(r.address,r.storageKeys)));K(t!=null&&typeof t=="object","invalid access list","value",t);let e=Object.keys(t).map(r=>{let n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return MM(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function Cke(t){let e;return typeof t=="string"?e=wd.computePublicKey(t,!1):e=t.publicKey,It(Er("0x"+e.substring(4)).substring(26))}function ete(t,e){return Cke(wd.recoverPublicKey(t,e))}var zi=BigInt(0),xke=BigInt(2),Ike=BigInt(27),Ake=BigInt(28),Ske=BigInt(35),Dke=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function qx(t){return t==="0x"?null:It(t)}function PM(t,e){try{return Yo(t)}catch(r){K(!1,r.message,e,t)}}function s2(t,e){return t==="0x"?0:wt(t,e)}function vi(t,e){if(t==="0x")return zi;let r=Me(t,e);return K(r<=Dke,"value exceeds uint size",e,r),r}function Fn(t,e){let r=Me(t,"value"),n=yi(r);return K(n.length<=32,"value too large",`tx.${e}`,r),n}function kM(t){return Yo(t).map(e=>[e.address,e.storageKeys])}function Rke(t,e){K(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;r<t.length;r++)K(nr(t[r],32),"invalid ${ param } hash",`value[${r}]`,t[r]);return t}function Tke(t){let e=ap(t);K(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);let r={type:0,nonce:s2(e[0],"nonce"),gasPrice:vi(e[1],"gasPrice"),gasLimit:vi(e[2],"gasLimit"),to:qx(e[3]),value:vi(e[4],"value"),data:Pe(e[5]),chainId:zi};if(e.length===6)return r;let n=vi(e[6],"v"),i=vi(e[7],"r"),s=vi(e[8],"s");if(i===zi&&s===zi)r.chainId=n;else{let o=(n-Ske)/xke;o<zi&&(o=zi),r.chainId=o,K(o!==zi||n===Ike||n===Ake,"non-canonical legacy v","v",e[6]),r.signature=eo.from({r:bo(e[7],32),s:bo(e[8],32),v:n}),r.hash=Er(t)}return r}function tte(t,e){let r=[Fn(t.nonce,"nonce"),Fn(t.gasPrice||0,"gasPrice"),Fn(t.gasLimit,"gasLimit"),t.to||"0x",Fn(t.value,"value"),t.data],n=zi;if(t.chainId!=zi)n=Me(t.chainId,"tx.chainId"),K(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){let s=t.signature.legacyChainId;s!=null&&(n=s)}if(!e)return n!==zi&&(r.push(yi(n)),r.push("0x"),r.push("0x")),fl(r);let i=BigInt(27+e.yParity);return n!==zi?i=eo.getChainIdV(n,e.v):BigInt(e.v)!==i&&K(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(yi(i)),r.push(yi(e.r)),r.push(yi(e.s)),fl(r)}function LM(t,e){let r;try{if(r=s2(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{K(!1,"invalid yParity","yParity",e[0])}let n=bo(e[1],32),i=bo(e[2],32),s=eo.from({r:n,s:i,yParity:r});t.signature=s}function Nke(t){let e=ap(Et(t).slice(1));K(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",Pe(t));let r={type:2,chainId:vi(e[0],"chainId"),nonce:s2(e[1],"nonce"),maxPriorityFeePerGas:vi(e[2],"maxPriorityFeePerGas"),maxFeePerGas:vi(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:vi(e[4],"gasLimit"),to:qx(e[5]),value:vi(e[6],"value"),data:Pe(e[7]),accessList:PM(e[8],"accessList")};return e.length===9||(r.hash=Er(t),LM(r,e.slice(9))),r}function rte(t,e){let r=[Fn(t.chainId,"chainId"),Fn(t.nonce,"nonce"),Fn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Fn(t.maxFeePerGas||0,"maxFeePerGas"),Fn(t.gasLimit,"gasLimit"),t.to||"0x",Fn(t.value,"value"),t.data,kM(t.accessList||[])];return e&&(r.push(Fn(e.yParity,"yParity")),r.push(yi(e.r)),r.push(yi(e.s))),Nr(["0x02",fl(r)])}function Oke(t){let e=ap(Et(t).slice(1));K(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",Pe(t));let r={type:1,chainId:vi(e[0],"chainId"),nonce:s2(e[1],"nonce"),gasPrice:vi(e[2],"gasPrice"),gasLimit:vi(e[3],"gasLimit"),to:qx(e[4]),value:vi(e[5],"value"),data:Pe(e[6]),accessList:PM(e[7],"accessList")};return e.length===8||(r.hash=Er(t),LM(r,e.slice(8))),r}function nte(t,e){let r=[Fn(t.chainId,"chainId"),Fn(t.nonce,"nonce"),Fn(t.gasPrice||0,"gasPrice"),Fn(t.gasLimit,"gasLimit"),t.to||"0x",Fn(t.value,"value"),t.data,kM(t.accessList||[])];return e&&(r.push(Fn(e.yParity,"recoveryParam")),r.push(yi(e.r)),r.push(yi(e.s))),Nr(["0x01",fl(r)])}function Mke(t){let e=ap(Et(t).slice(1));K(Array.isArray(e)&&(e.length===11||e.length===14),"invalid field count for transaction type: 3","data",Pe(t));let r={type:3,chainId:vi(e[0],"chainId"),nonce:s2(e[1],"nonce"),maxPriorityFeePerGas:vi(e[2],"maxPriorityFeePerGas"),maxFeePerGas:vi(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:vi(e[4],"gasLimit"),to:qx(e[5]),value:vi(e[6],"value"),data:Pe(e[7]),accessList:PM(e[8],"accessList"),maxFeePerBlobGas:vi(e[9],"maxFeePerBlobGas"),blobVersionedHashes:e[10]};K(r.to!=null,"invalid address for transaction type: 3","data",t),K(Array.isArray(r.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",t);for(let n=0;n<r.blobVersionedHashes.length;n++)K(nr(r.blobVersionedHashes[n],32),`invalid blobVersionedHash at index ${n}: must be length 32`,"data",t);return e.length===11||(r.hash=Er(t),LM(r,e.slice(11))),r}function ite(t,e){let r=[Fn(t.chainId,"chainId"),Fn(t.nonce,"nonce"),Fn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Fn(t.maxFeePerGas||0,"maxFeePerGas"),Fn(t.gasLimit,"gasLimit"),t.to||Pu,Fn(t.value,"value"),t.data,kM(t.accessList||[]),Fn(t.maxFeePerBlobGas||0,"maxFeePerBlobGas"),Rke(t.blobVersionedHashes||[],"blobVersionedHashes")];return e&&(r.push(Fn(e.yParity,"yParity")),r.push(yi(e.r)),r.push(yi(e.s))),Nr(["0x03",fl(r)])}var yp=class t{#e;#t;#r;#n;#i;#o;#s;#a;#u;#l;#d;#h;#c;#f;get type(){return this.#e}set type(e){switch(e){case null:this.#e=null;break;case 0:case"legacy":this.#e=0;break;case 1:case"berlin":case"eip-2930":this.#e=1;break;case 2:case"london":case"eip-1559":this.#e=2;break;case 3:case"cancun":case"eip-4844":this.#e=3;break;default:K(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){let e=this.#t;return e==null&&this.type===3?Pu:e}set to(e){this.#t=e==null?null:It(e)}get nonce(){return this.#n}set nonce(e){this.#n=wt(e,"value")}get gasLimit(){return this.#i}set gasLimit(e){this.#i=Me(e)}get gasPrice(){let e=this.#o;return e==null&&(this.type===0||this.type===1)?zi:e}set gasPrice(e){this.#o=e==null?null:Me(e,"gasPrice")}get maxPriorityFeePerGas(){let e=this.#s;return e??(this.type===2||this.type===3?zi:null)}set maxPriorityFeePerGas(e){this.#s=e==null?null:Me(e,"maxPriorityFeePerGas")}get maxFeePerGas(){let e=this.#a;return e??(this.type===2||this.type===3?zi:null)}set maxFeePerGas(e){this.#a=e==null?null:Me(e,"maxFeePerGas")}get data(){return this.#r}set data(e){this.#r=Pe(e)}get value(){return this.#u}set value(e){this.#u=Me(e,"value")}get chainId(){return this.#l}set chainId(e){this.#l=Me(e)}get signature(){return this.#d||null}set signature(e){this.#d=e==null?null:eo.from(e)}get accessList(){let e=this.#h||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){this.#h=e==null?null:Yo(e)}get maxFeePerBlobGas(){let e=this.#c;return e==null&&this.type===3?zi:e}set maxFeePerBlobGas(e){this.#c=e==null?null:Me(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#f;return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){K(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;r<e.length;r++)K(nr(e[r],32),"invalid blobVersionedHash",`value[${r}]`,e[r])}this.#f=e}constructor(){this.#e=null,this.#t=null,this.#n=0,this.#i=zi,this.#o=null,this.#s=null,this.#a=null,this.#r="0x",this.#u=zi,this.#l=zi,this.#d=null,this.#h=null,this.#c=null,this.#f=null}get hash(){return this.signature==null?null:Er(this.serialized)}get unsignedHash(){return Er(this.unsignedSerialized)}get from(){return this.signature==null?null:ete(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:wd.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){switch(oe(this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"}),this.inferType()){case 0:return tte(this,this.signature);case 1:return nte(this,this.signature);case 2:return rte(this,this.signature);case 3:return ite(this,this.signature)}oe(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get unsignedSerialized(){switch(this.inferType()){case 0:return tte(this);case 1:return nte(this);case 2:return rte(this);case 3:return ite(this)}oe(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".unsignedSerialized"})}inferType(){let e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){let e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=this.#c!=null||this.#f;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&oe(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),oe(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),oe(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});let s=[];return this.type!=null?s.push(this.type):r?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return t.from(this)}toJSON(){let e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new t;if(typeof e=="string"){let n=Et(e);if(n[0]>=127)return t.from(Tke(n));switch(n[0]){case 1:return t.from(Oke(n));case 2:return t.from(Nke(n));case 3:return t.from(Mke(n))}oe(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}let r=new t;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=eo.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.hash!=null&&(K(r.isSigned(),"unsigned transaction cannot define hash","tx",e),K(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(K(r.isSigned(),"unsigned transaction cannot define from","tx",e),K(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};var cte=new Uint8Array(32);cte.fill(0);var Pke=BigInt(-1),lte=BigInt(0),ute=BigInt(1),kke=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Lke(t){let e=Et(t),r=e.length%32;return r?Nr([e,cte.slice(r)]):Pe(e)}var Fke=Xs(ute,32),Bke=Xs(lte,32),ste={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},FM=["name","version","chainId","verifyingContract","salt"];function ote(t){return function(e){return K(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}var Uke={name:ote("name"),version:ote("version"),chainId:function(t){let e=Me(t,"domain.chainId");return K(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):mc(e)},verifyingContract:function(t){try{return It(t).toLowerCase()}catch{}K(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){let e=Et(t,"domain.salt");return K(e.length===32,'invalid domain value "salt"',"domain.salt",t),Pe(e)}};function BM(t){{let e=t.match(/^(u?)int(\d+)$/);if(e){let r=e[1]==="",n=parseInt(e[2]);K(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);let i=Ra(kke,r?n-1:n),s=r?(i+ute)*Pke:lte;return function(o){let a=Me(o,"value");return K(a>=s&&a<=i,`value out-of-bounds for ${t}`,"value",a),Xs(r?v0(a,256):a,32)}}}{let e=t.match(/^bytes(\d+)$/);if(e){let r=parseInt(e[1]);return K(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){let i=Et(n);return K(i.length===r,`invalid length for ${t}`,"value",n),Lke(n)}}}switch(t){case"address":return function(e){return bo(It(e),32)};case"bool":return function(e){return e?Fke:Bke};case"bytes":return function(e){return Er(e)};case"string":return function(e){return vc(e)}}return null}function ate(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function Wx(t){let e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var N0=class t{primaryType;#e;get types(){return JSON.parse(this.#e)}#t;#r;constructor(e){this.#t=new Map,this.#r=new Map;let r=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(c=>{s[c]=e[c].map(({name:u,type:d})=>{let{base:h,index:m}=Wx(d);return h==="int"&&!e.int&&(h="int256"),h==="uint"&&!e.uint&&(h="uint256"),{name:u,type:h+(m||"")}}),r.set(c,new Set),n.set(c,[]),i.set(c,new Set)}),this.#e=JSON.stringify(s);for(let c in s){let u=new Set;for(let d of s[c]){K(!u.has(d.name),`duplicate variable name ${JSON.stringify(d.name)} in ${JSON.stringify(c)}`,"types",e),u.add(d.name);let h=Wx(d.type).base;K(h!==c,`circular type reference to ${JSON.stringify(h)}`,"types",e),!BM(h)&&(K(n.has(h),`unknown type ${JSON.stringify(h)}`,"types",e),n.get(h).push(c),r.get(c).add(h))}}let o=Array.from(n.keys()).filter(c=>n.get(c).length===0);K(o.length!==0,"missing primary type","types",e),K(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),ke(this,{primaryType:o[0]});function a(c,u){K(!u.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),u.add(c);for(let d of r.get(c))if(n.has(d)){a(d,u);for(let h of u)i.get(h).add(d)}u.delete(c)}a(this.primaryType,new Set);for(let[c,u]of i){let d=Array.from(u);d.sort(),this.#t.set(c,ate(c,s[c])+d.map(h=>ate(h,s[h])).join(""))}}getEncoder(e){let r=this.#r.get(e);return r||(r=this.#n(e),this.#r.set(e,r)),r}#n(e){{let i=BM(e);if(i)return i}let r=Wx(e).array;if(r){let i=r.prefix,s=this.getEncoder(i);return o=>{K(r.count===-1||r.count===o.length,`array length mismatch; expected length ${r.count}`,"value",o);let a=o.map(s);return this.#t.has(i)&&(a=a.map(Er)),Er(Nr(a))}}let n=this.types[e];if(n){let i=vc(this.#t.get(e));return s=>{let o=n.map(({name:a,type:c})=>{let u=this.getEncoder(c)(s[a]);return this.#t.has(c)?Er(u):u});return o.unshift(i),Nr(o)}}K(!1,`unknown type: ${e}`,"type",e)}encodeType(e){let r=this.#t.get(e);return K(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Er(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(BM(e))return n(e,r);let i=Wx(e).array;if(i)return K(i.count===-1||i.count===r.length,`array length mismatch; expected length ${i.count}`,"value",r),r.map(o=>this._visit(i.prefix,o,n));let s=this.types[e];if(s)return s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});K(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new t(e)}static getPrimaryType(e){return t.from(e).primaryType}static hashStruct(e,r,n){return t.from(r).hashStruct(e,n)}static hashDomain(e){let r=[];for(let n in e){if(e[n]==null)continue;let i=ste[n];K(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>FM.indexOf(n.name)-FM.indexOf(i.name)),t.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Nr(["0x1901",t.hashDomain(e),t.from(r).hash(n)])}static hash(e,r,n){return Er(t.encode(e,r,n))}static resolveNames(e,r,n,i){return y(this,null,function*(){e=Object.assign({},e);for(let a in e)e[a]==null&&delete e[a];let s={};e.verifyingContract&&!nr(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");let o=t.from(r);o.visit(n,(a,c)=>(a==="address"&&!nr(c,20)&&(s[c]="0x"),c));for(let a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}})}static getPayload(e,r,n){t.hashDomain(e);let i={},s=[];FM.forEach(c=>{let u=e[c];u!=null&&(i[c]=Uke[c](u),s.push({name:c,type:ste[c]}))});let o=t.from(r);r=o.types;let a=Object.assign({},r);return K(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,u)=>{if(c.match(/^bytes(\d*)/))return Pe(Et(u));if(c.match(/^u?int/))return Me(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return K(typeof u=="string","invalid string","value",u),u}K(!1,"unsupported type","type",c)})}}};function to(t){let e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}var jke="external public payable override",Hke=to(jke.split(" ")),bte="constant external internal payable private public pure view override",Vke=to(bte.split(" ")),Ete="constructor error event fallback function receive struct",_te=to(Ete.split(" ")),Cte="calldata memory storage payable indexed",$ke=to(Cte.split(" ")),qke="tuple returns",Wke=[Ete,Cte,qke,bte].join(" "),zke=to(Wke.split(" ")),Gke={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Zke=new RegExp("^(\\s*)"),Kke=new RegExp("^([0-9]+)"),Jke=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),xte=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Ite=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),bc=class t{#e;#t;get offset(){return this.#e}get length(){return this.#t.length-this.#e}constructor(e){this.#e=0,this.#t=e.slice()}clone(){return new t(this.#t)}reset(){this.#e=0}#r(e=0,r=0){return new t(this.#t.slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))}popKeyword(e){let r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){let r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){let e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");let r=this.#r(this.#e+1,e.match+1);return this.#e=e.match+1,r}popParams(){let e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");let r=[];for(;this.#e<e.match-1;){let n=this.peek().linkNext;r.push(this.#r(this.#e+1,n)),this.#e=n}return this.#e=e.match+1,r}peek(){if(this.#e>=this.#t.length)throw new Error("out-of-bounds");return this.#t[this.#e]}peekKeyword(e){let r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;let r=this.peek();return r.type===e?r.text:null}pop(){let e=this.peek();return this.#e++,e}toString(){let e=[];for(let r=this.#e;r<this.#t.length;r++){let n=this.#t[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};function vd(t){let e=[],r=o=>{let a=s<t.length?JSON.stringify(t[s]):"$EOI";throw new Error(`invalid token ${a} at ${s}: ${o}`)},n=[],i=[],s=0;for(;s<t.length;){let o=t.substring(s),a=o.match(Zke);a&&(s+=a[1].length,o=t.substring(s));let c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};e.push(c);let u=Gke[o[0]]||"";if(u){if(c.type=u,c.text=o[0],s++,u==="OPEN_PAREN")n.push(e.length-1),i.push(e.length-1);else if(u=="CLOSE_PAREN")n.length===0&&r("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1;else if(u==="COMMA")c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(u==="OPEN_BRACKET")c.type="BRACKET";else if(u==="CLOSE_BRACKET"){let d=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){let h=e.pop().text;d=h+d,e[e.length-1].value=wt(h)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=d}continue}if(a=o.match(Jke),a){if(c.text=a[1],s+=c.text.length,zke.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(Ite)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(Kke),a){c.text=a[1],c.type="NUMBER",s+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new bc(e.map(o=>Object.freeze(o)))}function fte(t,e){let r=[];for(let n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Gx(t,e){if(e.peekKeyword(_te)){let r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function Lu(t,e){let r=new Set;for(;;){let n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function Ate(t){let e=Lu(t,Vke);return fte(e,to("constant payable nonpayable".split(" "))),fte(e,to("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function ku(t,e){return t.popParams().map(r=>Li.from(r,e))}function Ste(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return Me(t.pop().text);throw new Error("invalid gas")}return null}function Ep(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}var Yke=new RegExp(/^(.*)\[([0-9]*)\]$/);function dte(t){let e=t.match(Ite);if(K(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){let r=parseInt(e[2]);K(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){let r=parseInt(e[3]);K(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}var Kn={},Eo=Symbol.for("_ethers_internal"),hte="_ParamTypeInternal",pte="_ErrorInternal",mte="_EventInternal",gte="_ConstructorInternal",yte="_FallbackInternal",wte="_FunctionInternal",vte="_StructInternal",Li=class t{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,r,n,i,s,o,a,c){if(dc(e,Kn,"ParamType"),Object.defineProperty(this,Eo,{value:hte}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");ke(this,{name:r,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){let n=this.name||"";if(this.isArray()){let s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}let i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");let n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");let n=this;return e.map((i,s)=>n.components[s].walk(i,r))}return r(this.type,e)}#e(e,r,n,i){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");let o=this.arrayChildren,a=r.slice();a.forEach((c,u)=>{o.#e(e,c,n,d=>{a[u]=d})}),i(a);return}if(this.isTuple()){let o=this.components,a;if(Array.isArray(r))a=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,u)=>{o[u].#e(e,c,n,d=>{a[u]=d})}),i(a);return}let s=n(this.type,r);s.then?e.push(function(){return y(this,null,function*(){i(yield s)})}()):i(s)}walkAsync(e,r){return y(this,null,function*(){let n=[],i=[e];return this.#e(n,e,r,s=>{i[0]=s}),n.length&&(yield Promise.all(n)),i[0]})}static from(e,r){if(t.isParamType(e))return e;if(typeof e=="string")try{return t.from(vd(e),r)}catch{K(!1,"invalid param type","obj",e)}else if(e instanceof bc){let a="",c="",u=null;Lu(e,to(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",u=e.popParams().map(C=>t.from(C)),a=`tuple(${u.map(C=>C.format()).join(",")})`):(a=dte(e.popType("TYPE")),c=a);let d=null,h=null;for(;e.length&&e.peekType("BRACKET");){let C=e.pop();d=new t(Kn,"",a,c,null,u,h,d),h=C.value,a+=C.text,c="array",u=null}let m=null;if(Lu(e,$ke).has("indexed")){if(!r)throw new Error("");m=!0}let _=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new t(Kn,_,a,c,m,u,h,d)}let n=e.name;K(!n||typeof n=="string"&&n.match(xte),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(K(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(Yke);if(o){let a=parseInt(o[2]||"-1"),c=t.from({type:o[1],components:e.components});return new t(Kn,n||"",s,"array",i,null,a,c)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){let a=e.components!=null?e.components.map(u=>t.from(u)):null;return new t(Kn,n||"",s,"tuple",i,a,null,null)}return s=dte(e.type),new t(Kn,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[Eo]===hte}},_p=class t{type;inputs;constructor(e,r,n){dc(e,Kn,"Fragment"),n=Object.freeze(n.slice()),ke(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{t.from(JSON.parse(e))}catch{}return t.from(vd(e))}if(e instanceof bc)switch(e.peekKeyword(_te)){case"constructor":return vp.from(e);case"error":return Na.from(e);case"event":return wp.from(e);case"fallback":case"receive":return zx.from(e);case"function":return bp.from(e);case"struct":return o2.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return vp.from(e);case"error":return Na.from(e);case"event":return wp.from(e);case"fallback":case"receive":return zx.from(e);case"function":return bp.from(e);case"struct":return o2.from(e)}oe(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}K(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return vp.isFragment(e)}static isError(e){return Na.isFragment(e)}static isEvent(e){return wp.isFragment(e)}static isFunction(e){return bp.isFragment(e)}static isStruct(e){return o2.isFragment(e)}},O0=class extends _p{name;constructor(e,r,n,i){super(e,r,i),K(typeof n=="string"&&n.match(xte),"invalid identifier","name",n),i=Object.freeze(i.slice()),ke(this,{name:n})}};function a2(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}var Na=class t extends O0{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Eo,{value:pte})}get selector(){return vc(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+a2(e,this.inputs)),r.join(" ")}static from(e){if(t.isFragment(e))return e;if(typeof e=="string")return t.from(vd(e));if(e instanceof bc){let r=Gx("error",e),n=ku(e);return Ep(e),new t(Kn,r,n)}return new t(Kn,e.name,e.inputs?e.inputs.map(Li.from):[])}static isFragment(e){return e&&e[Eo]===pte}},wp=class t extends O0{anonymous;constructor(e,r,n,i){super(e,"event",r,n),Object.defineProperty(this,Eo,{value:mte}),ke(this,{anonymous:i})}get topicHash(){return vc(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r=[];return e!=="sighash"&&r.push("event"),r.push(this.name+a2(e,this.inputs)),e!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(e,r){return r=(r||[]).map(i=>Li.from(i)),new t(Kn,e,r,!1).topicHash}static from(e){if(t.isFragment(e))return e;if(typeof e=="string")try{return t.from(vd(e))}catch{K(!1,"invalid event fragment","obj",e)}else if(e instanceof bc){let r=Gx("event",e),n=ku(e,!0),i=!!Lu(e,to(["anonymous"])).has("anonymous");return Ep(e),new t(Kn,r,n,i)}return new t(Kn,e.name,e.inputs?e.inputs.map(r=>Li.from(r,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[Eo]===mte}},vp=class t extends _p{payable;gas;constructor(e,r,n,i,s){super(e,r,n),Object.defineProperty(this,Eo,{value:gte}),ke(this,{payable:i,gas:s})}format(e){if(oe(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r=[`constructor${a2(e,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(e){if(t.isFragment(e))return e;if(typeof e=="string")try{return t.from(vd(e))}catch{K(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof bc){Lu(e,to(["constructor"]));let r=ku(e),n=!!Lu(e,Hke).has("payable"),i=Ste(e);return Ep(e),new t(Kn,"constructor",r,n,i)}return new t(Kn,"constructor",e.inputs?e.inputs.map(Li.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[Eo]===gte}},zx=class t extends _p{payable;constructor(e,r,n){super(e,"fallback",r),Object.defineProperty(this,Eo,{value:yte}),ke(this,{payable:n})}format(e){let r=this.inputs.length===0?"receive":"fallback";if(e==="json"){let n=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:n})}return`${r}()${this.payable?" payable":""}`}static from(e){if(t.isFragment(e))return e;if(typeof e=="string")try{return t.from(vd(e))}catch{K(!1,"invalid fallback fragment","obj",e)}else if(e instanceof bc){let r=e.toString(),n=e.peekKeyword(to(["fallback","receive"]));if(K(n,"type must be fallback or receive","obj",r),e.popKeyword(to(["fallback","receive"]))==="receive"){let a=ku(e);return K(a.length===0,"receive cannot have arguments","obj.inputs",a),Lu(e,to(["payable"])),Ep(e),new t(Kn,[],!0)}let s=ku(e);s.length?K(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(a=>a.format("minimal")).join(", ")):s=[Li.from("bytes")];let o=Ate(e);if(K(o==="nonpayable"||o==="payable","fallback cannot be constants","obj.stateMutability",o),Lu(e,to(["returns"])).has("returns")){let a=ku(e);K(a.length===1&&a[0].type==="bytes","invalid fallback outputs","obj.outputs",a.map(c=>c.format("minimal")).join(", "))}return Ep(e),new t(Kn,s,o==="payable")}if(e.type==="receive")return new t(Kn,[],!0);if(e.type==="fallback"){let r=[Li.from("bytes")],n=e.stateMutability==="payable";return new t(Kn,r,n)}K(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Eo]===yte}},bp=class t extends O0{constant;outputs;stateMutability;payable;gas;constructor(e,r,n,i,s,o){super(e,"function",r,i),Object.defineProperty(this,Eo,{value:wte}),s=Object.freeze(s.slice()),ke(this,{constant:n==="view"||n==="pure",gas:o,outputs:s,payable:n==="payable",stateMutability:n})}get selector(){return vc(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r=[];return e!=="sighash"&&r.push("function"),r.push(this.name+a2(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(a2(e,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(e,r){return r=(r||[]).map(i=>Li.from(i)),new t(Kn,e,"view",r,[],null).selector}static from(e){if(t.isFragment(e))return e;if(typeof e=="string")try{return t.from(vd(e))}catch{K(!1,"invalid function fragment","obj",e)}else if(e instanceof bc){let n=Gx("function",e),i=ku(e),s=Ate(e),o=[];Lu(e,to(["returns"])).has("returns")&&(o=ku(e));let a=Ste(e);return Ep(e),new t(Kn,n,s,i,o,a)}let r=e.stateMutability;return r==null&&(r="payable",typeof e.constant=="boolean"?(r="view",e.constant||(r="payable",typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable")),new t(Kn,e.name,r,e.inputs?e.inputs.map(Li.from):[],e.outputs?e.outputs.map(Li.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[Eo]===wte}},o2=class t extends O0{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Eo,{value:vte})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return t.from(vd(e))}catch{K(!1,"invalid struct fragment","obj",e)}else if(e instanceof bc){let r=Gx("struct",e),n=ku(e);return Ep(e),new t(Kn,r,n)}return new t(Kn,e.name,e.inputs?e.inputs.map(Li.from):[])}static isFragment(e){return e&&e[Eo]===vte}};var Ec=new Map;Ec.set(0,"GENERIC_PANIC");Ec.set(1,"ASSERT_FALSE");Ec.set(17,"OVERFLOW");Ec.set(18,"DIVIDE_BY_ZERO");Ec.set(33,"ENUM_RANGE_ERROR");Ec.set(34,"BAD_STORAGE_DATA");Ec.set(49,"STACK_UNDERFLOW");Ec.set(50,"ARRAY_RANGE_ERROR");Ec.set(65,"OUT_OF_MEMORY");Ec.set(81,"UNINITIALIZED_FUNCTION_CALL");var Qke=new RegExp(/^bytes([0-9]*)$/),Xke=new RegExp(/^(u?int)([0-9]*)$/),UM=null,Dte=1024;function eLe(t,e,r,n){let i="missing revert data",s=null,o=null,a=null;if(r){i="execution reverted";let u=Et(r);if(r=Pe(r),u.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(u.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Pe(u.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],u.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Pe(u.slice(0,4))==="0x4e487b71")try{let d=Number(n.decode(["uint256"],u.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[d]},s=`Panic due to ${Ec.get(d)||"UNKNOWN"}(${d})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}let c={to:e.to?It(e.to):null,data:e.data||"0x"};return e.from&&(c.from=It(e.from)),Fr(i,"CALL_EXCEPTION",{action:t,data:r,reason:s,transaction:c,invocation:o,revert:a})}var bd=class t{#e(e){if(e.isArray())return new Tx(this.#e(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new pp(e.components.map(n=>this.#e(n)),e.name);switch(e.baseType){case"address":return new Dx(e.name);case"bool":return new Nx(e.name);case"string":return new Lx(e.name);case"bytes":return new Ox(e.name);case"":return new Px(e.name)}let r=e.type.match(Xke);if(r){let n=parseInt(r[2]||"256");return K(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new kx(n/8,r[1]==="int",e.name)}if(r=e.type.match(Qke),r){let n=parseInt(r[1]);return K(n!==0&&n<=32,"invalid bytes length","param",e),new Mx(n,e.name)}K(!1,"invalid type","type",e.type)}getDefaultValue(e){let r=e.map(i=>this.#e(Li.from(i)));return new pp(r,"_").defaultValue()}encode(e,r){y0(r.length,e.length,"types/values length mismatch");let n=e.map(o=>this.#e(Li.from(o))),i=new pp(n,"_"),s=new lp;return i.encode(s,r),s.data}decode(e,r,n){let i=e.map(o=>this.#e(Li.from(o)));return new pp(i,"_").decode(new fx(r,n,Dte))}static _setDefaultMaxInflation(e){K(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Dte=e}static defaultAbiCoder(){return UM==null&&(UM=new t),UM}static getBuiltinCallException(e,r,n){return eLe(e,r,n,t.defaultAbiCoder())}};var Zx=class{fragment;name;signature;topic;args;constructor(e,r,n){let i=e.name,s=e.format();ke(this,{fragment:e,name:i,signature:s,topic:r,args:n})}},Kx=class{fragment;name;args;signature;selector;value;constructor(e,r,n,i){let s=e.name,o=e.format();ke(this,{fragment:e,name:s,args:n,signature:o,selector:r,value:i})}},Jx=class{fragment;name;args;signature;selector;constructor(e,r,n){let i=e.name,s=e.format();ke(this,{fragment:e,name:i,args:n,signature:s,selector:r})}},c2=class{hash;_isIndexed;static isIndexed(e){return!!(e&&e._isIndexed)}constructor(e){ke(this,{hash:e,_isIndexed:!0})}},Rte={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Tte={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&Rte[t.toString()]&&(e=Rte[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}},l2=class t{fragments;deploy;fallback;receive;#e;#t;#r;#n;constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,this.#r=new Map,this.#e=new Map,this.#t=new Map;let n=[];for(let o of r)try{n.push(_p.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}ke(this,{fragments:Object.freeze(n)});let i=null,s=!1;this.#n=this.getAbiCoder(),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}ke(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(K(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":c=this.#r;break;case"event":c=this.#t;break;case"error":c=this.#e;break;default:return}let u=o.format();c.has(u)||c.set(u,o)}),this.deploy||ke(this,{deploy:vp.from("constructor()")}),ke(this,{fallback:i,receive:s})}format(e){let r=e?"minimal":"full";return this.fragments.map(i=>i.format(r))}formatJson(){let e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return bd.defaultAbiCoder()}#i(e,r,n){if(nr(e)){let s=e.toLowerCase();for(let o of this.#r.values())if(s===o.selector)return o;return null}if(e.indexOf("(")===-1){let s=[];for(let[o,a]of this.#r)o.split("(")[0]===e&&s.push(a);if(r){let o=r.length>0?r[r.length-1]:null,a=r.length,c=!0;Tn.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let u=s.length-1;u>=0;u--){let d=s[u].inputs.length;d!==a&&(!c||d!==a-1)&&s.splice(u,1)}for(let u=s.length-1;u>=0;u--){let d=s[u].inputs;for(let h=0;h<r.length;h++)if(Tn.isTyped(r[h])){if(h>=d.length){if(r[h].type==="overrides")continue;s.splice(u,1);break}if(r[h].type!==d[h].baseType){s.splice(u,1);break}}}}if(s.length===1&&r&&r.length!==s[0].inputs.length){let o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&n){let o=s.map(a=>JSON.stringify(a.format())).join(", ");K(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return s[0]}let i=this.#r.get(bp.from(e).format());return i||null}getFunctionName(e){let r=this.#i(e,null,!1);return K(r,"no matching function","key",e),r.name}hasFunction(e){return!!this.#i(e,null,!1)}getFunction(e,r){return this.#i(e,r||null,!0)}forEachFunction(e){let r=Array.from(this.#r.keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){let i=r[n];e(this.#r.get(i),n)}}#o(e,r,n){if(nr(e)){let s=e.toLowerCase();for(let o of this.#t.values())if(s===o.topicHash)return o;return null}if(e.indexOf("(")===-1){let s=[];for(let[o,a]of this.#t)o.split("(")[0]===e&&s.push(a);if(r){for(let o=s.length-1;o>=0;o--)s[o].inputs.length<r.length&&s.splice(o,1);for(let o=s.length-1;o>=0;o--){let a=s[o].inputs;for(let c=0;c<r.length;c++)if(Tn.isTyped(r[c])&&r[c].type!==a[c].baseType){s.splice(o,1);break}}}if(s.length===0)return null;if(s.length>1&&n){let o=s.map(a=>JSON.stringify(a.format())).join(", ");K(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return s[0]}let i=this.#t.get(wp.from(e).format());return i||null}getEventName(e){let r=this.#o(e,null,!1);return K(r,"no matching event","key",e),r.name}hasEvent(e){return!!this.#o(e,null,!1)}getEvent(e,r){return this.#o(e,r||null,!0)}forEachEvent(e){let r=Array.from(this.#t.keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){let i=r[n];e(this.#t.get(i),n)}}getError(e,r){if(nr(e)){let i=e.toLowerCase();if(Tte[i])return Na.from(Tte[i].signature);for(let s of this.#e.values())if(i===s.selector)return s;return null}if(e.indexOf("(")===-1){let i=[];for(let[s,o]of this.#e)s.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?Na.from("error Error(string)"):e==="Panic"?Na.from("error Panic(uint256)"):null;if(i.length>1){let s=i.map(o=>JSON.stringify(o.format())).join(", ");K(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=Na.from(e).format(),e==="Error(string)")return Na.from("error Error(string)");if(e==="Panic(uint256)")return Na.from("error Panic(uint256)");let n=this.#e.get(e);return n||null}forEachError(e){let r=Array.from(this.#e.keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){let i=r[n];e(this.#e.get(i),n)}}_decodeParams(e,r){return this.#n.decode(e,r)}_encodeParams(e,r){return this.#n.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){let n=this.getError(e);K(n,"unknown error","fragment",e),e=n}return K(un(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,un(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){let n=this.getError(e);K(n,"unknown error","fragment",e),e=n}return Nr([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){let n=this.getFunction(e);K(n,"unknown function","fragment",e),e=n}return K(un(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,un(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){let n=this.getFunction(e);K(n,"unknown function","fragment",e),e=n}return Nr([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){let s=this.getFunction(e);K(s,"unknown function","fragment",e),e=s}let n="invalid length for result data",i=fi(r);if(i.length%32===0)try{return this.#n.decode(e.outputs,i)}catch{n="could not decode result data"}oe(!1,n,"BAD_DATA",{value:Pe(i),info:{method:e.name,signature:e.format()}})}makeError(e,r){let n=Et(e,"data"),i=bd.getBuiltinCallException("call",r,n);if(i.message.startsWith("execution reverted (unknown custom error)")){let a=Pe(n.slice(0,4)),c=this.getError(a);if(c)try{let u=this.#n.decode(c.inputs,n.slice(4));i.revert={name:c.name,signature:c.format(),args:u},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}let o=this.parseTransaction(r);return o&&(i.invocation={method:o.name,signature:o.signature,args:o.args}),i}encodeFunctionResult(e,r){if(typeof e=="string"){let n=this.getFunction(e);K(n,"unknown function","fragment",e),e=n}return Pe(this.#n.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){let s=this.getEvent(e);K(s,"unknown event","eventFragment",e),e=s}oe(r.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:r.length,expectedCount:e.inputs.length});let n=[];e.anonymous||n.push(e.topicHash);let i=(s,o)=>s.type==="string"?vc(o):s.type==="bytes"?Er(Pe(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=Xs(o):s.type.match(/^bytes/)?o=rx(o,32):s.type==="address"&&this.#n.encode(["address"],[o]),bo(Pe(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){K(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?K(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){let o=this.getEvent(e);K(o,"unknown event","eventFragment",e),e=o}let n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),K(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{let c=r[a];if(o.indexed)if(o.type==="string")n.push(vc(c));else if(o.type==="bytes")n.push(Er(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this.#n.encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:this.#n.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){let w=this.getEvent(e);K(w,"unknown event","eventFragment",e),e=w}if(n!=null&&!e.anonymous){let w=e.topicHash;K(nr(n[0],32)&&n[0].toLowerCase()===w,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((w,_)=>{w.indexed?w.type==="string"||w.type==="bytes"||w.baseType==="tuple"||w.baseType==="array"?(i.push(Li.from({type:"bytes32",name:w.name})),o.push(!0)):(i.push(w),o.push(!1)):(s.push(w),o.push(!1))});let a=n!=null?this.#n.decode(i,Nr(n)):null,c=this.#n.decode(s,r,!0),u=[],d=[],h=0,m=0;return e.inputs.forEach((w,_)=>{let C=null;if(w.indexed)if(a==null)C=new c2(null);else if(o[_])C=new c2(a[m++]);else try{C=a[m++]}catch(A){C=A}else try{C=c[h++]}catch(A){C=A}u.push(C),d.push(w.name||null)}),cp.fromItems(u,d)}parseTransaction(e){let r=Et(e.data,"tx.data"),n=Me(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Pe(r.slice(0,4)));if(!i)return null;let s=this.#n.decode(i.inputs,r.slice(4));return new Kx(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new Zx(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){let r=Pe(e),n=this.getError(un(r,0,4));if(!n)return null;let i=this.#n.decode(n.inputs,un(r,4));return new Jx(n,n.selector,i)}static from(e){return e instanceof t?e:typeof e=="string"?new t(JSON.parse(e)):typeof e.format=="function"?new t(e.format("json")):new t(e)}};var Nte=BigInt(0);function u2(t){return t??null}function bi(t){return t==null?null:t.toString()}var M0=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,r,n){ke(this,{gasPrice:u2(e),maxFeePerGas:u2(r),maxPriorityFeePerGas:u2(n)})}toJSON(){let{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:bi(e),maxFeePerGas:bi(r),maxPriorityFeePerGas:bi(n)}}};function _d(t){let e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=Pe(t.data));let r="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(let i of r)!(i in t)||t[i]==null||(e[i]=Me(t[i],`request.${i}`));let n="type,nonce".split(/,/);for(let i of n)!(i in t)||t[i]==null||(e[i]=wt(t[i],`request.${i}`));return t.accessList&&(e.accessList=Yo(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var f2=class{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;extraData;baseFeePerGas;#e;constructor(e,r){this.#e=e.transactions.map(n=>typeof n!="string"?new Ed(n,r):n),ke(this,{provider:r,hash:u2(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,extraData:e.extraData,baseFeePerGas:u2(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#e.map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){let e=this.#e.slice();return e.length===0?[]:(oe(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){let{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,nonce:c,number:u,parentHash:d,parentBeaconBlockRoot:h,stateRoot:m,receiptsRoot:w,timestamp:_,transactions:C}=this;return{_type:"Block",baseFeePerGas:bi(e),difficulty:bi(r),extraData:n,gasLimit:bi(i),gasUsed:bi(s),blobGasUsed:bi(this.blobGasUsed),excessBlobGas:bi(this.excessBlobGas),hash:o,miner:a,nonce:c,number:u,parentHash:d,timestamp:_,parentBeaconBlockRoot:h,stateRoot:m,receiptsRoot:w,transactions:C}}[Symbol.iterator](){let e=0,r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#e.length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}getTransaction(e){return y(this,null,function*(){let r;if(typeof e=="number")r=this.#e[e];else{let n=e.toLowerCase();for(let i of this.#e)if(typeof i=="string"){if(i!==n)continue;r=i;break}else{if(i.hash===n)continue;r=i;break}}if(r==null)throw new Error("no such tx");return typeof r=="string"?yield this.provider.getTransaction(r):r})}getPrefetchedTransaction(e){let r=this.prefetchedTransactions;if(typeof e=="number")return r[e];e=e.toLowerCase();for(let n of r)if(n.hash===e)return n;K(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return rLe(this)}},_c=class{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,r){this.provider=r;let n=Object.freeze(e.topics.slice());ke(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){let{address:e,blockHash:r,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:u}=this;return{_type:"log",address:e,blockHash:r,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:u}}getBlock(){return y(this,null,function*(){let e=yield this.provider.getBlock(this.blockHash);return oe(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e})}getTransaction(){return y(this,null,function*(){let e=yield this.provider.getTransaction(this.transactionHash);return oe(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e})}getTransactionReceipt(){return y(this,null,function*(){let e=yield this.provider.getTransactionReceipt(this.transactionHash);return oe(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e})}removedEvent(){return nLe(this)}},Cp=class{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#e;constructor(e,r){this.#e=Object.freeze(e.logs.map(i=>new _c(i,r)));let n=Nte;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),ke(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#e}toJSON(){let{to:e,from:r,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:c,logs:u,status:d,root:h}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:bi(this.cumulativeGasUsed),from:r,gasPrice:bi(this.gasPrice),blobGasUsed:bi(this.blobGasUsed),blobGasPrice:bi(this.blobGasPrice),gasUsed:bi(this.gasUsed),hash:i,index:s,logs:u,logsBloom:c,root:h,status:d,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}getBlock(){return y(this,null,function*(){let e=yield this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e})}getTransaction(){return y(this,null,function*(){let e=yield this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e})}getResult(){return y(this,null,function*(){return yield this.provider.getTransactionResult(this.hash)})}confirmations(){return y(this,null,function*(){return(yield this.provider.getBlockNumber())-this.blockNumber+1})}removedEvent(){return Mte(this)}reorderedEvent(e){return oe(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),Ote(this,e)}},Ed=class t{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;#e;constructor(e,r){this.provider=r,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.maxFeePerBlobGas=e.maxFeePerBlobGas!=null?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,this.blobVersionedHashes=e.blobVersionedHashes!=null?e.blobVersionedHashes:null,this.#e=-1}toJSON(){let{blockNumber:e,blockHash:r,index:n,hash:i,type:s,to:o,from:a,nonce:c,data:u,signature:d,accessList:h,blobVersionedHashes:m}=this;return{_type:"TransactionResponse",accessList:h,blockNumber:e,blockHash:r,blobVersionedHashes:m,chainId:bi(this.chainId),data:u,from:a,gasLimit:bi(this.gasLimit),gasPrice:bi(this.gasPrice),hash:i,maxFeePerGas:bi(this.maxFeePerGas),maxPriorityFeePerGas:bi(this.maxPriorityFeePerGas),maxFeePerBlobGas:bi(this.maxFeePerBlobGas),nonce:c,signature:d,to:o,index:n,type:s,value:bi(this.value)}}getBlock(){return y(this,null,function*(){let e=this.blockNumber;if(e==null){let n=yield this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;let r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r})}getTransaction(){return y(this,null,function*(){return this.provider.getTransaction(this.hash)})}confirmations(){return y(this,null,function*(){if(this.blockNumber==null){let{tx:r,blockNumber:n}=yield ui({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return r==null||r.blockNumber==null?0:n-r.blockNumber+1}return(yield this.provider.getBlockNumber())-this.blockNumber+1})}wait(e,r){return y(this,null,function*(){let n=e??1,i=r??0,s=this.#e,o=-1,a=s===-1,c=()=>y(this,null,function*(){if(a)return null;let{blockNumber:m,nonce:w}=yield ui({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(w<this.nonce){s=m;return}if(a)return null;let _=yield this.getTransaction();if(!(_&&_.blockNumber!=null))for(o===-1&&(o=s-3,o<this.#e&&(o=this.#e));o<=m;){if(a)return null;let C=yield this.provider.getBlock(o,!0);if(C==null)return;for(let A of C)if(A===this.hash)return;for(let A=0;A<C.length;A++){let R=yield C.getTransaction(A);if(R.from===this.from&&R.nonce===this.nonce){if(a)return null;let L=yield this.provider.getTransactionReceipt(R.hash);if(L==null||m-L.blockNumber+1<n)return;let U="replaced";R.data===this.data&&R.to===this.to&&R.value===this.value?U="repriced":R.data==="0x"&&R.from===R.to&&R.value===Nte&&(U="cancelled"),oe(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:U==="replaced"||U==="cancelled",reason:U,replacement:R.replaceableTransaction(s),hash:R.hash,receipt:L})}}o++}}),u=m=>{if(m==null||m.status!==0)return m;oe(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:m.to,from:m.from,data:""},receipt:m})},d=yield this.provider.getTransactionReceipt(this.hash);if(n===0)return u(d);if(d){if((yield d.confirmations())>=n)return u(d)}else if(yield c(),n===0)return null;return yield new Promise((m,w)=>{let _=[],C=()=>{_.forEach(R=>R())};if(_.push(()=>{a=!0}),i>0){let R=setTimeout(()=>{C(),w(Fr("wait for transaction timeout","TIMEOUT"))},i);_.push(()=>{clearTimeout(R)})}let A=R=>y(this,null,function*(){if((yield R.confirmations())>=n){C();try{m(u(R))}catch(L){w(L)}}});if(_.push(()=>{this.provider.off(this.hash,A)}),this.provider.on(this.hash,A),s>=0){let R=()=>y(this,null,function*(){try{yield c()}catch(L){if(Ln(L,"TRANSACTION_REPLACED")){C(),w(L);return}}a||this.provider.once("block",R)});_.push(()=>{this.provider.off("block",R)}),this.provider.once("block",R)}})})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return oe(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Mte(this)}reorderedEvent(e){return oe(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),oe(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Ote(this,e)}replaceableTransaction(e){K(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);let r=new t(this,this.provider);return r.#e=e,r}};function rLe(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function Ote(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function Mte(t){return{orphan:"drop-transaction",tx:t}}function nLe(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}var P0=class extends _c{interface;fragment;args;constructor(e,r,n){super(e,e.provider);let i=r.decodeEventLog(n,e.data,e.topics);ke(this,{args:i,fragment:n,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}},d2=class extends _c{error;constructor(e,r){super(e,e.provider),ke(this,{error:r})}},jM=class extends Cp{#e;constructor(e,r,n){super(n,r),this.#e=e}get logs(){return super.logs.map(e=>{let r=e.topics.length?this.#e.getEvent(e.topics[0]):null;if(r)try{return new P0(e,this.#e,r)}catch(n){return new d2(e,n)}return e})}},k0=class t extends Ed{#e;constructor(e,r,n){super(n,r),this.#e=e}wait(e,r){return y(this,null,function*(){let n=yield rs(t.prototype,this,"wait").call(this,e,r);return n==null?null:new jM(this.#e,this.provider,n)})}},h2=class extends ud{log;constructor(e,r,n,i){super(e,r,n),ke(this,{log:i})}getBlock(){return y(this,null,function*(){return yield this.log.getBlock()})}getTransaction(){return y(this,null,function*(){return yield this.log.getTransaction()})}getTransactionReceipt(){return y(this,null,function*(){return yield this.log.getTransactionReceipt()})}},Yx=class extends h2{constructor(e,r,n,i,s){super(e,r,n,new P0(s,e.interface,i));let o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);ke(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}};var Pte=BigInt(0);function Lte(t){return t&&typeof t.call=="function"}function Fte(t){return t&&typeof t.estimateGas=="function"}function t8(t){return t&&typeof t.resolveName=="function"}function Bte(t){return t&&typeof t.sendTransaction=="function"}function Ute(t){if(t!=null){if(t8(t))return t;if(t.provider)return t.provider}}var HM=class{#e;fragment;constructor(e,r,n){if(ke(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");let i=Ip(e.runner,"resolveName"),s=t8(i)?i:null;this.#e=function(){return y(this,null,function*(){let o=yield Promise.all(r.inputs.map((a,c)=>n[c]==null?null:a.walkAsync(n[c],(d,h)=>d==="address"?Array.isArray(h)?Promise.all(h.map(m=>wi(m,s))):wi(h,s):h)));return e.interface.encodeFilterTopics(r,o)})}()}getTopicFilter(){return this.#e}};function Ip(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function xp(t){return t==null?null:t.provider||null}function jte(t,e){return y(this,null,function*(){let r=Tn.dereference(t,"overrides");K(typeof r=="object","invalid overrides parameter","overrides",t);let n=_d(r);return K(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),K(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n})}function iLe(t,e,r){return y(this,null,function*(){let n=Ip(t,"resolveName"),i=t8(n)?n:null;return yield Promise.all(e.map((s,o)=>s.walkAsync(r[o],(a,c)=>(c=Tn.dereference(c,a),a==="address"?wi(c,i):c))))})}function sLe(t){let e=function(o){return y(this,null,function*(){let a=yield jte(o,["data"]);a.to=yield t.getAddress(),a.from&&(a.from=yield wi(a.from,Ute(t.runner)));let c=t.interface,u=Me(a.value||Pte,"overrides.value")===Pte,d=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!d&&!u&&K(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),K(c.fallback||d,"cannot send data to receive-only contract","overrides.data",a.data);let h=c.receive||c.fallback&&c.fallback.payable;return K(h||u,"cannot send value to non-payable fallback","overrides.value",a.value),K(c.fallback||d,"cannot send data to receive-only contract","overrides.data",a.data),a})},r=function(o){return y(this,null,function*(){let a=Ip(t.runner,"call");oe(Lte(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let c=yield e(o);try{return yield a.call(c)}catch(u){throw sp(u)&&u.data?t.interface.makeError(u.data,c):u}})},n=function(o){return y(this,null,function*(){let a=t.runner;oe(Bte(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let c=yield a.sendTransaction(yield e(o)),u=xp(t.runner);return new k0(t.interface,u,c)})},i=function(o){return y(this,null,function*(){let a=Ip(t.runner,"estimateGas");return oe(Fte(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),yield a.estimateGas(yield e(o))})},s=o=>y(this,null,function*(){return yield n(o)});return ke(s,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),s}function oLe(t,e){let r=function(...u){let d=t.interface.getFunction(e,u);return oe(d,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:u}}),d},n=function(...u){return y(this,null,function*(){let d=r(...u),h={};if(d.inputs.length+1===u.length&&(h=yield jte(u.pop()),h.from&&(h.from=yield wi(h.from,Ute(t.runner)))),d.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");let m=yield iLe(t.runner,d.inputs,u);return Object.assign({},h,yield ui({to:t.getAddress(),data:t.interface.encodeFunctionData(d,m)}))})},i=function(...u){return y(this,null,function*(){let d=yield a(...u);return d.length===1?d[0]:d})},s=function(...u){return y(this,null,function*(){let d=t.runner;oe(Bte(d),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let h=yield d.sendTransaction(yield n(...u)),m=xp(t.runner);return new k0(t.interface,m,h)})},o=function(...u){return y(this,null,function*(){let d=Ip(t.runner,"estimateGas");return oe(Fte(d),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),yield d.estimateGas(yield n(...u))})},a=function(...u){return y(this,null,function*(){let d=Ip(t.runner,"call");oe(Lte(d),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let h=yield n(...u),m="0x";try{m=yield d.call(h)}catch(_){throw sp(_)&&_.data?t.interface.makeError(_.data,h):_}let w=r(...u);return t.interface.decodeFunctionResult(w,m)})},c=(...u)=>y(this,null,function*(){return r(...u).constant?yield i(...u):yield s(...u)});return ke(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{let u=t.interface.getFunction(e);return oe(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),u}}),c}function aLe(t,e){let r=function(...i){let s=t.interface.getEvent(e,i);return oe(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new HM(t,r(...i),i)};return ke(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{let i=t.interface.getEvent(e);return oe(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}var Xx=Symbol.for("_ethersInternal_contract"),Hte=new WeakMap;function cLe(t,e){Hte.set(t[Xx],e)}function Qo(t){return Hte.get(t[Xx])}function lLe(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}function qM(t,e){return y(this,null,function*(){let r,n=null;if(Array.isArray(e)){let s=function(o){if(nr(o,32))return o;let a=t.interface.getEvent(o);return K(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?r=[null]:typeof e=="string"?nr(e,32)?r=[e]:(n=t.interface.getEvent(e),K(n,"unknown fragment","event",e),r=[n.topicHash]):lLe(e)?r=yield e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):K(!1,"unknown event name","event",e);r=r.map(s=>{if(s==null)return null;if(Array.isArray(s)){let o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});let i=r.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:r}})}function p2(t,e){return y(this,null,function*(){let{subs:r}=Qo(t);return r.get((yield qM(t,e)).tag)||null})}function kte(t,e,r){return y(this,null,function*(){let n=xp(t.runner);oe(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});let{fragment:i,tag:s,topics:o}=yield qM(t,r),{addr:a,subs:c}=Qo(t),u=c.get(s);if(!u){let h={address:a||t,topics:o},m=A=>{let R=i;if(R==null)try{R=t.interface.getEvent(A.topics[0])}catch{}if(R){let L=R,U=i?t.interface.decodeEventLog(i,A.data,A.topics):[];$M(t,r,U,V=>new Yx(t,V,r,L,A))}else $M(t,r,[],L=>new h2(t,L,r,A))},w=[];u={tag:s,listeners:[],start:()=>{w.length||w.push(n.on(h,m))},stop:()=>y(this,null,function*(){if(w.length==0)return;let A=w;w=[],yield Promise.all(A),n.off(h,m)})},c.set(s,u)}return u})}var VM=Promise.resolve();function uLe(t,e,r,n){return y(this,null,function*(){yield VM;let i=yield p2(t,e);if(!i)return!1;let s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{let c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),Qo(t).subs.delete(i.tag)),s>0})}function $M(t,e,r,n){return y(this,null,function*(){try{yield VM}catch{}let i=uLe(t,e,r,n);return VM=i,yield i})}var Qx=["then"],e8=class t{target;interface;runner;filters;[Xx];fallback;constructor(e,r,n,i){K(typeof e=="string"||Yv(e),"invalid value for Contract target","target",e),n==null&&(n=null);let s=l2.from(r);ke(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,Xx,{value:{}});let o,a=null,c=null;if(i){let h=xp(n);c=new k0(this.interface,h,i)}let u=new Map;if(typeof e=="string")if(nr(e))a=e,o=Promise.resolve(e);else{let h=Ip(n,"resolveName");if(!t8(h))throw Fr("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=h.resolveName(e).then(m=>{if(m==null)throw Fr("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Qo(this).addr=m,m})}else o=e.getAddress().then(h=>{if(h==null)throw new Error("TODO");return Qo(this).addr=h,h});cLe(this,{addrPromise:o,addr:a,deployTx:c,subs:u});let d=new Proxy({},{get:(h,m,w)=>{if(typeof m=="symbol"||Qx.indexOf(m)>=0)return Reflect.get(h,m,w);try{return this.getEvent(m)}catch(_){if(!Ln(_,"INVALID_ARGUMENT")||_.argument!=="key")throw _}},has:(h,m)=>Qx.indexOf(m)>=0?Reflect.has(h,m):Reflect.has(h,m)||this.interface.hasEvent(String(m))});return ke(this,{filters:d}),ke(this,{fallback:s.receive||s.fallback?sLe(this):null}),new Proxy(this,{get:(h,m,w)=>{if(typeof m=="symbol"||m in h||Qx.indexOf(m)>=0)return Reflect.get(h,m,w);try{return h.getFunction(m)}catch(_){if(!Ln(_,"INVALID_ARGUMENT")||_.argument!=="key")throw _}},has:(h,m)=>typeof m=="symbol"||m in h||Qx.indexOf(m)>=0?Reflect.has(h,m):h.interface.hasFunction(m)})}connect(e){return new t(this.target,this.interface,e)}attach(e){return new t(e,this.interface,this.runner)}getAddress(){return y(this,null,function*(){return yield Qo(this).addrPromise})}getDeployedCode(){return y(this,null,function*(){let e=xp(this.runner);oe(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});let r=yield e.getCode(yield this.getAddress());return r==="0x"?null:r})}waitForDeployment(){return y(this,null,function*(){let e=this.deploymentTransaction();if(e)return yield e.wait(),this;if((yield this.getDeployedCode())!=null)return this;let n=xp(this.runner);return oe(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{let o=()=>y(this,null,function*(){try{if((yield this.getDeployedCode())!=null)return i(this);n.once("block",o)}catch(a){s(a)}});o()})})}deploymentTransaction(){return Qo(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),oLe(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),aLe(this,e)}queryTransaction(e){return y(this,null,function*(){throw new Error("@TODO")})}queryFilter(e,r,n){return y(this,null,function*(){r==null&&(r=0),n==null&&(n="latest");let{addr:i,addrPromise:s}=Qo(this),o=i||(yield s),{fragment:a,topics:c}=yield qM(this,e),u={address:o,topics:c,fromBlock:r,toBlock:n},d=xp(this.runner);return oe(d,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(yield d.getLogs(u)).map(h=>{let m=a;if(m==null)try{m=this.interface.getEvent(h.topics[0])}catch{}if(m)try{return new P0(h,this.interface,m)}catch(w){return new d2(h,w)}return new _c(h,d)})})}on(e,r){return y(this,null,function*(){let n=yield kte(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this})}once(e,r){return y(this,null,function*(){let n=yield kte(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this})}emit(e,...r){return y(this,null,function*(){return yield $M(this,e,r,null)})}listenerCount(e){return y(this,null,function*(){if(e){let i=yield p2(this,e);return i?i.listeners.length:0}let{subs:r}=Qo(this),n=0;for(let{listeners:i}of r.values())n+=i.length;return n})}listeners(e){return y(this,null,function*(){if(e){let i=yield p2(this,e);return i?i.listeners.map(({listener:s})=>s):[]}let{subs:r}=Qo(this),n=[];for(let{listeners:i}of r.values())n=n.concat(i.map(({listener:s})=>s));return n})}off(e,r){return y(this,null,function*(){let n=yield p2(this,e);if(!n)return this;if(r){let i=n.listeners.map(({listener:s})=>s).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Qo(this).subs.delete(n.tag)),this})}removeAllListeners(e){return y(this,null,function*(){if(e){let r=yield p2(this,e);if(!r)return this;r.stop(),Qo(this).subs.delete(r.tag)}else{let{subs:r}=Qo(this);for(let{tag:n,stop:i}of r.values())i(),r.delete(n)}return this})}addListener(e,r){return y(this,null,function*(){return yield this.on(e,r)})}removeListener(e,r){return y(this,null,function*(){return yield this.off(e,r)})}static buildClass(e){class r extends t{constructor(i,s=null){super(i,e,s)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};function fLe(){return e8}var dl=class extends fLe(){};function WM(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):K(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}var r8=class{name;constructor(e){ke(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}encodeAddress(e,r){return y(this,null,function*(){throw new Error("unsupported coin")})}decodeAddress(e,r){return y(this,null,function*(){throw new Error("unsupported coin")})}};var $te=new RegExp("^(ipfs)://(.*)$","i"),Vte=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),$te,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")],L0=class t{provider;address;name;#e;#t;constructor(e,r,n){ke(this,{provider:e,address:r,name:n}),this.#e=null,this.#t=new dl(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}supportsWildcard(){return y(this,null,function*(){return this.#e==null&&(this.#e=y(this,null,function*(){try{return yield this.#t.supportsInterface("0x9061b923")}catch(e){if(Ln(e,"CALL_EXCEPTION"))return!1;throw this.#e=null,e}})),yield this.#e})}#r(e,r){return y(this,null,function*(){r=(r||[]).slice();let n=this.#t.interface;r.unshift(T0(this.name));let i=null;(yield this.supportsWildcard())&&(i=n.getFunction(e),oe(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),r=[OM(this.name,255),n.encodeFunctionData(i,r)],e="resolve(bytes,bytes)"),r.push({enableCcipRead:!0});try{let s=yield this.#t[e](...r);return i?n.decodeFunctionResult(i,s)[0]:s}catch(s){if(!Ln(s,"CALL_EXCEPTION"))throw s}return null})}getAddress(e){return y(this,null,function*(){if(e==null&&(e=60),e===60)try{let s=yield this.#r("addr(bytes32)");return s==null||s===Pu?null:s}catch(s){if(Ln(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648,o=yield this.#r("addr(bytes32,uint)",[s]);if(nr(o,20))return It(o)}let r=null;for(let s of this.provider.plugins)if(s instanceof r8&&s.supportsCoinType(e)){r=s;break}if(r==null)return null;let n=yield this.#r("addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;let i=yield r.decodeAddress(e,n);if(i!=null)return i;oe(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})})}getText(e){return y(this,null,function*(){let r=yield this.#r("text(bytes32,string)",[e]);return r==null||r==="0x"?null:r})}getContentHash(){return y(this,null,function*(){let e=yield this.#r("contenthash(bytes32)");if(e==null||e==="0x")return null;let r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){let i=r[1]==="e3010170"?"ipfs":"ipns",s=parseInt(r[4],16);if(r[5].length===s*2)return`${i}://${sx("0x"+r[2])}`}let n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;oe(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})})}getAvatar(){return y(this,null,function*(){return(yield this._getAvatar()).url})}_getAvatar(){return y(this,null,function*(){let e=[{type:"name",value:this.name}];try{let r=yield this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n<Vte.length;n++){let i=r.match(Vte[n]);if(i==null)continue;let s=i[1].toLowerCase();switch(s){case"https":case"data":return e.push({type:"url",value:r}),{linkage:e,url:r};case"ipfs":{let o=WM(r);return e.push({type:"ipfs",value:r}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{let o=s==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:s,value:r});let a=yield this.getAddress();if(a==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};let c=(i[2]||"").split("/");if(c.length!==2)return e.push({type:`!${s}caip`,value:i[2]||""}),{url:null,linkage:e};let u=c[1],d=new dl(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(s==="erc721"){let C=yield d.ownerOf(u);if(a!==C)return e.push({type:"!owner",value:C}),{url:null,linkage:e};e.push({type:"owner",value:C})}else if(s==="erc1155"){let C=yield d.balanceOf(a,u);if(!C)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:C.toString()})}let h=yield d[o](u);if(h==null||h==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:h}),s==="erc1155"&&(h=h.replace("{id}",Xs(u,32).substring(2)),e.push({type:"metadata-url-expanded",value:h})),h.match(/^ipfs:/i)&&(h=WM(h)),e.push({type:"metadata-url",value:h});let m={},w=yield new Rs(h).send();w.assertOk();try{m=w.bodyJson}catch{try{e.push({type:"!metadata",value:w.bodyText})}catch{let R=w.body;return R&&e.push({type:"!metadata",value:Pe(R)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!m)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(m)});let _=m.image;if(typeof _!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!_.match(/^(https:\/\/|data:)/i)){if(_.match($te)==null)return e.push({type:"!imageUrl-ipfs",value:_}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:_}),_=WM(_)}return e.push({type:"url",value:_}),{linkage:e,url:_}}}}}catch{}return{linkage:e,url:null}})}static getEnsAddress(e){return y(this,null,function*(){let r=yield e.getNetwork(),n=r.getPlugin("org.ethers.plugins.network.Ens");return oe(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:r}}),n.address})}static#n(e,r){return y(this,null,function*(){let n=yield t.getEnsAddress(e);try{let s=yield new dl(n,["function resolver(bytes32) view returns (address)"],e).resolver(T0(r),{enableCcipRead:!0});return s===Pu?null:s}catch(i){throw i}return null})}static fromName(e,r){return y(this,null,function*(){let n=r;for(;;){if(n===""||n==="."||r!=="eth"&&n==="eth")return null;let i=yield t.#n(e,n);if(i!=null){let s=new t(e,i,r);return n!==r&&!(yield s.supportsWildcard())?null:s}n=n.split(".").slice(1).join(".")}})}};var qte=BigInt(0);function _r(t,e){return function(r){return r==null?e:t(r)}}function n8(t,e){return r=>{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function m2(t,e){return r=>{let n={};for(let i in t){let s=i;if(e&&i in e&&!(s in r)){for(let o of e[i])if(o in r){s=o;break}}try{let o=t[i](r[s]);o!==void 0&&(n[i]=o)}catch(o){let a=o instanceof Error?o.message:"not-an-error";oe(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:r})}}return n}}function dLe(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}K(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function F0(t){return K(nr(t,!0),"invalid data","value",t),t}function Ns(t){return K(nr(t,32),"invalid hash","value",t),t}var hLe=m2({address:It,blockHash:Ns,blockNumber:wt,data:F0,index:wt,removed:_r(dLe,!1),topics:n8(Ns),transactionHash:Ns,transactionIndex:wt},{index:["logIndex"]});function Wte(t){return hLe(t)}var pLe=m2({hash:_r(Ns),parentHash:Ns,parentBeaconBlockRoot:_r(Ns,null),number:wt,timestamp:wt,nonce:_r(F0),difficulty:Me,gasLimit:Me,gasUsed:Me,stateRoot:_r(Ns,null),receiptsRoot:_r(Ns,null),blobGasUsed:_r(Me,null),excessBlobGas:_r(Me,null),miner:_r(It),extraData:F0,baseFeePerGas:_r(Me)});function zte(t){let e=pLe(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:zM(r)),e}var mLe=m2({transactionIndex:wt,blockNumber:wt,transactionHash:Ns,address:It,topics:n8(Ns),data:F0,index:wt,blockHash:Ns},{index:["logIndex"]});function gLe(t){return mLe(t)}var yLe=m2({to:_r(It,null),from:_r(It,null),contractAddress:_r(It,null),index:wt,root:_r(Pe),gasUsed:Me,blobGasUsed:_r(Me,null),logsBloom:_r(F0),blockHash:Ns,hash:Ns,logs:n8(gLe),blockNumber:wt,cumulativeGasUsed:Me,effectiveGasPrice:_r(Me),blobGasPrice:_r(Me,null),status:_r(wt),type:_r(wt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Gte(t){return yLe(t)}function zM(t){t.to&&Me(t.to)===qte&&(t.to="0x0000000000000000000000000000000000000000");let e=m2({hash:Ns,index:_r(wt,void 0),type:r=>r==="0x"||r==null?0:wt(r),accessList:_r(Yo,null),blobVersionedHashes:_r(n8(Ns,!0),null),blockHash:_r(Ns,null),blockNumber:_r(wt,null),transactionIndex:_r(wt,null),from:It,gasPrice:_r(Me),maxPriorityFeePerGas:_r(Me),maxFeePerGas:_r(Me),maxFeePerBlobGas:_r(Me,null),gasLimit:Me,to:_r(It,null),value:Me,nonce:wt,data:F0,creates:_r(It,null),chainId:_r(Me,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Sx(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=eo.from(t.signature):e.signature=eo.from(t),e.chainId==null){let r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&Me(e.blockHash)===qte&&(e.blockHash=null),e}var wLe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B0=class t{name;constructor(e){ke(this,{name:e})}clone(){return new t(this.name)}},U0=class t extends B0{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,r){e==null&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);let n={effectiveBlock:e};function i(s,o){let a=(r||{})[s];a==null&&(a=o),K(typeof a=="number",`invalud value for ${s}`,"costs",r),n[s]=a}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),ke(this,n)}clone(){return new t(this.effectiveBlock,this)}},j0=class t extends B0{address;targetNetwork;constructor(e,r){super("org.ethers.plugins.network.Ens"),ke(this,{address:e||wLe,targetNetwork:r??1})}clone(){return new t(this.address,this.targetNetwork)}};var g2=class extends B0{#e;#t;get url(){return this.#e}get processFunc(){return this.#t}constructor(e,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#e=e,this.#t=r}clone(){return this}};var GM=new Map,ro=class t{#e;#t;#r;constructor(e,r){this.#e=e,this.#t=Me(r),this.#r=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#e}set name(e){this.#e=e}get chainId(){return this.#t}set chainId(e){this.#t=Me(e,"chainId")}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===Me(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===Me(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===Me(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(this.#r.values())}attachPlugin(e){if(this.#r.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#r.set(e.name,e.clone()),this}getPlugin(e){return this.#r.get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){let e=new t(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){let r=this.getPlugin("org.ethers.plugins.network.GasCost")||new U0,n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?n+=r.txDataZero:n+=r.txDataNonzero;if(e.accessList){let i=Yo(e.accessList);for(let s in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[s].storageKeys.length}return n}static from(e){if(vLe(),e==null)return t.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){let r=GM.get(e);if(r)return r();if(typeof e=="bigint")return new t("unknown",e);K(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){K(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);let r=new t(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new j0(e.ensAddress,e.ensNetwork)),r}K(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));let n=GM.get(e);n&&K(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),GM.set(e,r)}};function Zte(t,e){let r=String(t);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);let n=r.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function Kte(t){return new g2(t,(e,r,n)=>y(this,null,function*(){n.setHeader("User-Agent","ethers");let i;try{let[s,o]=yield Promise.all([n.send(),e()]);i=s;let a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:Zte(a.maxFee,9),maxPriorityFeePerGas:Zte(a.maxPriorityFee,9)}}catch(s){oe(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}}))}var Jte=!1;function vLe(){if(Jte)return;Jte=!0;function t(e,r,n){let i=function(){let s=new ro(e,r);return n.ensNetwork!=null&&s.attachPlugin(new j0(null,n.ensNetwork)),s.attachPlugin(new U0),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};ro.register(e,i),ro.register(r,i),n.altNames&&n.altNames.forEach(s=>{ro.register(s,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[Kte("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Kte("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function ZM(t){return JSON.parse(JSON.stringify(t))}var i8=class{#e;#t;#r;#n;constructor(e){this.#e=e,this.#t=null,this.#r=4e3,this.#n=-2}get pollingInterval(){return this.#r}set pollingInterval(e){this.#r=e}#i(){return y(this,null,function*(){try{let e=yield this.#e.getBlockNumber();if(this.#n===-2){this.#n=e;return}if(e!==this.#n){for(let r=this.#n+1;r<=e;r++){if(this.#t==null)return;yield this.#e.emit("block",r)}this.#n=e}}catch{}this.#t!=null&&(this.#t=this.#e._setTimeout(this.#i.bind(this),this.#r))})}start(){this.#t||(this.#t=this.#e._setTimeout(this.#i.bind(this),this.#r),this.#i())}stop(){this.#t&&(this.#e._clearTimeout(this.#t),this.#t=null)}pause(e){this.stop(),e&&(this.#n=-2)}resume(){this.start()}},y2=class{#e;#t;#r;constructor(e){this.#e=e,this.#r=!1,this.#t=r=>{this._poll(r,this.#e)}}_poll(e,r){return y(this,null,function*(){throw new Error("sub-classes must override this")})}start(){this.#r||(this.#r=!0,this.#t(-2),this.#e.on("block",this.#t))}stop(){this.#r&&(this.#r=!1,this.#e.off("block",this.#t))}pause(e){this.stop()}resume(){this.start()}},s8=class extends y2{#e;#t;constructor(e,r){super(e),this.#e=r,this.#t=-2}pause(e){e&&(this.#t=-2),super.pause(e)}_poll(e,r){return y(this,null,function*(){let n=yield r.getBlock(this.#e);n!=null&&(this.#t===-2?this.#t=n.number:n.number>this.#t&&(r.emit(this.#e,n.number),this.#t=n.number))})}},o8=class extends y2{#e;constructor(e,r){super(e),this.#e=ZM(r)}_poll(e,r){return y(this,null,function*(){throw new Error("@TODO")})}},a8=class extends y2{#e;constructor(e,r){super(e),this.#e=r}_poll(e,r){return y(this,null,function*(){let n=yield r.getTransactionReceipt(this.#e);n&&r.emit(this.#e,n)})}},Cd=class{#e;#t;#r;#n;#i;constructor(e,r){this.#e=e,this.#t=ZM(r),this.#r=this.#o.bind(this),this.#n=!1,this.#i=-2}#o(e){return y(this,null,function*(){if(this.#i===-2)return;let r=ZM(this.#t);r.fromBlock=this.#i+1,r.toBlock=e;let n=yield this.#e.getLogs(r);if(n.length===0){this.#i<e-60&&(this.#i=e-60);return}for(let i of n)this.#e.emit(this.#t,i),this.#i=i.blockNumber})}start(){this.#n||(this.#n=!0,this.#i===-2&&this.#e.getBlockNumber().then(e=>{this.#i=e}),this.#e.on("block",this.#r))}stop(){this.#n&&(this.#n=!1,this.#e.off("block",this.#r))}pause(e){this.stop(),e&&(this.#i=-2)}resume(){this.start()}};var bLe=BigInt(2),ELe=10;function c8(t){return t&&typeof t.then=="function"}function l8(t,e){return t+":"+JSON.stringify(e,(r,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){let i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}var Fu=class{name;constructor(e){ke(this,{name:e})}start(){}stop(){}pause(e){}resume(){}};function _Le(t){return JSON.parse(JSON.stringify(t))}function YM(t){return t=Array.from(new Set(t).values()),t.sort(),t}function KM(t,e){return y(this,null,function*(){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(nr(t,32)){let r=t.toLowerCase();return{type:"transaction",tag:l8("tx",{hash:r}),hash:r}}if(t.orphan){let r=t;return{type:"orphan",tag:l8("orphan",r),filter:_Le(r)}}if(t.address||t.topics){let r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?YM(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(r.address){let i=[],s=[],o=a=>{nr(a)?i.push(a):s.push(y(this,null,function*(){i.push(yield wi(a,e))}))};Array.isArray(r.address)?r.address.forEach(o):o(r.address),s.length&&(yield Promise.all(s)),n.address=YM(i.map(a=>a.toLowerCase()))}return{filter:n,tag:l8("event",n),type:"event"}}K(!1,"unknown ProviderEvent","event",t)})}function JM(){return new Date().getTime()}var CLe={cacheTimeout:250,pollingInterval:4e3},w2=class{#e;#t;#r;#n;#i;#o;#s;#a;#u;#l;#d;#h;constructor(e,r){if(this.#h=Object.assign({},CLe,r||{}),e==="any")this.#o=!0,this.#i=null;else if(e){let n=ro.from(e);this.#o=!1,this.#i=Promise.resolve(n),setTimeout(()=>{this.emit("network",n,null)},0)}else this.#o=!1,this.#i=null;this.#a=-1,this.#s=new Map,this.#e=new Map,this.#t=new Map,this.#r=null,this.#n=!1,this.#u=1,this.#l=new Map,this.#d=!1}get pollingInterval(){return this.#h.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#t.values())}attachPlugin(e){if(this.#t.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#t.set(e.name,e.connect(this)),this}getPlugin(e){return this.#t.get(e)||null}get disableCcipRead(){return this.#d}set disableCcipRead(e){this.#d=!!e}#c(e){return y(this,null,function*(){let r=this.#h.cacheTimeout;if(r<0)return yield this._perform(e);let n=l8(e.method,e),i=this.#s.get(n);return i||(i=this._perform(e),this.#s.set(n,i),setTimeout(()=>{this.#s.get(n)===i&&this.#s.delete(n)},r)),yield i})}ccipReadFetch(e,r,n){return y(this,null,function*(){if(this.disableCcipRead||n.length===0||e.to==null)return null;let i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a<n.length;a++){let c=n[a],u=c.replace("{sender}",i).replace("{data}",s),d=new Rs(u);c.indexOf("{data}")===-1&&(d.body={data:s,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:d,index:a,urls:n});let h="unknown error",m=yield d.send();try{let w=m.bodyJson;if(w.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:d,result:w}),w.data;w.message&&(h=w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:d,result:w})}catch{}oe(m.statusCode<400||m.statusCode>=500,`response not found during CCIP fetch: ${h}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:h}}),o.push(h)}oe(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})})}_wrapBlock(e,r){return new f2(zte(e),this)}_wrapLog(e,r){return new _c(Wte(e),this)}_wrapTransactionReceipt(e,r){return new Cp(Gte(e),this)}_wrapTransactionResponse(e,r){return new Ed(zM(e),this)}_detectNetwork(){oe(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}_perform(e){return y(this,null,function*(){oe(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})})}getBlockNumber(){return y(this,null,function*(){let e=wt(yield this.#c({method:"getBlockNumber"}),"%response");return this.#a>=0&&(this.#a=e),e})}_getAddress(e){return wi(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(nr(e))return nr(e,32)?e:mc(e);if(typeof e=="bigint"&&(e=wt(e,"blockTag")),typeof e=="number")return e>=0?mc(e):this.#a>=0?mc(this.#a+e):this.getBlockNumber().then(r=>mc(r+e));K(!1,"invalid blockTag","blockTag",e)}_getFilter(e){let r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?YM(c.map(u=>u.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,u,d)=>{let h;switch(c.length){case 0:break;case 1:h=c[0];break;default:c.sort(),h=c}if(n&&(u!=null||d!=null))throw new Error("invalid filter");let m={};return h&&(m.address=h),r.length&&(m.topics=r),u&&(m.fromBlock=u),d&&(m.toBlock=d),n&&(m.blockHash=n),m},s=[];if(e.address)if(Array.isArray(e.address))for(let c of e.address)s.push(this._getAddress(c));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(c=>i(c[0],c[1],c[2])):i(s,o,a)}_getTransactionRequest(e){let r=_d(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;let s=wi(r[i],this);c8(s)?n.push(function(){return y(this,null,function*(){r[i]=yield s})}()):r[i]=s}),r.blockTag!=null){let i=this._getBlockTag(r.blockTag);c8(i)?n.push(function(){return y(this,null,function*(){r.blockTag=yield i})}()):r.blockTag=i}return n.length?function(){return y(this,null,function*(){return yield Promise.all(n),r})}():r}getNetwork(){return y(this,null,function*(){if(this.#i==null){let i=y(this,null,function*(){try{let s=yield this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw this.#i===i&&(this.#i=null),s}});return this.#i=i,(yield i).clone()}let e=this.#i,[r,n]=yield Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(this.#o?(this.emit("network",n,r),this.#i===e&&(this.#i=Promise.resolve(n))):oe(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()})}getFeeData(){return y(this,null,function*(){let e=yield this.getNetwork(),r=()=>y(this,null,function*(){let{_block:i,gasPrice:s,priorityFee:o}=yield ui({_block:this.#w("latest",!1),gasPrice:y(this,null,function*(){try{let d=yield this.#c({method:"getGasPrice"});return Me(d,"%response")}catch{}return null}),priorityFee:y(this,null,function*(){try{let d=yield this.#c({method:"getPriorityFee"});return Me(d,"%response")}catch{}return null})}),a=null,c=null,u=this._wrapBlock(i,e);return u&&u.baseFeePerGas&&(c=o??BigInt("1000000000"),a=u.baseFeePerGas*bLe+c),new M0(s,a,c)}),n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){let i=new Rs(n.url),s=yield n.processFunc(r,this,i);return new M0(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return yield r()})}estimateGas(e){return y(this,null,function*(){let r=this._getTransactionRequest(e);return c8(r)&&(r=yield r),Me(yield this.#c({method:"estimateGas",transaction:r}),"%response")})}#f(e,r,n){return y(this,null,function*(){oe(n<ELe,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:r,enableCcipRead:!0})});let i=_d(e);try{return Pe(yield this._perform({method:"call",transaction:i,blockTag:r}))}catch(s){if(!this.disableCcipRead&&sp(s)&&s.data&&n>=0&&r==="latest"&&i.to!=null&&un(s.data,0,4)==="0x556f1830"){let o=s.data,a=yield wi(i.to,this),c;try{c=DLe(un(s.data,4))}catch(h){oe(!1,h.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}oe(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});let u=yield this.ccipReadFetch(i,c.calldata,c.urls);oe(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:c.errorArgs}});let d={to:a,data:Nr([c.selector,SLe([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:d});try{let h=yield this.#f(d,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},d),result:h}),h}catch(h){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},d),error:h}),h}}throw s}})}#m(e){return y(this,null,function*(){let{value:r}=yield ui({network:this.getNetwork(),value:e});return r})}call(e){return y(this,null,function*(){let{tx:r,blockTag:n}=yield ui({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return yield this.#m(this.#f(r,n,e.enableCcipRead?0:-1))})}#p(e,r,n){return y(this,null,function*(){let i=this._getAddress(r),s=this._getBlockTag(n);return(typeof i!="string"||typeof s!="string")&&([i,s]=yield Promise.all([i,s])),yield this.#m(this.#c(Object.assign(e,{address:i,blockTag:s})))})}getBalance(e,r){return y(this,null,function*(){return Me(yield this.#p({method:"getBalance"},e,r),"%response")})}getTransactionCount(e,r){return y(this,null,function*(){return wt(yield this.#p({method:"getTransactionCount"},e,r),"%response")})}getCode(e,r){return y(this,null,function*(){return Pe(yield this.#p({method:"getCode"},e,r))})}getStorage(e,r,n){return y(this,null,function*(){let i=Me(r,"position");return Pe(yield this.#p({method:"getStorage",position:i},e,n))})}broadcastTransaction(e){return y(this,null,function*(){let{blockNumber:r,hash:n,network:i}=yield ui({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=yp.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(r)})}#w(e,r){return y(this,null,function*(){if(nr(e,32))return yield this.#c({method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=yield n),yield this.#c({method:"getBlock",blockTag:n,includeTransactions:r})})}getBlock(e,r){return y(this,null,function*(){let{network:n,params:i}=yield ui({network:this.getNetwork(),params:this.#w(e,!!r)});return i==null?null:this._wrapBlock(i,n)})}getTransaction(e){return y(this,null,function*(){let{network:r,params:n}=yield ui({network:this.getNetwork(),params:this.#c({method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)})}getTransactionReceipt(e){return y(this,null,function*(){let{network:r,params:n}=yield ui({network:this.getNetwork(),params:this.#c({method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){let i=yield this.#c({method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)})}getTransactionResult(e){return y(this,null,function*(){let{result:r}=yield ui({network:this.getNetwork(),result:this.#c({method:"getTransactionResult",hash:e})});return r==null?null:Pe(r)})}getLogs(e){return y(this,null,function*(){let r=this._getFilter(e);c8(r)&&(r=yield r);let{network:n,params:i}=yield ui({network:this.getNetwork(),params:this.#c({method:"getLogs",filter:r})});return i.map(s=>this._wrapLog(s,n))})}_getProvider(e){oe(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}getResolver(e){return y(this,null,function*(){return yield L0.fromName(this,e)})}getAvatar(e){return y(this,null,function*(){let r=yield this.getResolver(e);return r?yield r.getAvatar():null})}resolveName(e){return y(this,null,function*(){let r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return y(this,null,function*(){e=It(e);let r=T0(e.substring(2).toLowerCase()+".addr.reverse");try{let n=yield L0.getEnsAddress(this),s=yield new dl(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(s==null||s===Pu)return null;let a=yield new dl(s,["function name(bytes32) view returns (string)"],this).name(r);return(yield this.resolveName(a))!==e?null:a}catch(n){if(Ln(n,"BAD_DATA")&&n.value==="0x"||Ln(n,"CALL_EXCEPTION"))return null;throw n}return null})}waitForTransaction(e,r,n){return y(this,null,function*(){let i=r??1;return i===0?this.getTransactionReceipt(e):new Promise((s,o)=>y(this,null,function*(){let a=null,c=u=>y(this,null,function*(){try{let d=yield this.getTransactionReceipt(e);if(d!=null&&u-d.blockNumber+1>=i){s(d),a&&(clearTimeout(a),a=null);return}}catch(d){console.log("EEE",d)}this.once("block",c)});n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(Fr("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(yield this.getBlockNumber())}))})}waitForBlock(e){return y(this,null,function*(){oe(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})})}_clearTimeout(e){let r=this.#l.get(e);r&&(r.timer&&clearTimeout(r.timer),this.#l.delete(e))}_setTimeout(e,r){r==null&&(r=0);let n=this.#u++,i=()=>{this.#l.delete(n),e()};if(this.paused)this.#l.set(n,{timer:null,func:i,time:r});else{let s=setTimeout(i,r);this.#l.set(n,{timer:s,func:i,time:JM()})}return n}_forEachSubscriber(e){for(let r of this.#e.values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Fu(e.type);case"block":{let r=new i8(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new s8(this,e.type);case"event":return new Cd(this,e.filter);case"transaction":return new a8(this,e.hash);case"orphan":return new o8(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(let n of this.#e.values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),this.#r!=null&&r.pause(this.#r);break}}#g(e,r){return y(this,null,function*(){let n=yield KM(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=yield KM({orphan:"drop-log",log:r[0]},this)),this.#e.get(n.tag)||null})}#y(e){return y(this,null,function*(){let r=yield KM(e,this),n=r.tag,i=this.#e.get(n);return i||(i={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#e.set(n,i)),i})}on(e,r){return y(this,null,function*(){let n=yield this.#y(e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,this.#r!=null&&n.subscriber.pause(this.#r)),this})}once(e,r){return y(this,null,function*(){let n=yield this.#y(e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,this.#r!=null&&n.subscriber.pause(this.#r)),this})}emit(e,...r){return y(this,null,function*(){let n=yield this.#g(e,r);if(!n||n.listeners.length===0)return!1;let i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{let a=new ud(this,o?null:s,e);try{s.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),this.#e.delete(n.tag)),i>0})}listenerCount(e){return y(this,null,function*(){if(e){let n=yield this.#g(e);return n?n.listeners.length:0}let r=0;for(let{listeners:n}of this.#e.values())r+=n.length;return r})}listeners(e){return y(this,null,function*(){if(e){let n=yield this.#g(e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(let{listeners:n}of this.#e.values())r=r.concat(n.map(({listener:i})=>i));return r})}off(e,r){return y(this,null,function*(){let n=yield this.#g(e);if(!n)return this;if(r){let i=n.listeners.map(({listener:s})=>s).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),this.#e.delete(n.tag)),this})}removeAllListeners(e){return y(this,null,function*(){if(e){let{tag:r,started:n,subscriber:i}=yield this.#y(e);n&&i.stop(),this.#e.delete(r)}else for(let[r,{started:n,subscriber:i}]of this.#e)n&&i.stop(),this.#e.delete(r);return this})}addListener(e,r){return y(this,null,function*(){return yield this.on(e,r)})}removeListener(e,r){return y(this,null,function*(){return this.off(e,r)})}get destroyed(){return this.#n}destroy(){this.removeAllListeners();for(let e of this.#l.keys())this._clearTimeout(e);this.#n=!0}get paused(){return this.#r!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#a=-1,this.#r!=null){if(this.#r==!!e)return;oe(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),this.#r=!!e;for(let r of this.#l.values())r.timer&&clearTimeout(r.timer),r.time=JM()-r.time}resume(){if(this.#r!=null){this._forEachSubscriber(e=>e.resume()),this.#r=null;for(let e of this.#l.values()){let r=e.time;r<0&&(r=0),e.time=JM(),setTimeout(e.func,r)}}}};function xLe(t,e){try{let r=QM(t,e);if(r)return Ru(r)}catch{}return null}function QM(t,e){if(t==="0x")return null;try{let r=wt(un(t,e,e+32)),n=wt(un(t,r,r+32));return un(t,r+32,r+32+n)}catch{}return null}function Yte(t){let e=yi(t);if(e.length>32)throw new Error("internal; should not happen");let r=new Uint8Array(32);return r.set(e,32-e.length),r}function ILe(t){if(t.length%32===0)return t;let e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}var ALe=new Uint8Array([]);function SLe(t){let e=[],r=0;for(let n=0;n<t.length;n++)e.push(ALe),r+=32;for(let n=0;n<t.length;n++){let i=Et(t[n]);e[n]=Yte(r),e.push(Yte(i.length)),e.push(ILe(i)),r+=32+Math.ceil(i.length/32)*32}return Nr(e)}var Qte="0x0000000000000000000000000000000000000000000000000000000000000000";function DLe(t){let e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};oe(hc(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});let r=un(t,0,32);oe(un(r,0,12)===un(Qte,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=un(r,12);try{let n=[],i=wt(un(t,32,64)),s=wt(un(t,i,i+32)),o=un(t,i+32);for(let a=0;a<s;a++){let c=xLe(o,a*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{oe(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{let n=QM(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{oe(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}oe(un(t,100,128)===un(Qte,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=un(t,96,100);try{let n=QM(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{oe(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function H0(t,e){if(t.provider)return t.provider;oe(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}function Xte(t,e){return y(this,null,function*(){let r=_d(e);if(r.to!=null&&(r.to=wi(r.to,t)),r.from!=null){let n=r.from;r.from=Promise.all([t.getAddress(),wi(n,t)]).then(([i,s])=>(K(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else r.from=t.getAddress();return yield ui(r)})}var v2=class{provider;constructor(e){ke(this,{provider:e||null})}getNonce(e){return y(this,null,function*(){return H0(this,"getTransactionCount").getTransactionCount(yield this.getAddress(),e)})}populateCall(e){return y(this,null,function*(){return yield Xte(this,e)})}populateTransaction(e){return y(this,null,function*(){let r=H0(this,"populateTransaction"),n=yield Xte(this,e);n.nonce==null&&(n.nonce=yield this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=yield this.estimateGas(n));let i=yield this.provider.getNetwork();if(n.chainId!=null){let o=Me(n.chainId);K(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;let s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?K(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&K(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){let o=yield r.getFeeData();oe(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{let o=yield r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){let a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(oe(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):oe(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return yield ui(n)})}estimateGas(e){return y(this,null,function*(){return H0(this,"estimateGas").estimateGas(yield this.populateCall(e))})}call(e){return y(this,null,function*(){return H0(this,"call").call(yield this.populateCall(e))})}resolveName(e){return y(this,null,function*(){return yield H0(this,"resolveName").resolveName(e)})}sendTransaction(e){return y(this,null,function*(){let r=H0(this,"sendTransaction"),n=yield this.populateTransaction(e);delete n.from;let i=yp.from(n);return yield r.broadcastTransaction(yield this.signTransaction(i))})}};var ere=new Set;function XM(t){ere.has(t)||(ere.add(t),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${t} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function RLe(t){return JSON.parse(JSON.stringify(t))}var u8=class{#e;#t;#r;#n;#i;#o;constructor(e){this.#e=e,this.#t=null,this.#r=this.#s.bind(this),this.#n=!1,this.#i=null,this.#o=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}#s(e){return y(this,null,function*(){try{this.#t==null&&(this.#t=this._subscribe(this.#e));let r=null;try{r=yield this.#t}catch(s){if(!Ln(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(r==null){this.#t=null,this.#e._recoverSubscriber(this,this._recover(this.#e));return}let n=yield this.#e.getNetwork();if(this.#i||(this.#i=n),this.#i.chainId!==n.chainId)throw new Error("chaid changed");if(this.#o)return;let i=yield this.#e.send("eth_getFilterChanges",[r]);yield this._emitResults(this.#e,i)}catch(r){console.log("@TODO",r)}this.#e.once("block",this.#r)})}#a(){let e=this.#t;e&&(this.#t=null,e.then(r=>{this.#e.send("eth_uninstallFilter",[r])}))}start(){this.#n||(this.#n=!0,this.#s(-2))}stop(){this.#n&&(this.#n=!1,this.#o=!0,this.#a(),this.#e.off("block",this.#r))}pause(e){e&&this.#a(),this.#e.off("block",this.#r)}resume(){this.start()}},f8=class extends u8{#e;constructor(e,r){super(e),this.#e=RLe(r)}_recover(e){return new Cd(e,this.#e)}_subscribe(e){return y(this,null,function*(){return yield e.send("eth_newFilter",[this.#e])})}_emitResults(e,r){return y(this,null,function*(){for(let n of r)e.emit(this.#e,e._wrapLog(n,e._network))})}},d8=class extends u8{_subscribe(e){return y(this,null,function*(){return yield e.send("eth_newPendingTransactionFilter",[])})}_emitResults(e,r){return y(this,null,function*(){for(let n of r)e.emit("pending",n)})}};var TLe="bigint,boolean,function,number,string,symbol".split(/,/g);function h8(t){if(t==null||TLe.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(h8);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function NLe(t){return new Promise(e=>{setTimeout(e,t)})}function V0(t){return t&&t.toLowerCase()}function tre(t){return t&&typeof t.pollingInterval=="number"}var OLe={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3},Ap=class extends v2{address;constructor(e,r){super(e),r=It(r),ke(this,{address:r})}connect(e){oe(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}getAddress(){return y(this,null,function*(){return this.address})}populateTransaction(e){return y(this,null,function*(){return yield this.populateCall(e)})}sendUncheckedTransaction(e){return y(this,null,function*(){let r=h8(e),n=[];if(r.from){let s=r.from;n.push(y(this,null,function*(){let o=yield wi(s,this.provider);K(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=o}))}else r.from=this.address;if(r.gasLimit==null&&n.push(y(this,null,function*(){r.gasLimit=yield this.provider.estimateGas(_e(B({},r),{from:this.address}))})),r.to!=null){let s=r.to;n.push(y(this,null,function*(){r.to=yield wi(s,this.provider)}))}n.length&&(yield Promise.all(n));let i=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[i])})}sendTransaction(e){return y(this,null,function*(){let r=yield this.provider.getBlockNumber(),n=yield this.sendUncheckedTransaction(e);return yield new Promise((i,s)=>{let o=[1e3,100],a=0,c=()=>y(this,null,function*(){try{let u=yield this.provider.getTransaction(n);if(u!=null){i(u.replaceableTransaction(r));return}}catch(u){if(Ln(u,"CANCELLED")||Ln(u,"BAD_DATA")||Ln(u,"NETWORK_ERROR")){u.info==null&&(u.info={}),u.info.sendTransactionHash=n,s(u);return}if(Ln(u,"INVALID_ARGUMENT")&&(a++,u.info==null&&(u.info={}),u.info.sendTransactionHash=n,a>10)){s(u);return}this.provider.emit("error",Fr("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{c()},o.pop()||4e3)});c()})})}signTransaction(e){return y(this,null,function*(){let r=h8(e);if(r.from){let i=yield wi(r.from,this.provider);K(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=i}else r.from=this.address;let n=this.provider.getRpcTransaction(r);return yield this.provider.send("eth_signTransaction",[n])})}signMessage(e){return y(this,null,function*(){let r=typeof e=="string"?Ds(e):e;return yield this.provider.send("personal_sign",[Pe(r),this.address.toLowerCase()])})}signTypedData(e,r,n){return y(this,null,function*(){let i=h8(n),s=yield N0.resolveNames(e,r,i,o=>y(this,null,function*(){let a=yield wi(o);return K(a!=null,"TypedData does not support null address","value",o),a}));return yield this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(N0.getPayload(s.domain,r,s.value))])})}unlock(e){return y(this,null,function*(){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])})}_legacySignMessage(e){return y(this,null,function*(){let r=typeof e=="string"?Ds(e):e;return yield this.provider.send("eth_sign",[this.address.toLowerCase(),Pe(r)])})}},Sp=class t extends w2{#e;#t;#r;#n;#i;#o;#s;#a(){if(this.#n)return;let e=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");this.#n=setTimeout(()=>{this.#n=null;let r=this.#r;for(this.#r=[];r.length;){let n=[r.shift()];for(;r.length&&n.length!==this.#e.batchMaxCount;)if(n.push(r.shift()),JSON.stringify(n.map(s=>s.payload)).length>this.#e.batchMaxSize){r.unshift(n.pop());break}y(this,null,function*(){let i=n.length===1?n[0].payload:n.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{let s=yield this._send(i);this.emit("debug",{action:"receiveRpcResult",result:s});for(let{resolve:o,reject:a,payload:c}of n){if(this.destroyed){a(Fr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:c.method}));continue}let u=s.filter(d=>d.id===c.id)[0];if(u==null){let d=Fr("missing response for request","BAD_DATA",{value:s,info:{payload:c}});this.emit("error",d),a(d);continue}if("error"in u){a(this.getRpcError(c,u));continue}o(u.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(let{reject:o}of n)o(s)}})}},e)}constructor(e,r){super(e,r),this.#t=1,this.#e=Object.assign({},OLe,r||{}),this.#r=[],this.#n=null,this.#o=null,this.#s=null;{let i=null,s=new Promise(o=>{i=o});this.#i={promise:s,resolve:i}}let n=this._getOption("staticNetwork");typeof n=="boolean"?(K(!n||e!=="any","staticNetwork cannot be used on special network 'any'","options",r),n&&e!=null&&(this.#o=ro.from(e))):n&&(K(e==null||n.matches(e),"staticNetwork MUST match network object","options",r),this.#o=n)}_getOption(e){return this.#e[e]}get _network(){return oe(this.#o,"network is not available yet","NETWORK_ERROR"),this.#o}_perform(e){return y(this,null,function*(){if(e.method==="call"||e.method==="estimateGas"){let n=e.transaction;if(n&&n.type!=null&&Me(n.type)&&n.maxFeePerGas==null&&n.maxPriorityFeePerGas==null){let i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},n,{type:void 0})}))}}let r=this.getRpcRequest(e);return r!=null?yield this.send(r.method,r.args):rs(t.prototype,this,"_perform").call(this,e)})}_detectNetwork(){return y(this,null,function*(){let e=this._getOption("staticNetwork");if(e)if(e===!0){if(this.#o)return this.#o}else return e;return this.#s?yield this.#s:this.ready?(this.#s=y(this,null,function*(){try{let r=ro.from(Me(yield this.send("eth_chainId",[])));return this.#s=null,r}catch(r){throw this.#s=null,r}}),yield this.#s):(this.#s=y(this,null,function*(){let r={id:this.#t++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let n;try{n=(yield this._send(r))[0],this.#s=null}catch(i){throw this.#s=null,this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:n}),"result"in n)return ro.from(Me(n.result));throw this.getRpcError(r,n)}),yield this.#s)})}_start(){this.#i==null||this.#i.resolve==null||(this.#i.resolve(),this.#i=null,y(this,null,function*(){for(;this.#o==null&&!this.destroyed;)try{this.#o=yield this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Fr("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),yield NLe(1e3)}this.#a()}))}_waitUntilReady(){return y(this,null,function*(){if(this.#i!=null)return yield this.#i.promise})}_getSubscriber(e){return e.type==="pending"?new d8(this):e.type==="event"?this._getOption("polling")?new Cd(this,e.filter):new f8(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new Fu("orphan"):super._getSubscriber(e)}get ready(){return this.#i==null}getRpcTransaction(e){let r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(n=>{if(e[n]==null)return;let i=n;n==="gasLimit"&&(i="gas"),r[i]=mc(Me(e[n],`tx.${n}`))}),["from","to","data"].forEach(n=>{e[n]!=null&&(r[n]=Pe(e[n]))}),e.accessList&&(r.accessList=Yo(e.accessList)),r}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[V0(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[V0(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[V0(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[V0(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(V0):e.filter.address=V0(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,r){let{method:n}=e,{error:i}=r;if(n==="eth_estimateGas"&&i.message){let a=i.message;if(!a.match(/revert/i)&&a.match(/insufficient funds/i))return Fr("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if(n==="eth_call"||n==="eth_estimateGas"){let a=eP(i),c=bd.getBuiltinCallException(n==="eth_call"?"call":"estimateGas",e.params[0],a?a.data:null);return c.info={error:i,payload:e},c}let s=JSON.stringify(MLe(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return Fr("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:i}});if(n==="eth_sendRawTransaction"||n==="eth_sendTransaction"){let a=e.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return Fr("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a,info:{error:i}});if(s.match(/nonce/i)&&s.match(/too low/i))return Fr("nonce has already been used","NONCE_EXPIRED",{transaction:a,info:{error:i}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return Fr("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a,info:{error:i}});if(s.match(/only replay-protected/i))return Fr("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:a,info:{error:i}}})}let o=!!s.match(/the method .* does not exist/i);return o||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(o=!0),o?Fr("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):Fr("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,r){if(this.destroyed)return Promise.reject(Fr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));let n=this.#t++,i=new Promise((s,o)=>{this.#r.push({resolve:s,reject:o,payload:{method:e,params:r,id:n,jsonrpc:"2.0"}})});return this.#a(),i}getSigner(e){return y(this,null,function*(){e==null&&(e=0);let r=this.send("eth_accounts",[]);if(typeof e=="number"){let i=yield r;if(e>=i.length)throw new Error("no such account");return new Ap(this,i[e])}let{accounts:n}=yield ui({network:this.getNetwork(),accounts:r});e=It(e);for(let i of n)if(It(i)===e)return new Ap(this,e);throw new Error("invalid account")})}listAccounts(){return y(this,null,function*(){return(yield this.send("eth_accounts",[])).map(r=>new Ap(this,r))})}destroy(){this.#n&&(clearTimeout(this.#n),this.#n=null);for(let{payload:e,reject:r}of this.#r)r(Fr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#r=[],super.destroy()}},b2=class extends Sp{#e;constructor(e,r){super(e,r),this.#e=4e3}_getSubscriber(e){let r=super._getSubscriber(e);return tre(r)&&(r.pollingInterval=this.#e),r}get pollingInterval(){return this.#e}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#e=e,this._forEachSubscriber(r=>{tre(r)&&(r.pollingInterval=this.#e)})}},xd=class t extends b2{#e;constructor(e,r,n){e==null&&(e="http://localhost:8545"),super(r,n),typeof e=="string"?this.#e=new Rs(e):this.#e=e.clone()}_getConnection(){return this.#e.clone()}send(e,r){return y(this,null,function*(){return yield this._start(),yield rs(t.prototype,this,"send").call(this,e,r)})}_send(e){return y(this,null,function*(){let r=this._getConnection();r.body=JSON.stringify(e),r.setHeader("content-type","application/json");let n=yield r.send();n.assertOk();let i=n.bodyJson;return Array.isArray(i)||(i=[i]),i})}};function eP(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&nr(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(let e in t){let r=eP(t[e]);if(r)return r}return null}if(typeof t=="string")try{return eP(JSON.parse(t))}catch{}return null}function tP(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(let r in t)tP(t[r],e);if(typeof t=="string")try{return tP(JSON.parse(t),e)}catch{}}}function MLe(t){let e=[];return tP(t,e),e}function PLe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}var rre=PLe().WebSocket;var $0=class{#e;#t;get filter(){return JSON.parse(this.#t)}#r;#n;#i;constructor(e,r){this.#e=e,this.#t=JSON.stringify(r),this.#r=null,this.#n=null,this.#i=null}start(){this.#r=this.#e.send("eth_subscribe",this.filter).then(e=>(this.#e._register(e,this),e))}stop(){this.#r.then(e=>{this.#e.send("eth_unsubscribe",[e])}),this.#r=null}pause(e){oe(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#n=!!e}resume(){this.#n=null}_handleMessage(e){if(this.#r!=null&&this.#n===null){let r=this.#i;r==null?r=this._emit(this.#e,e):r=r.then(()=>y(this,null,function*(){yield this._emit(this.#e,e)})),this.#i=r.then(()=>{this.#i===r&&(this.#i=null)})}}_emit(e,r){return y(this,null,function*(){throw new Error("sub-classes must implemente this; _emit")})}},p8=class extends $0{constructor(e){super(e,["newHeads"])}_emit(e,r){return y(this,null,function*(){e.emit("block",parseInt(r.number))})}},m8=class extends $0{constructor(e){super(e,["newPendingTransactions"])}_emit(e,r){return y(this,null,function*(){e.emit("pending",r)})}},g8=class extends $0{#e;get logFilter(){return JSON.parse(this.#e)}constructor(e,r){super(e,["logs",r]),this.#e=JSON.stringify(r)}_emit(e,r){return y(this,null,function*(){e.emit(this.logFilter,e._wrapLog(r,e._network))})}},E2=class extends Sp{#e;#t;#r;constructor(e,r){let n=Object.assign({},r??{});K(n.batchMaxCount==null||n.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",r),n.batchMaxCount=1,n.staticNetwork==null&&(n.staticNetwork=!0),super(e,n),this.#e=new Map,this.#t=new Map,this.#r=new Map}_getSubscriber(e){switch(e.type){case"close":return new Fu("close");case"block":return new p8(this);case"pending":return new m8(this);case"event":return new g8(this,e.filter);case"orphan":if(e.filter.orphan==="drop-log")return new Fu("drop-log")}return super._getSubscriber(e)}_register(e,r){this.#t.set(e,r);let n=this.#r.get(e);if(n){for(let i of n)r._handleMessage(i);this.#r.delete(e)}}_send(e){return y(this,null,function*(){K(!Array.isArray(e),"WebSocket does not support batch send","payload",e);let r=new Promise((n,i)=>{this.#e.set(e.id,{payload:e,resolve:n,reject:i})});return yield this._waitUntilReady(),yield this._write(JSON.stringify(e)),[yield r]})}_processMessage(e){return y(this,null,function*(){let r=JSON.parse(e);if(r&&typeof r=="object"&&"id"in r){let n=this.#e.get(r.id);if(n==null){this.emit("error",Fr("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:r}));return}this.#e.delete(r.id),n.resolve(r)}else if(r&&r.method==="eth_subscription"){let n=r.params.subscription,i=this.#t.get(n);if(i)i._handleMessage(r.params.result);else{let s=this.#r.get(n);s==null&&(s=[],this.#r.set(n,s)),s.push(r.params.result)}}else{this.emit("error",Fr("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:r}));return}})}_write(e){return y(this,null,function*(){throw new Error("sub-classes must override this")})}};var _2=class t extends E2{#e;#t;get websocket(){if(this.#t==null)throw new Error("websocket closed");return this.#t}constructor(e,r,n){super(r,n),typeof e=="string"?(this.#e=()=>new rre(e),this.#t=this.#e()):typeof e=="function"?(this.#e=e,this.#t=e()):(this.#e=null,this.#t=e),this.websocket.onopen=()=>y(this,null,function*(){try{yield this._start(),this.resume()}catch(i){console.log("failed to start WebsocketProvider",i)}}),this.websocket.onmessage=i=>{this._processMessage(i.data)}}_write(e){return y(this,null,function*(){this.websocket.send(e)})}destroy(){return y(this,null,function*(){this.#t!=null&&(this.#t.close(),this.#t=null),rs(t.prototype,this,"destroy").call(this)})}};var C2="84842078b09946638c03157f83405213";function kLe(t){switch(t){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}K(!1,"unsupported network","network",t)}var x2=class extends _2{projectId;projectSecret;constructor(e,r){let n=new Dp(e,r),i=n._getConnection();oe(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});let s=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(s,e),ke(this,{projectId:n.projectId,projectSecret:n.projectSecret})}isCommunityResource(){return this.projectId===C2}},Dp=class t extends xd{projectId;projectSecret;constructor(e,r,n){e==null&&(e="mainnet");let i=ro.from(e);r==null&&(r=C2),n==null&&(n=null);let s=t.getRequest(i,r,n);super(s,i,{staticNetwork:i}),ke(this,{projectId:r,projectSecret:n})}_getProvider(e){try{return new t(e,this.projectId,this.projectSecret)}catch{}return super._getProvider(e)}isCommunityResource(){return this.projectId===C2}static getWebSocketProvider(e,r){return new x2(e,r)}static getRequest(e,r,n){r==null&&(r=C2),n==null&&(n=null);let i=new Rs(`https://${kLe(e.name)}/v3/${r}`);return i.allowGzip=!0,n&&i.setCredentials("",n),r===C2&&(i.retryFunc=(s,o,a)=>y(this,null,function*(){return XM("InfuraProvider"),!0})),i}};var q0=class t extends b2{#e;constructor(e,r){K(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(r,{batchMaxCount:1}),this.#e=(n,i)=>y(this,null,function*(){let s={method:n,params:i};this.emit("debug",{action:"sendEip1193Request",payload:s});try{let o=yield e.request(s);return this.emit("debug",{action:"receiveEip1193Result",result:o}),o}catch(o){let a=new Error(o.message);throw a.code=o.code,a.data=o.data,a.payload=s,this.emit("debug",{action:"receiveEip1193Error",error:a}),a}})}send(e,r){return y(this,null,function*(){return yield this._start(),yield rs(t.prototype,this,"send").call(this,e,r)})}_send(e){return y(this,null,function*(){K(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{let r=yield this.#e(e.method,e.params||[]);return[{id:e.id,result:r}]}catch(r){return[{id:e.id,error:{code:r.code,data:r.data,message:r.message}}]}})}getRpcError(e,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(e,r)}hasSigner(e){return y(this,null,function*(){e==null&&(e=0);let r=yield this.send("eth_accounts",[]);return typeof e=="number"?r.length>e:(e=e.toLowerCase(),r.filter(n=>n.toLowerCase()===e).length!==0)})}getSigner(e){return y(this,null,function*(){if(e==null&&(e=0),!(yield this.hasSigner(e)))try{yield this.#e("eth_requestAccounts",[])}catch(r){let n=r.payload;throw this.getRpcError(n,{id:n.id,error:r})}return yield rs(t.prototype,this,"getSigner").call(this,e)})}};var gr={WALLET_ID:"@w3m/wallet_id",ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3};var Ii={getCaipDefaultChain(t){if(t)return{id:`${nt.EIP155}:${t.chainId}`,name:t.name,imageId:ji.EIP155NetworkImageIds[t.chainId]}},hexStringToNumber(t){let e=t.startsWith("0x")?t.slice(2):t;return parseInt(e,16)},numberToHexString(t){return`0x${t.toString(16)}`},getUserInfo(t){return y(this,null,function*(){let[e,r]=yield Promise.all([Ii.getAddress(t),Ii.getChainId(t)]);return{chainId:r,address:e}})},getChainId(t){return y(this,null,function*(){let e=yield t.request({method:"eth_chainId"});return Number(e)})},getAddress(t){return y(this,null,function*(){let[e]=yield t.request({method:"eth_accounts"});return e})},addEthereumChain(t,e){return y(this,null,function*(){yield t.request({method:"wallet_addEthereumChain",params:[{chainId:Ii.numberToHexString(e.chainId),rpcUrls:[e.rpcUrl],chainName:e.name,nativeCurrency:{name:e.currency,decimals:18,symbol:e.currency},blockExplorerUrls:[e.explorerUrl],iconUrls:[ji.EIP155NetworkImageIds[e.chainId]]}]})})}};var Os=EU({provider:void 0,providerType:void 0,address:void 0,chainId:void 0,isConnected:!1}),Re={state:Os,subscribeKey(t,e){return xU(Os,t,e)},subscribe(t){return _U(Os,()=>t(Os))},setProvider(t){t&&(Os.provider=CU(t))},setProviderType(t){Os.providerType=t},setAddress(t){Os.address=t},setChainId(t){Os.chainId=t},setIsConnected(t){Os.isConnected=t},setError(t){Os.error=t},reset(){Os.provider=void 0,Os.address=void 0,Os.chainId=void 0,Os.providerType=void 0,Os.isConnected=!1,Os.error=void 0}};var y8=class t extends zw{constructor(e){let m=e,{ethersConfig:r,siweConfig:n,chains:i,defaultChain:s,tokens:o,chainImages:a,_sdkVersion:c}=m,u=Ay(m,["ethersConfig","siweConfig","chains","defaultChain","tokens","chainImages","_sdkVersion"]);if(!r)throw new Error("web3modal:constructor - ethersConfig is undefined");if(!u.projectId)throw new Error("web3modal:constructor - projectId is undefined");let d={switchCaipNetwork:w=>y(this,null,function*(){let _=Dy.caipNetworkIdToNumber(w?.id);if(_)try{Re.setError(void 0),yield this.switchNetwork(_)}catch(C){throw Re.setError(C),new Error("networkControllerClient:switchCaipNetwork - unable to switch chain")}}),getApprovedCaipNetworksData:()=>y(this,null,function*(){return new Promise(w=>y(this,null,function*(){if(localStorage.getItem(gr.WALLET_ID)?.includes(nt.WALLET_CONNECT_CONNECTOR_ID)){let C=yield this.getWalletConnectProvider();if(!C)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");let A=C.signer?.session?.namespaces,R=A?.[nt.EIP155]?.methods,L=A?.[nt.EIP155]?.chains,U={supportsAllNetworks:R?.includes(nt.ADD_CHAIN_METHOD)??!1,approvedCaipNetworkIds:L};w(U)}else w({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})}))})},h={connectWalletConnect:w=>y(this,null,function*(){let _=yield this.getWalletConnectProvider();if(!_)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");_.on("display_uri",C=>{w(C)}),yield _.connect(),yield this.setWalletConnectProvider()}),connectExternal:A=>y(this,[A],function*({id:w,info:_,provider:C}){if(w===nt.INJECTED_CONNECTOR_ID){let R=r.injected;if(!R)throw new Error("connectionControllerClient:connectInjected - provider is undefined");try{Re.setError(void 0),yield R.request({method:"eth_requestAccounts"}),this.setInjectedProvider(r)}catch(L){Re.setError(L)}}else if(w===nt.EIP6963_CONNECTOR_ID&&_&&C)try{Re.setError(void 0),yield C.request({method:"eth_requestAccounts"}),this.setEIP6963Provider(C,_.name)}catch(R){Re.setError(R)}else if(w===nt.COINBASE_CONNECTOR_ID){let R=r.coinbase;if(!R)throw new Error("connectionControllerClient:connectCoinbase - connector is undefined");try{Re.setError(void 0),yield R.request({method:"eth_requestAccounts"}),this.setCoinbaseProvider(r)}catch(L){Re.setError(L)}}else w===nt.EMAIL_CONNECTOR_ID&&this.setEmailProvider()}),checkInstalled(w){return w?r.injected&&!window?.ethereum?!1:w.some(_=>!!window.ethereum?.[String(_)]):!!window.ethereum},disconnect:()=>y(this,null,function*(){let w=Re.state.provider,_=Re.state.providerType;localStorage.removeItem(gr.WALLET_ID),Re.reset(),n?.options?.signOutOnDisconnect&&(yield n.signOut()),_===nt.WALLET_CONNECT_CONNECTOR_ID?(yield w.disconnect(),w?.emit("disconnect")):_!==nt.EMAIL_CONNECTOR_ID?w?.emit("disconnect"):this.emailProvider?.disconnect(),w?.emit("disconnect")}),signMessage:w=>y(this,null,function*(){let _=Re.state.provider;if(!_)throw new Error("connectionControllerClient:signMessage - provider is undefined");return yield _.request({method:"personal_sign",params:[w,this.getAddress()]})})};super(B({networkControllerClient:d,connectionControllerClient:h,siweControllerClient:n,defaultChain:Ii.getCaipDefaultChain(s),tokens:Dy.getCaipTokens(o),_sdkVersion:c??`html-ethers-${nt.VERSION}`},u)),this.hasSyncedConnectedAccount=!1,this.EIP6963Providers=[],this.options=void 0,this.options=e,this.metadata=r.metadata,this.projectId=u.projectId,this.chains=i,this.createProvider(),Re.subscribeKey("address",()=>{this.syncAccount()}),Re.subscribeKey("chainId",()=>{this.syncNetwork(a)}),this.syncRequestedNetworks(i,a),this.syncConnectors(r),r.EIP6963&&typeof window<"u"&&(this.listenConnectors(r.EIP6963),this.checkActive6963Provider()),r.email&&this.syncEmailConnector(u.projectId),r.injected&&this.checkActiveInjectedProvider(r),r.coinbase&&this.checkActiveCoinbaseProvider(r)}getState(){let e=super.getState();return _e(B({},e),{selectedNetworkId:Dy.caipNetworkIdToNumber(e.selectedNetworkId)})}subscribeState(e){return super.subscribeState(r=>e(_e(B({},r),{selectedNetworkId:Dy.caipNetworkIdToNumber(r.selectedNetworkId)})))}setAddress(e){let r=e?It(e):void 0;Re.setAddress(r)}getAddress(){let{address:e}=Re.state;return e?It(e):void 0}getError(){return Re.state.error}getChainId(){return Re.state.chainId}getIsConnected(){return Re.state.isConnected}getWalletProvider(){return Re.state.provider}getWalletProviderType(){return Re.state.providerType}subscribeProvider(e){return Re.subscribe(e)}disconnect(){return y(this,null,function*(){let{provider:e,providerType:r}=Re.state;if(localStorage.removeItem(gr.WALLET_ID),Re.reset(),r==="injected"||r==="eip6963")e?.emit("disconnect");else{let n=e;if(n)try{Re.setError(void 0),yield n.disconnect()}catch(i){Re.setError(i)}}})}createProvider(){return!this.walletConnectProviderInitPromise&&typeof window<"u"&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider()),this.walletConnectProviderInitPromise}initWalletConnectProvider(){return y(this,null,function*(){let e={projectId:this.projectId,showQrModal:!1,rpcMap:this.chains?this.chains.reduce((r,n)=>(r[n.chainId]=n.rpcUrl,r),{}):{},optionalChains:[...this.chains.map(r=>r.chainId)],metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]}};this.walletConnectProvider=yield X6.init(e),yield this.checkActiveWalletConnectProvider()})}getWalletConnectProvider(){return y(this,null,function*(){if(!this.walletConnectProvider)try{Re.setError(void 0),yield this.createProvider()}catch(e){Re.setError(e)}return this.walletConnectProvider})}syncRequestedNetworks(e,r){let n=e?.map(i=>({id:`${nt.EIP155}:${i.chainId}`,name:i.name,imageId:ji.EIP155NetworkImageIds[i.chainId],imageUrl:r?.[i.chainId]}));this.setRequestedCaipNetworks(n??[])}checkActiveWalletConnectProvider(){return y(this,null,function*(){let e=yield this.getWalletConnectProvider(),r=localStorage.getItem(gr.WALLET_ID);e&&r===nt.WALLET_CONNECT_CONNECTOR_ID&&(yield this.setWalletConnectProvider())})}checkActiveInjectedProvider(e){let r=e.injected,n=localStorage.getItem(gr.WALLET_ID);r&&n===nt.INJECTED_CONNECTOR_ID&&(this.setInjectedProvider(e),this.watchInjected(e))}checkActiveCoinbaseProvider(e){let r=e.coinbase,n=localStorage.getItem(gr.WALLET_ID);r&&n===nt.COINBASE_CONNECTOR_ID&&(r._addresses&&r._addresses?.length>0?(this.setCoinbaseProvider(e),this.watchCoinbase(e)):(localStorage.removeItem(gr.WALLET_ID),Re.reset()))}checkActive6963Provider(){let e=window?.localStorage.getItem(gr.WALLET_ID);if(e){let r=this.EIP6963Providers.find(n=>n.name===e);r&&this.setEIP6963Provider(r.provider,r.name)}}setWalletConnectProvider(){return y(this,null,function*(){window?.localStorage.setItem(gr.WALLET_ID,nt.WALLET_CONNECT_CONNECTOR_ID);let e=yield this.getWalletConnectProvider();e&&(Re.setChainId(e.chainId),Re.setProviderType("walletConnect"),Re.setProvider(e),Re.setIsConnected(!0),this.setAddress(e.accounts?.[0]),this.watchWalletConnect())})}setInjectedProvider(e){return y(this,null,function*(){window?.localStorage.setItem(gr.WALLET_ID,nt.INJECTED_CONNECTOR_ID);let r=e.injected;if(r){let{address:n,chainId:i}=yield Ii.getUserInfo(r);n&&i&&(Re.setChainId(i),Re.setProviderType("injected"),Re.setProvider(e.injected),Re.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}})}setEIP6963Provider(e,r){return y(this,null,function*(){if(window?.localStorage.setItem(gr.WALLET_ID,r),e){let{address:n,chainId:i}=yield Ii.getUserInfo(e);n&&i&&(Re.setChainId(i),Re.setProviderType("eip6963"),Re.setProvider(e),Re.setIsConnected(!0),this.setAddress(n),this.watchEIP6963(e))}})}setCoinbaseProvider(e){return y(this,null,function*(){window?.localStorage.setItem(gr.WALLET_ID,nt.COINBASE_CONNECTOR_ID);let r=e.coinbase;if(r){let{address:n,chainId:i}=yield Ii.getUserInfo(r);n&&i&&(Re.setChainId(i),Re.setProviderType("coinbaseWallet"),Re.setProvider(e.coinbase),Re.setIsConnected(!0),this.setAddress(n),this.watchCoinbase(e))}})}initSmartAccount(e){return y(this,null,function*(){if(!this.emailProvider||!this.options?.enableSmartAccounts)return{isDeployed:!1};let{smartAccountEnabledNetworks:r}=yield this.emailProvider.getSmartAccountEnabledNetworks();return r.includes(e)?yield this.emailProvider.initSmartAccount():{isDeployed:!1}})}setEmailProvider(){return y(this,null,function*(){if(window?.localStorage.setItem(gr.WALLET_ID,nt.EMAIL_CONNECTOR_ID),this.emailProvider){let{address:e,chainId:r}=yield this.emailProvider.connect();if(rs(t.prototype,this,"setLoading").call(this,!1),e&&r){Re.setChainId(r),Re.setProviderType(nt.EMAIL_CONNECTOR_ID),Re.setProvider(this.emailProvider),Re.setIsConnected(!0);let{isDeployed:n,address:i}=yield this.initSmartAccount(r);this.setSmartAccountDeployed(n),n&&i?Re.setAddress(i):Re.setAddress(e),this.watchEmail(),this.watchModal()}}})}watchWalletConnect(){return y(this,null,function*(){let e=yield this.getWalletConnectProvider();function r(){localStorage.removeItem(gr.WALLET_ID),Re.reset(),e?.removeListener("disconnect",r),e?.removeListener("accountsChanged",i),e?.removeListener("chainChanged",n)}function n(s){if(s){let o=Ii.hexStringToNumber(s);Re.setChainId(o)}}let i=s=>y(this,null,function*(){s.length>0&&(yield this.setWalletConnectProvider())});e&&(e.on("disconnect",r),e.on("accountsChanged",i),e.on("chainChanged",n))})}watchInjected(e){let r=e.injected;function n(){localStorage.removeItem(gr.WALLET_ID),Re.reset(),r?.removeListener("disconnect",n),r?.removeListener("accountsChanged",i),r?.removeListener("chainChanged",s)}function i(o){let a=o?.[0];a?Re.setAddress(It(a)):(localStorage.removeItem(gr.WALLET_ID),Re.reset())}function s(o){if(o){let a=typeof o=="string"?Ii.hexStringToNumber(o):Number(o);Re.setChainId(a)}}r&&(r.on("disconnect",n),r.on("accountsChanged",i),r.on("chainChanged",s))}watchEIP6963(e){function r(){localStorage.removeItem(gr.WALLET_ID),Re.reset(),e.removeListener("disconnect",r),e.removeListener("accountsChanged",n),e.removeListener("chainChanged",i)}function n(s){let o=s?.[0];o?Re.setAddress(It(o)):(localStorage.removeItem(gr.WALLET_ID),Re.reset())}function i(s){if(s){let o=typeof s=="string"?Ii.hexStringToNumber(s):Number(s);Re.setChainId(o)}}e&&(e.on("disconnect",r),e.on("accountsChanged",n),e.on("chainChanged",i))}watchCoinbase(e){let r=e.coinbase,n=localStorage.getItem(gr.WALLET_ID);function i(){localStorage.removeItem(gr.WALLET_ID),Re.reset(),r?.removeListener("disconnect",i),r?.removeListener("accountsChanged",s),r?.removeListener("chainChanged",o)}function s(a){let c=a?.[0];c?Re.setAddress(It(c)):(localStorage.removeItem(gr.WALLET_ID),Re.reset())}function o(a){if(a&&n===nt.COINBASE_CONNECTOR_ID){let c=Number(a);Re.setChainId(c)}}r&&(r.on("disconnect",i),r.on("accountsChanged",s),r.on("chainChanged",o))}watchEmail(){this.emailProvider&&(this.emailProvider.onRpcRequest(e=>{if(Gn.checkIfRequestExists(e))Gn.checkIfRequestIsAllowed(e)||super.open({view:"ApproveTransaction"});else{this.emailProvider?.rejectRpcRequest(),super.open();let r=Gn.getRequestMethod(e);console.error(Qc.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:r}),setTimeout(()=>{this.showErrorMessage(Qc.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300)}}),this.emailProvider.onRpcResponse(()=>{super.close()}),this.emailProvider.onNotConnected(()=>{this.setIsConnected(!1),super.setLoading(!1)}),this.emailProvider.onIsConnected(()=>{super.setLoading(!1)}))}watchModal(){this.emailProvider&&this.subscribeState(e=>{e.open||this.emailProvider?.rejectRpcRequest()})}syncAccount(){return y(this,null,function*(){let e=Re.state.address,r=Re.state.chainId,n=Re.state.isConnected;if(this.resetAccount(),n&&e&&r){let i=`${nt.EIP155}:${r}:${e}`;this.setIsConnected(n),this.setCaipAddress(i),yield Promise.all([this.syncProfile(e),this.syncBalance(e),this.fetchTokenBalance(),this.getApprovedCaipNetworksData()]),this.hasSyncedConnectedAccount=!0}else!n&&this.hasSyncedConnectedAccount&&(this.resetWcConnection(),this.resetNetwork())})}syncNetwork(e){return y(this,null,function*(){let r=Re.state.address,n=Re.state.chainId,i=Re.state.isConnected;if(this.chains){let s=this.chains.find(o=>o.chainId===n);if(s){let o=`${nt.EIP155}:${s.chainId}`;if(this.setCaipNetwork({id:o,name:s.name,imageId:ji.EIP155NetworkImageIds[s.chainId],imageUrl:e?.[s.chainId]}),i&&r){let a=`${nt.EIP155}:${n}:${r}`;if(this.setCaipAddress(a),s.explorerUrl){let c=`${s.explorerUrl}/address/${r}`;this.setAddressExplorerUrl(c)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&(yield this.syncProfile(r),yield this.syncBalance(r))}}else i&&this.setCaipNetwork({id:`${nt.EIP155}:${n}`})}})}syncProfile(e){return y(this,null,function*(){if(Re.state.chainId===1){let n=new Dp("mainnet"),i=yield n.lookupAddress(e),s=yield n.getAvatar(e);i&&this.setProfileName(i),s&&this.setProfileImage(s)}else this.setProfileName(null),this.setProfileImage(null)})}syncBalance(e){return y(this,null,function*(){let r=Re.state.chainId;if(r&&this.chains){let n=this.chains.find(i=>i.chainId===r);if(n){let i=new xd(n.rpcUrl,{chainId:r,name:n.name});if(i){let s=yield i.getBalance(e),o=lx(s);this.setBalance(o,n.currency)}}}})}switchNetwork(e){return y(this,null,function*(){let r=Re.state.provider,n=Re.state.providerType;if(this.chains){let i=this.chains.find(s=>s.chainId===e);if(n===nt.WALLET_CONNECT_CONNECTOR_ID&&i){let s=r;if(s)try{yield s.request({method:"wallet_switchEthereumChain",params:[{chainId:Ii.numberToHexString(i.chainId)}]}),Re.setChainId(e)}catch(o){if(o.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||o.code===gr.ERROR_CODE_DEFAULT||o?.data?.originalError?.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)yield Ii.addEthereumChain(s,i);else throw new Error("Chain is not supported")}}else if(n===nt.INJECTED_CONNECTOR_ID&&i){let s=r;if(s)try{yield s.request({method:"wallet_switchEthereumChain",params:[{chainId:Ii.numberToHexString(i.chainId)}]}),Re.setChainId(i.chainId)}catch(o){if(o.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||o.code===gr.ERROR_CODE_DEFAULT||o?.data?.originalError?.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)yield Ii.addEthereumChain(s,i);else throw new Error("Chain is not supported")}}else if(n===nt.EIP6963_CONNECTOR_ID&&i){let s=r;if(s)try{yield s.request({method:"wallet_switchEthereumChain",params:[{chainId:Ii.numberToHexString(i.chainId)}]}),Re.setChainId(i.chainId)}catch(o){if(o.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||o.code===gr.ERROR_CODE_DEFAULT||o?.data?.originalError?.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)yield Ii.addEthereumChain(s,i);else throw new Error("Chain is not supported")}}else if(n===nt.COINBASE_CONNECTOR_ID&&i){let s=r;if(s)try{yield s.request({method:"wallet_switchEthereumChain",params:[{chainId:Ii.numberToHexString(i.chainId)}]}),Re.setChainId(i.chainId)}catch(o){(o.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||o.code===gr.ERROR_CODE_DEFAULT||o?.data?.originalError?.code===gr.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)&&(yield Ii.addEthereumChain(s,i))}}else if(n===nt.EMAIL_CONNECTOR_ID&&this.emailProvider&&i?.chainId)try{yield this.emailProvider?.switchNetwork(i?.chainId),Re.setChainId(i.chainId)}catch{throw new Error("Switching chain failed")}}})}syncConnectors(e){let r=[],n=ji.ConnectorTypesMap[nt.WALLET_CONNECT_CONNECTOR_ID];if(n&&r.push({id:nt.WALLET_CONNECT_CONNECTOR_ID,explorerId:ji.ConnectorExplorerIds[nt.WALLET_CONNECT_CONNECTOR_ID],imageId:ji.ConnectorImageIds[nt.WALLET_CONNECT_CONNECTOR_ID],imageUrl:this.options?.connectorImages?.[nt.WALLET_CONNECT_CONNECTOR_ID],name:ji.ConnectorNamesMap[nt.WALLET_CONNECT_CONNECTOR_ID],type:n}),e.injected){let i=ji.ConnectorTypesMap[nt.INJECTED_CONNECTOR_ID];i&&r.push({id:nt.INJECTED_CONNECTOR_ID,explorerId:ji.ConnectorExplorerIds[nt.INJECTED_CONNECTOR_ID],imageId:ji.ConnectorImageIds[nt.INJECTED_CONNECTOR_ID],imageUrl:this.options?.connectorImages?.[nt.INJECTED_CONNECTOR_ID],name:ji.ConnectorNamesMap[nt.INJECTED_CONNECTOR_ID],type:i})}e.coinbase&&r.push({id:nt.COINBASE_CONNECTOR_ID,explorerId:ji.ConnectorExplorerIds[nt.COINBASE_CONNECTOR_ID],imageId:ji.ConnectorImageIds[nt.COINBASE_CONNECTOR_ID],imageUrl:this.options?.connectorImages?.[nt.COINBASE_CONNECTOR_ID],name:ji.ConnectorNamesMap[nt.COINBASE_CONNECTOR_ID],type:"EXTERNAL"}),this.setConnectors(r)}syncEmailConnector(e){return y(this,null,function*(){if(typeof window<"u"){this.emailProvider=new Bw(e),this.addConnector({id:nt.EMAIL_CONNECTOR_ID,type:"EMAIL",name:"Email",provider:this.emailProvider}),rs(t.prototype,this,"setLoading").call(this,!0);let r=this.emailProvider.getLoginEmailUsed();rs(t.prototype,this,"setLoading").call(this,r),(yield this.emailProvider.isConnected())?this.setEmailProvider():rs(t.prototype,this,"setLoading").call(this,!1)}})}eip6963EventHandler(e){if(e.detail){let{info:r,provider:n}=e.detail;if(!this.getConnectors().find(o=>o.name===r.name)){let o=ji.ConnectorTypesMap[nt.EIP6963_CONNECTOR_ID];if(o){this.addConnector({id:nt.EIP6963_CONNECTOR_ID,type:o,imageUrl:r.icon??this.options?.connectorImages?.[nt.EIP6963_CONNECTOR_ID],name:r.name,provider:n,info:r});let a={name:r.name,provider:n};this.EIP6963Providers.push(a)}}}}listenConnectors(e){if(typeof window<"u"&&e){let r=this.eip6963EventHandler.bind(this);window.addEventListener(nt.EIP6963_ANNOUNCE_EVENT,r),window.dispatchEvent(new Event(nt.EIP6963_REQUEST_EVENT))}}};var _re=wr(Ere(),1);typeof window<"u"&&(window.Buffer||(window.Buffer=_re.Buffer),window.global||(window.global=window),window.process||(window.process={}),window.process?.env||(window.process={env:{}}));var Wde=wr(qde(),1);function KL(t){let{enableEIP6963:e=!0,enableInjected:r=!0,enableCoinbase:n=!0,enableEmail:i=!1,metadata:s,rpcUrl:o,defaultChainId:a}=t,c,u,d={metadata:s};function h(){if(c)return c;if(!(typeof window>"u")&&window.ethereum)return c=window.ethereum,c}function m(){return u||(typeof window>"u"?void 0:(u=new Wde.CoinbaseWalletSDK({appName:s.name,appLogoUrl:s.icons[0],darkMode:!1,enableMobileWalletLink:!0}).makeWeb3Provider(o,a),u))}return r&&(d.injected=h()),n&&o&&a&&(d.coinbase=m()),e&&(d.EIP6963=!0),i&&(d.email=!0),d}function zde(t){return new y8(_e(B({},t),{_sdkVersion:`html-ethers-${nt.VERSION}`}))}var ia=(()=>{let e=class e{constructor(){this.modal=zde({ethersConfig:KL({metadata:{name:"Layer AI",description:"Layer AI",url:window.location.origin,icons:[]}}),chains:[{chainId:2800,name:"LayerAI",currency:"LAI",explorerUrl:"https://explorer.layerai.org/",rpcUrl:"https://rpc.layerai.org"}],projectId:"5c1eaafda71a57b613f779f7efb14e2f"}),this.providerState$=new er(n=>{n.next({isConnected:this.modal.getIsConnected(),address:this.modal.getAddress(),chainId:this.modal.getChainId(),error:this.modal.getError(),provider:this.modal.getWalletProvider(),providerType:this.modal.getWalletProviderType()}),this.modal.subscribeProvider(i=>{n.next(i)})}).pipe(vf(1)),this.dialogState$=new er(n=>{this.modal.subscribeState(i=>{n.next(i)})}).pipe(vf(1)),this.isDialogOpen$=this.dialogState$.pipe(ft(n=>n.open)),this.isConnected$=this.providerState$.pipe(ft(n=>n.isConnected)),this.provider$=this.providerState$.pipe(ft(n=>n.provider?new q0(n.provider):null),vf(1)),this.signer$=this.provider$.pipe(Dn(n=>n?.getSigner()??mt(null)),vf(1)),this.address$=this.providerState$.pipe(ft(n=>n.address)),this.chainId$=this.providerState$.pipe(ft(n=>n.chainId)),this.balance$=this.provider$.pipe(_i(n=>!!n),Dn(n=>n.getSigner()),Dn(n=>n.provider.getBalance(n.address)))}open(){return this.modal.open()}disconnect(){return this.modal.disconnect()}switchNetwork(n){return this.modal.switchNetwork(n)}ensureConnected(n){return this.isConnected$.pipe(bf(this.isDialogOpen$.pipe(MA((i,s)=>s),BA(1),OA(100))),Dn(i=>i?n:Hm(()=>this.open())))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Gde=(()=>{let e=class e{constructor(n){this.walletConnectService=n}integrate(){this.walletConnectService.open()}};e.\u0275fac=function(i){return new(i||e)(Mr(ia))},e.\u0275cmp=ar({type:e,selectors:[["app-section-1"]],standalone:!0,features:[cr],decls:33,vars:16,consts:[[1,"bg-black","relative","overflow-clip","min-h-dvh","flex","flex-col"],[1,"absolute","top-0","bottom-0","left-0","right-0"],["autoplay","","muted","","loop","","src","assets/videos/section-1-background.mp4",1,"h-full","w-full","object-cover",3,"volume"],[1,"absolute","top-[-29px]","left-1/2","-translate-x-1/2","container"],[1,"absolute","left-[505px]"],[1,"absolute","top-[106px]","left-1/2","-translate-x-1/2","container"],[1,"absolute","left-[326px]"],[1,"relative","container","pt-14"],[1,"flex","justify-between","items-center","flex-wrap"],["src","assets/icons/header-logo.svg",1,"mb-4","mr-4"],[1,"px-8","py-4","mb-4","border","border-white","rounded-full","text-white","text-base/[1.125]","font-medium","font-Guardian-Sans",3,"click"],[1,"mt-28","sm:px-16"],[1,"font-ABeeZee","text-white","text-sm"],[1,"mt-9","max-w-[616px]","text-white"],[1,"mt-12","max-w-[403px]","text-white","text-lg","font-Guardian-Sans"],[1,"relative","mt-auto","px-4","py-8","flex","flex-col","items-center","gap-7","bg-[linear-gradient(0deg,#000000_50.16%,rgba(0,0,0,0.24)_100%)]"],[1,"text-white","text-lg/[1]","font-medium","font-Guardian-Sans"],[1,"flex","items-center","justify-center","flex-wrap","gap-20"],["src","assets/icons/yahoo-finance.svg"],["src","assets/icons/decrypt.svg"],["src","assets/icons/the-block.svg"],["src","assets/icons/coindesk.svg"],["src","assets/icons/bitcoin-com.svg"]],template:function(i,s){i&1&&(we(0,"div",0)(1,"div",1),rt(2,"video",2),ve(),we(3,"div",3),rt(4,"app-dotted-circles",4),ve(),we(5,"div",5),rt(6,"app-shadow-ellipse",6),ve(),we(7,"div",7)(8,"div",8),rt(9,"img",9),we(10,"button",10),zn("click",function(){return s.integrate()}),je(11),et(12,"transloco"),ve()(),we(13,"div",11)(14,"div",12),je(15),et(16,"transloco"),ve(),we(17,"h1",13),je(18),et(19,"transloco"),ve(),we(20,"h2",14),je(21),et(22,"transloco"),ve()()(),we(23,"div",15)(24,"span",16),je(25),et(26,"transloco"),ve(),we(27,"div",17),rt(28,"img",18)(29,"img",19)(30,"img",20)(31,"img",21)(32,"img",22),ve()()()),i&2&&(Ie(2),Ht("volume",0),Ie(9),Bt(" ",it(12,6,"landingPage.section1.clickToIntegrate")," "),Ie(4),ln(it(16,8,"landingPage.section1.layeraiNetwork")),Ie(3),Bt(" ",it(19,10,"landingPage.section1.title")," "),Ie(3),Bt(" ",it(22,12,"landingPage.section1.subtitle")," "),Ie(4),Bt(" ",it(26,14,"landingPage.section1.asFeaturedIn")," "))},dependencies:[qi,fW,uW],encapsulation:2,changeDetection:0});let t=e;return t})();var TQe=()=>({step:1}),Zde=(()=>{let e=class e{constructor(n){this.walletConnectService=n}openWalletConnect(){this.walletConnectService.open()}};e.\u0275fac=function(i){return new(i||e)(Mr(ia))},e.\u0275cmp=ar({type:e,selectors:[["app-step-1"]],standalone:!0,features:[cr],decls:18,vars:8,consts:[[1,"bg-black","border","border-black/30","relative","h-full"],["width","368","height","368","viewBox","0 0 368 368","fill","none","xmlns","http://www.w3.org/2000/svg",1,"absolute","top-9","right-[60px]"],["d","M367.255 75.4777C367.857 100.925 359.794 124.332 350.063 147.277C345.893 157.103 340.842 166.652 335.699 176.015C332.548 181.762 332.455 186.397 335.977 192.377C350.527 217.129 361.416 243.549 365.957 271.963C368.737 289.437 369.571 307.468 362.621 324.572C352.519 349.463 333.938 363.415 307.34 366.659C276.525 370.414 247.981 361.839 220.178 349.787C210.679 345.662 201.365 340.981 192.376 335.836C186.12 332.266 181.023 332.498 174.86 336.206C150.857 350.622 125.093 360.68 97.4761 365.732C75.5583 369.719 54.0576 369.209 33.9934 357.992C16.8021 348.397 6.74676 333.657 2.6227 314.467C-3.58656 285.637 3.45678 258.521 13.5121 232.008C18.5165 218.89 24.9575 206.282 31.4448 193.814C35.0128 186.954 35.0128 181.809 31.4448 174.392C21.9919 154.368 13.095 133.927 6.23704 112.884C0.166796 94.2502 -2.05739 74.6434 2.20568 54.8512C9.34169 21.6633 35.3835 1.08314 69.9052 0.0633992C98.2639 -0.817284 124.723 7.57243 150.162 19.2994C159.893 23.7955 169.485 28.6624 178.892 33.9002C183.062 36.2178 186.12 36.0324 190.059 33.6221C210.077 21.3389 231.67 12.4857 254.237 6.27459C272.448 1.2686 290.983 -1.92972 310.027 1.73206C346.217 8.68483 366.93 33.3904 367.162 70.0082C367.162 71.8623 367.162 73.7164 367.162 75.5704L367.255 75.4777ZM318.322 183.199C316.283 179.816 314.568 176.571 312.483 173.558C280.047 126.511 240.845 86.2777 192.978 54.6658C185.842 49.9379 180.93 50.4014 174.211 55.083C127.225 87.7146 87.5135 127.438 55.0307 174.531C50.2116 181.484 50.397 186.444 55.0307 193.258C86.7258 240.583 126.437 279.796 173.146 312.057C183.34 319.103 184.035 318.871 194.832 311.918C224.303 292.96 249.881 269.413 273.143 243.503C287.924 227.094 300.714 208.832 314.244 191.311C316.005 189.04 316.839 186.119 318.276 183.153L318.322 183.199ZM325.365 174.485C330.833 163.639 335.467 155.295 339.267 146.628C351.268 118.956 360.86 90.8665 356.134 59.7645C352.89 38.1182 338.571 20.3191 317.58 14.2007C301.548 9.51917 285.422 10.2608 269.25 13.32C242.93 18.326 218.603 28.338 195.063 43.2633C246.545 78.7687 289.685 120.856 325.412 174.531L325.365 174.485ZM44.5584 196.734C42.5195 197.754 41.7781 197.985 41.2684 198.449C40.4807 199.191 39.6929 200.025 39.1369 200.998C21.6675 233.769 8.32227 267.745 11.8439 305.8C13.6975 325.684 22.7796 341.861 41.8244 350.575C55.5868 356.879 70.1368 358.965 85.1503 357.111C114.621 353.449 141.729 342.974 167.492 328.605C169.207 327.631 170.551 326.055 172.729 324.201C121.386 289.576 79.4044 246.933 44.512 196.688L44.5584 196.734ZM325.319 194.231C289.639 246.794 247.101 289.345 195.62 324.294C198.91 326.936 200.624 328.929 202.756 329.903C217.259 336.392 231.578 343.576 246.545 348.768C262.578 354.33 279.167 358.455 296.543 357.714C335.004 356.091 359.98 330.088 357.802 292.311C356.504 269.321 350.944 246.933 341.12 225.889C336.486 215.97 331.343 206.282 325.273 194.185L325.319 194.231ZM43.3073 173.558C78.8947 120.902 121.34 77.888 174.443 42.7997C165.315 38.0718 158.318 34.0856 151.043 30.7946C124.584 18.7895 97.5688 9.51921 67.7736 10.9098C36.3566 12.393 13.3731 34.132 11.5659 64.1215C9.20267 103.474 22.826 137.96 43.3536 173.558H43.3073Z","fill","white","fill-opacity","0.05"],["d","M98 183.221C146.212 174.429 175.112 146.611 183.958 98C193.637 147.123 222.12 175.871 272 183.686C223.927 193.687 193.221 220.109 185.07 271C184.328 268.767 183.356 266.534 182.893 264.208C178.956 245.322 171.639 228.157 158.115 214.016C143.711 198.99 125.834 190.896 105.781 186.942C103.65 186.524 101.52 186.058 99.3894 185.547C99.1578 185.5 99.0652 184.988 98 183.221Z","fill","white","fill-opacity","0.05"],[1,"relative","h-full","flex","flex-col","gap-[14px]"],[1,"px-7","py-6","font-Guardian-Sans","text-lg","text-white","border-b","border-b-white/25"],[1,"mt-auto","px-12","font-Guardian-Sans","text-[42px]/[59px]","text-white"],[1,"px-10","pb-[42px]","flex","gap-7","box-content","h-[145px]"],["href","https://metamask.io/","target","_blank",1,"flex-1","rounded-[7px]","bg-[linear-gradient(black,black),linear-gradient(180deg,#F6851B_0%,#904E10_100%)]","border","border-double","border-transparent","bg-origin-border","[background-clip:content-box,border-box]"],[1,"w-full","h-full","bg-[linear-gradient(105.96deg,rgba(246,133,27,0.26)_6.71%,rgba(246,133,27,0)_97.33%)]","grid","place-items-center"],["src","assets/images/metamask.png"],[1,"flex-1","rounded-[7px]","bg-[linear-gradient(black,black),linear-gradient(180deg,#447EF4_0%,#28498E_100%)]","border","border-double","border-transparent","bg-origin-border","[background-clip:content-box,border-box]",3,"click"],[1,"w-full","h-full","bg-[linear-gradient(211.67deg,rgba(62,121,246,0.28)_11.87%,rgba(66,125,244,0)_80.92%)]","grid","place-items-center"],["src","assets/images/walletconnect.png"]],template:function(i,s){i&1&&(we(0,"div",0),Gc(),we(1,"svg",1),rt(2,"path",2)(3,"path",3),ve(),VH(),we(4,"div",4)(5,"div",5),je(6),et(7,"transloco"),ve(),we(8,"div",6),je(9),et(10,"transloco"),ve(),we(11,"div",7)(12,"a",8)(13,"div",9),rt(14,"img",10),ve()(),we(15,"button",11),zn("click",function(){return s.openWalletConnect()}),we(16,"div",12),rt(17,"img",13),ve()()()()()),i&2&&(Ie(6),Bt(" ",Of(7,2,"landingPage.section2.step",Nf(7,TQe))," "),Ie(3),Bt(" ",it(10,5,"landingPage.section2.downloadOneOfThePopularWeb3Wallets")," "))},dependencies:[qi],encapsulation:2,changeDetection:0});let t=e;return t})();Hc();var NQe=WS;function OQe(t){return!!t[NQe]}var MQe=Symbol("__destroy"),Qde=Symbol("__decoratorApplied");function Xde(t){return typeof t=="string"?Symbol(`__destroy__${t}`):MQe}function PQe(t){t.prototype[Qde]=!0}function ehe(t,e){t[e]||(t[e]=new ii)}function the(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function rhe(t){t instanceof Wn&&t.unsubscribe()}function kQe(t){Array.isArray(t)&&t.forEach(rhe)}function nhe(t,e){return function(){if(t&&t.call(this),the(this,Xde()),e.arrayName&&kQe(this[e.arrayName]),e.checkProperties)for(let r in this)e.blackList?.includes(r)||rhe(this[r])}}function LQe(t,e){t.prototype.ngOnDestroy=nhe(t.prototype.ngOnDestroy,e)}function FQe(t,e){let r=t.\u0275pipe;r.onDestroy=nhe(r.onDestroy,e)}function $d(t={}){return e=>{OQe(e)?FQe(e,t):LQe(e,t),PQe(e)}}var Kde=7,Jde=Symbol("CheckerHasBeenSet");function BQe(t,e){t[Jde]||UQe()||(Yde(()=>Sn(Promise.resolve()).pipe(jn(()=>{let r;try{r=kV(t)}catch{r=null}let n=r?.lView;if(n==null)return vs;let i=n[Kde]||(n[Kde]=[]),s=new ii;return i.push(function(){Yde(()=>{s.next(),s.complete()})}),s}),jn(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(jQe(t))})),t[Jde]=!0)}function UQe(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function Yde(t){let e=ic.Zone;return!!e&&typeof e.root?.run=="function"?e.root.run(t):t()}function jQe(t){return`
  The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
  This may happen if the class extends another class decorated with @UntilDestroy().
  The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
  Let's look at the following example:
  @UntilDestroy()
  @Directive()
  export abstract class BaseDirective {}
  @Component({ template: '' })
  export class ConcreteComponent extends BaseDirective implements OnDestroy {
    constructor() {
      super();
      someObservable$.pipe(untilDestroyed(this)).subscribe();
    }
    ngOnDestroy(): void {
      // Some logic here...
    }
  }
  The BaseDirective.ngOnDestroy() will not be called since Angular will call ngOnDestroy()
  on the ConcreteComponent, but not on the BaseDirective.
  One of the solutions is to declare an empty ngOnDestroy method on the BaseDirective:
  @UntilDestroy()
  @Directive()
  export abstract class BaseDirective {
    ngOnDestroy(): void {}
  }
  @Component({ template: '' })
  export class ConcreteComponent extends BaseDirective implements OnDestroy {
    constructor() {
      super();
      someObservable$.pipe(untilDestroyed(this)).subscribe();
    }
    ngOnDestroy(): void {
      // Some logic here...
      super.ngOnDestroy();
    }
  }
  `}var JL=!1;function HQe(t,e,r){let n=t[e];if(JL&&typeof n!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);ehe(t,r),t[e]=function(){n.apply(this,arguments),the(this,r),t[e]=n}}function qd(t,e){return r=>{let n=Xde(e);typeof e=="string"?HQe(t,e,n):(JL&&VQe(t),ehe(t,n));let i=t[n];return JL&&BQe(t,i),r.pipe(bf(i))}}function VQe(t){let e=Object.getPrototypeOf(t);if(!(Qde in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var $Qe=()=>({step:2}),Wd,eI=(Wd=class{constructor(e){this.walletConnectService=e}addLayerAiNetwork(){this.walletConnectService.ensureConnected(this.walletConnectService.switchNetwork(1)).pipe(qd(this)).subscribe()}},Wd.\u0275fac=function(r){return new(r||Wd)(Mr(ia))},Wd.\u0275cmp=ar({type:Wd,selectors:[["app-step-2"]],standalone:!0,features:[cr],decls:16,vars:11,consts:[[1,"bg-black","relative","h-full"],[1,"absolute","left-0","right-0","top-0","bottom-0"],["src","assets/images/section-2-step-2-background.png",1,"w-full","h-full","object-cover","grayscale"],[1,"absolute","left-0","right-0","top-0","bottom-0","bg-white/80"],[1,"relative","h-full","flex","flex-col","gap-[14px]"],[1,"px-7","py-[18px]","flex","items-center","justify-between","border-b","border-b-black/15"],[1,"font-Guardian-Sans","text-lg"],[1,"my-auto","px-[34px]","font-Guardian-Sans","text-[42px]/[59px]"],[1,"-ml-4","px-4","pt-3","pb-1.5","bg-black","rounded-full","text-white","cursor-pointer",3,"click"]],template:function(r,n){r&1&&(we(0,"div",0)(1,"div",1),rt(2,"img",2)(3,"div",3),ve(),we(4,"div",4)(5,"div",5)(6,"span",6),je(7),et(8,"transloco"),ve()(),we(9,"div",7)(10,"span",8),zn("click",function(){return n.addLayerAiNetwork()}),je(11),et(12,"transloco"),ve(),we(13,"span"),je(14),et(15,"transloco"),ve()()()()),r&2&&(Ie(7),Bt(" ",Of(8,3,"landingPage.section2.step",Nf(10,$Qe))," "),Ie(4),ln(it(12,6,"landingPage.section2.clickHere")),Ie(3),Bt(" ",it(15,8,"landingPage.section2.toAddLayerAiNetworkToYourWallet")," "))},dependencies:[qi],encapsulation:2,changeDetection:0}),Wd);eI=jc([$d()],eI);Hc();var qQe=()=>({step:3}),zd,tI=(zd=class{exploreLayerAiProducts(){window.open("https://bridge.layerai.org","_blank")}},zd.\u0275fac=function(r){return new(r||zd)},zd.\u0275cmp=ar({type:zd,selectors:[["app-step-3"]],standalone:!0,features:[cr],decls:13,vars:11,consts:[[1,"bg-[#08D7E9]","relative","h-full"],[1,"relative","h-full","flex","flex-col","gap-[14px]"],[1,"px-7","py-[18px]","flex","items-center","justify-between","border-b","border-b-black/15"],[1,"font-Guardian-Sans","text-lg"],[1,"my-auto","px-[34px]","font-Guardian-Sans","text-[42px]/[59px]"],[1,"-ml-4","px-4","pt-3","pb-1.5","bg-black","rounded-full","text-white","cursor-pointer",3,"click"]],template:function(r,n){r&1&&(we(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),je(4),et(5,"transloco"),ve()(),we(6,"div",4)(7,"span",5),zn("click",function(){return n.exploreLayerAiProducts()}),je(8),et(9,"transloco"),ve(),we(10,"span"),je(11),et(12,"transloco"),ve()()()()),r&2&&(Ie(4),Bt(" ",Of(5,3,"landingPage.section2.step",Nf(10,qQe))," "),Ie(4),ln(it(9,6,"landingPage.section2.clickHere")),Ie(3),Bt(" ",it(12,8,"landingPage.section2.toBridgeAssetsFromEthereum")," "))},dependencies:[qi],encapsulation:2,changeDetection:0}),zd);tI=jc([$d()],tI);Hc();var WQe=(t,e)=>({width:t,height:e}),rI=(()=>{let e=class e{constructor(){this.width=25}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-loader"]],inputs:{width:"width"},standalone:!0,features:[cr],decls:3,vars:4,consts:[["aria-hidden","true","viewBox","0 0 100 101","fill","none","xmlns","http://www.w3.org/2000/svg",1,"mr-2","text-gray-600","animate-spin","fill-white",3,"ngStyle"],["d","M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z","fill","currentColor"],["d","M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z","fill","currentFill"]],template:function(i,s){i&1&&(Gc(),we(0,"svg",0),rt(1,"path",1)(2,"path",2),ve()),i&2&&Ht("ngStyle",b$(1,WQe,s.width+"px",s.width+"px"))},dependencies:[ZD,q$],encapsulation:2,changeDetection:0});let t=e;return t})();var YL=(()=>{var e,r,n;let i=class i{constructor(){Xa(this,e,xe(os));Xa(this,r,xe(Mf));Xa(this,n,xe(Es))}open(o){let a=new sy(Hs(this,r));return a.contentView=T$(o,{elementInjector:nu.create({providers:[{provide:sy,useValue:a}],parent:Hs(this,n)}),environmentInjector:Hs(this,n)}),Hs(this,e).body.appendChild(a.contentView.location.nativeElement),Hs(this,r).attachView(a.contentView.hostView),a}};e=new WeakMap,r=new WeakMap,n=new WeakMap,i.\u0275fac=function(a){return new(a||i)},i.\u0275prov=Xe({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})(),sy=class{#e;constructor(e){this.applicationRef=e}set contentView(e){this.#e=e}get contentView(){if(!this.#e)throw new Error("View is not set");return this.#e}close(){this.applicationRef.detachView(this.contentView.hostView),this.contentView.destroy()}};function GQe(t,e){t&1&&rt(0,"app-loader")}function ZQe(t,e){if(t&1&&(we(0,"a",3),je(1,"Show in explorer"),ve()),t&2){let r=ss();Ht("href",r.txHash(),OV)}}function KQe(t,e){if(t&1&&(we(0,"span",4),je(1),ve()),t&2){let r=ss();Ie(),ln(r.error())}}var oy,Tb,Nb,Gd,Rb=(Gd=class{constructor(){Xa(this,oy,void 0);Xa(this,Tb,void 0);Xa(this,Nb,void 0);w3(this,oy,xe(ia)),w3(this,Tb,xe(sy)),w3(this,Nb,xe(sw)),this.isLoading=Zc(!0),this.error=Zc(null),this.txHash=Zc(null)}ngOnInit(){Hs(this,oy).ensureConnected(Hs(this,oy).address$).pipe(qd(this),Dn(e=>Hs(this,Nb).post("https://1iyeo6jsuh.execute-api.eu-central-1.amazonaws.com/faucet",{address:e}))).subscribe({next:e=>{this.isLoading.set(!1),this.txHash.set("https://explorer.layerai.org/tx/"+e.txHash)},error:e=>{console.log(B({},e)),this.isLoading.set(!1),this.error.set(e.error)}})}close(){Hs(this,Tb).close()}},oy=new WeakMap,Tb=new WeakMap,Nb=new WeakMap,Gd.\u0275fac=function(r){return new(r||Gd)},Gd.\u0275cmp=ar({type:Gd,selectors:[["app-faucet"]],standalone:!0,features:[cr],decls:8,vars:1,consts:[[1,"bg-white","rounded-2xl","p-4","w-96","flex","flex-col","gap-4","items-center"],[1,"self-end",3,"click"],[1,"text-2xl","text-center"],["target","_blank",1,"underline","text-blue-600",3,"href"],[1,"text-red-500"]],template:function(r,n){r&1&&(we(0,"div",0)(1,"button",1),zn("click",function(){return n.close()}),je(2," X "),ve(),we(3,"h2",2),je(4,"Faucet"),ve(),_s(5,GQe,1,0,"app-loader")(6,ZQe,2,1)(7,KQe,2,1),ve()),r&2&&(Ie(5),s_(5,n.isLoading()?5:n.txHash()?6:n.error()?7:-1))},dependencies:[rI],styles:["[_nghost-%COMP%]{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background-color:#0000004d}"],changeDetection:0}),Gd);Rb=jc([$d()],Rb);var JQe=()=>({step:4}),ihe=(()=>{var e,r;let n=class n{constructor(){Xa(this,e,xe(ia));Xa(this,r,xe(YL))}openFaucet(){Hs(this,e).ensureConnected(Hs(this,e).isConnected$).pipe(qd(this),_i(s=>!!s),Fo()).subscribe(()=>{Hs(this,r).open(Rb)})}};e=new WeakMap,r=new WeakMap,n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=ar({type:n,selectors:[["app-step-4"]],standalone:!0,features:[cr],decls:13,vars:11,consts:[[1,"bg-[#EDEDED]","relative","h-full"],[1,"relative","h-full","flex","flex-col","gap-[14px]"],[1,"px-7","py-[18px]","flex","items-center","justify-between","border-b","border-b-black/15"],[1,"font-Guardian-Sans","text-lg"],[1,"my-auto","px-[34px]","font-Guardian-Sans","text-[42px]/[59px]"],[1,"-ml-4","px-4","pt-3","pb-1.5","bg-black","rounded-full","text-white","cursor-pointer",3,"click"]],template:function(o,a){o&1&&(we(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),je(4),et(5,"transloco"),ve()(),we(6,"div",4)(7,"span",5),zn("click",function(){return a.openFaucet()}),je(8),et(9,"transloco"),ve(),we(10,"span"),je(11),et(12,"transloco"),ve()()()()),o&2&&(Ie(4),Bt(" ",Of(5,3,"landingPage.section2.step",Nf(10,JQe))," "),Ie(4),ln(it(9,6,"landingPage.section2.clickHere")),Ie(3),Bt(" ",it(12,8,"landingPage.section2.toGetLai")," "))},dependencies:[qi],encapsulation:2,changeDetection:0});let t=n;return t})();var she=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-section-2"]],standalone:!0,features:[cr],decls:13,vars:8,consts:[[1,"min-h-dvh","border-b","border-b-black/10","flex","flex-col","items-center"],[1,"mt-[89px]","font-ABeeZee","text-sm"],[1,"mt-[26px]","text-center","max-w-[589px]"],[1,"grid","grid-rows-[repeat(4,329px)]","grid-cols-[minmax(0,632px)]","xl:grid-cols-[repeat(2,minmax(600px,632px))]","xl:grid-rows-[repeat(2,329px)]","items-stretch","gap-5","mt-[75px]"]],template:function(i,s){i&1&&(we(0,"div",0)(1,"div",1),je(2),et(3,"uppercase"),et(4,"transloco"),ve(),we(5,"h1",2),je(6),et(7,"transloco"),ve(),we(8,"div",3),rt(9,"app-step-1")(10,"app-step-2")(11,"app-step-3")(12,"app-step-4"),ve()()),i&2&&(Ie(2),Bt(" ",it(3,2,it(4,4,"landingPage.section2.layeraiNetwork"))," "),Ie(4),Bt(" ",it(7,6,"landingPage.section2.title")," "))},dependencies:[qi,Pf,Zde,eI,tI,ihe],encapsulation:2,changeDetection:0});let t=e;return t})();var ohe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-ecosystem"]],standalone:!0,features:[cr],decls:37,vars:0,consts:[["width","606","height","368","viewBox","0 0 606 368","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","148","height","67","transform","translate(159)","fill","#14FFFC",2,"fill","#14FFFC","fill","color(display-p3 0.0784 1.0000 0.9882)","fill-opacity","1"],["d","M213.817 28.8106C213.845 29.9267 213.469 30.9535 213.015 31.9598C212.821 32.3908 212.586 32.8096 212.346 33.2203C212.199 33.4724 212.195 33.6758 212.359 33.938C213.037 35.0236 213.545 36.1825 213.756 37.4288C213.886 38.1952 213.925 38.9862 213.601 39.7363C213.13 40.8281 212.264 41.44 211.024 41.5824C209.588 41.7471 208.257 41.3709 206.96 40.8423C206.518 40.6614 206.084 40.456 205.664 40.2304C205.373 40.0738 205.135 40.084 204.848 40.2466C203.729 40.8789 202.528 41.3201 201.241 41.5417C200.219 41.7166 199.216 41.6942 198.281 41.2022C197.48 40.7814 197.011 40.1348 196.819 39.2931C196.529 38.0286 196.858 36.8392 197.326 35.6763C197.559 35.1009 197.86 34.5479 198.162 34.001C198.329 33.7002 198.329 33.4744 198.162 33.1492C197.722 32.2709 197.307 31.3743 196.987 30.4513C196.704 29.634 196.601 28.774 196.799 27.9059C197.132 26.4502 198.346 25.5475 199.955 25.5028C201.277 25.4642 202.511 25.8322 203.696 26.3465C204.15 26.5437 204.597 26.7572 205.036 26.9869C205.23 27.0886 205.373 27.0804 205.557 26.9747C206.49 26.436 207.497 26.0476 208.548 25.7752C209.397 25.5556 210.261 25.4154 211.149 25.576C212.836 25.881 213.802 26.9646 213.813 28.5707C213.813 28.652 213.813 28.7334 213.813 28.8147L213.817 28.8106ZM211.536 33.5355C211.441 33.3871 211.361 33.2447 211.263 33.1126C209.751 31.049 207.924 29.2843 205.693 27.8978C205.36 27.6904 205.131 27.7107 204.818 27.916C202.627 29.3473 200.776 31.0896 199.262 33.1553C199.037 33.4602 199.046 33.6778 199.262 33.9766C200.739 36.0524 202.591 37.7724 204.768 39.1874C205.243 39.4964 205.276 39.4863 205.779 39.1813C207.153 38.3498 208.345 37.317 209.43 36.1805C210.119 35.4608 210.715 34.6598 211.346 33.8912C211.428 33.7916 211.467 33.6635 211.533 33.5334L211.536 33.5355ZM211.864 33.1532C212.119 32.6775 212.335 32.3115 212.512 31.9314C213.071 30.7176 213.519 29.4856 213.298 28.1214C213.147 27.1719 212.48 26.3912 211.501 26.1228C210.754 25.9175 210.002 25.95 209.248 26.0842C208.021 26.3038 206.887 26.743 205.79 27.3976C208.19 28.955 210.201 30.801 211.866 33.1553L211.864 33.1532ZM198.774 34.1291C198.678 34.1739 198.644 34.184 198.62 34.2043C198.584 34.2368 198.547 34.2735 198.521 34.3162C197.706 35.7535 197.085 37.2438 197.249 38.913C197.335 39.7851 197.759 40.4947 198.646 40.8769C199.288 41.1534 199.966 41.2449 200.666 41.1635C202.04 41.003 203.304 40.5435 204.505 39.9132C204.585 39.8705 204.647 39.8014 204.749 39.7201C202.355 38.2014 200.398 36.331 198.771 34.1271L198.774 34.1291ZM211.862 34.0194C210.198 36.3248 208.215 38.1912 205.816 39.7242C205.969 39.84 206.049 39.9275 206.148 39.9702C206.824 40.2548 207.492 40.5699 208.19 40.7976C208.937 41.0416 209.71 41.2225 210.521 41.19C212.314 41.1188 213.477 39.9783 213.376 38.3213C213.315 37.3129 213.057 36.331 212.598 35.4079C212.382 34.9728 212.143 34.5479 211.859 34.0173L211.862 34.0194ZM198.715 33.1126C200.374 30.803 202.353 28.9163 204.829 27.3773C204.403 27.1699 204.076 26.9951 203.738 26.8507C202.504 26.3242 201.245 25.9175 199.856 25.9785C198.391 26.0436 197.32 26.9971 197.236 28.3125C197.125 30.0386 197.76 31.5512 198.717 33.1126H198.715Z","fill","black",2,"fill","black","fill-opacity","1"],["d","M201.709 33.5146C203.958 33.1304 205.305 31.9146 205.718 29.79C206.169 31.937 207.498 33.1934 209.824 33.535C207.582 33.972 206.15 35.1268 205.77 37.351C205.735 37.2535 205.69 37.1559 205.668 37.0542C205.485 36.2288 205.143 35.4786 204.513 34.8605C203.84 34.2038 203.007 33.8501 202.071 33.6772C201.972 33.659 201.873 33.6386 201.773 33.6163C201.763 33.6142 201.759 33.5919 201.709 33.5146Z","fill","black",2,"fill","black","fill-opacity","1"],["d","M226.744 30.6V37.194H230.342V39H224.728V30.6H226.744ZM233.697 37.684C234.565 37.684 235.111 37.166 235.111 36.452V36.186H233.739C233.123 36.186 232.731 36.466 232.731 36.928C232.731 37.348 232.969 37.684 233.697 37.684ZM235.209 39V37.418H235.041C234.705 38.468 234.005 39.14 232.871 39.14C231.751 39.14 230.925 38.566 230.925 37.264C230.925 36.074 231.625 35.248 233.375 35.248H235.111V34.786C235.111 34.1 234.817 33.708 234.089 33.708C233.459 33.708 233.095 34.016 232.969 34.66L231.177 34.254C231.401 33.05 232.325 32.196 234.159 32.196C236.175 32.196 237.001 33.12 237.001 34.786V39H235.209ZM238.834 41.352C238.372 41.352 238.092 41.31 237.742 41.254L238.022 39.644C238.302 39.7 238.596 39.742 238.876 39.742C239.548 39.742 239.898 39.616 240.206 38.916L237.714 32.364H239.8L240.458 34.8C240.654 35.542 240.892 36.396 241.102 37.208H241.34C241.55 36.382 241.774 35.556 241.942 34.842L242.558 32.364H244.602L241.984 39.028C241.34 40.652 240.5 41.352 238.834 41.352ZM248.231 33.61C247.363 33.61 246.873 34.058 246.775 35.15H249.547C249.519 34.114 249.085 33.61 248.231 33.61ZM248.259 39.182C246.257 39.182 244.885 38.076 244.885 35.822C244.885 33.526 246.131 32.182 248.287 32.182C250.331 32.182 251.297 33.386 251.297 35.22C251.297 35.5 251.283 35.766 251.255 36.116H246.761C246.873 37.18 247.363 37.656 248.273 37.656C249.169 37.656 249.449 37.236 249.617 36.732L251.213 37.166C250.919 38.314 250.149 39.182 248.259 39.182ZM254.248 39H252.344V32.364H254.15V34.52H254.304C254.724 32.672 255.284 32.294 256.152 32.294H256.348V34.478H255.956C254.626 34.478 254.248 34.87 254.248 36.046V39ZM262.936 39L262.362 37.138H259.114L258.54 39H256.454L259.394 30.6H262.166L265.092 39H262.936ZM259.898 34.632L259.576 35.668H261.9L261.578 34.632C261.34 33.876 261.116 33.092 260.92 32.336H260.584C260.374 33.092 260.136 33.876 259.898 34.632ZM267.705 39H265.689V30.6H267.705V39Z","fill","black",2,"fill","black","fill-opacity","1"],["x","1.78204","y","76.5","width","149","height","65","stroke","#14FFFC","stroke-width","2",2,"stroke","#14FFFC","stroke","color(display-p3 0.0784 1.0000 0.9882)","stroke-opacity","1"],["d","M20.828 107.808H19.526V110.398H20.856C21.892 110.398 22.312 109.978 22.312 109.096C22.312 108.214 21.92 107.808 20.828 107.808ZM21.08 112.036H19.526V114.5H17.51V106.1H21.01C23.236 106.1 24.3 107.122 24.3 109.096C24.3 110.734 23.152 112.036 21.08 112.036ZM27.0553 114.5H25.1513V107.864H26.9573V110.02H27.1113C27.5313 108.172 28.0913 107.794 28.9593 107.794H29.1553V109.978H28.7633C27.4333 109.978 27.0553 110.37 27.0553 111.546V114.5ZM33.1675 114.696C31.0115 114.696 29.7375 113.366 29.7375 111.182C29.7375 108.97 31.0535 107.682 33.1675 107.682C35.2395 107.682 36.5695 108.97 36.5695 111.182C36.5695 113.366 35.2815 114.696 33.1675 114.696ZM33.1535 109.278C32.1035 109.278 31.6415 109.964 31.6415 111.168C31.6415 112.372 32.0755 113.072 33.1535 113.072C34.2175 113.072 34.6655 112.372 34.6655 111.168C34.6655 109.964 34.2035 109.278 33.1535 109.278ZM40.4767 113.016C41.2747 113.016 41.8207 112.428 41.8207 111.504V110.986C41.8207 110.02 41.3027 109.404 40.4627 109.404C39.5527 109.404 39.1327 109.992 39.1327 111.238C39.1327 112.428 39.5387 113.016 40.4767 113.016ZM41.8207 114.5V112.764H41.7087C41.3727 113.926 40.6447 114.696 39.5387 114.696C38.1107 114.696 37.2707 113.478 37.2707 111.238C37.2707 108.928 38.1107 107.682 39.5667 107.682C40.6307 107.682 41.3447 108.382 41.6947 109.544H41.8207V105.512H43.7247V114.5H41.8207ZM49.3272 114.5V112.736H49.1872C48.8092 114.024 47.9972 114.696 46.9472 114.696C45.6872 114.696 45.0432 113.8 45.0432 112.358V107.864H46.9472V111.826C46.9472 112.512 47.2552 112.974 47.9552 112.974C48.7672 112.974 49.2712 112.4 49.2712 111.56V107.864H51.1892V114.5H49.3272ZM56.9041 110.566C56.7361 109.852 56.4281 109.348 55.5881 109.348C54.7061 109.348 54.1601 109.908 54.1601 111.168C54.1601 112.344 54.6361 113.03 55.6161 113.03C56.4701 113.03 56.7921 112.456 56.9321 111.77L58.6821 112.19C58.4581 113.73 57.5201 114.696 55.6301 114.696C53.5301 114.696 52.2141 113.534 52.2141 111.266C52.2141 109.012 53.5021 107.682 55.6161 107.682C57.5901 107.682 58.4301 108.62 58.6681 110.23L56.9041 110.566ZM60.0912 112.414V109.376H59.2792V107.864H60.0912V106.156H61.9952V107.864H63.7452V109.376H61.9952V112.106C61.9952 112.638 62.1912 112.904 62.7652 112.904C63.0592 112.904 63.3812 112.82 63.6332 112.736L63.8432 114.444C63.3392 114.598 63.0032 114.696 62.2752 114.696C60.7352 114.696 60.0912 113.674 60.0912 112.414ZM69.4284 106.1V112.694H73.0264V114.5H67.4124V106.1H69.4284ZM76.3816 113.184C77.2496 113.184 77.7956 112.666 77.7956 111.952V111.686H76.4236C75.8076 111.686 75.4156 111.966 75.4156 112.428C75.4156 112.848 75.6536 113.184 76.3816 113.184ZM77.8936 114.5V112.918H77.7256C77.3896 113.968 76.6896 114.64 75.5556 114.64C74.4356 114.64 73.6096 114.066 73.6096 112.764C73.6096 111.574 74.3096 110.748 76.0596 110.748H77.7956V110.286C77.7956 109.6 77.5016 109.208 76.7736 109.208C76.1436 109.208 75.7796 109.516 75.6536 110.16L73.8616 109.754C74.0856 108.55 75.0096 107.696 76.8436 107.696C78.8596 107.696 79.6856 108.62 79.6856 110.286V114.5H77.8936ZM81.5186 116.852C81.0566 116.852 80.7766 116.81 80.4266 116.754L80.7066 115.144C80.9866 115.2 81.2806 115.242 81.5606 115.242C82.2326 115.242 82.5826 115.116 82.8906 114.416L80.3986 107.864H82.4846L83.1426 110.3C83.3386 111.042 83.5766 111.896 83.7866 112.708H84.0246C84.2346 111.882 84.4586 111.056 84.6266 110.342L85.2426 107.864H87.2866L84.6686 114.528C84.0246 116.152 83.1846 116.852 81.5186 116.852ZM90.9155 109.11C90.0475 109.11 89.5575 109.558 89.4595 110.65H92.2315C92.2035 109.614 91.7695 109.11 90.9155 109.11ZM90.9435 114.682C88.9415 114.682 87.5695 113.576 87.5695 111.322C87.5695 109.026 88.8155 107.682 90.9715 107.682C93.0155 107.682 93.9815 108.886 93.9815 110.72C93.9815 111 93.9675 111.266 93.9395 111.616H89.4455C89.5575 112.68 90.0475 113.156 90.9575 113.156C91.8535 113.156 92.1335 112.736 92.3015 112.232L93.8975 112.666C93.6035 113.814 92.8335 114.682 90.9435 114.682ZM96.9323 114.5H95.0283V107.864H96.8343V110.02H96.9883C97.4083 108.172 97.9683 107.794 98.8363 107.794H99.0323V109.978H98.6403C97.3103 109.978 96.9323 110.37 96.9323 111.546V114.5Z","fill","black",2,"fill","black","fill-opacity","1"],["x","1.78204","y","151.5","width","149","height","65","stroke","#14A4A1","stroke-width","2",2,"stroke","#14A4A1","stroke","color(display-p3 0.0784 0.6431 0.6314)","stroke-opacity","1"],["d","M22.088 185.958L21.514 189.5H18.714L16.67 181.1H18.84L19.554 184.698C19.75 185.762 19.932 186.742 20.072 187.778H20.38C20.52 186.714 20.674 185.72 20.87 184.698L21.598 181.1H24.146L24.874 184.698C25.056 185.692 25.196 186.7 25.336 187.778H25.644C25.784 186.756 25.966 185.776 26.148 184.698L26.806 181.1H28.878L26.876 189.5H23.936L23.334 185.958C23.18 184.978 22.998 183.816 22.858 182.752H22.606C22.452 183.816 22.256 184.992 22.088 185.958ZM32.4683 184.11C31.6003 184.11 31.1103 184.558 31.0123 185.65H33.7843C33.7563 184.614 33.3223 184.11 32.4683 184.11ZM32.4963 189.682C30.4943 189.682 29.1223 188.576 29.1223 186.322C29.1223 184.026 30.3683 182.682 32.5243 182.682C34.5683 182.682 35.5343 183.886 35.5343 185.72C35.5343 186 35.5203 186.266 35.4923 186.616H30.9983C31.1103 187.68 31.6003 188.156 32.5103 188.156C33.4063 188.156 33.6863 187.736 33.8543 187.232L35.4503 187.666C35.1563 188.814 34.3863 189.682 32.4963 189.682ZM39.829 188.016C40.753 188.016 41.159 187.414 41.159 186.196C41.159 184.978 40.753 184.404 39.843 184.404C39.003 184.404 38.485 185.006 38.485 185.958V186.476C38.485 187.4 39.017 188.016 39.829 188.016ZM38.485 180.512V184.544H38.611C38.961 183.382 39.689 182.682 40.753 182.682C42.209 182.682 43.035 183.914 43.035 186.196C43.035 188.478 42.181 189.696 40.753 189.696C39.647 189.696 38.933 188.926 38.597 187.764H38.485V189.5H36.581V180.512H38.485ZM47.4755 189.64C45.2215 189.64 43.9755 188.828 43.7655 186.924L45.7115 186.7C45.8515 187.554 46.2295 188.072 47.4895 188.072C48.4975 188.072 48.9595 187.666 48.9595 187.008C48.9595 186.322 48.6655 185.986 47.5735 185.986H46.1595V184.614H47.5735C48.3295 184.614 48.7495 184.348 48.7495 183.62C48.7495 182.864 48.3435 182.542 47.4475 182.542C46.3555 182.542 46.0335 183.032 45.9075 183.872L44.0455 183.704C44.2695 182.01 45.2495 180.96 47.4335 180.96C49.6595 180.96 50.6115 181.716 50.6115 183.214C50.6115 184.348 49.9255 184.936 48.6795 185.188V185.356C50.4015 185.524 50.9475 186.07 50.9475 187.246C50.9475 188.674 49.9535 189.64 47.4755 189.64ZM56.6452 181.1V187.694H60.2432V189.5H54.6292V181.1H56.6452ZM63.5984 188.184C64.4664 188.184 65.0124 187.666 65.0124 186.952V186.686H63.6404C63.0244 186.686 62.6324 186.966 62.6324 187.428C62.6324 187.848 62.8704 188.184 63.5984 188.184ZM65.1104 189.5V187.918H64.9424C64.6064 188.968 63.9064 189.64 62.7724 189.64C61.6524 189.64 60.8264 189.066 60.8264 187.764C60.8264 186.574 61.5264 185.748 63.2764 185.748H65.0124V185.286C65.0124 184.6 64.7184 184.208 63.9904 184.208C63.3604 184.208 62.9964 184.516 62.8704 185.16L61.0784 184.754C61.3024 183.55 62.2264 182.696 64.0604 182.696C66.0764 182.696 66.9024 183.62 66.9024 185.286V189.5H65.1104ZM68.7354 191.852C68.2734 191.852 67.9934 191.81 67.6434 191.754L67.9234 190.144C68.2034 190.2 68.4974 190.242 68.7774 190.242C69.4494 190.242 69.7994 190.116 70.1074 189.416L67.6154 182.864H69.7014L70.3594 185.3C70.5554 186.042 70.7934 186.896 71.0034 187.708H71.2414C71.4514 186.882 71.6754 186.056 71.8434 185.342L72.4594 182.864H74.5034L71.8854 189.528C71.2414 191.152 70.4014 191.852 68.7354 191.852ZM78.1323 184.11C77.2643 184.11 76.7743 184.558 76.6763 185.65H79.4483C79.4203 184.614 78.9863 184.11 78.1323 184.11ZM78.1603 189.682C76.1583 189.682 74.7863 188.576 74.7863 186.322C74.7863 184.026 76.0323 182.682 78.1883 182.682C80.2323 182.682 81.1983 183.886 81.1983 185.72C81.1983 186 81.1843 186.266 81.1563 186.616H76.6623C76.7743 187.68 77.2643 188.156 78.1743 188.156C79.0703 188.156 79.3503 187.736 79.5183 187.232L81.1143 187.666C80.8203 188.814 80.0503 189.682 78.1603 189.682ZM84.1491 189.5H82.2451V182.864H84.0511V185.02H84.2051C84.6251 183.172 85.1851 182.794 86.0531 182.794H86.2491V184.978H85.8571C84.5271 184.978 84.1491 185.37 84.1491 186.546V189.5Z","fill","black",2,"fill","black","fill-opacity","1"],["x","1.78204","y","226.5","width","149","height","65","stroke","#157575","stroke-width","2",2,"stroke","#157575","stroke","color(display-p3 0.0824 0.4588 0.4588)","stroke-opacity","1"],["d","M16.964 257.948V256.1H23.824V257.948H21.402V264.5H19.386V257.948H16.964ZM27.7808 264.696C25.6248 264.696 24.3508 263.366 24.3508 261.182C24.3508 258.97 25.6668 257.682 27.7808 257.682C29.8528 257.682 31.1828 258.97 31.1828 261.182C31.1828 263.366 29.8948 264.696 27.7808 264.696ZM27.7668 259.278C26.7168 259.278 26.2548 259.964 26.2548 261.168C26.2548 262.372 26.6888 263.072 27.7668 263.072C28.8308 263.072 29.2788 262.372 29.2788 261.168C29.2788 259.964 28.8168 259.278 27.7668 259.278ZM34.138 255.512V260.454H34.656L36.35 257.864H38.52V258.018L36.154 261.098L38.66 264.346V264.5H36.49L34.628 261.84H34.138V264.5H32.234V255.512H34.138ZM42.271 259.11C41.403 259.11 40.913 259.558 40.815 260.65H43.587C43.559 259.614 43.125 259.11 42.271 259.11ZM42.299 264.682C40.297 264.682 38.925 263.576 38.925 261.322C38.925 259.026 40.171 257.682 42.327 257.682C44.371 257.682 45.337 258.886 45.337 260.72C45.337 261 45.323 261.266 45.295 261.616H40.801C40.913 262.68 41.403 263.156 42.313 263.156C43.209 263.156 43.489 262.736 43.657 262.232L45.253 262.666C44.959 263.814 44.189 264.682 42.299 264.682ZM48.2877 260.804V264.5H46.3837V257.864H48.2457V259.642H48.3717C48.7637 258.354 49.5757 257.682 50.6117 257.682C51.8857 257.682 52.5297 258.564 52.5297 260.006V264.5H50.6257V260.538C50.6257 259.866 50.3177 259.404 49.6177 259.404C48.8057 259.404 48.2877 259.978 48.2877 260.804ZM55.8232 256.926H53.8352V255.554H55.8232V256.926ZM55.7812 264.5H53.8772V257.864H55.7812V264.5ZM61.1885 262.89H62.9665V264.5H57.0025V262.862L60.7825 259.432L60.7125 259.278C59.9425 259.39 59.0885 259.474 58.4585 259.474H57.1145V257.864H62.9245V259.502L59.1305 262.96L59.1865 263.086C59.8865 262.988 60.6145 262.89 61.1885 262.89ZM66.5925 263.184C67.4605 263.184 68.0065 262.666 68.0065 261.952V261.686H66.6345C66.0185 261.686 65.6265 261.966 65.6265 262.428C65.6265 262.848 65.8645 263.184 66.5925 263.184ZM68.1045 264.5V262.918H67.9365C67.6005 263.968 66.9005 264.64 65.7665 264.64C64.6465 264.64 63.8205 264.066 63.8205 262.764C63.8205 261.574 64.5205 260.748 66.2705 260.748H68.0065V260.286C68.0065 259.6 67.7125 259.208 66.9845 259.208C66.3545 259.208 65.9905 259.516 65.8645 260.16L64.0725 259.754C64.2965 258.55 65.2205 257.696 67.0545 257.696C69.0705 257.696 69.8965 258.62 69.8965 260.286V264.5H68.1045ZM71.5755 262.414V259.376H70.7635V257.864H71.5755V256.156H73.4795V257.864H75.2295V259.376H73.4795V262.106C73.4795 262.638 73.6755 262.904 74.2495 262.904C74.5435 262.904 74.8655 262.82 75.1175 262.736L75.3275 264.444C74.8235 264.598 74.4875 264.696 73.7595 264.696C72.2195 264.696 71.5755 263.674 71.5755 262.414ZM78.2861 256.926H76.2981V255.554H78.2861V256.926ZM78.2441 264.5H76.3401V257.864H78.2441V264.5ZM82.7554 264.696C80.5994 264.696 79.3254 263.366 79.3254 261.182C79.3254 258.97 80.6414 257.682 82.7554 257.682C84.8274 257.682 86.1574 258.97 86.1574 261.182C86.1574 263.366 84.8694 264.696 82.7554 264.696ZM82.7414 259.278C81.6914 259.278 81.2294 259.964 81.2294 261.168C81.2294 262.372 81.6634 263.072 82.7414 263.072C83.8054 263.072 84.2534 262.372 84.2534 261.168C84.2534 259.964 83.7914 259.278 82.7414 259.278ZM89.0846 260.804V264.5H87.1806V257.864H89.0426V259.642H89.1686C89.5606 258.354 90.3726 257.682 91.4086 257.682C92.6826 257.682 93.3266 258.564 93.3266 260.006V264.5H91.4226V260.538C91.4226 259.866 91.1146 259.404 90.4146 259.404C89.6026 259.404 89.0846 259.978 89.0846 260.804ZM99.2467 256.1V262.694H102.845V264.5H97.2307V256.1H99.2467ZM106.2 263.184C107.068 263.184 107.614 262.666 107.614 261.952V261.686H106.242C105.626 261.686 105.234 261.966 105.234 262.428C105.234 262.848 105.472 263.184 106.2 263.184ZM107.712 264.5V262.918H107.544C107.208 263.968 106.508 264.64 105.374 264.64C104.254 264.64 103.428 264.066 103.428 262.764C103.428 261.574 104.128 260.748 105.878 260.748H107.614V260.286C107.614 259.6 107.32 259.208 106.592 259.208C105.962 259.208 105.598 259.516 105.472 260.16L103.68 259.754C103.904 258.55 104.828 257.696 106.662 257.696C108.678 257.696 109.504 258.62 109.504 260.286V264.5H107.712ZM111.337 266.852C110.875 266.852 110.595 266.81 110.245 266.754L110.525 265.144C110.805 265.2 111.099 265.242 111.379 265.242C112.051 265.242 112.401 265.116 112.709 264.416L110.217 257.864H112.303L112.961 260.3C113.157 261.042 113.395 261.896 113.605 262.708H113.843C114.053 261.882 114.277 261.056 114.445 260.342L115.061 257.864H117.105L114.487 264.528C113.843 266.152 113.003 266.852 111.337 266.852ZM120.734 259.11C119.866 259.11 119.376 259.558 119.278 260.65H122.05C122.022 259.614 121.588 259.11 120.734 259.11ZM120.762 264.682C118.76 264.682 117.388 263.576 117.388 261.322C117.388 259.026 118.634 257.682 120.79 257.682C122.834 257.682 123.8 258.886 123.8 260.72C123.8 261 123.786 261.266 123.758 261.616H119.264C119.376 262.68 119.866 263.156 120.776 263.156C121.672 263.156 121.952 262.736 122.12 262.232L123.716 262.666C123.422 263.814 122.652 264.682 120.762 264.682ZM126.751 264.5H124.847V257.864H126.653V260.02H126.807C127.227 258.172 127.787 257.794 128.655 257.794H128.851V259.978H128.459C127.129 259.978 126.751 260.37 126.751 261.546V264.5Z","fill","black",2,"fill","black","fill-opacity","1"],["x","1.78204","y","301.5","width","149","height","65","stroke","#154547","stroke-width","2",2,"stroke","#154547","stroke","color(display-p3 0.0824 0.2706 0.2784)","stroke-opacity","1"],["d","M19.526 339.5H17.51V331.1H19.526V339.5ZM22.817 335.804V339.5H20.913V332.864H22.775V334.642H22.901C23.293 333.354 24.105 332.682 25.141 332.682C26.415 332.682 27.059 333.564 27.059 335.006V339.5H25.155V335.538C25.155 334.866 24.847 334.404 24.147 334.404C23.335 334.404 22.817 334.978 22.817 335.804ZM30.7585 332.612V332.864H32.3265V334.376H30.7585V339.5H28.8545V334.376H27.8885V332.864H28.8545V332.556C28.8545 331.226 29.5965 330.274 31.2345 330.274C31.7945 330.274 32.1025 330.33 32.3825 330.4L32.3125 331.716C32.0745 331.674 31.8505 331.646 31.6125 331.646C31.0665 331.646 30.7585 331.94 30.7585 332.612ZM35.0397 339.5H33.1357V332.864H34.9417V335.02H35.0957C35.5157 333.172 36.0757 332.794 36.9437 332.794H37.1397V334.978H36.7477C35.4177 334.978 35.0397 335.37 35.0397 336.546V339.5ZM40.4519 338.184C41.3199 338.184 41.8659 337.666 41.8659 336.952V336.686H40.4939C39.8779 336.686 39.4859 336.966 39.4859 337.428C39.4859 337.848 39.7239 338.184 40.4519 338.184ZM41.9639 339.5V337.918H41.7959C41.4599 338.968 40.7599 339.64 39.6259 339.64C38.5059 339.64 37.6799 339.066 37.6799 337.764C37.6799 336.574 38.3799 335.748 40.1299 335.748H41.8659V335.286C41.8659 334.6 41.5719 334.208 40.8439 334.208C40.2139 334.208 39.8499 334.516 39.7239 335.16L37.9319 334.754C38.1559 333.55 39.0799 332.696 40.9139 332.696C42.9299 332.696 43.7559 333.62 43.7559 335.286V339.5H41.9639ZM47.8009 339.696C45.5609 339.696 44.8749 338.8 44.6929 337.596L46.4009 337.246C46.5689 337.974 47.0169 338.352 47.8429 338.352C48.4869 338.352 48.8089 338.142 48.8229 337.708C48.8229 337.302 48.5569 337.078 47.3389 336.84C45.5189 336.448 44.9029 335.846 44.9029 334.712C44.9029 333.438 45.8129 332.682 47.6889 332.682C49.6209 332.682 50.2509 333.438 50.4889 334.6L48.7949 334.95C48.6409 334.264 48.3329 333.998 47.6469 333.998C47.0169 333.998 46.7089 334.208 46.7089 334.6C46.7089 334.964 46.8909 335.23 48.0809 335.468C50.1529 335.902 50.6569 336.588 50.6569 337.624C50.6569 338.912 49.8029 339.696 47.8009 339.696ZM51.9974 337.414V334.376H51.1854V332.864H51.9974V331.156H53.9014V332.864H55.6514V334.376H53.9014V337.106C53.9014 337.638 54.0974 337.904 54.6714 337.904C54.9654 337.904 55.2874 337.82 55.5394 337.736L55.7494 339.444C55.2454 339.598 54.9094 339.696 54.1814 339.696C52.6414 339.696 51.9974 338.674 51.9974 337.414ZM58.61 339.5H56.706V332.864H58.512V335.02H58.666C59.086 333.172 59.646 332.794 60.514 332.794H60.71V334.978H60.318C58.988 334.978 58.61 335.37 58.61 336.546V339.5ZM65.8702 339.5V337.736H65.7302C65.3522 339.024 64.5402 339.696 63.4902 339.696C62.2302 339.696 61.5862 338.8 61.5862 337.358V332.864H63.4902V336.826C63.4902 337.512 63.7982 337.974 64.4982 337.974C65.3102 337.974 65.8142 337.4 65.8142 336.56V332.864H67.7322V339.5H65.8702ZM73.447 335.566C73.279 334.852 72.971 334.348 72.131 334.348C71.249 334.348 70.703 334.908 70.703 336.168C70.703 337.344 71.179 338.03 72.159 338.03C73.013 338.03 73.335 337.456 73.475 336.77L75.225 337.19C75.001 338.73 74.063 339.696 72.173 339.696C70.073 339.696 68.757 338.534 68.757 336.266C68.757 334.012 70.045 332.682 72.159 332.682C74.133 332.682 74.973 333.62 75.211 335.23L73.447 335.566ZM76.6341 337.414V334.376H75.8221V332.864H76.6341V331.156H78.5381V332.864H80.2881V334.376H78.5381V337.106C78.5381 337.638 78.7341 337.904 79.3081 337.904C79.6021 337.904 79.9241 337.82 80.1761 337.736L80.3861 339.444C79.8821 339.598 79.5461 339.696 78.8181 339.696C77.2781 339.696 76.6341 338.674 76.6341 337.414ZM85.5987 339.5V337.736H85.4587C85.0807 339.024 84.2687 339.696 83.2187 339.696C81.9587 339.696 81.3147 338.8 81.3147 337.358V332.864H83.2187V336.826C83.2187 337.512 83.5267 337.974 84.2267 337.974C85.0387 337.974 85.5427 337.4 85.5427 336.56V332.864H87.4607V339.5H85.5987ZM90.7116 339.5H88.8076V332.864H90.6136V335.02H90.7676C91.1876 333.172 91.7476 332.794 92.6156 332.794H92.8116V334.978H92.4196C91.0896 334.978 90.7116 335.37 90.7116 336.546V339.5ZM96.7398 334.11C95.8718 334.11 95.3818 334.558 95.2838 335.65H98.0558C98.0278 334.614 97.5938 334.11 96.7398 334.11ZM96.7678 339.682C94.7658 339.682 93.3938 338.576 93.3938 336.322C93.3938 334.026 94.6398 332.682 96.7958 332.682C98.8398 332.682 99.8058 333.886 99.8058 335.72C99.8058 336 99.7918 336.266 99.7638 336.616H95.2698C95.3818 337.68 95.8718 338.156 96.7818 338.156C97.6778 338.156 97.9578 337.736 98.1258 337.232L99.7218 337.666C99.4278 338.814 98.6578 339.682 96.7678 339.682ZM105.481 331.1V337.694H109.079V339.5H103.465V331.1H105.481ZM112.434 338.184C113.302 338.184 113.848 337.666 113.848 336.952V336.686H112.476C111.86 336.686 111.468 336.966 111.468 337.428C111.468 337.848 111.706 338.184 112.434 338.184ZM113.946 339.5V337.918H113.778C113.442 338.968 112.742 339.64 111.608 339.64C110.488 339.64 109.662 339.066 109.662 337.764C109.662 336.574 110.362 335.748 112.112 335.748H113.848V335.286C113.848 334.6 113.554 334.208 112.826 334.208C112.196 334.208 111.832 334.516 111.706 335.16L109.914 334.754C110.138 333.55 111.062 332.696 112.896 332.696C114.912 332.696 115.738 333.62 115.738 335.286V339.5H113.946ZM117.571 341.852C117.109 341.852 116.829 341.81 116.479 341.754L116.759 340.144C117.039 340.2 117.333 340.242 117.613 340.242C118.285 340.242 118.635 340.116 118.943 339.416L116.451 332.864H118.537L119.195 335.3C119.391 336.042 119.629 336.896 119.839 337.708H120.077C120.287 336.882 120.511 336.056 120.679 335.342L121.295 332.864H123.339L120.721 339.528C120.077 341.152 119.237 341.852 117.571 341.852ZM126.968 334.11C126.1 334.11 125.61 334.558 125.512 335.65H128.284C128.256 334.614 127.822 334.11 126.968 334.11ZM126.996 339.682C124.994 339.682 123.622 338.576 123.622 336.322C123.622 334.026 124.868 332.682 127.024 332.682C129.068 332.682 130.034 333.886 130.034 335.72C130.034 336 130.02 336.266 129.992 336.616H125.498C125.61 337.68 126.1 338.156 127.01 338.156C127.906 338.156 128.186 337.736 128.354 337.232L129.95 337.666C129.656 338.814 128.886 339.682 126.996 339.682ZM132.985 339.5H131.081V332.864H132.887V335.02H133.041C133.461 333.172 134.021 332.794 134.889 332.794H135.085V334.978H134.693C133.363 334.978 132.985 335.37 132.985 336.546V339.5Z","fill","black",2,"fill","black","fill-opacity","1"],["width","90","height","67","transform","translate(159.782 75.5)","fill","#14FFFC",2,"fill","#14FFFC","fill","color(display-p3 0.0784 1.0000 0.9882)","fill-opacity","1"],["d","M178.526 106.1V112.694H182.124V114.5H176.51V106.1H178.526ZM185.479 113.184C186.347 113.184 186.893 112.666 186.893 111.952V111.686H185.521C184.905 111.686 184.513 111.966 184.513 112.428C184.513 112.848 184.751 113.184 185.479 113.184ZM186.991 114.5V112.918H186.823C186.487 113.968 185.787 114.64 184.653 114.64C183.533 114.64 182.707 114.066 182.707 112.764C182.707 111.574 183.407 110.748 185.157 110.748H186.893V110.286C186.893 109.6 186.599 109.208 185.871 109.208C185.241 109.208 184.877 109.516 184.751 110.16L182.959 109.754C183.183 108.55 184.107 107.696 185.941 107.696C187.957 107.696 188.783 108.62 188.783 110.286V114.5H186.991ZM190.616 116.852C190.154 116.852 189.874 116.81 189.524 116.754L189.804 115.144C190.084 115.2 190.378 115.242 190.658 115.242C191.33 115.242 191.68 115.116 191.988 114.416L189.496 107.864H191.582L192.24 110.3C192.436 111.042 192.674 111.896 192.884 112.708H193.122C193.332 111.882 193.556 111.056 193.724 110.342L194.34 107.864H196.384L193.766 114.528C193.122 116.152 192.282 116.852 190.616 116.852ZM200.013 109.11C199.145 109.11 198.655 109.558 198.557 110.65H201.329C201.301 109.614 200.867 109.11 200.013 109.11ZM200.041 114.682C198.039 114.682 196.667 113.576 196.667 111.322C196.667 109.026 197.913 107.682 200.069 107.682C202.113 107.682 203.079 108.886 203.079 110.72C203.079 111 203.065 111.266 203.037 111.616H198.543C198.655 112.68 199.145 113.156 200.055 113.156C200.951 113.156 201.231 112.736 201.399 112.232L202.995 112.666C202.701 113.814 201.931 114.682 200.041 114.682ZM206.03 114.5H204.126V107.864H205.932V110.02H206.086C206.506 108.172 207.066 107.794 207.934 107.794H208.13V109.978H207.738C206.408 109.978 206.03 110.37 206.03 111.546V114.5ZM213.892 114.5H211.176L208.236 106.1H210.392L211.736 110.468C211.974 111.224 212.198 112.008 212.394 112.764H212.716C212.926 112.008 213.15 111.224 213.388 110.468L214.746 106.1H216.818L213.892 114.5ZM220.734 107.808H219.432V110.398H220.762C221.798 110.398 222.218 109.978 222.218 109.096C222.218 108.214 221.826 107.808 220.734 107.808ZM220.986 112.036H219.432V114.5H217.416V106.1H220.916C223.142 106.1 224.206 107.122 224.206 109.096C224.206 110.734 223.058 112.036 220.986 112.036ZM230.098 114.5L228.39 111.182C227.998 110.37 227.424 108.97 227.032 107.892L226.808 107.92C226.892 109.166 226.976 110.944 226.976 111.966V114.5H225.1V106.1H227.956L229.426 108.914C229.958 109.95 230.518 111.392 230.854 112.4L231.078 112.372C230.98 111.154 230.91 109.684 230.91 108.69V106.1H232.772V114.5H230.098Z","fill","black",2,"fill","black","fill-opacity","1"],["width","99","height","67","transform","translate(257.782 75.5)","fill","#14FFFC",2,"fill","#14FFFC","fill","color(display-p3 0.0784 1.0000 0.9882)","fill-opacity","1"],["d","M276.358 110.986V114.5H274.496V106.1H277.772L278.822 109.348C278.99 109.88 279.284 110.944 279.522 111.938H279.76C279.984 110.944 280.264 109.866 280.46 109.278L281.51 106.1H284.534V114.5H282.518V110.986C282.518 109.964 282.574 108.746 282.602 107.738H282.392C282.112 108.83 281.762 110.104 281.342 111.35L280.362 114.052H278.5L277.562 111.294C277.142 109.978 276.82 108.802 276.554 107.738H276.344C276.358 108.76 276.358 109.95 276.358 110.986ZM289.046 114.696C286.89 114.696 285.616 113.366 285.616 111.182C285.616 108.97 286.932 107.682 289.046 107.682C291.118 107.682 292.448 108.97 292.448 111.182C292.448 113.366 291.16 114.696 289.046 114.696ZM289.032 109.278C287.982 109.278 287.52 109.964 287.52 111.168C287.52 112.372 287.954 113.072 289.032 113.072C290.096 113.072 290.544 112.372 290.544 111.168C290.544 109.964 290.082 109.278 289.032 109.278ZM296.72 113.016C297.644 113.016 298.05 112.414 298.05 111.196C298.05 109.978 297.644 109.404 296.734 109.404C295.894 109.404 295.376 110.006 295.376 110.958V111.476C295.376 112.4 295.908 113.016 296.72 113.016ZM295.376 105.512V109.544H295.502C295.852 108.382 296.58 107.682 297.644 107.682C299.1 107.682 299.926 108.914 299.926 111.196C299.926 113.478 299.072 114.696 297.644 114.696C296.538 114.696 295.824 113.926 295.488 112.764H295.376V114.5H293.472V105.512H295.376ZM302.952 106.926H300.964V105.554H302.952V106.926ZM302.91 114.5H301.006V107.864H302.91V114.5ZM306.245 105.512V114.5H304.341V105.512H306.245ZM310.646 109.11C309.778 109.11 309.288 109.558 309.19 110.65H311.962C311.934 109.614 311.5 109.11 310.646 109.11ZM310.674 114.682C308.672 114.682 307.3 113.576 307.3 111.322C307.3 109.026 308.546 107.682 310.702 107.682C312.746 107.682 313.712 108.886 313.712 110.72C313.712 111 313.698 111.266 313.67 111.616H309.176C309.288 112.68 309.778 113.156 310.688 113.156C311.584 113.156 311.864 112.736 312.032 112.232L313.628 112.666C313.334 113.814 312.564 114.682 310.674 114.682ZM322.999 114.5L322.425 112.638H319.177L318.603 114.5H316.517L319.457 106.1H322.229L325.155 114.5H322.999ZM319.961 110.132L319.639 111.168H321.963L321.641 110.132C321.403 109.376 321.179 108.592 320.983 107.836H320.647C320.437 108.592 320.199 109.376 319.961 110.132ZM328.944 113.016C329.868 113.016 330.274 112.414 330.274 111.196C330.274 109.978 329.868 109.404 328.958 109.404C328.118 109.404 327.6 110.006 327.6 110.958V111.476C327.6 112.4 328.132 113.016 328.944 113.016ZM332.15 111.196C332.15 113.478 331.296 114.696 329.868 114.696C328.762 114.696 328.048 113.926 327.712 112.764H327.6V116.628H325.696V107.864H327.6V109.544H327.726C328.076 108.382 328.804 107.682 329.868 107.682C331.324 107.682 332.15 108.914 332.15 111.196ZM336.423 113.016C337.347 113.016 337.753 112.414 337.753 111.196C337.753 109.978 337.347 109.404 336.437 109.404C335.597 109.404 335.079 110.006 335.079 110.958V111.476C335.079 112.4 335.611 113.016 336.423 113.016ZM339.629 111.196C339.629 113.478 338.775 114.696 337.347 114.696C336.241 114.696 335.527 113.926 335.191 112.764H335.079V116.628H333.175V107.864H335.079V109.544H335.205C335.555 108.382 336.283 107.682 337.347 107.682C338.803 107.682 339.629 108.914 339.629 111.196Z","fill","black",2,"fill","black","fill-opacity","1"],["width","85","height","67","transform","translate(364.782 75.5)","fill","#14FFFC",2,"fill","#14FFFC","fill","color(display-p3 0.0784 1.0000 0.9882)","fill-opacity","1"],["d","M386.088 110.958L385.514 114.5H382.714L380.67 106.1H382.84L383.554 109.698C383.75 110.762 383.932 111.742 384.072 112.778H384.38C384.52 111.714 384.674 110.72 384.87 109.698L385.598 106.1H388.146L388.874 109.698C389.056 110.692 389.196 111.7 389.336 112.778H389.644C389.784 111.756 389.966 110.776 390.148 109.698L390.806 106.1H392.878L390.876 114.5H387.936L387.334 110.958C387.18 109.978 386.998 108.816 386.858 107.752H386.606C386.452 108.816 386.256 109.992 386.088 110.958ZM396.468 109.11C395.6 109.11 395.11 109.558 395.012 110.65H397.784C397.756 109.614 397.322 109.11 396.468 109.11ZM396.496 114.682C394.494 114.682 393.122 113.576 393.122 111.322C393.122 109.026 394.368 107.682 396.524 107.682C398.568 107.682 399.534 108.886 399.534 110.72C399.534 111 399.52 111.266 399.492 111.616H394.998C395.11 112.68 395.6 113.156 396.51 113.156C397.406 113.156 397.686 112.736 397.854 112.232L399.45 112.666C399.156 113.814 398.386 114.682 396.496 114.682ZM403.829 113.016C404.753 113.016 405.159 112.414 405.159 111.196C405.159 109.978 404.753 109.404 403.843 109.404C403.003 109.404 402.485 110.006 402.485 110.958V111.476C402.485 112.4 403.017 113.016 403.829 113.016ZM402.485 105.512V109.544H402.611C402.961 108.382 403.689 107.682 404.753 107.682C406.209 107.682 407.035 108.914 407.035 111.196C407.035 113.478 406.181 114.696 404.753 114.696C403.647 114.696 402.933 113.926 402.597 112.764H402.485V114.5H400.581V105.512H402.485ZM416.3 114.5L415.726 112.638H412.478L411.904 114.5H409.818L412.758 106.1H415.53L418.456 114.5H416.3ZM413.262 110.132L412.94 111.168H415.264L414.942 110.132C414.704 109.376 414.48 108.592 414.284 107.836H413.948C413.738 108.592 413.5 109.376 413.262 110.132ZM422.245 113.016C423.169 113.016 423.575 112.414 423.575 111.196C423.575 109.978 423.169 109.404 422.259 109.404C421.419 109.404 420.901 110.006 420.901 110.958V111.476C420.901 112.4 421.433 113.016 422.245 113.016ZM425.451 111.196C425.451 113.478 424.597 114.696 423.169 114.696C422.063 114.696 421.349 113.926 421.013 112.764H420.901V116.628H418.997V107.864H420.901V109.544H421.027C421.377 108.382 422.105 107.682 423.169 107.682C424.625 107.682 425.451 108.914 425.451 111.196ZM429.724 113.016C430.648 113.016 431.054 112.414 431.054 111.196C431.054 109.978 430.648 109.404 429.738 109.404C428.898 109.404 428.38 110.006 428.38 110.958V111.476C428.38 112.4 428.912 113.016 429.724 113.016ZM432.93 111.196C432.93 113.478 432.076 114.696 430.648 114.696C429.542 114.696 428.828 113.926 428.492 112.764H428.38V116.628H426.476V107.864H428.38V109.544H428.506C428.856 108.382 429.584 107.682 430.648 107.682C432.104 107.682 432.93 108.914 432.93 111.196Z","fill","black",2,"fill","black","fill-opacity","1"],["width","76","height","67","transform","translate(457.782 75.5)","fill","#14FFFC",2,"fill","#14FFFC","fill","color(display-p3 0.0784 1.0000 0.9882)","fill-opacity","1"],["d","M479.438 114.5L477.786 111.21H477.562L475.938 114.5H473.824V114.346L476.33 110.174L473.866 106.254V106.1H476.092L477.758 109.292H477.982L479.508 106.1H481.622V106.254L479.158 110.412L481.678 114.346V114.5H479.438ZM485.968 107.794H484.456V110.034H485.968C486.948 110.034 487.368 109.684 487.368 108.9C487.368 108.116 486.976 107.794 485.968 107.794ZM487.508 114.5L485.73 111.602H484.456V114.5H482.426V106.1H486.108C488.264 106.1 489.37 107.01 489.37 108.83C489.37 110.118 488.768 110.958 487.704 111.35L489.86 114.346V114.5H487.508ZM496.697 114.696C494.009 114.682 493.099 113.478 492.917 112.022L494.835 111.616C495.031 112.624 495.745 113.086 496.781 113.086C497.719 113.086 498.181 112.778 498.181 112.246C498.181 111.658 497.803 111.35 496.207 111.084C493.883 110.72 493.169 109.81 493.169 108.424C493.169 106.842 494.275 105.904 496.571 105.904C498.853 105.904 499.777 106.926 500.015 108.368L498.013 108.76C497.817 107.906 497.481 107.472 496.473 107.472C495.577 107.472 495.157 107.78 495.157 108.312C495.157 108.802 495.395 109.152 497.047 109.446C499.651 109.908 500.211 110.888 500.211 112.106C500.211 113.716 499.161 114.696 496.697 114.696ZM504.666 107.766H503.35V112.848H504.736C506.486 112.848 507.158 111.966 507.158 110.202C507.158 108.424 506.444 107.766 504.666 107.766ZM501.334 114.5V106.1H504.918C507.872 106.1 509.174 107.57 509.174 110.202C509.174 112.862 507.578 114.5 504.89 114.5H501.334ZM515.345 114.5L512.839 111.35H512.251V114.5H510.235V106.1H512.251V109.726H512.811L515.317 106.1H517.613V106.254L514.281 110.384L517.697 114.346V114.5H515.345Z","fill","black",2,"fill","black","fill-opacity","1"],["width","142","height","67","transform","translate(159.782 150.5)","fill","#15A4A1",2,"fill","#15A4A1","fill","color(display-p3 0.0824 0.6431 0.6314)","fill-opacity","1"],["d","M178.526 181.1V187.694H182.124V189.5H176.51V181.1H178.526ZM185.479 188.184C186.347 188.184 186.893 187.666 186.893 186.952V186.686H185.521C184.905 186.686 184.513 186.966 184.513 187.428C184.513 187.848 184.751 188.184 185.479 188.184ZM186.991 189.5V187.918H186.823C186.487 188.968 185.787 189.64 184.653 189.64C183.533 189.64 182.707 189.066 182.707 187.764C182.707 186.574 183.407 185.748 185.157 185.748H186.893V185.286C186.893 184.6 186.599 184.208 185.871 184.208C185.241 184.208 184.877 184.516 184.751 185.16L182.959 184.754C183.183 183.55 184.107 182.696 185.941 182.696C187.957 182.696 188.783 183.62 188.783 185.286V189.5H186.991ZM190.616 191.852C190.154 191.852 189.874 191.81 189.524 191.754L189.804 190.144C190.084 190.2 190.378 190.242 190.658 190.242C191.33 190.242 191.68 190.116 191.988 189.416L189.496 182.864H191.582L192.24 185.3C192.436 186.042 192.674 186.896 192.884 187.708H193.122C193.332 186.882 193.556 186.056 193.724 185.342L194.34 182.864H196.384L193.766 189.528C193.122 191.152 192.282 191.852 190.616 191.852ZM200.013 184.11C199.145 184.11 198.655 184.558 198.557 185.65H201.329C201.301 184.614 200.867 184.11 200.013 184.11ZM200.041 189.682C198.039 189.682 196.667 188.576 196.667 186.322C196.667 184.026 197.913 182.682 200.069 182.682C202.113 182.682 203.079 183.886 203.079 185.72C203.079 186 203.065 186.266 203.037 186.616H198.543C198.655 187.68 199.145 188.156 200.055 188.156C200.951 188.156 201.231 187.736 201.399 187.232L202.995 187.666C202.701 188.814 201.931 189.682 200.041 189.682ZM206.03 189.5H204.126V182.864H205.932V185.02H206.086C206.506 183.172 207.066 182.794 207.934 182.794H208.13V184.978H207.738C206.408 184.978 206.03 185.37 206.03 186.546V189.5ZM213.495 185.986V189.5H211.633V181.1H214.909L215.959 184.348C216.127 184.88 216.421 185.944 216.659 186.938H216.897C217.121 185.944 217.401 184.866 217.597 184.278L218.647 181.1H221.671V189.5H219.655V185.986C219.655 184.964 219.711 183.746 219.739 182.738H219.529C219.249 183.83 218.899 185.104 218.479 186.35L217.499 189.052H215.637L214.699 186.294C214.279 184.978 213.957 183.802 213.691 182.738H213.481C213.495 183.76 213.495 184.95 213.495 185.986ZM225.483 188.184C226.351 188.184 226.897 187.666 226.897 186.952V186.686H225.525C224.909 186.686 224.517 186.966 224.517 187.428C224.517 187.848 224.755 188.184 225.483 188.184ZM226.995 189.5V187.918H226.827C226.491 188.968 225.791 189.64 224.657 189.64C223.537 189.64 222.711 189.066 222.711 187.764C222.711 186.574 223.411 185.748 225.161 185.748H226.897V185.286C226.897 184.6 226.603 184.208 225.875 184.208C225.245 184.208 224.881 184.516 224.755 185.16L222.963 184.754C223.187 183.55 224.111 182.696 225.945 182.696C227.961 182.696 228.787 183.62 228.787 185.286V189.5H226.995ZM232.02 189.5H230.116V182.864H231.922V185.02H232.076C232.496 183.172 233.056 182.794 233.924 182.794H234.12V184.978H233.728C232.398 184.978 232.02 185.37 232.02 186.546V189.5ZM236.956 180.512V185.454H237.474L239.168 182.864H241.338V183.018L238.972 186.098L241.478 189.346V189.5H239.308L237.446 186.84H236.956V189.5H235.052V180.512H236.956ZM245.089 184.11C244.221 184.11 243.731 184.558 243.633 185.65H246.405C246.377 184.614 245.943 184.11 245.089 184.11ZM245.117 189.682C243.115 189.682 241.743 188.576 241.743 186.322C241.743 184.026 242.989 182.682 245.145 182.682C247.189 182.682 248.155 183.886 248.155 185.72C248.155 186 248.141 186.266 248.113 186.616H243.619C243.731 187.68 244.221 188.156 245.131 188.156C246.027 188.156 246.307 187.736 246.475 187.232L248.071 187.666C247.777 188.814 247.007 189.682 245.117 189.682ZM249.552 187.414V184.376H248.74V182.864H249.552V181.156H251.456V182.864H253.206V184.376H251.456V187.106C251.456 187.638 251.652 187.904 252.226 187.904C252.52 187.904 252.842 187.82 253.094 187.736L253.304 189.444C252.8 189.598 252.464 189.696 251.736 189.696C250.196 189.696 249.552 188.674 249.552 187.414ZM257.509 188.016C258.433 188.016 258.839 187.414 258.839 186.196C258.839 184.978 258.433 184.404 257.523 184.404C256.683 184.404 256.165 185.006 256.165 185.958V186.476C256.165 187.4 256.697 188.016 257.509 188.016ZM260.715 186.196C260.715 188.478 259.861 189.696 258.433 189.696C257.327 189.696 256.613 188.926 256.277 187.764H256.165V191.628H254.261V182.864H256.165V184.544H256.291C256.641 183.382 257.369 182.682 258.433 182.682C259.889 182.682 260.715 183.914 260.715 186.196ZM263.671 180.512V189.5H261.767V180.512H263.671ZM267.456 188.184C268.324 188.184 268.87 187.666 268.87 186.952V186.686H267.498C266.882 186.686 266.49 186.966 266.49 187.428C266.49 187.848 266.728 188.184 267.456 188.184ZM268.968 189.5V187.918H268.8C268.464 188.968 267.764 189.64 266.63 189.64C265.51 189.64 264.684 189.066 264.684 187.764C264.684 186.574 265.384 185.748 267.134 185.748H268.87V185.286C268.87 184.6 268.576 184.208 267.848 184.208C267.218 184.208 266.854 184.516 266.728 185.16L264.936 184.754C265.16 183.55 266.084 182.696 267.918 182.696C269.934 182.696 270.76 183.62 270.76 185.286V189.5H268.968ZM276.457 185.566C276.289 184.852 275.981 184.348 275.141 184.348C274.259 184.348 273.713 184.908 273.713 186.168C273.713 187.344 274.189 188.03 275.169 188.03C276.023 188.03 276.345 187.456 276.485 186.77L278.235 187.19C278.011 188.73 277.073 189.696 275.183 189.696C273.083 189.696 271.767 188.534 271.767 186.266C271.767 184.012 273.055 182.682 275.169 182.682C277.143 182.682 277.983 183.62 278.221 185.23L276.457 185.566ZM282.318 184.11C281.45 184.11 280.96 184.558 280.862 185.65H283.634C283.606 184.614 283.172 184.11 282.318 184.11ZM282.346 189.682C280.344 189.682 278.972 188.576 278.972 186.322C278.972 184.026 280.218 182.682 282.374 182.682C284.418 182.682 285.384 183.886 285.384 185.72C285.384 186 285.37 186.266 285.342 186.616H280.848C280.96 187.68 281.45 188.156 282.36 188.156C283.256 188.156 283.536 187.736 283.704 187.232L285.3 187.666C285.006 188.814 284.236 189.682 282.346 189.682Z","fill","white",2,"fill","white","fill-opacity","1"],["width","103","height","67","transform","translate(309.782 150.5)","fill","#15A4A1",2,"fill","#15A4A1","fill","color(display-p3 0.0824 0.6431 0.6314)","fill-opacity","1"],["d","M331.62 189.5L329.114 186.35H328.526V189.5H326.51V181.1H328.526V184.726H329.086L331.592 181.1H333.888V181.254L330.556 185.384L333.972 189.346V189.5H331.62ZM335.079 191.852C334.617 191.852 334.337 191.81 333.987 191.754L334.267 190.144C334.547 190.2 334.841 190.242 335.121 190.242C335.793 190.242 336.143 190.116 336.451 189.416L333.959 182.864H336.045L336.703 185.3C336.899 186.042 337.137 186.896 337.347 187.708H337.585C337.795 186.882 338.019 186.056 338.187 185.342L338.803 182.864H340.847L338.229 189.528C337.585 191.152 336.745 191.852 335.079 191.852ZM344.56 189.696C342.404 189.696 341.13 188.366 341.13 186.182C341.13 183.97 342.446 182.682 344.56 182.682C346.632 182.682 347.962 183.97 347.962 186.182C347.962 188.366 346.674 189.696 344.56 189.696ZM344.546 184.278C343.496 184.278 343.034 184.964 343.034 186.168C343.034 187.372 343.468 188.072 344.546 188.072C345.61 188.072 346.058 187.372 346.058 186.168C346.058 184.964 345.596 184.278 344.546 184.278ZM349.335 187.414V184.376H348.523V182.864H349.335V181.156H351.239V182.864H352.989V184.376H351.239V187.106C351.239 187.638 351.435 187.904 352.009 187.904C352.303 187.904 352.625 187.82 352.877 187.736L353.087 189.444C352.583 189.598 352.247 189.696 351.519 189.696C349.979 189.696 349.335 188.674 349.335 187.414ZM357.152 189.696C354.996 189.696 353.722 188.366 353.722 186.182C353.722 183.97 355.038 182.682 357.152 182.682C359.224 182.682 360.554 183.97 360.554 186.182C360.554 188.366 359.266 189.696 357.152 189.696ZM357.138 184.278C356.088 184.278 355.626 184.964 355.626 186.168C355.626 187.372 356.06 188.072 357.138 188.072C358.202 188.072 358.65 187.372 358.65 186.168C358.65 184.964 358.188 184.278 357.138 184.278ZM366.561 189.5L364.909 186.21H364.685L363.061 189.5H360.947V189.346L363.453 185.174L360.989 181.254V181.1H363.215L364.881 184.292H365.105L366.631 181.1H368.745V181.254L366.281 185.412L368.801 189.346V189.5H366.561ZM375.451 182.766H374.135V187.848H375.521C377.271 187.848 377.943 186.966 377.943 185.202C377.943 183.424 377.229 182.766 375.451 182.766ZM372.119 189.5V181.1H375.703C378.657 181.1 379.959 182.57 379.959 185.202C379.959 187.862 378.363 189.5 375.675 189.5H372.119ZM381.006 189.5V181.1H387.362V182.85H383.036V184.474H387.012V186.042H383.036V187.75H387.348V189.5H381.006ZM393.59 189.5L391.938 186.21H391.714L390.09 189.5H387.976V189.346L390.482 185.174L388.018 181.254V181.1H390.244L391.91 184.292H392.134L393.66 181.1H395.774V181.254L393.31 185.412L395.83 189.346V189.5H393.59Z","fill","white",2,"fill","white","fill-opacity","1"],["width","98","height","67","transform","translate(420.782 150.5)","fill","#15A4A1",2,"fill","#15A4A1","fill","color(display-p3 0.0824 0.6431 0.6314)","fill-opacity","1"],["d","M439.526 181.1V187.694H443.124V189.5H437.51V181.1H439.526ZM446.479 188.184C447.347 188.184 447.893 187.666 447.893 186.952V186.686H446.521C445.905 186.686 445.513 186.966 445.513 187.428C445.513 187.848 445.751 188.184 446.479 188.184ZM447.991 189.5V187.918H447.823C447.487 188.968 446.787 189.64 445.653 189.64C444.533 189.64 443.707 189.066 443.707 187.764C443.707 186.574 444.407 185.748 446.157 185.748H447.893V185.286C447.893 184.6 447.599 184.208 446.871 184.208C446.241 184.208 445.877 184.516 445.751 185.16L443.959 184.754C444.183 183.55 445.107 182.696 446.941 182.696C448.957 182.696 449.783 183.62 449.783 185.286V189.5H447.991ZM455.368 189.5V187.736H455.228C454.85 189.024 454.038 189.696 452.988 189.696C451.728 189.696 451.084 188.8 451.084 187.358V182.864H452.988V186.826C452.988 187.512 453.296 187.974 453.996 187.974C454.808 187.974 455.312 187.4 455.312 186.56V182.864H457.23V189.5H455.368ZM460.481 185.804V189.5H458.577V182.864H460.439V184.642H460.565C460.957 183.354 461.769 182.682 462.805 182.682C464.079 182.682 464.723 183.564 464.723 185.006V189.5H462.819V185.538C462.819 184.866 462.511 184.404 461.811 184.404C460.999 184.404 460.481 184.978 460.481 185.804ZM470.383 185.566C470.215 184.852 469.907 184.348 469.067 184.348C468.185 184.348 467.639 184.908 467.639 186.168C467.639 187.344 468.115 188.03 469.095 188.03C469.949 188.03 470.271 187.456 470.411 186.77L472.161 187.19C471.937 188.73 470.999 189.696 469.109 189.696C467.009 189.696 465.693 188.534 465.693 186.266C465.693 184.012 466.981 182.682 469.095 182.682C471.069 182.682 471.909 183.62 472.147 185.23L470.383 185.566ZM475.124 185.804V189.5H473.22V180.512H475.124V184.642H475.236C475.628 183.368 476.398 182.682 477.476 182.682C478.736 182.682 479.366 183.564 479.366 185.006V189.5H477.462V185.538C477.462 184.866 477.14 184.404 476.454 184.404C475.642 184.404 475.124 184.978 475.124 185.804ZM483.905 188.016C484.829 188.016 485.235 187.414 485.235 186.196C485.235 184.978 484.829 184.404 483.919 184.404C483.079 184.404 482.561 185.006 482.561 185.958V186.476C482.561 187.4 483.093 188.016 483.905 188.016ZM487.111 186.196C487.111 188.478 486.257 189.696 484.829 189.696C483.723 189.696 483.009 188.926 482.673 187.764H482.561V191.628H480.657V182.864H482.561V184.544H482.687C483.037 183.382 483.765 182.682 484.829 182.682C486.285 182.682 487.111 183.914 487.111 186.196ZM490.544 188.184C491.412 188.184 491.958 187.666 491.958 186.952V186.686H490.586C489.97 186.686 489.578 186.966 489.578 187.428C489.578 187.848 489.816 188.184 490.544 188.184ZM492.056 189.5V187.918H491.888C491.552 188.968 490.852 189.64 489.718 189.64C488.598 189.64 487.772 189.066 487.772 187.764C487.772 186.574 488.472 185.748 490.222 185.748H491.958V185.286C491.958 184.6 491.664 184.208 490.936 184.208C490.306 184.208 489.942 184.516 489.816 185.16L488.024 184.754C488.248 183.55 489.172 182.696 491.006 182.696C493.022 182.696 493.848 183.62 493.848 185.286V189.5H492.056ZM498.061 188.016C498.859 188.016 499.405 187.428 499.405 186.504V185.986C499.405 185.02 498.887 184.404 498.047 184.404C497.137 184.404 496.717 184.992 496.717 186.238C496.717 187.428 497.123 188.016 498.061 188.016ZM499.405 189.5V187.764H499.293C498.957 188.926 498.229 189.696 497.123 189.696C495.695 189.696 494.855 188.478 494.855 186.238C494.855 183.928 495.695 182.682 497.151 182.682C498.215 182.682 498.929 183.382 499.279 184.544H499.405V180.512H501.309V189.5H499.405Z","fill","white",2,"fill","white","fill-opacity","1"],["width","79","height","67","transform","translate(526.782 150.5)","fill","#15A4A1",2,"fill","#15A4A1","fill","color(display-p3 0.0824 0.6431 0.6314)","fill-opacity","1"],["d","M545.526 181.1V187.694H549.124V189.5H543.51V181.1H545.526ZM553.095 184.11C552.227 184.11 551.737 184.558 551.639 185.65H554.411C554.383 184.614 553.949 184.11 553.095 184.11ZM553.123 189.682C551.121 189.682 549.749 188.576 549.749 186.322C549.749 184.026 550.995 182.682 553.151 182.682C555.195 182.682 556.161 183.886 556.161 185.72C556.161 186 556.147 186.266 556.119 186.616H551.625C551.737 187.68 552.227 188.156 553.137 188.156C554.033 188.156 554.313 187.736 554.481 187.232L556.077 187.666C555.783 188.814 555.013 189.682 553.123 189.682ZM559.112 185.804V189.5H557.208V182.864H559.07V184.642H559.196C559.588 183.354 560.4 182.682 561.436 182.682C562.71 182.682 563.354 183.564 563.354 185.006V189.5H561.45V185.538C561.45 184.866 561.142 184.404 560.442 184.404C559.63 184.404 559.112 184.978 559.112 185.804ZM567.529 188.016C568.327 188.016 568.873 187.428 568.873 186.504V185.986C568.873 185.02 568.355 184.404 567.515 184.404C566.605 184.404 566.185 184.992 566.185 186.238C566.185 187.428 566.591 188.016 567.529 188.016ZM568.873 189.5V187.764H568.761C568.425 188.926 567.697 189.696 566.591 189.696C565.163 189.696 564.323 188.478 564.323 186.238C564.323 183.928 565.163 182.682 566.619 182.682C567.683 182.682 568.397 183.382 568.747 184.544H568.873V180.512H570.777V189.5H568.873ZM574.126 181.926H572.138V180.554H574.126V181.926ZM574.084 189.5H572.18V182.864H574.084V189.5ZM577.391 185.804V189.5H575.487V182.864H577.349V184.642H577.475C577.867 183.354 578.679 182.682 579.715 182.682C580.989 182.682 581.633 183.564 581.633 185.006V189.5H579.729V185.538C579.729 184.866 579.421 184.404 578.721 184.404C577.909 184.404 577.391 184.978 577.391 185.804ZM585.641 184.306C584.703 184.306 584.367 184.712 584.367 185.244C584.367 185.776 584.689 186.182 585.641 186.182C586.607 186.182 586.943 185.776 586.943 185.244C586.943 184.698 586.551 184.306 585.641 184.306ZM585.725 190.634C587.349 190.634 587.727 190.396 587.727 189.934C587.727 189.612 587.503 189.388 586.971 189.388H584.717C584.129 189.388 583.779 189.668 583.779 189.99C583.779 190.438 584.129 190.634 585.725 190.634ZM589.197 189.878C589.197 191.264 588.287 191.964 585.599 191.964C583.065 191.964 582.351 191.446 582.351 190.62C582.351 190.018 583.009 189.612 583.905 189.43V189.346C583.191 189.248 582.883 188.898 582.883 188.436C582.883 188.058 583.177 187.722 583.723 187.484L584.213 187.232C583.219 186.91 582.673 186.21 582.673 185.174C582.673 183.69 583.793 182.864 585.683 182.864H589.043V184.292H588.315C587.993 184.292 587.573 184.278 587.041 184.222L587.027 184.376C587.853 184.53 588.553 184.838 588.553 185.608C588.553 186.714 587.503 187.428 585.641 187.428C585.235 187.428 584.857 187.386 584.535 187.316L584.423 187.498C584.353 187.624 584.297 187.75 584.297 187.862C584.297 188.1 584.465 188.198 584.885 188.198C585.613 188.198 586.369 188.156 587.055 188.156C588.525 188.156 589.197 188.8 589.197 189.878Z","fill","white",2,"fill","white","fill-opacity","1"],["width","90","height","67","transform","translate(159.782 225.5)","fill","#157575",2,"fill","#157575","fill","color(display-p3 0.0824 0.4588 0.4588)","fill-opacity","1"],["d","M178.526 256.1V262.694H182.124V264.5H176.51V256.1H178.526ZM188.755 264.5L188.181 262.638H184.933L184.359 264.5H182.273L185.213 256.1H187.985L190.911 264.5H188.755ZM185.717 260.132L185.395 261.168H187.719L187.397 260.132C187.159 259.376 186.935 258.592 186.739 257.836H186.403C186.193 258.592 185.955 259.376 185.717 260.132ZM193.524 264.5H191.508V256.1H193.524V264.5ZM196.978 257.948V256.1H203.838V257.948H201.416V264.5H199.4V257.948H196.978ZM207.794 264.696C205.638 264.696 204.364 263.366 204.364 261.182C204.364 258.97 205.68 257.682 207.794 257.682C209.866 257.682 211.196 258.97 211.196 261.182C211.196 263.366 209.908 264.696 207.794 264.696ZM207.78 259.278C206.73 259.278 206.268 259.964 206.268 261.168C206.268 262.372 206.702 263.072 207.78 263.072C208.844 263.072 209.292 262.372 209.292 261.168C209.292 259.964 208.83 259.278 207.78 259.278ZM214.152 255.512V260.454H214.67L216.364 257.864H218.534V258.018L216.168 261.098L218.674 264.346V264.5H216.504L214.642 261.84H214.152V264.5H212.248V255.512H214.152ZM222.285 259.11C221.417 259.11 220.927 259.558 220.829 260.65H223.601C223.573 259.614 223.139 259.11 222.285 259.11ZM222.313 264.682C220.311 264.682 218.939 263.576 218.939 261.322C218.939 259.026 220.185 257.682 222.341 257.682C224.385 257.682 225.351 258.886 225.351 260.72C225.351 261 225.337 261.266 225.309 261.616H220.815C220.927 262.68 221.417 263.156 222.327 263.156C223.223 263.156 223.503 262.736 223.671 262.232L225.267 262.666C224.973 263.814 224.203 264.682 222.313 264.682ZM228.301 260.804V264.5H226.397V257.864H228.259V259.642H228.385C228.777 258.354 229.589 257.682 230.625 257.682C231.899 257.682 232.543 258.564 232.543 260.006V264.5H230.639V260.538C230.639 259.866 230.331 259.404 229.631 259.404C228.819 259.404 228.301 259.978 228.301 260.804Z","fill","white",2,"fill","white","fill-opacity","1"],["width","116","height","67","transform","translate(257.782 225.5)","fill","#157575",2,"fill","#157575","fill","color(display-p3 0.0824 0.4588 0.4588)","fill-opacity","1"],["d","M277.842 257.766H276.526V262.848H277.912C279.662 262.848 280.334 261.966 280.334 260.202C280.334 258.424 279.62 257.766 277.842 257.766ZM274.51 264.5V256.1H278.094C281.048 256.1 282.35 257.57 282.35 260.202C282.35 262.862 280.754 264.5 278.066 264.5H274.51ZM289.038 264.5L288.464 262.638H285.216L284.642 264.5H282.556L285.496 256.1H288.268L291.194 264.5H289.038ZM286 260.132L285.678 261.168H288.002L287.68 260.132C287.442 259.376 287.218 258.592 287.022 257.836H286.686C286.476 258.592 286.238 259.376 286 260.132ZM291.245 257.948V256.1H298.105V257.948H295.683V264.5H293.667V257.948H291.245ZM302.734 262.904C304.036 262.904 304.4 262.218 304.4 261.098V256.1H306.43V261.252C306.43 263.464 305.128 264.682 302.734 264.682C300.34 264.682 299.01 263.464 299.01 261.252V256.1H301.026V261.07C301.026 262.19 301.404 262.904 302.734 262.904ZM309.704 260.986V264.5H307.842V256.1H311.118L312.168 259.348C312.336 259.88 312.63 260.944 312.868 261.938H313.106C313.33 260.944 313.61 259.866 313.806 259.278L314.856 256.1H317.88V264.5H315.864V260.986C315.864 259.964 315.92 258.746 315.948 257.738H315.738C315.458 258.83 315.108 260.104 314.688 261.35L313.708 264.052H311.846L310.908 261.294C310.488 259.978 310.166 258.802 309.9 257.738H309.69C309.704 258.76 309.704 259.95 309.704 260.986ZM321.351 257.948V256.1H328.211V257.948H325.789V264.5H323.773V257.948H321.351ZM332.168 264.696C330.012 264.696 328.738 263.366 328.738 261.182C328.738 258.97 330.054 257.682 332.168 257.682C334.24 257.682 335.57 258.97 335.57 261.182C335.57 263.366 334.282 264.696 332.168 264.696ZM332.154 259.278C331.104 259.278 330.642 259.964 330.642 261.168C330.642 262.372 331.076 263.072 332.154 263.072C333.218 263.072 333.666 262.372 333.666 261.168C333.666 259.964 333.204 259.278 332.154 259.278ZM338.525 255.512V260.454H339.043L340.737 257.864H342.907V258.018L340.541 261.098L343.047 264.346V264.5H340.877L339.015 261.84H338.525V264.5H336.621V255.512H338.525ZM346.658 259.11C345.79 259.11 345.3 259.558 345.202 260.65H347.974C347.946 259.614 347.512 259.11 346.658 259.11ZM346.686 264.682C344.684 264.682 343.312 263.576 343.312 261.322C343.312 259.026 344.558 257.682 346.714 257.682C348.758 257.682 349.724 258.886 349.724 260.72C349.724 261 349.71 261.266 349.682 261.616H345.188C345.3 262.68 345.79 263.156 346.7 263.156C347.596 263.156 347.876 262.736 348.044 262.232L349.64 262.666C349.346 263.814 348.576 264.682 346.686 264.682ZM352.674 260.804V264.5H350.77V257.864H352.632V259.642H352.758C353.15 258.354 353.962 257.682 354.998 257.682C356.272 257.682 356.916 258.564 356.916 260.006V264.5H355.012V260.538C355.012 259.866 354.704 259.404 354.004 259.404C353.192 259.404 352.674 259.978 352.674 260.804Z","fill","white",2,"fill","white","fill-opacity","1"],["width","137","height","67","transform","translate(381.782 225.5)","fill","#157575",2,"fill","#157575","fill","color(display-p3 0.0824 0.4588 0.4588)","fill-opacity","1"],["d","M401.842 257.766H400.526V262.848H401.912C403.662 262.848 404.334 261.966 404.334 260.202C404.334 258.424 403.62 257.766 401.842 257.766ZM398.51 264.5V256.1H402.094C405.048 256.1 406.35 257.57 406.35 260.202C406.35 262.862 404.754 264.5 402.066 264.5H398.51ZM409.762 263.184C410.63 263.184 411.176 262.666 411.176 261.952V261.686H409.804C409.188 261.686 408.796 261.966 408.796 262.428C408.796 262.848 409.034 263.184 409.762 263.184ZM411.274 264.5V262.918H411.106C410.77 263.968 410.07 264.64 408.936 264.64C407.816 264.64 406.99 264.066 406.99 262.764C406.99 261.574 407.69 260.748 409.44 260.748H411.176V260.286C411.176 259.6 410.882 259.208 410.154 259.208C409.524 259.208 409.16 259.516 409.034 260.16L407.242 259.754C407.466 258.55 408.39 257.696 410.224 257.696C412.24 257.696 413.066 258.62 413.066 260.286V264.5H411.274ZM414.745 262.414V259.376H413.933V257.864H414.745V256.156H416.649V257.864H418.399V259.376H416.649V262.106C416.649 262.638 416.845 262.904 417.419 262.904C417.713 262.904 418.035 262.82 418.287 262.736L418.497 264.444C417.993 264.598 417.657 264.696 416.929 264.696C415.389 264.696 414.745 263.674 414.745 262.414ZM421.862 263.184C422.73 263.184 423.276 262.666 423.276 261.952V261.686H421.904C421.288 261.686 420.896 261.966 420.896 262.428C420.896 262.848 421.134 263.184 421.862 263.184ZM423.374 264.5V262.918H423.206C422.87 263.968 422.17 264.64 421.036 264.64C419.916 264.64 419.09 264.066 419.09 262.764C419.09 261.574 419.79 260.748 421.54 260.748H423.276V260.286C423.276 259.6 422.982 259.208 422.254 259.208C421.624 259.208 421.26 259.516 421.134 260.16L419.342 259.754C419.566 258.55 420.49 257.696 422.324 257.696C424.34 257.696 425.166 258.62 425.166 260.286V264.5H423.374ZM432.846 264.696C430.242 264.696 428.744 263.044 428.744 260.272C428.744 257.514 430.354 255.904 432.902 255.904C435.114 255.904 436.444 257.08 436.696 259.166L434.778 259.544C434.554 258.312 434.008 257.668 432.846 257.668C431.362 257.668 430.746 258.802 430.746 260.272C430.746 261.938 431.376 262.96 432.832 262.96C434.064 262.96 434.568 262.302 434.82 261.056L436.724 261.378C436.472 263.478 435.086 264.696 432.846 264.696ZM440.182 263.184C441.05 263.184 441.596 262.666 441.596 261.952V261.686H440.224C439.608 261.686 439.216 261.966 439.216 262.428C439.216 262.848 439.454 263.184 440.182 263.184ZM441.694 264.5V262.918H441.526C441.19 263.968 440.49 264.64 439.356 264.64C438.236 264.64 437.41 264.066 437.41 262.764C437.41 261.574 438.11 260.748 439.86 260.748H441.596V260.286C441.596 259.6 441.302 259.208 440.574 259.208C439.944 259.208 439.58 259.516 439.454 260.16L437.662 259.754C437.886 258.55 438.81 257.696 440.644 257.696C442.66 257.696 443.486 258.62 443.486 260.286V264.5H441.694ZM448.063 263.016C448.987 263.016 449.393 262.414 449.393 261.196C449.393 259.978 448.987 259.404 448.077 259.404C447.237 259.404 446.719 260.006 446.719 260.958V261.476C446.719 262.4 447.251 263.016 448.063 263.016ZM451.269 261.196C451.269 263.478 450.415 264.696 448.987 264.696C447.881 264.696 447.167 263.926 446.831 262.764H446.719V266.628H444.815V257.864H446.719V259.544H446.845C447.195 258.382 447.923 257.682 448.987 257.682C450.443 257.682 451.269 258.914 451.269 261.196ZM455.01 264.696C452.77 264.696 452.084 263.8 451.902 262.596L453.61 262.246C453.778 262.974 454.226 263.352 455.052 263.352C455.696 263.352 456.018 263.142 456.032 262.708C456.032 262.302 455.766 262.078 454.548 261.84C452.728 261.448 452.112 260.846 452.112 259.712C452.112 258.438 453.022 257.682 454.898 257.682C456.83 257.682 457.46 258.438 457.698 259.6L456.004 259.95C455.85 259.264 455.542 258.998 454.856 258.998C454.226 258.998 453.918 259.208 453.918 259.6C453.918 259.964 454.1 260.23 455.29 260.468C457.362 260.902 457.866 261.588 457.866 262.624C457.866 263.912 457.012 264.696 455.01 264.696ZM463.112 264.5V262.736H462.972C462.594 264.024 461.782 264.696 460.732 264.696C459.472 264.696 458.828 263.8 458.828 262.358V257.864H460.732V261.826C460.732 262.512 461.04 262.974 461.74 262.974C462.552 262.974 463.056 262.4 463.056 261.56V257.864H464.974V264.5H463.112ZM468.253 255.512V264.5H466.349V255.512H468.253ZM472.654 259.11C471.786 259.11 471.296 259.558 471.198 260.65H473.97C473.942 259.614 473.508 259.11 472.654 259.11ZM472.682 264.682C470.68 264.682 469.308 263.576 469.308 261.322C469.308 259.026 470.554 257.682 472.71 257.682C474.754 257.682 475.72 258.886 475.72 260.72C475.72 261 475.706 261.266 475.678 261.616H471.184C471.296 262.68 471.786 263.156 472.696 263.156C473.592 263.156 473.872 262.736 474.04 262.232L475.636 262.666C475.342 263.814 474.572 264.682 472.682 264.682ZM484.363 264.5L482.655 261.182C482.263 260.37 481.689 258.97 481.297 257.892L481.073 257.92C481.157 259.166 481.241 260.944 481.241 261.966V264.5H479.365V256.1H482.221L483.691 258.914C484.223 259.95 484.783 261.392 485.119 262.4L485.343 262.372C485.245 261.154 485.175 259.684 485.175 258.69V256.1H487.037V264.5H484.363ZM494.197 261.812H490.501V264.5H488.485V256.1H494.561V257.948H490.501V260.062H494.197V261.812ZM495.103 257.948V256.1H501.963V257.948H499.541V264.5H497.525V257.948H495.103Z","fill","white",2,"fill","white","fill-opacity","1"],["width","145","height","67","transform","translate(159.782 300.5)","fill","#154547",2,"fill","#154547","fill","color(display-p3 0.0824 0.2706 0.2784)","fill-opacity","1"],["d","M178.526 331.1V337.694H182.124V339.5H176.51V331.1H178.526ZM185.479 338.184C186.347 338.184 186.893 337.666 186.893 336.952V336.686H185.521C184.905 336.686 184.513 336.966 184.513 337.428C184.513 337.848 184.751 338.184 185.479 338.184ZM186.991 339.5V337.918H186.823C186.487 338.968 185.787 339.64 184.653 339.64C183.533 339.64 182.707 339.066 182.707 337.764C182.707 336.574 183.407 335.748 185.157 335.748H186.893V335.286C186.893 334.6 186.599 334.208 185.871 334.208C185.241 334.208 184.877 334.516 184.751 335.16L182.959 334.754C183.183 333.55 184.107 332.696 185.941 332.696C187.957 332.696 188.783 333.62 188.783 335.286V339.5H186.991ZM190.616 341.852C190.154 341.852 189.874 341.81 189.524 341.754L189.804 340.144C190.084 340.2 190.378 340.242 190.658 340.242C191.33 340.242 191.68 340.116 191.988 339.416L189.496 332.864H191.582L192.24 335.3C192.436 336.042 192.674 336.896 192.884 337.708H193.122C193.332 336.882 193.556 336.056 193.724 335.342L194.34 332.864H196.384L193.766 339.528C193.122 341.152 192.282 341.852 190.616 341.852ZM200.013 334.11C199.145 334.11 198.655 334.558 198.557 335.65H201.329C201.301 334.614 200.867 334.11 200.013 334.11ZM200.041 339.682C198.039 339.682 196.667 338.576 196.667 336.322C196.667 334.026 197.913 332.682 200.069 332.682C202.113 332.682 203.079 333.886 203.079 335.72C203.079 336 203.065 336.266 203.037 336.616H198.543C198.655 337.68 199.145 338.156 200.055 338.156C200.951 338.156 201.231 337.736 201.399 337.232L202.995 337.666C202.701 338.814 201.931 339.682 200.041 339.682ZM206.03 339.5H204.126V332.864H205.932V335.02H206.086C206.506 333.172 207.066 332.794 207.934 332.794H208.13V334.978H207.738C206.408 334.978 206.03 335.37 206.03 336.546V339.5ZM214.718 339.5L214.144 337.638H210.896L210.322 339.5H208.236L211.176 331.1H213.948L216.874 339.5H214.718ZM211.68 335.132L211.358 336.168H213.682L213.36 335.132C213.122 334.376 212.898 333.592 212.702 332.836H212.366C212.156 333.592 211.918 334.376 211.68 335.132ZM219.347 330.512V339.5H217.443V330.512H219.347ZM227.228 336.042H225.352V338.016H227.284C228.082 338.016 228.446 337.624 228.446 337.022C228.446 336.378 228.166 336.042 227.228 336.042ZM227.018 332.64H225.352V334.67H226.962C227.746 334.67 228.18 334.39 228.18 333.62C228.18 332.948 227.858 332.64 227.018 332.64ZM223.336 339.5V331.1H227.004C229.16 331.1 230.098 331.786 230.098 333.242C230.098 334.348 229.468 334.964 228.334 335.216V335.342C229.874 335.496 230.448 336.014 230.448 337.204C230.448 338.576 229.566 339.5 227.354 339.5H223.336ZM233.333 330.512V339.5H231.429V330.512H233.333ZM237.818 339.696C235.662 339.696 234.388 338.366 234.388 336.182C234.388 333.97 235.704 332.682 237.818 332.682C239.89 332.682 241.22 333.97 241.22 336.182C241.22 338.366 239.932 339.696 237.818 339.696ZM237.804 334.278C236.754 334.278 236.292 334.964 236.292 336.168C236.292 337.372 236.726 338.072 237.804 338.072C238.868 338.072 239.316 337.372 239.316 336.168C239.316 334.964 238.854 334.278 237.804 334.278ZM246.611 335.566C246.443 334.852 246.135 334.348 245.295 334.348C244.413 334.348 243.867 334.908 243.867 336.168C243.867 337.344 244.343 338.03 245.323 338.03C246.177 338.03 246.499 337.456 246.639 336.77L248.389 337.19C248.165 338.73 247.227 339.696 245.337 339.696C243.237 339.696 241.921 338.534 241.921 336.266C241.921 334.012 243.209 332.682 245.323 332.682C247.297 332.682 248.137 333.62 248.375 335.23L246.611 335.566ZM251.38 330.512V335.454H251.898L253.592 332.864H255.762V333.018L253.396 336.098L255.902 339.346V339.5H253.732L251.87 336.84H251.38V339.5H249.476V330.512H251.38ZM260.857 335.566C260.689 334.852 260.381 334.348 259.541 334.348C258.659 334.348 258.113 334.908 258.113 336.168C258.113 337.344 258.589 338.03 259.569 338.03C260.423 338.03 260.745 337.456 260.885 336.77L262.635 337.19C262.411 338.73 261.473 339.696 259.583 339.696C257.483 339.696 256.167 338.534 256.167 336.266C256.167 334.012 257.455 332.682 259.569 332.682C261.543 332.682 262.383 333.62 262.621 335.23L260.857 335.566ZM265.598 335.804V339.5H263.694V330.512H265.598V334.642H265.71C266.102 333.368 266.872 332.682 267.95 332.682C269.21 332.682 269.84 333.564 269.84 335.006V339.5H267.936V335.538C267.936 334.866 267.614 334.404 266.928 334.404C266.116 334.404 265.598 334.978 265.598 335.804ZM273.54 338.184C274.408 338.184 274.954 337.666 274.954 336.952V336.686H273.582C272.966 336.686 272.574 336.966 272.574 337.428C272.574 337.848 272.812 338.184 273.54 338.184ZM275.052 339.5V337.918H274.884C274.548 338.968 273.848 339.64 272.714 339.64C271.594 339.64 270.768 339.066 270.768 337.764C270.768 336.574 271.468 335.748 273.218 335.748H274.954V335.286C274.954 334.6 274.66 334.208 273.932 334.208C273.302 334.208 272.938 334.516 272.812 335.16L271.02 334.754C271.244 333.55 272.168 332.696 274.002 332.696C276.018 332.696 276.844 333.62 276.844 335.286V339.5H275.052ZM280.175 331.926H278.187V330.554H280.175V331.926ZM280.133 339.5H278.229V332.864H280.133V339.5ZM283.44 335.804V339.5H281.536V332.864H283.398V334.642H283.524C283.916 333.354 284.728 332.682 285.764 332.682C287.038 332.682 287.682 333.564 287.682 335.006V339.5H285.778V335.538C285.778 334.866 285.47 334.404 284.77 334.404C283.958 334.404 283.44 334.978 283.44 335.804Z","fill","white",2,"fill","white","fill-opacity","1"]],template:function(i,s){i&1&&(Gc(),we(0,"svg",0),rt(1,"rect",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"rect",5)(6,"path",6)(7,"rect",7)(8,"path",8)(9,"rect",9)(10,"path",10)(11,"rect",11)(12,"path",12)(13,"rect",13)(14,"path",14)(15,"rect",15)(16,"path",16)(17,"rect",17)(18,"path",18)(19,"rect",19)(20,"path",20)(21,"rect",21)(22,"path",22)(23,"rect",23)(24,"path",24)(25,"rect",25)(26,"path",26)(27,"rect",27)(28,"path",28)(29,"rect",29)(30,"path",30)(31,"rect",31)(32,"path",32)(33,"rect",33)(34,"path",34)(35,"rect",35)(36,"path",36),ve())},encapsulation:2,changeDetection:0});let t=e;return t})();function YQe(t,e){if(t&1){let r=Tf();we(0,"button",10),zn("click",function(){let s=If(r).$implicit,o=ss();return Af(o.selectedTab.set(s))}),je(1),et(2,"transloco"),ve()}if(t&2){let r=e.$implicit,n=ss();Ht("ngClass",n.selectedTab()===r?"border-b-black":"border-b-transparent"),Ie(),Bt(" ",it(2,2,"landingPage.section3."+r)," ")}}function QQe(t,e){t&1&&(we(0,"p",11)(1,"b"),je(2,"LayerAI: The Technology Ecosystem for the Data-First Age \u{1F9EC}"),ve(),rt(3,"br")(4,"br"),je(5," Just as water powers agriculture, data powers AI. While AI companies focus on effectively using data, LayerAI supplies inputs for the expansion of AI. "),rt(6,"br")(7,"br"),je(8," Two problems make the data market inefficient: either data is not collected or data is collected by abusing privacy rights. "),rt(9,"br")(10,"br"),je(11," By incentivizing users & developers, LayerAI builds an economy capable of backing the new age of data. "),rt(12,"br")(13,"br"),we(14,"b"),je(15,"\u{1F310} Vital Assets Backing the Decentralized Data Economy"),ve(),rt(16,"br")(17,"br"),je(18," LayerAI creates the first ever decentralized data economy. This encapsulates a monumental shift in data ownership and monetization. "),rt(19,"br")(20,"br"),je(21," $LAI represents utility and governance, $DATUM rewards, and Data Capsules enable data as a decentralized asset class. "),rt(22,"br")(23,"br"),je(24," LayerAI is shaping the best way forward for the trillion-dollar data & AI market of the future. "),ve())}function XQe(t,e){if(t&1&&(we(0,"p",11),je(1),et(2,"transloco"),ve()),t&2){let r=ss();Ie(),Bt(" ",it(2,1,"landingPage.section3."+r.selectedTab()+"Text")," ")}}function eXe(t,e){if(t&1){let r=Tf();we(0,"button",12),zn("click",function(){let s=If(r).$implicit,o=ss();return Af(o.selectedTab.set(s))}),rt(1,"div",13),ve()}if(t&2){let r=e.$implicit,n=ss();Ht("ngClass",n.selectedTab()===r?"border-black/25":"border-transparent"),Ie(),Ht("ngClass",n.selectedTab()===r?"bg-black":"bg-black/25")}}var ahe=(()=>{let e=class e{constructor(){this.tabs=["ecosystem","dataOptimized","decentralizedSequencing","lowGas"],this.selectedTab=Zc(this.tabs.at(0))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-section-3"]],standalone:!0,features:[cr],decls:18,vars:9,consts:[[1,"min-h-dvh","border-b","border-b-black/10"],[1,"flex","flex-col","container"],[1,"mt-[103px]","max-w-[794px]"],[1,"mt-14","flex","gap-[60px]","border-b","border-b-black/10","overflow-x-auto"],["class","px-2.5 py-8 font-Guardian-Sans font-medium text-xl/[22px] border-b-2",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"mt-[70px]","flex","gap-[70px]","-lg:flex-wrap"],[1,"flex-1","flex","flex-col","gap-8","items-center"],["class","font-Guardian-Sans text-lg"],[1,"mt-auto","flex","mb-4"],["class","p-2.5 border rounded-full",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"px-2.5","py-8","font-Guardian-Sans","font-medium","text-xl/[22px]","border-b-2",3,"ngClass","click"],[1,"font-Guardian-Sans","text-lg"],[1,"p-2.5","border","rounded-full",3,"ngClass","click"],[1,"w-[11px]","h-[11px]","rounded-full",3,"ngClass"]],template:function(i,s){i&1&&(we(0,"div",0)(1,"div",1)(2,"h1",2),je(3),et(4,"transloco"),ve(),we(5,"div",3),_s(6,YQe,3,4,"button",4),ve(),we(7,"div",5)(8,"div",6)(9,"h1"),je(10),et(11,"transloco"),ve(),_s(12,QQe,25,0,"p",7)(13,XQe,3,3),we(14,"div",8),_s(15,eXe,2,2,"button",9),ve()(),we(16,"div"),rt(17,"app-ecosystem"),ve()()()()),i&2&&(Ie(3),Bt(" ",it(4,5,"landingPage.section3.title")," "),Ie(3),Ht("ngForOf",s.tabs),Ie(4),ln(it(11,7,"landingPage.section3."+s.selectedTab())),Ie(2),s_(12,s.selectedTab()=="ecosystem"?12:13),Ie(3),Ht("ngForOf",s.tabs))},dependencies:[f_,dg,qi,ohe],encapsulation:2,changeDetection:0});let t=e;return t})();function tXe(t,e){if(t&1){let r=Tf();we(0,"button",27),zn("click",function(){let s=If(r).$implicit,o=ss();return Af(o.selectedTab.set(s))}),je(1),et(2,"transloco"),ve()}if(t&2){let r=e.$implicit,n=ss();Ht("ngClass",n.selectedTab()===r?"border-b-white":"border-b-transparent"),Ie(),Bt(" ",it(2,2,"landingPage.section4."+r)," ")}}function rXe(t,e){t&1&&rt(0,"img",28)}function nXe(t,e){t&1&&rt(0,"img",29)}function iXe(t,e){t&1&&rt(0,"img",30)}function sXe(t,e){t&1&&rt(0,"img",31)}function oXe(t,e){if(t&1){let r=Tf();we(0,"button",32),zn("click",function(){let s=If(r).$implicit,o=ss();return Af(o.selectedTab.set(s))}),rt(1,"div",33),ve()}if(t&2){let r=e.$implicit,n=ss();Ht("ngClass",n.selectedTab()===r?"border-white/25":"border-transparent"),Ie(),Ht("ngClass",n.selectedTab()===r?"bg-white":"bg-white/25")}}function aXe(t,e){t&1&&(we(0,"a",34),je(1),et(2,"transloco"),ve()),t&2&&(Ie(),Bt(" ",it(2,1,"landingPage.section4.visitTheLayerEconomy")," "))}function cXe(t,e){t&1&&(we(0,"a",35),je(1),et(2,"transloco"),ve()),t&2&&(Ie(),Bt(" ",it(2,1,"landingPage.section4.exploreKyotoX")," "))}function lXe(t,e){t&1&&(we(0,"a",36),je(1),et(2,"transloco"),ve()),t&2&&(Ie(),Bt(" ",it(2,1,"landingPage.section4.downloadLayerVPN")," "))}function uXe(t,e){t&1&&(we(0,"a",37),je(1),et(2,"transloco"),ve()),t&2&&(Ie(),Bt(" ",it(2,1,"landingPage.section4.download")," "))}function fXe(t,e){t&1&&(we(0,"a",38),je(1),et(2,"transloco"),ve()),t&2&&(Ie(),Bt(" ",it(2,1,"landingPage.section4.download")," "))}function dXe(t,e){t&1&&(we(0,"a",39),je(1),et(2,"transloco"),ve()),t&2&&(Ie(),Bt(" ",it(2,1,"landingPage.section4.download")," "))}var che=(()=>{let e=class e{constructor(n){this.walletConnectService=n,this.tabs=["layerEconomy","kyotoX","layerVPN","layerMarketplace","browseWeb3","layerAiCompute"],this.selectedTab=Zc(this.tabs.at(0))}integrate(){this.walletConnectService.open()}};e.\u0275fac=function(i){return new(i||e)(Mr(ia))},e.\u0275cmp=ar({type:e,selectors:[["app-section-4"]],standalone:!0,features:[cr],decls:39,vars:32,consts:[[1,"min-h-dvh","bg-black"],[1,"flex","flex-col","container"],[1,"flex","justify-between","items-start","mt-[109px]","flex-wrap"],[1,"max-w-[752px]","text-white","mb-4"],[1,"px-8","py-4","mb-4","border","border-white","rounded-full","text-white","text-base/[1.125]","font-medium","font-Guardian-Sans",3,"click"],[1,"mt-14","flex","gap-[60px]","border-b","border-b-white/20","overflow-x-auto"],["class","px-2.5 py-8 font-Guardian-Sans font-medium text-xl/[22px] text-white border-b-2",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"flex","flex-wrap"],[1,"flex-1","flex","flex-col","pt-[100px]"],[1,"font-Guardian-Sans","text-lg","text-white"],[1,"text-white","mt-9"],[1,"font-Guardian-Sans","text-lg","text-white","mt-10"],[3,"ngSwitch"],["src","assets/images/layer-economy.png",4,"ngSwitchCase"],["src","assets/images/kyoto-x.png",4,"ngSwitchCase"],["src","assets/images/layer-vpn.png",4,"ngSwitchCase"],["src","assets/images/layer-marketplace.png",4,"ngSwitchCase"],[1,"flex","items-center","justify-between","pb-4"],[1,"flex"],["class","p-2.5 border rounded-full",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"font-Guardian-Sans","text-sm/[28px]","text-white","underline",3,"ngSwitch"],["href","https://layerai.org","target","_blank",4,"ngSwitchCase"],["href","https://app.kyotox.com/","target","_blank",4,"ngSwitchCase"],["href","https://www.layervpn.com/","target","_blank",4,"ngSwitchCase"],["href","https://layerai.org","target","_blank","class","px-8 py-4 border border-white rounded-full text-white text-base/[1.125] font-medium font-Guardian-Sans",4,"ngSwitchCase"],["href","https://app.kyotox.com/","target","_blank","class","px-8 py-4 border border-white rounded-full text-white text-base/[1.125] font-medium font-Guardian-Sans",4,"ngSwitchCase"],["href","https://www.layervpn.com/","target","_blank","class","px-8 py-4 border border-white rounded-full text-white text-base/[1.125] font-medium font-Guardian-Sans",4,"ngSwitchCase"],[1,"px-2.5","py-8","font-Guardian-Sans","font-medium","text-xl/[22px]","text-white","border-b-2",3,"ngClass","click"],["src","assets/images/layer-economy.png"],["src","assets/images/kyoto-x.png"],["src","assets/images/layer-vpn.png"],["src","assets/images/layer-marketplace.png"],[1,"p-2.5","border","rounded-full",3,"ngClass","click"],[1,"w-[11px]","h-[11px]","rounded-full",3,"ngClass"],["href","https://layerai.org","target","_blank"],["href","https://app.kyotox.com/","target","_blank"],["href","https://www.layervpn.com/","target","_blank"],["href","https://layerai.org","target","_blank",1,"px-8","py-4","border","border-white","rounded-full","text-white","text-base/[1.125]","font-medium","font-Guardian-Sans"],["href","https://app.kyotox.com/","target","_blank",1,"px-8","py-4","border","border-white","rounded-full","text-white","text-base/[1.125]","font-medium","font-Guardian-Sans"],["href","https://www.layervpn.com/","target","_blank",1,"px-8","py-4","border","border-white","rounded-full","text-white","text-base/[1.125]","font-medium","font-Guardian-Sans"]],template:function(i,s){i&1&&(we(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),je(4),et(5,"transloco"),ve(),we(6,"button",4),zn("click",function(){return s.integrate()}),je(7),et(8,"transloco"),ve()(),we(9,"div",5),_s(10,tXe,3,4,"button",6),ve(),we(11,"div",7)(12,"div",8)(13,"span",9),je(14),et(15,"uppercase"),et(16,"transloco"),ve(),we(17,"h1",10),je(18),et(19,"transloco"),ve(),we(20,"p",11),je(21),et(22,"transloco"),ve()(),we(23,"div",12),_s(24,rXe,1,0,"img",13)(25,nXe,1,0,"img",14)(26,iXe,1,0,"img",15)(27,sXe,1,0,"img",16),ve()(),we(28,"div",17)(29,"div",18),_s(30,oXe,2,2,"button",19),ve(),we(31,"div",20),_s(32,aXe,3,3,"a",21)(33,cXe,3,3,"a",22)(34,lXe,3,3,"a",23),ve(),kD(35,12),_s(36,uXe,3,3,"a",24)(37,fXe,3,3,"a",25)(38,dXe,3,3,"a",26),LD(),ve()()()),i&2&&(Ie(4),Bt(" ",it(5,20,"landingPage.section4.title")," "),Ie(3),Bt(" ",it(8,22,"landingPage.section4.clickToIntegrate")," "),Ie(3),Ht("ngForOf",s.tabs),Ie(4),ln(it(15,24,it(16,26,"landingPage.section4."+s.selectedTab()))),Ie(4),ln(it(19,28,"landingPage.section4."+s.selectedTab()+"Title")),Ie(3),Bt(" ",it(22,30,"landingPage.section4."+s.selectedTab()+"Text")," "),Ie(2),Ht("ngSwitch",s.selectedTab()),Ie(),Ht("ngSwitchCase","layerEconomy"),Ie(),Ht("ngSwitchCase","kyotoX"),Ie(),Ht("ngSwitchCase","layerVPN"),Ie(),Ht("ngSwitchCase","layerMarketplace"),Ie(3),Ht("ngForOf",s.tabs),Ie(),Ht("ngSwitch",s.selectedTab()),Ie(),Ht("ngSwitchCase","layerEconomy"),Ie(),Ht("ngSwitchCase","kyotoX"),Ie(),Ht("ngSwitchCase","layerVPN"),Ie(),Ht("ngSwitch",s.selectedTab()),Ie(),Ht("ngSwitchCase","layerEconomy"),Ie(),Ht("ngSwitchCase","kyotoX"),Ie(),Ht("ngSwitchCase","layerVPN"))},dependencies:[qi,Pf,dg,f_,GD,$$],encapsulation:2,changeDetection:0});let t=e;return t})();Hc();function hXe(t,e){t&1&&(we(0,"div",6),rt(1,"app-loader"),ve())}function pXe(t,e){if(t&1){let r=Tf();we(0,"button",4),zn("click",function(){If(r);let i=ss();return Af(i.handleClick())}),je(1),_s(2,hXe,2,0,"div",5),ve()}if(t&2){let r=ss();Ht("ngClass",r.disabled?"text-black/25 border-black/25":"text-white border-white")("disabled",r.disabled),Ie(),Bt(" ",r.buttonText," "),Ie(),Ht("ngIf",r.isLoading())}}var mXe=["*"],Zd,QL=(Zd=class{constructor(){this.disabled=!1,this.hideButton=!1,this.isLoading=Zc(!1)}handleClick(){this.isLoading.set(!0),this.onButtonClick?.pipe(qd(this)).subscribe({next:()=>{this.isLoading.set(!1)},error:e=>{console.error(e),this.isLoading.set(!1)},complete:()=>{this.isLoading.set(!1)}})}get showButton(){return!this.hideButton}},Zd.\u0275fac=function(r){return new(r||Zd)},Zd.\u0275cmp=ar({type:Zd,selectors:[["app-section-5-item"]],inputs:{title:"title",buttonText:"buttonText",disabled:"disabled",hideButton:"hideButton",onButtonClick:"onButtonClick"},standalone:!0,features:[cr],ngContentSelectors:mXe,decls:7,vars:7,consts:[[1,"h-full","flex","flex-col",3,"ngClass"],[1,"p-[34px]","border-b",3,"ngClass"],[1,"font-Guardian-Sans","font-medium","text-xl/[22px]",3,"ngClass"],["class","mt-9 ml-[34px] h-[52px] w-[180px] border rounded-full grid place-items-center font-Guardian-Sans font-medium text-base/[18px] relative",3,"ngClass","disabled","click",4,"ngIf"],[1,"mt-9","ml-[34px]","h-[52px]","w-[180px]","border","rounded-full","grid","place-items-center","font-Guardian-Sans","font-medium","text-base/[18px]","relative",3,"ngClass","disabled","click"],["class","absolute left-px top-px bottom-px right-px bg-black rounded-full grid place-items-center",4,"ngIf"],[1,"absolute","left-px","top-px","bottom-px","right-px","bg-black","rounded-full","grid","place-items-center"]],template:function(r,n){r&1&&(w$(),we(0,"div",0)(1,"div",1)(2,"span",2),je(3),et(4,"uppercase"),ve()(),_s(5,pXe,3,4,"button",3),v$(6),ve()),r&2&&(Ht("ngClass",n.disabled?"bg-[#2D2828]/5":"bg-black"),Ie(),Ht("ngClass",n.disabled?"border-b-black/15":"border-b-white/25"),Ie(),Ht("ngClass",n.disabled?"text-black":"text-white"),Ie(),Bt(" ",it(4,5,n.title)," "),Ie(2),Ht("ngIf",n.showButton))},dependencies:[V$,dg,Pf,rI],encapsulation:2,changeDetection:0}),Zd);QL=jc([$d()],QL);var lhe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-landing-page"]],standalone:!0,features:[cr],decls:6,vars:0,consts:[[1,"h-dvh","overflow-y-auto","md:snap-y","md:snap-mandatory"],[1,"block","snap-start","md:snap-always"]],template:function(i,s){i&1&&(we(0,"div",0),rt(1,"app-section-1",1)(2,"app-section-2",1)(3,"app-section-3",1)(4,"app-section-4",1)(5,"app-footer",1),ve())},dependencies:[Gde,she,ahe,che,lW],encapsulation:2,changeDetection:0});let t=e;return t})();var uhe=[{path:"",component:lhe}];var fhe=(()=>{let e=class e{constructor(){this.http=xe(sw)}getTranslation(n){return this.http.get(`/assets/i18n/${n}.json`)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Xe({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var dhe={providers:[Gq(uhe),nq(),cW({config:{availableLangs:["en"],defaultLang:"en",reRenderOnLangChange:!0,prodMode:!D$()},loader:fhe})]};var hhe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=ar({type:e,selectors:[["app-root"]],standalone:!0,features:[cr],decls:1,vars:0,template:function(i,s){i&1&&rt(0,"router-outlet")},dependencies:[jR],encapsulation:2,changeDetection:0});let t=e;return t})();fq(hhe,dhe).catch(t=>console.error(t));
