@nexus-cross/crossx-sdk-core 2.3.3 → 2.3.7-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 mt, jwtVerify as yt, decodeJwt as bt } from "jose";
2
- import { secp256k1 as vt } from "@noble/curves/secp256k1.js";
3
- import { keccak_256 as He } from "@noble/hashes/sha3.js";
4
- import { bytesToHex as St } from "@noble/hashes/utils.js";
1
+ import { createRemoteJWKSet as Et, jwtVerify as At, decodeJwt as It } from "jose";
2
+ import { secp256k1 as kt } from "@noble/curves/secp256k1.js";
3
+ import { keccak_256 as Ve } from "@noble/hashes/sha3.js";
4
+ import { bytesToHex as Tt } 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 h extends Error {
7
7
  constructor(e, r, t) {
@@ -16,22 +16,23 @@ class h extends Error {
16
16
  };
17
17
  }
18
18
  }
19
+ const Rt = 2e3, je = 6e4, Nt = 1e3, Pt = 1e4, Ct = "0x77359400", Ye = "0x3B9ACA00", Xe = 130, Fe = 6, Je = 18, Ze = 3e4, Ot = 5 * 60 * 1e3, Lt = 30 * 1e3, Ce = 100, Dt = "crossx-sdk-js/2.3.7-beta.1", Be = "ONEwallet";
19
20
  var ue = /* @__PURE__ */ ((i) => (i.MetaMask = "io.metamask", i.Binance = "com.binance.wallet", i.CROSSx = "crossx", i))(ue || {});
20
- const Et = {
21
+ const $t = {
21
22
  "io.metamask": "MetaMask",
22
23
  "com.binance.wallet": "Binance Wallet",
23
- crossx: "CROSSx"
24
- }, At = [
24
+ crossx: Be
25
+ }, Mt = [
25
26
  "crossx",
26
27
  "io.metamask",
27
28
  "com.binance.wallet"
28
29
  /* Binance */
29
30
  ];
30
- function It(i) {
31
- return Et[i] ?? i;
31
+ function Ft(i) {
32
+ return $t[i] ?? i;
32
33
  }
33
- function kt(i) {
34
- return Array.isArray(i.connectOtherWallets) && i.connectOtherWallets.length > 0 ? [...i.connectOtherWallets] : i.showConnectOtherWallets === !0 ? [...At] : [];
34
+ function Bt(i) {
35
+ return Array.isArray(i.connectOtherWallets) && i.connectOtherWallets.length > 0 ? [...i.connectOtherWallets] : i.showConnectOtherWallets === !0 ? [...Mt] : [];
35
36
  }
36
37
  const ve = {
37
38
  // ─── CROSS ────────────────────────────────────────────
@@ -45,8 +46,8 @@ const ve = {
45
46
  CROSS_TESTNET: {
46
47
  caipId: "eip155:612044",
47
48
  chainId: 612044,
48
- name: "CROSS Testnet",
49
- nativeCurrency: { symbol: "tCROSS", decimals: 18 },
49
+ name: "ONEchain Testnet",
50
+ nativeCurrency: { symbol: "tONE", decimals: 18 },
50
51
  rpcUrl: "https://testnet.crosstoken.io:22001",
51
52
  testnet: !0
52
53
  },
@@ -82,20 +83,20 @@ const ve = {
82
83
  rpcUrl: "https://saigon-testnet.roninchain.com/rpc",
83
84
  testnet: !0
84
85
  }
85
- }, Ls = Object.fromEntries(
86
+ }, Ws = Object.fromEntries(
86
87
  Object.entries(ve).map(([i, e]) => [i, e.caipId])
87
- ), Tt = new Map(
88
+ ), Wt = new Map(
88
89
  Object.values(ve).map((i) => [i.caipId, i])
89
90
  );
90
91
  new Map(
91
92
  Object.values(ve).map((i) => [i.chainId, i])
92
93
  );
93
- const Rt = { symbol: "", decimals: 18 };
94
+ const Ut = { symbol: "", decimals: 18 };
94
95
  function Ae(i) {
95
96
  var e;
96
- return ((e = Tt.get(i)) == null ? void 0 : e.nativeCurrency) ?? Rt;
97
+ return ((e = Wt.get(i)) == null ? void 0 : e.nativeCurrency) ?? Ut;
97
98
  }
98
- class Ct {
99
+ class Ht {
99
100
  constructor(e, r) {
100
101
  this.sdk = e, this.chainId = r, this._listeners = /* @__PURE__ */ new Map();
101
102
  }
@@ -185,7 +186,7 @@ class Ct {
185
186
  }
186
187
  }
187
188
  let X = null;
188
- function Ge(i) {
189
+ function Qe(i) {
189
190
  X = i;
190
191
  }
191
192
  const c = {
@@ -215,7 +216,7 @@ const c = {
215
216
  return;
216
217
  }
217
218
  }
218
- }, Pt = {
219
+ }, Gt = {
219
220
  // ── 공통 버튼 ────────────────────────────────────────────────
220
221
  confirm: "확인",
221
222
  cancel: "취소",
@@ -337,7 +338,7 @@ const c = {
337
338
  session_alert_apple_account: "Apple 계정",
338
339
  session_alert_sign_out_button: "로그아웃",
339
340
  session_alert_sign_in_again_button: "다시 로그인"
340
- }, ot = {
341
+ }, dt = {
341
342
  // ── Common buttons ───────────────────────────────────────────
342
343
  confirm: "Confirm",
343
344
  cancel: "Cancel",
@@ -382,7 +383,7 @@ const c = {
382
383
  label_including_fees: "(including fees)",
383
384
  label_primary_type: "Primary Type",
384
385
  // ── Login selector modal ─────────────────────────────────────
385
- login_selector_title: "CROSS Wallet",
386
+ login_selector_title: Be,
386
387
  login_selector_subtitle: "Sign in instantly with your social account",
387
388
  login_selector_google: "Sign in with Google",
388
389
  login_selector_apple: "Sign in with Apple",
@@ -458,17 +459,17 @@ For security, you must continue with the same account.`,
458
459
  session_alert_apple_account: "Apple account",
459
460
  session_alert_sign_out_button: "Sign out",
460
461
  session_alert_sign_in_again_button: "Sign in again"
461
- }, Nt = {
462
- ko: Pt,
463
- en: ot
462
+ }, Kt = {
463
+ ko: Gt,
464
+ en: dt
464
465
  };
465
466
  function J(i = "en", e) {
466
- return Nt[i] ?? ot;
467
+ return Kt[i] ?? dt;
467
468
  }
468
- function Ot(i) {
469
+ function zt(i) {
469
470
  return i === "ko" || i === "en" ? i : typeof navigator < "u" && (navigator.language ?? "").toLowerCase().startsWith("ko") ? "ko" : "en";
470
471
  }
471
- const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user_info", be = class be {
472
+ const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user_info", be = class be {
472
473
  constructor(e, r, t, s, o, n, a, l, p = () => {
473
474
  }) {
474
475
  this.config = e, this.storage = r, this.crypto = t, this.oauth = s, this.transport = o, this.walletProvider = n, this.tokenStore = a, this.requestFreshTokenFromBridge = l, this.getLocale = p, this._refreshPromise = null, this._migrated = !1;
@@ -567,7 +568,7 @@ const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user
567
568
  const s = e == null ? void 0 : e.provider;
568
569
  let o = "/login";
569
570
  s === "google" ? o = "/google" : s === "apple" && (o = "/apple");
570
- const { oauthServiceUrl: n } = this.config, a = Ot(this.getLocale()), l = `${n}${o}`, p = l.includes("?") ? "&" : "?", _ = `${l}${p}locale=${a}`;
571
+ const { oauthServiceUrl: n } = this.config, a = zt(this.getLocale()), l = `${n}${o}`, p = l.includes("?") ? "&" : "?", _ = `${l}${p}locale=${a}`;
571
572
  c.log(`[CROSSx] OAuth 팝업 열기 (${s || "일반"} 로그인)`), c.log(`[CROSSx] Auth URL: ${_}`);
572
573
  const u = await this.oauth.openAuth({
573
574
  authUrl: _,
@@ -673,13 +674,13 @@ const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user
673
674
  var o, n, a, l, p;
674
675
  let t, s = !1;
675
676
  try {
676
- const { authApiUrl: _ } = this.config, { accessToken: u, refreshToken: g } = await this.exchangeFirebaseToken(e, _);
677
- let x, f, m;
677
+ const { authApiUrl: _ } = this.config, { accessToken: u, refreshToken: x } = await this.exchangeFirebaseToken(e, _);
678
+ let g, f, m;
678
679
  try {
679
680
  const S = this.crypto.decodeJWT(e);
680
681
  c.log("[CROSSx] Firebase JWT 필드:", Object.keys(S).join(", ")), f = (o = S.firebase) == null ? void 0 : o.sign_in_provider;
681
682
  const E = ((n = S.firebase) == null ? void 0 : n.identities) ?? {};
682
- m = S.email ?? ((a = E.email) == null ? void 0 : a[0]), f === "google.com" ? x = (l = E["google.com"]) == null ? void 0 : l[0] : f === "apple.com" && (x = (p = E["apple.com"]) == null ? void 0 : p[0]), c.log("[CROSSx] OAuth provider sub 추출 — provider:", f, "hasProviderSub:", !!x, "email:", m ?? "(없음)");
683
+ m = S.email ?? ((a = E.email) == null ? void 0 : a[0]), f === "google.com" ? g = (l = E["google.com"]) == null ? void 0 : l[0] : f === "apple.com" && (g = (p = E["apple.com"]) == null ? void 0 : p[0]), c.log("[CROSSx] OAuth provider sub 추출 — provider:", f, "hasProviderSub:", !!g, "email:", m ?? "(없음)");
683
684
  } catch {
684
685
  c.warn("[CROSSx] firebaseToken에서 providerSub 추출 실패");
685
686
  }
@@ -689,7 +690,7 @@ const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user
689
690
  const E = await this.crypto.verifyJWT(u);
690
691
  if (s = E.signatureVerified ?? !1, !E.valid)
691
692
  throw c.error("[CROSSx] access_token 검증 실패"), new Error("유효하지 않은 access token");
692
- const A = E.payload, I = A.email ?? m ?? r;
693
+ const A = E.payload, k = A.email ?? m ?? r;
693
694
  c.log(
694
695
  "[CROSSx] email 소스 — CROSSx JWT:",
695
696
  A.email ?? "(없음)",
@@ -698,20 +699,20 @@ const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user
698
699
  "/ OAuth 콜백:",
699
700
  r ?? "(없음)",
700
701
  "→",
701
- I ?? "(없음)"
702
+ k ?? "(없음)"
702
703
  ), t = {
703
704
  id: A.sub,
704
- email: I,
705
+ email: k,
705
706
  signInProvider: f,
706
- providerSub: x
707
- }, this.tokenStore.set(u), this.useCookieAuth || (await this.storage.set(this.STORAGE_KEY_ACCESS_TOKEN, u), g && this.config.secureStorageAvailable !== !1 ? await this.storage.set(this.STORAGE_KEY_REFRESH_TOKEN, g) : g && c.warn("[CROSSx] 안전한 스토리지 미사용 — refresh_token 영속 저장을 건너뜁니다"));
707
+ providerSub: g
708
+ }, this.tokenStore.set(u), this.useCookieAuth || (await this.storage.set(this.STORAGE_KEY_ACCESS_TOKEN, u), x && this.config.secureStorageAvailable !== !1 ? await this.storage.set(this.STORAGE_KEY_REFRESH_TOKEN, x) : x && c.warn("[CROSSx] 안전한 스토리지 미사용 — refresh_token 영속 저장을 건너뜁니다"));
708
709
  } else {
709
710
  const S = this.crypto.decodeJWT(e);
710
711
  t = {
711
712
  id: S.sub,
712
713
  email: S.email ?? r,
713
714
  signInProvider: f,
714
- providerSub: x
715
+ providerSub: g
715
716
  }, c.log("[CROSSx] Cookie 모드 — Firebase 토큰에서 사용자 정보 추출 — id:", t.id);
716
717
  }
717
718
  c.log("[CROSSx] 사용자 정보 — id:", t.id, "email:", t.email ?? "(없음)");
@@ -1009,13 +1010,13 @@ const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user
1009
1010
  if (!this._migrated) {
1010
1011
  this._migrated = !0;
1011
1012
  try {
1012
- const e = await this.storage.get(qe);
1013
+ const e = await this.storage.get(rt);
1013
1014
  if (!e || await this.storage.get(this.STORAGE_KEY_USER)) return;
1014
1015
  await this.storage.set(this.STORAGE_KEY_USER, e);
1015
- const t = await this.storage.get(Ke);
1016
+ const t = await this.storage.get(et);
1016
1017
  t && await this.storage.set(this.STORAGE_KEY_ACCESS_TOKEN, t);
1017
- const s = await this.storage.get(ze);
1018
- s && await this.storage.set(this.STORAGE_KEY_REFRESH_TOKEN, s), await this.storage.remove(qe), await this.storage.remove(Ke), await this.storage.remove(ze), c.log("[CROSSx] 스토리지 키 마이그레이션 완료 (projectId 스코프)");
1018
+ const s = await this.storage.get(tt);
1019
+ s && await this.storage.set(this.STORAGE_KEY_REFRESH_TOKEN, s), await this.storage.remove(rt), await this.storage.remove(et), await this.storage.remove(tt), c.log("[CROSSx] 스토리지 키 마이그레이션 완료 (projectId 스코프)");
1019
1020
  } catch (e) {
1020
1021
  c.warn("[CROSSx] 스토리지 키 마이그레이션 실패:", e);
1021
1022
  }
@@ -1051,8 +1052,8 @@ const Ke = "crossx_access_token", ze = "crossx_refresh_token", qe = "crossx_user
1051
1052
  }
1052
1053
  };
1053
1054
  be.REFRESH_RELOGIN_CODES = /* @__PURE__ */ new Set([1007, 1008]);
1054
- let Pe = be;
1055
- class Lt {
1055
+ let Oe = be;
1056
+ class qt {
1056
1057
  constructor(e, r, t) {
1057
1058
  this.config = e, this.storage = r, this.tokenStore = t;
1058
1059
  const s = e.projectId;
@@ -1062,7 +1063,7 @@ class Lt {
1062
1063
  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();
1063
1064
  }
1064
1065
  }
1065
- class Dt {
1066
+ class Vt {
1066
1067
  constructor(e, r) {
1067
1068
  this.storage = e, this.walletProvider = r;
1068
1069
  }
@@ -1079,7 +1080,7 @@ class Dt {
1079
1080
  };
1080
1081
  }
1081
1082
  }
1082
- class nt {
1083
+ class pt {
1083
1084
  constructor() {
1084
1085
  this.encryptedBytes = null, this.xorKey = null;
1085
1086
  }
@@ -1120,7 +1121,7 @@ class nt {
1120
1121
  return this.encryptedBytes !== null;
1121
1122
  }
1122
1123
  }
1123
- class $t {
1124
+ class jt {
1124
1125
  constructor(e, r) {
1125
1126
  this.chainRegistry = e, this.transport = r, this._nextId = 1;
1126
1127
  }
@@ -1152,7 +1153,7 @@ class $t {
1152
1153
  return a == null ? void 0 : a.result;
1153
1154
  }
1154
1155
  }
1155
- class Mt {
1156
+ class Yt {
1156
1157
  constructor() {
1157
1158
  this.listeners = /* @__PURE__ */ new Map();
1158
1159
  }
@@ -1175,7 +1176,7 @@ class Mt {
1175
1176
  this.listeners.clear();
1176
1177
  }
1177
1178
  }
1178
- function Ft() {
1179
+ function Xt() {
1179
1180
  var e;
1180
1181
  if (typeof globalThis < "u" && ((e = globalThis.crypto) != null && e.getRandomValues)) {
1181
1182
  const r = new Uint8Array(16);
@@ -1245,7 +1246,7 @@ class Y {
1245
1246
  async handshake() {
1246
1247
  if (!this.bridge)
1247
1248
  throw new h(d.AUTH_NOT_INITIALIZED, "Bridge not initialized");
1248
- const e = Ft(), r = Date.now(), t = {
1249
+ const e = Xt(), r = Date.now(), t = {
1249
1250
  version: 1,
1250
1251
  appId: this.config.appId,
1251
1252
  appVersion: this.config.appVersion,
@@ -1414,29 +1415,32 @@ const pe = {
1414
1415
  oauthServiceUrl: "https://cross-wallet-oauth.crosstoken.io",
1415
1416
  authApiUrl: "https://cross-auth.crosstoken.io",
1416
1417
  walletGatewayUrl: "https://embedded-wallet-gateway.crosstoken.io/api/v1",
1417
- portraitBaseUrl: "https://portrait.crosstoken.io"
1418
+ portraitBaseUrl: "https://portrait.crosstoken.io",
1419
+ contentsBaseUrl: "https://contents.crosstoken.io/frontend/common/app-launcher"
1418
1420
  },
1419
1421
  staging: {
1420
1422
  oauthServiceUrl: "https://stg-cross-wallet-oauth.crosstoken.io",
1421
1423
  authApiUrl: "https://stg-cross-auth.crosstoken.io",
1422
1424
  walletGatewayUrl: "https://stg-embedded-wallet-gateway.crosstoken.io/api/v1",
1423
- portraitBaseUrl: "https://dev-portrait.crosstoken.io"
1425
+ portraitBaseUrl: "https://dev-portrait.crosstoken.io",
1426
+ contentsBaseUrl: "https://stg-contents.crosstoken.io/frontend/common/app-launcher"
1424
1427
  },
1425
1428
  development: {
1426
1429
  oauthServiceUrl: "https://dev-cross-wallet-oauth.crosstoken.io",
1427
1430
  authApiUrl: "https://dev-cross-auth.crosstoken.io",
1428
1431
  walletGatewayUrl: "https://dev-embedded-wallet-gateway.crosstoken.io/api/v1",
1429
- portraitBaseUrl: "https://dev-portrait.crosstoken.io"
1432
+ portraitBaseUrl: "https://dev-portrait.crosstoken.io",
1433
+ contentsBaseUrl: "https://stg-contents.crosstoken.io/frontend/common/app-launcher"
1430
1434
  }
1431
1435
  };
1432
- function Bt(i) {
1436
+ function Jt(i) {
1433
1437
  const e = i.environment;
1434
1438
  return e && e in pe ? pe[e] : null;
1435
1439
  }
1436
- function at() {
1440
+ function We() {
1437
1441
  try {
1438
1442
  if (typeof __CROSSX_CONFIG__ < "u") {
1439
- const i = typeof __CROSSX_CONFIG__ == "string" ? JSON.parse(__CROSSX_CONFIG__) : __CROSSX_CONFIG__, e = Bt(i);
1443
+ const i = typeof __CROSSX_CONFIG__ == "string" ? JSON.parse(__CROSSX_CONFIG__) : __CROSSX_CONFIG__, e = Jt(i);
1440
1444
  if (e) return e;
1441
1445
  }
1442
1446
  } catch {
@@ -1449,48 +1453,47 @@ function at() {
1449
1453
  }
1450
1454
  return pe.production;
1451
1455
  }
1452
- const Wt = 2e3, Ve = 6e4, Ut = 1e3, Ht = 1e4, Gt = "0x77359400", je = "0x3B9ACA00", Ye = 130, Me = 6, Xe = 18, Je = 3e4, Kt = 5 * 60 * 1e3, zt = 30 * 1e3, Ne = 100, qt = "crossx-sdk-js/2.3.3";
1453
- function ct(i) {
1456
+ function _t(i) {
1454
1457
  let e = i.length;
1455
1458
  for (; e > 0 && i.charCodeAt(e - 1) === 48; ) e--;
1456
1459
  return i.slice(0, e);
1457
1460
  }
1458
- function Vt(i, e = Me) {
1461
+ function Zt(i, e = Fe) {
1459
1462
  if (!i || i === "0x0" || i === "0x") return "0";
1460
1463
  try {
1461
1464
  const r = BigInt(i);
1462
1465
  if (r === 0n) return "0";
1463
- const t = 10n ** BigInt(Xe), s = r / t, n = (r % t).toString().padStart(Xe, "0"), a = ct(n).slice(0, e);
1466
+ const t = 10n ** BigInt(Je), s = r / t, n = (r % t).toString().padStart(Je, "0"), a = _t(n).slice(0, e);
1464
1467
  return a ? `${s}.${a}` : `${s}`;
1465
1468
  } catch {
1466
1469
  return "?";
1467
1470
  }
1468
1471
  }
1469
- function we(i, e, r, t = Me) {
1472
+ function we(i, e, r, t = Fe) {
1470
1473
  if (!(!i || i === "0x" || i === "0x0"))
1471
1474
  try {
1472
1475
  const s = BigInt(i);
1473
1476
  if (s === 0n) return;
1474
- const o = 10n ** BigInt(r), n = s / o, l = (s % o).toString().padStart(r, "0"), p = ct(l.slice(0, t));
1477
+ const o = 10n ** BigInt(r), n = s / o, l = (s % o).toString().padStart(r, "0"), p = _t(l.slice(0, t));
1475
1478
  return `${p ? `${n}.${p}` : `${n}`} ${e}`;
1476
1479
  } catch {
1477
1480
  return;
1478
1481
  }
1479
1482
  }
1480
- function jt(i) {
1483
+ function Qt(i) {
1481
1484
  const e = i.startsWith("0x") ? i.slice(2) : i;
1482
1485
  if (!/^[0-9a-fA-F]+$/.test(e))
1483
1486
  throw new h(
1484
1487
  d.SIGNATURE_FAILED,
1485
1488
  "유효하지 않은 서명: 올바른 hex 문자열이 아닙니다"
1486
1489
  );
1487
- if (e.length !== Ye)
1490
+ if (e.length !== Xe)
1488
1491
  throw new h(
1489
1492
  d.SIGNATURE_FAILED,
1490
- `서명 길이가 유효하지 않습니다: ${Ye} hex 문자(65 바이트) 예상, 현재 ${e.length}`
1493
+ `서명 길이가 유효하지 않습니다: ${Xe} hex 문자(65 바이트) 예상, 현재 ${e.length}`
1491
1494
  );
1492
1495
  }
1493
- function Yt(i) {
1496
+ function er(i) {
1494
1497
  const e = i.startsWith("0x") ? i.slice(2) : i;
1495
1498
  if (!/^[0-9a-fA-F]+$/.test(e))
1496
1499
  throw new h(
@@ -1503,8 +1506,8 @@ function Yt(i) {
1503
1506
  "유효하지 않은 서명된 트랜잭션: 너무 짧습니다"
1504
1507
  );
1505
1508
  }
1506
- function Xt(i, e) {
1507
- const r = Jt(e);
1509
+ function tr(i, e) {
1510
+ const r = rr(e);
1508
1511
  if (i === "0") {
1509
1512
  if (r !== void 0 && r !== 0)
1510
1513
  throw new h(
@@ -1528,7 +1531,7 @@ function Xt(i, e) {
1528
1531
  );
1529
1532
  }
1530
1533
  }
1531
- function Jt(i) {
1534
+ function rr(i) {
1532
1535
  if (i == null || typeof i != "object") return;
1533
1536
  const e = i.domain;
1534
1537
  if (e == null || typeof e != "object") return;
@@ -1552,7 +1555,8 @@ class de {
1552
1555
  this.deps.pinStore.set(e), c.log("[CROSSx] PIN 설정 완료 (메모리 캐시)");
1553
1556
  }
1554
1557
  async ensurePinForSigning(e) {
1555
- if (this.deps.pinStore.has() && !e) return;
1558
+ var t, s;
1559
+ if ((s = (t = this.deps).isRNBridgeMode) != null && s.call(t) || this.deps.pinStore.has() && !e) return;
1556
1560
  e && this.deps.pinStore.clear();
1557
1561
  const r = await this.deps.confirmation.showPinInputPrompt({ errorMessage: e });
1558
1562
  if (!r)
@@ -1563,6 +1567,8 @@ class de {
1563
1567
  this.deps.pinStore.set(r), c.log("[CROSSx] PIN 입력 완료 (메모리 캐시)");
1564
1568
  }
1565
1569
  async ensureVerifiedPin(e, r, t, s) {
1570
+ var l, p;
1571
+ if ((p = (l = this.deps).isRNBridgeMode) != null && p.call(l)) return;
1566
1572
  if (e)
1567
1573
  this.deps.pinStore.clear();
1568
1574
  else if (this.deps.pinStore.has())
@@ -1572,67 +1578,67 @@ class de {
1572
1578
  return;
1573
1579
  }
1574
1580
  let o, n;
1575
- this.verifyPinMutex = new Promise((l, p) => {
1576
- o = l, n = p;
1581
+ this.verifyPinMutex = new Promise((_, u) => {
1582
+ o = _, n = u;
1577
1583
  });
1578
1584
  const a = J(this.deps.getLocale() ?? "en");
1579
1585
  try {
1580
1586
  if (typeof this.deps.walletProvider.verifyPin != "function") {
1581
- const p = await this.deps.confirmation.showPinInputPrompt({
1587
+ const u = await this.deps.confirmation.showPinInputPrompt({
1582
1588
  verifyMode: !0,
1583
1589
  errorMessage: e,
1584
1590
  lockExpiresAt: r,
1585
1591
  attemptCount: t,
1586
1592
  maxAttempts: s
1587
1593
  });
1588
- if (!p)
1594
+ if (!u)
1589
1595
  throw new h(
1590
1596
  d.PIN_CANCELLED,
1591
1597
  "사용자가 PIN 입력을 취소했습니다"
1592
1598
  );
1593
- this.deps.pinStore.set(p), c.log("[CROSSx] PIN 캐시 완료 (verifyPin 미지원, 로컬 전용)"), o();
1599
+ this.deps.pinStore.set(u), c.log("[CROSSx] PIN 캐시 완료 (verifyPin 미지원, 로컬 전용)"), o();
1594
1600
  return;
1595
1601
  }
1596
- const l = await this.deps.confirmation.showPinInputPrompt({
1602
+ const _ = await this.deps.confirmation.showPinInputPrompt({
1597
1603
  verifyMode: !0,
1598
1604
  errorMessage: e,
1599
1605
  lockExpiresAt: r,
1600
1606
  attemptCount: t,
1601
1607
  maxAttempts: s,
1602
- onSubmit: async (p) => {
1603
- this.deps.pinStore.set(p);
1608
+ onSubmit: async (u) => {
1609
+ this.deps.pinStore.set(u);
1604
1610
  try {
1605
- return await this.deps.walletProvider.verifyPin(p) ? (c.log("[CROSSx] PIN 서버 검증 완료 (verify-password)"), { ok: !0 }) : (this.deps.pinStore.clear(), { ok: !1, error: a.pin_input_error });
1606
- } catch (_) {
1607
- if (this.deps.pinStore.clear(), _ instanceof h) {
1608
- if (_.code === d.PIN_WRONG)
1611
+ return await this.deps.walletProvider.verifyPin(u) ? (c.log("[CROSSx] PIN 서버 검증 완료 (verify-password)"), { ok: !0 }) : (this.deps.pinStore.clear(), { ok: !1, error: a.pin_input_error });
1612
+ } catch (x) {
1613
+ if (this.deps.pinStore.clear(), x instanceof h) {
1614
+ if (x.code === d.PIN_WRONG)
1609
1615
  return { ok: !1, error: a.pin_input_error };
1610
- if (_.code === d.PIN_INVALID)
1611
- return { ok: !1, error: _.message };
1612
- if (_.code === d.PIN_LOCKED)
1613
- return de.buildPinLockedResult(_, a);
1616
+ if (x.code === d.PIN_INVALID)
1617
+ return { ok: !1, error: x.message };
1618
+ if (x.code === d.PIN_LOCKED)
1619
+ return de.buildPinLockedResult(x, a);
1614
1620
  }
1615
- throw _;
1621
+ throw x;
1616
1622
  }
1617
1623
  }
1618
1624
  });
1619
- if (!l)
1625
+ if (!_)
1620
1626
  throw new h(
1621
1627
  d.PIN_CANCELLED,
1622
1628
  "사용자가 PIN 입력을 취소했습니다"
1623
1629
  );
1624
- this.deps.pinStore.set(l), c.log("[CROSSx] PIN 갱신 완료 (verify 모달 닫힘)"), o();
1625
- } catch (l) {
1626
- if (l instanceof h && (l.code === d.AUTH_NOT_AUTHENTICATED || l.code === d.AUTH_TOKEN_EXPIRED || l.code === d.SESSION_EXPIRED) && l.code !== d.SESSION_EXPIRED) {
1627
- const p = J(this.deps.getLocale() ?? "en"), _ = this.deps.getUserEmail();
1630
+ this.deps.pinStore.set(_), c.log("[CROSSx] PIN 갱신 완료 (verify 모달 닫힘)"), o();
1631
+ } catch (_) {
1632
+ if (_ instanceof h && (_.code === d.AUTH_NOT_AUTHENTICATED || _.code === d.AUTH_TOKEN_EXPIRED || _.code === d.SESSION_EXPIRED) && _.code !== d.SESSION_EXPIRED) {
1633
+ const u = J(this.deps.getLocale() ?? "en"), x = this.deps.getUserEmail();
1628
1634
  if (await this.deps.confirmation.showSessionAlert({
1629
- title: p.session_alert_title,
1630
- message: p.alert_session_expired,
1631
- email: _ ? this.deps.maskEmail(_, p.session_alert_apple_account) : void 0
1635
+ title: u.session_alert_title,
1636
+ message: u.alert_session_expired,
1637
+ email: x ? this.deps.maskEmail(x, u.session_alert_apple_account) : void 0
1632
1638
  }) === "signin-again" && (await this.deps.signInAgain()).success)
1633
- throw n(l), l;
1639
+ throw n(_), _;
1634
1640
  }
1635
- throw n(l), l;
1641
+ throw n(_), _;
1636
1642
  } finally {
1637
1643
  this.verifyPinMutex = null;
1638
1644
  }
@@ -1689,7 +1695,7 @@ class de {
1689
1695
  return { ok: !1, error: s, ...o };
1690
1696
  }
1691
1697
  }
1692
- class Zt {
1698
+ class sr {
1693
1699
  constructor(e) {
1694
1700
  this.deps = e;
1695
1701
  }
@@ -1710,10 +1716,10 @@ class Zt {
1710
1716
  });
1711
1717
  }
1712
1718
  }
1713
- function Qt(i) {
1719
+ function ir(i) {
1714
1720
  return i === "google" || i === "apple";
1715
1721
  }
1716
- class er {
1722
+ class or {
1717
1723
  constructor(e) {
1718
1724
  this.deps = e;
1719
1725
  }
@@ -1724,7 +1730,7 @@ class er {
1724
1730
  this.deps.setRecoveringSession(!0);
1725
1731
  try {
1726
1732
  this.deps.setAuthenticated(!1), this.deps.clearTokenStore();
1727
- const s = Qt(e.loginType) ? { provider: e.loginType } : void 0;
1733
+ const s = ir(e.loginType) ? { provider: e.loginType } : void 0;
1728
1734
  let o;
1729
1735
  try {
1730
1736
  o = await this.deps.executeSignIn(s);
@@ -1804,7 +1810,7 @@ class er {
1804
1810
  }
1805
1811
  }
1806
1812
  }
1807
- class tr {
1813
+ class nr {
1808
1814
  constructor(e) {
1809
1815
  this.deps = e;
1810
1816
  }
@@ -1827,7 +1833,7 @@ class tr {
1827
1833
  let l, p = !1;
1828
1834
  if (r) {
1829
1835
  const u = n.find(
1830
- (g) => g.address.toLowerCase() === r.toLowerCase()
1836
+ (x) => x.address.toLowerCase() === r.toLowerCase()
1831
1837
  );
1832
1838
  u ? l = u : (l = { address: r, index: 0 }, p = !0);
1833
1839
  } else e !== void 0 ? l = n.find((u) => u.index === e) ?? n[0] : l = n[0];
@@ -1851,7 +1857,7 @@ class tr {
1851
1857
  c.log("[CROSSx] 세션 복원 후 지갑 주소 로드 완료:", a.address), this.deps.setActiveWallet(a.address, 0);
1852
1858
  }
1853
1859
  }
1854
- class rr {
1860
+ class ar {
1855
1861
  constructor(e) {
1856
1862
  this.deps = e;
1857
1863
  }
@@ -1897,11 +1903,11 @@ class rr {
1897
1903
  c.log("[CROSSx][Migration Phase 4] PIN 검증 성공"), a = _;
1898
1904
  break;
1899
1905
  }
1900
- const g = u.pinStatus;
1901
- if (n = g.maxAttempts, o = n - g.remainingAttempts, g.remainingAttempts === 0 && g.lockExpiresAt) {
1902
- const x = g.lockExpiresAt * 1e3, f = Math.max(
1906
+ const x = u.pinStatus;
1907
+ if (n = x.maxAttempts, o = n - x.remainingAttempts, x.remainingAttempts === 0 && x.lockExpiresAt) {
1908
+ const g = x.lockExpiresAt * 1e3, f = Math.max(
1903
1909
  1,
1904
- Math.round((x - Date.now()) / 1e3)
1910
+ Math.round((g - Date.now()) / 1e3)
1905
1911
  ), m = f <= 1800 ? "Too many failed attempts. Please try again in 30 minutes." : "Too many failed attempts. Please try again in 24 hours.";
1906
1912
  c.warn(
1907
1913
  `[CROSSx][Migration Phase 4] verify-recovery-pin 잠금 — ${f}초, 메시지: ${m}`
@@ -1919,11 +1925,11 @@ class rr {
1919
1925
  c.warn(
1920
1926
  "[CROSSx][Migration Phase 4] 세션 만료 — 재로그인 후 PIN 입력 재시도"
1921
1927
  );
1922
- const g = J(this.deps.getLocale() ?? "en"), x = this.deps.getUserEmail();
1928
+ const x = J(this.deps.getLocale() ?? "en"), g = this.deps.getUserEmail();
1923
1929
  if (await this.deps.confirmation.showSessionAlert({
1924
- title: g.session_alert_title,
1925
- message: g.alert_session_expired,
1926
- email: x ? this.deps.maskEmail(x, g.session_alert_apple_account) : void 0
1930
+ title: x.session_alert_title,
1931
+ message: x.alert_session_expired,
1932
+ email: g ? this.deps.maskEmail(g, x.session_alert_apple_account) : void 0
1927
1933
  }) === "signin-again" && (await this.deps.signInAgain()).success) {
1928
1934
  c.log(
1929
1935
  "[CROSSx][Migration Phase 4] 재로그인 성공 — PIN 입력 루프 계속"
@@ -1933,17 +1939,17 @@ class rr {
1933
1939
  throw this.deps.clearAuthState(), u;
1934
1940
  }
1935
1941
  if (u.code === d.MIGRATION_PIN_LOCKED) {
1936
- const g = u.details;
1937
- if (n = (g == null ? void 0 : g.maxAttempts) ?? 5, (g == null ? void 0 : g.permanent) === !0)
1942
+ const x = u.details;
1943
+ if (n = (x == null ? void 0 : x.maxAttempts) ?? 5, (x == null ? void 0 : x.permanent) === !0)
1938
1944
  return c.warn(
1939
1945
  "[CROSSx][Migration Phase 4] PIN 영구 잠금 (verify-recovery-pin)"
1940
1946
  ), await this.deps.confirmation.showRecoveryPinLockedPrompt(
1941
1947
  0,
1942
1948
  "Your account has been permanently locked due to too many failed attempts."
1943
1949
  ), null;
1944
- const x = ((g == null ? void 0 : g.lockExpiresAt) ?? 0) * 1e3, f = Math.max(
1950
+ const g = ((x == null ? void 0 : x.lockExpiresAt) ?? 0) * 1e3, f = Math.max(
1945
1951
  1,
1946
- Math.round((x - Date.now()) / 1e3)
1952
+ Math.round((g - Date.now()) / 1e3)
1947
1953
  ), m = f <= 1800 ? "Too many failed attempts. Please try again in 30 minutes." : "Too many failed attempts. Please try again in 24 hours.";
1948
1954
  c.warn(
1949
1955
  `[CROSSx][Migration Phase 4] verify-recovery-pin 이미 잠금 — ${f}초`
@@ -1977,11 +1983,11 @@ class rr {
1977
1983
  c.warn(
1978
1984
  "[CROSSx][Migration Phase 5] 세션 만료 — 재로그인 후 마이그레이션 재시도"
1979
1985
  );
1980
- const u = J(this.deps.getLocale() ?? "en"), g = this.deps.getUserEmail();
1986
+ const u = J(this.deps.getLocale() ?? "en"), x = this.deps.getUserEmail();
1981
1987
  if (await this.deps.confirmation.showSessionAlert({
1982
1988
  title: u.session_alert_title,
1983
1989
  message: u.alert_session_expired,
1984
- email: g ? this.deps.maskEmail(g, u.session_alert_apple_account) : void 0
1990
+ email: x ? this.deps.maskEmail(x, u.session_alert_apple_account) : void 0
1985
1991
  }) === "signin-again" && (await this.deps.signInAgain()).success) {
1986
1992
  c.log(
1987
1993
  "[CROSSx][Migration Phase 5] 재로그인 성공 — 마이그레이션 재시도 (검증된 PIN 유지)"
@@ -2008,12 +2014,12 @@ class rr {
2008
2014
  }
2009
2015
  }
2010
2016
  }
2011
- class sr {
2017
+ class cr {
2012
2018
  constructor(e) {
2013
2019
  this.deps = e;
2014
2020
  }
2015
2021
  async withResolvedGasAndFee(e, r) {
2016
- const t = (x) => !(x != null && x.trim()), s = e.nonce === void 0 || e.nonce === null, o = t(e.gasLimit), n = t(e.gasPrice) && t(e.maxFeePerGas), a = !t(e.maxFeePerGas) && t(e.maxPriorityFeePerGas);
2022
+ const t = (g) => !(g != null && g.trim()), s = e.nonce === void 0 || e.nonce === null, o = t(e.gasLimit), n = t(e.gasPrice) && t(e.maxFeePerGas), a = !t(e.maxFeePerGas) && t(e.maxPriorityFeePerGas);
2017
2023
  if (!s && !o && !n && !a) return e;
2018
2024
  const l = { ...e }, p = s ? l.from ?? this.deps.getActiveAddress() ?? void 0 : void 0;
2019
2025
  p && c.log(
@@ -2023,7 +2029,7 @@ class sr {
2023
2029
  ), o && c.log("[CROSSx] gasLimit 비어있음 → eth_estimateGas 호출"), n && c.log(
2024
2030
  "[CROSSx] gasPrice & maxFeePerGas 비어있음 → baseFee 조회로 Dynamic/Legacy 판별"
2025
2031
  );
2026
- const [_, u, g] = await Promise.all([
2032
+ const [_, u, x] = await Promise.all([
2027
2033
  p ? this.deps.jsonRpcCall(
2028
2034
  "eth_getTransactionCount",
2029
2035
  [p, "pending"],
@@ -2033,23 +2039,23 @@ class sr {
2033
2039
  n ? this.deps.getBaseFeePerGas(r) : null
2034
2040
  ]);
2035
2041
  if (p && (l.nonce = parseInt(_ ?? "0x0", 16), c.log("[CROSSx] nonce 결과:", l.nonce)), o && (l.gasLimit = u, c.log("[CROSSx] estimateGas 결과:", l.gasLimit)), n) {
2036
- const x = g;
2037
- if (x) {
2038
- const f = je;
2039
- l.maxFeePerGas = `0x${(BigInt(x) + BigInt(f)).toString(16)}`, l.maxPriorityFeePerGas = f, c.log(
2042
+ const g = x;
2043
+ if (g) {
2044
+ const f = Ye;
2045
+ l.maxFeePerGas = `0x${(BigInt(g) + BigInt(f)).toString(16)}`, l.maxPriorityFeePerGas = f, c.log(
2040
2046
  "[CROSSx] Dynamic 체인 감지 — baseFee:",
2041
- x,
2047
+ g,
2042
2048
  "maxFeePerGas:",
2043
2049
  l.maxFeePerGas,
2044
2050
  "maxPriorityFeePerGas: 1 Gwei"
2045
2051
  );
2046
2052
  } else
2047
- l.gasPrice = Gt, c.log("[CROSSx] Legacy 체인 감지 — gasPrice: 2 Gwei");
2053
+ l.gasPrice = Ct, c.log("[CROSSx] Legacy 체인 감지 — gasPrice: 2 Gwei");
2048
2054
  }
2049
- return !n && a && (l.maxPriorityFeePerGas = je, c.log("[CROSSx] maxPriorityFeePerGas 비어있음 → 1 Gwei 기본값 적용")), l;
2055
+ return !n && a && (l.maxPriorityFeePerGas = Ye, c.log("[CROSSx] maxPriorityFeePerGas 비어있음 → 1 Gwei 기본값 적용")), l;
2050
2056
  }
2051
2057
  }
2052
- class ir {
2058
+ class lr {
2053
2059
  constructor(e) {
2054
2060
  this.crypto = e;
2055
2061
  }
@@ -2075,10 +2081,10 @@ class ir {
2075
2081
  }
2076
2082
  }
2077
2083
  }
2078
- function or(i) {
2084
+ function dr(i) {
2079
2085
  return i ? i.includes("google") ? "google" : i.includes("apple") ? "apple" : i : null;
2080
2086
  }
2081
- class nr {
2087
+ class pr {
2082
2088
  constructor(e) {
2083
2089
  this.deps = e;
2084
2090
  }
@@ -2100,7 +2106,7 @@ class nr {
2100
2106
  activeWalletIndex: 0,
2101
2107
  userEmail: ((s = e.user) == null ? void 0 : s.email) ?? null,
2102
2108
  providerSub: ((o = e.user) == null ? void 0 : o.providerSub) ?? null,
2103
- loginType: or(
2109
+ loginType: dr(
2104
2110
  (n = e.user) == null ? void 0 : n.signInProvider
2105
2111
  ),
2106
2112
  tokenSignatureVerified: e.tokenSignatureVerified ?? !1
@@ -2129,7 +2135,7 @@ class nr {
2129
2135
  });
2130
2136
  }
2131
2137
  }
2132
- class ar {
2138
+ class _r {
2133
2139
  constructor(e) {
2134
2140
  this.deps = e;
2135
2141
  }
@@ -2148,7 +2154,7 @@ class ar {
2148
2154
  )).address, index: e };
2149
2155
  }
2150
2156
  }
2151
- class cr {
2157
+ class hr {
2152
2158
  constructor(e) {
2153
2159
  this.deps = e;
2154
2160
  }
@@ -2167,7 +2173,7 @@ class cr {
2167
2173
  );
2168
2174
  }
2169
2175
  }
2170
- class lr {
2176
+ class ur {
2171
2177
  constructor(e) {
2172
2178
  this.deps = e;
2173
2179
  }
@@ -2227,11 +2233,11 @@ class lr {
2227
2233
  }
2228
2234
  }
2229
2235
  }
2230
- function Ze(i, e) {
2236
+ function st(i, e) {
2231
2237
  const r = i.replace(/\/$/, ""), t = e.startsWith("/") ? e : `/${e}`;
2232
2238
  return `${r}/cross-auth${t}`;
2233
2239
  }
2234
- class dr {
2240
+ class xr {
2235
2241
  constructor(e) {
2236
2242
  this.deps = e;
2237
2243
  }
@@ -2267,7 +2273,7 @@ class dr {
2267
2273
  d.TX_INVALID_PARAMS,
2268
2274
  "invalid param body"
2269
2275
  );
2270
- const o = this.deps.getApiBaseUrl(), n = Ze(o, `/v2/token-historical/${e}/${s}`), a = { clientVersion: t };
2276
+ const o = this.deps.getApiBaseUrl(), n = st(o, `/v2/token-historical/${e}/${s}`), a = { clientVersion: t };
2271
2277
  try {
2272
2278
  c.log("[TokenHistory] Registering tx:", e, s);
2273
2279
  const l = await this.deps.transport.request({
@@ -2297,7 +2303,7 @@ class dr {
2297
2303
  */
2298
2304
  async getTokenHistory(e) {
2299
2305
  var s;
2300
- const r = this.deps.getApiBaseUrl(), t = new URL(Ze(r, "/v2/token-historical"));
2306
+ const r = this.deps.getApiBaseUrl(), t = new URL(st(r, "/v2/token-historical"));
2301
2307
  (e == null ? void 0 : e.lastTimestamp) !== void 0 && t.searchParams.append("last_timestamp", e.lastTimestamp.toString()), (e == null ? void 0 : e.lastTxIndex) !== void 0 && t.searchParams.append("last_tx_index", e.lastTxIndex.toString());
2302
2308
  try {
2303
2309
  c.log("[TokenHistory] Fetching token history");
@@ -2379,10 +2385,10 @@ function Ie(i, e = "Apple account") {
2379
2385
  const t = i.substring(0, r), s = i.substring(r);
2380
2386
  return t.length <= 1 ? `${t}${"*".repeat(Math.max(t.length, 1))}${s}` : `${t[0]}${"*".repeat(t.length - 1)}${s}`;
2381
2387
  }
2382
- const oe = class oe extends Mt {
2388
+ const oe = class oe extends Yt {
2383
2389
  constructor(e, r, t, s, o, n, a, l, p, _, u) {
2384
- var g, x;
2385
- 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 && Ge(e.logger), this.confirmation = p, this.pinStore = u ?? new nt(), this.stateManager = new nr({
2390
+ var x, g;
2391
+ 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 && Qe(e.logger), this.confirmation = p, this.pinStore = u ?? new pt(), this.stateManager = new pr({
2386
2392
  setState: (f) => {
2387
2393
  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);
2388
2394
  },
@@ -2405,20 +2411,24 @@ const oe = class oe extends Mt {
2405
2411
  getLocale: () => this._config.locale,
2406
2412
  getUserEmail: () => this.userEmail,
2407
2413
  maskEmail: Ie,
2408
- signInAgain: () => this.signInAgain()
2409
- }), this.signingOrchestrator = new Zt({
2414
+ signInAgain: () => this.signInAgain(),
2415
+ // §12 native sign delegation: bridge 자동 로그인 세션이면 JS PIN 단계를 스킵한다.
2416
+ // dApp 이 sdk.pinOrchestrator.ensureVerifiedPin() 을 직접 호출해도 (SigningOrchestrator 우회)
2417
+ // WebView 안에서 embedded PIN 프롬프트가 뜨지 않도록 게이팅. SigningOrchestrator 와 동일 신호.
2418
+ isRNBridgeMode: () => this._isAuthenticatedViaRNBridge
2419
+ }), this.signingOrchestrator = new sr({
2410
2420
  confirmation: this.confirmation,
2411
2421
  walletProvider: this.walletProvider,
2412
2422
  pinOrchestrator: this.pinOrchestrator,
2413
2423
  // §12 native sign delegation: 이 SDK 세션이 RN bridge 자동 로그인으로 인증된 경우만 활성.
2414
2424
  // 자동 로그인 거부 / OAuth 로 별도 로그인한 세션에서는 native SDK 가 미인증이라 우회한다.
2415
2425
  isRNBridgeMode: () => this._isAuthenticatedViaRNBridge
2416
- }), this.walletLifecycleService = new tr({
2426
+ }), this.walletLifecycleService = new nr({
2417
2427
  walletProvider: this.walletProvider,
2418
2428
  pinOrchestrator: this.pinOrchestrator,
2419
2429
  getUserId: () => this.userId,
2420
2430
  setActiveWallet: (f, m, y) => this.setActiveWallet(f, m, y)
2421
- }), this.migrationOrchestrator = new rr({
2431
+ }), this.migrationOrchestrator = new ar({
2422
2432
  confirmation: this.confirmation,
2423
2433
  walletProvider: this.walletProvider,
2424
2434
  pinOrchestrator: this.pinOrchestrator,
@@ -2432,21 +2442,21 @@ const oe = class oe extends Mt {
2432
2442
  var f;
2433
2443
  return ((f = this._config.migration) == null ? void 0 : f.allowSkip) ?? !0;
2434
2444
  }
2435
- }), this.transactionLifecycleService = new sr({
2445
+ }), this.transactionLifecycleService = new cr({
2436
2446
  getActiveAddress: () => this.address,
2437
2447
  estimateGas: (f, m) => this.estimateGas(f, m),
2438
2448
  getBaseFeePerGas: (f) => this.getBaseFeePerGas(f),
2439
2449
  jsonRpcCall: (f, m, y) => this.jsonRpc.call(f, m, y)
2440
- }), this.signatureVerifier = new ir(this.crypto), this.addressResolverService = new ar({
2450
+ }), this.signatureVerifier = new lr(this.crypto), this.addressResolverService = new _r({
2441
2451
  walletProvider: this.walletProvider,
2442
2452
  pinOrchestrator: this.pinOrchestrator,
2443
2453
  getActiveAddress: () => this.address,
2444
2454
  getActiveWalletIndex: () => this.activeWalletIndex,
2445
2455
  getUserId: () => this.userId
2446
- }), this.authGuardService = new cr({
2456
+ }), this.authGuardService = new hr({
2447
2457
  isInitialized: () => this.initialized,
2448
2458
  isAuthenticated: () => this.authenticated
2449
- }), this.walletCreationService = new lr({
2459
+ }), this.walletCreationService = new ur({
2450
2460
  walletProvider: this.walletProvider,
2451
2461
  pinOrchestrator: this.pinOrchestrator,
2452
2462
  migrationOrchestrator: this.migrationOrchestrator,
@@ -2458,10 +2468,10 @@ const oe = class oe extends Mt {
2458
2468
  var f, m;
2459
2469
  return ((m = (f = this.confirmation).showWalletCreatedPrompt) == null ? void 0 : m.call(f)) ?? Promise.resolve();
2460
2470
  }
2461
- }), this.tokenHistoryService = new dr({
2471
+ }), this.tokenHistoryService = new xr({
2462
2472
  transport: o,
2463
2473
  getApiBaseUrl: () => this.internalConfig.authApiUrl
2464
- }), this.sessionOrchestrator = new er({
2474
+ }), this.sessionOrchestrator = new or({
2465
2475
  ensureInitialized: () => this.ensureInitialized(),
2466
2476
  getSessionSnapshot: () => ({
2467
2477
  providerSub: this.providerSub,
@@ -2484,7 +2494,7 @@ const oe = class oe extends Mt {
2484
2494
  loadWalletAfterAuth: () => this.walletLifecycleService.loadWalletAfterAuth(),
2485
2495
  getLocale: () => this._config.locale,
2486
2496
  maskEmail: Ie
2487
- }), this.chainRegistry = _, this.jsonRpc = new $t(_, o), this.signInUseCase = new Pe(
2497
+ }), this.chainRegistry = _, this.jsonRpc = new jt(_, o), this.signInUseCase = new Oe(
2488
2498
  this.internalConfig,
2489
2499
  t,
2490
2500
  s,
@@ -2494,7 +2504,7 @@ const oe = class oe extends Mt {
2494
2504
  l,
2495
2505
  void 0,
2496
2506
  () => this._config.locale
2497
- ), this.signOutUseCase = new Lt(this.internalConfig, t, l), this.migrateWalletUseCase = new Dt(t, a), (g = a.setOnUnauthorized) == null || g.call(a, () => this.forceLogout()), (x = a.setTokenRefresher) == null || x.call(
2507
+ ), this.signOutUseCase = new qt(this.internalConfig, t, l), this.migrateWalletUseCase = new Vt(t, a), (x = a.setOnUnauthorized) == null || x.call(a, () => this.forceLogout()), (g = a.setTokenRefresher) == null || g.call(
2498
2508
  a,
2499
2509
  () => this.signInUseCase.refreshAccessToken()
2500
2510
  ), e.autoDetectTheme && this._setupAutoDetectTheme();
@@ -2536,9 +2546,9 @@ const oe = class oe extends Mt {
2536
2546
  }
2537
2547
  async _doInitialize(e) {
2538
2548
  var r, t;
2539
- c.log("[CROSSx SDK] v2.3.3 초기화 중..."), this.confirmation.setMessages(J(this._config.locale));
2549
+ c.log("[CROSSx SDK] v2.3.7-beta.1 초기화 중..."), this.confirmation.setMessages(J(this._config.locale));
2540
2550
  try {
2541
- const s = at();
2551
+ const s = We();
2542
2552
  this.internalConfig.oauthServiceUrl = s.oauthServiceUrl, this.internalConfig.authApiUrl = s.authApiUrl, this.internalConfig.walletGatewayUrl = s.walletGatewayUrl, this.adapterConfig.gatewayUrl = s.walletGatewayUrl, (t = (r = this.crypto).setJWKSEndpoint) == null || t.call(r, `${s.authApiUrl}/.well-known/jwks.json`);
2543
2553
  const o = this._config.persistWalletPreference !== !1 ? await this.storage.get(
2544
2554
  oe.WALLET_PREF_KEY
@@ -2572,7 +2582,7 @@ const oe = class oe extends Mt {
2572
2582
  throw u;
2573
2583
  }
2574
2584
  }
2575
- return this.initialized = !0, c.info("[CROSSx SDK] v2.3.3 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
2585
+ return this.initialized = !0, c.info("[CROSSx SDK] v2.3.7-beta.1 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
2576
2586
  } catch (s) {
2577
2587
  throw new h(d.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", s);
2578
2588
  }
@@ -2592,7 +2602,7 @@ const oe = class oe extends Mt {
2592
2602
  c.log("[CROSSx] RN Bridge 감지 — Handshake 시도"), c.info("[CROSSx][RNBridge trace] Bootstrap config", {
2593
2603
  appId: this._config.projectId,
2594
2604
  appVersion: "1.0.0",
2595
- sdkVersion: "2.3.3",
2605
+ sdkVersion: "2.3.7-beta.1",
2596
2606
  keyId: "key-id-1",
2597
2607
  userIdHash: "user-hash-placeholder",
2598
2608
  projectId: this._config.projectId
@@ -2600,7 +2610,7 @@ const oe = class oe extends Mt {
2600
2610
  const e = new Y({
2601
2611
  appId: this._config.projectId,
2602
2612
  appVersion: "1.0.0",
2603
- sdkVersion: "2.3.3",
2613
+ sdkVersion: "2.3.7-beta.1",
2604
2614
  keyId: "key-id-1",
2605
2615
  userIdHash: "user-hash-placeholder",
2606
2616
  projectId: this._config.projectId
@@ -2719,7 +2729,7 @@ const oe = class oe extends Mt {
2719
2729
  let t = e;
2720
2730
  if (!(e != null && e.provider)) {
2721
2731
  const s = await this.confirmation.showLoginSelector({
2722
- connectOtherWallets: kt(this._config)
2732
+ connectOtherWallets: Bt(this._config)
2723
2733
  });
2724
2734
  if (s === null)
2725
2735
  return { success: !1, error: "User cancelled login" };
@@ -3316,7 +3326,7 @@ const oe = class oe extends Mt {
3316
3326
  throw new h(d.AUTH_NOT_AUTHENTICATED, "사용자 ID를 찾을 수 없습니다");
3317
3327
  if (!this.walletProvider.signTypedData)
3318
3328
  throw new h(d.NOT_IMPLEMENTED, "signTypedData가 구현되어 있지 않습니다");
3319
- Xt(e, r);
3329
+ tr(e, r);
3320
3330
  const s = await this.resolveAddress(t == null ? void 0 : t.index);
3321
3331
  try {
3322
3332
  const o = await this.signingOrchestrator.confirmAndExecuteWithPreparedPin({
@@ -3340,7 +3350,7 @@ const oe = class oe extends Mt {
3340
3350
  s.address
3341
3351
  )
3342
3352
  });
3343
- return jt(o.signature), {
3353
+ return Qt(o.signature), {
3344
3354
  chainId: e,
3345
3355
  signature: o.signature,
3346
3356
  address: s.address
@@ -3418,7 +3428,7 @@ const oe = class oe extends Mt {
3418
3428
  a
3419
3429
  )
3420
3430
  });
3421
- return Yt(n.signature), {
3431
+ return er(n.signature), {
3422
3432
  chainId: e,
3423
3433
  signedTx: n.signature,
3424
3434
  txHash: n.txHash ?? ""
@@ -3487,7 +3497,7 @@ const oe = class oe extends Mt {
3487
3497
  return u.txHash ?? u.signature;
3488
3498
  }
3489
3499
  }), a = (r.data ?? "").toLowerCase().replace(/^0x/, ""), l = a === "" || a === "00000000", p = a.startsWith("a9059cbb");
3490
- return (l || p) && this.tokenHistoryService.registerHistoryFireAndForget(e, n, qt).catch(
3500
+ return (l || p) && this.tokenHistoryService.registerHistoryFireAndForget(e, n, Dt).catch(
3491
3501
  (_) => c.log("[TokenHistory] register failed (non-critical):", _)
3492
3502
  ), { chainId: e, txHash: n, status: "pending" };
3493
3503
  } catch (n) {
@@ -3519,7 +3529,7 @@ const oe = class oe extends Mt {
3519
3529
  * @param opts.timeoutMs 최대 대기 시간 (기본 60000ms)
3520
3530
  */
3521
3531
  async waitForTxAndGetReceipt(e, r, t = {}) {
3522
- const s = t.intervalMs ?? Ut, o = Ht, n = t.timeoutMs ?? Ve, a = Date.now() + n;
3532
+ const s = t.intervalMs ?? Nt, o = Pt, n = t.timeoutMs ?? je, a = Date.now() + n;
3523
3533
  let l = s;
3524
3534
  for (; Date.now() < a; ) {
3525
3535
  const p = await this.getTransactionReceipt(e, r);
@@ -3553,23 +3563,23 @@ const oe = class oe extends Mt {
3553
3563
  if (S != null && S.sendTransactionWithWaitForReceipt)
3554
3564
  return this.bridgeSendTransactionWithWaitForReceipt(S, e, r, t);
3555
3565
  }
3556
- 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) ?? Wt, p = o ?? ((y = this._config.receiptPolling) == null ? void 0 : y.timeoutMs) ?? Ve, _ = Ae(e), u = r.from ?? "";
3557
- let g, x;
3566
+ 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) ?? Rt, p = o ?? ((y = this._config.receiptPolling) == null ? void 0 : y.timeoutMs) ?? je, _ = Ae(e), u = r.from ?? "";
3567
+ let x, g;
3558
3568
  const f = this.waitForTxAndGetReceipt(a, e, { intervalMs: l, timeoutMs: p }).then((S) => {
3559
- g = S;
3560
- const E = BigInt(S.gasUsed) * BigInt(S.effectiveGasPrice), A = r.value ? BigInt(r.value) : 0n, I = we(r.value, _.symbol, _.decimals, this._config.displayDecimals), T = we("0x" + E.toString(16), _.symbol, _.decimals, this._config.displayDecimals), C = we("0x" + (A + E).toString(16), _.symbol, _.decimals, this._config.displayDecimals);
3569
+ x = S;
3570
+ const E = BigInt(S.gasUsed) * BigInt(S.effectiveGasPrice), A = r.value ? BigInt(r.value) : 0n, k = we(r.value, _.symbol, _.decimals, this._config.displayDecimals), T = we("0x" + E.toString(16), _.symbol, _.decimals, this._config.displayDecimals), N = we("0x" + (A + E).toString(16), _.symbol, _.decimals, this._config.displayDecimals);
3561
3571
  return {
3562
3572
  chainId: e,
3563
3573
  txHash: a,
3564
3574
  from: S.from,
3565
3575
  to: S.to ?? r.to,
3566
- amount: I,
3576
+ amount: k,
3567
3577
  fees: T,
3568
- total: C,
3578
+ total: N,
3569
3579
  nativeSymbol: _.symbol,
3570
3580
  status: S.status === "0x1" ? "success" : "reverted"
3571
3581
  };
3572
- }).catch((S) => (x = S instanceof Error ? S : new Error(String(S)), {
3582
+ }).catch((S) => (g = S instanceof Error ? S : new Error(String(S)), {
3573
3583
  chainId: e,
3574
3584
  txHash: a,
3575
3585
  from: u,
@@ -3581,8 +3591,8 @@ const oe = class oe extends Mt {
3581
3591
  if (await this.confirmation.showTransactionProgress(
3582
3592
  { chainId: e, txHash: a, from: u, to: r.to },
3583
3593
  f
3584
- ), x) throw x;
3585
- return { chainId: e, txHash: a, receipt: g };
3594
+ ), g) throw g;
3595
+ return { chainId: e, txHash: a, receipt: x };
3586
3596
  }
3587
3597
  /**
3588
3598
  * RN Bridge §12 — sendTransactionWithWaitForReceipt 를 native 로 위임.
@@ -3602,7 +3612,7 @@ const oe = class oe extends Mt {
3602
3612
  nonce: t.nonce
3603
3613
  },
3604
3614
  from: t.from,
3605
- dappName: s.dappName,
3615
+ dappName: s.dappName ?? this._config.appName,
3606
3616
  accountName: s.accountName,
3607
3617
  index: s.index,
3608
3618
  timeoutMs: s.timeoutMs,
@@ -3808,7 +3818,7 @@ const oe = class oe extends Mt {
3808
3818
  return { wei: "0x0", formatted: "0", chainId: e };
3809
3819
  try {
3810
3820
  const s = await this.jsonRpc.call("eth_getBalance", [r, "latest"], e) ?? "0x0";
3811
- return { wei: s, formatted: Vt(s, this._config.displayDecimals), chainId: e };
3821
+ return { wei: s, formatted: Zt(s, this._config.displayDecimals), chainId: e };
3812
3822
  } catch (t) {
3813
3823
  if (t instanceof h) throw t;
3814
3824
  const s = t instanceof Error ? t.message : String(t);
@@ -3836,7 +3846,7 @@ const oe = class oe extends Mt {
3836
3846
  getProvider(e) {
3837
3847
  this.ensureAuthenticated();
3838
3848
  let r = this._providers.get(e);
3839
- return r || (r = new Ct(this, e), this._providers.set(e, r)), r;
3849
+ return r || (r = new Ht(this, e), this._providers.set(e, r)), r;
3840
3850
  }
3841
3851
  /**
3842
3852
  * EIP-1193 `accountsChanged` 이벤트를 모든 활성 provider 인스턴스에 dispatch 한다.
@@ -4051,7 +4061,7 @@ const oe = class oe extends Mt {
4051
4061
  */
4052
4062
  dispose() {
4053
4063
  var e;
4054
- (e = this._themeMediaCleanup) == null || e.call(this), this._themeMediaCleanup = null, this.clearAuthState(), this.tokenStore.clear(), this.pinStore.clear(), this.initialized = !1, this.removeAllListeners(), Ge(null);
4064
+ (e = this._themeMediaCleanup) == null || e.call(this), this._themeMediaCleanup = null, this.clearAuthState(), this.tokenStore.clear(), this.pinStore.clear(), this.initialized = !1, this.removeAllListeners(), Qe(null);
4055
4065
  }
4056
4066
  /**
4057
4067
  * @internal internal 패키지 전용 — 공개 문서에 기재하지 않음
@@ -4072,8 +4082,8 @@ const oe = class oe extends Mt {
4072
4082
  }
4073
4083
  };
4074
4084
  oe.WALLET_PREF_KEY = "wallet_preference", oe.OFFCHAIN_CHAIN_ID = "0";
4075
- let Oe = oe;
4076
- class pr {
4085
+ let Le = oe;
4086
+ class gr {
4077
4087
  constructor() {
4078
4088
  this.prefix = "crossx_";
4079
4089
  }
@@ -4110,8 +4120,8 @@ class pr {
4110
4120
  }
4111
4121
  }
4112
4122
  }
4113
- const ke = "crossx-sdk", _r = 1, j = "data", te = "keys", me = "aes-primary", hr = 12;
4114
- class Qe {
4123
+ const ke = "crossx-sdk", fr = 1, j = "data", te = "keys", me = "aes-primary", wr = 12;
4124
+ class it {
4115
4125
  constructor(e) {
4116
4126
  this.db = null, this.cryptoKey = null, this.initPromise = null, this.dbName = `crossx-sdk-${e}`;
4117
4127
  }
@@ -4120,7 +4130,7 @@ class Qe {
4120
4130
  }
4121
4131
  openDB(e = this.dbName) {
4122
4132
  return new Promise((r, t) => {
4123
- const s = indexedDB.open(e, _r);
4133
+ const s = indexedDB.open(e, fr);
4124
4134
  s.onupgradeneeded = () => {
4125
4135
  const o = s.result;
4126
4136
  o.objectStoreNames.contains(j) || o.createObjectStore(j), o.objectStoreNames.contains(te) || o.createObjectStore(te);
@@ -4198,7 +4208,7 @@ class Qe {
4198
4208
  }
4199
4209
  }
4200
4210
  async encrypt(e) {
4201
- const r = new Uint8Array(hr);
4211
+ const r = new Uint8Array(wr);
4202
4212
  crypto.getRandomValues(r);
4203
4213
  const t = new TextEncoder().encode(e), s = await crypto.subtle.encrypt(
4204
4214
  { name: "AES-GCM", iv: r },
@@ -4256,14 +4266,14 @@ class Qe {
4256
4266
  return typeof indexedDB < "u" && typeof crypto < "u" && typeof crypto.subtle < "u";
4257
4267
  }
4258
4268
  }
4259
- const ur = 60;
4260
- class xr {
4269
+ const mr = 60;
4270
+ class yr {
4261
4271
  constructor() {
4262
4272
  this.jwks = null;
4263
4273
  }
4264
4274
  setJWKSEndpoint(e) {
4265
4275
  try {
4266
- this.jwks = mt(new URL(e)), c.log("[CROSSx] JWKS 엔드포인트 설정:", e);
4276
+ this.jwks = Et(new URL(e)), c.log("[CROSSx] JWKS 엔드포인트 설정:", e);
4267
4277
  } catch (r) {
4268
4278
  c.warn("[CROSSx] JWKS 엔드포인트 URL 파싱 실패:", r);
4269
4279
  }
@@ -4277,7 +4287,7 @@ class xr {
4277
4287
  iat: t.iat
4278
4288
  });
4279
4289
  const s = Math.floor(Date.now() / 1e3);
4280
- if (t.exp && t.exp + ur < s)
4290
+ if (t.exp && t.exp + mr < s)
4281
4291
  return c.warn("[CROSSx] 토큰 만료:", {
4282
4292
  exp: t.exp,
4283
4293
  now: s,
@@ -4287,7 +4297,7 @@ class xr {
4287
4297
  return c.warn("[CROSSx] JWT에 sub(사용자ID) 없음"), { payload: t, valid: !1, signatureVerified: !1 };
4288
4298
  if (this.jwks)
4289
4299
  try {
4290
- const { payload: o } = await yt(e, this.jwks, {
4300
+ const { payload: o } = await At(e, this.jwks, {
4291
4301
  algorithms: ["RS256", "ES256"]
4292
4302
  });
4293
4303
  return c.log("[CROSSx] JWT 서명 검증 성공"), {
@@ -4306,7 +4316,7 @@ class xr {
4306
4316
  }
4307
4317
  }
4308
4318
  decodeJWT(e) {
4309
- return bt(e);
4319
+ return It(e);
4310
4320
  }
4311
4321
  /**
4312
4322
  * EIP-191 personal_sign 서명에서 서명자 Ethereum 주소를 복원합니다.
@@ -4321,29 +4331,29 @@ class xr {
4321
4331
  ${t.length}`
4322
4332
  ), o = new Uint8Array(s.length + t.length);
4323
4333
  o.set(s, 0), o.set(t, s.length);
4324
- const n = He(o), a = r.startsWith("0x") ? r.slice(2) : r;
4334
+ const n = Ve(o), a = r.startsWith("0x") ? r.slice(2) : r;
4325
4335
  if (a.length !== 130)
4326
4336
  throw new Error(`서명 길이가 유효하지 않습니다: 130 hex 문자 예상, 현재 ${a.length}`);
4327
- const l = gr(a), p = l.slice(0, 32), _ = l.slice(32, 64), u = l[64], g = u >= 27 ? u - 27 : u, m = new vt.Signature(
4328
- et(p),
4329
- et(_)
4330
- ).addRecoveryBit(g).recoverPublicKey(n).toBytes(!1).slice(1), y = He(m);
4331
- return "0x" + St(y.slice(12));
4337
+ const l = br(a), p = l.slice(0, 32), _ = l.slice(32, 64), u = l[64], x = u >= 27 ? u - 27 : u, m = new kt.Signature(
4338
+ ot(p),
4339
+ ot(_)
4340
+ ).addRecoveryBit(x).recoverPublicKey(n).toBytes(!1).slice(1), y = Ve(m);
4341
+ return "0x" + Tt(y.slice(12));
4332
4342
  }
4333
4343
  }
4334
- function gr(i) {
4344
+ function br(i) {
4335
4345
  const e = new Uint8Array(i.length / 2);
4336
4346
  for (let r = 0; r < e.length; r++)
4337
4347
  e[r] = parseInt(i.substring(r * 2, r * 2 + 2), 16);
4338
4348
  return e;
4339
4349
  }
4340
- function et(i) {
4350
+ function ot(i) {
4341
4351
  let e = "0x";
4342
4352
  for (const r of i) e += r.toString(16).padStart(2, "0");
4343
4353
  return BigInt(e);
4344
4354
  }
4345
- const fr = 3e4, wr = 1e3;
4346
- class mr {
4355
+ const vr = 3e4, Sr = 1e3;
4356
+ class Er {
4347
4357
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4348
4358
  async request(e) {
4349
4359
  const r = e.retries ?? 0;
@@ -4354,7 +4364,7 @@ class mr {
4354
4364
  } catch (s) {
4355
4365
  if (t === r) throw s;
4356
4366
  }
4357
- await new Promise((s) => setTimeout(s, wr * 2 ** t));
4367
+ await new Promise((s) => setTimeout(s, Sr * 2 ** t));
4358
4368
  }
4359
4369
  throw new Error("Unexpected: retry loop exited without result");
4360
4370
  }
@@ -4362,7 +4372,7 @@ class mr {
4362
4372
  async _doRequest(e) {
4363
4373
  const r = new AbortController(), t = setTimeout(
4364
4374
  () => r.abort(),
4365
- e.timeoutMs ?? fr
4375
+ e.timeoutMs ?? vr
4366
4376
  );
4367
4377
  try {
4368
4378
  const s = await fetch(e.url, {
@@ -4389,10 +4399,13 @@ class mr {
4389
4399
  }
4390
4400
  }
4391
4401
  }
4392
- const yr = /* @__PURE__ */ new Set([
4402
+ const Ar = /* @__PURE__ */ new Set([
4393
4403
  "https://cross-wallet-oauth.crosstoken.io",
4394
4404
  "https://stg-cross-wallet-oauth.crosstoken.io",
4395
- "https://dev-cross-wallet-oauth.crosstoken.io"
4405
+ "https://dev-cross-wallet-oauth.crosstoken.io",
4406
+ "https://cross-wallet-oauth.onechain.nexus",
4407
+ "https://stg-cross-wallet-oauth.onechain.nexus",
4408
+ "https://dev-cross-wallet-oauth.onechain.nexus"
4396
4409
  ]);
4397
4410
  class se {
4398
4411
  static generateRandom16Hex() {
@@ -4463,68 +4476,64 @@ class se {
4463
4476
  nonceLength: p.length,
4464
4477
  authUrlBase: e.authUrl
4465
4478
  });
4466
- const g = window.open(
4479
+ const x = window.open(
4467
4480
  u,
4468
4481
  "CROSSx OAuth",
4469
4482
  `width=${s},height=${o},left=${n},top=${a}`
4470
4483
  );
4471
- if (!g) {
4484
+ if (!x) {
4472
4485
  t(new Error("팝업 창을 열 수 없습니다. 팝업 차단을 해제해 주세요."));
4473
4486
  return;
4474
4487
  }
4475
- const x = setTimeout(() => {
4476
- c.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), I(), t(new Error("Authentication timeout"));
4488
+ const g = setTimeout(() => {
4489
+ c.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), k(), t(new Error("Authentication timeout"));
4477
4490
  }, 5 * 60 * 1e3), f = 10, m = 30;
4478
4491
  let y = 0, S = null;
4479
4492
  const E = () => {
4480
4493
  clearInterval(A), c.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + m + "초간 대기합니다"), S = setTimeout(() => {
4481
- I(), t(new Error(
4494
+ k(), t(new Error(
4482
4495
  "OAuth 서버로부터 응답을 받지 못했습니다. 브라우저 보안 정책(COOP)으로 인해 팝업 통신이 차단되었을 수 있습니다. 다시 시도해 주세요."
4483
4496
  ));
4484
4497
  }, m * 1e3);
4485
4498
  }, A = setInterval(() => {
4486
4499
  y++;
4487
4500
  try {
4488
- if (!g.closed) return;
4489
- const C = typeof document < "u" && document.hasFocus();
4490
- y <= f && !C ? E() : (I(), t(new Error("로그인이 취소되었습니다")));
4501
+ if (!x.closed) return;
4502
+ const N = typeof document < "u" && document.hasFocus();
4503
+ y <= f && !N ? E() : (k(), t(new Error("로그인이 취소되었습니다")));
4491
4504
  } catch {
4492
4505
  E();
4493
4506
  }
4494
- }, 1e3), I = () => {
4495
- clearTimeout(x), clearInterval(A), S && clearTimeout(S), window.removeEventListener("message", T);
4496
- }, T = (C) => {
4497
- if (C.origin !== e.expectedOrigin) return;
4498
- if (!yr.has(C.origin)) {
4499
- c.error("[CROSSx] postMessage origin이 허용 목록에 없음:", C.origin), I(), t(new Error("Unauthorized OAuth origin"));
4500
- return;
4501
- }
4502
- I();
4503
- const U = typeof C.data.status == "string", N = U ? C.data.data ?? {} : C.data;
4507
+ }, 1e3), k = () => {
4508
+ clearTimeout(g), clearInterval(A), S && clearTimeout(S), window.removeEventListener("message", T);
4509
+ }, T = (N) => {
4510
+ if (!Ar.has(N.origin)) return;
4511
+ k();
4512
+ const U = typeof N.data.status == "string", C = U ? N.data.data ?? {} : N.data;
4504
4513
  c.log("[CROSSx] OAuth postMessage 수신 —", {
4505
4514
  format: U ? "wrapped" : "flat",
4506
- status: U ? C.data.status : "(flat)"
4515
+ status: U ? N.data.status : "(flat)"
4507
4516
  });
4508
- const q = (N == null ? void 0 : N.state) ?? C.data.state;
4517
+ const q = (C == null ? void 0 : C.state) ?? N.data.state;
4509
4518
  if (!q || q !== l) {
4510
4519
  t(new Error("OAuth state mismatch — possible CSRF attack"));
4511
4520
  return;
4512
4521
  }
4513
- if (U && C.data.status !== "success") {
4514
- c.error("[CROSSx] OAuth 실패:", N == null ? void 0 : N.error), t(new Error((N == null ? void 0 : N.error) || "Authentication failed"));
4522
+ if (U && N.data.status !== "success") {
4523
+ c.error("[CROSSx] OAuth 실패:", C == null ? void 0 : C.error), t(new Error((C == null ? void 0 : C.error) || "Authentication failed"));
4515
4524
  return;
4516
4525
  }
4517
- if (!U && (N != null && N.error)) {
4518
- c.error("[CROSSx] OAuth 실패:", N.error), t(new Error(N.error || "Authentication failed"));
4526
+ if (!U && (C != null && C.error)) {
4527
+ c.error("[CROSSx] OAuth 실패:", C.error), t(new Error(C.error || "Authentication failed"));
4519
4528
  return;
4520
4529
  }
4521
- const z = N == null ? void 0 : N.idToken, P = N == null ? void 0 : N.accessToken, L = P ?? z, W = (N == null ? void 0 : N.email) || void 0;
4530
+ const z = C == null ? void 0 : C.idToken, P = C == null ? void 0 : C.accessToken, L = P ?? z, W = (C == null ? void 0 : C.email) || void 0;
4522
4531
  if (c.log("[CROSSx] OAuth 토큰 수신:", {
4523
4532
  hasAccessToken: !!P,
4524
4533
  hasIdToken: !!z,
4525
4534
  hasEmail: !!W
4526
4535
  }), !L) {
4527
- c.error("[CROSSx] 토큰을 찾을 수 없음:", C.data), t(new Error("Token not found in response"));
4536
+ c.error("[CROSSx] 토큰을 찾을 수 없음:", N.data), t(new Error("Token not found in response"));
4528
4537
  return;
4529
4538
  }
4530
4539
  const ne = { token: L, email: W }, ae = (ge) => {
@@ -4542,7 +4551,7 @@ class se {
4542
4551
  }
4543
4552
  }
4544
4553
  const he = "crossx_wallet_data", le = "crossx_mock_pin_hash";
4545
- class br {
4554
+ class Ir {
4546
4555
  constructor(e, r) {
4547
4556
  this.storage = e, this.pinStore = r ?? null;
4548
4557
  }
@@ -4714,9 +4723,9 @@ class ie {
4714
4723
  */
4715
4724
  async ensureValidToken() {
4716
4725
  const e = this.tokenStore.get();
4717
- if (e && !this.tokenStore.isExpiringSoon(Je))
4726
+ if (e && !this.tokenStore.isExpiringSoon(Ze))
4718
4727
  return e;
4719
- const r = !e || this.tokenStore.isExpiringSoon(Je);
4728
+ const r = !e || this.tokenStore.isExpiringSoon(Ze);
4720
4729
  if (this._onTokenRefresh) {
4721
4730
  if (await this.deduplicatedRefresh()) {
4722
4731
  const s = this.tokenStore.get();
@@ -4749,22 +4758,22 @@ class ie {
4749
4758
  "X-Project-Id": this.projectId
4750
4759
  };
4751
4760
  try {
4752
- const x = (await this.transport.request({
4761
+ const g = (await this.transport.request({
4753
4762
  url: n,
4754
4763
  method: e,
4755
4764
  headers: a,
4756
4765
  body: t ?? void 0
4757
4766
  })).data;
4758
- if (x && typeof x.code == "number") {
4759
- if (x.code < 0 || x.code >= 400) {
4760
- const f = x.message || x.data || "API 요청에 실패했습니다";
4767
+ if (g && typeof g.code == "number") {
4768
+ if (g.code < 0 || g.code >= 400) {
4769
+ const f = g.message || g.data || "API 요청에 실패했습니다";
4761
4770
  c.error("[CROSSx] Wallet Gateway API 에러 (HTTP 200):", {
4762
- code: x.code,
4771
+ code: g.code,
4763
4772
  message: f,
4764
4773
  url: n,
4765
4774
  method: e
4766
4775
  });
4767
- const m = ie.mapGatewayError(x.code, x.data);
4776
+ const m = ie.mapGatewayError(g.code, g.data);
4768
4777
  if (m === d.AUTH_NOT_AUTHENTICATED && !s && this._onTokenRefresh) {
4769
4778
  if (c.warn("[CROSSx] Gateway -10002 감지 — 토큰 갱신 후 재시도"), await this.deduplicatedRefresh())
4770
4779
  return this.request(e, r, t, !0);
@@ -4773,40 +4782,40 @@ class ie {
4773
4782
  if (m === d.USER_NOT_FOUND)
4774
4783
  throw c.warn("[CROSSx] Gateway -10033 감지 — 유저 미존재, 강제 로그아웃"), (l = this._onUnauthorized) == null || l.call(this), new h(
4775
4784
  d.USER_NOT_FOUND,
4776
- ie.getGatewayErrorMessage(x.code, f)
4785
+ ie.getGatewayErrorMessage(g.code, f)
4777
4786
  );
4778
- const y = m === d.AUTH_NOT_AUTHENTICATED ? d.SESSION_EXPIRED : m, S = y === d.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : ie.getGatewayErrorMessage(x.code, f), E = x.data;
4787
+ const y = m === d.AUTH_NOT_AUTHENTICATED ? d.SESSION_EXPIRED : m, S = y === d.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : ie.getGatewayErrorMessage(g.code, f), E = g.data;
4779
4788
  let A;
4780
- throw m === d.PIN_LOCKED ? A = ie.extractLockDetails(E) : m === d.ADDRESS_LIMIT_EXCEEDED ? A = { limit: Ne, raw: E } : A = E ?? void 0, new h(y, S, A);
4789
+ throw m === d.PIN_LOCKED ? A = ie.extractLockDetails(E) : m === d.ADDRESS_LIMIT_EXCEEDED ? A = { limit: Ce, raw: E } : A = E ?? void 0, new h(y, S, A);
4781
4790
  }
4782
- return c.log("[CROSSx] Wallet Gateway API 성공:", { code: x.code, url: n, method: e }), x.data ?? x;
4791
+ return c.log("[CROSSx] Wallet Gateway API 성공:", { code: g.code, url: n, method: e }), g.data ?? g;
4783
4792
  }
4784
- return x;
4785
- } catch (g) {
4786
- if (g instanceof h) throw g;
4787
- const x = ((p = g.response) == null ? void 0 : p.status) ?? g.status;
4788
- if ((x === 401 || x === 403) && !s && this._onTokenRefresh) {
4789
- if (c.warn(`[CROSSx] HTTP ${x} 감지 — 토큰 갱신 후 재시도`), await this.deduplicatedRefresh())
4793
+ return g;
4794
+ } catch (x) {
4795
+ if (x instanceof h) throw x;
4796
+ const g = ((p = x.response) == null ? void 0 : p.status) ?? x.status;
4797
+ if ((g === 401 || g === 403) && !s && this._onTokenRefresh) {
4798
+ if (c.warn(`[CROSSx] HTTP ${g} 감지 — 토큰 갱신 후 재시도`), await this.deduplicatedRefresh())
4790
4799
  return this.request(e, r, t, !0);
4791
4800
  throw new h(
4792
4801
  d.SESSION_EXPIRED,
4793
4802
  "인증 세션이 만료되었습니다. 다시 로그인해 주세요."
4794
4803
  );
4795
4804
  }
4796
- if ((_ = g.response) != null && _.data) {
4797
- const f = g.response.data, m = f.message || f.data || "API 요청에 실패했습니다", y = f.code || "UNKNOWN";
4805
+ if ((_ = x.response) != null && _.data) {
4806
+ const f = x.response.data, m = f.message || f.data || "API 요청에 실패했습니다", y = f.code || "UNKNOWN";
4798
4807
  throw c.error("[CROSSx] Wallet Gateway API 에러 (HTTP 에러):", {
4799
4808
  code: y,
4800
4809
  message: m,
4801
4810
  url: n,
4802
4811
  method: e,
4803
- status: (u = g.response) == null ? void 0 : u.status
4812
+ status: (u = x.response) == null ? void 0 : u.status
4804
4813
  }), new h(
4805
4814
  d.UNKNOWN_ERROR,
4806
4815
  `Wallet Gateway 오류 (${y}): ${m}`
4807
4816
  );
4808
4817
  }
4809
- throw g;
4818
+ throw x;
4810
4819
  }
4811
4820
  }
4812
4821
  /**
@@ -5165,7 +5174,7 @@ class ie {
5165
5174
  case -10033:
5166
5175
  return "User not found. You have been signed out.";
5167
5176
  case -10036:
5168
- return `Account limit reached. Maximum ${Ne} accounts allowed.`;
5177
+ return `Account limit reached. Maximum ${Ce} accounts allowed.`;
5169
5178
  case -10040:
5170
5179
  return "HMAC signature header is required.";
5171
5180
  case -10041:
@@ -5175,10 +5184,11 @@ class ie {
5175
5184
  }
5176
5185
  }
5177
5186
  }
5178
- class vr {
5187
+ class kr {
5179
5188
  constructor(e, r, t, s = () => {
5189
+ }, o = () => {
5180
5190
  }) {
5181
- this.inner = e, this.getBridge = r, this.isAuthenticatedViaRNBridge = t, this.assertBridgeSessionActive = s, e.checkWallet && (this.checkWallet = () => e.checkWallet()), e.prepare && (this.prepare = (o, n) => e.prepare(o, n)), e.migrateWallet && (this.migrateWallet = (o, n) => e.migrateWallet(o, n)), e.verifyPin && (this.verifyPin = (o) => e.verifyPin(o)), e.getShareC && (this.getShareC = () => e.getShareC()), e.verifyRecoveryPin && (this.verifyRecoveryPin = (o, n) => e.verifyRecoveryPin(o, n));
5191
+ this.inner = e, this.getBridge = r, this.isAuthenticatedViaRNBridge = t, this.assertBridgeSessionActive = s, this.getAppName = o, e.checkWallet && (this.checkWallet = () => e.checkWallet()), e.prepare && (this.prepare = (n, a) => e.prepare(n, a)), e.migrateWallet && (this.migrateWallet = (n, a) => e.migrateWallet(n, a)), e.verifyPin && (this.verifyPin = (n) => e.verifyPin(n)), e.getShareC && (this.getShareC = () => e.getShareC()), e.verifyRecoveryPin && (this.verifyRecoveryPin = (n, a) => e.verifyRecoveryPin(n, a));
5182
5192
  }
5183
5193
  /** native delegation 가능 여부 (인증 + bridge 메서드 존재) 한 번에 판정 */
5184
5194
  shouldUseBridge() {
@@ -5195,7 +5205,8 @@ class vr {
5195
5205
  chainId: r,
5196
5206
  message: t,
5197
5207
  from: n,
5198
- index: s
5208
+ index: s,
5209
+ dappName: this.getAppName()
5199
5210
  });
5200
5211
  return {
5201
5212
  chainId: r,
@@ -5213,7 +5224,8 @@ class vr {
5213
5224
  chainId: r,
5214
5225
  typedData: t,
5215
5226
  from: n,
5216
- index: s
5227
+ index: s,
5228
+ dappName: this.getAppName()
5217
5229
  });
5218
5230
  return {
5219
5231
  chainId: r,
@@ -5233,7 +5245,8 @@ class vr {
5233
5245
  chainId: r,
5234
5246
  tx: this.toBridgeTx(t),
5235
5247
  from: t.from,
5236
- index: s
5248
+ index: s,
5249
+ dappName: this.getAppName()
5237
5250
  });
5238
5251
  return {
5239
5252
  chainId: r,
@@ -5249,7 +5262,8 @@ class vr {
5249
5262
  return this.assertBridgeSessionActive(), { txHash: (await o.sendTransaction({
5250
5263
  chainId: r,
5251
5264
  tx: this.toBridgeTx(t),
5252
- from: t.from
5265
+ from: t.from,
5266
+ dappName: this.getAppName()
5253
5267
  })).txHash };
5254
5268
  if (!this.inner.sendTransaction)
5255
5269
  throw new Error("sendTransaction not supported by inner wallet provider");
@@ -5321,7 +5335,7 @@ class xe {
5321
5335
  }
5322
5336
  isCacheValid() {
5323
5337
  if (this.loadedAt === 0) return !1;
5324
- const e = this.usingFallback ? zt : Kt;
5338
+ const e = this.usingFallback ? Lt : Ot;
5325
5339
  return e === 0 ? !0 : Date.now() - this.loadedAt < e;
5326
5340
  }
5327
5341
  populateCache(e, r) {
@@ -5383,7 +5397,7 @@ class xe {
5383
5397
  }
5384
5398
  }
5385
5399
  }
5386
- const tt = "__crossx-confirm-style", M = "__crossx-confirm-overlay", Sr = {
5400
+ const nt = "__crossx-confirm-style", M = "__crossx-confirm-overlay", Tr = {
5387
5401
  light: {
5388
5402
  bg: "#FFFFFF",
5389
5403
  border: "rgba(0,0,0,0.07)",
@@ -5405,14 +5419,15 @@ const tt = "__crossx-confirm-style", M = "__crossx-confirm-overlay", Sr = {
5405
5419
  hintColor: "rgba(0,0,0,0.45)",
5406
5420
  surfaceSubtle: "#F5F7FA",
5407
5421
  surfaceHigh: "#EDF1F2",
5408
- primary: "#00B4B7",
5409
- primaryGlow: "rgba(0,180,183,0.18)",
5422
+ primary: "#FF823D",
5423
+ primaryGlow: "rgba(255,130,61,0.20)",
5424
+ primaryGradient: "linear-gradient(191.6deg, #FF2589 16%, #FF823D 84%)",
5410
5425
  secondary: "#D20609",
5411
5426
  errorColor: "#D20609",
5412
5427
  noticeBg: "#FFF6F6",
5413
5428
  noticeBorder: "#DA0B2E",
5414
5429
  noticeTitleColor: "#D20609",
5415
- onPrimary: "#FFFFFF"
5430
+ onPrimary: "#000000"
5416
5431
  },
5417
5432
  dark: {
5418
5433
  bg: "#1E232E",
@@ -5435,8 +5450,9 @@ const tt = "__crossx-confirm-style", M = "__crossx-confirm-overlay", Sr = {
5435
5450
  hintColor: "rgba(255,255,255,0.45)",
5436
5451
  surfaceSubtle: "#252B39",
5437
5452
  surfaceHigh: "#363B4C",
5438
- primary: "#00CEB2",
5439
- primaryGlow: "rgba(0,206,178,0.18)",
5453
+ primary: "#FF823D",
5454
+ primaryGlow: "rgba(255,130,61,0.20)",
5455
+ primaryGradient: "linear-gradient(191.6deg, #FF2589 16%, #FF823D 84%)",
5440
5456
  secondary: "#FF0F47",
5441
5457
  errorColor: "#FF0F47",
5442
5458
  noticeBg: "#39151E",
@@ -5445,8 +5461,8 @@ const tt = "__crossx-confirm-style", M = "__crossx-confirm-overlay", Sr = {
5445
5461
  onPrimary: "#000000"
5446
5462
  }
5447
5463
  };
5448
- function rt(i, e) {
5449
- const r = Sr[i], t = e == null ? void 0 : e[i];
5464
+ function at(i, e) {
5465
+ const r = Tr[i], t = e == null ? void 0 : e[i];
5450
5466
  return t ? {
5451
5467
  ...r,
5452
5468
  // ── Brand
@@ -5478,7 +5494,7 @@ function rt(i, e) {
5478
5494
  ...t.error !== void 0 && { errorColor: t.error }
5479
5495
  } : r;
5480
5496
  }
5481
- const Er = `
5497
+ const Rr = `
5482
5498
  @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');
5483
5499
 
5484
5500
  #${M} {
@@ -5856,14 +5872,15 @@ const Er = `
5856
5872
  font-weight: 600;
5857
5873
  font-family: inherit;
5858
5874
  cursor: pointer;
5859
- transition: background 0.15s, color 0.15s;
5860
- background: var(--cx-input-border);
5861
- color: var(--cx-hint);
5875
+ transition: opacity 0.15s;
5876
+ /* disabled 기본값 = 브랜드 그라데이션 50% 투명도 */
5877
+ background: var(--cx-primary-gradient);
5878
+ color: var(--cx-on-primary);
5879
+ opacity: 0.5;
5862
5880
  letter-spacing: -0.01em;
5863
5881
  }
5864
5882
  .__crossx-pw-btn:not(:disabled):not(.--disabled) {
5865
- background: var(--cx-primary);
5866
- color: var(--cx-on-primary);
5883
+ opacity: 1;
5867
5884
  }
5868
5885
  .__crossx-pw-btn.--loading {
5869
5886
  opacity: 0.6;
@@ -5972,11 +5989,9 @@ const Er = `
5972
5989
  flex: 1;
5973
5990
  letter-spacing: -0.01em;
5974
5991
  }
5975
- /* Notice screen: button shows primary+opacity even when disabled (interactive guide) */
5992
+ /* Notice screen: disabled 버튼은 50% 투명도로 표시하되 탭하면 미체크 항목을 안내 */
5976
5993
  .__crossx-pw-body > .__crossx-pw-btn.--disabled {
5977
- background: var(--cx-primary);
5978
- color: var(--cx-on-primary);
5979
- opacity: 1;
5994
+ opacity: 0.5;
5980
5995
  cursor: pointer;
5981
5996
  }
5982
5997
  /* Home indicator bar (mobile only – shown via media query) */
@@ -6343,7 +6358,7 @@ const Er = `
6343
6358
  padding: 16px;
6344
6359
  border: 1px solid var(--cx-border);
6345
6360
  border-radius: 12px;
6346
- background: var(--cx-primary);
6361
+ background: var(--cx-primary-gradient);
6347
6362
  color: var(--cx-on-primary);
6348
6363
  font-family: 'Pretendard', 'Sora', -apple-system, sans-serif;
6349
6364
  font-size: 18px;
@@ -6359,7 +6374,7 @@ const Er = `
6359
6374
  outline: none !important;
6360
6375
  filter: none !important;
6361
6376
  transform: none !important;
6362
- background: var(--cx-primary) !important;
6377
+ background: var(--cx-primary-gradient) !important;
6363
6378
  color: var(--cx-on-primary) !important;
6364
6379
  }
6365
6380
  .__crossx-btn-row {
@@ -6396,7 +6411,7 @@ const Er = `
6396
6411
  padding: 16px;
6397
6412
  border: 1px solid var(--cx-border);
6398
6413
  border-radius: 12px;
6399
- background: var(--cx-primary);
6414
+ background: var(--cx-primary-gradient);
6400
6415
  color: var(--cx-on-primary);
6401
6416
  font-family: 'Pretendard', 'Sora', -apple-system, sans-serif;
6402
6417
  font-size: 18px;
@@ -6412,7 +6427,7 @@ const Er = `
6412
6427
  outline: none !important;
6413
6428
  filter: none !important;
6414
6429
  transform: none !important;
6415
- background: var(--cx-primary) !important;
6430
+ background: var(--cx-primary-gradient) !important;
6416
6431
  color: var(--cx-on-primary) !important;
6417
6432
  }
6418
6433
 
@@ -7533,9 +7548,7 @@ button.__crossx-connect-other-block:active {
7533
7548
  box-sizing: border-box;
7534
7549
  }
7535
7550
  .__crossx-card--pin6 .__crossx-pw-btn.--disabled {
7536
- background: var(--cx-primary);
7537
- color: var(--cx-on-primary);
7538
- opacity: 1;
7551
+ opacity: 0.5;
7539
7552
  cursor: pointer;
7540
7553
  }
7541
7554
  .__crossx-pin6-header-sub {
@@ -7662,7 +7675,7 @@ button.__crossx-connect-other-block:active {
7662
7675
  .__crossx-pin6-next {
7663
7676
  width: 100%;
7664
7677
  padding: 16px;
7665
- background: var(--cx-primary);
7678
+ background: var(--cx-primary-gradient);
7666
7679
  color: var(--cx-on-primary);
7667
7680
  border: none;
7668
7681
  border-radius: 12px;
@@ -8036,7 +8049,7 @@ button.__crossx-connect-other-block:active {
8036
8049
  height: 48px;
8037
8050
  border: none;
8038
8051
  border-radius: 12px;
8039
- background: var(--cx-primary);
8052
+ background: var(--cx-primary-gradient);
8040
8053
  color: var(--cx-on-primary);
8041
8054
  font-family: inherit;
8042
8055
  font-size: 16px;
@@ -8053,7 +8066,7 @@ button.__crossx-connect-other-block:active {
8053
8066
  outline: none !important;
8054
8067
  filter: none !important;
8055
8068
  transform: none !important;
8056
- background: var(--cx-primary) !important;
8069
+ background: var(--cx-primary-gradient) !important;
8057
8070
  color: var(--cx-on-primary) !important;
8058
8071
  }
8059
8072
 
@@ -8081,10 +8094,10 @@ button.__crossx-connect-other-block:active {
8081
8094
  }
8082
8095
  `;
8083
8096
  function G() {
8084
- let i = document.getElementById(tt);
8085
- i || (i = document.createElement("style"), i.id = tt, document.head.appendChild(i)), i.textContent = Er;
8097
+ let i = document.getElementById(nt);
8098
+ i || (i = document.createElement("style"), i.id = nt, document.head.appendChild(i)), i.textContent = Rr;
8086
8099
  }
8087
- function Ar() {
8100
+ function Nr() {
8088
8101
  const i = `#${M}`, e = (t) => {
8089
8102
  var s, o;
8090
8103
  (o = (s = t.target) == null ? void 0 : s.closest) != null && o.call(s, i) && t.stopImmediatePropagation();
@@ -8124,12 +8137,12 @@ function K(i) {
8124
8137
  }
8125
8138
  n.preventDefault();
8126
8139
  }, { passive: !1 });
8127
- const t = Ar(), s = Ir(i), o = i.remove.bind(i);
8140
+ const t = Nr(), s = Pr(i), o = i.remove.bind(i);
8128
8141
  i.remove = () => {
8129
8142
  s(), t(), o();
8130
8143
  }, document.body.appendChild(i);
8131
8144
  }
8132
- function Ir(i) {
8145
+ function Pr(i) {
8133
8146
  if (typeof window > "u") return () => {
8134
8147
  };
8135
8148
  const e = window.visualViewport;
@@ -8144,7 +8157,7 @@ function Ir(i) {
8144
8157
  e.removeEventListener("resize", t), e.removeEventListener("scroll", t), i.style.removeProperty("--cx-keyboard-inset");
8145
8158
  };
8146
8159
  }
8147
- function kr(i) {
8160
+ function Cr(i) {
8148
8161
  const e = Array.from(i.querySelectorAll(".__crossx-amount-tip"));
8149
8162
  if (!e.length) return;
8150
8163
  const r = document.createElement("div");
@@ -8155,8 +8168,8 @@ function kr(i) {
8155
8168
  if (!a) return;
8156
8169
  r.textContent = a, r.classList.add("--visible");
8157
8170
  const l = n.getBoundingClientRect(), p = r.offsetWidth, _ = r.offsetHeight;
8158
- let u = l.right - p, g = l.top - _ - 6;
8159
- u < 8 && (u = 8), g < 8 && (g = l.bottom + 6), r.style.left = `${u}px`, r.style.top = `${g}px`, t = n;
8171
+ let u = l.right - p, x = l.top - _ - 6;
8172
+ u < 8 && (u = 8), x < 8 && (x = l.bottom + 6), r.style.left = `${u}px`, r.style.top = `${x}px`, t = n;
8160
8173
  }, o = () => {
8161
8174
  r.classList.remove("--visible"), t = null;
8162
8175
  };
@@ -8168,9 +8181,9 @@ function kr(i) {
8168
8181
  n.target.closest(".__crossx-amount-tip") || o();
8169
8182
  }, { passive: !0 });
8170
8183
  }
8171
- const Tr = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
8184
+ const Or = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
8172
8185
  function re() {
8173
- if (Tr()) {
8186
+ if (Or()) {
8174
8187
  const e = window.scrollY;
8175
8188
  return document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.left = "0", document.body.style.right = "0", () => {
8176
8189
  document.body.style.position = "", document.body.style.top = "", document.body.style.left = "", document.body.style.right = "", window.scrollTo(0, e);
@@ -8184,23 +8197,23 @@ function re() {
8184
8197
  function Q(i) {
8185
8198
  return i ? i.length <= 13 ? i : `${i.slice(0, 6)}…${i.slice(-4)}` : "—";
8186
8199
  }
8187
- function lt(i) {
8200
+ function ht(i) {
8188
8201
  return i ? i.length <= 13 ? i : `${i.slice(0, 6)}...${i.slice(-4)}` : "—";
8189
8202
  }
8190
- function dt(i, e = "CROSS", r = 18, t = 6) {
8203
+ function ut(i, e = "ONE", r = 18, t = 6) {
8191
8204
  if (!i || i === "0x" || i === "0x0") return null;
8192
8205
  try {
8193
8206
  const s = BigInt(i);
8194
8207
  if (s === 0n) return null;
8195
- const o = $e(s, r, t);
8208
+ const o = Me(s, r, t);
8196
8209
  if (o === "0") return null;
8197
- const n = Le(s, r);
8198
- return De(`${o} ${e}`, `${n} ${e}`);
8210
+ const n = De(s, r);
8211
+ return $e(`${o} ${e}`, `${n} ${e}`);
8199
8212
  } catch {
8200
8213
  return null;
8201
8214
  }
8202
8215
  }
8203
- const st = {
8216
+ const ct = {
8204
8217
  1: "Ethereum Mainnet",
8205
8218
  5: "Goerli Testnet",
8206
8219
  11155111: "Ethereum Sepolia",
@@ -8220,27 +8233,62 @@ const st = {
8220
8233
  250: "Fantom Opera",
8221
8234
  2020: "Ronin",
8222
8235
  202601: "Ronin Saigon",
8223
- 612044: "CROSS Testnet",
8236
+ 612044: "ONEchain Testnet",
8224
8237
  612055: "CROSS Mainnet"
8225
- };
8226
- function pt(i) {
8227
- const e = parseInt(i.split(":")[1] ?? "", 10);
8228
- return !isNaN(e) && st[e] ? st[e] : i;
8238
+ }, Ue = /* @__PURE__ */ new Map();
8239
+ let Te = !1;
8240
+ function Lr() {
8241
+ if (Te || (Te = !0, typeof fetch > "u")) return;
8242
+ const i = We().contentsBaseUrl;
8243
+ i && fetch(`${i}/chains.json`, { cache: "no-store" }).then((e) => e.ok ? e.json() : null).then((e) => {
8244
+ const r = e == null ? void 0 : e.chains;
8245
+ if (r)
8246
+ for (const [t, s] of Object.entries(r)) {
8247
+ const o = Number(t);
8248
+ !Number.isNaN(o) && s && Ue.set(o, s);
8249
+ }
8250
+ }).catch(() => {
8251
+ Te = !1;
8252
+ });
8229
8253
  }
8230
- function Le(i, e) {
8254
+ function xt(i) {
8255
+ return parseInt(i.split(":")[1] ?? "", 10);
8256
+ }
8257
+ function gt(i) {
8258
+ var r;
8259
+ const e = xt(i);
8260
+ if (!isNaN(e)) {
8261
+ const t = (r = Ue.get(e)) == null ? void 0 : r.name;
8262
+ if (t) return t;
8263
+ if (ct[e]) return ct[e];
8264
+ }
8265
+ return i;
8266
+ }
8267
+ function He(i, e) {
8268
+ var r;
8269
+ if (i) {
8270
+ const t = xt(i);
8271
+ if (!isNaN(t)) {
8272
+ const s = (r = Ue.get(t)) == null ? void 0 : r.nativeSymbol;
8273
+ if (s) return s;
8274
+ }
8275
+ }
8276
+ return e;
8277
+ }
8278
+ function De(i, e) {
8231
8279
  if (i === 0n) return "0";
8232
8280
  const r = 10n ** BigInt(e), t = i / r, o = (i % r).toString().padStart(e, "0").replace(/0+$/, "");
8233
8281
  return o ? `${t}.${o}` : `${t}`;
8234
8282
  }
8235
- function De(i, e) {
8283
+ function $e(i, e) {
8236
8284
  return i === e ? w(i) : `<span class="__crossx-amount-tip" data-full="${w(e)}">${w(i)}</span>`;
8237
8285
  }
8238
- function $e(i, e, r) {
8286
+ function Me(i, e, r) {
8239
8287
  if (i === 0n) return "0";
8240
8288
  const t = 10n ** BigInt(e), s = i / t, a = (i % t).toString().padStart(e, "0").slice(0, r).replace(/0+$/, "");
8241
8289
  return a ? `${s}.${a}` : `${s}`;
8242
8290
  }
8243
- function Te(i) {
8291
+ function Re(i) {
8244
8292
  try {
8245
8293
  const e = BigInt(i), r = e / 1000000000n, s = (e % 1000000000n).toString().padStart(9, "0").slice(0, 2).replace(/0+$/, "");
8246
8294
  return s ? `${r}.${s}` : `${r}`;
@@ -8248,28 +8296,28 @@ function Te(i) {
8248
8296
  return i;
8249
8297
  }
8250
8298
  }
8251
- function Rr(i) {
8299
+ function Dr(i) {
8252
8300
  try {
8253
8301
  return BigInt(i).toLocaleString();
8254
8302
  } catch {
8255
8303
  return i;
8256
8304
  }
8257
8305
  }
8258
- function Cr(i, e) {
8259
- const { gasLimit: r, gasPrice: t, maxFeePerGas: s, maxPriorityFeePerGas: o, nativeSymbol: n = "ETH", nativeDecimals: a = 18 } = i;
8306
+ function $r(i, e) {
8307
+ const { gasLimit: r, gasPrice: t, maxFeePerGas: s, maxPriorityFeePerGas: o, nativeDecimals: n = 18 } = i, a = He(i.chainId, i.nativeSymbol ?? "ETH");
8260
8308
  if (!r) return null;
8261
8309
  try {
8262
- const l = BigInt(r), p = Rr(r);
8310
+ const l = BigInt(r), p = Dr(r);
8263
8311
  if (s) {
8264
8312
  const _ = l * BigInt(s);
8265
8313
  return {
8266
8314
  isDynamic: !0,
8267
- estTxFee: De(
8268
- `${$e(_, a, e)} ${n}`,
8269
- `${Le(_, a)} ${n}`
8315
+ estTxFee: $e(
8316
+ `${Me(_, n, e)} ${a}`,
8317
+ `${De(_, n)} ${a}`
8270
8318
  ),
8271
- maxFeeGwei: Te(s),
8272
- maxPriorityFeeGwei: o ? Te(o) : void 0,
8319
+ maxFeeGwei: Re(s),
8320
+ maxPriorityFeeGwei: o ? Re(o) : void 0,
8273
8321
  gasLimitFormatted: p
8274
8322
  };
8275
8323
  }
@@ -8277,11 +8325,11 @@ function Cr(i, e) {
8277
8325
  const _ = l * BigInt(t);
8278
8326
  return {
8279
8327
  isDynamic: !1,
8280
- estTxFee: De(
8281
- `${$e(_, a, e)} ${n}`,
8282
- `${Le(_, a)} ${n}`
8328
+ estTxFee: $e(
8329
+ `${Me(_, n, e)} ${a}`,
8330
+ `${De(_, n)} ${a}`
8283
8331
  ),
8284
- gasPriceGwei: Te(t),
8332
+ gasPriceGwei: Re(t),
8285
8333
  gasLimitFormatted: p
8286
8334
  };
8287
8335
  }
@@ -8290,8 +8338,8 @@ function Cr(i, e) {
8290
8338
  return null;
8291
8339
  }
8292
8340
  }
8293
- function _t(i, e, r) {
8294
- const t = Cr(i, e);
8341
+ function ft(i, e, r) {
8342
+ const t = $r(i, e);
8295
8343
  if (!t) return D((r == null ? void 0 : r.label_estimated_fee) ?? "Estimated fee", "<span>—</span>");
8296
8344
  let s = D((r == null ? void 0 : r.label_est_tx_fee) ?? "Est. Tx Fee", `<span>${t.estTxFee}</span>`);
8297
8345
  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;
@@ -8302,16 +8350,16 @@ const Z = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="c
8302
8350
  </svg>`, B = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8303
8351
  <line x1="18" y1="6" x2="6" y2="18"/>
8304
8352
  <line x1="6" y1="6" x2="18" y2="18"/>
8305
- </svg>`, Pr = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8353
+ </svg>`, Mr = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8306
8354
  <circle cx="20" cy="20" r="20" fill="#00D5AA"/>
8307
8355
  <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"/>
8308
- </svg>`, Nr = '<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>', Or = '<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>', Lr = '<svg width="16" height="16" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="20" cy="20" r="20" fill="#00D5AA"/><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"/></svg>', Dr = {
8309
- [ue.MetaMask]: Nr,
8310
- [ue.Binance]: Or,
8311
- [ue.CROSSx]: Lr
8312
- }, ht = '<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"/>', Fe = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${ht}</svg>`, $r = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8356
+ </svg>`, Fr = '<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>', Br = '<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>', Wr = '<svg width="16" height="16" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="20" cy="20" r="20" fill="#00D5AA"/><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"/></svg>', Ur = {
8357
+ [ue.MetaMask]: Fr,
8358
+ [ue.Binance]: Br,
8359
+ [ue.CROSSx]: Wr
8360
+ }, wt = '<path d="M22.6667 11.8333V10.1667C22.6667 9.2475 21.9192 8.5 21.0001 8.5H10.1667C8.78841 8.5 7.66675 9.62167 7.66675 11V21C7.66675 22.8342 9.16175 23.5 10.1667 23.5H22.6667C23.5859 23.5 24.3334 22.7525 24.3334 21.8333V13.5C24.3334 12.5808 23.5859 11.8333 22.6667 11.8333ZM21.0001 19.3333H19.3334V16H21.0001V19.3333ZM10.1667 11.8333C9.95218 11.8237 9.74959 11.7317 9.60114 11.5765C9.4527 11.4213 9.36986 11.2148 9.36986 11C9.36986 10.7852 9.4527 10.5787 9.60114 10.4235C9.74959 10.2683 9.95218 10.1763 10.1667 10.1667H21.0001V11.8333H10.1667Z"/>', Ge = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${wt}</svg>`, Hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8313
8361
  <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)"/>
8314
- </svg>`, Mr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8362
+ </svg>`, Gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8315
8363
  <circle cx="12" cy="12" r="12" fill="var(--cx-error)"/>
8316
8364
  <circle cx="12" cy="12" r="5.5" stroke="white" stroke-width="1.5"/>
8317
8365
  <path d="M12 9.5v3l2 1.5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
@@ -8339,6 +8387,7 @@ function H(i) {
8339
8387
  `--cx-surface-high:${i.surfaceHigh}`,
8340
8388
  `--cx-primary:${i.primary}`,
8341
8389
  `--cx-primary-glow:${i.primaryGlow}`,
8390
+ `--cx-primary-gradient:${i.primaryGradient}`,
8342
8391
  `--cx-secondary:${i.secondary}`,
8343
8392
  `--cx-error:${i.errorColor}`,
8344
8393
  `--cx-notice-bg:${i.noticeBg}`,
@@ -8347,8 +8396,8 @@ function H(i) {
8347
8396
  `--cx-on-primary:${i.onPrimary}`
8348
8397
  ].join(";");
8349
8398
  }
8350
- function Fr(i, e) {
8351
- 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-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);
8399
+ function Kr(i, e) {
8400
+ 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);
8352
8401
  }
8353
8402
  function D(i, e) {
8354
8403
  return `
@@ -8357,10 +8406,10 @@ function D(i, e) {
8357
8406
  <div class="__crossx-row-value">${e}</div>
8358
8407
  </div>`;
8359
8408
  }
8360
- function Br(i, e, r, t) {
8361
- const s = e, o = i.nativeSymbol ?? "ETH", n = i.nativeDecimals ?? 18, a = Se(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Q(i.to)}</span>
8362
- <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${Z}</button>` : "<span>—</span>", p = _t(i, r, t), _ = dt(i.value, o, n, r), u = _ ? D((t == null ? void 0 : t.label_value) ?? "Value", `<span>${_}</span>`) : "", g = i.data ?? "0x", x = document.createElement("div");
8363
- return x.id = M, x.innerHTML = `
8409
+ function zr(i, e, r, t) {
8410
+ const s = e, o = He(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Se(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Q(i.to)}</span>
8411
+ <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${Z}</button>` : "<span>—</span>", p = ft(i, r, t), _ = ut(i.value, o, n, r), u = _ ? D((t == null ? void 0 : t.label_value) ?? "Value", `<span>${_}</span>`) : "", x = i.data ?? "0x", g = document.createElement("div");
8412
+ return g.id = M, g.innerHTML = `
8364
8413
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-tx" style="${H(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8365
8414
  <div class="__crossx-header">
8366
8415
  <p class="__crossx-title" id="__crossx-ttl">${w((t == null ? void 0 : t.sign_transaction_title) ?? "Signature Request")}</p>
@@ -8374,7 +8423,7 @@ function Br(i, e, r, t) {
8374
8423
  <span class="__crossx-sig-origin">${w(a)}</span>${w((t == null ? void 0 : t.signature_requesting) ?? " is requesting a Signature")}
8375
8424
  </p>
8376
8425
  <div class="__crossx-addr-pill">
8377
- ${Fe}
8426
+ ${Ge}
8378
8427
  <span class="__crossx-addr-pill-text">${Q(i.from)}</span>
8379
8428
  </div>
8380
8429
  <p class="__crossx-warning">${w((t == null ? void 0 : t.signature_warning) ?? "After you sign, changes or cancellations are not possible.")}</p>
@@ -8383,11 +8432,11 @@ function Br(i, e, r, t) {
8383
8432
  <div class="__crossx-col-right-sign">
8384
8433
  <div class="__crossx-rows">
8385
8434
  ${D((t == null ? void 0 : t.label_to) ?? "To", l)}
8386
- ${D((t == null ? void 0 : t.label_network) ?? "Network", `<span>${pt(i.chainId)}</span>`)}
8435
+ ${D((t == null ? void 0 : t.label_network) ?? "Network", `<span>${gt(i.chainId)}</span>`)}
8387
8436
  ${u}
8388
8437
  ${p}
8389
8438
  </div>
8390
- <pre class="__crossx-raw-tx">${w(g)}</pre>
8439
+ <pre class="__crossx-raw-tx">${w(x)}</pre>
8391
8440
  </div>
8392
8441
  </div>
8393
8442
  <div class="__crossx-btn-row">
@@ -8396,9 +8445,9 @@ function Br(i, e, r, t) {
8396
8445
  </div>
8397
8446
  </div>
8398
8447
  </div>
8399
- `, x;
8448
+ `, g;
8400
8449
  }
8401
- const Wr = /* @__PURE__ */ new Set([
8450
+ const qr = /* @__PURE__ */ new Set([
8402
8451
  "0x095ea7b3",
8403
8452
  // approve(address,uint256) — ERC20 / ERC721
8404
8453
  "0xa22cb465",
@@ -8408,13 +8457,13 @@ const Wr = /* @__PURE__ */ new Set([
8408
8457
  "0x8fcbaf0c"
8409
8458
  // permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32) — DAI 스타일
8410
8459
  ]);
8411
- function Ur(i) {
8412
- return i ? Wr.has(i.slice(0, 10).toLowerCase()) : !1;
8460
+ function Vr(i) {
8461
+ return i ? qr.has(i.slice(0, 10).toLowerCase()) : !1;
8413
8462
  }
8414
- function Hr(i, e, r, t) {
8415
- const s = e, o = i.nativeSymbol ?? "ETH", n = i.nativeDecimals ?? 18, a = Se(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Q(i.to)}</span>
8416
- <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${Z}</button>` : "<span>—</span>", p = _t(i, r, t), u = dt(i.value, o, n, r) ?? "—", g = Ur(i.data) ? (t == null ? void 0 : t.send_tx_approve_button) ?? "Approve" : (t == null ? void 0 : t.send_tx_confirm_button) ?? "Confirm", x = document.createElement("div");
8417
- return x.id = M, x.innerHTML = `
8463
+ function jr(i, e, r, t) {
8464
+ const s = e, o = He(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Se(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Q(i.to)}</span>
8465
+ <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${Z}</button>` : "<span>—</span>", p = ft(i, r, t), u = ut(i.value, o, n, r) ?? "—", x = Vr(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");
8466
+ return g.id = M, g.innerHTML = `
8418
8467
  <div class="__crossx-card __crossx-card--migration __crossx-card--send-tx" style="${H(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8419
8468
  <div class="__crossx-header">
8420
8469
  <p class="__crossx-title" id="__crossx-ttl">${w((t == null ? void 0 : t.send_transaction_title) ?? "Approve transaction")}</p>
@@ -8428,7 +8477,7 @@ function Hr(i, e, r, t) {
8428
8477
  <div class="__crossx-body-cols">
8429
8478
  <div class="__crossx-rows">
8430
8479
  ${D((t == null ? void 0 : t.label_to) ?? "To", l)}
8431
- ${D((t == null ? void 0 : t.label_network) ?? "Network", `<span>${pt(i.chainId)}</span>`)}
8480
+ ${D((t == null ? void 0 : t.label_network) ?? "Network", `<span>${gt(i.chainId)}</span>`)}
8432
8481
  ${p}
8433
8482
  </div>
8434
8483
  <div class="__crossx-pill">
@@ -8436,10 +8485,10 @@ function Hr(i, e, r, t) {
8436
8485
  <span class="__crossx-pill-amount">${u}</span>
8437
8486
  </div>
8438
8487
  </div>
8439
- <button class="__crossx-approve-btn" id="__crossx-confirm-btn">${w(g)}</button>
8488
+ <button class="__crossx-approve-btn" id="__crossx-confirm-btn">${w(x)}</button>
8440
8489
  </div>
8441
8490
  </div>
8442
- `, x;
8491
+ `, g;
8443
8492
  }
8444
8493
  function Se(i) {
8445
8494
  var e;
@@ -8453,10 +8502,10 @@ function Se(i) {
8453
8502
  function w(i) {
8454
8503
  return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
8455
8504
  }
8456
- function Gr(i) {
8505
+ function Yr(i) {
8457
8506
  return typeof i == "string" && /^0x[0-9a-fA-F]{40}$/i.test(i);
8458
8507
  }
8459
- function Kr(i) {
8508
+ function Xr(i) {
8460
8509
  if (typeof i == "string") return w(i);
8461
8510
  if (typeof i == "number" || typeof i == "bigint" || typeof i == "boolean") return String(i);
8462
8511
  try {
@@ -8465,31 +8514,31 @@ function Kr(i) {
8465
8514
  return String(i);
8466
8515
  }
8467
8516
  }
8468
- function zr(i) {
8517
+ function Jr(i) {
8469
8518
  return i.includes(":") ? i.split(":")[1] ?? i : i;
8470
8519
  }
8471
- function qr(i) {
8520
+ function Zr(i) {
8472
8521
  return `https://www.crossscan.io/address/${i}?tab=txs`;
8473
8522
  }
8474
- function Vr(i, e) {
8475
- return `https://explorer.crosstoken.io/${zr(i)}/tx/${e}`;
8523
+ function Qr(i, e) {
8524
+ return `https://explorer.crosstoken.io/${Jr(i)}/tx/${e}`;
8476
8525
  }
8477
- function ut(i, e) {
8526
+ function mt(i, e) {
8478
8527
  return `<a class="__crossx-addr-text __crossx-row-link" href="${w(e)}" target="_blank" rel="noopener noreferrer">${w(i)}</a>`;
8479
8528
  }
8480
8529
  function ye(i) {
8481
- return ut(Q(i), qr(i));
8530
+ return mt(Q(i), Zr(i));
8482
8531
  }
8483
- function xt(i, e) {
8484
- return ut(Q(e), Vr(i, e));
8532
+ function yt(i, e) {
8533
+ return mt(Q(e), Qr(i, e));
8485
8534
  }
8486
- function jr(i, e, r) {
8535
+ function es(i, e, r) {
8487
8536
  const t = D(
8488
8537
  (r == null ? void 0 : r.label_from) ?? "From",
8489
8538
  `${ye(i.from)}
8490
8539
  <button class="__crossx-copy-btn" data-copy="${w(i.from)}" title="Copy address">${Z}</button>`
8491
8540
  ), s = i.to ? D((r == null ? void 0 : r.label_to) ?? "To", `${ye(i.to)}
8492
- <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${Z}</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", `${xt(i.chainId, i.txHash)}
8541
+ <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${Z}</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", `${yt(i.chainId, i.txHash)}
8493
8542
  <button class="__crossx-copy-btn" data-copy="${w(i.txHash)}" title="Copy hash">${Z}</button>`) : "", l = i.total ? `<div class="__crossx-total-pill">
8494
8543
  <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>
8495
8544
  <span class="__crossx-total-amount">${w(i.total)}</span>
@@ -8515,7 +8564,7 @@ function jr(i, e, r) {
8515
8564
  </div>
8516
8565
  `, p;
8517
8566
  }
8518
- function Yr(i, e, r) {
8567
+ function ts(i, e, r) {
8519
8568
  const t = document.createElement("div");
8520
8569
  return t.id = M, t.innerHTML = `
8521
8570
  <div class="__crossx-card __crossx-card--migration" style="${H(e)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8532,10 +8581,10 @@ function Yr(i, e, r) {
8532
8581
  </div>
8533
8582
  `, t;
8534
8583
  }
8535
- function Xr(i, e, r, t) {
8584
+ function rs(i, e, r, t) {
8536
8585
  const s = e.status !== "reverted" && e.status !== "timeout", o = e.status === "timeout", n = i.querySelector("#__crossx-ttl"), a = i.querySelector(".__crossx-header");
8537
8586
  if (n) {
8538
- const m = o ? Mr : s ? "" : $r, y = o ? (t == null ? void 0 : t.tx_timeout) ?? "Transaction timeout" : s ? (t == null ? void 0 : t.tx_success) ?? "Transaction complete" : (t == null ? void 0 : t.tx_failed) ?? "Transaction failed";
8587
+ const m = o ? Gr : s ? "" : Hr, y = o ? (t == null ? void 0 : t.tx_timeout) ?? "Transaction timeout" : s ? (t == null ? void 0 : t.tx_success) ?? "Transaction complete" : (t == null ? void 0 : t.tx_failed) ?? "Transaction failed";
8539
8588
  m ? (n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "8px", n.innerHTML = `${m}<span>${w(y)}</span>`) : n.textContent = y;
8540
8589
  }
8541
8590
  if (a && !i.querySelector("#__crossx-close-btn")) {
@@ -8546,7 +8595,7 @@ function Xr(i, e, r, t) {
8546
8595
  if (!l) return;
8547
8596
  const p = e.from ? D((t == null ? void 0 : t.label_from) ?? "From", `${ye(e.from)}
8548
8597
  <button class="__crossx-copy-btn" data-copy="${w(e.from)}" title="Copy address">${Z}</button>`) : "", _ = e.to ? D((t == null ? void 0 : t.label_to) ?? "To", `${ye(e.to)}
8549
- <button class="__crossx-copy-btn" data-copy="${w(e.to)}" title="Copy address">${Z}</button>`) : "", u = e.amount ? D((t == null ? void 0 : t.label_transfer) ?? "Transfer", `<span>${w(e.amount)}</span>`) : "", g = e.fees ? D((t == null ? void 0 : t.label_tx_fee) ?? "Tx Fee", `<span>${w(e.fees)}</span>`) : "", x = e.txHash ? D((t == null ? void 0 : t.label_tx_hash) ?? "Tx Hash", `${xt(e.chainId, e.txHash)}
8598
+ <button class="__crossx-copy-btn" data-copy="${w(e.to)}" title="Copy address">${Z}</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", `${yt(e.chainId, e.txHash)}
8550
8599
  <button class="__crossx-copy-btn" data-copy="${w(e.txHash)}" title="Copy hash">${Z}</button>`) : "", f = e.total ? `<div class="__crossx-total-pill">
8551
8600
  <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>
8552
8601
  <span class="__crossx-total-amount">${w(e.total)}</span>
@@ -8556,8 +8605,8 @@ function Xr(i, e, r, t) {
8556
8605
  ${p}
8557
8606
  ${_}
8558
8607
  ${u}
8559
- ${g}
8560
8608
  ${x}
8609
+ ${g}
8561
8610
  </div>
8562
8611
  ${f}
8563
8612
  <button class="__crossx-approve-btn" id="__crossx-done-btn">${w((t == null ? void 0 : t.tx_complete_done_button) ?? (s ? "All Done" : "Done"))}</button>
@@ -8571,7 +8620,7 @@ function Xr(i, e, r, t) {
8571
8620
  });
8572
8621
  });
8573
8622
  }
8574
- function Jr(i, e, r) {
8623
+ function ss(i, e, r) {
8575
8624
  const t = e, s = Se(i.dappName), o = w(i.message), n = document.createElement("div");
8576
8625
  return n.id = M, n.innerHTML = `
8577
8626
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-msg" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8587,7 +8636,7 @@ function Jr(i, e, r) {
8587
8636
  <span class="__crossx-sig-origin">${w(s)}</span>${w((r == null ? void 0 : r.signature_requesting) ?? " is requesting a Signature")}
8588
8637
  </p>
8589
8638
  <div class="__crossx-addr-pill">
8590
- ${Fe}
8639
+ ${Ge}
8591
8640
  <span class="__crossx-addr-pill-text">${Q(i.from)}</span>
8592
8641
  </div>
8593
8642
  <p class="__crossx-warning">${w((r == null ? void 0 : r.signature_warning) ?? "After you sign, changes or cancellations are not possible.")}</p>
@@ -8603,7 +8652,7 @@ function Jr(i, e, r) {
8603
8652
  </div>
8604
8653
  `, n;
8605
8654
  }
8606
- function Zr(i, e, r) {
8655
+ function is(i, e, r) {
8607
8656
  const t = e, s = Se(i.dappName);
8608
8657
  let o = {};
8609
8658
  if (typeof i.typedData == "string")
@@ -8619,8 +8668,8 @@ function Zr(i, e, r) {
8619
8668
  <span class="__crossx-td-value">${w(n)}</span>
8620
8669
  </div>`;
8621
8670
  for (const [_, u] of Object.entries(a)) {
8622
- const g = Kr(u), f = Gr(u) ? `<span class="__crossx-addr-text">${Q(u)}</span>
8623
- <button class="__crossx-copy-btn" data-copy="${w(String(u))}" title="Copy">${Z}</button>` : `<span>${g}</span>`;
8671
+ const x = Xr(u), f = Yr(u) ? `<span class="__crossx-addr-text">${Q(u)}</span>
8672
+ <button class="__crossx-copy-btn" data-copy="${w(String(u))}" title="Copy">${Z}</button>` : `<span>${x}</span>`;
8624
8673
  l += `
8625
8674
  <div class="__crossx-td-row">
8626
8675
  <span class="__crossx-td-label">${w(_)}</span>
@@ -8642,7 +8691,7 @@ function Zr(i, e, r) {
8642
8691
  <span class="__crossx-sig-origin">${w(s)}</span>${w((r == null ? void 0 : r.signature_requesting) ?? " is requesting a Signature")}
8643
8692
  </p>
8644
8693
  <div class="__crossx-addr-pill">
8645
- ${Fe}
8694
+ ${Ge}
8646
8695
  <span class="__crossx-addr-pill-text">${Q(i.from)}</span>
8647
8696
  </div>
8648
8697
  <p class="__crossx-warning">${w((r == null ? void 0 : r.signature_warning) ?? "After you sign, changes or cancellations are not possible.")}</p>
@@ -8658,30 +8707,30 @@ function Zr(i, e, r) {
8658
8707
  </div>
8659
8708
  `, p;
8660
8709
  }
8661
- const Qr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8710
+ const os = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8662
8711
  <line x1="12" y1="5" x2="12" y2="19"/>
8663
8712
  <line x1="5" y1="12" x2="19" y2="12"/>
8664
- </svg>`, es = '<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>';
8665
- function gt(i) {
8713
+ </svg>`, ns = '<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>';
8714
+ function bt(i) {
8666
8715
  return i.name || `Account ${i.index + 1}`;
8667
8716
  }
8668
- function ts() {
8669
- 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">${ht}</g></svg>`;
8717
+ function as() {
8718
+ return `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="32" height="32" rx="16" fill="#121212" fill-opacity="0.1"/><g fill="#121212" fill-opacity="0.5">${wt}</g></svg>`;
8670
8719
  }
8671
- const rs = at().portraitBaseUrl;
8672
- function ss(i, e) {
8720
+ const cs = We().portraitBaseUrl;
8721
+ function ls(i, e) {
8673
8722
  const r = e.replace("#", "");
8674
- return `${rs}/portrait/evm/${i}.png?size=256&bg=${r}`;
8723
+ return `${cs}/portrait/evm/${i}.png?size=256&bg=${r}`;
8675
8724
  }
8676
- function ft(i, e, r) {
8677
- const t = ss(i, r), o = ts().replace(/"/g, "&quot;");
8725
+ function vt(i, e, r) {
8726
+ const t = ls(i, r), o = as().replace(/"/g, "&quot;");
8678
8727
  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>`;
8679
8728
  }
8680
- function is(i, e, r, t) {
8729
+ function ds(i, e, r, t) {
8681
8730
  const s = r == null ? void 0 : r.toLowerCase(), o = i.map((a) => {
8682
- const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", _ = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${es}</span>` : "";
8731
+ const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", _ = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${ns}</span>` : "";
8683
8732
  return `<button class="__crossx-wallet-item${p}" data-wallet-index="${a.index}" data-wallet-address="${w(a.address)}">
8684
- ${ft(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(gt(a))}</span><span class="__crossx-wallet-addr">${lt(a.address)}</span></span>${_}
8733
+ ${vt(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(a))}</span><span class="__crossx-wallet-addr">${ht(a.address)}</span></span>${_}
8685
8734
  </button>`;
8686
8735
  }).join(""), n = document.createElement("div");
8687
8736
  return n.id = M, n.className = "__crossx-overlay--wallet-selector", n.innerHTML = `
@@ -8701,7 +8750,7 @@ function is(i, e, r, t) {
8701
8750
  ${o}
8702
8751
  </div>
8703
8752
  <button class="__crossx-wallet-add" id="__crossx-add-wallet-btn" type="button">
8704
- <span class="__crossx-wallet-add-icon">${Qr}</span>
8753
+ <span class="__crossx-wallet-add-icon">${os}</span>
8705
8754
  <span class="__crossx-wallet-add-label">${w((t == null ? void 0 : t.wallet_selector_add_button) ?? "Add Wallet")}</span>
8706
8755
  </button>
8707
8756
  <p class="__crossx-wallet-add-error" id="__crossx-add-wallet-error" role="alert" aria-live="polite" hidden></p>
@@ -8716,11 +8765,11 @@ function is(i, e, r, t) {
8716
8765
  </div>
8717
8766
  `, n;
8718
8767
  }
8719
- function os(i, e) {
8768
+ function ps(i, e) {
8720
8769
  const r = document.createElement("div");
8721
8770
  r.id = M;
8722
8771
  const t = document.createElement("div");
8723
- t.className = "__crossx-card __crossx-card--wallet-created", Fr(t, i), t.role = "dialog", t.ariaModal = "true", t.setAttribute("aria-labelledby", "__crossx-ttl");
8772
+ t.className = "__crossx-card __crossx-card--wallet-created", Kr(t, i), t.role = "dialog", t.ariaModal = "true", t.setAttribute("aria-labelledby", "__crossx-ttl");
8724
8773
  const s = document.createElement("div");
8725
8774
  s.className = "__crossx-header";
8726
8775
  const o = document.createElement("span");
@@ -8737,42 +8786,42 @@ function os(i, e) {
8737
8786
  _.className = "__crossx-wallet-created-hero";
8738
8787
  const u = document.createElement("span");
8739
8788
  u.className = "__crossx-wallet-created-illust", u.ariaHidden = "true";
8740
- const g = (m) => {
8789
+ const x = (m) => {
8741
8790
  const y = document.createElement("span");
8742
8791
  return y.className = m, y;
8743
8792
  };
8744
8793
  u.append(
8745
- g("__crossx-wallet-created-shadow"),
8746
- g("__crossx-wallet-created-wallet"),
8747
- g("__crossx-wallet-created-coin"),
8748
- g("__crossx-wallet-created-burst"),
8749
- g("__crossx-wallet-created-pointer"),
8750
- g("__crossx-wallet-created-sparkle __crossx-wallet-created-sparkle--purple"),
8751
- g("__crossx-wallet-created-sparkle __crossx-wallet-created-sparkle--teal"),
8752
- g("__crossx-wallet-created-dot __crossx-wallet-created-dot--one"),
8753
- g("__crossx-wallet-created-dot __crossx-wallet-created-dot--two")
8794
+ x("__crossx-wallet-created-shadow"),
8795
+ x("__crossx-wallet-created-wallet"),
8796
+ x("__crossx-wallet-created-coin"),
8797
+ x("__crossx-wallet-created-burst"),
8798
+ x("__crossx-wallet-created-pointer"),
8799
+ x("__crossx-wallet-created-sparkle __crossx-wallet-created-sparkle--purple"),
8800
+ x("__crossx-wallet-created-sparkle __crossx-wallet-created-sparkle--teal"),
8801
+ x("__crossx-wallet-created-dot __crossx-wallet-created-dot--one"),
8802
+ x("__crossx-wallet-created-dot __crossx-wallet-created-dot--two")
8754
8803
  ), _.appendChild(u), p.appendChild(_);
8755
- const x = document.createElement("div");
8756
- x.className = "__crossx-wallet-created-footer";
8804
+ const g = document.createElement("div");
8805
+ g.className = "__crossx-wallet-created-footer";
8757
8806
  const f = document.createElement("button");
8758
- return f.className = "__crossx-wallet-created-btn", f.id = "__crossx-wallet-created-done", f.type = "button", f.textContent = (e == null ? void 0 : e.wallet_created_button) ?? "Got it", x.appendChild(f), t.append(s, l, p, x), r.appendChild(t), r;
8807
+ return f.className = "__crossx-wallet-created-btn", f.id = "__crossx-wallet-created-done", f.type = "button", f.textContent = (e == null ? void 0 : e.wallet_created_button) ?? "Got it", g.appendChild(f), t.append(s, l, p, g), r.appendChild(t), r;
8759
8808
  }
8760
- const ns = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8809
+ const _s = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8761
8810
  <path d="M26.693 21.193c-.028-3.168 2.587-4.712 2.706-4.786-1.477-2.16-3.77-2.454-4.58-2.484-1.944-.197-3.804 1.148-4.793 1.148-.992 0-2.52-1.12-4.147-1.09-2.13.032-4.1 1.239-5.198 3.133-2.222 3.855-.569 9.562 1.593 12.69 1.061 1.535 2.318 3.258 3.975 3.196 1.6-.064 2.2-1.03 4.133-1.03 1.928 0 2.48 1.03 4.172.997 1.72-.03 2.806-1.56 3.862-3.1 1.211-1.779 1.713-3.495 1.74-3.583-.037-.017-3.427-1.316-3.463-5.09z" fill="currentColor"/>
8762
8811
  <path d="M23.527 11.876c.877-1.065 1.471-2.545 1.31-4.024-1.266.053-2.807.845-3.718 1.907-.813.946-1.53 2.468-1.34 3.915 1.41.107 2.852-.716 3.748-1.798z" fill="currentColor"/>
8763
- </svg>`, as = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8812
+ </svg>`, hs = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8764
8813
  <path d="M38.06 20.44c0-1.34-.12-2.63-.34-3.87H20.5v7.32h9.84c-.42 2.28-1.71 4.21-3.65 5.51v4.57h5.91c3.46-3.19 5.46-7.88 5.46-13.53z" fill="#4285F4"/>
8765
8814
  <path d="M20.5 38.5c4.94 0 9.09-1.64 12.12-4.44l-5.91-4.57c-1.64 1.1-3.73 1.75-6.21 1.75-4.77 0-8.82-3.22-10.26-7.55H4.16v4.72A18.49 18.49 0 0 0 20.5 38.5z" fill="#34A853"/>
8766
8815
  <path d="M10.24 23.69A11.16 11.16 0 0 1 9.66 20c0-1.28.22-2.52.58-3.69v-4.72H4.16A18.49 18.49 0 0 0 2 20c0 2.97.71 5.78 1.97 8.28l6.27-4.59z" fill="#FBBC05"/>
8767
8816
  <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"/>
8768
8817
  </svg>`;
8769
- function cs(i) {
8770
- const e = It(i);
8771
- return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Dr[i] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${w(e)}</span></span>`;
8818
+ function us(i) {
8819
+ const e = Ft(i);
8820
+ return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Ur[i] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${w(e)}</span></span>`;
8772
8821
  }
8773
- function ls(i) {
8822
+ function xs(i) {
8774
8823
  if (i.length === 0) return "";
8775
- const e = (s) => cs(i[s]), r = "Supported wallets include ";
8824
+ const e = (s) => us(i[s]), r = "Supported wallets include ";
8776
8825
  if (i.length === 1)
8777
8826
  return `${r}${e(0)}.`;
8778
8827
  if (i.length === 2)
@@ -8782,7 +8831,7 @@ function ls(i) {
8782
8831
  const t = i.length - 3;
8783
8832
  return `${r}${e(0)}, ${e(1)}, ${e(2)}, and ${t} more.`;
8784
8833
  }
8785
- function ds(i, e = [], r) {
8834
+ function gs(i, e = [], r) {
8786
8835
  const t = i, s = w(String(e[0])), o = w((r == null ? void 0 : r.login_selector_or) ?? "or"), n = e.length > 0 ? `
8787
8836
  <div class="__crossx-login-or-divider">
8788
8837
  <hr><span>${o}</span><hr>
@@ -8790,14 +8839,14 @@ function ds(i, e = [], r) {
8790
8839
  <button type="button" class="__crossx-connect-other-block" id="__crossx-connect-other-wallet-btn" data-wallet-id="${s}" aria-labelledby="__crossx-connect-other-heading">
8791
8840
  <span class="__crossx-connect-other-text">
8792
8841
  <span class="__crossx-connect-other-title" id="__crossx-connect-other-heading">${w((r == null ? void 0 : r.login_selector_connect_other_wallets) ?? "Connect with Other Wallets")}</span>
8793
- <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${ls(e)}</span>
8842
+ <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${xs(e)}</span>
8794
8843
  </span>
8795
8844
  </button>` : "", a = document.createElement("div");
8796
8845
  return a.id = M, a.innerHTML = `
8797
8846
  <div class="__crossx-card __crossx-card--migration" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8798
8847
  <div class="__crossx-header">
8799
8848
  <div style="display:flex;flex-direction:column;gap:4px;padding-right:36px;">
8800
- <p class="__crossx-title" id="__crossx-ttl" style="padding-right:0;">${w((r == null ? void 0 : r.login_selector_title) ?? "CROSS Wallet")}</p>
8849
+ <p class="__crossx-title" id="__crossx-ttl" style="padding-right:0;">${w((r == null ? void 0 : r.login_selector_title) ?? Be)}</p>
8801
8850
  <p class="__crossx-subtitle">${w((r == null ? void 0 : r.login_selector_subtitle) ?? "Sign in instantly with your social account")}</p>
8802
8851
  </div>
8803
8852
  <button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${B}</button>
@@ -8806,11 +8855,11 @@ function ds(i, e = [], r) {
8806
8855
  <div class="__crossx-body">
8807
8856
  <div class="__crossx-login-btn-row">
8808
8857
  <button class="__crossx-login-btn" id="__crossx-apple-btn" type="button">
8809
- <span class="__crossx-login-icon" style="color:var(--cx-value);">${ns}</span>
8858
+ <span class="__crossx-login-icon" style="color:var(--cx-value);">${_s}</span>
8810
8859
  <span class="__crossx-login-btn-label">${w((r == null ? void 0 : r.login_selector_apple) ?? "Sign in with Apple")}</span>
8811
8860
  </button>
8812
8861
  <button class="__crossx-login-btn" id="__crossx-google-btn" type="button">
8813
- <span class="__crossx-login-icon">${as}</span>
8862
+ <span class="__crossx-login-icon">${hs}</span>
8814
8863
  <span class="__crossx-login-btn-label">${w((r == null ? void 0 : r.login_selector_google) ?? "Sign in with Google")}</span>
8815
8864
  </button>
8816
8865
  </div>${n}
@@ -8821,7 +8870,7 @@ function ds(i, e = [], r) {
8821
8870
  </div>
8822
8871
  `, a;
8823
8872
  }
8824
- function ps(i, e) {
8873
+ function fs(i, e) {
8825
8874
  const r = i, t = document.createElement("div");
8826
8875
  t.id = M;
8827
8876
  const s = w(e.message).replace(/\n/g, "<br>"), o = e.email ? `<div class="__crossx-session-account-card">
@@ -8849,7 +8898,7 @@ function ps(i, e) {
8849
8898
  </div>
8850
8899
  `, t;
8851
8900
  }
8852
- function _s(i, e = !0) {
8901
+ function ws(i, e = !0) {
8853
8902
  const r = i, t = e ? `<button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${B}</button>` : "", s = e ? '<button class="__crossx-skip-btn" id="__crossx-skip-btn">Skip for Now</button>' : "", o = document.createElement("div");
8854
8903
  return o.id = M, o.innerHTML = `
8855
8904
  <div class="__crossx-card __crossx-card--migration" style="${H(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8865,7 +8914,7 @@ function _s(i, e = !0) {
8865
8914
  <p class="__crossx-mig-info-desc">It safely restores and integrates all your previous assets. Simply verify your PIN to get started.</p>
8866
8915
  </div>
8867
8916
  <button class="__crossx-recover-btn" id="__crossx-recover-btn">
8868
- <span class="__crossx-recover-icon">${Pr}</span>
8917
+ <span class="__crossx-recover-icon">${Mr}</span>
8869
8918
  <span class="__crossx-recover-label">Import from Social Backup</span>
8870
8919
  </button>
8871
8920
  ${s}
@@ -8873,7 +8922,7 @@ function _s(i, e = !0) {
8873
8922
  </div>
8874
8923
  `, o;
8875
8924
  }
8876
- function hs(i, e) {
8925
+ function ms(i, e) {
8877
8926
  const r = i, { errorMessage: t, attemptCount: s, maxAttempts: o = 5 } = e ?? {}, n = !!t, a = n ? " --error" : "", l = s != null && s > 0 ? `<p class="__crossx-pin-attempt">${s}/${o}</p>` : "", p = s != null && s >= 3 ? '<p class="__crossx-pin-warning">Your account will be locked after further failures.</p>' : "", _ = n ? `<p class="__crossx-pin-error-text">${t}</p>` : "", u = document.createElement("div");
8878
8927
  return u.id = M, u.innerHTML = `
8879
8928
  <div class="__crossx-card __crossx-card--migration" style="${H(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8897,12 +8946,12 @@ function hs(i, e) {
8897
8946
  </div>
8898
8947
  `, u;
8899
8948
  }
8900
- function us(i) {
8949
+ function ys(i) {
8901
8950
  const e = new Date(i), r = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], t = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], s = r[e.getDay()], o = t[e.getMonth()], n = e.getDate(), a = String(e.getHours()).padStart(2, "0"), l = String(e.getMinutes()).padStart(2, "0");
8902
8951
  return `${s}, ${o} ${n} ${a}:${l}`;
8903
8952
  }
8904
- function xs(i, e, r) {
8905
- const t = i, s = e <= 0, o = s ? null : Date.now() + e * 1e3, n = o ? us(o) : null, a = document.createElement("div");
8953
+ function bs(i, e, r) {
8954
+ const t = i, s = e <= 0, o = s ? null : Date.now() + e * 1e3, n = o ? ys(o) : null, a = document.createElement("div");
8906
8955
  return a.id = M, a.innerHTML = `
8907
8956
  <div class="__crossx-card __crossx-card--migration" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8908
8957
  <div class="__crossx-header">
@@ -8932,10 +8981,10 @@ function xs(i, e, r) {
8932
8981
  return () => clearInterval(u);
8933
8982
  } };
8934
8983
  }
8935
- function gs(i) {
8984
+ function vs(i) {
8936
8985
  const r = [i.check1, i.check2].map((t, s) => `
8937
8986
  <div class="__crossx-pw-notice-item" data-check-index="${s}" role="checkbox" aria-checked="false" tabindex="0">
8938
- <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${ys}</div>
8987
+ <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${Is}</div>
8939
8988
  <span class="__crossx-pw-notice-item-text">${w(t)}</span>
8940
8989
  </div>
8941
8990
  `).join("");
@@ -8951,7 +9000,7 @@ function gs(i) {
8951
9000
  <div class="__crossx-pw-fields __crossx-pw-fields--notice">
8952
9001
  <div class="__crossx-pw-notice-header">
8953
9002
  <div class="__crossx-pw-notice-title-row">
8954
- <span class="__crossx-pw-notice-icon">${bs}</span>
9003
+ <span class="__crossx-pw-notice-icon">${ks}</span>
8955
9004
  <p class="__crossx-pw-notice-title">${w(i.noticeTitle)}</p>
8956
9005
  </div>
8957
9006
  <p class="__crossx-pw-notice-desc">${w(i.noticeDesc)}</p>
@@ -8971,37 +9020,37 @@ function gs(i) {
8971
9020
  <div class="__crossx-home-indicator"></div>
8972
9021
  `;
8973
9022
  }
8974
- function Re(i) {
9023
+ function Ne(i) {
8975
9024
  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">
8976
- ${wt}
9025
+ ${St}
8977
9026
  <span id="__crossx-pin6-lock-countdown"></span>
8978
9027
  </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" : "", _ = Array.from(
8979
9028
  { length: 6 },
8980
9029
  (m, y) => `<input class="__crossx-pin6-box${p}" type="tel" maxlength="1" inputmode="numeric" pattern="[0-9]" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" aria-label="PIN digit ${y + 1}"${e ? " disabled" : ""}>`
8981
- ).join(""), u = e ? " --locked" : "", g = Array.from(
9030
+ ).join(""), u = e ? " --locked" : "", x = Array.from(
8982
9031
  { length: 6 },
8983
9032
  (m, y) => `<div class="__crossx-pin6-dot${u}" data-dot-index="${y}" aria-label="PIN digit ${y + 1}"></div>`
8984
- ).join(""), x = e ? " --disabled" : "", f = `
9033
+ ).join(""), g = e ? " --disabled" : "", f = `
8985
9034
  <div class="__crossx-pin6-numpad" id="__crossx-pin6-numpad">
8986
9035
  <div class="__crossx-pin6-numpad-row">
8987
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="1">1</button>
8988
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="2">2</button>
8989
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="3">3</button>
9036
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="1">1</button>
9037
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="2">2</button>
9038
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="3">3</button>
8990
9039
  </div>
8991
9040
  <div class="__crossx-pin6-numpad-row">
8992
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="4">4</button>
8993
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="5">5</button>
8994
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="6">6</button>
9041
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="4">4</button>
9042
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="5">5</button>
9043
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="6">6</button>
8995
9044
  </div>
8996
9045
  <div class="__crossx-pin6-numpad-row">
8997
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="7">7</button>
8998
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="8">8</button>
8999
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="9">9</button>
9046
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="7">7</button>
9047
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="8">8</button>
9048
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="9">9</button>
9000
9049
  </div>
9001
9050
  <div class="__crossx-pin6-numpad-row">
9002
9051
  <button type="button" class="__crossx-pin6-numpad-key --empty" aria-hidden="true"></button>
9003
- <button type="button" class="__crossx-pin6-numpad-key${x}" data-key="0">0</button>
9004
- <button type="button" class="__crossx-pin6-numpad-key --delete${x}" data-key="backspace" aria-label="Delete">${ms}</button>
9052
+ <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="0">0</button>
9053
+ <button type="button" class="__crossx-pin6-numpad-key --delete${g}" data-key="backspace" aria-label="Delete">${As}</button>
9005
9054
  </div>
9006
9055
  </div>`;
9007
9056
  return `
@@ -9017,7 +9066,7 @@ function Re(i) {
9017
9066
  <div class="__crossx-pin6-boxes" id="__crossx-pin6-boxes">
9018
9067
  ${_}
9019
9068
  <div class="__crossx-pin6-dots" id="__crossx-pin6-dots">
9020
- ${g}
9069
+ ${x}
9021
9070
  </div>
9022
9071
  </div>
9023
9072
  ${o}
@@ -9028,7 +9077,7 @@ function Re(i) {
9028
9077
  ${f}
9029
9078
  `;
9030
9079
  }
9031
- function it(i, e) {
9080
+ function lt(i, e) {
9032
9081
  const r = document.createElement("div");
9033
9082
  return r.id = M, r.innerHTML = `
9034
9083
  <div class="__crossx-card __crossx-card--pin6" style="${H(i)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -9036,50 +9085,50 @@ function it(i, e) {
9036
9085
  </div>
9037
9086
  `, r;
9038
9087
  }
9039
- function fs(i, e) {
9088
+ function Ss(i, e) {
9040
9089
  if (i.length !== 6) return e.tooShort;
9041
9090
  if (!/^\d+$/.test(i)) return e.numbersOnly;
9042
9091
  if (/(.)\1{2}/.test(i)) return e.repeatingDigit;
9043
9092
  const r = i.split("").map(Number), t = r.every((o, n) => n === 0 || o === (r[n - 1] + 1) % 10), s = r.every((o, n) => n === 0 || o === (r[n - 1] + 9) % 10);
9044
9093
  return t || s ? e.sequential : i[0] !== i[1] && i === i.slice(0, 2).repeat(3) ? e.alternatingPattern : null;
9045
9094
  }
9046
- function ws(i) {
9095
+ function Es(i) {
9047
9096
  const e = Math.max(0, Math.ceil(i / 1e3)), r = Math.floor(e / 3600), t = Math.floor(e % 3600 / 60), s = e % 60;
9048
9097
  return r > 0 ? `${r}h ${String(t).padStart(2, "0")}m` : `${String(t).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
9049
9098
  }
9050
- function Ce(i, e, r, t, s, o, n) {
9051
- var We, Ue;
9099
+ function Pe(i, e, r, t, s, o, n) {
9100
+ var ze, qe;
9052
9101
  let a = !!(o && o > Date.now()), l = !1;
9053
- const p = () => Array.from(i.querySelectorAll(".__crossx-pin6-box")), _ = () => i.querySelector("#__crossx-pin6-boxes"), u = () => i.querySelector("#__crossx-pin6-error"), g = () => i.querySelector("#__crossx-pin6-lock-msg"), x = () => i.querySelector("#__crossx-pin6-lock-countdown"), f = () => i.querySelector(".__crossx-pin6-body"), m = "●", y = (b, v) => {
9102
+ const p = () => Array.from(i.querySelectorAll(".__crossx-pin6-box")), _ = () => 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) => {
9054
9103
  b.dataset.digit = v, b.value = m;
9055
9104
  }, S = (b) => {
9056
9105
  delete b.dataset.digit, b.value = "";
9057
- }, E = (b) => b.dataset.digit ?? "", A = () => p().map(E).join(""), I = () => Array.from(i.querySelectorAll(".__crossx-pin6-dot")), T = () => {
9058
- var k;
9059
- const b = p(), v = I();
9106
+ }, E = (b) => b.dataset.digit ?? "", A = () => p().map(E).join(""), k = () => Array.from(i.querySelectorAll(".__crossx-pin6-dot")), T = () => {
9107
+ var I;
9108
+ const b = p(), v = k();
9060
9109
  if (v.length && (v.forEach((R, O) => {
9061
9110
  const $ = !!(b[O] && E(b[O]));
9062
9111
  R.classList.toggle("--filled", $), R.classList.toggle("--active", !1);
9063
9112
  }), !a && !l)) {
9064
9113
  const R = b.findIndex(($) => !E($));
9065
- (k = v[R === -1 ? 5 : R]) == null || k.classList.add("--active");
9114
+ (I = v[R === -1 ? 5 : R]) == null || I.classList.add("--active");
9066
9115
  }
9067
- }, C = () => {
9068
- i.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((v) => v.classList.toggle("--disabled", a)), I().forEach((v) => v.classList.toggle("--locked", a)), T();
9116
+ }, N = () => {
9117
+ i.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((v) => v.classList.toggle("--disabled", a)), k().forEach((v) => v.classList.toggle("--locked", a)), T();
9069
9118
  }, U = (b) => {
9070
9119
  a = b, p().forEach((v) => {
9071
9120
  v.disabled = b, v.classList.toggle("--locked", b);
9072
9121
  });
9073
- }, N = () => i.querySelector("#__crossx-pin6-attempt"), q = () => {
9122
+ }, C = () => i.querySelector("#__crossx-pin6-attempt"), q = () => {
9074
9123
  const b = u();
9075
9124
  b && (b.textContent = "");
9076
9125
  }, z = () => n ?? "Your account will be locked after further failures.", P = () => i.querySelector("#__crossx-pin6-warning"), L = (b) => {
9077
- var k;
9126
+ var I;
9078
9127
  let v = P();
9079
9128
  if (!v) {
9080
9129
  v = document.createElement("p"), v.className = "__crossx-pin6-warning", v.id = "__crossx-pin6-warning";
9081
9130
  const R = u();
9082
- R ? R.insertAdjacentElement("afterend", v) : (k = f()) == null || k.appendChild(v);
9131
+ R ? R.insertAdjacentElement("afterend", v) : (I = f()) == null || I.appendChild(v);
9083
9132
  }
9084
9133
  v.textContent = b;
9085
9134
  }, W = () => {
@@ -9087,43 +9136,43 @@ function Ce(i, e, r, t, s, o, n) {
9087
9136
  b && (b.textContent = "");
9088
9137
  }, ne = (b, v) => {
9089
9138
  var R;
9090
- let k = N();
9091
- if (!k) {
9092
- k = document.createElement("p"), k.className = "__crossx-pin6-attempt", k.id = "__crossx-pin6-attempt";
9139
+ let I = C();
9140
+ if (!I) {
9141
+ I = document.createElement("p"), I.className = "__crossx-pin6-attempt", I.id = "__crossx-pin6-attempt";
9093
9142
  const O = P() ?? u();
9094
- O ? O.insertAdjacentElement("afterend", k) : (R = f()) == null || R.appendChild(k);
9143
+ O ? O.insertAdjacentElement("afterend", I) : (R = f()) == null || R.appendChild(I);
9095
9144
  }
9096
- k.textContent = `${b}/${v}`;
9145
+ I.textContent = `${b}/${v}`;
9097
9146
  }, ae = () => {
9098
- const b = N();
9147
+ const b = C();
9099
9148
  b && (b.textContent = "");
9100
9149
  }, ge = (b) => {
9101
9150
  const v = u();
9102
9151
  v && (v.textContent = b);
9103
- const k = _();
9104
- k == null || k.classList.add("--shake"), setTimeout(() => k == null ? void 0 : k.classList.remove("--shake"), 500), p().forEach(S), setTimeout(() => {
9152
+ const I = _();
9153
+ I == null || I.classList.add("--shake"), setTimeout(() => I == null ? void 0 : I.classList.remove("--shake"), 500), p().forEach(S), setTimeout(() => {
9105
9154
  var R;
9106
9155
  (R = p()[0]) == null || R.focus(), T();
9107
9156
  }, 50);
9108
9157
  }, ce = (b) => {
9109
9158
  var $;
9110
- U(!0), p().forEach(S), C();
9159
+ U(!0), p().forEach(S), N();
9111
9160
  const v = u();
9112
- if (v && (v.textContent = "Too many failed attempts. Please wait."), !g()) {
9161
+ if (v && (v.textContent = "Too many failed attempts. Please wait."), !x()) {
9113
9162
  const F = document.createElement("p");
9114
- F.className = "__crossx-pin6-lock-msg", F.id = "__crossx-pin6-lock-msg", F.innerHTML = `${wt}<span id="__crossx-pin6-lock-countdown"></span>`;
9163
+ F.className = "__crossx-pin6-lock-msg", F.id = "__crossx-pin6-lock-msg", F.innerHTML = `${St}<span id="__crossx-pin6-lock-countdown"></span>`;
9115
9164
  const V = u();
9116
9165
  V ? V.insertAdjacentElement("afterend", F) : ($ = f()) == null || $.appendChild(F);
9117
9166
  }
9118
- const k = () => {
9167
+ const I = () => {
9119
9168
  var ee;
9120
- const F = b - Date.now(), V = x();
9121
- F <= 0 ? (clearInterval(R), U(!1), (ee = g()) == null || ee.remove(), v && (v.textContent = ""), C(), setTimeout(() => {
9169
+ const F = b - Date.now(), V = g();
9170
+ F <= 0 ? (clearInterval(R), U(!1), (ee = x()) == null || ee.remove(), v && (v.textContent = ""), N(), setTimeout(() => {
9122
9171
  var fe;
9123
9172
  return (fe = p()[0]) == null ? void 0 : fe.focus();
9124
- }, 50)) : V && (V.textContent = ` ${ws(F)}`);
9125
- }, R = setInterval(k, 1e3);
9126
- k();
9173
+ }, 50)) : V && (V.textContent = ` ${Es(F)}`);
9174
+ }, R = setInterval(I, 1e3);
9175
+ I();
9127
9176
  const O = new MutationObserver(() => {
9128
9177
  document.contains(i) || (clearInterval(R), O.disconnect());
9129
9178
  });
@@ -9154,36 +9203,36 @@ function Ce(i, e, r, t, s, o, n) {
9154
9203
  var b;
9155
9204
  return (b = p()[0]) == null ? void 0 : b.focus();
9156
9205
  }, 100);
9157
- const Be = () => {
9206
+ const Ke = () => {
9158
9207
  if (a || l) return;
9159
- const b = p(), v = b.find((k) => !E(k)) ?? b[b.length - 1];
9208
+ const b = p(), v = b.find((I) => !E(I)) ?? b[b.length - 1];
9160
9209
  v == null || v.focus();
9161
9210
  };
9162
- (We = _()) == null || We.addEventListener("click", (b) => {
9163
- b.target.classList.contains("__crossx-pin6-box") || Be();
9164
- }), (Ue = f()) == null || Ue.addEventListener("click", (b) => {
9211
+ (ze = _()) == null || ze.addEventListener("click", (b) => {
9212
+ b.target.classList.contains("__crossx-pin6-box") || Ke();
9213
+ }), (qe = f()) == null || qe.addEventListener("click", (b) => {
9165
9214
  const v = b.target;
9166
- v.classList.contains("__crossx-pin6-box") || v.closest("button") || Be();
9215
+ v.classList.contains("__crossx-pin6-box") || v.closest("button") || Ke();
9167
9216
  }), p().forEach((b, v) => {
9168
9217
  b.addEventListener("input", () => {
9169
9218
  var R;
9170
- const k = b.value.replace(/\D/g, "").slice(-1);
9171
- k ? y(b, k) : S(b), q(), k && v < 5 && ((R = p()[v + 1]) == null || R.focus()), T(), A().length === 6 && setTimeout(Ee, 80);
9172
- }), b.addEventListener("keydown", (k) => {
9219
+ const I = b.value.replace(/\D/g, "").slice(-1);
9220
+ I ? y(b, I) : S(b), q(), I && v < 5 && ((R = p()[v + 1]) == null || R.focus()), T(), A().length === 6 && setTimeout(Ee, 80);
9221
+ }), b.addEventListener("keydown", (I) => {
9173
9222
  var R, O;
9174
- if (k.key === "Backspace") {
9175
- if (k.preventDefault(), E(b))
9223
+ if (I.key === "Backspace") {
9224
+ if (I.preventDefault(), E(b))
9176
9225
  S(b);
9177
9226
  else if (v > 0) {
9178
9227
  const $ = p()[v - 1];
9179
9228
  S($), $.focus();
9180
9229
  }
9181
9230
  T();
9182
- } else k.key === "ArrowLeft" && v > 0 ? (k.preventDefault(), (R = p()[v - 1]) == null || R.focus()) : k.key === "ArrowRight" && v < 5 ? (k.preventDefault(), (O = p()[v + 1]) == null || O.focus()) : k.key === "Escape" && r();
9183
- }), b.addEventListener("paste", (k) => {
9231
+ } else I.key === "ArrowLeft" && v > 0 ? (I.preventDefault(), (R = p()[v - 1]) == null || R.focus()) : I.key === "ArrowRight" && v < 5 ? (I.preventDefault(), (O = p()[v + 1]) == null || O.focus()) : I.key === "Escape" && r();
9232
+ }), b.addEventListener("paste", (I) => {
9184
9233
  var $, F;
9185
- k.preventDefault();
9186
- const R = ((($ = k.clipboardData) == null ? void 0 : $.getData("text")) ?? "").replace(/\D/g, "").slice(0, 6);
9234
+ I.preventDefault();
9235
+ const R = ((($ = I.clipboardData) == null ? void 0 : $.getData("text")) ?? "").replace(/\D/g, "").slice(0, 6);
9187
9236
  if (!R) return;
9188
9237
  const O = p();
9189
9238
  R.split("").forEach((V, ee) => {
@@ -9201,7 +9250,7 @@ function Ce(i, e, r, t, s, o, n) {
9201
9250
  const O = R.target.closest(".__crossx-pin6-numpad-key");
9202
9251
  !O || a || l || (v(), b = O, O.classList.add("--pressed"), O.setPointerCapture(R.pointerId));
9203
9252
  });
9204
- const k = (R) => {
9253
+ const I = (R) => {
9205
9254
  const O = R.dataset.key;
9206
9255
  if (!O) return;
9207
9256
  if (O === "backspace") {
@@ -9218,22 +9267,22 @@ function Ce(i, e, r, t, s, o, n) {
9218
9267
  const O = b;
9219
9268
  v();
9220
9269
  const $ = O.getBoundingClientRect();
9221
- R.clientX >= $.left && R.clientX <= $.right && R.clientY >= $.top && R.clientY <= $.bottom && !a && !l && k(O);
9222
- }), _e.addEventListener("pointercancel", v), _e.addEventListener("pointerleave", v, !0), T(), o && o > Date.now() && C();
9270
+ R.clientX >= $.left && R.clientX <= $.right && R.clientY >= $.top && R.clientY <= $.bottom && !a && !l && I(O);
9271
+ }), _e.addEventListener("pointercancel", v), _e.addEventListener("pointerleave", v, !0), T(), o && o > Date.now() && N();
9223
9272
  }
9224
9273
  }
9225
- const ms = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
9274
+ const As = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
9226
9275
  <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"/>
9227
9276
  <line x1="10" y1="5.5" x2="16" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
9228
9277
  <line x1="16" y1="5.5" x2="10" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
9229
- </svg>`, wt = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
9278
+ </svg>`, St = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
9230
9279
  <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"/>
9231
- </svg>`, ys = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
9280
+ </svg>`, Is = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
9232
9281
  <path d="M1 4.5L4 7.5L10 1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
9233
- </svg>`, bs = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9282
+ </svg>`, ks = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9234
9283
  <path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="currentColor"/>
9235
9284
  </svg>`;
9236
- function vs(i, e, r) {
9285
+ function Ts(i, e, r) {
9237
9286
  var o;
9238
9287
  const t = i.querySelectorAll(".__crossx-pin-input");
9239
9288
  t.forEach((n, a) => {
@@ -9251,8 +9300,8 @@ function vs(i, e, r) {
9251
9300
  l.preventDefault();
9252
9301
  const p = (((u = l.clipboardData) == null ? void 0 : u.getData("text")) ?? "").replace(/\D/g, "").slice(0, 4);
9253
9302
  if (!p) return;
9254
- p.split("").forEach((g, x) => {
9255
- t[x] && (t[x].value = g);
9303
+ p.split("").forEach((x, g) => {
9304
+ t[g] && (t[g].value = x);
9256
9305
  });
9257
9306
  const _ = Math.min(p.length, 3);
9258
9307
  t[_].focus(), p.length === 4 && setTimeout(() => e(p), 200);
@@ -9266,9 +9315,9 @@ function vs(i, e, r) {
9266
9315
  }
9267
9316
  }), (o = t[0]) == null || o.focus();
9268
9317
  }
9269
- class Ss {
9270
- constructor(e = "light", r, t = Me, s) {
9271
- this.theme = e, this.overrides = r, this.tokens = rt(e, r), this.displayDecimals = t, this.pinKeyboard = s;
9318
+ class Rs {
9319
+ constructor(e = "light", r, t = Fe, s) {
9320
+ this.theme = e, this.overrides = r, this.tokens = at(e, r), this.displayDecimals = t, this.pinKeyboard = s, Lr();
9272
9321
  }
9273
9322
  setPinKeyboard(e) {
9274
9323
  this.pinKeyboard = e;
@@ -9288,7 +9337,7 @@ class Ss {
9288
9337
  e && e.classList.toggle("--native-keypad", this.resolvePinKeyboardMode() === "native");
9289
9338
  }
9290
9339
  setTheme(e, r) {
9291
- this.theme = e, r !== void 0 && (this.overrides = r), this.tokens = rt(e, this.overrides);
9340
+ this.theme = e, r !== void 0 && (this.overrides = r), this.tokens = at(e, this.overrides);
9292
9341
  }
9293
9342
  setMessages(e) {
9294
9343
  this.messages = e;
@@ -9311,23 +9360,23 @@ class Ss {
9311
9360
  return new Promise((s, o) => {
9312
9361
  var E;
9313
9362
  G();
9314
- const n = [...e], a = is(n, this.tokens, t, this.messages), l = re();
9363
+ const n = [...e], a = ds(n, this.tokens, t, this.messages), l = re();
9315
9364
  K(a);
9316
9365
  let p = !1;
9317
9366
  const _ = () => {
9318
9367
  p || (p = !0, a.remove(), l());
9319
9368
  };
9320
9369
  let u = null;
9321
- const g = (A) => {
9370
+ const x = (A) => {
9322
9371
  _(), s(A);
9323
- }, x = () => {
9372
+ }, g = () => {
9324
9373
  _(), u ? o(u) : s(null);
9325
9374
  };
9326
9375
  (() => {
9327
9376
  a.querySelectorAll(".__crossx-wallet-item").forEach((A) => {
9328
9377
  A.addEventListener("click", () => {
9329
- const I = A.dataset.walletAddress ?? "", T = parseInt(A.dataset.walletIndex ?? "0", 10), C = n.find((U) => U.index === T);
9330
- g({ address: I, index: T, name: C == null ? void 0 : C.name });
9378
+ const k = A.dataset.walletAddress ?? "", T = parseInt(A.dataset.walletIndex ?? "0", 10), N = n.find((U) => U.index === T);
9379
+ x({ address: k, index: T, name: N == null ? void 0 : N.name });
9331
9380
  });
9332
9381
  });
9333
9382
  })();
@@ -9337,10 +9386,10 @@ class Ss {
9337
9386
  try {
9338
9387
  const A = await r();
9339
9388
  n.push(A);
9340
- const I = a.querySelector("#__crossx-wallet-list");
9341
- if (I) {
9389
+ const k = a.querySelector("#__crossx-wallet-list");
9390
+ if (k) {
9342
9391
  const T = document.createElement("button");
9343
- T.className = "__crossx-wallet-item", T.dataset.walletIndex = String(A.index), T.dataset.walletAddress = A.address, T.innerHTML = `${ft(A.address, A.index, this.tokens.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(gt(A))}</span><span class="__crossx-wallet-addr">${lt(A.address)}</span></span>`, T.addEventListener("click", () => g(A)), I.appendChild(T);
9392
+ T.className = "__crossx-wallet-item", T.dataset.walletIndex = String(A.index), T.dataset.walletAddress = A.address, T.innerHTML = `${vt(A.address, A.index, this.tokens.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(A))}</span><span class="__crossx-wallet-addr">${ht(A.address)}</span></span>`, T.addEventListener("click", () => x(A)), k.appendChild(T);
9344
9393
  try {
9345
9394
  T.scrollIntoView({ behavior: "smooth", block: "nearest" });
9346
9395
  } catch {
@@ -9348,14 +9397,14 @@ class Ss {
9348
9397
  }
9349
9398
  y.disabled = !1;
9350
9399
  } catch (A) {
9351
- const I = A instanceof h && A.code === d.ADDRESS_LIMIT_EXCEEDED, T = this.resolveAddWalletErrorMessage(A);
9352
- m && (m.textContent = T, m.hidden = !1), I ? (y.disabled = !0, y.setAttribute("aria-disabled", "true")) : y.disabled = !1, u = A;
9400
+ const k = A instanceof h && A.code === d.ADDRESS_LIMIT_EXCEEDED, T = this.resolveAddWalletErrorMessage(A);
9401
+ m && (m.textContent = T, m.hidden = !1), k ? (y.disabled = !0, y.setAttribute("aria-disabled", "true")) : y.disabled = !1, u = A;
9353
9402
  }
9354
- }), (E = a.querySelector("#__crossx-close-btn")) == null || E.addEventListener("click", x), a.addEventListener("click", (A) => {
9355
- A.target === a && x();
9403
+ }), (E = a.querySelector("#__crossx-close-btn")) == null || E.addEventListener("click", g), a.addEventListener("click", (A) => {
9404
+ A.target === a && g();
9356
9405
  });
9357
9406
  const S = (A) => {
9358
- A.key === "Escape" && (document.removeEventListener("keydown", S), x());
9407
+ A.key === "Escape" && (document.removeEventListener("keydown", S), g());
9359
9408
  };
9360
9409
  document.addEventListener("keydown", S);
9361
9410
  });
@@ -9364,7 +9413,7 @@ class Ss {
9364
9413
  return new Promise((e) => {
9365
9414
  var a, l;
9366
9415
  G();
9367
- const r = os(this.tokens, this.messages), t = re();
9416
+ const r = ps(this.tokens, this.messages), t = re();
9368
9417
  K(r);
9369
9418
  let s = !1, o = null;
9370
9419
  const n = () => {
@@ -9387,7 +9436,7 @@ class Ss {
9387
9436
  resolveAddWalletErrorMessage(e) {
9388
9437
  const r = this.messages;
9389
9438
  if (e instanceof h && e.code === d.ADDRESS_LIMIT_EXCEEDED) {
9390
- const s = e.details, o = typeof (s == null ? void 0 : s.limit) == "number" ? s.limit : Ne;
9439
+ const s = e.details, o = typeof (s == null ? void 0 : s.limit) == "number" ? s.limit : Ce;
9391
9440
  return ((r == null ? void 0 : r.wallet_selector_add_error_limit_exceeded) ?? "Account limit reached. Maximum {limit} accounts allowed.").replace("{limit}", String(o));
9392
9441
  }
9393
9442
  return (r == null ? void 0 : r.wallet_selector_add_error_generic) ?? "Failed to add a new account. Please try again.";
@@ -9403,9 +9452,9 @@ class Ss {
9403
9452
  (s) => Object.values(ue).includes(s) && String(s).trim() !== ""
9404
9453
  )) ?? [];
9405
9454
  return new Promise((s) => {
9406
- var g, x, f, m;
9455
+ var x, g, f, m;
9407
9456
  G();
9408
- const o = ds(this.tokens, r, this.messages), n = re();
9457
+ const o = gs(this.tokens, r, this.messages), n = re();
9409
9458
  K(o);
9410
9459
  const a = () => {
9411
9460
  o.remove(), n();
@@ -9416,7 +9465,7 @@ class Ss {
9416
9465
  }, _ = () => {
9417
9466
  a(), s(null);
9418
9467
  };
9419
- (g = o.querySelector("#__crossx-apple-btn")) == null || g.addEventListener("click", () => l("apple")), (x = o.querySelector("#__crossx-google-btn")) == null || x.addEventListener("click", () => l("google")), (f = o.querySelector("#__crossx-connect-other-wallet-btn")) == null || f.addEventListener("click", (y) => {
9468
+ (x = o.querySelector("#__crossx-apple-btn")) == null || x.addEventListener("click", () => l("apple")), (g = o.querySelector("#__crossx-google-btn")) == null || g.addEventListener("click", () => l("google")), (f = o.querySelector("#__crossx-connect-other-wallet-btn")) == null || f.addEventListener("click", (y) => {
9420
9469
  const E = y.currentTarget.dataset.walletId ?? "";
9421
9470
  E && p(E);
9422
9471
  }), (m = o.querySelector("#__crossx-close-btn")) == null || m.addEventListener("click", _), o.addEventListener("click", (y) => {
@@ -9432,9 +9481,9 @@ class Ss {
9432
9481
  }
9433
9482
  showSessionAlert(e) {
9434
9483
  return new Promise((r) => {
9435
- var _, u, g;
9484
+ var _, u, x;
9436
9485
  G();
9437
- const t = this.messages, s = ps(this.tokens, {
9486
+ const t = this.messages, s = fs(this.tokens, {
9438
9487
  title: e.title,
9439
9488
  message: e.message,
9440
9489
  email: e.email,
@@ -9451,7 +9500,7 @@ class Ss {
9451
9500
  }, p = () => {
9452
9501
  a(), r("signin-again");
9453
9502
  };
9454
- (_ = s.querySelector("#__crossx-session-signout")) == null || _.addEventListener("click", l), (u = s.querySelector("#__crossx-session-signin")) == null || u.addEventListener("click", p), (g = s.querySelector("#__crossx-close-btn")) == null || g.addEventListener("click", l);
9503
+ (_ = s.querySelector("#__crossx-session-signout")) == null || _.addEventListener("click", l), (u = s.querySelector("#__crossx-session-signin")) == null || u.addEventListener("click", p), (x = s.querySelector("#__crossx-close-btn")) == null || x.addEventListener("click", l);
9455
9504
  });
9456
9505
  }
9457
9506
  /**
@@ -9464,7 +9513,7 @@ class Ss {
9464
9513
  return new Promise((t) => {
9465
9514
  var a, l, p;
9466
9515
  G();
9467
- const s = _s(this.tokens, r);
9516
+ const s = ws(this.tokens, r);
9468
9517
  K(s);
9469
9518
  const o = () => s.remove(), n = () => {
9470
9519
  o(), t("recover");
@@ -9473,11 +9522,11 @@ class Ss {
9473
9522
  const _ = () => {
9474
9523
  o(), t("skip");
9475
9524
  };
9476
- (l = s.querySelector("#__crossx-skip-btn")) == null || l.addEventListener("click", _), (p = s.querySelector("#__crossx-close-btn")) == null || p.addEventListener("click", _), s.addEventListener("click", (g) => {
9477
- g.target === s && _();
9525
+ (l = s.querySelector("#__crossx-skip-btn")) == null || l.addEventListener("click", _), (p = s.querySelector("#__crossx-close-btn")) == null || p.addEventListener("click", _), s.addEventListener("click", (x) => {
9526
+ x.target === s && _();
9478
9527
  });
9479
- const u = (g) => {
9480
- g.key === "Escape" && (document.removeEventListener("keydown", u), _());
9528
+ const u = (x) => {
9529
+ x.key === "Escape" && (document.removeEventListener("keydown", u), _());
9481
9530
  };
9482
9531
  document.addEventListener("keydown", u);
9483
9532
  }
@@ -9511,16 +9560,16 @@ class Ss {
9511
9560
  title: (t == null ? void 0 : t.pin_setup_confirm_title) ?? "Confirm PIN",
9512
9561
  headerSubtitle: (t == null ? void 0 : t.pin_setup_header_subtitle) ?? "This PIN is used to authorize your transactions.",
9513
9562
  subtitle: (t == null ? void 0 : t.pin_setup_confirm_subtitle) ?? "Confirm your 6-digit PIN"
9514
- }, a = it(this.tokens, gs(s)), l = re();
9563
+ }, a = lt(this.tokens, vs(s)), l = re();
9515
9564
  K(a);
9516
9565
  let p = !1;
9517
9566
  const _ = () => {
9518
9567
  p || (p = !0, a.remove(), l());
9519
9568
  }, u = (E) => {
9520
9569
  _(), r(E);
9521
- }, g = () => {
9570
+ }, x = () => {
9522
9571
  _(), r(null);
9523
- }, x = a.querySelector(".__crossx-card"), f = {
9572
+ }, g = a.querySelector(".__crossx-card"), f = {
9524
9573
  tooShort: (t == null ? void 0 : t.pin_validation_too_short) ?? "Please enter a 6-digit PIN.",
9525
9574
  numbersOnly: (t == null ? void 0 : t.pin_validation_numbers_only) ?? "Only numbers (0-9) are allowed.",
9526
9575
  repeatingDigit: (t == null ? void 0 : t.pin_validation_repeating_digit) ?? "Cannot use the same number 3+ times in a row.",
@@ -9528,65 +9577,65 @@ class Ss {
9528
9577
  alternatingPattern: (t == null ? void 0 : t.pin_validation_alternating_pattern) ?? "Repeating patterns (e.g., 121212) are not allowed."
9529
9578
  }, m = (E) => {
9530
9579
  var A;
9531
- x.innerHTML = Re({
9580
+ g.innerHTML = Ne({
9532
9581
  title: n.title,
9533
9582
  headerSubtitle: n.headerSubtitle,
9534
9583
  subtitle: n.subtitle
9535
- }), this.applyPinKeyboardMode(x), (A = x.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", g), Ce(x, (I) => {
9536
- I === E ? u(E) : y(o.mismatchError);
9537
- }, g);
9584
+ }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (k) => {
9585
+ k === E ? u(E) : y(o.mismatchError);
9586
+ }, x);
9538
9587
  }, y = (E) => {
9539
9588
  var A;
9540
- x.innerHTML = Re({
9589
+ g.innerHTML = Ne({
9541
9590
  title: o.title,
9542
9591
  headerSubtitle: o.headerSubtitle,
9543
9592
  subtitle: o.subtitle,
9544
9593
  errorMessage: E
9545
- }), this.applyPinKeyboardMode(x), (A = x.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", g), Ce(x, (I) => {
9546
- const T = fs(I, f);
9547
- T ? y(T) : m(I);
9548
- }, g);
9594
+ }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (k) => {
9595
+ const T = Ss(k, f);
9596
+ T ? y(T) : m(k);
9597
+ }, x);
9549
9598
  };
9550
9599
  (() => {
9551
9600
  var z;
9552
- const E = Array.from(x.querySelectorAll(".__crossx-pw-notice-item")), A = x.querySelector("#__crossx-pin-notice-next"), I = /* @__PURE__ */ new Set();
9601
+ const E = Array.from(g.querySelectorAll(".__crossx-pw-notice-item")), A = g.querySelector("#__crossx-pin-notice-next"), k = /* @__PURE__ */ new Set();
9553
9602
  A.removeAttribute("disabled");
9554
- const T = A.dataset.nextLabel ?? "Next", C = A.dataset.submitLabel ?? "I Understand", U = () => {
9555
- const P = I.size === E.length;
9556
- A.classList.toggle("--disabled", !P), A.textContent = C || T;
9557
- }, N = (P, L) => {
9558
- if (I.has(L)) return;
9603
+ const T = A.dataset.nextLabel ?? "Next", N = A.dataset.submitLabel ?? "I Understand", U = () => {
9604
+ const P = k.size === E.length;
9605
+ A.classList.toggle("--disabled", !P), A.textContent = N || T;
9606
+ }, C = (P, L) => {
9607
+ if (k.has(L)) return;
9559
9608
  const W = P.querySelector(`#__crossx-notice-check-${L}`);
9560
- I.add(L), W.classList.add("--checked"), P.setAttribute("aria-checked", "true"), U();
9609
+ k.add(L), W.classList.add("--checked"), P.setAttribute("aria-checked", "true"), U();
9561
9610
  }, q = (P, L) => {
9562
- if (!I.has(L)) return;
9611
+ if (!k.has(L)) return;
9563
9612
  const W = P.querySelector(`#__crossx-notice-check-${L}`);
9564
- I.delete(L), W.classList.remove("--checked"), P.setAttribute("aria-checked", "false"), U();
9613
+ k.delete(L), W.classList.remove("--checked"), P.setAttribute("aria-checked", "false"), U();
9565
9614
  };
9566
9615
  E.forEach((P) => {
9567
9616
  const L = parseInt(P.dataset.checkIndex ?? "0", 10);
9568
9617
  P.addEventListener("click", () => {
9569
- I.has(L) ? q(P, L) : N(P, L);
9618
+ k.has(L) ? q(P, L) : C(P, L);
9570
9619
  }), P.addEventListener("keydown", (W) => {
9571
- (W.key === " " || W.key === "Enter") && (W.preventDefault(), I.has(L) ? q(P, L) : N(P, L));
9620
+ (W.key === " " || W.key === "Enter") && (W.preventDefault(), k.has(L) ? q(P, L) : C(P, L));
9572
9621
  });
9573
9622
  }), A.addEventListener("click", () => {
9574
- if (I.size === E.length) {
9623
+ if (k.size === E.length) {
9575
9624
  y(e == null ? void 0 : e.errorMessage);
9576
9625
  return;
9577
9626
  }
9578
9627
  const P = E.find((W) => {
9579
9628
  const ne = parseInt(W.dataset.checkIndex ?? "0", 10);
9580
- return !I.has(ne);
9629
+ return !k.has(ne);
9581
9630
  });
9582
9631
  if (!P) return;
9583
9632
  const L = parseInt(P.dataset.checkIndex ?? "0", 10);
9584
9633
  P.scrollIntoView({ behavior: "smooth", block: "nearest" }), P.classList.add("--highlight"), setTimeout(() => {
9585
- P.classList.remove("--highlight"), N(P, L);
9634
+ P.classList.remove("--highlight"), C(P, L);
9586
9635
  }, 400);
9587
- }), (z = x.querySelector("#__crossx-close-btn")) == null || z.addEventListener("click", g);
9636
+ }), (z = g.querySelector("#__crossx-close-btn")) == null || z.addEventListener("click", x);
9588
9637
  })(), a.addEventListener("click", (E) => {
9589
- E.target === a && g();
9638
+ E.target === a && x();
9590
9639
  });
9591
9640
  });
9592
9641
  }
@@ -9599,9 +9648,9 @@ class Ss {
9599
9648
  return new Promise((r, t) => {
9600
9649
  var S;
9601
9650
  G();
9602
- 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 = it(
9651
+ 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 = lt(
9603
9652
  this.tokens,
9604
- Re({
9653
+ Ne({
9605
9654
  title: n,
9606
9655
  headerSubtitle: a,
9607
9656
  errorMessage: e == null ? void 0 : e.errorMessage,
@@ -9613,16 +9662,16 @@ class Ss {
9613
9662
  ), _ = re();
9614
9663
  K(p);
9615
9664
  let u = !1;
9616
- const g = () => {
9665
+ const x = () => {
9617
9666
  u || (u = !0, p.remove(), _());
9618
- }, x = (E) => {
9619
- g(), r(E);
9667
+ }, g = (E) => {
9668
+ x(), r(E);
9620
9669
  }, f = () => {
9621
- g(), r(null);
9670
+ x(), r(null);
9622
9671
  }, m = (E) => {
9623
- g(), t(E);
9672
+ x(), t(E);
9624
9673
  }, y = p.querySelector(".__crossx-card");
9625
- this.applyPinKeyboardMode(y), (S = y.querySelector("#__crossx-close-btn")) == null || S.addEventListener("click", f), Ce(y, x, f, m, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, l), p.addEventListener("click", (E) => {
9674
+ this.applyPinKeyboardMode(y), (S = y.querySelector("#__crossx-close-btn")) == null || S.addEventListener("click", f), Pe(y, g, f, m, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, l), p.addEventListener("click", (E) => {
9626
9675
  E.target === p && f();
9627
9676
  });
9628
9677
  });
@@ -9638,14 +9687,14 @@ class Ss {
9638
9687
  return new Promise((r) => {
9639
9688
  var l;
9640
9689
  G();
9641
- const t = hs(this.tokens, e);
9690
+ const t = ms(this.tokens, e);
9642
9691
  K(t);
9643
9692
  const s = () => t.remove(), o = (p) => {
9644
9693
  s(), r(p);
9645
9694
  }, n = () => {
9646
9695
  s(), r(null);
9647
9696
  }, a = t.querySelector(".__crossx-card");
9648
- a && this.applyPinKeyboardMode(a), vs(t, o, n), (l = t.querySelector("#__crossx-close-btn")) == null || l.addEventListener("click", n), t.addEventListener("click", (p) => {
9697
+ a && this.applyPinKeyboardMode(a), Ts(t, o, n), (l = t.querySelector("#__crossx-close-btn")) == null || l.addEventListener("click", n), t.addEventListener("click", (p) => {
9649
9698
  p.target === t && n();
9650
9699
  });
9651
9700
  });
@@ -9660,7 +9709,7 @@ class Ss {
9660
9709
  return new Promise((t) => {
9661
9710
  var p;
9662
9711
  G();
9663
- const { overlay: s, startCountdown: o } = xs(this.tokens, e, r);
9712
+ const { overlay: s, startCountdown: o } = bs(this.tokens, e, r);
9664
9713
  K(s);
9665
9714
  const n = () => {
9666
9715
  l(), s.remove();
@@ -9680,17 +9729,17 @@ class Ss {
9680
9729
  return new Promise((r) => {
9681
9730
  var a, l;
9682
9731
  G();
9683
- const t = jr(e, this.tokens, this.messages);
9732
+ const t = es(e, this.tokens, this.messages);
9684
9733
  K(t);
9685
9734
  const s = () => t.remove(), o = () => {
9686
9735
  s(), r();
9687
9736
  };
9688
9737
  (a = t.querySelector("#__crossx-done-btn")) == null || a.addEventListener("click", o), (l = t.querySelector("#__crossx-close-btn")) == null || l.addEventListener("click", o), t.querySelectorAll(".__crossx-copy-btn").forEach((p) => {
9689
9738
  p.addEventListener("click", (_) => {
9690
- var g;
9739
+ var x;
9691
9740
  _.stopPropagation();
9692
9741
  const u = p.dataset.copy;
9693
- u && ((g = navigator.clipboard) == null || g.writeText(u).catch(() => {
9742
+ u && ((x = navigator.clipboard) == null || x.writeText(u).catch(() => {
9694
9743
  }));
9695
9744
  });
9696
9745
  }), t.addEventListener("click", (p) => {
@@ -9709,7 +9758,7 @@ class Ss {
9709
9758
  showTransactionProgress(e, r) {
9710
9759
  return new Promise((t) => {
9711
9760
  G();
9712
- const s = Yr(e, this.tokens, this.messages);
9761
+ const s = ts(e, this.tokens, this.messages);
9713
9762
  K(s);
9714
9763
  const o = () => s.remove();
9715
9764
  let n = !1;
@@ -9717,16 +9766,16 @@ class Ss {
9717
9766
  n || (n = !0, o(), t());
9718
9767
  }, l = () => {
9719
9768
  var _, u;
9720
- (_ = s.querySelector("#__crossx-done-btn")) == null || _.addEventListener("click", a), (u = s.querySelector("#__crossx-close-btn")) == null || u.addEventListener("click", a), s.addEventListener("click", (g) => {
9721
- g.target === s && a();
9769
+ (_ = s.querySelector("#__crossx-done-btn")) == null || _.addEventListener("click", a), (u = s.querySelector("#__crossx-close-btn")) == null || u.addEventListener("click", a), s.addEventListener("click", (x) => {
9770
+ x.target === s && a();
9722
9771
  });
9723
- const p = (g) => {
9724
- g.key === "Escape" && (document.removeEventListener("keydown", p), a());
9772
+ const p = (x) => {
9773
+ x.key === "Escape" && (document.removeEventListener("keydown", p), a());
9725
9774
  };
9726
9775
  document.addEventListener("keydown", p);
9727
9776
  };
9728
9777
  r.then((p) => {
9729
- n || (Xr(s, p, this.tokens, this.messages), l());
9778
+ n || (rs(s, p, this.tokens, this.messages), l());
9730
9779
  });
9731
9780
  });
9732
9781
  }
@@ -9735,7 +9784,7 @@ class Ss {
9735
9784
  var p, _, u;
9736
9785
  G();
9737
9786
  let t;
9738
- e.type === "sign-message" ? t = Jr(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = Zr(e, this.tokens, this.messages) : e.type === "sign" ? t = Br(e, this.tokens, this.displayDecimals, this.messages) : t = Hr(e, this.tokens, this.displayDecimals, this.messages);
9787
+ e.type === "sign-message" ? t = ss(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = is(e, this.tokens, this.messages) : e.type === "sign" ? t = zr(e, this.tokens, this.displayDecimals, this.messages) : t = jr(e, this.tokens, this.displayDecimals, this.messages);
9739
9788
  const s = re();
9740
9789
  K(t);
9741
9790
  const o = () => {
@@ -9745,25 +9794,25 @@ class Ss {
9745
9794
  }, a = () => {
9746
9795
  o(), r(!1);
9747
9796
  };
9748
- (p = t.querySelector("#__crossx-confirm-btn")) == null || p.addEventListener("click", n), (_ = t.querySelector("#__crossx-cancel-btn")) == null || _.addEventListener("click", a), (u = t.querySelector("#__crossx-close-btn")) == null || u.addEventListener("click", a), t.querySelectorAll(".__crossx-copy-btn").forEach((g) => {
9749
- g.addEventListener("click", (x) => {
9797
+ (p = t.querySelector("#__crossx-confirm-btn")) == null || p.addEventListener("click", n), (_ = t.querySelector("#__crossx-cancel-btn")) == null || _.addEventListener("click", a), (u = t.querySelector("#__crossx-close-btn")) == null || u.addEventListener("click", a), t.querySelectorAll(".__crossx-copy-btn").forEach((x) => {
9798
+ x.addEventListener("click", (g) => {
9750
9799
  var m;
9751
- x.stopPropagation();
9752
- const f = g.dataset.copy;
9800
+ g.stopPropagation();
9801
+ const f = x.dataset.copy;
9753
9802
  f && ((m = navigator.clipboard) == null || m.writeText(f).catch(() => {
9754
9803
  }));
9755
9804
  });
9756
- }), kr(t), t.addEventListener("click", (g) => {
9757
- g.target === t && a();
9805
+ }), Cr(t), t.addEventListener("click", (x) => {
9806
+ x.target === t && a();
9758
9807
  });
9759
- const l = (g) => {
9760
- g.key === "Escape" && (document.removeEventListener("keydown", l), a());
9808
+ const l = (x) => {
9809
+ x.key === "Escape" && (document.removeEventListener("keydown", l), a());
9761
9810
  };
9762
9811
  document.addEventListener("keydown", l);
9763
9812
  });
9764
9813
  }
9765
9814
  }
9766
- class Es {
9815
+ class Ns {
9767
9816
  constructor(e, r, t, s = () => !1) {
9768
9817
  this.browserConfirmation = e, this.getBridge = r, this.getOrigin = t, this.isAuthenticatedViaRNBridge = s;
9769
9818
  }
@@ -9933,7 +9982,7 @@ class Es {
9933
9982
  (t = (r = this.browserConfirmation).setPinKeyboard) == null || t.call(r, e);
9934
9983
  }
9935
9984
  }
9936
- class As {
9985
+ class Ps {
9937
9986
  constructor() {
9938
9987
  this._accessToken = null, this._expiresAt = 0;
9939
9988
  }
@@ -9965,7 +10014,7 @@ class As {
9965
10014
  return !this._accessToken || this._expiresAt <= 0 ? !0 : Date.now() >= this._expiresAt - e;
9966
10015
  }
9967
10016
  }
9968
- function Ds(i, e) {
10017
+ function Us(i, e) {
9969
10018
  if (!i.projectId)
9970
10019
  throw new Error(
9971
10020
  `[CROSSx] Fatal: projectId is required but was not provided.
@@ -9981,71 +10030,72 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
9981
10030
  }, s = {
9982
10031
  gatewayUrl: r.walletGatewayUrl,
9983
10032
  projectId: i.projectId
9984
- }, o = t.authMode !== "cookie" && Qe.isAvailable();
10033
+ }, o = t.authMode !== "cookie" && it.isAvailable();
9985
10034
  !o && t.authMode !== "cookie" && c.warn(
9986
10035
  "[CROSSx] IndexedDB 사용 불가 — LocalStorage fallback 사용 중.",
9987
10036
  "refresh_token이 평문 저장되지 않도록 세션 영속성이 제한됩니다.",
9988
10037
  "IndexedDB를 지원하는 브라우저 사용을 권장합니다."
9989
10038
  ), t.secureStorageAvailable = o;
9990
- const n = o ? new Qe(i.projectId) : new pr(), a = new xr(), l = new mr(), p = new se(), _ = new As(), u = new nt();
9991
- let g;
9992
- i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), g = new br(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), g = new ie(
10039
+ const n = o ? new it(i.projectId) : new gr(), a = new yr(), l = new Er(), p = new se(), _ = new Ps(), u = new pt();
10040
+ let x;
10041
+ i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new Ir(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), x = new ie(
9993
10042
  s,
9994
10043
  n,
9995
10044
  l,
9996
10045
  _,
9997
10046
  u
9998
10047
  ));
9999
- let x = null;
10048
+ let g = null;
10000
10049
  const f = () => {
10001
- var C;
10002
- return ((C = x == null ? void 0 : x.isAuthenticatedViaRNBridge) == null ? void 0 : C.call(x)) ?? !1;
10050
+ var N;
10051
+ return ((N = g == null ? void 0 : g.isAuthenticatedViaRNBridge) == null ? void 0 : N.call(g)) ?? !1;
10003
10052
  }, m = () => {
10004
- var C;
10005
- return (C = x == null ? void 0 : x.assertRNBridgeSessionActive) == null ? void 0 : C.call(x);
10053
+ var N;
10054
+ return (N = g == null ? void 0 : g.assertRNBridgeSessionActive) == null ? void 0 : N.call(g);
10006
10055
  };
10007
- g = new vr(
10008
- g,
10056
+ x = new kr(
10057
+ x,
10009
10058
  () => {
10010
- var C;
10011
- return (C = x == null ? void 0 : x.getRNBridge) == null ? void 0 : C.call(x);
10059
+ var N;
10060
+ return (N = g == null ? void 0 : g.getRNBridge) == null ? void 0 : N.call(g);
10012
10061
  },
10013
10062
  f,
10014
- m
10063
+ m,
10064
+ () => i.appName
10015
10065
  );
10016
- const y = new xe(s, l), S = new Ss(
10066
+ const y = new xe(s, l), S = new Rs(
10017
10067
  i.theme ?? "light",
10018
10068
  i.themeTokens,
10019
10069
  i.displayDecimals,
10020
10070
  i.pinKeyboard
10021
- ), E = new Es(
10071
+ ), E = new Ns(
10022
10072
  S,
10023
10073
  () => {
10024
- var C;
10025
- return (C = x == null ? void 0 : x.getRNBridge) == null ? void 0 : C.call(x);
10074
+ var N;
10075
+ return (N = g == null ? void 0 : g.getRNBridge) == null ? void 0 : N.call(g);
10026
10076
  },
10027
10077
  () => typeof window < "u" ? window.location.origin : "http://localhost",
10028
10078
  f
10029
- ), A = e != null && e.wrapConfirmation ? e.wrapConfirmation(E) : E, I = new Oe(
10079
+ ), A = e != null && e.wrapConfirmation ? e.wrapConfirmation(E) : E, k = new Le(
10030
10080
  t,
10031
10081
  s,
10032
10082
  n,
10033
10083
  a,
10034
10084
  l,
10035
10085
  p,
10036
- g,
10086
+ x,
10037
10087
  _,
10038
10088
  A,
10039
10089
  y,
10040
10090
  u
10041
10091
  );
10042
- x = I;
10043
- const T = I.signInUseCase;
10044
- return T && typeof T.setFreshTokenCallback == "function" && T.setFreshTokenCallback(() => I.requestFreshFirebaseIdTokenFromBridge()), typeof window < "u" && (window.__crossxSDK = I), I;
10092
+ g = k;
10093
+ const T = k.signInUseCase;
10094
+ return T && typeof T.setFreshTokenCallback == "function" && T.setFreshTokenCallback(() => k.requestFreshFirebaseIdTokenFromBridge()), typeof window < "u" && (window.__crossxSDK = k), k;
10045
10095
  }
10046
- function $s(i) {
10047
- const e = Is(i), r = ks(e), t = JSON.parse(r);
10048
- Rs(t);
10096
+ function Hs(i) {
10097
+ const e = Cs(i), r = Os(e), t = JSON.parse(r);
10098
+ Ds(t);
10049
10099
  const { data: s } = t;
10050
10100
  return {
10051
10101
  status: t.status,
@@ -10059,7 +10109,7 @@ function $s(i) {
10059
10109
  raw: t
10060
10110
  };
10061
10111
  }
10062
- function Is(i) {
10112
+ function Cs(i) {
10063
10113
  if (i.includes("://") && i.includes("?")) {
10064
10114
  const e = new URL(i), r = e.searchParams.get("crossx_oauth_result");
10065
10115
  if (r) return r;
@@ -10069,22 +10119,22 @@ function Is(i) {
10069
10119
  }
10070
10120
  return i;
10071
10121
  }
10072
- function ks(i) {
10122
+ function Os(i) {
10073
10123
  if (i.startsWith("{"))
10074
10124
  return i;
10075
10125
  if (i.startsWith("%7B") || i.startsWith("%7b"))
10076
10126
  return decodeURIComponent(i);
10077
- const e = Ts(i);
10127
+ const e = Ls(i);
10078
10128
  return decodeURIComponent(e);
10079
10129
  }
10080
- function Ts(i) {
10130
+ function Ls(i) {
10081
10131
  if (typeof atob == "function")
10082
10132
  return atob(i);
10083
10133
  if (typeof Buffer < "u")
10084
10134
  return Buffer.from(i, "base64").toString("utf-8");
10085
10135
  throw new Error("Base64 디코딩을 지원하는 환경이 아닙니다");
10086
10136
  }
10087
- function Rs(i) {
10137
+ function Ds(i) {
10088
10138
  if (typeof i != "object" || i === null)
10089
10139
  throw new Error("Deeplink payload가 유효한 객체가 아닙니다");
10090
10140
  const e = i;
@@ -10101,17 +10151,18 @@ function Rs(i) {
10101
10151
  throw new Error("Deeplink data에 accessToken 필드가 없습니다");
10102
10152
  }
10103
10153
  export {
10104
- At as CONNECT_OTHER_WALLET_DISPLAY_ORDER,
10154
+ Mt as CONNECT_OTHER_WALLET_DISPLAY_ORDER,
10105
10155
  h as CROSSxError,
10106
- Ct as CROSSxEthereumProvider,
10107
- Oe as CROSSxSDK,
10108
- Ls as ChainId,
10156
+ Ht as CROSSxEthereumProvider,
10157
+ Le as CROSSxSDK,
10158
+ Ws as ChainId,
10109
10159
  ue as ConnectOtherWalletItem,
10110
10160
  d as ErrorCode,
10111
- Ne as MNEMONIC_ADDRESS_LIMIT,
10112
- nt as PinMemoryStore,
10113
- As as TokenMemoryStore,
10114
- Ds as createCROSSxSDK,
10115
- It as getConnectOtherWalletLabel,
10116
- $s as parseOAuthDeeplink
10161
+ Ce as MNEMONIC_ADDRESS_LIMIT,
10162
+ pt as PinMemoryStore,
10163
+ Ps as TokenMemoryStore,
10164
+ Be as WALLET_BRAND_NAME,
10165
+ Us as createCROSSxSDK,
10166
+ Ft as getConnectOtherWalletLabel,
10167
+ Hs as parseOAuthDeeplink
10117
10168
  };