@nexus-cross/crossx-sdk-core 2.3.11 → 2.4.0-beta.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/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { createRemoteJWKSet as Tt, jwtVerify as Rt, decodeJwt as Ct } from "jose";
2
- import { secp256k1 as Pt } from "@noble/curves/secp256k1.js";
1
+ import { createRemoteJWKSet as Rt, jwtVerify as Ct, decodeJwt as Pt } from "jose";
2
+ import { secp256k1 as Nt } from "@noble/curves/secp256k1.js";
3
3
  import { keccak_256 as Xe } from "@noble/hashes/sha3.js";
4
- import { bytesToHex as Nt } from "@noble/hashes/utils.js";
4
+ import { bytesToHex as Ot } from "@noble/hashes/utils.js";
5
5
  var d = /* @__PURE__ */ ((i) => (i.AUTH_NOT_INITIALIZED = "AUTH_NOT_INITIALIZED", i.AUTH_FAILED = "AUTH_FAILED", i.AUTH_TOKEN_INVALID = "AUTH_TOKEN_INVALID", i.AUTH_TOKEN_EXPIRED = "AUTH_TOKEN_EXPIRED", i.AUTH_NOT_AUTHENTICATED = "AUTH_NOT_AUTHENTICATED", i.ALREADY_AUTHENTICATED = "ALREADY_AUTHENTICATED", i.SESSION_EXPIRED = "SESSION_EXPIRED", i.OAUTH_POPUP_BLOCKED = "OAUTH_POPUP_BLOCKED", i.WALLET_NOT_FOUND = "WALLET_NOT_FOUND", i.WALLET_CREATION_FAILED = "WALLET_CREATION_FAILED", i.WALLET_ALREADY_EXISTS = "WALLET_ALREADY_EXISTS", i.ADDRESS_LIMIT_EXCEEDED = "ADDRESS_LIMIT_EXCEEDED", i.SIGN_FAILED = "SIGN_FAILED", i.SIGN_REJECTED = "SIGN_REJECTED", i.TX_FAILED = "TX_FAILED", i.TX_REJECTED = "TX_REJECTED", i.BROADCAST_FAILED = "BROADCAST_FAILED", i.USER_REJECTED = "USER_REJECTED", i.TX_INVALID_PARAMS = "TX_INVALID_PARAMS", i.NETWORK_ERROR = "NETWORK_ERROR", i.NETWORK_NOT_CONFIGURED = "NETWORK_NOT_CONFIGURED", i.INVALID_CHAIN = "INVALID_CHAIN", i.CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED", i.CHAIN_ADAPTER_NOT_FOUND = "CHAIN_ADAPTER_NOT_FOUND", i.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", i.SIGNATURE_FAILED = "SIGNATURE_FAILED", i.TRANSACTION_FAILED = "TRANSACTION_FAILED", i.PREPARE_FAILED = "PREPARE_FAILED", i.PREPARE_EXPIRED = "PREPARE_EXPIRED", i.PREPARE_MISMATCH = "PREPARE_MISMATCH", i.MIGRATION_FAILED = "MIGRATION_FAILED", i.MIGRATION_BACKUP_EXISTS = "MIGRATION_BACKUP_EXISTS", i.MIGRATION_PIN_LOCKED = "MIGRATION_PIN_LOCKED", i.GATEWAY_INTERNAL_ERROR = "GATEWAY_INTERNAL_ERROR", i.GATEWAY_LOCK_CONFLICT = "GATEWAY_LOCK_CONFLICT", i.WALLET_INCONSISTENT_STATE = "WALLET_INCONSISTENT_STATE", i.PROJECT_ID_MISSING = "PROJECT_ID_MISSING", i.ORIGIN_NOT_ALLOWED = "ORIGIN_NOT_ALLOWED", i.APP_IDENTIFIER_MISSING = "APP_IDENTIFIER_MISSING", i.INVALID_APP_TYPE = "INVALID_APP_TYPE", i.PROJECT_NOT_REGISTERED = "PROJECT_NOT_REGISTERED", i.SIGNATURE_SIGNER_MISMATCH = "SIGNATURE_SIGNER_MISMATCH", i.GAS_ESTIMATION_FAILED = "GAS_ESTIMATION_FAILED", i.TYPED_DATA_CHAIN_ID_MISMATCH = "TYPED_DATA_CHAIN_ID_MISMATCH", i.PIN_NOT_SET = "PIN_NOT_SET", i.PIN_WRONG = "PIN_WRONG", i.PIN_INVALID = "PIN_INVALID", i.PIN_REPEATED_PATTERN = "PIN_REPEATED_PATTERN", i.PIN_CANCELLED = "PIN_CANCELLED", i.EXTERNAL_WALLET_REQUESTED = "EXTERNAL_WALLET_REQUESTED", i.PIN_LOCKED = "PIN_LOCKED", i.HMAC_REQUIRED = "HMAC_REQUIRED", i.HMAC_VERIFICATION_FAILED = "HMAC_VERIFICATION_FAILED", i.WITHDRAW_FAILED = "WITHDRAW_FAILED", i.USER_NOT_FOUND = "USER_NOT_FOUND", i.RN_BRIDGE_NOT_AVAILABLE = "RN_BRIDGE_NOT_AVAILABLE", i.RN_BRIDGE_HANDSHAKE_FAILED = "RN_BRIDGE_HANDSHAKE_FAILED", i.RN_NATIVE_SESSION_EXPIRED = "RN_NATIVE_SESSION_EXPIRED", i.INVALID_CONFIG = "INVALID_CONFIG", i.UNKNOWN_ERROR = "UNKNOWN_ERROR", i))(d || {});
6
6
  class _ extends Error {
7
7
  constructor(e, r, t) {
@@ -16,23 +16,23 @@ class _ extends Error {
16
16
  };
17
17
  }
18
18
  }
19
- const Ot = 2e3, Je = 6e4, Lt = 1e3, Dt = 1e4, Mt = "0x77359400", Ze = "0x3B9ACA00", Qe = 130, We = 6, et = 18, tt = 3e4, $t = 5 * 60 * 1e3, Ft = 30 * 1e3, De = 100, Bt = "crossx-sdk-js/2.3.11", He = "ONEpocket";
19
+ const Dt = 2e3, Je = 6e4, Lt = 1e3, Mt = 1e4, $t = "0x77359400", Ze = "0x3B9ACA00", Qe = 130, We = 6, et = 18, tt = 3e4, Ft = 5 * 60 * 1e3, Bt = 30 * 1e3, Le = 100, Ut = "crossx-sdk-js/2.4.0-beta.1", He = "ONEpocket";
20
20
  var ge = /* @__PURE__ */ ((i) => (i.MetaMask = "io.metamask", i.Binance = "com.binance.wallet", i.CROSSx = "crossx", i))(ge || {});
21
- const Ut = {
21
+ const Wt = {
22
22
  "io.metamask": "MetaMask",
23
23
  "com.binance.wallet": "Binance Wallet",
24
24
  crossx: He
25
- }, Wt = [
25
+ }, Ht = [
26
26
  "crossx",
27
27
  "io.metamask",
28
28
  "com.binance.wallet"
29
29
  /* Binance */
30
30
  ];
31
- function Ht(i) {
32
- return Ut[i] ?? i;
33
- }
34
31
  function Gt(i) {
35
- return Array.isArray(i.connectOtherWallets) && i.connectOtherWallets.length > 0 ? [...i.connectOtherWallets] : i.showConnectOtherWallets === !0 ? [...Wt] : [];
32
+ return Wt[i] ?? i;
33
+ }
34
+ function Kt(i) {
35
+ return Array.isArray(i.connectOtherWallets) && i.connectOtherWallets.length > 0 ? [...i.connectOtherWallets] : i.showConnectOtherWallets === !0 ? [...Ht] : [];
36
36
  }
37
37
  const Ae = {
38
38
  // ─── CROSS ────────────────────────────────────────────
@@ -85,7 +85,7 @@ const Ae = {
85
85
  }
86
86
  }, Zs = Object.fromEntries(
87
87
  Object.entries(Ae).map(([i, e]) => [i, e.caipId])
88
- ), Kt = new Map(
88
+ ), zt = new Map(
89
89
  Object.values(Ae).map((i) => [i.caipId, i])
90
90
  );
91
91
  new Map(
@@ -94,9 +94,9 @@ new Map(
94
94
  const Vt = { symbol: "", decimals: 18 };
95
95
  function ke(i) {
96
96
  var e;
97
- return ((e = Kt.get(i)) == null ? void 0 : e.nativeCurrency) ?? Vt;
97
+ return ((e = zt.get(i)) == null ? void 0 : e.nativeCurrency) ?? Vt;
98
98
  }
99
- class zt {
99
+ class qt {
100
100
  constructor(e, r) {
101
101
  this.sdk = e, this.chainId = r, this._listeners = /* @__PURE__ */ new Map();
102
102
  }
@@ -216,7 +216,7 @@ const c = {
216
216
  return;
217
217
  }
218
218
  }
219
- }, qt = {
219
+ }, jt = {
220
220
  // ── 공통 버튼 ────────────────────────────────────────────────
221
221
  confirm: "확인",
222
222
  cancel: "취소",
@@ -459,14 +459,14 @@ For security, you must continue with the same account.`,
459
459
  session_alert_apple_account: "Apple account",
460
460
  session_alert_sign_out_button: "Sign out",
461
461
  session_alert_sign_in_again_button: "Sign in again"
462
- }, jt = {
463
- ko: qt,
462
+ }, Yt = {
463
+ ko: jt,
464
464
  en: ut
465
465
  };
466
466
  function Q(i = "en", e) {
467
- return jt[i] ?? ut;
467
+ return Yt[i] ?? ut;
468
468
  }
469
- function Yt(i) {
469
+ function Xt(i) {
470
470
  return i === "ko" || i === "en" ? i : typeof navigator < "u" && (navigator.language ?? "").toLowerCase().startsWith("ko") ? "ko" : "en";
471
471
  }
472
472
  const st = "crossx_access_token", it = "crossx_refresh_token", ot = "crossx_user_info", Ee = class Ee {
@@ -568,7 +568,7 @@ const st = "crossx_access_token", it = "crossx_refresh_token", ot = "crossx_user
568
568
  const s = e == null ? void 0 : e.provider;
569
569
  let o = "/login";
570
570
  s === "google" ? o = "/google" : s === "apple" && (o = "/apple");
571
- const { oauthServiceUrl: n, legacyOauthServiceUrl: a } = this.config, l = Yt(this.getLocale()), p = (g) => {
571
+ const { oauthServiceUrl: n, legacyOauthServiceUrl: a } = this.config, l = Xt(this.getLocale()), p = (g) => {
572
572
  const f = `${g}${o}`, m = f.includes("?") ? "&" : "?";
573
573
  return `${f}${m}locale=${l}`;
574
574
  }, h = p(n), u = a ? p(a) : void 0;
@@ -580,7 +580,7 @@ const st = "crossx_access_token", it = "crossx_refresh_token", ot = "crossx_user
580
580
  });
581
581
  r = x.token, t = x.email, c.log("[CROSSx] OAuth Firebase 토큰 받음 (length:", r.length, ")"), t && c.log("[CROSSx] OAuth 콜백 email:", t);
582
582
  } catch (s) {
583
- c.error("[CROSSx] SignIn 에러 (OAuth 단계):", s);
583
+ if (c.error("[CROSSx] SignIn 에러 (OAuth 단계):", s), s instanceof _) throw s;
584
584
  const o = s instanceof Error ? s.message : "Sign in failed";
585
585
  throw /팝업|popup/i.test(o) ? new _(
586
586
  d.OAUTH_POPUP_BLOCKED,
@@ -1057,7 +1057,7 @@ const st = "crossx_access_token", it = "crossx_refresh_token", ot = "crossx_user
1057
1057
  };
1058
1058
  Ee.REFRESH_RELOGIN_CODES = /* @__PURE__ */ new Set([1007, 1008]);
1059
1059
  let Me = Ee;
1060
- class Xt {
1060
+ class Jt {
1061
1061
  constructor(e, r, t) {
1062
1062
  this.config = e, this.storage = r, this.tokenStore = t;
1063
1063
  const s = e.projectId;
@@ -1067,7 +1067,7 @@ class Xt {
1067
1067
  this.tokenStore.clear(), this.config.authMode !== "cookie" && (await this.storage.remove(this.STORAGE_KEY_ACCESS_TOKEN), await this.storage.remove(this.STORAGE_KEY_REFRESH_TOKEN)), await this.storage.remove(this.STORAGE_KEY_USER), await this.storage.clear();
1068
1068
  }
1069
1069
  }
1070
- class Jt {
1070
+ class Zt {
1071
1071
  constructor(e, r) {
1072
1072
  this.storage = e, this.walletProvider = r;
1073
1073
  }
@@ -1125,7 +1125,7 @@ class xt {
1125
1125
  return this.encryptedBytes !== null;
1126
1126
  }
1127
1127
  }
1128
- class Zt {
1128
+ class Qt {
1129
1129
  constructor(e, r) {
1130
1130
  this.chainRegistry = e, this.transport = r, this._nextId = 1;
1131
1131
  }
@@ -1157,7 +1157,7 @@ class Zt {
1157
1157
  return a == null ? void 0 : a.result;
1158
1158
  }
1159
1159
  }
1160
- class Qt {
1160
+ class er {
1161
1161
  constructor() {
1162
1162
  this.listeners = /* @__PURE__ */ new Map();
1163
1163
  }
@@ -1180,7 +1180,7 @@ class Qt {
1180
1180
  this.listeners.clear();
1181
1181
  }
1182
1182
  }
1183
- function er() {
1183
+ function tr() {
1184
1184
  var e;
1185
1185
  if (typeof globalThis < "u" && ((e = globalThis.crypto) != null && e.getRandomValues)) {
1186
1186
  const r = new Uint8Array(16);
@@ -1250,7 +1250,7 @@ class j {
1250
1250
  async handshake() {
1251
1251
  if (!this.bridge)
1252
1252
  throw new _(d.AUTH_NOT_INITIALIZED, "Bridge not initialized");
1253
- const e = er(), r = Date.now(), t = {
1253
+ const e = tr(), r = Date.now(), t = {
1254
1254
  version: 1,
1255
1255
  appId: this.config.appId,
1256
1256
  appVersion: this.config.appVersion,
@@ -1441,7 +1441,7 @@ const pe = {
1441
1441
  contentsBaseUrl: "https://stg-contents.crosstoken.io/frontend/common/app-launcher"
1442
1442
  }
1443
1443
  };
1444
- function tr(i) {
1444
+ function rr(i) {
1445
1445
  const e = i.environment, r = e && e in pe ? pe[e] : null;
1446
1446
  if (!r)
1447
1447
  return null;
@@ -1456,7 +1456,7 @@ function tr(i) {
1456
1456
  function Ge() {
1457
1457
  try {
1458
1458
  if (typeof __CROSSX_CONFIG__ < "u") {
1459
- const i = typeof __CROSSX_CONFIG__ == "string" ? JSON.parse(__CROSSX_CONFIG__) : __CROSSX_CONFIG__, e = tr(i);
1459
+ const i = typeof __CROSSX_CONFIG__ == "string" ? JSON.parse(__CROSSX_CONFIG__) : __CROSSX_CONFIG__, e = rr(i);
1460
1460
  if (e) return e;
1461
1461
  }
1462
1462
  } catch {
@@ -1474,7 +1474,7 @@ function gt(i) {
1474
1474
  for (; e > 0 && i.charCodeAt(e - 1) === 48; ) e--;
1475
1475
  return i.slice(0, e);
1476
1476
  }
1477
- function rr(i, e = We) {
1477
+ function sr(i, e = We) {
1478
1478
  if (!i || i === "0x0" || i === "0x") return "0";
1479
1479
  try {
1480
1480
  const r = BigInt(i);
@@ -1496,7 +1496,7 @@ function ye(i, e, r, t = We) {
1496
1496
  return;
1497
1497
  }
1498
1498
  }
1499
- function sr(i) {
1499
+ function ir(i) {
1500
1500
  const e = i.startsWith("0x") ? i.slice(2) : i;
1501
1501
  if (!/^[0-9a-fA-F]+$/.test(e))
1502
1502
  throw new _(
@@ -1509,7 +1509,7 @@ function sr(i) {
1509
1509
  `서명 길이가 유효하지 않습니다: ${Qe} hex 문자(65 바이트) 예상, 현재 ${e.length}`
1510
1510
  );
1511
1511
  }
1512
- function ir(i) {
1512
+ function or(i) {
1513
1513
  const e = i.startsWith("0x") ? i.slice(2) : i;
1514
1514
  if (!/^[0-9a-fA-F]+$/.test(e))
1515
1515
  throw new _(
@@ -1522,8 +1522,8 @@ function ir(i) {
1522
1522
  "유효하지 않은 서명된 트랜잭션: 너무 짧습니다"
1523
1523
  );
1524
1524
  }
1525
- function or(i, e) {
1526
- const r = nr(e);
1525
+ function nr(i, e) {
1526
+ const r = ar(e);
1527
1527
  if (i === "0") {
1528
1528
  if (r !== void 0 && r !== 0)
1529
1529
  throw new _(
@@ -1547,7 +1547,7 @@ function or(i, e) {
1547
1547
  );
1548
1548
  }
1549
1549
  }
1550
- function nr(i) {
1550
+ function ar(i) {
1551
1551
  if (i == null || typeof i != "object") return;
1552
1552
  const e = i.domain;
1553
1553
  if (e == null || typeof e != "object") return;
@@ -1711,7 +1711,7 @@ class de {
1711
1711
  return { ok: !1, error: s, ...o };
1712
1712
  }
1713
1713
  }
1714
- class ar {
1714
+ class cr {
1715
1715
  constructor(e) {
1716
1716
  this.deps = e;
1717
1717
  }
@@ -1732,10 +1732,10 @@ class ar {
1732
1732
  });
1733
1733
  }
1734
1734
  }
1735
- function cr(i) {
1735
+ function lr(i) {
1736
1736
  return i === "google" || i === "apple";
1737
1737
  }
1738
- class lr {
1738
+ class dr {
1739
1739
  constructor(e) {
1740
1740
  this.deps = e;
1741
1741
  }
@@ -1746,7 +1746,7 @@ class lr {
1746
1746
  this.deps.setRecoveringSession(!0);
1747
1747
  try {
1748
1748
  this.deps.setAuthenticated(!1), this.deps.clearTokenStore();
1749
- const s = cr(e.loginType) ? { provider: e.loginType } : void 0;
1749
+ const s = lr(e.loginType) ? { provider: e.loginType } : void 0;
1750
1750
  let o;
1751
1751
  try {
1752
1752
  o = await this.deps.executeSignIn(s);
@@ -1826,7 +1826,7 @@ class lr {
1826
1826
  }
1827
1827
  }
1828
1828
  }
1829
- class dr {
1829
+ class pr {
1830
1830
  constructor(e) {
1831
1831
  this.deps = e;
1832
1832
  }
@@ -1873,7 +1873,7 @@ class dr {
1873
1873
  c.log("[CROSSx] 세션 복원 후 지갑 주소 로드 완료:", a.address), this.deps.setActiveWallet(a.address, 0);
1874
1874
  }
1875
1875
  }
1876
- class pr {
1876
+ class hr {
1877
1877
  constructor(e) {
1878
1878
  this.deps = e;
1879
1879
  }
@@ -2030,7 +2030,7 @@ class pr {
2030
2030
  }
2031
2031
  }
2032
2032
  }
2033
- class hr {
2033
+ class _r {
2034
2034
  constructor(e) {
2035
2035
  this.deps = e;
2036
2036
  }
@@ -2066,12 +2066,12 @@ class hr {
2066
2066
  "maxPriorityFeePerGas: 1 Gwei"
2067
2067
  );
2068
2068
  } else
2069
- l.gasPrice = Mt, c.log("[CROSSx] Legacy 체인 감지 — gasPrice: 2 Gwei");
2069
+ l.gasPrice = $t, c.log("[CROSSx] Legacy 체인 감지 — gasPrice: 2 Gwei");
2070
2070
  }
2071
2071
  return !n && a && (l.maxPriorityFeePerGas = Ze, c.log("[CROSSx] maxPriorityFeePerGas 비어있음 → 1 Gwei 기본값 적용")), l;
2072
2072
  }
2073
2073
  }
2074
- class _r {
2074
+ class ur {
2075
2075
  constructor(e) {
2076
2076
  this.crypto = e;
2077
2077
  }
@@ -2097,10 +2097,10 @@ class _r {
2097
2097
  }
2098
2098
  }
2099
2099
  }
2100
- function ur(i) {
2100
+ function xr(i) {
2101
2101
  return i ? i.includes("google") ? "google" : i.includes("apple") ? "apple" : i : null;
2102
2102
  }
2103
- class xr {
2103
+ class gr {
2104
2104
  constructor(e) {
2105
2105
  this.deps = e;
2106
2106
  }
@@ -2122,7 +2122,7 @@ class xr {
2122
2122
  activeWalletIndex: 0,
2123
2123
  userEmail: ((o = e.user) == null ? void 0 : o.email) ?? null,
2124
2124
  providerSub: ((n = e.user) == null ? void 0 : n.providerSub) ?? null,
2125
- loginType: ur(
2125
+ loginType: xr(
2126
2126
  (a = e.user) == null ? void 0 : a.signInProvider
2127
2127
  ),
2128
2128
  tokenSignatureVerified: e.tokenSignatureVerified ?? !1
@@ -2152,7 +2152,7 @@ class xr {
2152
2152
  });
2153
2153
  }
2154
2154
  }
2155
- class gr {
2155
+ class fr {
2156
2156
  constructor(e) {
2157
2157
  this.deps = e;
2158
2158
  }
@@ -2171,7 +2171,7 @@ class gr {
2171
2171
  )).address, index: e };
2172
2172
  }
2173
2173
  }
2174
- class fr {
2174
+ class wr {
2175
2175
  constructor(e) {
2176
2176
  this.deps = e;
2177
2177
  }
@@ -2190,7 +2190,7 @@ class fr {
2190
2190
  );
2191
2191
  }
2192
2192
  }
2193
- class wr {
2193
+ class mr {
2194
2194
  constructor(e) {
2195
2195
  this.deps = e;
2196
2196
  }
@@ -2254,7 +2254,7 @@ function nt(i, e) {
2254
2254
  const r = i.replace(/\/$/, ""), t = e.startsWith("/") ? e : `/${e}`;
2255
2255
  return `${r}/cross-auth${t}`;
2256
2256
  }
2257
- class mr {
2257
+ class yr {
2258
2258
  constructor(e) {
2259
2259
  this.deps = e;
2260
2260
  }
@@ -2402,10 +2402,10 @@ function Te(i, e = "Apple account") {
2402
2402
  const t = i.substring(0, r), s = i.substring(r);
2403
2403
  return t.length <= 1 ? `${t}${"*".repeat(Math.max(t.length, 1))}${s}` : `${t[0]}${"*".repeat(t.length - 1)}${s}`;
2404
2404
  }
2405
- const ce = class ce extends Qt {
2405
+ const ce = class ce extends er {
2406
2406
  constructor(e, r, t, s, o, n, a, l, p, h, u) {
2407
2407
  var x, g;
2408
- super(), this.storage = t, this.crypto = s, this.transport = o, this.oauth = n, this.walletProvider = a, this.tokenStore = l, this.initialized = !1, this._initPromise = null, this.authenticated = !1, this.userId = null, this.address = null, this.activeWalletIndex = 0, this.userEmail = null, this.loginType = null, this.providerSub = null, this.tokenSignatureVerified = !1, this._themeMediaCleanup = null, this._isRecoveringSession = !1, this._rnBridgeService = null, this._providers = /* @__PURE__ */ new Map(), this._isAuthenticatedViaRNBridge = !1, this._bridgeSessionRestorePromise = null, this._config = Object.freeze({ ...e }), this.internalConfig = e, this.adapterConfig = r, e.logger && rt(e.logger), this.confirmation = p, this.pinStore = u ?? new xt(), this.stateManager = new xr({
2408
+ super(), this.storage = t, this.crypto = s, this.transport = o, this.oauth = n, this.walletProvider = a, this.tokenStore = l, this.initialized = !1, this._initPromise = null, this.authenticated = !1, this.userId = null, this.address = null, this.activeWalletIndex = 0, this.userEmail = null, this.loginType = null, this.providerSub = null, this.tokenSignatureVerified = !1, this._themeMediaCleanup = null, this._isRecoveringSession = !1, this._rnBridgeService = null, this._providers = /* @__PURE__ */ new Map(), this._isAuthenticatedViaRNBridge = !1, this._bridgeSessionRestorePromise = null, this._config = Object.freeze({ ...e }), this.internalConfig = e, this.adapterConfig = r, e.logger && rt(e.logger), this.confirmation = p, this.pinStore = u ?? new xt(), this.stateManager = new gr({
2409
2409
  setState: (f) => {
2410
2410
  f.authenticated !== void 0 && (this.authenticated = f.authenticated), f.userId !== void 0 && (this.userId = f.userId), f.address !== void 0 && (this.address = f.address), f.activeWalletIndex !== void 0 && (this.activeWalletIndex = f.activeWalletIndex), f.userEmail !== void 0 && (this.userEmail = f.userEmail), f.providerSub !== void 0 && (this.providerSub = f.providerSub), f.loginType !== void 0 && (this.loginType = f.loginType), f.tokenSignatureVerified !== void 0 && (this.tokenSignatureVerified = f.tokenSignatureVerified);
2411
2411
  },
@@ -2438,19 +2438,19 @@ const ce = class ce extends Qt {
2438
2438
  // dApp 이 sdk.pinOrchestrator.ensureVerifiedPin() 을 직접 호출해도 (SigningOrchestrator 우회)
2439
2439
  // WebView 안에서 embedded PIN 프롬프트가 뜨지 않도록 게이팅. SigningOrchestrator 와 동일 신호.
2440
2440
  isRNBridgeMode: () => this._isAuthenticatedViaRNBridge
2441
- }), this.signingOrchestrator = new ar({
2441
+ }), this.signingOrchestrator = new cr({
2442
2442
  confirmation: this.confirmation,
2443
2443
  walletProvider: this.walletProvider,
2444
2444
  pinOrchestrator: this.pinOrchestrator,
2445
2445
  // §12 native sign delegation: 이 SDK 세션이 RN bridge 자동 로그인으로 인증된 경우만 활성.
2446
2446
  // 자동 로그인 거부 / OAuth 로 별도 로그인한 세션에서는 native SDK 가 미인증이라 우회한다.
2447
2447
  isRNBridgeMode: () => this._isAuthenticatedViaRNBridge
2448
- }), this.walletLifecycleService = new dr({
2448
+ }), this.walletLifecycleService = new pr({
2449
2449
  walletProvider: this.walletProvider,
2450
2450
  pinOrchestrator: this.pinOrchestrator,
2451
2451
  getUserId: () => this.userId,
2452
2452
  setActiveWallet: (f, m, y) => this.setActiveWallet(f, m, y)
2453
- }), this.migrationOrchestrator = new pr({
2453
+ }), this.migrationOrchestrator = new hr({
2454
2454
  confirmation: this.confirmation,
2455
2455
  walletProvider: this.walletProvider,
2456
2456
  pinOrchestrator: this.pinOrchestrator,
@@ -2464,21 +2464,21 @@ const ce = class ce extends Qt {
2464
2464
  var f;
2465
2465
  return ((f = this._config.migration) == null ? void 0 : f.allowSkip) ?? !0;
2466
2466
  }
2467
- }), this.transactionLifecycleService = new hr({
2467
+ }), this.transactionLifecycleService = new _r({
2468
2468
  getActiveAddress: () => this.address,
2469
2469
  estimateGas: (f, m) => this.estimateGas(f, m),
2470
2470
  getBaseFeePerGas: (f) => this.getBaseFeePerGas(f),
2471
2471
  jsonRpcCall: (f, m, y) => this.jsonRpc.call(f, m, y)
2472
- }), this.signatureVerifier = new _r(this.crypto), this.addressResolverService = new gr({
2472
+ }), this.signatureVerifier = new ur(this.crypto), this.addressResolverService = new fr({
2473
2473
  walletProvider: this.walletProvider,
2474
2474
  pinOrchestrator: this.pinOrchestrator,
2475
2475
  getActiveAddress: () => this.address,
2476
2476
  getActiveWalletIndex: () => this.activeWalletIndex,
2477
2477
  getUserId: () => this.userId
2478
- }), this.authGuardService = new fr({
2478
+ }), this.authGuardService = new wr({
2479
2479
  isInitialized: () => this.initialized,
2480
2480
  isAuthenticated: () => this.authenticated
2481
- }), this.walletCreationService = new wr({
2481
+ }), this.walletCreationService = new mr({
2482
2482
  walletProvider: this.walletProvider,
2483
2483
  pinOrchestrator: this.pinOrchestrator,
2484
2484
  migrationOrchestrator: this.migrationOrchestrator,
@@ -2490,10 +2490,10 @@ const ce = class ce extends Qt {
2490
2490
  var f, m;
2491
2491
  return ((m = (f = this.confirmation).showWalletCreatedPrompt) == null ? void 0 : m.call(f)) ?? Promise.resolve();
2492
2492
  }
2493
- }), this.tokenHistoryService = new mr({
2493
+ }), this.tokenHistoryService = new yr({
2494
2494
  transport: o,
2495
2495
  getApiBaseUrl: () => this.internalConfig.authApiUrl
2496
- }), this.sessionOrchestrator = new lr({
2496
+ }), this.sessionOrchestrator = new dr({
2497
2497
  ensureInitialized: () => this.ensureInitialized(),
2498
2498
  getSessionSnapshot: () => ({
2499
2499
  providerSub: this.providerSub,
@@ -2516,7 +2516,7 @@ const ce = class ce extends Qt {
2516
2516
  loadWalletAfterAuth: () => this.walletLifecycleService.loadWalletAfterAuth(),
2517
2517
  getLocale: () => this._config.locale,
2518
2518
  maskEmail: Te
2519
- }), this.chainRegistry = h, this.jsonRpc = new Zt(h, o), this.signInUseCase = new Me(
2519
+ }), this.chainRegistry = h, this.jsonRpc = new Qt(h, o), this.signInUseCase = new Me(
2520
2520
  this.internalConfig,
2521
2521
  t,
2522
2522
  s,
@@ -2526,7 +2526,7 @@ const ce = class ce extends Qt {
2526
2526
  l,
2527
2527
  void 0,
2528
2528
  () => this._config.locale
2529
- ), this.signOutUseCase = new Xt(this.internalConfig, t, l), this.migrateWalletUseCase = new Jt(t, a), (x = a.setOnUnauthorized) == null || x.call(a, () => this.forceLogout()), (g = a.setTokenRefresher) == null || g.call(
2529
+ ), this.signOutUseCase = new Jt(this.internalConfig, t, l), this.migrateWalletUseCase = new Zt(t, a), (x = a.setOnUnauthorized) == null || x.call(a, () => this.forceLogout()), (g = a.setTokenRefresher) == null || g.call(
2530
2530
  a,
2531
2531
  () => this.signInUseCase.refreshAccessToken()
2532
2532
  ), e.autoDetectTheme && this._setupAutoDetectTheme();
@@ -2568,7 +2568,7 @@ const ce = class ce extends Qt {
2568
2568
  }
2569
2569
  async _doInitialize(e) {
2570
2570
  var r, t;
2571
- c.log("[CROSSx SDK] v2.3.11 초기화 중..."), this.confirmation.setMessages(Q(this._config.locale));
2571
+ c.log("[CROSSx SDK] v2.4.0-beta.1 초기화 중..."), this.confirmation.setMessages(Q(this._config.locale));
2572
2572
  try {
2573
2573
  const s = Ge();
2574
2574
  this.internalConfig.oauthServiceUrl = s.oauthServiceUrl, this.internalConfig.legacyOauthServiceUrl = s.legacyOauthServiceUrl, 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`);
@@ -2604,7 +2604,7 @@ const ce = class ce extends Qt {
2604
2604
  throw u;
2605
2605
  }
2606
2606
  }
2607
- return this.initialized = !0, c.info("[CROSSx SDK] v2.3.11 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
2607
+ return this.initialized = !0, c.info("[CROSSx SDK] v2.4.0-beta.1 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
2608
2608
  } catch (s) {
2609
2609
  throw new _(d.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", s);
2610
2610
  }
@@ -2624,7 +2624,7 @@ const ce = class ce extends Qt {
2624
2624
  c.log("[CROSSx] RN Bridge 감지 — Handshake 시도"), c.info("[CROSSx][RNBridge trace] Bootstrap config", {
2625
2625
  appId: this._config.projectId,
2626
2626
  appVersion: "1.0.0",
2627
- sdkVersion: "2.3.11",
2627
+ sdkVersion: "2.4.0-beta.1",
2628
2628
  keyId: "key-id-1",
2629
2629
  userIdHash: "user-hash-placeholder",
2630
2630
  projectId: this._config.projectId
@@ -2632,7 +2632,7 @@ const ce = class ce extends Qt {
2632
2632
  const e = new j({
2633
2633
  appId: this._config.projectId,
2634
2634
  appVersion: "1.0.0",
2635
- sdkVersion: "2.3.11",
2635
+ sdkVersion: "2.4.0-beta.1",
2636
2636
  keyId: "key-id-1",
2637
2637
  userIdHash: "user-hash-placeholder",
2638
2638
  projectId: this._config.projectId
@@ -2664,13 +2664,37 @@ const ce = class ce extends Qt {
2664
2664
  * 거부 시 bridge 비활성화 후 null 반환 → signIn() 이 OAuth fallback 진행.
2665
2665
  */
2666
2666
  /**
2667
- * `null` — 사용자가 명시적으로 거부(USER_REJECTED). OAuth fallback 진행.
2667
+ * `null` — 사용자 명시적 거부(USER_REJECTED), 세션 만료(SESSION_EXPIRED),
2668
+ * 또는 재핸드셰이크 실패. OAuth fallback 진행.
2668
2669
  * `false` — 타임아웃 등 사용자 결정 없이 실패. OAuth fallback 차단.
2669
2670
  * `AuthResult` — bridge 로그인 성공.
2670
2671
  */
2671
2672
  async _tryBridgeSignIn() {
2672
2673
  var e;
2673
2674
  if (!this._rnBridgeService) return null;
2675
+ if (!this._rnBridgeService.isActive()) {
2676
+ const r = this._rnBridgeService.getContext(), t = Date.now();
2677
+ c.info("[CROSSx] Bridge 세션 만료 감지 — 재핸드셰이크 시도", {
2678
+ elapsedSinceActivatedMs: r ? t - r.activatedAt : "(context 없음)",
2679
+ idleMs: r ? t - r.lastActivityAt : "(context 없음)",
2680
+ absoluteTtlMs: (r == null ? void 0 : r.absoluteTtlMs) ?? "(context 없음)",
2681
+ idleTtlMs: (r == null ? void 0 : r.idleTtlMs) ?? "(context 없음)",
2682
+ absoluteExpired: r ? t - r.activatedAt > r.absoluteTtlMs : "(context 없음)",
2683
+ idleExpired: r ? t - r.lastActivityAt > r.idleTtlMs : "(context 없음)"
2684
+ });
2685
+ try {
2686
+ const s = Date.now(), o = await this._rnBridgeService.initialize();
2687
+ this._rnBridgeWalletAddress = o.walletAddress, this._rnBridgeWalletName = o.walletName, this._rnBridgeWalletProvider = o.walletProvider, c.info("[CROSSx] Bridge 재핸드셰이크 성공 — bridge 로그인 계속 진행", {
2688
+ tookMs: Date.now() - s,
2689
+ walletAddress: o.walletAddress ?? "(없음)",
2690
+ walletName: o.walletName ?? "(없음)",
2691
+ absoluteTtlMs: o.absoluteTtlMs,
2692
+ idleTtlMs: o.idleTtlMs
2693
+ });
2694
+ } catch (s) {
2695
+ return c.warn("[CROSSx] Bridge 재핸드셰이크 실패 — bridge 비활성화 후 OAuth fallback", s), this._rnBridgeService = null, null;
2696
+ }
2697
+ }
2674
2698
  try {
2675
2699
  const r = await this._rnBridgeService.requestFirebaseIdToken();
2676
2700
  c.log("[CROSSx] Bridge 로그인 — Firebase token 수신");
@@ -2681,7 +2705,7 @@ const ce = class ce extends Qt {
2681
2705
  this._rnBridgeWalletName
2682
2706
  ), c.log("[CROSSx] Bridge 로그인 성공", { userId: (e = t.user) == null ? void 0 : e.id }), t) : null;
2683
2707
  } catch (r) {
2684
- return r instanceof _ && r.code === d.USER_REJECTED ? (c.log("[CROSSx] Bridge 로그인 거부 — OAuth fallback 진행 (bridge 유지)"), null) : (c.warn("[CROSSx] Bridge 로그인 타임아웃/실패", r), !1);
2708
+ return r instanceof _ && r.code === d.USER_REJECTED ? (c.log("[CROSSx] Bridge 로그인 거부 — OAuth fallback 진행 (bridge 유지)"), null) : r instanceof _ && r.code === d.SESSION_EXPIRED ? (c.warn("[CROSSx] Bridge 세션 만료 — OAuth fallback 진행"), null) : (c.warn("[CROSSx] Bridge 로그인 타임아웃/실패", r), !1);
2685
2709
  }
2686
2710
  }
2687
2711
  /**
@@ -2751,7 +2775,7 @@ const ce = class ce extends Qt {
2751
2775
  let t = e;
2752
2776
  if (!(e != null && e.provider)) {
2753
2777
  const s = await this.confirmation.showLoginSelector({
2754
- connectOtherWallets: Gt(this._config)
2778
+ connectOtherWallets: Kt(this._config)
2755
2779
  });
2756
2780
  if (s === null)
2757
2781
  return { success: !1, error: "User cancelled login" };
@@ -3349,7 +3373,7 @@ const ce = class ce extends Qt {
3349
3373
  throw new _(d.AUTH_NOT_AUTHENTICATED, "사용자 ID를 찾을 수 없습니다");
3350
3374
  if (!this.walletProvider.signTypedData)
3351
3375
  throw new _(d.NOT_IMPLEMENTED, "signTypedData가 구현되어 있지 않습니다");
3352
- or(e, r);
3376
+ nr(e, r);
3353
3377
  const s = await this.resolveAddress(t == null ? void 0 : t.index);
3354
3378
  try {
3355
3379
  const o = await this.signingOrchestrator.confirmAndExecuteWithPreparedPin({
@@ -3373,7 +3397,7 @@ const ce = class ce extends Qt {
3373
3397
  s.address
3374
3398
  )
3375
3399
  });
3376
- return sr(o.signature), {
3400
+ return ir(o.signature), {
3377
3401
  chainId: e,
3378
3402
  signature: o.signature,
3379
3403
  address: s.address
@@ -3451,7 +3475,7 @@ const ce = class ce extends Qt {
3451
3475
  a
3452
3476
  )
3453
3477
  });
3454
- return ir(n.signature), {
3478
+ return or(n.signature), {
3455
3479
  chainId: e,
3456
3480
  signedTx: n.signature,
3457
3481
  txHash: n.txHash ?? ""
@@ -3520,7 +3544,7 @@ const ce = class ce extends Qt {
3520
3544
  return u.txHash ?? u.signature;
3521
3545
  }
3522
3546
  }), a = (r.data ?? "").toLowerCase().replace(/^0x/, ""), l = a === "" || a === "00000000", p = a.startsWith("a9059cbb");
3523
- return (l || p) && this.tokenHistoryService.registerHistoryFireAndForget(e, n, Bt).catch(
3547
+ return (l || p) && this.tokenHistoryService.registerHistoryFireAndForget(e, n, Ut).catch(
3524
3548
  (h) => c.log("[TokenHistory] register failed (non-critical):", h)
3525
3549
  ), { chainId: e, txHash: n, status: "pending" };
3526
3550
  } catch (n) {
@@ -3552,7 +3576,7 @@ const ce = class ce extends Qt {
3552
3576
  * @param opts.timeoutMs 최대 대기 시간 (기본 60000ms)
3553
3577
  */
3554
3578
  async waitForTxAndGetReceipt(e, r, t = {}) {
3555
- const s = t.intervalMs ?? Lt, o = Dt, n = t.timeoutMs ?? Je, a = Date.now() + n;
3579
+ const s = t.intervalMs ?? Lt, o = Mt, n = t.timeoutMs ?? Je, a = Date.now() + n;
3556
3580
  let l = s;
3557
3581
  for (; Date.now() < a; ) {
3558
3582
  const p = await this.getTransactionReceipt(e, r);
@@ -3586,7 +3610,7 @@ const ce = class ce extends Qt {
3586
3610
  if (S != null && S.sendTransactionWithWaitForReceipt)
3587
3611
  return this.bridgeSendTransactionWithWaitForReceipt(S, e, r, t);
3588
3612
  }
3589
- const { intervalMs: s, timeoutMs: o, ...n } = t, { txHash: a } = await this.sendTransaction(e, r, n), l = s ?? ((m = this._config.receiptPolling) == null ? void 0 : m.intervalMs) ?? Ot, p = o ?? ((y = this._config.receiptPolling) == null ? void 0 : y.timeoutMs) ?? Je, h = ke(e), u = r.from ?? "";
3613
+ const { intervalMs: s, timeoutMs: o, ...n } = t, { txHash: a } = await this.sendTransaction(e, r, n), l = s ?? ((m = this._config.receiptPolling) == null ? void 0 : m.intervalMs) ?? Dt, p = o ?? ((y = this._config.receiptPolling) == null ? void 0 : y.timeoutMs) ?? Je, h = ke(e), u = r.from ?? "";
3590
3614
  let x, g;
3591
3615
  const f = this.waitForTxAndGetReceipt(a, e, { intervalMs: l, timeoutMs: p }).then((S) => {
3592
3616
  x = S;
@@ -3841,7 +3865,7 @@ const ce = class ce extends Qt {
3841
3865
  return { wei: "0x0", formatted: "0", chainId: e };
3842
3866
  try {
3843
3867
  const s = await this.jsonRpc.call("eth_getBalance", [r, "latest"], e) ?? "0x0";
3844
- return { wei: s, formatted: rr(s, this._config.displayDecimals), chainId: e };
3868
+ return { wei: s, formatted: sr(s, this._config.displayDecimals), chainId: e };
3845
3869
  } catch (t) {
3846
3870
  if (t instanceof _) throw t;
3847
3871
  const s = t instanceof Error ? t.message : String(t);
@@ -3869,7 +3893,7 @@ const ce = class ce extends Qt {
3869
3893
  getProvider(e) {
3870
3894
  this.ensureAuthenticated();
3871
3895
  let r = this._providers.get(e);
3872
- return r || (r = new zt(this, e), this._providers.set(e, r)), r;
3896
+ return r || (r = new qt(this, e), this._providers.set(e, r)), r;
3873
3897
  }
3874
3898
  /**
3875
3899
  * EIP-1193 `accountsChanged` 이벤트를 모든 활성 provider 인스턴스에 dispatch 한다.
@@ -4112,7 +4136,7 @@ const ce = class ce extends Qt {
4112
4136
  };
4113
4137
  ce.WALLET_PREF_KEY = "wallet_preference", ce.OFFCHAIN_CHAIN_ID = "0";
4114
4138
  let $e = ce;
4115
- class yr {
4139
+ class br {
4116
4140
  constructor() {
4117
4141
  this.prefix = "crossx_";
4118
4142
  }
@@ -4149,7 +4173,7 @@ class yr {
4149
4173
  }
4150
4174
  }
4151
4175
  }
4152
- const Re = "crossx-sdk", br = 1, q = "data", ie = "keys", be = "aes-primary", vr = 12;
4176
+ const Re = "crossx-sdk", vr = 1, q = "data", ie = "keys", be = "aes-primary", Sr = 12;
4153
4177
  class at {
4154
4178
  constructor(e) {
4155
4179
  this.db = null, this.cryptoKey = null, this.initPromise = null, this.dbName = `crossx-sdk-${e}`;
@@ -4159,7 +4183,7 @@ class at {
4159
4183
  }
4160
4184
  openDB(e = this.dbName) {
4161
4185
  return new Promise((r, t) => {
4162
- const s = indexedDB.open(e, br);
4186
+ const s = indexedDB.open(e, vr);
4163
4187
  s.onupgradeneeded = () => {
4164
4188
  const o = s.result;
4165
4189
  o.objectStoreNames.contains(q) || o.createObjectStore(q), o.objectStoreNames.contains(ie) || o.createObjectStore(ie);
@@ -4237,7 +4261,7 @@ class at {
4237
4261
  }
4238
4262
  }
4239
4263
  async encrypt(e) {
4240
- const r = new Uint8Array(vr);
4264
+ const r = new Uint8Array(Sr);
4241
4265
  crypto.getRandomValues(r);
4242
4266
  const t = new TextEncoder().encode(e), s = await crypto.subtle.encrypt(
4243
4267
  { name: "AES-GCM", iv: r },
@@ -4295,14 +4319,14 @@ class at {
4295
4319
  return typeof indexedDB < "u" && typeof crypto < "u" && typeof crypto.subtle < "u";
4296
4320
  }
4297
4321
  }
4298
- const Sr = 60;
4299
- class Er {
4322
+ const Er = 60;
4323
+ class Ar {
4300
4324
  constructor() {
4301
4325
  this.jwks = null;
4302
4326
  }
4303
4327
  setJWKSEndpoint(e) {
4304
4328
  try {
4305
- this.jwks = Tt(new URL(e)), c.log("[CROSSx] JWKS 엔드포인트 설정:", e);
4329
+ this.jwks = Rt(new URL(e)), c.log("[CROSSx] JWKS 엔드포인트 설정:", e);
4306
4330
  } catch (r) {
4307
4331
  c.warn("[CROSSx] JWKS 엔드포인트 URL 파싱 실패:", r);
4308
4332
  }
@@ -4316,7 +4340,7 @@ class Er {
4316
4340
  iat: t.iat
4317
4341
  });
4318
4342
  const s = Math.floor(Date.now() / 1e3);
4319
- if (t.exp && t.exp + Sr < s)
4343
+ if (t.exp && t.exp + Er < s)
4320
4344
  return c.warn("[CROSSx] 토큰 만료:", {
4321
4345
  exp: t.exp,
4322
4346
  now: s,
@@ -4326,7 +4350,7 @@ class Er {
4326
4350
  return c.warn("[CROSSx] JWT에 sub(사용자ID) 없음"), { payload: t, valid: !1, signatureVerified: !1 };
4327
4351
  if (this.jwks)
4328
4352
  try {
4329
- const { payload: o } = await Rt(e, this.jwks, {
4353
+ const { payload: o } = await Ct(e, this.jwks, {
4330
4354
  algorithms: ["RS256", "ES256"]
4331
4355
  });
4332
4356
  return c.log("[CROSSx] JWT 서명 검증 성공"), {
@@ -4345,7 +4369,7 @@ class Er {
4345
4369
  }
4346
4370
  }
4347
4371
  decodeJWT(e) {
4348
- return Ct(e);
4372
+ return Pt(e);
4349
4373
  }
4350
4374
  /**
4351
4375
  * EIP-191 personal_sign 서명에서 서명자 Ethereum 주소를 복원합니다.
@@ -4363,14 +4387,14 @@ ${t.length}`
4363
4387
  const n = Xe(o), a = r.startsWith("0x") ? r.slice(2) : r;
4364
4388
  if (a.length !== 130)
4365
4389
  throw new Error(`서명 길이가 유효하지 않습니다: 130 hex 문자 예상, 현재 ${a.length}`);
4366
- const l = Ar(a), p = l.slice(0, 32), h = l.slice(32, 64), u = l[64], x = u >= 27 ? u - 27 : u, m = new Pt.Signature(
4390
+ const l = Ir(a), p = l.slice(0, 32), h = l.slice(32, 64), u = l[64], x = u >= 27 ? u - 27 : u, m = new Nt.Signature(
4367
4391
  ct(p),
4368
4392
  ct(h)
4369
4393
  ).addRecoveryBit(x).recoverPublicKey(n).toBytes(!1).slice(1), y = Xe(m);
4370
- return "0x" + Nt(y.slice(12));
4394
+ return "0x" + Ot(y.slice(12));
4371
4395
  }
4372
4396
  }
4373
- function Ar(i) {
4397
+ function Ir(i) {
4374
4398
  const e = new Uint8Array(i.length / 2);
4375
4399
  for (let r = 0; r < e.length; r++)
4376
4400
  e[r] = parseInt(i.substring(r * 2, r * 2 + 2), 16);
@@ -4381,8 +4405,8 @@ function ct(i) {
4381
4405
  for (const r of i) e += r.toString(16).padStart(2, "0");
4382
4406
  return BigInt(e);
4383
4407
  }
4384
- const Ir = 3e4, kr = 1e3;
4385
- class Tr {
4408
+ const kr = 3e4, Tr = 1e3;
4409
+ class Rr {
4386
4410
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4387
4411
  async request(e) {
4388
4412
  const r = e.retries ?? 0;
@@ -4393,7 +4417,7 @@ class Tr {
4393
4417
  } catch (s) {
4394
4418
  if (t === r) throw s;
4395
4419
  }
4396
- await new Promise((s) => setTimeout(s, kr * 2 ** t));
4420
+ await new Promise((s) => setTimeout(s, Tr * 2 ** t));
4397
4421
  }
4398
4422
  throw new Error("Unexpected: retry loop exited without result");
4399
4423
  }
@@ -4401,7 +4425,7 @@ class Tr {
4401
4425
  async _doRequest(e) {
4402
4426
  const r = new AbortController(), t = setTimeout(
4403
4427
  () => r.abort(),
4404
- e.timeoutMs ?? Ir
4428
+ e.timeoutMs ?? kr
4405
4429
  );
4406
4430
  try {
4407
4431
  const s = await fetch(e.url, {
@@ -4428,7 +4452,7 @@ class Tr {
4428
4452
  }
4429
4453
  }
4430
4454
  }
4431
- const Rr = [
4455
+ const Cr = [
4432
4456
  /CROSSx\/([\d.]+)/i,
4433
4457
  /ONE\s?wallet[^\s/]*\/([\d.]+)/i,
4434
4458
  /ONE\s?pocket[^\s/]*\/([\d.]+)/i
@@ -4436,18 +4460,18 @@ const Rr = [
4436
4460
  function Ke() {
4437
4461
  return typeof window > "u" ? void 0 : window;
4438
4462
  }
4439
- function Cr() {
4463
+ function Pr() {
4440
4464
  const i = Ke();
4441
4465
  return i == null ? void 0 : i.__crossx;
4442
4466
  }
4443
- function Pr(i) {
4467
+ function Nr(i) {
4444
4468
  return i === "ios" || i === "android" ? i : null;
4445
4469
  }
4446
4470
  function Ce() {
4447
4471
  const i = typeof navigator > "u" ? "" : navigator.userAgent;
4448
4472
  return /Android/i.test(i) ? "android" : /iPhone|iPad|iPod|Macintosh/i.test(i) ? "ios" : null;
4449
4473
  }
4450
- function Nr(i, e) {
4474
+ function Or(i, e) {
4451
4475
  const r = (n) => n.split(/[^\d]+/).filter((a) => a !== "").map((a) => Number.parseInt(a, 10)), t = r(i), s = r(e), o = Math.max(t.length, s.length);
4452
4476
  for (let n = 0; n < o; n += 1) {
4453
4477
  const a = (t[n] ?? 0) - (s[n] ?? 0);
@@ -4455,7 +4479,7 @@ function Nr(i, e) {
4455
4479
  }
4456
4480
  return 0;
4457
4481
  }
4458
- function Or() {
4482
+ function Dr() {
4459
4483
  const i = Ke();
4460
4484
  if (!i) return !1;
4461
4485
  const e = i.__crossxRNBridge;
@@ -4463,20 +4487,20 @@ function Or() {
4463
4487
  }
4464
4488
  function lt() {
4465
4489
  const i = typeof navigator > "u" ? "" : navigator.userAgent;
4466
- for (const e of Rr) {
4490
+ for (const e of Cr) {
4467
4491
  const r = e.exec(i);
4468
4492
  if (r) return r[1] ?? null;
4469
4493
  }
4470
4494
  }
4471
4495
  function ve() {
4472
- const i = Cr();
4496
+ const i = Pr();
4473
4497
  if (i != null && i.browser)
4474
4498
  return {
4475
4499
  version: i.version ?? null,
4476
- platform: Pr(i.platform) ?? Ce(),
4500
+ platform: Nr(i.platform) ?? Ce(),
4477
4501
  detectedBy: "marker"
4478
4502
  };
4479
- if (Or())
4503
+ if (Dr())
4480
4504
  return {
4481
4505
  version: lt() ?? null,
4482
4506
  platform: Ce(),
@@ -4508,9 +4532,9 @@ const Lr = /* @__PURE__ */ new Set([
4508
4532
  "https://one-wallet-oauth.onechain.nexus",
4509
4533
  "https://stg-one-wallet-oauth.onechain.nexus",
4510
4534
  "https://dev-one-wallet-oauth.onechain.nexus"
4511
- ]), Dr = "crossx://oauth-callback", Mr = "2.3.2";
4512
- function $r(i) {
4513
- return i.platform !== "ios" ? !1 : i.version ? Nr(i.version, Mr) <= 0 : !0;
4535
+ ]), Mr = "crossx://oauth-callback", $r = "2.3.2";
4536
+ function Fr(i) {
4537
+ return i.platform !== "ios" ? !1 : i.version ? Or(i.version, $r) <= 0 : !0;
4514
4538
  }
4515
4539
  class ne {
4516
4540
  constructor() {
@@ -4588,14 +4612,14 @@ class ne {
4588
4612
  return new Promise((r, t) => {
4589
4613
  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 = ne.generateRandom16Hex(), p = ne.generateRandom16Hex(), h = ve();
4590
4614
  let u = e.authUrl;
4591
- h && e.legacyAuthUrl && $r(h) && (u = e.legacyAuthUrl, c.info("[CROSSx] 구버전 iOS 지갑 감지 — 이관 전 OAuth 호스트 사용", {
4615
+ h && e.legacyAuthUrl && Fr(h) && (u = e.legacyAuthUrl, c.info("[CROSSx] 구버전 iOS 지갑 감지 — 이관 전 OAuth 호스트 사용", {
4592
4616
  appVersion: h.version ?? "(unknown)",
4593
4617
  detectedBy: h.detectedBy,
4594
4618
  authUrlBase: e.legacyAuthUrl
4595
4619
  }));
4596
4620
  const x = u.includes("?") ? "&" : "?", g = encodeURIComponent(window.location.origin);
4597
4621
  let f = `${u}${x}state=${l}&nonce=${p}&origin=${g}`;
4598
- h && !f.includes("redirectUrl=") && (f += `&redirectUrl=${encodeURIComponent(Dr)}`, c.info("[CROSSx] 지갑 인앱 브라우저 감지 — redirectUrl 콜백 자동 부착", {
4622
+ h && !f.includes("redirectUrl=") && (f += `&redirectUrl=${encodeURIComponent(Mr)}`, c.info("[CROSSx] 지갑 인앱 브라우저 감지 — redirectUrl 콜백 자동 부착", {
4599
4623
  detectedBy: h.detectedBy,
4600
4624
  appVersion: h.version ?? "(unknown)",
4601
4625
  platform: h.platform ?? "(unknown)"
@@ -4606,7 +4630,7 @@ class ne {
4606
4630
  });
4607
4631
  const m = window.open(
4608
4632
  f,
4609
- "CROSSx OAuth",
4633
+ h ? "_blank" : "CROSSx OAuth",
4610
4634
  `width=${s},height=${o},left=${n},top=${a}`
4611
4635
  );
4612
4636
  if (!m) {
@@ -4627,31 +4651,35 @@ class ne {
4627
4651
  A++;
4628
4652
  try {
4629
4653
  if (!m.closed) return;
4630
- const D = typeof document < "u" && document.hasFocus();
4631
- A <= S && !D ? R() : (W(), t(new Error("로그인이 취소되었습니다")));
4654
+ if (!!h) {
4655
+ W(), t(new _(d.USER_REJECTED, "로그인이 취소되었습니다"));
4656
+ return;
4657
+ }
4658
+ const G = typeof document < "u" && document.hasFocus();
4659
+ A <= S && !G ? R() : (W(), t(new _(d.USER_REJECTED, "로그인이 취소되었습니다")));
4632
4660
  } catch {
4633
4661
  R();
4634
4662
  }
4635
4663
  }, 1e3), W = () => {
4636
4664
  this.abortPending = null, clearTimeout(y), clearInterval(N), T && clearTimeout(T), window.removeEventListener("message", Y);
4637
- }, Y = (D) => {
4638
- if (!Lr.has(D.origin)) return;
4665
+ }, Y = (L) => {
4666
+ if (!Lr.has(L.origin)) return;
4639
4667
  W();
4640
- const V = typeof D.data.status == "string", I = V ? D.data.data ?? {} : D.data;
4668
+ const G = typeof L.data.status == "string", I = G ? L.data.data ?? {} : L.data;
4641
4669
  c.log("[CROSSx] OAuth postMessage 수신 —", {
4642
- format: V ? "wrapped" : "flat",
4643
- status: V ? D.data.status : "(flat)"
4670
+ format: G ? "wrapped" : "flat",
4671
+ status: G ? L.data.status : "(flat)"
4644
4672
  });
4645
- const O = (I == null ? void 0 : I.state) ?? D.data.state;
4673
+ const O = (I == null ? void 0 : I.state) ?? L.data.state;
4646
4674
  if (!O || O !== l) {
4647
4675
  t(new Error("OAuth state mismatch — possible CSRF attack"));
4648
4676
  return;
4649
4677
  }
4650
- if (V && D.data.status !== "success") {
4678
+ if (G && L.data.status !== "success") {
4651
4679
  c.error("[CROSSx] OAuth 실패:", I == null ? void 0 : I.error), t(new Error((I == null ? void 0 : I.error) || "Authentication failed"));
4652
4680
  return;
4653
4681
  }
4654
- if (!V && (I != null && I.error)) {
4682
+ if (!G && (I != null && I.error)) {
4655
4683
  c.error("[CROSSx] OAuth 실패:", I.error), t(new Error(I.error || "Authentication failed"));
4656
4684
  return;
4657
4685
  }
@@ -4661,7 +4689,7 @@ class ne {
4661
4689
  hasIdToken: !!M,
4662
4690
  hasEmail: !!we
4663
4691
  }), !he) {
4664
- c.error("[CROSSx] 토큰을 찾을 수 없음:", D.data), t(new Error("Token not found in response"));
4692
+ c.error("[CROSSx] 토큰을 찾을 수 없음:", L.data), t(new Error("Token not found in response"));
4665
4693
  return;
4666
4694
  }
4667
4695
  const _e = { token: he, email: we }, se = (ue) => {
@@ -4674,14 +4702,14 @@ class ne {
4674
4702
  "서버 측 nonce 검증이 필요합니다."
4675
4703
  ), r(_e)) : M ? se(M) : t(new Error("Token not found in response"));
4676
4704
  };
4677
- this.abortPending = (D) => {
4678
- W(), t(new Error(D));
4705
+ this.abortPending = (L) => {
4706
+ W(), t(new Error(L));
4679
4707
  }, window.addEventListener("message", Y);
4680
4708
  });
4681
4709
  }
4682
4710
  }
4683
4711
  const xe = "crossx_wallet_data", le = "crossx_mock_pin_hash";
4684
- class Fr {
4712
+ class Br {
4685
4713
  constructor(e, r) {
4686
4714
  this.storage = e, this.pinStore = r ?? null;
4687
4715
  }
@@ -4916,7 +4944,7 @@ class ae {
4916
4944
  );
4917
4945
  const y = m === d.AUTH_NOT_AUTHENTICATED ? d.SESSION_EXPIRED : m, S = y === d.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : ae.getGatewayErrorMessage(g.code, f), E = g.data;
4918
4946
  let A;
4919
- throw m === d.PIN_LOCKED ? A = ae.extractLockDetails(E) : m === d.ADDRESS_LIMIT_EXCEEDED ? A = { limit: De, raw: E } : A = E ?? void 0, new _(y, S, A);
4947
+ throw m === d.PIN_LOCKED ? A = ae.extractLockDetails(E) : m === d.ADDRESS_LIMIT_EXCEEDED ? A = { limit: Le, raw: E } : A = E ?? void 0, new _(y, S, A);
4920
4948
  }
4921
4949
  return c.log("[CROSSx] Wallet Gateway API 성공:", { code: g.code, url: n, method: e }), g.data ?? g;
4922
4950
  }
@@ -5304,7 +5332,7 @@ class ae {
5304
5332
  case -10033:
5305
5333
  return "User not found. You have been signed out.";
5306
5334
  case -10036:
5307
- return `Account limit reached. Maximum ${De} accounts allowed.`;
5335
+ return `Account limit reached. Maximum ${Le} accounts allowed.`;
5308
5336
  case -10040:
5309
5337
  return "HMAC signature header is required.";
5310
5338
  case -10041:
@@ -5314,7 +5342,7 @@ class ae {
5314
5342
  }
5315
5343
  }
5316
5344
  }
5317
- class Br {
5345
+ class Ur {
5318
5346
  constructor(e, r, t, s = () => {
5319
5347
  }, o = () => {
5320
5348
  }) {
@@ -5465,7 +5493,7 @@ class fe {
5465
5493
  }
5466
5494
  isCacheValid() {
5467
5495
  if (this.loadedAt === 0) return !1;
5468
- const e = this.usingFallback ? Ft : $t;
5496
+ const e = this.usingFallback ? Bt : Ft;
5469
5497
  return e === 0 ? !0 : Date.now() - this.loadedAt < e;
5470
5498
  }
5471
5499
  populateCache(e, r) {
@@ -5527,7 +5555,7 @@ class fe {
5527
5555
  }
5528
5556
  }
5529
5557
  }
5530
- const dt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Ur = {
5558
+ const dt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Wr = {
5531
5559
  light: {
5532
5560
  bg: "#FFFFFF",
5533
5561
  border: "rgba(0,0,0,0.07)",
@@ -5596,7 +5624,7 @@ const dt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Ur = {
5596
5624
  }
5597
5625
  };
5598
5626
  function pt(i, e) {
5599
- const r = Ur[i], t = e == null ? void 0 : e[i];
5627
+ const r = Wr[i], t = e == null ? void 0 : e[i];
5600
5628
  return t ? {
5601
5629
  ...r,
5602
5630
  // ── Brand
@@ -5630,7 +5658,7 @@ function pt(i, e) {
5630
5658
  ...t.error !== void 0 && { errorColor: t.error }
5631
5659
  } : r;
5632
5660
  }
5633
- const Wr = `
5661
+ const Hr = `
5634
5662
  @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');
5635
5663
 
5636
5664
  #${F} {
@@ -8231,11 +8259,11 @@ button.__crossx-connect-other-block:active {
8231
8259
  display: block;
8232
8260
  }
8233
8261
  `;
8234
- function G() {
8262
+ function K() {
8235
8263
  let i = document.getElementById(dt);
8236
- i || (i = document.createElement("style"), i.id = dt, document.head.appendChild(i)), i.textContent = Wr;
8264
+ i || (i = document.createElement("style"), i.id = dt, document.head.appendChild(i)), i.textContent = Hr;
8237
8265
  }
8238
- function Hr() {
8266
+ function Gr() {
8239
8267
  const i = `#${F}`, e = (t) => {
8240
8268
  var s, o;
8241
8269
  (o = (s = t.target) == null ? void 0 : s.closest) != null && o.call(s, i) && t.stopImmediatePropagation();
@@ -8247,7 +8275,7 @@ function Hr() {
8247
8275
  document.removeEventListener("focusin", e, !0), document.removeEventListener("focusout", r, !0);
8248
8276
  };
8249
8277
  }
8250
- function K(i) {
8278
+ function z(i) {
8251
8279
  const e = i.querySelector(".__crossx-card");
8252
8280
  if (e) {
8253
8281
  const a = (e.getAttribute("style") ?? "").match(/--cx-bg:\s*([^;]+)/);
@@ -8275,12 +8303,12 @@ function K(i) {
8275
8303
  }
8276
8304
  n.preventDefault();
8277
8305
  }, { passive: !1 });
8278
- const t = Hr(), s = Gr(i), o = i.remove.bind(i);
8306
+ const t = Gr(), s = Kr(i), o = i.remove.bind(i);
8279
8307
  i.remove = () => {
8280
8308
  s(), t(), o();
8281
8309
  }, document.body.appendChild(i);
8282
8310
  }
8283
- function Gr(i) {
8311
+ function Kr(i) {
8284
8312
  if (typeof window > "u") return () => {
8285
8313
  };
8286
8314
  const e = window.visualViewport;
@@ -8295,7 +8323,7 @@ function Gr(i) {
8295
8323
  e.removeEventListener("resize", t), e.removeEventListener("scroll", t), i.style.removeProperty("--cx-keyboard-inset");
8296
8324
  };
8297
8325
  }
8298
- function Kr(i) {
8326
+ function zr(i) {
8299
8327
  const e = Array.from(i.querySelectorAll(".__crossx-amount-tip"));
8300
8328
  if (!e.length) return;
8301
8329
  const r = document.createElement("div");
@@ -8373,9 +8401,9 @@ const ht = {
8373
8401
  202601: "Ronin Saigon",
8374
8402
  612044: "ONEchain Testnet",
8375
8403
  612055: "CROSS Mainnet"
8376
- }, Ve = /* @__PURE__ */ new Map();
8404
+ }, ze = /* @__PURE__ */ new Map();
8377
8405
  let Pe = !1;
8378
- function zr() {
8406
+ function qr() {
8379
8407
  if (Pe || (Pe = !0, typeof fetch > "u")) return;
8380
8408
  const i = Ge().contentsBaseUrl;
8381
8409
  i && fetch(`${i}/chains.json`, { cache: "no-store" }).then((e) => e.ok ? e.json() : null).then((e) => {
@@ -8383,7 +8411,7 @@ function zr() {
8383
8411
  if (r)
8384
8412
  for (const [t, s] of Object.entries(r)) {
8385
8413
  const o = Number(t);
8386
- !Number.isNaN(o) && s && Ve.set(o, s);
8414
+ !Number.isNaN(o) && s && ze.set(o, s);
8387
8415
  }
8388
8416
  }).catch(() => {
8389
8417
  Pe = !1;
@@ -8396,18 +8424,18 @@ function yt(i) {
8396
8424
  var r;
8397
8425
  const e = mt(i);
8398
8426
  if (!isNaN(e)) {
8399
- const t = (r = Ve.get(e)) == null ? void 0 : r.name;
8427
+ const t = (r = ze.get(e)) == null ? void 0 : r.name;
8400
8428
  if (t) return t;
8401
8429
  if (ht[e]) return ht[e];
8402
8430
  }
8403
8431
  return i;
8404
8432
  }
8405
- function ze(i, e) {
8433
+ function Ve(i, e) {
8406
8434
  var r;
8407
8435
  if (i) {
8408
8436
  const t = mt(i);
8409
8437
  if (!isNaN(t)) {
8410
- const s = (r = Ve.get(t)) == null ? void 0 : r.nativeSymbol;
8438
+ const s = (r = ze.get(t)) == null ? void 0 : r.nativeSymbol;
8411
8439
  if (s) return s;
8412
8440
  }
8413
8441
  }
@@ -8434,18 +8462,18 @@ function Ne(i) {
8434
8462
  return i;
8435
8463
  }
8436
8464
  }
8437
- function qr(i) {
8465
+ function jr(i) {
8438
8466
  try {
8439
8467
  return BigInt(i).toLocaleString();
8440
8468
  } catch {
8441
8469
  return i;
8442
8470
  }
8443
8471
  }
8444
- function jr(i, e) {
8445
- const { gasLimit: r, gasPrice: t, maxFeePerGas: s, maxPriorityFeePerGas: o, nativeDecimals: n = 18 } = i, a = ze(i.chainId, i.nativeSymbol ?? "ETH");
8472
+ function Yr(i, e) {
8473
+ const { gasLimit: r, gasPrice: t, maxFeePerGas: s, maxPriorityFeePerGas: o, nativeDecimals: n = 18 } = i, a = Ve(i.chainId, i.nativeSymbol ?? "ETH");
8446
8474
  if (!r) return null;
8447
8475
  try {
8448
- const l = BigInt(r), p = qr(r);
8476
+ const l = BigInt(r), p = jr(r);
8449
8477
  if (s) {
8450
8478
  const h = l * BigInt(s);
8451
8479
  return {
@@ -8477,10 +8505,10 @@ function jr(i, e) {
8477
8505
  }
8478
8506
  }
8479
8507
  function bt(i, e, r) {
8480
- const t = jr(i, e);
8481
- if (!t) return L((r == null ? void 0 : r.label_estimated_fee) ?? "Estimated fee", "<span>—</span>");
8482
- let s = L((r == null ? void 0 : r.label_est_tx_fee) ?? "Est. Tx Fee", `<span>${t.estTxFee}</span>`);
8483
- return t.isDynamic ? (t.maxPriorityFeeGwei !== void 0 && (s += L((r == null ? void 0 : r.label_max_priority_fee) ?? "Max Priority Fee", `<span>${t.maxPriorityFeeGwei} Gwei</span>`)), t.maxFeeGwei !== void 0 && (s += L((r == null ? void 0 : r.label_max_gas_fee) ?? "Max Gas Fee", `<span>${t.maxFeeGwei} Gwei</span>`))) : t.gasPriceGwei !== void 0 && (s += L((r == null ? void 0 : r.label_gas_price) ?? "Gas Price", `<span>${t.gasPriceGwei} Gwei</span>`)), t.gasLimitFormatted && (s += L((r == null ? void 0 : r.label_gas_limit) ?? "Gas Limit", `<span>${t.gasLimitFormatted}</span>`)), s;
8508
+ const t = Yr(i, e);
8509
+ if (!t) return D((r == null ? void 0 : r.label_estimated_fee) ?? "Estimated fee", "<span>—</span>");
8510
+ let s = D((r == null ? void 0 : r.label_est_tx_fee) ?? "Est. Tx Fee", `<span>${t.estTxFee}</span>`);
8511
+ 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;
8484
8512
  }
8485
8513
  const ee = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8486
8514
  <rect x="9" y="9" width="13" height="13" rx="2"/>
@@ -8488,14 +8516,15 @@ const ee = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="
8488
8516
  </svg>`, U = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8489
8517
  <line x1="18" y1="6" x2="6" y2="18"/>
8490
8518
  <line x1="6" y1="6" x2="18" y2="18"/>
8491
- </svg>`, Yr = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8492
- <circle cx="20" cy="20" r="20" fill="#00D5AA"/>
8493
- <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"/>
8494
- </svg>`, Xr = '<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>', Jr = '<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>', Zr = '<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>', Qr = {
8519
+ </svg>`, Xr = '<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>', Jr = '<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>';
8520
+ function vt(i, e) {
8521
+ return `<svg width="${i}" height="${i}" viewBox="0 0 229 229" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g clip-path="url(#clip0_${e})"><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_${e})"><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_${e})"/></g><path d="M79.7598 228.096H228.24V64.7367L79.7598 159.851V228.096Z" fill="url(#paint1_linear_${e})"/><path d="M79.7694 228.209H0.0332031V75.9257L79.7694 160.218V228.209Z" fill="url(#paint2_linear_${e})"/><g filter="url(#filter1_d_${e})"><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_${e}" 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_${e}"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_${e}" result="shape"/></filter><filter id="filter1_d_${e}" 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_${e}"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_${e}" result="shape"/></filter><linearGradient id="paint0_linear_${e}" 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_${e}" 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_${e}" 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_${e}"><rect width="228.273" height="228.273" rx="87" fill="white"/></clipPath></defs></svg>`;
8522
+ }
8523
+ const Zr = vt(16, "connect-inline"), Qr = {
8495
8524
  [ge.MetaMask]: Xr,
8496
8525
  [ge.Binance]: Jr,
8497
8526
  [ge.CROSSx]: Zr
8498
- }, vt = '<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"/>', qe = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${vt}</svg>`, es = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8527
+ }, St = '<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"/>', qe = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${St}</svg>`, es = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8499
8528
  <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)"/>
8500
8529
  </svg>`, ts = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8501
8530
  <circle cx="12" cy="12" r="12" fill="var(--cx-error)"/>
@@ -8538,7 +8567,7 @@ function H(i) {
8538
8567
  function rs(i, e) {
8539
8568
  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);
8540
8569
  }
8541
- function L(i, e) {
8570
+ function D(i, e) {
8542
8571
  return `
8543
8572
  <div class="__crossx-row">
8544
8573
  <span class="__crossx-row-label">${i}</span>
@@ -8546,8 +8575,8 @@ function L(i, e) {
8546
8575
  </div>`;
8547
8576
  }
8548
8577
  function ss(i, e, r, t) {
8549
- const s = e, o = ze(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ie(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${te(i.to)}</span>
8550
- <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${ee}</button>` : "<span>—</span>", p = bt(i, r, t), h = wt(i.value, o, n, r), u = h ? L((t == null ? void 0 : t.label_value) ?? "Value", `<span>${h}</span>`) : "", x = i.data ?? "0x", g = document.createElement("div");
8578
+ const s = e, o = Ve(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ie(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${te(i.to)}</span>
8579
+ <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${ee}</button>` : "<span>—</span>", p = bt(i, r, t), h = wt(i.value, o, n, r), u = h ? D((t == null ? void 0 : t.label_value) ?? "Value", `<span>${h}</span>`) : "", x = i.data ?? "0x", g = document.createElement("div");
8551
8580
  return g.id = F, g.innerHTML = `
8552
8581
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-tx" style="${H(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8553
8582
  <div class="__crossx-header">
@@ -8570,8 +8599,8 @@ function ss(i, e, r, t) {
8570
8599
  <hr class="__crossx-divider __crossx-divider--cols">
8571
8600
  <div class="__crossx-col-right-sign">
8572
8601
  <div class="__crossx-rows">
8573
- ${L((t == null ? void 0 : t.label_to) ?? "To", l)}
8574
- ${L((t == null ? void 0 : t.label_network) ?? "Network", `<span>${yt(i.chainId)}</span>`)}
8602
+ ${D((t == null ? void 0 : t.label_to) ?? "To", l)}
8603
+ ${D((t == null ? void 0 : t.label_network) ?? "Network", `<span>${yt(i.chainId)}</span>`)}
8575
8604
  ${u}
8576
8605
  ${p}
8577
8606
  </div>
@@ -8600,7 +8629,7 @@ function os(i) {
8600
8629
  return i ? is.has(i.slice(0, 10).toLowerCase()) : !1;
8601
8630
  }
8602
8631
  function ns(i, e, r, t) {
8603
- const s = e, o = ze(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ie(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${te(i.to)}</span>
8632
+ const s = e, o = Ve(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ie(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${te(i.to)}</span>
8604
8633
  <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${ee}</button>` : "<span>—</span>", p = bt(i, r, t), u = wt(i.value, o, n, r) ?? "—", x = os(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");
8605
8634
  return g.id = F, g.innerHTML = `
8606
8635
  <div class="__crossx-card __crossx-card--migration __crossx-card--send-tx" style="${H(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8615,8 +8644,8 @@ function ns(i, e, r, t) {
8615
8644
  </p>
8616
8645
  <div class="__crossx-body-cols">
8617
8646
  <div class="__crossx-rows">
8618
- ${L((t == null ? void 0 : t.label_to) ?? "To", l)}
8619
- ${L((t == null ? void 0 : t.label_network) ?? "Network", `<span>${yt(i.chainId)}</span>`)}
8647
+ ${D((t == null ? void 0 : t.label_to) ?? "To", l)}
8648
+ ${D((t == null ? void 0 : t.label_network) ?? "Network", `<span>${yt(i.chainId)}</span>`)}
8620
8649
  ${p}
8621
8650
  </div>
8622
8651
  <div class="__crossx-pill">
@@ -8662,22 +8691,22 @@ function ds(i) {
8662
8691
  function ps(i, e) {
8663
8692
  return `https://explorer.crosstoken.io/${ls(i)}/tx/${e}`;
8664
8693
  }
8665
- function St(i, e) {
8694
+ function Et(i, e) {
8666
8695
  return `<a class="__crossx-addr-text __crossx-row-link" href="${w(e)}" target="_blank" rel="noopener noreferrer">${w(i)}</a>`;
8667
8696
  }
8668
8697
  function Se(i) {
8669
- return St(te(i), ds(i));
8698
+ return Et(te(i), ds(i));
8670
8699
  }
8671
- function Et(i, e) {
8672
- return St(te(e), ps(i, e));
8700
+ function At(i, e) {
8701
+ return Et(te(e), ps(i, e));
8673
8702
  }
8674
8703
  function hs(i, e, r) {
8675
- const t = L(
8704
+ const t = D(
8676
8705
  (r == null ? void 0 : r.label_from) ?? "From",
8677
8706
  `${Se(i.from)}
8678
8707
  <button class="__crossx-copy-btn" data-copy="${w(i.from)}" title="Copy address">${ee}</button>`
8679
- ), s = i.to ? L((r == null ? void 0 : r.label_to) ?? "To", `${Se(i.to)}
8680
- <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${ee}</button>`) : "", o = i.amount ? L((r == null ? void 0 : r.label_transfer) ?? "Transfer", `<span>${w(i.amount)}</span>`) : "", n = i.fees ? L((r == null ? void 0 : r.label_tx_fee) ?? "Tx Fee", `<span>${w(i.fees)}</span>`) : "", a = i.txHash ? L((r == null ? void 0 : r.label_tx_hash) ?? "Tx Hash", `${Et(i.chainId, i.txHash)}
8708
+ ), s = i.to ? D((r == null ? void 0 : r.label_to) ?? "To", `${Se(i.to)}
8709
+ <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${ee}</button>`) : "", o = i.amount ? D((r == null ? void 0 : r.label_transfer) ?? "Transfer", `<span>${w(i.amount)}</span>`) : "", n = i.fees ? D((r == null ? void 0 : r.label_tx_fee) ?? "Tx Fee", `<span>${w(i.fees)}</span>`) : "", a = i.txHash ? D((r == null ? void 0 : r.label_tx_hash) ?? "Tx Hash", `${At(i.chainId, i.txHash)}
8681
8710
  <button class="__crossx-copy-btn" data-copy="${w(i.txHash)}" title="Copy hash">${ee}</button>`) : "", l = i.total ? `<div class="__crossx-total-pill">
8682
8711
  <span class="__crossx-total-label">${w((r == null ? void 0 : r.label_total) ?? "Total")}<br>${w((r == null ? void 0 : r.label_including_fees) ?? "(including fees)")}</span>
8683
8712
  <span class="__crossx-total-amount">${w(i.total)}</span>
@@ -8732,9 +8761,9 @@ function us(i, e, r, t) {
8732
8761
  }
8733
8762
  const l = i.querySelector("#__crossx-progress-body");
8734
8763
  if (!l) return;
8735
- const p = e.from ? L((t == null ? void 0 : t.label_from) ?? "From", `${Se(e.from)}
8736
- <button class="__crossx-copy-btn" data-copy="${w(e.from)}" title="Copy address">${ee}</button>`) : "", h = e.to ? L((t == null ? void 0 : t.label_to) ?? "To", `${Se(e.to)}
8737
- <button class="__crossx-copy-btn" data-copy="${w(e.to)}" title="Copy address">${ee}</button>`) : "", u = e.amount ? L((t == null ? void 0 : t.label_transfer) ?? "Transfer", `<span>${w(e.amount)}</span>`) : "", x = e.fees ? L((t == null ? void 0 : t.label_tx_fee) ?? "Tx Fee", `<span>${w(e.fees)}</span>`) : "", g = e.txHash ? L((t == null ? void 0 : t.label_tx_hash) ?? "Tx Hash", `${Et(e.chainId, e.txHash)}
8764
+ const p = e.from ? D((t == null ? void 0 : t.label_from) ?? "From", `${Se(e.from)}
8765
+ <button class="__crossx-copy-btn" data-copy="${w(e.from)}" title="Copy address">${ee}</button>`) : "", h = e.to ? D((t == null ? void 0 : t.label_to) ?? "To", `${Se(e.to)}
8766
+ <button class="__crossx-copy-btn" data-copy="${w(e.to)}" title="Copy address">${ee}</button>`) : "", u = e.amount ? D((t == null ? void 0 : t.label_transfer) ?? "Transfer", `<span>${w(e.amount)}</span>`) : "", x = e.fees ? D((t == null ? void 0 : t.label_tx_fee) ?? "Tx Fee", `<span>${w(e.fees)}</span>`) : "", g = e.txHash ? D((t == null ? void 0 : t.label_tx_hash) ?? "Tx Hash", `${At(e.chainId, e.txHash)}
8738
8767
  <button class="__crossx-copy-btn" data-copy="${w(e.txHash)}" title="Copy hash">${ee}</button>`) : "", f = e.total ? `<div class="__crossx-total-pill">
8739
8768
  <span class="__crossx-total-label">${w((t == null ? void 0 : t.label_total) ?? "Total")}<br>${w((t == null ? void 0 : t.label_including_fees) ?? "(including fees)")}</span>
8740
8769
  <span class="__crossx-total-amount">${w(e.total)}</span>
@@ -8850,18 +8879,18 @@ const fs = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="
8850
8879
  <line x1="12" y1="5" x2="12" y2="19"/>
8851
8880
  <line x1="5" y1="12" x2="19" y2="12"/>
8852
8881
  </svg>`, ws = '<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>';
8853
- function At(i) {
8882
+ function It(i) {
8854
8883
  return i.name || `Account ${i.index + 1}`;
8855
8884
  }
8856
8885
  function ms() {
8857
- 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">${vt}</g></svg>`;
8886
+ 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">${St}</g></svg>`;
8858
8887
  }
8859
8888
  const ys = Ge().portraitBaseUrl;
8860
8889
  function bs(i, e) {
8861
8890
  const r = e.replace("#", "");
8862
8891
  return `${ys}/portrait/evm/${i}.png?size=256&bg=${r}`;
8863
8892
  }
8864
- function It(i, e, r) {
8893
+ function kt(i, e, r) {
8865
8894
  const t = bs(i, r), o = ms().replace(/"/g, "&quot;");
8866
8895
  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>`;
8867
8896
  }
@@ -8869,7 +8898,7 @@ function vs(i, e, r, t) {
8869
8898
  const s = r == null ? void 0 : r.toLowerCase(), o = i.map((a) => {
8870
8899
  const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", h = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${ws}</span>` : "";
8871
8900
  return `<button class="__crossx-wallet-item${p}" data-wallet-index="${a.index}" data-wallet-address="${w(a.address)}">
8872
- ${It(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(At(a))}</span><span class="__crossx-wallet-addr">${ft(a.address)}</span></span>${h}
8901
+ ${kt(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(It(a))}</span><span class="__crossx-wallet-addr">${ft(a.address)}</span></span>${h}
8873
8902
  </button>`;
8874
8903
  }).join(""), n = document.createElement("div");
8875
8904
  return n.id = F, n.className = "__crossx-overlay--wallet-selector", n.innerHTML = `
@@ -8955,7 +8984,7 @@ const Es = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="h
8955
8984
  <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"/>
8956
8985
  </svg>`;
8957
8986
  function Is(i) {
8958
- const e = Ht(i);
8987
+ const e = Gt(i);
8959
8988
  return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Qr[i] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${w(e)}</span></span>`;
8960
8989
  }
8961
8990
  function ks(i) {
@@ -9053,7 +9082,7 @@ function Cs(i, e = !0) {
9053
9082
  <p class="__crossx-mig-info-desc">It safely restores and integrates all your previous assets. Simply verify your PIN to get started.</p>
9054
9083
  </div>
9055
9084
  <button class="__crossx-recover-btn" id="__crossx-recover-btn">
9056
- <span class="__crossx-recover-icon">${Yr}</span>
9085
+ <span class="__crossx-recover-icon">${vt(40, "recover")}</span>
9057
9086
  <span class="__crossx-recover-label">Import from Social Backup</span>
9058
9087
  </button>
9059
9088
  ${s}
@@ -9120,7 +9149,7 @@ function Os(i, e, r) {
9120
9149
  return () => clearInterval(u);
9121
9150
  } };
9122
9151
  }
9123
- function Ls(i) {
9152
+ function Ds(i) {
9124
9153
  const r = [i.check1, i.check2].map((t, s) => `
9125
9154
  <div class="__crossx-pw-notice-item" data-check-index="${s}" role="checkbox" aria-checked="false" tabindex="0">
9126
9155
  <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${Fs}</div>
@@ -9161,7 +9190,7 @@ function Ls(i) {
9161
9190
  }
9162
9191
  function Oe(i) {
9163
9192
  const e = !!i.lockExpiresAt && i.lockExpiresAt > Date.now(), r = i.lockExpiresAt ? ` data-lock-expires="${i.lockExpiresAt}"` : "", t = i.headerSubtitle ? `<p class="__crossx-pin6-header-sub">${w(i.headerSubtitle)}</p>` : "", s = i.subtitle ? `<p class="__crossx-pin6-subtitle">${w(i.subtitle)}</p>` : "", o = i.errorMessage ? `<p class="__crossx-pin6-error" id="__crossx-pin6-error">${w(i.errorMessage)}</p>` : '<p class="__crossx-pin6-error" id="__crossx-pin6-error"></p>', n = e ? `<p class="__crossx-pin6-lock-msg" id="__crossx-pin6-lock-msg">
9164
- ${kt}
9193
+ ${Tt}
9165
9194
  <span id="__crossx-pin6-lock-countdown"></span>
9166
9195
  </p>` : "", a = i.warningMessage && i.attemptCount != null && i.attemptCount > 0 ? `<p class="__crossx-pin6-warning" id="__crossx-pin6-warning">${w(i.warningMessage)}</p>` : '<p class="__crossx-pin6-warning" id="__crossx-pin6-warning"></p>', l = i.attemptCount != null && i.attemptCount > 0 ? `<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt">${i.attemptCount}/${i.maxAttempts ?? "?"}</p>` : '<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt"></p>', p = e ? " --locked" : "", h = Array.from(
9167
9196
  { length: 6 },
@@ -9224,7 +9253,7 @@ function _t(i, e) {
9224
9253
  </div>
9225
9254
  `, r;
9226
9255
  }
9227
- function Ds(i, e) {
9256
+ function Ls(i, e) {
9228
9257
  if (i.length !== 6) return e.tooShort;
9229
9258
  if (!/^\d+$/.test(i)) return e.numbersOnly;
9230
9259
  if (/(.)\1{2}/.test(i)) return e.repeatingDigit;
@@ -9235,7 +9264,7 @@ function Ms(i) {
9235
9264
  const e = Math.max(0, Math.ceil(i / 1e3)), r = Math.floor(e / 3600), t = Math.floor(e % 3600 / 60), s = e % 60;
9236
9265
  return r > 0 ? `${r}h ${String(t).padStart(2, "0")}m` : `${String(t).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
9237
9266
  }
9238
- function Le(i, e, r, t, s, o, n) {
9267
+ function De(i, e, r, t, s, o, n) {
9239
9268
  var je, Ye;
9240
9269
  let a = !!(o && o > Date.now()), l = !1;
9241
9270
  const p = () => Array.from(i.querySelectorAll(".__crossx-pin6-box")), h = () => i.querySelector("#__crossx-pin6-boxes"), u = () => i.querySelector("#__crossx-pin6-error"), x = () => i.querySelector("#__crossx-pin6-lock-msg"), g = () => i.querySelector("#__crossx-pin6-lock-countdown"), f = () => i.querySelector(".__crossx-pin6-body"), m = "●", y = (b, v) => {
@@ -9258,10 +9287,10 @@ function Le(i, e, r, t, s, o, n) {
9258
9287
  a = b, p().forEach((v) => {
9259
9288
  v.disabled = b, v.classList.toggle("--locked", b);
9260
9289
  });
9261
- }, Y = () => i.querySelector("#__crossx-pin6-attempt"), D = () => {
9290
+ }, Y = () => i.querySelector("#__crossx-pin6-attempt"), L = () => {
9262
9291
  const b = u();
9263
9292
  b && (b.textContent = "");
9264
- }, V = () => n ?? "Your account will be locked after further failures.", I = () => i.querySelector("#__crossx-pin6-warning"), O = (b) => {
9293
+ }, G = () => n ?? "Your account will be locked after further failures.", I = () => i.querySelector("#__crossx-pin6-warning"), O = (b) => {
9265
9294
  var k;
9266
9295
  let v = I();
9267
9296
  if (!v) {
@@ -9299,17 +9328,17 @@ function Le(i, e, r, t, s, o, n) {
9299
9328
  const v = u();
9300
9329
  if (v && (v.textContent = "Too many failed attempts. Please wait."), !x()) {
9301
9330
  const B = document.createElement("p");
9302
- B.className = "__crossx-pin6-lock-msg", B.id = "__crossx-pin6-lock-msg", B.innerHTML = `${kt}<span id="__crossx-pin6-lock-countdown"></span>`;
9303
- const z = u();
9304
- z ? z.insertAdjacentElement("afterend", B) : ($ = f()) == null || $.appendChild(B);
9331
+ B.className = "__crossx-pin6-lock-msg", B.id = "__crossx-pin6-lock-msg", B.innerHTML = `${Tt}<span id="__crossx-pin6-lock-countdown"></span>`;
9332
+ const V = u();
9333
+ V ? V.insertAdjacentElement("afterend", B) : ($ = f()) == null || $.appendChild(B);
9305
9334
  }
9306
9335
  const k = () => {
9307
9336
  var re;
9308
- const B = b - Date.now(), z = g();
9337
+ const B = b - Date.now(), V = g();
9309
9338
  B <= 0 ? (clearInterval(C), W(!1), (re = x()) == null || re.remove(), v && (v.textContent = ""), N(), setTimeout(() => {
9310
9339
  var me;
9311
9340
  return (me = p()[0]) == null ? void 0 : me.focus();
9312
- }, 50)) : z && (z.textContent = ` ${Ms(B)}`);
9341
+ }, 50)) : V && (V.textContent = ` ${Ms(B)}`);
9313
9342
  }, C = setInterval(k, 1e3);
9314
9343
  k();
9315
9344
  const P = new MutationObserver(() => {
@@ -9326,7 +9355,7 @@ function Le(i, e, r, t, s, o, n) {
9326
9355
  try {
9327
9356
  if (s) {
9328
9357
  const v = await s(b);
9329
- v.ok ? e(b) : v.lockExpiresAt ? (he(), _e(v.lockExpiresAt)) : (we(v.error ?? "Incorrect PIN. Please try again."), v.attemptCount != null && v.maxAttempts != null ? (O(V()), X(v.attemptCount, v.maxAttempts)) : (M(), he()));
9358
+ v.ok ? e(b) : v.lockExpiresAt ? (he(), _e(v.lockExpiresAt)) : (we(v.error ?? "Incorrect PIN. Please try again."), v.attemptCount != null && v.maxAttempts != null ? (O(G()), X(v.attemptCount, v.maxAttempts)) : (M(), he()));
9330
9359
  } else
9331
9360
  e(b);
9332
9361
  } catch (v) {
@@ -9356,7 +9385,7 @@ function Le(i, e, r, t, s, o, n) {
9356
9385
  b.addEventListener("input", () => {
9357
9386
  var C;
9358
9387
  const k = b.value.replace(/\D/g, "").slice(-1);
9359
- k ? y(b, k) : S(b), D(), k && v < 5 && ((C = p()[v + 1]) == null || C.focus()), R(), A().length === 6 && setTimeout(se, 80);
9388
+ k ? y(b, k) : S(b), L(), k && v < 5 && ((C = p()[v + 1]) == null || C.focus()), R(), A().length === 6 && setTimeout(se, 80);
9360
9389
  }), b.addEventListener("keydown", (k) => {
9361
9390
  var C, P;
9362
9391
  if (k.key === "Backspace") {
@@ -9374,9 +9403,9 @@ function Le(i, e, r, t, s, o, n) {
9374
9403
  const C = ((($ = k.clipboardData) == null ? void 0 : $.getData("text")) ?? "").replace(/\D/g, "").slice(0, 6);
9375
9404
  if (!C) return;
9376
9405
  const P = p();
9377
- C.split("").forEach((z, re) => {
9378
- P[re] && y(P[re], z);
9379
- }), (B = P[Math.min(C.length - 1, 5)]) == null || B.focus(), D(), R(), A().length === 6 && setTimeout(se, 80);
9406
+ C.split("").forEach((V, re) => {
9407
+ P[re] && y(P[re], V);
9408
+ }), (B = P[Math.min(C.length - 1, 5)]) == null || B.focus(), L(), R(), A().length === 6 && setTimeout(se, 80);
9380
9409
  }), b.addEventListener("focus", () => b.select());
9381
9410
  });
9382
9411
  const J = i.querySelector("#__crossx-pin6-numpad");
@@ -9394,12 +9423,12 @@ function Le(i, e, r, t, s, o, n) {
9394
9423
  if (!P) return;
9395
9424
  if (P === "backspace") {
9396
9425
  const re = [...p()].reverse().find((me) => E(me));
9397
- re && (S(re), D()), R();
9426
+ re && (S(re), L()), R();
9398
9427
  return;
9399
9428
  }
9400
9429
  if (!/^\d$/.test(P)) return;
9401
- const B = p().find((z) => !E(z));
9402
- B && (y(B, P), D(), R(), A().length === 6 && setTimeout(se, 80));
9430
+ const B = p().find((V) => !E(V));
9431
+ B && (y(B, P), L(), R(), A().length === 6 && setTimeout(se, 80));
9403
9432
  };
9404
9433
  J.addEventListener("pointerup", (C) => {
9405
9434
  if (!b) return;
@@ -9414,7 +9443,7 @@ const $s = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="h
9414
9443
  <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"/>
9415
9444
  <line x1="10" y1="5.5" x2="16" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
9416
9445
  <line x1="16" y1="5.5" x2="10" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
9417
- </svg>`, kt = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
9446
+ </svg>`, Tt = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
9418
9447
  <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"/>
9419
9448
  </svg>`, Fs = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
9420
9449
  <path d="M1 4.5L4 7.5L10 1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -9456,7 +9485,7 @@ function Us(i, e, r) {
9456
9485
  }
9457
9486
  class Ws {
9458
9487
  constructor(e = "light", r, t = We, s) {
9459
- this.theme = e, this.overrides = r, this.tokens = pt(e, r), this.displayDecimals = t, this.pinKeyboard = s, zr();
9488
+ this.theme = e, this.overrides = r, this.tokens = pt(e, r), this.displayDecimals = t, this.pinKeyboard = s, qr();
9460
9489
  }
9461
9490
  setPinKeyboard(e) {
9462
9491
  this.pinKeyboard = e;
@@ -9498,9 +9527,9 @@ class Ws {
9498
9527
  showWalletSelector(e, r, t) {
9499
9528
  return new Promise((s, o) => {
9500
9529
  var E;
9501
- G();
9530
+ K();
9502
9531
  const n = [...e], a = vs(n, this.tokens, t, this.messages), l = oe();
9503
- K(a);
9532
+ z(a);
9504
9533
  let p = !1;
9505
9534
  const h = () => {
9506
9535
  p || (p = !0, a.remove(), l());
@@ -9528,7 +9557,7 @@ class Ws {
9528
9557
  const T = a.querySelector("#__crossx-wallet-list");
9529
9558
  if (T) {
9530
9559
  const R = document.createElement("button");
9531
- R.className = "__crossx-wallet-item", R.dataset.walletIndex = String(A.index), R.dataset.walletAddress = A.address, R.innerHTML = `${It(A.address, A.index, this.tokens.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(At(A))}</span><span class="__crossx-wallet-addr">${ft(A.address)}</span></span>`, R.addEventListener("click", () => x(A)), T.appendChild(R);
9560
+ R.className = "__crossx-wallet-item", R.dataset.walletIndex = String(A.index), R.dataset.walletAddress = A.address, R.innerHTML = `${kt(A.address, A.index, this.tokens.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(It(A))}</span><span class="__crossx-wallet-addr">${ft(A.address)}</span></span>`, R.addEventListener("click", () => x(A)), T.appendChild(R);
9532
9561
  try {
9533
9562
  R.scrollIntoView({ behavior: "smooth", block: "nearest" });
9534
9563
  } catch {
@@ -9551,9 +9580,9 @@ class Ws {
9551
9580
  showWalletCreatedPrompt() {
9552
9581
  return new Promise((e) => {
9553
9582
  var a, l;
9554
- G();
9583
+ K();
9555
9584
  const r = Ss(this.tokens, this.messages), t = oe();
9556
- K(r);
9585
+ z(r);
9557
9586
  let s = !1, o = null;
9558
9587
  const n = () => {
9559
9588
  s || (s = !0, o && document.removeEventListener("keydown", o), r.remove(), t(), e());
@@ -9575,7 +9604,7 @@ class Ws {
9575
9604
  resolveAddWalletErrorMessage(e) {
9576
9605
  const r = this.messages;
9577
9606
  if (e instanceof _ && e.code === d.ADDRESS_LIMIT_EXCEEDED) {
9578
- const s = e.details, o = typeof (s == null ? void 0 : s.limit) == "number" ? s.limit : De;
9607
+ const s = e.details, o = typeof (s == null ? void 0 : s.limit) == "number" ? s.limit : Le;
9579
9608
  return ((r == null ? void 0 : r.wallet_selector_add_error_limit_exceeded) ?? "Account limit reached. Maximum {limit} accounts allowed.").replace("{limit}", String(o));
9580
9609
  }
9581
9610
  return (r == null ? void 0 : r.wallet_selector_add_error_generic) ?? "Failed to add a new account. Please try again.";
@@ -9592,9 +9621,9 @@ class Ws {
9592
9621
  )) ?? [];
9593
9622
  return new Promise((s) => {
9594
9623
  var x, g, f, m;
9595
- G();
9624
+ K();
9596
9625
  const o = Ts(this.tokens, r, this.messages), n = oe();
9597
- K(o);
9626
+ z(o);
9598
9627
  const a = () => {
9599
9628
  o.remove(), n();
9600
9629
  }, l = (y) => {
@@ -9621,7 +9650,7 @@ class Ws {
9621
9650
  showSessionAlert(e) {
9622
9651
  return new Promise((r) => {
9623
9652
  var h, u, x;
9624
- G();
9653
+ K();
9625
9654
  const t = this.messages, s = Rs(this.tokens, {
9626
9655
  title: e.title,
9627
9656
  message: e.message,
@@ -9630,7 +9659,7 @@ class Ws {
9630
9659
  signOutLabel: (t == null ? void 0 : t.session_alert_sign_out_button) ?? "Sign out",
9631
9660
  signInAgainLabel: (t == null ? void 0 : t.session_alert_sign_in_again_button) ?? "Sign in again"
9632
9661
  }), o = oe();
9633
- K(s);
9662
+ z(s);
9634
9663
  let n = !1;
9635
9664
  const a = () => {
9636
9665
  n || (n = !0, s.remove(), o());
@@ -9651,9 +9680,9 @@ class Ws {
9651
9680
  const r = (e == null ? void 0 : e.allowSkip) ?? !0;
9652
9681
  return new Promise((t) => {
9653
9682
  var a, l, p;
9654
- G();
9683
+ K();
9655
9684
  const s = Cs(this.tokens, r);
9656
- K(s);
9685
+ z(s);
9657
9686
  const o = () => s.remove(), n = () => {
9658
9687
  o(), t("recover");
9659
9688
  };
@@ -9680,7 +9709,7 @@ class Ws {
9680
9709
  */
9681
9710
  showPinSetupPrompt(e) {
9682
9711
  return new Promise((r) => {
9683
- G();
9712
+ K();
9684
9713
  const t = this.messages, s = {
9685
9714
  title: (t == null ? void 0 : t.pin_setup_title) ?? "Create PIN",
9686
9715
  headerSubtitle: (t == null ? void 0 : t.pin_notice_header_subtitle) ?? "Required for transactions, PK/mnemonic export & account deletion.",
@@ -9699,8 +9728,8 @@ class Ws {
9699
9728
  title: (t == null ? void 0 : t.pin_setup_confirm_title) ?? "Confirm PIN",
9700
9729
  headerSubtitle: (t == null ? void 0 : t.pin_setup_header_subtitle) ?? "This PIN is used to authorize your transactions.",
9701
9730
  subtitle: (t == null ? void 0 : t.pin_setup_confirm_subtitle) ?? "Confirm your 6-digit PIN"
9702
- }, a = _t(this.tokens, Ls(s)), l = oe();
9703
- K(a);
9731
+ }, a = _t(this.tokens, Ds(s)), l = oe();
9732
+ z(a);
9704
9733
  let p = !1;
9705
9734
  const h = () => {
9706
9735
  p || (p = !0, a.remove(), l());
@@ -9720,7 +9749,7 @@ class Ws {
9720
9749
  title: n.title,
9721
9750
  headerSubtitle: n.headerSubtitle,
9722
9751
  subtitle: n.subtitle
9723
- }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Le(g, (T) => {
9752
+ }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), De(g, (T) => {
9724
9753
  T === E ? u(E) : y(o.mismatchError);
9725
9754
  }, x);
9726
9755
  }, y = (E) => {
@@ -9730,13 +9759,13 @@ class Ws {
9730
9759
  headerSubtitle: o.headerSubtitle,
9731
9760
  subtitle: o.subtitle,
9732
9761
  errorMessage: E
9733
- }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Le(g, (T) => {
9734
- const R = Ds(T, f);
9762
+ }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), De(g, (T) => {
9763
+ const R = Ls(T, f);
9735
9764
  R ? y(R) : m(T);
9736
9765
  }, x);
9737
9766
  };
9738
9767
  (() => {
9739
- var V;
9768
+ var G;
9740
9769
  const E = Array.from(g.querySelectorAll(".__crossx-pw-notice-item")), A = g.querySelector("#__crossx-pin-notice-next"), T = /* @__PURE__ */ new Set();
9741
9770
  A.removeAttribute("disabled");
9742
9771
  const R = A.dataset.nextLabel ?? "Next", N = A.dataset.submitLabel ?? "I Understand", W = () => {
@@ -9746,7 +9775,7 @@ class Ws {
9746
9775
  if (T.has(O)) return;
9747
9776
  const M = I.querySelector(`#__crossx-notice-check-${O}`);
9748
9777
  T.add(O), M.classList.add("--checked"), I.setAttribute("aria-checked", "true"), W();
9749
- }, D = (I, O) => {
9778
+ }, L = (I, O) => {
9750
9779
  if (!T.has(O)) return;
9751
9780
  const M = I.querySelector(`#__crossx-notice-check-${O}`);
9752
9781
  T.delete(O), M.classList.remove("--checked"), I.setAttribute("aria-checked", "false"), W();
@@ -9754,9 +9783,9 @@ class Ws {
9754
9783
  E.forEach((I) => {
9755
9784
  const O = parseInt(I.dataset.checkIndex ?? "0", 10);
9756
9785
  I.addEventListener("click", () => {
9757
- T.has(O) ? D(I, O) : Y(I, O);
9786
+ T.has(O) ? L(I, O) : Y(I, O);
9758
9787
  }), I.addEventListener("keydown", (M) => {
9759
- (M.key === " " || M.key === "Enter") && (M.preventDefault(), T.has(O) ? D(I, O) : Y(I, O));
9788
+ (M.key === " " || M.key === "Enter") && (M.preventDefault(), T.has(O) ? L(I, O) : Y(I, O));
9760
9789
  });
9761
9790
  }), A.addEventListener("click", () => {
9762
9791
  if (T.size === E.length) {
@@ -9772,7 +9801,7 @@ class Ws {
9772
9801
  I.scrollIntoView({ behavior: "smooth", block: "nearest" }), I.classList.add("--highlight"), setTimeout(() => {
9773
9802
  I.classList.remove("--highlight"), Y(I, O);
9774
9803
  }, 400);
9775
- }), (V = g.querySelector("#__crossx-close-btn")) == null || V.addEventListener("click", x);
9804
+ }), (G = g.querySelector("#__crossx-close-btn")) == null || G.addEventListener("click", x);
9776
9805
  })(), a.addEventListener("click", (E) => {
9777
9806
  E.target === a && x();
9778
9807
  });
@@ -9786,7 +9815,7 @@ class Ws {
9786
9815
  showPinInputPrompt(e) {
9787
9816
  return new Promise((r, t) => {
9788
9817
  var S;
9789
- G();
9818
+ K();
9790
9819
  const s = this.messages, o = (e == null ? void 0 : e.verifyMode) === !0, n = o ? (s == null ? void 0 : s.verify_pin_title) ?? "Verify Your PIN" : (s == null ? void 0 : s.pin_input_title) ?? "Enter PIN", a = o ? (s == null ? void 0 : s.verify_pin_subtitle) ?? "Enter your PIN to authorize this transaction." : (s == null ? void 0 : s.pin_input_subtitle) ?? "Enter your 6-digit PIN to continue.", l = (s == null ? void 0 : s.pin_locked_failure_warning) ?? "Your account will be locked after further failures.", p = _t(
9791
9820
  this.tokens,
9792
9821
  Oe({
@@ -9799,7 +9828,7 @@ class Ws {
9799
9828
  maxAttempts: e == null ? void 0 : e.maxAttempts
9800
9829
  })
9801
9830
  ), h = oe();
9802
- K(p);
9831
+ z(p);
9803
9832
  let u = !1;
9804
9833
  const x = () => {
9805
9834
  u || (u = !0, p.remove(), h());
@@ -9810,7 +9839,7 @@ class Ws {
9810
9839
  }, m = (E) => {
9811
9840
  x(), t(E);
9812
9841
  }, y = p.querySelector(".__crossx-card");
9813
- this.applyPinKeyboardMode(y), (S = y.querySelector("#__crossx-close-btn")) == null || S.addEventListener("click", f), Le(y, g, f, m, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, l), p.addEventListener("click", (E) => {
9842
+ this.applyPinKeyboardMode(y), (S = y.querySelector("#__crossx-close-btn")) == null || S.addEventListener("click", f), De(y, g, f, m, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, l), p.addEventListener("click", (E) => {
9814
9843
  E.target === p && f();
9815
9844
  });
9816
9845
  });
@@ -9825,9 +9854,9 @@ class Ws {
9825
9854
  showRecoveryPinInputPrompt(e) {
9826
9855
  return new Promise((r) => {
9827
9856
  var l;
9828
- G();
9857
+ K();
9829
9858
  const t = Ps(this.tokens, e);
9830
- K(t);
9859
+ z(t);
9831
9860
  const s = () => t.remove(), o = (p) => {
9832
9861
  s(), r(p);
9833
9862
  }, n = () => {
@@ -9847,9 +9876,9 @@ class Ws {
9847
9876
  showRecoveryPinLockedPrompt(e, r) {
9848
9877
  return new Promise((t) => {
9849
9878
  var p;
9850
- G();
9879
+ K();
9851
9880
  const { overlay: s, startCountdown: o } = Os(this.tokens, e, r);
9852
- K(s);
9881
+ z(s);
9853
9882
  const n = () => {
9854
9883
  l(), s.remove();
9855
9884
  }, a = () => {
@@ -9867,9 +9896,9 @@ class Ws {
9867
9896
  showTransactionComplete(e) {
9868
9897
  return new Promise((r) => {
9869
9898
  var a, l;
9870
- G();
9899
+ K();
9871
9900
  const t = hs(e, this.tokens, this.messages);
9872
- K(t);
9901
+ z(t);
9873
9902
  const s = () => t.remove(), o = () => {
9874
9903
  s(), r();
9875
9904
  };
@@ -9896,9 +9925,9 @@ class Ws {
9896
9925
  */
9897
9926
  showTransactionProgress(e, r) {
9898
9927
  return new Promise((t) => {
9899
- G();
9928
+ K();
9900
9929
  const s = _s(e, this.tokens, this.messages);
9901
- K(s);
9930
+ z(s);
9902
9931
  const o = () => s.remove();
9903
9932
  let n = !1;
9904
9933
  const a = () => {
@@ -9921,11 +9950,11 @@ class Ws {
9921
9950
  requestConfirmation(e) {
9922
9951
  return new Promise((r) => {
9923
9952
  var p, h, u;
9924
- G();
9953
+ K();
9925
9954
  let t;
9926
9955
  e.type === "sign-message" ? t = xs(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = gs(e, this.tokens, this.messages) : e.type === "sign" ? t = ss(e, this.tokens, this.displayDecimals, this.messages) : t = ns(e, this.tokens, this.displayDecimals, this.messages);
9927
9956
  const s = oe();
9928
- K(t);
9957
+ z(t);
9929
9958
  const o = () => {
9930
9959
  t.remove(), s();
9931
9960
  }, n = () => {
@@ -9941,7 +9970,7 @@ class Ws {
9941
9970
  f && ((m = navigator.clipboard) == null || m.writeText(f).catch(() => {
9942
9971
  }));
9943
9972
  });
9944
- }), Kr(t), t.addEventListener("click", (x) => {
9973
+ }), zr(t), t.addEventListener("click", (x) => {
9945
9974
  x.target === t && a();
9946
9975
  });
9947
9976
  const l = (x) => {
@@ -10176,9 +10205,9 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10176
10205
  "refresh_token이 평문 저장되지 않도록 세션 영속성이 제한됩니다.",
10177
10206
  "IndexedDB를 지원하는 브라우저 사용을 권장합니다."
10178
10207
  ), t.secureStorageAvailable = o;
10179
- const n = o ? new at(i.projectId) : new yr(), a = new Er(), l = new Tr(), p = new ne(), h = new Gs(), u = new xt();
10208
+ const n = o ? new at(i.projectId) : new br(), a = new Ar(), l = new Rr(), p = new ne(), h = new Gs(), u = new xt();
10180
10209
  let x;
10181
- i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new Fr(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), x = new ae(
10210
+ i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new Br(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), x = new ae(
10182
10211
  s,
10183
10212
  n,
10184
10213
  l,
@@ -10193,7 +10222,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10193
10222
  var N;
10194
10223
  return (N = g == null ? void 0 : g.assertRNBridgeSessionActive) == null ? void 0 : N.call(g);
10195
10224
  };
10196
- x = new Br(
10225
+ x = new Ur(
10197
10226
  x,
10198
10227
  () => {
10199
10228
  var N;
@@ -10234,7 +10263,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10234
10263
  return R && typeof R.setFreshTokenCallback == "function" && R.setFreshTokenCallback(() => T.requestFreshFirebaseIdTokenFromBridge()), typeof window < "u" && (window.__crossxSDK = T), T;
10235
10264
  }
10236
10265
  function ri(i) {
10237
- const e = Ks(i), r = Vs(e), t = JSON.parse(r);
10266
+ const e = Ks(i), r = zs(e), t = JSON.parse(r);
10238
10267
  qs(t);
10239
10268
  const { data: s } = t;
10240
10269
  return {
@@ -10259,15 +10288,15 @@ function Ks(i) {
10259
10288
  }
10260
10289
  return i;
10261
10290
  }
10262
- function Vs(i) {
10291
+ function zs(i) {
10263
10292
  if (i.startsWith("{"))
10264
10293
  return i;
10265
10294
  if (i.startsWith("%7B") || i.startsWith("%7b"))
10266
10295
  return decodeURIComponent(i);
10267
- const e = zs(i);
10296
+ const e = Vs(i);
10268
10297
  return decodeURIComponent(e);
10269
10298
  }
10270
- function zs(i) {
10299
+ function Vs(i) {
10271
10300
  if (typeof atob == "function")
10272
10301
  return atob(i);
10273
10302
  if (typeof Buffer < "u")
@@ -10291,19 +10320,19 @@ function qs(i) {
10291
10320
  throw new Error("Deeplink data에 accessToken 필드가 없습니다");
10292
10321
  }
10293
10322
  export {
10294
- Wt as CONNECT_OTHER_WALLET_DISPLAY_ORDER,
10323
+ Ht as CONNECT_OTHER_WALLET_DISPLAY_ORDER,
10295
10324
  _ as CROSSxError,
10296
- zt as CROSSxEthereumProvider,
10325
+ qt as CROSSxEthereumProvider,
10297
10326
  $e as CROSSxSDK,
10298
10327
  Zs as ChainId,
10299
10328
  ge as ConnectOtherWalletItem,
10300
10329
  d as ErrorCode,
10301
- De as MNEMONIC_ADDRESS_LIMIT,
10330
+ Le as MNEMONIC_ADDRESS_LIMIT,
10302
10331
  xt as PinMemoryStore,
10303
10332
  Gs as TokenMemoryStore,
10304
10333
  He as WALLET_BRAND_NAME,
10305
10334
  ti as createCROSSxSDK,
10306
- Ht as getConnectOtherWalletLabel,
10335
+ Gt as getConnectOtherWalletLabel,
10307
10336
  ve as getWalletBrowserInfo,
10308
10337
  Qs as isWalletInAppBrowser,
10309
10338
  ri as parseOAuthDeeplink,