@dodoex/wallet-web3 0.0.54 → 0.0.55-beta-entry.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alchemy-provider-5870b6fa-825833dc.js → alchemy-provider-5870b6fa-b341484c.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-0d3bf5da.js → alchemy-websocket-provider-213da986-17357a84.js} +1 -1
- package/dist/{blocto-f0e23298.js → blocto-e1f474f3.js} +1 -1
- package/dist/{ccip-1ddbd4d6.js → ccip-3f0845c7.js} +1 -1
- package/dist/cjs/{alchemy-provider-5870b6fa-c32529ee.cjs → alchemy-provider-5870b6fa-f641f1f1.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-4fac79de.cjs → alchemy-websocket-provider-213da986-fa3dddc4.cjs} +1 -1
- package/dist/cjs/{blocto-22382c66.cjs → blocto-05f9e11e.cjs} +1 -1
- package/dist/cjs/{ccip-d888ed7d.cjs → ccip-4ac89cf6.cjs} +1 -1
- package/dist/cjs/controllers/ConnectController.d.ts +11 -6
- package/dist/cjs/core/index.d.ts +4 -2
- package/dist/cjs/{draggabilly-1a4904c7.cjs → draggabilly-e2d8b869.cjs} +1 -1
- package/dist/cjs/id-26ac4af0.cjs +1 -0
- package/dist/cjs/{index-82a0dcdf.cjs → index-0e337447.cjs} +1 -1
- package/dist/cjs/{index-6eeb2839.cjs → index-66688dd4.cjs} +1 -1
- package/dist/cjs/{index-e397195f.cjs → index-69696ac9.cjs} +1 -1
- package/dist/cjs/{index-86b7a3c1.cjs → index-6c4e85f1.cjs} +1 -1
- package/dist/cjs/{index-d28ccb41.cjs → index-966a59e7.cjs} +1 -1
- package/dist/cjs/index-b5a57e06.cjs +6 -0
- package/dist/cjs/{index-eefcf788.cjs → index-bd4b9641.cjs} +2 -2
- package/dist/cjs/{index-8c651aa1.cjs → index-f8fe116e.cjs} +1 -1
- package/dist/cjs/index-f9c2f609.cjs +29 -0
- package/dist/cjs/index-fc8d397a.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-ef7553ec.cjs → index.es-89e527f8.cjs} +1 -1
- package/dist/cjs/{interface-c6996c01.cjs → interface-424a54f3.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-62582232.cjs → lib-typedarrays-8bfb63bb.cjs} +1 -1
- package/dist/cjs/{portis-cf9f9f48.cjs → portis-ac8d5e11.cjs} +1 -1
- package/dist/cjs/{provider-98f5141e.cjs → provider-47442328.cjs} +1 -1
- package/dist/cjs/providers/wallets/index.d.ts +3 -1
- package/dist/cjs/providers/wallets/types.d.ts +2 -0
- package/dist/cjs/{rainbow-de56ca00.cjs → rainbow-7f46d3b6.cjs} +1 -1
- package/dist/cjs/{sha224-19ef6290.cjs → sha224-e21eed9f.cjs} +1 -1
- package/dist/cjs/{sha256-240b6e58.cjs → sha256-af547e18.cjs} +1 -1
- package/dist/cjs/{typed-data-dbad5718.cjs → typed-data-558df2db.cjs} +1 -1
- package/dist/cjs/uAuth-7252e7ca.cjs +1 -0
- package/dist/cjs/{walletConnect-8fbd36f8.cjs → walletConnect-de6516fe.cjs} +1 -1
- package/dist/cjs/walletLink-f08562df.cjs +3 -0
- package/dist/controllers/ConnectController.d.ts +11 -6
- package/dist/core/index.d.ts +4 -2
- package/dist/{draggabilly-e4e3d8f3.js → draggabilly-8f5521dc.js} +1 -1
- package/dist/id-9aec49ad.js +1 -0
- package/dist/{index-71f98f76.js → index-28dcd6e8.js} +2 -2
- package/dist/{index-8e4d3a91.js → index-352bf4a5.js} +1 -1
- package/dist/index-4dbe54e3.js +1 -0
- package/dist/index-6e0a6776.js +29 -0
- package/dist/{index-4c953d0d.js → index-8b8ad4a7.js} +1 -1
- package/dist/{index-0dca4f3f.js → index-9e1d29f1.js} +1 -1
- package/dist/index-a604a49a.js +1 -0
- package/dist/{index-815eccdf.js → index-b1ba8ce5.js} +1 -1
- package/dist/index-d2ea8b6b.js +6 -0
- package/dist/{index-98e953c6.js → index-d7fc0d54.js} +1 -1
- package/dist/{index.es-1b60a97f.js → index.es-e10aa6e9.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-90345e14.js → interface-1d689049.js} +1 -1
- package/dist/{lib-typedarrays-d96b8ede.js → lib-typedarrays-b810d4b0.js} +1 -1
- package/dist/{portis-85eab92b.js → portis-5012fa3a.js} +1 -1
- package/dist/{provider-0b3740ce.js → provider-aaecb083.js} +1 -1
- package/dist/providers/wallets/index.d.ts +3 -1
- package/dist/providers/wallets/types.d.ts +2 -0
- package/dist/rainbow-1bf6f4e9.js +1 -0
- package/dist/sha224-8c32c00f.js +1 -0
- package/dist/{sha256-3bb3a6aa.js → sha256-466e7a88.js} +1 -1
- package/dist/{typed-data-e0761ff3.js → typed-data-5e1927b3.js} +1 -1
- package/dist/uAuth-9647ccc5.js +1 -0
- package/dist/{walletConnect-b1de3c08.js → walletConnect-2eac23aa.js} +1 -1
- package/dist/{walletLink-c0cf0049.js → walletLink-5196409f.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/hash-7ce6fed5.cjs +0 -1
- package/dist/cjs/id-f5a23f5e.cjs +0 -1
- package/dist/cjs/index-20d8695e.cjs +0 -1
- package/dist/cjs/index-9929c714.cjs +0 -6
- package/dist/cjs/index-ad58d895.cjs +0 -29
- package/dist/cjs/inherits_browser-50deae74.cjs +0 -1
- package/dist/cjs/uAuth-5619b0a4.cjs +0 -1
- package/dist/cjs/walletLink-d556dda2.cjs +0 -3
- package/dist/hash-b468659c.js +0 -1
- package/dist/id-7eadfe81.js +0 -1
- package/dist/index-5d37822d.js +0 -1
- package/dist/index-844cc2ab.js +0 -6
- package/dist/index-c9ed67e2.js +0 -1
- package/dist/index-ca20f41d.js +0 -29
- package/dist/inherits_browser-51bb8c3c.js +0 -1
- package/dist/rainbow-1c0ae93d.js +0 -1
- package/dist/sha224-7c3ade37.js +0 -1
- package/dist/uAuth-ceaf973b.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a1 as e,a2 as t,a3 as n,a4 as s,Q as i,a5 as o,a6 as r,a7 as a,a8 as c,a9 as l,aa as d,ab as u,ac as h,ad as p,ae as m,af as f,ag as g,ah as w,ai as k,aj as y,ak as b,al as E,am as C,an as v,ao as S,ap as A,aq as I,ar as x,as as O,at as R,au as N,av as T,aw as M,ax as _,ay as B,az as P,aA as D,_ as j,A as L}from"./index-6e0a6776.js";export{ax as isInBinance}from"./index-6e0a6776.js";import*as F from"react";import z,{createContext as U,useState as H,useEffect as q,useCallback as V,useContext as W}from"react";import $ from"react-dom";import{I as J}from"./interface-1d689049.js";import"@ethersproject/address";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"@ethersproject/constants";import"@ethersproject/transactions";import"./id-9aec49ad.js";var Q,K={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},G=$;if("production"===process.env.NODE_ENV)Q=G.createRoot,G.hydrateRoot;else{var Z=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Q=function(e,t){Z.usingClientEntryPoint=!0;try{return G.createRoot(e,t)}finally{Z.usingClientEntryPoint=!1}}}var Y,X,ee=Object.defineProperty,te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ie=(e,t,n)=>t in e?ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ne.call(t,n)&&ie(e,n,t[n]);if(te)for(var n of te(t))se.call(t,n)&&ie(e,n,t[n]);return e},re=(e,t)=>{var n={};for(var s in e)ne.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&te)for(var s of te(e))t.indexOf(s)<0&&se.call(e,s)&&(n[s]=e[s]);return n};(e=>{const t=class{constructor(e,n,s,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let r=[];for(let e=0;e<this.size;e++)r.push(!1);for(let e=0;e<this.size;e++)this.modules.push(r.slice()),this.isFunction.push(r.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(s);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,s){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,s)}static encodeBinary(n,s){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],s)}static encodeSegments(e,n,i=1,r=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=r&&r<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let d,u;for(d=i;;d++){const s=8*t.getNumDataCodewords(d,n),i=a.getTotalBits(e,d);if(i<=s){u=i;break}if(d>=r)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&u<=8*t.getNumDataCodewords(d,e)&&(n=e);let h=[];for(const t of e){s(t.mode.modeBits,4,h),s(t.numChars,t.mode.numCharCountBits(d),h);for(const e of t.getData())h.push(e)}o(h.length==u);const p=8*t.getNumDataCodewords(d,n);o(h.length<=p),s(0,Math.min(4,p-h.length),h),s(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)s(e,8,h);let m=[];for(;8*m.length<h.length;)m.push(0);return h.forEach(((e,t)=>m[t>>>3]|=e<<7-(7&t))),new t(d,n,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let s=0;s<t;s++)0==n&&0==s||0==n&&s==t-1||n==t-1&&0==s||this.drawAlignmentPattern(e[n],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const s=21522^(t<<10|n);o(s>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(s,e));this.setFunctionModule(8,7,i(s,6)),this.setFunctionModule(8,8,i(s,7)),this.setFunctionModule(7,8,i(s,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(s,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(s,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(s,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),s=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(s,o,n),this.setFunctionModule(o,s,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let s=-4;s<=4;s++){const i=Math.max(Math.abs(s),Math.abs(n)),o=e+s,r=t+n;0<=o&&o<this.size&&0<=r&&r<this.size&&this.setFunctionModule(o,r,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+n,1!=Math.max(Math.abs(s),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,s=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,s))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][n],r=t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),c=i-a%i,l=Math.floor(a/i);let d=[];const u=t.reedSolomonComputeDivisor(r);for(let n=0,s=0;n<i;n++){let i=e.slice(s,s+l-r+(n<c?0:1));s+=i.length;const o=t.reedSolomonComputeRemainder(i,u);n<c&&i.push(0),d.push(i.concat(o))}let h=[];for(let e=0;e<d[0].length;e++)d.forEach(((t,n)=>{(e!=l-r||n>=c)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let s=0;s<this.size;s++)for(let o=0;o<2;o++){const r=t-o,a=0==(t+1&2)?this.size-1-s:s;!this.isFunction[a][r]&&n<8*e.length&&(this.modules[a][r]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let s;switch(e){case 0:s=(n+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=n%3==0;break;case 3:s=(n+t)%3==0;break;case 4:s=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:s=n*t%2+n*t%3==0;break;case 6:s=(n*t%2+n*t%3)%2==0;break;case 7:s=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&s&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[n][r]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[n][r],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[r][n]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[r][n],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let s=0;s<this.size-1;s++){const i=this.modules[n][s];i==this.modules[n][s+1]&&i==this.modules[n+1][s]&&i==this.modules[n+1][s+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const s=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*s)/s)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let s=this.size-7;n.length<e;s-=t)n.splice(1,0,s);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let s=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],s),e+1<n.length&&(n[e]^=n[e+1]);s=t.reedSolomonMultiply(s,2)}return n}static reedSolomonComputeRemainder(e,n){let s=n.map((e=>0));for(const i of e){const e=i^s.shift();s.push(0),n.forEach(((n,i)=>s[i]^=t.reedSolomonMultiply(n,e)))}return s}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^285*(n>>>7),n^=(t>>>s&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function s(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const r=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)s(n,8,t);return new r(r.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!r.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);s(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new r(r.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!r.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),s(i,11,n)}return t<e.length&&s(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new r(r.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:r.isNumeric(e)?[r.makeNumeric(e)]:r.isAlphanumeric(e)?[r.makeAlphanumeric(e)]:[r.makeBytes(r.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)s(e,8,t);else if(e<16384)s(2,2,t),s(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");s(6,3,t),s(e,21,t)}return new r(r.Mode.ECI,0,t)}static isNumeric(e){return r.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return r.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const s of e){const e=s.mode.numCharCountBits(t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=r;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(Y||(Y={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((X=Y||(Y={})).QrCode||(X.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Y||(Y={}));var ae=Y,ce={L:ae.QrCode.Ecc.LOW,M:ae.QrCode.Ecc.MEDIUM,Q:ae.QrCode.Ecc.QUARTILE,H:ae.QrCode.Ecc.HIGH},le=128,de="L",ue="#FFFFFF",he="#000000",pe=!1,me=4,fe=.1;
|
|
2
|
+
/**
|
|
3
|
+
* @license qrcode.react
|
|
4
|
+
* Copyright (c) Paul O'Shannessy
|
|
5
|
+
* SPDX-License-Identifier: ISC
|
|
6
|
+
*/function ge(e){const t=e,{value:n,size:s=le,level:i=de,bgColor:o=ue,fgColor:r=he,includeMargin:a=pe,imageSettings:c}=t,l=re(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let d=ae.QrCode.encodeText(n,ce[i]).getModules();const u=a?me:0,h=d.length+2*u,p=function(e,t,n,s){if(null==s)return null;const i=n?me:0,o=e.length+2*i,r=Math.floor(t*fe),a=o/t,c=(s.width||r)*a,l=(s.height||r)*a,d=null==s.x?e.length/2-c/2:s.x*a,u=null==s.y?e.length/2-l/2:s.y*a;let h=null;if(s.excavate){let e=Math.floor(d),t=Math.floor(u);h={x:e,y:t,w:Math.ceil(c+d-e),h:Math.ceil(l+u-t)}}return{x:d,y:u,h:l,w:c,excavation:h}}(d,s,a,c);let m=null;var f,g;null!=c&&null!=p&&(null!=p.excavation&&(f=d,g=p.excavation,d=f.slice().map(((e,t)=>t<g.y||t>=g.y+g.h?e:e.map(((e,t)=>(t<g.x||t>=g.x+g.w)&&e))))),m=z.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+u,y:p.y+u,preserveAspectRatio:"none"}));const w=function(e,t=0){const n=[];return e.forEach((function(e,s){let i=null;e.forEach((function(o,r){if(!o&&null!==i)return n.push(`M${i+t} ${s+t}h${r-i}v1H${i+t}z`),void(i=null);if(r!==e.length-1)o&&null===i&&(i=r);else{if(!o)return;null===i?n.push(`M${r+t},${s+t} h1v1H${r+t}z`):n.push(`M${i+t},${s+t} h${r+1-i}v1H${i+t}z`)}}))})),n.join("")}(d,u);return z.createElement("svg",oe({height:s,width:s,viewBox:`0 0 ${h} ${h}`},l),z.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),z.createElement("path",{fill:r,d:w,shapeRendering:"crispEdges"}),m)}!function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}}();var we="\n.pointer-events-auto {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.left-0 {\n left: 0px;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.top-2\\/4 {\n top: 50%;\n}\n\n.m-auto {\n margin: auto;\n}\n\n.mx-\\[4px\\] {\n margin-left: 4px;\n margin-right: 4px;\n}\n\n.mb-4 {\n margin-bottom: 1rem;\n}\n\n.mb-6 {\n margin-bottom: 1.5rem;\n}\n\n.ml-1 {\n margin-left: 0.25rem;\n}\n\n.mt-6 {\n margin-top: 1.5rem;\n}\n\n.mt-\\[35px\\] {\n margin-top: 35px;\n}\n\n.flex {\n display: flex;\n}\n\n.grid {\n display: grid;\n}\n\n.h-\\[200px\\] {\n height: 200px;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-\\[52px\\] {\n height: 52px;\n}\n\n.h-full {\n height: 100%;\n}\n\n.w-\\[150px\\] {\n width: 150px;\n}\n\n.w-\\[200px\\] {\n width: 200px;\n}\n\n.w-\\[20px\\] {\n width: 20px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[343px\\] {\n width: 343px;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[75px\\] {\n width: 75px;\n}\n\n.w-full {\n width: 100%;\n}\n\n.translate-y-\\[-50\\%\\] {\n --tw-translate-y: -50%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.grid-flow-col {\n grid-auto-flow: column;\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-x-4 {\n -moz-column-gap: 1rem;\n column-gap: 1rem;\n}\n\n.gap-y-2 {\n row-gap: 0.5rem;\n}\n\n.rounded {\n border-radius: 0.25rem;\n}\n\n.rounded-2xl {\n border-radius: 1rem;\n}\n\n.rounded-lg {\n border-radius: 0.5rem;\n}\n\n.rounded-t-2xl {\n border-top-left-radius: 1rem;\n border-top-right-radius: 1rem;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-b {\n border-bottom-width: 1px;\n}\n\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n\n.bg-black\\/\\[\\.80\\] {\n background-color: rgb(0 0 0 / .80);\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n\n.pt-\\[20px\\] {\n padding-top: 20px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.text-\\[\\#1E2329\\] {\n --tw-text-opacity: 1;\n color: rgb(30 35 41 / var(--tw-text-opacity));\n}\n\n.text-\\[\\#929AA5\\] {\n --tw-text-opacity: 1;\n color: rgb(146 154 165 / var(--tw-text-opacity));\n}\n\n.shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.duration-300 {\n transition-duration: 300ms;\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.will-change-auto {\n will-change: auto;\n}\n\n.will-change-transform {\n will-change: transform;\n}\n\n.body3 {\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n\n.subtitle1 {\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 28px;\n}\n\n.subtitle3 {\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n /* 150% */\n}\n\n.caption2 {\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n}\n\n.t-black {\n color: #0b0e11;\n}\n\n.t-brand {\n color: #c99400;\n}\n\n.t-primary {\n color: #202630;\n}\n\n.t-secondary {\n color: #474d57;\n}\n\n.bg-primary {\n background: #fcd535;\n}\n\n@media (min-width: 768px) {\n .md\\:subtitle1 {\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 28px;\n }\n\n .md\\:w-\\[400px\\] {\n width: 400px;\n }\n\n .md\\:font-semibold {\n font-weight: 600;\n }\n}\n\n@media (min-width: 1024px) {\n .lg\\:p-8 {\n padding: 2rem;\n }\n\n .lg\\:pt-6 {\n padding-top: 1.5rem;\n }\n\n .lg\\:text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n }\n}\n\n*, :before, :after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / .5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n:root {\n --animation-duration: 300ms;\n}\n\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#binanceW3W-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n",ke=U({}),ye="binanceW3W-wrapper",be="binanceW3W-style-sheet",Ee="binanceW3W-qrcode-modal",Ce="https://app.appsflyer.com/com.binance.dev?pid=https%3A%2F%2Fwww.binance.com%2Fen&c=https%3A%2F%2Fwww.binance.com%2Fen",ve="https://app.appsflyer.com/id1436799971?pid=https%3A%2F%2Fwww.binance.com%2Fen&c=https%3A%2F%2Fwww.binance.com%2Fen",Se="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNTYiIHZpZXdCb3g9IjAgMCA1NiA1NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjUyIiBoZWlnaHQ9IjUyIiByeD0iMTAiIGZpbGw9IiMxNDE1MUEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iNCIvPgo8cGF0aCBkPSJNMTIgMjhMMTUuNjEyOSAyNC4zODcxTDE5LjIyNTggMjhMMTUuNjEyOSAzMS42MTI5TDEyIDI4WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMTguMTkzNSAyMS44MDY1TDI4IDEyTDM3LjgwNjUgMjEuODA2NUwzNC4xOTM2IDI1LjQxOTRMMjggMTkuMjI1OEwyMS44MDY1IDI1LjQxOTRMMTguMTkzNSAyMS44MDY1WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMjQuMzg3MSAyOEwyOCAyNC4zODcxTDMxLjYxMjkgMjhMMjggMzEuNjEyOUwyNC4zODcxIDI4WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMjEuODA2NSAzMC41ODA2TDE4LjE5MzUgMzQuMTkzNUwyOCA0NEwzNy44MDY1IDM0LjE5MzVMMzQuMTkzNiAzMC41ODA2TDI4IDM2Ljc3NDJMMjEuODA2NSAzMC41ODA2WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMzYuNzc0MiAyOEw0MC4zODcxIDI0LjM4NzFMNDQgMjhMNDAuMzg3MSAzMS42MTI5TDM2Ljc3NDIgMjhaIiBmaWxsPSIjRjBCOTBCIi8+Cjwvc3ZnPgo=",Ae=()=>{let[e,t]=H(),[n,s]=H(!1);return q((()=>{let e=l(),n=d();t(e),s(n)}),[]),{isMobile:e,isAndroid:n}},Ie={en:{"sdk-download-android":"Download for Android","sdk-connect":"Connect","sdk-download-ios":"Download for iOS","sdk-install":"Install","sdk-modal-instruct-1":"1. Open Binance app","sdk-modal-instruct-2":"2. Tap {{icon}} on Home Screen","sdk-modal-title":"Connect With Binance","sdk-no-app":"Don’t have the Binance app yet?"},ar:{"sdk-download-android":"تنزيل لنظام Android","sdk-connect":"اتصال","sdk-download-ios":"تنزيل لنظام iOS","sdk-install":"تثبيت","sdk-modal-instruct-1":"1. افتح تطبيق Binance","sdk-modal-instruct-2":"2. اضغط {{icon}} على الشاشة الرئيسية","sdk-modal-title":"الربط مع Binance (بينانس)","sdk-no-app":"ليس لديك تطبيق Binance حتّى الآن؟"},"bg-BG":{"sdk-download-android":"Изтегляне за Android","sdk-connect":"Свържи","sdk-download-ios":"Изтегляне за iOS","sdk-install":"Инсталиране","sdk-modal-instruct-1":"1. Отворете приложението Binance","sdk-modal-instruct-2":"2. Докоснете {{icon}} на началния екран","sdk-modal-title":"Свържете се с Binance","sdk-no-app":"Все още нямате приложението Binance?"},"zh-CN":{"sdk-download-android":"下载安卓版","sdk-connect":"关联","sdk-download-ios":"下载iOS版","sdk-install":"安装","sdk-modal-instruct-1":"1.打开币安App","sdk-modal-instruct-2":"2.点击主屏幕的{{icon}}","sdk-modal-title":"关联币安","sdk-no-app":"尚未安装币安App?"},"zh-TW":{"sdk-download-android":"Android 下載","sdk-connect":"連接","sdk-download-ios":"iOS 下載","sdk-install":"安裝","sdk-modal-instruct-1":"1. 開啟幣安 App","sdk-modal-instruct-2":"2. 在首頁畫面上點擊 {{icon}}","sdk-modal-title":"與幣安連接","sdk-no-app":"還沒有幣安 App 嗎?"},"cs-CZ":{"sdk-download-android":"Stáhnout pro Android","sdk-connect":"Připojit","sdk-download-ios":"Stáhnout pro iOS","sdk-install":"Instalovat","sdk-modal-instruct-1":"1. Otevřete aplikaci Binance","sdk-modal-instruct-2":"2. Klepněte na {{icon}} na domovské obrazovce","sdk-modal-title":"Připojit platformu Binance","sdk-no-app":"Ještě nemáte aplikaci Binance?"},"fr-FR":{"sdk-download-android":"Télécharger pour Android","sdk-connect":"Se connecter","sdk-download-ios":"Télécharger pour iOS","sdk-install":"Installer","sdk-modal-instruct-1":"1. Ouvrez l’application de Binance","sdk-modal-instruct-2":"2. Appuyez sur {{icon}} sur l’écran d’accueil","sdk-modal-title":"Se connecter à Binance","sdk-no-app":"Vous n’avez pas encore l’application de Binance ?"},"de-DE":{"sdk-download-android":"Für Android herunterladen","sdk-connect":"Verbinden","sdk-download-ios":"Für iOS herunterladen","sdk-install":"Installieren","sdk-modal-instruct-1":"1. Binance-App öffnen","sdk-modal-instruct-2":"2. Tippe auf dem Startbildschirm auf {{icon}}","sdk-modal-title":"Mit Binance verknüpfen","sdk-no-app":"Du hast die Binance-App noch nicht?"},"el-GR":{"sdk-download-android":"Λήψη για Android","sdk-connect":"Συνδεθείτε","sdk-download-ios":"Λήψη για iOS","sdk-install":"Εγκατάσταση","sdk-modal-instruct-1":"1. Ανοίξτε την εφαρμογή Binance","sdk-modal-instruct-2":"2. Πατήστε {{icon}} στην αρχική οθόνη","sdk-modal-title":"Συνδεθείτε με την Binance","sdk-no-app":"Δεν έχετε ακόμα την εφαρμογή Binance;"},"id-ID":{"sdk-download-android":"Unduh untuk Android","sdk-connect":"Terhubung","sdk-download-ios":"Unduh untuk iOS","sdk-install":"Instal","sdk-modal-instruct-1":"1. Buka aplikasi Binance","sdk-modal-instruct-2":"2. Ketuk {{icon}} di Layar Beranda","sdk-modal-title":"Hubungkan dengan Binance","sdk-no-app":"Belum punya aplikasi Binance?"},"it-IT":{"sdk-download-android":"Scarica per Android","sdk-connect":"Collega","sdk-download-ios":"Scarica per iOS","sdk-install":"Installa","sdk-modal-instruct-1":"1. Apri l'app Binance","sdk-modal-instruct-2":"2. Tocca {{icon}} nella homepage","sdk-modal-title":"Collega con Binance","sdk-no-app":"Non hai ancora l'app Binance?"},"kk-KZ":{"sdk-download-android":"Android үшін жүктеп алу","sdk-connect":"Қосылу","sdk-download-ios":"iOS үшін жүктеп алу","sdk-install":"Орнату","sdk-modal-instruct-1":"1. Binance қолданбасын ашыңыз","sdk-modal-instruct-2":"2. Басты экрандағы {{icon}} белгішесін түртіңіз","sdk-modal-title":"Binance платформасымен байланыстыру","sdk-no-app":"Сізде әлі Binance қолданбасы жоқ па?"},"lv-LV":{"sdk-download-android":"Lejupielādēt Android ierīcei","sdk-connect":"Savienot","sdk-download-ios":"Lejupielādēt iOS ierīcei","sdk-install":"Instalēt","sdk-modal-instruct-1":"1. Atver Binance lietotni","sdk-modal-instruct-2":"2. Pieskaries pie {{icon}} sākuma ekrānā","sdk-modal-title":"Savieno ar Binance","sdk-no-app":"Vai tev vēl nav Binance lietotnes?"},"pl-PL":{"sdk-download-android":"Pobierz na Androida","sdk-connect":"Połącz","sdk-download-ios":"Pobierz na iOS","sdk-install":"Zainstaluj","sdk-modal-instruct-1":"1. Otwórz Aplikację Binance","sdk-modal-instruct-2":"2. Kliknij {{icon}} na ekranie głównym","sdk-modal-title":"Połącz z Binance","sdk-no-app":"Nie masz jeszcze aplikacji Binance?"},"pt-BR":{"sdk-download-android":"Baixar para Android","sdk-connect":"Conecte","sdk-download-ios":"Baixar para iOS","sdk-install":"Instalar","sdk-modal-instruct-1":"1. Abra o Aplicativo da Binance","sdk-modal-instruct-2":"2. Toque em {{icon}} na Tela Inicial","sdk-modal-title":"Conectar com a Binance","sdk-no-app":"Ainda não tem o aplicativo da Binance?"},"pt-PT":{"sdk-download-android":"Transferir para Android","sdk-connect":"Associar","sdk-download-ios":"Transferir para iOS","sdk-install":"Instalar","sdk-modal-instruct-1":"1. Abre a aplicação Binance","sdk-modal-instruct-2":"2. Toca em {{icon}} no Ecrã Inicial","sdk-modal-title":"Associa com a Binance","sdk-no-app":"Ainda não tens a aplicação Binance?"},"ro-RO":{"sdk-download-android":"Descărcați pentru Android","sdk-connect":"Conectare","sdk-download-ios":"Descărcați pentru iOS","sdk-install":"Instalați","sdk-modal-instruct-1":"1. Deschideți aplicația Binance","sdk-modal-instruct-2":"2. Atingeți {{icon}} pe ecranul de pornire","sdk-modal-title":"Conectați-vă cu Binance","sdk-no-app":"Nu aveți încă aplicația Binance?"},"ru-RU":{"sdk-download-android":"Скачать для Android","sdk-connect":"Подключить","sdk-download-ios":"Скачать для iOS","sdk-install":"Установить","sdk-modal-instruct-1":"1. Откройте приложение Binance","sdk-modal-instruct-2":"2. Нажмите {{icon}} на главном экране","sdk-modal-title":"Подключить кошелек Binance","sdk-no-app":"У вас еще нет приложения Binance?"},"sk-SK":{"sdk-download-android":"Stiahnuť pre Android","sdk-connect":"Pripojiť","sdk-download-ios":"Stiahnuť pre iOS","sdk-install":"Nainštalovať","sdk-modal-instruct-1":"1. Otvorte aplikáciu Binance","sdk-modal-instruct-2":"2. Klepnite na ikonu {{icon}} na domovskej obrazovke","sdk-modal-title":"Spojte sa s Binance","sdk-no-app":"Ešte nemáte aplikáciu Binance?"},"sl-SI":{"sdk-download-android":"Prenos za Android","sdk-connect":"Poveži","sdk-download-ios":"Prenos za iOS","sdk-install":"Namesti","sdk-modal-instruct-1":"1. Odprite aplikacijo Binance","sdk-modal-instruct-2":"2. Tapnite {{icon}} na začetnem zaslonu","sdk-modal-title":"Povežite se s platformo Binance","sdk-no-app":"Še nimate aplikacije Binance?"},"es-LA":{"sdk-download-android":"Descargar para Android","sdk-connect":"Conecta","sdk-download-ios":"Descargar para iOS","sdk-install":"Instala","sdk-modal-instruct-1":"1. Abre la aplicación de Binance","sdk-modal-instruct-2":"2. Toca {{icon}} en la pantalla de inicio","sdk-modal-title":"Conectar con Binance","sdk-no-app":"¿Aún no tienes la aplicación de Binance?"},"es-ES":{"sdk-download-android":"Descargar para Android","sdk-connect":"Conectar","sdk-download-ios":"Descargar para iOS","sdk-install":"Instalar","sdk-modal-instruct-1":"1. Open Binance app","sdk-modal-instruct-2":"2. Pulsa en {{icon}} en la página principal","sdk-modal-title":"Connect With Binance","sdk-no-app":"¿Aún no tienes la aplicación de Binance?"},"sv-SE":{"sdk-download-android":"Ladda ned för Android","sdk-connect":"Anslut","sdk-download-ios":"Ladda ned för iOS","sdk-install":"Installera","sdk-modal-instruct-1":"1. Öppna Binance-appen","sdk-modal-instruct-2":"2. Tryck på {{icon}} på startskärmen","sdk-modal-title":"Anslut med Binance","sdk-no-app":"Har du inte Binance-appen ännu?"},"tr-TR":{"sdk-download-android":"Android için indir","sdk-connect":"Bağlan","sdk-download-ios":"iOS için indir","sdk-install":"Yükle","sdk-modal-instruct-1":"1. Binance Uygulamasını Açın","sdk-modal-instruct-2":"2. Ana Ekranda {{icon}} simgesine dokunun","sdk-modal-title":"Binance ile Bağlanın","sdk-no-app":"Henüz Binance uygulamanız yok mu?"},"uk-UA":{"sdk-download-android":"Завантажити для Android","sdk-connect":"Підключитись","sdk-download-ios":"Завантажити для iOS","sdk-install":"Встановити","sdk-modal-instruct-1":"1. Відкрийте застосунок Binance","sdk-modal-instruct-2":"2. Торкніться {{icon}} на головному екрані","sdk-modal-title":"Підключіться до Binance","sdk-no-app":"Ще не маєте застосунку Binance?"},"vi-VN":{"sdk-download-android":"Tải xuống cho Android","sdk-connect":"Kết nối","sdk-download-ios":"Tải xuống cho iOS","sdk-install":"Cài đặt","sdk-modal-instruct-1":"1. Mở ứng dụng Binance","sdk-modal-instruct-2":"2. Nhấn vào {{icon}} trên Màn hình chính","sdk-modal-title":"Kết nối với Binance","sdk-no-app":"Bạn chưa có ứng dụng Binance?"},"da-DK":{"sdk-download-android":"Download til Android","sdk-connect":"Forbind","sdk-download-ios":"Download til iOS","sdk-install":"Installer","sdk-modal-instruct-1":"1. Åbn Binance-appen","sdk-modal-instruct-2":"2. Tryk på {{icon}} på startskærmen","sdk-modal-title":"Forbind til Binance","sdk-no-app":"Har du ikke Binance-appen endnu?"},"my-MM":{"sdk-download-android":"အန်းဒရွိုက်အတွက် ဒေါင်းလုဒ်လုပ်မည်","sdk-connect":"ချိတ်ဆက်မည်","sdk-download-ios":"iOS အတွက် ဒေါင်းလုဒ်လုပ်မည်","sdk-install":"ထည့်သွင်းမည်","sdk-modal-instruct-1":"1. Open Binance app","sdk-modal-instruct-2":"ပင်မမျက်နှာပြင်မှ {{icon}} ကိုနှိပ်ပါ။","sdk-modal-title":"Connect With Binance","sdk-no-app":"Binance App မရှိသေးဘူးလား။"},"lo-LA":{"sdk-download-android":"ດາວໂຫຼດສໍາລັບ Android","sdk-connect":"ເຊື່ອມຕໍ່","sdk-download-ios":"ດາວໂຫຼດສໍາລັບ iOS","sdk-install":"ຕິດຕັ້ງ","sdk-modal-instruct-1":"1. ເປີດແອັບ Binance","sdk-modal-instruct-2":"2. ແຕະ {{icon}} ໃນໜ້າຈໍຫຼັກ","sdk-modal-title":"ເຊື່ອມຕໍ່ກັບ Binance","sdk-no-app":"ຍັງບໍ່ມີແອັບ Binance ເທື່ອບໍ?"},"si-LK":{"sdk-download-android":"Android සඳහා බාගත කරන්න","sdk-connect":"සම්බන්ධ කරන්න","sdk-download-ios":"iOS සඳහා බාගත කරන්න","sdk-install":"ස්ථාපනය කරන්න","sdk-modal-instruct-1":"1. Binance යෙදුම විවෘත කරන්න","sdk-modal-instruct-2":"2. මුල් තිරයේ {{icon}} මත තට්ටු කරන්න","sdk-modal-title":"Binance සමග සම්බන්ධ වන්න","sdk-no-app":"තවමත් Binance යෙදුම නැති ද?"}},xe=["en","ar","bg-BG","zh-CN","zh-TW","cs-CZ","fr-FR","de-DE","el-GR","id-ID","it-IT","kk-KZ","lv-LV","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","es-LA","es-ES","sv-SE","tr-TR","uk-UA","vi-VN","da-DK","my-MM","lo-LA","si-LK"].reduce(((e,t)=>(e[t]=Ie[t],e)),{}),Oe=xe,Re=()=>{let{lng:e}=W(ke);return V(((t,n)=>Oe?.[e]?.[t]||Oe?.en?.[t]||n?.default||t),[e])},Ne=({size:e=24,color:t="currentColor",className:n,children:s,...i})=>z.createElement("svg",{width:e,height:e,fill:t,className:n,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...i},s),Te=e=>z.createElement(Ne,{size:24,...e},z.createElement("path",{d:"M21.7725 18.7033C21.4062 19.5418 20.9727 20.3136 20.4704 21.0232C19.7857 21.9906 19.2251 22.6602 18.7931 23.032C18.1233 23.6424 17.4058 23.955 16.6374 23.9728C16.0857 23.9728 15.4205 23.8172 14.6461 23.5017C13.8692 23.1876 13.1552 23.032 12.5024 23.032C11.8177 23.032 11.0834 23.1876 10.2979 23.5017C9.51127 23.8172 8.87756 23.9816 8.39305 23.9979C7.65619 24.0291 6.92173 23.7076 6.1886 23.032C5.72069 22.6276 5.13542 21.9343 4.43429 20.9521C3.68203 19.9033 3.06358 18.687 2.57906 17.3004C2.06017 15.8026 1.80005 14.3523 1.80005 12.9482C1.80005 11.3398 2.15076 9.95259 2.85324 8.79011C3.40532 7.85636 4.13979 7.11979 5.05903 6.57906C5.97827 6.03834 6.97151 5.76279 8.04114 5.74516C8.62641 5.74516 9.39391 5.92456 10.3477 6.27715C11.2988 6.63091 11.9095 6.81032 12.1772 6.81032C12.3774 6.81032 13.0558 6.60054 14.2058 6.18233C15.2934 5.79449 16.2113 5.63391 16.9633 5.69716C19.0009 5.86012 20.5317 6.6561 21.5497 8.09013C19.7274 9.18432 18.826 10.7169 18.8439 12.6829C18.8603 14.2142 19.4209 15.4886 20.5227 16.5004C21.022 16.97 21.5796 17.333 22.2001 17.5907C22.0655 17.9774 21.9235 18.3477 21.7725 18.7033ZM17.0993 0.480137C17.0993 1.68041 16.6568 2.8011 15.7748 3.8384C14.7104 5.07155 13.4229 5.78412 12.0268 5.67168C12.009 5.52769 11.9987 5.37614 11.9987 5.21688C11.9987 4.06462 12.5049 2.83147 13.4038 1.82321C13.8526 1.3127 14.4234 0.888228 15.1155 0.549615C15.8062 0.216055 16.4595 0.031589 17.0739 0C17.0918 0.160458 17.0993 0.320926 17.0993 0.480121V0.480137Z",fill:"#1E2329"})),Me=e=>z.createElement(Ne,{size:24,...e},z.createElement("path",{d:"M13.5589 11.0874L4.08203 1.59644H4.17441C4.98558 1.59644 5.68614 1.89129 6.81073 2.4993L16.7488 7.88083L13.5589 11.0874Z",fill:"#202630"}),z.createElement("path",{d:"M12.6373 12.008L2.90218 21.7203C2.66236 21.3329 2.49658 20.7063 2.49658 19.8034V4.19354C2.49658 3.29078 2.66236 2.66403 2.90218 2.2771L12.6373 12.008Z",fill:"#202630"}),z.createElement("path",{d:"M13.5589 12.9124L16.7488 16.1187L6.81073 21.5001C5.68614 22.1083 4.98548 22.4036 4.17441 22.4036H4.08203L13.5589 12.9124Z",fill:"#202630"}),z.createElement("path",{d:"M17.9437 8.52563L14.4775 12.0091L17.9437 15.4738L20.0456 14.3309C20.8199 13.9069 22 13.1329 22 12.0091C22 10.8662 20.8199 10.0922 20.0456 9.66821L17.9437 8.52563Z",fill:"#202630"})),_e=e=>z.createElement(Ne,{size:24,...e},z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 4H10.5V7H7.5V10H4.5V7V4H7.5ZM14.5 4H17.5H20.5V7V10H17.5V7H14.5V4ZM10.5 20V17H7.5V14H4.5V17V20H7.5H10.5ZM17.5 20H14.5V17H17.5V14H20.5V17V20H17.5ZM16.5 10.5H8.5V13.5H16.5V10.5Z",fill:"#202630"})),Be=({value:e,...t})=>{let n=Pe(e).map((e=>"string"==typeof e?e:z.cloneElement(t[e.key],{key:e.key})));return z.createElement(z.Fragment,null,n)},Pe=e=>{let t,n=/{{(.*?)}}/g,s=0,i=[];for(;null!==(t=n.exec(e));)t.index!==s&&i.push(e.substring(s,t.index)),i.push({key:t[1]}),s=n.lastIndex;return s!==e.length&&i.push(e.substring(s)),i},De=()=>{let e=Re();return z.createElement(z.Fragment,null,z.createElement(je,{t:e}),z.createElement(Le,{t:e}),z.createElement(Fe,null))},je=({t:e})=>z.createElement("div",{style:{borderBottom:"1px solid #EAECEF"},className:"grid justify-center gap-y-2 pb-6 body3 t-black border-b border-gray-300"},z.createElement("div",null,e("sdk-modal-instruct-1",{default:"1. Open Binance app"})),z.createElement("div",{className:"flex items-center"},z.createElement(Be,{value:e("sdk-modal-instruct-2",{default:"2. Tap {{icon}} on Home"}),icon:z.createElement(_e,{className:"w-[24px] h-[24px] mx-[4px]"})}))),Le=({t:e})=>z.createElement("div",{className:"py-4 body3 t-secondary text-center"},e("sdk-no-app",{default:"Don't have Binance app yet?"})),Fe=()=>z.createElement("div",{className:"grid grid-cols-2 gap-x-4"},z.createElement(ze,{type:"iOS"}),z.createElement(ze,{type:"Android"})),ze=({type:e})=>{let t=Re();return z.createElement("div",{style:{border:"1px solid #EAECEF"},className:"p-[12px] rounded-lg grid cursor-pointer t-secondary grid-flow-col items-center gap-x-4 w-[150px]",onClick:()=>{window.open("Android"===e?Ce:ve,"_blank")}},"Android"===e?z.createElement(Me,{className:"w-[24px] h-[24px] m-auto"}):z.createElement(Te,{className:"w-[24px] h-[24px] m-auto"}),z.createElement("div",{className:"w-[75px] caption2 t-secondary"},t(`sdk-download-${e.toLowerCase()}`,{default:`Download for ${e}`})))},Ue=e=>z.createElement(Ne,{...e},z.createElement("path",{d:"M6.69708 4.57538L4.57576 6.6967L9.87906 12L4.57576 17.3033L6.69708 19.4246L12.0004 14.1213L17.3037 19.4246L19.425 17.3033L14.1217 12L19.425 6.6967L17.3037 4.57538L12.0004 9.87868L6.69708 4.57538Z",fill:"currentColor"})),He=({onClose:e})=>{let t=Re();return z.createElement("div",{className:"flex items-center justify-between"},z.createElement("p",{className:"text-base font-medium text-[#1E2329] lg:text-xl md:font-semibold md:subtitle1"},t("sdk-modal-title",{default:"Connect with Binance"})),z.createElement("div",{className:"cursor-pointer text-[#929AA5]",onClick:e},z.createElement(Ue,null)))},qe=({id:e,onClose:t,onConnect:n})=>{let s=Re();return z.createElement("div",{id:e,className:"animated fadeIn pointer-events-auto fixed top-0 left-0 h-full w-full bg-black/[.80] duration-300 ease-in-out will-change-auto"},z.createElement("div",{className:"absolute bottom-0 m-auto w-full rounded-t-2xl bg-white px-4 pb-6 shadow-inner duration-300 ease-in-out will-change-transform md:w-[400px]"},z.createElement(Ve,{onClose:t}),z.createElement("div",{className:"mt-6 mb-4 flex justify-center"},z.createElement("img",{className:"w-[60px]",src:Se})),z.createElement("div",{className:"subtitle1 text-center mb-6 t-primary"},s("sdk-modal-title",{default:"Connect with Binance"})),z.createElement("button",{onClick:n,style:{borderColor:"transparent"},className:"w-full rounded h-[40px] flex justify-center items-center bg-primary t-primary subtitle3 mb-4"},s("sdk-connect",{default:"Connect"})),z.createElement("div",{className:"text-center py-3"},z.createElement("span",null,s("sdk-no-app",{default:"Don’t have Binance app yet?"})),z.createElement("a",{target:"_blank",href:"https://www.binance.com/en/download",className:"t-brand ml-1"},s("sdk-install",{default:"Install"})))))},Ve=({onClose:e})=>z.createElement("div",{className:"flex items-center justify-end h-[52px]"},z.createElement("div",{className:"cursor-pointer text-[#929AA5]",onClick:e},z.createElement(Ue,{className:"w-[20px]"}))),We=e=>{let t=document.createElement("a");t.href=e,document.body.appendChild(t),((e,t)=>{let n="visibilitychange",s=setTimeout((()=>{document.hidden||e()}),t),i=()=>{document.hidden&&(clearTimeout(s),document.removeEventListener(n,i))};document.addEventListener(n,i,!1)})((()=>{window.location.href="https://www.binance.com/en/download"}),1e3),t.click(),document.body.removeChild(t)};var $e=function(e){let{toBinance:t}=(e=>{let{isAndroid:t,isMobile:n}=Ae();return{toBinance:()=>{let s=h(t,e);if(n){if(!t){let e=document.createElement("a");e.href=s,document.body.appendChild(e),e.click(),document.body.removeChild(e)}t&&We(s)}}}})(e.url);return z.createElement("div",null,z.createElement("div",{className:"mt-[35px] flex justify-center"},z.createElement("div",{className:"w-[200px] h-[200px] mb-4",onClick:t},e.url&&z.createElement(ge,{value:e.url,width:"100%",height:"100%",level:"M",imageSettings:{src:Se,height:32,width:32,excavate:!1}}))))},Je=({onClose:e,isReady:t})=>{let{isMobile:n}=Ae(),[s,i]=H(""),[o,r]=H(!1);q((()=>{t.then(i).catch((()=>r(!0)))}),[t]);let a={url:s,error:o};return!1===n?z.createElement("div",{id:Ee,className:"animated fadeIn pointer-events-auto fixed top-0 left-0 h-full w-full bg-black/[.80] duration-300 ease-in-out will-change-auto"},z.createElement("div",{className:"relative top-2/4 m-auto w-[343px] translate-y-[-50%] rounded-2xl bg-white px-6 pt-[20px] pb-6 shadow-inner duration-300 ease-in-out will-change-transform md:w-[400px] lg:p-8 lg:pt-6"},z.createElement(He,{onClose:e}),z.createElement($e,{...a}),z.createElement(De,null))):n?z.createElement(qe,{onConnect:()=>{u(s)},onClose:e,id:Ee}):void 0},Qe={order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag","path","subdomain"],lookupQuerystring:function(){let e=window.location.search.match(/lng=([^&]*)/);return e&&e[1]},lookupCookie:function(){let e=document.cookie.match(/i18next=([^;]*)/);return e&&e[1]},lookupLocalStorage:function(){return localStorage.getItem("i18nextLng")},lookupSessionStorage:function(){return sessionStorage.getItem("i18nextLng")},lookupFromNavigator:function(){return navigator.language},lookupFromHtmlTag:function(){return document.documentElement.lang},lookupFromPath:function(){let e=window.location.pathname.match(/\/([^/]*)/);return e&&e[1]},lookupFromSubdomain:function(){let e=window.location.hostname.match(/^(.+)\./);return e&&e[1]}},Ke=()=>{for(let e of Qe.order)try{let t=Qe["lookup"+e.charAt(0).toUpperCase()+e.slice(1)]();if(t)return t}catch(t){console.error(`Error detecting language with method: ${e}`,t);continue}return"en"};function Ge(){let e=window.document,t=e.getElementById(Ee);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((()=>{let t=e.getElementById(ye);t&&e.body.removeChild(t)}),300))}function Ze(e){return()=>{Ge(),e&&e()}}async function Ye({isReady:e,cb:t,lng:n}){!function(){let e=window.document,t=e.getElementById(be);t&&e.head.removeChild(t);let n=e.createElement("style");n.setAttribute("id",be),n.innerHTML=we,e.head.appendChild(n)}();let s=function(){let e=window.document,t=e.createElement("div");return t.setAttribute("id",ye),e.body.appendChild(t),t}(),i=Q(s);await e;let o=n??Ke();i.render(F.createElement(ke.Provider,{value:{lng:o}},F.createElement(Je,{isReady:e,onClose:Ze(t)})))}var Xe=e=>{},et=()=>{};var tt={open:function({cb:e,lng:t}){let n=new Promise(((e,t)=>{Xe=e,et=t}));c()||Ye({isReady:n,cb:e,lng:t})},close:function(){c()||Ge()},ready:function(e){Xe(e)},fail:function(){console.log("relay failed...."),et()}},nt=tt,st=typeof window<"u"?window.WebSocket:function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},it=class extends p{constructor(e){super(),this.opts=e,this.socket=null,this.nextSocket=null,this.subscriptions=e.subscriptions||[],this.qs=`env=browser&protocol=wc&version=${e.version}`}qs;urls=[];socket;nextSocket;queue=[];subscriptions=[];retryIndex=0;set readyState(e){}get readyState(){return this.socket?this.socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set retryFailed(e){}get retryFailed(){return this.retryIndex>0&&this.retryIndex>=this.urls.length}open(e){if(!Array.isArray(e)||0===e.length)throw new Error("Missing or invalid WebSocket url");this.urls=e,this.retryIndex=0,this.socketCreate()}close(){this._socketClose()}send(e,t,n){if(!t||"string"!=typeof t)throw new Error("Missing or invalid topic field");this.socketSend({topic:t,type:"pub",payload:e,silent:!!n})}subscribe(e){this.socketSend({topic:e,type:"sub",payload:"",silent:!0})}socketCreate(){if(this.nextSocket)return;let e=this.getWsUrl();if(!e)return this.events.emit("error",new Error("Retry limit reached. Can't connect to any url."),e);if(this.nextSocket=new st(e),!this.nextSocket)throw new Error("Failed to create socket");this.nextSocket.onmessage=e=>this.socketReceive(e),this.nextSocket.onopen=()=>this.socketOpen(),this.nextSocket.onerror=t=>this.socketError(t,e),this.nextSocket.onclose=e=>{this.nextSocket=null,this.socketCreate()}}getWsUrl(){return this.retryIndex>=this.urls.length?"":`${this.urls[this.retryIndex++]}?${this.qs}`}socketOpen(){this._socketClose(),this.socket=this.nextSocket,this.nextSocket=null,this.queueSubscriptions(),this.pushQueue(),this.events.emit("open",this.urls[this.retryIndex-1])}_socketClose(){this.socket&&(this.socket.onclose=()=>{},this.socket.close(),this.events.emit("close"))}socketSend(e){let t=JSON.stringify(e);this.socket&&1===this.socket.readyState?this.socket.send(t):this.setToQueue(e)}socketReceive(e){let t;try{t=JSON.parse(e.data)}catch{return}this.socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this.socket&&1===this.socket.readyState&&this.events.emit("message",t)}socketError(e,t){this.events.emit("error",e,t)}queueSubscriptions(){this.subscriptions.forEach((e=>this.queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this.subscriptions=this.opts.subscriptions||[]}setToQueue(e){this.queue.push(e)}pushQueue(){this.queue.forEach((e=>this.socketSend(e))),this.queue=[]}};function ot(e){let t=Date.now();return new Promise(((n,s)=>{try{let s=new st(e);s.onopen=()=>{s.close(),n({ttl:Date.now()-t,url:e})},s.onerror=()=>{n({ttl:0,url:e})}}catch{s({ttl:0,url:e})}}))}var rt=(e=>(e[e.DisconnectAtWallet=0]="DisconnectAtWallet",e[e.DisconnectAtClient=1]="DisconnectAtClient",e[e.NetworkError=2]="NetworkError",e))(rt||{});function at(e,t){return function(){return e.apply(t,arguments)}}const{toString:ct}=Object.prototype,{getPrototypeOf:lt}=Object,dt=(ut=Object.create(null),e=>{const t=ct.call(e);return ut[t]||(ut[t]=t.slice(8,-1).toLowerCase())});var ut;const ht=e=>(e=e.toLowerCase(),t=>dt(t)===e),pt=e=>t=>typeof t===e,{isArray:mt}=Array,ft=pt("undefined");const gt=ht("ArrayBuffer");const wt=pt("string"),kt=pt("function"),yt=pt("number"),bt=e=>null!==e&&"object"==typeof e,Et=e=>{if("object"!==dt(e))return!1;const t=lt(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ct=ht("Date"),vt=ht("File"),St=ht("Blob"),At=ht("FileList"),It=ht("URLSearchParams");function xt(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let s,i;if("object"!=typeof e&&(e=[e]),mt(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let r;for(s=0;s<o;s++)r=i[s],t.call(null,e[r],r,e)}}function Ot(e,t){t=t.toLowerCase();const n=Object.keys(e);let s,i=n.length;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Nt=e=>!ft(e)&&e!==Rt;const Tt=(Mt="undefined"!=typeof Uint8Array&<(Uint8Array),e=>Mt&&e instanceof Mt);var Mt;const _t=ht("HTMLFormElement"),Bt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pt=ht("RegExp"),Dt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};xt(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(s[i]=o||n)})),Object.defineProperties(e,s)},jt="abcdefghijklmnopqrstuvwxyz",Lt="0123456789",Ft={DIGIT:Lt,ALPHA:jt,ALPHA_DIGIT:jt+jt.toUpperCase()+Lt};const zt=ht("AsyncFunction");var Ut={isArray:mt,isArrayBuffer:gt,isBuffer:function(e){return null!==e&&!ft(e)&&null!==e.constructor&&!ft(e.constructor)&&kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||kt(e.append)&&("formdata"===(t=dt(e))||"object"===t&&kt(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&>(e.buffer),t},isString:wt,isNumber:yt,isBoolean:e=>!0===e||!1===e,isObject:bt,isPlainObject:Et,isUndefined:ft,isDate:Ct,isFile:vt,isBlob:St,isRegExp:Pt,isFunction:kt,isStream:e=>bt(e)&&kt(e.pipe),isURLSearchParams:It,isTypedArray:Tt,isFileList:At,forEach:xt,merge:function e(){const{caseless:t}=Nt(this)&&this||{},n={},s=(s,i)=>{const o=t&&Ot(n,i)||i;Et(n[o])&&Et(s)?n[o]=e(n[o],s):Et(s)?n[o]=e({},s):mt(s)?n[o]=s.slice():n[o]=s};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&xt(arguments[e],s);return n},extend:(e,t,n,{allOwnKeys:s}={})=>(xt(t,((t,s)=>{n&&kt(t)?e[s]=at(t,n):e[s]=t}),{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,s)=>{let i,o,r;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)r=i[o],s&&!s(r,e,t)||a[r]||(t[r]=e[r],a[r]=!0);e=!1!==n&<(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:dt,kindOfTest:ht,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return-1!==s&&s===n},toArray:e=>{if(!e)return null;if(mt(e))return e;let t=e.length;if(!yt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=n.next())&&!s.done;){const n=s.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const s=[];for(;null!==(n=e.exec(t));)s.push(n);return s},isHTMLForm:_t,hasOwnProperty:Bt,hasOwnProp:Bt,reduceDescriptors:Dt,freezeMethods:e=>{Dt(e,((t,n)=>{if(kt(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const s=e[n];kt(s)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},s=e=>{e.forEach((e=>{n[e]=!0}))};return mt(e)?s(e):s(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Ot,global:Rt,isContextDefined:Nt,ALPHABET:Ft,generateString:(e=16,t=Ft.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n},isSpecCompliantForm:function(e){return!!(e&&kt(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,s)=>{if(bt(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[s]=e;const i=mt(e)?[]:{};return xt(e,((e,t)=>{const o=n(e,s+1);!ft(o)&&(i[t]=o)})),t[s]=void 0,i}}return e};return n(e,0)},isAsyncFn:zt,isThenable:e=>e&&(bt(e)||kt(e))&&kt(e.then)&&kt(e.catch)};function Ht(e,t,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i)}Ut.inherits(Ht,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qt=Ht.prototype,Vt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Vt[e]={value:e}})),Object.defineProperties(Ht,Vt),Object.defineProperty(qt,"isAxiosError",{value:!0}),Ht.from=(e,t,n,s,i,o)=>{const r=Object.create(qt);return Ut.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ht.call(r,e.message,t,n,s,i),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};function Wt(e){return Ut.isPlainObject(e)||Ut.isArray(e)}function $t(e){return Ut.endsWith(e,"[]")?e.slice(0,-2):e}function Jt(e,t,n){return e?e.concat(t).map((function(e,t){return e=$t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Qt=Ut.toFlatObject(Ut,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Kt(e,t,n){if(!Ut.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const s=(n=Ut.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ut.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,r=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ut.isSpecCompliantForm(t);if(!Ut.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ut.isDate(e))return e.toISOString();if(!a&&Ut.isBlob(e))throw new Ht("Blob is not supported. Use a Buffer instead.");return Ut.isArrayBuffer(e)||Ut.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(Ut.endsWith(n,"{}"))n=s?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ut.isArray(e)&&function(e){return Ut.isArray(e)&&!e.some(Wt)}(e)||(Ut.isFileList(e)||Ut.endsWith(n,"[]"))&&(a=Ut.toArray(e)))return n=$t(n),a.forEach((function(e,s){!Ut.isUndefined(e)&&null!==e&&t.append(!0===r?Jt([n],s,o):null===r?n:n+"[]",c(e))})),!1;return!!Wt(e)||(t.append(Jt(i,n,o),c(e)),!1)}const d=[],u=Object.assign(Qt,{defaultVisitor:l,convertValue:c,isVisitable:Wt});if(!Ut.isObject(e))throw new TypeError("data must be an object");return function e(n,s){if(!Ut.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+s.join("."));d.push(n),Ut.forEach(n,(function(n,o){!0===(!(Ut.isUndefined(n)||null===n)&&i.call(t,n,Ut.isString(o)?o.trim():o,s,u))&&e(n,s?s.concat(o):[o])})),d.pop()}}(e),t}function Gt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Zt(e,t){this._pairs=[],e&&Kt(e,this,t)}const Yt=Zt.prototype;function Xt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function en(e,t,n){if(!t)return e;const s=n&&n.encode||Xt,i=n&&n.serialize;let o;if(o=i?i(t,n):Ut.isURLSearchParams(t)?t.toString():new Zt(t,n).toString(s),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Yt.append=function(e,t){this._pairs.push([e,t])},Yt.toString=function(e){const t=e?function(t){return e.call(this,t,Gt)}:Gt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var tn=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ut.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sn={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Zt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const on="undefined"!=typeof window&&"undefined"!=typeof document,rn=(an="undefined"!=typeof navigator&&navigator.product,on&&["ReactNative","NativeScript","NS"].indexOf(an)<0);var an;const cn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ln={...Object.freeze({__proto__:null,hasBrowserEnv:on,hasStandardBrowserWebWorkerEnv:cn,hasStandardBrowserEnv:rn}),...sn};function dn(e){function t(e,n,s,i){let o=e[i++];const r=Number.isFinite(+o),a=i>=e.length;if(o=!o&&Ut.isArray(s)?s.length:o,a)return Ut.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!r;s[o]&&Ut.isObject(s[o])||(s[o]=[]);return t(e,n,s[o],i)&&Ut.isArray(s[o])&&(s[o]=function(e){const t={},n=Object.keys(e);let s;const i=n.length;let o;for(s=0;s<i;s++)o=n[s],t[o]=e[o];return t}(s[o])),!r}if(Ut.isFormData(e)&&Ut.isFunction(e.entries)){const n={};return Ut.forEachEntry(e,((e,s)=>{t(function(e){return Ut.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),s,n,0)})),n}return null}const un={transitional:nn,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=Ut.isObject(e);i&&Ut.isHTMLForm(e)&&(e=new FormData(e));if(Ut.isFormData(e))return s&&s?JSON.stringify(dn(e)):e;if(Ut.isArrayBuffer(e)||Ut.isBuffer(e)||Ut.isStream(e)||Ut.isFile(e)||Ut.isBlob(e))return e;if(Ut.isArrayBufferView(e))return e.buffer;if(Ut.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Kt(e,new ln.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,s){return ln.isNode&&Ut.isBuffer(e)?(this.append(t,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Ut.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Kt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),function(e,t,n){if(Ut.isString(e))try{return(t||JSON.parse)(e),Ut.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||un.transitional,n=t&&t.forcedJSONParsing,s="json"===this.responseType;if(e&&Ut.isString(e)&&(n&&!this.responseType||s)){const n=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Ht.from(e,Ht.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ln.classes.FormData,Blob:ln.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ut.forEach(["delete","get","head","post","put","patch"],(e=>{un.headers[e]={}}));var hn=un;const pn=Ut.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const mn=Symbol("internals");function fn(e){return e&&String(e).trim().toLowerCase()}function gn(e){return!1===e||null==e?e:Ut.isArray(e)?e.map(gn):String(e)}function wn(e,t,n,s,i){return Ut.isFunction(s)?s.call(this,t,n):(i&&(t=n),Ut.isString(t)?Ut.isString(s)?-1!==t.indexOf(s):Ut.isRegExp(s)?s.test(t):void 0:void 0)}class kn{constructor(e){e&&this.set(e)}set(e,t,n){const s=this;function i(e,t,n){const i=fn(t);if(!i)throw new Error("header name must be a non-empty string");const o=Ut.findKey(s,i);(!o||void 0===s[o]||!0===n||void 0===n&&!1!==s[o])&&(s[o||t]=gn(e))}const o=(e,t)=>Ut.forEach(e,((e,n)=>i(e,n,t)));return Ut.isPlainObject(e)||e instanceof this.constructor?o(e,t):Ut.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,s,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),s=e.substring(i+1).trim(),!n||t[n]&&pn[n]||("set-cookie"===n?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=fn(e)){const n=Ut.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}(e);if(Ut.isFunction(t))return t.call(this,e,n);if(Ut.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fn(e)){const n=Ut.findKey(this,e);return!(!n||void 0===this[n]||t&&!wn(0,this[n],n,t))}return!1}delete(e,t){const n=this;let s=!1;function i(e){if(e=fn(e)){const i=Ut.findKey(n,e);!i||t&&!wn(0,n[i],i,t)||(delete n[i],s=!0)}}return Ut.isArray(e)?e.forEach(i):i(e),s}clear(e){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const i=t[n];e&&!wn(0,this[i],i,e,!0)||(delete this[i],s=!0)}return s}normalize(e){const t=this,n={};return Ut.forEach(this,((s,i)=>{const o=Ut.findKey(n,i);if(o)return t[o]=gn(s),void delete t[i];const r=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();r!==i&&delete t[i],t[r]=gn(s),n[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ut.forEach(this,((n,s)=>{null!=n&&!1!==n&&(t[s]=e&&Ut.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[mn]=this[mn]={accessors:{}}).accessors,n=this.prototype;function s(e){const s=fn(e);t[s]||(!function(e,t){const n=Ut.toCamelCase(" "+t);["get","set","has"].forEach((s=>{Object.defineProperty(e,s+n,{value:function(e,n,i){return this[s].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[s]=!0)}return Ut.isArray(e)?e.forEach(s):s(e),this}}kn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ut.reduceDescriptors(kn.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ut.freezeMethods(kn);var yn=kn;function bn(e,t){const n=this||hn,s=t||n,i=yn.from(s.headers);let o=s.data;return Ut.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function En(e){return!(!e||!e.__CANCEL__)}function Cn(e,t,n){Ht.call(this,null==e?"canceled":e,Ht.ERR_CANCELED,t,n),this.name="CanceledError"}Ut.inherits(Cn,Ht,{__CANCEL__:!0});var vn=ln.hasStandardBrowserEnv?{write(e,t,n,s,i,o){const r=[e+"="+encodeURIComponent(t)];Ut.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),Ut.isString(s)&&r.push("path="+s),Ut.isString(i)&&r.push("domain="+i),!0===o&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Sn(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var An=ln.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function s(n){let s=n;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=s(window.location.href),function(e){const t=Ut.isString(e)?s(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function In(e,t){let n=0;const s=function(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i,o=0,r=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=s[r];i||(i=c),n[o]=a,s[o]=c;let d=r,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===r&&(r=(r+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*u/h):void 0}}(50,250);return i=>{const o=i.loaded,r=i.lengthComputable?i.total:void 0,a=o-n,c=s(a);n=o;const l={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:c||void 0,estimated:c&&r&&o<=r?(r-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const xn={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let s=e.data;const i=yn.from(e.headers).normalize();let o,r,{responseType:a,withXSRFToken:c}=e;function l(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(Ut.isFormData(s))if(ln.hasStandardBrowserEnv||ln.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(r=i.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const u=Sn(e.baseURL,e.url);function h(){if(!d)return;const s=yn.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());!function(e,t,n){const s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(new Ht("Request failed with status code "+n.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),l()}),(function(e){n(e),l()}),{data:a&&"text"!==a&&"json"!==a?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:s,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),en(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(n(new Ht("Request aborted",Ht.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new Ht("Network Error",Ht.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const s=e.transitional||nn;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Ht(t,s.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,d)),d=null},ln.hasStandardBrowserEnv&&(c&&Ut.isFunction(c)&&(c=c(e)),c||!1!==c&&An(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&vn.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===s&&i.setContentType(null),"setRequestHeader"in d&&Ut.forEach(i.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),Ut.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",In(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",In(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{d&&(n(!t||t.type?new Cn(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);p&&-1===ln.protocols.indexOf(p)?n(new Ht("Unsupported protocol "+p+":",Ht.ERR_BAD_REQUEST,e)):d.send(s||null)}))}};Ut.forEach(xn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const On=e=>`- ${e}`,Rn=e=>Ut.isFunction(e)||null===e||!1===e;var Nn={getAdapter:e=>{e=Ut.isArray(e)?e:[e];const{length:t}=e;let n,s;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],s=n,!Rn(n)&&(s=xn[(t=String(n)).toLowerCase()],void 0===s))throw new Ht(`Unknown adapter '${t}'`);if(s)break;i[t||"#"+o]=s}if(!s){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Ht("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(On).join("\n"):" "+On(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s},adapters:xn};function Tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cn(null,e)}function Mn(e){Tn(e),e.headers=yn.from(e.headers),e.data=bn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Nn.getAdapter(e.adapter||hn.adapter)(e).then((function(t){return Tn(e),t.data=bn.call(e,e.transformResponse,t),t.headers=yn.from(t.headers),t}),(function(t){return En(t)||(Tn(e),t&&t.response&&(t.response.data=bn.call(e,e.transformResponse,t.response),t.response.headers=yn.from(t.response.headers))),Promise.reject(t)}))}const _n=e=>e instanceof yn?e.toJSON():e;function Bn(e,t){t=t||{};const n={};function s(e,t,n){return Ut.isPlainObject(e)&&Ut.isPlainObject(t)?Ut.merge.call({caseless:n},e,t):Ut.isPlainObject(t)?Ut.merge({},t):Ut.isArray(t)?t.slice():t}function i(e,t,n){return Ut.isUndefined(t)?Ut.isUndefined(e)?void 0:s(void 0,e,n):s(e,t,n)}function o(e,t){if(!Ut.isUndefined(t))return s(void 0,t)}function r(e,t){return Ut.isUndefined(t)?Ut.isUndefined(e)?void 0:s(void 0,e):s(void 0,t)}function a(n,i,o){return o in t?s(n,i):o in e?s(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>i(_n(e),_n(t),!0)};return Ut.forEach(Object.keys(Object.assign({},e,t)),(function(s){const o=c[s]||i,r=o(e[s],t[s],s);Ut.isUndefined(r)&&o!==a||(n[s]=r)})),n}const Pn="1.6.2",Dn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Dn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const jn={};Dn.transitional=function(e,t,n){function s(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Ht(s(i," has been removed"+(t?" in "+t:"")),Ht.ERR_DEPRECATED);return t&&!jn[i]&&(jn[i]=!0,console.warn(s(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var Ln={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const o=s[i],r=t[o];if(r){const t=e[o],n=void 0===t||r(t,o,e);if(!0!==n)throw new Ht("option "+o+" must be "+n,Ht.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ht("Unknown option "+o,Ht.ERR_BAD_OPTION)}},validators:Dn};const Fn=Ln.validators;class zn{constructor(e){this.defaults=e,this.interceptors={request:new tn,response:new tn}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Bn(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:i}=t;void 0!==n&&Ln.assertOptions(n,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),null!=s&&(Ut.isFunction(s)?t.paramsSerializer={serialize:s}:Ln.assertOptions(s,{encode:Fn.function,serialize:Fn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Ut.merge(i.common,i[t.method]);i&&Ut.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=yn.concat(o,i);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[Mn.bind(this),void 0];for(e.unshift.apply(e,r),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=r.length;let h=t;for(u=0;u<d;){const e=r[u++],t=r[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{l=Mn.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return en(Sn((e=Bn(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Ut.forEach(["delete","get","head","options"],(function(e){zn.prototype[e]=function(t,n){return this.request(Bn(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ut.forEach(["post","put","patch"],(function(e){function t(t){return function(n,s,i){return this.request(Bn(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}zn.prototype[e]=t(),zn.prototype[e+"Form"]=t(!0)}));var Un=zn;class Hn{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const s=new Promise((e=>{n.subscribe(e),t=e})).then(e);return s.cancel=function(){n.unsubscribe(t)},s},e((function(e,s,i){n.reason||(n.reason=new Cn(e,s,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Hn((function(t){e=t}));return{token:t,cancel:e}}}var qn=Hn;const Vn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vn).forEach((([e,t])=>{Vn[t]=e}));var Wn=Vn;const $n=function e(t){const n=new Un(t),s=at(Un.prototype.request,n);return Ut.extend(s,Un.prototype,n,{allOwnKeys:!0}),Ut.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(Bn(t,n))},s}(hn);$n.Axios=Un,$n.CanceledError=Cn,$n.CancelToken=qn,$n.isCancel=En,$n.VERSION=Pn,$n.toFormData=Kt,$n.AxiosError=Ht,$n.Cancel=$n.CanceledError,$n.all=function(e){return Promise.all(e)},$n.spread=function(e){return function(t){return e.apply(null,t)}},$n.isAxiosError=function(e){return Ut.isObject(e)&&!0===e.isAxiosError},$n.mergeConfig=Bn,$n.AxiosHeaders=yn,$n.formToJSON=e=>dn(Ut.isHTMLForm(e)?new FormData(e):e),$n.getAdapter=Nn.getAdapter,$n.HttpStatusCode=Wn,$n.default=$n;var Jn=$n,Qn="connect-session",Kn="connect-domains",Gn=["https://rpc.ankr.com/bsc","https://binance.nodereal.io","https://bscrpc.com","https://bsc-dataseed2.ninicoin.io"],Zn=class extends p{pending=!1;callbacks=new Map;clientMeta;relay;_key=null;_clientId="";_peerId="";_peerMeta=null;_handshakeId=0;_handshakeTopic="";_connected=!1;_accounts=[];_chainId="0x0";set key(e){if(!e)return;let t=T(e);this._key=t}get key(){return this._key?M(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=A()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return`wc:${this.handshakeTopic}@1?bridge=${this.relay}&key=${this.key}&scene=bid`}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set connected(e){}get connected(){return this._connected}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,relay:this.relay,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.relay=e.relay,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}},Yn=class extends Zn{getStorageSession(){try{return m(Qn)}catch{}return null}setStorageSession(){f(Qn,this.session)}removeStorageSession(){N(Qn)}manageStorageSession(){this._connected?this.setStorageSession():this.removeStorageSession()}};var Xn=Promise.resolve([]);if(!c()){let e=m(Kn);Xn=Promise.resolve(e),(!e||0===e.length)&&(Xn=async function(){let e=await async function(){let e=await Promise.race(Gn.map((e=>Jn.request({url:e,method:"POST",data:{jsonrpc:"2.0",id:Date.now(),method:"eth_call",params:[{to:"0x76054B318785b588A3164B2A6eA5476F7cBA51e0",data:"0x97b5f450"},"latest"]}})))),t=new J(["function apiDomains() view returns (string)"]);return g(t.decodeFunctionResult("apiDomains",e.data.result)[0]).split(",")}(),t=await Promise.all(e.map((e=>ot(`wss://nbstream.${e.split(".").slice(1).join(".")}/wallet-connector`))));return function(e){return e.filter((e=>e.ttl>0)).sort(((e,t)=>e.ttl-t.ttl)).map((e=>e.url))}(t)}().then((e=>(console.log("🚀 ~ file: relay.ts:63 ~ .then ~ domains:",e),f(Kn,e),e))).catch((()=>[])))}function es(){N(Kn)}var ts=class extends Yn{transport;lng;constructor(){super(),this.clientMeta=w();let e=this.getStorageSession();e&&(this.session=e),this.handshakeId&&this.subscribeToSessionResponse(this.handshakeId),this.initTransport(),this.subscribeInternalEvent()}async request(e){if(!this.connected)throw new k(y.PROVIDER_NOT_READY.code,y.PROVIDER_NOT_READY.message);if(b.indexOf(e.method)<0)throw new k(E.METHOD_NOT_SUPPORT.code,E.METHOD_NOT_SUPPORT.message);switch(e.method){case"eth_requestAccounts":case"eth_accounts":return this.accounts;case"eth_chainId":return v(this.chainId);case"eth_signTransaction":case"eth_sendTransaction":case"eth_sign":case"personal_sign":case"eth_signTypedData":case"eth_signTypedData_v1":case"eth_signTypedData_v2":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"wallet_switchEthereumChain":case"wallet_watchAsset":return new Promise(((t,n)=>{e.id||(e.id=C()),this.callbacks.set(`response-${e.id}`,((e,s)=>{e?n(function(e){return-32050===e.code||-32e3===e.code||1e3===e.code?new k(E.REJECT_ERR.code,E.REJECT_ERR.message):-32603===e.code?new k(I.INTERNAL_ERR.code,I.INTERNAL_ERR.message):-32600===e.code||-32602===e.code?new k(E.INVALID_PARAM.code,E.INVALID_PARAM.message):e}(e)):s?t(s.result):n(new k(E.MISSING_RESPONSE.code,E.MISSING_RESPONSE.message))})),this.sendRequest(e),this.events.emit("call_request_sent")}))}}killSession(){if(!this.connected)return;let e={id:C(),method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]};this.sendRequest(e),this.handleSessionDisconnect(rt.DisconnectAtClient)}async connect({chainId:e,lng:t}={}){return this.lng=t,this.connected?{chainId:this.chainId,accounts:this.accounts}:new Promise(((t,n)=>{this.on("modal_closed",(e=>{n(e)})),this.on("session_error",(e=>{n(e)})),this.on("connect",(e=>{t(e)})),this.createSession(e)}))}createSession(e){try{if(this.connected)throw new k(y.CONNECTED.code,y.CONNECTED.message);if(this.pending||this._handshakeTopic)throw new k(y.CONNECTING.code,y.CONNECTING.message);this.pending=!0,this._key=S(),this.handshakeId=C(),this.handshakeTopic=A();let t={id:this.handshakeId,method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e?Number(e):null}]};this.sendRequest(t,this.handshakeTopic),this.subscribeToSessionResponse(this.handshakeId),this.events.emit("display_uri")}catch(e){this.pending=!1;let t=`response-${this.handshakeId}`;this.callbacks.get(t)&&this.callbacks.delete(t);let s=e.message,i=e instanceof k?e:new k(I.INTERNAL_ERR.code,`${I.INTERNAL_ERR.message}: ${s}`);throw this.handleRejectSessionConnection(i),n.error(`[binance-w3w] create connection failed: ${s}`),i}}async initTransport(){this.transport=new it({version:1,subscriptions:[this.clientId]}),this.transport.on("message",(e=>this.setIncomingMessages(e))),this.transport.on("open",(e=>{this.events.emit("transport_open",e)})),this.transport.on("close",(()=>{this.events.emit("transport_close")})),this.transport.on("error",((e,t)=>{this.events.emit("transport_error",e,t)}));try{if(this.session.relay)this.transport.open([this.session.relay]);else{let e=await async function(){let e=await Xn;return 0===e.length&&e.push("wss://nbstream.binance.com/wallet-connector"),e}();this.transport.open(e)}}catch(e){es();let t=e.message,n=new k(I.INTERNAL_ERR.code,`${I.INTERNAL_ERR.message}: ${t}`);throw this.handleRejectSessionConnection(n),n}}setIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let t;try{t=JSON.parse(e.payload)}catch{return}let s=this.decrypt(t);if(!s)return;if("method"in s&&s.method)return void this.events.emit(s.method,null,s);let i=s.id,o=`response-${i}`,r=this.callbacks.get(o);if(r){if("error"in s&&s.error){r(new k(s.error.code,s.error.message),null)}else"result"in s&&s.result&&r(null,s);this.callbacks.delete(o)}else n.error(`[binance-w3w] callback id: ${i} not found`)}encrypt(e){let t=this._key;return t?x(e,t):null}decrypt(e){let t=this._key;return t?O(e,t):null}sendRequest(e,t){let n=R(e.method,e.params,e.id),s=this.encrypt(n),i=t||this.peerId,o=JSON.stringify(s);this.transport.send(o,i,!0)}subscribeInternalEvent(){this.on("display_uri",(()=>{nt.open({cb:()=>{this.events.emit("modal_closed",new k(y.CLOSE_MODAL.code,y.CLOSE_MODAL.message))},lng:this.lng}),this.transport.connected?nt.ready(this.uri):this.transport.retryFailed&&nt.fail()})),this.on("transport_open",(e=>{this.relay=e,nt.ready(this.uri)})),this.on("transport_error",((e,t)=>{t?function(e){let t=m(Kn);if(!t)return;let n=t.filter((t=>t!==e));f(Kn,n)}(function(e){let t=e.indexOf("?");return t>-1?e.slice(0,t):e}(t)):(es(),nt.fail())})),this.on("modal_closed",(()=>{let e=`response-${this.handshakeId}`;this.callbacks.get(e)&&this.callbacks.delete(e),this.clearConnectionStatus()})),this.on("connect",(()=>{this.pending=!1,nt.close()})),this.on("call_request_sent",(()=>{u()})),this.on("wc_sessionUpdate",((e,t)=>{e?this.handleSessionResponse():t.params&&Array.isArray(t.params)?this.handleSessionResponse(t.params[0]):t.error&&this.handleSessionResponse()}))}subscribeToSessionResponse(e){this.callbacks.set(`response-${e}`,((e,t)=>{e?this.handleSessionResponse():t&&(t.result?this.handleSessionResponse(t.result):(t.error&&t.error.message,this.handleSessionResponse()))}))}handleSessionResponse(e){e?e.approved?(this._connected?(e.chainId&&this.setChainId(e.chainId),e.accounts&&this.setAddress(e.accounts)):(this._connected=!0,e.chainId&&this.setChainId(e.chainId),e.accounts&&this.setAddress(e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this.events.emit("connect",{chainId:this.chainId,accounts:this.accounts})),this.manageStorageSession()):this.connected?this.handleSessionDisconnect(rt.DisconnectAtWallet):this.handleRejectSessionConnection(new k(y.REJECT_SESSION.code,y.REJECT_SESSION.message)):this.handleRejectSessionConnection(new k(y.REJECT_SESSION.code,y.REJECT_SESSION.message))}handleRejectSessionConnection(e){nt.close(),this.clearConnectionStatus(),this.events.emit("session_error",e)}handleSessionDisconnect(e){this._connected||nt.close(),this.events.emit("disconnect",e),this.clearConnectionStatus()}clearConnectionStatus(){this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._clientId&&(this._clientId=""),this.pending&&(this.pending=!1),this.callbacks.clear(),this._peerMeta=null,this._accounts=[],this._chainId="0x0",this.offConnectEvents(),this.removeStorageSession(),this.transport.close()}offConnectEvents(){this.removeListener("connect")}setChainId(e){let t=v(e);"0x0"!==t?(typeof this.chainId<"u"&&this.chainId!==t&&this.events.emit("chainChanged",t),this.chainId=t):this.chainId=t}setAddress(e=[]){let t=e.filter((e=>"string"==typeof e)).map((e=>e.toLowerCase())).filter(Boolean);JSON.stringify(this.accounts)!==JSON.stringify(t)&&this.events.emit("accountsChanged",t),this.accounts=t}},ns=class extends p{accounts=[];coreConnection;constructor(){super(),this.register()}get chainId(){return this.coreConnection?this.coreConnection.chainId:"0x0"}get connected(){return!!this.coreConnection&&this.coreConnection.connected}get connecting(){return!!this.coreConnection&&this.coreConnection.pending}async open({requestChainId:e,lng:t}){if(this.register(),this.coreConnection.connected)return;let{accounts:n}=await this.coreConnection.connect({chainId:e,lng:t});this.accounts=n}async request(e){return this.connected||await this.open({}),this.coreConnection.request(e)}disconnect(){this.connected&&(this.coreConnection.killSession(),this.onClose(rt.DisconnectAtClient))}register(){if(this.coreConnection)return this.coreConnection;this.coreConnection=new ts,this.accounts=this.coreConnection.accounts,this.subscribeEvents()}subscribeEvents(){this.coreConnection.on("chainChanged",(e=>{this.events.emit("chainChanged",e)})),this.coreConnection.on("accountsChanged",(e=>{this.accounts=e,this.events.emit("accountsChanged",e)})),this.coreConnection.on("disconnect",(e=>{this.onClose(e)}))}onClose(e){this.coreConnection=null,this.events.emit("disconnect",e)}},ss=c=>{if(_()){let e=typeof window<"u"?window.ethereum:void 0;if(e)return e.setLng=()=>{},e.disconnect=()=>{},e}return new class{events=new t;signClient;rpc;httpClient;optsChainId;lng;constructor(e){this.rpc={infuraId:e?.infuraId,custom:e?.rpc},this.optsChainId=e?.chainId||56,this.lng=e?.lng||"en",this.signClient=new ns,this.registerEventListeners(),this.httpClient=this.setHttpProvider(this.optsChainId)}get connected(){return this.signClient.connected}get connector(){return this.signClient}get accounts(){return this.signClient.accounts}get chainId(){return n.debug("provider get chainId",this.signClient.chainId),this.signClient.chainId}get rpcUrl(){return this.httpClient.url||""}async request(e){switch(n.debug("ethereum-provider request",e),e.method){case"eth_requestAccounts":return await this.connect(),this.accounts;case"eth_chainId":return this.chainId;case"eth_accounts":return this.accounts}let t=R(e.method,e.params||[]);if(b.includes(e.method))return this.signClient.request(t);if(typeof this.httpClient>"u")throw new Error(`Cannot request JSON-RPC method (${e.method}) without provided rpc url`);let s=await this.httpClient.request(t);if(B(s))return s.result;throw new Error(s.error.message)}async signMessage(e){return n.debug("signMessage",e),this.accounts.length||await this.enable(),await this.request({method:"personal_sign",params:[P(e),this.accounts[0]]})}sendAsync(e,t){this.request(e).then((e=>t(null,e))).catch((e=>t(e,void 0)))}setLng(e){this.lng=e}async enable(e){return await this.connect(e),this.accounts}async connect(e){this.connected?n.info("already connected"):await this.signClient.open({requestChainId:e?.toString()??this.optsChainId.toString(),lng:this.lng})}disconnect(){this.connected&&this.signClient.disconnect()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}registerEventListeners(){this.signClient.on("accountsChanged",(e=>{this.events.emit("accountsChanged",e)})),this.signClient.on("chainChanged",(e=>{this.httpClient=this.setHttpProvider(e),this.events.emit("chainChanged",e)})),this.signClient.on("disconnect",(()=>{this.events.emit("disconnect")}))}setHttpProvider(c){let l=D(c,this.rpc);if(!(typeof l>"u"))return new class{constructor(t){if(this.url=t,!e(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t}events=new t;isAvailable=!1;registering=!1;get connected(){return this.isAvailable}get connecting(){return this.registering}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async request(e){n.debug("HttpClient ~ request ~ payload:",e),this.isAvailable||await this.register();try{let t=s(e),r=await(await i(this.url,{...K,body:t})).json(),a="string"==typeof r?o(r):r;return n.debug("HttpClient ~ request ~ result:",a),a}catch(t){return this.formatError(e.id,t)}}formatError(e,t){let n=this.parseError(t),s=n.message||n.toString();return r(e,s)}async register(t=this.url){if(!e(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering)return new Promise(((e,t)=>{this.events.once("register_error",(e=>{t(e)})),this.events.once("open",(()=>{if(typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}));this.url=t,this.registering=!0;try{let e=s({id:1,jsonrpc:"2.0",method:"test",params:[]});await i(t,{...K,body:e}),this.onOpen()}catch(e){let t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("open")}parseError(e,t=this.url){return a(e,t,"HTTP")}}(l)}}(c)};function is(e,t){return j(this,void 0,void 0,(function*(){const n=yield ss({chainId:e.chainId,rpc:e.rpc});yield n.enable(),n.on("connect",t.connect),n.on("disconnect",t.disconnect),n.on("accountsChanged",t.accountsChanged),n.on("chainChanged",t.chainChanged),n.on("message",t.message);return L(n)}))}export{is as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hexlify as r,arrayify as t,isBytesLike as o}from"@ethersproject/bytes";import{L as e}from"./index-
|
|
1
|
+
import{hexlify as r,arrayify as t,isBytesLike as o}from"@ethersproject/bytes";import{L as e}from"./index-6e0a6776.js";const n=new e("rlp/5.7.0");function s(r){const t=[];for(;r;)t.unshift(255&r),r>>=8;return t}function c(r,t,o){let e=0;for(let n=0;n<o;n++)e=256*e+r[t+n];return e}function h(r){if(Array.isArray(r)){let t=[];if(r.forEach((function(r){t=t.concat(h(r))})),t.length<=55)return t.unshift(192+t.length),t;const o=s(t.length);return o.unshift(247+o.length),o.concat(t)}o(r)||n.throwArgumentError("RLP object must be BytesLike","object",r);const e=Array.prototype.slice.call(t(r));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const c=s(e.length);return c.unshift(183+c.length),c.concat(e)}function u(t){return r(h(t))}function a(r,t,o,s){const c=[];for(;o<t+1+s;){const h=l(r,o);c.push(h.result),(o+=h.consumed)>t+1+s&&n.throwError("child data too short",e.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:c}}function l(t,o){if(0===t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{}),t[o]>=248){const r=t[o]-247;o+1+r>t.length&&n.throwError("data short segment too short",e.errors.BUFFER_OVERRUN,{});const s=c(t,o+1,r);return o+1+r+s>t.length&&n.throwError("data long segment too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1+r,r+s)}if(t[o]>=192){const r=t[o]-192;return o+1+r>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1,r)}if(t[o]>=184){const s=t[o]-183;o+1+s>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});const h=c(t,o+1,s);o+1+s+h>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s+h,result:r(t.slice(o+1+s,o+1+s+h))}}if(t[o]>=128){const s=t[o]-128;o+1+s>t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s,result:r(t.slice(o+1,o+1+s))}}return{consumed:1,result:r(t[o])}}function i(r){const o=t(r),e=l(o,0);return e.consumed!==o.length&&n.throwArgumentError("invalid rlp data","data",r),e.result}var f=Object.freeze({__proto__:null,encode:u,decode:i});export{i as d,u as e,f as i};
|