@nexus-cross/crossx-sdk-core 2.3.10-beta.2 → 2.3.10-beta.3
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/core/constants.d.ts +1 -1
- package/dist/crossx.global +40 -40
- package/dist/index.cjs +40 -40
- package/dist/index.js +133 -132
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ class h extends Error {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
const Rt = 2e3, je = 6e4, Ct = 1e3, Pt = 1e4, Nt = "0x77359400", Ye = "0x3B9ACA00", Xe = 130, Fe = 6, Je = 18, Ze = 3e4, Ot = 5 * 60 * 1e3, Lt = 30 * 1e3, Ne = 100, Dt = "crossx-sdk-js/2.3.10-beta.
|
|
19
|
+
const Rt = 2e3, je = 6e4, Ct = 1e3, Pt = 1e4, Nt = "0x77359400", Ye = "0x3B9ACA00", Xe = 130, Fe = 6, Je = 18, Ze = 3e4, Ot = 5 * 60 * 1e3, Lt = 30 * 1e3, Ne = 100, Dt = "crossx-sdk-js/2.3.10-beta.3", Be = "ONEwallet";
|
|
20
20
|
var ge = /* @__PURE__ */ ((i) => (i.MetaMask = "io.metamask", i.Binance = "com.binance.wallet", i.CROSSx = "crossx", i))(ge || {});
|
|
21
21
|
const Mt = {
|
|
22
22
|
"io.metamask": "MetaMask",
|
|
@@ -83,7 +83,7 @@ const Se = {
|
|
|
83
83
|
rpcUrl: "https://saigon-testnet.roninchain.com/rpc",
|
|
84
84
|
testnet: !0
|
|
85
85
|
}
|
|
86
|
-
},
|
|
86
|
+
}, Hs = Object.fromEntries(
|
|
87
87
|
Object.entries(Se).map(([i, e]) => [i, e.caipId])
|
|
88
88
|
), Wt = new Map(
|
|
89
89
|
Object.values(Se).map((i) => [i.caipId, i])
|
|
@@ -2547,7 +2547,7 @@ const ne = class ne extends Yt {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
async _doInitialize(e) {
|
|
2549
2549
|
var r, t;
|
|
2550
|
-
c.log("[CROSSx SDK] v2.3.10-beta.
|
|
2550
|
+
c.log("[CROSSx SDK] v2.3.10-beta.3 초기화 중..."), this.confirmation.setMessages(X(this._config.locale));
|
|
2551
2551
|
try {
|
|
2552
2552
|
const s = We();
|
|
2553
2553
|
this.internalConfig.oauthServiceUrl = s.oauthServiceUrl, this.internalConfig.authApiUrl = s.authApiUrl, this.internalConfig.walletGatewayUrl = s.walletGatewayUrl, this.adapterConfig.gatewayUrl = s.walletGatewayUrl, (t = (r = this.crypto).setJWKSEndpoint) == null || t.call(r, `${s.authApiUrl}/.well-known/jwks.json`);
|
|
@@ -2583,7 +2583,7 @@ const ne = class ne extends Yt {
|
|
|
2583
2583
|
throw u;
|
|
2584
2584
|
}
|
|
2585
2585
|
}
|
|
2586
|
-
return this.initialized = !0, c.info("[CROSSx SDK] v2.3.10-beta.
|
|
2586
|
+
return this.initialized = !0, c.info("[CROSSx SDK] v2.3.10-beta.3 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
|
|
2587
2587
|
} catch (s) {
|
|
2588
2588
|
throw new h(d.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", s);
|
|
2589
2589
|
}
|
|
@@ -2603,7 +2603,7 @@ const ne = class ne extends Yt {
|
|
|
2603
2603
|
c.log("[CROSSx] RN Bridge 감지 — Handshake 시도"), c.info("[CROSSx][RNBridge trace] Bootstrap config", {
|
|
2604
2604
|
appId: this._config.projectId,
|
|
2605
2605
|
appVersion: "1.0.0",
|
|
2606
|
-
sdkVersion: "2.3.10-beta.
|
|
2606
|
+
sdkVersion: "2.3.10-beta.3",
|
|
2607
2607
|
keyId: "key-id-1",
|
|
2608
2608
|
userIdHash: "user-hash-placeholder",
|
|
2609
2609
|
projectId: this._config.projectId
|
|
@@ -2611,7 +2611,7 @@ const ne = class ne extends Yt {
|
|
|
2611
2611
|
const e = new j({
|
|
2612
2612
|
appId: this._config.projectId,
|
|
2613
2613
|
appVersion: "1.0.0",
|
|
2614
|
-
sdkVersion: "2.3.10-beta.
|
|
2614
|
+
sdkVersion: "2.3.10-beta.3",
|
|
2615
2615
|
keyId: "key-id-1",
|
|
2616
2616
|
userIdHash: "user-hash-placeholder",
|
|
2617
2617
|
projectId: this._config.projectId
|
|
@@ -4407,7 +4407,7 @@ const Ar = /* @__PURE__ */ new Set([
|
|
|
4407
4407
|
"https://one-wallet-oauth.onechain.nexus",
|
|
4408
4408
|
"https://stg-one-wallet-oauth.onechain.nexus",
|
|
4409
4409
|
"https://dev-one-wallet-oauth.onechain.nexus"
|
|
4410
|
-
]);
|
|
4410
|
+
]), Ir = /CROSSx\/[\d.]+/i, kr = "crossx://oauth-callback";
|
|
4411
4411
|
class ie {
|
|
4412
4412
|
static generateRandom16Hex() {
|
|
4413
4413
|
const e = new Uint8Array(16);
|
|
@@ -4471,8 +4471,9 @@ class ie {
|
|
|
4471
4471
|
}
|
|
4472
4472
|
openAuth(e) {
|
|
4473
4473
|
return new Promise((r, t) => {
|
|
4474
|
-
const s = Math.max(e.width ?? 500, 500), o = Math.max(e.height ?? 700, 700), n = window.screenX + (window.outerWidth - s) / 2, a = window.screenY + (window.outerHeight - o) / 2, l = ie.generateRandom16Hex(), p = ie.generateRandom16Hex(), _ = e.authUrl.includes("?") ? "&" : "?", u = encodeURIComponent(window.location.origin)
|
|
4475
|
-
|
|
4474
|
+
const s = Math.max(e.width ?? 500, 500), o = Math.max(e.height ?? 700, 700), n = window.screenX + (window.outerWidth - s) / 2, a = window.screenY + (window.outerHeight - o) / 2, l = ie.generateRandom16Hex(), p = ie.generateRandom16Hex(), _ = e.authUrl.includes("?") ? "&" : "?", u = encodeURIComponent(window.location.origin);
|
|
4475
|
+
let x = `${e.authUrl}${_}state=${l}&nonce=${p}&origin=${u}`;
|
|
4476
|
+
Ir.test(navigator.userAgent) && !x.includes("redirectUrl=") && (x += `&redirectUrl=${encodeURIComponent(kr)}`, c.log("[CROSSx] 지갑 인앱 브라우저 감지 — redirectUrl 콜백 자동 부착")), c.log("[CROSSx] OAuth 팝업 열기 — state, nonce 생성 완료:", {
|
|
4476
4477
|
stateLength: l.length,
|
|
4477
4478
|
nonceLength: p.length,
|
|
4478
4479
|
authUrlBase: e.authUrl
|
|
@@ -4552,7 +4553,7 @@ class ie {
|
|
|
4552
4553
|
}
|
|
4553
4554
|
}
|
|
4554
4555
|
const xe = "crossx_wallet_data", ce = "crossx_mock_pin_hash";
|
|
4555
|
-
class
|
|
4556
|
+
class Tr {
|
|
4556
4557
|
constructor(e, r) {
|
|
4557
4558
|
this.storage = e, this.pinStore = r ?? null;
|
|
4558
4559
|
}
|
|
@@ -5185,7 +5186,7 @@ class oe {
|
|
|
5185
5186
|
}
|
|
5186
5187
|
}
|
|
5187
5188
|
}
|
|
5188
|
-
class
|
|
5189
|
+
class Rr {
|
|
5189
5190
|
constructor(e, r, t, s = () => {
|
|
5190
5191
|
}, o = () => {
|
|
5191
5192
|
}) {
|
|
@@ -5398,7 +5399,7 @@ class fe {
|
|
|
5398
5399
|
}
|
|
5399
5400
|
}
|
|
5400
5401
|
}
|
|
5401
|
-
const nt = "__crossx-confirm-style", F = "__crossx-confirm-overlay",
|
|
5402
|
+
const nt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Cr = {
|
|
5402
5403
|
light: {
|
|
5403
5404
|
bg: "#FFFFFF",
|
|
5404
5405
|
border: "rgba(0,0,0,0.07)",
|
|
@@ -5467,7 +5468,7 @@ const nt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Tr = {
|
|
|
5467
5468
|
}
|
|
5468
5469
|
};
|
|
5469
5470
|
function at(i, e) {
|
|
5470
|
-
const r =
|
|
5471
|
+
const r = Cr[i], t = e == null ? void 0 : e[i];
|
|
5471
5472
|
return t ? {
|
|
5472
5473
|
...r,
|
|
5473
5474
|
// ── Brand
|
|
@@ -5501,7 +5502,7 @@ function at(i, e) {
|
|
|
5501
5502
|
...t.error !== void 0 && { errorColor: t.error }
|
|
5502
5503
|
} : r;
|
|
5503
5504
|
}
|
|
5504
|
-
const
|
|
5505
|
+
const Pr = `
|
|
5505
5506
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&family=Sora:wght@400;600&display=swap');
|
|
5506
5507
|
|
|
5507
5508
|
#${F} {
|
|
@@ -8104,9 +8105,9 @@ button.__crossx-connect-other-block:active {
|
|
|
8104
8105
|
`;
|
|
8105
8106
|
function K() {
|
|
8106
8107
|
let i = document.getElementById(nt);
|
|
8107
|
-
i || (i = document.createElement("style"), i.id = nt, document.head.appendChild(i)), i.textContent =
|
|
8108
|
+
i || (i = document.createElement("style"), i.id = nt, document.head.appendChild(i)), i.textContent = Pr;
|
|
8108
8109
|
}
|
|
8109
|
-
function
|
|
8110
|
+
function Nr() {
|
|
8110
8111
|
const i = `#${F}`, e = (t) => {
|
|
8111
8112
|
var s, o;
|
|
8112
8113
|
(o = (s = t.target) == null ? void 0 : s.closest) != null && o.call(s, i) && t.stopImmediatePropagation();
|
|
@@ -8146,12 +8147,12 @@ function z(i) {
|
|
|
8146
8147
|
}
|
|
8147
8148
|
n.preventDefault();
|
|
8148
8149
|
}, { passive: !1 });
|
|
8149
|
-
const t =
|
|
8150
|
+
const t = Nr(), s = Or(i), o = i.remove.bind(i);
|
|
8150
8151
|
i.remove = () => {
|
|
8151
8152
|
s(), t(), o();
|
|
8152
8153
|
}, document.body.appendChild(i);
|
|
8153
8154
|
}
|
|
8154
|
-
function
|
|
8155
|
+
function Or(i) {
|
|
8155
8156
|
if (typeof window > "u") return () => {
|
|
8156
8157
|
};
|
|
8157
8158
|
const e = window.visualViewport;
|
|
@@ -8166,7 +8167,7 @@ function Pr(i) {
|
|
|
8166
8167
|
e.removeEventListener("resize", t), e.removeEventListener("scroll", t), i.style.removeProperty("--cx-keyboard-inset");
|
|
8167
8168
|
};
|
|
8168
8169
|
}
|
|
8169
|
-
function
|
|
8170
|
+
function Lr(i) {
|
|
8170
8171
|
const e = Array.from(i.querySelectorAll(".__crossx-amount-tip"));
|
|
8171
8172
|
if (!e.length) return;
|
|
8172
8173
|
const r = document.createElement("div");
|
|
@@ -8190,9 +8191,9 @@ function Nr(i) {
|
|
|
8190
8191
|
n.target.closest(".__crossx-amount-tip") || o();
|
|
8191
8192
|
}, { passive: !0 });
|
|
8192
8193
|
}
|
|
8193
|
-
const
|
|
8194
|
+
const Dr = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
8194
8195
|
function se() {
|
|
8195
|
-
if (
|
|
8196
|
+
if (Dr()) {
|
|
8196
8197
|
const e = window.scrollY;
|
|
8197
8198
|
return document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.left = "0", document.body.style.right = "0", () => {
|
|
8198
8199
|
document.body.style.position = "", document.body.style.top = "", document.body.style.left = "", document.body.style.right = "", window.scrollTo(0, e);
|
|
@@ -8246,7 +8247,7 @@ const ct = {
|
|
|
8246
8247
|
612055: "CROSS Mainnet"
|
|
8247
8248
|
}, Ue = /* @__PURE__ */ new Map();
|
|
8248
8249
|
let Te = !1;
|
|
8249
|
-
function
|
|
8250
|
+
function Mr() {
|
|
8250
8251
|
if (Te || (Te = !0, typeof fetch > "u")) return;
|
|
8251
8252
|
const i = We().contentsBaseUrl;
|
|
8252
8253
|
i && fetch(`${i}/chains.json`, { cache: "no-store" }).then((e) => e.ok ? e.json() : null).then((e) => {
|
|
@@ -8305,18 +8306,18 @@ function Re(i) {
|
|
|
8305
8306
|
return i;
|
|
8306
8307
|
}
|
|
8307
8308
|
}
|
|
8308
|
-
function
|
|
8309
|
+
function $r(i) {
|
|
8309
8310
|
try {
|
|
8310
8311
|
return BigInt(i).toLocaleString();
|
|
8311
8312
|
} catch {
|
|
8312
8313
|
return i;
|
|
8313
8314
|
}
|
|
8314
8315
|
}
|
|
8315
|
-
function
|
|
8316
|
+
function Fr(i, e) {
|
|
8316
8317
|
const { gasLimit: r, gasPrice: t, maxFeePerGas: s, maxPriorityFeePerGas: o, nativeDecimals: n = 18 } = i, a = He(i.chainId, i.nativeSymbol ?? "ETH");
|
|
8317
8318
|
if (!r) return null;
|
|
8318
8319
|
try {
|
|
8319
|
-
const l = BigInt(r), p =
|
|
8320
|
+
const l = BigInt(r), p = $r(r);
|
|
8320
8321
|
if (s) {
|
|
8321
8322
|
const _ = l * BigInt(s);
|
|
8322
8323
|
return {
|
|
@@ -8348,7 +8349,7 @@ function Mr(i, e) {
|
|
|
8348
8349
|
}
|
|
8349
8350
|
}
|
|
8350
8351
|
function ft(i, e, r) {
|
|
8351
|
-
const t =
|
|
8352
|
+
const t = Fr(i, e);
|
|
8352
8353
|
if (!t) return D((r == null ? void 0 : r.label_estimated_fee) ?? "Estimated fee", "<span>—</span>");
|
|
8353
8354
|
let s = D((r == null ? void 0 : r.label_est_tx_fee) ?? "Est. Tx Fee", `<span>${t.estTxFee}</span>`);
|
|
8354
8355
|
return t.isDynamic ? (t.maxPriorityFeeGwei !== void 0 && (s += D((r == null ? void 0 : r.label_max_priority_fee) ?? "Max Priority Fee", `<span>${t.maxPriorityFeeGwei} Gwei</span>`)), t.maxFeeGwei !== void 0 && (s += D((r == null ? void 0 : r.label_max_gas_fee) ?? "Max Gas Fee", `<span>${t.maxFeeGwei} Gwei</span>`))) : t.gasPriceGwei !== void 0 && (s += D((r == null ? void 0 : r.label_gas_price) ?? "Gas Price", `<span>${t.gasPriceGwei} Gwei</span>`)), t.gasLimitFormatted && (s += D((r == null ? void 0 : r.label_gas_limit) ?? "Gas Limit", `<span>${t.gasLimitFormatted}</span>`)), s;
|
|
@@ -8359,16 +8360,16 @@ const J = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="c
|
|
|
8359
8360
|
</svg>`, W = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
8360
8361
|
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
8361
8362
|
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
8362
|
-
</svg>`,
|
|
8363
|
+
</svg>`, Br = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8363
8364
|
<circle cx="20" cy="20" r="20" fill="#00D5AA"/>
|
|
8364
8365
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.3225 2.85742L23.7249 6.25982V11.8301L28.1175 7.43757L32.9292 12.2493L28.5806 16.5979H20.3225C18.4435 16.5979 16.9201 18.1212 16.9201 20.0003C16.9201 21.8794 18.4434 23.4027 20.3225 23.4027H28.5372L32.9293 27.7948L28.1176 32.6066L23.7249 28.2139V33.7407L20.3225 37.1431L16.9201 33.7407V28.2584L12.5719 32.6066L7.76022 27.7948L12.1524 23.4027H6.58209L3.17969 20.0003L6.58209 16.5979H12.1089L7.76035 12.2493L12.5721 7.43757L16.9201 11.7857V6.25982L20.3225 2.85742Z" fill="#121212"/>
|
|
8365
|
-
</svg>`,
|
|
8366
|
-
[ge.MetaMask]:
|
|
8367
|
-
[ge.Binance]:
|
|
8368
|
-
[ge.CROSSx]:
|
|
8369
|
-
}, wt = '<path d="M22.6667 11.8333V10.1667C22.6667 9.2475 21.9192 8.5 21.0001 8.5H10.1667C8.78841 8.5 7.66675 9.62167 7.66675 11V21C7.66675 22.8342 9.16175 23.5 10.1667 23.5H22.6667C23.5859 23.5 24.3334 22.7525 24.3334 21.8333V13.5C24.3334 12.5808 23.5859 11.8333 22.6667 11.8333ZM21.0001 19.3333H19.3334V16H21.0001V19.3333ZM10.1667 11.8333C9.95218 11.8237 9.74959 11.7317 9.60114 11.5765C9.4527 11.4213 9.36986 11.2148 9.36986 11C9.36986 10.7852 9.4527 10.5787 9.60114 10.4235C9.74959 10.2683 9.95218 10.1763 10.1667 10.1667H21.0001V11.8333H10.1667Z"/>', Ge = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${wt}</svg>`,
|
|
8366
|
+
</svg>`, Wr = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 318.6 318.6" aria-hidden="true"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/></svg>', Ur = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 126.611 126.611" aria-hidden="true"><polygon fill="#F3BA2F" points="38.171,53.203 62.759,28.616 87.36,53.216 101.667,38.909 62.759,0 23.864,38.896 "/><rect x="3.644" y="53.188" transform="matrix(0.7071 0.7071 -0.7071 0.7071 48.7933 8.8106)" fill="#F3BA2F" width="20.233" height="20.234"/><polygon fill="#F3BA2F" points="38.171,73.408 62.759,97.995 87.359,73.396 101.674,87.695 101.667,87.703 62.759,126.611 23.863,87.716 23.843,87.696 "/><rect x="101.64" y="53.189" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 235.5457 29.0503)" fill="#F3BA2F" width="20.234" height="20.233"/><polygon fill="#F3BA2F" points="77.271,63.298 77.277,63.298 62.759,48.78 52.03,59.509 52.029,59.509 50.797,60.742 48.254,63.285 48.254,63.285 48.234,63.305 48.254,63.326 62.759,77.831 77.277,63.313 77.284,63.305 "/></svg>', Hr = '<svg width="16" height="16" viewBox="0 0 229 229" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g clip-path="url(#clip0_74746_12130)"><rect width="228.273" height="228.273" rx="87" fill="white"/><path d="M228.307 -0.0644531H0.0332031V228.209H228.307V-0.0644531Z" fill="#CE3E35"/><path d="M33.9219 43.7533C33.9219 31.934 43.5033 22.3527 55.3225 22.3527H173.019C184.838 22.3527 194.419 31.9341 194.419 43.7533V123.107H33.9219V43.7533Z" fill="white"/><g filter="url(#filter0_d_74746_12130)"><path d="M228.241 228.21H0.0332031V56.5961C0.0332031 48.7166 6.4208 42.329 14.3003 42.329H77.9502C84.6851 42.329 90.1926 47.3831 94.2527 52.7566C98.8699 58.8676 106.06 62.7958 114.137 62.7958C122.214 62.7958 129.404 58.8676 134.021 52.7566C138.081 47.3831 143.589 42.329 150.324 42.329H213.974C221.854 42.329 228.241 48.7166 228.241 56.5961V228.21Z" fill="url(#paint0_linear_74746_12130)"/></g><path d="M79.7598 228.096H228.24V64.7367L79.7598 159.851V228.096Z" fill="url(#paint1_linear_74746_12130)"/><path d="M79.7694 228.209H0.0332031V75.9257L79.7694 160.218V228.209Z" fill="url(#paint2_linear_74746_12130)"/><g filter="url(#filter1_d_74746_12130)"><path d="M113.105 89.2908L81.3322 107.655C75.7279 110.878 73.7862 118.118 77.0076 123.724C80.229 129.331 87.4661 131.273 93.0704 128.051L119.945 112.511L107.147 126.241V180.098C107.147 186.588 112.443 191.885 118.93 191.885C125.417 191.885 130.712 186.588 130.712 180.098V99.4884C130.712 97.237 130.006 95.0297 129.124 93.5729C125.814 88.0106 118.665 86.024 113.061 89.2466L113.105 89.2908Z" fill="white"/></g></g><defs><filter id="filter0_d_74746_12130" x="-7.10034" y="33.4121" width="242.474" height="200.148" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-1.78339"/><feGaussianBlur stdDeviation="3.56677"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_74746_12130"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_74746_12130" result="shape"/></filter><filter id="filter1_d_74746_12130" x="67.9009" y="80.1489" width="75.3839" height="124.308" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="2.51084" dy="2.51084"/><feGaussianBlur stdDeviation="5.03056"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_74746_12130"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_74746_12130" result="shape"/></filter><linearGradient id="paint0_linear_74746_12130" x1="-26.3993" y1="19.4879" x2="193.409" y2="286.17" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_74746_12130" x1="56.978" y1="73.7355" x2="168.096" y2="169.248" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_74746_12130" x1="142.362" y1="29.5078" x2="37.3384" y2="166.255" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_74746_12130"><rect width="228.273" height="228.273" rx="87" fill="white"/></clipPath></defs></svg>', Gr = {
|
|
8367
|
+
[ge.MetaMask]: Wr,
|
|
8368
|
+
[ge.Binance]: Ur,
|
|
8369
|
+
[ge.CROSSx]: Hr
|
|
8370
|
+
}, wt = '<path d="M22.6667 11.8333V10.1667C22.6667 9.2475 21.9192 8.5 21.0001 8.5H10.1667C8.78841 8.5 7.66675 9.62167 7.66675 11V21C7.66675 22.8342 9.16175 23.5 10.1667 23.5H22.6667C23.5859 23.5 24.3334 22.7525 24.3334 21.8333V13.5C24.3334 12.5808 23.5859 11.8333 22.6667 11.8333ZM21.0001 19.3333H19.3334V16H21.0001V19.3333ZM10.1667 11.8333C9.95218 11.8237 9.74959 11.7317 9.60114 11.5765C9.4527 11.4213 9.36986 11.2148 9.36986 11C9.36986 10.7852 9.4527 10.5787 9.60114 10.4235C9.74959 10.2683 9.95218 10.1763 10.1667 10.1667H21.0001V11.8333H10.1667Z"/>', Ge = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${wt}</svg>`, Kr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
8370
8371
|
<path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="var(--cx-error)"/>
|
|
8371
|
-
</svg>`,
|
|
8372
|
+
</svg>`, zr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
8372
8373
|
<circle cx="12" cy="12" r="12" fill="var(--cx-error)"/>
|
|
8373
8374
|
<circle cx="12" cy="12" r="5.5" stroke="white" stroke-width="1.5"/>
|
|
8374
8375
|
<path d="M12 9.5v3l2 1.5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
@@ -8406,7 +8407,7 @@ function H(i) {
|
|
|
8406
8407
|
`--cx-on-primary:${i.onPrimary}`
|
|
8407
8408
|
].join(";");
|
|
8408
8409
|
}
|
|
8409
|
-
function
|
|
8410
|
+
function Vr(i, e) {
|
|
8410
8411
|
i.style.setProperty("--cx-bg", e.bg), i.style.setProperty("--cx-border", e.border), i.style.setProperty("--cx-border-medium", e.borderMedium), i.style.setProperty("--cx-title", e.titleColor), i.style.setProperty("--cx-subtitle", e.subtitleColor), i.style.setProperty("--cx-label", e.labelColor), i.style.setProperty("--cx-value", e.valueColor), i.style.setProperty("--cx-pill-bg", e.pillBg), i.style.setProperty("--cx-pill-from", e.pillFromColor), i.style.setProperty("--cx-pill-amt", e.pillAmtColor), i.style.setProperty("--cx-divider", e.divider), i.style.setProperty("--cx-close", e.closeColor), i.style.setProperty("--cx-close-hover", e.closeHoverBg), i.style.setProperty("--cx-copy", e.copyColor), i.style.setProperty("--cx-input-bg", e.inputBg), i.style.setProperty("--cx-input-border", e.inputBorder), i.style.setProperty("--cx-hint", e.hintColor), i.style.setProperty("--cx-surface-subtle", e.surfaceSubtle), i.style.setProperty("--cx-surface-high", e.surfaceHigh), i.style.setProperty("--cx-primary", e.primary), i.style.setProperty("--cx-primary-glow", e.primaryGlow), i.style.setProperty("--cx-primary-gradient", e.primaryGradient), i.style.setProperty("--cx-secondary", e.secondary), i.style.setProperty("--cx-error", e.errorColor), i.style.setProperty("--cx-notice-bg", e.noticeBg), i.style.setProperty("--cx-notice-border", e.noticeBorder), i.style.setProperty("--cx-notice-title", e.noticeTitleColor), i.style.setProperty("--cx-on-primary", e.onPrimary);
|
|
8411
8412
|
}
|
|
8412
8413
|
function D(i, e) {
|
|
@@ -8416,7 +8417,7 @@ function D(i, e) {
|
|
|
8416
8417
|
<div class="__crossx-row-value">${e}</div>
|
|
8417
8418
|
</div>`;
|
|
8418
8419
|
}
|
|
8419
|
-
function
|
|
8420
|
+
function qr(i, e, r, t) {
|
|
8420
8421
|
const s = e, o = He(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ee(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Z(i.to)}</span>
|
|
8421
8422
|
<button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${J}</button>` : "<span>—</span>", p = ft(i, r, t), _ = ut(i.value, o, n, r), u = _ ? D((t == null ? void 0 : t.label_value) ?? "Value", `<span>${_}</span>`) : "", x = i.data ?? "0x", g = document.createElement("div");
|
|
8422
8423
|
return g.id = F, g.innerHTML = `
|
|
@@ -8457,7 +8458,7 @@ function zr(i, e, r, t) {
|
|
|
8457
8458
|
</div>
|
|
8458
8459
|
`, g;
|
|
8459
8460
|
}
|
|
8460
|
-
const
|
|
8461
|
+
const jr = /* @__PURE__ */ new Set([
|
|
8461
8462
|
"0x095ea7b3",
|
|
8462
8463
|
// approve(address,uint256) — ERC20 / ERC721
|
|
8463
8464
|
"0xa22cb465",
|
|
@@ -8467,12 +8468,12 @@ const Vr = /* @__PURE__ */ new Set([
|
|
|
8467
8468
|
"0x8fcbaf0c"
|
|
8468
8469
|
// permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32) — DAI 스타일
|
|
8469
8470
|
]);
|
|
8470
|
-
function
|
|
8471
|
-
return i ?
|
|
8471
|
+
function Yr(i) {
|
|
8472
|
+
return i ? jr.has(i.slice(0, 10).toLowerCase()) : !1;
|
|
8472
8473
|
}
|
|
8473
|
-
function
|
|
8474
|
+
function Xr(i, e, r, t) {
|
|
8474
8475
|
const s = e, o = He(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ee(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Z(i.to)}</span>
|
|
8475
|
-
<button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${J}</button>` : "<span>—</span>", p = ft(i, r, t), u = ut(i.value, o, n, r) ?? "—", x =
|
|
8476
|
+
<button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${J}</button>` : "<span>—</span>", p = ft(i, r, t), u = ut(i.value, o, n, r) ?? "—", x = Yr(i.data) ? (t == null ? void 0 : t.send_tx_approve_button) ?? "Approve" : (t == null ? void 0 : t.send_tx_confirm_button) ?? "Confirm", g = document.createElement("div");
|
|
8476
8477
|
return g.id = F, g.innerHTML = `
|
|
8477
8478
|
<div class="__crossx-card __crossx-card--migration __crossx-card--send-tx" style="${H(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
|
|
8478
8479
|
<div class="__crossx-header">
|
|
@@ -8512,10 +8513,10 @@ function Ee(i) {
|
|
|
8512
8513
|
function w(i) {
|
|
8513
8514
|
return i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
8514
8515
|
}
|
|
8515
|
-
function
|
|
8516
|
+
function Jr(i) {
|
|
8516
8517
|
return typeof i == "string" && /^0x[0-9a-fA-F]{40}$/i.test(i);
|
|
8517
8518
|
}
|
|
8518
|
-
function
|
|
8519
|
+
function Zr(i) {
|
|
8519
8520
|
if (typeof i == "string") return w(i);
|
|
8520
8521
|
if (typeof i == "number" || typeof i == "bigint" || typeof i == "boolean") return String(i);
|
|
8521
8522
|
try {
|
|
@@ -8524,25 +8525,25 @@ function Xr(i) {
|
|
|
8524
8525
|
return String(i);
|
|
8525
8526
|
}
|
|
8526
8527
|
}
|
|
8527
|
-
function
|
|
8528
|
+
function Qr(i) {
|
|
8528
8529
|
return i.includes(":") ? i.split(":")[1] ?? i : i;
|
|
8529
8530
|
}
|
|
8530
|
-
function
|
|
8531
|
+
function es(i) {
|
|
8531
8532
|
return `https://www.crossscan.io/address/${i}?tab=txs`;
|
|
8532
8533
|
}
|
|
8533
|
-
function
|
|
8534
|
-
return `https://explorer.crosstoken.io/${
|
|
8534
|
+
function ts(i, e) {
|
|
8535
|
+
return `https://explorer.crosstoken.io/${Qr(i)}/tx/${e}`;
|
|
8535
8536
|
}
|
|
8536
8537
|
function mt(i, e) {
|
|
8537
8538
|
return `<a class="__crossx-addr-text __crossx-row-link" href="${w(e)}" target="_blank" rel="noopener noreferrer">${w(i)}</a>`;
|
|
8538
8539
|
}
|
|
8539
8540
|
function be(i) {
|
|
8540
|
-
return mt(Z(i),
|
|
8541
|
+
return mt(Z(i), es(i));
|
|
8541
8542
|
}
|
|
8542
8543
|
function yt(i, e) {
|
|
8543
|
-
return mt(Z(e),
|
|
8544
|
+
return mt(Z(e), ts(i, e));
|
|
8544
8545
|
}
|
|
8545
|
-
function
|
|
8546
|
+
function rs(i, e, r) {
|
|
8546
8547
|
const t = D(
|
|
8547
8548
|
(r == null ? void 0 : r.label_from) ?? "From",
|
|
8548
8549
|
`${be(i.from)}
|
|
@@ -8574,7 +8575,7 @@ function es(i, e, r) {
|
|
|
8574
8575
|
</div>
|
|
8575
8576
|
`, p;
|
|
8576
8577
|
}
|
|
8577
|
-
function
|
|
8578
|
+
function ss(i, e, r) {
|
|
8578
8579
|
const t = document.createElement("div");
|
|
8579
8580
|
return t.id = F, t.innerHTML = `
|
|
8580
8581
|
<div class="__crossx-card __crossx-card--migration" style="${H(e)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
|
|
@@ -8591,10 +8592,10 @@ function ts(i, e, r) {
|
|
|
8591
8592
|
</div>
|
|
8592
8593
|
`, t;
|
|
8593
8594
|
}
|
|
8594
|
-
function
|
|
8595
|
+
function is(i, e, r, t) {
|
|
8595
8596
|
const s = e.status !== "reverted" && e.status !== "timeout", o = e.status === "timeout", n = i.querySelector("#__crossx-ttl"), a = i.querySelector(".__crossx-header");
|
|
8596
8597
|
if (n) {
|
|
8597
|
-
const m = o ?
|
|
8598
|
+
const m = o ? zr : s ? "" : Kr, y = o ? (t == null ? void 0 : t.tx_timeout) ?? "Transaction timeout" : s ? (t == null ? void 0 : t.tx_success) ?? "Transaction complete" : (t == null ? void 0 : t.tx_failed) ?? "Transaction failed";
|
|
8598
8599
|
m ? (n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "8px", n.innerHTML = `${m}<span>${w(y)}</span>`) : n.textContent = y;
|
|
8599
8600
|
}
|
|
8600
8601
|
if (a && !i.querySelector("#__crossx-close-btn")) {
|
|
@@ -8630,7 +8631,7 @@ function rs(i, e, r, t) {
|
|
|
8630
8631
|
});
|
|
8631
8632
|
});
|
|
8632
8633
|
}
|
|
8633
|
-
function
|
|
8634
|
+
function os(i, e, r) {
|
|
8634
8635
|
const t = e, s = Ee(i.dappName), o = w(i.message), n = document.createElement("div");
|
|
8635
8636
|
return n.id = F, n.innerHTML = `
|
|
8636
8637
|
<div class="__crossx-card __crossx-card--migration __crossx-card--sign-msg" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
|
|
@@ -8662,7 +8663,7 @@ function ss(i, e, r) {
|
|
|
8662
8663
|
</div>
|
|
8663
8664
|
`, n;
|
|
8664
8665
|
}
|
|
8665
|
-
function
|
|
8666
|
+
function ns(i, e, r) {
|
|
8666
8667
|
const t = e, s = Ee(i.dappName);
|
|
8667
8668
|
let o = {};
|
|
8668
8669
|
if (typeof i.typedData == "string")
|
|
@@ -8678,7 +8679,7 @@ function is(i, e, r) {
|
|
|
8678
8679
|
<span class="__crossx-td-value">${w(n)}</span>
|
|
8679
8680
|
</div>`;
|
|
8680
8681
|
for (const [_, u] of Object.entries(a)) {
|
|
8681
|
-
const x =
|
|
8682
|
+
const x = Zr(u), f = Jr(u) ? `<span class="__crossx-addr-text">${Z(u)}</span>
|
|
8682
8683
|
<button class="__crossx-copy-btn" data-copy="${w(String(u))}" title="Copy">${J}</button>` : `<span>${x}</span>`;
|
|
8683
8684
|
l += `
|
|
8684
8685
|
<div class="__crossx-td-row">
|
|
@@ -8717,28 +8718,28 @@ function is(i, e, r) {
|
|
|
8717
8718
|
</div>
|
|
8718
8719
|
`, p;
|
|
8719
8720
|
}
|
|
8720
|
-
const
|
|
8721
|
+
const as = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
8721
8722
|
<line x1="12" y1="5" x2="12" y2="19"/>
|
|
8722
8723
|
<line x1="5" y1="12" x2="19" y2="12"/>
|
|
8723
|
-
</svg>`,
|
|
8724
|
+
</svg>`, cs = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="var(--cx-primary, #00ceb2)"/><path d="M7.5 12.5L10.5 15.5L16.5 8.5" stroke="var(--cx-on-primary, #000)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
|
8724
8725
|
function bt(i) {
|
|
8725
8726
|
return i.name || `Account ${i.index + 1}`;
|
|
8726
8727
|
}
|
|
8727
|
-
function
|
|
8728
|
+
function ls() {
|
|
8728
8729
|
return `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="32" height="32" rx="16" fill="#121212" fill-opacity="0.1"/><g fill="#121212" fill-opacity="0.5">${wt}</g></svg>`;
|
|
8729
8730
|
}
|
|
8730
|
-
const
|
|
8731
|
-
function
|
|
8731
|
+
const ds = We().portraitBaseUrl;
|
|
8732
|
+
function ps(i, e) {
|
|
8732
8733
|
const r = e.replace("#", "");
|
|
8733
|
-
return `${
|
|
8734
|
+
return `${ds}/portrait/evm/${i}.png?size=256&bg=${r}`;
|
|
8734
8735
|
}
|
|
8735
8736
|
function vt(i, e, r) {
|
|
8736
|
-
const t =
|
|
8737
|
+
const t = ps(i, r), o = ls().replace(/"/g, """);
|
|
8737
8738
|
return `<span class="__crossx-wallet-avatar"><img class="__crossx-wallet-avatar-img" src="${t}" alt="" onerror="this.style.display='none';this.nextElementSibling.innerHTML='${o}';this.nextElementSibling.style.display='flex';"><span class="__crossx-wallet-avatar-fallback"></span></span>`;
|
|
8738
8739
|
}
|
|
8739
|
-
function
|
|
8740
|
+
function _s(i, e, r, t) {
|
|
8740
8741
|
const s = r == null ? void 0 : r.toLowerCase(), o = i.map((a) => {
|
|
8741
|
-
const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", _ = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${
|
|
8742
|
+
const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", _ = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${cs}</span>` : "";
|
|
8742
8743
|
return `<button class="__crossx-wallet-item${p}" data-wallet-index="${a.index}" data-wallet-address="${w(a.address)}">
|
|
8743
8744
|
${vt(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(a))}</span><span class="__crossx-wallet-addr">${ht(a.address)}</span></span>${_}
|
|
8744
8745
|
</button>`;
|
|
@@ -8760,7 +8761,7 @@ function ds(i, e, r, t) {
|
|
|
8760
8761
|
${o}
|
|
8761
8762
|
</div>
|
|
8762
8763
|
<button class="__crossx-wallet-add" id="__crossx-add-wallet-btn" type="button">
|
|
8763
|
-
<span class="__crossx-wallet-add-icon">${
|
|
8764
|
+
<span class="__crossx-wallet-add-icon">${as}</span>
|
|
8764
8765
|
<span class="__crossx-wallet-add-label">${w((t == null ? void 0 : t.wallet_selector_add_button) ?? "Add Wallet")}</span>
|
|
8765
8766
|
</button>
|
|
8766
8767
|
<p class="__crossx-wallet-add-error" id="__crossx-add-wallet-error" role="alert" aria-live="polite" hidden></p>
|
|
@@ -8775,11 +8776,11 @@ function ds(i, e, r, t) {
|
|
|
8775
8776
|
</div>
|
|
8776
8777
|
`, n;
|
|
8777
8778
|
}
|
|
8778
|
-
function
|
|
8779
|
+
function hs(i, e) {
|
|
8779
8780
|
const r = document.createElement("div");
|
|
8780
8781
|
r.id = F;
|
|
8781
8782
|
const t = document.createElement("div");
|
|
8782
|
-
t.className = "__crossx-card __crossx-card--wallet-created",
|
|
8783
|
+
t.className = "__crossx-card __crossx-card--wallet-created", Vr(t, i), t.role = "dialog", t.ariaModal = "true", t.setAttribute("aria-labelledby", "__crossx-ttl");
|
|
8783
8784
|
const s = document.createElement("div");
|
|
8784
8785
|
s.className = "__crossx-header";
|
|
8785
8786
|
const o = document.createElement("span");
|
|
@@ -8816,22 +8817,22 @@ function ps(i, e) {
|
|
|
8816
8817
|
const f = document.createElement("button");
|
|
8817
8818
|
return f.className = "__crossx-wallet-created-btn", f.id = "__crossx-wallet-created-done", f.type = "button", f.textContent = (e == null ? void 0 : e.wallet_created_button) ?? "Got it", g.appendChild(f), t.append(s, l, p, g), r.appendChild(t), r;
|
|
8818
8819
|
}
|
|
8819
|
-
const
|
|
8820
|
+
const us = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8820
8821
|
<path d="M26.693 21.193c-.028-3.168 2.587-4.712 2.706-4.786-1.477-2.16-3.77-2.454-4.58-2.484-1.944-.197-3.804 1.148-4.793 1.148-.992 0-2.52-1.12-4.147-1.09-2.13.032-4.1 1.239-5.198 3.133-2.222 3.855-.569 9.562 1.593 12.69 1.061 1.535 2.318 3.258 3.975 3.196 1.6-.064 2.2-1.03 4.133-1.03 1.928 0 2.48 1.03 4.172.997 1.72-.03 2.806-1.56 3.862-3.1 1.211-1.779 1.713-3.495 1.74-3.583-.037-.017-3.427-1.316-3.463-5.09z" fill="currentColor"/>
|
|
8821
8822
|
<path d="M23.527 11.876c.877-1.065 1.471-2.545 1.31-4.024-1.266.053-2.807.845-3.718 1.907-.813.946-1.53 2.468-1.34 3.915 1.41.107 2.852-.716 3.748-1.798z" fill="currentColor"/>
|
|
8822
|
-
</svg>`,
|
|
8823
|
+
</svg>`, xs = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8823
8824
|
<path d="M38.06 20.44c0-1.34-.12-2.63-.34-3.87H20.5v7.32h9.84c-.42 2.28-1.71 4.21-3.65 5.51v4.57h5.91c3.46-3.19 5.46-7.88 5.46-13.53z" fill="#4285F4"/>
|
|
8824
8825
|
<path d="M20.5 38.5c4.94 0 9.09-1.64 12.12-4.44l-5.91-4.57c-1.64 1.1-3.73 1.75-6.21 1.75-4.77 0-8.82-3.22-10.26-7.55H4.16v4.72A18.49 18.49 0 0 0 20.5 38.5z" fill="#34A853"/>
|
|
8825
8826
|
<path d="M10.24 23.69A11.16 11.16 0 0 1 9.66 20c0-1.28.22-2.52.58-3.69v-4.72H4.16A18.49 18.49 0 0 0 2 20c0 2.97.71 5.78 1.97 8.28l6.27-4.59z" fill="#FBBC05"/>
|
|
8826
8827
|
<path d="M20.5 8.76c2.69 0 5.1.92 7 2.73l5.24-5.24C29.58 3.36 25.43 1.5 20.5 1.5A18.49 18.49 0 0 0 4.16 11.59l6.08 4.72C11.68 11.98 15.73 8.76 20.5 8.76z" fill="#EA4335"/>
|
|
8827
8828
|
</svg>`;
|
|
8828
|
-
function
|
|
8829
|
+
function gs(i) {
|
|
8829
8830
|
const e = Ft(i);
|
|
8830
|
-
return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${
|
|
8831
|
+
return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Gr[i] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${w(e)}</span></span>`;
|
|
8831
8832
|
}
|
|
8832
|
-
function
|
|
8833
|
+
function fs(i) {
|
|
8833
8834
|
if (i.length === 0) return "";
|
|
8834
|
-
const e = (s) =>
|
|
8835
|
+
const e = (s) => gs(i[s]), r = "Supported wallets include ";
|
|
8835
8836
|
if (i.length === 1)
|
|
8836
8837
|
return `${r}${e(0)}.`;
|
|
8837
8838
|
if (i.length === 2)
|
|
@@ -8841,7 +8842,7 @@ function xs(i) {
|
|
|
8841
8842
|
const t = i.length - 3;
|
|
8842
8843
|
return `${r}${e(0)}, ${e(1)}, ${e(2)}, and ${t} more.`;
|
|
8843
8844
|
}
|
|
8844
|
-
function
|
|
8845
|
+
function ws(i, e = [], r) {
|
|
8845
8846
|
const t = i, s = w(String(e[0])), o = w((r == null ? void 0 : r.login_selector_or) ?? "or"), n = e.length > 0 ? `
|
|
8846
8847
|
<div class="__crossx-login-or-divider">
|
|
8847
8848
|
<hr><span>${o}</span><hr>
|
|
@@ -8849,7 +8850,7 @@ function gs(i, e = [], r) {
|
|
|
8849
8850
|
<button type="button" class="__crossx-connect-other-block" id="__crossx-connect-other-wallet-btn" data-wallet-id="${s}" aria-labelledby="__crossx-connect-other-heading">
|
|
8850
8851
|
<span class="__crossx-connect-other-text">
|
|
8851
8852
|
<span class="__crossx-connect-other-title" id="__crossx-connect-other-heading">${w((r == null ? void 0 : r.login_selector_connect_other_wallets) ?? "Connect with Other Wallets")}</span>
|
|
8852
|
-
<span class="__crossx-connect-other-desc __crossx-connect-other-summary">${
|
|
8853
|
+
<span class="__crossx-connect-other-desc __crossx-connect-other-summary">${fs(e)}</span>
|
|
8853
8854
|
</span>
|
|
8854
8855
|
</button>` : "", a = document.createElement("div");
|
|
8855
8856
|
return a.id = F, a.innerHTML = `
|
|
@@ -8865,11 +8866,11 @@ function gs(i, e = [], r) {
|
|
|
8865
8866
|
<div class="__crossx-body">
|
|
8866
8867
|
<div class="__crossx-login-btn-row">
|
|
8867
8868
|
<button class="__crossx-login-btn" id="__crossx-apple-btn" type="button">
|
|
8868
|
-
<span class="__crossx-login-icon" style="color:var(--cx-value);">${
|
|
8869
|
+
<span class="__crossx-login-icon" style="color:var(--cx-value);">${us}</span>
|
|
8869
8870
|
<span class="__crossx-login-btn-label">${w((r == null ? void 0 : r.login_selector_apple) ?? "Sign in with Apple")}</span>
|
|
8870
8871
|
</button>
|
|
8871
8872
|
<button class="__crossx-login-btn" id="__crossx-google-btn" type="button">
|
|
8872
|
-
<span class="__crossx-login-icon">${
|
|
8873
|
+
<span class="__crossx-login-icon">${xs}</span>
|
|
8873
8874
|
<span class="__crossx-login-btn-label">${w((r == null ? void 0 : r.login_selector_google) ?? "Sign in with Google")}</span>
|
|
8874
8875
|
</button>
|
|
8875
8876
|
</div>${n}
|
|
@@ -8880,7 +8881,7 @@ function gs(i, e = [], r) {
|
|
|
8880
8881
|
</div>
|
|
8881
8882
|
`, a;
|
|
8882
8883
|
}
|
|
8883
|
-
function
|
|
8884
|
+
function ms(i, e) {
|
|
8884
8885
|
const r = i, t = document.createElement("div");
|
|
8885
8886
|
t.id = F;
|
|
8886
8887
|
const s = w(e.message).replace(/\n/g, "<br>"), o = e.email ? `<div class="__crossx-session-account-card">
|
|
@@ -8908,7 +8909,7 @@ function fs(i, e) {
|
|
|
8908
8909
|
</div>
|
|
8909
8910
|
`, t;
|
|
8910
8911
|
}
|
|
8911
|
-
function
|
|
8912
|
+
function ys(i, e = !0) {
|
|
8912
8913
|
const r = i, t = e ? `<button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${W}</button>` : "", s = e ? '<button class="__crossx-skip-btn" id="__crossx-skip-btn">Skip for Now</button>' : "", o = document.createElement("div");
|
|
8913
8914
|
return o.id = F, o.innerHTML = `
|
|
8914
8915
|
<div class="__crossx-card __crossx-card--migration" style="${H(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
|
|
@@ -8924,7 +8925,7 @@ function ws(i, e = !0) {
|
|
|
8924
8925
|
<p class="__crossx-mig-info-desc">It safely restores and integrates all your previous assets. Simply verify your PIN to get started.</p>
|
|
8925
8926
|
</div>
|
|
8926
8927
|
<button class="__crossx-recover-btn" id="__crossx-recover-btn">
|
|
8927
|
-
<span class="__crossx-recover-icon">${
|
|
8928
|
+
<span class="__crossx-recover-icon">${Br}</span>
|
|
8928
8929
|
<span class="__crossx-recover-label">Import from Social Backup</span>
|
|
8929
8930
|
</button>
|
|
8930
8931
|
${s}
|
|
@@ -8932,7 +8933,7 @@ function ws(i, e = !0) {
|
|
|
8932
8933
|
</div>
|
|
8933
8934
|
`, o;
|
|
8934
8935
|
}
|
|
8935
|
-
function
|
|
8936
|
+
function bs(i, e) {
|
|
8936
8937
|
const r = i, { errorMessage: t, attemptCount: s, maxAttempts: o = 5 } = e ?? {}, n = !!t, a = n ? " --error" : "", l = s != null && s > 0 ? `<p class="__crossx-pin-attempt">${s}/${o}</p>` : "", p = s != null && s >= 3 ? '<p class="__crossx-pin-warning">Your account will be locked after further failures.</p>' : "", _ = n ? `<p class="__crossx-pin-error-text">${t}</p>` : "", u = document.createElement("div");
|
|
8937
8938
|
return u.id = F, u.innerHTML = `
|
|
8938
8939
|
<div class="__crossx-card __crossx-card--migration" style="${H(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
|
|
@@ -8956,12 +8957,12 @@ function ms(i, e) {
|
|
|
8956
8957
|
</div>
|
|
8957
8958
|
`, u;
|
|
8958
8959
|
}
|
|
8959
|
-
function
|
|
8960
|
+
function vs(i) {
|
|
8960
8961
|
const e = new Date(i), r = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], t = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], s = r[e.getDay()], o = t[e.getMonth()], n = e.getDate(), a = String(e.getHours()).padStart(2, "0"), l = String(e.getMinutes()).padStart(2, "0");
|
|
8961
8962
|
return `${s}, ${o} ${n} ${a}:${l}`;
|
|
8962
8963
|
}
|
|
8963
|
-
function
|
|
8964
|
-
const t = i, s = e <= 0, o = s ? null : Date.now() + e * 1e3, n = o ?
|
|
8964
|
+
function Ss(i, e, r) {
|
|
8965
|
+
const t = i, s = e <= 0, o = s ? null : Date.now() + e * 1e3, n = o ? vs(o) : null, a = document.createElement("div");
|
|
8965
8966
|
return a.id = F, a.innerHTML = `
|
|
8966
8967
|
<div class="__crossx-card __crossx-card--migration" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
|
|
8967
8968
|
<div class="__crossx-header">
|
|
@@ -8991,10 +8992,10 @@ function bs(i, e, r) {
|
|
|
8991
8992
|
return () => clearInterval(u);
|
|
8992
8993
|
} };
|
|
8993
8994
|
}
|
|
8994
|
-
function
|
|
8995
|
+
function Es(i) {
|
|
8995
8996
|
const r = [i.check1, i.check2].map((t, s) => `
|
|
8996
8997
|
<div class="__crossx-pw-notice-item" data-check-index="${s}" role="checkbox" aria-checked="false" tabindex="0">
|
|
8997
|
-
<div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${
|
|
8998
|
+
<div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${Ts}</div>
|
|
8998
8999
|
<span class="__crossx-pw-notice-item-text">${w(t)}</span>
|
|
8999
9000
|
</div>
|
|
9000
9001
|
`).join("");
|
|
@@ -9010,7 +9011,7 @@ function vs(i) {
|
|
|
9010
9011
|
<div class="__crossx-pw-fields __crossx-pw-fields--notice">
|
|
9011
9012
|
<div class="__crossx-pw-notice-header">
|
|
9012
9013
|
<div class="__crossx-pw-notice-title-row">
|
|
9013
|
-
<span class="__crossx-pw-notice-icon">${
|
|
9014
|
+
<span class="__crossx-pw-notice-icon">${Rs}</span>
|
|
9014
9015
|
<p class="__crossx-pw-notice-title">${w(i.noticeTitle)}</p>
|
|
9015
9016
|
</div>
|
|
9016
9017
|
<p class="__crossx-pw-notice-desc">${w(i.noticeDesc)}</p>
|
|
@@ -9060,7 +9061,7 @@ function Ce(i) {
|
|
|
9060
9061
|
<div class="__crossx-pin6-numpad-row">
|
|
9061
9062
|
<button type="button" class="__crossx-pin6-numpad-key --empty" aria-hidden="true"></button>
|
|
9062
9063
|
<button type="button" class="__crossx-pin6-numpad-key${g}" data-key="0">0</button>
|
|
9063
|
-
<button type="button" class="__crossx-pin6-numpad-key --delete${g}" data-key="backspace" aria-label="Delete">${
|
|
9064
|
+
<button type="button" class="__crossx-pin6-numpad-key --delete${g}" data-key="backspace" aria-label="Delete">${ks}</button>
|
|
9064
9065
|
</div>
|
|
9065
9066
|
</div>`;
|
|
9066
9067
|
return `
|
|
@@ -9095,14 +9096,14 @@ function lt(i, e) {
|
|
|
9095
9096
|
</div>
|
|
9096
9097
|
`, r;
|
|
9097
9098
|
}
|
|
9098
|
-
function
|
|
9099
|
+
function As(i, e) {
|
|
9099
9100
|
if (i.length !== 6) return e.tooShort;
|
|
9100
9101
|
if (!/^\d+$/.test(i)) return e.numbersOnly;
|
|
9101
9102
|
if (/(.)\1{2}/.test(i)) return e.repeatingDigit;
|
|
9102
9103
|
const r = i.split("").map(Number), t = r.every((o, n) => n === 0 || o === (r[n - 1] + 1) % 10), s = r.every((o, n) => n === 0 || o === (r[n - 1] + 9) % 10);
|
|
9103
9104
|
return t || s ? e.sequential : i[0] !== i[1] && i === i.slice(0, 2).repeat(3) ? e.alternatingPattern : null;
|
|
9104
9105
|
}
|
|
9105
|
-
function
|
|
9106
|
+
function Is(i) {
|
|
9106
9107
|
const e = Math.max(0, Math.ceil(i / 1e3)), r = Math.floor(e / 3600), t = Math.floor(e % 3600 / 60), s = e % 60;
|
|
9107
9108
|
return r > 0 ? `${r}h ${String(t).padStart(2, "0")}m` : `${String(t).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
|
|
9108
9109
|
}
|
|
@@ -9180,7 +9181,7 @@ function Pe(i, e, r, t, s, o, n) {
|
|
|
9180
9181
|
B <= 0 ? (clearInterval(R), M(!1), (Q = x()) == null || Q.remove(), v && (v.textContent = ""), O(), setTimeout(() => {
|
|
9181
9182
|
var we;
|
|
9182
9183
|
return (we = p()[0]) == null ? void 0 : we.focus();
|
|
9183
|
-
}, 50)) : V && (V.textContent = ` ${
|
|
9184
|
+
}, 50)) : V && (V.textContent = ` ${Is(B)}`);
|
|
9184
9185
|
}, R = setInterval(I, 1e3);
|
|
9185
9186
|
I();
|
|
9186
9187
|
const N = new MutationObserver(() => {
|
|
@@ -9281,18 +9282,18 @@ function Pe(i, e, r, t, s, o, n) {
|
|
|
9281
9282
|
}), ue.addEventListener("pointercancel", v), ue.addEventListener("pointerleave", v, !0), T(), o && o > Date.now() && O();
|
|
9282
9283
|
}
|
|
9283
9284
|
}
|
|
9284
|
-
const
|
|
9285
|
+
const ks = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9285
9286
|
<path d="M7.36 0.5H19.5C20.6046 0.5 21.5 1.39543 21.5 2.5V14.5C21.5 15.6046 20.6046 16.5 19.5 16.5H7.36C6.76 16.5 6.19 16.24 5.8 15.79L0.94 10.02C0.35 9.32 0.35 8.3 0.94 7.6L5.8 1.71C6.19 1.26 6.76 0.5 7.36 0.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
|
|
9286
9287
|
<line x1="10" y1="5.5" x2="16" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
9287
9288
|
<line x1="16" y1="5.5" x2="10" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
9288
9289
|
</svg>`, St = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9289
9290
|
<path d="M14.5 8.5H14V6.5C14 4.015 11.985 2 9.5 2C7.015 2 5 4.015 5 6.5V8.5H4.5C3.672 8.5 3 9.172 3 10V16.5C3 17.328 3.672 18 4.5 18H14.5C15.328 18 16 17.328 16 16.5V10C16 9.172 15.328 8.5 14.5 8.5ZM10.5 13.415V15C10.5 15.276 10.276 15.5 10 15.5H9C8.724 15.5 8.5 15.276 8.5 15V13.415C8.187 13.196 8 12.847 8 12.5C8 11.672 8.672 11 9.5 11C10.328 11 11 11.672 11 12.5C11 12.847 10.813 13.196 10.5 13.415ZM12.5 8.5H6.5V6.5C6.5 4.843 7.843 3.5 9.5 3.5C11.157 3.5 12.5 4.843 12.5 6.5V8.5Z" fill="currentColor"/>
|
|
9290
|
-
</svg>`,
|
|
9291
|
+
</svg>`, Ts = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9291
9292
|
<path d="M1 4.5L4 7.5L10 1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9292
|
-
</svg>`,
|
|
9293
|
+
</svg>`, Rs = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9293
9294
|
<path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="currentColor"/>
|
|
9294
9295
|
</svg>`;
|
|
9295
|
-
function
|
|
9296
|
+
function Cs(i, e, r) {
|
|
9296
9297
|
var o;
|
|
9297
9298
|
const t = i.querySelectorAll(".__crossx-pin-input");
|
|
9298
9299
|
t.forEach((n, a) => {
|
|
@@ -9325,9 +9326,9 @@ function Ts(i, e, r) {
|
|
|
9325
9326
|
}
|
|
9326
9327
|
}), (o = t[0]) == null || o.focus();
|
|
9327
9328
|
}
|
|
9328
|
-
class
|
|
9329
|
+
class Ps {
|
|
9329
9330
|
constructor(e = "light", r, t = Fe, s) {
|
|
9330
|
-
this.theme = e, this.overrides = r, this.tokens = at(e, r), this.displayDecimals = t, this.pinKeyboard = s,
|
|
9331
|
+
this.theme = e, this.overrides = r, this.tokens = at(e, r), this.displayDecimals = t, this.pinKeyboard = s, Mr();
|
|
9331
9332
|
}
|
|
9332
9333
|
setPinKeyboard(e) {
|
|
9333
9334
|
this.pinKeyboard = e;
|
|
@@ -9370,7 +9371,7 @@ class Rs {
|
|
|
9370
9371
|
return new Promise((s, o) => {
|
|
9371
9372
|
var S;
|
|
9372
9373
|
K();
|
|
9373
|
-
const n = [...e], a =
|
|
9374
|
+
const n = [...e], a = _s(n, this.tokens, t, this.messages), l = se();
|
|
9374
9375
|
z(a);
|
|
9375
9376
|
let p = !1;
|
|
9376
9377
|
const _ = () => {
|
|
@@ -9423,7 +9424,7 @@ class Rs {
|
|
|
9423
9424
|
return new Promise((e) => {
|
|
9424
9425
|
var a, l;
|
|
9425
9426
|
K();
|
|
9426
|
-
const r =
|
|
9427
|
+
const r = hs(this.tokens, this.messages), t = se();
|
|
9427
9428
|
z(r);
|
|
9428
9429
|
let s = !1, o = null;
|
|
9429
9430
|
const n = () => {
|
|
@@ -9464,7 +9465,7 @@ class Rs {
|
|
|
9464
9465
|
return new Promise((s) => {
|
|
9465
9466
|
var x, g, f, m;
|
|
9466
9467
|
K();
|
|
9467
|
-
const o =
|
|
9468
|
+
const o = ws(this.tokens, r, this.messages), n = se();
|
|
9468
9469
|
z(o);
|
|
9469
9470
|
const a = () => {
|
|
9470
9471
|
o.remove(), n();
|
|
@@ -9493,7 +9494,7 @@ class Rs {
|
|
|
9493
9494
|
return new Promise((r) => {
|
|
9494
9495
|
var _, u, x;
|
|
9495
9496
|
K();
|
|
9496
|
-
const t = this.messages, s =
|
|
9497
|
+
const t = this.messages, s = ms(this.tokens, {
|
|
9497
9498
|
title: e.title,
|
|
9498
9499
|
message: e.message,
|
|
9499
9500
|
email: e.email,
|
|
@@ -9523,7 +9524,7 @@ class Rs {
|
|
|
9523
9524
|
return new Promise((t) => {
|
|
9524
9525
|
var a, l, p;
|
|
9525
9526
|
K();
|
|
9526
|
-
const s =
|
|
9527
|
+
const s = ys(this.tokens, r);
|
|
9527
9528
|
z(s);
|
|
9528
9529
|
const o = () => s.remove(), n = () => {
|
|
9529
9530
|
o(), t("recover");
|
|
@@ -9570,7 +9571,7 @@ class Rs {
|
|
|
9570
9571
|
title: (t == null ? void 0 : t.pin_setup_confirm_title) ?? "Confirm PIN",
|
|
9571
9572
|
headerSubtitle: (t == null ? void 0 : t.pin_setup_header_subtitle) ?? "This PIN is used to authorize your transactions.",
|
|
9572
9573
|
subtitle: (t == null ? void 0 : t.pin_setup_confirm_subtitle) ?? "Confirm your 6-digit PIN"
|
|
9573
|
-
}, a = lt(this.tokens,
|
|
9574
|
+
}, a = lt(this.tokens, Es(s)), l = se();
|
|
9574
9575
|
z(a);
|
|
9575
9576
|
let p = !1;
|
|
9576
9577
|
const _ = () => {
|
|
@@ -9602,7 +9603,7 @@ class Rs {
|
|
|
9602
9603
|
subtitle: o.subtitle,
|
|
9603
9604
|
errorMessage: S
|
|
9604
9605
|
}), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (k) => {
|
|
9605
|
-
const T =
|
|
9606
|
+
const T = As(k, f);
|
|
9606
9607
|
T ? y(T) : m(k);
|
|
9607
9608
|
}, x);
|
|
9608
9609
|
};
|
|
@@ -9697,14 +9698,14 @@ class Rs {
|
|
|
9697
9698
|
return new Promise((r) => {
|
|
9698
9699
|
var l;
|
|
9699
9700
|
K();
|
|
9700
|
-
const t =
|
|
9701
|
+
const t = bs(this.tokens, e);
|
|
9701
9702
|
z(t);
|
|
9702
9703
|
const s = () => t.remove(), o = (p) => {
|
|
9703
9704
|
s(), r(p);
|
|
9704
9705
|
}, n = () => {
|
|
9705
9706
|
s(), r(null);
|
|
9706
9707
|
}, a = t.querySelector(".__crossx-card");
|
|
9707
|
-
a && this.applyPinKeyboardMode(a),
|
|
9708
|
+
a && this.applyPinKeyboardMode(a), Cs(t, o, n), (l = t.querySelector("#__crossx-close-btn")) == null || l.addEventListener("click", n), t.addEventListener("click", (p) => {
|
|
9708
9709
|
p.target === t && n();
|
|
9709
9710
|
});
|
|
9710
9711
|
});
|
|
@@ -9719,7 +9720,7 @@ class Rs {
|
|
|
9719
9720
|
return new Promise((t) => {
|
|
9720
9721
|
var p;
|
|
9721
9722
|
K();
|
|
9722
|
-
const { overlay: s, startCountdown: o } =
|
|
9723
|
+
const { overlay: s, startCountdown: o } = Ss(this.tokens, e, r);
|
|
9723
9724
|
z(s);
|
|
9724
9725
|
const n = () => {
|
|
9725
9726
|
l(), s.remove();
|
|
@@ -9739,7 +9740,7 @@ class Rs {
|
|
|
9739
9740
|
return new Promise((r) => {
|
|
9740
9741
|
var a, l;
|
|
9741
9742
|
K();
|
|
9742
|
-
const t =
|
|
9743
|
+
const t = rs(e, this.tokens, this.messages);
|
|
9743
9744
|
z(t);
|
|
9744
9745
|
const s = () => t.remove(), o = () => {
|
|
9745
9746
|
s(), r();
|
|
@@ -9768,7 +9769,7 @@ class Rs {
|
|
|
9768
9769
|
showTransactionProgress(e, r) {
|
|
9769
9770
|
return new Promise((t) => {
|
|
9770
9771
|
K();
|
|
9771
|
-
const s =
|
|
9772
|
+
const s = ss(e, this.tokens, this.messages);
|
|
9772
9773
|
z(s);
|
|
9773
9774
|
const o = () => s.remove();
|
|
9774
9775
|
let n = !1;
|
|
@@ -9785,7 +9786,7 @@ class Rs {
|
|
|
9785
9786
|
document.addEventListener("keydown", p);
|
|
9786
9787
|
};
|
|
9787
9788
|
r.then((p) => {
|
|
9788
|
-
n || (
|
|
9789
|
+
n || (is(s, p, this.tokens, this.messages), l());
|
|
9789
9790
|
});
|
|
9790
9791
|
});
|
|
9791
9792
|
}
|
|
@@ -9794,7 +9795,7 @@ class Rs {
|
|
|
9794
9795
|
var p, _, u;
|
|
9795
9796
|
K();
|
|
9796
9797
|
let t;
|
|
9797
|
-
e.type === "sign-message" ? t =
|
|
9798
|
+
e.type === "sign-message" ? t = os(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = ns(e, this.tokens, this.messages) : e.type === "sign" ? t = qr(e, this.tokens, this.displayDecimals, this.messages) : t = Xr(e, this.tokens, this.displayDecimals, this.messages);
|
|
9798
9799
|
const s = se();
|
|
9799
9800
|
z(t);
|
|
9800
9801
|
const o = () => {
|
|
@@ -9812,7 +9813,7 @@ class Rs {
|
|
|
9812
9813
|
f && ((m = navigator.clipboard) == null || m.writeText(f).catch(() => {
|
|
9813
9814
|
}));
|
|
9814
9815
|
});
|
|
9815
|
-
}),
|
|
9816
|
+
}), Lr(t), t.addEventListener("click", (x) => {
|
|
9816
9817
|
x.target === t && a();
|
|
9817
9818
|
});
|
|
9818
9819
|
const l = (x) => {
|
|
@@ -9822,7 +9823,7 @@ class Rs {
|
|
|
9822
9823
|
});
|
|
9823
9824
|
}
|
|
9824
9825
|
}
|
|
9825
|
-
class
|
|
9826
|
+
class Ns {
|
|
9826
9827
|
constructor(e, r, t, s = () => !1) {
|
|
9827
9828
|
this.browserConfirmation = e, this.getBridge = r, this.getOrigin = t, this.isAuthenticatedViaRNBridge = s;
|
|
9828
9829
|
}
|
|
@@ -9992,7 +9993,7 @@ class Cs {
|
|
|
9992
9993
|
(t = (r = this.browserConfirmation).setPinKeyboard) == null || t.call(r, e);
|
|
9993
9994
|
}
|
|
9994
9995
|
}
|
|
9995
|
-
class
|
|
9996
|
+
class Os {
|
|
9996
9997
|
constructor() {
|
|
9997
9998
|
this._accessToken = null, this._expiresAt = 0;
|
|
9998
9999
|
}
|
|
@@ -10024,7 +10025,7 @@ class Ps {
|
|
|
10024
10025
|
return !this._accessToken || this._expiresAt <= 0 ? !0 : Date.now() >= this._expiresAt - e;
|
|
10025
10026
|
}
|
|
10026
10027
|
}
|
|
10027
|
-
function
|
|
10028
|
+
function Gs(i, e) {
|
|
10028
10029
|
if (!i.projectId)
|
|
10029
10030
|
throw new Error(
|
|
10030
10031
|
`[CROSSx] Fatal: projectId is required but was not provided.
|
|
@@ -10046,9 +10047,9 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
|
|
|
10046
10047
|
"refresh_token이 평문 저장되지 않도록 세션 영속성이 제한됩니다.",
|
|
10047
10048
|
"IndexedDB를 지원하는 브라우저 사용을 권장합니다."
|
|
10048
10049
|
), t.secureStorageAvailable = o;
|
|
10049
|
-
const n = o ? new it(i.projectId) : new gr(), a = new yr(), l = new Er(), p = new ie(), _ = new
|
|
10050
|
+
const n = o ? new it(i.projectId) : new gr(), a = new yr(), l = new Er(), p = new ie(), _ = new Os(), u = new pt();
|
|
10050
10051
|
let x;
|
|
10051
|
-
i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new
|
|
10052
|
+
i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new Tr(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), x = new oe(
|
|
10052
10053
|
s,
|
|
10053
10054
|
n,
|
|
10054
10055
|
l,
|
|
@@ -10063,7 +10064,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
|
|
|
10063
10064
|
var O;
|
|
10064
10065
|
return (O = g == null ? void 0 : g.assertRNBridgeSessionActive) == null ? void 0 : O.call(g);
|
|
10065
10066
|
};
|
|
10066
|
-
x = new
|
|
10067
|
+
x = new Rr(
|
|
10067
10068
|
x,
|
|
10068
10069
|
() => {
|
|
10069
10070
|
var O;
|
|
@@ -10073,12 +10074,12 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
|
|
|
10073
10074
|
m,
|
|
10074
10075
|
() => i.appName
|
|
10075
10076
|
);
|
|
10076
|
-
const y = new fe(s, l), E = new
|
|
10077
|
+
const y = new fe(s, l), E = new Ps(
|
|
10077
10078
|
i.theme ?? "light",
|
|
10078
10079
|
i.themeTokens,
|
|
10079
10080
|
i.displayDecimals,
|
|
10080
10081
|
i.pinKeyboard
|
|
10081
|
-
), S = new
|
|
10082
|
+
), S = new Ns(
|
|
10082
10083
|
E,
|
|
10083
10084
|
() => {
|
|
10084
10085
|
var O;
|
|
@@ -10103,9 +10104,9 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
|
|
|
10103
10104
|
const T = k.signInUseCase;
|
|
10104
10105
|
return T && typeof T.setFreshTokenCallback == "function" && T.setFreshTokenCallback(() => k.requestFreshFirebaseIdTokenFromBridge()), typeof window < "u" && (window.__crossxSDK = k), k;
|
|
10105
10106
|
}
|
|
10106
|
-
function
|
|
10107
|
-
const e =
|
|
10108
|
-
|
|
10107
|
+
function Ks(i) {
|
|
10108
|
+
const e = Ls(i), r = Ds(e), t = JSON.parse(r);
|
|
10109
|
+
$s(t);
|
|
10109
10110
|
const { data: s } = t;
|
|
10110
10111
|
return {
|
|
10111
10112
|
status: t.status,
|
|
@@ -10119,7 +10120,7 @@ function Hs(i) {
|
|
|
10119
10120
|
raw: t
|
|
10120
10121
|
};
|
|
10121
10122
|
}
|
|
10122
|
-
function
|
|
10123
|
+
function Ls(i) {
|
|
10123
10124
|
if (i.includes("://") && i.includes("?")) {
|
|
10124
10125
|
const e = new URL(i), r = e.searchParams.get("crossx_oauth_result");
|
|
10125
10126
|
if (r) return r;
|
|
@@ -10129,22 +10130,22 @@ function Ns(i) {
|
|
|
10129
10130
|
}
|
|
10130
10131
|
return i;
|
|
10131
10132
|
}
|
|
10132
|
-
function
|
|
10133
|
+
function Ds(i) {
|
|
10133
10134
|
if (i.startsWith("{"))
|
|
10134
10135
|
return i;
|
|
10135
10136
|
if (i.startsWith("%7B") || i.startsWith("%7b"))
|
|
10136
10137
|
return decodeURIComponent(i);
|
|
10137
|
-
const e =
|
|
10138
|
+
const e = Ms(i);
|
|
10138
10139
|
return decodeURIComponent(e);
|
|
10139
10140
|
}
|
|
10140
|
-
function
|
|
10141
|
+
function Ms(i) {
|
|
10141
10142
|
if (typeof atob == "function")
|
|
10142
10143
|
return atob(i);
|
|
10143
10144
|
if (typeof Buffer < "u")
|
|
10144
10145
|
return Buffer.from(i, "base64").toString("utf-8");
|
|
10145
10146
|
throw new Error("Base64 디코딩을 지원하는 환경이 아닙니다");
|
|
10146
10147
|
}
|
|
10147
|
-
function
|
|
10148
|
+
function $s(i) {
|
|
10148
10149
|
if (typeof i != "object" || i === null)
|
|
10149
10150
|
throw new Error("Deeplink payload가 유효한 객체가 아닙니다");
|
|
10150
10151
|
const e = i;
|
|
@@ -10165,14 +10166,14 @@ export {
|
|
|
10165
10166
|
h as CROSSxError,
|
|
10166
10167
|
Ht as CROSSxEthereumProvider,
|
|
10167
10168
|
Le as CROSSxSDK,
|
|
10168
|
-
|
|
10169
|
+
Hs as ChainId,
|
|
10169
10170
|
ge as ConnectOtherWalletItem,
|
|
10170
10171
|
d as ErrorCode,
|
|
10171
10172
|
Ne as MNEMONIC_ADDRESS_LIMIT,
|
|
10172
10173
|
pt as PinMemoryStore,
|
|
10173
|
-
|
|
10174
|
+
Os as TokenMemoryStore,
|
|
10174
10175
|
Be as WALLET_BRAND_NAME,
|
|
10175
|
-
|
|
10176
|
+
Gs as createCROSSxSDK,
|
|
10176
10177
|
Ft as getConnectOtherWalletLabel,
|
|
10177
|
-
|
|
10178
|
+
Ks as parseOAuthDeeplink
|
|
10178
10179
|
};
|