1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[62],{940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;let n=BigInt(0x100000000-1),r=BigInt(32);function a(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function i(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:s,l:o}=a(e[i],t);[n[i],r[i]]=[s,o]}return[n,r]}t.fromBig=a,t.split=i;let s=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=s;let o=(e,t,n)=>e>>>n;t.shrSH=o;let c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;let u=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=u;let l=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=l;let d=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=d;let p=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=p;let h=(e,t)=>t;t.rotr32H=h;let f=(e,t)=>e;t.rotr32L=f;let m=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=m;let y=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=y;let g=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=g;let b=(e,t,n)=>e<<n-32|t>>>64-n;function w(e,t,n,r){let a=(t>>>0)+(r>>>0);return{h:e+n+(a/0x100000000|0)|0,l:0|a}}t.rotlBL=b,t.add=w;let v=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=v;let _=(e,t,n,r)=>t+n+r+(e/0x100000000|0)|0;t.add3H=_;let x=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=x;let k=(e,t,n,r,a)=>t+n+r+a+(e/0x100000000|0)|0;t.add4H=k;let E=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0);t.add5L=E;let A=(e,t,n,r,a,i)=>t+n+r+a+i+(e/0x100000000|0)|0;t.add5H=A,t.default={fromBig:a,split:i,toBig:s,shrSH:o,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:d,rotrBL:p,rotr32H:h,rotr32L:f,rotlSH:m,rotlSL:y,rotlBH:g,rotlBL:b,add:w,add3L:v,add3H:_,add4L:x,add4H:k,add5H:A,add5L:E}},8363:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},16701:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;let r=n(86265),a=n(940),i=n(53311),s=[],o=[],c=[],u=BigInt(0),l=BigInt(1),d=BigInt(2),p=BigInt(7),h=BigInt(256),f=BigInt(113);for(let e=0,t=l,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],s.push(2*(5*r+n)),o.push((e+1)*(e+2)/2%64);let a=u;for(let e=0;e<7;e++)(t=(t<<l^(t>>p)*f)%h)&d&&(a^=l<<(l<<BigInt(e))-l);c.push(a)}let[m,y]=(0,a.split)(c,!0),g=(e,t,n)=>n>32?(0,a.rotlBH)(e,t,n):(0,a.rotlSH)(e,t,n),b=(e,t,n)=>n>32?(0,a.rotlBL)(e,t,n):(0,a.rotlSL)(e,t,n);function w(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,a=(t+2)%10,i=n[a],s=n[a+1],o=g(i,s,1)^n[r],c=b(i,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=o,e[t+n+1]^=c}let t=e[2],a=e[3];for(let n=0;n<24;n++){let r=o[n],i=g(t,a,r),c=b(t,a,r),u=s[n];t=e[u],a=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=m[r],e[1]^=y[r]}n.fill(0)}t.keccakP=w;class v extends i.Hash{constructor(e,t,n,a=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=a,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.number)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){i.isLE||(0,i.byteSwap32)(this.state32),w(this.state32,this.rounds),i.isLE||(0,i.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r.exists)(this);let{blockLen:t,state:n}=this,a=(e=(0,i.toBytes)(e)).length;for(let r=0;r<a;){let i=Math.min(t-this.pos,a-r);for(let t=0;t<i;t++)n[this.pos++]^=e[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,r.exists)(this,!1),(0,r.bytes)(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,a=e.length;r<a;){this.posOut>=n&&this.keccak();let i=Math.min(n-this.posOut,a-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.output)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:a,enableXOF:i}=this;return e||(e=new v(t,n,r,i,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=v;
vendor: 4,199 bytes, line 1
1let _=(e,t,n)=>(0,i.wrapConstructor)(()=>new v(t,e,n));t.sha3_224=_(6,144,28),t.sha3_256=_(6,136,32),t.sha3_384=_(6,104,48),t.sha3_512=_(6,72,64),t.keccak_224=_(1,144,28),t.keccak_256=_(1,136,32),t.keccak_384=_(1,104,48),t.keccak_512=_(1,72,64);let x=(e,t,n)=>(0,i.wrapXOFConstructorWithOpts)((r={})=>new v(t,e,void 0===r.dkLen?n:r.dkLen,!0));t.shake128=x(31,168,16),t.shake256=x(31,136,32)},43849:(e,t,n)=>{var r=n(81029).hp;let a=n(86217),i=n(53559),s={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},o={encodeData(e,t,n,s=!0){let o=["bytes32"],c=[this.hashType(e,n)];if(s){let u=(e,t,o)=>{if(void 0!==n[t])return["bytes32",null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":a.keccak(this.encodeData(t,o,n,s))];if(void 0===o)throw Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",a.keccak(o)];if("string"===t)return"string"==typeof o&&(o=r.from(o,"utf8")),["bytes32",a.keccak(o)];if(t.lastIndexOf("]")===t.length-1){let n=t.slice(0,t.lastIndexOf("[")),r=o.map(t=>u(e,n,t));return["bytes32",a.keccak(i.rawEncode(r.map(([e])=>e),r.map(([,e])=>e)))]}return[t,o]};for(let r of n[e]){let[e,n]=u(r.name,r.type,t[r.name]);o.push(e),c.push(n)}}else for(let i of n[e]){let e=t[i.name];if(void 0!==e)if("bytes"===i.type)o.push("bytes32"),e=a.keccak(e),c.push(e);else if("string"===i.type)o.push("bytes32"),"string"==typeof e&&(e=r.from(e,"utf8")),e=a.keccak(e),c.push(e);else if(void 0!==n[i.type])o.push("bytes32"),e=a.keccak(this.encodeData(i.type,e,n,s)),c.push(e);else if(i.type.lastIndexOf("]")===i.type.length-1)throw Error("Arrays currently unimplemented in encodeData");else o.push(i.type),c.push(e)}return i.rawEncode(o,c)},encodeType(e,t){let n="",r=this.findTypeDependencies(e,t).filter(t=>t!==e);for(let a of r=[e].concat(r.sort())){if(!t[a])throw Error("No type definition specified: "+a);n+=a+"("+t[a].map(({name:e,type:t})=>t+" "+e).join(",")+")"}return n},findTypeDependencies(e,t,n=[]){if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;for(let r of(n.push(e),t[e]))for(let e of this.findTypeDependencies(r.type,t,n))n.includes(e)||n.push(e);return n},hashStruct(e,t,n,r=!0){return a.keccak(this.encodeData(e,t,n,r))},hashType(e,t){return a.keccak(this.encodeType(e,t))},sanitizeData(e){let t={};for(let n in s.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){let n=this.sanitizeData(e),i=[r.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,t)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,t)),a.keccak(r.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){let t=Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;let n=e.map(function(e){return"bytes"===e.type?a.toBuffer(e.value):e.value}),r=e.map(function(e){return e.type}),s=e.map(function(e){if(!e.name)throw t;return e.type+" "+e.name});return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(Array(e.length).fill("string"),s),i.soliditySHA3(r,n)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}},53311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;let r=n(8363),a=n(86265);t.isBytes=function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name},t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>
1new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.rotl=(e,t)=>e<<t|e>>>32-t>>>0,t.isLE=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],t.byteSwap=e=>e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255,t.byteSwapIfBE=t.isLE?e=>e:e=>(0,t.byteSwap)(e),t.byteSwap32=function(e){for(let n=0;n<e.length;n++)e[n]=(0,t.byteSwap)(e[n])};let i=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));t.bytesToHex=function(e){(0,a.bytes)(e);let t="";for(let n=0;n<e.length;n++)t+=i[e[n]];return t};let s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function o(e){return e>=s._0&&e<=s._9?e-s._0:e>=s._A&&e<=s._F?e-(s._A-10):e>=s._a&&e<=s._f?e-(s._a-10):void 0}async function c(e,n,r){let a=Date.now();for(let i=0;i<e;i++){r(i);let e=Date.now()-a;e>=0&&e<n||(await (0,t.nextTick)(),a+=e)}}function u(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function l(e){return"string"==typeof e&&(e=u(e)),(0,a.bytes)(e),e}t.hexToBytes=function(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,a=0;t<n;t++,a+=2){let n=o(e.charCodeAt(a)),i=o(e.charCodeAt(a+1));if(void 0===n||void 0===i)throw Error('hex string expected, got non-hex character "'+(e[a]+e[a+1])+'" at index '+a);r[t]=16*n+i}return r},t.nextTick=async()=>{},t.asyncLoop=c,t.utf8ToBytes=u,t.toBytes=l,t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];(0,a.bytes)(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let a=e[t];n.set(a,r),r+=a.length}return n};class d{clone(){return this._cloneInto()}}t.Hash=d;let p={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==p.call(t))throw Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){let t=t=>e().update(l(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){let t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){let t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}},53559:(e,t,n)=>{var r=n(81029).hp;let a=n(86217);function i(e){if(e.startsWith("int["))return"int256"+e.slice(3);if("int"===e)return"int256";if(e.startsWith("uint["))return"uint256"+e.slice(4);if("uint"===e)return"uint256";if(e.startsWith("fixed["))return"fixed128x128"+e.slice(5);else if("fixed"===e)return"fixed128x128";else if(e.startsWith("ufixed["))return"ufixed128x128"+e.slice(6);else if("ufixed"===e)return"ufixed128x128";return e}function s(e){return Number.parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function o(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10)]}function c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":Number.parseInt(t[2],10):null}function u(e){var t=typeof e;if("string"===t||"number"===t)return BigInt(e);if("bigint"===t)return e;throw Error("Argument is not a number")}function l(e,t){if("address"===e)return l("uint160",u(t));if("bool"===e)return l("uint8",+!!t);if("string"===e)return l("bytes",new r(t,"utf8"));if((h=e).lastIndexOf("]")===h.length-1){if(void 0===t.length)throw Error("Not an array?");if("dynamic"!==(n=c(e))&&0!==n&&t.length>n)throw Error("Elements exceed array size: "+n);for(p in d=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)d.push(l(e,t[p]));if("dynamic"===n){var n,i,d,p,h,f=l("uint256",t.length);d.unshift(f)}return r.concat(d)}else if("bytes"===e)return t=new r(t),d=r.concat([l("uint256",t.length),t]),t.length%32!=0&&(d=r.concat([d,a.zeros(32-t.length%32)])),d;else if(e.startsWith("bytes")){if((n=s(e))<1||n>32)throw Error("Invalid bytes<N> width: "+n);return a.setLengthRight(t,32)}else if(e.startsWith("uint")){if((n=s(e))%8||n<8||n>256)throw Error("Invalid uint<N> width: "+n);i=u(t);let r=a.bitLengthFromBigInt(i);if(r>n)throw Error("Supplied uint exceeds width: "+n+" vs "+r);if(i<0)throw Error("Supplied uint is negative");return a.bufferBEFromBigInt(i,32)}else if(e.startsWith("int")){if((n=s(e))%8||n<8||n>256)throw Error("Invalid int<N> width: "+n);i=u(t);let r=a.bitLengthFromBigInt(i);if(r>n)throw Error("Supplied int exceeds width: "+n+" vs "+r);let o=a.twosFromBigInt(i,256);return a.bufferBEFromBigInt(o,32)}else if(e.startsWith("ufixed")){if(n=o(e),(i=u(t))<0)throw Error("Supplied ufixed is negative");return l("uint256",i*BigInt(2)**BigInt(n[1]))}else if(e.startsWith("fixed"))return n=o(e),l("int256",u(t)*BigInt(2)**BigInt(n[1]));throw Error("Unsupported or invalid type: "+e)}function d(e,t){if(e.length!==t.length)throw Error("Number of types are not matching the values");for(var n,o,c=[],l=0;l<e.length;l++){var d=i(e[l]),p=t[l];if("bytes"===d)c.push(p);else if("string"===d)c.push(new r(p,"utf8"));else if("bool"===d)c.push(new r(p?"01":"00","hex"));else if("address"===d)c.push(a.setLength(p,20));else if(d.startsWith("bytes")){if((n=s(d))<1||n>32)throw Error("Invalid bytes<N> width: "+n);c.push(a.setLengthRight(p,n))}else if(d.startsWith("uint")){if((n=s(d))%8||n<8||n>256)throw Error("Invalid uint<N> width: "+n);o=u(p);let e=a.bitLengthFromBigInt(o);if(e>n)throw Error("Supplied uint exceeds width: "+n+" vs "+e);c.push(a.bufferBEFromBigInt(o,n/8))}else if(d.startsWith("int")){if((n=s(d))%8||n<8||n>256)throw Error("Invalid int<N> width: "+n);o=u(p);let e=a.bitLengthFromBigInt(o);if(e>n)throw Error("Supplied int exceeds width: "+n+" vs "+e);let t=a.twosFromBigInt(o,n);c.push(a.bufferBEFromBigInt(t,n/8))}else throw Error("Unsupported or invalid type: "+d)}return r.concat(c)}e.exports={rawEncode:function(e,t){var n=[],a=[],s=32*e.length;for(var o in e){var u=i(e[o]),d=l(u,t[o]);"string"===u||"bytes"===u||"dynamic"===c(u)?(n.push(l("uint256",s)),a.push(d),s+=d.length):n.push(d)}return r.concat(n.concat(a))},solidityPack:d,soliditySHA3:function(e,t){return a.keccak(d(e,t))}}}
vendor: 4,292 bytes, line 1
1,80062:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CoinbaseWalletSDK:()=>s6,createCoinbaseWalletSDK:()=>s8,default:()=>s7,getCryptoKeyAccount:()=>iv,removeCryptoKey:()=>i_});var r,a={};function i(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let a=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(a):a(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}n.r(a),n.d(a,{aK:()=>rC,e8:()=>rp,DO:()=>rd,dJ:()=>rO,OG:()=>rP,My:()=>rf,Ph:()=>rv,lX:()=>r_,Id:()=>rA,fg:()=>rL,qj:()=>rE,aT:()=>rw,r4:()=>rI,aY:()=>rl,x:()=>rD,lq:()=>rx,z:()=>rk,zW:()=>rm,Q5:()=>rN});let s=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>s(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>s(t)(e)}}},o=e=>{let t,n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,a,i);return i},c=e=>e?o(e):o,u="4.3.6",l="@coinbase/wallet-sdk",d=c(((e,t)=>(n,r,a)=>{let o,c={storage:i(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=new Set,d=new Set,p=c.storage;if(!p)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),n(...e)},r,a);let h=()=>{let e=c.partialize({...r()});return p.setItem(c.name,{state:e,version:c.version})},f=a.setState;a.setState=(e,t)=>{f(e,t),h()};let m=e((...e)=>{n(...e),h()},r,a);a.getInitialState=()=>m;let y=()=>{var e,t;if(!p)return;u=!1,l.forEach(e=>{var t;return e(null!=(t=r())?t:m)});let a=(null==(t=c.onRehydrateStorage)?void 0:t.call(c,null!=(e=r())?e:m))||void 0;return s(p.getItem.bind(p))(c.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===c.version)return[!1,e.state];else{if(c.migrate){let t=c.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[a,i]=e;if(n(o=c.merge(i,null!=(t=r())?t:m),!0),a)return h()}).then(()=>{null==a||a(o,void 0),o=r(),u=!0,d.forEach(e=>e(o))}).catch(e=>{null==a||a(void 0,e)})};return a.persist={setOptions:e=>{c={...c,...e},e.storage&&(p=e.storage)},clearStorage:()=>{null==p||p.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},c.skipHydration||y(),o||m})((...e)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(()=>({chains:[]}))(...e)),(()=>({keys:{}}))(...e)),(()=>({account:{}}))(...e)),(()=>({subAccount:void 0}))(...e)),(()=>({spendPermissions:[]}))(...e)),(()=>({config:{version:u}}))(...e)),(()=>({subAccountConfig:{}}))(...e)),{name:"cbwsdk.store",storage:i(()=>localStorage),partialize:e=>({chains:e.chains,keys:e.keys,account:e.account,subAccount:e.subAccount,spendPermissions:e.spendPermissions,config:e.config})})),p={get:()=>d.getState().config,set:e=>{d.setState(t=>({config:Object.assign(Object.assign({},t.config),e)}))}},h=Object.assign(Object.assign({},d),{subAccounts:{get:()=>d.getState().subAccount,set:e=>{d.setState(t=>({subAccount:t.subAccount?Object.assign(Object.assign({},t.subAccount),e):Object.assign({address:e.address},e)}))},clear:()=>{d.setState({subAccount:void 0})}},subAccountsConfig:{get:()=>d.getState().subAccountConfig,set:e=>{d.setState(t=>({subAccountConfig:Object.assign(Object.assign({},t.subAccountConfig),e)}))},clear:()=>{d.setState({subAccountConfig:{}})}},spendPermissions:{get:()=>d.getState().spendPermissions,set:e=>{d.setState({spendPermissions:e})},clear:()=>{d.setState({spendPermissions:[]})}},account:{get:()=>d.getState().account,set:e=>{d.setState(t=>({account:Object.assign(Object.assign({},t.account),e)}))},clear:()=>{d.setState({account:{}})}},chains:{get:()=>d.getState().chains,set:e=>{d.setState({chains:e})},clear:()=>{d.setState({chains:[]})}},keys:{get:e=>d.getState().keys[e],set:(e,t)=>{d.setState(n=>
1({keys:Object.assign(Object.assign({},n.keys),{[e]:t})}))},clear:()=>{d.setState({keys:{}})}},config:p}),f=()=>
vendor: 84,143 bytes, line 1
1new Promise((e,t)=>{if(window.ClientAnalytics)return e();try{let t=document.createElement("script");t.textContent='!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClientAnalytics=t():e.ClientAnalytics=t()}(this,(function(){return(()=>{var e={792:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},562:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(i>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\\/]/gi,"");for(var n=[],r=0,i=0;r<e.length;i=++r%4)0!=i&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}},e.exports=n},335:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},762:(e,t,n)=>{var r,i,a,o,s;r=n(562),i=n(792).utf8,a=n(335),o=n(792).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):i.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=1732584193,l=-271733879,d=-1732584194,p=271733878,m=0;m<n.length;m++)n[m]=16711935&(n[m]<<8|n[m]>>>24)|4278255360&(n[m]<<24|n[m]>>>8);n[c>>>5]|=128<<c%32,n[14+(c+64>>>9<<4)]=c;var f=s._ff,v=s._gg,g=s._hh,b=s._ii;for(m=0;m<n.length;m+=16){var h=u,w=l,y=d,T=p;u=f(u,l,d,p,n[m+0],7,-680876936),p=f(p,u,l,d,n[m+1],12,-389564586),d=f(d,p,u,l,n[m+2],17,606105819),l=f(l,d,p,u,n[m+3],22,-1044525330),u=f(u,l,d,p,n[m+4],7,-176418897),p=f(p,u,l,d,n[m+5],12,1200080426),d=f(d,p,u,l,n[m+6],17,-1473231341),l=f(l,d,p,u,n[m+7],22,-45705983),u=f(u,l,d,p,n[m+8],7,1770035416),p=f(p,u,l,d,n[m+9],12,-1958414417),d=f(d,p,u,l,n[m+10],17,-42063),l=f(l,d,p,u,n[m+11],22,-1990404162),u=f(u,l,d,p,n[m+12],7,1804603682),p=f(p,u,l,d,n[m+13],12,-40341101),d=f(d,p,u,l,n[m+14],17,-1502002290),u=v(u,l=f(l,d,p,u,n[m+15],22,1236535329),d,p,n[m+1],5,-165796510),p=v(p,u,l,d,n[m+6],9,-1069501632),d=v(d,p,u,l,n[m+11],14,643717713),l=v(l,d,p,u,n[m+0],20,-373897302),u=v(u,l,d,p,n[m+5],5,-701558691),p=v(p,u,l,d,n[m+10],9,38016083),d=v(d,p,u,l,n[m+15],14,-660478335),l=v(l,d,p,u,n[m+4],20,-405537848),u=v(u,l,d,p,n[m+9],5,568446438),p=v(p,u,l,d,n[m+14],9,-1019803690),d=v(d,p,u,l,n[m+3],14,-187363961),l=v(l,d,p,u,n[m+8],20,1163531501),u=v(u,l,d,p,n[m+13],5,-1444681467),p=v(p,u,l,d,n[m+2],9,-51403784),d=v(d,p,u,l,n[m+7],14,1735328473),u=g(u,l=v(l,d,p,u,n[m+12],20,-1926607734),d,p,n[m+5],4,-378558),p=g(p,u,l,d,n[m+8],11,-2022574463),d=g(d,p,u,l,n[m+11],16,1839030562),l=g(l,d,p,u,n[m+14],23,-35309556),u=g(u,l,d,p,n[m+1],4,-1530992060),p=g(p,u,l,d,n[m+4],11,1272893353),d=g(d,p,u,l,n[m+7],16,-155497632),l=g(l,d,p,u,n[m+10],23,-1094730640),u=g(u,l,d,p,n[m+13],4,681279174),p=g(p,u,l,d,n[m+0],11,-358537222),d=g(d,p,u,l,n[m+3],16,-722521979),l=g(l,d,p,u,n[m+6],23,76029189),u=g(u,l,d,p,n[m+9],4,-640364487),p=g(p,u,l,d,n[m+12],11,-421815835),d=g(d,p,u,l,n[m+15],16,530742520),u=b(u,l=g(l,d,p,u,n[m+2],23,-995338651),d,p,n[m+0],6,-198630844),p=b(p,u,l,d,n[m+7],10,1126891415),d=b(d,p,u,l,n[m+14],15,-1416354905),l=b(l,d,p,u,n[m+5],21,-57434055),u=b(u,l,d,p,n[m+12],6,1700485571),p=b(p,u,l,d,n[m+3],10,-1894986606),d=b(d,p,u,l,n[m+10],15,-1051523),l=b(l,d,p,u,n[m+1],21,-2054922799),u=b(u,l,d,p,n[m+8],6,1873313359),p=b(p,u,l,d,n[m+15],10,-30611744),d=b(d,p,u,l,n[m+6],15,-1560198380),l=b(l,d,p,u,n[m+13],21,1309151649),u=b(u,l,d,p,n[m+4],6,-145523070),p=b(p,u,l,d,n[m+11],10,-1120210379),d=b(d,p,u,l,n[m+2],15,718787259),l=b(l,d,p,u,n[m+9],21,-343485551),u=u+h>>>0,l=l+w>>>0,d=d+y>>>0,p=p+T>>>0}return r.endian([u,l,d,p])})._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?o.bytesToString(n):r.bytesToHex(n)}},2:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Perfume:()=>ze,incrementUjNavigation:()=>Le,markStep:()=>Re,markStepOnce:()=>qe});var r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{},enableNavigationTracking:!0},o=window,s=o.console,c=o.navigator,u=o.performance,l=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},p="mark.",m=function(){return u&&!!u.getEntriesByType&&!!u.now&&!!u.mark},f="4g",v=!1,g={},b={value:0},h={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},w={value:0},y={value:0},T={},k={isHidden:!1,didChange:!1},_=function(){k.isHidden=!1,document.hidden&&(k.isHidden=document.hidden,k.didChange=!0)},S=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){s.warn("Perfume.js:",e)}return null},E=function(){return!!(d()&&d()<=4)||!!(l()&&l()<=4)},x=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return E()||t}},O=function(e){return parseFloat(e.toFixed(4))},j=function(e){return"number"!=typeof e?null:O(e/Math.pow(1024,2))},N=function(e,t,n,r,i){var s,u=function(){a.analyticsTracker&&(k.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:l()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:E(),isLowEndExperience:x(f,v)}:{},rating:n,navigationType:i}))};["CLS","INP"].includes(e)?u():(s=u,"requestIdleCallback"in o?o.requestIdleCallback(s,{timeout:3e3}):s())},I=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<b.value)){var t=e.duration-50;t>0&&(w.value+=t,y.value+=t)}}))};!function(e){e.instant="instant",e.quick="quick",e.moderate="moderate",e.slow="slow",e.unavoidable="unavoidable"}(r||(r={}));var P,M,B,C,D,A=((i={})[r.instant]={vitalsThresholds:[100,200],maxOutlierThreshold:1e4},i[r.quick]={vitalsThresholds:[200,500],maxOutlierThreshold:1e4},i[r.moderate]={vitalsThresholds:[500,1e3],maxOutlierThreshold:1e4},i[r.slow]={vitalsThresholds:[1e3,2e3],maxOutlierThreshold:1e4},i[r.unavoidable]={vitalsThresholds:[2e3,5e3],maxOutlierThreshold:2e4},i),L={RT:[100,200],TBT:[200,600],NTBT:[200,600]},U=function(e,t){return L[e]?t<=L[e][0]?"good":t<=L[e][1]?"needsImprovement":"poor":null},R=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=O(t[e]))})),N(e,t,null,n||{})},q=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value,o=e.navigationType;"FCP"===n&&(b.value=i),["FCP","LCP"].includes(n)&&!T[0]&&(T[0]=S("longtask",I)),"FID"===n&&setTimeout((function(){k.didChange||(q({attribution:t,name:"TBT",rating:U("TBT",w.value),value:w.value,navigationType:o}),R("dataConsumption",h.value))}),1e4);var s=O(i);s<=a.maxTime&&s>=0&&N(n,s,r,t,o)},F=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},z=function(e){if("loading"===document.readyState)return"loading";var t=F();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},K=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},$=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:K(r)+(r.className&&r.className.length?"."+r.className.replace(/\\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},Q=-1,W=function(){return Q},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Q=t.timeStamp,e(t))}),!0)},V=function(){var e=F();return e&&e.activationStart||0},J=function(e,t){var n=F(),r="navigate";return W()>=0?r="back-forward-cache":n&&(r=document.prerendering||V()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},X=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},G=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Z=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Y=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ee=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},te=-1,ne=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},re=function(e){"hidden"===document.visibilityState&&te>-1&&(te="visibilitychange"===e.type?e.timeStamp:0,ae())},ie=function(){addEventListener("visibilitychange",re,!0),addEventListener("prerenderingchange",re,!0)},ae=function(){removeEventListener("visibilitychange",re,!0),removeEventListener("prerenderingchange",re,!0)},oe=function(){return te<0&&(te=ne(),ie(),H((function(){setTimeout((function(){te=ne(),ie()}),0)}))),{get firstHiddenTime(){return te}}},se=function(e,t){t=t||{},ee((function(){var n,r=[1800,3e3],i=oe(),a=J("FCP"),o=X("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-V(),0),a.entries.push(e),n(!0)))}))}));o&&(n=Z(e,a,r,t.reportAllChanges),H((function(i){a=J("FCP"),n=Z(e,a,r,t.reportAllChanges),Y((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ce={passive:!0,capture:!0},ue=new Date,le=function(e,t){P||(P=t,M=e,B=new Date,me(removeEventListener),de())},de=function(){if(M>=0&&M<B-ue){var e={entryType:"first-input",name:P.type,target:P.target,cancelable:P.cancelable,startTime:P.timeStamp,processingStart:P.timeStamp+M};C.forEach((function(t){t(e)})),C=[]}},pe=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){le(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ce),removeEventListener("pointercancel",r,ce)};addEventListener("pointerup",n,ce),addEventListener("pointercancel",r,ce)}(t,e):le(t,e)}},me=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,pe,ce)}))},fe=0,ve=1/0,ge=0,be=function(e){e.forEach((function(e){e.interactionId&&(ve=Math.min(ve,e.interactionId),ge=Math.max(ge,e.interactionId),fe=ge?(ge-ve)/7+1:0)}))},he=function(){return D?fe:performance.interactionCount||0},we=0,ye=function(){return he()-we},Te=[],ke={},_e=function(e){var t=Te[Te.length-1],n=ke[e.interactionId];if(n||Te.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ke[r.id]=r,Te.push(r)}Te.sort((function(e,t){return t.latency-e.latency})),Te.splice(10).forEach((function(e){delete ke[e.id]}))}},Se={},Ee=function e(t){document.prerendering?ee((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},xe=function(e,t){t=t||{};var n=[800,1800],r=J("TTFB"),i=Z(e,r,n,t.reportAllChanges);Ee((function(){var a=F();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-V(),0),r.entries=[a],i(!0),H((function(){r=J("TTFB",0),(i=Z(e,r,n,t.reportAllChanges))(!0)}))}}))},Oe=function(e){e.forEach((function(e){e.identifier&&q({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},je=function(e){e.forEach((function(e){if(a.isResourceTiming&&R("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;h.value[e.initiatorType]+=t,h.value.total+=t}}))},Ne=function(){!function(e,t){xe((function(e){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),function(e){e.value>0&&q(e)}(e)}),t)}(0,a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},ee((function(){var e,n=[.1,.25],r=J("CLS"),i=-1,a=0,o=[],s=function(e){i>-1&&function(e){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:$(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:z(t.startTime)})}}var r;e.attribution={}}(e),function(e){q(e)}(e)}(e)},c=function(t){t.forEach((function(t){if(!t.hadRecentInput){var n=o[0],i=o[o.length-1];a&&t.startTime-i.startTime<1e3&&t.startTime-n.startTime<5e3?(a+=t.value,o.push(t)):(a=t.value,o=[t]),a>r.value&&(r.value=a,r.entries=o,e())}}))},u=X("layout-shift",c);u&&(e=Z(s,r,n,t.reportAllChanges),se((function(t){i=t.value,r.value<0&&(r.value=0,e())})),G((function(){c(u.takeRecords()),e(!0)})),H((function(){a=0,i=-1,r=J("CLS",0),e=Z(s,r,n,t.reportAllChanges),Y((function(){return e()}))})))}))}(0,t)}(0,a.reportOptions.cls),function(e,t){se((function(e){!function(e){if(e.entries.length){var t=F(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:z(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:z(W())}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.fcp),function(e,t){!function(e,t){t=t||{},ee((function(){var n,r=[100,300],i=oe(),a=J("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(a.value=e.processingStart-e.startTime,a.entries.push(e),n(!0))},s=function(e){e.forEach(o)},c=X("first-input",s);n=Z(e,a,r,t.reportAllChanges),c&&G((function(){s(c.takeRecords()),c.disconnect()}),!0),c&&H((function(){var i;a=J("FID"),n=Z(e,a,r,t.reportAllChanges),C=[],M=-1,P=null,me(addEventListener),i=o,C.push(i),de()}))}))}((function(e){!function(e){var t=e.entries[0];e.attribution={eventTarget:$(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:z(t.startTime)}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.fid),function(e,t){!function(e,t){t=t||{},ee((function(){var n,r=[2500,4e3],i=oe(),a=J("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-V(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},s=X("largest-contentful-paint",o);if(s){n=Z(e,a,r,t.reportAllChanges);var c=function(){Se[a.id]||(o(s.takeRecords()),s.disconnect(),Se[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),G(c,!0),H((function(i){a=J("LCP"),n=Z(e,a,r,t.reportAllChanges),Y((function(){a.value=performance.now()-i.timeStamp,Se[a.id]=!0,n(!0)}))}))}}))}((function(e){!function(e){if(e.entries.length){var t=F();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),s=Math.max(o,i?i.responseEnd-n:0),c=Math.max(s,r?r.startTime-n:0),u={element:$(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:s-o,elementRenderDelay:c-s,navigationEntry:t,lcpEntry:r};return r.url&&(u.url=r.url),i&&(u.lcpResourceEntry=i),void(e.attribution=u)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.lcp),function(e,t){!function(e,t){t=t||{},ee((function(){var n=[200,500];"interactionCount"in performance||D||(D=X("event",be,{type:"event",buffered:!0,durationThreshold:0}));var r,i=J("INP"),a=function(e){e.forEach((function(e){e.interactionId&&_e(e),"first-input"===e.entryType&&!Te.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&_e(e)}));var t,n=(t=Math.min(Te.length-1,Math.floor(ye()/50)),Te[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=X("event",a,{durationThreshold:t.durationThreshold||40});r=Z(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),G((function(){a(o.takeRecords()),i.value<0&&ye()>0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){Te=[],we=he(),i=J("INP"),r=Z(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:$(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:z(t.startTime)}}else e.attribution={}}(t),e(t)}),t)}((function(e){return q(e)}),a.reportOptions.inp),a.isResourceTiming&&S("resource",je),a.isElementTiming&&S("element",Oe)},Ie=function(e){var t="usageDetails"in e?e.usageDetails:{};R("storageEstimate",{quota:j(e.quota),usage:j(e.usage),caches:j(t.caches),indexedDB:j(t.indexedDB),serviceWorker:j(t.serviceWorkerRegistrations)})},Pe={finalMarkToStepsMap:{},startMarkToStepsMap:{},active:{},navigationSteps:{}},Me=function(e){delete Pe.active[e]},Be=function(){return Pe.navigationSteps},Ce=function(e){var t;return null!==(t=Be()[e])&&void 0!==t?t:{}},De=function(e,t,n){var r="step."+e,i=u.getEntriesByName(p+t).length>0;if(u.getEntriesByName(p+n).length>0&&a.steps){var o=A[a.steps[e].threshold],s=o.maxOutlierThreshold,c=o.vitalsThresholds;if(i){var l=u.measure(r,p+t,p+n),d=l.duration;if(d<=s){var m=function(e,t){return e<=t[0]?"good":e<=t[1]?"needsImprovement":"poor"}(d,c);d>=0&&(N("userJourneyStep",d,m,{stepName:e},void 0),u.measure("step.".concat(e,"_vitals_").concat(m),{start:l.startTime+l.duration,end:l.startTime+l.duration,detail:{type:"stepVital",duration:d}}))}}}},Ae=function(){var e=Be(),t=Pe.startMarkToStepsMap,n=Object.keys(e).length;if(0===n)return{};var r={},i=n-1,a=Ce(i);if(Object.keys(a).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))})),n>1){var o=Ce(i-1);Object.keys(o).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))}))}return r},Le=function(){var e,t=Object.keys(Pe.navigationSteps).length;Pe.navigationSteps[t]={};var n=Ae();null===(e=a.onMarkStep)||void 0===e||e.call(a,"",Object.keys(n))},Ue=function(e){var t,n,r,i,o,s,c;if(Pe.finalMarkToStepsMap[e]){!function(e){var t=Pe.navigationSteps,n=Pe.finalMarkToStepsMap,r=Object.keys(t).length;if(0!==r){var i=r-1,a=Ce(i);if(a&&n[e]){var o=n[e];o&&Object.keys(o).forEach((function(e){if(a[e]){var n=Ce(i)||{};n[e]=!1,t[i]=n}if(r>1){var o=i-1,s=Ce(o);s[e]&&(s[e]=!1,t[o]=s)}}))}}}(e);var u=Pe.finalMarkToStepsMap[e];Object.keys(u).forEach((function(t){var n=u[t];n.forEach(Me),Promise.all(n.map((function(n){return function(e,t,n,r){return new(n||(n=Promise))((function(e,t){function i(e){try{o(r.next(e))}catch(e){t(e)}}function a(e){try{o(r.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,a)}o((r=r.apply(undefined,[])).next())}))}(0,0,void 0,(function(){return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(r){switch(r.label){case 0:return[4,De(n,t,e)];case 1:return r.sent(),[2]}}))}))}))).catch((function(){}))}))}else r=e,i=Pe.navigationSteps,o=Object.keys(i).length,(c=Ce(s=(o>0?o:1)-1)||[])[r]=!0,i[s]=c,function(e){var t,n=null!==(t=Pe.startMarkToStepsMap[e])&&void 0!==t?t:[];Object.keys(n).forEach((function(e){Pe.active[e]||(Pe.active[e]=!0)}))}(e);if(a.enableNavigationTracking){var l=Ae();null===(t=a.onMarkStep)||void 0===t||t.call(a,e,Object.keys(l))}else null===(n=a.onMarkStep)||void 0===n||n.call(a,e,Object.keys(Pe.active))},Re=function(e){u.mark(p+e),Ue(e)},qe=function(e){0===u.getEntriesByName(p+e).length&&(u.mark(p+e),Ue(e))},Fe=0,ze=function(){function e(e){if(void 0===e&&(e={}),this.v="9.0.0-rc.3",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,a.steps=e.steps,a.onMarkStep=e.onMarkStep,a.enableNavigationTracking=e.enableNavigationTracking,m()){"PerformanceObserver"in o&&Ne(),void 0!==document.hidden&&document.addEventListener("visibilitychange",_);var t=function(){if(!m())return{};var e=u.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();R("navigationTiming",t),t.redirectTime&&q({attribution:{},name:"RT",rating:U("RT",t.redirectTime),value:t.redirectTime}),R("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(f=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ie),a.steps&&a.steps&&(Pe.startMarkToStepsMap={},Pe.finalMarkToStepsMap={},Pe.active={},Pe.navigationSteps={},Object.entries(a.steps).forEach((function(e){var t,n,r=e[0],i=e[1].marks,a=i[0],o=i[1],s=null!==(n=Pe.startMarkToStepsMap[a])&&void 0!==n?n:{};if(s[r]=!0,Pe.startMarkToStepsMap[a]=s,Pe.finalMarkToStepsMap[o]){var c=Pe.finalMarkToStepsMap[o][a]||[];c.push(r),Pe.finalMarkToStepsMap[o][a]=c}else Pe.finalMarkToStepsMap[o]=((t={})[a]=[r],t)})))}}return e.prototype.start=function(e){m()&&!g[e]&&(g[e]=!0,u.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),m()&&g[e]){u.mark("mark_".concat(e,"_end")),delete g[e];var r=function(e){u.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=u.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&R(e,O(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete g[e],u.clearMarks&&(u.clearMarks("mark_".concat(e,"_start")),u.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Fe),Fe=setTimeout((function(){e.end("ntbt",{},!1),q({attribution:{},name:"NTBT",rating:U("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}()},426:(e,t)=>{"use strict";Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator;var n={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r=Object.assign,i={};function a(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}function o(){}function s(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},o.prototype=a.prototype;var c=s.prototype=new o;c.constructor=s,r(c,a.prototype),c.isPureReactComponent=!0;Array.isArray,Object.prototype.hasOwnProperty;var u={current:null};t.useCallback=function(e,t){return u.current.useCallback(e,t)},t.useEffect=function(e,t){return u.current.useEffect(e,t)},t.useRef=function(e){return u.current.useRef(e)}},784:(e,t,n)=>{"use strict";e.exports=n(426)},353:function(e,t,n){var r;!function(i,a){"use strict";var o="function",s="undefined",c="object",u="string",l="major",d="model",p="name",m="type",f="vendor",v="version",g="architecture",b="console",h="mobile",w="tablet",y="smarttv",T="wearable",k="embedded",_="Amazon",S="Apple",E="ASUS",x="BlackBerry",O="Browser",j="Chrome",N="Firefox",I="Google",P="Huawei",M="LG",B="Microsoft",C="Motorola",D="Opera",A="Samsung",L="Sharp",U="Sony",R="Xiaomi",q="Zebra",F="Facebook",z="Chromium OS",K="Mac OS",$=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Q=function(e,t){return typeof e===u&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===u)return e=e.replace(/^\\s\\s*/,""),typeof t===s?e:e.substring(0,350)},V=function(e,t){for(var n,r,i,s,u,l,d=0;d<t.length&&!u;){var p=t[d],m=t[d+1];for(n=r=0;n<p.length&&!u&&p[n];)if(u=p[n++].exec(e))for(i=0;i<m.length;i++)l=u[++r],typeof(s=m[i])===c&&s.length>0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):a:this[s[0]]=l?s[1].call(this,l,s[2]):a:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):a):this[s]=l||a;d+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Q(t[n][r],e))return"?"===n?a:n}else if(Q(t[n],e))return"?"===n?a:n;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},G={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[v,[p,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[v,[p,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[p,v],[/opios[\\/ ]+([\\w\\.]+)/i],[v,[p,D+" Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[v,[p,D]],[/(kindle)\\/([\\w\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i,/(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i,/(?:ms|\\()(ie) ([\\w\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,/(heytap|ovi)browser\\/([\\d\\.]+)/i,/(weibo)__([\\d\\.]+)/i],[p,v],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[v,[p,"UC"+O]],[/microm.+\\bqbcore\\/([\\w\\.]+)/i,/\\bqbcore\\/([\\w\\.]+).+microm/i],[v,[p,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[v,[p,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[v,[p,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[v,[p,"IE"]],[/ya(?:search)?browser\\/([\\w\\.]+)/i],[v,[p,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[p,/(.+)/,"$1 Secure "+O],v],[/\\bfocus\\/([\\w\\.]+)/i],[v,[p,N+" Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[v,[p,D+" Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[v,[p,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[v,[p,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[v,[p,D+" Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[v,[p,"MIUI "+O]],[/fxios\\/([-\\w\\.]+)/i],[v,[p,N]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+O]],[/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],[[p,/(.+)/,"$1 "+O],v],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[p,/_/g," "],v],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[p,v],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i,/\\[(linkedin)app\\]/i],[p],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[p,F],v],[/(kakao(?:talk|story))[\\/ ]([\\w\\.]+)/i,/(naver)\\(.*?(\\d+\\.[\\w\\.]+).*\\)/i,/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[p,v],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[v,[p,"GSA"]],[/musical_ly(?:.+app_?version\\/|_)([\\w\\.]+)/i],[v,[p,"TikTok"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[v,[p,j+" Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[p,j+" WebView"],v],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[v,[p,"Android "+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[p,v],[/version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i],[v,[p,"Mobile Safari"]],[/version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i],[v,p],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[p,[v,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\\/([\\w\\.]+)/i],[p,v],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[p,"Netscape"],v],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[v,[p,N+" Reality"]],[/ekiohf.+(flow)\\/([\\w\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,/(firefox)\\/([\\w\\.]+)/i,/(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,/(links) \\(([\\w\\.]+)/i,/panasonic;(viera)/i],[p,v],[/(cobalt)\\/([\\w\\.]+)/i],[p,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,W]],[/((?:i[346]|x)86)[;\\)]/i],[[g,"ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[[g,"arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[[g,/ower/,"",W]],[/(sun4\\w)[;\\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[[g,W]]],device:[[/\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[f,A],[m,w]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|sc[g-]?[\\d]+a?|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[d,[f,A],[m,h]],[/(?:\\/|\\()(ip(?:hone|od)[\\w, ]*)(?:\\/|;)/i],[d,[f,S],[m,h]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[d,[f,S],[m,w]],[/(macintosh);/i],[d,[f,S]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[d,[f,L],[m,h]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[d,[f,P],[m,w]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i],[d,[f,P],[m,h]],[/\\b(poco[\\w ]+)(?: bui|\\))/i,/\\b; (\\w+) build\\/hm\\1/i,/\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i,/\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i,/\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i],[[d,/_/g," "],[f,R],[m,h]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[d,/_/g," "],[f,R],[m,w]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i],[d,[f,"OPPO"],[m,h]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[d,[f,"Vivo"],[m,h]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[d,[f,"Realme"],[m,h]],[/\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,/\\bmot(?:orola)?[- ](\\w*)/i,/((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i],[d,[f,C],[m,h]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[d,[f,C],[m,w]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[f,M],[m,w]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[d,[f,M],[m,h]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[d,[f,"Lenovo"],[m,w]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[d,/_/g," "],[f,"Nokia"],[m,h]],[/(pixel c)\\b/i],[d,[f,I],[m,w]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[d,[f,I],[m,h]],[/droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[d,[f,U],[m,h]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[d,"Xperia Tablet"],[f,U],[m,w]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[d,[f,"OnePlus"],[m,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[d,[f,_],[m,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[d,/(.+)/g,"Fire Phone $1"],[f,_],[m,h]],[/(playbook);[-\\w\\),; ]+(rim)/i],[d,f,[m,w]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[d,[f,x],[m,h]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[d,[f,E],[m,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[d,[f,E],[m,h]],[/(nexus 9)/i],[d,[f,"HTC"],[m,w]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\\.))|sony(?!-bra))[-_ ]?([-\\w]*)/i],[f,[d,/_/g," "],[m,h]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[d,[f,"Acer"],[m,w]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[d,[f,"Meizu"],[m,h]],[/(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,/(hp) ([\\w ]+\\w)/i,/(asus)-?(\\w+)/i,/(microsoft); (lumia[\\w ]+)/i,/(lenovo)[-_ ]?([-\\w]+)/i,/(jolla)/i,/(oppo) ?([\\w ]+) bui/i],[f,d,[m,h]],[/(kobo)\\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\/([\\w\\.]+)/i,/(nook)[\\w ]+build\\/(\\w+)/i,/(dell) (strea[kpr\\d ]*[\\dko])/i,/(le[- ]+pan)[- ]+(\\w{1,9}) bui/i,/(trinity)[- ]*(t\\d{3}) bui/i,/(gigaset)[- ]+(q\\w{1,9}) bui/i,/(vodafone) ([\\w ]+)(?:\\)| bui)/i],[f,d,[m,w]],[/(surface duo)/i],[d,[f,B],[m,w]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[d,[f,"Fairphone"],[m,h]],[/(u304aa)/i],[d,[f,"AT&T"],[m,h]],[/\\bsie-(\\w*)/i],[d,[f,"Siemens"],[m,h]],[/\\b(rct\\w+) b/i],[d,[f,"RCA"],[m,w]],[/\\b(venue[\\d ]{2,7}) b/i],[d,[f,"Dell"],[m,w]],[/\\b(q(?:mv|ta)\\w+) b/i],[d,[f,"Verizon"],[m,w]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[d,[f,"Barnes & Noble"],[m,w]],[/\\b(tm\\d{3}\\w+) b/i],[d,[f,"NuVision"],[m,w]],[/\\b(k88) b/i],[d,[f,"ZTE"],[m,w]],[/\\b(nx\\d{3}j) b/i],[d,[f,"ZTE"],[m,h]],[/\\b(gen\\d{3}) b.+49h/i],[d,[f,"Swiss"],[m,h]],[/\\b(zur\\d{3}) b/i],[d,[f,"Swiss"],[m,w]],[/\\b((zeki)?tb.*\\b) b/i],[d,[f,"Zeki"],[m,w]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[f,"Dragon Touch"],d,[m,w]],[/\\b(ns-?\\w{0,9}) b/i],[d,[f,"Insignia"],[m,w]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[d,[f,"NextBook"],[m,w]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],d,[m,h]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[f,"LvTel"],d,[m,h]],[/\\b(ph-1) /i],[d,[f,"Essential"],[m,h]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[d,[f,"Envizen"],[m,w]],[/\\b(trio[-\\w\\. ]+) b/i],[d,[f,"MachSpeed"],[m,w]],[/\\btu_(1491) b/i],[d,[f,"Rotor"],[m,w]],[/(shield[\\w ]+) b/i],[d,[f,"Nvidia"],[m,w]],[/(sprint) (\\w+)/i],[f,d,[m,h]],[/(kin\\.[onetw]{3})/i],[[d,/\\./g," "],[f,B],[m,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[d,[f,q],[m,w]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[d,[f,q],[m,h]],[/smart-tv.+(samsung)/i],[f,[m,y]],[/hbbtv.+maple;(\\d+)/i],[[d,/^/,"SmartTV"],[f,A],[m,y]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[f,M],[m,y]],[/(apple) ?tv/i],[f,[d,S+" TV"],[m,y]],[/crkey/i],[[d,j+"cast"],[f,I],[m,y]],[/droid.+aft(\\w)( bui|\\))/i],[d,[f,_],[m,y]],[/\\(dtv[\\);].+(aquos)/i,/(aquos-tv[\\w ]+)\\)/i],[d,[f,L],[m,y]],[/(bravia[\\w ]+)( bui|\\))/i],[d,[f,U],[m,y]],[/(mitv-\\w{5}) bui/i],[d,[f,R],[m,y]],[/Hbbtv.*(technisat) (.*);/i],[f,d,[m,y]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w\\+ ]*; *([\\w\\d][^;]*);([^;]*)/i],[[f,H],[d,H],[m,y]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[m,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,d,[m,b]],[/droid.+; (shield) bui/i],[d,[f,"Nvidia"],[m,b]],[/(playstation [345portablevi]+)/i],[d,[f,U],[m,b]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[d,[f,B],[m,b]],[/((pebble))app/i],[f,d,[m,T]],[/(watch)(?: ?os[,\\/]|\\d,\\d\\/)[\\d\\.]+/i],[d,[f,S],[m,T]],[/droid.+; (glass) \\d/i],[d,[f,I],[m,T]],[/droid.+; (wt63?0{2,3})\\)/i],[d,[f,q],[m,T]],[/(quest( 2| pro)?)/i],[d,[f,F],[m,T]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[f,[m,k]],[/(aeobc)\\b/i],[d,[f,_],[m,k]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[d,[m,h]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[d,[m,w]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[m,w]],[/(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i],[[m,h]],[/(android[-\\w\\. ]{0,9});.+buil/i],[d,[f,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[v,[p,"EdgeHTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[v,[p,"Blink"]],[/(presto)\\/([\\w\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i,/ekioh(flow)\\/([\\w\\.]+)/i,/(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i,/(icab)[\\/ ]([23]\\.[\\d\\.]+)/i,/\\b(libweb)/i],[p,v],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[v,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,v],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[p,[v,J,X]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[p,"Windows"],[v,J,X]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/ios;fbsv\\/([\\d\\.]+)/i,/cfnetwork\\/.+darwin/i],[[v,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[p,K],[v,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i],[v,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[p,v],[/\\(bb(10);/i],[v,[p,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[v,[p,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[v,[p,N+" OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[v,[p,"webOS"]],[/watch(?: ?os[,\\/]|\\d,\\d\\/)([\\d\\.]+)/i],[v,[p,"watchOS"]],[/crkey\\/([\\d\\.]+)/i],[v,[p,j+"cast"]],[/(cros) [\\w]+(?:\\)| ([\\w\\.]+)\\b)/i],[[p,z],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\\/(\\d+\\.[\\w\\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\\);]+)/i,/\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i,/(mint)[\\/\\(\\) ]?(\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,/(hurd|linux) ?([\\w\\.]*)/i,/(gnu) ?([\\w\\.]*)/i,/\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i,/(haiku) (\\w+)/i],[p,v],[/(sunos) ?([\\w\\.\\d]*)/i],[[p,"Solaris"],v],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\\w\\.]*)/i],[p,v]]},Z=function(e,t){if(typeof e===c&&(t=e,e=a),!(this instanceof Z))return new Z(e,t).getResult();var n=typeof i!==s&&i.navigator?i.navigator:a,r=e||(n&&n.userAgent?n.userAgent:""),b=n&&n.userAgentData?n.userAgentData:a,y=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(G,t):G,T=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[p]=a,t[v]=a,V.call(t,r,y.browser),t[l]=typeof(e=t[v])===u?e.replace(/[^\\d\\.]/g,"").split(".")[0]:a,T&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[p]="Brave"),t},this.getCPU=function(){var e={};return e[g]=a,V.call(e,r,y.cpu),e},this.getDevice=function(){var e={};return e[f]=a,e[d]=a,e[m]=a,V.call(e,r,y.device),T&&!e[m]&&b&&b.mobile&&(e[m]=h),T&&"Macintosh"==e[d]&&n&&typeof n.standalone!==s&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[d]="iPad",e[m]=w),e},this.getEngine=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.engine),e},this.getOS=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.os),T&&!e[p]&&b&&"Unknown"!=b.platform&&(e[p]=b.platform.replace(/chrome os/i,z).replace(/macos/i,K)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?H(e,350):e,this},this.setUA(r),this};Z.VERSION="1.0.35",Z.BROWSER=$([p,v,l]),Z.CPU=$([g]),Z.DEVICE=$([d,f,m,b,h,y,w,T,k]),Z.ENGINE=Z.OS=$([p,v]),typeof t!==s?(e.exports&&(t=e.exports=Z),t.UAParser=Z):n.amdO?(r=function(){return Z}.call(t,n,t,e))===a||(e.exports=r):typeof i!==s&&(i.UAParser=Z);var Y=typeof i!==s&&(i.jQuery||i.Zepto);if(Y&&!Y.ua){var ee=new Z;Y.ua=ee.getResult(),Y.ua.get=function(){return ee.getUA()},Y.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionType:()=>f,AmplitudePlatformName:()=>g,AnalyticsEventImportance:()=>l,AnalyticsQueries:()=>e,AuthStatus:()=>b,ComponentType:()=>m,IThresholdTier:()=>Jt,MetricType:()=>d,PlatformName:()=>v,SessionActions:()=>h,SessionAutomatedEvents:()=>w,SessionRank:()=>y,SubjectType:()=>p,UserTypeCommerce:()=>c,UserTypeInsto:()=>i,UserTypeRetail:()=>t,UserTypeRetailBusinessBanking:()=>s,UserTypeRetailEmployeeInternal:()=>a,UserTypeRetailEmployeePersonal:()=>o,UserTypeWallet:()=>u,automatedEvents:()=>xn,automatedMappingConfig:()=>In,clearMarkEntry:()=>Vn,clearPerformanceMarkEntries:()=>Xn,config:()=>A,createEventConfig:()=>On,createNewSpan:()=>Ln,createNewTrace:()=>Un,device:()=>W,endPerfMark:()=>Jn,exposeExperiment:()=>wn,flushQueue:()=>or,generateUUID:()=>V,getAnalyticsHeaders:()=>sr,getReferrerData:()=>le,getTracingHeaders:()=>An,getTracingId:()=>Dn,getUrlHostname:()=>pe,getUrlParams:()=>me,getUrlPathname:()=>fe,getUserContext:()=>ar,identify:()=>Tn,identifyFlow:()=>xe,identity:()=>H,identityFlow:()=>Se,incrementUjNavigation:()=>an,init:()=>yn,initNextJsTrackPageview:()=>_n,initTrackPageview:()=>kn,isEventKeyFormatValid:()=>we,isSessionEnded:()=>pt,location:()=>re,logEvent:()=>$t,logMetric:()=>Ht,logPageView:()=>on,logTrace:()=>Rn,markNTBT:()=>tn,markStep:()=>nn,markStepOnce:()=>rn,onVisibilityChange:()=>ln,optIn:()=>En,optOut:()=>Sn,perfMark:()=>Wn,persistentData:()=>oe,postMessage:()=>K,recordSessionDuration:()=>pn,removeFromIdentifyFlow:()=>Ee,savePersistentData:()=>st,sendScheduledEvents:()=>Bt,setBreadcrumbs:()=>ie,setConfig:()=>U,setLocation:()=>ae,setPagePath:()=>ve,setPageview:()=>Kt,setPersistentData:()=>se,setSessionStart:()=>dt,setTime:()=>Ue,startPerfMark:()=>Hn,timeStone:()=>Le,useEventLogger:()=>Yn,useLogEventOnMount:()=>tr,usePerformanceMarks:()=>rr});let e=function(e){return e.fbclid="fbclid",e.gclid="gclid",e.msclkid="msclkid",e.ptclid="ptclid",e.ttclid="ttclid",e.utm_source="utm_source",e.utm_medium="utm_medium",e.utm_campaign="utm_campaign",e.utm_term="utm_term",e.utm_content="utm_content",e}({});const t=0,i=1,a=2,o=3,s=4,c=5,u=6;let l=function(e){return e.low="low",e.high="high",e}({}),d=function(e){return e.count="count",e.rate="rate",e.gauge="gauge",e.distribution="distribution",e.histogram="histogram",e}({}),p=function(e){return e.commerce_merchant="commerce_merchant",e.device="device",e.edp_fingerprint_id="edp_fingerprint_id",e.nft_user="nft_user",e.user="user",e.wallet_user="wallet_user",e.uuid="user_uuid",e}({}),m=function(e){return e.unknown="unknown",e.banner="banner",e.button="button",e.card="card",e.chart="chart",e.content_script="content_script",e.dropdown="dropdown",e.link="link",e.page="page",e.modal="modal",e.table="table",e.search_bar="search_bar",e.service_worker="service_worker",e.text="text",e.text_input="text_input",e.tray="tray",e.checkbox="checkbox",e.icon="icon",e}({}),f=function(e){return e.unknown="unknown",e.blur="blur",e.click="click",e.change="change",e.dismiss="dismiss",e.focus="focus",e.hover="hover",e.select="select",e.measurement="measurement",e.move="move",e.process="process",e.render="render",e.scroll="scroll",e.view="view",e.search="search",e.keyPress="keyPress",e}({}),v=function(e){return e.unknown="unknown",e.web="web",e.android="android",e.ios="ios",e.mobile_web="mobile_web",e.tablet_web="tablet_web",e.server="server",e.windows="windows",e.macos="macos",e.extension="extension",e}({}),g=function(e){return e.web="Web",e.ios="iOS",e.android="Android",e}({}),b=function(e){return e[e.notLoggedIn=0]="notLoggedIn",e[e.loggedIn=1]="loggedIn",e}({}),h=function(e){return e.ac="ac",e.af="af",e.ah="ah",e.al="al",e.am="am",e.ar="ar",e.as="as",e}({}),w=function(e){return e.pv="pv",e}({}),y=function(e){return e.xs="xs",e.s="s",e.m="m",e.l="l",e.xl="xl",e.xxl="xxl",e}({});const T="https://analytics-service-dev.cbhq.net",k=3e5,_=5e3,S="analytics-db",E="experiment-exposure-db",x="Analytics SDK:",O=Object.values(e),j="pageview",N="session_duration",I={navigationTiming:{eventName:"perf_navigation_timing"},redirectTime:{eventName:"perf_redirect_time"},RT:{eventName:"perf_redirect_time"},TTFB:{eventName:"perf_time_to_first_byte"},networkInformation:{eventName:"perf_network_information"},storageEstimate:{eventName:"perf_storage_estimate"},FCP:{eventName:"perf_first_contentful_paint"},FID:{eventName:"perf_first_input_delay"},LCP:{eventName:"perf_largest_contentful_paint"},CLS:{eventName:"perf_cumulative_layout_shift"},TBT:{eventName:"perf_total_blocking_time"},NTBT:{eventName:"perf_navigation_total_blocking_time"},INP:{eventName:"perf_interact_to_next_paint"},ET:{eventName:"perf_element_timing"},userJourneyStep:{eventName:"perf_user_journey_step"}},P="1",M="web";function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}const C=/^(https?:\\/\\/)/;function D(e){return{eventsEndpoint:e+"/amp",metricsEndPoint:e+"/metrics",exposureEndpoint:e+"/track-exposures",tracesEndpoint:e+"/traces"}}const A=B({authCookie:"logged_in",amplitudeApiKey:"",batchEventsPeriod:_,batchEventsThreshold:30,batchMetricsPeriod:_,batchMetricsThreshold:30,batchTracesPeriod:_,batchTracesThreshold:30,headers:{},interactionManager:null,isAlwaysAuthed:!1,isProd:!1,isInternalApplication:!1,onError:(e,t)=>{console.error(x,e,t)},platform:v.unknown,projectName:"",ricTimeoutScheduleEvent:1e3,ricTimeoutSetDevice:500,showDebugLogging:!1,trackUserId:!1,version:null,apiEndpoint:T},D(T),{steps:{}}),L=[].reduce(((e,t)=>n=>e(t(n))),(e=>{if(!e.isProd)return e.isInternalApplication?(e.apiEndpoint="https://analytics-service-internal-dev.cbhq.net",B({},e,D(e.apiEndpoint))):e;const t=(e=>e.apiEndpoint?C.test(e.apiEndpoint)?e.apiEndpoint:`https://${e.apiEndpoint}`:e.isInternalApplication?"https://analytics-service-internal.cbhq.net":"https://as.coinbase.com")(e);return B({},e,{apiEndpoint:t},D(t))})),U=e=>{const{batchEventsThreshold:t,batchMetricsThreshold:n,batchTracesThreshold:r}=e,i=[t,n,r];for(const e of i)if((e||0)>30){console.warn("You are setting the threshhold for the batch limit to be greater than 30. This may cause request overload.");break}Object.assign(A,L(e))},R=[v.web,v.mobile_web,v.tablet_web];function q(){return"android"===A.platform}function F(){return"ios"===A.platform}function z(){return R.includes(A.platform)}function K(e){if(z()&&navigator&&"serviceWorker"in navigator&&navigator.serviceWorker.controller)try{navigator.serviceWorker.controller.postMessage(e)}catch(e){e instanceof Error&&A.onError(e)}}var $=n(353),Q=n.n($);const W={amplitudeOSName:null,amplitudeOSVersion:null,amplitudeDeviceModel:null,amplitudePlatform:null,browserName:null,browserMajor:null,osName:null,userAgent:null,width:null,height:null},H={countryCode:null,deviceId:null,device_os:null,isOptOut:!1,languageCode:null,locale:null,jwt:null,session_lcc_id:null,userAgent:null,userId:null},V=e=>e?(e^16*Math.random()>>e/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,V),J=()=>A.isAlwaysAuthed||!!H.userId,X=()=>{const e={};return H.countryCode&&(e.country_code=H.countryCode),e},G=()=>{const{platform:e}=A;if(e===v.web)switch(!0){case window.matchMedia("(max-width: 560px)").matches:return v.mobile_web;case window.matchMedia("(max-width: 1024px, min-width: 561px)").matches:return v.tablet_web}return e},Z=()=>{var e,t,n,r,i;z()?("requestIdleCallback"in window?window.requestIdleCallback(ne,{timeout:A.ricTimeoutSetDevice}):ne(),W.amplitudePlatform=g.web,W.userAgent=(null==(e=window)||null==(e=e.navigator)?void 0:e.userAgent)||null,ee({height:null!=(t=null==(n=window)?void 0:n.innerHeight)?t:null,width:null!=(r=null==(i=window)?void 0:i.innerWidth)?r:null})):F()?(W.amplitudePlatform=g.ios,W.userAgent=H.userAgent,W.userAgent&&ne()):q()&&(W.userAgent=H.userAgent,W.amplitudePlatform=g.android,W.userAgent&&ne())},Y=e=>{Object.assign(H,e),z()&&K({identity:{isAuthed:!!H.userId,locale:H.locale||null}})},ee=e=>{W.height=e.height,W.width=e.width},te=()=>{U({platform:G()}),z()&&K({config:{platform:A.platform}})},ne=()=>{var e;performance.mark&&performance.mark("ua_parser_start");const t=new(Q())(null!=(e=W.userAgent)?e:"").getResult();W.browserName=t.browser.name||null,W.browserMajor=t.browser.major||null,W.osName=t.os.name||null,W.amplitudeOSName=W.browserName,W.amplitudeOSVersion=W.browserMajor,W.amplitudeDeviceModel=W.osName,K({device:{browserName:W.browserName,osName:W.osName}}),performance.mark&&(performance.mark("ua_parser_end"),performance.measure("ua_parser","ua_parser_start","ua_parser_end"))},re={breadcrumbs:[],initialUAAData:{},pageKey:"",pageKeyRegex:{},pagePath:"",prevPageKey:"",prevPagePath:""};function ie(e){Object.assign(re,{breadcrumbs:e})}function ae(e){Object.assign(re,e)}const oe={eventId:0,sequenceNumber:0,sessionId:0,lastEventTime:0,sessionStart:0,sessionUUID:null,userId:null,ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0};function se(e){Object.assign(oe,e)}function ce(){var e,t;return null!=(e=null==(t=document)?void 0:t.referrer)?e:""}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(this,arguments)}const le=()=>{const e=ce();if(!e)return{};const t=new URL(e);return t.hostname===pe()?{}:{referrer:e,referring_domain:t.hostname}},de=()=>{const e=new URLSearchParams(me()),t={};return O.forEach((n=>{e.has(n)&&(t[n]=(e.get(n)||"").toLowerCase())})),t},pe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.hostname)||""},me=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.search)||""},fe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.pathname)||""},ve=()=>{const e=A.overrideWindowLocation?re.pagePath:fe()+me();e&&e!==re.pagePath&&(e!==re.pagePath&&ge(),re.pagePath=e,re.pageKeyRegex&&Object.keys(re.pageKeyRegex).some((e=>{if(re.pageKeyRegex[e].test(re.pagePath))return re.pageKey=e,!0})))},ge=()=>{if(z()){const e=ce();if(!re.prevPagePath&&e){const t=new URL(e);if(t.hostname===pe())return void(re.prevPagePath=t.pathname)}}re.prevPagePath=re.pagePath,re.prevPageKey=re.pageKey},be=e=>{z()&&Object.assign(e,z()?(Object.keys(re.initialUAAData).length>0||(new URLSearchParams(me()),re.initialUAAData=ue({},(()=>{const e={};return O.forEach((t=>{oe[t]&&(e[t]=oe[t])})),e})(),de(),le())),re.initialUAAData):re.initialUAAData)},he=/^[a-zd]+(_[a-zd]+)*$/;function we(e){return he.test(e)}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(this,arguments)}const Te=["action","component_type","component_name","context","logging_id"],ke=["num_non_hardware_accounts","ujs"],_e="ujs_",Se={};function Ee(e){e.forEach((e=>{ke.includes(e)&&delete Se[e]}))}function xe(e){var t;const n=Object.entries(e).reduce(((e,t)=>{const[n,r]=t;return!Te.includes(n)&&ke.includes(n)?we(n)?ye({},e,{[n]:r}):(A.onError(new Error("IdentityFlow property names must have snake case format"),{[n]:r}),e):e}),{});null!=(t=n.ujs)&&t.length&&(n.ujs=n.ujs.map((e=>`${_e}${e}`))),Object.assign(Se,n)}function Oe(){return A.platform!==v.unknown||(A.onError(new Error("SDK platform not initialized")),!1)}const je={eventsQueue:[],eventsScheduled:!1,metricsQueue:[],metricsScheduled:!1,tracesQueue:[],tracesScheduled:!1};function Ne(e){Object.assign(je,e)}const Ie={ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0},Pe={ac:20,af:5,ah:1,al:1,am:0,ar:10,as:20},Me={pv:25},Be={xs:0,s:1,m:1,l:2,xl:2,xxl:2},Ce=e=>e<15?y.xs:e<60?y.s:e<240?y.m:e<960?y.l:e<3840?y.xl:y.xxl,De=e=>{Object.assign(Ie,e)};function Ae(){return(new Date).getTime()}const Le={timeStart:Ae(),timeOnPagePath:0,timeOnPageKey:0,prevTimeOnPagePath:0,prevTimeOnPageKey:0,sessionDuration:0,sessionEnd:0,sessionStart:0,prevSessionDuration:0};function Ue(e){Object.assign(Le,e)}const Re=(e,t)=>t.some((t=>e instanceof t));let qe,Fe;const ze=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Qe=new WeakMap,We=new WeakMap;let He={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Ke.get(e);if("objectStoreNames"===t)return e.objectStoreNames||$e.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Je(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ve(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Fe||(Fe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(Xe(this),e),Je(ze.get(this))}:function(...e){return Je(t.apply(Xe(this),e))}:function(e,...n){const r=t.call(Xe(this),e,...n);return $e.set(r,e.sort?e.sort():[e]),Je(r)}:(e instanceof IDBTransaction&&function(e){if(Ke.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));Ke.set(e,t)}(e),Re(e,qe||(qe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,He):e);var t}function Je(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(Je(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&ze.set(t,e)})).catch((()=>{})),We.set(t,e),t}(e);if(Qe.has(e))return Qe.get(e);const t=Ve(e);return t!==e&&(Qe.set(e,t),We.set(t,e)),t}const Xe=e=>We.get(e),Ge=["get","getKey","getAll","getAllKeys","count"],Ze=["put","add","delete","clear"],Ye=new Map;function et(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ye.get(t))return Ye.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Ze.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Ge.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Ye.set(t,a),a}var tt;tt=He,He={...tt,get:(e,t,n)=>et(e,t)||tt.get(e,t,n),has:(e,t)=>!!et(e,t)||tt.has(e,t)};const nt={isReady:!1,idbKeyval:null};function rt(e){Object.assign(nt,e)}const it={},at=async e=>{if(!nt.idbKeyval)return Promise.resolve(null);try{return await nt.idbKeyval.get(e)}catch(e){return A.onError(new Error("IndexedDB:Get:InternalError")),Promise.resolve(null)}},ot=async(e,t)=>{if(nt.idbKeyval)try{await nt.idbKeyval.set(e,t)}catch(e){A.onError(new Error("IndexedDB:Set:InternalError"))}},st=()=>{"server"!==A.platform&&(se({sessionStart:Le.sessionStart,ac:Ie.ac,af:Ie.af,ah:Ie.ah,al:Ie.al,am:Ie.am,ar:Ie.ar,as:Ie.as,pv:Ie.pv}),H.userId&&se({userId:H.userId}),ot(S,oe))},ct="rgb(5,177,105)",ut=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`%c ${x}`,a=`color:${ct};font-size:11px;`,o=`Importance: ${r}`;console.group(i,a,t,o),n.forEach((e=>{e.event_type?console.log(e.event_type,e):console.log(e)})),console.groupEnd()},lt=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`color:${ct};font-size:11px;`,a=`%c ${x}`,o=`Importance: ${r}`;console.log(a,i,t,n,o)},dt=()=>{const e=Ae();oe.sessionId&&oe.lastEventTime&&oe.sessionUUID&&!pt(e)||(oe.sessionId=e,oe.sessionUUID=V(),Ue({sessionStart:e}),lt({metricName:"Started new session:",data:{persistentData:oe,timeStone:Le}})),oe.lastEventTime=e},pt=e=>e-oe.lastEventTime>18e5;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(this,arguments)}const ft=e=>{var t;(e=>{switch(e.action){case f.click:Ie.ac+=1;break;case f.focus:Ie.af+=1;break;case f.hover:Ie.ah+=1;break;case f.move:Ie.am+=1;break;case f.scroll:Ie.al+=1;break;case f.search:Ie.ar+=1;break;case f.select:Ie.as+=1}})(t=e),t.event_type!==j?t.event_type===N&&((e=>{if(!e.session_rank)return;const t=e.session_rank;Object.values(h).forEach((e=>{Ie.sqs+=Ie[e]*Pe[e]})),Object.values(w).forEach((e=>{Ie.sqs+=Ie[e]*Me[e]})),Ie.sqs*=Be[t]})(t),Object.assign(t,Ie),De({ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0})):Ie.pv+=1;const n=e.event_type;delete e.event_type;const r=e.deviceId?e.deviceId:null,i=e.timestamp;return delete e.timestamp,se({eventId:oe.eventId+1}),se({sequenceNumber:oe.sequenceNumber+1}),dt(),st(),{device_id:H.deviceId||r||null,user_id:H.userId,timestamp:i,event_id:oe.eventId,session_id:oe.sessionId||-1,event_type:n,version_name:A.version||null,platform:W.amplitudePlatform,os_name:W.amplitudeOSName,os_version:W.amplitudeOSVersion,device_model:W.amplitudeDeviceModel,language:H.languageCode,event_properties:mt({},e,{session_uuid:oe.sessionUUID,height:W.height,width:W.width}),user_properties:X(),uuid:V(),library:{name:"@cbhq/client-analytics",version:"10.6.0"},sequence_number:oe.sequenceNumber,user_agent:W.userAgent||H.userAgent}},vt=e=>e.map((e=>ft(e)));function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gt.apply(this,arguments)}const bt=e=>e.map((e=>(e=>{const t=e.tags||{},n=gt({authed:J()?"true":"false",platform:A.platform},t,{project_name:A.projectName,version_name:A.version||null});return{metric_name:e.metricName,page_path:e.pagePath||null,value:e.value,tags:n,type:e.metricType}})(e))),ht=e=>0!==je.metricsQueue.length&&(je.metricsQueue.length>=A.batchMetricsThreshold||(je.metricsScheduled||(je.metricsScheduled=!0,setTimeout((()=>{je.metricsScheduled=!1,e(bt(je.metricsQueue)),je.metricsQueue=[]}),A.batchMetricsPeriod)),!1)),wt=e=>0!==je.tracesQueue.length&&(je.tracesQueue.length>=A.batchTracesThreshold||(je.tracesScheduled||(je.tracesScheduled=!0,setTimeout((()=>{je.tracesScheduled=!1,e(je.tracesQueue),je.tracesQueue=[]}),A.batchTracesPeriod)),!1)),yt=e=>{var t;z()&&null!=(t=window)&&t.requestIdleCallback?window.requestIdleCallback(e,{timeout:A.ricTimeoutScheduleEvent}):(q()||F())&&A.interactionManager?A.interactionManager.runAfterInteractions(e):e()};function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}const kt="application/x-www-form-urlencoded; charset=UTF-8",_t=e=>{const{data:t,importance:n,isJSON:r,onError:i,url:a}=e,o=r?"application/json":kt,s=n||l.low,c=r?JSON.stringify(t):new URLSearchParams(t).toString();function u(){const e=new XMLHttpRequest;e.open("POST",a,!0),Object.keys(A.headers||{}).forEach((t=>{e.setRequestHeader(t,A.headers[t])})),e.setRequestHeader("Content-Type",kt),H.jwt&&e.setRequestHeader("authorization",`Bearer ${H.jwt}`),e.send(c)}if(!z()||r||!("sendBeacon"in navigator)||s!==l.low||A.headers&&0!==Object.keys(A.headers).length)if(z()&&!r)u();else{const e=Tt({},A.headers,{"Content-Type":o});H.jwt&&(e.Authorization=`Bearer ${H.jwt}`),fetch(a,{method:"POST",mode:"no-cors",headers:e,body:c}).catch((e=>{i(e,{context:"AnalyticsSDKApiError"})}))}else{const e=new Blob([c],{type:kt});try{navigator.sendBeacon.bind(navigator)(a,e)||u()}catch(e){console.error(e),u()}}};var St=n(762),Et=n.n(St);const xt=(e,t,n)=>{const r=e||"";return Et()("2"+r+t+n)};function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ot.apply(this,arguments)}class jt extends Error{constructor(e){super(e),this.name="CircularJsonReference",this.message=e,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}}class Nt extends jt{constructor(...e){super(...e),this.name="DomReferenceInAnalyticsEvent"}}function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}const Pt=(e,t=l.low)=>{var n;e&&je.eventsQueue.push(e),nt.isReady&&(!A.trackUserId||H.userId?(t===l.high||(n=Mt,0!==je.eventsQueue.length&&(je.eventsQueue.length>=A.batchEventsThreshold||(je.eventsScheduled||(je.eventsScheduled=!0,setTimeout((()=>{je.eventsScheduled=!1,n(vt(je.eventsQueue)),je.eventsQueue=[]}),A.batchEventsPeriod)),0))))&&Bt():je.eventsQueue.length>10&&(A.trackUserId=!1,A.onError(new Error("userId not set in Logged-in"))))},Mt=(e,t=l.low)=>{if(H.isOptOut||0===e.length)return;let n;try{n=JSON.stringify(e)}catch(t){const r=e.map((e=>e.event_type)).join(", "),[i,a]=(e=>{try{const n=[];for(const r of e){const e=Ot({},r);r.event_properties&&(e.event_properties=Ot({},e.event_properties,{currentTarget:null,target:null,relatedTarget:null,_dispatchInstances:null,_targetInst:null,view:(t=r.event_properties.view,["string","number","boolean"].includes(typeof t)?r.event_properties.view:null)})),n.push(e)}return[!0,JSON.stringify(n)]}catch(e){return[!1,""]}var t})(e);if(!i)return void A.onError(new jt(t instanceof Error?t.message:"unknown"),{listEventType:r});n=a,A.onError(new Nt("Found DOM element reference"),{listEventType:r,stringifiedEventData:n})}const r=Ae().toString(),i=It({},{e:n,v:"2",upload_time:r},{client:A.amplitudeApiKey,checksum:xt(A.amplitudeApiKey,n,r)});_t({url:A.eventsEndpoint,data:i,importance:t,onError:A.onError}),ut({metricName:"Batch Events",data:e,importance:t})},Bt=()=>{Mt(vt(je.eventsQueue)),Ne({eventsQueue:[]})};function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ct.apply(this,arguments)}const Dt=Object.values(f),At=Object.values(m),Lt=e=>Dt.includes(e)?e:f.unknown,Ut=e=>At.includes(e)?e:m.unknown,Rt=(e,t,n)=>{const r={auth:J()?b.loggedIn:b.notLoggedIn,action:Lt(e),component_type:Ut(t),logging_id:n,platform:A.platform,project_name:A.projectName};return"number"==typeof H.userTypeEnum&&(r.user_type_enum=H.userTypeEnum),r},qt=e=>{const t=Ae();if(!e)return A.onError(new Error("missing logData")),Ct({},Rt(f.unknown,m.unknown),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});const n=Ct({},e,Rt(e.action,e.componentType,e.loggingId),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});return delete n.componentType,delete n.loggingId,n},Ft={blacklistRegex:[],isEnabled:!1};function zt(){return{page_key:re.pageKey,page_path:re.pagePath,prev_page_key:re.prevPageKey,prev_page_path:re.prevPagePath}}function Kt(e){Object.assign(Ft,e)}function $t(e,t,n=l.low){if(H.isOptOut)return;if(!Oe())return;const r=qt(t);!function(e){Ft.isEnabled&&(ve(),Object.assign(e,zt()))}(r),be(r),function(e){Object.keys(Se).length>0&&Object.assign(e,Se)}(r),r.has_double_fired=!1,r.event_type=e,n===l.high?Pt(r,n):yt((()=>{Pt(r)}))}function Qt(e,t=!1){t?_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError})})),ut({metricName:"Batch Metrics",data:e})}function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}function Ht(e){if(!Oe())return;v.server!==A.platform&&!e.pagePath&&re.pagePath&&(e.pagePath=re.pagePath);const t=Object.keys(Se).length?Wt({},e.tags,Se):e.tags;t&&Object.assign(e,{tags:t}),je.metricsQueue.push(e),ht(Qt)&&(Qt(bt(je.metricsQueue)),je.metricsQueue=[])}function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vt.apply(this,arguments)}let Jt=function(e){return e.instant="instant",e.quick="quick",e.moderate="moderate",e.slow="slow",e.unavoidable="unavoidable",e}({});function Xt(e){return e.toLowerCase()}let Gt={};const Zt=(e,t)=>{null!=A&&A.onMarkStep&&A.onMarkStep(e,t),xe({ujs:t})};let Yt;const en={Perfume:()=>{},markStep:e=>{},markStepOnce:e=>{},incrementUjNavigation:()=>{}},tn=()=>{z()&&Yt&&Yt.markNTBT&&Yt.markNTBT()},nn=e=>{z()&&Yt&&en.markStep&&en.markStep(e)},rn=e=>{z()&&Yt&&en.markStepOnce&&en.markStepOnce(e)},an=()=>{z()&&Yt&&en.incrementUjNavigation&&en.incrementUjNavigation()};function on(e={callMarkNTBT:!0}){"unknown"!==A.platform&&(Ft.blacklistRegex.some((e=>e.test(fe())))||($t(j,{action:f.render,componentType:m.page}),e.callMarkNTBT&&tn()))}let sn=!1,cn=!1;const un=e=>{sn=!e.persisted},ln=(e,t="hidden",n=!1)=>{cn||(addEventListener("pagehide",un),addEventListener("beforeunload",(()=>{})),cn=!0),addEventListener("visibilitychange",(({timeStamp:n})=>{document.visibilityState===t&&e({timeStamp:n,isUnloading:sn})}),{capture:!0,once:n})},dn=36e3;function pn(){const e=pt(Ae());if(e&&(O.forEach((e=>{oe[e]&&delete oe[e]})),st()),!oe.lastEventTime||!Le.sessionStart||!e)return;const t=Math.round((oe.lastEventTime-Le.sessionStart)/1e3);if(t<1||t>dn)return;const n=Ce(t);$t(N,{action:f.measurement,componentType:m.page,session_duration:t,session_end:oe.lastEventTime,session_start:Le.sessionStart,session_rank:n})}function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mn.apply(this,arguments)}const fn=[],vn=[],gn=()=>{const e=fn.shift();e&&e()},bn=()=>{const e=vn.shift();e&&e()};let hn={};function wn(e){const t=function(e){return{test_name:e.testName,group_name:e.group,subject_id:e.subjectId,exposed_at:Ae(),subject_type:e.subjectType,platform:A.platform}}(e);hn[e.testName]=hn[e.testName]||0,hn[e.testName]+k>Ae()?lt({metricName:`Event: exposeExperiment ${e.testName} not sent`,data:t}):(hn[e.testName]=Ae(),ot(E,hn),lt({metricName:`Event: exposeExperiment ${e.testName} sent`,data:t}),_t({url:A.exposureEndpoint,data:[t],onError:(t,n)=>{hn[e.testName]=0,ot(E,hn),A.onError(t,n)},isJSON:!0,importance:l.high}))}const yn=e=>{var t,r,i;U(e),z()&&(H.languageCode=(null==(t=navigator)?void 0:t.languages[0])||(null==(r=navigator)?void 0:r.language)||""),te(),(()=>{var e;if(z()&&null!=(e=window)&&e.indexedDB){const e=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Je(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(Je(o.result),e.oldVersion,e.newVersion,Je(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}("keyval-store",1,{upgrade(e){e.createObjectStore("keyval")}});rt({idbKeyval:{get:async t=>(await e).get("keyval",t),set:async(t,n)=>(await e).put("keyval",n,t),delete:async t=>(await e).delete("keyval",t),keys:async()=>(await e).getAllKeys("keyval")}})}else rt({idbKeyval:{get:async e=>new Promise((t=>{t(it[e])})),set:async(e,t)=>new Promise((n=>{it[e]=t,n(e)})),delete:async e=>new Promise((()=>{delete it[e]})),keys:async()=>new Promise((e=>{e(Object.keys(it))}))}})})(),lt({metricName:"Initialized Analytics:",data:{deviceId:H.deviceId}}),fn.push((()=>{Pt()})),(async()=>{const e=await at(S);rt({isReady:!0}),gn(),e&&(bn(),se({eventId:e.eventId||oe.eventId,sequenceNumber:e.sequenceNumber||oe.sequenceNumber,sessionId:e.sessionId||oe.sessionId,lastEventTime:e.lastEventTime||oe.lastEventTime,sessionUUID:e.sessionUUID||oe.sessionUUID}),function(e){se(mn({},function(e){const t={};return O.forEach((n=>{e[n]&&(t[n]=e[n])})),t}(e),de()))}(e),Ue({sessionStart:e.sessionStart||oe.sessionStart}),De({ac:e.ac||Ie.ac,af:e.af||Ie.af,ah:e.ah||Ie.ah,al:e.al||Ie.al,am:e.am||Ie.am,ar:e.ar||Ie.ar,as:e.as||Ie.as,pv:e.pv||Ie.pv}),A.trackUserId&&Y({userId:e.userId||H.userId}),pn(),lt({metricName:"Initialized Analytics IndexedDB:",data:e}))})(),async function(){at(E).then((e=>{hn=null!=e?e:{}})).catch((e=>{e instanceof Error&&A.onError(e)}))}(),Z(),z()&&(ln((()=>{se({lastEventTime:Ae()}),st(),Bt()}),"hidden"),ln((()=>{pn()}),"visible")),z()&&(i=()=>{var e,t,n,r;te(),ee({width:null!=(e=null==(t=window)?void 0:t.innerWidth)?e:null,height:null!=(n=null==(r=window)?void 0:r.innerHeight)?n:null})},addEventListener("resize",(()=>{requestAnimationFrame((()=>{i()}))}))),(()=>{if(z())try{const e=n(2);en.markStep=e.markStep,en.markStepOnce=e.markStepOnce,en.incrementUjNavigation=e.incrementUjNavigation,Yt=new e.Perfume({analyticsTracker:e=>{const{data:t,attribution:n,metricName:r,navigatorInformation:i,rating:a}=e,o=I[r],s=(null==n?void 0:n.category)||null;if(!o&&!s)return;const c=(null==i?void 0:i.deviceMemory)||0,u=(null==i?void 0:i.hardwareConcurrency)||0,l=(null==i?void 0:i.isLowEndDevice)||!1,p=(null==i?void 0:i.isLowEndExperience)||!1,v=(null==i?void 0:i.serviceWorkerStatus)||"unsupported",g=Vt({deviceMemory:c,hardwareConcurrency:u,isLowEndDevice:l,isLowEndExperience:p,serviceWorkerStatus:v},Gt),b={is_low_end_device:l,is_low_end_experience:p,page_key:re.pageKey||"",save_data:t.saveData||!1,service_worker:v,is_perf_metric:!0};if("navigationTiming"===r)t&&"number"==typeof t.redirectTime&&Ht({metricName:I.redirectTime.eventName,metricType:d.histogram,tags:b,value:t.redirectTime||0});else if("TTFB"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),Ht({metricName:I.TTFB.eventName,metricType:d.histogram,tags:Vt({},b),value:t}),a&&Ht({metricName:`perf_web_vitals_ttfb_${a}`,metricType:d.count,tags:b,value:1});else if("networkInformation"===r)null!=t&&t.effectiveType&&(Gt=t,$t(o.eventName,{action:f.measurement,componentType:m.page,networkInformationDownlink:t.downlink,networkInformationEffectiveType:t.effectiveType,networkInformationRtt:t.rtt,networkInformationSaveData:t.saveData,navigatorDeviceMemory:c,navigatorHardwareConcurrency:u}));else if("storageEstimate"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page},t,g)),Ht({metricName:"perf_storage_estimate_caches",metricType:d.histogram,tags:b,value:t.caches}),Ht({metricName:"perf_storage_estimate_indexed_db",metricType:d.histogram,tags:b,value:t.indexedDB});else if("CLS"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,score:100*t||null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_cls_${a}`,metricType:d.count,tags:b,value:1});else if("FID"===r){const e=(null==n?void 0:n.performanceEntry)||null,r=parseInt((null==e?void 0:e.processingStart)||"");$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,processingStart:null!=e&&e.processingStart?r:null,startTime:null!=e&&e.startTime?parseInt(e.startTime):null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_fidVitals_${a}`,metricType:d.count,tags:b,value:1})}else"userJourneyStep"===r?($t("perf_user_journey_step",Vt({action:f.measurement,componentType:m.page,duration:t||null,rating:null!=a?a:null,step_name:(null==n?void 0:n.stepName)||""},g)),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||""}_vitals_${a}`,metricType:d.count,tags:b,value:1}),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||""}`,metricType:d.distribution,tags:b,value:t||null})):I[r]&&t&&($t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),a&&(Ht({metricName:`perf_web_vitals_${Xt(r)}_${a}`,metricType:d.count,tags:b,value:1}),"LCP"===r&&Ht({metricName:`perf_web_vitals_${Xt(r)}`,metricType:d.distribution,tags:b,value:t})))},maxMeasureTime:3e4,steps:A.steps,onMarkStep:Zt})}catch(e){e instanceof Error&&A.onError(e)}})()},Tn=e=>{Y(e),e.userAgent&&Z(),lt({metricName:"Identify:",data:{countryCode:H.countryCode,deviceId:H.deviceId,userId:H.userId}})},kn=({blacklistRegex:e,pageKeyRegex:t,browserHistory:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.listen((()=>{on()}))},_n=({blacklistRegex:e,pageKeyRegex:t,nextJsRouter:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.events.on("routeChangeComplete",(()=>{on()}))},Sn=()=>{Y({isOptOut:!0}),ot(S,{})},En=()=>{Y({isOptOut:!1})},xn={Button:{label:"cb_button",uuid:"e921a074-40e6-4371-8700-134d5cd633e6",componentType:m.button}};function On(e,t,n){return{componentName:e,actions:t,data:n}}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jn.apply(this,arguments)}function Nn(e,t,n){const{componentName:r,data:i}=n;$t(e.label,jn({componentType:e.componentType,action:t,loggingId:e.uuid,component_name:r},i))}const In={actionMapping:{onPress:f.click,onHover:f.hover},handlers:{Button:{[f.click]:e=>Nn(xn.Button,f.click,e),[f.hover]:e=>Nn(xn.Button,f.hover,e)}}};function Pn(e,t=!1){t?_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError})})),ut({metricName:"Batch Traces",data:e})}function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn.apply(this,arguments)}const Bn=1e6;function Cn(e){return e*Bn}function Dn(e=function(){var e;return null==(e=window)?void 0:e.crypto}()){const t=new Uint32Array(2);return null==e||e.getRandomValues(t),((BigInt(t[0])<<BigInt(32))+BigInt(t[1])).toString()}function An(e,t){return{"x-datadog-origin":"rum","x-datadog-parent-id":t,"x-datadog-sampling-priority":"1","x-datadog-trace-id":e}}function Ln(e){var t;const{name:n,traceId:r,spanId:i,start:a,duration:o,resource:s,meta:c}=e;return{duration:o?Cn(o):0,name:n,resource:s,service:A.projectName,span_id:null!=i?i:Dn(),start:a?Cn(a):0,trace_id:null!=r?r:Dn(),parent_id:P,type:M,meta:Mn({platform:A.platform},re.pageKey?{page_key:re.pageKey}:{},null!=(t=Se.ujs)&&t.length?{last_ujs:Se.ujs[Se.ujs.length-1]}:{},null!=c?c:{})}}function Un(e){return[Ln(e)]}function Rn(e,t){Oe()&&function(e){return e.length>0}(e)&&(t&&function(e,t){e.forEach((e=>function(e,t){const n=Mn({},e.meta,t.meta),r={start:t.start?Cn(t.start):e.start,duration:t.duration?Cn(t.duration):e.duration};Object.assign(e,t,Mn({meta:n},r))}(e,t)))}(e,t),je.tracesQueue.push(e),wt(Pn)&&(Pn(je.tracesQueue),je.tracesQueue=[]))}function qn(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fn.apply(this,arguments)}function zn(){return void 0!==typeof window&&"performance"in window&&"mark"in performance&&"getEntriesByName"in performance}function Kn(e,t){return`perf_${e}${null!=t&&t.label?`_${t.label}`:""}`}function $n(e,t,n){return`${Kn(e,n)}__${t}`}let Qn={};function Wn(e,t,n){if(!zn())return;const r=$n(e,t,n);if(performance.mark(r),"end"===t){const t=Kn(e,n);!function(e,t,n){try{performance.measure(e,t,n)}catch(e){A.onError(e)}}(t,$n(e,"start",n),r);const i=performance.getEntriesByName(t).pop();i&&Ht(Fn({metricName:e,metricType:d.distribution,value:i.duration},null!=n&&n.tags?{tags:n.tags}:{}))}}function Hn(e,t){if(!zn())return;const n=$n(e,"start",t);Qn[n]||(Wn(e,"start",t),Qn[n]=!0)}function Vn(e,t){const n=$n(e,"start",t),r=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(Qn,[n].map(qn));Qn=r}function Jn(e,t){if(!zn())return;const n=$n(e,"start",t);Qn[n]&&(Wn(e,"end",t),Vn(e,t))}function Xn(){zn()&&(performance.clearMarks(),Qn={})}var Gn=n(784);function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zn.apply(this,arguments)}function Yn(e,t,n=l.low){const r=(0,Gn.useRef)(t);return(0,Gn.useEffect)((()=>{r.current=t}),[t]),(0,Gn.useCallback)((t=>{$t(e,Zn({},r.current,t),n)}),[e,n])}function er(){return er=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},er.apply(this,arguments)}function tr(e,t,n=l.low){(0,Gn.useEffect)((()=>{const r=er({},t,{action:f.render});$t(e,r,n)}),[])}function nr(){return nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nr.apply(this,arguments)}const rr=function(e,t){return{markStartPerf:(0,Gn.useCallback)((()=>Hn(e,t)),[e,t]),markEndPerf:(0,Gn.useCallback)((n=>Jn(e,nr({},t,n))),[e,t])}};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ir.apply(this,arguments)}function ar(){return Object.entries(ir({},Se,zt(),{sessionUUID:oe.sessionUUID,userId:oe.userId})).reduce(((e,t)=>{return null!=(n=t[1])&&""!==n?ir({},e,{[t[0]]:t[1]}):e;var n}),{})}async function or(){return new Promise((e=>{Mt(vt(je.eventsQueue)),Qt(bt(je.metricsQueue),!0),Pn(je.tracesQueue,!0),Ne({eventsQueue:[],metricsQueue:[],tracesQueue:[]}),e()}))}function sr(){return{"X-CB-Device-ID":H.deviceId||"unknown","X-CB-Is-Logged-In":H.userId?"true":"false","X-CB-Pagekey":re.pageKey||"unknown","X-CB-UJS":(e=Se.ujs,void 0===e||0===e.length?"":e.join(",")),"X-CB-Platform":A.platform||"unknown","X-CB-Project-Name":A.projectName||"unknown","X-CB-Session-UUID":oe.sessionUUID||"unknown","X-CB-Version-Name":A.version?String(A.version):"unknown"};var e}})(),r})()}));',t.type="text/javascript",document.head.appendChild(t),
1m(),document.head.removeChild(t),e()}catch(e){console.error("Failed to execute inlined telemetry script"),t()}}),m=()=>{var e,t,n;if("undefined"!=typeof window){let r=null!=(n=null!=(e=h.config.get().deviceId)?e:null==(t=window.crypto)?void 0:t.randomUUID())?n:"";if(window.ClientAnalytics){let{init:e,identify:t,PlatformName:n}=window.ClientAnalytics;e({isProd:!0,amplitudeApiKey:"c66737ad47ec354ced777935b0af822e",platform:n.web,projectName:"base_account_sdk",showDebugLogging:!1,version:"1.0.0",apiEndpoint:"https://cca-lite.coinbase.com"}),t({deviceId:r}),h.config.set({deviceId:r})}}},y={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},g={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}},b="Unspecified error message.";function w(e,t=b){if(e&&Number.isInteger(e)){var n;let t=e.toString();if(_(g,t))return g[t].message;if((n=e)>=-32099&&n<=-32e3)return"Unspecified server error."}return t}function v(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}let k={rpc:{parse:e=>E(y.rpc.parse,e),invalidRequest:e=>E(y.rpc.invalidRequest,e),invalidParams:e=>E(y.rpc.invalidParams,e),methodNotFound:e=>E(y.rpc.methodNotFound,e),internal:e=>E(y.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw Error('"code" must be an integer such that: -32099 <= code
1<= -32005');return E(t,e)},invalidInput:e=>E(y.rpc.invalidInput,e),resourceNotFound:e=>E(y.rpc.resourceNotFound,e),resourceUnavailable:e=>E(y.rpc.resourceUnavailable,e),transactionRejected:e=>E(y.rpc.transactionRejected,e),methodNotSupported:e=>E(y.rpc.methodNotSupported,e),limitExceeded:e=>E(y.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>A(y.provider.userRejectedRequest,e),unauthorized:e=>A(y.provider.unauthorized,e),unsupportedMethod:e=>A(y.provider.unsupportedMethod,e),disconnected:e=>A(y.provider.disconnected,e),chainDisconnected:e=>A(y.provider.chainDisconnected,e),unsupportedChain:e=>A(y.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw Error('"message" must be a nonempty string');return new C(t,n,r)}}};function E(e,t){let[n,r]=S(t);return new I(e,n||w(e),r)}function A(e,t){let[n,r]=S(t);return new C(e,n||w(e),r)}function S(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:n}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[t||void 0,n]}}return[]}class I extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}}class C extends I{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function O(e){return"object"==typeof e&&null!==e&&"code"in e&&"data"in e&&-32090===e.code&&"object"==typeof e.data&&null!==e.data&&"type"in e.data&&"INSUFFICIENT_FUNDS"===e.data.type}function P(e){return"object"==typeof e&&null!==e&&"details"in e}function T(e){return Math.floor(e)}var j=n(81029).hp;let L=/^[0-9]*$/,M=/^[a-f0-9]*$/;function N(e){return D(crypto.getRandomValues(new Uint8Array(e)))}function D(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}function B(e){return new Uint8Array(e.match(/.{1,2}/g).map(e=>Number.parseInt(e,16)))}function U(e,t=!1){let n=e.toString("hex");return t?`0x${n}`:n}function R(e){return U(Z(e),!0)}function q(e){return e.toString(10)}function H(e){return`0x${BigInt(e).toString(16)}`}function z(e){return e.startsWith("0x")||e.startsWith("0X")}function F(e){return z(e)?e.slice(2):e}function G(e){return z(e)?`0x${e.slice(2)}`:`0x${e}`}function V(e){if("string"!=typeof e)return!1;let t=F(e).toLowerCase();return M.test(t)}function W(e,t=!1){if("string"==typeof e){let n=F(e).toLowerCase();if(M.test(n))return t?`0x${n}`:n}throw k.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}function $(e,t=!1){let n=W(e,!1);return n.length%2==1&&(n=`0${n}`),t?`0x${n}`:n}function K(e){if("string"==typeof e){let t=F(e).toLowerCase();if(V(t)&&40===t.length)return G(t)}throw k.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}function Z(e){if(j.isBuffer(e))return e;if("string"==typeof e){if(V(e)){let t=$(e,!1);return j.from(t,"hex")}return j.from(e,"utf8")}throw k.rpc.invalidParams(`Not binary data: ${String(e)}`)}function J(e){if("number"==typeof e&&Number.isInteger(e))return T(e);if("string"==typeof e){if(L.test(e))return T(Number(e));if(V(e))return T(Number(BigInt($(e,!0))))}throw k.rpc.invalidParams(`Not an integer: ${String(e)}`)}function Q(e){if(null!==e&&("bigint"==typeof e||function(e){if(null==e||"function"!=typeof e.constructor)return!1;let{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}(e)))return BigInt(e.toString(10));if("number"==typeof e)return BigInt(J(e));if("string"==typeof e){if(L.test(e))return BigInt(e);if(V(e))return BigInt($(e,!0))}throw k.rpc.invalidParams(`Not an integer: ${String(e)}`)}let Y=`Coinbase Wallet SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Coinbase Smart Wallet app. 2 3Please see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.`,{checkCrossOriginOpenerPolicy:X,getCrossOriginOpenerPolicy:ee}=(()=>{let e;return{getCrossOriginOpenerPolicy:()=>void 0===e?"undefined":e,checkCrossOriginOpenerPolicy:async()=>
3{if("undefined"==typeof window){e="non-browser-env";return}try{let t=`${window.location.origin}${window.location.pathname}`,n=await fetch(t,{method:"HEAD"});if(!n.ok)throw Error(`HTTP error! status: ${n.status}`);let r=n.headers.get("Cross-Origin-Opener-Policy");e=null!=r?r:"null","same-origin"===e&&console.error(Y)}catch(t){console.error("Error checking Cross-Origin-Opener-Policy:",t.message),e="error"}}}})();async function et(e,t){let n=Object.assign(Object.assign({},e),{jsonrpc:"2.0",id:crypto.randomUUID()}),r=await window.fetch(t,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":u,"X-Cbw-Sdk-Platform":l}}),{result:a,error:i}=await r.json();if(i)throw i;return a}function en({metadata:e,preference:t}){var n,r;let{appName:a,appLogoUrl:i,appChainIds:s}=e;if("smartWalletOnly"!==t.options){let e=globalThis.coinbaseWalletExtension;if(e)return null==(n=e.setAppInfo)||n.call(e,a,i,s,t),e}let o=function(){var e,t;try{let n=globalThis;return null!=(e=n.ethereum)?e:null==(t=n.top)?void 0:t.ethereum}catch(e){return}}();if(null==o?void 0:o.isCoinbaseBrowser)return null==(r=o.setAppInfo)||r.call(o,a,i,s,t),o}function er(e){if(e){if(!["all","smartWalletOnly","eoaOnly"].includes(e.options))throw Error(`Invalid options: ${e.options}`);if(e.attribution&&void 0!==e.attribution.auto&&void 0!==e.attribution.dataSuffix)throw Error("Attribution cannot contain both auto and dataSuffix properties");if(e.telemetry&&"boolean"!=typeof e.telemetry)throw Error("Telemetry must be a boolean")}}function ea(e){if("function"!=typeof e)throw Error("toAccount is not a function")}let ei="https://rpc.wallet.coinbase.com",es="https://www.walletlink.org";function eo(e,t,n){var r,a,i,s;window.ClientAnalytics&&(null==(r=window.ClientAnalytics)||r.logEvent(e,Object.assign(Object.assign({},t),{sdkVersion:u,appName:null!=(i=null==(a=h.config.get().metadata)?void 0:a.appName)?i:"",appOrigin:window.location.origin,appPreferredSigner:null==(s=h.config.get().preference)?void 0:s.options}),n))}!function(e){e.unknown="unknown",e.banner="banner",e.button="button",e.card="card",e.chart="chart",e.content_script="content_script",e.dropdown="dropdown",e.link="link",e.page="page",e.modal="modal",e.table="table",e.search_bar="search_bar",e.service_worker="service_worker",e.text="text",e.text_input="text_input",e.tray="tray",e.checkbox="checkbox",e.icon="icon"}(ep||(ep={})),function(e){e.unknown="unknown",e.blur="blur",e.click="click",e.change="change",e.dismiss="dismiss",e.focus="focus",e.hover="hover",e.select="select",e.measurement="measurement",e.move="move",e.process="process",e.render="render",e.scroll="scroll",e.view="view",e.search="search",e.keyPress="keyPress",e.error="error"}(eh||(eh={})),function(e){e.low="low",e.high="high"}(ef||(ef={}));let ec=({snackbarContext:e})=>{eo(`snackbar.${e}.shown`,{action:eh.render,componentType:ep.modal,snackbarContext:e},ef.high)},eu=({snackbarContext:e,snackbarAction:t})=>{eo(`snackbar.${e}.action_clicked`,{action:eh.click,componentType:ep.button,snackbarContext:e,snackbarAction:t},ef.high)};function el(){let e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode('@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}')),document.documentElement.appendChild(e)}function ed(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;n<t.length;
vendor: 9,775 bytes, line 3
3n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r);else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(r&&(r+=" "),r+=t);return r}var ep,eh,ef,em,ey,eg,eb,ew,ev,e_,ex,ek,eE,eA={},eS=[],eI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,eC=Array.isArray;function eO(e,t){for(var n in t)e[n]=t[n];return e}function eP(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function eT(e,t,n){var r,a,i,s={};for(i in t)"key"==i?r=t[i]:"ref"==i?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?em.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return ej(e,s,r,a,null)}function ej(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++eg:a,__i:-1,__u:0};return null==a&&null!=ey.vnode&&ey.vnode(i),i}function eL(e){return e.children}function eM(e,t){this.props=e,this.context=t}function eN(e,t){if(null==t)return e.__?eN(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?eN(e):null}function eD(e){(!e.__d&&(e.__d=!0)&&eb.push(e)&&!eB.__r++||ew!==ey.debounceRendering)&&((ew=ey.debounceRendering)||ev)(eB)}function eB(){var e,t,n,r,a,i,s,o;for(eb.sort(e_);e=eb.shift();)e.__d&&(t=eb.length,r=void 0,i=(a=(n=e).__v).__e,s=[],o=[],n.__P&&((r=eO({},a)).__v=a.__v+1,ey.vnode&&ey.vnode(r),ez(n.__P,r,a,n.__n,n.__P.namespaceURI,32&a.__u?[i]:null,s,null==i?eN(a):i,!!(32&a.__u),o),r.__v=a.__v,r.__.__k[r.__i]=r,eF(s,r,o),r.__e!=i&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(r)),eb.length>t&&eb.sort(e_));eB.__r=0}function eU(e,t,n,r,a,i,s,o,c,u,l){var d,p,h,f,m,y=r&&r.__k||eS,g=t.length;for(n.__d=c,function(e,t,n){var r,a,i,s,o,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r<c;r++)null!=(a=t[r])&&"boolean"!=typeof a&&"function"!=typeof a?(s=r+d,(a=e.__k[r]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?ej(null,a,null,null,null):eC(a)?ej(eL,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?ej(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,i=null,-1!==(o=a.__i=function(e,t,n,r){var a=e.key,i=e.type,s=n-1,o=n+1,c=t[n];if(null===c||c&&a==c.key&&i===c.type&&0==(131072&c.__u))return n;if(r>+(null!=c&&0==(131072&c.__u)))for(;s>=0||o<t.length;){if(s>=0){if((c=t[s])&&0==(131072&c.__u)&&a==c.key&&i===c.type)return s;s--}if(o<t.length){if((c=t[o])&&0==(131072&c.__u)&&a==c.key&&i===c.type)return o;o++}}return -1}(a,n,s,l))&&(l--,(i=n[o])&&(i.__u|=131072)),null==i||null===i.__v?(-1==o&&d--,"function"!=typeof a.type&&(a.__u|=65536)):o!==s&&(o==s-1?d--:o==s+1?d++:(o>s?d--:d++,a.__u|=65536))):a=e.__k[r]=null;if(l)for(r=0;r<u;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=eN(i)),function e(t,n,r){var a,i;if(ey.unmount&&ey.unmount(t),(a=t.ref)&&(a.current&&a.current!==t.__e||eG(a,null,n)),null!=(a=t.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){ey.__e(e,n)}a.base=a.__P=null}if(a=t.__k)for(i=0;i<a.length;i++)a[i]&&e(a[i],n,r||"function"!=typeof t.type);r||eP(t.__e),t.__c=t.__=t.__e=t.__d=void 0}(i,i))}(n,t,y),c=n.__d,d=0;d<g;d++)null!=(h=n.__k[d])&&(p=-1===h.__i?eA:y[h.__i]||eA,h.__i=d,ez(e,h,p,a,i,s,o,c,u,l),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&eG(p.ref,null,h),l.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?c=function e(t,n,r){var a,i;if("function"==typeof t.type){for(a=t.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=t,n=e(a[i],n,r));return n}t.__e!=n&&(n&&t.type&&!r.contains(n)&&(n=eN(t)),r.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8===n.nodeType);return n}(h,c,e):"function"==typeof h.type&&void 0!==h.__d?c=h.__d:f&&(c=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=c,n.__e=m}function eR(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||eI.test(t)?n:n+"px"}function eq(e,t,n,r,a){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||eR(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||eR(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=ex,e.addEventListener(t,i?eE:ek,i)):e.removeEventListener(t,i?eE:ek,i);else{if("http://www.w3.org/2000/svg"==a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function eH(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=ex++;else if(t.t<n.u)return;return n(ey.event?ey.event(t):t)}}}function ez(e,t,n,r,a,i,s,o,c,u){var l,d,p,h,f,m,y,g,b,w,v,_,x,k,E,A,S=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),i=[o=t.__e=n.__e]),(l=ey.__b)&&l(t);e:if("function"==typeof S)try{if(g=t.props,b="prototype"in S&&S.prototype.render,w=(l=S.contextType)&&r[l.__c],v=l?w?w.props.value:l.__:r,n.__c?y=(d=t.__c=n.__c).__=d.__E:(b?t.__c=d=new S(g,v):(t.__c=d=new eM(g,v),d.constructor=S,d.render=eV),w&&w.sub(d),d.props=g,d.state||(d.state={}),d.context=v,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),b&&null==d.__s&&(d.__s=d.state),b&&null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=eO({},d.__s)),eO(d.__s,S.getDerivedStateFromProps(g,d.__s))),h=d.props,f=d.state,d.__v=t,p)b&&null==S.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),b&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(b&&null==S.getDerivedStateFromProps&&g!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,v),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,v)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,v),b&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(h,f,m)})}if(d.context=v,d.props=g,d.__P=e,d.__e=!1,x=ey.__r,k=0,b){for(d.state=d.__s,d.__d=!1,x&&x(t),l=d.render(d.props,d.state,d.context),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[]}else do d.__d=!1,x&&x(t),l=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25);d.state=d.__s,null!=d.getChildContext&&(r=eO(eO({},r),d.getChildContext())),b&&!p&&null!=d.getSnapshotBeforeUpdate&&(m=d.getSnapshotBeforeUpdate(h,f)),eU(e,eC(A=null!=l&&l.type===eL&&null==l.key?l.props.children:l)?A:[A],t,n,r,a,i,s,o,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),y&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||null!=i){for(t.__u|=c?160:32;o&&8===o.nodeType&&o.nextSibling;)o=o.nextSibling;i[i.indexOf(o)]=null,t.__e=o}else t.__e=n.__e,t.__k=n.__k;ey.__e(e,t,n)}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,a,i,s,o,c){var u,l,d,p,h,f,m,y=n.props,g=t.props,b=t.type;if("svg"===b?a="http://www.w3.org/2000/svg":"math"===b?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=i){for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!b&&(b?h.localName===b:3===h.nodeType)){e=h,i[u]=null;break}}if(null==e){if(null===b)return document.createTextNode(g);e=document.createElementNS(a,b,g.is&&g),o&&(ey.__m&&ey.__m(t,i),o=!1),i=null}if(null===b)y===g||o&&e.data===g||(e.data=g);else{if(i=i&&em.call(e.childNodes),y=n.props||eA,!o&&null!=i)for(y={},u=0;u<e.attributes.length;u++)y[(h=e.attributes[u]).name]=h.value;for(u in y)if(h=y[u],"children"==u);else if("dangerouslySetInnerHTML"==u)d=h;else if(!(u in g)){if("value"==u&&"defaultValue"in g||"checked"==u&&"defaultChecked"in g)continue;eq(e,u,null,h,a)}for(u in g)h=g[u],"children"==u?p=h:"dangerouslySetInnerHTML"==u?l=h:"value"==u?f=h:"checked"==u?m=h:o&&"function"!=typeof h||y[u]===h||eq(e,u,h,y[u],a);if(l)o||d&&(l.__html===d.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(d&&(e.innerHTML=""),eU(e,eC(p)?p:[p],t,n,r,"foreignObject"===b?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:n.__k&&eN(n,0),o,c),null!=i)for(u=i.length;u--;)eP(i[u]);o||(u="value","progress"===b&&null==f?e.removeAttribute("value"):void 0===f||f===e[u]&&("progress"!==b||f)&&("option"!==b||f===y[u])||eq(e,u,f,y[u],a),u="checked",void 0!==m&&m!==e[u]&&eq(e,u,m,y[u],a))}return e}(n.__e,t,n,r,a,i,s,c,u);(l=ey.diffed)&&l(t)}function eF(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)eG(n[r],n[++r],n[++r]);ey.__c&&ey.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){ey.__e(e,t.__v)}})}function eG(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){ey.__e(e,n)}}function eV(e,t,n){return this.constructor(e,n)}function eW(e,t,n){var r,a,i,s;ey.__&&ey.__(e,t),a=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],s=[],ez(t,e=(!r&&n||t).__k=eT(eL,null,[e]),a||eA,eA,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?em.call(t.childNodes):null,i,!r&&n?n:a?a.__e:t.firstChild,r,s),eF(i,e,s)}em=eS.slice,ey={__e:function(e,t,n,r){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&null!=i.getDerivedStateFromError&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),null!=a.c
vendor: 4,839 bytes, line 3
3omponentDidCatch&&(a.componentDidCatch(e,r||{}),s=a.__d),s)return a.__E=a}catch(t){e=t}throw e}},eg=0,eM.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=eO({},this.state),"function"==typeof e&&(e=e(eO({},n),this.props)),e&&eO(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),eD(this))},eM.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),eD(this))},eM.prototype.render=eL,eb=[],ev="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e_=function(e,t){return e.__v.__b-t.__v.__b},eB.__r=0,ex=0,ek=eH(!1),eE=eH(!0);var e$,eK,eZ,eJ,eQ=0,eY=[],eX=ey,e0=eX.__b,e1=eX.__r,e2=eX.diffed,e3=eX.__c,e5=eX.unmount,e6=eX.__;function e4(e,t){eX.__h&&eX.__h(eK,e,eQ||t),eQ=0;var n=eK.__H||(eK.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function e8(e,t,n){var r=e4(e$++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):tn(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=eK,!eK.u)){var a=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter(function(e){return!!e.__c});if(a.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var s=!1;return a.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};eK.u=!0;var i=eK.shouldComponentUpdate,s=eK.componentWillUpdate;eK.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,a(e,t,n),i=r}s&&s.call(this,e,t,n)},eK.shouldComponentUpdate=a}return r.__N||r.__}function e7(){for(var e;e=eY.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(te),e.__H.__h.forEach(tt),e.__H.__h=[]}catch(t){e.__H.__h=[],eX.__e(t,e.__v)}}eX.__b=function(e){eK=null,e0&&e0(e)},eX.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),e6&&e6(e,t)},eX.__r=function(e){e1&&e1(e),e$=0;var t=(eK=e.__c).__H;t&&(eZ===eK?(t.__h=[],eK.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0})):(t.__h.forEach(te),t.__h.forEach(tt),t.__h=[],e$=0)),eZ=eK},eX.diffed=function(e){e2&&e2(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==eY.push(t)&&eJ===eX.requestAnimationFrame||((eJ=eX.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),e9&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);e9&&(t=requestAnimationFrame(n))})(e7)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.i=void 0})),eZ=eK=null},eX.__c=function(e,t){t.some(function(e){try{e.__h.forEach(te),e.__h=e.__h.filter(function(e){return!e.__||tt(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],eX.__e(n,e.__v)}}),e3&&e3(e,t)},eX.unmount=function(e){e5&&e5(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{te(e)}catch(e){t=e}}),n.__H=void 0,t&&eX.__e(t,n.__v))};var e9="function"==typeof requestAnimationFrame;function te(e){var t=eK,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),eK=t}function tt(e){var t=eK;e.__c=e.__(),eK=t}function tn(e,t){return"function"==typeof t?t(e):t}function tr(){var e,t;return null!=(t=null==(e=null==window?void 0:window.matchMedia)?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)&&t}class ta{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=tr()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&eW(eT("div",null,eT(ti,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,t])=>eT(ts,Object.assign({},t,{key:e}))))),this.root)}}let ti=e=>eT("div",{class:ed("-cbwsdk-snackbar-container")},eT("style",null,".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;
3cursor: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}"),eT("div",{class:"-cbwsdk-snackbar"},e.children)),ts=({autoExpand:e,message:t,menuItems:n})=>{let[r,a]=(eQ=1,e8(tn,!0)),[i,s]=(eQ=1,e8(tn,null!=e&&e));return!function(e,t){var n,r,a=e4(e$++,3);!eX.__s&&(n=a.__H,r=void 0,!n||n.length!==r.length||r.some(function(e,t){return e!==n[t]}))&&(a.__=e,a.i=void 0,eK.__H.__h.push(a))}(()=>{let e=[window.setTimeout(()=>{a(!1)},1),window.setTimeout(()=>{s(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),eT("div",{class:ed("-cbwsdk-snackbar-instance",r&&"-cbwsdk-snackbar-instance-hidden",i&&"-cbwsdk-snackbar-instance-expanded")},eT("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{s(!i)}},eT("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",eT("div",{class:"-cbwsdk-snackbar-instance-header-message"},t),eT("div",{class:"-gear-container"},!i&&eT("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eT("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),eT("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwu
3NTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&eT("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map((e,t)=>eT("div",{class:ed("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},eT("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eT("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),eT("span",{class:ed("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info)))))},to="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";class tc{constructor(){this.attached=!1,this.snackbar=new ta}attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,el()}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:to,defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}let tu={isRed:!1,info:"Retry",svgWidth:"10",svgHeight:"11",path:to,defaultFillRule:"evenodd",defaultClipRule:"evenodd"},tl=null;function td(){if(!tl){let e=document.createElement("div");e.className="-cbwsdk-css-reset",document.body.appendChild(e),(tl=new ta).attach(e)}return tl}class tp{constructor({url:e="https://keys.coinbase.com/connect",metadata:t,preference:n}){this.popup=null,this.listeners=new Map,this.postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)},this.postRequestAndWaitForResponse=async e=>{let t=this.onMessage(({requestId:t})=>t===e.id);return this.postMessage(e),await t},this.onMessage=async e=>new Promise((t,n)=>{let r=n=>{if(n.origin!==this.url.origin)return;let a=n.data;e(a)&&(t(a),window.removeEventListener("message",r),this.listeners.delete(r))};window.addEventListener("message",r),this.listeners.set(r,{reject:n})}),this.disconnect=()=>{!function(e){e&&!e.closed&&e.close()}(this.popup),this.popup=null,this.listeners.forEach(({reject:e},t)=>{e(k.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(eo("communicator.popup_setup.started",{action:eh.unknown,componentType:ep.unknown},ef.high),this.popup=await function(e){let t=(window.innerWidth-420)/2+window.screenX,n=(window.innerHeight-700)/2+window.screenY;function r(){let r=`wallet_${crypto.randomUUID()}`,a=window.open(e,r,`width=420, height=700, left=${t}, top=${n}`);return(null==a||a.focus(),a)?a:null}var a=e;for(let[e,t]of Object.entries({sdkName:l,sdkVersion:u,origin:window.location.origin,coop:ee()}))a.searchParams.has(e)||a.searchParams.append(e,t.toString());let i=r();if(!i){let e=td();return new Promise((t,n)=>{ec({snackbarContext:"popup_blocked"}),e.presentItem({autoExpand:!0,message:"Popup was blocked. Try again.",menuItems:[Object.assign(Object.assign({},tu),{onClick:()=>{eu({snackbarContext:"popup_blocked",snackbarAction:"confirm"}),(i=r())?t(i):n(k.rpc.internal("Popup window was blocked")),e.clear()}})]})})}return Promise.resolve(i)}(this.url),this.onMessage(({event:e})=>"PopupUnload"===e).then(()=>{this.disconnect(),eo("communicator.popup_unload.received",{action:eh.unknown,componentType:ep.unknown},ef.high)}).catch(()=>{}),this.onMessage(({event:e})=>"PopupLoaded"===e).then(e=>{this.postMessage({requestId:e.id,data:{version:u,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>
3{if(!this.popup)throw k.rpc.internal();return eo("communicator.popup_setup.completed",{action:eh.unknown,componentType:ep.unknown},ef.high),this.popup})),this.url=new URL(e),this.metadata=t,this.preference=n}}function th(e){return void 0!==e.errorMessage}var tf=n(68463);class tm extends tf.b{}class ty{constructor(e,t){this.scope=e,this.module=t}storeObject(e,t){this.setItem(e,JSON.stringify(t))}loadObject(e){let t=this.getItem(e);return t?JSON.parse(t):void 0}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),t=[];for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);"string"==typeof r&&r.startsWith(e)&&t.push(r)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new ty("CBWSDK").clear(),new ty("walletlink").clear()}}let tg=c(()=>({correlationIds:new Map})),tb={get:e=>tg.getState().correlationIds.get(e),set:(e,t)=>{tg.setState(n=>{let r=new Map(n.correlationIds);return r.set(e,t),{correlationIds:r}})},delete:e=>{tg.setState(t=>{let n=new Map(t.correlationIds);return n.delete(e),{correlationIds:n}})},clear:()=>{tg.setState({correlationIds:new Map})}};var tw=n(34561),tv=n(11914),t_=n(32108);let tx=e=>"message"in e&&"string"==typeof e.message?e.message:"";var tk=n(91053),tE=n(65108),tA=n(73037),tS=n(95089),tI=n(35471),tC=n(97152),tO=n(64664),tP=n(72757),tT=n(4274),tj=n(13933),tL=n(35326),tM=n(41343);class tN extends tj.C{constructor({cause:e}){super("Smart Account is not deployed.",{cause:e,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(tN,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class tD extends tj.C{constructor({cause:e,data:t,message:n}={}){let r=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}Object.defineProperty(tD,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521}),Object.defineProperty(tD,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class tB extends tj.C{constructor({cause:e}){super("Failed to send funds to beneficiary.",{cause:e,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(tB,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class tU extends tj.C{constructor({cause:e}){super("Gas value overflowed.",{cause:e,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(
vendor: 8,515 bytes, line 3
3Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(tU,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class tR extends tj.C{constructor({cause:e}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:e,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(tR,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class tq extends tj.C{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Failed to simulate deployment for Smart Account.",{cause:e,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)","- Smart Account deployment execution reverted with an error\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`].filter(Boolean),name:"InitCodeFailedError"})}}Object.defineProperty(tq,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa13/});class tH extends tj.C{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Smart Account initialization implementation did not create an account.",{cause:e,metaMessages:["This could arise when:","- `factory`/`factoryData` or `initCode` properties are invalid","- Smart Account initialization implementation is incorrect\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`].filter(Boolean),name:"InitCodeMustCreateSenderError"})}}Object.defineProperty(tH,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa15/});class tz extends tj.C{constructor({cause:e,factory:t,factoryData:n,initCode:r,sender:a}){super("Smart Account initialization implementation does not return the expected sender.",{cause:e,metaMessages:["This could arise when:","Smart Account initialization implementation does not return a sender address\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`,a&&`sender: ${a}`].filter(Boolean),name:"InitCodeMustReturnSenderError"})}}Object.defineProperty(tz,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa14/});class tF extends tj.C{constructor({cause:e}){super("Smart Account does not have sufficient funds to execute the User Operation.",{cause:e,metaMessages:["This could arise when:","- the Smart Account does not have sufficient funds to cover the required prefund, or","- a Paymaster was not provided"].filter(Boolean),name:"InsufficientPrefundError"})}}Object.defineProperty(tF,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa21/});class tG extends tj.C{constructor({cause:e}){super("Bundler attempted to call an invalid function on the EntryPoint.",{cause:e,name:"InternalCallOnlyError"})}}Object.defineProperty(tG,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa92/});class tV extends tj.C{constructor({cause:e}){super("Bundler used an invalid aggregator for handling aggregated User Operations.",{cause:e,name:"InvalidAggregatorError"})}}Object.defineProperty(tV,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa96/});class tW extends tj.C{constructor({cause:e,nonce:t}){super("Invalid Smart Account nonce used for User Operation.",{cause:e,metaMessages:[t&&`nonce: ${t}`].filter(Boolean),name:"InvalidAccountNonceError"})}}Object.defineProperty(tW,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa25/});class t$ extends tj.C{constructor({cause:e}){super("Bundler has not set a beneficiary address.",{cause:e,name:"InvalidBeneficiaryError"})}}Object.defineProperty(t$,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa90/});class tK extends tj.C{constructor({cause:e}){super("Invalid fields set on User Operation.",{cause:e,name:"InvalidFieldsError"})}}Object.defineProperty(tK,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class tZ extends tj.C{constructor({cause:e,paymasterAndData:t}){super("Paymaster properties provided are invalid.",{cause:e,metaMessages:["This could arise when:","- the `paymasterAndData` property is of an incorrect length\n",t&&`paymasterAndData: ${t}`].filter(Boolean),name:"InvalidPaymasterAndDataError"})}}Object.defineProperty(tZ,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa93/});class tJ extends tj.C{constructor({cause:e}){super("Paymaster deposit for the User Operation is too low.",{cause:e,metaMessages:["This could arise when:","- the Paymaster has deposited less than the expected amount via the `deposit` function"].filter(Boolean),name:"PaymasterDepositTooLowError"})}}Object.defineProperty(tJ,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32508}),Object.defineProperty(tJ,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa31/});class tQ extends tj.C{constructor({cause:e}){super("The `validatePaymasterUserOp` function on the Paymaster reverted.",{cause:e,name:"PaymasterFunctionRevertedError"})}}Object.defineProperty(tQ,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa33/});class tY extends tj.C{constructor({cause:e}){super("The Paymaster contract has not been deployed.",{cause:e,name:"PaymasterNotDeployedError"})}}Object.defineProperty(tY,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa30/});class tX extends tj.C{constructor({cause:e}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:e,name:"PaymasterRateLimitError"})}}Object.defineProperty(tX,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32504});class t0 extends tj.C{constructor({cause:e}){super("UserOperation rejected because paymaster (or signature aggregator) stake or unstake-delay is too low.",{cause:e,name:"PaymasterStakeTooLowError"})}}Object.defineProperty(t0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32505});class t1 extends tj.C{constructor({cause:e}){super("Paymaster `postOp` function reverted.",{cause:e,name:"PaymasterPostOpFunctionRevertedError"})}}Object.defineProperty(t1,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa50/});class t2 extends tj.C{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Smart Account has already been deployed.",{cause:e,metaMessages:["Remove the following properties and try again:",t&&"`factory`",n&&"`factoryData`",r&&"`initCode`"].filter(Boolean),name:"SenderAlreadyConstructedError"})}}Object.defineProperty(t2,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa10/});class t3 extends tj.C{constructor({cause:e}){super("UserOperation rejected because account signature check failed (or paymaster signature, if the paymaster uses its data as signature).",{cause:e,name:"SignatureCheckFailedError"})}}Object.defineProperty(t3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32507});class t5 extends tj.C{constructor({cause:e}){super("The `validateUserOp` function on the Smart Account reverted.",{cause:e,name:"SmartAccountFunctionRevertedError"})}}Object.defineProperty(t5,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa23/});class t6 extends tj.C{constructor({cause:e}){super("UserOperation rejected because account specified unsupported signature aggregator.",{cause:e,name:"UnsupportedSignatureAggregatorError"})}}Object.defineProperty(t6,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32506});class t4 extends tj.C{constructor({cause:e}){super("User Operation expired.",{cause:e,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validateUserOp` on the Smart Account are not satisfied"].filter(Boolean),name:"UserOperationExpiredError"})}}Object.defineProperty(t4,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa22/});class t8 extends tj.C{constructor({cause:e}){super("Paymaster for User Operation expired.",{cause:e,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validatePaymasterUserOp` on the Paymaster are not satisfied"].filter(Boolean),name:"UserOperationPaymasterExpiredError"})}}Object.defineProperty(t8,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa32/});class t7 extends tj.C{constructor({cause:e}){super("Signature provided for the User Operation is invalid.",{cause:e,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Smart Account"].filter(Boolean),name:"UserOperationSignatureError"})}}Object.defineProperty(t7,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa24/});class t9 extends tj.C{constructor({cause:e}
3){super("Signature provided for the User Operation is invalid.",{cause:e,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Paymaster"].filter(Boolean),name:"UserOperationPaymasterSignatureError"})}}Object.defineProperty(t9,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa34/});class ne extends tj.C{constructor({cause:e}){super("User Operation rejected by EntryPoint's `simulateValidation` during account creation or validation.",{cause:e,name:"UserOperationRejectedByEntryPointError"})}}Object.defineProperty(ne,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32500});class nt extends tj.C{constructor({cause:e}){super("User Operation rejected by Paymaster's `validatePaymasterUserOp`.",{cause:e,name:"UserOperationRejectedByPaymasterError"})}}Object.defineProperty(nt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32501});class nn extends tj.C{constructor({cause:e}){super("User Operation rejected with op code validation error.",{cause:e,name:"UserOperationRejectedByOpCodeError"})}}Object.defineProperty(nn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32502});class nr extends tj.C{constructor({cause:e}){super("UserOperation out of time-range: either wallet or paymaster returned a time-range, and it is already expired (or will expire soon).",{cause:e,name:"UserOperationOutOfTimeRangeError"})}}Object.defineProperty(nr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32503});class na extends tj.C{constructor({cause:e}){super(`An error occurred while executing user operation: ${e?.shortMessage}`,{cause:e,name:"UnknownBundlerError"})}}class ni extends tj.C{constructor({cause:e}){super("User Operation verification gas limit exceeded.",{cause:e,metaMessages:["This could arise when:","- the gas used for verification exceeded the `verificationGasLimit`"].filter(Boolean),name:"VerificationGasLimitExceededError"})}}Object.defineProperty(ni,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa40/});
vendor: 4,714 bytes, line 3
3class ns extends tj.C{constructor({cause:e}){super("User Operation verification gas limit is too low.",{cause:e,metaMessages:["This could arise when:","- the `verificationGasLimit` is too low to verify the User Operation"].filter(Boolean),name:"VerificationGasLimitTooLowError"})}}Object.defineProperty(ns,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa41/});var no=n(50879),nc=n(42503);class nu extends tj.C{constructor(e,{callData:t,callGasLimit:n,docsPath:r,factory:a,factoryData:i,initCode:s,maxFeePerGas:o,maxPriorityFeePerGas:c,nonce:u,paymaster:l,paymasterAndData:d,paymasterData:p,paymasterPostOpGasLimit:h,paymasterVerificationGasLimit:f,preVerificationGas:m,sender:y,signature:g,verificationGasLimit:b}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",(0,no.aO)({callData:t,callGasLimit:n,factory:a,factoryData:i,initCode:s,maxFeePerGas:void 0!==o&&`${(0,nc.Q)(o)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,nc.Q)(c)} gwei`,nonce:u,paymaster:l,paymasterAndData:d,paymasterData:p,paymasterPostOpGasLimit:h,paymasterVerificationGasLimit:f,preVerificationGas:m,sender:y,signature:g,verificationGasLimit:b})].filter(Boolean),name:"UserOperationExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class nl extends tj.C{constructor({hash:e}){super(`User Operation receipt with hash "${e}" could not be found. The User Operation may not have been processed yet.`,{name:"UserOperationReceiptNotFoundError"})}}class nd extends tj.C{constructor({hash:e}){super(`User Operation with hash "${e}" could not be found.`,{name:"UserOperationNotFoundError"})}}class np extends tj.C{constructor({hash:e}){super(`Timed out while waiting for User Operation with hash "${e}" to be confirmed.`,{name:"WaitForUserOperationReceiptTimeoutError"})}}let nh=[tD,tK,tJ,tX,t0,t3,t6,nr,ne,nt,nn];function nf(e,{calls:t,docsPath:n,...r}){return new nu((()=>{let n=function(e,t){let n=(e.details||"").toLowerCase();if(tN.message.test(n))return new tN({cause:e});if(tB.message.test(n))return new tB({cause:e});if(tU.message.test(n))return new tU({cause:e});if(tR.message.test(n))return new tR({cause:e});if(tq.message.test(n))return new tq({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(tH.message.test(n))return new tH({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(tz.message.test(n))return new tz({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode,sender:t.sender});if(tF.message.test(n))return new tF({cause:e});if(tG.message.test(n))return new tG({cause:e});if(tW.message.test(n))return new tW({cause:e,nonce:t.nonce});if(tV.message.test(n))return new tV({cause:e});if(t$.message.test(n))return new t$({cause:e});if(tZ.message.test(n))return new tZ({cause:e});if(tJ.message.test(n))return new tJ({cause:e});if(tQ.message.test(n))return new tQ({cause:e});if(tY.message.test(n))return new tY({cause:e});if(t1.message.test(n))return new t1({cause:e});if(t5.message.test(n))return new t5({cause:e});if(t2.message.test(n))return new t2({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(t4.message.test(n))return new t4({cause:e});if(t8.message.test(n))return new t8({cause:e});if(t9.message.test(n))return new t9({cause:e});if(t7.message.test(n))return new t7({cause:e});if(ni.message.test(n))return new ni({cause:e});if(ns.message.test(n))return new ns({cause:e});let r=e.walk(e=>nh.some(t=>t.code===e.code));if(r){if(r.code===tD.code)return new tD({cause:e,data:r.data,message:r.details});if(r.code===tK.code)return new tK({cause:e});if(r.code===tJ.code)return new tJ({cause:e});if(r.code===tX.code)return new tX({cause:e});if(r.code===t0.code)return new t0({cause:e});if(r.code===t3.code)return new t3({cause:e});if(r.code===t6.code)return new t6({cause:e});if(r.code===nr.code)return new nr({cause:e});if(r.code===ne.code)return new ne({cause:e});if(r.code===nt.code)return new nt({cause:e});if(r.code===nn.code)return new nn({cause:e})}return new na({cause:e})}(e,r);if(t&&n instanceof tD){let e,r=(n.walk(t=>{if("string"==typeof t.data||"string"==typeof t.data?.revertData||!(t instanceof tj.C)&&"string"==typeof t.message){let n=(t.data?.revertData||t.data||t.message).match?.(/(0x[A-Za-z0-9]*)/);if(n)return e=n[1],!0}return!1}),e),a=t?.filter(e=>e.abi);if(r&&a.length>0)return function(e){let{calls:t,revertData:n}=e,{abi:r,functionName:a,args:i,to:s}=(()=>{let e=t?.filter(e=>!!e.abi);if(1===e.length)return e[0];let r=e.filter(e=>{try{return!!(0,tM.W)({abi:e.abi,data:n})}catch{return!1}});return 1===r.length?r[0]:{abi:[],functionName:e.reduce((e,t)=>
vendor: 4,060 bytes, line 3
3`${e?`${e} | `:""}${t.functionName}`,""),args:void 0,to:void 0}})(),o="0x"===n?new tL.rR({functionName:a}):new tL.M({abi:r,data:n,functionName:a});return new tL.bG(o,{abi:r,args:i,contractAddress:s,functionName:a})}({calls:a,revertData:r})}return n})(),{docsPath:n,...r})}var nm=n(72427);function ny(e){var t;let n={};return void 0!==e.callData&&(n.callData=e.callData),void 0!==e.callGasLimit&&(n.callGasLimit=(0,tw.cK)(e.callGasLimit)),void 0!==e.factory&&(n.factory=e.factory),void 0!==e.factoryData&&(n.factoryData=e.factoryData),void 0!==e.initCode&&(n.initCode=e.initCode),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=(0,tw.cK)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=(0,tw.cK)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=(0,tw.cK)(e.nonce)),void 0!==e.paymaster&&(n.paymaster=e.paymaster),void 0!==e.paymasterAndData&&(n.paymasterAndData=e.paymasterAndData||"0x"),void 0!==e.paymasterData&&(n.paymasterData=e.paymasterData),void 0!==e.paymasterPostOpGasLimit&&(n.paymasterPostOpGasLimit=(0,tw.cK)(e.paymasterPostOpGasLimit)),void 0!==e.paymasterSignature&&(n.paymasterSignature=e.paymasterSignature),void 0!==e.paymasterVerificationGasLimit&&(n.paymasterVerificationGasLimit=(0,tw.cK)(e.paymasterVerificationGasLimit)),void 0!==e.preVerificationGas&&(n.preVerificationGas=(0,tw.cK)(e.preVerificationGas)),void 0!==e.sender&&(n.sender=e.sender),void 0!==e.signature&&(n.signature=e.signature),void 0!==e.verificationGasLimit&&(n.verificationGasLimit=(0,tw.cK)(e.verificationGasLimit)),void 0!==e.authorization&&(n.eip7702Auth={address:(t=e.authorization).address,chainId:(0,tw.cK)(t.chainId),nonce:(0,tw.cK)(t.nonce),r:t.r?(0,tw.cK)(BigInt(t.r),{size:32}):(0,nm.eV)("0x",{size:32}),s:t.s?(0,tw.cK)(BigInt(t.s),{size:32}):(0,nm.eV)("0x",{size:32}),yParity:t.yParity?(0,tw.cK)(t.yParity,{size:1}):(0,nm.eV)("0x",{size:32})}),n}var ng=n(7799),nb=n(98292),nw=n(30931),nv=n(40290);async function n_(e,t){let{chainId:n,entryPointAddress:r,context:a,...i}=t,s=ny(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,(0,tw.cK)(n),a]});return{...u,...o&&{paymasterPostOpGasLimit:(0,tv.uU)(o)},...c&&{paymasterVerificationGasLimit:(0,tv.uU)(c)}}}async function nx(e,t){let{chainId:n,entryPointAddress:r,context:a,...i}=t,s=ny(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterStubData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,(0,tw.cK)(n),a]});return{...u,...o&&{paymasterPostOpGasLimit:(0,tv.uU)(o)},...c&&{paymasterVerificationGasLimit:(0,tv.uU)(c)}}}let nk=["factory","fees","gas","paymaster","nonce","signature","authorization"];async function nE(e,t){let n,{account:r=e.account,dataSuffix:a="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,parameters:i=nk,stateOverride:s}=t;if(!r)throw new tO.T;let o=(0,tC.J)(r),c=t.paymaster??e?.paymaster,u="string"==typeof c?c:void 0,{getPaymasterStubData:l,getPaymasterData:d}=(()=>{if(!0===c)return{getPaymasterStubData:t=>(0,tP.T)(e,nx,"getPaymasterStubData")(t),getPaymasterData:t=>(0,tP.T)(e,n_,"getPaymasterData")(t)};if("object"==typeof c){let{getPaymasterStubData:e,getPaymasterData:t}=c;return{getPaymasterStubData:t&&e?e:t,getPaymasterData:t&&e?t:void 0}}return{getPaymasterStubData:void 0,getPaymasterData:void 0}})(),p=t.paymasterContext?t.paymasterContext:e?.paymasterContext,h={...t,paymaster:u,sender:o.address},[f,m,y,g,b]=await Promise.all([(async()=>t.calls?o.encodeCalls(t.calls.map(e=>e.abi?{data:(0,nw.p)(e),to:e.to,value:e.value}:e)):t.callData)(),(async()=>{if(!i.includes("factory"))return;if(t.initCode)return{initCode:t.initCode};if(t.factory&&t.factoryData)return{factory:t.factory,factoryData:t.factoryData};let{factory:e,factoryData:n}=await o.getFactoryArgs();
3return"0.6"===o.entryPoint.version?{initCode:e&&n?(0,nv.xW)([e,n]):void 0}:{factory:e,factoryData:n}})(),(async()=>{if(i.includes("fees")){if("bigint"==typeof t.maxFeePerGas&&"bigint"==typeof t.maxPriorityFeePerGas)return h;if(e?.userOperation?.estimateFeesPerGas){let t=await e.userOperation.estimateFeesPerGas({account:o,bundlerClient:e,userOperation:h});return{...h,...t}}try{let n=e.client??e,r=await (0,tP.T)(n,nb._,"estimateFeesPerGas")({chain:n.chain,type:"eip1559"});return{maxFeePerGas:"bigint"==typeof t.maxFeePerGas?t.maxFeePerGas:BigInt(2n*r.maxFeePerGas),maxPriorityFeePerGas:"bigint"==typeof t.maxPriorityFeePerGas?t.maxPriorityFeePerGas:BigInt(2n*r.maxPriorityFeePerGas)}}catch{return}}})(),(async()=>{if(i.includes("nonce"))return"bigint"==typeof t.nonce?t.nonce:o.getNonce()})(),(async()=>{if(i.includes("authorization")){if("object"==typeof t.authorization)return t.authorization;if(o.authorization&&!await o.isDeployed())return{...await (0,ng.h)(o.client,o.authorization),r:"0xfffffffffffffffffffffffffffffff000000000000000000000000000000000",s:"0x7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",yParity:1}}})()]);async function w(){return n||(e.chain?e.chain.id:n=await (0,tP.T)(e,tI.T,"getChainId")({}))}void 0!==f&&(h.callData=a?(0,nv.xW)([f,a]):f),void 0!==m&&(h={...h,...m}),void 0!==y&&(h={...h,...y}),void 0!==g&&(h.nonce=g),void 0!==b&&(h.authorization=b),i.includes("signature")&&(void 0!==t.signature?h.signature=t.signature:h.signature=await o.getStubSignature(h)),"0.6"!==o.entryPoint.version||h.initCode||(h.initCode="0x");let v=!1;if(i.includes("paymaster")&&l&&!u&&!t.paymasterAndData){let{isFinal:e=!1,sponsor:t,...n}=await l({chainId:await w(),entryPointAddress:o.entryPoint.address,context:p,...h});v=e,h={...h,...n}}if("0.6"!==o.entryPoint.version||h.paymasterAndData||(h.paymasterAndData="0x"),i.includes("gas")){if(o.userOperation?.estimateGas){let e=await o.userOperation.estimateGas(h);h={...h,...e}}if(void 0===h.callGasLimit||void 0===h.preVerificationGas||void 0===h.verificationGasLimit||h.paymaster&&void 0===h.paymasterPostOpGasLimit||h.paymaster&&void 0===h.paymasterVerificationGasLimit){let t=await (0,tP.T)(e,nA,"estimateUserOperationGas")({account:o,callGasLimit:0n,preVerificationGas:0n,verificationGasLimit:0n,stateOverride:s,...h.paymaster?{paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n}:{},...h});h={...h,callGasLimit:h.callGasLimit??t.callGasLimit,preVerificationGas:h.preVerificationGas??t.preVerificationGas,verificationGasLimit:h.verificationGasLimit??t.verificationGasLimit,paymasterPostOpGasLimit:h.paymasterPostOpGasLimit??t.paymasterPostOpGasLimit,paymasterVerificationGasLimit:h.paymasterVerificationGasLimit??t.paymasterVerificationGasLimit}}}if(i.includes("paymaster")&&d&&!u&&!t.paymasterAndData&&!v){let e=await d({chainId:await w(),entryPointAddress:o.entryPoint.address,context:p,...h});h={...h,...e}}return delete h.calls,delete h.parameters,delete h.paymasterContext,"string"!=typeof h.paymaster&&delete h.paymaster,h}async function nA(e,t){let{account:n=e.account,entryPointAddress:r,stateOverride:a}=t;if(!n&&!t.sender)throw new tO.T;let i=n?(0,tC.J)(n):void 0,s=(0,tT.yH)(a),o=i?await (0,tP.T)(e,nE,"prepareUserOperation")({...t,parameters:["authorization","factory","fees","nonce","paymaster","signature"]}):t;try{let t=[ny(o),r??i?.entryPoint?.address];var c=await e.request({method:"eth_estimateUserOperationGas",params:s?[...t,s]:[...t]});let n={};return c.callGasLimit&&(n.callGasLimit=BigInt(c.callGasLimit)),c.preVerificationGas&&(n.preVerificationGas=BigInt(c.preVerificationGas)),c.verificationGasLimit&&(n.verificationGasLimit=BigInt(c.verificationGasLimit)),c.paymasterPostOpGasLimit&&(n.paymasterPostOpGasLimit=BigInt(c.paymasterPostOpGasLimit)),c.paymasterVerificationGasLimit&&(n.paymasterVerificationGasLimit=BigInt(c.paymasterVerificationGasLimit)),n}catch(n){let e=t.calls;throw nf(n,{...o,...e?{calls:e}:{}})}}async function nS(e,{hash:t}){let n=await e.request({method:"eth_getUserOperationByHash",params:[t]},{dedupe:!0});if(!n)throw new nd({hash:t});let{blockHash:r,blockNumber:a,entryPoint:i,transactionHash:s,userOperation:o}=n;
3return{blockHash:r,blockNumber:BigInt(a),entryPoint:i,transactionHash:s,userOperation:function(e){let t={...e};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.maxFeePerGas&&(t.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.nonce&&(t.nonce=BigInt(e.nonce)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),t}(o)}}var nI=n(52623),nC=n(90523);async function nO(e,{hash:t}){let n=await e.request({method:"eth_getUserOperationReceipt",params:[t]},{dedupe:!0});if(!n)throw new nl({hash:t});let r={...n};return n.actualGasCost&&(r.actualGasCost=BigInt(n.actualGasCost)),n.actualGasUsed&&(r.actualGasUsed=BigInt(n.actualGasUsed)),n.logs&&(r.logs=n.logs.map(e=>(0,nI.e)(e))),n.receipt&&(r.receipt=(0,nC.uL)(r.receipt)),r}async function nP(e,t){let{account:n=e.account,entryPointAddress:r}=t;if(!n&&!t.sender)throw new tO.T;let a=n?(0,tC.J)(n):void 0,i=a?await (0,tP.T)(e,nE,"prepareUserOperation")(t):t,s=t.signature||await a?.signUserOperation?.(i),o=ny({...i,signature:s});try{return await e.request({method:"eth_sendUserOperation",params:[o,r??a?.entryPoint?.address]},{retryCount:0})}catch(n){let e=t.calls;throw nf(n,{...i,...e?{calls:e}:{},signature:s})}}var nT=n(87639),nj=n(94788),nL=n(59350);function nM(e){return{estimateUserOperationGas:t=>nA(e,t),getChainId:()=>(0,tI.T)(e),getSupportedEntryPoints:()=>e.request({method:"eth_supportedEntryPoints"}),getUserOperation:t=>nS(e,t),getUserOperationReceipt:t=>nO(e,t),prepareUserOperation:t=>nE(e,t),sendUserOperation:t=>nP(e,t),waitForUserOperationReceipt:t=>(function(e,t){let{hash:n,pollingInterval:r=e.pollingInterval,retryCount:a,timeout:i=12e4}=t,s=0,o=(0,nL.A)(["waitForUserOperationReceipt",e.uid,n]);return new Promise((t,c)=>{let u=(0,nT.lB)(o,{resolve:t,reject:c},t=>{let o=e=>{l(),e(),u()},c=i?setTimeout(()=>o(()=>t.reject(new np({hash:n}))),i):void 0,l=(0,nj.w)(async()=>{a&&s>=a&&(clearTimeout(c),o(()=>t.reject(new np({hash:n}))));try{let r=await (0,tP.T)(e,nO,"getUserOperationReceipt")({hash:n});clearTimeout(c),o(()=>t.resolve(r))}catch(e){"UserOperationReceiptNotFoundError"!==e.name&&(clearTimeout(c),o(()=>t.reject(e)))}s++},{emitOnBegin:!0,interval:r});return l})})})(e,t)}}let nN=c(()=>({}));function nD(e){e.forEach(e=>{var t,n,r,a,i,s,o,c;if(!e.rpcUrl)return;let u=(0,tk.x)({id:e.id,rpcUrls:{default:{http:[e.rpcUrl]}},name:null!=(n=null==(t=e.nativeCurrency)?void 0:t.name)?n:"",nativeCurrency:{name:null!=(a=null==(r=e.nativeCurrency)?void 0:r.name)?a:"",symbol:null!=(s=null==(i=e.nativeCurrency)?void 0:i.symbol)?s:"",decimals:null!=(c=null==(o=e.nativeCurrency)?void 0:o.decimal)?c:18}}),l=(0,tE.l)({chain:u,transport:(0,tA.L)(e.rpcUrl)}),d=function(e){let{client:t,dataSuffix:n,key:r="bundler",name:a="Bundler Client",paymaster:i,paymasterContext:s,transport:o,userOperation:c}=e;return Object.assign((0,tS.UU)({...e,chain:e.chain??t?.chain,key:r,name:a,transport:o,type:"bundlerClient"}),{client:t,dataSuffix:n??t?.dataSuffix,paymaster:i,paymasterContext:s,userOperation:c}).extend(nM)}({client:l,transport:(0,tA.L)(e.rpcUrl)});nN.setState({[e.id]:{client:l,bundlerClient:d}})})}function nB(e){var t;return null==(t=nN.getState()[e])?void 0:t.client}function nU(e,t,n){if(null==e)throw null!=t?t:k.rpc.invalidParams({message:null!=n?n:"value must be present",data:e})}function nR(e,t){if(!Array.isArray(e))throw k.rpc.invalidParams({message:null!=t?t:"value must be an array",data:e})}var nq=n(24784),nH=n(60587);function nz(e){if("object"!=typeof e||null===e)throw k.rpc.internal("sub account info is not an object");if(!("address"in e))throw k.rpc.internal("sub account is invalid");if("address"in e&&"string"==typeof e.address&&!(0,nq.P)(e.address))throw k.rpc.internal("sub account address is invalid");if("factory"in e&&"string"==typeof e.factory&&!(0,nq.P)(e.factory))throw k.rpc.internal("sub account factory address is invali
3d");if("factoryData"in e&&"string"==typeof e.factoryData&&!(0,nH.q)(e.factoryData))throw k.rpc.internal("sub account factory data is invalid")}async function nF(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function nG(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function nV(e,t){let n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,new TextEncoder().encode(t));return{iv:n,cipherText:r}}async function nW(e,{iv:t,cipherText:n}){let r=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,n);return new TextDecoder().decode(r)}function n$(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function nK(e,t){let n=n$(e);return D(new Uint8Array(await crypto.subtle.exportKey(n,t)))}async function nZ(e,t){let n=n$(e),r=B(t).buffer;return await crypto.subtle.importKey(n,new Uint8Array(r),{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function nJ(e,t){return nV(t,JSON.stringify(e,(e,t)=>t instanceof Error?Object.assign(Object.assign({},t.code?{code:t.code}:{}),{message:t.message}):t))}async function nQ(e,t){return JSON.parse(await nW(t,e))}function nY(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function nX(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function n0(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}let n1="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,n2=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),n3=(e,t)=>e<<32-t|e>>>t;function n5(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),nX(e),e}class n6{clone(){return this._cloneInto()}}function n4(e=32){if(n1&&"function"==typeof n1.getRandomValues)return n1.getRandomValues(new Uint8Array(e));if(n1&&"function"==typeof n1.randomBytes)return n1.randomBytes(e);throw Error("crypto.getRandomValues must be defined")}let n8=(e,t,n)=>e&t^~e&n,n7=(e,t,n)=>e&t^e&n^t&n;class n9 extends n6{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=n2(this.buffer)}update(e){n0(this);let{view:t,buffer:n,blockLen:r}=this,a=(e=n5(e)).length;for(let i=0;i<a;){let s=Math.min(r-this.pos,a-i);if(s===r){let t=n2(e);for(;r<=a-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){n0(this);nX(e);let t=this.outputLen;if(e.length<t)throw Error("digestInto() expects output buffer of length at least "+t);this.finished=!0;let{buffer:n,view:r,blockLen:a,isLE:i}=this,{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>a-s&&(this.process(r,0),s=0);for(let e=s;e<a;e++)n[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let a=BigInt(32),i=BigInt(0xffffffff),s=Number(n>>a&i),o=Number(n&i),c=4*!!r,u=4*!r;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(r,a-8,BigInt(8*this.length),i),this.process(r,0);let o=n2(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,l=this.get();if(u>l.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=a,e.destroyed=i,r%t&&e.buffer.set(n),e}}let re=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
376c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),rt=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),rn=new Uint32Array(64);class rr extends n9{constructor(){super(64,32,8,!1),this.A=0|rt[0],this.B=0|rt[1],this.C=0|rt[2],this.D=0|rt[3],this.E=0|rt[4],this.F=0|rt[5],this.G=0|rt[6],this.H=0|rt[7]}get(){let{A:e,B:t,C:n,D:r,E:a,F:i,G:s,H:o}=this;return[e,t,n,r,a,i,s,o]}set(e,t,n,r,a,i,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|a,this.F=0|i,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)rn[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=rn[e-15],n=rn[e-2],r=n3(t,7)^n3(t,18)^t>>>3,a=n3(n,17)^n3(n,19)^n>>>10;rn[e]=a+rn[e-7]+r+rn[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){let t=u+(n3(s,6)^n3(s,11)^n3(s,25))+n8(s,o,c)+re[e]+rn[e]|0,l=(n3(n,2)^n3(n,13)^n3(n,22))+n7(n,r,a)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+l|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){rn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let ra=function(e){let t=t=>e().update(n5(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new rr);class ri extends n6{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");nY(e.outputLen),nY(e.blockLen)}(e);let n=n5(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),a.fill(0)}update(e){return n0(this),this.iHash.update(e),this}digestInto(e){n0(this),nX(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:n,finished:r,destroyed:a,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=a,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let rs=(e,t,n)=>new ri(e,t).update(n).digest();rs.create=(e,t)=>new ri(e,t);let ro=BigInt(0),rc=BigInt(1),ru=BigInt(2);function rl(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function rd(e){if(!rl(e))throw Error("Uint8Array expected")}function rp(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}let rh=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rf(e){rd(e);let t="";for(let n=0;n<e.length;n++)t+=rh[e[n]];return t}function rm(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function ry(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?ro:BigInt("0x"+e)}let rg={_0:48,_9:57,A:65,F:70,a:97,f:102};function rb(e){return e>=rg._0&&e<=rg._9?e-rg._0:e>=rg.A&&e<=rg.F?e-(rg.A-10):e>=rg.a&&e<=rg.f?e-(rg.a-10):void 0}function rw(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,a=0;t<n;t++,a+=2){let n=rb(e.charCodeAt(a)),i=rb(e.charCodeAt(a+1));if(void 0===n||void 0===i)throw Error('hex string expected, got non-hex character "'+(e[a]+e[a+1])+'" at index '+a);r[t]=16*n+i}return r}function rv(e){return ry(rf(e))}function r_(e){return rd(e),ry(rf(Uint8Array.from(e).reverse()))}function rx(e,t){return rw(e.toString(16).padStart(2*t,"0"))}function rk(e,t){return rx(e,t).reverse()}function rE(e,t,n){let r;if("string"==typeof t)try{r=rw(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(rl(t))r=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let a=r.length;if("number"==typeof n&&a!==n)throw Error(e+" of length "+n+" expected, got "+a);return r}function rA(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];rd(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let a=e[t];n.set(a,r),r+=a.length}return n}let rS=e=>"bigint"==typeof e&&ro<=e;function rI(e,t,n){return rS(e)&&rS(t)&&rS(n)&&t<=e&&e<n}function rC(e,t,n,r){if(!rI(t,n,r))throw Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function rO(e){let t;for(t=0;e>ro;e>>=rc,t+=1);return t}let rP=e=>(ru<<BigInt(e-1))-rc,rT=e=>new Uint8Array(e),rj=e=>Uint8Array.from(e);function rL(e,t,n){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof n)throw Error("hmacFn must be a function");let r=rT(e),a=rT(e),i=0,s=()=>{r.fill(1),a.fill(0),i=0},o=(...e)=>n(a,r,...e),c=(e=rT())=>{a=o(rj([0]),e),r=o(),0!==e.length&&(a=o(rj([1]),e),r=o())},u=()=>{if(i++>=1e3)throw Error("drbg: tried 1000 values");let e=0,n=[];for(;e<t;){let t=(r=o()).slice();n.push(t),e+=r.length}return rA(...n)};return(e,t)=>{let n;for(s(),c(e);!(n=t(u()));)c();return s(),n}}let rM={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||rl(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function rN(e,t,n={}){let r=(t,n,r)=>{let a=rM[n];if("function"!=typeof a)throw Error("invalid validator function");let i=e[t];if((!r||void 0!==i)&&!a(i,e))throw Error("param "+String(t)+" is invali
3d. Expected "+n+", got "+i)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}function rD(e){let t=new WeakMap;return(n,...r)=>{let a=t.get(n);if(void 0!==a)return a;let i=e(n,...r);return t.set(n,i),i}}let rB=BigInt(0),rU=BigInt(1),rR=BigInt(2),rq=BigInt(3),rH=BigInt(4),rz=BigInt(5),rF=BigInt(8);function rG(e,t){let n=e%t;return n>=rB?n:t+n}function rV(e,t){if(e===rB)throw Error("invert: expected non-zero number");if(t<=rB)throw Error("invert: expected positive modulus, got "+t);let n=rG(e,t),r=t,a=rB,i=rU,s=rU,o=rB;for(;n!==rB;){let e=r/n,t=r%n,c=a-s*e,u=i-o*e;r=n,n=t,a=s,i=o,s=c,o=u}if(r!==rU)throw Error("invert: does not exist");return rG(a,t)}let rW=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function r$(e,t){let n=void 0!==t?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function rK(e,t,n=!1,r={}){let a;if(e<=rB)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:i,nByteLength:s}=r$(e,t);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let o=Object.freeze({ORDER:e,isLE:n,BITS:i,BYTES:s,MASK:rP(i),ZERO:rB,ONE:rU,create:t=>rG(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return rB<=t&&t<e},is0:e=>e===rB,isOdd:e=>(e&rU)===rU,neg:t=>rG(-t,e),eql:(e,t)=>e===t,sqr:t=>rG(t*t,e),add:(t,n)=>rG(t+n,e),sub:(t,n)=>rG(t-n,e),mul:(t,n)=>rG(t*n,e),pow:(e,t)=>(function(e,t,n){if(n<rB)throw Error("invalid exponent, negatives unsupported");if(n===rB)return e.ONE;if(n===rU)return t;let r=e.ONE,a=t;for(;n>rB;)n&rU&&(r=e.mul(r,a)),a=e.sqr(a),n>>=rU;return r})(o,e,t),div:(t,n)=>rG(t*rV(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>rV(t,e),sqrt:r.sqrt||(t=>(a||(a=function(e){if(e%rH===rq){let t=(e+rU)/rH;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error("Cannot find square root");return r}}if(e%rF===rz){let t=(e-rz)/rF;return function(e,n){let r=e.mul(n,rR),a=e.pow(r,t),i=e.mul(n,a),s=e.mul(e.mul(i,rR),a),o=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(o),n))throw Error("Cannot find square root");return o}}return function(e){let t,n,r,a=(e-rU)/rR;for(t=e-rU,n=0;t%rR===rB;t/=rR,n++);for(r=rR;r<e&&function(e,t,n){if(t<rB)throw Error("invalid exponent, negatives unsupported");if(n<=rB)throw Error("invalid modulus");if(n===rU)return rB;let r=rU;for(;t>rB;)t&rU&&(r=r*e%n),e=e*e%n,t>>=rU;return r}(r,a,e)!==e-rU;r++)if(r>1e3)throw Error("Cannot find square root: likely non-prime P");if(1===n){let t=(e+rU)/rH;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error("Cannot find square root");return r}}let i=(t+rU)/rR;return function(e,s){if(e.pow(s,a)===e.neg(e.ONE))throw Error("Cannot find square root");let o=n,c=e.pow(e.mul(e.ONE,r),t),u=e.pow(s,i),l=e.pow(s,t);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(l);t<o&&!e.eql(n,e.ONE);t++)n=e.sqr(n);let n=e.pow(c,rU<<BigInt(o-t-1));c=e.sqr(n),u=e.mul(u,n),l=e.mul(l,c),o=t}return u}}(e)}(e)),a(o,t))),invertBatch:e=>(function(e,t){let n=Array(t.length),r=t.reduce((t,r,a)=>e.is0(r)?t:(n[a]=t,e.mul(t,r)),e.ONE),a=e.inv(r);return t.reduceRight((t,r,a)=>e.is0(r)?t:(n[a]=e.mul(t,n[a]),e.mul(t,r)),a),n})(o,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?rk(e,s):rx(e,s),fromBytes:e=>{if(e.length!==s)throw Error("Field.fromBytes: expected "+s+" bytes, got "+e.length);return n?r_(e):rv(e)}});return Object.freeze(o)}function rZ(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function rJ(e){let t=rZ(e);return t+Math.ceil(t/2)}let rQ=BigInt(0),rY=BigInt(1);function rX(e,t){let n=t.negate();return e?n:t}function r0(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function r1(e,t){return r0(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}let r2=new WeakMap,r3=new WeakMap;function r5(e){return r3.get(e)||1}function r6(e){return rN(e.Fp,rW.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),rN(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...r$(e.n,e.nBitLength),...e,...{p:e.Fp.ORDER}})}function r4(e){void 0!==e.lowS&&rp("lowS",e.lowS),void 0!==e.prehash&&rp("prehash",e.prehash)}let{Ph:r8,aT:r7}=a;
vendor: 4,191 bytes, line 3
3class r9 extends Error{constructor(e=""){super(e)}}let ae={Err:r9,_tlv:{encode:(e,t)=>{let{Err:n}=ae;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");let r=t.length/2,a=rm(r);if(a.length/2&128)throw new n("tlv.encode: long form length too big");let i=r>127?rm(a.length/2|128):"";return rm(e)+i+a+t},decode(e,t){let{Err:n}=ae,r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");let a=t[r++],i=0;if(128&a){let e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of s)i=i<<8|e;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=a;let s=t.subarray(r,r+i);if(s.length!==i)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+i)}}},_int:{encode(e){let{Err:t}=ae;if(e<at)throw new t("integer: negative integers are not allowed");let n=rm(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){let{Err:t}=ae;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return r8(e)}},toSig(e){let{Err:t,_int:n,_tlv:r}=ae,a="string"==typeof e?r7(e):e;rd(a);let{v:i,l:s}=r.decode(48,a);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:o,l:c}=r.decode(2,i),{v:u,l:l}=r.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(o),s:n.decode(u)}},hexFromSig(e){let{_tlv:t,_int:n}=ae,r=t.encode(2,n.encode(e.r)),a=t.encode(2,n.encode(e.s));return t.encode(48,r+a)}},at=BigInt(0),an=BigInt(1),ar=(BigInt(2),BigInt(3));BigInt(4);let aa=rK(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),ai=function(e,t){let n=t=>(function(e){let t=function(e){let t=r6(e);return rN(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,a=n.BYTES+1,i=2*n.BYTES+1;function s(e){return rG(e,r)}let{ProjectivePoint:o,normPrivateKeyToScalar:c,weierstrassEquation:u,isWithinCurveOrder:l}=function(e){var t;let n=function(e){let t=r6(e);rN(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:n,Fp:r,a}=t;if(n){if(!r.eql(a,r.ZERO))throw Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=n,a=rK(n.n,n.nBitLength),i=n.toBytes||((e,t,n)=>{let a=t.toAffine();return rA(Uint8Array.from([4]),r.toBytes(a.x),r.toBytes(a.y))}),s=n.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function o(e){let{a:t,b:a}=n,i=r.sqr(e),s=r.mul(i,e);return r.add(r.add(s,r.mul(e,t)),a)}if(!r.eql(r.sqr(n.Gy),o(n.Gx)))throw Error("bad generator point: equation left != right");function c(e){let t,{allowedPrivateKeyLengths:r,nByteLength:a,wrapPrivateKey:i,n:s}=n;if(r&&"bigint"!=typeof e){if(rl(e)&&(e=rf(e)),"string"!=typeof e||!r.includes(e.length))throw Error("invalid private key");e=e.padStart(2*a,"0")}try{t="bigint"==typeof e?e:rv(rE("private key",e,a))}catch(t){throw Error("invalid private key, expected hex or "+a+" bytes, got "+typeof e)}return i&&(t=rG(t,s)),rC("private key",t,an,s),t}function u(e){if(!(e instanceof p))throw Error("ProjectivePoint expected")}let l=rD((e,t)=>{let{px:n,py:a,pz:i}=e;if(r.eql(i,r.ONE))return{x:n,y:a};let s=e.is0();null==t&&(t=s?r.ONE:r.inv(i));let o=r.mul(n,t),c=r.mul(a,t),u=r.mul(i,t);if(s)return{x:r.ZERO,y:r.ZERO};
3if(!r.eql(u,r.ONE))throw Error("invZ was invalid");return{x:o,y:c}}),d=rD(e=>{if(e.is0()){if(n.allowInfinityPoint&&!r.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:a}=e.toAffine();if(!r.isValid(t)||!r.isValid(a))throw Error("bad point: x or y not FE");let i=r.sqr(a),s=o(t);if(!r.eql(i,s))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class p{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");Object.freeze(this)}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof p)throw Error("projective point not allowed");let a=e=>r.eql(e,r.ZERO);return a(t)&&a(n)?p.ZERO:new p(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(p.fromAffine)}static fromHex(e){let t=p.fromAffine(s(rE("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return p.BASE.multiply(c(e))}static msm(e,t){return function(e,t,n,r){if(!Array.isArray(n))throw Error("array expected");n.forEach((t,n)=>{if(!(t instanceof e))throw Error("invalid point at index "+n)});if(!Array.isArray(r))throw Error("array of scalars expected");if(r.forEach((e,n)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+n)}),n.length!==r.length)throw Error("arrays of points and scalars must have equal length");let a=e.ZERO,i=rO(BigInt(n.length)),s=i>12?i-3:i>4?i-2:i?2:1,o=(1<<s)-1,c=Array(o+1).fill(a),u=Math.floor((t.BITS-1)/s)*s,l=a;for(let e=u;e>=0;e-=s){c.fill(a);for(let t=0;t<r.length;t++){let a=Number(r[t]>>BigInt(e)&BigInt(o));c[a]=c[a].add(n[t])}let t=a;for(let e=c.length-1,n=a;e>0;e--)n=n.add(c[e]),t=t.add(n);if(l=l.add(t),0!==e)for(let e=0;e<s;e++)l=l.double()}return l}(p,a,e,t)}_setWindowSize(e){f.setWindowSize(this,e)}assertValidity(){d(this)}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){u(e);let{px:t,py:n,pz:a}=this,{px:i,py:s,pz:o}=e,c=r.eql(r.mul(t,o),r.mul(i,a)),l=r.eql(r.mul(n,o),r.mul(s,a));return c&&l}negate(){return new p(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:t}=n,a=r.mul(t,ar),{px:i,py:s,pz:o}=this,c=r.ZERO,u=r.ZERO,l=r.ZERO,d=r.mul(i,i),h=r.mul(s,s),f=r.mul(o,o),m=r.mul(i,s);return m=r.add(m,m),l=r.mul(i,o),l=r.add(l,l),c=r.mul(e,l),u=r.mul(a,f),u=r.add(c,u),c=r.sub(h,u),u=r.add(h,u),u=r.mul(c,u),c=r.mul(m,c),l=r.mul(a,l),f=r.mul(e,f),m=r.sub(d,f),m=r.mul(e,m),m=r.add(m,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,f),d=r.mul(d,m),u=r.add(u,d),f=r.mul(s,o),f=r.add(f,f),d=r.mul(f,m),c=r.sub(c,d),l=r.mul(f,h),l=r.add(l,l),new p(c,u,l=r.add(l,l))}add(e){u(e);let{px:t,py:a,pz:i}=this,{px:s,py:o,pz:c}=e,l=r.ZERO,d=r.ZERO,h=r.ZERO,f=n.a,m=r.mul(n.b,ar),y=r.mul(t,s),g=r.mul(a,o),b=r.mul(i,c),w=r.add(t,a),v=r.add(s,o);w=r.mul(w,v),v=r.add(y,g),w=r.sub(w,v),v=r.add(t,i);let _=r.add(s,c);return v=r.mul(v,_),_=r.add(y,b),v=r.sub(v,_),_=r.add(a,i),l=r.add(o,c),_=r.mul(_,l),l=r.add(g,b),_=r.sub(_,l),h=r.mul(f,v),l=r.mul(m,b),h=r.add(l,h),l=r.sub(g,h),h=r.add(g,h),d=r.mul(l,h),g=r.add(y,y),g=r.add(g,y),b=r.mul(f,b),v=r.mul(m,v),g=r.add(g,b),b=r.sub(y,b),b=r.mul(f,b),v=r.add(v,b),y=r.mul(g,v),d=r.add(d,y),y=r.mul(_,v),l=r.mul(w,l),l=r.sub(l,y),y=r.mul(w,g),h=r.mul(_,h),new p(l,d,h=r.add(h,y))}subtract(e){return this.add(e.negate())}is0(){return this.equals(p.ZERO)}wNAF(e){return f.wNAFCached(this,e,p.normalizeZ)}multiplyUnsafe(e){let{endo:t,n:a}=n;rC("scalar",e,at,a);let i=p.ZERO;if(e===at)return i;if(this.is0()||e===an)return this;if(!t||f.hasPrecomputes(this))return f.wNAFCachedUnsafe(this,e,p.normalizeZ);let{k1neg:s,k1:o,k2neg:c,k2:u}=t.splitScalar(e),l=i,d=i,h=this;for(;o>at||u>at;)o&an&&(l=l.add(h)),u&an&&(d=d.add(h)),h=h.double(),o>>=an,u>>=an;return s&&(l=l.negate()),c&&(d=d.negate()),d=new p(r.mul(d.px,t.beta),d.py,d.pz),l.add(d)}multiply(e){let t,a,{endo:i,n:s}=n;
3if(rC("scalar",e,an,s),i){let{k1neg:n,k1:s,k2neg:o,k2:c}=i.splitScalar(e),{p:u,f:l}=this.wNAF(s),{p:d,f:h}=this.wNAF(c);u=f.constTimeNegate(n,u),d=f.constTimeNegate(o,d),d=new p(r.mul(d.px,i.beta),d.py,d.pz),t=u.add(d),a=l.add(h)}else{let{p:n,f:r}=this.wNAF(e);t=n,a=r}return p.normalizeZ([t,a])[0]}multiplyAndAddUnsafe(e,t,n){let r=p.BASE,a=(e,t)=>t!==at&&t!==an&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),i=a(this,t).add(a(e,n));return i.is0()?void 0:i}toAffine(e){return l(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=n;if(e===an)return!0;if(t)return t(p,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=n;return e===an?this:t?t(p,this):this.multiplyUnsafe(n.h)}toRawBytes(e=!0){return rp("isCompressed",e),this.assertValidity(),i(p,this,e)}toHex(e=!0){return rp("isCompressed",e),rf(this.toRawBytes(e))}}p.BASE=new p(n.Gx,n.Gy,r.ONE),p.ZERO=new p(r.ZERO,r.ONE,r.ZERO);let h=n.nBitLength,f=(t=n.endo?Math.ceil(h/2):h,{constTimeNegate:rX,hasPrecomputes:e=>1!==r5(e),unsafeLadder(e,t,n=p.ZERO){let r=e;for(;t>rQ;)t&rY&&(n=n.add(r)),r=r.double(),t>>=rY;return n},precomputeWindow(e,n){let{windows:r,windowSize:a}=r1(n,t),i=[],s=e,o=s;for(let e=0;e<r;e++){o=s,i.push(o);for(let e=1;e<a;e++)o=o.add(s),i.push(o);s=o.double()}return i},wNAF(e,n,r){let{windows:a,windowSize:i}=r1(e,t),s=p.ZERO,o=p.BASE,c=BigInt(2**e-1),u=2**e,l=BigInt(e);for(let e=0;e<a;e++){let t=e*i,a=Number(r&c);r>>=l,a>i&&(a-=u,r+=rY);let d=t+Math.abs(a)-1,p=e%2!=0,h=a<0;0===a?o=o.add(rX(p,n[t])):s=s.add(rX(h,n[d]))}return{p:s,f:o}},wNAFUnsafe(e,n,r,a=p.ZERO){let{windows:i,windowSize:s}=r1(e,t),o=BigInt(2**e-1),c=2**e,u=BigInt(e);for(let e=0;e<i;e++){let t=e*s;if(r===rQ)break;let i=Number(r&o);if(r>>=u,i>s&&(i-=c,r+=rY),0===i)continue;let l=n[t+Math.abs(i)-1];i<0&&(l=l.negate()),a=a.add(l)}return a}
3,getPrecomputes(e,t,n){let r=r2.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&r2.set(t,n(r))),r},wNAFCached(e,t,n){let r=r5(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){let a=r5(e);return 1===a?this.unsafeLadder(e,t,r):this.wNAFUnsafe(a,this.getPrecomputes(a,e,n),t,r)},setWindowSize(e,n){r0(n,t),r3.set(e,n),r2.delete(e)}});return{CURVE:n,ProjectivePoint:p,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:function(e){return rI(e,an,n.n)}}}({...t,toBytes(e,t,r){let a=t.toAffine(),i=n.toBytes(a.x),s=rA;return(rp("isCompressed",r),r)?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,n.toBytes(a.y))},fromBytes(e){let t=e.length,r=e[0],s=e.subarray(1);if(t===a&&(2===r||3===r)){let e,t=rv(s);if(!rI(t,an,n.ORDER))throw Error("Point is not on curve");let a=u(t);try{e=n.sqrt(a)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&an)===an)&&(e=n.neg(e)),{x:t,y:e}}if(t===i&&4===r)return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))};throw Error("invalid Point, expected length of "+a+", or uncompressed "+i+", got "+t)}}),d=e=>rf(rx(e,t.nByteLength)),p=(e,t,n)=>rv(e.slice(t,n));class h{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){let n=t.nByteLength;return new h(p(e=rE("compactSignature",e,2*n),0,n),p(e,n,2*n))}static fromDER(e){let{r:t,s:n}=ae.toSig(rE("DER",e));return new h(t,n)}assertValidity(){rC("r",this.r,an,r),rC("s",this.s,an,r)}addRecoveryBit(e){return new h(this.r,this.s,e)}recoverPublicKey(e){let{r:a,s:i,recovery:c}=this,u=y(rE("msgHash",e));if(null==c||![0,1,2,3].includes(c))throw Error("recovery id invalid");let l=2===c||3===c?a+t.n:a;if(l>=n.ORDER)throw Error("recovery id 2 or 3 invalid");let p=(1&c)==0?"02":"03",h=o.fromHex(p+d(l)),f=rV(l,r),m=s(-u*f),g=s(i*f),b=o.BASE.multiplyAndAddUnsafe(h,m,g);if(!b)throw Error("point at infinify");return b.assertValidity(),b}hasHighS(){return this.s>r>>an}normalizeS(){return this.hasHighS()?new h(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return rw(this.toDERHex())}toDERHex(){return ae.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return rw(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function f(e){let t=rl(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===a||r===i:n?r===2*a||r===2*i:e instanceof o}let m=t.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let n=rv(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},y=t.bits2int_modN||function(e){return s(m(e))},g=rP(t.nBitLength);function b(e){return rC("num < 2^"+t.nBitLength,e,at,g),rx(e,t.nByteLength)}let w={lowS:t.lowS,prehash:!1},v={lowS:t.lowS,prehash:!1};return o.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return o.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(f(e))throw Error("first arg must be private key");if(!f(t))throw Error("second arg must be public key");return o.fromHex(t).multiply(c(e)).toRawBytes(n)},sign:function(e,a,i=w){let{seed:u,k2sig:d}=function(e,a,i=w){if(["recovered","canonical"].some(e=>e in i))throw Error("sign() legacy options not supported");let{hash:u,randomBytes:d}=t,{lowS:p,prehash:f,extraEntropy:g}=i;null==p&&(p=!0),e=rE("msgHash",e),r4(i),f&&(e=rE("prehashed msgHash",u(e)));let v=y(e),_=c(a),x=[b(_),b(v)];if(null!=g&&!1!==g){let e=!0===g?d(n.BYTES):g;x.push(rE("extraEntropy",e))}return{seed:rA(...x),k2sig:function(e){var t;let n=m(e);if(!l(n))return;let a=rV(n,r),i=o.BASE.multiply(n).toAffine(),c=s(i.x);if(c===at)return;let u=s(a*s(v+c*_));if(u===at)return;let d=2*(i.x!==c)|Number(i.y&an),f=u;return p&&u>r>>an&&(f=(t=u)>r>>an?s(-t):t,d^=1),new h(c,f,d)}}}(e,a,i);return rL(t.hash.outputLen,t.nByteLength,t.hmac)(u,d)},verify:function(e,n,a,i=v){let c,u;n=rE("msgHash",n),a=rE("publicKey",a);let{lowS:l,prehash:d,format:p}=i;if(r4(i),"strict"in i)throw Error("options.strict was renamed to lowS");if(void 0!==p&&"compact"!==p&&"der"!==p)throw Error("format must be compact or der");let f="string"==typeof e||rl(e),m=!f&&!p&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!f&&!m)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");
vendor: 5,041 bytes, line 3
3try{if(m&&(u=new h(e.r,e.s)),f){try{"compact"!==p&&(u=h.fromDER(e))}catch(e){if(!(e instanceof ae.Err))throw e}u||"der"===p||(u=h.fromCompact(e))}c=o.fromHex(a)}catch(e){return!1}if(!u||l&&u.hasHighS())return!1;d&&(n=t.hash(n));let{r:g,s:b}=u,w=y(n),_=rV(b,r),x=s(w*_),k=s(g*_),E=o.BASE.multiplyAndAddUnsafe(c,x,k)?.toAffine();return!!E&&s(E.x)===g},ProjectivePoint:o,Signature:h,utils:{isValidPrivateKey(e){try{return c(e),!0}catch(e){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{let e=rJ(t.n);return function(e,t,n=!1){let r=e.length,a=rZ(t),i=rJ(t);if(r<16||r<i||r>1024)throw Error("expected "+i+"-1024 bytes of input, got "+r);let s=rG(n?r_(e):rv(e),t-rU)+rU;return n?rk(s,a):rx(s,a)}(t.randomBytes(e),t.n)},precompute:(e=8,t=o.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...n)=>rs(t,e,function(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];nX(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let a=e[t];n.set(a,r),r+=a.length}return n}(...n)),randomBytes:n4});return{...n(t),create:n}}({a:aa.create(BigInt("-3")),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Fp:aa,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},ra);class as extends Error{constructor(e,t={}){let n=(()=>{if(t.cause instanceof as){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),r=t.cause instanceof as&&t.cause.docsPath||t.docsPath,a=`https://oxlib.sh${r??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||r?["",n?`Details: ${n}`:void 0,r?`See: ${a}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"[email protected]"}),this.cause=t.cause,this.details=n,this.docs=a,this.docsPath=r,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,n):n?null:t}(this,e)}}function ao(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+"#__bigint":n,n)}function ac(e,t){if(aw(e)>t)throw new ak({givenSize:aw(e),maxSize:t})}function au(e,t={}){let{dir:n,size:r=32}=t;if(0===r)return e;let a=e.replace("0x","");if(a.length>2*r)throw new aA({size:Math.ceil(a.length/2),targetSize:r,type:"Hex"});return`0x${a["right"===n?"padEnd":"padStart"](2*r,"0")}`}let al=new TextEncoder,ad=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ap(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function ah(e){return e instanceof Uint8Array?af(e):Array.isArray(e)?af(new Uint8Array(e)):e}function af(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=ad[e[t]];let r=`0x${n}`;return"number"==typeof t.size?(ac(r,t.size),ag(r,t.size)):r}function am(e,t={}){var n;let r,{signed:a,size:i}=t,s=BigInt(e);i?r=a?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let o="bigint"==typeof r&&a?-r-1n:0;if(r&&s>r||s<o){let t="bigint"==typeof e?"n":"";throw new av({max:r?`${r}${t}`:void 0,min:`${o}${t}`,signed:a,size:i,value:`${e}${t}`})}let c=(a&&s<0?(1n<<BigInt(8*i))+BigInt(s):s).toString(16),u=`0x${c}`;return i?(n=u,au(n,{dir:"left",size:i})):u}function ay(e,t={}){return af(al.encode(e),t)}function ag(e,t){return au(e,{dir:"right",size:t})}function ab(e,t,n,r={}){let{strict:a}=r;if("number"==typeof t&&t>0&&t>aw(e)-1)throw new aE({offset:t,position:"start",size:aw(e)});let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return a&&function(e,t,n){if("number"==typeof t&&"number"==typeof n&&aw(e)!==n-t)throw new aE({offset:n,position:"end",size:aw(e)})}(i,t,n),i}function aw(e){return Math.ceil((e.length-2)/2)}class av extends as{constructor({max:e,min:t,signed:n,size:r,value:a}){super(`Number \`${a}\` is not in safe${r?` ${8*r}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class a_ extends as{constructor(e){super(`Value \`${"object"==typeof e?ao(e):e}\` of type \`${typeof e}
vendor: 4,642 bytes, line 3
3\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class ax extends as{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class ak extends as{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class aE extends as{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class aA extends as{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}let aS={zero:48,nine:57,A:65,F:70,a:97,f:102};function aI(e){return e>=aS.zero&&e<=aS.nine?e-aS.zero:e>=aS.A&&e<=aS.F?e-(aS.A-10):e>=aS.a&&e<=aS.f?e-(aS.a-10):void 0}function aC(e){return e instanceof Uint8Array?e:"string"==typeof e?aP(e):aO(e)}function aO(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function aP(e,t={}){let{size:n}=t,r=e;n&&(ac(e,n),r=ag(e,n));let a=r.slice(2);a.length%2&&(a=`0${a}`);let i=a.length/2,s=new Uint8Array(i);for(let e=0,t=0;e<i;e++){let n=aI(a.charCodeAt(t++)),r=aI(a.charCodeAt(t++));if(void 0===n||void 0===r)throw new as(`Invalid byte sequence ("${a[t-2]}${a[t-1]}" in "${a}").`);s[e]=16*n+r}return s}function aT(e){return e.length}function aj(e,t,n,r={}){let{strict:a}=r;if("number"==typeof t&&t>0&&t>aT(e)-1)throw new aD({offset:t,position:"start",size:aT(e)});let i=e.slice(t,n);return a&&function(e,t,n){if("number"==typeof t&&"number"==typeof n&&aT(e)!==n-t)throw new aD({offset:n,position:"end",size:aT(e)})}(i,t,n),i}function aL(e,t={}){let{size:n}=t;return void 0!==n&&function(e,t){if(aT(e)>t)throw new aN({givenSize:aT(e),maxSize:t})}(e,n),function(e,t={}){let{signed:n}=t;t.size&&ac(e,t.size);let r=BigInt(e);if(!n)return r;let a=(1n<<8n*BigInt((e.length-2)/2))-1n;return r<=a>>1n?r:r-a-1n}(af(e,t),t)}class aM extends as{constructor(e){super(`Value \`${"object"==typeof e?ao(e):e}\` of type \`${typeof e}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class aN extends as{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class aD extends as{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}function aB(e,t={}){let{compressed:n}=t,{prefix:r,x:a,y:i}=e;if(!1===n||"bigint"==typeof a&&"bigint"==typeof i){if(4!==r)throw new aH({prefix:r,cause:new aF});return}if(!0===n||"bigint"==typeof a&&void 0===i){if(3!==r&&2!==r)throw new aH({prefix:r,cause:new az});return}throw new aq({publicKey:e})}function aU(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new aG({publicKey:e});if(130===e.length)return{prefix:4,x:BigInt(ab(e,0,32)),y:BigInt(ab(e,32,64))};if(132===e.length){let t=Number(ab(e,0,1));return{prefix:t,x:BigInt(ab(e,1,33)),y:BigInt(ab(e,33,65))}}return{prefix:Number(ab(e,0,1)),x:BigInt(ab(e,1,33))}}function aR(e,t={}){aB(e);let{prefix:n,x:r,y:a}=e,{includePrefix:i=!0}=t;return ap(i?am(n,{size:1}):"0x",am(r,{size:32}),"bigint"==typeof a?am(a,{size:32}):"0x")}class aq extends as{constructor({publicKey:e}){super(`Value \`${ao(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class aH extends as{constructor({prefix:e,cause:t}){super(`Prefix "${e}
3" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class az extends as{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class aF extends as{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}class aG extends as{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${aw(ah(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}async function aV(e={}){let{extractable:t=!1}=e,n=await globalThis.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},t,["sign","verify"]),r=function(e){let t=(()=>{if(function(e,t={}){let{strict:n=!1}=t;try{return!function(e,t={}){let{strict:n=!1}=t;if(!e||"string"!=typeof e)throw new a_(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new ax(e)}(e,{strict:n}),!0}catch{return!1}}(e))return aU(e);if(function(e){try{if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new aM(e);return!0}catch{return!1}}(e))return aU(af(e));let{prefix:t,x:n,y:r}=e;return"bigint"==typeof n&&"bigint"==typeof r?{prefix:t??4,x:n,y:r}:{prefix:t,x:n}})();return aB(t),t}(new Uint8Array(await globalThis.crypto.subtle.exportKey("raw",n.publicKey)));return{privateKey:n.privateKey,publicKey:r}}async function aW(e){let{payload:t,privateKey:n}=e,r=aO(new Uint8Array(await globalThis.crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},n,aC(t)))),a=aL(aj(r,0,32)),i=aL(aj(r,32,64));return i>ai.CURVE.n/2n&&(i=ai.CURVE.n-i),{r:a,s:i}}let a$=new TextDecoder,aK=Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]));function aZ(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function aJ(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function aQ(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function aY(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function aX(e,t){return e<<32-t|e>>>t}function a0(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),aZ(e),e}({...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63});class a1{}class a2 extends a1{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=aY(this.buffer)}update(e){aJ(this),aZ(e=a0(e));let{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;i<a;){let s=Math.min(r-this.pos,a-i);if(s===r){let t=aY(e);for(;r<=a-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){aJ(this);aZ(e);let t=this.outputLen;if(e.length<t)throw Error("digestInto() expects output buffer of length at least "+t);this.finished=!0;let{buffer:n,view:r,blockLen:a,isLE:i}=this,{pos:s}=this;n[s++]=128,aQ(this.buffer.subarray(s)),this.padOffset>a-s&&(this.process(r,0),s=0);for(let e=s;e<a;e++)n[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let a=BigInt(32),i=BigInt(0xffffffff),s=Number(n>>a&i),o=Number(n&i),c=4*!!r,u=4*!r;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(r,a-8,BigInt(8*this.length),i),this.process(r,0);let o=aY(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,l=this.get();if(u>l.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=a,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}
3let a3=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),a5=BigInt(0x100000000-1),a6=BigInt(32),a4=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),a8=new Uint32Array(64);class a7 extends a2{constructor(e=32){super(64,e,8,!1),this.A=0|a3[0],this.B=0|a3[1],this.C=0|a3[2],this.D=0|a3[3],this.E=0|a3[4],this.F=0|a3[5],this.G=0|a3[6],this.H=0|a3[7]}get(){let{A:e,B:t,C:n,D:r,E:a,F:i,G:s,H:o}=this;return[e,t,n,r,a,i,s,o]}set(e,t,n,r,a,i,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|a,this.F=0|i,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)a8[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=a8[e-15],n=a8[e-2],r=aX(t,7)^aX(t,18)^t>>>3,a=aX(n,17)^aX(n,19)^n>>>10;a8[e]=a+a8[e-7]+r+a8[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){var l,d,p,h;let t=u+(aX(s,6)^aX(s,11)^aX(s,25))+((l=s)&o^~l&c)+a4[e]+a8[e]|0,f=(aX(n,2)^aX(n,13)^aX(n,22))+((d=n)&(p=r)^d&(h=a)^p&h)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+f|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){aQ(a8)}destroy(){this.set(0,0,0,0,0,0,0,0),aQ(this.buffer)}}!function(e,t=!1){let n=e.length,r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i<n;i++){let{h:n,l:s}=function(e,t=!1){return t?{h:Number(e&a5),l:Number(e>>a6&a5)}:{h:0|Number(e>>a6&a5),l:0|Number(e&a5)}}(e[i],t);[r[i],a[i]]=[n,s]}}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
35771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));let a9=function(e){let t=t=>e().update(a0(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new a7);function ie(e,t={}){let{as:n="string"==typeof e?"Hex":"Bytes"}=t,r=a9(aC(e));return"Bytes"===n?r:af(r)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);let it=2n**256n-1n;function ir(e){if(130!==e.length&&132!==e.length)throw new ia({signature:e});let t=BigInt(ab(e,0,32)),n=BigInt(ab(e,32,64)),r=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{var n=t;if(0===n||27===n)return 0;if(1===n||28===n)return 1;if(n>=35)return+(n%2==0);throw new iu({value:n})}catch{throw new ic({value:t})}})();return void 0===r?{r:t,s:n}:{r:t,s:n,yParity:r}}class ia extends as{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${aw(ah(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class ii extends as{constructor({signature:e}){super(`Signature \`${ao(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class is extends as{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class io extends as{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class ic extends as{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class iu extends as{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}var il=n(82323),id=n(32522),ip=n(88254);let ih="activeId",im=function(e,t){let n="undefined"!=typeof indexedDB?(0,ip.y$)(e,t):void 0;return{getItem:async e=>{let t=await (0,ip.Jt)(e,n);return t||null},removeItem:async e=>(0,ip.yH)(e,n),setItem:async(e,t)=>(0,ip.hZ)(e,t,n)}}("cbwsdk","keys");async function iy(){let e=await aV({extractable:!1}),t=ab(aR(e.publicKey),1);return await im.setItem(t,e),await im.setItem(ih,t),e}async function ig(){let e=await im.getItem(ih);if(!e)return null;let t=await im.getItem(e);return t||null}async function ib(){let e=await ig();if(!e){let e=await iy(),t=ab(aR(e.publicKey),1);return await im.setItem(t,e),await im.setItem(ih,t),e}return e}async function iw(){let e=await ib(),t=ab(aR(e.publicKey),1),n=async t=>{let{payload:n,metadata:r}=function(e){let{challenge:t,crossOrigin:n,extraClientData:r,flag:a,origin:i,rpId:s,signCount:o,userVerification:c="required"}=e,u=function(e={}){let{flag:t=5,rpId:n=window.location.hostname,signCount:r=0}=e,a=ie(ay(n));return ap(a,am(t,{size:1}),am(r,{size:4}))}({flag:a,rpId:s,signCount:o}),l=function(e){let{challenge:t,crossOrigin:n=!1,extraClientData:r,origin:a=window.location.origin}=e;return JSON.stringify({type:"webauthn.get",challenge:function(e,t={}){return function(e,t={}){let{pad:n=!0,url:r=!1}=t,a=new Uint8Array(4*Math.ceil(e.length/3));for(let t=0,n=0;n<e.length;t+=4,n+=3){let r=(e[n]<<16)+(e[n+1]<<8)+(0|e[n+2]);a[t]=aK[r>>18],a[t+1]=aK[r>>12&63],a[t+2]=aK[r>>6&63],a[t+3]=aK[63&r]}let i=e.length%3,s=4*Math.floor(e.length/3)+(i&&i+1),o=a$.decode(new Uint8Array(a.buffer,0,s));return n&&1===i&&(o+="=="),n&&2===i&&(o+="="),r&&(o=o.replaceAll("+","-").replaceAll("/","_")),o}(aP(e),t)}(t,{url:!0,pad:!1}),origin:a,crossOrigin:n,...r})}({challenge:t,crossOrigin:n,extraClientData:r,origin:i}),d=ie(ay(l)),p=l.indexOf('"challenge"'),h=l.indexOf('"type"');return{metadata:{authenticatorData:u,clientDataJSON:l,challengeIndex:p,typeIndex:h,userVerificationRequired:"required"===c},payload:ap(u,d)}}({challenge:t,origin:"https://keys.coinbase.com",userVerification:"preferred"});return{signature:function(e){!function(e,t={}){let{recovered:n}=t;if(void 0===e.r||void 0===e.s||n&&void 0===e.yParity)throw new ii({signature:e});if(e.r<0n||e.r>it)throw new is({value:e.r});if(e.s<0n||e.s>
vendor: 16,384 bytes, line 3
3it)throw new io({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new ic({value:e.yParity})}(e);let t=e.r,n=e.s;return ap(am(t,{size:32}),am(n,{size:32}),"number"==typeof e.yParity?am(function(e){if(0===e)return 27;if(1===e)return 28;throw new ic({value:e})}(e.yParity),{size:1}):"0x")}(await aW({payload:n,privateKey:e.privateKey})),raw:{},webauthn:r}};return{id:t,publicKey:t,sign:async({hash:e})=>n(e),signMessage:async({message:e})=>n((0,il.A)(e)),signTypedData:async e=>n((0,id.Zh)(e)),type:"webAuthn"}}async function iv(){return{account:await iw()}}async function i_(){let e=await ig();e&&(await im.removeItem(ab(aR(e.publicKey),1)),await im.removeItem(ih))}let ix={storageKey:"ownPrivateKey",keyType:"private"},ik={storageKey:"ownPublicKey",keyType:"public"},iE={storageKey:"peerPublicKey",keyType:"public"};class iA{constructor(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(iE,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,h.keys.clear()}async generateKeyPair(){let e=await nF();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(ix,e.privateKey),await this.storeKey(ik,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(ix)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(ik)),(null===this.ownPrivateKey||null===this.ownPublicKey)&&await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(iE)),null===this.sharedSecret&&null!==this.ownPrivateKey&&null!==this.peerPublicKey&&(this.sharedSecret=await nG(this.ownPrivateKey,this.peerPublicKey))}async loadKey(e){let t=h.keys.get(e.storageKey);return t?nZ(e.keyType,t):null}async storeKey(e,t){let n=await nK(e.keyType,t);h.keys.set(e.storageKey,n)}}var iS=n(44352),iI=n(80329);function iC(e,t){if("object"==typeof e&&null!==e)return t.split(/[.[\]]+/).filter(Boolean).reduce((e,t)=>{if("object"==typeof e&&null!==e)return e[t]},e)}var iO=n(42937);let iP="0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a",iT="0xf85210B21cC50302F477BA56686d2019dC9b67Ad",ij=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"owner",type:"bytes"}],name:"AlreadyOwner",type:"error"},{inputs:[],name:"Initialized",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidEthereumAddressOwner",type:"error"},{inputs:[{name:"key",type:"uint256"}],name:"InvalidNonceKey",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidOwnerBytesLength",type:"error"},{inputs:[],name:"LastOwner",type:"error"},{inputs:[{name:"index",type:"uint256"}],name:"NoOwnerAtIndex",type:"error"},{inputs:[{name:"ownersRemaining",type:"uint256"}],name:"NotLastOwner",type:"error"},{inputs:[{name:"selector",type:"bytes4"}],name:"SelectorNotAllowed",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"UnauthorizedCallContext",type:"error"},{inputs:[],name:"UpgradeFailed",type:"error"},{inputs:[{name:"index",type:"uint256"},{name:"expectedOwner",type:"bytes"},{name:"actualOwner",type:"bytes"}],name:"WrongOwnerAtIndex",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"AddOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"RemoveOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"REPLAYABLE_NONCE_KEY",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"addOwnerAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"addOwnerPublicKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"functionSelector",type:"bytes4"}],name:"canSkipChainIdValidation",outputs:[{name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"entryPoint",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"executeBatch",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"calls",type:"bytes[]"}],name:"executeWithoutChainIdValidation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHashWithoutChainId",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"$",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"owners",type:"bytes[]"}],name:"initialize",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"isOwnerAddress",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"bytes"}],name:"isOwnerBytes",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"isOwnerPublicKey",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"result",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextOwnerIndex",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"}],name:"ownerAtIndex",outputs:[{name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownerCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeLastOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeOwnerAtIndex",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"removedOwnersCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"}],name:"replaySafeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"newImplementation",type:"address"},{name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"missingAccountFunds",type:"uint256"}],name:"validateUserOp",outputs:[{name:"validationData",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],iL=[{inputs:[{name:"implementation_",type:"address"}],stateMutability:"payable",type:"constructor"},{inputs:[],name:"OwnerRequired",type:"error"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"createAccount",outputs:[{name:"account",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"getAddress",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"initCodeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"}];function iM(e){var t;if(!Array.isArray(e.params))return null;switch(e.method){case"personal_sign":return e.params[1];case"eth_signTypedData_v4":return e.params[0];case"eth_signTransaction":case"eth_sendTransaction":case"wallet_sendCalls":return null==(t=e.params[0])?void 0:t.from;default:return null}}function iN(e){var t;if(!e||!Array.isArray(e)||!(null==(t=e[0])?void 0:t.chainId)||"string"!=typeof e[0].chainId&&"number"!=typeof e[0].chainId)throw k.rpc.invalidParams()}function iD(e,t){let n=Object.assign({},e);if(t&&e.method.startsWith("wallet_")){let e=iC(n,"params.0.capabilities");if(void 0===e&&(e={}),"object"!=typeof e)throw k.rpc.invalidParams();e=Object.assign(Object.assign({},t),e),n.params&&Array.isArray(n.params)&&(n.params[0]=Object.assign(Object.assign({},n.params[0]),{capabilities:e}))}return n}async function iB(){var e;let t=null!=(e=h.subAccountsConfig.get())?e:{},n={};if(t.enableAutoSubAccounts){let{account:e}=t.toOwnerAccount?await t.toOwnerAccount():await iv();if(!e)throw k.provider.unauthorized("No owner account found");n.addSubAccount={account:{type:"create",keys:[{type:e.address?"address":"webauthn-p256",publicKey:e.address||e.publicKey}]}}}h.subAccountsConfig.set({capabilities:n})}async function iU({client:e,id:t}){var n;let r=await (0,iO.c)(e,{id:t});if("success"===r.status)return null==(n=r.receipts)?void 0:n[0].transactionHash;throw k.rpc.internal("failed to send transaction")}function iR({calls:e,from:t,chainId:n,capabilities:r}){let a=p.get().paymasterUrls,i={method:"wallet_sendCalls",params:[{version:"1.0",calls:e,chainId:(0,tw.cK)(n),from:t,atomicRequired:!0,capabilities:r}]};return(null==a?void 0:a[n])&&(i=iD(i,{paymasterService:{url:null==a?void 0:a[n]}})),i}async function iq(){let e=td();return await new Promise(t=>{ec({snackbarContext:"sub_account_insufficient_balance"}),e.presentItem({autoExpand:!0,message:"Insufficient spend permission. Choose how to proceed:",menuItems:[{isRed:!1,info:"Create new Spend Permission",svgWidth:"10",svgHeight:"11",path:"",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:()=>{eu({snackbarContext:"sub_account_insufficient_balance",snackbarAction:"create_permission"}),e.clear(),t("update_permission")}},{isRed:!1,info:"Continue in Popup",svgWidth:"10",svgHeight:"11",path:"",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:()=>{eu({snackbarContext:"sub_account_insufficient_balance",snackbarAction:"continue_in_popup"}),e.clear(),t("continue_popup")}},{isRed:!0,info:"Cancel",svgWidth:"10",svgHeight:"11",path:"",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:()=>{eu({snackbarContext:"sub_account_insufficient_balance",snackbarAction:"cancel"}),e.clear(),t("cancel")}}]})})}function iH(e,t){let n=e.filter(e=>e!==t);return[t,...n]}function iz(e,t){return[...e.filter(e=>e!==t),t]}async function iF(){let e=h.spendPermissions.get(),t=h.subAccounts.get(),n=h.account.get().accounts;return n?{accounts:null==n?void 0:n.map(n=>({address:n,capabilities:{subAccounts:t?[t]:void 0,spendPermissions:e.length>0?{permissions:e}:void 0}}))}:null}var iG=n(55563),iV=n(42438);function iW(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}var i$=n(4896),iK=n(41706),iZ=n(16871),iJ=n(99553),iQ=n(97525),iY=n(76115),iX=n(1588);let i0=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:
vendor: 13,920 bytes, line 3
3!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var i1=n(70511),i2=n(53108),i3=n(25157),i5=(n(6434),n(20390)),i6=n(64916);function i4(e){let{address:t,data:n,signature:r,to:a="hex"}=e,i=(0,nv.aP)([(0,iK.h)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),i6.I]);return"hex"===a?i:(0,iG.aT)(i)}async function i8(e){let{extend:t,nonceKeyManager:n=function(e){let{source:t}=e,n=new Map,r=new i5.A(8192),a=new Map,i=({address:e,chainId:t})=>`${e}.${t}`,s=e=>{n.delete(e),a.delete(e)};return{async consume({address:e,chainId:n,client:a}){let s=i({address:e,chainId:n}),o=this.get({address:e,chainId:n,client:a});this.increment({address:e,chainId:n});let c=await o;return await t.set({address:e,chainId:n},c),r.set(s,c),c},async increment({address:e,chainId:t}){let r=i({address:e,chainId:t}),a=n.get(r)??0;n.set(r,a+1)},async get({address:e,chainId:o,client:c}){let u=i({address:e,chainId:o}),l=a.get(u);return l||(l=(async()=>{try{let n=await t.get({address:e,chainId:o,client:c}),a=r.get(u)??0;if(a>0&&n<=a)return a+1;return r.delete(u),n}finally{s(u)}})(),a.set(u,l)),(n.get(u)??0)+await l},reset({address:e,chainId:t}){let n=i({address:e,chainId:t});r.delete(n),s(n)}}}({source:{get:()=>Date.now(),set(){}}}),...r}=e,a=!1,i=await e.getAddress();return{...t,...r,address:i,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(t){let r=t?.key??BigInt(await n.consume({address:i,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...t,key:r}):await (0,i3.J)(e.client,{abi:(0,i1.U)(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[i,r]})},isDeployed:async()=>!!a||(a=!!await (0,tP.T)(e.client,i2.Q,"getCode")({address:i})),...e.sign?{async sign(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.sign(t)]);return n&&r?i4({address:n,data:r,signature:a}):a}}:{},async signMessage(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.signMessage(t)]);return n&&r&&"0x7702"!==n?i4({address:n,data:r,signature:a}):a},async signTypedData(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.signTypedData(t)]);return n&&r&&"0x7702"!==n?i4({address:n,data:r,signature:a}):a},type:"smart"}}function i7(e,t={}){let{forHash:n}=t,{authorization:r,factory:a,factoryData:i}=e;return n&&("0x7702"===a||"0x7702000000000000000000000000000000000000"===a)?r?(0,nv.xW)([r.address,i??"0x"]):"0x7702000000000000000000000000000000000000":a?(0,nv.xW)([a,i??"0x"]):"0x"}let i9="0x22e325a297439656";function se(e,t={}){let{callGasLimit:n,callData:r,maxPriorityFeePerGas:a,maxFeePerGas:i,paymaster:s,paymasterData:o,paymasterPostOpGasLimit:c,paymasterSignature:u,paymasterVerificationGasLimit:l,sender:d,signature:p="0x",verificationGasLimit:h}=e,f=(0,nv.xW)([(0,nm.eV)((0,tw.cK)(h||0n),{size:16}),(0,nm.eV)((0,tw.cK)(n||0n),{size:16})]),m=i7(e,t),y=(0,nv.xW)([(0,nm.eV)((0,tw.cK)(a||0n),{size:16}),(0,nm.eV)((0,tw.cK)(i||0n),{size:16})]),g=e.nonce??0n;return{accountGasLimits:f,callData:r,initCode:m,gasFees:y,nonce:g,paymasterAndData:s?(0,nv.xW)([s,(0,nm.eV)((0,tw.cK)(l||0n),{size:16}),(0,nm.eV)((0,tw.cK)(c||0n),{size:16}),o||"0x",...u?t.forHash?[i9]:[u,(0,nm.eV)((0,tw.cK)((0,iZ.E)(u)),{size:2}),i9]:[]]):"0x",preVerificationGas:e.preVerificationGas??0n,sender:d,signature:p}}let st={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};var sn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};async function sr(e){let{owner:t,ownerIndex:n,address:r,client:a,factoryData:i}=e,s={abi:i0,address:"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",version:"0.6"},o={abi:iL,address:iP};return i8({client:a,entryPoint:s,extend:{abi:ij,factory:o},async decodeCalls(e){let t=(0,i$.J)({abi:ij,data:e});if("execute"===t.functionName)return[{to:t.args[0],value:t.args[1],data:t.args[2]}];if("executeBatch"===t.functionName)return t.args[0].map(e=>({to:e.target,value:e.value,data:e.data}));throw new tj.C(`unable to decode calls for "${t.functionName}"`)},async encodeCalls(e){var t,n;return 1===e.length?(0,nw.p)({abi:ij,functionName:"execute",args:[e[0].to,null!=(t=e[0].value)?t:BigInt(0),null!=(n=e[0].data)?n:"0x"]}):(0,nw.p)({abi:ij,functionName:"executeBatch",args:[e.map(e=>{var t,n;return{data:null!=(t=e.data)?t:"0x",target:e.to,value:null!=(n=e.value)?n:BigInt(0)}})]})},getAddress:async()=>r,getFactoryArgs:async()=>({factory:o.address,factoryData:i}),getStubSignature:async()=>"webAuthn"===t.type?"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000":ss({ownerIndex:n,signature:"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}),async sign(e){let r=si({address:await this.getAddress(),chainId:a.chain.id,hash:e.hash});return ss({ownerIndex:n,signature:await sa({hash:r,owner:t})})},async signMessage(e){let{message:r}=e,i=si({address:await this.getAddress(),chainId:a.chain.id,hash:(0,il.A)(r)});return ss({ownerIndex:n,signature:await sa({hash:i,owner:t})})},async signTypedData(e){let{domain:r,types:i,primaryType:s,message:o}=e,c=si({address:await this.getAddress(),chainId:a.chain.id,hash:(0,id.Zh)({domain:r,message:o,primaryType:s,types:i})});return ss({ownerIndex:n,signature:await sa({hash:c,owner:t})})},async signUserOperation(e){let{chainId:r=a.chain.id}=e,i=sn(e,["chainId"]),o=await this.getAddress(),c=function(e){let{chainId:t,entryPointAddress:n,entryPointVersion:r}=e,a=e.userOperation,{authorization:i,callData:s="0x",callGasLimit:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,paymasterAndData:d="0x",preVerificationGas:p,sender:h,verificationGasLimit:f}=a;if("0.8"===r||"0.9"===r)return(0,id.Zh)(function(e){let{chainId:t,entryPointAddress:n,userOperation:r}=e;return{types:st,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:n},message:se(r,{forHash:!0})}}({chainId:t,entryPointAddress:n,userOperation:a}));let m=(()=>
vendor: 6,603 bytes, line 3
3{if("0.6"===r){let e=i7({authorization:i,factory:a.initCode?.slice(0,42),factoryData:a.initCode?.slice(42)},{forHash:!0});return(0,iK.h)([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[h,l,(0,iI.S)(e),(0,iI.S)(s),o,f,p,c,u,(0,iI.S)(d)])}if("0.7"===r){let e=se(a,{forHash:!0});return(0,iK.h)([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[e.sender,e.nonce,(0,iI.S)(e.initCode),(0,iI.S)(e.callData),e.accountGasLimits,e.preVerificationGas,e.gasFees,(0,iI.S)(e.paymasterAndData)])}throw Error(`entryPointVersion "${r}" not supported.`)})();return(0,iI.S)((0,iK.h)([{type:"bytes32"},{type:"address"},{type:"uint256"}],[(0,iI.S)(m),n,BigInt(t)]))}({chainId:r,entryPointAddress:s.address,entryPointVersion:s.version,userOperation:Object.assign(Object.assign({},i),{sender:o})});return ss({ownerIndex:n,signature:await sa({hash:c,owner:t})})},userOperation:{async estimateGas(e){var n;if("webAuthn"===t.type)return{verificationGasLimit:BigInt(Math.max(Number(null!=(n=e.verificationGasLimit)?n:BigInt(0)),8e5))}}}})}async function sa({hash:e,owner:t}){if("webAuthn"===t.type){let{signature:n,webauthn:r}=await t.sign({hash:e});return function({webauthn:e,signature:t}){let{r:n,s:r}=ir(t);return(0,iK.h)([{components:[{name:"authenticatorData",type:"bytes"},{name:"clientDataJSON",type:"bytes"},{name:"challengeIndex",type:"uint256"},{name:"typeIndex",type:"uint256"},{name:"r",type:"uint256"},{name:"s",type:"uint256"}],type:"tuple"}],[{authenticatorData:e.authenticatorData,clientDataJSON:(0,tw.i3)(e.clientDataJSON),challengeIndex:BigInt(e.challengeIndex),typeIndex:BigInt(e.typeIndex),r:n,s:r}])}({signature:n,webauthn:r})}if(t.sign)return t.sign({hash:e});throw new tj.C("`owner` does not support raw sign.")}function si({address:e,chainId:t,hash:n}){return(0,id.Zh)({domain:{chainId:t,name:"Coinbase Smart Wallet",verifyingContract:e,version:"1"},types:{CoinbaseSmartWalletMessage:[{name:"hash",type:"bytes32"}]},primaryType:"CoinbaseSmartWalletMessage",message:{hash:n}})}function ss(e){let{ownerIndex:t=0}=e,n=(()=>{if(65!==(0,iZ.E)(e.signature))return e.signature;let t=(0,iJ.u)(e.signature);return function(e,t){if(e.length!==t.length)throw new iQ.YE({expectedLength:e.length,givenLength:t.length});let n=[];for(let r=0;r<e.length;r++){let a=e[r],i=t[r];n.push(function e(t,n,r=!1){if("address"===t){if(!(0,nq.P)(n))throw new iY.M({address:n});return(0,nm.eV)(n.toLowerCase(),{size:r?32:null})}if("string"===t)return(0,tw.i3)(n);if("bytes"===t)return n;if("bool"===t)return(0,nm.eV)((0,tw.$P)(n),{size:r?32:1});let a=t.match(iX.Ge);if(a){let[e,t,i="256"]=a,s=Number.parseInt(i,10)/8;return(0,tw.cK)(n,{size:r?32:s,signed:"int"===t})}let i=t.match(iX.BD);if(i){let[e,t]=i;if(Number.parseInt(t,10)!==(n.length-2)/2)throw new iQ.BI({expectedSize:Number.parseInt(t,10),givenSize:(n.length-2)/2});return(0,nm.eV)(n,{dir:"right",size:r?32:null})}let s=t.match(iX.D5);if(s&&Array.isArray(n)){let[t,r]=s,a=[];for(let t=0;t<n.length;t++)a.push(e(r,n[t],!0));return 0===a.length?"0x":(0,nv.aP)(a)}throw new iQ.Wl(t)}(a,i))}return(0,nv.aP)(n)}(["bytes32","bytes32","uint8"],[t.r,t.s,0===t.yParity?27:28])})();return(0,iK.h)([{components:[{name:"ownerIndex",type:"uint8"},{name:"signatureData",type:"bytes"}],type:"tuple"}],[{ownerIndex:t,signatureData:n}])}async function so({address:e,client:t,factory:n,factoryData:r,owner:a,ownerIndex:i,parentAddress:s,attribution:o}){var c;let u={address:e,factory:n,factoryData:r},l=null==(c=t.chain)?void 0:c.id;if(!l)throw k.rpc.internal("chainId not found");let d=await sr({owner:a,ownerIndex:null!=i?i:1,address:e,client:t,factoryData:r}),p=async e=>{var n,r,i,c,h;try{switch(e.method){case"wallet_addSubAccount":return u;case"eth_accounts":return[u.address];case"eth_coinbase":return u.address;case"net_version":return l.toString();case"eth_chainId":return(0,tw.cK)(l);case"eth_sendTransaction":{nR(e.params);let a=e.params[0];nU(a.to,k.rpc.invalidParams("to is required"));let s={to:a.to,data:W(null!=(n=a.data)?n:"0x",!0),value:W(null!=(r=a.value)?r:"0x",!0),from:null!=(i=a.from)?i:u.address},o=iR({calls:[s],chainId:l,from:s.from}),c=await p(o);return iU({client:t,id:c})}case"wallet_sendCalls":{let t;nR(e.params);let n=iC(e.params[0],"chainId");if(!n)throw k.rpc.invalidParams("chainId is required");if(!(0,nH.q)(n))throw k.rpc.invalidParams("chainId must be a hex encoded integer");if(!e.params[0])throw k.rpc.invalidParams("params are required");if(!("calls"in e.params[0]))throw k.rpc.invalidParams("calls are required");let r={method:"wallet_prepareCalls",params:[{version:"1.0",calls:e.params[0].calls,chainId:n,from:u.address,capabilities:"capabilities"in e.params[0]?e.params[0].capabilities:{}}]};s&&(r=iD(r,{funding:[{type:"spendPermission",data:{autoApply:!0,sources:[s],preference:"PREFER_DIRECT_BALANCE"}}]}));let i=await p(r),o=await (null==(c=a.sign)?void 0:c.call(a,{hash:(0,tv.IQ)(i.signatureRequest.hash)}));if(!o)throw k.rpc.internal("signature not found");return t=(0,nH.q)(o)?{type:"secp256k1",data:{address:a.address,signature:o}}:{type:"webauthn",data:{signature:JSON.stringify(function({webauthn:e,signature:t,id:n}){let r=ir(t);return{id:n,rawId:iW((0,iG.Af)(n)),response:{authenticatorData:iW((0,iG.aT)(e.authenticatorData)),clientDataJSON:iW((0,iG.Af)(e.clientDataJSON)),signature:iW(function(e,t){let n=(0,iG.aT)((0,iV.B)((0,tw.cK)(e))),r=(0,iG.aT)((0,iV.B)((0,tw.cK)(t))),a=n.length,i=r.length,s=a+i+4,o=new Uint8Array(s+2);return o[0]=48,o[1]=s,o[2]=2,o[3]=a,o.set(n,4),o[a+4]=2,o[a+5]=i,o.set(r,a+6),o}(r.r,r.s))},type:JSON.parse(e.clientDataJSON).type}}(Object.assign({id:null!=(h=a.id)?h:"1"},o))),publicKey:a.publicKey}},(await p({method:"wallet_sendPreparedCalls",params:[{version:"1.0",type:i.type,data:i.userOp,chainId:i.chainId,signature:t}]}))[0]}case"wallet_sendPreparedCalls":{nR(e.params);let n=iC(e.params[0],"chainId");if(!n)throw k.rpc.invalidParams("chainId is required");if(!(0,nH.q)(n))throw k.rpc.invalidParams("chainId must be a hex encoded integer");return await t.request({method:"wallet_sendPreparedCalls",params:e.params})}case"wallet_prepareCalls":{nR(e.params);let n=iC(e.params[0],"chainId");if(!n)throw k.rpc.invalidParams("chainId is required");if(!(0,nH.q)(n))throw k.rpc.invalidParams("chainId must be a hex encoded integer");if(!e.params[0])throw k.rpc.invalidParams("params are required");if(!iC(e.params[0],"calls"))throw k.rpc.invalidParams("calls are required");let r=e.params[0];
3return!o||!r.capabilities||"attribution"in r.capabilities||(r.capabilities.attribution=o),await t.request({method:"wallet_prepareCalls",params:[Object.assign(Object.assign({},e.params[0]),{chainId:n})]})}case"personal_sign":{if(nR(e.params),!(0,nH.q)(e.params[0]))throw k.rpc.invalidParams("message must be a hex encoded string");let t=(0,tv.IQ)(e.params[0]);return d.signMessage({message:t})}case"eth_signTypedData_v4":{nR(e.params);let t="string"==typeof e.params[1]?JSON.parse(e.params[1]):e.params[1];return d.signTypedData(t)}default:throw k.rpc.methodNotSupported()}}catch(e){if(P(e)){let t=function(e){try{let t=JSON.parse(e.details);return new I(t.code,t.message,t.data)}catch(e){return null}}(e);if(t)throw t}throw e}};return{request:p}}var sc=n(77608);async function su({address:e,client:t,publicKey:n,factory:r,factoryData:a}){if(!await (0,i2.Q)(t,{address:e})&&r&&a){if((0,sc.b)(r)!==(0,sc.b)(iP))throw k.rpc.internal("unknown factory address");let e=(0,i$.J)({abi:iL,data:a});if("createAccount"!==e.functionName)throw k.rpc.internal("unknown factory function");let[t]=e.args;return t.findIndex(e=>e.toLowerCase()===sl(n).toLowerCase())}let i=await (0,i3.J)(t,{address:e,abi:ij,functionName:"ownerCount"});for(let r=Number(i)-1;r>=0;r--){let a=await (0,i3.J)(t,{address:e,abi:ij,functionName:"ownerAtIndex",args:[BigInt(r)]}),i=sl(n);if(a.toLowerCase()===i.toLowerCase())return r}return -1}function sl(e){return(0,nq.P)(e)?(0,nm.eV)(e):e}var sd=n(80897);async function sp(){let e=td();return new Promise(t=>{ec({snackbarContext:"sub_account_add_owner"}),e.presentItem({autoExpand:!0,message:"App requires a signer update",menuItems:[{isRed:!1,info:"Confirm",svgWidth:"10",svgHeight:"11",path:"",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:()=>{eu({snackbarContext:"sub_account_add_owner",snackbarAction:"confirm"}),e.clear(),t("authenticate")}},{isRed:!0,info:"Cancel",svgWidth:"10",svgHeight:"11",path:"",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:()=>{eu({snackbarContext:"sub_account_add_owner",snackbarAction:"cancel"}),e.clear(),t("cancel")}}]})})}async function sh({ownerAccount:e,globalAccountRequest:t}){var n,r;let a=h.account.get(),i=h.subAccounts.get(),s=null==(n=a.accounts)?void 0:n.find(e=>e.toLowerCase()!==(null==i?void 0:i.address.toLowerCase()));nU(s,k.provider.unauthorized("no global account")),nU(null==(r=a.chain)?void 0:r.id,k.provider.unauthorized("no chain id")),nU(null==i?void 0:i.address,k.provider.unauthorized("no sub account"));let o=[];if("local"===e.type&&e.address&&o.push({to:i.address,data:(0,nw.p)({abi:ij,functionName:"addOwnerAddress",args:[e.address]}),value:(0,tw.nj)(0)}),e.publicKey){let[t,n]=(0,sd.n)([{type:"bytes32"},{type:"bytes32"}],e.publicKey);o.push({to:i.address,data:(0,nw.p)({abi:ij,functionName:"addOwnerPublicKey",args:[t,n]}),value:(0,tw.nj)(0)})}let c={method:"wallet_sendCalls",params:[{version:"1",calls:o,chainId:(0,tw.cK)(84532),from:s}]};if("cancel"===await sp())throw k.provider.unauthorized("user cancelled");let u=await t(c),l=nB(a.chain.id);if(nU(l,k.rpc.internal(`client not found for chainId ${a.chain.id}`)),"success"!==(await (0,iO.c)(l,{id:u})).status)throw k.rpc.internal("add owner call failed");let d=await su({address:i.address,publicKey:"local"===e.type&&e.address?e.address:e.publicKey,client:l});if(-1===d)throw k.rpc.internal("failed to find owner index");return d}var sf=n(4486);async function sm({errorData:e,globalAccountAddress:t,subAccountAddress:n,client:r,request:a,subAccountRequest:i,globalAccountRequest:s}){var o,c,u;let l,d,p=null==(o=r.chain)?void 0:o.id;nU(p,k.rpc.internal("invalid chainId"));let h=function({errorData:e,sourceAddress:t}){var n;let r=[];for(let[a,{amount:i,sources:s}]of Object.entries(null!=(n=null==e?void 0:e.required)?n:{})){if(0===s.filter(e=>(0,tv.uU)(e.balance)>=(0,tv.uU)(i)&&e.address.toLowerCase()===(null==t?void 0:t.toLowerCase())).length)throw Error("Source address has insufficient balance for a token");r.push({token:a,requiredAmount:(0,tv.uU)(i)})}return r}({errorData:e,sourceAddress:t}),f=await iq();if("cancel"===f)throw Error("User cancelled funding");if("update_permission"===f){if(1===h.length){let e=h[0],r=function({spendPermission:e,chainId:t}){return{domain:{name:"Spend Permission Manager",version:"1",chainId:t,verifyingContract:iT},types:{SpendPermission:[{name:"account",type:"address"},{name:"spender",type:"address"},{name:"token",type:"address"},{name:"allowance",type:"uint160"},{name:"period",type:"uint48"},{name:"start",type:"uint48"},{name:"end",type:"uint48"},{name:"salt",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"SpendPermission",message:{account:e.account,spender:e.spender,token:e.token,allowance:e.allowance,period:e.period,start:e.start,end:e.end,salt:e.salt,extraData:e.extraData}}}({spendPermission:{token:e.token,allowance:(0,tw.cK)(e.requiredAmount*BigInt(3)),period:86400,account:t,spender:n,start:0,end:0xffffffffffff,salt:(0,tw.cK)(BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),extraData:"0x"},chainId:p});l={method:"eth_signTypedData_v4",params:[t,r]}}else{let e=function({spendPermissionBatch:e,chainId:t}){return{domain:{name:"Spend Permission Manager",version:"1",chainId:t,verifyingContract:iT},types:{SpendPermissionBatch:[{name:"account",type:"address"},{name:"period",type:"uint48"},{name:"start",type:"uint48"},{name:"end",type:"uint48"}
vendor: 7,689 bytes, line 3
3,{name:"permissions",type:"PermissionDetails[]"}],PermissionDetails:[{name:"spender",type:"address"},{name:"token",type:"address"},{name:"allowance",type:"uint160"},{name:"salt",type:"uint256"},{name:"extraData",type:"bytes"}]},primaryType:"SpendPermissionBatch",message:{account:e.account,period:e.period,start:e.start,end:e.end,permissions:e.permissions.map(e=>({spender:e.spender,token:e.token,allowance:e.allowance,salt:e.salt,extraData:e.extraData}))}}}({spendPermissionBatch:{account:t,period:86400,start:0,end:0xffffffffffff,permissions:h.map(e=>({token:e.token,allowance:(0,tw.cK)(e.requiredAmount*BigInt(3)),period:86400,account:t,spender:n,salt:"0x0",extraData:"0x"}))},chainId:p});l={method:"eth_signTypedData_v4",params:[t,e]}}try{await s(l)}catch(e){throw console.error(e),Error("User denied spend permission request")}return i(a)}let m=h.map(e=>"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"===e.token.toLowerCase()?{to:n,value:(0,tw.cK)(e.requiredAmount),data:"0x"}:{to:e.token,value:"0x0",data:(0,nw.p)({abi:sf.xw,functionName:"transfer",args:[n,e.requiredAmount]})});if("wallet_sendCalls"===a.method&&"object"==typeof(c=a.params)&&null!==c&&"calls"in c)d=a.params[0];else if("eth_sendTransaction"===a.method&&Array.isArray(u=a.params)&&1===u.length&&"object"==typeof u[0]&&null!==u[0]&&"to"in u[0])d=iR({calls:[a.params[0]],chainId:p,from:a.params[0].from}).params[0];else throw Error("Could not get original call");let y=[...m,{data:(0,nw.p)({abi:ij,functionName:"executeBatch",args:[d.calls.map(e=>{var t,n;return{target:e.to,value:(0,tv.uU)(null!=(t=e.value)?t:"0x0"),data:null!=(n=e.data)?n:"0x"}})]}),to:n,value:"0x0"}],g=await s({method:"wallet_sendCalls",params:[Object.assign(Object.assign({},d),{calls:y,from:t})]});return"eth_sendTransaction"===a.method?iU({client:r,id:g}):g}class sy{constructor(e){var t,n,r,a;this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new iA;let{account:i,chains:s}=h.getState();this.accounts=null!=(t=i.accounts)?t:[],this.chain=null!=(n=i.chain)?n:{id:null!=(a=null==(r=e.metadata.appChainIds)?void 0:r[0])?a:1},s&&nD(s)}async handshake(e){var t,n,r;let a=tb.get(e);(({method:e,correlationId:t})=>{var n;eo("scw_signer.handshake.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:a});try{await (null==(n=(t=this.communicator).waitForPopupLoaded)?void 0:n.call(t));let i=await this.createRequestMessage({handshake:{method:e.method,params:null!=(r=e.params)?r:[]}},a),s=await this.communicator.postRequestAndWaitForResponse(i);if("failure"in s.content)throw s.content.failure;let o=await nZ("public",s.sender);await this.keyManager.setPeerPublicKey(o);let c=await this.decryptResponseMessage(s);this.handleResponse(e,c),(({method:e,correlationId:t})=>{var n;eo("scw_signer.handshake.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:a})}catch(t){throw(({method:e,correlationId:t,errorMessage:n})=>{var r;eo("scw_signer.handshake.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n,enableAutoSubAccounts:null==(r=h.subAccountsConfig.get())?void 0:r.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:a,errorMessage:tx(t)}),t}}async request(e){let t=tb.get(e);(({method:e,correlationId:t})=>{var n;eo("scw_signer.request.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t});try{let n=await this._request(e);return(({method:e,correlationId:t})=>{var n;eo("scw_signer.request.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t}),n}catch(n){throw(({method:e,correlationId:t,errorMessage:n})=>{var r;eo("scw_signer.request.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n,enableAutoSubAccounts:null==(r=h.subAccountsConfig.get())?void 0:r.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t,errorMessage:tx(n)}),n}}async _request(e){var t,n,r,a,i,s,o,c,u,l,d,p,f,m;if(0===this.accounts.length)switch(e.method){case"eth_requestAccounts":return await (null==(n=(t=this.communicator).waitForPopupLoaded)?void 0:n.call(t)),await iB(),await this.request({method:"wallet_connect",params:[{version:"1",capabilities:Object.assign({},null!=(a=null==(r=h.subAccountsConfig.get())?void 0:r.capabilities)?a:{})}]}),this.accounts;case"wallet_switchEthereumChain":iN(e.params),this.chain.id=Number(e.params[0].chainId);return;case"wallet_connect":{await (null==(s=(i=this.communicator).waitForPopupLoaded)?void 0:s.call(i)),await iB();let t={};(function(e,t){var n;if(!Array.isArray(null==e?void 0:e.params))return!1;let r=null==(n=e.params[0])?void 0:n.capabilities;return!!r&&"object"==typeof r&&t in r})(e,"addSubAccount")&&(t=null!=(c=null==(o=h.subAccountsConfig.get())?void 0:o.capabilities)?c:{});let n=iD(e,t);return this.sendRequestToPopup(n)}case"wallet_sendCalls":case"wallet_sign":return this.sendRequestToPopup(e);default:throw k.provider.unauthorized()}if(this.shouldRequestUseSubAccountSigner(e)){let t=tb.get(e);(({method:e,correlationId:t})=>{var n;eo("scw_sub_account.request.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t});try{let n=await this.sendRequestToSubAccountSigner(e);return(({method:e,correlationId:t})=>{var n;eo("scw_sub_account.request.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t}),n}catch(n){throw(({method:e,correlationId:t,errorMessage:n})=>{var r;eo("scw_sub_account.request.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n,enableAutoSubAccounts:null==(r=h.subAccountsConfig.get())?void 0:r.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t,errorMessage:tx(n)}),n}}switch(e.method){case"eth_requestAccounts":case"eth_accounts":{let e=h.subAccounts.get(),t=h.subAccountsConfig.get();return(null==e?void 0:e.address)&&(this.accounts=(null==t?void 0:t.enableAutoSubAccounts)?iH(this.accounts,e.address):iz(this.accounts,e.address)),null==(u=this.callback)||u.call(this,"connect",{chainId:(0,tw.cK)(this.chain.id)}),this.accounts}case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return(0,tw.cK)(this.chain.id);case"wallet_getCapabilities":return this.handleGetCapabilitiesRequest(e);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"wallet_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);case"wallet_connect":{let t=await iF();if(t)return t;await (null==(d=(l=this.communicator).waitForPopupLoaded)?void 0:d.call(l)),await iB();
3let n=h.subAccountsConfig.get(),r=iD(e,null!=(p=null==n?void 0:n.capabilities)?p:{});return null==(f=this.callback)||f.call(this,"connect",{chainId:(0,tw.cK)(this.chain.id)}),this.sendRequestToPopup(r)}case"wallet_getSubAccounts":{let t=h.subAccounts.get();if(null==t?void 0:t.address)return{subAccounts:[t]};if(!this.chain.rpcUrl)throw k.rpc.internal("No RPC URL set for chain");let n=await et(e,this.chain.rpcUrl);if(nR(n.subAccounts,"subAccounts"),n.subAccounts.length>0){nz(n.subAccounts[0]);let e=n.subAccounts[0];h.subAccounts.set({address:e.address,factory:e.factory,factoryData:e.factoryData})}return n}case"wallet_addSubAccount":return this.addSubAccount(e);case"coinbase_fetchPermissions":{!function(e){if("coinbase_fetchPermissions"!==e.method||void 0!==e.params){if("coinbase_fetchPermissions"===e.method&&Array.isArray(e.params)&&1===e.params.length&&"object"==typeof e.params[0]){if("string"!=typeof e.params[0].account||!e.params[0].chainId.startsWith("0x"))throw k.rpc.invalidParams("FetchPermissions - Invalid params: params[0].account must be a hex string");if("string"!=typeof e.params[0].chainId||!e.params[0].chainId.startsWith("0x"))throw k.rpc.invalidParams("FetchPermissions - Invalid params: params[0].chainId must be a hex string");if("string"!=typeof e.params[0].spender||!e.params[0].spender.startsWith("0x"))throw k.rpc.invalidParams("FetchPermissions - Invalid params: params[0].spender must be a hex string");return}throw k.rpc.invalidParams()}}(e);let t=function(e){var t,n,r;if(void 0!==e.params)return e;let a=null==(t=h.getState().account.accounts)?void 0:t[0],i=null==(n=h.getState().account.chain)?void 0:n.id,s=null==(r=h.getState().subAccount)?void 0:r.address;if(!a||!s||!i)throw k.rpc.invalidParams("FetchPermissions - one or more of account, sub account, or chain id is missing, connect to sub account via wallet_connect first");return{method:"coinbase_fetchPermissions",params:[{account:a,chainId:(0,tw.cK)(i),spender:s}]}}(e),n=await et(t,ei),r=(0,tv.ME)(null==(m=t.params)?void 0:m[0].chainId);return h.spendPermissions.set(n.permissions.map(e=>Object.assign(Object.assign({},e),{chainId:r}))),n}default:if(!this.chain.rpcUrl)throw k.rpc.internal("No RPC URL set for chain");return et(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){var t,n;await (null==(n=(t=this.communicator).waitForPopupLoaded)?void 0:n.call(t));let r=await this.sendEncryptedRequest(e),a=await this.decryptResponseMessage(r);return this.handleResponse(e,a)}async handleResponse(e,t){var n,r,a,i,s;let o=t.result;if("error"in o)throw o.error;switch(e.method){case"eth_requestAccounts":{let e=o.value;this.accounts=e,h.account.set({accounts:e,chain:this.chain}),null==(n=this.callback)||n.call(this,"accountsChanged",e);break}case"wallet_connect":{let e=o.value,t=e.accounts.map(e=>e.address);this.accounts=t,h.account.set({accounts:t});let n=e.accounts.at(0),s=null==n?void 0:n.capabilities;if(null==s?void 0:s.subAccounts){let e=null==s?void 0:s.subAccounts;nR(e,"subAccounts"),nz(e[0]),h.subAccounts.set({address:e[0].address,factory:e[0].factory,factoryData:e[0].factoryData})}let c=[this.accounts[0]],u=h.subAccounts.get(),l=h.subAccountsConfig.get();(null==u?void 0:u.address)&&(this.accounts=(null==l?void 0:l.enableAutoSubAccounts)?iH(this.accounts,u.address):iz(this.accounts,u.address));let d=null==(a=null==(r=null==e?void 0:e.accounts)?void 0:r[0].capabilities)?void 0:a.spendPermissions;d&&"permissions"in d&&h.spendPermissions.set(null==d?void 0:d.permissions),null==(i=this.callback)||i.call(this,"accountsChanged",c);break}case"wallet_addSubAccount":{nz(o.value);let e=o.value;h.subAccounts.set(e);let t=h.subAccountsConfig.get();this.accounts=(null==t?void 0:t.enableAutoSubAccounts)?iH(this.accounts,e.address):iz(this.accounts,e.address),null==(s=this.callback)||s.call(this,"accountsChanged",this.accounts)}}return o.value}async cleanup(){var e,t;let n=h.config.get().metadata;await this.keyManager.clear(),h.account.clear(),h.subAccounts.clear(),h.spendPermissions.clear(),h.chains.clear(),this.accounts=[],this.chain={id:null!=(t=null==(e=null==n?void 0:n.appChainIds)?void 0:e[0])?t:1}}async handleSwitchChainRequest(e){iN(e.params);let t=J(e.params[0].chainId);if(this.updateChain(t))return null;let n=await this.sendRequestToPopup(e);return null===n&&this.updateChain(t),n}async handleGetCapabilitiesRequest(e){var t=e.params;if(!t||!Array.isArray(t)||1!==t.length&&2!==t.length||"string"!=typeof t[0]||!(0,nq.P)(t[0]))throw k.rpc.invalidParams();if(2===t.length){if(!Array.isArray(t[1]))throw k.rpc.invalidParams();for(let e of t[1])if("string"!=typeof e||!e.startsWith("0x"))throw k.rpc.invalidParams()}let n=e.params[0],r=e.params[1];if(!this.accounts.some(e=>(0,t_.h)(e,n)))throw k.provider.unauthorized("no active account found when getting capabilities");let a=h.getState().account.capabilities;if(!a)return{};if(!r||0===r.length)return a;let i=new Set(r.map(e=>(0,tv.ME)(e)));return Object.fromEntries(Object.entries(a).filter(([e])=>{try{let t=(0,tv.ME)(e);return i.has(t)}catch(e){return!1}}
vendor: 14,636 bytes, line 3
3))}async sendEncryptedRequest(e){let t=await this.keyManager.getSharedSecret();if(!t)throw k.provider.unauthorized("No shared secret found when encrypting request");let n=await nJ({action:e,chainId:this.chain.id},t),r=tb.get(e),a=await this.createRequestMessage({encrypted:n},r);return this.communicator.postRequestAndWaitForResponse(a)}async createRequestMessage(e,t){let n=await nK("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),correlationId:t,sender:n,content:e,timestamp:new Date}}async decryptResponseMessage(e){var t,n,r;let a=e.content;if("failure"in a)throw a.failure;let i=await this.keyManager.getSharedSecret();if(!i)throw k.provider.unauthorized("Invalid session: no shared secret found when decrypting response");let s=await nQ(a.encrypted,i),o=null==(t=s.data)?void 0:t.chains;if(o){let e=null==(n=s.data)?void 0:n.nativeCurrencies,t=Object.entries(o).map(([t,n])=>{let r=null==e?void 0:e[Number(t)];return Object.assign({id:Number(t),rpcUrl:n},r?{nativeCurrency:r}:{})});h.chains.set(t),this.updateChain(this.chain.id,t),nD(t)}let c=null==(r=s.data)?void 0:r.capabilities;return c&&h.account.set({capabilities:c}),s}updateChain(e,t){var n;let r=h.getState(),a=null!=t?t:r.chains,i=null==a?void 0:a.find(t=>t.id===e);return!!i&&(i!==this.chain&&(this.chain=i,h.account.set({chain:i}),null==(n=this.callback)||n.call(this,"chainChanged",H(i.id))),!0)}async addSubAccount(e){var t,n,r,a;let i=h.getState().subAccount,s=h.subAccountsConfig.get();if(null==i?void 0:i.address)return this.accounts=(null==s?void 0:s.enableAutoSubAccounts)?iH(this.accounts,i.address):iz(this.accounts,i.address),null==(t=this.callback)||t.call(this,"accountsChanged",this.accounts),i;if(await (null==(r=(n=this.communicator).waitForPopupLoaded)?void 0:r.call(n)),Array.isArray(e.params)&&e.params.length>0&&e.params[0].account&&"create"===e.params[0].account.type){let t;if(e.params[0].account.keys&&e.params[0].account.keys.length>0)t=e.params[0].account.keys;else{let e=null!=(a=h.subAccountsConfig.get())?a:{},{account:n}=e.toOwnerAccount?await e.toOwnerAccount():await iv();if(!n)throw k.provider.unauthorized("could not get subaccount owner account when adding sub account");t=[{type:n.address?"address":"webauthn-p256",publicKey:n.address||n.publicKey}]}e.params[0].account.keys=t}let o=await this.sendRequestToPopup(e);return nz(o),o}shouldRequestUseSubAccountSigner(e){let t=iM(e),n=h.subAccounts.get();return!!t&&t.toLowerCase()===(null==n?void 0:n.address.toLowerCase())}async sendRequestToSubAccountSigner(e){var t;let n=h.subAccounts.get(),r=h.subAccountsConfig.get(),a=h.config.get();nU(null==n?void 0:n.address,k.provider.unauthorized("no active sub account when sending request to sub account signer"));let i=(null==r?void 0:r.toOwnerAccount)?await r.toOwnerAccount():await iv();nU(null==i?void 0:i.account,k.provider.unauthorized("no active sub account owner when sending request to sub account signer")),void 0===iM(e)&&(e=function(e,t){if(!Array.isArray(e.params))throw k.rpc.invalidParams();let n=[...e.params];switch(e.method){case"eth_signTransaction":case"eth_sendTransaction":case"wallet_sendCalls":n[0].from=t;break;case"eth_signTypedData_v4":n[0]=t;break;case"personal_sign":n[1]=t}return Object.assign(Object.assign({},e),{params:n})}(e,n.address));let s=nB(this.chain.id);nU(s,k.rpc.internal(`client not found for chainId ${this.chain.id} when sending request to sub account signer`));let o=this.accounts.find(e=>e.toLowerCase()!==n.address.toLowerCase());nU(o,k.provider.unauthorized("no global account found when sending request to sub account signer"));let c=function({attribution:e,dappOrigin:t}){if(e){if("auto"in e&&e.auto&&t)return(0,iS.di)((0,iI.S)((0,tw.nj)(t)),0,16);if("dataSuffix"in e)return e.dataSuffix}}({attribution:null==(t=a.preference)?void 0:t.attribution,dappOrigin:window.location.origin}),u="local"===i.account.type?i.account.address:i.account.publicKey,l=await su({address:n.address,factory:n.factory,factoryData:n.factoryData,publicKey:u,client:s});if(-1===l){let t=tb.get(e);(({method:e,correlationId:t})=>{var n;eo("scw_sub_account.add_owner.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t});try{l=await sh({ownerAccount:i.account,globalAccountRequest:this.sendRequestToPopup.bind(this)}),(({method:e,correlationId:t})=>{var n;eo("scw_sub_account.add_owner.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t})}catch(n){return(({method:e,correlationId:t,errorMessage:n})=>{var r;eo("scw_sub_account.add_owner.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n,enableAutoSubAccounts:null==(r=h.subAccountsConfig.get())?void 0:r.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:t,errorMessage:tx(n)}),k.provider.unauthorized("failed to add sub account owner when sending request to sub account signer")}}let{request:d}=await so({address:n.address,owner:i.account,client:s,factory:n.factory,factoryData:n.factoryData,parentAddress:o,attribution:c?{suffix:c}:void 0,ownerIndex:l});try{return await d(e)}catch(a){let t;if(P(a))t=JSON.parse(a.details);else if(O(a))t=a;else throw a;if(!(O(t)&&t.data)||!t.data)throw a;let r=tb.get(e);(({method:e,correlationId:t})=>{var n;eo("scw_sub_account.insufficient_balance.error_handling.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:r});try{let a=await sm({errorData:t.data,globalAccountAddress:o,subAccountAddress:n.address,client:s,request:e,subAccountRequest:d,globalAccountRequest:this.request.bind(this)});return(({method:e,correlationId:t})=>{var n;eo("scw_sub_account.insufficient_balance.error_handling.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t,enableAutoSubAccounts:null==(n=h.subAccountsConfig.get())?void 0:n.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:r}),a}catch(t){throw console.error(t),(({method:e,correlationId:t,errorMessage:n})=>{var r;eo("scw_sub_account.insufficient_balance.error_handling.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n,enableAutoSubAccounts:null==(r=h.subAccountsConfig.get())?void 0:r.enableAutoSubAccounts},ef.high)})({method:e.method,correlationId:r,errorMessage:tx(t)}),a}}}}let sg=()=>{eo("walletlink_signer.walletlink_connection.connection_failed",{action:eh.measurement,componentType:ep.unknown},ef.high)};var sb=n(43849);let sw="Addresses";class sv{constructor(e){this.secret=e}async encrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");let n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",B(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=new TextEncoder,i=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,a.encode(e)),s=i.slice(i.byteLength-16),o=i.slice(0,i.byteLength-16),c=new Uint8Array(s),u=new Uint8Array(o);return D(new Uint8Array([...n,...c,...u]))}async decrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");return new Promise((n,r)=>{(async()=>{let a=await crypto.subtle.importKey("raw",B(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=B(e),s=i.slice(0,12),o=i.slice(12,28),c=new Uint8Array([...i.slice(28),...o]),u={name:"AES-GCM",iv:new Uint8Array(s)};try{let e=await window.crypto.subtle.decrypt(u,a,c),t=new TextDecoder;n(t.decode(e))}catch(e){r(e)}})()})}}class s_{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;let r=`${t}:${n}`;this.auth=`Basic ${btoa(r)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(e=>fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(e=>console.error("Unable to mark events as seen:",e))}async fetchUnseenEvents(){var e;let t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){let{events:n,error:r}=await t.json();if(r)throw Error(`Check unseen events failed: ${r}`);let a=null!=(e=null==n?void 0:n.filter(e=>"Web3Response"===e.event).map(e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data})))?e:[];return this.markUnseenEventsAsSeen(a),a}throw Error(`Check unseen events failed: ${t.status}`)}}!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(r||(r={}));class sx{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.isDisconnecting=!1,this.url=e.replace(/^http/,"ws"),this.instanceId=sx.instanceCounter++,sx.activeInstances.add(this.instanceId)}async connect(){if(this.webSocket)throw Error("webSocket object is not null");if(this.isDisconnecting)throw Error("WebSocket is disconnecting, cannot reconnect on same instance");return new Promise((e,t)=>{var n;let a;try{this.webSocket=a=new this.WebSocketClass(this.url)}catch(e){t(e);return}null==(n=this.connectionStateListener)||n.call(this,r.CONNECTING),a.onclose=e=>{var n;this.clearWebSocket(),a.readyState!==WebSocket.OPEN&&t(Error(`websocket error ${e.code}: ${e.reason}`)),null==(n=this.connectionStateListener)||n.call(this,r.DISCONNECTED)},a.onopen=t=>{var n;e(),null==(n=this.connectionStateListener)||n.call(this,r.CONNECTED),sx.pendingData.length>0&&([...sx.pendingData].forEach(e=>this.sendData(e)),sx.pendingData=[])},a.onmessage=e=>{var t,n;if("h"===e.data)null==(t=this.incomingDataListener)||t.call(this,{type:"Heartbeat"});else try{let t=JSON.parse(e.data);null==(n=this.incomingDataListener)||n.call(this,t)}catch(e){}}})}disconnect(){var e;let{webSocket:t}=this;if(t){this.isDisconnecting=!0,this.clearWebSocket(),null==(e=this.connectionStateListener)||e.call(this,r.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch(e){}}}sendData(e){let{webSocket:t}=this;if(!t){sx.pendingData.push(e),this.isDisconnecting||this.connect();return}if(t.readyState!==WebSocket.OPEN)return void sx.pendingData.push(e);t.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}cleanup(){sx.activeInstances.delete(this.instanceId)}}sx.instanceCounter=0,sx.activeInstances=new Set,sx.pendingData=[];class sk{constructor({session:e,linkAPIUrl:t,listener:n}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=T(1),this.reconnectAttempts=0,this.isReconnecting=!1,this._connected=!1,this._linked=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{e&&new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",t=>e.JsonRpcUrl&&this.handleChainUpdated(t,e.JsonRpcUrl)]]).forEach((t,n)=>{let r=e[n];void 0!==r&&t(r)})},this.handleDestroyed=e=>{var t;"1"===e&&(null==(t=this.listener)||t.resetAndReload())},this.handleAccountUpdated=async e=>{var t;try{let n=await this.cipher.decrypt(e);null==(t=this.listener)||t.accountUpdated(n)}catch(e){}},this.handleMetadataUpdated=async(e,t)=>{var n;try{let r=await this.cipher.decrypt(t);null==(n=this.listener)||n.metadataUpdated(e,r)}catch(e){}},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated("walletUsername",e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated("AppVersion",e)},this.handleChainUpdated=async(e,t)=>{var n;try{let r=await this.cipher.decrypt(e),a=await this.cipher.decrypt(t);null==(n=this.listener)||n.chainUpdated(r,a)}catch(e){}},this.session=e,this.cipher=new sv(e.secret),this.listener=n,this.linkAPIUrl=t,this.WebSocketClass=WebSocket;let r=this.createWebSocket();this.ws=r,this.http=new s_(t,e.id,e.key),this.setupVisibilityChangeHandler()}createWebSocket(){let e=new sx(`${this.linkAPIUrl}/rpc`,this.WebSocketClass);return this.activeWsInstance=e,e.setConnectionStateListener(async t=>{if(e!==this.activeWsInstance)return;let n=!1;switch(t){case r.DISCONNECTED:this.heartbeatIntervalId&&(clearInterval(this.heartbeatIntervalId),this.heartbeatIntervalId=void 0),this.lastHeartbeatResponse=0,n=!1,this.destroyed||(async()=>{if(this.isReconnecting)return;this.isReconnecting=!0;let t=3e3*(0!==this.reconnectAttempts);await new Promise(e=>setTimeout(e,t)),this.destroyed||e!==this.activeWsInstance?this.isReconnecting=!1:(this.reconnectAttempts++,"cleanup"in this.ws&&"function"==typeof this.ws.cleanup&&this.ws.cleanup(),this.ws=this.createWebSocket(),this.ws.connect().catch(()=>{sg()}).finally(()=>{this.isReconnecting=!1}))})();break;case r.CONNECTED:this.reconnectAttempts=0;try{n=await this.handleConnected(),this.fetchUnseenEventsAPI().catch(()=>{})}catch(e){break}this.connected=n,this.updateLastHeartbeat(),this.heartbeatIntervalId&&clearInterval(this.heartbeatIntervalId),this.heartbeatIntervalId=window.setInterval(()=>{this.heartbeat()},1e4),setTimeout(()=>{this.heartbeat()},100);case r.CONNECTING:}t!==r.CONNECTED&&(this.connected=n)}),e.setIncomingDataListener(e=>{var t;switch(e.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let t="IsLinkedOK"===e.type?e.linked:void 0;this.linked=t||e.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":this.handleSessionMetadataUpdated(e.metadata);break;case"Event":this.handleIncomingEvent(e)}void 0!==e.id&&(null==(t=this.requestResolutions.get(e.id))||t(e))}),e}setupVisibilityChangeHandler(){this.visibilityChangeHandler=()=>{document.hidden||this.destroyed||(this.connected?this.heartbeat():this.reconnectWithFreshWebSocket())},this.focusHandler=()=>{this.destroyed||this.connected||this.reconnectWithFreshWebSocket()},document.addEventListener("visibilitychange",this.visibilityChangeHandler),window.addEventListener("focus",this.focusHandler),window.addEventListener("pageshow",e=>{e.persisted&&this.focusHandler&&this.focusHandler()})}reconnectWithFreshWebSocket(){if(this.destroyed)return;let e=this.ws;this.activeWsInstance=void 0,e.disconnect(),"cleanup"in e&&"function"==typeof e.cleanup&&e.cleanup(),this.ws=this.createWebSocket(),this.ws.connect().catch(()=>{sg()})}connect(){if(this.destroyed)throw Error("instance is destroyed");this.ws.connect()}
vendor: 3,731 bytes, line 3
3async destroy(){this.destroyed||(await this.makeRequest({type:"SetSessionConfig",id:T(this.nextReqId++),sessionId:this.session.id,metadata:{__destroyed:"1"}},{timeout:1e3}),this.destroyed=!0,this.activeWsInstance=void 0,this.heartbeatIntervalId&&(clearInterval(this.heartbeatIntervalId),this.heartbeatIntervalId=void 0),this.visibilityChangeHandler&&document.removeEventListener("visibilitychange",this.visibilityChangeHandler),this.focusHandler&&window.removeEventListener("focus",this.focusHandler),this.ws.disconnect(),"cleanup"in this.ws&&"function"==typeof this.ws.cleanup&&this.ws.cleanup(),this.listener=void 0)}get connected(){return this._connected}set connected(e){this._connected=e}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&(null==(t=this.onceLinked)||t.call(this)),null==(n=this.listener)||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if("Event"===e.type&&"Web3Response"===e.event)try{let n=await this.cipher.decrypt(e.data),r=JSON.parse(n);if("WEB3_RESPONSE"!==r.type)return;null==(t=this.listener)||t.handleWeb3ResponseMessage(r.id,r.response)}catch(e){}}async checkUnseenEvents(){await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){try{(await this.http.fetchUnseenEvents()).forEach(e=>{this.handleIncomingEvent(e)})}catch(e){eo("walletlink_signer.walletlink_connection.fetch_unseen_events_failed",{action:eh.measurement,componentType:ep.unknown},ef.high)}}async publishEvent(e,t,n=!1){let r=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,location:location.href,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),a={type:"PublishEvent",id:T(this.nextReqId++),sessionId:this.session.id,event:e,data:r,callWebhook:n};return this.setOnceLinked(async()=>{let e=await this.makeRequest(a);if("Fail"===e.type)throw Error(e.error||"failed to publish event");return e.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)return void this.ws.disconnect();if(this.connected)try{this.ws.sendData("h")}catch(e){}}async makeRequest(e,t={timeout:6e4}){let n,r=e.id;return this.sendData(e),Promise.race([new Promise((e,a)=>{n=window.setTimeout(()=>{a(Error(`request ${r} timed out`))},t.timeout)}),new Promise(e=>{this.requestResolutions.set(r,t=>{clearTimeout(n),e(t),this.requestResolutions.delete(r)})})])}async handleConnected(){return"Fail"!==(await this.makeRequest({type:"HostSession",id:T(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key})).type&&(this.sendData({type:"IsLinked",id:T(this.nextReqId++),sessionId:this.session.id}),this.sendData({type:"GetSessionConfig",id:T(this.nextReqId++),sessionId:this.session.id}),!0)}}class sE{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%0x7fffffff;let e=this._nextRequestId,t=G(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}function sA(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function sS(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}let sI=e=>
3new DataView(e.buffer,e.byteOffset,e.byteLength),sC=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];let sO=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function sP(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),sA(e),e}class sT{clone(){return this._cloneInto()}}let sj=(e,t,n)=>e&t^~e&n,sL=(e,t,n)=>e&t^e&n^t&n;class sM extends sT{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=sI(this.buffer)}update(e){sS(this);let{view:t,buffer:n,blockLen:r}=this,a=(e=sP(e)).length;for(let i=0;i<a;){let s=Math.min(r-this.pos,a-i);if(s===r){let t=sI(e);for(;r<=a-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){sS(this);sA(e);let t=this.outputLen;if(e.length<t)throw Error(`digestInto() expects output buffer of length at least ${t}`);this.finished=!0;let{buffer:n,view:r,blockLen:a,isLE:i}=this,{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>a-s&&(this.process(r,0),s=0);for(let e=s;e<a;e++)n[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let a=BigInt(32),i=BigInt(0xffffffff),s=Number(n>>a&i),o=Number(n&i),c=4*!!r,u=4*!r;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(r,a-8,BigInt(8*this.length),i),this.process(r,0);let o=sI(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,l=this.get();if(u>l.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=a,e.destroyed=i,r%t&&e.buffer.set(n),e}}let sN=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),sD=new Uint32Array([0x6a09e66
37,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),sB=new Uint32Array(64);class sU extends sM{constructor(){super(64,32,8,!1),this.A=0|sD[0],this.B=0|sD[1],this.C=0|sD[2],this.D=0|sD[3],this.E=0|sD[4],this.F=0|sD[5],this.G=0|sD[6],this.H=0|sD[7]}get(){let{A:e,B:t,C:n,D:r,E:a,F:i,G:s,H:o}=this;return[e,t,n,r,a,i,s,o]}set(e,t,n,r,a,i,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|a,this.F=0|i,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)sB[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=sB[e-15],n=sB[e-2],r=sC(t,7)^sC(t,18)^t>>>3,a=sC(n,17)^sC(n,19)^n>>>10;sB[e]=a+sB[e-7]+r+sB[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){let t=u+(sC(s,6)^sC(s,11)^sC(s,25))+sj(s,o,c)+sN[e]+sB[e]|0,l=(sC(n,2)^sC(n,13)^sC(n,22))+sL(n,r,a)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+l|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){sB.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let sR=function(e){let t=t=>e().update(sP(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new sU),sq="session:id",sH="session:secret",sz="session:linked";class sF{constructor(e,t,n,r=!1){this.storage=e,this.id=t,this.secret=n,this.key=function(e){sA(e);let t="";for(let n=0;n<e.length;n++)t+=sO[e[n]];return t}(sR(`${t}, ${n} WalletLink`)),this._linked=!!r}static create(e){return new sF(e,N(16),N(32)).save()}static load(e){let t=e.getItem(sq),n=e.getItem(sz),r=e.getItem(sH);return t&&r?new sF(e,t,r,"1"===n):null}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this.storage.setItem(sq,this.id),this.storage.setItem(sH,this.secret),this.persistLinked(),this}persistLinked(){this.storage.setItem(sz,this._linked?"1":"0")}}class sG{constructor(){this.root=null,this.darkMode=tr()}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),el()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&(eW(null,this.root),e&&eW(eT(sV,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}let sV=({title:e,buttonText:t,darkMode:n,onButtonClick:r,onDismiss:a})=>eT(ti,{darkMode:n},eT("div",{class:"-cbwsdk-redirect-dialog"},eT("style",null,".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}
3.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),eT("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:a}),eT("div",{class:ed("-cbwsdk-redirect-dialog-box",n?"dark":"light")},eT("p",null,e),eT("button",{onClick:r},t))));class sW{constructor(){this.attached=!1,this.redirectDialog=new sG}attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){let t=new URL("https://go.cb-w.com/walletlink");t.searchParams.append("redirect_url",function(){try{if(function(){try{return null!==window.frameElement}catch(e){return!1}}()&&window.top)return window.top.location;return window.location}catch(e){return window.location}}().href),e&&t.searchParams.append("wl_url",e);let n=document.createElement("a");n.target="cbw-opener",n.href=t.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectToCoinbaseWallet(e),setTimeout(()=>{this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}})},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}class s${constructor(e){this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)}(),this.linkedUpdated=e=>{this.isLinked=e;let t=this.storage.getItem(sw);if(e&&(this._session.linked=e),this.isUnlinkedErrorState=!1,t){let n=t.split(" "),r="true"===this.storage.getItem("IsStandaloneSigning");""===n[0]||e||!this._session.linked||r||(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(e,t)=>{this.storage.setItem(e,t)},this.chainUpdated=(e,t)=>{(this.chainCallbackParams.chainId!==e||this.chainCallbackParams.jsonRpcUrl!==t)&&(this.chainCallbackParams={chainId:e,jsonRpcUrl:t},this.chainCallback&&this.chainCallback(t,Number.parseInt(e,10)))},this.accountUpdated=e=>{this.accountsCallback&&this.accountsCallback([e]),s$.accountRequestCallbackIds.size>0&&(Array.from(s$.accountRequestCallbackIds.values()).forEach(t=>{this.invokeCallback(t,{method:"requestEthereumAccounts",result:[e]})}),s$.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.metadata=e.metadata,this.accountsCallback=e.accountsCallback,this.chainCallback=e.chainCallback;let{session:t,ui:n,connection:r}=this.subscribe();this._session=t,this.connection=r,this.relayEventManager=new sE,this.ui=n,this.ui.attach()}subscribe(){let e=sF.load(this.storage)||sF.create(this.storage),{linkAPIUrl:t}=this,n=new sk({session:e,linkAPIUrl:t,listener:this}),r=this.isMobileWeb?new sW:new tc;return n.connect(),{session:e,ui:r,connection:n}}resetAndReload(){this.connection.destroy().then(()=>{let e=sF.load(this.storage);(null==e?void 0:e.id)===this._session.id&&ty.clearAll(),document.location.reload()}).catch(e=>{})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:q(e.weiValue),data:U(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?q(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?q(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?q(e.gasPriceInWei):null,gasLimit:e.gasLim
vendor: 4,172 bytes, line 3
3it?q(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:q(e.weiValue),data:U(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?q(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?q(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?q(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?q(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:U(e,!0),chainId:t}})}getWalletLinkSession(){return this._session}sendRequest(e){let t=null,n=N(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,r),null==t||t()};return new Promise((a,i)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,e=>{if(null==t||t(),th(e))return i(Error(e.errorMessage));a(e)}),this.publishWeb3RequestEvent(n,e)})}publishWeb3RequestEvent(e,t){let n={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",n,!0).then(e=>{}).catch(e=>{this.handleWeb3ResponseMessage(n.id,{method:t.method,errorMessage:e.message})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof sW)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink()}}publishWeb3RequestCanceledEvent(e){this.publishEvent("Web3RequestCanceled",{type:"WEB3_REQUEST_CANCELED",id:e},!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e,t){if("requestEthereumAccounts"===t.method){s$.accountRequestCallbackIds.forEach(e=>this.invokeCallback(e,t)),s$.accountRequestCallbackIds.clear();return}this.invokeCallback(e,t)}handleErrorResponse(e,t,n){var r;let a=null!=(r=null==n?void 0:n.message)?r:"Unspecified error message.";this.handleWeb3ResponseMessage(e,{method:t,errorMessage:a})}invokeCallback(e,t){let n=this.relayEventManager.callbacks.get(e);n&&(n(t),this.relayEventManager.callbacks.delete(e))}requestEthereumAccounts(){let{appName:e,appLogoUrl:t}=this.metadata,n={method:"requestEthereumAccounts",params:{appName:e,appLogoUrl:t}},r=N(8);return new Promise((e,t)=>{this.relayEventManager.callbacks.set(r,n=>{if(th(n))return t(Error(n.errorMessage));e(n)}),s$.accountRequestCallbackIds.add(r),this.publishWeb3RequestEvent(r,n)})}watchAsset(e,t,n,r,a,i){let s={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:r,image:a},chainId:i}},o=null,c=N(8),u=e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,s.method,e),null==o||o()};return o=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(c,n=>{if(null==o||o(),th(n))return t(Error(n.errorMessage));e(n)}),this.publishWeb3RequestEvent(c,s)})}addEthereumChain(e,t,n,r,a,i){let s={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:a,iconUrls:n,nativeCurrency:i}},o=null,c=N(8),u=e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,s.method,e),null==o||o()};return o=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(c,n=>{if(null==o||o(),th(n))return t(Error(n.errorMessage));e(n)}),this.publishWeb3RequestEvent(c,s)})}switchEthereumChain(e,t){let n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},r=null,a=N(8),i=e=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,n.method,e),null==r||r()};return r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),new Promise((e,t)=>
vendor: 7,552 bytes, line 3
3{this.relayEventManager.callbacks.set(a,n=>(null==r||r(),th(n)&&n.errorCode)?t(k.provider.custom({code:n.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):th(n)?t(Error(n.errorMessage)):void e(n)),this.publishWeb3RequestEvent(a,n)})}}s$.accountRequestCallbackIds=new Set;var sK=n(81029).hp;let sZ="DefaultChainId",sJ="DefaultJsonRpcUrl";class sQ{constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new ty("walletlink",es),this.callback=e.callback||null;let t=this._storage.getItem(sw);if(t){let e=t.split(" ");""!==e[0]&&(this._addresses=e.map(e=>K(e)))}this.initializeRelay()}getSession(){let{id:e,secret:t}=this.initializeRelay().getWalletLinkSession();return{id:e,secret:t}}async handshake(e){let t="eth_requestAccounts",n=tb.get(e);(({method:e,correlationId:t})=>{eo("walletlink_signer.handshake.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t},ef.high)})({method:t,correlationId:n});try{await this._eth_requestAccounts(),(({method:e,correlationId:t})=>{eo("walletlink_signer.handshake.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t},ef.high)})({method:t,correlationId:n})}catch(e){throw(({method:e,correlationId:t,errorMessage:n})=>{eo("walletlink_signer.handshake.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n},ef.high)})({method:t,correlationId:n,errorMessage:tx(e)}),e}}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return null!=(e=this._storage.getItem(sJ))?e:void 0}set jsonRpcUrl(e){this._storage.setItem(sJ,e)}updateProviderInfo(e,t){var n;this.jsonRpcUrl=e;let r=this.getChainId();this._storage.setItem(sZ,t.toString(10)),J(t)!==r&&(null==(n=this.callback)||n.call(this,"chainChanged",H(t)))}async watchAsset(e){let t=Array.isArray(e)?e[0]:e;if(!t.type)throw k.rpc.invalidParams("Type is required");if((null==t?void 0:t.type)!=="ERC20")throw k.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(null==t?void 0:t.options))throw k.rpc.invalidParams("Options are required");if(!(null==t?void 0:t.options.address))throw k.rpc.invalidParams("Address is required");let n=this.getChainId(),{address:r,symbol:a,image:i,decimals:s}=t.options,o=this.initializeRelay(),c=await o.watchAsset(t.type,r,a,s,i,null==n?void 0:n.toString());return!th(c)&&!!c.result}async addEthereumChain(e){var t,n;let r=e[0];if((null==(t=r.rpcUrls)?void 0:t.length)===0)throw k.rpc.invalidParams("please pass in at least 1 rpcUrl");if(!r.chainName||""===r.chainName.trim())throw k.rpc.invalidParams("chainName is a required field");if(!r.nativeCurrency)throw k.rpc.invalidParams("nativeCurrency is a required field");let a=Number.parseInt(r.chainId,16);if(a===this.getChainId())return!1;let i=this.initializeRelay(),{rpcUrls:s=[],blockExplorerUrls:o=[],chainName:c,iconUrls:u=[],nativeCurrency:l}=r,d=await i.addEthereumChain(a.toString(),s,u,o,c,l);if(th(d))return!1;if((null==(n=d.result)?void 0:n.isApproved)===!0)return this.updateProviderInfo(s[0],a),null;throw k.rpc.internal("unable to add ethereum chain")}async switchEthereumChain(e){let t=Number.parseInt(e[0].chainId,16),n=this.initializeRelay(),r=await n.switchEthereumChain(t.toString(10),this.selectedAddress||void 0);if(th(r))throw r;let a=r.result;return a.isApproved&&a.rpcUrl.length>0&&this.updateProviderInfo(a.rpcUrl,t),null}async cleanup(){this.callback=null,this._relay&&this._relay.resetAndReload(),this._storage.clear()}_setAddresses(e,t){var n;if(!Array.isArray(e))throw Error("addresses is not an array");let r=e.map(e=>K(e));JSON.stringify(r)!==JSON.stringify(this._addresses)&&(this._addresses=r,null==(n=this.callback)||n.call(this,"accountsChanged",r),this._storage.setItem(sw,r.join(" ")))}async request(e){let t=tb.get(e);(({method:e,correlationId:t})=>{eo("walletlink_signer.request.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t},ef.high)})({method:e.method,correlationId:t});try{let n=await this._request(e);return(({method:e,correlationId:t})=>{eo("walletlink_signer.request.completed",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t},ef.high)})({method:e.method,correlationId:t}),n}catch(n){throw(({method:e,correlationId:t,errorMessage:n})=>{eo("walletlink_signer.request.error",{action:eh.error,componentType:ep.unknown,method:e,correlationId:t,errorMessage:n},ef.high)})({method:e.method,correlationId:t,errorMessage:tx(n)}),n}}async _request(e){let t=e.params||[];switch(e.method){case"eth_accounts":return[...this._addresses];case"eth_coinbase":return this.selectedAddress||null;case"net_version":return this.getChainId().toString(10);case"eth_chainId":return H(this.getChainId());case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_ecRecover":case"personal_ecRecover":return this.ecRecover(e);case"personal_sign":return this.personalSign(e);case"eth_signTransaction":return this._eth_signTransaction(t);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(t);case"eth_sendTransaction":return this._eth_sendTransaction(t);case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":return this.signTypedData(e);case"wallet_addEthereumChain":return this.addEthereumChain(t);case"wallet_switchEthereumChain":return this.switchEthereumChain(t);case"wallet_watchAsset":return this.watchAsset(t);default:if(!this.jsonRpcUrl)throw k.rpc.internal("No RPC URL set for chain");return et(e,this.jsonRpcUrl)}}_ensureKnownAddress(e){let t=K(e);if(!this._addresses.map(e=>K(e)).includes(t))throw Error("Unknown Ethereum address")}_prepareTransactionParams(e){let t=e.from?K(e.from):this.selectedAddress;if(!t)throw Error("Ethereum address is unavailable");this._ensureKnownAddress(t);let n=e.to?K(e.to):null,r=null!=e.value?Q(e.value):BigInt(0),a=e.data?Z(e.data):sK.alloc(0),i=null!=e.nonce?J(e.nonce):null,s=null!=e.gasPrice?Q(e.gasPrice):null,o=null!=e.maxFeePerGas?Q(e.maxFeePerGas):null,c=null!=e.maxPriorityFeePerGas?Q(e.maxPriorityFeePerGas):null;return{fromAddress:t,toAddress:n,weiValue:r,data:a,nonce:i,gasPriceInWei:s,maxFeePerGas:o,maxPriorityFeePerGas:c,gasLimit:null!=e.gas?Q(e.gas):null,chainId:e.chainId?J(e.chainId):this.getChainId()}}async ecRecover(e){let{method:t,params:n}=e;if(!Array.isArray(n))throw k.rpc.invalidParams();let r=this.initializeRelay(),a=await r.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:R(n[0]),signature:R(n[1]),addPrefix:"personal_ecRecover"===t}});if(th(a))throw a;return a.result}getChainId(){var e;return Number.parseInt(null!=(e=this._storage.getItem(sZ))?e:"1",10)}async _eth_requestAccounts(){var e,t;if(this._addresses.length>0)return null==(e=this.callback)||e.call(this,"connect",{chainId:H(this.getChainId())}),this._addresses;let n=this.initializeRelay(),r=await n.requestEthereumAccounts();if(th(r))throw r;if(!r.result)throw Error("accounts received is empty");return this._setAddresses(r.result),null==(t=this.callback)||t.call(this,"connect",{chainId:H(this.getChainId())}),this._addresses}async personalSign({params:e}){if(!Array.isArray(e))throw k.rpc.invalidParams();let t=e[1],n=e[0];this._ensureKnownAddress(t);let r=this.initializeRelay(),a=await r.sendRequest({method:"signEthereumMessage",params:{address:K(t),message:R(n),addPrefix:!0,typedDataJson:null}});if(th(a))throw a;return a.result}async _eth_signTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),n=this.initializeRelay(),r=await n.signEthereumTransaction(t);
3if(th(r))throw r;return r.result}async _eth_sendRawTransaction(e){let t=Z(e[0]),n=this.initializeRelay(),r=await n.submitEthereumTransaction(t,this.getChainId());if(th(r))throw r;return r.result}async _eth_sendTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),n=this.initializeRelay(),r=await n.signAndSubmitEthereumTransaction(t);if(th(r))throw r;return r.result}async signTypedData(e){let{method:t,params:n}=e;if(!Array.isArray(n))throw k.rpc.invalidParams();let r=n[+("eth_signTypedData_v1"===t)],a=n[+("eth_signTypedData_v1"!==t)];this._ensureKnownAddress(r);let i=this.initializeRelay(),s=await i.sendRequest({method:"signEthereumMessage",params:{address:K(r),message:U(({eth_signTypedData_v1:sb.hashForSignTypedDataLegacy,eth_signTypedData_v3:sb.hashForSignTypedData_v3,eth_signTypedData_v4:sb.hashForSignTypedData_v4,eth_signTypedData:sb.hashForSignTypedData_v4})[t]({data:function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw k.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}(a)}),!0),typedDataJson:JSON.stringify(a,null,2),addPrefix:!1}});if(th(s))throw s;return s.result}initializeRelay(){return this._relay||(this._relay=new s$({linkAPIUrl:es,storage:this._storage,metadata:this.metadata,accountsCallback:this._setAddresses.bind(this),chainCallback:this.updateProviderInfo.bind(this)})),this._relay}}let sY="SignerType",sX=new ty("CBWSDK","SignerConfigurator");function s0(e){if(e)return e instanceof sy?"scw":"walletlink"}async function s1(e){let{communicator:t,metadata:n,handshakeRequest:r,callback:a}=e;s2(t,n,a,r).catch(()=>{});let i={id:crypto.randomUUID(),event:"selectSignerType",data:Object.assign(Object.assign({},e.preference),{handshakeRequest:r})},{data:s}=await t.postRequestAndWaitForResponse(i);return s}async function s2(e,t,n,r){await e.onMessage(({event:e})=>"WalletLinkSessionRequest"===e);let a=new sQ({metadata:t,callback:n});e.postMessage({event:"WalletLinkUpdate",data:{session:a.getSession()}}),await a.handshake(r),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}var s3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};class s5 extends tm{constructor(e){var{metadata:t}=e,n=e.preference,{keysUrl:r}=n,a=s3(n,["keysUrl"]);super(),this.signer=null,this.isCoinbaseWallet=!0,this.metadata=t,this.preference=a,this.communicator=new tp({url:r,metadata:t,preference:a});let i=sX.getItem(sY);i&&(this.signer=this.initSigner(i),(({signerType:e})=>{eo("provider.signer.loaded_from_storage",{action:eh.measurement,componentType:ep.unknown,signerType:e},ef.low)})({signerType:i}))}async request(e){let t=crypto.randomUUID();tb.set(e,t),(({method:e,correlationId:t})=>{eo("provider.request.started",{action:eh.unknown,componentType:ep.unknown,method:e,correlationId:t},ef.high)})({method:e.method,correlationId:t});try{let n=await this._request(e);return(({method:e,signerType:t,correlationId:n})=>{eo("provider.request.responded",{action:eh.unknown,componentType:ep.unknown,method:e,signerType:t,correlationId:n},ef.high)})({method:e.method,signerType:s0(this.signer),correlationId:t}),n}catch(n){throw(({method:e,correlationId:t,signerType:n,errorMessage:r})=>{eo("provider.request.error",{action:eh.error,componentType:ep.unknown,method:e,signerType:n,correlationId:t,errorMessage:r},ef.high)})({method:e.method,correlationId:t,signerType:s0(this.signer),errorMessage:n instanceof Error?n.message:""}),n}finally{tb.delete(e)}}async _request(e){try{if(!e||"object"!=typeof e||Array.isArray(e))throw k.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw k.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw k.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e});switch(t){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw k.provider.unsupportedMethod()}if(!this.signer)switch(e.method){case"eth_requestAccounts":{let t,n=h.subAccountsConfig.get();t=(null==n?void 0:n.enableAutoSubAccounts)?"scw":await this.requestSignerSelection(e);let r=this.initSigner(t);"scw"===t&&(null==n?void 0:n.enableAutoSubAccounts)?(await r.handshake({method:"handshake"}),await r.request(e)):await r.handshake(e),this.signer=r,sX.setItem(sY,t);break}case"wallet_connect":{let t=this.initSigner("scw");await t.handshake({method:"handshake"});let n=await t.request(e);return this.signer=t,n}case"wallet_sendCalls":case"wallet_sign":{let t=this.initSigner("scw");await t.handshake({method:"handshake"});let n=await t.request(e);return await t.cleanup(),n}case"wallet_getCallsStatus":return await et(e,ei);case"net_version":return 1;case"eth_chainId":return H(1);default:throw k.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")}return await this.signer.request(e)}catch(t){let{code:e}=t;return e===y.provider.unauthorized&&this.disconnect(),Promise.reject(function(e){let t=function(e,{shouldIncludeStack:t=!1}={}){var n,r;let a={};if(e&&"object"==typeof e&&!Array.isArray(e)&&_(e,"code")&&Number.isInteger(n=e.code)&&(g[n.toString()]||(r=n)>=-32099&&r<=-32e3))a.code=e.code,e.message&&"string"==typeof e.message?(a.message=e.message,_(e,"data")&&(a.data=e.data)):(a.message=w(a.c
3ode),a.data={originalError:v(e)});else a.code=y.rpc.internal,a.message=x(e,"message")?e.message:b,a.data={originalError:v(e)};return t&&(a.stack=x(e,"stack")?e.stack:void 0),a}(function(e){var t;if("string"==typeof e)return{message:e,code:y.rpc.internal};if(th(e)){let n=e.errorMessage,r=null!=(t=e.errorCode)?t:n.match(/(denied|rejected)/i)?y.provider.userRejectedRequest:void 0;return Object.assign(Object.assign({},e),{message:n,code:r,data:{method:e.method}})}return e}(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");return n.searchParams.set("version",u),n.searchParams.set("code",t.code.toString()),n.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:n.href})}(t))}}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),eo("provider.enable_function.called",{action:eh.measurement,componentType:ep.unknown},ef.high),await this.request({method:"eth_requestAccounts"})}async disconnect(){var e;await (null==(e=this.signer)?void 0:e.cleanup()),this.signer=null,ty.clearAll(),tb.clear(),this.emit("disconnect",k.provider.disconnected("User initiated disconnection"))}async requestSignerSelection(e){eo("signer.selection.requested",{action:eh.unknown,componentType:ep.unknown},ef.high);let t=await s1({communicator:this.communicator,preference:this.preference,metadata:this.metadata,handshakeRequest:e,callback:this.emit.bind(this)});return eo("signer.selection.responded",{action:eh.unknown,componentType:ep.unknown,signerType:t},ef.high),t}initSigner(e){let{signerType:t,metadata:n,communicator:r,callback:a}={signerType:e,metadata:this.metadata,communicator:this.communicator,callback:this.emit.bind(this)};switch(t){case"scw":return new sy({metadata:n,callback:a,communicator:r});case"walletlink":return new sQ({metadata:n,callback:a})}}}class s6{constructor(e){h.persist.rehydrate(),this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||function(){let e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:n}=document.location,r=e?e.getAttribute("href"):null;return!r||r.startsWith("javascript:")||r.startsWith("vbscript:")?`${t}//${n}/favicon.ico`:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?t+r:`${t}//${n}${r}`}(),appChainIds:e.appChainIds||[]},h.config.set({metadata:this.metadata}),X()}makeWeb3Provider(e={options:"all"}){var t;er(e),!1!==e.telemetry&&f(),h.config.set({preference:e});let n={metadata:this.metadata,preference:e};return null!=(t=en(n))?t:new s5
vendor: 9,512 bytes, line 3
3(n)}getCoinbaseWalletLogo(e,t=240){let n;switch(e){case"standard":default:return n=t,`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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 n=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${n}' 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 n=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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 n=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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`}}
3}let s4={options:"all"};function s8(e){var t,n,r,a;let i={metadata:{appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||"",appChainIds:e.appChainIds||[]},preference:Object.assign(s4,null!=(t=e.preference)?t:{}),paymasterUrls:e.paymasterUrls};(null==(n=e.subAccounts)?void 0:n.toOwnerAccount)&&ea(e.subAccounts.toOwnerAccount),h.subAccountsConfig.set({toOwnerAccount:null==(r=e.subAccounts)?void 0:r.toOwnerAccount,enableAutoSubAccounts:null==(a=e.subAccounts)?void 0:a.enableAutoSubAccounts}),h.config.set(i),h.persist.rehydrate(),X(),!1!==i.preference.telemetry&&f(),er(i.preference);let s=null,o={getProvider:()=>(s||(s=function(e){var t;let n={metadata:e.metadata,preference:e.preference};return null!=(t=en(n))?t:new s5(n)}(i)),s.sdk=o,s),subAccount:{async create(e){var t,n;return nU(null==(t=h.getState().subAccount)?void 0:t.address,Error("subaccount already exists")),await (null==(n=o.getProvider())?void 0:n.request({method:"wallet_addSubAccount",params:[{version:"1",account:e}]}))},async get(){var e,t;let n=h.subAccounts.get();if(null==n?void 0:n.address)return n;let r=null==(t=(await (null==(e=o.getProvider())?void 0:e.request({method:"wallet_connect",params:[{version:"1",capabilities:{}}]}))).accounts[0].capabilities)?void 0:t.subAccounts;return Array.isArray(r)?r[0]:null},async addOwner({address:e,publicKey:t,chainId:n}){var r,a;let i=h.subAccounts.get(),s=h.account.get();nU(s,Error("account does not exist")),nU(null==i?void 0:i.address,Error("subaccount does not exist"));let c=[];if(t){let[e,n]=(0,sd.n)([{type:"bytes32"},{type:"bytes32"}],t);c.push({to:i.address,data:(0,nw.p)({abi:ij,functionName:"addOwnerPublicKey",args:[e,n]}),value:(0,tw.nj)(0)})}return e&&c.push({to:i.address,data:(0,nw.p)({abi:ij,functionName:"addOwnerAddress",args:[e]}),value:(0,tw.nj)(0)}),await (null==(r=o.getProvider())?void 0:r.request({method:"wallet_sendCalls",params:[{calls:c,chainId:(0,tw.nj)(n),from:null==(a=s.accounts)?void 0:a[0],version:"1"}]}))},setToOwnerAccount(e){ea(e),h.subAccountsConfig.set({toOwnerAccount:e})}}};return o}let s7=s6},86217:(e,t,n)=>{var r=n(81029).hp;let{keccak_256:a}=n(16701);function i(e){return r.allocUnsafe(e).fill(0)}function s(e,t){let n=e.toString(16);n.length%2!=0&&(n="0"+n);let a=n.match(/.{1,2}/g).map(e=>parseInt(e,16));for(;a.length<t;)a.unshift(0);return r.from(a)}function o(e,t,n){let r=i(t);return(e=c(e),n)?e.length<t?(e.copy(r),r):e.slice(0,t):e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)}function c(e){if(!r.isBuffer(e))if(Array.isArray(e))e=r.from(e);else if("string"==typeof e)e=l(e)?r.from(u(d(e)),"hex"):r.from(e);else if("number"==typeof e)e=new r(u((function(e){let t=e.toString(16);return`0x${t}`})(e).slice(2)),"hex");else if(null==e)e=r.allocUnsafe(0);else if("bigint"==typeof e)e=s(e);else if(e.toArray)e=r.from(e.toArray());else throw Error("invalid type");return e}function u(e){return e.length%2?"0"+e:e}function l(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function d(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:i,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:l,stripHexPrefix:d,toBuffer:c,bufferToHex:function(e){return"0x"+(e=c(e)).toString("hex")},keccak:function(e,t){if(e=c(e),t||(t=256),256!==t)throw Error("unsupported");return r.from(a(new Uint8Array(e)))},bitLengthFromBigInt:function(e){return e.toString(2).length},bufferBEFromBigInt:s,twosFromBigInt:function(e,t){return(e<0n?(~e&(1n<<BigInt(t))-1n)+1n:e)&(1n<<BigInt(t))-1n}}},86265:(e,t)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function r(e){if("boolean"!=typeof e)throw Error(`boolean expected, not ${e}`)}function a(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function i(e,...t){if(!a(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function o(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function c(e,t){i(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}
3Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=t.isBytes=void 0,t.number=n,t.bool=r,t.isBytes=a,t.bytes=i,t.hash=s,t.exists=o,t.output=c,t.default={number:n,bool:r,bytes:i,hash:s,exists:o,output:c}}}]);
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.