PageSourceSearch

https://inferno0x.com/assets/index-0b7d4b61.js

js inferno0x.com collected 2026-10-08 23:04:18 UTC 465,242 bytes, 38 lines download raw bytes

1import{i as uc,aB as Zi,aC as dt,o as j,aD as lc,aE as Yi,f as wr,aF as Np,aG as Lp,p as Pp}from"./index-fcdc5867.js";import{p as $p,h as Dp}from"./hooks.module-408dc32d.js";function Bp(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var fc={},jn={},Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.walletLogo=void 0;const jp=(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.3
1V33.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.7
1h-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 `}};Ki.walletLogo=jp;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.LINK_API_URL=void 0;Xi.LINK_API_URL="https://www.walletlink.org";var es={};Object.defineProperty(es,"__esModule",{value:!0});es.ScopedLocalStorage=void 0;class Fp{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(){const e=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const 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}`}}es.ScopedLocalStorage=Fp;var Qr={},_r={};Object.defineProperty(_r,"__esModule",{value:!0});const Wp=uc;function mu(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Hp(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let Vp=class extends Wp.EventEmitter{emit(e,...r){let n=e==="error";const 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;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")mu(s,this,r);else{const o=s.length,a=Hp(s);for(let c=0;c<o;c+=1)mu(a[c],this,r)}return!0}};_r.default=Vp;var ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.EVENTS=void 0;ln.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",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var qn={},hc={},Qt={},Up=Fn;Fn.default=Fn;Fn.stable=Df;Fn.stableStringify=Df;var Di="[...]",Pf="[Circular]",br=[],lr=[];function $f(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Fn(t,e,r,n){typeof n>"u"&&(n=$f()),Ba(t,"",0,[],void 0,0,n);var i;try{lr.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,Bf(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;br.length!==0;){var s=br.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Vr(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),br.push([n,r,e,i])):lr.push([e,r,t]):(n[r]=t,br.push([n,r,e]))}function Ba(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){Vr(Pf,t,e,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Vr(Di,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Vr(Di,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)Ba(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];Ba(t[u],u,a,n,t,s,o)}}n.pop()}}function zp(t,e){return t<e?-1:t>e?1:0}function Df(t,e,r,n){typeof n>"u"&&(n=$f());var i=ja(t,"",0,[],void 0,0,n)||t,s;try{lr.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,Bf(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;br.length!==0;){var o=br.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function ja(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){Vr(Pf,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Vr(Di,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Vr(Di,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)ja(t[a],a,a,n,t,s,o);else{var c={},u=Object.keys(t).sort(zp);for(a=0;a<u.length;a++){var l=u[a];ja(t[l],l,a,n,t,s,o),c[l]=t[l]}if(typeof i<"u")br.push([i,e,t]),i[e]=c;else return c}n.pop()}}function Bf(t){return t=typeof t<"u"?t:function(e,r){return r},function(e,r){if(lr.length>0)for(var n=0;n<lr.length;n++){var i=lr[n];if(i[1]===e&&i[0]===r){r=i[2],lr.splice(n,1);break}}return t.call(this,e,r)}}
1Object.defineProperty(Qt,"__esModule",{value:!0});Qt.EthereumProviderError=Qt.EthereumRpcError=void 0;const qp=Up;class jf 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(){const 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 qp.default(this.serialize(),Qp,2)}}Qt.EthereumRpcError=jf;class Gp extends jf{constructor(e,r,n){if(!Jp(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}Qt.EthereumProviderError=Gp;function Jp(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function Qp(t,e){if(e!=="[Circular]")return e}var dc={},Zt={};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.errorValues=Zt.errorCodes=void 0;Zt.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}};Zt.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."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Zt,r=Qt,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(h,g=i){if(Number.isInteger(h)){const v=h.toString();if(f(e.errorValues,v))return e.errorValues[v].message;if(u(h))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return g}t.getMessageFromCode=o;function a(h){if(!Number.isInteger(h))return!1;const g=h.toString();return!!(e.errorValues[g]||u(h))}t.isValidCode=a;function c(h,{fallbackError:g=s,shouldIncludeStack:v=!1}={}){var C,S;if(!g||!Number.isInteger(g.code)||typeof g.message!="string")throw new Error("Mu
1st provide fallback error with integer number code and string message.");if(h instanceof r.EthereumRpcError)return h.serialize();const b={};if(h&&typeof h=="object"&&!Array.isArray(h)&&f(h,"code")&&a(h.code)){const _=h;b.code=_.code,_.message&&typeof _.message=="string"?(b.message=_.message,f(_,"data")&&(b.data=_.data)):(b.message=o(b.code),b.data={originalError:l(h)})}else{b.code=g.code;const _=(C=h)===null||C===void 0?void 0:C.message;b.message=_&&typeof _=="string"?_:g.message,b.data={originalError:l(h)}}const y=(S=h)===null||S===void 0?void 0:S.stack;return v&&h&&y&&typeof y=="string"&&(b.stack=y),b}t.serializeError=c;function u(h){return h>=-32099&&h<=-32e3}function l(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function f(h,g){return Object.prototype.hasOwnProperty.call(h,g)}})(dc);var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.ethErrors=void 0;const pc=Qt,Ff=dc,Pe=Zt;ts.ethErrors={rpc:{parse:t=>Ye(Pe.errorCodes.rpc.parse,t),invalidRequest:t=>Ye(Pe.errorCodes.rpc.invalidRequest,t),invalidParams:t=>Ye(Pe.errorCodes.rpc.invalidParams,t),methodNotFound:t=>Ye(Pe.errorCodes.rpc.methodNotFound,t),internal:t=>Ye(Pe.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.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code 
1<= -32005');return Ye(e,t)},invalidInput:t=>Ye(Pe.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>Ye(Pe.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>Ye(Pe.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>Ye(Pe.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>Ye(Pe.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>Ye(Pe.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>xn(Pe.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>xn(Pe.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>xn(Pe.errorCodes.provider.unsupportedMethod,t),disconnected:t=>xn(Pe.errorCodes.provider.disconnected,t),chainDisconnected:t=>xn(Pe.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.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new pc.EthereumProviderError(e,r,n)}}};function Ye(t,e){const[r,n]=Wf(e);return new pc.EthereumRpcError(t,r||Ff.getMessageFromCode(t),n)}function xn(t,e){const[r,n]=Wf(e);return new pc.EthereumProviderError(t,r||Ff.getMessageFromCode(t),n)}function Wf(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;
1if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Qt;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=dc;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=ts;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Zt;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(hc);var de={},rs={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(rs);Object.defineProperty(de,"__esModule",{value:!0});de.EthereumAddressFromSignedMessageResponse=de.SubmitEthereumTransactionResponse=de.SignEthereumTransactionResponse=de.SignEthereumMessageResponse=de.isRequestEthereumAccountsResponse=de.SelectProviderResponse=de.WatchAssetReponse=de.RequestEthereumAccountsResponse=de.SwitchEthereumChainResponse=de.AddEthereumChainResponse=de.isErrorResponse=void 0;const Mt=rs;function Zp(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}de.isErrorResponse=Zp;function Yp(t){return{method:Mt.Web3Method.addEthereumChain,result:t}}de.AddEthereumChainResponse=Yp;function Kp(t){return{method:Mt.Web3Method.switchEthereumChain,result:t}}de.SwitchEthereumChainResponse=Kp;function Xp(t){return{method:Mt.Web3Method.requestEthereumAccounts,result:t}}de.RequestEthereumAccountsResponse=Xp;function e0(t){return{method:Mt.Web3Method.watchAsset,result:t}}de.WatchAssetReponse=e0;function t0(t){return{method:Mt.Web3Method.selectProvider,result:t}}de.SelectProviderResponse=t0;function r0(t){return t&&t.method===Mt.Web3Method.requestEthereumAccounts}de.isRequestEthereumAccountsResponse=r0;function n0(t){return{method:Mt.Web3Method.signEthereumMessage,result:t}}de.SignEthereumMessageResponse=n0;function i0(t){return{method:Mt.Web3Method.signEthereumTransaction,result:t}}de.SignEthereumTransactionResponse=i0;function s0(t){return{method:Mt.Web3Method.submitEthereumTransaction,result:t}}de.SubmitEthereumTransactionResponse=s0;function o0(t){return{method:Mt.Web3Method.ethereumAddressFromSignedMessage,result:t}}de.EthereumAddressFromSignedMessageResponse=o0;var fn={};Object.defineProperty(fn,"__esModule",{value:!0});fn.LIB_VERSION=void 0;fn.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=hc,r=de,n=fn;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(l){return l!==void 0?(0,e.getMessageFromCode)(l):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(l="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${l}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(l,f){const h=(0,e.serializeError)(o(l),{shouldIncludeStack:!0}),g=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");g.searchParams.set("version",n.LIB_VERSION),g.searchParams.set("co
1de",h.code.toString());const v=a(h.data,f);return v&&g.searchParams.set("method",v),g.searchParams.set("message",h.message),Object.assign(Object.assign({},h),{docUrl:g.href})}t.serializeError=s;function o(l){return typeof l=="string"?{message:l,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(l)?Object.assign(Object.assign({},l),{message:l.errorMessage,code:l.errorCode,data:{method:l.method,result:l.result}}):l}function a(l,f){var h;const g=(h=l)===null||h===void 0?void 0:h.method;if(g)return g;if(f!==void 0)return typeof f=="string"?f:Array.isArray(f)?f.length>0?f[0].method:void 0:f.method}function c(l){var f;if(typeof l=="number")return l;if(u(l))return(f=l.code)!==null&&f!==void 0?f:l.errorCode}t.getErrorCode=c;function u(l){return typeof l=="object"&&l!==null&&(typeof l.code=="number"||typeof l.errorCode=="number")}})(qn);var hn={},Hf={exports:{}},Fa={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(t,e){var r=Zi,n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof c=="string"?u.fill(a,c):u.fill(a):u.fill(0),u},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Fa,Fa.exports);var er=Fa.exports,Vf=er.Buffer;function ns(t,e){this._block=Vf.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}ns.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Vf.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};ns.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};ns.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var dn=ns,a0=dt,Uf=dn,c0=er.Buffer,u0=[1518500249,1859775393,-1894007588,-899497514],l0=new Array(80);function Gn(){this.init(),this._w=l0,Uf.call(this,64,56)}a0(Gn,Uf);Gn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function f0(t){return t<<5|t>>>27}function h0(t){return t<<30|t>>>2}function d0(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Gn.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),l=f0(r)+d0(u,n,i,s)+o+e[c]+u0[u]|0;o=s,s=i,i=h0(n),n=r,r=l}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};Gn.prototype._hash=function(){var t=c0.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};var p0=Gn,b0=dt,zf=dn,g0=er.Buffer,y0=[1518500249,1859775393,-1894007588,-899497514],v0=new Array(80);function Jn(){this.init(),this._w=v0,zf.call(this,64,56)}b0(Jn,zf);Jn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function m0(t){return t<<1|t>>>31}function w0(t){return t<<5|t>>>27}function _0(t){return t<<30|t>>>2}function S0(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Jn.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]=m0(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var u=~~(c/20),l=w0(r)+S0(u,n,i,s)+o+e[c]+y0[u]|0;o=s,s=i,i=_0(n),n=r,r=l}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};Jn.prototype._hash=function(){var t=g0.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};var E0=Jn,C0=dt,qf=dn,x0=er.Buffer,I0=[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,2756
1734187,3204031479,3329325298],R0=new Array(64);function Qn(){this.init(),this._w=R0,qf.call(this,64,56)}C0(Qn,qf);Qn.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 A0(t,e,r){return r^t&(e^r)}function M0(t,e,r){return t&e|r&(t|e)}function T0(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function k0(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function O0(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function N0(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Qn.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,l=0;l<16;++l)e[l]=t.readInt32BE(l*4);for(;l<64;++l)e[l]=N0(e[l-2])+e[l-7]+O0(e[l-15])+e[l-16]|0;for(var f=0;f<64;++f){var h=u+k0(o)+A0(o,a,c)+I0[f]+e[f]|0,g=T0(r)+M0(r,n,i)|0;u=c,c=a,a=o,o=s+h|0,s=i,i=n,n=r,r=h+g|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};Qn.prototype._hash=function(){var t=x0.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};var Gf=Qn,L0=dt,P0=Gf,$0=dn,D0=er.Buffer,B0=new Array(64);function is(){this.init(),this._w=B0,$0.call(this,64,56)}L0(is,P0);is.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};is.prototype._hash=function(){var t=D0.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};var j0=is,F0=dt,Jf=dn,W0=er.Buffer,wu=[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,
11126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],H0=new Array(160);function Zn(){this.init(),this._w=H0,Jf.call(this,128,112)}F0(Zn,Jf);Zn.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 _u(t,e,r){return r^t&(e^r)}function Su(t,e,r){return t&e|r&(t|e)}function Eu(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Cu(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function V0(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function U0(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function z0(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function q0(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ie(t,e){return t>>>0<e>>>0?1:0}Zn.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,l=this._al|0,f=this._bl|0,h=this._cl|0,g=this._dl|0,v=this._el|0,C=this._fl|0,S=this._gl|0,b=this._hl|0,y=0;y<32;y+=2)e[y]=t.readInt32BE(y*4),e[y+1]=t.readInt32BE(y*4+4);for(;y<160;y+=2){var _=e[y-30],x=e[y-15*2+1],E=V0(_,x),T=U0(x,_);_=e[y-2*2],x=e[y-2*2+1];var F=z0(_,x),D=q0(x,_),O=e[y-7*2],q=e[y-7*2+1],ae=e[y-16*2],Q=e[y-16*2+1],R=T+q|0,A=E+O+Ie(R,T)|0;R=R+D|0,A=A+F+Ie(R,D)|0,R=R+Q|0,A=A+ae+Ie(R,Q)|0,e[y]=A,e[y+1]=R}for(var N=0;N<160;N+=2){A=e[N],R=e[N+1];var L=Su(r,n,i),B=Su(l,f,h),$=Eu(r,l),H=Eu(l,r),Z=Cu(o,v),G=Cu(v,o),ie=wu[N],fe=wu[N+1],ue=_u(o,a,c),je=_u(v,C,S),m=b+G|0,w=u+Z+Ie(m,b)|0;m=m+je|0,w=w+ue+Ie(m,je)|0,m=m+fe|0,w=w+ie+Ie(m,fe)|0,m=m+R|0,w=w+A+Ie(m,R)|0;var k=H+B|0,U=$+L+Ie(k,H)|0;u=c,b=S,c=a,S=C,a=o,C=v,v=g+m|0,o=s+w+Ie(v,g)|0,s=i,g=h,i=n,h=f,n=r,f=l,l=m+k|0,r=w+U+Ie(l,m)|0}this._al=this._al+l|0,this._bl=this._bl+f|0,this._cl=this._cl+h|0,this._dl=this._dl+g|0,this._el=this._el+v|0,this._fl=this._fl+C|0,this._gl=this._gl+S|0,this._hl=this._hl+b|0,this._ah=this._ah+r+Ie(this._al,l)|0,this._bh=this._bh+n+Ie(this._bl,f)|0,this._ch=this._ch+i+Ie(this._cl,h)|0,this._dh=this._dh+s+Ie(this._dl,g)|0,this._eh=this._eh+o+Ie(this._el,v)|0,this._fh=this._fh+a+Ie(this._fl,C)|0,this._gh=this._gh+c+Ie(this._gl,S)|0,this._hh=this._hh+u+Ie(this._hl,b)|0};Zn.prototype._hash=function(){var t=W0.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};var Qf=Zn,G0=dt,J0=Qf,Q0=dn,Z0=er.Buffer,Y0=new Array(160);function ss(){this.init(),this._w=Y0,Q0.call(this,128,112)}G0(ss,J0);ss.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};ss.prototype._hash=function(){var t=Z0.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};var K0=ss,Sr=Hf.exports=function(e){e=e.toLowerCase();var r=Sr[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};Sr.sha=p0;Sr.sha1=E0;Sr.sha224=j0;Sr.sha256=Gf;Sr.sha384=K0;Sr.sha512=Qf;var X0=Hf.exports,W={},eb=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},xu=typeof Symbol<"u"&&Symbol,tb=eb,rb=function(){return typeof xu!="function"||typeof Symbol!="function"||typeof xu("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:tb()},Iu={foo:{}},nb=Object,ib=function(){return{__proto__:Iu}.foo===Iu.foo&&!({__proto__:null}instanceof nb)},sb="Function.prototype.bind called on incompatible ",ob=Object.prototype.toString,ab=Math.max,cb="[object Function]",Ru=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var s=0;s<r.length;s+=1)n[s+e.length]=r[s];return n},ub=function(e,r){for(var n=[],i=r||0,s=0;i<e.length;i+=1,s+=1)n[s]=e[i];return n},lb=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},fb=function(e){var r=this;if(typeof r!="function"||ob.apply(r)!==cb)throw new TypeError(sb+r);
1for(var n=ub(arguments,1),i,s=function(){if(this instanceof i){var l=r.apply(this,Ru(n,arguments));return Object(l)===l?l:this}return r.apply(e,Ru(n,arguments))},o=ab(0,r.length-n.length),a=[],c=0;c<o;c++)a[c]="$"+c;if(i=Function("binder","return function ("+lb(a,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i},hb=fb,bc=Function.prototype.bind||hb,db=Function.prototype.call,pb=Object.prototype.hasOwnProperty,bb=bc,gb=bb.call(db,pb),re,Zr=SyntaxError,Zf=Function,Ur=TypeError,Zo=function(t){try{return Zf('"use strict"; return ('+t+").constructor;")()}catch{}},dr=Object.getOwnPropertyDescriptor;if(dr)try{dr({},"")}catch{dr=null}var Yo=function(){throw new Ur},yb=dr?function(){try{return arguments.callee,Yo}catch{try{return dr(arguments,"callee").get}catch{return Yo}}}():Yo,Or=rb(),vb=ib(),Me=Object.getPrototypeOf||(vb?function(t){return t.__proto__}:null),jr={},mb=typeof Uint8Array>"u"||!Me?re:Me(Uint8Array),pr={"%AggregateError%":typeof AggregateError>"u"?re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?re:ArrayBuffer,"%ArrayIteratorPrototype%":Or&&Me?Me([][Symbol.iterator]()):re,"%AsyncFromSyncIteratorPrototype%":re,"%AsyncFunction%":jr,"%AsyncGenerator%":jr,"%AsyncGeneratorFunction%":jr,"%AsyncIteratorPrototype%":jr,"%Atomics%":typeof Atomics>"u"?re:Atomics,"%BigInt%":typeof BigInt>"u"?re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?re:FinalizationRegistry,"%Function%":Zf,"%GeneratorFunction%":jr,"%Int8Array%":typeof Int8Array>"u"?re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?re:Int16Array,"%Int32Array%":typeof Int32Array>
vendor: 4,741 bytes, line 1
1"u"?re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Or&&Me?Me(Me([][Symbol.iterator]())):re,"%JSON%":typeof JSON=="object"?JSON:re,"%Map%":typeof Map>"u"?re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Or||!Me?re:Me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?re:Promise,"%Proxy%":typeof Proxy>"u"?re:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Or||!Me?re:Me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Or&&Me?Me(""[Symbol.iterator]()):re,"%Symbol%":Or?Symbol:re,"%SyntaxError%":Zr,"%ThrowTypeError%":yb,"%TypedArray%":mb,"%TypeError%":Ur,"%Uint8Array%":typeof Uint8Array>"u"?re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?re:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?re:WeakSet};if(Me)try{null.error}catch(t){var wb=Me(Me(t));pr["%Error.prototype%"]=wb}var _b=function t(e){var r;if(e==="%AsyncFunction%")r=Zo("async function () {}");else if(e==="%GeneratorFunction%")r=Zo("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Zo("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Me&&(r=Me(i.prototype))}return pr[e]=r,r},Au={"%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"]},Yn=bc,Bi=gb,Sb=Yn.call(Function.call,Array.prototype.concat),Eb=Yn.call(Function.apply,Array.prototype.splice),Mu=Yn.call(Function.call,String.prototype.replace),ji=Yn.call(Function.call,String.prototype.slice),Cb=Yn.call(Function.call,RegExp.prototype.exec),xb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ib=/\\(\\)?/g,Rb=function(e){var r=ji(e,0,1),n=ji(e,-1);
1if(r==="%"&&n!=="%")throw new Zr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Zr("invalid intrinsic syntax, expected opening `%`");var i=[];return Mu(e,xb,function(s,o,a,c){i[i.length]=a?Mu(c,Ib,"$1"):o||s}),i},Ab=function(e,r){var n=e,i;if(Bi(Au,n)&&(i=Au[n],n="%"+i[0]+"%"),Bi(pr,n)){var s=pr[n];if(s===jr&&(s=_b(n)),typeof s>"u"&&!r)throw new Ur("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Zr("intrinsic "+e+" does not exist!")},Er=function(e,r){if(typeof e!="string"||e.length===0)throw new Ur("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ur('"allowMissing" argument must be a boolean');if(Cb(/^%?[^%]*%?$/,e)===null)throw new Zr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Rb(e),i=n.length>0?n[0]:"",s=Ab("%"+i+"%",r),o=s.name,a=s.value,c=!1,u=s.alias;u&&(i=u[0],Eb(n,Sb([0,1],u)));for(var l=1,f=!0;l<n.length;l+=1){var h=n[l],g=ji(h,0,1),v=ji(h,-1);if((g==='"'||g==="'"||g==="`"||v==='"'||v==="'"||v==="`")&&g!==v)throw new Zr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(c=!0),i+="."+h,o="%"+i+"%",Bi(pr,o))a=pr[o];else if(a!=null){if(!(h in a)){if(!r)throw new Ur("base intrinsic for "+e+" exists, but the property is not available.");return}if(dr&&l+1>=n.length){var C=dr(a,h);f=!!C,f&&"get"in C&&!("originalValue"in C.get)?a=C.get:a=a[h]}else f=Bi(a,h),a=a[h];f&&!c&&(pr[o]=a)}}return a},Yf={exports:{}},Mb=Er,Wa=Mb("%Object.defineProperty%",!0),Ha=function(){if(Wa)try{return Wa({},"a",{value:1}),!0}catch{return!1}return!1};Ha.hasArrayLengthDefineBug=function(){if(!Ha())return null;try{return Wa([],"length",{value:1}).length!==1}catch{return!0}};var Kf=Ha,Tb=Er,Oi=Tb("%Object.getOwnPropertyDescriptor%",!0);if(Oi)try{Oi([],"length")}catch{Oi=null}var Xf=Oi,kb=Kf(),gc=Er,On=kb&&gc("%Object.defineProperty%",!0);if(On)try{On({},"a",{value:1})}catch{On=!1}var Ob=gc("%SyntaxError%"),Nr=gc("%TypeError%"),Tu=Xf,Nb=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Nr("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Nr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Nr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Nr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Nr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Nr("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!Tu&&Tu(e,r);if(On)On(e,r,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)e[r]=n;else throw new Ob("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},eh=Er,ku=Nb,Lb=Kf(),Ou=Xf,Nu=eh("%TypeError%"),Pb=eh("%Math.floor%"),$b=function(e,r){if(typeof e!="function")throw new Nu("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Pb(r)!==r)throw new Nu("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&Ou){var o=Ou(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(Lb?ku(e,"length",r,!0,!0):ku(e,"length",r)),e};(function(t){var e=bc,r=Er,n=$b,i=r("%TypeError%"),s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(o,s),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var g=a(e,o,arguments);return n(g,1+u(0,h.length-(arguments.length-1)),!0)};var l=function(){return a(e,s,arguments)};c?c(t.exports,"apply",{value:l}):t.exports.apply=l})(Yf);var Db=Yf.exports,th=Er,rh=Db,Bb=rh(th("String.prototype.indexOf")),jb=function(e,r){var n=th(e,!!r);return typeof n=="function"&&Bb(e,".prototype.")>-1?rh(n):n},yc=typeof Map=="function"&&Map.prototype,Ko=Object.getOwnPropertyDescriptor&&yc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fi=yc&&Ko&&typeof Ko.get=="function"?Ko.get:null,Lu=yc&&Map.prototype.forEach,vc=typeof Set=="function"&&Set.prototype,Xo=Object.getOwnPropertyDescriptor&&vc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wi=vc&&Xo&&typeof Xo.get=="function"?Xo.get:null,Pu=vc&&Set.prototype.forEach,Fb=typeof WeakMap=="function"&&WeakMap.prototype,Nn=Fb?WeakMap.prototype.has:null,Wb=typeof WeakSet=="function"&&WeakSet.prototype,Ln=Wb?WeakSet.prototype.has:null,Hb=typeof WeakRef=="function"&&WeakRef.prototype,$u=Hb?WeakRef.prototype.deref:null,Vb=Boolean.prototype.valueOf,Ub=Object.prototype.toString,zb=Function.prototype.toString,qb=String.prototype.match,mc=String.prototype.slice,Gt=String.prototype.replace,Gb=String.prototype.toUpperCase,Du=String.prototype.toLowerCase,nh=RegExp.prototype.test,Bu=Array.prototype.concat,Et=Array.prototype.join,Jb=Array.prototype.slice,ju=Math.floor,Va=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ea=Object.getOwnPropertySymbols,Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Be=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yr||"symbol")?Symbol.toStringTag:null,ih=Object.prototype.propertyIsEnumerable,Fu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Wu(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||nh.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-ju(-t):ju(t);if(n!==t){var i=String(n),s=mc.call(e,i.length+1);return Gt.call(i,r,"$&_")+"."+Gt.call(Gt.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Gt.call(e,r,"$&_")}var za=lc,Hu=za.custom,Vu=oh(Hu)?Hu:null,Qb=function t(e,r,n,i){var s=r||{};if(Ut(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ut(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ut(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
vendor: 9,140 bytes, lines 1-4
1if(Ut(s,"indent")&&s.indent!==null&&s.indent!=="	"&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ut(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return ch(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return a?Wu(e,c):c}if(typeof e=="bigint"){var u=String(e)+"n";return a?Wu(e,u):u}var l=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=l&&l>0&&typeof e=="object")return qa(e)?"[Array]":"[Object]";var f=dg(s,n);if(typeof i>"u")i=[];else if(ah(i,e)>=0)return"[Circular]";function h(R,A,N){if(A&&(i=Jb.call(i),i.push(A)),N){var L={depth:s.depth};return Ut(s,"quoteStyle")&&(L.quoteStyle=s.quoteStyle),t(R,L,n+1,i)}return t(R,s,n+1,i)}if(typeof e=="function"&&!Uu(e)){var g=ig(e),v=yi(e,h);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Et.call(v,", ")+" }":"")}if(oh(e)){var C=Yr?Gt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ua.call(e);return typeof e=="object"&&!Yr?In(C):C}if(lg(e)){for(var S="<"+Du.call(String(e.nodeName)),b=e.attributes||[],y=0;y<b.length;y++)S+=" "+b[y].name+"="+sh(Zb(b[y].value),"double",s);return S+=">",e.childNodes&&e.childNodes.length&&(S+="..."),S+="</"+Du.call(String(e.nodeName))+">",S}if(qa(e)){if(e.length===0)return"[]";var _=yi(e,h);return f&&!hg(_)?"["+Ga(_,f)+"]":"[ "+Et.call(_,", ")+" ]"}if(Kb(e)){var x=yi(e,h);return!("cause"in Error.prototype)&&"cause"in e&&!ih.call(e,"cause")?"{ ["+String(e)+"] "+Et.call(Bu.call("[cause]: "+h(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Et.call(x,", ")+" }"}if(typeof e=="object"&&o){if(Vu&&typeof e[Vu]=="function"&&za)return za(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(sg(e)){var E=[];return Lu&&Lu.call(e,function(R,A){E.push(h(A,e,!0)+" => "+h(R,e))}),zu("Map",Fi.call(e),E,f)}if(cg(e)){var T=[];return Pu&&Pu.call(e,function(R){T.push(h(R,e))}),zu("Set",Wi.call(e),T,f)}if(og(e))return ta("WeakMap");if(ug(e))return ta("WeakSet");if(ag(e))return ta("WeakRef");if(eg(e))return In(h(Number(e)));if(rg(e))return In(h(Va.call(e)));if(tg(e))return In(Vb.call(e));if(Xb(e))return In(h(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===j)return"{ [object globalThis] }";if(!Yb(e)&&!Uu(e)){var F=yi(e,h),D=Fu?Fu(e)===Object.prototype:e instanceof Object||e.constructor===Object,O=e instanceof Object?"":"null prototype",q=!D&&Be&&Object(e)===e&&Be in e?mc.call(tr(e),8,-1):O?"Object":"",ae=D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",Q=ae+(q||O?"["+Et.call(Bu.call([],q||[],O||[]),": ")+"] ":"");return F.length===0?Q+"{}":f?Q+"{"+Ga(F,f)+"}":Q+"{ "+Et.call(F,", ")+" }"}return String(e)};function sh(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Zb(t){return Gt.call(String(t),/"/g,"&quot;")}function qa(t){return tr(t)==="[object Array]"&&(!Be||!(typeof t=="object"&&Be in t))}function Yb(t){return tr(t)==="[object Date]"&&(!Be||!(typeof t=="object"&&Be in t))}function Uu(t){return tr(t)==="[object RegExp]"&&(!Be||!(typeof t=="object"&&Be in t))}function Kb(t){return tr(t)==="[object Error]"&&(!Be||!(typeof t=="object"&&Be in t))}function Xb(t){return tr(t)==="[object String]"&&(!Be||!(typeof t=="object"&&Be in t))}function eg(t){return tr(t)==="[object Number]"&&(!Be||!(typeof t=="object"&&Be in t))}function tg(t){return tr(t)==="[object Boolean]"&&(!Be||!(typeof t=="object"&&Be in t))}function oh(t){if(Yr)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Ua)return!1;try{return Ua.call(t),!0}catch{}return!1}function rg(t){if(!t||typeof t!="object"||!Va)return!1;try{return Va.call(t),!0}catch{}return!1}var ng=Object.prototype.hasOwnProperty||function(t){return t in this};function Ut(t,e){return ng.call(t,e)}function tr(t){return Ub.call(t)}function ig(t){if(t.name)return t.name;var e=qb.call(zb.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ah(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function sg(t){if(!Fi||!t||typeof t!="object")return!1;try{Fi.call(t);try{Wi.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function og(t){if(!Nn||!t||typeof t!="object")return!1;try{Nn.call(t,Nn);try{Ln.call(t,Ln)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function ag(t){if(!$u||!t||typeof t!="object")return!1;try{return $u.call(t),!0}catch{}return!1}function cg(t){if(!Wi||!t||typeof t!="object")return!1;try{Wi.call(t);try{Fi.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function ug(t){if(!Ln||!t||typeof t!="object")return!1;try{Ln.call(t,Ln);try{Nn.call(t,Nn)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function lg(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function ch(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ch(mc.call(t,0,e.maxStringLength),e)+n}var i=Gt.call(Gt.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fg);return sh(i,"single",e)}function fg(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Gb.call(e.toString(16))}function In(t){return"Object("+t+")"}function ta(t){return t+" { ? }"}function zu(t,e,r,n){var i=n?Ga(r,n):Et.call(r,", ");return t+" ("+e+") {"+i+"}"}function hg(t){for(var e=0;e<t.length;e++)if(ah(t[e],`
2`)>=0)return!1;return!0}function dg(t,e){var r;if(t.indent==="	")r="	";else if(typeof t.indent=="number"&&t.indent>0)r=Et.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Et.call(Array(e+1),r)}}function Ga(t,e){if(t.length===0)return"";var r=`
3`+e.prev+e.base;return r+Et.call(t,","+r)+`
4`+e.prev}function yi(t,e){var r=qa(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Ut(t,i)?e(t[i],t):""}var s=typeof ea=="function"?ea(t):[],o;if(Yr){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var c in t)Ut(t,c)&&(r&&String(Number(c))===c&&c<t.length||Yr&&o["$"+c]instanceof Symbol||(nh.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof ea=="function")for(var u=0;u<s.length;u++)ih.call(t,s[u])&&n.push("["+e(s[u])+"]: "+e(t[s[u]],t));return n}var wc=Er,pn=jb,pg=Qb,bg=wc("%TypeError%"),vi=wc("%WeakMap%",!0),mi=wc("%Map%",!0),gg=pn("WeakMap.prototype.get",!0),yg=pn("WeakMap.prototype.set",!0),vg=pn("WeakMap.prototype.has",!0),mg=pn("Map.prototype.get",!0),wg=pn("Map.prototype.set",!0),_g=pn("Map.prototype.has",!0),_c=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},Sg=function(t,e){var r=_c(t,e);return r&&r.value},Eg=function(t,e,r){var n=_c(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},Cg=function(t,e){return!!_c(t,e)},xg=function(){var e,r,n,i={assert:function(s){if(!i.has(s))throw new bg("Side channel does not contain "+pg(s))},get:function(s){if(vi&&s&&(typeof s=="object"||typeof s=="function")){if(e)return gg(e,s)}else if(mi){if(r)return mg(r,s)}else if(n)return Sg(n,s)},has:function(s){if(vi&&s&&(typeof s=="object"||typeof s=="function")){if(e)return vg(e,s)}else if(mi){if(r)return _g(r,s)}else if(n)return Cg(n,s);return!1},set:function(s,o){vi&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new vi),yg(e,s,o)):mi?(r||(r=new mi),wg(r,s,o)):(n||(n={key:{},next:null}),Eg(n,s,o))}};return i},Ig=String.prototype.replace,Rg=/%20/g,ra={RFC1738:"RFC1738",RFC3986:"RFC3986"},Sc={default:ra.RFC3986,formatters:{RFC1738:function(t){return Ig.call(t,Rg,"+")},RFC3986:function(t){return String(t)}},RFC1738:ra.RFC1738,RFC3986:ra.RFC3986},Ag=Sc,na=Object.prototype.hasOwnProperty,or=Array.isArray,yt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Mg=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(or(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},uh=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Tg=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(or(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!na.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return or(e)&&!or(r)&&(i=uh(e,n)),or(e)&&or(r)?(r.forEach(function(s,o){if(na.call(e,o)){var a=e[o];a&&typeof a=="object"&&s&&typeof s=="object"?e[o]=t(a,s,n):e.push(s)}else e[o]=s}),e):Object.keys(r).reduce(function(s,o){var a=r[o];return na.call(s,o)?s[o]=t(s[o],a,n):s[o]=a,s},i)},kg=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},Og=function(t,e,r){var n=t.replace(/\+/g," ");
4if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Ng=function(e,r,n,i,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var a="",c=0;c<o.length;++c){var u=o.charCodeAt(c);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===Ag.RFC1738&&(u===40||u===41)){a+=o.charAt(c);continue}if(u<128){a=a+yt[u];continue}if(u<2048){a=a+(yt[192|u>>6]+yt[128|u&63]);continue}if(u<55296||u>=57344){a=a+(yt[224|u>>12]+yt[128|u>>6&63]+yt[128|u&63]);continue}c+=1,u=65536+((u&1023)<<10|o.charCodeAt(c)&1023),a+=yt[240|u>>18]+yt[128|u>>12&63]+yt[128|u>>6&63]+yt[128|u&63]}return a},Lg=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var u=a[c],l=o[u];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(r.push({obj:o,prop:u}),n.push(l))}return Mg(r),e},Pg=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},$g=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Dg=function(e,r){return[].concat(e,r)},Bg=function(e,r){if(or(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},lh={arrayToObject:uh,assign:kg,combine:Dg,compact:Lg,decode:Og,encode:Ng,isBuffer:$g,isRegExp:Pg,maybeMap:Bg,merge:Tg},fh=xg,Ni=lh,Pn=Sc,jg=Object.prototype.hasOwnProperty,qu={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},Lt=Array.isArray,Fg=Array.prototype.push,hh=function(t,e){Fg.apply(t,Lt(e)?e:[e])},Wg=Date.prototype.toISOString,Gu=Pn.default,De={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ni.encode,encodeValuesOnly:!1,format:Gu,formatter:Pn.formatters[Gu],indices:!1,serializeDate:function(e){return Wg.call(e)},skipNulls:!1,strictNullHandling:!1},Hg=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},ia={},Vg=function t(e,r,n,i,s,o,a,c,u,l,f,h,g,v,C,S){for(var b=e,y=S,_=0,x=!1;(y=y.get(ia))!==void 0&&!x;){var E=y.get(e);if(_+=1,typeof E<"u"){if(E===_)throw new RangeError("Cyclic object value");x=!0}typeof y.get(ia)>"u"&&(_=0)}if(typeof c=="function"?b=c(r,b):b instanceof Date?b=f(b):n==="comma"&&Lt(b)&&(b=Ni.maybeMap(b,function(L){return L instanceof Date?f(L):L})),b===null){if(s)return a&&!v?a(r,De.encoder,C,"key",h):r;b=""}if(Hg(b)||Ni.isBuffer(b)){if(a){var T=v?r:a(r,De.encoder,C,"key",h);return[g(T)+"="+g(a(b,De.encoder,C,"value",h))]}return[g(r)+"="+g(String(b))]}var F=[];if(typeof b>"u")return F;var D;if(n==="comma"&&Lt(b))v&&a&&(b=Ni.maybeMap(b,a)),D=[{value:b.length>0?b.join(",")||null:void 0}];else if(Lt(c))D=c;else{var O=Object.keys(b);D=u?O.sort(u):O}for(var q=i&&Lt(b)&&b.length===1?r+"[]":r,ae=0;ae<D.length;++ae){var Q=D[ae],R=typeof Q=="object"&&typeof Q.value<"u"?Q.value:b[Q];if(!(o&&R===null)){var A=Lt(b)?typeof n=="function"?n(q,Q):q:q+(l?"."+Q:"["+Q+"]");S.set(e,_);var N=fh();N.set(ia,S),hh(F,t(R,A,n,i,s,o,n==="comma"&&v&&Lt(b)?null:a,c,u,l,f,h,g,v,C,N))}}return F},Ug=function(e){if(!e)return De;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||De.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Pn.default;if(typeof e.format<"u"){if(!jg.call(Pn.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Pn.formatters[n],s=De.filter;return(typeof e.filter=="function"||Lt(e.filter))&&(s=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:De.addQueryPrefix,allowDots:typeof e.allowDots>"u"?De.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:De.charsetSentinel,delimiter:typeof e.delimiter>"u"?De.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:De.encode,encoder:typeof e.encoder=="function"?e.encoder:De.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:De.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:De.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:De.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:De.strictNullHandling}},zg=function(t,e){var r=t,n=Ug(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):Lt(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;e&&e.arrayFormat in qu?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=qu[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=c==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var l=fh(),f=0;f<i.length;++f){var h=i[f];
vendor: 4,406 bytes, line 4
4n.skipNulls&&r[h]===null||hh(o,Vg(r[h],h,c,u,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var g=o.join(n.delimiter),v=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),g.length>0?v+g:""},Kr=lh,Ja=Object.prototype.hasOwnProperty,qg=Array.isArray,Re={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Kr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Gg=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},dh=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Jg="utf8=%26%2310003%3B",Qg="utf8=%E2%9C%93",Zg=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,u=r.charset;if(r.charsetSentinel)for(c=0;c<o.length;++c)o[c].indexOf("utf8=")===0&&(o[c]===Qg?u="utf-8":o[c]===Jg&&(u="iso-8859-1"),a=c,c=o.length);for(c=0;c<o.length;++c)if(c!==a){var l=o[c],f=l.indexOf("]="),h=f===-1?l.indexOf("="):f+1,g,v;h===-1?(g=r.decoder(l,Re.decoder,u,"key"),v=r.strictNullHandling?null:""):(g=r.decoder(l.slice(0,h),Re.decoder,u,"key"),v=Kr.maybeMap(dh(l.slice(h+1),r),function(C){return r.decoder(C,Re.decoder,u,"value")})),v&&r.interpretNumericEntities&&u==="iso-8859-1"&&(v=Gg(v)),l.indexOf("[]=")>-1&&(v=qg(v)?[v]:v),Ja.call(n,g)?n[g]=Kr.combine(n[g],v):n[g]=v}return n},Yg=function(t,e,r,n){for(var i=n?e:dh(e,r),s=t.length-1;s>=0;--s){var o,a=t[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[],o[u]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},Kg=function(e,r,n,i){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),u=c?s.slice(0,c.index):s,l=[];if(u){if(!n.plainObjects&&Ja.call(Object.prototype,u)&&!n.allowPrototypes)return;l.push(u)}for(var f=0;n.depth>0&&(c=a.exec(s))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&Ja.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),Yg(l,r,n,i)}},Xg=function(e){if(!e)return Re;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?Re.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Re.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Re.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Re.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Re.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Re.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Re.comma,decoder:typeof e.decoder=="function"?e.decoder:Re.decoder,delimiter:typeof e.delimiter=="string"||Kr.isRegExp(e.delimiter)?e.delimiter:Re.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Re.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Re.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Re.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Re.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Re.strictNullHandling}},ey=function(t,e){var r=Xg(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Zg(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=Kg(a,n[a],r,typeof t=="string");i=Kr.merge(i,c,r)}return r.allowSparse===!0?i:Kr.compact(i)}
4,ty=zg,ry=ey,ny=Sc,iy={formats:ny,parse:ry,stringify:ty},Kn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0;function e(){return n=>n}t.OpaqueType=e,t.HexString=e(),t.AddressString=e(),t.BigIntString=e();function r(n){return Math.floor(n)}t.IntNumber=r,t.RegExpString=e(),function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""}(t.ProviderType||(t.ProviderType={}))})(Kn);var sy=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W,"__esModule",{value:!0});W.isInIFrame=W.createQrUrl=W.getFavicon=W.range=W.isBigNumber=W.ensureParsedJSONObject=W.ensureBN=W.ensureRegExpString=W.ensureIntNumber=W.ensureBuffer=W.ensureAddressString=W.ensureEvenLengthHexString=W.ensureHexString=W.isHexString=W.prepend0x=W.strip0x=W.has0xPrefix=W.hexStringFromIntNumber=W.intNumberFromHexString=W.bigIntStringFromBN=W.hexStringFromBuffer=W.hexStringToUint8Array=W.uint8ArrayToHex=W.randomBytesHex=void 0;const zt=sy(Yi),oy=iy,Cr=qn,nt=Kn,ph=/^[0-9]*$/,bh=/^[a-f0-9]*$/;function ay(t){return gh(crypto.getRandomValues(new Uint8Array(t)))}W.randomBytesHex=ay;function gh(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}W.uint8ArrayToHex=gh;function cy(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}W.hexStringToUint8Array=cy;function uy(t,e=!1){const r=t.toString("hex");return(0,nt.HexString)(e?"0x"+r:r)}W.hexStringFromBuffer=uy;function ly(t){return(0,nt.BigIntString)(t.toString(10))}W.bigIntStringFromBN=ly;function fy(t){return(0,nt.IntNumber)(new zt.default(ei(t,!1),16).toNumber())}W.intNumberFromHexString=fy;function hy(t){return(0,nt.HexString)("0x"+new zt.default(t).toString(16))}W.hexStringFromIntNumber=hy;function Ec(t){return t.startsWith("0x")||t.startsWith("0X")}W.has0xPrefix=Ec;function os(t){return Ec(t)?t.slice(2):t}W.strip0x=os;function yh(t){return Ec(t)?"0x"+t.slice(2):"0x"+t}W.prepend0x=yh;function Xn(t){if(typeof t!="string")return!1;const e=os(t).toLowerCase();return bh.test(e)}W.isHexString=Xn;function vh(t,e=!1){if(typeof t=="string"){const r=os(t).toLowerCase();if(bh.test(r))return(0,nt.HexString)(e?"0x"+r:r)}throw Cr.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}W.ensureHexString=vh;function ei(t,e=!1){let r=vh(t,!1);return r.length%2===1&&(r=(0,nt.HexString)("0"+r)),e?(0,nt.HexString)("0x"+r):r}W.ensureEvenLengthHexString=ei;function dy(t){if(typeof t=="string"){const e=os(t).toLowerCase();if(Xn(e)&&e.length===40)return(0,nt.AddressString)(yh(e))}throw Cr.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}W.ensureAddressString=dy;function py(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string")if(Xn(t)){const e=ei(t,!1);return Buffer.from(e,"hex")}else return Buffer.from(t,"utf8");throw Cr.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}W.ensureBuffer=py;function mh(t){if(typeof t=="number"&&Number.isInteger(t))return(0,nt.IntNumber)(t);if(typeof t=="string"){if(ph.test(t))return(0,nt.IntNumber)(Number(t));if(Xn(t))return(0,nt.IntNumber)(new zt.default(ei(t,!1),16).toNumber())}throw Cr.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}W.ensureIntNumber=mh;function by(t){if(t instanceof RegExp)return(0,nt.RegExpString)(t.toString());throw Cr.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}W.ensureRegExpString=by;function gy(t){if(t!==null&&(zt.default.isBN(t)||wh(t)))return new zt.default(t.toString(10),10);if(typeof t=="number")return new zt.default(mh(t));if(typeof t=="string"){if(ph.test(t))return new zt.default(t,10);if(Xn(t))return new zt.default(ei(t,!1),16)}throw Cr.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}W.ensureBN=gy;function yy(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw Cr.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}W.ensureParsedJSONObject=yy;function wh(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}W.isBigNumber=wh;function vy(t,e){return Array.from({length:e-t},(r,n)=>t+n)}W.range=vy;function my(){const 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:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}W.getFavicon=my;function wy(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,oy.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}W.createQrUrl=wy;function _y(){try{return window.frameElement!==null}catch{return!1}}W.isInIFrame=_y;Object.defineProperty(hn,"__esModule",{value:!0});hn.Session=void 0;const Ju=X0,Qu=W,Zu="session:id",Yu="session:secret",Ku="session:linked";class Cc{constructor(e,r,n,i){this._storage=e,this._id=r||(0,Qu.randomBytesHex)(16),this._secret=n||(0,Qu.randomBytesHex)(32),this._key=new Ju.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(Zu),n=e.getItem(Ku),i=e.getItem(Yu);return r&&i?new Cc(e,r,i,n==="1"):null}static hash(e){return new Ju.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(Zu,this._id),this._storage.setItem(Yu,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Ku,this._linked?"1":"0")}}hn.Session=Cc;var ht={};
4Object.defineProperty(ht,"__esModule",{value:!0});ht.WalletSDKRelayAbstract=ht.APP_VERSION_KEY=ht.LOCAL_STORAGE_ADDRESSES_KEY=ht.WALLET_USER_NAME_KEY=void 0;const Xu=qn;ht.WALLET_USER_NAME_KEY="walletUsername";ht.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";ht.APP_VERSION_KEY="AppVersion";class Sy{async makeEthereumJSONRPCRequest(e,r){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 Xu.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,Xu.serializeError)(s,e.method);return i})}}ht.WalletSDKRelayAbstract=Sy;var Qa={exports:{}},_h=uc.EventEmitter,sa,el;function Ey(){if(el)return sa;el=1;function t(v,C){var S=Object.keys(v);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(v);C&&(b=b.filter(function(y){return Object.getOwnPropertyDescriptor(v,y).enumerable})),S.push.apply(S,b)}return S}function e(v){for(var C=1;C<arguments.length;C++){var S=arguments[C]!=null?arguments[C]:{};C%2?t(Object(S),!0).forEach(function(b){r(v,b,S[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(S)):t(Object(S)).forEach(function(b){Object.defineProperty(v,b,Object.getOwnPropertyDescriptor(S,b))})}return v}function r(v,C,S){return C=o(C),C in v?Object.defineProperty(v,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):v[C]=S,v}function n(v,C){if(!(v instanceof C))throw new TypeError("Cannot call a class as a function")}function i(v,C){for(var S=0;S<C.length;S++){var b=C[S];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,o(b.key),b)}}function s(v,C,S){return C&&i(v.prototype,C),S&&i(v,S),Object.defineProperty(v,"prototype",{writable:!1}),v}function o(v){var C=a(v,"string");return typeof C=="symbol"?C:String(C)}function a(v,C){if(typeof v!="object"||v===null)return v;var S=v[Symbol.toPrimitive];if(S!==void 0){var b=S.call(v,C||"default");if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(v)}var c=Zi,u=c.Buffer,l=lc,f=l.inspect,h=f&&f.custom||"inspect";function g(v,C,S){u.prototype.copy.call(v,C,S)}return sa=function(){function v(){n(this,v),this.head=null,this.tail=null,this.length=0}return s(v,[{key:"push",value:function(S){var b={data:S,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(S){var b={data:S,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var b=this.head,y=""+b.data;b=b.next;)y+=S+b.data;return y}},{key:"concat",value:function(S){if(this.length===0)return u.alloc(0);for(var b=u.allocUnsafe(S>>>0),y=this.head,_=0;y;)g(y.data,b,_),_+=y.data.length,y=y.next;return b}},{key:"consume",value:function(S,b){var y;return S<this.head.data.length?(y=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?y=this.shift():y=b?this._getString(S):this._getBuffer(S),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var b=this.head,y=1,_=b.data;for(S-=_.length;b=b.next;){var x=b.data,E=S>x.length?x.length:S;if(E===x.length?_+=x:_+=x.slice(0,S),S-=E,S===0){E===x.length?(++y,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=x.slice(E));break}++y}return this.length-=y,_}},{key:"_getBuffer",value:function(S){var b=u.allocUnsafe(S),y=this.head,_=1;for(y.data.copy(b),S-=y.data.length;y=y.next;){var x=y.data,E=S>x.length?x.length:S;if(x.copy(b,b.length-S,0,E),S-=E,S===0){E===x.length?(++_,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(E));break}++_}return this.length-=_,b}},{key:h,value:function(S,b){return f(this,e(e({},b),{},{depth:0,customInspect:!1}))}}]),v}(),sa}function Cy(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(Za,this,t)):process.nextTick(Za,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(Li,r):(r._writableState.errorEmitted=!0,process.nextTick(tl,r,s)):process.nextTick(tl,r,s):e?(process.nextTick(Li,r),e(s)):process.nextTick(Li,r)}),this)}function tl(t,e){Za(t,e),Li(t)}function Li(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function xy(){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 Za(t,e){t.emit("error",e)}function Iy(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var Sh={destroy:Cy,undestroy:xy,errorOrDestroy:Iy},xr={};function Ry(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Eh={};function st(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){Ry(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,Eh[t]=i}function rl(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 Ay(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function My(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Ty(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}st("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invali
4d for option "'+t+'"'},TypeError);st("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&Ay(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(My(t," argument"))i="The ".concat(t," ").concat(n," ").concat(rl(e,"type"));else{var s=Ty(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(rl(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);st("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");st("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});st("ERR_STREAM_PREMATURE_CLOSE","Premature close");st("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});st("ERR_MULTIPLE_CALLBACK","Callback called multiple times");st("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");st("ERR_STREAM_WRITE_AFTER_END","write after end");st("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);st("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);st("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");xr.codes=Eh;var ky=xr.codes.ERR_INVALID_OPT_VALUE;function Oy(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Ny(t,e,r,n){var i=Oy(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new ky(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}var Ch={getHighWaterMark:Ny},Ly=Py;function Py(t,e){if(oa("noDeprecation"))return t;var r=!1;function n(){if(!r){if(oa("throwDeprecation"))throw new Error(e);oa("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function oa(t){try{if(!j.localStorage)return!1}catch{return!1}var e=j.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var aa,nl;function xh(){if(nl)return aa;nl=1,aa=D;function t(m){var w=this;this.next=null,this.entry=null,this.finish=function(){je(w,m)}}var e;D.WritableState=T;var r={deprecate:Ly},n=_h,i=Zi.Buffer,s=(typeof j<"u"?j:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(m){return i.from(m)}function a(m){return i.isBuffer(m)||m instanceof s}var c=Sh,u=Ch,l=u.getHighWaterMark,f=xr.codes,h=f.ERR_INVALID_ARG_TYPE,g=f.ERR_METHOD_NOT_IMPLEMENTED,v=f.ERR_MULTIPLE_CALLBACK,C=f.ERR_STREAM_CANNOT_PIPE,S=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;dt(D,n);function E(){}function T(m,w,k){e=e||Xr(),m=m||{},typeof k!="boolean"&&(k=w instanceof e),this.objectMode=!!m.objectMode,k&&(this.objectMode=this.objectMode||!!m.writableObjectMode),this.highWaterMark=l(this,m,"writableHighWaterMark",k),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=m.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=m.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){L(w,ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=m.emitClose!==!1,this.autoDestroy=!!m.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}T.prototype.getBuffer=function(){for(var w=this.bufferedRequest,k=[];w;)k.push(w),w=w.next;return k},function(){try{Object.defineProperty(T.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var F;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(w){return F.call(this,w)?!0:this!==D?!1:w&&w._writableState instanceof T}})):F=function(w){return w instanceof this};function D(m){e=e||Xr();var w=this instanceof e;if(!w&&!F.call(D,this))return new D(m);this._writableState=new T(m,this,w),this.writable=!0,m&&(typeof m.write=="function"&&(this._write=m.write),typeof m.writev=="function"&&(this._writev=m.writev),typeof m.destroy=="function"&&(this._destroy=m.destroy),typeof m.final=="function"&&(this._final=m.final)),n.call(this)}D.prototype.pipe=function(){x(this,new C)};function O(m,w){var k=new y;x(m,k),process.nextTick(w,k)}function q(m,w,k,U){var ee;return k===null?ee=new b:typeof k!="string"&&!w.objectMode&&(ee=new h("chunk",["string","Buffer"],k)),ee?(x(m,ee),process.nextTick(U,ee),!1):!0}D.prototype.write=function(m,w,k){var U=this._writableState,ee=!1,d=!U.objectMode&&a(m);return d&&!i.isBuffer(m)&&(m=o(m)),typeof w=="function"&&(k=w,w=null),d?w="buffer":w||(w=U.defaultEncoding),typeof k!="function"&&(k=E),U.ending?O(this,k):(d||q(this,U,m,k))&&(U.pendingcb++,ee=Q(this,U,d,m,w,k)),ee},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var m=this._writableState;m.corked&&(m.corked--,!m.writing&&!m.corked&&!m.bufferProcessing&&m.bufferedRequest&&H(this,m))},D.prototype.setDefaultEncoding=function(w){if(typeof w=="string"&&(w=w.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((w+"").toLowerCase())>-1))throw new _(w);return this._writableState.defaultEncoding=w,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ae(m,w,k){return!m.objectMode&&m.decodeStrings!==!1&&typeof w=="string"&&(w=i.from(w,k)),w}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Q(m,w,k,U,ee,d){if(!k){var p=ae(w,U,ee);
vendor: 9,427 bytes, line 4
4U!==p&&(k=!0,ee="buffer",U=p)}var M=w.objectMode?1:U.length;w.length+=M;var P=w.length<w.highWaterMark;if(P||(w.needDrain=!0),w.writing||w.corked){var pe=w.lastBufferedRequest;w.lastBufferedRequest={chunk:U,encoding:ee,isBuf:k,callback:d,next:null},pe?pe.next=w.lastBufferedRequest:w.bufferedRequest=w.lastBufferedRequest,w.bufferedRequestCount+=1}else R(m,w,!1,M,U,ee,d);return P}function R(m,w,k,U,ee,d,p){w.writelen=U,w.writecb=p,w.writing=!0,w.sync=!0,w.destroyed?w.onwrite(new S("write")):k?m._writev(ee,w.onwrite):m._write(ee,d,w.onwrite),w.sync=!1}function A(m,w,k,U,ee){--w.pendingcb,k?(process.nextTick(ee,U),process.nextTick(fe,m,w),m._writableState.errorEmitted=!0,x(m,U)):(ee(U),m._writableState.errorEmitted=!0,x(m,U),fe(m,w))}function N(m){m.writing=!1,m.writecb=null,m.length-=m.writelen,m.writelen=0}function L(m,w){var k=m._writableState,U=k.sync,ee=k.writecb;if(typeof ee!="function")throw new v;if(N(k),w)A(m,k,U,w,ee);else{var d=Z(k)||m.destroyed;!d&&!k.corked&&!k.bufferProcessing&&k.bufferedRequest&&H(m,k),U?process.nextTick(B,m,k,d,ee):B(m,k,d,ee)}}function B(m,w,k,U){k||$(m,w),w.pendingcb--,U(),fe(m,w)}function $(m,w){w.length===0&&w.needDrain&&(w.needDrain=!1,m.emit("drain"))}function H(m,w){w.bufferProcessing=!0;var k=w.bufferedRequest;if(m._writev&&k&&k.next){var U=w.bufferedRequestCount,ee=new Array(U),d=w.corkedRequestsFree;d.entry=k;for(var p=0,M=!0;k;)ee[p]=k,k.isBuf||(M=!1),k=k.next,p+=1;ee.allBuffers=M,R(m,w,!0,w.length,ee,"",d.finish),w.pendingcb++,w.lastBufferedRequest=null,d.next?(w.corkedRequestsFree=d.next,d.next=null):w.corkedRequestsFree=new t(w),w.bufferedRequestCount=0}else{for(;k;){var P=k.chunk,pe=k.encoding,Y=k.callback,le=w.objectMode?1:P.length;if(R(m,w,!1,le,P,pe,Y),k=k.next,w.bufferedRequestCount--,w.writing)break}k===null&&(w.lastBufferedRequest=null)}w.bufferedRequest=k,w.bufferProcessing=!1}D.prototype._write=function(m,w,k){k(new g("_write()"))},D.prototype._writev=null,D.prototype.end=function(m,w,k){var U=this._writableState;return typeof m=="function"?(k=m,m=null,w=null):typeof w=="function"&&(k=w,w=null),m!=null&&this.write(m,w),U.corked&&(U.corked=1,this.uncork()),U.ending||ue(this,U,k),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Z(m){return m.ending&&m.length===0&&m.bufferedRequest===null&&!m.finished&&!m.writing}function G(m,w){m._final(function(k){w.pendingcb--,k&&x(m,k),w.prefinished=!0,m.emit("prefinish"),fe(m,w)})}function ie(m,w){!w.prefinished&&!w.finalCalled&&(typeof m._final=="function"&&!w.destroyed?(w.pendingcb++,w.finalCalled=!0,process.nextTick(G,m,w)):(w.prefinished=!0,m.emit("prefinish")))}function fe(m,w){var k=Z(w);if(k&&(ie(m,w),w.pendingcb===0&&(w.finished=!0,m.emit("finish"),w.autoDestroy))){var U=m._readableState;(!U||U.autoDestroy&&U.endEmitted)&&m.destroy()}return k}function ue(m,w,k){w.ending=!0,fe(m,w),k&&(w.finished?process.nextTick(k):m.once("finish",k)),w.ended=!0,m.writable=!1}function je(m,w,k){var U=m.entry;for(m.entry=null;U;){var ee=U.callback;w.pendingcb--,ee(k),U=U.next}w.corkedRequestsFree.next=m}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(w){this._writableState&&(this._writableState.destroyed=w)}}),D.prototype.destroy=c.destroy,D.prototype._undestroy=c.undestroy,D.prototype._destroy=function(m,w){w(m)},aa}var ca,il;function Xr(){if(il)return ca;il=1;var t=Object.keys||function(u){var l=[];for(var f in u)l.push(f);return l};ca=o;var e=Rh(),r=xh();dt(o,e);for(var n=t(r.prototype),i=0;i<n.length;i++){var s=n[i];o.prototype[s]||(o.prototype[s]=r.prototype[s])}function o(u){if(!(this instanceof o))return new o(u);e.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(c,this)}function c(u){u.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(l){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=l,this._writableState.destroyed=l)}}),ca}var ua={},sl;function ol(){if(sl)return ua;sl=1;var t=er.Buffer,e=t.isEncoding||function(b){switch(b=""+b,b&&b.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 r(b){if(!b)return"utf8";for(var y;;)switch(b){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 b;default:if(y)return;b=(""+b).toLowerCase(),y=!0}}function n(b){var y=r(b);if(typeof y!="string"&&(t.isEncoding===e||!e(b)))throw new Error("Unknown encoding: "+b);return y||b}ua.StringDecoder=i;function i(b){this.encoding=n(b);var y;switch(this.encoding){case"utf16le":this.text=f,this.end=h,y=4;break;case"utf8":this.fillLast=c,y=4;break;case"base64":this.text=g,this.end=v,y=3;break;default:this.write=C,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(y)}i.prototype.write=function(b){if(b.length===0)return"";var y,_;if(this.lastNeed){if(y=this.fillLast(b),y===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<b.length?y?y+this.text(b,_):this.text(b,_):y||""},i.prototype.end=l,i.prototype.text=u,i.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function s(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function o(b,y,_){var x=y.length-1;if(x<_)return 0;var E=s(y[x]);return E>=0?(E>0&&(b.lastNeed=E-1),E):--x<_||E===-2?0:(E=s(y[x]),E>=0?(E>0&&(b.lastNeed=E-2),E):--x<_||E===-2?0:(E=s(y[x]),E>=0?(E>0&&(E===2?E=0:b.lastNeed=E-3),E):0))}function a(b,y,_){if((y[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return b.lastNeed=2,"�"}}function c(b){var y=this.lastTotal-this.lastNeed,_=a(this,b);if(_!==void 0)return _;if(this.lastNeed<=b.length)return b.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,y,0,b.length),this.lastNeed-=b.length}function u(b,y){var _=o(this,b,y);if(!this.lastNeed)return b.toString("utf8",y);this.lastTotal=_;var x=b.length-(_-this.lastNeed);return b.copy(this.lastChar,0,x),b.toString("utf8",y,x)}function l(b){var y=b&&b.length?this.write(b):"";return this.lastNeed?y+"�":y}function f(b,y){if((b.length-y)%2===0){var _=b.toString("utf16le",y);if(_){var x=_.charCodeAt(_.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",y,b.length-1)}function h(b){var y=b&&b.length?this.write(b):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,_)}return y}function g(b,y){var _=(b.length-y)%3;return _===0?b.toString("base64",y):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",y,b.length-_))}function v(b){var y=b&&b.length?this.write(b):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function C(b){return b.toString(this.encoding)}function S(b){return b&&b.length?this.write(b):""}return ua}var al=xr.codes.ERR_STREAM_PREMATURE_CLOSE;function $y(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 Dy(){}function By(t){return t.setHeader&&typeof t.abort=="function"}function Ih(t,e,r){if(typeof e=="function")return Ih(t,null,e);e||(e={}),r=$y(r||Dy);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)},l=function(v){r.call(t,v)},f=function(){var v;if(n&&!c)return(!t._readableState||!t._readableState.ended)&&(v=new al),r.call(t,v);if(i&&!o)return(!t._writableState||!t._writableState.ended)&&(v=new al),r.call(t,v)},h=function(){t.req.on("finish",a)};return By(t)?(t.on("complete",a),t.on("abort",f),t.req?h():t.on("request",h)):i&&!t._writableState&&(t.on("end",s),t.on("close",s
4)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",l),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",h),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",l),t.removeListener("close",f)}}var xc=Ih,la,cl;function jy(){if(cl)return la;cl=1;var t;function e(_,x,E){return x=r(x),x in _?Object.defineProperty(_,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):_[x]=E,_}function r(_){var x=n(_,"string");return typeof x=="symbol"?x:String(x)}function n(_,x){if(typeof _!="object"||_===null)return _;var E=_[Symbol.toPrimitive];if(E!==void 0){var T=E.call(_,x||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(_)}var i=xc,s=Symbol("lastResolve"),o=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),l=Symbol("handlePromise"),f=Symbol("stream");function h(_,x){return{value:_,done:x}}function g(_){var x=_[s];if(x!==null){var E=_[f].read();E!==null&&(_[u]=null,_[s]=null,_[o]=null,x(h(E,!1)))}}function v(_){process.nextTick(g,_)}function C(_,x){return function(E,T){_.then(function(){if(x[c]){E(h(void 0,!0));return}x[l](E,T)},T)}}var S=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((t={get stream(){return this[f]},next:function(){var x=this,E=this[a];if(E!==null)return Promise.reject(E);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(O,q){process.nextTick(function(){x[a]?q(x[a]):O(h(void 0,!0))})});var T=this[u],F;if(T)F=new Promise(C(T,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));F=new Promise(this[l])}return this[u]=F,F}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var x=this;return new Promise(function(E,T){x[f].destroy(null,function(F){if(F){T(F);return}E(h(void 0,!0))})})}),t),S),y=function(x){var E,T=Object.create(b,(E={},e(E,f,{value:x,writable:!0}),e(E,s,{value:null,writable:!0}),e(E,o,{value:null,writable:!0}),e(E,a,{value:null,writable:!0}),e(E,c,{value:x._readableState.endEmitted,writable:!0}),e(E,l,{value:function(D,O){var q=T[f].read();q?(T[u]=null,T[s]=null,T[o]=null,D(h(q,!1))):(T[s]=D,T[o]=O)},writable:!0}),E));return T[u]=null,i(x,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=T[o];D!==null&&(T[u]=null,T[s]=null,T[o]=null,D(F)),T[a]=F;return}var O=T[s];O!==null&&(T[u]=null,T[s]=null,T[o]=null,O(h(void 0,!0))),T[c]=!0}),x.on("readable",v.bind(null,T)),T};return la=y,la}var fa,ul;function Fy(){return ul||(ul=1,fa=function(){throw new Error("Readable.from is not available in the browser")}),fa}var ha,ll;function Rh(){if(ll)return ha;ll=1,ha=O;var t;O.ReadableState=D,uc.EventEmitter;var e=function(p,M){return p.listeners(M).length},r=_h,n=Zi.Buffer,i=(typeof j<"u"?j:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(d){return n.from(d)}function o(d){return n.isBuffer(d)||d instanceof i}var a=lc,c;a&&a.debuglog?c=a.debuglog("stream"):c=function(){};var u=Ey(),l=Sh,f=Ch,h=f.getHighWaterMark,g=xr.codes,v=g.ERR_INVALID_ARG_TYPE,C=g.ERR_STREAM_PUSH_AFTER_EOF,S=g.ERR_METHOD_NOT_IMPLEMENTED,b=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y,_,x;dt(O,r);var E=l.errorOrDestroy,T=["error","close","destroy","pause","resume"];function F(d,p,M){if(typeof d.prependListener=="function")return d.prependListener(p,M);!d._events||!d._events[p]?d.on(p,M):Array.isArray(d._events[p])?d._events[p].unshift(M):d._events[p]=[M,d._events[p]]}function D(d,p,M){t=t||Xr(),d=d||{},typeof M!="boolean"&&(M=p instanceof t),this.objectMode=!!d.objectMode,M&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=h(this,d,"readableHighWaterMark",M),this.buffer=new u,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=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.destroyed=!1,this.defaultEncoding=d.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,d.encoding&&(y||(y=ol().StringDecoder),this.decoder=new y(d.encoding),this.encoding=d.encoding)}function O(d){if(t=t||Xr(),!(this instanceof O))return new O(d);var p=this instanceof t;this._readableState=new D(d,this,p),this.readable=!0,d&&(typeof d.read=="function"&&(this._read=d.read),typeof d.destroy=="function"&&(this._destroy=d.destroy)),r.call(this)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),O.prototype.destroy=l.destroy,O.prototype._undestroy=l.undestroy,O.prototype._destroy=function(d,p){p(d)},O.prototype.push=function(d,p){var M=this._readableState,P;
vendor: 5,727 bytes, line 4
4return M.objectMode?P=!0:typeof d=="string"&&(p=p||M.defaultEncoding,p!==M.encoding&&(d=n.from(d,p),p=""),P=!0),q(this,d,p,!1,P)},O.prototype.unshift=function(d){return q(this,d,null,!0,!1)};function q(d,p,M,P,pe){c("readableAddChunk",p);var Y=d._readableState;if(p===null)Y.reading=!1,L(d,Y);else{var le;if(pe||(le=Q(Y,p)),le)E(d,le);else if(Y.objectMode||p&&p.length>0)if(typeof p!="string"&&!Y.objectMode&&Object.getPrototypeOf(p)!==n.prototype&&(p=s(p)),P)Y.endEmitted?E(d,new b):ae(d,Y,p,!0);else if(Y.ended)E(d,new C);else{if(Y.destroyed)return!1;Y.reading=!1,Y.decoder&&!M?(p=Y.decoder.write(p),Y.objectMode||p.length!==0?ae(d,Y,p,!1):H(d,Y)):ae(d,Y,p,!1)}else P||(Y.reading=!1,H(d,Y))}return!Y.ended&&(Y.length<Y.highWaterMark||Y.length===0)}function ae(d,p,M,P){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,d.emit("data",M)):(p.length+=p.objectMode?1:M.length,P?p.buffer.unshift(M):p.buffer.push(M),p.needReadable&&B(d)),H(d,p)}function Q(d,p){var M;return!o(p)&&typeof p!="string"&&p!==void 0&&!d.objectMode&&(M=new v("chunk",["string","Buffer","Uint8Array"],p)),M}O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function(d){y||(y=ol().StringDecoder);var p=new y(d);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var M=this._readableState.buffer.head,P="";M!==null;)P+=p.write(M.data),M=M.next;return this._readableState.buffer.clear(),P!==""&&this._readableState.buffer.push(P),this._readableState.length=P.length,this};var R=1073741824;function A(d){return d>=R?d=R:(d--,d|=d>>>1,d|=d>>>2,d|=d>>>4,d|=d>>>8,d|=d>>>16,d++),d}function N(d,p){return d<=0||p.length===0&&p.ended?0:p.objectMode?1:d!==d?p.flowing&&p.length?p.buffer.head.data.length:p.length:(d>p.highWaterMark&&(p.highWaterMark=A(d)),d<=p.length?d:p.ended?p.length:(p.needReadable=!0,0))}O.prototype.read=function(d){c("read",d),d=parseInt(d,10);var p=this._readableState,M=d;if(d!==0&&(p.emittedReadable=!1),d===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return c("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?k(this):B(this),null;if(d=N(d,p),d===0&&p.ended)return p.length===0&&k(this),null;var P=p.needReadable;c("need readable",P),(p.length===0||p.length-d<p.highWaterMark)&&(P=!0,c("length less than watermark",P)),p.ended||p.reading?(P=!1,c("reading or ended",P)):P&&(c("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(d=N(M,p)));var pe;return d>0?pe=w(d,p):pe=null,pe===null?(p.needReadable=p.length<=p.highWaterMark,d=0):(p.length-=d,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),M!==d&&p.ended&&k(this)),pe!==null&&this.emit("data",pe),pe};function L(d,p){if(c("onEofChunk"),!p.ended){if(p.decoder){var M=p.decoder.end();M&&M.length&&(p.buffer.push(M),p.length+=p.objectMode?1:M.length)}p.ended=!0,p.sync?B(d):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,$(d)))}}function B(d){var p=d._readableState;c("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(c("emitReadable",p.flowing),p.emittedReadable=!0,process.nextTick($,d))}function $(d){var p=d._readableState;c("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(d.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,m(d)}function H(d,p){p.readingMore||(p.readingMore=!0,process.nextTick(Z,d,p))}function Z(d,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var M=p.length;if(c("maybeReadMore read 0"),d.read(0),M===p.length)break}p.readingMore=!1}O.prototype._read=function(d){E(this,new S("_read()"))},O.prototype.pipe=function(d,p){var M=this,P=this._readableState;switch(P.pipesCount){case 0:P.pipes=d;break;case 1:P.pipes=[P.pipes,d];break;default:P.pipes.push(d);break}P.pipesCount+=1,c("pipe count=%d opts=%j",P.pipesCount,p);var pe=(!p||p.end!==!1)&&d!==process.stdout&&d!==process.stderr,Y=pe?Tt:Ft;P.endEmitted?process.nextTick(Y):M.once("end",Y),d.on("unpipe",le);function le(kt,gt){c("onunpipe"),kt===M&&gt&&gt.hasUnpiped===!1&&(gt.hasUnpiped=!0,gi())}function Tt(){c("onend"),d.end()}var rr=G(M);d.on("drain",rr);var En=!1;function gi(){c("cleanup"),d.removeListener("close",Tr),d.removeListener("finish",kr),d.removeListener("drain",rr),d.removeListener("error",Mr),d.removeListener("unpipe",le),M.removeListener("end",Tt),M.removeListener("end",Ft),M.removeListener("data",Cn),En=!0,P.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&rr()}M.on("data",Cn);function Cn(kt){c("ondata");var gt=d.write(kt);c("dest.write",gt),gt===!1&&((P.pipesCount===1&&P.pipes===d||P.pipesCount>1&&ee(P.pipes,d)!==-1)&&!En&&(c("false write response, pause",P.awaitDrain),P.awaitDrain++),M.pause())}function Mr(kt){c("onerror",kt),Ft(),d.removeListener("error",Mr),e(d,"error")===0&&E(d,kt)}F(d,"error",Mr);function Tr(){d.removeListener("finish",kr),Ft()}d.once("close",Tr);function kr(){c("onfinish"),d.removeListener("close",Tr),Ft()}d.once("finish",kr);function Ft(){c("unpipe"),M.unpipe(d)}return d.emit("pipe",M),P.flowing||(c("pipe resume"),M.resume()),d};function G(d){return function(){var M=d._readableState;c("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&e(d,"data")&&(M.flowing=!0,m(d))}}O.prototype.unpipe=function(d){var p=this._readableState,M={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return d&&d!==p.pipes?this:(d||(d=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,d&&d.emit("unpipe",this,M),this);if(!d){var P=p.pipes,pe=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var Y=0;Y<pe;
vendor: 4,263 bytes, line 4
4Y++)P[Y].emit("unpipe",this,{hasUnpiped:!1});return this}var le=ee(p.pipes,d);return le===-1?this:(p.pipes.splice(le,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),d.emit("unpipe",this,M),this)},O.prototype.on=function(d,p){var M=r.prototype.on.call(this,d,p),P=this._readableState;return d==="data"?(P.readableListening=this.listenerCount("readable")>0,P.flowing!==!1&&this.resume()):d==="readable"&&!P.endEmitted&&!P.readableListening&&(P.readableListening=P.needReadable=!0,P.flowing=!1,P.emittedReadable=!1,c("on readable",P.length,P.reading),P.length?B(this):P.reading||process.nextTick(fe,this)),M},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(d,p){var M=r.prototype.removeListener.call(this,d,p);return d==="readable"&&process.nextTick(ie,this),M},O.prototype.removeAllListeners=function(d){var p=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&process.nextTick(ie,this),p};function ie(d){var p=d._readableState;p.readableListening=d.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:d.listenerCount("data")>0&&d.resume()}function fe(d){c("readable nexttick read 0"),d.read(0)}O.prototype.resume=function(){var d=this._readableState;return d.flowing||(c("resume"),d.flowing=!d.readableListening,ue(this,d)),d.paused=!1,this};function ue(d,p){p.resumeScheduled||(p.resumeScheduled=!0,process.nextTick(je,d,p))}function je(d,p){c("resume",p.reading),p.reading||d.read(0),p.resumeScheduled=!1,d.emit("resume"),m(d),p.flowing&&!p.reading&&d.read(0)}O.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function m(d){var p=d._readableState;for(c("flow",p.flowing);p.flowing&&d.read()!==null;);}O.prototype.wrap=function(d){var p=this,M=this._readableState,P=!1;d.on("end",function(){if(c("wrapped end"),M.decoder&&!M.ended){var le=M.decoder.end();le&&le.length&&p.push(le)}p.push(null)}),d.on("data",function(le){if(c("wrapped data"),M.decoder&&(le=M.decoder.write(le)),!(M.objectMode&&le==null)&&!(!M.objectMode&&(!le||!le.length))){var Tt=p.push(le);Tt||(P=!0,d.pause())}});for(var pe in d)this[pe]===void 0&&typeof d[pe]=="function"&&(this[pe]=function(Tt){return function(){return d[Tt].apply(d,arguments)}}(pe));for(var Y=0;Y<T.length;Y++)d.on(T[Y],this.emit.bind(this,T[Y]));return this._read=function(le){c("wrapped _read",le),P&&(P=!1,d.resume())},this},typeof Symbol=="function"&&(O.prototype[Symbol.asyncIterator]=function(){return _===void 0&&(_=jy()),_(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),O._fromList=w,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function w(d,p){if(p.length===0)return null;var M;return p.objectMode?M=p.buffer.shift():!d||d>=p.length?(p.decoder?M=p.buffer.join(""):p.buffer.length===1?M=p.buffer.first():M=p.buffer.concat(p.length),p.buffer.clear()):M=p.buffer.consume(d,p.decoder),M}function k(d){var p=d._readableState;c("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,process.nextTick(U,p,d))}function U(d,p){if(c("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,p.readable=!1,p.emit("end"),d.autoDestroy)){var M=p._writableState;(!M||M.autoDestroy&&M.finished)&&p.destroy()}}typeof Symbol=="function"&&(O.from=function(d,p){return x===void 0&&(x=Fy()),x(O,d,p)});function ee(d,p){for(var M=0,P=d.length;M<P;M++)if(d[M]===p)return M;return-1}return ha}var Ah=Dt,as=xr.codes,Wy=as.ERR_METHOD_NOT_IMPLEMENTED,Hy=as.ERR_MULTIPLE_CALLBACK,Vy=as.ERR_TRANSFORM_ALREADY_TRANSFORMING,Uy=as.ERR_TRANSFORM_WITH_LENGTH_0,cs=Xr();dt(Dt,cs);function zy(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;
4if(n===null)return this.emit("error",new Hy);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 Dt(t){if(!(this instanceof Dt))return new Dt(t);cs.call(this,t),this._transformState={afterTransform:zy.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",qy)}function qy(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){fl(t,e,r)}):fl(this,null,null)}Dt.prototype.push=function(t,e){return this._transformState.needTransform=!1,cs.prototype.push.call(this,t,e)};Dt.prototype._transform=function(t,e,r){r(new Wy("_transform()"))};Dt.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)}};Dt.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};Dt.prototype._destroy=function(t,e){cs.prototype._destroy.call(this,t,function(r){e(r)})};function fl(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Uy;if(t._transformState.transforming)throw new Vy;return t.push(null)}var Gy=Wn,Mh=Ah;dt(Wn,Mh);function Wn(t){if(!(this instanceof Wn))return new Wn(t);Mh.call(this,t)}Wn.prototype._transform=function(t,e,r){r(null,t)};var da;function Jy(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Th=xr.codes,Qy=Th.ERR_MISSING_ARGS,Zy=Th.ERR_STREAM_DESTROYED;function hl(t){if(t)throw t}function Yy(t){return t.setHeader&&typeof t.abort=="function"}function Ky(t,e,r,n){n=Jy(n);var i=!1;t.on("close",function(){i=!0}),da===void 0&&(da=xc),da(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,Yy(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(o||new Zy("pipe"))}}}function dl(t){t()}function Xy(t,e){return t.pipe(e)}function ev(t){return!t.length||typeof t[t.length-1]!="function"?hl:t.pop()}function tv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ev(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Qy("streams");var i,s=e.map(function(o,a){var c=a<e.length-1,u=a>0;return Ky(o,c,u,function(l){i||(i=l),l&&s.forEach(dl),!c&&(s.forEach(dl),n(i))})});return e.reduce(Xy)}var rv=tv;(function(t,e){e=t.exports=Rh(),e.Stream=e,e.Readable=e,e.Writable=xh(),e.Duplex=Xr(),e.Transform=Ah,e.PassThrough=Gy,e.finished=xc,e.pipeline=rv})(Qa,Qa.exports);var kh=Qa.exports;const{Transform:nv}=kh;var iv=t=>class Oh extends nv{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(){const r=new Oh(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:sv}=kh;var ov=t=>class Nh extends sv{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(){const r=new Nh(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const av=iv,cv=ov;var uv=function(t){const e=av(t),r=cv(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)}}},Lh={};const pl=[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];Lh.p1600=function(t){for(let e=0;e<24;++e){const 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[3
46]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49];let h=l^(i<<1|s>>>31),g=f^(s<<1|i>>>31);const v=t[0]^h,C=t[1]^g,S=t[10]^h,b=t[11]^g,y=t[20]^h,_=t[21]^g,x=t[30]^h,E=t[31]^g,T=t[40]^h,F=t[41]^g;h=r^(o<<1|a>>>31),g=n^(a<<1|o>>>31);const D=t[2]^h,O=t[3]^g,q=t[12]^h,ae=t[13]^g,Q=t[22]^h,R=t[23]^g,A=t[32]^h,N=t[33]^g,L=t[42]^h,B=t[43]^g;h=i^(c<<1|u>>>31),g=s^(u<<1|c>>>31);const $=t[4]^h,H=t[5]^g,Z=t[14]^h,G=t[15]^g,ie=t[24]^h,fe=t[25]^g,ue=t[34]^h,je=t[35]^g,m=t[44]^h,w=t[45]^g;h=o^(l<<1|f>>>31),g=a^(f<<1|l>>>31);const k=t[6]^h,U=t[7]^g,ee=t[16]^h,d=t[17]^g,p=t[26]^h,M=t[27]^g,P=t[36]^h,pe=t[37]^g,Y=t[46]^h,le=t[47]^g;h=c^(r<<1|n>>>31),g=u^(n<<1|r>>>31);const Tt=t[8]^h,rr=t[9]^g,En=t[18]^h,gi=t[19]^g,Cn=t[28]^h,Mr=t[29]^g,Tr=t[38]^h,kr=t[39]^g,Ft=t[48]^h,kt=t[49]^g,gt=v,eo=C,to=b<<4|S>>>28,ro=S<<4|b>>>28,no=y<<3|_>>>29,io=_<<3|y>>>29,so=E<<9|x>>>23,oo=x<<9|E>>>23,ao=T<<18|F>>>14,co=F<<18|T>>>14,uo=D<<1|O>>>31,lo=O<<1|D>>>31,fo=ae<<12|q>>>20,ho=q<<12|ae>>>20,po=Q<<10|R>>>22,bo=R<<10|Q>>>22,go=N<<13|A>>>19,yo=A<<13|N>>>19,vo=L<<2|B>>>30,mo=B<<2|L>>>30,wo=H<<30|$>>>2,_o=$<<30|H>>>2,So=Z<<6|G>>>26,Eo=G<<6|Z>>>26,Co=fe<<11|ie>>>21,xo=ie<<11|fe>>>21,Io=ue<<15|je>>>17,Ro=je<<15|ue>>>17,Ao=w<<29|m>>>3,Mo=m<<29|w>>>3,To=k<<28|U>>>4,ko=U<<28|k>>>4,Oo=d<<23|ee>>>9,No=ee<<23|d>>>9,Lo=p<<25|M>>>7,Po=M<<25|p>>>7,$o=P<<21|pe>>>11,Do=pe<<21|P>>>11,Bo=le<<24|Y>>>8,jo=Y<<24|le>>>8,Fo=Tt<<27|rr>>>5,Wo=rr<<27|Tt>>>5,Ho=En<<20|gi>>>12,Vo=gi<<20|En>>>12,Uo=Mr<<7|Cn>>>25,zo=Cn<<7|Mr>>>25,qo=Tr<<8|kr>>>24,Go=kr<<8|Tr>>>24,Jo=Ft<<14|kt>>>18,Qo=kt<<14|Ft>>>18;t[0]=gt^~fo&Co,t[1]=eo^~ho&xo,t[10]=To^~Ho&no,t[11]=ko^~Vo&io,t[20]=uo^~So&Lo,t[21]=lo^~Eo&Po,t[30]=Fo^~to&po,t[31]=Wo^~ro&bo,t[40]=wo^~Oo&Uo,t[41]=_o^~No&zo,t[2]=fo^~Co&$o,t[3]=ho^~xo&Do,t[12]=Ho^~no&go,t[13]=Vo^~io&yo,t[22]=So^~Lo&qo,t[23]=Eo^~Po&Go,t[32]=to^~po&Io,t[33]=ro^~bo&Ro,t[42]=Oo^~Uo&so,t[43]=No^~zo&oo,t[4]=Co^~$o&Jo,t[5]=xo^~Do&Qo,t[14]=no^~go&Ao,t[15]=io^~yo&Mo,t[24]=Lo^~qo&ao,t[25]=Po^~Go&co,t[34]=po^~Io&Bo,t[35]=bo^~Ro&jo,t[44]=Uo^~so&vo,t[45]=zo^~oo&mo,t[6]=$o^~Jo&gt,t[7]=Do^~Qo&eo,t[16]=go^~Ao&To,t[17]=yo^~Mo&ko,t[26]=qo^~ao&uo,t[27]=Go^~co&lo,t[36]=Io^~Bo&Fo,t[37]=Ro^~jo&Wo,t[46]=so^~vo&wo,t[47]=oo^~mo&_o,t[8]=Jo^~gt&fo,t[9]=Qo^~eo&ho,t[18]=Ao^~To&Ho,t[19]=Mo^~ko&Vo,t[28]=ao^~uo&So,t[29]=co^~lo&Eo,t[38]=Bo^~Fo&to,t[39]=jo^~Wo&ro,t[48]=vo^~wo&Oo,t[49]=mo^~_o&No,t[0]^=pl[e*2],t[1]^=pl[e*2+1]}};const Hi=Lh;function bn(){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}bn.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};bn.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&&(Hi.p1600(this.state),this.count=0)};bn.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&Hi.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),Hi.p1600(this.state),this.count=0,this.squeezing=!0};bn.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const 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&&(Hi.p1600(this.state),this.count=0);return e};bn.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};var lv=bn,fv=uv(lv);const hv=fv,dv=Yi;function Ph(t){return Buffer.allocUnsafe(t).fill(0)}function $h(t,e,r){const n=Ph(e);return t=us(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 pv(t,e){return $h(t,e,!0)}function us(t){if(!Buffer.isBuffer(t))if(Array.isArray(t))t=Buffer.from(t);else if(typeof t=="string")Dh(t)?t=Buffer.from(yv(Bh(t)),"hex"):t=Buffer.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=Buffer.allocUnsafe(0);else if(dv.isBN(t))t=t.toArrayLike(Buffer);else if(t.toArray)t=Buffer.from(t.toArray());else throw new Error("invalid type");return t}function bv(t){return t=us(t),"0x"+t.toString("hex")}
4function gv(t,e){return t=us(t),e||(e=256),hv("keccak"+e).update(t).digest()}function yv(t){return t.length%2?"0"+t:t}function Dh(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function Bh(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}var jh={zeros:Ph,setLength:$h,setLengthRight:pv,isHexString:Dh,stripHexPrefix:Bh,toBuffer:us,bufferToHex:bv,keccak:gv};const gr=jh,fr=Yi;function Fh(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 zr(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function bl(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function Wh(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function ar(t){var e=typeof t;if(e==="string")return gr.isHexString(t)?new fr(gr.stripHexPrefix(t),16):new fr(t,10);if(e==="number")return new fr(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function _t(t,e){var r,n,i,s;if(t==="address")return _t("uint160",ar(e));if(t==="bool")return _t("uint8",e?1:0);if(t==="string")return _t("bytes",new Buffer(e,"utf8"));if(mv(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=Wh(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(_t(t,e[s]));if(r==="dynamic"){var o=_t("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([_t("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,gr.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=zr(t),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return gr.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=zr(t),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=ar(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=zr(t),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=ar(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=bl(t),n=ar(e),n<0)throw new Error("Supplied ufixed is negative");return _t("uint256",n.mul(new fr(2).pow(new fr(r[1]))))}else if(t.startsWith("fixed"))return r=bl(t),_t("int256",ar(e).mul(new fr(2).pow(new fr(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function vv(t){return t==="string"||t==="bytes"||Wh(t)==="dynamic"}function mv(t){return t.lastIndexOf("]")===t.length-1}function wv(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=Fh(t[s]),a=e[s],c=_t(o,a);vv(o)?(r.push(_t("uint256",i)),n.push(c),i+=c.length):r.push(c)}return Buffer.concat(r.concat(n))}function Hh(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=Fh(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(gr.setLength(a,20));else if(o.startsWith("bytes")){if(r=zr(o),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);i.push(gr.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=zr(o),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=ar(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=zr(o),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=ar(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 _v(t,e){return gr.keccak(Hh(t,e))}var Sv={rawEncode:wv,solidityPack:Hh,soliditySHA3:_v};const ut=jh,$n=Sv,Vh={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"]},pa={encodeData(t,e,r,n=!0){const i=["bytes32"],s=[this.hashType(t,r)];if(n){const o=(a,c,u)=>{if(r[c]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":ut.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",ut.keccak(u)];if(c==="string")return typeof u=="string"&&(u=Buffer.from(u,"utf8")),["bytes32",ut.keccak(u)];if(c.lastIndexOf("]")===c.length-1){const l=c.slice(0,c.lastIndexOf("[")),f=u.map(h=>o(a,l,h));return["bytes32",ut.keccak($n.rawEncode(f.map(([h])=>h),f.map(([,h])=>h)))]}return[c,u]};
4for(const a of r[t]){const[c,u]=o(a.name,a.type,e[a.name]);i.push(c),s.push(u)}}else for(const o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=ut.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Buffer.from(a,"utf8")),a=ut.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push("bytes32"),a=ut.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 $n.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(const 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(const n of e[t])for(const i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return ut.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return ut.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in Vh.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const 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)),ut.keccak(Buffer.concat(n))}};var Ev={TYPED_MESSAGE_SCHEMA:Vh,TypedDataUtils:pa,hashForSignTypedDataLegacy:function(t){return Cv(t.data)},hashForSignTypedData_v3:function(t){return pa.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return pa.hash(t.data)}};function Cv(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const r=t.map(function(s){return s.type==="bytes"?ut.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 $n.soliditySHA3(["bytes32","bytes32"],[$n.soliditySHA3(new Array(t.length).fill("string"),i),$n.soliditySHA3(n,r)])}var en={};Object.defineProperty(en,"__esModule",{value:!0});en.filterFromParam=en.FilterPolyfill=void 0;const Fr=Kn,Fe=W,xv=5*60*1e3,cr={jsonrpc:"2.0",id:0};class Iv{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,Fr.IntNumber)(1),this.provider=e}async newFilter(e){const r=Uh(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.log(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,Fe.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,Fe.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,Fe.hexStringFromIntNumber)(e)}uninstallFilter(e){const r=(0,Fe.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){const r=(0,Fe.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(wi())}async getFilterLogs(e){const r=(0,Fe.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},cr),{method:"eth_getLogs",params:[gl(n)]})):wi()}makeFilterId(){return(0,Fr.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.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return wi();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>r.toBlock)return _i();console.log(`Fetching logs from ${n} to ${s} for filter ${e}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},cr),{method:"eth_getLogs",params:[gl(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){const a=o.result.map(u=>(0,Fe.intNumberFromHexString)(u.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){const u=(0,Fr.IntNumber)(c+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return o}async getBlockFilterChanges(e){const r=this.cursors.get(e);if(!r)return wi();const n=await this.getCurrentBlockHeight();if(r>n)return _i();console.log(`Fetching blocks from ${r} to ${n} for filter (${e})`);const i=(await Promise.all((0,Fe.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,Fr.IntNumber)(o))))).filter(o=>!!o),s=(0,Fr.IntNumber)(r+i.length);return console.log(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},cr),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(_i())}async setInitialCursorPosition(e,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const r=this.timeouts.get(e);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},xv);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},cr),{method:"eth_blockNumber",params:[]}));return(0,Fe.intNumberFromHexString)((0,Fe.ensureHexString)(e))}async getBlockHashByNumber(e){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},cr),{method:"eth_getBlockByNumber",params:[(0,Fe.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,Fe.ensureHexString)(r.result.hash):null}}en.FilterPolyfill=Iv;function Uh(t){return{fromBlock:yl(t.fromBlock),toBlock:yl(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}en.filterFromParam=Uh;
4function gl(t){const e={fromBlock:vl(t.fromBlock),toBlock:vl(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function yl(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,Fr.IntNumber)(0);if((0,Fe.isHexString)(t))return(0,Fe.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function vl(t){return t==="latest"?t:(0,Fe.hexStringFromIntNumber)(t)}function wi(){return Object.assign(Object.assign({},cr),{error:{code:-32e3,message:"filter not found"}})}function _i(){return Object.assign(Object.assign({},cr),{result:[]})}var zh={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))})(zh);var ls={},qh={},fs={},Ic=Rv;function Rv(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++}}const ml=(t,e)=>function(){const 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){const 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){const 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)})};var Av=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=i=>{const s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):ml(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];n[i]=typeof s=="function"&&r(i)?ml(s,e):s}return n},ti={},Mv=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,"__esModule",{value:!0});ti.BaseBlockTracker=void 0;const Tv=Mv(_r),kv=1e3,Ov=(t,e)=>t+e,wl=["sync","latest"];class Nv extends Tv.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*kv,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()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await 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){wl.includes(e)&&this._maybeStart()}
4_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return wl.map(e=>this.listenerCount(e)).reduce(Ov)}_newPotentialLatest(e){const r=this._currentBlock;r&&_l(e)<=_l(r)||this._setCurrentBlock(e)}_setCurrentBlock(e){const 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}}ti.BaseBlockTracker=Nv;function _l(t){return Number.parseInt(t,16)}var Gh={},Jh={},Le={};class Qh extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...o}=e,{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()])}}function Lv(t){return it(t)&&typeof t[Symbol.iterator]=="function"}function it(t){return typeof t=="object"&&t!=null}function Sl(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function xe(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Pv(t){const{done:e,value:r}=t.next();return e?void 0:r}function $v(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${xe(n)}\``}=t;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*Ya(t,e,r,n){Lv(t)||(t=[t]);for(const i of t){const s=$v(i,e,r,n);s&&(yield s)}}function*Rc(t,e,r={}){const{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"&&it(e.schema)&&it(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,a))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,l,f]of e.entries(t,a)){const h=Rc(l,f,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const g of h)g[0]?(c=g[0].refinement!=null?"not_refined":"not_valid",yield[g[0],void 0]):s&&(l=g[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):it(t)&&(l!==void 0||u in t)&&(t[u]=l))}
4if(c!=="not_valid")for(const u of e.refiner(t,a))u.explanation=r.message,c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class Se{constructor(e){const{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)=>{const l=i(c,u);return Ya(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Ya(l,u,this,c)}:this.refiner=()=>[]}assert(e,r){return Zh(e,this,r)}create(e,r){return Yh(e,this,r)}is(e){return Ac(e,this)}mask(e,r){return Kh(e,this,r)}validate(e,r={}){return gn(e,this,r)}}function Zh(t,e,r){const n=gn(t,e,{message:r});if(n[0])throw n[0]}function Yh(t,e,r){const n=gn(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Kh(t,e,r){const n=gn(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Ac(t,e){return!gn(t,e)[0]}function gn(t,e,r={}){const n=Rc(t,e,r),i=Pv(n);return i[0]?[new Qh(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function Dv(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Tc(n):ri(n)}function qe(t,e){return new Se({type:t,schema:null,validator:e})}function Bv(t,e){return new Se({...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 jv(t){return new Se({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).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 Fv(t){let e;return new Se({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*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 Wv(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return Tc(n);default:return ri(n)}}function Hv(t){const e=t instanceof Se?{...t.schema}:{...t};for(const r in e)e[r]=Xh(e[r]);return ri(e)}function Vv(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return ri(n)}function Uv(t,e){return console.warn("[email protected] - The `struct` helper has been renamed to `define`."),qe(t,e)}function zv(){return qe("any",()=>!0)}function qv(t){return new Se({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[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: ${xe(e)}`}})}function Gv(){return qe("bigint",t=>typeof t=="bigint")}function Jv(){return qe("boolean",t=>typeof t=="boolean")}function Qv(){return qe("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${xe(t)}`)}function Zv(t){const e={},r=t.map(n=>xe(n)).join();for(const n of t)e[n]=n;return new Se({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${xe(n)}`}})}function Yv(){return qe("func",t=>typeof t=="function"||`Expected a function, but received: ${xe(t)}`)}function Kv(t){return qe("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${xe(e)}`)}function Xv(){return qe("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${xe(t)}`)}function em(t){return new Se({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function tm(t){const e=xe(t),r=typeof t;return new Se({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${xe(n)}`}})}function rm(t,e){return new Se({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[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: ${xe(r)}`}})}function Mc(){return qe("never",()=>!1)}function nm(t){return new Se({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function im(){return qe("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${xe(t)}`)}function ri(t){const e=t?Object.keys(t):[],r=Mc();return new Se({type:"object",schema:t||null,*entries(n){if(t&&it(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return it(n)||`Expected an object, but received: ${xe(n)}`},coercer(n){return it(n)?{...n}:n}})}function Xh(t){return new Se({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function sm(t,e){return new Se({type:"record",schema:null,*entries(r){if(it(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return it(r)||`Expected an object, but received: ${xe(r)}`}})}function om(){return qe("regexp",t=>t instanceof RegExp)}function am(t){return new Se({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const 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: ${xe(e)}`}})}function ed(){return qe("string",t=>typeof t=="string"||`Expected a string, but received: ${xe(t)}`)}function cm(t){const e=Mc();return new Se({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const 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: ${xe(r)}`}})}function Tc(t){const e=Object.keys(t);return new Se({type:"type",schema:t,*entries(r){if(it(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return it(r)||`Expected an object, but received: ${xe(r)}`},coercer(r){return it(r)?{...r}:r}})}function um(t){const e=t.map(r=>r.type).join(" | ");return new Se({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...o]=Rc(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${xe(r)}`,...i]}})}function td(){return qe("unknown",()=>!0)}function kc(t,e,r){return new Se({...t,coercer:(n,i)=>Ac(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function lm(t,e,r={}){return kc(t,td(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&Sl(n)&&Sl(i)){const s={...n};let o=!1;for(const a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function fm(t){return kc(t,ed(),e=>e.trim())}function hm(t){return Ir(t,"empty",e=>{const r=rd(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function rd(t){return t instanceof Map||t instanceof Set?t.size:t.length}function dm(t,e,r={}){const{exclusive:n}=r;return Ir(t,"max",i=>n?i<e:i<=e||`Expected a ${t.type} less than ${n?"":"or equal to "}${e} but received \`${i}\``)}function pm(t,e,r={}){const{exclusive:n}=r;return Ir(t,"min",i=>n?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function bm(t){return Ir(t,"nonempty",e=>rd(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function gm(t,e){return Ir(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function ym(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return Ir(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){const{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}else{const{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function Ir(t,e,r){return new Se({...t,*refiner(n,i){yield*t.refiner(n,i);const s=r(n,i),o=Ya(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const vm=Object.freeze(Object.defineProperty({__proto__:null,Struct:Se,StructError:Qh,any:zv,array:qv,assert:Zh,assign:Dv,bigint:Gv,boolean:Jv,coerce:kc,create:Yh,date:Qv,defaulted:lm,define:qe,deprecated:Bv,dynamic:jv,empty:hm,enums:Zv,func:Yv,instance:Kv,integer:Xv,intersection:em,is:Ac,lazy:Fv,literal:tm,map:rm,mask:Kh,max:dm,min:pm,never:Mc,nonempty:bm,nullable:nm,number:im,object:ri,omit:Wv,optional:Xh,partial:Hv,pattern:gm,pick:Vv,record:sm,refine:Ir,regexp:om,set:am,size:ym,string:ed,struct:Uv,trimmed:fm,tuple:cm,type:Tc,union:um,unknown:td,validate:gn},Symbol.toStringTag,{value:"Module"})),Rr=wr(vm);
4Object.defineProperty(Le,"__esModule",{value:!0});Le.assertExhaustive=Le.assertStruct=Le.assert=Le.AssertionError=void 0;const mm=Rr;function wm(t){return typeof t=="object"&&t!==null&&"message"in t}function _m(t){var e,r;return typeof((r=(e=t==null?void 0:t.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function Sm(t){const e=wm(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function nd(t,e){return _m(t)?new t({message:e}):t({message:e})}class Oc extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}Le.AssertionError=Oc;function Em(t,e="Assertion failed.",r=Oc){if(!t)throw e instanceof Error?e:nd(r,e)}Le.assert=Em;function Cm(t,e,r="Assertion failed",n=Oc){try{(0,mm.assert)(t,e)}catch(i){throw nd(n,`${r}: ${Sm(i)}.`)}}Le.assertStruct=Cm;function xm(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}Le.assertExhaustive=xm;var ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.base64=void 0;const Im=Rr,Rm=Le,Am=(t,e={})=>{var r,n;const i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,Rm.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,Im.pattern)(t,a)};ni.base64=Am;var se={},ii={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const e=Rr,r=Le;t.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(u){return(0,e.is)(u,t.HexStruct)}t.isHexString=n;function i(u){return(0,e.is)(u,t.StrictHexStruct)}t.isStrictHexString=i;function s(u){(0,r.assert)(n(u),"Value must be a hexadecimal string.")}t.assertIsHexString=s;function o(u){(0,r.assert)(i(u),'Value must be a hexadecimal string, starting with "0x".')}t.assertIsStrictHexString=o;function a(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}t.add0x=a;function c(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}t.remove0x=c})(ii);Object.defineProperty(se,"__esModule",{value:!0});se.createDataView=se.concatBytes=se.valueToBytes=se.stringToBytes=se.numberToBytes=se.signedBigIntToBytes=se.bigIntToBytes=se.hexToBytes=se.bytesToString=se.bytesToNumber=se.bytesToSignedBigInt=se.bytesToBigInt=se.bytesToHex=se.assertIsBytes=se.isBytes=void 0;const Je=Le,Ka=ii,El=48,Cl=58,xl=87;function Mm(){const t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}const Tm=Mm();function Nc(t){return t instanceof Uint8Array}se.isBytes=Nc;function yn(t){(0,Je.assert)(Nc(t),"Value must be a Uint8Array.")}se.assertIsBytes=yn;function id(t){if(yn(t),t.length===0)return"0x";const e=Tm(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,Ka.add0x)(r.join(""))}se.bytesToHex=id;function sd(t){yn(t);const e=id(t);return BigInt(e)}se.bytesToBigInt=sd;function km(t){yn(t);let e=BigInt(0);for(const r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(t.length*8,e)}se.bytesToSignedBigInt=km;function Om(t){yn(t);const e=sd(t);return(0,Je.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)}se.bytesToNumber=Om;function Nm(t){return yn(t),new TextDecoder().decode(t)}se.bytesToString=Nm;function hs(t){var e;if(((e=t==null?void 0:t.toLowerCase)===null||e===void 0?void 0:e.call(t))==="0x")return new Uint8Array;(0,Ka.assertIsHexString)(t);const r=(0,Ka.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++){const o=n.charCodeAt(s*2),a=n.charCodeAt(s*2+1),c=o-(o<Cl?El:xl),u=a-(a<Cl?El:xl);i[s]=c*16+u}return i}se.hexToBytes=hs;function od(t){(0,Je.assert)(typeof t=="bigint","Value must be a bigint."),(0,Je.assert)(t>=BigInt(0),"Value must be a non-negative bigint.");const e=t.toString(16);return hs(e)}se.bigIntToBytes=od;function Lm(t,e){(0,Je.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function Pm(t,e){(0,Je.assert)(typeof t=="bigint","Value must be a bigint."),(0,Je.assert)(typeof e=="number","Byte length must be a number."),(0,Je.assert)(e>0,"Byte length must be greater than 0."),(0,Je.assert)(Lm(t,e),"Byte length is too small to represent the given value.");let r=t;const 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()}se.signedBigIntToBytes=Pm;function ad(t){(0,Je.assert)(typeof t=="number","Value must be a number."),(0,Je.assert)(t>=0,"Value must be a non-negative number."),(0,Je.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=t.toString(16);return hs(e)}se.numberToBytes=ad;function cd(t){return(0,Je.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}se.stringToBytes=cd;function ud(t){if(typeof t=="bigint")return od(t);if(typeof t=="number")return ad(t);if(typeof t=="string")return t.startsWith("0x")?hs(t):cd(t);if(Nc(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}se.valueToBytes=ud;function $m(t){const e=new Array(t.length);let r=0;for(let i=0;i<t.length;i++){const s=ud(t[i]);e[i]=s,r+=s.length}const 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}se.concatBytes=$m;function Dm(t){if(typeof Buffer<"u"&&t instanceof Buffer){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}se.createDataView=Dm;var ds={};Object.defineProperty(ds,"__esModule",{value:!0});ds.ChecksumStruct=void 0;const Il=Rr,Bm=ni;ds.ChecksumStruct=(0,Il.size)((0,Bm.base64)((0,Il.string)(),{paddingRequired:!0}),44,44);var xt={};
4Object.defineProperty(xt,"__esModule",{value:!0});xt.createHex=xt.createBytes=xt.createBigInt=xt.createNumber=void 0;const ye=Rr,jm=Le,ld=se,ps=ii,fd=(0,ye.union)([(0,ye.number)(),(0,ye.bigint)(),(0,ye.string)(),ps.StrictHexStruct]),Fm=(0,ye.coerce)((0,ye.number)(),fd,Number),Wm=(0,ye.coerce)((0,ye.bigint)(),fd,BigInt);(0,ye.union)([ps.StrictHexStruct,(0,ye.instance)(Uint8Array)]);const Hm=(0,ye.coerce)((0,ye.instance)(Uint8Array),(0,ye.union)([ps.StrictHexStruct]),ld.hexToBytes),Vm=(0,ye.coerce)(ps.StrictHexStruct,(0,ye.instance)(Uint8Array),ld.bytesToHex);function Um(t){try{const e=(0,ye.create)(t,Fm);return(0,jm.assert)(Number.isFinite(e),`Expected a number-like value, got "${t}".`),e}catch(e){throw e instanceof ye.StructError?new Error(`Expected a number-like value, got "${t}".`):e}}xt.createNumber=Um;function zm(t){try{return(0,ye.create)(t,Wm)}catch(e){throw e instanceof ye.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}xt.createBigInt=zm;function qm(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,ye.create)(t,Hm)}catch(e){throw e instanceof ye.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}xt.createBytes=qm;function Gm(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,ye.create)(t,Vm)}catch(e){throw e instanceof ye.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}xt.createHex=Gm;var tn={},hd=j&&j.__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},We=j&&j.__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)},at,vt;Object.defineProperty(tn,"__esModule",{value:!0});tn.FrozenSet=tn.FrozenMap=void 0;class Lc{constructor(e){at.set(this,void 0),hd(this,at,new Map(e),"f"),Object.freeze(this)}get size(){return We(this,at,"f").size}[(at=new WeakMap,Symbol.iterator)](){return We(this,at,"f")[Symbol.iterator]()}entries(){return We(this,at,"f").entries()}forEach(e,r){return We(this,at,"f").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return We(this,at,"f").get(e)}has(e){return We(this,at,"f").has(e)}keys(){return We(this,at,"f").keys()}values(){return We(this,at,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}tn.FrozenMap=Lc;class Pc{constructor(e){vt.set(this,void 0),hd(this,vt,new Set(e),"f"),Object.freeze(this)}get size(){return We(this,vt,"f").size}[(vt=new WeakMap,Symbol.iterator)](){return We(this,vt,"f")[Symbol.iterator]()}entries(){return We(this,vt,"f").entries()}forEach(e,r){return We(this,vt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return We(this,vt,"f").has(e)}keys(){return We(this,vt,"f").keys()}values(){return We(this,vt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}tn.FrozenSet=Pc;Object.freeze(Lc);Object.freeze(Lc.prototype);Object.freeze(Pc);Object.freeze(Pc.prototype);var dd={},$c={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0;function e(u){return Array.isArray(u)&&u.length>0}t.isNonEmptyArray=e;function r(u){return u==null}t.isNullOrUndefined=r;function n(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}t.isObject=n;const i=(u,l)=>Object.hasOwnProperty.call(u,l);t.hasProperty=i,function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(u){if(typeof u!="object"||u===null)return!1;try{let l=u;for(;Object.getPrototypeOf(l)!==null;)l=Object.getPrototypeOf(l);return Object.getPrototypeOf(u)===l}catch{return!1}}t.isPlainObject=s;function o(u){return u.charCodeAt(0)<=127}t.isASCII=o;function a(u){var l;return u.split("").reduce((h,g)=>o(g)?h+1:h+2,0)+((l=u.match(t.ESCAPE_CHARACTERS_REGEXP))!==null&&l!==void 0?l:[]).length}t.calculateStringSize=a;function c(u){return u.toString().length}t.calculateNumberSize=c})($c);
4(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const e=Rr,r=Le,n=$c;t.JsonStruct=(0,e.define)("Json",E=>{const[T]=x(E,!0);return T?!0:"Expected a valid JSON-serializable value"});function i(E){return(0,e.is)(E,t.JsonStruct)}t.isValidJson=i,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,e.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),t.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(t.JsonStruct),stack:(0,e.optional)((0,e.string)())}),t.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),t.JsonStruct),(0,e.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,e.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,e.omit)(t.JsonRpcRequestStruct,["id"]);function s(E){return(0,e.is)(E,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(E,T){(0,r.assertStruct)(E,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",T)}t.assertIsJsonRpcNotification=o;function a(E){return(0,e.is)(E,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(E,T){(0,r.assertStruct)(E,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",T)}t.assertIsJsonRpcRequest=c,t.PendingJsonRpcResponseStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,e.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]);function u(E){return(0,e.is)(E,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=u;function l(E,T){(0,r.assertStruct)(E,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",T)}t.assertIsPendingJsonRpcResponse=l;function f(E){return(0,e.is)(E,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=f;function h(E,T){(0,r.assertStruct)(E,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",T)}t.assertIsJsonRpcResponse=h;function g(E){return(0,e.is)(E,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=g;function v(E,T){(0,r.assertStruct)(E,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",T)}t.assertIsJsonRpcSuccess=v;function C(E){return(0,e.is)(E,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=C;function S(E,T){(0,r.assertStruct)(E,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",T)}t.assertIsJsonRpcFailure=S;function b(E){return(0,e.is)(E,t.JsonRpcErrorStruct)}t.isJsonRpcError=b;function y(E,T){(0,r.assertStruct)(E,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",T)}t.assertIsJsonRpcError=y;function _(E){const{permitEmptyString:T,permitFractions:F,permitNull:D}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},E);return q=>!!(typeof q=="number"&&(F||Number.isInteger(q))||typeof q=="string"&&(T||q.length>0)||D&&q===null)}t.getJsonRpcIdValidator=_;function x(E,T=!1){const F=new Set;function D(O,q){if(O===void 0)return[!1,0];if(O===null)return[!0,q?0:n.JsonSize.Null];const ae=typeof O;try{if(ae==="function")return[!1,0];if(ae==="string"||O instanceof String)return[!0,q?0:(0,n.calculateStringSize)(O)+n.JsonSize.Quote*2];if(ae==="boolean"||O instanceof Boolean)return q?[!0,0]:[!0,O==!0?n.JsonSize.True:n.JsonSize.False];if(ae==="number"||O instanceof Number)return q?[!0,0]:[!0,(0,n.calculateNumberSize)(O)];if(O instanceof Date)return q?[!0,0]:[!0,isNaN(O.getDate())?n.JsonSize.Null:n.JsonSize.Date+n.JsonSize.Quote*2]}catch{return[!1,0]}if(!(0,n.isPlainObject)(O)&&!Array.isArray(O))return[!1,0];if(F.has(O))return[!1,0];F.add(O);try{return[!0,Object.entries(O).reduce((Q,[R,A],N,L)=>{let[B,$]=D(A,q);
4if(!B)throw new Error("JSON validation did not pass. Validation process stopped.");if(F.delete(O),q)return 0;const H=Array.isArray(O)?0:R.length+n.JsonSize.Comma+n.JsonSize.Colon*2,Z=N<L.length-1?n.JsonSize.Comma:0;return Q+H+$+Z},q?0:n.JsonSize.Wrapper*2)]}catch{return[!1,0]}}return D(E,T)}t.validateJsonAndGetSize=x})(dd);var rn={},Xa={exports:{}},ba,Rl;function Jm(){if(Rl)return ba;Rl=1;var t=1e3,e=t*60,r=e*60,n=r*24,i=n*7,s=n*365.25;ba=function(l,f){f=f||{};var h=typeof l;if(h==="string"&&l.length>0)return o(l);if(h==="number"&&isFinite(l))return f.long?c(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function o(l){if(l=String(l),!(l.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(f){var h=parseFloat(f[1]),g=(f[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return h*s;case"weeks":case"week":case"w":return h*i;case"days":case"day":case"d":return h*n;case"hours":case"hour":case"hrs":case"hr":case"h":return h*r;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(l){var f=Math.abs(l);return f>=n?Math.round(l/n)+"d":f>=r?Math.round(l/r)+"h":f>=e?Math.round(l/e)+"m":f>=t?Math.round(l/t)+"s":l+"ms"}function c(l){var f=Math.abs(l);return f>=n?u(l,f,n,"day"):f>=r?u(l,f,r,"hour"):f>=e?u(l,f,e,"minute"):f>=t?u(l,f,t,"second"):l+" ms"}function u(l,f,h,g){var v=f>=h*1.5;return Math.round(l/h)+" "+g+(v?"s":"")}return ba}function Qm(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Jm(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let f=0;for(let h=0;h<l.length;h++)f=(f<<5)-f+l.charCodeAt(h),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=e;function r(l){let f,h=null,g,v;function C(...S){if(!C.enabled)return;const b=C,y=Number(new Date),_=y-(f||y);b.diff=_,b.prev=f,b.curr=y,f=y,S[0]=r.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let x=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(T,F)=>{if(T==="%%")return"%";x++;const D=r.formatters[F];if(typeof D=="function"){const O=S[x];T=D.call(b,O),S.splice(x,1),x--}return T}),r.formatArgs.call(b,S),(b.log||r.log).apply(b,S)}return C.namespace=l,C.useColors=r.useColors(),C.color=r.selectColor(l),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(g!==r.namespaces&&(g=r.namespaces,v=r.enabled(l)),v),set:S=>{h=S}}),typeof r.init=="function"&&r.init(C),C}function n(l,f){const h=r(this.namespace+(typeof f>"u"?":":f)+l);return h.log=this.log,h}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f;const h=(typeof l=="string"?l:"").split(/[\s,]+/),g=h.length;for(f=0;f<g;f++)h[f]&&(l=h[f].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function s(){const l=[...r.names.map(a),...r.skips.map(a).map(f=>"-"+f)].join(",");return r.enable(""),l}function o(l){if(l[l.length-1]==="*")return!0;let f,h;for(f=0,h=r.skips.length;f<h;f++)if(r.skips[f].test(l))return!1;for(f=0,h=r.names.length;f<h;f++)if(r.names[f].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}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}var Zm=Qm;(function(t,e){e.formatArgs=n,e.save=i,e.load=s,e.useColors=r,e.storage=o(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!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`."))}})(),e.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","#33
4CCCC","#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 r(){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 n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;c.splice(1,0,u,"color: inherit");let l=0,f=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(l++,h==="%c"&&(f=l))}),c.splice(f,0,u)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c={}.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=Zm(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(Xa,Xa.exports);var Ym=Xa.exports,Km=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rn,"__esModule",{value:!0});rn.createModuleLogger=rn.createProjectLogger=void 0;const Xm=Km(Ym),e1=(0,Xm.default)("metamask");function t1(t){return e1.extend(t)}rn.createProjectLogger=t1;function r1(t,e){return t.extend(e)}rn.createModuleLogger=r1;var It={};Object.defineProperty(It,"__esModule",{value:!0});It.hexToBigInt=It.hexToNumber=It.bigIntToHex=It.numberToHex=void 0;const qr=Le,Hn=ii,n1=t=>((0,qr.assert)(typeof t=="number","Value must be a number."),(0,qr.assert)(t>=0,"Value must be a non-negative number."),(0,qr.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Hn.add0x)(t.toString(16)));It.numberToHex=n1;const i1=t=>((0,qr.assert)(typeof t=="bigint","Value must be a bigint."),(0,qr.assert)(t>=0,"Value must be a non-negative bigint."),(0,Hn.add0x)(t.toString(16)));It.bigIntToHex=i1;const s1=t=>{(0,Hn.assertIsHexString)(t);const e=parseInt(t,16);return(0,qr.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};It.hexToNumber=s1;const o1=t=>((0,Hn.assertIsHexString)(t),BigInt((0,Hn.add0x)(t)));It.hexToBigInt=o1;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});var bd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,r=(s,o)=>
vendor: 13,453 bytes, line 4
4{if(!e(s))throw new Error(`"${o}" must be a non-negative integer. Received: "${s}".`)};function n(s,o){return r(s,"count"),s*o}t.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}t.timeSince=i})(bd);var gd={},ec={exports:{}};const a1="2.0.0",yd=256,c1=Number.MAX_SAFE_INTEGER||9007199254740991,u1=16,l1=yd-6,f1=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var bs={MAX_LENGTH:yd,MAX_SAFE_COMPONENT_LENGTH:u1,MAX_SAFE_BUILD_LENGTH:l1,MAX_SAFE_INTEGER:c1,RELEASE_TYPES:f1,SEMVER_SPEC_VERSION:a1,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const h1=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var gs=h1;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=bs,s=gs;e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],u=e.t={};let l=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[f,n]],g=C=>{for(const[S,b]of h)C=C.split(`${S}*`).join(`${S}{0,${b}}`).split(`${S}+`).join(`${S}{1,${b}}`);return C},v=(C,S,b)=>{const y=g(S),_=l++;s(C,_,S),u[C]=_,c[_]=S,o[_]=new RegExp(S,b?"g":void 0),a[_]=new RegExp(y,b?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),v("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),v("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${f}+`),v("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),v("FULL",`^${c[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),v("LOOSE",`^${c[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),v("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),v("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),v("COERCERTL",c[u.COERCE],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",v("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",v("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(ec,ec.exports);var si=ec.exports;const d1=Object.freeze({loose:!0}),p1=Object.freeze({}),b1=t=>t?typeof t!="object"?d1:t:p1;var Dc=b1;const Al=/^[0-9]+$/,vd=(t,e)=>{const r=Al.test(t),n=Al.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},g1=(t,e)=>vd(e,t);var md={compareIdentifiers:vd,rcompareIdentifiers:g1};const Si=gs,{MAX_LENGTH:Ml,MAX_SAFE_INTEGER:Ei}=bs,{safeRe:Tl,t:kl}=si,y1=Dc,{compareIdentifiers:Lr}=md;let v1=class wt{constructor(e,r){if(r=y1(r),e instanceof wt){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>Ml)throw new TypeError(`version is longer than ${Ml} characters`);Si("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Tl[kl.LOOSE]:Tl[kl.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>Ei||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ei||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ei||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<Ei)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(Si("SemVer.compare",this.version,this.options,e),!(e instanceof wt)){if(typeof e=="string"&&e===this.version)return 0;e=new wt(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof wt||(e=new wt(e,this.options)),Lr(this.major,e.major)||Lr(this.minor,e.minor)||Lr(this.patch,e.patch)}comparePre(e){if(e instanceof wt||(e=new wt(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{const n=this.prerelease[r],i=e.prerelease[r];if(Si("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 Lr(n,i)}while(++r)}compareBuild(e){e instanceof wt||(e=new wt(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(Si("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 Lr(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":{const 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]),Lr(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}};var Ue=v1;const Ol=Ue,m1=(t,e,r=!1)=>{if(t instanceof Ol)return t;try{return new Ol(t,e)}catch(n){if(!r)return null;throw n}};var vn=m1;const w1=vn,_1=(t,e)=>{const r=w1(t,e);return r?r.version:null};var S1=_1;const E1=vn,C1=(t,e)=>{const r=E1(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var x1=C1;const Nl=Ue,I1=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Nl(t instanceof Nl?t.version:t,r).inc(e,n,i).version}catch{return null}};var R1=I1;const Ll=vn,A1=(t,e)=>{const r=Ll(t,null,!0),n=Ll(e,null,!0),i=r.compare(n);if(i===0)return null;const 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";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};var M1=A1;const T1=Ue,k1=(t,e)=>new T1(t,e).major;var O1=k1;const N1=Ue,L1=(t,e)=>new N1(t,e).minor;var P1=L1;const $1=Ue,D1=(t,e)=>new $1(t,e).patch;var B1=D1;const j1=vn,F1=(t,e)=>{const r=j1(t,e);return r&&r.prerelease.length?r.prerelease:null};var W1=F1;const Pl=Ue,H1=(t,e,r)=>new Pl(t,r).compare(new Pl(e,r));var pt=H1;const V1=pt,U1=(t,e,r)=>V1(e,t,r);var z1=U1;const q1=pt,G1=(t,e)=>q1(t,e,!0);var J1=G1;const $l=Ue,Q1=(t,e,r)=>{const n=new $l(t,r),i=new $l(e,r);return n.compare(i)||n.compareBuild(i)};var Bc=Q1;const Z1=Bc,Y1=(t,e)=>t.sort((r,n)=>Z1(r,n,e));var K1=Y1;const X1=Bc,ew=(t,e)=>t.sort((r,n)=>X1(n,r,e));var tw=ew;const rw=pt,nw=(t,e,r)=>rw(t,e,r)>0;var ys=nw;const iw=pt,sw=(t,e,r)=>iw(t,e,r)<0;var jc=sw;const ow=pt,aw=(t,e,r)=>ow(t,e,r)===0;var wd=aw;const cw=pt,uw=(t,e,r)=>cw(t,e,r)!==0;var _d=uw;const lw=pt,fw=(t,e,r)=>lw(t,e,r)>=0;var Fc=fw;const hw=pt,dw=(t,e,r)=>hw(t,e,r)<=0;var Wc=dw;const pw=wd,bw=_d,gw=ys,yw=Fc,vw=jc,mw=Wc,ww=(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 pw(t,r,n);case"!=":return bw(t,r,n);case">":return gw(t,r,n);case">=":return yw(t,r,n);case"<":return vw(t,r,n);case"<=":return mw(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var Sd=ww;const _w=Ue,Sw=vn,{safeRe:Ci,t:xi}=si,Ew=(t,e)=>{if(t instanceof _w)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(Ci[xi.COERCE]);else{let n;for(;(n=Ci[xi.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Ci[xi.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Ci[xi.COERCERTL].lastIndex=-1}return r===null?null:Sw(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var Cw=Ew,ga,Dl;function xw(){return Dl||(Dl=1,ga=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),ga}var Iw=oe;oe.Node=yr;oe.create=oe;function oe(t){var e=this;if(e instanceof oe||(e=new oe),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}oe.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};oe.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++}};oe.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++}};oe.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Aw(this,arguments[t]);return this.length};oe.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Mw(this,arguments[t]);return this.length};oe.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}};oe.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}};oe.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};oe.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};oe.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};oe.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};oe.prototype.map=function(t,e){e=e||this;for(var r=new oe,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};oe.prototype.mapReverse=function(t,e){e=e||this;for(var r=new oe,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};oe.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;
vendor: 8,954 bytes, line 4
4i++)r=t(r,n.value,i),n=n.next;return r};oe.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};oe.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};oe.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};oe.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 oe;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};oe.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 oe;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};oe.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=Rw(this,i,r[n]);return s};oe.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 Rw(t,e,r){var n=e===t.head?new yr(r,null,e,t):new yr(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function Aw(t,e){t.tail=new yr(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Mw(t,e){t.head=new yr(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function yr(t,e,r,n){if(!(this instanceof yr))return new yr(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{xw()(oe)}catch{}const Tw=Iw,ur=Symbol("max"),Pt=Symbol("length"),Pr=Symbol("lengthCalculator"),Dn=Symbol("allowStale"),hr=Symbol("maxAge"),Ot=Symbol("dispose"),Bl=Symbol("noDisposeOnSet"),Ae=Symbol("lruList"),lt=Symbol("cache"),Ed=Symbol("updateAgeOnGet"),ya=()=>1;class kw{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");this[ur]=e.max||1/0;const r=e.length||ya;if(this[Pr]=typeof r!="function"?ya:r,this[Dn]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[hr]=e.maxAge||0,this[Ot]=e.dispose,this[Bl]=e.noDisposeOnSet||!1,this[Ed]=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[ur]=e||1/0,Rn(this)}get max(){return this[ur]}set allowStale(e){this[Dn]=!!e}get allowStale(){return this[Dn]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[hr]=e,Rn(this)}get maxAge(){return this[hr]}set lengthCalculator(e){typeof e!="function"&&(e=ya),e!==this[Pr]&&(this[Pr]=e,this[Pt]=0,this[Ae].forEach(r=>{r.length=this[Pr](r.value,r.key),this[Pt]+=r.length})),Rn(this)}get lengthCalculator(){return this[Pr]}get length(){return this[Pt]}get itemCount(){return this[Ae].length}rforEach(e,r){r=r||this;for(let n=this[Ae].tail;n!==null;){const i=n.prev;jl(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[Ae].head;n!==null;){const i=n.next;jl(this,e,n,r),n=i}}keys(){return this[Ae].toArray().map(e=>e.key)}values(){return this[Ae].toArray().map(e=>e.value)}reset(){this[Ot]&&this[Ae]&&this[Ae].length&&this[Ae].forEach(e=>this[Ot](e.key,e.value)),this[lt]=new Map,this[Ae]=new Tw,this[Pt]=0}dump(){return this[Ae].map(e=>Vi(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ae]}set(e,r,n){if(n=n||this[hr],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[Pr](r,e);if(this[lt].has(e)){if(s>this[ur])return Gr(this,this[lt].get(e)),!1;const c=this[lt].get(e).value;return this[Ot]&&(this[Bl]||this[Ot](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[Pt]+=s-c.length,c.length=s,this.get(e),Rn(this),!0}const o=new Ow(e,r,s,i,n);return o.length>this[ur]?(this[Ot]&&this[Ot](e,r),!1):(this[Pt]+=o.length,this[Ae].unshift(o),this[lt].set(e,this[Ae].head),Rn(this),!0)}has(e){if(!this[lt].has(e))return!1;const r=this[lt].get(e).value;return!Vi(this,r)}get(e){return va(this,e,!0)}peek(e){return va(this,e,!1)}pop(){const e=this[Ae].tail;return e?(Gr(this,e),e.value):null}del(e){Gr(this,this[lt].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[lt].forEach((e,r)=>va(this,r,!1))}}const va=(t,e,r)=>{const n=t[lt].get(e);if(n){const i=n.value;if(Vi(t,i)){if(Gr(t,n),!t[Dn])return}else r&&(t[Ed]&&(n.value.now=Date.now()),t[Ae].unshiftNode(n));return i.value}},Vi=(t,e)=>{if(!e||!e.maxAge&&!t[hr])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[hr]&&r>t[hr]},Rn=t=>{if(t[Pt]>t[ur])for(let e=t[Ae].tail;t[Pt]>t[ur]&&e!==null;){const r=e.prev;Gr(t,e),e=r}},Gr=(t,e)=>{if(e){const r=e.value;t[Ot]&&t[Ot](r.key,r.value),t[Pt]-=r.length,t[lt].delete(r.key),t[Ae].removeNode(e)}};class Ow{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const jl=(t,e,r,n)=>{let i=r.value;Vi(t,i)&&(Gr(t,r),t[Dn]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var Nw=kw,ma,Fl;function bt(){if(Fl)return ma;Fl=1;class t{constructor(A,N){if(N=n(N),A instanceof t)return A.loose===!!N.loose&&A.includePrerelease===!!N.includePrerelease?A:new t(A.raw,N);if(A instanceof i)return this.raw=A.value,this.set=[[A]],this.format(),this;if(this.options=N,this.loose=!!N.loose,this.includePrerelease=!!N.includePrerelease,this.raw=A.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(L=>this.parseRange(L.trim())).filter(L=>L.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const L=this.set[0];if(this.set=this.set.filter(B=>!v(B[0])),this.set.length===0)this.set=[L];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&C(B[0])){this.set=[B];break}}}this.format()}format(){return this.range=this.set.map(A=>A.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(A){const L=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+A,B=r.get(L);if(B)return B;const $=this.options.loose,H=$?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];A=A.replace(H,ae(this.options.includePrerelease)),s("hyphen replace",A),A=A.replace(a[c.COMPARATORTRIM],u),s("comparator trim",A),A=A.replace(a[c.TILDETRIM],l),s("tilde trim",A),A=A.replace(a[c.CARETTRIM],f),s("caret trim",A);let Z=A.split(" ").map(ue=>b(ue,this.options)).join(" ").split(/\s+/).map(ue=>q(ue,this.options));$&&(Z=Z.filter(ue=>(s("loose invalid filter",ue,this.options),!!ue.match(a[c.COMPARATORLOOSE])))),s("range list",Z);const G=new Map,ie=Z.map(ue=>new i(ue,this.options));for(const ue of ie){if(v(ue))return[ue];G.set(ue.value,ue)}G.size>1&&G.has("")&&G.delete("");const fe=[...G.values()];return r.set(L,fe),fe}intersects(A,N){if(!(A instanceof t))throw new TypeError("a Range is required");return this.set.some(L=>S(L,N)&&A.set.some(B=>S(B,N)&&L.every($=>B.every(H=>$.intersects(H,N)))))}test(A){if(!A)return!1;if(typeof A=="string")try{A=new o(A,this.options)}catch{return!1}for(let N=0;N<this.set.length;N++)if(Q(this.set[N],A,this.options))return!0;return!1}}ma=t;const e=Nw,r=new e({max:1e3}),n=Dc,i=vs(),s=gs,o=Ue,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:f}=si,{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=bs,v=R=>R.value==="<0.0.0-0",C=R=>R.value==="",S=(R,A)=>{let N=!0;const L=R.slice();let B=L.pop();for(;N&&L.length;)N=L.every($=>B.intersects($,A)),B=L.pop();return N},b=(R,A)=>(s("comp",R,A),R=E(R,A),s("caret",R),R=_(R,A),s("tildes",R),R=F(R,A),s("xrange",R),R=O(R,A),s("stars",R),R),y=R=>!R||R.toLowerCase()==="x"||R==="*",_=(R,A)=>R.trim().split(/\s+/).map(N=>x(N,A)).join(" "),x=(R,A)=>{const N=A.loose?a[c.TILDELOOSE]:a[c.TILDE];return R.replace(N,(L,B,$,H,Z)=>{s("tilde",R,L,B,$,H,Z);let G;return y(B)?G="":y($)?G=`>=${B}.0.0 <${+B+1}.0.0-0`:y(H)?G=`>=${B}.${$}.0 <${B}.${+$+1}.0-0`:Z?(s("replaceTilde pr",Z),G=`>=${B}.${$}.${H}-${Z} <${B}.${+$+1}.0-0`):G=`>=${B}.${$}.${H} <${B}.${+$+1}.0-0`,s("tilde return",G),G})},E=(R,A)=>R.trim().split(/\s+/).map(N=>T(N,A)).join(" "),T=(R,A)=>{s("caret",R,A);const N=A.loose?a[c.CARETLOOSE]:a[c.CARET],L=A.includePrerelease?"-0":"";return R.replace(N,(B,$,H,Z,G)=>{s("caret",R,B,$,H,Z,G);let ie;
vendor: 9,115 bytes, line 4
4return y($)?ie="":y(H)?ie=`>=${$}.0.0${L} <${+$+1}.0.0-0`:y(Z)?$==="0"?ie=`>=${$}.${H}.0${L} <${$}.${+H+1}.0-0`:ie=`>=${$}.${H}.0${L} <${+$+1}.0.0-0`:G?(s("replaceCaret pr",G),$==="0"?H==="0"?ie=`>=${$}.${H}.${Z}-${G} <${$}.${H}.${+Z+1}-0`:ie=`>=${$}.${H}.${Z}-${G} <${$}.${+H+1}.0-0`:ie=`>=${$}.${H}.${Z}-${G} <${+$+1}.0.0-0`):(s("no pr"),$==="0"?H==="0"?ie=`>=${$}.${H}.${Z}${L} <${$}.${H}.${+Z+1}-0`:ie=`>=${$}.${H}.${Z}${L} <${$}.${+H+1}.0-0`:ie=`>=${$}.${H}.${Z} <${+$+1}.0.0-0`),s("caret return",ie),ie})},F=(R,A)=>(s("replaceXRanges",R,A),R.split(/\s+/).map(N=>D(N,A)).join(" ")),D=(R,A)=>{R=R.trim();const N=A.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return R.replace(N,(L,B,$,H,Z,G)=>{s("xRange",R,L,B,$,H,Z,G);const ie=y($),fe=ie||y(H),ue=fe||y(Z),je=ue;return B==="="&&je&&(B=""),G=A.includePrerelease?"-0":"",ie?B===">"||B==="<"?L="<0.0.0-0":L="*":B&&je?(fe&&(H=0),Z=0,B===">"?(B=">=",fe?($=+$+1,H=0,Z=0):(H=+H+1,Z=0)):B==="<="&&(B="<",fe?$=+$+1:H=+H+1),B==="<"&&(G="-0"),L=`${B+$}.${H}.${Z}${G}`):fe?L=`>=${$}.0.0${G} <${+$+1}.0.0-0`:ue&&(L=`>=${$}.${H}.0${G} <${$}.${+H+1}.0-0`),s("xRange return",L),L})},O=(R,A)=>(s("replaceStars",R,A),R.trim().replace(a[c.STAR],"")),q=(R,A)=>(s("replaceGTE0",R,A),R.trim().replace(a[A.includePrerelease?c.GTE0PRE:c.GTE0],"")),ae=R=>(A,N,L,B,$,H,Z,G,ie,fe,ue,je,m)=>(y(L)?N="":y(B)?N=`>=${L}.0.0${R?"-0":""}`:y($)?N=`>=${L}.${B}.0${R?"-0":""}`:H?N=`>=${N}`:N=`>=${N}${R?"-0":""}`,y(ie)?G="":y(fe)?G=`<${+ie+1}.0.0-0`:y(ue)?G=`<${ie}.${+fe+1}.0-0`:je?G=`<=${ie}.${fe}.${ue}-${je}`:R?G=`<${ie}.${fe}.${+ue+1}-0`:G=`<=${G}`,`${N} ${G}`.trim()),Q=(R,A,N)=>{for(let L=0;L<R.length;L++)if(!R[L].test(A))return!1;if(A.prerelease.length&&!N.includePrerelease){for(let L=0;L<R.length;L++)if(s(R[L].semver),R[L].semver!==i.ANY&&R[L].semver.prerelease.length>0){const B=R[L].semver;if(B.major===A.major&&B.minor===A.minor&&B.patch===A.patch)return!0}return!1}return!0};return ma}var wa,Wl;function vs(){if(Wl)return wa;Wl=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(l,f){if(f=r(f),l instanceof e){if(l.loose===!!f.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,f),this.options=f,this.loose=!!f.loose,this.parse(l),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const f=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],h=l.match(f);if(!h)throw new TypeError(`Invalid comparator: ${l}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new a(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===t||l===t)return!0;if(typeof l=="string")try{l=new a(l,this.options)}catch{return!1}return s(l,this.operator,this.semver,this.options)}intersects(l,f){if(!(l instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(l.value,f).test(this.value):l.operator===""?l.value===""?!0:new c(this.value,f).test(l.semver):(f=r(f),f.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||s(this.semver,"<",l.semver,f)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||s(this.semver,">",l.semver,f)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}wa=e;const r=Dc,{safeRe:n,t:i}=si,s=Sd,o=gs,a=Ue,c=bt();return wa}const Lw=bt(),Pw=(t,e,r)=>{try{e=new Lw(e,r)}catch{return!1}return e.test(t)};var ms=Pw;const $w=bt(),Dw=(t,e)=>new $w(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Bw=Dw;const jw=Ue,Fw=bt(),Ww=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Fw(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new jw(n,r))}),n};var Hw=Ww;const Vw=Ue,Uw=bt(),zw=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Uw(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Vw(n,r))}),n};var qw=zw;const _a=Ue,Gw=bt(),Hl=ys,Jw=(t,e)=>{t=new Gw(t,e);let r=new _a("0.0.0");if(t.test(r)||(r=new _a("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null;i.forEach(o=>{const a=new _a(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Hl(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||Hl(r,s))&&(r=s)}return r&&t.test(r)?r:null};var Qw=Jw;const Zw=bt(),Yw=(t,e)=>{try{return new Zw(t,e).range||"*"}catch{return null}};var Kw=Yw;const Xw=Ue,Cd=vs(),{ANY:e_}=Cd,t_=bt(),r_=ms,Vl=ys,Ul=jc,n_=Wc,i_=Fc,s_=(t,e,r,n)=>{t=new Xw(t,n),e=new t_(e,n);let i,s,o,a,c;switch(r){case">":i=Vl,s=n_,o=Ul,a=">",c=">=";break;case"<":i=Ul,s=i_,o=Vl,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(r_(t,e,n))return!1;for(let u=0;u<e.set.length;++u){const l=e.set[u];let f=null,h=null;if(l.forEach(g=>{g.semver===e_&&(g=new Cd(">=0.0.0")),f=f||g,h=h||g,i(g.semver,f.semver,n)?f=g:o(g.semver,h.semver,n)&&(h=g)}),f.operator===a||f.operator===c||(!h.operator||h.operator===a)&&s(t,h.semver))return!1;if(h.operator===c&&o(t,h.semver))return!1}return!0};var Hc=s_;const o_=Hc,a_=(t,e,r)=>o_(t,e,">",r);var c_=a_;const u_=Hc,l_=(t,e,r)=>u_(t,e,"<",r);var f_=l_;const zl=bt(),h_=(t,e,r)=>(t=new zl(t,r),e=new zl(e,r),t.intersects(e,r));var d_=h_;const p_=ms,b_=pt;var g_=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((l,f)=>b_(l,f,r));for(const l of o)p_(l,e,r)?(s=l,i||(i=l)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const a=[];for(const[l,f]of n)l===f?a.push(l):!f&&l===o[0]?a.push("*"):f?l===o[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);const c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e};const ql=bt(),Vc=vs(),{ANY:Sa}=Vc,An=ms,Uc=pt,y_=(t,e,r={})=>{if(t===e)return!0;t=new ql(t,r),e=new ql(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=m_(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},v_=[new Vc(">=0.0.0-0")],Gl=[new Vc(">=0.0.0")],m_=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Sa){if(e.length===1&&e[0].semver===Sa)return!0;r.includePrerelease?t=v_:t=Gl}if(e.length===1&&e[0].semver===Sa){if(r.includePrerelease)return!0;e=Gl}const n=new Set;let i,s;for(const g of t)g.operator===">"||g.operator===">="?i=Jl(i,g,r):g.operator==="<"||g.operator==="<="?s=Ql(s,g,r):n.add(g.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Uc(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const g of n){if(i&&!An(g,String(i),r)||s&&!An(g,String(s),r))return null;for(const v of e)if(!An(g,String(v),r))return!1;return!0}let a,c,u,l,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(const g of e){if(l=l||g.operator===">"||g.operator===">=",u=u||g.operator==="<"||g.operator==="<=",i){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator===">"||g.operator===">="){if(a=Jl(i,g,r),a===g&&a!==i)return!1}else if(i.operator===">="&&!An(i.semver,String(g),r))return!1}if(s){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(c=Ql(s,g,r),c===g&&c!==s)return!1}else if(s.operator==="<="&&!An(s.semver,String(g),r))return!1}if(!g.operator&&(s||i)&&o!==0)return!1}return!(i&&u&&!s&&o!==0||s&&l&&!i&&o!==0||h||f)},Jl=(t,e,r)=>{if(!t)return e;const n=Uc(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Ql=(t,e,r)=>{if(!t)return e;const n=Uc(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var w_=y_;const Ea=si,Zl=bs,__=Ue,Yl=md,S_=vn,E_=S1,C_=x1,x_=R1,I_=M1,R_=O1,A_=P1,M_=B1,T_=W1,k_=pt,O_=z1,N_=J1,L_=Bc,P_=K1,$_=tw,D_=ys,B_=jc,j_=wd,F_=_d,W_=Fc,H_=Wc,V_=Sd,U_=Cw,z_=vs(),q_=bt(),G_=ms,J_=Bw,Q_=Hw,Z_=qw,Y_=Qw,K_=Kw,X_=Hc,e2=c_,t2=f_,r2=d_,n2=g_,i2=w_;var s2={parse:S_,valid:E_,clean:C_,inc:x_,diff:I_,major:R_,minor:A_,patch:M_,prerelease:T_,compare:k_,rcompare:O_,compareLoose:N_,compareBuild:L_,sort:P_,rsort:$_,gt:D_,lt:B_,eq:j_,neq:F_,gte:W_,lte:H_,cmp:V_,coerce:U_,Comparator:z_,Range:q_,satisfies:G_,toComparators:J_,maxSatisfying:Q_,minSatisfying:Z_,minVersion:Y_,validRange:K_,outside:X_,gtr:e2,ltr:t2,intersects:r2,simplifyRange:n2,subset:i2,SemVer:__,re:Ea.re,src:Ea.src,tokens:Ea.t,SEMVER_SPEC_VERSION:Zl.SEMVER_SPEC_VERSION,RELEASE_TYPES:Zl.RELEASE_TYPES,compareIdentifiers:Yl.compareIdentifiers,rcompareIdentifiers:Yl.rcompareIdentifiers};
4(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const e=s2,r=Rr,n=Le;t.VersionStruct=(0,r.refine)((0,r.string)(),"Version",f=>(0,e.valid)(f)===null?`Expected SemVer version, got "${f}"`:!0),t.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",f=>(0,e.validRange)(f)===null?`Expected SemVer range, got "${f}"`:!0);function i(f){return(0,r.is)(f,t.VersionStruct)}t.isValidSemVerVersion=i;function s(f){return(0,r.is)(f,t.VersionRangeStruct)}t.isValidSemVerRange=s;function o(f){(0,n.assertStruct)(f,t.VersionStruct)}t.assertIsSemVerVersion=o;function a(f){(0,n.assertStruct)(f,t.VersionRangeStruct)}t.assertIsSemVerRange=a;function c(f,h){return(0,e.gt)(f,h)}t.gtVersion=c;function u(f,h){return(0,e.gtr)(f,h)}t.gtRange=u;function l(f,h){return(0,e.satisfies)(f,h,{includePrerelease:!0})}t.satisfiesVersionRange=l})(gd);(function(t){var e=j&&j.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=j&&j.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Le,t),r(ni,t),r(se,t),r(ds,t),r(xt,t),r(tn,t),r(ii,t),r(dd,t),r(rn,t),r($c,t),r(It,t),r(pd,t),r(bd,t),r(gd,t)})(Jh);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=Jh;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(Gh);var xd=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fs,"__esModule",{value:!0});fs.PollingBlockTracker=void 0;const o2=xd(Ic),a2=xd(Av),c2=ti,Kl=Gh,Xl=(0,Kl.createModuleLogger)(Kl.projectLogger,"polling-block-tracker"),u2=(0,o2.default)(),l2=1e3;class f2 extends c2.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*l2,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const r=ef(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
5${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit("error",n)}catch{console.error(n)}const i=ef(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:u2(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),Xl("Making request",e);const r=await(0,a2.default)(n=>this._provider.sendAsync(e,n))();if(Xl("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
6${r.error.message}`);return r.result}}fs.PollingBlockTracker=f2;function ef(t,e){return new Promise(r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()})}var ws={},h2=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ws,"__esModule",{value:!0});ws.SubscribeBlockTracker=void 0;const d2=h2(Ic),p2=ti,b2=(0,d2.default)();class g2 extends p2.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}
6async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await 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:b2(),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)}}ws.SubscribeBlockTracker=g2;var Id={};Object.defineProperty(Id,"__esModule",{value:!0});(function(t){var e=j&&j.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=j&&j.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(fs,t),r(ws,t),r(Id,t)})(qh);var zc={},_s={},oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.getUniqueId=void 0;const Rd=4294967295;let Ca=Math.floor(Math.random()*Rd);function y2(){return Ca=(Ca+1)%Rd,Ca}oi.getUniqueId=y2;Object.defineProperty(_s,"__esModule",{value:!0});_s.createIdRemapMiddleware=void 0;const v2=oi;function m2(){return(t,e,r,n)=>{const i=t.id,s=v2.getUniqueId();t.id=s,e.id=s,r(o=>{t.id=i,e.id=i,o()})}}_s.createIdRemapMiddleware=m2;var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});Ss.createAsyncMiddleware=void 0;function w2(t){return async(e,r,n,i)=>{let s;const o=new Promise(l=>{s=l});let a=null,c=!1;const u=async()=>{c=!0,n(l=>{a=l,s()}),await o};try{await t(e,r,u),c?(await o,a(null)):i(null)}catch(l){a?a(l):i(l)}}}Ss.createAsyncMiddleware=w2;var Es={};Object.defineProperty(Es,"__esModule",{value:!0});Es.createScaffoldMiddleware=void 0;function _2(t){return(e,r,n,i)=>{const s=t[e.method];return s===void 0?n():typeof s=="function"?s(e,r,n,i):(r.result=s,i())}}Es.createScaffoldMiddleware=_2;var ai={},S2=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ai,"__esModule",{value:!0});ai.JsonRpcEngine=void 0;const E2=S2(_r),Ke=hc;class Nt extends E2.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 async(e,r,n,i)=>{try{const[s,o,a]=await Nt._runAllMiddleware(e,r,this._middleware);return o?(await Nt._runReturnHandlers(a),i(s)):n(async c=>{try{await Nt._runReturnHandlers(a)}catch(u){return c(u)}return c()})}catch(s){return i(s)}}}async _handleBatch(e,r){try{const n=await 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)})})}async _handle(e,r){if(!e||Array.isArray(e)||typeof e!="object"){const o=new Ke.EthereumRpcError(Ke.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"){const o=new Ke.EthereumRpcError(Ke.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})}const n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(o){s=o}return s&&(delete i.result,i.error||(i.error=Ke.serializeError(s))),r(s,i)}async _processRequest(e,r){const[n,i,s]=await Nt._runAllMiddleware(e,r,this._middleware);if(Nt._checkForCompletion(e,r,i),await Nt._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,r,n){const i=[];let s=null,o=!1;for(const a of n)if([s,o]=await Nt._runMiddleware(e,r,a,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,r,n,i){return new Promise(s=>{const o=c=>{const u=c||r.error;u&&(r.error=Ke.serializeError(u)),s([u,!0])},a=c=>{r.error?o(r.error):(c&&(typeof c!="function"&&o(new Ke.EthereumRpcError(Ke.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof c}" for request:
7${xa(e)}`,{request:e})),i.push(c)),s([null,!1]))};try{n(e,r,a,o)}catch(c){o(c)}})}static async _runReturnHandlers(e){for(const r of e)await new Promise((n,i)=>{r(s=>s?i(s):n())})}static _checkForCompletion(e,r,n){if(!("result"in r)&&!("error"in r))throw new Ke.EthereumRpcError(Ke.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
8${xa(e)}`,{request:e});if(!n)throw new Ke.EthereumRpcError(Ke.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
9${xa(e)}`,{request:e})}}ai.JsonRpcEngine=Nt;function xa(t){return JSON.stringify(t,null,2)}var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.mergeMiddleware=void 0;const C2=ai;function x2(t){const e=new C2.JsonRpcEngine;return t.forEach(r=>e.push(r)),e.asMiddleware()}Cs.mergeMiddleware=x2;(function(t){var e=j&&j.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}
9),r=j&&j.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(_s,t),r(Ss,t),r(Es,t),r(oi,t),r(ai,t),r(Cs,t)})(zc);var Ad={},qc={};const Gc=wr(Np);var xs={};Object.defineProperty(xs,"__esModule",{value:!0});var tf=Gc,I2=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 tf.__awaiter(this,void 0,void 0,function(){var r,n,i;return tf.__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}();xs.default=I2;Object.defineProperty(qc,"__esModule",{value:!0});var rf=Gc,R2=xs,A2=function(){function t(){this._semaphore=new R2.default(1)}return t.prototype.acquire=function(){return rf.__awaiter(this,void 0,void 0,function(){var e,r;return rf.__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}();qc.default=A2;var Is={};Object.defineProperty(Is,"__esModule",{value:!0});Is.withTimeout=void 0;var Ii=Gc;function M2(t,e,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return Ii.__awaiter(n,void 0,void 0,function(){var o,a,c;return Ii.__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 Ii.__awaiter(this,void 0,void 0,function(){var s,o;return Ii.__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()}}}Is.withTimeout=M2;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=t.Semaphore=t.Mutex=void 0;var e=qc;Object.defineProperty(t,"Mutex",{enumerable:!0,get:function(){return e.default}});var r=xs;Object.defineProperty(t,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=Is;Object.defineProperty(t,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})(Ad);var T2=O2,k2=Object.prototype.hasOwnProperty;function O2(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)k2.call(r,n)&&(t[n]=r[n])}return t}const N2=T2,L2=Ic();var P2=J;function J(t){const e=this;e.currentProvider=t}J.prototype.getBalance=ci(2,"eth_getBalance");J.prototype.getCode=ci(2,"eth_getCode");J.prototype.getTransactionCount=ci(2,"eth_getTransactionCount");J.prototype.getStorageAt=ci(3,"eth_getStorageAt");J.prototype.call=ci(2,"eth_call");J.prototype.protocolVersion=te("eth_protocolVersion");J.prototype.syncing=te("eth_syncing");J.prototype.coinbase=te("eth_coinbase");J.prototype.mining=te("eth_mining");J.prototype.hashrate=te("eth_hashrate");J.prototype.gasPrice=te("eth_gasPrice");J.prototype.accounts=te("eth_accounts");J.prototype.blockNumber=te("eth_blockNumber");J.prototype.getBlockTransactionCountByHash=te("eth_getBlockTransactionCountByHash");J.prototype.getBlockTransactionCountByNumber=te("eth_getBlockTransactionCountByNumber");J.prototype.getUncleCountByBlockHash=te("eth_getUncleCountByBlockHash");J.prototype.getUncleCountByBlockNumber=te("eth_getUncleCountByBlockNumber");J.prototype.sign=te("eth_sign");J.prototype.sendTransaction=te("eth_sendTransaction");J.prototype.sendRawTransaction=te("eth_sendRawTransaction");J.prototype.estimateGas=te("eth_estimateGas");J.prototype.getBlockByHash=te("eth_getBlockByHash");J.prototype.getBlockByNumber=te("eth_getBlockByNumber");J.prototype.getTransactionByHash=te("eth_getTransactionByHash");J.prototype.getTransactionByBlockHashAndIndex=te("eth_getTransactionByBlockHashAndIndex");J.prototype.getTransactionByBlockNumberAndIndex=te("eth_getTransactionByBlockNumberAndIndex");J.prototype.getTransactionReceipt=te("eth_getTransactionReceipt");J.prototype.getUncleByBlockHashAndIndex=te("eth_getUncleByBlockHashAndIndex");J.prototype.getUncleByBlockNumberAndIndex=te("eth_getUncleByBlockNumberAndIndex");J.prototype.getCompilers=te("eth_getCompilers");J.prototype.compileLLL=te("eth_compileLLL");J.prototype.compileSolidity=te("eth_compileSolidity");J.prototype.compileSerpent=te("eth_compileSerpent");J.prototype.newFilter=te("eth_newFilter");J.prototype.newBlockFilter=te("eth_newBlockFilter");J.prototype.newPendingTransactionFilter=te("eth_newPendingTransactionFilter");J.prototype.uninstallFilter=te("eth_uninstallFilter");J.prototype.getFilterChanges=te("eth_getFilterChanges");J.prototype.getFilterLogs=te("eth_getFilterLogs");J.prototype.getLogs=te("eth_getLogs");J.prototype.getWork=te("eth_getWork");J.prototype.submitWork=te("eth_submitWork");J.prototype.submitHashrate=te("eth_submitHashrate");J.prototype.sendAsync=function(t,e){this.currentProvider.sendAsync($2(t),function(n,i){if
9(!n&&i.error&&(n=new Error("EthQuery - RPC Error - "+i.error.message)),n)return e(n);e(null,i.result)})};function te(t){return function(){const e=this;var r=[].slice.call(arguments),n=r.pop();e.sendAsync({method:t,params:r},n)}}function ci(t,e){return function(){const r=this;var n=[].slice.call(arguments),i=n.pop();n.length<t&&n.push("latest"),r.sendAsync({method:e,params:n},i)}}function $2(t){return N2({id:L2(),jsonrpc:"2.0",params:[]},t)}const nf=(t,e,r,n)=>function(...i){const 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,l)=>{u?a(u):o(l)}):i.push(o),Reflect.apply(t,this===r?n:this,i)})},sf=new WeakMap;var D2=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const 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}\``);const n=(o,a)=>{let c=sf.get(o);if(c||(c={},sf.set(o,c)),a in c)return c[a];const u=v=>typeof v=="string"||typeof a=="symbol"?a===v:v.test(a),l=Reflect.getOwnPropertyDescriptor(o,a),f=l===void 0||l.writable||l.configurable,g=(e.include?e.include.some(u):!e.exclude.some(u))&&f;return c[a]=g,g},i=new WeakMap,s=new Proxy(t,{apply(o,a,c){const u=i.get(o);if(u)return Reflect.apply(u,a,c);const l=e.excludeMain?o:nf(o,e,s,o);return i.set(o,l),Reflect.apply(l,a,c)},get(o,a){const c=o[a];if(!n(o,a)||c===Function.prototype[a])return c;const u=i.get(c);if(u)return u;if(typeof c=="function"){const l=nf(c,e,s,o);return i.set(c,l),l}return c}});return s};const B2=_r.default;let j2=class extends B2{constructor(){super(),this.updates=[]}async initialize(){}async update(){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(){const e=this.updates;return this.updates=[],e}};var Jc=j2;const F2=Jc;let W2=class extends F2{constructor(){super(),this.allResults=[]}async update(){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}};var H2=W2,ui={minBlockRef:V2,maxBlockRef:U2,sortBlockRefs:Qc,bnToHex:z2,blockRefIsNumber:q2,hexToInt:Ui,incrementHexInt:G2,intToHex:Md,unsafeRandomBytes:J2};function V2(...t){return Qc(t)[0]}function U2(...t){const e=Qc(t);return e[e.length-1]}function Qc(t){return t.sort((e,r)=>e==="latest"||r==="earliest"?1:r==="latest"||e==="earliest"?-1:Ui(e)-Ui(r))}function z2(t){return"0x"+t.toString(16)}function q2(t){return t&&!["earliest","latest","pending"].includes(t)}function Ui(t){return t==null?t:Number.parseInt(t,16)}function G2(t){if(t==null)return t;const e=Ui(t);return Md(e+1)}function Md(t){if(t==null)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function J2(t){let e="0x";for(let r=0;r<t;r++)e+=of(),e+=of();return e}function of(){return Math.floor(Math.random()*16).toString(16)}const Q2=P2,Z2=D2,Y2=H2,{bnToHex:YI,hexToInt:Ri,incrementHexInt:K2,minBlockRef:X2,blockRefIsNumber:eS}=ui;let tS=class extends Y2{constructor({provider:e,params:r}){super(),this.type="log",this.ethQuery=new Q2(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()))}async initialize({currentBlock:e}){let r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=e),r==="earliest"&&(r="0x0"),this.params.fromBlock=r;const n=X2(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:e,newBlock:r}){const n=r;let i;e?i=K2(e):i=r;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),a=(await this._fetchLogs(s)).filter(c=>this.matchLog(c));this.addResults(a)}async _fetchLogs(e){return await Z2(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(Ri(this.params.fromBlock)>=Ri(e.blockNumber)||eS(this.params.toBlock)&&Ri(this.params.toBlock)<=Ri(e.blockNumber))return!1;const 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];
9return a.includes(null)?!0:(a=a.map(l=>l.toLowerCase()),a.includes(o))})}};var rS=tS,Zc=nS;async function nS({provider:t,fromBlock:e,toBlock:r}){e||(e=r);const n=af(e),s=af(r)-n+1,o=Array(s).fill().map((c,u)=>n+u).map(iS);return await Promise.all(o.map(c=>oS(t,"eth_getBlockByNumber",[c,!1])))}function af(t){return t==null?t:Number.parseInt(t,16)}function iS(t){return t==null?t:"0x"+t.toString(16)}function sS(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"))})})}async function oS(t,e,r){for(let n=0;n<3;n++)try{return await sS(t,{id:1,jsonrpc:"2.0",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}throw new Error(`Block not found for params: ${JSON.stringify(r)}`)}const aS=Jc,cS=Zc,{incrementHexInt:uS}=ui;let lS=class extends aS{constructor({provider:e,params:r}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:r}){const n=r,i=uS(e),o=(await cS({provider:this.provider,fromBlock:i,toBlock:n})).map(a=>a.hash);this.addResults(o)}};var fS=lS;const hS=Jc,dS=Zc,{incrementHexInt:pS}=ui;let bS=class extends hS{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const r=e,n=pS(e),i=await dS({provider:this.provider,fromBlock:n,toBlock:r}),s=[];for(const o of i)s.push(...o.transactions);this.addResults(s)}};var gS=bS;
9const yS=Ad.Mutex,{createAsyncMiddleware:vS,createScaffoldMiddleware:mS}=zc,wS=rS,_S=fS,SS=gS,{intToHex:Td,hexToInt:Ia}=ui;var ES=CS;function CS({blockTracker:t,provider:e}){let r=0,n={};const i=new yS,s=xS({mutex:i}),o=mS({eth_newFilter:s(Ra(c)),eth_newBlockFilter:s(Ra(u)),eth_newPendingTransactionFilter:s(Ra(l)),eth_uninstallFilter:s(Pi(g)),eth_getFilterChanges:s(Pi(f)),eth_getFilterLogs:s(Pi(h))}),a=async({oldBlock:y,newBlock:_})=>{if(n.length===0)return;const x=await i.acquire();try{await Promise.all($r(n).map(async E=>{try{await E.update({oldBlock:y,newBlock:_})}catch(T){console.error(T)}}))}catch(E){console.error(E)}x()};return o.newLogFilter=c,o.newBlockFilter=u,o.newPendingTransactionFilter=l,o.uninstallFilter=g,o.getFilterChanges=f,o.getFilterLogs=h,o.destroy=()=>{S()},o;async function c(y){const _=new wS({provider:e,params:y});return await v(_),_}async function u(){const y=new _S({provider:e});return await v(y),y}async function l(){const y=new SS({provider:e});return await v(y),y}async function f(y){const _=Ia(y),x=n[_];if(!x)throw new Error(`No filter for index "${_}"`);return x.getChangesAndClear()}async function h(y){const _=Ia(y),x=n[_];if(!x)throw new Error(`No filter for index "${_}"`);let E=[];return x.type==="log"&&(E=x.getAllResults()),E}async function g(y){const _=Ia(y),E=!!n[_];return E&&await C(_),E}async function v(y){const _=$r(n).length,x=await t.getLatestBlock();await y.initialize({currentBlock:x}),r++,n[r]=y,y.id=r,y.idHex=Td(r);const E=$r(n).length;return b({prevFilterCount:_,newFilterCount:E}),r}async function C(y){const _=$r(n).length;delete n[y];const x=$r(n).length;b({prevFilterCount:_,newFilterCount:x})}async function S(){const y=$r(n).length;n={},b({prevFilterCount:y,newFilterCount:0})}function b({prevFilterCount:y,newFilterCount:_}){if(y===0&&_>0){t.on("sync",a);return}if(y>0&&_===0){t.removeListener("sync",a);return}}}function Ra(t){return Pi(async(...e)=>{const r=await t(...e);return Td(r.id)})}function Pi(t){return vS(async(e,r)=>{const n=await t.apply(null,e.params);r.result=n})}function xS({mutex:t}){return e=>async(r,n,i,s)=>{(await t.acquire())(),e(r,n,i,s)}}function $r(t,e){const r=[];for(let n in t)r.push(t[n]);return r}const IS=_r.default,{createAsyncMiddleware:cf,createScaffoldMiddleware:RS}=zc,AS=ES,{unsafeRandomBytes:MS,incrementHexInt:TS}=ui,kS=Zc;var OS=NS;function NS({blockTracker:t,provider:e}){const r={},n=AS({blockTracker:t,provider:e});let i=!1;const s=new IS,o=RS({eth_subscribe:cf(a),eth_unsubscribe:cf(c)});return o.destroy=l,{events:s,middleware:o};async function a(f,h){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const g=f.params[0],v=MS(16);let C;switch(g){case"newHeads":C=S({subId:v});break;case"logs":const y=f.params[1],_=await n.newLogFilter(y);C=b({subId:v,filter:_});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${g}"`)}r[v]=C,h.result=v;return;function S({subId:y}){const _={type:g,destroy:async()=>{t.removeListener("sync",_.update)},update:async({oldBlock:x,newBlock:E})=>{const T=E,F=TS(x);(await kS({provider:e,fromBlock:F,toBlock:T})).map(LS).filter(q=>q!==null).forEach(q=>{u(y,q)})}};return t.on("sync",_.update),_}function b({subId:y,filter:_}){return _.on("update",E=>u(y,E)),{type:g,destroy:async()=>await n.uninstallFilter(_.idHex)}}}async function c(f,h){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const g=f.params[0],v=r[g];if(!v){h.result=!1;return}delete r[g],await v.destroy(),h.result=!0}function u(f,h){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:f,result:h}})}function l(){s.removeAllListeners();for(const f in r)r[f].destroy(),delete r[f];i=!0}}function LS(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}}Object.defineProperty(ls,"__esModule",{value:!0});ls.SubscriptionManager=void 0;const PS=qh,$S=OS,uf=()=>{};class DS{constructor(e){const r=new PS.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=$S({blockTracker:r,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){const r={};return await this.subscriptionMiddleware(e,r,uf,uf),r}destroy(){this.subscriptionMiddleware.destroy()}}ls.SubscriptionManager=DS;var Yc=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
9Object.defineProperty(Qr,"__esModule",{value:!0});Qr.CoinbaseWalletProvider=void 0;const BS=Yc(_r),jS=Yc(Yi),Aa=ln,he=qn,lf=hn,ff=ht,Ma=rs,FS=de,K=W,Ta=Yc(Ev),WS=en,ce=zh,HS=ls,hf="DefaultChainId",df="DefaultJsonRpcUrl";class VS extends BS.default{constructor(e){var r,n;super(),this._filterPolyfill=new WS.FilterPolyfill(this),this._subscriptionManager=new HS.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;const i=this.getChainId(),s=(0,K.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});const o=this._storage.getItem(ff.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const a=o.split(" ");a[0]!==""&&(this._addresses=a.map(c=>(0,K.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"){if(a.data.data.action==="dappChainSwitched"){const u=a.data.data.chainId,l=(c=a.data.data.jsonRpcUrl)!==null&&c!==void 0?c:this.jsonRpcUrl;this.updateProviderInfo(l,Number(u))}a.data.data.action==="addressChanged"&&this._setAddresses([a.data.data.address])}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,K.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(df))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(df,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;const n=this.getChainId();this._storage.setItem(hf,r.toString(10)),((0,K.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,r,n,i,s,o){return!!(await(await this.initializeRelay()).watchAsset(e,r,n,i,s,o==null?void 0:o.toString()).promise).result}async addEthereumChain(e,r,n,i,s,o){var a,c;if((0,K.ensureIntNumber)(e)===this.getChainId())return!1;const u=await this.initializeRelay(),l=u.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!l&&await u.requestEthereumAccounts().promise;const f=await u.addEthereumChain(e.toString(),r,s,n,i,o).promise;return((a=f.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(r[0],e),((c=f.result)===null||c===void 0?void 0:c.isApproved)===!0}async switchEthereumChain(e){const n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,FS.isErrorResponse)(n)&&n.errorCode)throw n.errorCode===he.standardErrorCodes.provider.unsupportedChain?he.standardErrors.provider.unsupportedChain(e):he.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode});const 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))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(Aa.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?lf.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send(ce.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(e,r){try{const n=this._send(e,r);if(n instanceof Promise)return n.catch(i=>{throw(0,he.serializeError)(i,e)})}catch(n){throw(0,he.serializeError)(n,e)}}_send(e,r){if(typeof e=="string"){const 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"){const i=e,s=r;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));const n=e;return this._sendRequest(n)}async sendAsync(e,r){try{return this._sendAsync(e,r).catch(n=>{throw(0,he.serializeError)(n,e)})}catch(n){return Promise.reject((0,he.serializeError)(n,e))}}async _sendAsync(e,r){if(typeof r!="function")throw new Error("callback is required");if(Array.isArray(e)){const i=r;this._sendMultipleRequestsAsync(e).then(s=>
9i(null,s)).catch(s=>i(s,null));return}const n=r;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(r=>{throw(0,he.serializeError)(r,e.method)})}catch(r){return Promise.reject((0,he.serializeError)(r,e.method))}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw he.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:r,params:n}=e;if(typeof r!="string"||r.length===0)throw he.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 he.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){var r;const i=await(await this.initializeRelay()).scanQRCode((0,K.ensureRegExpString)(e)).promise;if(typeof i.result!="string")throw(0,he.serializeError)((r=i.errorMessage)!==null&&r!==void 0?r:"result was not a string",Ma.Web3Method.scanQRCode);return i.result}async genericRequest(e,r){var n;const s=await(await this.initializeRelay()).genericRequest(e,r).promise;if(typeof s.result!="string")throw(0,he.serializeError)((n=s.errorMessage)!==null&&n!==void 0?n:"result was not a string",Ma.Web3Method.generic);return s.result}async selectProvider(e){var r;const i=await(await this.initializeRelay()).selectProvider(e).promise;if(typeof i.result!="string")throw(0,he.serializeError)((r=i.errorMessage)!==null&&r!==void 0?r:"result was not a string",Ma.Web3Method.selectProvider);return i.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){const 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");const n=e.map(i=>(0,K.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(ff.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:"2.0",id:e.id,result:i});const 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}const 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){const{method:r}=e,n=e.params||[];switch(r){case ce.JSONRPCMethod.eth_accounts:return this._eth_accounts();case ce.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case ce.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case ce.JSONRPCMethod.net_version:return this._net_version();case ce.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:r}=e,n=e.params||[];switch(r){case ce.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case ce.JSONRPCMethod.eth_sign:return this._eth_sign(n);case ce.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case ce.JSONRPCMethod.personal_sign:return this._personal_sign(n);case ce.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case ce.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case ce.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case ce.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case ce.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case ce.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case ce.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case ce.JSONRPCMethod.eth_signTypedData_v4:case ce.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case ce.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case ce.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case ce.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case ce.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(e){const{method:r}=e,n=e.params||[];switch(r){case ce.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case ce.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case ce.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case ce.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case ce.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case ce.JSONRPCMethod.eth_subscribe:case ce.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const r=(0,K.ensureAddressString)(e);return this._addresses.map(i=>(0,K.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(Aa.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const r=e.from?(0,K.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);const n=e.to?(0,K.ensureAddressString)(e.to):null,i=e.value!=null?(0,K.ensureBN)(e.value):new jS.default(0),s=e.data?(0,K.ensureBuffer)(e.data):Buffer.alloc(0),o=e.nonce!=null?(0,K.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,K.ensureBN)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,K.ensureBN)(e.maxFeePerGas):null,u=e.maxPriorityFeePerGas!=null?(0,K.ensureBN)(e.maxPriorityFeePerGas):null,l=e.gas!=null?(0,K.ensureBN)(e.gas):null,f=this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:u,gasLim
9it:l,chainId:f}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw he.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw he.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,r,n,i){this._ensureKnownAddress(r);try{return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).signEthereumMessage(e,r,n,i).promise).result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?he.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,r,n){return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,r,n).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,K.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(hf);if(!e)return(0,K.ensureIntNumber)(this._chainIdFromOpts);const r=parseInt(e,10);return(0,K.ensureIntNumber)(r)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(Aa.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?lf.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let r;try{r=await(await this.initializeRelay()).requestEthereumAccounts().promise}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?he.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||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const r=(0,K.ensureAddressString)(e[0]),n=(0,K.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){const r=(0,K.ensureBuffer)(e[0]),n=(0,K.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();const r=(0,K.ensureBuffer)(e[0]),n=(0,K.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){const r=(0,K.ensureBuffer)(e[0]),n=(0,K.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const r=this._prepareTransactionParams(e[0]||{});try{return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).signEthereumTransaction(r).promise).result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?he.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const r=(0,K.ensureBuffer)(e[0]);return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise).result}}async _eth_sendTransaction(e){this._requireAuthorization();const r=this._prepareTransactionParams(e[0]||{});try{return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise).result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?he.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const r=(0,K.ensureParsedJSONObject)(e[0]),n=(0,K.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=Ta.default.hashForSignTypedDataLegacy({data:r}),s=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const r=(0,K.ensureAddressString)(e[0]),n=(0,K.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);const i=Ta.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const r=(0,K.ensureAddressString)(e[0]),n=(0,K.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);const i=Ta.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _cbwallet_arbitrary(e){const r=e[0],n=e[1];
9if(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:await this.genericRequest(r,n)}}async _wallet_addEthereumChain(e){var r,n,i,s;const 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 he.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw he.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const a=parseInt(o.chainId,16);return await 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"}}}async _wallet_switchEthereumChain(e){const r=e[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const r=Array.isArray(e)?e[0]:e;if(!r.type)throw he.standardErrors.rpc.invalidParams("Type is required");if((r==null?void 0:r.type)!=="ERC20")throw he.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!(r!=null&&r.options))throw he.standardErrors.rpc.invalidParams("Options are required");if(!(r!=null&&r.options.address))throw he.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=r.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(r.type,i,s,a,o,n)}}_eth_uninstallFilter(e){const r=(0,K.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(r)}async _eth_newFilter(e){const r=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(r)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const r=(0,K.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(e){const r=(0,K.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))}}Qr.CoinbaseWalletProvider=VS;var Rs={},As={};const Ze=wr($p);/*! *****************************************************************************
10Copyright (c) Microsoft Corporation.
11
12Permission to use, copy, modify, and/or distribute this software for any
13purpose with or without fee is hereby granted.
14
15THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
16REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
17AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
18INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21PERFORMANCE OF THIS SOFTWARE.
22***************************************************************************** */var tc=function(t,e){return tc=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])},tc(t,e)};function I(t,e){tc(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function nn(t){return typeof t=="function"}var pf=!1,et={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;""+e.stack}pf=t},get useDeprecatedSynchronousErrorHandling(){return pf}};function Wr(t){setTimeout(function(){throw t},0)}var zi={closed:!0,next:function(t){},error:function(t){if(et.useDeprecatedSynchronousErrorHandling)throw t;Wr(t)},complete:function(){}},He=function(){return Array.isArray||function(t){return t&&typeof t.length=="number"}}();function Kc(t){return t!==null&&typeof t=="object"}var US=function(){function t(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
23`+e.map(function(r,n){return n+1+") "+r.toString()}).join(`
24  `):"",this.name="UnsubscriptionError",this.errors=e,this}return t.prototype=Object.create(Error.prototype),t}(),Bn=US,ve=function(){function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,n=r._parentOrParents,i=r._ctorUnsubscribe,s=r._unsubscribe,o=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(n!==null)for(var a=0;a<n.length;++a){var c=n[a];c.remove(this)}if(nn(s)){i&&(this._unsubscribe=void 0);try{s.call(this)}catch(f){e=f instanceof Bn?bf(f.errors):[f]}}if(He(o))for(var a=-1,u=o.length;++a<u;){var l=o[a];if(Kc(l))try{l.unsubscribe()}catch(h){e=e||[],h instanceof Bn?e=e.concat(bf(h.errors)):e.push(h)}}if(e)throw new Bn(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||typeof r.unsubscribe!="function")return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;r=new t,r._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=r._parentOrParents;if(i===null)r._parentOrParents=this;else if(i instanceof t){if(i===this)return r;r._parentOrParents=[i,this]}else if(i.indexOf(this)===-1)i.push(this);else return r;var s=this._subscriptions;return s===null?this._subscriptions=[r]:s.push(r),r},t.prototype.remove=function(e){var r=this._subscriptions;if(r){var n=r.indexOf(e);n!==-1&&r.splice(n,1)}},t.EMPTY=function(e){return e.closed=!0,e}(new t),t}();function bf(t){return t.reduce(function(e,r){return e.concat(r instanceof Bn?r.errors:r)},[])}var qi=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),V=function(t){I(e,t);function e(r,n,i){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=zi;break;case 1:if(!r){s.destination=zi;break}if(typeof r=="object"){r instanceof e?(s.syncErrorThrowable=r.syncErrorThrowable,s.destination=r,r.add(s)):(s.syncErrorThrowable=!0,s.destination=new gf(s,r));break}default:s.syncErrorThrowable=!0,s.destination=new gf(s,r,n,i);break}return s}return e.prototype[qi]=function(){return this},e.create=function(r,n,i){var s=new e(r,n,i);return s.syncErrorThrowable=!1,s},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},e}(ve),gf=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this)||this;o._parentSubscriber=r;var a,c=o;
24return nn(n)?a=n:n&&(a=n.next,i=n.error,s=n.complete,n!==zi&&(c=Object.create(n),nn(c.unsubscribe)&&o.add(c.unsubscribe.bind(c)),c.unsubscribe=o.unsubscribe.bind(o))),o._context=c,o._next=a,o._error=i,o._complete=s,o}return e.prototype.next=function(r){if(!this.isStopped&&this._next){var n=this._parentSubscriber;!et.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?this.__tryOrUnsub(this._next,r):this.__tryOrSetError(n,this._next,r)&&this.unsubscribe()}},e.prototype.error=function(r){if(!this.isStopped){var n=this._parentSubscriber,i=et.useDeprecatedSynchronousErrorHandling;if(this._error)!i||!n.syncErrorThrowable?(this.__tryOrUnsub(this._error,r),this.unsubscribe()):(this.__tryOrSetError(n,this._error,r),this.unsubscribe());else if(n.syncErrorThrowable)i?(n.syncErrorValue=r,n.syncErrorThrown=!0):Wr(r),this.unsubscribe();else{if(this.unsubscribe(),i)throw r;Wr(r)}}},e.prototype.complete=function(){var r=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var i=function(){return r._complete.call(r._context)};!et.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?(this.__tryOrUnsub(i),this.unsubscribe()):(this.__tryOrSetError(n,i),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(r,n){try{r.call(this._context,n)}catch(i){if(this.unsubscribe(),et.useDeprecatedSynchronousErrorHandling)throw i;Wr(i)}},e.prototype.__tryOrSetError=function(r,n,i){if(!et.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,i)}catch(s){return et.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=s,r.syncErrorThrown=!0,!0):(Wr(s),!0)}return!1},e.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},e}(V);function Xc(t){for(;t;){var e=t,r=e.closed,n=e.destination,i=e.isStopped;if(r||i)return!1;n&&n instanceof V?t=n:t=null}return!0}function zS(t,e,r){if(t){if(t instanceof V)return t;if(t[qi])return t[qi]()}return!t&&!e&&!r?new V(zi):new V(t,e,r)}var mn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Yt(t){return t}function rc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return kd(t)}function kd(t){return t.length===0?Yt:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var X=function(){function t(e){this._isScalar=!1,e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this.operator,s=zS(e,r,n);if(i?s.add(i.call(s,this.source)):s.add(this.source||et.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),et.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){et.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=r),Xc(e)?e.error(r):console.warn(r)}},t.prototype.forEach=function(e,r){var n=this;return r=yf(r),new r(function(i,s){var o;o=n.subscribe(function(a){try{e(a)}catch(c){s(c),o&&o.unsubscribe()}},s,i)})},t.prototype._subscribe=function(e){var r=this.source;return r&&r.subscribe(e)},t.prototype[mn]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?this:kd(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=yf(e),new e(function(n,i){var s;r.subscribe(function(o){return s=o},function(o){return i(o)},function(){return n(s)})})},t.create=function(e){return new t(e)},t}();function yf(t){if(t||(t=et.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var qS=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),qt=qS,Od=function(t){I(e,t);function e(r,n){var i=t.call(this)||this;return i.subject=r,i.subscriber=n,i.closed=!1,i}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var r=this.subject,n=r.observers;if(this.subject=null,!(!n||n.length===0||r.isStopped||r.closed)){var i=n.indexOf(this.subscriber);i!==-1&&n.splice(i,1)}}},e}(ve),Nd=function(t){I(e,t);function e(r){var n=t.call(this,r)||this;return n.destination=r,n}return e}(V),ke=function(t){I(e,t);function e(){var r=t.call(this)||this;return r.observers=[],r.closed=!1,r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype[qi]=function(){return new Nd(this)},e.prototype.lift=function(r){var n=new vf(this,this);return n.operator=r,n},e.prototype.next=function(r){if(this.closed)throw new qt;if(!this.isStopped)for(var n=this.observers,i=n.length,s=n.slice(),o=0;o<i;o++)s[o].next(r)},e.prototype.error=function(r){if(this.closed)throw new qt;this.hasError=!0,this.thrownError=r,this.isStopped=!0;for(var n=this.observers,i=n.length,s=n.slice(),o=0;o<i;o++)s[o].error(r);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new qt;this.isStopped=!0;for(var r=this.observers,n=r.length,i=r.slice(),s=0;s<n;s++)i[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(r){if(this.closed)throw new qt;return t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){if(this.closed)throw new qt;return this.hasError?(r.error(this.thrownError),ve.EMPTY):this.isStopped?(r.complete(),ve.EMPTY):(this.observers.push(r),new Od(this,r))},e.prototype.asObservable=function(){var r=new X;return r.source=this,r},e.create=function(r,n){return new vf(r,n)},e}(X),vf=function(t){I(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n=this.destination;n&&n.next&&n.next(r)},e.prototype.error=function(r){var n=this.destination;n&&n.error&&this.destination.error(r)},e.prototype.complete=function(){var r=this.destination;r&&r.complete&&this.destination.complete()},e.prototype._subscribe=function(r){var n=this.source;return n?this.source.subscribe(r):ve.EMPTY},e}(ke);function eu(){return function(e){return e.lift(new GS(e))}}var GS=function(){function t(e){this.connectable=e}return t.prototype.call=function(e,r){var n=this.connectable;n._refCount++;
24var i=new JS(e,n),s=r.subscribe(i);return i.closed||(i.connection=n.connect()),s},t}(),JS=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.connectable=n,i}return e.prototype._unsubscribe=function(){var r=this.connectable;if(!r){this.connection=null;return}this.connectable=null;var n=r._refCount;if(n<=0){this.connection=null;return}if(r._refCount=n-1,n>1){this.connection=null;return}var i=this.connection,s=r._connection;this.connection=null,s&&(!i||s===i)&&s.unsubscribe()},e}(V),Ld=function(t){I(e,t);function e(r,n){var i=t.call(this)||this;return i.source=r,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return e.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},e.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var r=this._connection;return r||(this._isComplete=!1,r=this._connection=new ve,r.add(this.source.subscribe(new ZS(this.getSubject(),this))),r.closed&&(this._connection=null,r=ve.EMPTY)),r},e.prototype.refCount=function(){return eu()(this)},e}(X),QS=function(){var t=Ld.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),ZS=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.connectable=n,i}return e.prototype._error=function(r){this._unsubscribe(),t.prototype._error.call(this,r)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var r=this.connectable;if(r){this.connectable=null;var n=r._connection;r._refCount=0,r._subject=null,r._connection=null,n&&n.unsubscribe()}},e}(Nd);function YS(t,e,r,n){return function(i){return i.lift(new KS(t,e,r,n))}}var KS=function(){function t(e,r,n,i){this.keySelector=e,this.elementSelector=r,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(e,r){return r.subscribe(new XS(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),XS=function(t){I(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.keySelector=n,a.elementSelector=i,a.durationSelector=s,a.subjectSelector=o,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return e.prototype._next=function(r){var n;try{n=this.keySelector(r)}catch(i){this.error(i);return}this._group(r,n)},e.prototype._group=function(r,n){var i=this.groups;i||(i=this.groups=new Map);var s=i.get(n),o;if(this.elementSelector)try{o=this.elementSelector(r)}catch(u){this.error(u)}else o=r;if(!s){s=this.subjectSelector?this.subjectSelector():new ke,i.set(n,s);var a=new nc(n,s,this);if(this.destination.next(a),this.durationSelector){var c=void 0;try{c=this.durationSelector(new nc(n,s))}catch(u){this.error(u);return}this.add(c.subscribe(new eE(n,s,this)))}}s.closed||s.next(o)},e.prototype._error=function(r){var n=this.groups;n&&(n.forEach(function(i,s){i.error(r)}),n.clear()),this.destination.error(r)},e.prototype._complete=function(){var r=this.groups;r&&(r.forEach(function(n,i){n.complete()}),r.clear()),this.destination.complete()},e.prototype.removeGroup=function(r){this.groups.delete(r)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&t.prototype.unsubscribe.call(this))},e}(V),eE=function(t){I(e,t);function e(r,n,i){var s=t.call(this,n)||this;return s.key=r,s.group=n,s.parent=i,s}return e.prototype._next=function(r){this.complete()},e.prototype._unsubscribe=function(){var r=this,n=r.parent,i=r.key;this.key=this.parent=null,n&&n.removeGroup(i)},e}(V),nc=function(t){I(e,t);function e(r,n,i){var s=t.call(this)||this;return s.key=r,s.groupSubject=n,s.refCountSubscription=i,s}return e.prototype._subscribe=function(r){var n=new ve,i=this,s=i.refCountSubscription,o=i.groupSubject;return s&&!s.closed&&n.add(new tE(s)),n.add(o.subscribe(r)),n},e}(X),tE=function(t){I(e,t);function e(r){var n=t.call(this)||this;return n.parent=r,r.count++,n}return e.prototype.unsubscribe=function(){var r=this.parent;!r.closed&&!this.closed&&(t.prototype.unsubscribe.call(this),r.count-=1,r.count===0&&r.attemptedToUnsubscribe&&r.unsubscribe())},e}(ve),Pd=function(t){I(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return n&&!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new qt;return this._value},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(ke),rE=function(t){I(e,t);function e(r,n){return t.call(this)||this}return e.prototype.schedule=function(r,n){return this},e}(ve),li=function(t){I(e,t);function e(r,n){var i=t.call(this,r,n)||this;
24return i.scheduler=r,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(r,n){if(n===void 0&&(n=0),this.closed)return this;this.state=r;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(s,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!==null&&this.delay===i&&this.pending===!1)return n;clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,s=void 0;try{this.work(r)}catch(o){i=!0,s=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),s},e.prototype._unsubscribe=function(){var r=this.id,n=this.scheduler,i=n.actions,s=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,s!==-1&&i.splice(s,1),r!=null&&(this.id=this.recycleAsyncId(n,r,null)),this.delay=null},e}(rE),nE=function(t){I(e,t);function e(r,n){var i=t.call(this,r,n)||this;
24return i.scheduler=r,i.work=n,i}return e.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?t.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},e.prototype.execute=function(r,n){return n>0||this.closed?t.prototype.execute.call(this,r,n):this._execute(r,n)},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0?t.prototype.requestAsyncId.call(this,r,n,i):r.flush(this)},e}(li),ic=function(){function t(e,r){r===void 0&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.SchedulerAction(this,e).schedule(n,r)},t.now=function(){return Date.now()},t}(),fi=function(t){I(e,t);function e(r,n){n===void 0&&(n=ic.now);var i=t.call(this,r,function(){return e.delegate&&e.delegate!==i?e.delegate.now():n()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return e.prototype.schedule=function(r,n,i){return n===void 0&&(n=0),e.delegate&&e.delegate!==this?e.delegate.schedule(r,n,i):t.prototype.schedule.call(this,r,n,i)},e.prototype.flush=function(r){var n=this.actions;if(this.active){n.push(r);return}var i;this.active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this.active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e}(ic),iE=function(t){I(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(fi),$d=new iE(nE),Dd=$d,sn=new X(function(t){return t.complete()});function wn(t){return t?sE(t):sn}function sE(t){return new X(function(e){return t.schedule(function(){return e.complete()})})}function Qe(t){return t&&typeof t.schedule=="function"}var Bd=function(t){return function(e){for(var r=0,n=t.length;r<n&&!e.closed;r++)e.next(t[r]);e.complete()}};function tu(t,e){return new X(function(r){var n=new ve,i=0;return n.add(e.schedule(function(){if(i===t.length){r.complete();return}r.next(t[i++]),r.closed||n.add(this.schedule())})),n})}function hi(t,e){return e?tu(t,e):new X(Bd(t))}function Ms(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return Qe(r)?(t.pop(),tu(t,r)):hi(t)}function ru(t,e){return e?new X(function(r){return e.schedule(oE,0,{error:t,subscriber:r})}):new X(function(r){return r.error(t)})}function oE(t){var e=t.error,r=t.subscriber;r.error(e)}var sc;sc||(sc={});var $t=function(){function t(e,r,n){this.kind=e,this.value=r,this.error=n,this.hasValue=e==="N"}return t.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},t.prototype.do=function(e,r,n){var i=this.kind;switch(i){case"N":return e&&e(this.value);case"E":return r&&r(this.error);case"C":return n&&n()}},t.prototype.accept=function(e,r,n){return e&&typeof e.next=="function"?this.observe(e):this.do(e,r,n)},t.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return Ms(this.value);case"E":return ru(this.error);case"C":return wn()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return typeof e<"u"?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();function aE(t,e){return e===void 0&&(e=0),function(n){return n.lift(new cE(t,e))}}var cE=function(){function t(e,r){r===void 0&&(r=0),this.scheduler=e,this.delay=r}return t.prototype.call=function(e,r){return r.subscribe(new jd(e,this.scheduler,this.delay))},t}(),jd=function(t){I(e,t);function e(r,n,i){i===void 0&&(i=0);var s=t.call(this,r)||this;
24return s.scheduler=n,s.delay=i,s}return e.dispatch=function(r){var n=r.notification,i=r.destination;n.observe(i),this.unsubscribe()},e.prototype.scheduleMessage=function(r){var n=this.destination;n.add(this.scheduler.schedule(e.dispatch,this.delay,new uE(r,this.destination)))},e.prototype._next=function(r){this.scheduleMessage($t.createNext(r))},e.prototype._error=function(r){this.scheduleMessage($t.createError(r)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage($t.createComplete()),this.unsubscribe()},e}(V),uE=function(){function t(e,r){this.notification=e,this.destination=r}return t}(),nu=function(t){I(e,t);function e(r,n,i){r===void 0&&(r=Number.POSITIVE_INFINITY),n===void 0&&(n=Number.POSITIVE_INFINITY);var s=t.call(this)||this;return s.scheduler=i,s._events=[],s._infiniteTimeWindow=!1,s._bufferSize=r<1?1:r,s._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(s._infiniteTimeWindow=!0,s.next=s.nextInfiniteTimeWindow):s.next=s.nextTimeWindow,s}return e.prototype.nextInfiniteTimeWindow=function(r){if(!this.isStopped){var n=this._events;n.push(r),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,r)},e.prototype.nextTimeWindow=function(r){this.isStopped||(this._events.push(new lE(this._getNow(),r)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){var n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),s=this.scheduler,o=i.length,a;if(this.closed)throw new qt;if(this.isStopped||this.hasError?a=ve.EMPTY:(this.observers.push(r),a=new Od(this,r)),s&&r.add(r=new jd(r,s)),n)for(var c=0;c<o&&!r.closed;c++)r.next(i[c]);else for(var c=0;c<o&&!r.closed;c++)r.next(i[c].value);return this.hasError?r.error(this.thrownError):this.isStopped&&r.complete(),a},e.prototype._getNow=function(){return(this.scheduler||Dd).now()},e.prototype._trimBufferThenGetEvents=function(){for(var r=this._getNow(),n=this._bufferSize,i=this._windowTime,s=this._events,o=s.length,a=0;a<o&&!(r-s[a].time<i);)a++;return o>n&&(a=Math.max(a,o-n)),a>0&&s.splice(0,a),s},e}(ke),lE=function(){function t(e,r){this.time=e,this.value=r}return t}(),_n=function(t){I(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.value=null,r.hasNext=!1,r.hasCompleted=!1,r}return e.prototype._subscribe=function(r){return this.hasError?(r.error(this.thrownError),ve.EMPTY):this.hasCompleted&&this.hasNext?(r.next(this.value),r.complete(),ve.EMPTY):t.prototype._subscribe.call(this,r)},e.prototype.next=function(r){this.hasCompleted||(this.value=r,this.hasNext=!0)},e.prototype.error=function(r){this.hasCompleted||t.prototype.error.call(this,r)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(ke),fE=1,hE=function(){return Promise.resolve()}(),oc={};function mf(t){return t in oc?(delete oc[t],!0):!1}var wf={setImmediate:function(t){var e=fE++;return oc[e]=!0,hE.then(function(){return mf(e)&&t()}),e},clearImmediate:function(t){mf(t)}},dE=function(t){I(e,t);function e(r,n){var i=t.call(this,r,n)||this;
24return i.scheduler=r,i.work=n,i}return e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?t.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r.scheduled||(r.scheduled=wf.setImmediate(r.flush.bind(r,null))))},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0)return t.prototype.recycleAsyncId.call(this,r,n,i);r.actions.length===0&&(wf.clearImmediate(n),r.scheduled=void 0)},e}(li),pE=function(t){I(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.flush=function(r){this.active=!0,this.scheduled=void 0;var n=this.actions,i,s=-1,o=n.length;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while(++s<o&&(r=n.shift()));if(this.active=!1,i){for(;++s<o&&(r=n.shift());)r.unsubscribe();throw i}},e}(fi),Fd=new pE(dE),$i=Fd,Wd=new fi(li),Ve=Wd,bE=function(t){I(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?t.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r.scheduled||(r.scheduled=requestAnimationFrame(function(){return r.flush(null)})))},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0)return t.prototype.recycleAsyncId.call(this,r,n,i);r.actions.length===0&&(cancelAnimationFrame(n),r.scheduled=void 0)},e}(li),gE=function(t){I(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.flush=function(r){this.active=!0,this.scheduled=void 0;var n=this.actions,i,s=-1,o=n.length;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while(++s<o&&(r=n.shift()));if(this.active=!1,i){for(;++s<o&&(r=n.shift());)r.unsubscribe();throw i}},e}(fi),Hd=new gE(bE),yE=Hd,vE=function(t){I(e,t);function e(r,n){r===void 0&&(r=Vd),n===void 0&&(n=Number.POSITIVE_INFINITY);var i=t.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return e.prototype.flush=function(){for(var r=this,n=r.actions,i=r.maxFrames,s,o;(o=n[0])&&o.delay<=i&&(n.shift(),this.frame=o.delay,!(s=o.execute(o.state,o.delay))););if(s){for(;o=n.shift();)o.unsubscribe();throw s}},e.frameTimeFactor=10,e}(fi),Vd=function(t){I(e,t);function e(r,n,i){i===void 0&&(i=r.index+=1);var s=t.call(this,r,n)||this;
24return s.scheduler=r,s.work=n,s.index=i,s.active=!0,s.index=r.index=i,s}return e.prototype.schedule=function(r,n){if(n===void 0&&(n=0),!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)},e.prototype.requestAsyncId=function(r,n,i){i===void 0&&(i=0),this.delay=r.frame+i;var s=r.actions;return s.push(this),s.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(r,n,i){},e.prototype._execute=function(r,n){if(this.active===!0)return t.prototype._execute.call(this,r,n)},e.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},e}(li);function St(){}function mE(t){return!!t&&(t instanceof X||typeof t.lift=="function"&&typeof t.subscribe=="function")}var wE=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}(),on=wE,_E=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}(),di=_E,SE=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}(),Ud=SE;function ot(t,e){return function(n){if(typeof t!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new EE(t,e))}}var EE=function(){function t(e,r){this.project=e,this.thisArg=r}return t.prototype.call=function(e,r){return r.subscribe(new CE(e,this.project,this.thisArg))},t}(),CE=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.project=n,s.count=0,s.thisArg=i||s,s}return e.prototype._next=function(r){var n;try{n=this.project.call(this.thisArg,r,this.count++)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(V);function zd(t,e,r){if(e)if(Qe(e))r=e;else return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return zd(t,r).apply(void 0,n).pipe(ot(function(s){return He(s)?e.apply(void 0,s):e(s)}))};return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=this,o,a={context:s,subject:o,callbackFunc:t,scheduler:r};return new X(function(c){if(r){var l={args:n,subscriber:c,params:a};return r.schedule(xE,0,l)}else{if(!o){o=new _n;var u=function(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];o.next(f.length<=1?f[0]:f),o.complete()};try{t.apply(s,n.concat([u]))}catch(f){Xc(o)?o.error(f):console.warn(f)}}return o.subscribe(c)}})}}function xE(t){var e=this,r=t.args,n=t.subscriber,i=t.params,s=i.callbackFunc,o=i.context,a=i.scheduler,c=i.subject;if(!c){c=i.subject=new _n;var u=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];var h=l.length<=1?l[0]:l;e.add(a.schedule(IE,0,{value:h,subject:c}))};try{s.apply(o,r.concat([u]))}catch(l){c.error(l)}}this.add(c.subscribe(n))}function IE(t){var e=t.value,r=t.subject;r.next(e),r.complete()}function qd(t,e,r){if(e)if(Qe(e))r=e;else return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return qd(t,r).apply(void 0,n).pipe(ot(function(s){return He(s)?e.apply(void 0,s):e(s)}))};return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s={subject:void 0,args:n,callbackFunc:t,scheduler:r,context:this};return new X(function(o){var a=s.context,c=s.subject;if(r)return r.schedule(RE,0,{params:s,subscriber:o,context:a});if(!c){c=s.subject=new _n;var u=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];var h=l.shift();if(h){c.error(h);return}c.next(l.length<=1?l[0]:l),c.complete()};try{t.apply(a,n.concat([u]))}catch(l){Xc(c)?c.error(l):console.warn(l)}}return c.subscribe(o)})}}function RE(t){var e=this,r=t.params,n=t.subscriber,i=t.context,s=r.callbackFunc,o=r.args,a=r.scheduler,c=r.subject;if(!c){c=r.subject=new _n;var u=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];var h=l.shift();if(h)e.add(a.schedule(_f,0,{err:h,subject:c}));else{var g=l.length<=1?l[0]:l;e.add(a.schedule(AE,0,{value:g,subject:c}))}};try{s.apply(i,o.concat([u]))}catch(l){this.add(a.schedule(_f,0,{err:l,subject:c}))}}this.add(c.subscribe(n))}function AE(t){var e=t.value,r=t.subject;r.next(e),r.complete()}function _f(t){var e=t.err,r=t.subject;r.error(e)}var Ar=function(t){I(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.notifyNext=function(r,n,i,s,o){this.destination.next(n)},e.prototype.notifyError=function(r,n){this.destination.error(r)},e.prototype.notifyComplete=function(r){this.destination.complete()},e}(V),ME=function(t){I(e,t);function e(r,n,i){var s=t.call(this)||this;return s.parent=r,s.outerValue=n,s.outerIndex=i,s.index=0,s}return e.prototype._next=function(r){this.parent.notifyNext(this.outerValue,r,this.outerIndex,this.index++,this)},e.prototype._error=function(r){this.parent.notifyError(r,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(V),TE=function(t){return function(e){return t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,Wr),e}};function kE(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Kt=kE(),OE=function(t){return function(e){var r=t[Kt]();do{var n=void 0;try{n=r.next()}catch(i){return e.error(i),e}if(n.done){e.complete();break}if(e.next(n.value),e.closed)break}while(!0);return typeof r.return=="function"&&e.add(function(){r.return&&r.return()}),e}},NE=function(t){return function(e){var r=t[mn]();if(typeof r.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return r.subscribe(e)}},Gd=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Jd(t){return!!t&&typeof t.subscribe!="function"&&typeof t.then=="function"}var Vn=function(t){if(t&&typeof t[mn]=="function")return NE(t);
24if(Gd(t))return Bd(t);if(Jd(t))return TE(t);if(t&&typeof t[Kt]=="function")return OE(t);var e=Kc(t)?"an invalid object":"'"+t+"'",r="You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(r)};function Bt(t,e,r,n,i){if(i===void 0&&(i=new ME(t,r,n)),!i.closed)return e instanceof X?e.subscribe(i):Vn(e)(i)}var Sf={};function LE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=void 0,n=void 0;return Qe(t[t.length-1])&&(n=t.pop()),typeof t[t.length-1]=="function"&&(r=t.pop()),t.length===1&&He(t[0])&&(t=t[0]),hi(t,n).lift(new iu(r))}var iu=function(){function t(e){this.resultSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new PE(e,this.resultSelector))},t}(),PE=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return e.prototype._next=function(r){this.values.push(Sf),this.observables.push(r)},e.prototype._complete=function(){var r=this.observables,n=r.length;if(n===0)this.destination.complete();else{this.active=n,this.toRespond=n;for(var i=0;i<n;i++){var s=r[i];this.add(Bt(this,s,void 0,i))}}},e.prototype.notifyComplete=function(r){(this.active-=1)===0&&this.destination.complete()},e.prototype.notifyNext=function(r,n,i){var s=this.values,o=s[i],a=this.toRespond?o===Sf?--this.toRespond:this.toRespond:0;s[i]=n,a===0&&(this.resultSelector?this._tryResultSelector(s):this.destination.next(s.slice()))},e.prototype._tryResultSelector=function(r){var n;try{n=this.resultSelector.apply(this,r)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(Ar);function $E(t,e){return new X(function(r){var n=new ve;return n.add(e.schedule(function(){var i=t[mn]();n.add(i.subscribe({next:function(s){n.add(e.schedule(function(){return r.next(s)}))},error:function(s){n.add(e.schedule(function(){return r.error(s)}))},complete:function(){n.add(e.schedule(function(){return r.complete()}))}}))})),n})}function DE(t,e){return new X(function(r){var n=new ve;return n.add(e.schedule(function(){return t.then(function(i){n.add(e.schedule(function(){r.next(i),n.add(e.schedule(function(){return r.complete()}))}))},function(i){n.add(e.schedule(function(){return r.error(i)}))})})),n})}function BE(t,e){if(!t)throw new Error("Iterable cannot be null");return new X(function(r){var n=new ve,i;return n.add(function(){i&&typeof i.return=="function"&&i.return()}),n.add(e.schedule(function(){i=t[Kt](),n.add(e.schedule(function(){if(!r.closed){var s,o;try{var a=i.next();s=a.value,o=a.done}catch(c){r.error(c);return}o?r.complete():(r.next(s),this.schedule())}}))})),n})}function jE(t){return t&&typeof t[mn]=="function"}function FE(t){return t&&typeof t[Kt]=="function"}function Qd(t,e){if(t!=null){if(jE(t))return $E(t,e);if(Jd(t))return DE(t,e);if(Gd(t))return tu(t,e);if(FE(t)||typeof t=="string")return BE(t,e)}throw new TypeError((t!==null&&typeof t||t)+" is not observable")}function jt(t,e){return e?Qd(t,e):t instanceof X?t:new X(Vn(t))}var me=function(t){I(e,t);function e(r){var n=t.call(this)||this;return n.parent=r,n}return e.prototype._next=function(r){this.parent.notifyNext(r)},e.prototype._error=function(r){this.parent.notifyError(r),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(V),we=function(t){I(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.notifyNext=function(r){this.destination.next(r)},e.prototype.notifyError=function(r){this.destination.error(r)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(V);function _e(t,e){if(!e.closed){if(t instanceof X)return t.subscribe(e);var r;try{r=Vn(t)(e)}catch(n){e.error(n)}return r}}function vr(t,e,r){return r===void 0&&(r=Number.POSITIVE_INFINITY),typeof e=="function"?function(n){return n.pipe(vr(function(i,s){return jt(t(i,s)).pipe(ot(function(o,a){return e(i,o,s,a)}))},r))}:(typeof e=="number"&&(r=e),function(n){return n.lift(new WE(t,r))})}var WE=function(){function t(e,r){r===void 0&&(r=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=r}return t.prototype.call=function(e,r){return r.subscribe(new HE(e,this.project,this.concurrent))},t}(),HE=function(t){I(e,t);function e(r,n,i){i===void 0&&(i=Number.POSITIVE_INFINITY);var s=t.call(this,r)||this;return s.project=n,s.concurrent=i,s.hasCompleted=!1,s.buffer=[],s.active=0,s.index=0,s}return e.prototype._next=function(r){this.active<this.concurrent?this._tryNext(r):this.buffer.push(r)},e.prototype._tryNext=function(r){var n,i=this.index++;try{n=this.project(r,i)}catch(s){this.destination.error(s);return}this.active++,this._innerSub(n)},e.prototype._innerSub=function(r){var n=new me(this),i=this.destination;i.add(n);var s=_e(r,n);s!==n&&i.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(r){this.destination.next(r)},e.prototype.notifyComplete=function(){var r=this.buffer;this.active--,r.length>0?this._next(r.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(we),VE=vr;function su(t){return t===void 0&&(t=Number.POSITIVE_INFINITY),vr(Yt,t)}function Zd(){return su(1)}function Un(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Zd()(Ms.apply(void 0,t))}function ou(t){return new X(function(e){var r;try{r=t()}catch(i){e.error(i);return}var n=r?jt(r):wn();return n.subscribe(e)})}function UE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===1){var r=t[0];if(He(r))return Ai(r,null);if(Kc(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return Ai(n.map(function(s){return r[s]}),n)}}if(typeof t[t.length-1]=="function"){var i=t.pop();return t=t.length===1&&He(t[0])?t[0]:t,Ai(t,null).pipe(ot(function(s){return i.apply(void 0,s)}))}return Ai(t,null)}function Ai(t,e){return new X(function(r){var n=t.length;if(n===0){r.complete();return}for(var i=new Array(n),s=0,o=0,a=function(u){var l=jt(t[u]),f=!1;r.add(l.subscribe({next:function(h){f||(f=!0,o++),i[u]=h},error:function(h){return r.error(h)},complete:function(){s++,(s===n||!f)&&(o===n&&r.next(e?e.reduce(function(h,g,v){return h[g]=i[v],h},{}):i),r.complete())}}))},c=0;c<n;c++)a(c)})}function Yd(t,e,r,n){return nn(r)&&(n=r,r=void 0),n?Yd(t,e,r).pipe(ot(function(i){return He(i)?n.apply(void 0,i):n(i)})):new X(function(i){function s(o){arguments.length>1?i.next(Array.prototype.slice.call(arguments)):i.next(o)}Kd(t,e,s,i,r)})}function Kd(t,e,r,n,i){var s;if(GE(t)){var o=t;t.addEventListener(e,r,i),s=function(){return o.removeEventListener(e,r,i)}}else if(qE(t)){var a=t;t.on(e,r),s=function(){return a.off(e,r)}}else if(zE(t)){var c=t;t.addListener(e,r),s=function(){return c.removeListener(e,r)}}else if(t&&t.length)for(var u=0,l=t.length;u<l;u++)Kd(t[u],e,r,n,i);else throw new TypeError("Invalid event target");n.add(s)}function zE(t){return t&&typeof t.addListener=="function"&&typeof t.removeListener=="function"}function qE(t){return t&&typeof t.on=="function"&&typeof t.off=="function"}function GE(t){return t&&typeof t.addEventListener=="function"&&typeof t.removeEventListener=="function"}function Xd(t,e,r){return r?Xd(t,e).pipe(ot(function(n){return He(n)?r.apply(void 0,n):r(n)})):new X(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},s;try{s=t(i)}catch(o){n.error(o);return}if(nn(e))return function(){return e(i,s)}})}function JE(t,e,r,n,i){var s,o;if(arguments.length==1){var a=t;o=a.initialState,e=a.condition,r=a.iterate,s=a.resultSelector||Yt,i=a.scheduler}else n===void 0||Qe(n)?(o=t,s=Yt,i=n):(o=t,s=n);return new X(function(c){var u=o;if(i)return i.schedule(QE,0,{subscriber:c,iterate:r,condition:e,resultSelector:s,state:u});do{if(e){var l=void 0;try{l=e(u)}catch(h){c.error(h);return}if(!l){c.complete();break}}var f=void 0;try{f=s(u)}catch(h){c.error(h);return}if(c.next(f),c.closed)break;try{u=r(u)}catch(h){c.error(h);return}}while(!0)})}function QE(t){var e=t.subscriber,r=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(s){e.error(s);return}else t.needIterate=!0;if(r){var n=void 0;try{n=r(t.state)}catch(s){e.error(s);return}if(!n){e.complete();return}if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(s){e.error(s);return}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ZE(t,e,r){return e===void 0&&(e=sn),r===void 0&&(r=sn),ou(function(){return t()?e:r})}function an(t){return!He(t)&&t-parseFloat(t)+1>=0}function YE(t,e){return t===void 0&&(t=0),e===void 0&&(e=Ve),(!an(t)||t<0)&&(t=0),(!e||typeof e.schedule!="function")&&(e=Ve),new X(function(r){return r.add(e.schedule(KE,t,{subscriber:r,counter:0,peri
24od:t})),r})}function KE(t){var e=t.subscriber,r=t.counter,n=t.period;e.next(r),this.schedule({subscriber:e,counter:r+1,period:n},n)}function ep(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return Qe(i)?(n=t.pop(),t.length>1&&typeof t[t.length-1]=="number"&&(r=t.pop())):typeof i=="number"&&(r=t.pop()),n===null&&t.length===1&&t[0]instanceof X?t[0]:su(r)(hi(t,n))}var tp=new X(St);function XE(){return tp}function ac(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===0)return sn;var r=t[0],n=t.slice(1);return t.length===1&&He(r)?ac.apply(void 0,r):new X(function(i){var s=function(){return i.add(ac.apply(void 0,n).subscribe(i))};return jt(r).subscribe({next:function(o){i.next(o)},error:s,complete:s})})}function e3(t,e){return e?new X(function(r){var n=Object.keys(t),i=new ve;return i.add(e.schedule(t3,0,{keys:n,index:0,subscriber:r,subscription:i,obj:t})),i}):new X(function(r){for(var n=Object.keys(t),i=0;i<n.length&&!r.closed;i++){var s=n[i];t.hasOwnProperty(s)&&r.next([s,t[s]])}r.complete()})}function t3(t){var e=t.keys,r=t.index,n=t.subscriber,i=t.subscription,s=t.obj;if(!n.closed)if(r<e.length){var o=e[r];n.next([o,s[o]]),i.add(this.schedule({keys:e,index:r+1,subscriber:n,subscription:i,obj:s}))}else n.complete()}function rp(t,e){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=t,r.thisArg=e,r}function Xt(t,e){return function(n){return n.lift(new r3(t,e))}}var r3=function(){function t(e,r){this.predicate=e,this.thisArg=r}return t.prototype.call=function(e,r){return r.subscribe(new n3(e,this.predicate,this.thisArg))},t}(),n3=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.thisArg=i,s.count=0,s}return e.prototype._next=function(r){var n;try{n=this.predicate.call(this.thisArg,r,this.count++)}catch(i){this.destination.error(i);return}n&&this.destination.next(r)},e}(V);function i3(t,e,r){return[Xt(e,r)(new X(Vn(t))),Xt(rp(e,r))(new X(Vn(t)))]}function np(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===1)if(He(t[0]))t=t[0];else return t[0];return hi(t,void 0).lift(new s3)}var s3=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new o3(e))},t}(),o3=function(t){I(e,t);function e(r){var n=t.call(this,r)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return e.prototype._next=function(r){this.observables.push(r)},e.prototype._complete=function(){var r=this.observables,n=r.length;if(n===0)this.destination.complete();else{for(var i=0;i<n&&!this.hasFirst;i++){var s=r[i],o=Bt(this,s,void 0,i);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(r,n,i){if(!this.hasFirst){this.hasFirst=!0;for(var s=0;s<this.subscriptions.length;s++)if(s!==i){var o=this.subscriptions[s];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(n)},e}(Ar);function a3(t,e,r){return t===void 0&&(t=0),new X(function(n){e===void 0&&(e=t,t=0);var i=0,s=t;if(r)return r.schedule(c3,0,{index:i,count:e,start:t,subscriber:n});do{if(i++>=e){n.complete();break}if(n.next(s++),n.closed)break}while(!0)})}function c3(t){var e=t.start,r=t.index,n=t.count,i=t.subscriber;if(r>=n){i.complete();return}i.next(e),!i.closed&&(t.index=r+1,t.start=e+1,this.schedule(t))}function ip(t,e,r){t===void 0&&(t=0);var n=-1;return an(e)?n=Number(e)<1&&1||Number(e):Qe(e)&&(r=e),Qe(r)||(r=Ve),new X(function(i){var s=an(t)?t:+t-r.now();return r.schedule(u3,s,{index:0,period:n,subscriber:i})})}function u3(t){var e=t.index,r=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(r===-1)return n.complete();t.index=e+1,this.schedule(t,r)}}function l3(t,e){return new X(function(r){var n;try{n=t()}catch(a){r.error(a);return}var i;try{i=e(n)}catch(a){r.error(a);return}var s=i?jt(i):sn,o=s.subscribe(r);return function(){o.unsubscribe(),n&&n.unsubscribe()}})}function sp(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return typeof r=="function"&&t.pop(),hi(t,void 0).lift(new op(r))}var op=function(){function t(e){this.resultSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new f3(e,this.resultSelector))},t}(),f3=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.resultSelector=n,s.iterators=[],s.active=0,s.resultSelector=typeof n=="function"?n:void 0,s}return e.prototype._next=function(r){var n=this.iterators;He(r)?n.push(new d3(r)):typeof r[Kt]=="function"?n.push(new h3(r[Kt]())):n.push(new p3(this.destination,this,r))},e.prototype._complete=function(){var r=this.iterators,n=r.length;if(this.unsubscribe(),n===0){this.destination.complete();return}this.active=n;for(var i=0;i<n;i++){var s=r[i];if(s.stillUnsubscribed){var o=this.destination;o.add(s.subscribe())}else this.active--}},e.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},e.prototype.checkIterators=function(){for(var r=this.iterators,n=r.length,i=this.destination,s=0;s<n;s++){var o=r[s];if(typeof o.hasValue=="function"&&!o.hasValue())return}for(var a=!1,c=[],s=0;s<n;s++){var o=r[s],u=o.next();if(o.hasCompleted()&&(a=!0),u.done){i.complete();return}c.push(u.value)}this.resultSelector?this._tryresultSelector(c):i.next(c),a&&i.complete()},e.prototype._tryresultSelector=function(r){var n;try{n=this.resultSelector.apply(this,r)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(V),h3=function(){function t(e){this.iterator=e,this.nextResult=e.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},t.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},t}(),d3=function(){function t(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return t.prototype[Kt]=function(){return this},t.prototype.next=function(e){var r=this.index++,n=this.array;return r<this.length?{value:n[r],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p3=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.parent=n,s.observable=i,s.stillUnsubscribed=!0,s.buffer=[],s.isComplete=!1,s}return e.prototype[Kt]=function(){return this},e.prototype.next=function(){var r=this.buffer;return r.length===0&&this.isComplete?{value:null,done:!0}:{value:r.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(r){this.buffer.push(r),this.parent.checkIterators()},e.prototype.subscribe=function(){return _e(this.observable,new me(this))},e}(we);const b3=Object.freeze(Object.defineProperty({__proto__:null,ArgumentOutOfRangeError:on,AsyncSubject:_n,BehaviorSubject:Pd,ConnectableObservable:Ld,EMPTY:sn,EmptyError:di,GroupedObservable:nc,NEVER:tp,Notification:$t,get NotificationKind(){return sc},ObjectUnsubscribedError:qt,Observable:X,ReplaySubject:nu,Scheduler:ic,Subject:ke,Subscriber:V,Subscription:ve,TimeoutError:Ud,UnsubscriptionError:Bn,VirtualAction:Vd,VirtualTimeScheduler:vE,animationFrame:yE,animationFrameScheduler:Hd,asap:$i,asapScheduler:Fd,async:Ve,asyncScheduler:Wd,bindCallback:zd,bindNodeCallback:qd,combineLatest:LE,concat:Un,config:et,defer:ou,empty:wn,forkJoin:UE,from:jt,fromEvent:Yd,fromEventPattern:Xd,generate:JE,identity:Yt,iif:ZE,interval:YE,isObservable:mE,merge:ep,never:XE,noop:St,observable:mn,of:Ms,onErrorResumeNext:ac,pairs:e3,partition:i3,pipe:rc,queue:Dd,queueScheduler:$d,race:np,range:a3,scheduled:Qd,throwError:ru,timer:ip,using:l3,zip:sp},Symbol.toStringTag,{value:"Module"})),Ts=wr(b3);var ks={};const Os=wr(Lp),pi=wr(Dp);var Rt={},Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.CloseIcon=void 0;const Ef=Ze;function g3(t){return(0,Ef.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"}
24,t),(0,Ef.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"}))}Ns.CloseIcon=g3;var au={};Object.defineProperty(au,"__esModule",{value:!0});au.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMTQuMDM3IDE4LjkyNmMtMi43NSAwLTQuOTA3LTIuMjA1LTQuOTA3LTQuOTI2IDAtMi43MiAyLjIzLTQuOTI2IDQuOTA3LTQuOTI2YTQuODY2IDQuODY2IDAgMCAxIDQuODMzIDQuMTE4aDQuOTgyYy0uNDQ2LTUuMDczLTQuNjg0LTkuMDQ0LTkuODE1LTkuMDQ0QzguNjEgNC4xNDggNC4xNDkgOC41NiA0LjE0OSAxNHM0LjM4NyA5Ljg1MiA5Ljg5IDkuODUyYzUuMjA0IDAgOS4zNjgtMy45NyA5LjgxNC05LjA0M0gxOC44N2E0Ljg2NiA0Ljg2NiAwIDAgMS00LjgzMyA0LjExN1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4=";var cu={};Object.defineProperty(cu,"__esModule",{value:!0});cu.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMjMuODUyIDE0QTkuODM0IDkuODM0IDAgMCAxIDE0IDIzLjg1MiA5LjgzNCA5LjgzNCAwIDAgMSA0LjE0OCAxNCA5LjgzNCA5LjgzNCAwIDAgMSAxNCA0LjE0OCA5LjgzNCA5LjgzNCAwIDAgMSAyMy44NTIgMTRaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTExLjE4NSAxMi41MDRjMC0uNDU2IDAtLjcxLjA5OC0uODYyLjA5OC0uMTUyLjE5Ni0uMzA0LjM0My0uMzU1LjE5Ni0uMTAyLjM5Mi0uMTAyLjg4MS0uMTAyaDIuOTg2Yy40OSAwIC42ODYgMCAuODgyLjEwMi4xNDYuMTAxLjI5My4yMDMuMzQyLjM1NS4wOTguMjAzLjA5OC40MDYuMDk4Ljg2MnYyLjk5MmMwIC40NTcgMCAuNzEtLjA5OC44NjMtLjA5OC4xNTItLjE5NS4zMDQtLjM0Mi4zNTUtLjE5Ni4xMDEtLjM5Mi4xMDEtLjg4Mi4xMDFoLTIuOTg2Yy0uNDkgMC0uNjg1IDAtLjg4LS4xMDEtLjE0OC0uMTAyLS4yOTUtLjIwMy0uMzQ0LS4zNTUtLjA5OC0uMjAzLS4wOTgtLjQwNi0uMDk4LS44NjN2LTIuOTkyWiIgZmlsbD0iIzAwNTJGRiIvPjwvc3ZnPg==";var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.QRCodeIcon=void 0;const mt=Ze;function y3(t){return(0,mt.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(0,mt.h)("path",{d:"M8.2271 1.77124L7.0271 1.77124V2.97124H8.2271V1.77124Z"}),(0,mt.h)("path",{d:"M5.44922 0.199219L5.44922 4.54922L9.79922 4.54922V0.199219L5.44922 0.199219ZM8.89922 3.64922L6.34922 3.64922L6.34922 1.09922L8.89922 1.09922V3.64922Z"}),(0,mt.h)("path",{d:"M2.97124 1.77124L1.77124 1.77124L1.77124 2.97124H2.97124V1.77124Z"}),(0,mt.h)("path",{d:"M0.199219 4.54922L4.54922 4.54922L4.54922 0.199219L0.199219 0.199219L0.199219 4.54922ZM1.09922 1.09922L3.64922 1.09922L3.64922 3.64922L1.09922 3.64922L1.09922 1.09922Z"}),(0,mt.h)("path",{d:"M2.97124 7.0271H1.77124L1.77124 8.2271H2.97124V7.0271Z"}),(0,mt.h)("path",{d:"M0.199219 9.79922H4.54922L4.54922 5.44922L0.199219 5.44922L0.199219 9.79922ZM1.09922 6.34922L3.64922 6.34922L3.64922 8.89922H1.09922L1.09922 6.34922Z"}),(0,mt.h)("path",{d:"M8.89922 7.39912H7.99922V5.40112H5.44922L5.44922 9.79912H6.34922L6.34922 6.30112H7.09922V8.29912H9.79922V5.40112H8.89922V7.39912Z"}),(0,mt.h)("path",{d:"M7.99912 8.89917H7.09912V9.79917H7.99912V8.89917Z"}),(0,mt.h)("path",{d:"M9.79917 8.89917H8.89917V9.79917H9.79917V8.89917Z"}))}Ls.QRCodeIcon=y3;var uu={};Object.defineProperty(uu,"__esModule",{value:!0});const v3=`
25    <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
26        <path d="M50 100C77.6142 100 100 77.6142 100 50C100 22.3858 77.6142 0 50 0C22.3858 0 0 22.3858 0 50C0 77.6142 22.3858 100 50 100Z" fill="white"/>
27        <path d="M50.512 94C74.2907 94 93.5673 74.5244 93.5673 50.5C93.5673 26.4756 74.2907 7 50.512 7C26.7332 7 7.45667 26.4756 7.45667 50.5C7.45667 74.5244 26.7332 94 50.512 94Z" fill="#0052FF"/>
28        <path d="M50.6248 65.4335C42.3697 65.4335 35.8996 58.7469 35.8996 50.5C35.8996 42.2531 42.5928 35.5664 50.6248 35.5664C57.9873 35.5664 64.0111 40.9157 65.1267 48.0481H80.0749C78.7363 32.6688 66.0191 20.6328 50.6248 20.6328C34.3379 20.6328 20.9514 34.0062 20.9514 50.5C20.9514 66.9936 34.1148 80.3671 50.6248 80.3671C66.2422 80.3671 78.7363 68.331 80.0749 52.9516H65.1267C64.0111 60.0841 57.9873 65.4335 50.6248 65.4335Z" fill="white"/>
29    </svg>
30`;uu.default=v3;var lu={};
30Object.defineProperty(lu,"__esModule",{value:!0});lu.default=`
31    <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
32        <circle cx="50" cy="50" r="50" fill="white"/>
33        <circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>
34        <circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>
35        <path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>
36    </svg>
37`;var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.StatusDotIcon=void 0;const Cf=Ze;function m3(t){return(0,Cf.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(0,Cf.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.29995 4.99995C2.29995 5.57985 1.82985 6.04995 1.24995 6.04995C0.670052 6.04995 0.199951 5.57985 0.199951 4.99995C0.199951 4.42005 0.670052 3.94995 1.24995 3.94995C1.82985 3.94995 2.29995 4.42005 2.29995 4.99995ZM4.99995 6.04995C5.57985 6.04995 6.04995 5.57985 6.04995 4.99995C6.04995 4.42005 5.57985 3.94995 4.99995 3.94995C4.42005 3.94995 3.94995 4.42005 3.94995 4.99995C3.94995 5.57985 4.42005 6.04995 4.99995 6.04995ZM8.74995 6.04995C9.32985 6.04995 9.79995 5.57985 9.79995 4.99995C9.79995 4.42005 9.32985 3.94995 8.74995 3.94995C8.17005 3.94995 7.69995 4.42005 7.69995 4.99995C7.69995 5.57985 8.17005 6.04995 8.74995 6.04995Z"}))}Ps.StatusDotIcon=m3;var $s={};function ap(t){this.mode=Ge.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))}ap.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 At(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}At.prototype={addData:function(t){var e=new ap(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=At.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=ge.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=ge.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];
vendor: 10,913 bytes, line 37
37if(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=ge.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=ge.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=ge.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}}}};At.PAD0=236;At.PAD1=17;At.createData=function(t,e,r){for(var n=Ct.getRSBlocks(t,e),i=new cp,s=0;s<r.length;s++){var o=r[s];i.put(o.mode,4),i.put(o.getLength(),ge.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(At.PAD0,8),i.getLengthInBits()>=a*8));)i.put(At.PAD1,8);return At.createBytes(i,n)};At.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 l=0;l<s[a].length;l++)s[a][l]=255&t.buffer[l+r];r+=c;var f=ge.getErrorCorrectPolynomial(u),h=new Jr(s[a],f.getLength()-1),g=h.mod(f);o[a]=new Array(f.getLength()-1);for(var l=0;l<o[a].length;l++){var v=l+g.getLength()-o[a].length;o[a][l]=v>=0?g.get(v):0}}for(var C=0,l=0;l<e.length;l++)C+=e[l].totalCount;for(var S=new Array(C),b=0,l=0;l<n;l++)for(var a=0;a<e.length;a++)l<s[a].length&&(S[b++]=s[a][l]);for(var l=0;l<i;l++)for(var a=0;a<e.length;a++)l<o[a].length&&(S[b++]=o[a][l]);return S};var Ge={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Jt={L:1,M:0,Q:3,H:2},Wt={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},ge={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;ge.getBCHDigit(e)-ge.getBCHDigit(ge.G15)>=0;)e^=ge.G15<<ge.getBCHDigit(e)-ge.getBCHDigit(ge.G15);return(t<<10|e)^ge.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;ge.getBCHDigit(e)-ge.getBCHDigit(ge.G18)>=0;)e^=ge.G18<<ge.getBCHDigit(e)-ge.getBCHDigit(ge.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;t!=0;)e++,t>>>=1;return e},getPatternPosition:function(t){return ge.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case Wt.PATTERN000:return(e+r)%2==0;case Wt.PATTERN001:return e%2==0;case Wt.PATTERN010:return r%3==0;case Wt.PATTERN011:return(e+r)%3==0;case Wt.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case Wt.PATTERN101:return e*r%2+e*r%3==0;case Wt.PATTERN110:return(e*r%2+e*r%3)%2==0;case Wt.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new Jr([1],0),r=0;r<t;r++)e=e.multiply(new Jr([1,Te.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case Ge.MODE_NUMBER:return 10;case Ge.MODE_ALPHA_NUM:return 9;case Ge.MODE_8BIT_BYTE:return 8;case Ge.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case Ge.MODE_NUMBER:return 12;case Ge.MODE_ALPHA_NUM:return 11;case Ge.MODE_8BIT_BYTE:return 16;case Ge.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else if(e<41)switch(t){case Ge.MODE_NUMBER:return 14;case Ge.MODE_ALPHA_NUM:return 13;case Ge.MODE_8BIT_BYTE:return 16;case Ge.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 l=0,i=0;i<e;i++)for(var n=0;n<e;n++)t.isDark(n,i)&&l++;var f=Math.abs(100*l/e/e-50)/5;return r+=f*10,r}},Te={glog:function(t){if(t<1)throw new Error("glog("+t+")");return Te.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return Te.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Ne=0;Ne<8;Ne++)Te.EXP_TABLE[Ne]=1<<Ne;for(var Ne=8;Ne<256;Ne++)Te.EXP_TABLE[Ne]=Te.EXP_TABLE[Ne-4]^Te.EXP_TABLE[Ne-5]^Te.EXP_TABLE[Ne-6]^Te.EXP_TABLE[Ne-8];for(var Ne=0;Ne<255;Ne++)Te.LOG_TABLE[Te.EXP_TABLE[Ne]]=Ne;function Jr(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]}Jr.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]^=Te.gexp(Te.glog(this.get(r))+Te.glog(t.get(n)));return new Jr(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=Te.glog(this.get(0))-Te.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]^=Te.gexp(Te.glog(t.get(n))+e);return new Jr(r,0).mod(t)}};function Ct(t,e){this.totalCount=t,this.dataCount=e}Ct.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]];Ct.getRSBlocks=function(t,e){var r=Ct.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 Ct(a,c));return i};Ct.getRsBlockTable=function(t,e){switch(e){case Jt.L:return Ct.RS_BLOCK_TABLE[(t-1)*4+0];case Jt.M:return Ct.RS_BLOCK_TABLE[(t-1)*4+1];case Jt.Q:return Ct.RS_BLOCK_TABLE[(t-1)*4+2];case Jt.H:return Ct.RS_BLOCK_TABLE[(t-1)*4+3];default:return}};function cp(){this.buffer=[],this.length=0}cp.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 ka=[[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,8
376,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 up(t){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 e in t)this.options[e]=t[e];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 r(c){switch(c){case"L":return Jt.L;case"M":return Jt.M;case"Q":return Jt.Q;case"H":return Jt.H;default:throw new Error("Unknwon error correction level: "+c)}}function n(c,u){for(var l=i(c),f=1,h=0,g=0,v=ka.length;g<=v;g++){var C=ka[g];if(!C)throw new Error("Content too long: expected "+h+" but got "+l);switch(u){case"L":h=C[0];break;case"M":h=C[1];break;case"Q":h=C[2];break;case"H":h=C[3];break;default:throw new Error("Unknwon error correction level: "+u)}if(l<=h)break;f++}if(f>ka.length)throw new Error("Content too long");return f}function i(c){var u=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return u.length+(u.length!=c?3:0)}var s=this.options.content,o=n(s,this.options.ecl),a=r(this.options.ecl);this.qrcode=new At(o,a),this.qrcode.addData(s),this.qrcode.make()}up.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
38`:"",o=e.width,a=e.height,c=r.length,u=o/(c+2*e.padding),l=a/(c+2*e.padding),f=typeof e.join<"u"?!!e.join:!1,h=typeof e.swap<"u"?!!e.swap:!1,g=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,v=typeof e.predefined<"u"?!!e.predefined:!1,C=v?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+u+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+s:"",S=i+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+s,b="",y="",_=0;_<c;_++)for(var x=0;x<c;x++){var E=r[x][_];if(E){var T=x*u+e.padding*u,F=_*l+e.padding*l;if(h){var D=T;T=F,F=D}if(f){var O=u+T,q=l+F;T=Number.isInteger(T)?Number(T):T.toFixed(2),F=Number.isInteger(F)?Number(F):F.toFixed(2),O=Number.isInteger(O)?Number(O):O.toFixed(2),q=Number.isInteger(q)?Number(q):q.toFixed(2),y+="M"+T+","+F+" V"+q+" H"+O+" V"+F+" H"+T+" Z "}else v?b+=i+'<use x="'+T.toString()+'" y="'+F.toString()+'" href="#qrmodule" />'+s:b+=i+'<rect x="'+T.toString()+'" y="'+F.toString()+'" width="'+u+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+s}}f&&(b=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+y+'" />');let ae="";if(this.options.image!==void 0&&this.options.image.svg){const R=o*this.options.image.width/100,A=a*this.options.image.height/100,N=o/2-R/2,L=a/2-A/2;ae+=`<svg x="${N}" y="${L}" width="${R}" height="${A}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,ae+=this.options.image.svg+s,ae+="</svg>"}var Q="";switch(t.container){case"svg":g&&(Q+='<?xml version="1.0" standalone="yes"?>'+s),Q+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+s,Q+=C+S+b,Q+=ae,Q+="</svg>";break;case"svg-viewbox":g&&(Q+='<?xml version="1.0" standalone="yes"?>'+s),Q+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+s,Q+=C+S+b,Q+=ae,Q+="</svg>";break;case"g":Q+='<g width="'+o+'" height="'+a+'">'+s,Q+=C+S+b,Q+=ae,Q+="</g>";break;default:Q+=(C+S+b+ae).replace(/^\s+/,"");break}return Q};var w3=up,_3=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($s,"__esModule",{value:!0});$s.QRCode=void 0;const S3=Ze,xf=pi,E3=_3(w3),C3=t=>{const[e,r]=(0,xf.useState)("");return(0,xf.useEffect)(()=>{var n,i;const s=new E3.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}`)}),e?(0,S3.h)("img",{src:e,alt:"QR Code"}):null};$s.QRCode=C3;var Ds={},fu={};
38Object.defineProperty(fu,"__esModule",{value:!0});fu.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 x3=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ds,"__esModule",{value:!0});Ds.Spinner=void 0;const Mi=Ze,I3=x3(fu),R3=t=>{var e;const r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||"#000";return(0,Mi.h)("div",{class:"-cbwsdk-spinner"},(0,Mi.h)("style",null,I3.default),(0,Mi.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,Mi.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};Ds.Spinner=R3;var hu={};Object.defineProperty(hu,"__esModule",{value:!0});hu.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}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-item.light.selected{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark.selected{background:#001033;
38color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item.selected{border-radius:100px;font-weight:600}.-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 Sn=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.CoinbaseAppSteps=Rt.CoinbaseWalletSteps=Rt.ConnectItem=Rt.ConnectContent=void 0;const rt=Sn(Os),z=Ze,If=pi,A3=W,M3=fn,T3=Ns,k3=Sn(au),O3=Sn(cu),lp=Ls,N3=Sn(uu),L3=Sn(lu),P3=Ps,$3=$s,D3=Ds,B3=Sn(hu),Rf={"coinbase-wallet-app":{title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",icon:O3.default,steps:hp},"coinbase-app":{title:"Coinbase app",description:"Connect with your Coinbase account",icon:k3.default,steps:dp}},j3=t=>{switch(t){case"coinbase-app":return N3.default;case"coinbase-wallet-app":default:return L3.default}},cc=t=>t==="light"?"#FFFFFF":"#0A0B0D";function F3(t){const{theme:e}=t,[r,n]=(0,If.useState)("coinbase-wallet-app"),i=(0,If.useCallback)(u=>{n(u)},[]),s=(0,A3.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),o=Rf[r];if(!r)return null;const a=o.steps,c=r==="coinbase-app";return(0,z.h)("div",{"data-testid":"connect-content",class:(0,rt.default)("-cbwsdk-connect-content",e)},(0,z.h)("style",null,B3.default),(0,z.h)("div",{class:"-cbwsdk-connect-content-header"},(0,z.h)("h2",{class:(0,rt.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with one of our mobile apps"),t.onCancel&&(0,z.h)("button",{type:"button",class:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,z.h)(T3.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,z.h)("div",{class:"-cbwsdk-connect-content-layout"},(0,z.h)("div",{class:"-cbwsdk-connect-content-column-left"},(0,z.h)("div",null,Object.entries(Rf).map(([u,l])=>(0,z.h)(fp,{key:u,title:l.title,description:l.description,icon:l.icon,selected:r===u,onClick:()=>i(u),theme:e}))),c&&(0,z.h)("div",{class:(0,rt.default)("-cbwsdk-connect-content-update-app",e)},"Don’t see a ",(0,z.h)("strong",null,"Scan")," option? Update your Coinbase app to the latest version and try again.")),(0,z.h)("div",{class:"-cbwsdk-connect-content-column-right"},(0,z.h)("div",{class:"-cbwsdk-connect-content-qr-wrapper"},(0,z.h)($3.QRCode,{content:s,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:j3(r),width:25,height:25}}),(0,z.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:M3.LIB_VERSION}),(0,z.h)("input",{type:"hidden",value:s})),(0,z.h)(a,{theme:e}),!t.isConnected&&(0,z.h)("div",{"data-testid":"connecting-spinner",class:(0,rt.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,z.h)(D3.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,z.h)("p",null,"Connecting...")))))}Rt.ConnectContent=F3;function fp({title:t,description:e,icon:r,selected:n,theme:i,onClick:s}){return(0,z.h)("div",{onClick:s,class:(0,rt.default)("-cbwsdk-connect-item",i,{selected:n})},(0,z.h)("div",null,(0,z.h)("img",{src:r,alt:t})),(0,z.h)("div",{class:"-cbwsdk-connect-item-copy-wrapper"},(0,z.h)("h3",{class:"-cbwsdk-connect-item-title"},t),(0,z.h)("p",{class:"-cbwsdk-connect-item-description"},e)))}Rt.ConnectItem=fp;function hp({theme:t}){return(0,z.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,z.h)("li",{class:(0,rt.default)("-cbwsdk-wallet-steps-item",t)},(0,z.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,z.h)("li",{class:(0,rt.default)("-cbwsdk-wallet-steps-item",t)},(0,z.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,z.h)("span",null,"Tap ",(0,z.h)("strong",null,"Scan")," "),(0,z.h)("span",{class:(0,rt.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,z.h)(lp.QRCodeIcon,{fill:cc(t)})))))}Rt.CoinbaseWalletSteps=hp;function dp({theme:t}){return(0,z.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,z.h)("li",{class:(0,rt.default)("-cbwsdk-wallet-steps-item",t)},(0,z.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase app")),(0,z.h)("li",{class:(0,rt.default)("-cbwsdk-wallet-steps-item",t)},(0,z.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,z.h)("span",null,"Tap ",(0,z.h)("strong",null,"More")),(0,z.h)("span",{class:(0,rt.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,z.h)(P3.StatusDotIcon,{fill:cc(t)})),(0,z.h)("span",{class:"-cbwsdk-wallet-steps-pad-left"},"then ",(0,z.h)("strong",null,"Scan")),(0,z.h)("span",{class:(0,rt.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,z.h)(lp.QRCodeIcon,{fill:cc(t)})))))}Rt.CoinbaseAppSteps=dp;var Bs={},js={};Object.defineProperty(js,"__esModule",{value:!0});js.ArrowLeftIcon=void 0;const Af=Ze;function W3(t){return(0,Af.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"}
38,t),(0,Af.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"}))}js.ArrowLeftIcon=W3;var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0});Fs.LaptopIcon=void 0;const Oa=Ze;function H3(t){return(0,Oa.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,Oa.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,Oa.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"}))}Fs.LaptopIcon=H3;var Ws={};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.SafeIcon=void 0;const Mf=Ze;function V3(t){return(0,Mf.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,Mf.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"}))}Ws.SafeIcon=V3;var du={};Object.defineProperty(du,"__esModule",{value:!0});du.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 pp=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bs,"__esModule",{value:!0});Bs.TryExtensionContent=void 0;const nr=pp(Os),Ee=Ze,Na=pi,U3=js,z3=Fs,q3=Ws,G3=pp(du);function J3({theme:t}){const[e,r]=(0,Na.useState)(!1),n=(0,Na.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,Na.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,Ee.h)("div",{class:(0,nr.default)("-cbwsdk-try-extension",t)},(0,Ee.h)("style",null,G3.default),(0,Ee.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Ee.h)("h3",{class:(0,nr.default)("-cbwsdk-try-extension-heading",t)}
vendor: 1,962 bytes, line 38
38,"Or try the Coinbase Wallet browser extension"),(0,Ee.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,Ee.h)("button",{class:(0,nr.default)("-cbwsdk-try-extension-cta",t),onClick:i},e?"Refresh":"Install"),(0,Ee.h)("div",null,!e&&(0,Ee.h)(U3.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:t==="light"?"#0052FF":"#588AF5"})))),(0,Ee.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Ee.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,Ee.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Ee.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Ee.h)("span",{class:(0,nr.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,Ee.h)(z3.LaptopIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Ee.h)("div",{class:(0,nr.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,Ee.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Ee.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Ee.h)("span",{class:(0,nr.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,Ee.h)(q3.SafeIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Ee.h)("div",{class:(0,nr.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Bs.TryExtensionContent=J3;var pu={};Object.defineProperty(pu,"__esModule",{value:!0});pu.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}
38.-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 bp=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ks,"__esModule",{value:!0});ks.ConnectDialog=void 0;const La=bp(Os),ir=Ze,Pa=pi,Q3=Rt,Z3=Bs,Y3=bp(pu),K3=t=>{const{isOpen:e,darkMode:r}=t,[n,i]=(0,Pa.useState)(!e),[s,o]=(0,Pa.useState)(!e);(0,Pa.useEffect)(()=>{const c=[window.setTimeout(()=>{o(!e)},10)];return e?i(!1):c.push(window.setTimeout(()=>{i(!0)},360)),()=>{c.forEach(window.clearTimeout)}},[t.isOpen]);const a=r?"dark":"light";return(0,ir.h)("div",{class:(0,La.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,ir.h)("style",null,Y3.default),(0,ir.h)("div",{class:(0,La.default)("-cbwsdk-connect-dialog-backdrop",a,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,ir.h)("div",{class:"-cbwsdk-connect-dialog"},(0,ir.h)("div",{class:(0,La.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,ir.h)(Q3.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,ir.h)(Z3.TryExtensionContent,{theme:a}))))};ks.ConnectDialog=K3;Object.defineProperty(As,"__esModule",{value:!0});As.LinkFlow=void 0;const $a=Ze,Tf=Ts,X3=ks;class e4{constructor(e){this.extensionUI$=new Tf.BehaviorSubject({}),this.subscriptions=new Tf.Subscription,this.isConnected=!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,this.connected$=e.connected$,this.chainId$=e.chainId$}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe(r=>{this.isConnected!==r&&(this.isConnected=r,this.render())})),this.subscriptions.add(this.chainId$.subscribe(r=>{this.chainId!==r&&(this.chainId=r,this.render())}))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,$a.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(){if(!this.root)return;const e=this.extensionUI$.subscribe(()=>{this.root&&(0,$a.render)((0,$a.h)(X3.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)});this.subscriptions.add(e)}}As.LinkFlow=e4;var gp={},bu={};Object.defineProperty(bu,"__esModule",{value:!0});bu.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;
38cursor: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}";(function(t){var e=j&&j.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const r=e(Os),n=Ze,i=pi,s=e(bu),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";function a(f){switch(f){case"coinbase-app":return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyA
38wLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+";case"coinbase-wallet-app":default:return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}}class c{constructor(h){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=h.darkMode}attach(h){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",h.appendChild(this.root),this.render()}presentItem(h){const g=this.nextItemKey++;return this.items.set(g,h),this.render(),()=>{this.items.delete(g),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([h,g])=>(0,n.h)(t.SnackbarInstance,Object.assign({},g,{key:h}))))),this.root)}}t.Snackbar=c;const u=f=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},f.children));t.SnackbarContainer=u;const l=({autoExpand:f,message:h,menuItems:g,appSrc:v})=>{const[C,S]=(0,i.useState)(!0),[b,y]=(0,i.useState)(f??!1);(0,i.useEffect)(()=>{const x=[window.setTimeout(()=>{S(!1)},1),window.setTimeout(()=>{y(!0)},1e4)];return()=>{x.forEach(window.clearTimeout)}});const _=()=>{y(!b)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",C&&"-cbwsdk-snackbar-instance-hidden",b&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:_},(0,n.h)("img",{src:a(v),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},h),(0,n.h)("div",{class:"-gear-container"},!b&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:o,class:"-gear-icon",title:"Expand"}))),g&&g.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},g.map((x,E)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",x.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:x.onClick,key:E},(0,n.h)("svg",{width:x.svgWidth,height:x.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":x.defaultFillRule,"clip-rule":x.defaultClipRule,d:x.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",x.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},x.info)))))};t.SnackbarInstance=l})(gp);var Hs={},gu={};
38Object.defineProperty(gu,"__esModule",{value:!0});gu.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 t4=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.injectCssReset=void 0;const r4=t4(gu);function n4(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(r4.default)),document.documentElement.appendChild(t)}Hs.injectCssReset=n4;Object.defineProperty(Rs,"__esModule",{value:!0});Rs.WalletSDKUI=void 0;const i4=As,s4=gp,o4=Hs;class a4{constructor(e){this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new s4.Snackbar({darkMode:e.darkMode}),this.linkFlow=new i4.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,connected$:e.connected$,chainId$:e.chainId$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const 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,o4.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(e){}watchAsset(e){}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",appSrc:this.appSrc,menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.9687
385C6.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",appSrc:this.appSrc,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)}setAppSrc(e){this.appSrc=e}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(e){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}}Rs.WalletSDKUI=a4;var Vs={},Us={};Object.defineProperty(Us,"__esModule",{value:!0});var Hr;(function(t){t.typeOfFunction="function",t.boolTrue=!0})(Hr||(Hr={}));function yp(t,e,r){if(!r||typeof r.value!==Hr.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:Hr.boolTrue,get:function(){var n=r.value.bind(this);return Object.defineProperty(this,e,{value:n,configurable:Hr.boolTrue,writable:Hr.boolTrue}),n}}}Us.bind=yp;Us.default=yp;function vp(t){return function(r){return r.lift(new c4(t))}}var c4=function(){function t(e){this.durationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new u4(e,this.durationSelector))},t}(),u4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.durationSelector=n,i.hasValue=!1,i}return e.prototype._next=function(r){if(this.value=r,this.hasValue=!0,!this.throttled){var n=void 0;try{var i=this.durationSelector;n=i(r)}catch(o){return this.destination.error(o)}var s=_e(n,new me(this));!s||s.closed?this.clearThrottle():this.add(this.throttled=s)}},e.prototype.clearThrottle=function(){var r=this,n=r.value,i=r.hasValue,s=r.throttled;s&&(this.remove(s),this.throttled=void 0,s.unsubscribe()),i&&(this.value=void 0,this.hasValue=!1,this.destination.next(n))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(we);function l4(t,e){return e===void 0&&(e=Ve),vp(function(){return ip(t,e)})}function f4(t){return function(r){return r.lift(new h4(t))}}var h4=function(){function t(e){this.closingNotifier=e}return t.prototype.call=function(e,r){return r.subscribe(new d4(e,this.closingNotifier))},t}(),d4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.buffer=[],i.add(_e(n,new me(i))),i}return e.prototype._next=function(r){this.buffer.push(r)},e.prototype.notifyNext=function(){var r=this.buffer;this.buffer=[],this.destination.next(r)},e}(we);function p4(t,e){return e===void 0&&(e=null),function(n){return n.lift(new b4(t,e))}}var b4=function(){function t(e,r){this.bufferSize=e,this.startBufferEvery=r,!r||e===r?this.subscriberClass=g4:this.subscriberClass=y4}return t.prototype.call=function(e,r){return r.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},t}(),g4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.bufferSize=n,i.buffer=[],i}return e.prototype._next=function(r){var n=this.buffer;n.push(r),n.length==this.bufferSize&&(this.destination.next(n),this.buffer=[])},e.prototype._complete=function(){var r=this.buffer;r.length>0&&this.destination.next(r),t.prototype._complete.call(this)},e}(V),y4=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.bufferSize=n,s.startBufferEvery=i,s.buffers=[],s.count=0,s}return e.prototype._next=function(r){var n=this,i=n.bufferSize,s=n.startBufferEvery,o=n.buffers,a=n.count;this.count++,a%s===0&&o.push([]);for(var c=o.length;c--;){var u=o[c];u.push(r),u.length===i&&(o.splice(c,1),this.destination.next(u))}},e.prototype._complete=function(){for(var r=this,n=r.buffers,i=r.destination;n.length>0;){var s=n.shift();s.length>0&&i.next(s)}t.prototype._complete.call(this)},e}(V);function v4(t){var e=arguments.length,r=Ve;Qe(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],e--);var n=null;e>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(o){return o.lift(new m4(t,n,i,r))}}var m4=function(){function t(e,r,n,i){this.bufferTimeSpan=e,this.bufferCreationInterval=r,this.maxBufferSize=n,this.scheduler
38=i}return t.prototype.call=function(e,r){return r.subscribe(new _4(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),w4=function(){function t(){this.buffer=[]}return t}(),_4=function(t){I(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=i,a.maxBufferSize=s,a.scheduler=o,a.contexts=[];var c=a.openContext();if(a.timespanOnly=i==null||i<0,a.timespanOnly){var u={subscriber:a,context:c,bufferTimeSpan:n};a.add(c.closeAction=o.schedule(kf,n,u))}else{var l={subscriber:a,context:c},f={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:a,scheduler:o};a.add(c.closeAction=o.schedule(mp,n,l)),a.add(o.schedule(S4,i,f))}return a}return e.prototype._next=function(r){for(var n=this.contexts,i=n.length,s,o=0;o<i;o++){var a=n[o],c=a.buffer;c.push(r),c.length==this.maxBufferSize&&(s=a)}s&&this.onBufferFull(s)},e.prototype._error=function(r){this.contexts.length=0,t.prototype._error.call(this,r)},e.prototype._complete=function(){for(var r=this,n=r.contexts,i=r.destination;n.length>0;){var s=n.shift();i.next(s.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(r){this.closeContext(r);var n=r.closeAction;if(n.unsubscribe(),this.remove(n),!this.closed&&this.timespanOnly){r=this.openContext();var i=this.bufferTimeSpan,s={subscriber:this,context:r,bufferTimeSpan:i};this.add(r.closeAction=this.scheduler.schedule(kf,i,s))}},e.prototype.openContext=function(){var r=new w4;return this.contexts.push(r),r},e.prototype.closeContext=function(r){this.destination.next(r.buffer);var n=this.contexts,i=n?n.indexOf(r):-1;i>=0&&n.splice(n.indexOf(r),1)},e}(V);function kf(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function S4(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,i=t.scheduler,s=n.openContext(),o=this;n.closed||(n.add(s.closeAction=i.schedule(mp,r,{subscriber:n,context:s})),o.schedule(t,e))}function mp(t){var e=t.subscriber,r=t.context;e.closeContext(r)}function E4(t,e){return function(n){return n.lift(new C4(t,e))}}var C4=function(){function t(e,r){this.openings=e,this.closingSelector=r}return t.prototype.call=function(e,r){return r.subscribe(new x4(e,this.openings,this.closingSelector))},t}(),x4=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.closingSelector=i,s.contexts=[],s.add(Bt(s,n)),s}return e.prototype._next=function(r){for(var n=this.contexts,i=n.length,s=0;s<i;s++)n[s].buffer.push(r)},e.prototype._error=function(r){for(var n=this.contexts;n.length>0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,r)},e.prototype._complete=function(){for(var r=this.contexts;r.length>0;){var n=r.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(r,n){r?this.closeBuffer(r):this.openBuffer(n)},e.prototype.notifyComplete=function(r){this.closeBuffer(r.context)},e.prototype.openBuffer=function(r){try{var n=this.closingSelector,i=n.call(this,r);i&&this.trySubscribe(i)}catch(s){this._error(s)}},e.prototype.closeBuffer=function(r){var n=this.contexts;if(n&&r){var i=r.buffer,s=r.subscription;this.destination.next(i),n.splice(n.indexOf(r),1),this.remove(s),s.unsubscribe()}},e.prototype.trySubscribe=function(r){var n=this.contexts,i=[],s=new ve,o={buffer:i,subscription:s};n.push(o);var a=Bt(this,r,o);!a||a.closed?this.closeBuffer(o):(a.context=o,this.add(a),s.add(a))},e}(Ar);function I4(t){return function(e){return e.lift(new R4(t))}}var R4=function(){function t(e){this.closingSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new A4(e,this.closingSelector))},t}(),A4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return e.prototype._next=function(r){this.buffer.push(r)},e.prototype._complete=function(){var r=this.buffer;r&&this.destination.next(r),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var r=this.closingSubscription;r&&(this.remove(r),r.unsubscribe());var n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];var i;try{var s=this.closingSelector;i=s()}catch(o){return this.error(o)}r=new ve,this.closingSubscription=r,this.add(r),this.subscribing=!0,r.add(_e
38(i,new me(this))),this.subscribing=!1},e}(we);function M4(t){return function(r){var n=new T4(t),i=r.lift(n);return n.caught=i}}var T4=function(){function t(e){this.selector=e}return t.prototype.call=function(e,r){return r.subscribe(new k4(e,this.selector,this.caught))},t}(),k4=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.selector=n,s.caught=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=void 0;try{n=this.selector(r,this.caught)}catch(o){t.prototype.error.call(this,o);return}this._unsubscribeAndRecycle();var i=new me(this);this.add(i);var s=_e(n,i);s!==i&&this.add(s)}},e}(we);function O4(t){return function(e){return e.lift(new iu(t))}}function N4(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=null;return typeof t[t.length-1]=="function"&&(r=t.pop()),t.length===1&&He(t[0])&&(t=t[0].slice()),function(n){return n.lift.call(jt([n].concat(t)),new iu(r))}}function L4(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){return r.lift.call(Un.apply(void 0,[r].concat(t)))}}function wp(t,e){return vr(t,e,1)}function P4(t,e){return wp(function(){return t},e)}function $4(t){return function(e){return e.lift(new D4(t,e))}}var D4=function(){function t(e,r){this.predicate=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new B4(e,this.predicate,this.source))},t}(),B4=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.source=i,s.count=0,s.index=0,s}return e.prototype._next=function(r){this.predicate?this._tryPredicate(r):this.count++},e.prototype._tryPredicate=function(r){var n;try{n=this.predicate(r,this.index++,this.source)}catch(i){this.destination.error(i);return}n&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(V);function j4(t){return function(e){return e.lift(new F4(t))}}var F4=function(){function t(e){this.durationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new W4(e,this.durationSelector))},t}(),W4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.durationSelector=n,i.hasValue=!1,i}return e.prototype._next=function(r){try{var n=this.durationSelector.call(this,r);
38n&&this._tryNext(r,n)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(r,n){var i=this.durationSubscription;this.value=r,this.hasValue=!0,i&&(i.unsubscribe(),this.remove(i)),i=_e(n,new me(this)),i&&!i.closed&&this.add(this.durationSubscription=i)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var r=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,r)}},e}(we);function H4(t,e){return e===void 0&&(e=Ve),function(r){return r.lift(new V4(t,e))}}var V4=function(){function t(e,r){this.dueTime=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new U4(e,this.dueTime,this.scheduler))},t}(),U4=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.dueTime=n,s.scheduler=i,s.debouncedSubscription=null,s.lastValue=null,s.hasValue=!1,s}return e.prototype._next=function(r){this.clearDebounce(),this.lastValue=r,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(z4,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var r=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(r)}},e.prototype.clearDebounce=function(){var r=this.debouncedSubscription;r!==null&&(this.remove(r),r.unsubscribe(),this.debouncedSubscription=null)},e}(V);function z4(t){t.debouncedNext()}function bi(t){return t===void 0&&(t=null),function(e){return e.lift(new q4(t))}}var q4=function(){function t(e){this.defaultValue=e}return t.prototype.call=function(e,r){return r.subscribe(new G4(e,this.defaultValue))},t}(),G4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.defaultValue=n,i.isEmpty=!0,i}return e.prototype._next=function(r){this.isEmpty=!1,this.destination.next(r)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(V);function _p(t){return t instanceof Date&&!isNaN(+t)}function J4(t,e){e===void 0&&(e=Ve);var r=_p(t),n=r?+t-e.now():Math.abs(t);return function(i){return i.lift(new Q4(n,e))}}var Q4=function(){function t(e,r){this.delay=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new Z4(e,this.delay,this.scheduler))},t}(),Z4=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.delay=n,s.scheduler=i,s.queue=[],s.active=!1,s.errored=!1,s}return e.dispatch=function(r){for(var n=r.source,i=n.queue,s=r.scheduler,o=r.destination;i.length>0&&i[0].time-s.now()<=0;)i.shift().notification.observe(o);if(i.length>0){var a=Math.max(0,i[0].time-s.now());this.schedule(r,a)}else this.unsubscribe(),n.active=!1},e.prototype._schedule=function(r){this.active=!0;var n=this.destination;n.add(r.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:r}))},e.prototype.scheduleNotification=function(r){if(this.errored!==!0){var n=this.scheduler,i=new Y4(n.now()+this.delay,r);this.queue.push(i),this.active===!1&&this._schedule(n)}},e.prototype._next=function(r){this.scheduleNotification($t.createNext(r))},e.prototype._error=function(r){this.errored=!0,this.queue=[],this.destination.error(r),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification($t.createComplete()),this.unsubscribe()},e}(V),Y4=function(){function t(e,r){this.time=e,this.notification=r}return t}();function K4(t,e){return e?function(r){return new e5(r,e).lift(new Of(t))}:function(r){return r.lift(new Of(t))}}var Of=function(){function t(e){this.delayDurationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new X4(e,this.delayDurationSelector))},t}(),X4=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return e.prototype.notifyNext=function(r,n,i,s,o){this.destination.next(r),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(r,n){this._error(r)},e.prototype.notifyComplete=function(r){var n=this.removeSubscription(r);n&&this.destination.next(n),this.tryComplete()},e.prototype._next=function(r){var n=this.index++;try{var i=this.delayDurationSelector(r,n);i&&this.tryDelay(i,r)}catch(s){this.destination.error(s)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(r){r.unsubscribe();var n=this.delayNotifierSubscriptions.indexOf(r);return n!==-1&&this.delayNotifierSubscriptions.splice(n,1),r.outerValue},e.prototype.tryDelay=function(r,n){var i=Bt(this,r,n);if(i&&!i.closed){var s=this.destination;s.add(i),this.delayNotifierSubscriptions.push(i)}},e.prototype.tryComplete=function(){this.completed&&this.delayNotifierSubscriptions.length===0&&this.destination.complete()},e}(Ar),e5=function(t){I(e,t);function e(r,n){var i=t.call(this)||this;return i.source=r,i.subscriptionDelay=n,i}return e.prototype._subscribe=function(r){this.subscriptionDelay.subscribe(new t5(r,this.source))},e}(X),t5=function(t){I(e,t);function e(r,n){var i=t.call(this)||this;return i.parent=r,i.source=n,i.sourceSubscribed=!1,i}return e.prototype._next=function(r){this.subscribeToSource()},e.prototype._error=function(r){this.unsubscribe(),this.parent.error(r)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(V);function r5(){return function(e){return e.lift(new n5)}}var n5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new i5(e))},t}(),i5=function(t){I(e,t);function e(r){return t.call(this,r)||this}return e.prototype._next=function(r){r.observe(this.destination)},e}(V);function s5(t,e){return function(r){return r.lift(new o5(t,e))}}var o5=function(){function t(e,r){this.keySelector=e,this.flushes=r}return t.prototype.call=function(e,r){return r.subscribe(new a5(e,this.keySelector,this.flushes))},t}(),a5=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.keySelector=n,s.values=new Set,i&&s.add(_e(i,new me(s))),s}return e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(r){this._error(r)},e.prototype._next=function(r){this.keySelector?this._useKeySelector(r):this._finalizeNext(r,r)},e.prototype._useKeySelector=function(r){var n,i=this.destination;try{n=this.keySelector(r)}catch(s){i.error(s);return}this._finalizeNext(n,r)},e.prototype._finalizeNext=function(r,n){var i=this.values;i.has(r)||(i.add(r),this.destination.next(n))},e}(we);function Sp(t,e){return function(r){return r.lift(new c5(t,e))}}var c5=function(){function t(e,r){this.compare=e,this.keySelector=r}return t.prototype.call=function(e,r){return r.subscribe(new u5(e,this.compare,this.keySelector))},t}(),u5=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.keySelector=i,s.hasKey=!1,typeof n=="function"&&(s.compare=n),s}return e.prototype.compare=function(r,n){return r===n},e.prototype._next=function(r){var n;try{var i=this.keySelector;n=i?i(r):r}catch(a){return this.destination.error(a)}var s=!1;if(this.hasKey)try{var o=this.compare;s=o(this.key,n)}catch(a){return this.destination.error(a)}else this.hasKey=!0;s||(this.key=n,this.destination.next(r))},e}(V);function l5(t,e){return Sp(function(r,n){return e?e(r[t],n[t]):r[t]===n[t]})}function zs(t){return t===void 0&&(t=d5),function(e){return e.lift(new f5(t))}}var f5=function(){function t(e){this.errorFactory=e}return t.prototype.call=function(e,r){return r.subscribe(new h5(e,this.errorFactory)
38)},t}(),h5=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.errorFactory=n,i.hasValue=!1,i}return e.prototype._next=function(r){this.hasValue=!0,this.destination.next(r)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var r=void 0;try{r=this.errorFactory()}catch(n){r=n}this.destination.error(r)},e}(V);function d5(){return new di}function yu(t){return function(e){return t===0?wn():e.lift(new p5(t))}}var p5=function(){function t(e){if(this.total=e,this.total<0)throw new on}return t.prototype.call=function(e,r){return r.subscribe(new b5(e,this.total))},t}(),b5=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.count=0,i}return e.prototype._next=function(r){var n=this.total,i=++this.count;i<=n&&(this.destination.next(r),i===n&&(this.destination.complete(),this.unsubscribe()))},e}(V);function g5(t,e){if(t<0)throw new on;var r=arguments.length>=2;return function(n){return n.pipe(Xt(function(i,s){return s===t}),yu(1),r?bi(e):zs(function(){return new on}))}}function y5(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){return Un(r,Ms.apply(void 0,t))}}function v5(t,e){return function(r){return r.lift(new m5(t,e,r))}}var m5=function(){function t(e,r,n){this.predicate=e,this.thisArg=r,this.source=n}return t.prototype.call=function(e,r){return r.subscribe(new w5(e,this.predicate,this.thisArg,this.source))},t}(),w5=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.predicate=n,o.thisArg=i,o.source=s,o.index=0,o.thisArg=i||o,o}return e.prototype.notifyComplete=function(r){this.destination.next(r),this.destination.complete()},e.prototype._next=function(r){var n=!1;try{n=this.predicate.call(this.thisArg,r,this.index++,this.source)}catch(i){this.destination.error(i);return}n||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(V);function _5(){return function(t){return t.lift(new S5)}}var S5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new E5(e))},t}(),E5=function(t){I(e,t);function e(r){var n=t.call(this,r)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return e.prototype._next=function(r){this.hasSubscription||(this.hasSubscription=!0,this.add(_e(r,new me(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(we);function Ep(t,e){return e?function(r){return r.pipe(Ep(function(n,i){return jt(t(n,i)).pipe(ot(function(s,o){return e(n,s,i,o)}))}))}:function(r){return r.lift(new C5(t))}}var C5=function(){function t(e){this.project=e}return t.prototype.call=function(e,r){return r.subscribe(new x5(e,this.project))},t}(),x5=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return e.prototype._next=function(r){this.hasSubscription||this.tryNext(r)},e.prototype.tryNext=function(r){var n,i=this.index++;try{n=this.project(r,i)}catch(s){this.destination.error(s);return}this.hasSubscription=!0,this._innerSub(n)},e.prototype._innerSub=function(r){var n=new me(this),i=this.destination;i.add(n);var s=_e(r,n);s!==n&&i.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(r){this.destination.next(r)},e.prototype.notifyError=function(r){this.destination.error(r)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(we);function I5(t,e,r){return e===void 0&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(n){return n.lift(new R5(t,e,r))}}var R5=function(){function t(e,r,n){this.project=e,this.concurrent=r,this.scheduler=n}return t.prototype.call=function(e,r){return r.subscribe(new A5(e,this.project,this.concurrent,this.scheduler))},t}(),A5=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;
38return o.project=n,o.concurrent=i,o.scheduler=s,o.index=0,o.active=0,o.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return e.dispatch=function(r){var n=r.subscriber,i=r.result,s=r.value,o=r.index;n.subscribeToProjection(i,s,o)},e.prototype._next=function(r){var n=this.destination;if(n.closed){this._complete();return}var i=this.index++;if(this.active<this.concurrent){n.next(r);try{var s=this.project,o=s(r,i);if(!this.scheduler)this.subscribeToProjection(o,r,i);else{var a={subscriber:this,result:o,value:r,index:i},c=this.destination;c.add(this.scheduler.schedule(e.dispatch,0,a))}}catch(u){n.error(u)}}else this.buffer.push(r)},e.prototype.subscribeToProjection=function(r,n,i){this.active++;var s=this.destination;s.add(_e(r,new me(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&this.active===0&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(r){this._next(r)},e.prototype.notifyComplete=function(){var r=this.buffer;this.active--,r&&r.length>0&&this._next(r.shift()),this.hasCompleted&&this.active===0&&this.destination.complete()},e}(we);function M5(t){return function(e){return e.lift(new T5(t))}}var T5=function(){function t(e){this.callback=e}return t.prototype.call=function(e,r){return r.subscribe(new k5(e,this.callback))},t}(),k5=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.add(new ve(n)),i}return e}(V);function O5(t,e){if(typeof t!="function")throw new TypeError("predicate is not a function");return function(r){return r.lift(new Cp(t,r,!1,e))}}var Cp=function(){function t(e,r,n,i){this.predicate=e,this.source=r,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(e,r){return r.subscribe(new N5(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),N5=function(t){I(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.predicate=n,a.source=i,a.yieldIndex=s,a.thisArg=o,a.index=0,a}return e.prototype.notifyComplete=function(r){var n=this.destination;n.next(r),n.complete(),this.unsubscribe()},e.prototype._next=function(r){var n=this,i=n.predicate,s=n.thisArg,o=this.index++;try{var a=i.call(s||this,r,o,this.source);a&&this.notifyComplete(this.yieldIndex?o:r)}catch(c){this.destination.error(c)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(V);function L5(t,e){return function(r){return r.lift(new Cp(t,r,!0,e))}}function P5(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Xt(function(i,s){return t(i,s,n)}):Yt,yu(1),r?bi(e):zs(function(){return new di}))}}function $5(){return function(e){return e.lift(new D5)}}var D5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new B5(e))},t}(),B5=function(t){I(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype._next=function(r){},e}(V);function j5(){return function(t){return t.lift(new F5)}}var F5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new W5(e))},t}(),W5=function(t){I(e,t);function e(r){return t.call(this,r)||this}return e.prototype.notifyComplete=function(r){var n=this.destination;n.next(r),n.complete()},e.prototype._next=function(r){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(V);function Gi(t){return function(r){return t===0?wn():r.lift(new H5(t))}}var H5=function(){function t(e){if(this.total=e,this.total<0)throw new on}return t.prototype.call=function(e,r){return r.subscribe(new V5(e,this.total))},t}(),V5=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.ring=new Array,i.count=0,i}return e.prototype._next=function(r){var n=this.ring,i=this.total,s=this.count++;if(n.length<i)n.push(r);else{var o=s%i;n[o]=r}},e.prototype._complete=function(){var r=this.destination,n=this.count;if(n>0)for(var i=this.count>=this.total?this.total:this.count,s=this.ring,o=0;o<i;o++){var a=n++%i;r.next(s[a])}r.complete()},e}(V);function U5(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Xt(function(i,s){return t(i,s,n)}):Yt,Gi(1),r?bi(e):zs(function(){return new di}))}}function z5(t){return function(e){return e.lift(new q5(t))}}var q5=function(){function t(e){this.value=e}return t.prototype.call=function(e,r){return r.subscribe(new G5(e,this.value))},t}(),G5=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype._next=function(r){this.destination.next(this.value)},e}(V);function J5(){return function(e){return e.lift(new Q5)}}var Q5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new Z5(e))},t}(),Z5=function(t){I(e,t);function e(r){return t.call(this,r)||this}return e.prototype._next=function(r){this.destination.next($t.createNext(r))},e.prototype._error=function(r){var n=this.destination;n.next($t.createError(r)),n.complete()},e.prototype._complete=function(){var r=this.destination;r.next($t.createComplete()),r.complete()},e}(V);function Ji(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(i){return i.lift(new Y5(t,e,r))}}var Y5=function(){function t(e,r,n){n===void 0&&(n=!1),this.accumulator=e,this.seed=r,this.hasSeed=n}return t.prototype.call=function(e,r){return r.subscribe(new K5(e,this.accumulator,this.seed,this.hasSeed))},t}(),K5=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.accumulator=n,o._seed=i,o.hasSeed=s,o.index=0,o}return Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(r){this.hasSeed=!0,this._seed=r},enumerable:!0,configurable:!0}),e.prototype._next=function(r){if(!this.hasSeed)this.seed=r,this.destination.next(r);else return this._tryNext(r)},e.prototype._tryNext=function(r){var n=this.index++,i;try{i=this.accumulator(this.seed,r,n)}catch(s){this.destination.error(s)}this.seed=i,this.destination.next(i)},e}(V);function qs(t,e){return arguments.length>=2?function(n){return rc(Ji(t,e),Gi(1),bi(e))(n)}:function(n){return rc(Ji(function(i,s,o){return t(i,s,o+1)}),Gi(1))(n)}}function X5(t){var e=typeof t=="function"?function(r,n){return t(r,n)>0?r:n}:function(r,n){return r>n?r:n};return qs(e)}function eC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){return r.lift.call(ep.apply(void 0,[r].concat(t)))}}function tC(t,e,r){return r===void 0&&(r=Number.POSITIVE_INFINITY),typeof e=="function"?vr(function(){return t},e,r):(typeof e=="number"&&(r=e),vr(function(){return t},r))}function rC(t,e,r){return r===void 0&&(r=Number.POSITIVE_INFINITY),function(n){return n.lift(new nC(t,e,r))}}var nC=function(){function t(e,r,n){this.accumulator=e,this.seed=r,this.concurrent=n}return t.prototype.call=function(e,r){return r.subscribe(new iC(e,this.accumulator,this.seed,this.concurrent))},t}(),iC=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.accumulator=n,o.acc=i,o.concurrent=s,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return e.prototype._next=function(r){if(this.active<this.concurrent){var n=this.index++,i=this.destination,s=void 0;try{var o=this.accumulator;s=o(this.acc,r,n)}catch(a){return i.error(a)}this.active++,this._innerSub(s)}else this.buffer.push(r)},e.prototype._innerSub=function(r){var n=new me(this),i=this.destination;i.add(n);var s=_e(r,n);s!==n&&i.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(r){var n=this.destination;this.acc=r,this.hasValue=!0,n.next(r)},e.prototype.notifyComplete=function(){var r=this.buffer;this.active--,r.length>0?this._next(r.shift()):this.active===0&&this.hasCompleted&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e}(we);function sC(t){var e=typeof t=="function"?function(r,n){return t(r,n)<0?r:n}:function(r,n){return r<n?r:n};return qs(e)}function mr(t,e){return function(n){var i;if(typeof t=="function"?i=t:i=function(){return t},typeof e=="function")return n.lift(new oC(i,e));var s=Object.create(n,QS);return s.source=n,s.subjectFactory=i,s}}var oC=function(){function t(e,r){this.subjectFactory=e,this.selector=r}return t.prototype.call=function(e,r){var n=this.selector,i=this.subjectFactory(),s=n(i).subscribe(e);return s.add(r.subscribe(i)),s},t}();function aC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length===1&&He(t[0])&&(t=t[0]),function(r){return r.lift(new cC(t))}}var cC=function(){function t(e){this.nextSources=e}return t.prototype.call=function(e,r){return r.subscribe(new uC(e,this.nextSources))},t}(),uC=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.destination=r,i.nextSources=n,i}return e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(r){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var r=this.nextSources.shift();if(r){var n=new me(this),i=this.destination;i.add(n);var s=_e(r,n);s!==n&&i.add(s)}else this.destination.complete()},e}(we);function lC(){return function(t){return t.lift(new fC)}}var fC=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new hC(e))},t}(),hC=function(t){I(e,t);function e(r){var n=t.call(this,r)||this;return n.hasPrev=!1,n}return e.prototype._next=function(r){var n;this.hasPrev?n=[this.prev,r]:this.hasPrev=!0,this.prev=r,n&&this.destination.next(n)},e}(V);
38function dC(t,e){return function(r){return[Xt(t,e)(r),Xt(rp(t,e))(r)]}}function pC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length;if(r===0)throw new Error("list of properties cannot be empty.");return function(n){return ot(bC(t,r))(n)}}function bC(t,e){var r=function(n){for(var i=n,s=0;s<e;s++){var o=i!=null?i[t[s]]:void 0;if(o!==void 0)i=o;else return}return i};return r}function gC(t){return t?mr(function(){return new ke},t):mr(new ke)}function yC(t){return function(e){return mr(new Pd(t))(e)}}function vC(){return function(t){return mr(new _n)(t)}}function mC(t,e,r,n){r&&typeof r!="function"&&(n=r);var i=typeof r=="function"?r:void 0,s=new nu(t,e,n);return function(o){return mr(function(){return s},i)(o)}}function wC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(n){return t.length===1&&He(t[0])&&(t=t[0]),n.lift.call(np.apply(void 0,[n].concat(t)))}}function _C(t){return t===void 0&&(t=-1),function(e){return t===0?wn():t<0?e.lift(new Nf(-1,e)):e.lift(new Nf(t-1,e))}}var Nf=function(){function t(e,r){this.count=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new SC(e,this.count,this.source))},t}(),SC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.count=n,s.source=i,s}return e.prototype.complete=function(){if(!this.isStopped){var r=this,n=r.source,i=r.count;if(i===0)return t.prototype.complete.call(this);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(V);function EC(t){return function(e){return e.lift(new CC(t))}}var CC=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){return r.subscribe(new xC(e,this.notifier,r))},t}(),xC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.notifier=n,s.source=i,s.sourceIsBeingSubscribedTo=!0,s}return e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(this.sourceIsBeingSubscribedTo===!1)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var r=this,n=r.notifications,i=r.retriesSubscription;n&&(n.unsubscribe(),this.notifications=void 0),i&&(i.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var r=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=r,this},e.prototype.subscribeToRetries=function(){this.notifications=new ke;var r;try{var n=this.notifier;r=n(this.notifications)}catch{return t.prototype.complete.call(this)}this.retries=r,this.retriesSubscription=_e(r,new me(this))},e}(we);function IC(t){return t===void 0&&(t=-1),function(e){return e.lift(new RC(t,e))}}var RC=function(){function t(e,r){this.count=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new AC(e,this.count,this.source))},t}(),AC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.count=n,s.source=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=this,i=n.source,s=n.count;if(s===0)return t.prototype.error.call(this,r);s>-1&&(this.count=s-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(V);function MC(t){return function(e){return e.lift(new TC(t,e))}}var TC=function(){function t(e,r){this.notifier=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new kC(e,this.notifier,this.source))},t}(),kC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.notifier=n,s.source=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=this.errors,i=this.retries,s=this.retriesSubscription;if(i)this.errors=void 0,this.retriesSubscription=void 0;else{n=new ke;try{var o=this.notifier;i=o(n)}catch(a){return t.prototype.error.call(this,a)}s=_e(i,new me(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=s,n.next(r)}},e.prototype._unsubscribe=function(){var r=this,n=r.errors,i=r.retriesSubscription;n&&(n.unsubscribe(),this.errors=void 0),i&&(i.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var r=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=r,this.source.subscribe(this)},e}(we);function OC(t){return function(e){return e.lift(new NC(t))}}var NC=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){var n=new LC(e),i=r.subscribe(n);return i.add(_e(this.notifier,new me(n))),i},t}(),LC=function(t){I(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasValue=!1,r}return e.prototype._next=function(r){this.value=r,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(we);function PC(t,e){return e===void 0&&(e=Ve),function(r){return r.lift(new $C(t,e))}}
38var $C=function(){function t(e,r){this.period=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new DC(e,this.period,this.scheduler))},t}(),DC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.period=n,s.scheduler=i,s.hasValue=!1,s.add(i.schedule(BC,n,{subscriber:s,period:n})),s}return e.prototype._next=function(r){this.lastValue=r,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(V);function BC(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}function jC(t,e){return function(r){return r.lift(new FC(t,e))}}var FC=function(){function t(e,r){this.compareTo=e,this.comparator=r}return t.prototype.call=function(e,r){return r.subscribe(new WC(e,this.compareTo,this.comparator))},t}(),WC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.compareTo=n,s.comparator=i,s._a=[],s._b=[],s._oneComplete=!1,s.destination.add(n.subscribe(new HC(r,s))),s}return e.prototype._next=function(r){this._oneComplete&&this._b.length===0?this.emit(!1):(this._a.push(r),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var r=this,n=r._a,i=r._b,s=r.comparator;n.length>0&&i.length>0;){var o=n.shift(),a=i.shift(),c=!1;try{c=s?s(o,a):o===a}catch(u){this.destination.error(u)}c||this.emit(!1)}},e.prototype.emit=function(r){var n=this.destination;n.next(r),n.complete()},e.prototype.nextB=function(r){this._oneComplete&&this._a.length===0?this.emit(!1):(this._b.push(r),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0},e}(V),HC=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.parent=n,i}return e.prototype._next=function(r){this.parent.nextB(r)},e.prototype._error=function(r){this.parent.error(r),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(V);function VC(){return new ke}function UC(){return function(t){return eu()(mr(VC)(t))}}function zC(t,e,r){var n;return t&&typeof t=="object"?n=t:n={bufferSize:t,windowTime:e,refCount:!1,scheduler:r},function(i){return i.lift(qC(n))}}function qC(t){var e=t.bufferSize,r=e===void 0?Number.POSITIVE_INFINITY:e,n=t.windowTime,i=n===void 0?Number.POSITIVE_INFINITY:n,s=t.refCount,o=t.scheduler,a,c=0,u,l=!1,f=!1;return function(g){c++;var v;!a||l?(l=!1,a=new nu(r,i,o),v=a.subscribe(this),u=g.subscribe({next:function(C){a.next(C)},error:function(C){l=!0,a.error(C)},complete:function(){f=!0,u=void 0,a.complete()}}),f&&(u=void 0)):v=a.subscribe(this),this.add(function(){c--,v.unsubscribe(),v=void 0,u&&!f&&s&&c===0&&(u.unsubscribe(),u=void 0,a=void 0)})}}function GC(t){return function(e){return e.lift(new JC(t,e))}}var JC=function(){function t(e,r){this.predicate=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new QC(e,this.predicate,this.source))},t}(),QC=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.source=i,s.seenValue=!1,s.index=0,s}return e.prototype.applySingleValue=function(r){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=r)},e.prototype._next=function(r){var n=this.index++;this.predicate?this.tryNext(r,n):this.applySingleValue(r)},e.prototype.tryNext=function(r,n){try{this.predicate(r,n,this.source)&&this.applySingleValue(r)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){var r=this.destination;this.index>0?(r.next(this.seenValue?this.singleValue:void 0),r.complete()):r.error(new di)},e}(V);function ZC(t){return function(e){return e.lift(new YC(t))}}var YC=function(){function t(e){this.total=e}return t.prototype.call=function(e,r){return r.subscribe(new KC(e,this.total))},t}(),KC=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.count=0,i}return e.prototype._next=function(r){++this.count>this.total&&this.destination.next(r)},e}(V);function XC(t){return function(e){return e.lift(new ex(t))}}var ex=function(){function t(e){if(this._skipCount=e,this._skipCount<0)throw new on}return t.prototype.call=function(e,r){return this._skipCount===0?r.subscribe(new V(e)):r.subscribe(new tx(e,this._skipCount))},t}(),tx=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return e.prototype._next=function(r){var n=this._skipCount,i=this._count++;
38if(i<n)this._ring[i]=r;else{var s=i%n,o=this._ring,a=o[s];o[s]=r,this.destination.next(a)}},e}(V);function rx(t){return function(e){return e.lift(new nx(t))}}var nx=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){return r.subscribe(new ix(e,this.notifier))},t}(),ix=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;i.hasValue=!1;var s=new me(i);i.add(s),i.innerSubscription=s;var o=_e(n,s);return o!==s&&(i.add(o),i.innerSubscription=o),i}return e.prototype._next=function(r){this.hasValue&&t.prototype._next.call(this,r)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(we);function sx(t){return function(e){return e.lift(new ox(t))}}var ox=function(){function t(e){this.predicate=e}return t.prototype.call=function(e,r){return r.subscribe(new ax(e,this.predicate))},t}(),ax=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.predicate=n,i.skipping=!0,i.index=0,i}return e.prototype._next=function(r){var n=this.destination;this.skipping&&this.tryCallPredicate(r),this.skipping||n.next(r)},e.prototype.tryCallPredicate=function(r){try{var n=this.predicate(r,this.index++);this.skipping=!!n}catch(i){this.destination.error(i)}},e}(V);function cx(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return Qe(r)?(t.pop(),function(n){return Un(t,n,r)}):function(n){return Un(t,n)}}var ux=function(t){I(e,t);function e(r,n,i){n===void 0&&(n=0),i===void 0&&(i=$i);var s=t.call(this)||this;return s.source=r,s.delayTime=n,s.scheduler=i,(!an(n)||n<0)&&(s.delayTime=0),(!i||typeof i.schedule!="function")&&(s.scheduler=$i),s}return e.create=function(r,n,i){return n===void 0&&(n=0),i===void 0&&(i=$i),new e(r,n,i)},e.dispatch=function(r){var n=r.source,i=r.subscriber;return this.add(n.subscribe(i))},e.prototype._subscribe=function(r){var n=this.delayTime,i=this.source,s=this.scheduler;return s.schedule(e.dispatch,n,{source:i,subscriber:r})},e}(X);function lx(t,e){return e===void 0&&(e=0),function(n){return n.lift(new fx(t,e))}}var fx=function(){function t(e,r){this.scheduler=e,this.delay=r}return t.prototype.call=function(e,r){return new ux(r,this.delay,this.scheduler).subscribe(e)},t}();function zn(t,e){return typeof e=="function"?function(r){return r.pipe(zn(function(n,i){return jt(t(n,i)).pipe(ot(function(s,o){return e(n,s,i,o)}))}))}:function(r){return r.lift(new hx(t))}}var hx=function(){function t(e){this.project=e}return t.prototype.call=function(e,r){return r.subscribe(new dx(e,this.project))},t}(),dx=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.project=n,i.index=0,i}return e.prototype._next=function(r){var n,i=this.index++;try{n=this.project(r,i)}catch(s){this.destination.error(s);return}this._innerSub(n)},e.prototype._innerSub=function(r){var n=this.innerSubscription;n&&n.unsubscribe();var i=new me(this),s=this.destination;s.add(i),this.innerSubscription=_e(r,i),this.innerSubscription!==i&&s.add(this.innerSubscription)},e.prototype._complete=function(){var r=this.innerSubscription;(!r||r.closed)&&t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(r){this.destination.next(r)},e}(we);function px(){return zn(Yt)}function bx(t,e){return e?zn(function(){return t},e):zn(function(){return t})}function gx(t){return function(e){return e.lift(new yx(t))}}var yx=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){var n=new vx(e),i=_e(this.notifier,new me(n));return i&&!n.seenValue?(n.add(i),r.subscribe(n)):n},t}(),vx=function(t){I(e,t);function e(r){var n=t.call(this,r)||this;return n.seenValue=!1,n}return e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(we);function mx(t,e){return e===void 0&&(e=!1),function(r){return r.lift(new wx(t,e))}}var wx=function(){function t(e,r){this.predicate=e,this.inclusive=r}return t.prototype.call=function(e,r){return r.subscribe(new _x(e,this.predicate,this.inclusive))},t}(),_x=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.inclusive=i,s.index=0,s}return e.prototype._next=function(r){var n=this.destination,i;try{i=this.predicate(r,this.index++)}catch(s){n.error(s);return}this.nextOrComplete(r,i)},e.prototype.nextOrComplete=function(r,n){var i=this.destination;n?i.next(r):(this.inclusive&&i.next(r),i.complete())},e}(V);function Sx(t,e,r){return function(i){return i.lift(new Ex(t,e,r))}}var Ex=function(){function t(e,r,n){this.nextOrObserver=e,this.error=r,this.complete=n}return t.prototype.call=function(e,r){return r.subscribe(new Cx(e,this.nextOrObserver,this.error,this.complete))},t}(),Cx=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o._tapNext=St,o._tapError=St,o._tapComplete=St,o._tapError=i||St,o._tapComplete=s||St,nn(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||St,o._tapError=n.error||St,o._tapComplete=n.complete||St),o}return e.prototype._next=function(r){try{this._tapNext.call(this._context,r)}catch(n){this.destination.error(n);return}this.destination.next(r)},e.prototype._error=function(r){try{this._tapError.call(this._context,r)}catch(n){this.destination.error(n);return}this.destination.error(r)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(r){this.destination.error(r);return}return this.destination.complete()},e}(V),xp={leading:!0,trailing:!1};function xx(t,e){return e===void 0&&(e=xp),function(r){return r.lift(new Ix(t,!!e.leading,!!e.trailing))}}var Ix=function(){function t(e,r,n){this.durationSelector=e,this.leading=r,this.trailing=n}return t.prototype.call=function(e,r){return r.subscribe(new Rx(e,this.durationSelector,this.leading,this.trailing))},t}(),Rx=function(t){I(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.destination=r,o.durationSelector=n,o._leading=i,o._trailing=s,o._hasValue=!1,o}return e.prototype._next=function(r){this._hasValue=!0,this._sendValue=r,this._throttled||(this._leading?this.send():this.throttle(r))},e.prototype.send=function(){var r=this,n=r._hasValue,i=r._sendValue;n&&(this.destination.next(i),this.throttle(i)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(r){var n=this.tryDurationSelector(r);n&&this.add(this._throttled=_e(n,new me(this)))},e.prototype.tryDurationSelector=function(r){try{return this.durationSelector(r)}catch(n){return this.destination.error(n),null}},e.prototype.throttlingDone=function(){var r=this,n=r._throttled,i=r._trailing;n&&n.unsubscribe(),this._throttled=void 0,i&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(we);function Ax(t,e,r){return e===void 0&&(e=Ve),r===void 0&&(r=xp),function(n){return n.lift(new Mx(t,e,r.leading,r.trailing))}}var Mx=function(){function t(e,r,n,i){this.duration=e,this.scheduler
38=r,this.leading=n,this.trailing=i}return t.prototype.call=function(e,r){return r.subscribe(new Tx(e,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Tx=function(t){I(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.duration=n,a.scheduler=i,a.leading=s,a.trailing=o,a._hasTrailingValue=!1,a._trailingValue=null,a}return e.prototype._next=function(r){this.throttled?this.trailing&&(this._trailingValue=r,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(kx,this.duration,{subscriber:this})),this.leading?this.destination.next(r):this.trailing&&(this._trailingValue=r,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var r=this.throttled;r&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),r.unsubscribe(),this.remove(r),this.throttled=null)},e}(V);function kx(t){var e=t.subscriber;e.clearThrottle()}function Ox(t){return t===void 0&&(t=Ve),function(e){return ou(function(){return e.pipe(Ji(function(r,n){var i=r.current;return{value:n,current:t.now(),last:i}},{current:t.now(),value:void 0,last:void 0}),ot(function(r){var n=r.current,i=r.last,s=r.value;return new Nx(s,n-i)}))})}}var Nx=function(){function t(e,r){this.value=e,this.interval=r}return t}();function Ip(t,e,r){return r===void 0&&(r=Ve),function(n){var i=_p(t),s=i?+t-r.now():Math.abs(t);return n.lift(new Lx(s,i,e,r))}}var Lx=function(){function t(e,r,n,i){this.waitFor=e,this.absoluteTimeout=r,this.withObservable=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new Px(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Px=function(t){I(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.absoluteTimeout=n,a.waitFor=i,a.withObservable=s,a.scheduler=o,a.scheduleTimeout(),a}return e.dispatchTimeout=function(r){var n=r.withObservable;
38r._unsubscribeAndRecycle(),r.add(_e(n,new me(r)))},e.prototype.scheduleTimeout=function(){var r=this.action;r?this.action=r.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(r){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,r)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(we);function $x(t,e){return e===void 0&&(e=Ve),Ip(t,ru(new Ud),e)}function Dx(t){return t===void 0&&(t=Ve),ot(function(e){return new Bx(e,t.now())})}var Bx=function(){function t(e,r){this.value=e,this.timestamp=r}return t}();function jx(t,e,r){return r===0?[e]:(t.push(e),t)}function Fx(){return qs(jx,[])}function Wx(t){return function(r){return r.lift(new Hx(t))}}var Hx=function(){function t(e){this.windowBoundaries=e}return t.prototype.call=function(e,r){var n=new Vx(e),i=r.subscribe(n);return i.closed||n.add(_e(this.windowBoundaries,new me(n))),i},t}(),Vx=function(t){I(e,t);function e(r){var n=t.call(this,r)||this;return n.window=new ke,r.next(n.window),n}return e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(r){this._error(r)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(r){this.window.next(r)},e.prototype._error=function(r){this.window.error(r),this.destination.error(r)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var r=this.window;r&&r.complete();var n=this.destination,i=this.window=new ke;n.next(i)},e}(we);function Ux(t,e){return e===void 0&&(e=0),function(n){return n.lift(new zx(t,e))}}var zx=function(){function t(e,r){this.windowSize=e,this.startWindowEvery=r}return t.prototype.call=function(e,r){return r.subscribe(new qx(e,this.windowSize,this.startWindowEvery))},t}(),qx=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.destination=r,s.windowSize=n,s.startWindowEvery=i,s.windows=[new ke],s.count=0,r.next(s.windows[0]),s}return e.prototype._next=function(r){for(var n=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,i=this.destination,s=this.windowSize,o=this.windows,a=o.length,c=0;c<a&&!this.closed;c++)o[c].next(r);var u=this.count-s+1;if(u>=0&&u%n===0&&!this.closed&&o.shift().complete(),++this.count%n===0&&!this.closed){var l=new ke;o.push(l),i.next(l)}},e.prototype._error=function(r){var n=this.windows;if(n)for(;n.length>0&&!this.closed;)n.shift().error(r);this.destination.error(r)},e.prototype._complete=function(){var r=this.windows;if(r)for(;r.length>0&&!this.closed;)r.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(V);function Gx(t){var e=Ve,r=null,n=Number.POSITIVE_INFINITY;return Qe(arguments[3])&&(e=arguments[3]),Qe(arguments[2])?e=arguments[2]:an(arguments[2])&&(n=Number(arguments[2])),Qe(arguments[1])?e=arguments[1]:an(arguments[1])&&(r=Number(arguments[1])),function(s){return s.lift(new Jx(t,r,n,e))}}var Jx=function(){function t(e,r,n,i){this.windowTimeSpan=e,this.windowCreationInterval=r,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new Zx(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),Qx=function(t){I(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._numberOfNextedValues=0,r}return e.prototype.next=function(r){this._numberOfNextedValues++,t.prototype.next.call(this,r)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(ke),Zx=function(t){I(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;a.destination=r,a.windowTimeSpan=n,a.windowCreationInterval=i,a.maxWindowSize=s,a.scheduler=o,a.windows=[];var c=a.openWindow();if(i!==null&&i>=0){var u={subscriber:a,window:c,context:null},l={windowTimeSpan:n,windowCreationInterval:i,subscriber:a,scheduler:o};a.add(o.schedule(Rp,n,u)),a.add(o.schedule(Kx,i,l))}else{var f={subscriber:a,window:c,windowTimeSpan:n};a.add(o.schedule(Yx,n,f))}return a}return e.prototype._next=function(r){for(var n=this.windows,i=n.length,s=0;s<i;s++){var o=n[s];o.closed||(o.next(r),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(r){for(var n=this.windows;n.length>0;)n.shift().error(r);this.destination.error(r)},e.prototype._complete=function(){for(var r=this.windows;r.length>0;){var n=r.shift();n.closed||n.complete()}this.destination.complete()},e.prototype.openWindow=function(){var r=new Qx;this.windows.push(r);var n=this.destination;return n.next(r),r},e.prototype.closeWindow=function(r){r.complete();var n=this.windows;n.splice(n.indexOf(r),1)},e}(V);function Yx(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function Kx(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,i=t.windowCreationInterval,s=r.openWindow(),o=this,a={action:o,subscription:null},c={subscriber:r,window:s,context:a};a.subscription=n.schedule(Rp,e,c),o.add(a.subscription),o.schedule(t,i)}function Rp(t){var e=t.subscriber,r=t.window,n=t.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),e.closeWindow(r)}function Xx(t,e){return function(r){return r.lift(new eI(t,e))}}var eI=function(){function t(e,r){this.openings=e,this.closingSelector=r}return t.prototype.call=function(e,r){return r.subscribe(new tI(e,this.openings,this.closingSelector))},t}(),tI=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;
38return s.openings=n,s.closingSelector=i,s.contexts=[],s.add(s.openSubscription=Bt(s,n,n)),s}return e.prototype._next=function(r){var n=this.contexts;if(n)for(var i=n.length,s=0;s<i;s++)n[s].window.next(r)},e.prototype._error=function(r){var n=this.contexts;if(this.contexts=null,n)for(var i=n.length,s=-1;++s<i;){var o=n[s];o.window.error(r),o.subscription.unsubscribe()}t.prototype._error.call(this,r)},e.prototype._complete=function(){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var s=r[i];s.window.complete(),s.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var s=r[i];s.window.unsubscribe(),s.subscription.unsubscribe()}},e.prototype.notifyNext=function(r,n,i,s,o){if(r===this.openings){var a=void 0;try{var c=this.closingSelector;a=c(n)}catch(g){return this.error(g)}var u=new ke,l=new ve,f={window:u,subscription:l};this.contexts.push(f);var h=Bt(this,a,f);h.closed?this.closeWindow(this.contexts.length-1):(h.context=f,l.add(h)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(r))},e.prototype.notifyError=function(r){this.error(r)},e.prototype.notifyComplete=function(r){r!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(r.context))},e.prototype.closeWindow=function(r){if(r!==-1){var n=this.contexts,i=n[r],s=i.window,o=i.subscription;n.splice(r,1),s.complete(),o.unsubscribe()}},e}(Ar);function rI(t){return function(r){return r.lift(new nI(t))}}var nI=function(){function t(e){this.closingSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new iI(e,this.closingSelector))},t}(),iI=function(t){I(e,t);function e(r,n){var i=t.call(this,r)||this;return i.destination=r,i.closingSelector=n,i.openWindow(),i}return e.prototype.notifyNext=function(r,n,i,s,o){this.openWindow(o)},e.prototype.notifyError=function(r){this._error(r)},e.prototype.notifyComplete=function(r){this.openWindow(r)},e.prototype._next=function(r){this.window.next(r)},e.prototype._error=function(r){this.window.error(r),this.destination.error(r),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(r){r===void 0&&(r=null),r&&(this.remove(r),r.unsubscribe());var n=this.window;n&&n.complete();var i=this.window=new ke;this.destination.next(i);var s;try{var o=this.closingSelector;s=o()}catch(a){this.destination.error(a),this.window.error(a);return}this.add(this.closingNotification=Bt(this,s))},e}(Ar);function sI(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){var n;typeof t[t.length-1]=="function"&&(n=t.pop());var i=t;return r.lift(new oI(i,n))}}var oI=function(){function t(e,r){this.observables=e,this.project=r}return t.prototype.call=function(e,r){return r.subscribe(new aI(e,this.observables,this.project))},t}(),aI=function(t){I(e,t);function e(r,n,i){var s=t.call(this,r)||this;s.observables=n,s.project=i,s.toRespond=[];var o=n.length;s.values=new Array(o);for(var a=0;a<o;a++)s.toRespond.push(a);for(var a=0;a<o;a++){var c=n[a];s.add(Bt(s,c,void 0,a))}return s}return e.prototype.notifyNext=function(r,n,i){this.values[i]=n;var s=this.toRespond;if(s.length>0){var o=s.indexOf(i);o!==-1&&s.splice(o,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(r){if(this.toRespond.length===0){var n=[r].concat(this.values);this.project?this._tryProject(n):this.destination.next(n)}},e.prototype._tryProject=function(r){var n;try{n=this.project.apply(this,r)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(Ar);function cI(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(n){return n.lift.call(sp.apply(void 0,[n].concat(t)))}}function uI(t){return function(e){return e.lift(new op(t))}}const lI=Object.freeze(Object.defineProperty({__proto__:null,audit:vp,auditTime:l4,buffer:f4,bufferCount:p4,bufferTime:v4,bufferToggle:E4,bufferWhen:I4,catchError:M4,combineAll:O4,combineLatest:N4,concat:L4,concatAll:Zd,concatMap:wp,concatMapTo:P4,count:$4,debounce:j4,debounceTime:H4,defaultIfEmpty:bi,delay:J4,delayWhen:K4,dematerialize:r5,distinct:s5,distinctUntilChanged:Sp,distinctUntilKeyChanged:l5,elementAt:g5,endWith:y5,every:v5,exhaust:_5,exh
38austMap:Ep,expand:I5,filter:Xt,finalize:M5,find:O5,findIndex:L5,first:P5,flatMap:VE,groupBy:YS,ignoreElements:$5,isEmpty:j5,last:U5,map:ot,mapTo:z5,materialize:J5,max:X5,merge:eC,mergeAll:su,mergeMap:vr,mergeMapTo:tC,mergeScan:rC,min:sC,multicast:mr,observeOn:aE,onErrorResumeNext:aC,pairwise:lC,partition:dC,pluck:pC,publish:gC,publishBehavior:yC,publishLast:vC,publishReplay:mC,race:wC,reduce:qs,refCount:eu,repeat:_C,repeatWhen:EC,retry:IC,retryWhen:MC,sample:OC,sampleTime:PC,scan:Ji,sequenceEqual:jC,share:UC,shareReplay:zC,single:GC,skip:ZC,skipLast:XC,skipUntil:rx,skipWhile:sx,startWith:cx,subscribeOn:lx,switchAll:px,switchMap:zn,switchMapTo:bx,take:yu,takeLast:Gi,takeUntil:gx,takeWhile:mx,tap:Sx,throttle:xx,throttleTime:Ax,throwIfEmpty:zs,timeInterval:Ox,timeout:$x,timeoutWith:Ip,timestamp:Dx,toArray:Fx,window:Wx,windowCount:Ux,windowTime:Gx,windowToggle:Xx,windowWhen:rI,withLatestFrom:sI,zip:cI,zipAll:uI},Symbol.toStringTag,{value:"Module"})),vu=wr(lI);var Gs={},tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.ClientMessagePublishEvent=tt.ClientMessageSetSessionConfig=tt.ClientMessageGetSessionConfig=tt.ClientMessageIsLinked=tt.ClientMessageHostSession=void 0;function fI(t){return Object.assign({type:"HostSession"},t)}tt.ClientMessageHostSession=fI;function hI(t){return Object.assign({type:"IsLinked"},t)}tt.ClientMessageIsLinked=hI;function dI(t){return Object.assign({type:"GetSessionConfig"},t)}tt.ClientMessageGetSessionConfig=dI;function pI(t){return Object.assign({type:"SetSessionConfig"},t)}tt.ClientMessageSetSessionConfig=pI;function bI(t){return Object.assign({type:"PublishEvent"},t)}tt.ClientMessagePublishEvent=bI;var Ap={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const e=Ts,r=vu;var n;(function(s){s[s.DISCONNECTED=0]="DISCONNECTED",s[s.CONNECTING=1]="CONNECTING",s[s.CONNECTED=2]="CONNECTED"})(n=t.ConnectionState||(t.ConnectionState={}));class i{constructor(o,a=WebSocket){this.WebSocketClass=a,this.webSocket=null,this.connectionStateSubject=new e.BehaviorSubject(n.DISCONNECTED),this.incomingDataSubject=ne
38w e.Subject,this.url=o.replace(/^http/,"ws")}connect(){return this.webSocket?(0,e.throwError)(new Error("webSocket object is not null")):new e.Observable(o=>{let a;try{this.webSocket=a=new this.WebSocketClass(this.url)}catch(c){o.error(c);return}this.connectionStateSubject.next(n.CONNECTING),a.onclose=c=>{this.clearWebSocket(),o.error(new Error(`websocket error ${c.code}: ${c.reason}`)),this.connectionStateSubject.next(n.DISCONNECTED)},a.onopen=c=>{o.next(),o.complete(),this.connectionStateSubject.next(n.CONNECTED)},a.onmessage=c=>{this.incomingDataSubject.next(c.data)}}).pipe((0,r.take)(1))}disconnect(){const{webSocket:o}=this;if(o){this.clearWebSocket(),this.connectionStateSubject.next(n.DISCONNECTED);try{o.close()}catch{}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,r.flatMap)(o=>{let a;try{a=JSON.parse(o)}catch{return(0,e.empty)()}return(0,e.of)(a)}))}sendData(o){const{webSocket:a}=this;if(!a)throw new Error("websocket is not connected");a.send(o)}clearWebSocket(){const{webSocket:o}=this;o&&(this.webSocket=null,o.onclose=null,o.onerror=null,o.onmessage=null,o.onopen=null)}}t.RxWebSocket=i})(Ap);var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.isServerMessageFail=void 0;function gI(t){return t&&t.type==="Fail"&&typeof t.id=="number"&&typeof t.sessionId=="string"&&typeof t.error=="string"}Js.isServerMessageFail=gI;Object.defineProperty(Gs,"__esModule",{value:!0});Gs.WalletSDKConnection=void 0;const ct=Ts,ne=vu,Mn=hn,Dr=Kn,Tn=tt,kn=ln,Ti=Ap,Da=Js,Lf=1e4,yI=6e4;class vI{constructor(e,r,n,i,s=WebSocket){this.sessionId=e,this.sessionKey=r,this.diagnostic=i,this.subscriptions=new ct.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Dr.IntNumber)(1),this.connectedSubject=ne
38w ct.BehaviorSubject(!1),this.linkedSubject=new ct.BehaviorSubject(!1),this.sessionConfigSubject=new ct.ReplaySubject(1);const o=new Ti.RxWebSocket(n+"/rpc",s);this.ws=o,this.subscriptions.add(o.connectionState$.pipe((0,ne.tap)(a=>{var c;return(c=this.diagnostic)===null||c===void 0?void 0:c.log(kn.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Mn.Session.hash(e)})}),(0,ne.skip)(1),(0,ne.filter)(a=>a===Ti.ConnectionState.DISCONNECTED&&!this.destroyed),(0,ne.delay)(5e3),(0,ne.filter)(a=>!this.destroyed),(0,ne.flatMap)(a=>o.connect()),(0,ne.retry)()).subscribe()),this.subscriptions.add(o.connectionState$.pipe((0,ne.skip)(2),(0,ne.switchMap)(a=>(0,ct.iif)(()=>a===Ti.ConnectionState.CONNECTED,this.authenticate().pipe((0,ne.tap)(c=>this.sendIsLinked()),(0,ne.tap)(c=>this.sendGetSessionConfig()),(0,ne.map)(c=>!0)),(0,ct.of)(!1))),(0,ne.distinctUntilChanged)(),(0,ne.catchError)(a=>(0,ct.of)(!1))).subscribe(a=>this.connectedSubject.next(a))),this.subscriptions.add(o.connectionState$.pipe((0,ne.skip)(1),(0,ne.switchMap)(a=>(0,ct.iif)(()=>a===Ti.ConnectionState.CONNECTED,(0,ct.timer)(0,Lf)))).subscribe(a=>a===0?this.updateLastHeartbeat():this.heartbeat())),this.subscriptions.add(o.incomingData$.pipe((0,ne.filter)(a=>a==="h")).subscribe(a=>this.updateLastHeartbeat())),this.subscriptions.add(o.incomingJSONData$.pipe((0,ne.filter)(a=>["IsLinkedOK","Linked"].includes(a.type))).subscribe(a=>{var c;const u=a;(c=this.diagnostic)===null||c===void 0||c.log(kn.EVENTS.LINKED,{sessionIdHash:Mn.Session.hash(e),linked:u.linked,type:a.type,onlineGuests:u.onlineGuests}),this.linkedSubject.next(u.linked||u.onlineGuests>0)})),this.subscriptions.add(o.incomingJSONData$.pipe((0,ne.filter)(a=>["GetSessionConfigOK","SessionConfigUpdated"].includes(a.type))).subscribe(a=>{var c;const u=a;(c=this.diagnostic)===null||c===void 0||c.log(kn.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Mn.Session.hash(e),metadata_keys:u&&u.metadata?Object.keys(u.metadata):void 0}),this.sessionConfigSubject.next({webhookId:u.webhookId,webhookUrl:u.webhookUrl,metadata:u.metadata})}))}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(kn.EVENTS.STARTED_CONNECTING,{sessionIdHash:Mn.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(kn.EVENTS.DISCONNECTED,{sessionIdHash:Mn.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,ne.filter)(e=>e),(0,ne.take)(1),(0,ne.map)(()=>{}))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,ne.filter)(e=>e),(0,ne.take)(1),(0,ne.map)(()=>{}))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,ne.filter)(e=>{if(e.type!=="Event")return!1;const r=e;return typeof r.sessionId=="string"&&typeof r.eventId=="string"&&typeof r.event=="string"&&typeof r.data=="string"}),(0,ne.map)(e=>e))}setSessionMetadata(e,r){const n=(0,Tn.ClientMessageSetSessionConfig)({id:(0,Dr.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:r}});return this.onceConnected$.pipe((0,ne.flatMap)(i=>this.makeRequest(n)),(0,ne.map)(i=>{if((0,Da.isServerMessageFail)(i))throw new Error(i.error||"failed to set session metadata")}))}publishEvent(e,r,n=!1){const i=(0,Tn.ClientMessagePublishEvent)({id:(0,Dr.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:r,callWebhook:n});return this.onceLinked$.pipe((0,ne.flatMap)(s=>this.makeRequest(i)),(0,ne.map)(s=>{if((0,Da.isServerMessageFail)(s))throw new Error(s.error||"failed to publish event");return s.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Lf*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}
38makeRequest(e,r=yI){const n=e.id;try{this.sendData(e)}catch(i){return(0,ct.throwError)(i)}return this.ws.incomingJSONData$.pipe((0,ne.timeoutWith)(r,(0,ct.throwError)(new Error(`request ${n} timed out`))),(0,ne.filter)(i=>i.id===n),(0,ne.take)(1))}authenticate(){const e=(0,Tn.ClientMessageHostSession)({id:(0,Dr.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,ne.map)(r=>{if((0,Da.isServerMessageFail)(r))throw new Error(r.error||"failed to authentcate")}))}sendIsLinked(){const e=(0,Tn.ClientMessageIsLinked)({id:(0,Dr.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,Tn.ClientMessageGetSessionConfig)({id:(0,Dr.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}Gs.WalletSDKConnection=vI;var cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.decrypt=cn.encrypt=void 0;const Qi=W;async function mI(t,e){if(e.length!==64)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",(0,Qi.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},n,i.encode(t)),o=16,a=s.slice(s.byteLength-o),c=s.slice(0,s.byteLength-o),u=new Uint8Array(a),l=new Uint8Array(c),f=new Uint8Array([...r,...u,...l]);return(0,Qi.uint8ArrayToHex)(f)}cn.encrypt=mI;function wI(t,e){if(e.length!==64)throw Error("secret must be 256 bits");return new Promise((r,n)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,Qi.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=(0,Qi.hexStringToUint8Array)(t),o=s.slice(0,12),a=s.slice(12,28),c=s.slice(28),u=new Uint8Array([...c,...a]),l={name:"AES-GCM",iv:new Uint8Array(o)};try{const f=await window.crypto.subtle.decrypt(l,i,u),h=new TextDecoder;r(h.decode(f))}catch(f){n(f)}})()})}cn.decrypt=wI;var Qs={},Zs={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,function(e){e.SESSION_ID_REQUEST="SESSION_ID_REQUEST",e.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",e.LINKED="LINKED",e.UNLINKED="UNLINKED",e.WEB3_REQUEST="WEB3_REQUEST",e.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",e.WEB3_RESPONSE="WEB3_RESPONSE"}(t.RelayMessageType||(t.RelayMessageType={}))})(Zs);Object.defineProperty(Qs,"__esModule",{value:!0});Qs.Web3RequestCanceledMessage=void 0;const _I=Zs;function SI(t){return{type:_I.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}Qs.Web3RequestCanceledMessage=SI;var Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.Web3RequestMessage=void 0;const EI=Zs;function CI(t){return Object.assign({type:EI.RelayMessageType.WEB3_REQUEST},t)}Ys.Web3RequestMessage=CI;var un={};Object.defineProperty(un,"__esModule",{value:!0});un.isWeb3ResponseMessage=un.Web3ResponseMessage=void 0;const Mp=Zs;function xI(t){return Object.assign({type:Mp.RelayMessageType.WEB3_RESPONSE},t)}un.Web3ResponseMessage=xI;function II(t){return t&&t.type===Mp.RelayMessageType.WEB3_RESPONSE}un.isWeb3ResponseMessage=II;var RI=j&&j.__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]}),AI=j&&j.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Tp=j&&j.__decorate||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},MI=j&&j.__importStar||function(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)&&RI(e,t,r);return AI(e,t),e},TI=j&&j.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.WalletSDKRelay=void 0;const kp=TI(Us),sr=Ts,Ce=vu,$e=ln,kI=Gs,Br=qn,OI=Kn,be=W,Ht=MI(cn),Vt=hn,ki=ht,Oe=rs,NI=Qs,LI=Ys,Xe=de,ze=un;class ft extends ki.WalletSDKRelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallback=null,this.dappDefaultChainSubject=ne
38w sr.BehaviorSubject(1),this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.subscriptions=new sr.Subscription,this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:i,connection:s}=this.subscribe();if(this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this.diagnostic={log:e.eventListener.onEvent}:this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){this.subscriptions.add(this.dappDefaultChainSubject.subscribe(i=>{this.dappDefaultChain!==i&&(this.dappDefaultChain=i)}));const e=Vt.Session.load(this.storage)||new Vt.Session(this.storage).save(),r=new kI.WalletSDKConnection(e.id,e.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(r.sessionConfig$.subscribe({next:i=>{this.onSessionConfigChanged(i)},error:()=>{var i;
38(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(r.incomingEvent$.pipe((0,Ce.filter)(i=>i.event==="Web3Response")).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(r.linked$.pipe((0,Ce.skip)(1),(0,Ce.tap)(i=>{var s;this.isLinked=i;const o=this.storage.getItem(ki.LOCAL_STORAGE_ADDRESSES_KEY);if(i&&(this.session.linked=i),this.isUnlinkedErrorState=!1,o){const a=o.split(" "),c=this.storage.getItem("IsStandaloneSigning")==="true";if(a[0]!==""&&!i&&this.session.linked&&!c){this.isUnlinkedErrorState=!0;const u=this.getSessionIdHash();(s=this.diagnostic)===null||s===void 0||s.log($e.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:u})}}})).subscribe()),this.subscriptions.add(r.sessionConfig$.pipe((0,Ce.filter)(i=>!!i.metadata&&i.metadata.__destroyed==="1")).subscribe(()=>{var i;const s=r.isDestroyed;return(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:s,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()})),this.subscriptions.add(r.sessionConfig$.pipe((0,Ce.filter)(i=>i.metadata&&i.metadata.WalletUsername!==void 0)).pipe((0,Ce.mergeMap)(i=>Ht.decrypt(i.metadata.WalletUsername,e.secret))).subscribe({next:i=>{this.storage.setItem(ki.WALLET_USER_NAME_KEY,i)},error:()=>{var i;
38(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,Ce.filter)(i=>i.metadata&&i.metadata.AppVersion!==void 0)).pipe((0,Ce.mergeMap)(i=>Ht.decrypt(i.metadata.AppVersion,e.secret))).subscribe({next:i=>{this.storage.setItem(ki.APP_VERSION_KEY,i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,Ce.filter)(i=>i.metadata&&i.metadata.ChainId!==void 0&&i.metadata.JsonRpcUrl!==void 0)).pipe((0,Ce.mergeMap)(i=>(0,sr.zip)(Ht.decrypt(i.metadata.ChainId,e.secret),Ht.decrypt(i.metadata.JsonRpcUrl,e.secret)))).pipe((0,Ce.distinctUntilChanged)()).subscribe({next:([i,s])=>{this.chainCallback&&this.chainCallback(i,s)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,Ce.filter)(i=>i.metadata&&i.metadata.EthereumAddress!==void 0)).pipe((0,Ce.mergeMap)(i=>Ht.decrypt(i.metadata.EthereumAddress,e.secret))).subscribe({next:i=>{this.accountsCallback&&this.accountsCallback([i]),ft.accountRequestCallbackIds.size>0&&(Array.from(ft.accountRequestCallbackIds.values()).forEach(s=>{const o=(0,ze.Web3ResponseMessage)({id:s,response:(0,Xe.RequestEthereumAccountsResponse)([i])});this.invokeCallback(Object.assign(Object.assign({},o),{id:s}))}),ft.accountRequestCallbackIds.clear())},error:()=>{var i;
38(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,Ce.filter)(i=>i.metadata&&i.metadata.AppSrc!==void 0)).pipe((0,Ce.mergeMap)(i=>Ht.decrypt(i.metadata.AppSrc,e.secret))).subscribe({next:i=>{this.ui.setAppSrc(i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log($e.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appSrc"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:e,connected$:r.connected$,chainId$:this.dappDefaultChainSubject});return r.connect(),{session:e,ui:n,connection:r}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,Ce.timeout)(1e3),(0,Ce.catchError)(e=>(0,sr.of)(null))).subscribe(e=>{var r,n,i;const s=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch{(r=this.diagnostic)===null||r===void 0||r.log($e.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}(n=this.diagnostic)===null||n===void 0||n.log($e.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=Vt.Session.load(this.storage);if((o==null?void 0:o.id)===this._session.id?this.storage.clear():o&&((i=this.diagnostic)===null||i===void 0||i.log($e.
38EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:Vt.Session.hash(o.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0),this.subscriptions=new sr.Subscription;const{session:a,ui:c,connection:u}=this.subscribe();this._session=a,this.connection=u,this.ui=c,s&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()},e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log($e.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:Oe.Web3Method.signEthereumMessage,params:{message:(0,be.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:Oe.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,be.hexStringFromBuffer)(e,!0),signature:(0,be.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:Oe.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,be.bigIntStringFromBN)(e.weiValue),data:(0,be.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,be.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,be.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,be.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,be.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:Oe.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,be.bigIntStringFromBN)(e.weiValue),data:(0,be.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,be.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,be.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,be.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,be.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:Oe.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,be.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:Oe.Web3Method.scanQRCode,params:{regExp:e}})}getQRCodeUrl(){return(0,be.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:Oe.Web3Method.generic,params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null;const n=(0,be.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r==null||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==null||r(),c.errorMessage)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.dappDefaultChainSubject.next(e)}publishWeb3RequestEvent(e,r){var n;const i=(0,LI.Web3RequestMessage)({id:e,request:r}),s=Vt.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log($e.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${i.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?Vt.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",i,!0).subscribe({next:o=>{var a;
38(a=this.diagnostic)===null||a===void 0||a.log($e.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${i.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?Vt.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()})},error:o=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:i.id,response:{method:i.request.method,errorMessage:o.message}}))}}))}publishWeb3RequestCanceledEvent(e){const r=(0,NI.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",r,!1).subscribe())}publishEvent(e,r,n){const i=this.session.secret;return new sr.Observable(s=>{Ht.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin})),i).then(o=>{s.next(o),s.complete()})}).pipe((0,Ce.mergeMap)(s=>this.connection.publishEvent(e,s,n)))}handleIncomingEvent(e){try{this.subscriptions.add((0,sr.from)(Ht.decrypt(e.data,this.session.secret)).pipe((0,Ce.map)(r=>JSON.parse(r))).subscribe({next:r=>{const n=(0,ze.isWeb3ResponseMessage)(r)?r:null;n&&this.handleWeb3ResponseMessage(n)},error:()=>{var r;(r=this.diagnostic)===null||r===void 0||r.log($e.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch{return}}handleWeb3ResponseMessage(e){var r;const{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log($e.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,Xe.isRequestEthereumAccountsResponse)(n)){ft.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),ft.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var s;const o=(s=n==null?void 0:n.message)!==null&&s!==void 0?s:(0,Br.standardErrorMessage)(i);this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:e,response:{method:r,errorMessage:o,errorCode:i}
38}))}invokeCallback(e){const r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:Oe.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,be.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,s)};return{promise:new Promise((s,o)=>{var a;this.relayEventManager.callbacks.set(r,u=>{if(this.ui.hideRequestEthereumAccounts(),u.errorMessage)return o(new Error(u.errorMessage));s(u)});const c=((a=window==null?void 0:window.navigator)===null||a===void 0?void 0:a.userAgent)||null;if(c&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(c)){let u;try{(0,be.isInIFrame)()&&window.top?u=window.top.location:u=window.location}catch{u=window.location}u.href=`https://www.coinbase.com/connect-dapp?uri=${encodeURIComponent(u.href)}`;return}if(this.ui.inlineAccountsResponse()){const u=l=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:r,response:(0,Xe.RequestEthereumAccountsResponse)(l)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:u})}else{const u=Br.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(u)})}ft.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,e)}),cancel:n}}selectProvider(e){const r={method:Oe.Web3Method.selectProvider,params:{providerOptions:e}},n=(0,be.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},s=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,l=>{if(l.errorMessage)return a(new Error(l.errorMessage));o(l)});const c=l=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:n,response:(0,Xe.SelectProviderResponse)(OI.ProviderType.Unselected)}))},u=l=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:n,response:(0,Xe.SelectProviderResponse)(l)}))};this.ui.selectProvider&&this.ui.selectProvider({onApprove:u,onCancel:c,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,r,n,i,s,o){const a={method:Oe.Web3Method.watchAsset,params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:o}};let c=null;const u=(0,be.randomBytesHex)(8),l=h=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,h),c==null||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload}));const f=new Promise((h,g)=>{this.relayEventManager.callbacks.set(u,S=>{if(c==null||c(),S.errorMessage)return g(new Error(S.errorMessage));h(S)});const v=S=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:u,response:(0,Xe.WatchAssetReponse)(!1)}))},C=()=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:u,response:(0,Xe.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:C,onCancel:v,type:e,address:r,symbol:n,decimals:i,image:s,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)});return{cancel:l,promise:f}}addEthereumChain(e,r,n,i,s,o){const a={method:Oe.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}};let c=null;const u=(0,be.randomBytesHex)(8),l=h=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,h),c==null||c()};return this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{promise:new Promise((h,g)=>{this.relayEventManager.callbacks.set(u,S=>{if(c==null||c(),S.errorMessage)return g(new Error(S.errorMessage));h(S)});const v=S=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:u,response:(0,Xe.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},C=S=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:u,response:(0,Xe.AddEthereumChainResponse)({isApproved:!0,rpcUrl:S})}))};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:v,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:l}}switchEthereumChain(e,r){const n={method:Oe.Web3Method.switchEthereumChain,params:Object.assign({chainId:e},{address:r})},i=(0,be.randomBytesHex)(8),s=a=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,a)};return{promise:new Promise((a,c)=>{this.relayEventManager.callbacks.set(i,f=>{if((0,Xe.isErrorResponse)(f)&&f.errorCode)return c(Br.standardErrors.provider.custom({code:f.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if(f.errorMessage)return c(new Error(f.errorMessage));a(f)});const u=f=>{var h;if(f){const g=(h=(0,Br.getErrorCode)(f))!==null&&h!==void 0?h:Br.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,Oe.Web3Method.switchEthereumChain,f instanceof Error?f:Br.standardErrors.provider.unsupportedChain(e),g)}else this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:i,response:(0,Xe.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},l=f=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:i,response:(0,Xe.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:f})}))};this.ui.switchEthereumChain({onCancel:u,onApprove:l,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 Vt.Session.hash(this._session.id)}sendRequestStandalone(e,r){const n=s=>{this.handleErrorResponse(e,r.method,s)},i=s=>{this.handleWeb3ResponseMessage((0,ze.Web3ResponseMessage)({id:e,response:s}))};switch(r.method){case Oe.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case Oe.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case Oe.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case Oe.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}onSessionConfigChanged(e){}}ft.accountRequestCallbackIds=new Set;Tp([kp.default],ft.prototype,"resetAndReload",null);Tp([kp.default],ft.prototype,"handleIncomingEvent",null);Vs.WalletSDKRelay=ft;var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.WalletSDKRelayEventManager=void 0;const PI=W;class $I{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,r=(0,PI.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}}Ks.WalletSDKRelayEventManager=$I;Object.defineProperty(jn,"__esModule",{value:!0});jn.CoinbaseWalletSDK=void 0;const DI=Ki,BI=Xi,jI=es,FI=Qr,WI=Rs,HI=Vs,VI=Ks,UI=W,Op=fn;class Xs{constructor(e){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||BI.LINK_API_URL;let o;if(e.uiConstructor?o=e.uiConstructor:o=u=>new WI.WalletSDKUI(u),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,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this._diagnosticLogger={log:e.eventListener.onEvent}:this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const a=new URL(s),c=`${a.protocol}//${a.host}`;this._storage=new jI.ScopedLocalStorage(`-walletlink:${c}`),this._storage.setItem("version",Xs.VERSION),!(this.walletExtension||this.coinbaseBrowser)&&(this._relayEventManager=new VI.WalletSDKRelayEventManager,this._relay=new HI.WalletSDKRelay({linkAPIUrl:s,version:Op.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:o,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect}),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI())}makeWeb3Provider(e="",r=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new FI.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,UI.getFavicon)();const 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;const r=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,DI.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{const 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}}jn.CoinbaseWalletSDK=Xs;Xs.VERSION=Op.LIB_VERSION;
38(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const e=jn,r=Qr;var n=jn;Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=Qr;Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),t.default=e.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=e.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=e.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})(fc);const zI=Pp(fc),tR=Bp({__proto__:null,default:zI},[fc]);export{tR as i};

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