@jaw.id/ui 0.4.11 → 0.4.12
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
|
@@ -53127,7 +53127,7 @@ function YL(e = 768) {
|
|
|
53127
53127
|
}
|
|
53128
53128
|
//#endregion
|
|
53129
53129
|
//#region ../core/dist/sdk-info.js
|
|
53130
|
-
var XL = "0.4.
|
|
53130
|
+
var XL = "0.4.4";
|
|
53131
53131
|
(/* @__PURE__ */ L(((e, t) => {
|
|
53132
53132
|
var n = Object.prototype.hasOwnProperty, r = "~";
|
|
53133
53133
|
function i() {}
|
|
@@ -57438,11 +57438,23 @@ function FU(e, t) {
|
|
|
57438
57438
|
if (!(!n || !r || n === r)) return `This sign-in request is for "${r}" but the requesting site is "${n}". This may be a phishing attempt.`;
|
|
57439
57439
|
}
|
|
57440
57440
|
//#endregion
|
|
57441
|
+
//#region src/utils/safeUrl.ts
|
|
57442
|
+
function IU(e) {
|
|
57443
|
+
if (!e) return !1;
|
|
57444
|
+
let t = e.trim();
|
|
57445
|
+
if (/^data:image\//i.test(t)) return !0;
|
|
57446
|
+
try {
|
|
57447
|
+
return new URL(t).protocol === "https:";
|
|
57448
|
+
} catch {
|
|
57449
|
+
return !1;
|
|
57450
|
+
}
|
|
57451
|
+
}
|
|
57452
|
+
//#endregion
|
|
57441
57453
|
//#region src/components/IdentityAvatar.tsx
|
|
57442
|
-
var
|
|
57454
|
+
var LU = /* @__PURE__ */ B(us, {
|
|
57443
57455
|
className: "h-3 w-3 flex-shrink-0",
|
|
57444
57456
|
stroke: "currentColor"
|
|
57445
|
-
}),
|
|
57457
|
+
}), RU = ({ src: e, fallback: t = LU }) => {
|
|
57446
57458
|
let [n, r] = z();
|
|
57447
57459
|
return !e || n === e ? /* @__PURE__ */ B(ut, { children: t }) : /* @__PURE__ */ B("img", {
|
|
57448
57460
|
src: e,
|
|
@@ -57454,27 +57466,27 @@ var IU = /* @__PURE__ */ B(us, {
|
|
|
57454
57466
|
};
|
|
57455
57467
|
//#endregion
|
|
57456
57468
|
//#region src/components/TransactionDialog/ClearSignedView.tsx
|
|
57457
|
-
function
|
|
57469
|
+
function zU(e) {
|
|
57458
57470
|
let [t, n] = e.split("."), r = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
57459
57471
|
return n ? `${r}.${n}` : r;
|
|
57460
57472
|
}
|
|
57461
|
-
function
|
|
57473
|
+
function BU({ row: e }) {
|
|
57462
57474
|
return /* @__PURE__ */ V("p", {
|
|
57463
57475
|
className: "text-foreground break-all font-mono text-xs leading-[150%]",
|
|
57464
57476
|
children: [/* @__PURE__ */ B("span", {
|
|
57465
57477
|
className: "font-semibold",
|
|
57466
|
-
children:
|
|
57478
|
+
children: zU(e.value)
|
|
57467
57479
|
}), e.symbol && /* @__PURE__ */ V("span", {
|
|
57468
57480
|
className: "text-muted-foreground",
|
|
57469
57481
|
children: [" ", e.symbol]
|
|
57470
57482
|
})]
|
|
57471
57483
|
});
|
|
57472
57484
|
}
|
|
57473
|
-
function
|
|
57485
|
+
function VU({ row: e, resolvedName: t, avatarSrc: n }) {
|
|
57474
57486
|
let r = e.rawValue ?? e.value;
|
|
57475
57487
|
return /* @__PURE__ */ V("div", {
|
|
57476
57488
|
className: "flex flex-row items-center gap-1",
|
|
57477
|
-
children: [/* @__PURE__ */ B(
|
|
57489
|
+
children: [/* @__PURE__ */ B(RU, {
|
|
57478
57490
|
src: n,
|
|
57479
57491
|
fallback: null
|
|
57480
57492
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -57483,7 +57495,7 @@ function BU({ row: e, resolvedName: t, avatarSrc: n }) {
|
|
|
57483
57495
|
})]
|
|
57484
57496
|
});
|
|
57485
57497
|
}
|
|
57486
|
-
var
|
|
57498
|
+
var HU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
57487
57499
|
let [r, i] = z({}), [a, o] = z({}), s = lt(/* @__PURE__ */ new Set());
|
|
57488
57500
|
at(() => {
|
|
57489
57501
|
if (!n) return;
|
|
@@ -57537,7 +57549,7 @@ var VU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
|
57537
57549
|
children: [/* @__PURE__ */ B("span", {
|
|
57538
57550
|
className: "text-muted-foreground text-xs font-semibold",
|
|
57539
57551
|
children: e.label
|
|
57540
|
-
}), e.kind === "tokenAmount" || e.kind === "amount" ? /* @__PURE__ */ B(
|
|
57552
|
+
}), e.kind === "tokenAmount" || e.kind === "amount" ? /* @__PURE__ */ B(BU, { row: e }) : e.kind === "address" ? /* @__PURE__ */ B(VU, {
|
|
57541
57553
|
row: e,
|
|
57542
57554
|
resolvedName: i,
|
|
57543
57555
|
avatarSrc: o
|
|
@@ -57549,24 +57561,24 @@ var VU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
|
|
|
57549
57561
|
})
|
|
57550
57562
|
})]
|
|
57551
57563
|
});
|
|
57552
|
-
},
|
|
57553
|
-
function
|
|
57564
|
+
}, UU = "0x0000000000000000000000000000000000000000";
|
|
57565
|
+
function WU(e, t) {
|
|
57554
57566
|
let n = {};
|
|
57555
57567
|
for (let [t, r] of Object.entries(e ?? {})) n[t.toLowerCase()] = r;
|
|
57556
57568
|
for (let [e, r] of Object.entries(t)) n[e.toLowerCase()] = r;
|
|
57557
57569
|
return n;
|
|
57558
57570
|
}
|
|
57559
|
-
var
|
|
57571
|
+
var GU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolvedAvatars: a, mainnetRpcUrl: o }) => {
|
|
57560
57572
|
let { clearSigned: s, decoded: c, isLoading: l } = aU(e, t, n, r), [u, d] = z({}), [f, p] = z({}), m = lt(/* @__PURE__ */ new Set()), h = lt(c);
|
|
57561
57573
|
at(() => {
|
|
57562
57574
|
h.current !== c && (h.current = c, d({}), p({}), m.current = /* @__PURE__ */ new Set());
|
|
57563
57575
|
}, [c]);
|
|
57564
|
-
let g = ct(() =>
|
|
57576
|
+
let g = ct(() => WU(i, u), [i, u]), _ = ct(() => WU(a, f), [a, f]), v = lt(g);
|
|
57565
57577
|
return v.current = g, at(() => {
|
|
57566
57578
|
if (!c || !o) return;
|
|
57567
57579
|
let e = v.current, t = c.params.filter((e) => e.type === "address" && e.rawValue).map((e) => e.rawValue).filter((t) => {
|
|
57568
57580
|
let n = t.toLowerCase();
|
|
57569
|
-
return n !==
|
|
57581
|
+
return n !== UU && !e[n] && !m.current.has(n);
|
|
57570
57582
|
}), r = [...new Set(t)];
|
|
57571
57583
|
if (r.length === 0) return;
|
|
57572
57584
|
r.forEach((e) => m.current.add(e.toLowerCase()));
|
|
@@ -57599,7 +57611,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57599
57611
|
n
|
|
57600
57612
|
]), s && s.rows.length > 0 ? /* @__PURE__ */ V("div", {
|
|
57601
57613
|
className: "flex flex-col gap-2",
|
|
57602
|
-
children: [/* @__PURE__ */ B(
|
|
57614
|
+
children: [/* @__PURE__ */ B(HU, {
|
|
57603
57615
|
display: s,
|
|
57604
57616
|
chainId: n,
|
|
57605
57617
|
mainnetRpcUrl: o
|
|
@@ -57691,7 +57703,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57691
57703
|
})]
|
|
57692
57704
|
}), /* @__PURE__ */ V("div", {
|
|
57693
57705
|
className: "flex flex-row items-center gap-1",
|
|
57694
|
-
children: [/* @__PURE__ */ B(
|
|
57706
|
+
children: [/* @__PURE__ */ B(RU, {
|
|
57695
57707
|
src: r,
|
|
57696
57708
|
fallback: null
|
|
57697
57709
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -57723,7 +57735,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57723
57735
|
children: t
|
|
57724
57736
|
})
|
|
57725
57737
|
});
|
|
57726
|
-
},
|
|
57738
|
+
}, KU = ({ transactions: e, walletAddress: t, gasFee: n, gasFeeLoading: r, gasEstimationError: i, sponsored: a, onConfirm: o, onCancel: s, isProcessing: c, transactionStatus: l, networkName: u, apiKey: d, feeTokens: f, feeTokensLoading: p, selectedFeeToken: m, onFeeTokenSelect: h, showFeeTokenSelector: g, isPayingWithErc20: _, mainnetRpcUrl: v, nativeCurrencySymbol: y }) => {
|
|
57727
57739
|
let b = YL(), [x, S] = z({}), [C, w] = z({}), [T, E] = z({}), [D, O] = z({}), k = e.length, A = k === 1, j = e[0], M = pz(j?.chainId || 1, d, 24), N = f?.find((e) => e.isNative)?.symbol || y || "ETH", P = vz(N), ee = !f || f.length === 0 ? !0 : f.some((e) => e.isSelectable);
|
|
57728
57740
|
at(() => {
|
|
57729
57741
|
let n = [];
|
|
@@ -57873,7 +57885,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57873
57885
|
children: "From"
|
|
57874
57886
|
}), /* @__PURE__ */ V("div", {
|
|
57875
57887
|
className: "flex min-w-0 flex-row items-center gap-1",
|
|
57876
|
-
children: [/* @__PURE__ */ B(
|
|
57888
|
+
children: [/* @__PURE__ */ B(RU, { src: D[t] }), /* @__PURE__ */ B("p", {
|
|
57877
57889
|
className: "break-all text-base font-normal leading-[150%]",
|
|
57878
57890
|
children: ne
|
|
57879
57891
|
})]
|
|
@@ -57888,7 +57900,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
57888
57900
|
}), /* @__PURE__ */ V("div", {
|
|
57889
57901
|
className: "flex min-w-0 flex-row items-center gap-1",
|
|
57890
57902
|
children: [
|
|
57891
|
-
/* @__PURE__ */ B(
|
|
57903
|
+
/* @__PURE__ */ B(RU, { src: j?.to ? D[j.to] : void 0 }),
|
|
57892
57904
|
/* @__PURE__ */ B("p", {
|
|
57893
57905
|
className: "break-all text-base font-normal leading-[150%]",
|
|
57894
57906
|
children: re
|
|
@@ -58091,7 +58103,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58091
58103
|
},
|
|
58092
58104
|
className: "cursor-pointer"
|
|
58093
58105
|
})]
|
|
58094
|
-
}), /* @__PURE__ */ B(
|
|
58106
|
+
}), /* @__PURE__ */ B(GU, {
|
|
58095
58107
|
to: j.to,
|
|
58096
58108
|
data: j.data,
|
|
58097
58109
|
chainId: j.chainId,
|
|
@@ -58130,7 +58142,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58130
58142
|
children: "From"
|
|
58131
58143
|
}), /* @__PURE__ */ V("div", {
|
|
58132
58144
|
className: "flex flex-row items-center gap-1",
|
|
58133
|
-
children: [/* @__PURE__ */ B(
|
|
58145
|
+
children: [/* @__PURE__ */ B(RU, { src: D[t] }), /* @__PURE__ */ B("p", {
|
|
58134
58146
|
className: "break-all text-base font-normal leading-[150%]",
|
|
58135
58147
|
children: ne
|
|
58136
58148
|
})]
|
|
@@ -58182,7 +58194,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58182
58194
|
})]
|
|
58183
58195
|
}), /* @__PURE__ */ V("div", {
|
|
58184
58196
|
className: "flex flex-row items-center gap-1",
|
|
58185
|
-
children: [/* @__PURE__ */ B(
|
|
58197
|
+
children: [/* @__PURE__ */ B(RU, { src: e.to ? D[e.to] : void 0 }), /* @__PURE__ */ B("p", {
|
|
58186
58198
|
className: "text-sm font-normal leading-[150%]",
|
|
58187
58199
|
children: L(e.to)
|
|
58188
58200
|
})]
|
|
@@ -58248,7 +58260,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58248
58260
|
},
|
|
58249
58261
|
className: "cursor-pointer"
|
|
58250
58262
|
})]
|
|
58251
|
-
}), /* @__PURE__ */ B(
|
|
58263
|
+
}), /* @__PURE__ */ B(GU, {
|
|
58252
58264
|
to: e.to,
|
|
58253
58265
|
data: e.data,
|
|
58254
58266
|
chainId: e.chainId,
|
|
@@ -58422,7 +58434,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58422
58434
|
})] })
|
|
58423
58435
|
})
|
|
58424
58436
|
});
|
|
58425
|
-
},
|
|
58437
|
+
}, qU = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
|
|
58426
58438
|
let h = YL(), [g, _] = z(null);
|
|
58427
58439
|
at(() => {
|
|
58428
58440
|
a && s && pU([{
|
|
@@ -58560,7 +58572,7 @@ var WU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58560
58572
|
};
|
|
58561
58573
|
//#endregion
|
|
58562
58574
|
//#region ../../node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
58563
|
-
function
|
|
58575
|
+
function JU(e) {
|
|
58564
58576
|
let t = R.useRef({
|
|
58565
58577
|
value: e,
|
|
58566
58578
|
previous: e
|
|
@@ -58569,13 +58581,13 @@ function qU(e) {
|
|
|
58569
58581
|
}
|
|
58570
58582
|
//#endregion
|
|
58571
58583
|
//#region ../../node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
58572
|
-
var
|
|
58573
|
-
function
|
|
58584
|
+
var YU = "Checkbox", [XU, ZU] = yt(YU), [QU, $U] = XU(YU);
|
|
58585
|
+
function eW(e) {
|
|
58574
58586
|
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, p] = Et({
|
|
58575
58587
|
prop: n,
|
|
58576
58588
|
defaultProp: i ?? !1,
|
|
58577
58589
|
onChange: c,
|
|
58578
|
-
caller:
|
|
58590
|
+
caller: YU
|
|
58579
58591
|
}), [m, h] = R.useState(null), [g, _] = R.useState(null), v = R.useRef(!1), y = m ? !!o || !!m.closest("form") : !0, b = {
|
|
58580
58592
|
checked: f,
|
|
58581
58593
|
disabled: a,
|
|
@@ -58587,19 +58599,19 @@ function $U(e) {
|
|
|
58587
58599
|
value: u,
|
|
58588
58600
|
hasConsumerStoppedPropagationRef: v,
|
|
58589
58601
|
required: l,
|
|
58590
|
-
defaultChecked:
|
|
58602
|
+
defaultChecked: lW(i) ? !1 : i,
|
|
58591
58603
|
isFormControl: y,
|
|
58592
58604
|
bubbleInput: g,
|
|
58593
58605
|
setBubbleInput: _
|
|
58594
58606
|
};
|
|
58595
|
-
return /* @__PURE__ */ B(
|
|
58607
|
+
return /* @__PURE__ */ B(QU, {
|
|
58596
58608
|
scope: t,
|
|
58597
58609
|
...b,
|
|
58598
|
-
children:
|
|
58610
|
+
children: cW(d) ? d(b) : r
|
|
58599
58611
|
});
|
|
58600
58612
|
}
|
|
58601
|
-
var
|
|
58602
|
-
let { control: a, value: o, disabled: s, checked: c, required: l, setControl: u, setChecked: d, hasConsumerStoppedPropagationRef: f, isFormControl: p, bubbleInput: m } =
|
|
58613
|
+
var tW = "CheckboxTrigger", nW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown: t, onClick: n, ...r }, i) => {
|
|
58614
|
+
let { control: a, value: o, disabled: s, checked: c, required: l, setControl: u, setChecked: d, hasConsumerStoppedPropagationRef: f, isFormControl: p, bubbleInput: m } = $U(tW, e), h = _t(i, u), g = R.useRef(c);
|
|
58603
58615
|
return R.useEffect(() => {
|
|
58604
58616
|
let e = a?.form;
|
|
58605
58617
|
if (e) {
|
|
@@ -58609,9 +58621,9 @@ var eW = "CheckboxTrigger", tW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
58609
58621
|
}, [a, d]), /* @__PURE__ */ B(Ft.button, {
|
|
58610
58622
|
type: "button",
|
|
58611
58623
|
role: "checkbox",
|
|
58612
|
-
"aria-checked":
|
|
58624
|
+
"aria-checked": lW(c) ? "mixed" : c,
|
|
58613
58625
|
"aria-required": l,
|
|
58614
|
-
"data-state":
|
|
58626
|
+
"data-state": uW(c),
|
|
58615
58627
|
"data-disabled": s ? "" : void 0,
|
|
58616
58628
|
disabled: s,
|
|
58617
58629
|
value: o,
|
|
@@ -58621,14 +58633,14 @@ var eW = "CheckboxTrigger", tW = R.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
58621
58633
|
e.key === "Enter" && e.preventDefault();
|
|
58622
58634
|
}),
|
|
58623
58635
|
onClick: mt(n, (e) => {
|
|
58624
|
-
d((e) =>
|
|
58636
|
+
d((e) => lW(e) ? !0 : !e), m && p && (f.current = e.isPropagationStopped(), f.current || e.stopPropagation());
|
|
58625
58637
|
})
|
|
58626
58638
|
});
|
|
58627
58639
|
});
|
|
58628
|
-
|
|
58629
|
-
var
|
|
58640
|
+
nW.displayName = tW;
|
|
58641
|
+
var rW = R.forwardRef((e, t) => {
|
|
58630
58642
|
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: l, form: u, ...d } = e;
|
|
58631
|
-
return /* @__PURE__ */ B(
|
|
58643
|
+
return /* @__PURE__ */ B(eW, {
|
|
58632
58644
|
__scopeCheckbox: n,
|
|
58633
58645
|
checked: i,
|
|
58634
58646
|
defaultChecked: a,
|
|
@@ -58638,20 +58650,20 @@ var nW = R.forwardRef((e, t) => {
|
|
|
58638
58650
|
name: r,
|
|
58639
58651
|
form: u,
|
|
58640
58652
|
value: c,
|
|
58641
|
-
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ V(ut, { children: [/* @__PURE__ */ B(
|
|
58653
|
+
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ V(ut, { children: [/* @__PURE__ */ B(nW, {
|
|
58642
58654
|
...d,
|
|
58643
58655
|
ref: t,
|
|
58644
58656
|
__scopeCheckbox: n
|
|
58645
|
-
}), e && /* @__PURE__ */ B(
|
|
58657
|
+
}), e && /* @__PURE__ */ B(sW, { __scopeCheckbox: n })] })
|
|
58646
58658
|
});
|
|
58647
58659
|
});
|
|
58648
|
-
|
|
58649
|
-
var
|
|
58650
|
-
let { __scopeCheckbox: n, forceMount: r, ...i } = e, a =
|
|
58660
|
+
rW.displayName = YU;
|
|
58661
|
+
var iW = "CheckboxIndicator", aW = R.forwardRef((e, t) => {
|
|
58662
|
+
let { __scopeCheckbox: n, forceMount: r, ...i } = e, a = $U(iW, n);
|
|
58651
58663
|
return /* @__PURE__ */ B(vn, {
|
|
58652
|
-
present: r ||
|
|
58664
|
+
present: r || lW(a.checked) || a.checked === !0,
|
|
58653
58665
|
children: /* @__PURE__ */ B(Ft.span, {
|
|
58654
|
-
"data-state":
|
|
58666
|
+
"data-state": uW(a.checked),
|
|
58655
58667
|
"data-disabled": a.disabled ? "" : void 0,
|
|
58656
58668
|
...i,
|
|
58657
58669
|
ref: t,
|
|
@@ -58662,16 +58674,16 @@ var rW = "CheckboxIndicator", iW = R.forwardRef((e, t) => {
|
|
|
58662
58674
|
})
|
|
58663
58675
|
});
|
|
58664
58676
|
});
|
|
58665
|
-
|
|
58666
|
-
var
|
|
58667
|
-
let { control: r, hasConsumerStoppedPropagationRef: i, checked: a, defaultChecked: o, required: s, disabled: c, name: l, value: u, form: d, bubbleInput: f, setBubbleInput: p } =
|
|
58677
|
+
aW.displayName = iW;
|
|
58678
|
+
var oW = "CheckboxBubbleInput", sW = R.forwardRef(({ __scopeCheckbox: e, ...t }, n) => {
|
|
58679
|
+
let { control: r, hasConsumerStoppedPropagationRef: i, checked: a, defaultChecked: o, required: s, disabled: c, name: l, value: u, form: d, bubbleInput: f, setBubbleInput: p } = $U(oW, e), m = _t(n, p), h = JU(a), g = VF(r);
|
|
58668
58680
|
R.useEffect(() => {
|
|
58669
58681
|
let e = f;
|
|
58670
58682
|
if (!e) return;
|
|
58671
58683
|
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !i.current;
|
|
58672
58684
|
if (h !== a && n) {
|
|
58673
58685
|
let t = new Event("click", { bubbles: r });
|
|
58674
|
-
e.indeterminate =
|
|
58686
|
+
e.indeterminate = lW(a), n.call(e, lW(a) ? !1 : a), e.dispatchEvent(t);
|
|
58675
58687
|
}
|
|
58676
58688
|
}, [
|
|
58677
58689
|
f,
|
|
@@ -58679,7 +58691,7 @@ var aW = "CheckboxBubbleInput", oW = R.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
58679
58691
|
a,
|
|
58680
58692
|
i
|
|
58681
58693
|
]);
|
|
58682
|
-
let _ = R.useRef(
|
|
58694
|
+
let _ = R.useRef(lW(a) ? !1 : a);
|
|
58683
58695
|
return /* @__PURE__ */ B(Ft.input, {
|
|
58684
58696
|
type: "checkbox",
|
|
58685
58697
|
"aria-hidden": !0,
|
|
@@ -58703,24 +58715,24 @@ var aW = "CheckboxBubbleInput", oW = R.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
58703
58715
|
}
|
|
58704
58716
|
});
|
|
58705
58717
|
});
|
|
58706
|
-
|
|
58707
|
-
function
|
|
58718
|
+
sW.displayName = oW;
|
|
58719
|
+
function cW(e) {
|
|
58708
58720
|
return typeof e == "function";
|
|
58709
58721
|
}
|
|
58710
|
-
function
|
|
58722
|
+
function lW(e) {
|
|
58711
58723
|
return e === "indeterminate";
|
|
58712
58724
|
}
|
|
58713
|
-
function
|
|
58714
|
-
return
|
|
58725
|
+
function uW(e) {
|
|
58726
|
+
return lW(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
58715
58727
|
}
|
|
58716
58728
|
//#endregion
|
|
58717
58729
|
//#region src/components/ui/checkbox.tsx
|
|
58718
|
-
function
|
|
58719
|
-
return /* @__PURE__ */ B(
|
|
58730
|
+
function dW({ className: e, ...t }) {
|
|
58731
|
+
return /* @__PURE__ */ B(rW, {
|
|
58720
58732
|
"data-slot": "checkbox",
|
|
58721
58733
|
className: Co("border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer size-4 shrink-0 rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
58722
58734
|
...t,
|
|
58723
|
-
children: /* @__PURE__ */ B(
|
|
58735
|
+
children: /* @__PURE__ */ B(aW, {
|
|
58724
58736
|
"data-slot": "checkbox-indicator",
|
|
58725
58737
|
className: "flex items-center justify-center text-current transition-none",
|
|
58726
58738
|
children: /* @__PURE__ */ B(Wi, { className: "size-3.5" })
|
|
@@ -58729,7 +58741,7 @@ function uW({ className: e, ...t }) {
|
|
|
58729
58741
|
}
|
|
58730
58742
|
//#endregion
|
|
58731
58743
|
//#region src/components/SiweDialog/index.tsx
|
|
58732
|
-
var
|
|
58744
|
+
var fW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appName: a, appLogoUrl: o, accountAddress: s, chainName: c, chainId: l, chainIcon: u, mainnetRpcUrl: d, onSign: f, onCancel: p, isProcessing: m, siweStatus: h, canSign: g, warningMessage: _ }) => {
|
|
58733
58745
|
let v = YL(), [y, b] = z(null), x = ot(), [S, C] = z(!1);
|
|
58734
58746
|
at(() => {
|
|
58735
58747
|
C(!1);
|
|
@@ -58791,7 +58803,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58791
58803
|
children: [
|
|
58792
58804
|
/* @__PURE__ */ V("div", {
|
|
58793
58805
|
className: "flex flex-1 flex-col items-center justify-center p-3.5",
|
|
58794
|
-
children: [o && /* @__PURE__ */ B("img", {
|
|
58806
|
+
children: [IU(o) && /* @__PURE__ */ B("img", {
|
|
58795
58807
|
src: o,
|
|
58796
58808
|
alt: `${a} logo`,
|
|
58797
58809
|
className: "mb-3 h-[72px] w-[72px] rounded-full"
|
|
@@ -58908,7 +58920,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58908
58920
|
}), /* @__PURE__ */ V("label", {
|
|
58909
58921
|
htmlFor: x,
|
|
58910
58922
|
className: "flex cursor-pointer items-center gap-2",
|
|
58911
|
-
children: [/* @__PURE__ */ B(
|
|
58923
|
+
children: [/* @__PURE__ */ B(dW, {
|
|
58912
58924
|
id: x,
|
|
58913
58925
|
checked: S,
|
|
58914
58926
|
onCheckedChange: (e) => C(e === !0)
|
|
@@ -58940,7 +58952,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
58940
58952
|
]
|
|
58941
58953
|
})
|
|
58942
58954
|
});
|
|
58943
|
-
},
|
|
58955
|
+
}, pW = ({ open: e, onOpenChange: t, appName: n, appLogoUrl: r, origin: i, timestamp: a, accountName: o, walletAddress: s, chainName: c, chainId: l, chainIcon: u, mainnetRpcUrl: d, onConnect: f, onCancel: p, showPermissions: m = !0, isProcessing: h }) => {
|
|
58944
58956
|
let g = YL(), [_, v] = z(null), [y, b] = z(!1);
|
|
58945
58957
|
at(() => {
|
|
58946
58958
|
s && l && pU([{
|
|
@@ -59035,7 +59047,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59035
59047
|
children: [
|
|
59036
59048
|
/* @__PURE__ */ V("div", {
|
|
59037
59049
|
className: "flex flex-1 flex-col items-center justify-center p-3.5",
|
|
59038
|
-
children: [r && /* @__PURE__ */ B("img", {
|
|
59050
|
+
children: [IU(r) && /* @__PURE__ */ B("img", {
|
|
59039
59051
|
src: r,
|
|
59040
59052
|
alt: `${n} logo`,
|
|
59041
59053
|
className: "mb-3 h-[72px] w-[72px] rounded-full"
|
|
@@ -59125,23 +59137,23 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59125
59137
|
]
|
|
59126
59138
|
})
|
|
59127
59139
|
});
|
|
59128
|
-
},
|
|
59140
|
+
}, mW = (e) => typeof e == "object" && !!e && !Array.isArray(e), hW = (e) => Array.isArray(e), gW = (e) => typeof e == "string" ? "text-foreground" : typeof e == "number" ? "text-info dark:text-info" : typeof e == "boolean" ? "text-info" : e == null ? "text-muted-foreground" : "text-foreground", _W = (e) => e === null ? {
|
|
59129
59141
|
text: "null",
|
|
59130
|
-
color:
|
|
59142
|
+
color: gW(null)
|
|
59131
59143
|
} : e === void 0 ? {
|
|
59132
59144
|
text: "undefined",
|
|
59133
|
-
color:
|
|
59145
|
+
color: gW(void 0)
|
|
59134
59146
|
} : typeof e == "boolean" || typeof e == "number" ? {
|
|
59135
59147
|
text: String(e),
|
|
59136
|
-
color:
|
|
59148
|
+
color: gW(e)
|
|
59137
59149
|
} : typeof e == "string" ? {
|
|
59138
59150
|
text: `"${e}"`,
|
|
59139
|
-
color:
|
|
59151
|
+
color: gW(e)
|
|
59140
59152
|
} : {
|
|
59141
59153
|
text: JSON.stringify(e),
|
|
59142
59154
|
color: "text-foreground"
|
|
59143
|
-
},
|
|
59144
|
-
let i =
|
|
59155
|
+
}, vW = ({ propertyKey: e, value: t, isLast: n, depth: r }) => {
|
|
59156
|
+
let i = _W(t);
|
|
59145
59157
|
return /* @__PURE__ */ V("div", {
|
|
59146
59158
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59147
59159
|
style: { paddingLeft: `${r * 16}px` },
|
|
@@ -59164,9 +59176,9 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59164
59176
|
})
|
|
59165
59177
|
]
|
|
59166
59178
|
});
|
|
59167
|
-
},
|
|
59179
|
+
}, yW = ({ data: e, depth: t = 0, parentKey: n, isLast: r = !0 }) => {
|
|
59168
59180
|
let i = t * 16;
|
|
59169
|
-
if (
|
|
59181
|
+
if (mW(e)) {
|
|
59170
59182
|
let a = Object.entries(e), o = `${n || "root"}-${t}`;
|
|
59171
59183
|
return t === 0 ? /* @__PURE__ */ B("div", {
|
|
59172
59184
|
className: "w-full font-mono text-sm",
|
|
@@ -59174,12 +59186,12 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59174
59186
|
className: "flex flex-col",
|
|
59175
59187
|
children: a.map(([e, n], r) => {
|
|
59176
59188
|
let i = r === a.length - 1;
|
|
59177
|
-
return
|
|
59189
|
+
return mW(n) || hW(n) ? /* @__PURE__ */ B(yW, {
|
|
59178
59190
|
data: n,
|
|
59179
59191
|
depth: t + 1,
|
|
59180
59192
|
parentKey: e,
|
|
59181
59193
|
isLast: i
|
|
59182
|
-
}, e) : /* @__PURE__ */ B(
|
|
59194
|
+
}, e) : /* @__PURE__ */ B(vW, {
|
|
59183
59195
|
propertyKey: e,
|
|
59184
59196
|
value: n,
|
|
59185
59197
|
isLast: i,
|
|
@@ -59232,12 +59244,12 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59232
59244
|
className: "flex flex-col",
|
|
59233
59245
|
children: [a.map(([e, n], r) => {
|
|
59234
59246
|
let i = r === a.length - 1;
|
|
59235
|
-
return
|
|
59247
|
+
return mW(n) || hW(n) ? /* @__PURE__ */ B(yW, {
|
|
59236
59248
|
data: n,
|
|
59237
59249
|
depth: t + 1,
|
|
59238
59250
|
parentKey: e,
|
|
59239
59251
|
isLast: i
|
|
59240
|
-
}, e) : /* @__PURE__ */ B(
|
|
59252
|
+
}, e) : /* @__PURE__ */ B(vW, {
|
|
59241
59253
|
propertyKey: e,
|
|
59242
59254
|
value: n,
|
|
59243
59255
|
isLast: i,
|
|
@@ -59254,7 +59266,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59254
59266
|
})
|
|
59255
59267
|
});
|
|
59256
59268
|
}
|
|
59257
|
-
if (
|
|
59269
|
+
if (hW(e)) {
|
|
59258
59270
|
let a = `${n || "array"}-${t}`;
|
|
59259
59271
|
return t === 0 ? /* @__PURE__ */ B("div", {
|
|
59260
59272
|
className: "w-full font-mono text-sm",
|
|
@@ -59262,16 +59274,16 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59262
59274
|
className: "flex flex-col",
|
|
59263
59275
|
children: e.map((n, r) => {
|
|
59264
59276
|
let i = r === e.length - 1, a = `[${r}]`;
|
|
59265
|
-
if (
|
|
59277
|
+
if (mW(n) || hW(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
|
|
59266
59278
|
className: "text-muted-foreground py-0.5 font-mono text-sm",
|
|
59267
59279
|
style: { paddingLeft: `${t * 16}px` },
|
|
59268
59280
|
children: [a, ":"]
|
|
59269
|
-
}), /* @__PURE__ */ B(
|
|
59281
|
+
}), /* @__PURE__ */ B(yW, {
|
|
59270
59282
|
data: n,
|
|
59271
59283
|
depth: t + 1,
|
|
59272
59284
|
isLast: i
|
|
59273
59285
|
})] }, r);
|
|
59274
|
-
let o =
|
|
59286
|
+
let o = _W(n);
|
|
59275
59287
|
return /* @__PURE__ */ V("div", {
|
|
59276
59288
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59277
59289
|
style: { paddingLeft: `${t * 16}px` },
|
|
@@ -59337,16 +59349,16 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59337
59349
|
className: "flex flex-col",
|
|
59338
59350
|
children: [e.map((n, r) => {
|
|
59339
59351
|
let i = r === e.length - 1, a = `[${r}]`;
|
|
59340
|
-
if (
|
|
59352
|
+
if (mW(n) || hW(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
|
|
59341
59353
|
className: "text-muted-foreground py-0.5 font-mono text-sm",
|
|
59342
59354
|
style: { paddingLeft: `${(t + 1) * 16}px` },
|
|
59343
59355
|
children: [a, ":"]
|
|
59344
|
-
}), /* @__PURE__ */ B(
|
|
59356
|
+
}), /* @__PURE__ */ B(yW, {
|
|
59345
59357
|
data: n,
|
|
59346
59358
|
depth: t + 2,
|
|
59347
59359
|
isLast: i
|
|
59348
59360
|
})] }, r);
|
|
59349
|
-
let o =
|
|
59361
|
+
let o = _W(n);
|
|
59350
59362
|
return /* @__PURE__ */ V("div", {
|
|
59351
59363
|
className: "flex items-start gap-1 py-0.5 font-mono text-sm",
|
|
59352
59364
|
style: { paddingLeft: `${(t + 1) * 16}px` },
|
|
@@ -59376,7 +59388,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59376
59388
|
})
|
|
59377
59389
|
});
|
|
59378
59390
|
}
|
|
59379
|
-
let a =
|
|
59391
|
+
let a = _W(e);
|
|
59380
59392
|
return /* @__PURE__ */ B("div", {
|
|
59381
59393
|
className: "py-0.5 font-mono text-sm",
|
|
59382
59394
|
style: { paddingLeft: `${i}px` },
|
|
@@ -59385,7 +59397,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59385
59397
|
children: a.text
|
|
59386
59398
|
})
|
|
59387
59399
|
});
|
|
59388
|
-
},
|
|
59400
|
+
}, bW = ({ open: e, onOpenChange: t, typedDataJson: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
|
|
59389
59401
|
let h = lt(null), g = YL(), [_, v] = z(null), y = ct(() => {
|
|
59390
59402
|
try {
|
|
59391
59403
|
return JSON.parse(n);
|
|
@@ -59494,7 +59506,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59494
59506
|
let e = /* @__PURE__ */ B("div", {
|
|
59495
59507
|
ref: h,
|
|
59496
59508
|
className: "bg-muted/30 dark:bg-muted/10 border-border flex overflow-y-auto rounded-[6px] border p-3",
|
|
59497
|
-
children: /* @__PURE__ */ B(
|
|
59509
|
+
children: /* @__PURE__ */ B(yW, {
|
|
59498
59510
|
data: y,
|
|
59499
59511
|
depth: 0
|
|
59500
59512
|
})
|
|
@@ -59506,7 +59518,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59506
59518
|
className: "flex flex-col gap-2",
|
|
59507
59519
|
children: [/* @__PURE__ */ B("div", {
|
|
59508
59520
|
className: "bg-muted/30 dark:bg-muted/10 border-border rounded-[6px] border p-3",
|
|
59509
|
-
children: /* @__PURE__ */ B(
|
|
59521
|
+
children: /* @__PURE__ */ B(HU, {
|
|
59510
59522
|
display: x,
|
|
59511
59523
|
chainId: s ?? 1,
|
|
59512
59524
|
mainnetRpcUrl: l
|
|
@@ -59599,7 +59611,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59599
59611
|
})]
|
|
59600
59612
|
})
|
|
59601
59613
|
});
|
|
59602
|
-
},
|
|
59614
|
+
}, xW = ({ open: e, onOpenChange: t, mode: n, permissionId: r, spenderAddress: i, origin: a, spends: o = [], calls: s = [], expiryDate: c, networkName: l, chainId: u, chainIcon: d, apiKey: f, onConfirm: p, onCancel: m, isProcessing: h, status: g, isLoadingTokenInfo: _ = !1, timestamp: v = /* @__PURE__ */ new Date(), warningMessage: y, gasFee: b, gasFeeLoading: x = !1, gasEstimationError: S, sponsored: C = !1, feeTokens: w, feeTokensLoading: T, selectedFeeToken: E, onFeeTokenSelect: D, showFeeTokenSelector: O, isPayingWithErc20: k, mainnetRpcUrl: A, nativeCurrencySymbol: j }) => {
|
|
59603
59615
|
let M = lt(null), N = YL(), P = w?.find((e) => e.isNative)?.symbol || j || "ETH", ee = vz(P), [F, te] = z(!1), [I, L] = z({}), [ne, re] = z({}), [ie, ae] = z(!0);
|
|
59604
59616
|
at(() => {
|
|
59605
59617
|
if (!u) {
|
|
@@ -59742,7 +59754,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59742
59754
|
children: "Spender Address"
|
|
59743
59755
|
}), /* @__PURE__ */ V("div", {
|
|
59744
59756
|
className: "flex flex-row items-center gap-1",
|
|
59745
|
-
children: [/* @__PURE__ */ B(
|
|
59757
|
+
children: [/* @__PURE__ */ B(RU, { src: ne[i] }), /* @__PURE__ */ B("p", {
|
|
59746
59758
|
className: "break-all text-base font-normal leading-[150%]",
|
|
59747
59759
|
children: I[i] || ue(i)
|
|
59748
59760
|
})]
|
|
@@ -59865,7 +59877,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
59865
59877
|
children: "Contract"
|
|
59866
59878
|
}), /* @__PURE__ */ V("div", {
|
|
59867
59879
|
className: "flex flex-row items-center gap-1",
|
|
59868
|
-
children: [/* @__PURE__ */ B(
|
|
59880
|
+
children: [/* @__PURE__ */ B(RU, {
|
|
59869
59881
|
src: ne[e.target],
|
|
59870
59882
|
fallback: null
|
|
59871
59883
|
}), /* @__PURE__ */ B("p", {
|
|
@@ -60117,7 +60129,7 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
60117
60129
|
})]
|
|
60118
60130
|
})
|
|
60119
60131
|
});
|
|
60120
|
-
},
|
|
60132
|
+
}, SW = class extends Le {
|
|
60121
60133
|
constructor(e) {
|
|
60122
60134
|
let { docsPath: t, field: n, metaMessages: r } = e;
|
|
60123
60135
|
super(`Invalid Sign-In with Ethereum message field "${n}".`, {
|
|
@@ -60129,9 +60141,9 @@ var dW = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, appNa
|
|
|
60129
60141
|
};
|
|
60130
60142
|
//#endregion
|
|
60131
60143
|
//#region ../../node_modules/viem/_esm/utils/siwe/utils.js
|
|
60132
|
-
function
|
|
60144
|
+
function CW(e) {
|
|
60133
60145
|
if (/[^a-z0-9:/?#[\]@!$&'()*+,;=.\-_~%]/i.test(e) || /%[^0-9a-f]/i.test(e) || /%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)) return !1;
|
|
60134
|
-
let t =
|
|
60146
|
+
let t = wW(e), n = t[1], r = t[2], i = t[3], a = t[4], o = t[5];
|
|
60135
60147
|
if (!(n?.length && i.length >= 0)) return !1;
|
|
60136
60148
|
if (r?.length) {
|
|
60137
60149
|
if (!(i.length === 0 || /^\//.test(i))) return !1;
|
|
@@ -60140,15 +60152,15 @@ function SW(e) {
|
|
|
60140
60152
|
let s = "";
|
|
60141
60153
|
return s += `${n}:`, r?.length && (s += `//${r}`), s += i, a?.length && (s += `?${a}`), o?.length && (s += `#${o}`), s;
|
|
60142
60154
|
}
|
|
60143
|
-
function
|
|
60155
|
+
function wW(e) {
|
|
60144
60156
|
return e.match(/(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);
|
|
60145
60157
|
}
|
|
60146
60158
|
//#endregion
|
|
60147
60159
|
//#region ../../node_modules/viem/_esm/utils/siwe/createSiweMessage.js
|
|
60148
|
-
function
|
|
60160
|
+
function TW(e) {
|
|
60149
60161
|
let { chainId: t, domain: n, expirationTime: r, issuedAt: i = /* @__PURE__ */ new Date(), nonce: a, notBefore: o, requestId: s, resources: c, scheme: l, uri: u, version: d } = e;
|
|
60150
60162
|
{
|
|
60151
|
-
if (t !== Math.floor(t)) throw new
|
|
60163
|
+
if (t !== Math.floor(t)) throw new SW({
|
|
60152
60164
|
field: "chainId",
|
|
60153
60165
|
metaMessages: [
|
|
60154
60166
|
"- Chain ID must be a EIP-155 chain ID.",
|
|
@@ -60157,7 +60169,7 @@ function wW(e) {
|
|
|
60157
60169
|
`Provided value: ${t}`
|
|
60158
60170
|
]
|
|
60159
60171
|
});
|
|
60160
|
-
if (!(
|
|
60172
|
+
if (!(EW.test(n) || DW.test(n) || OW.test(n))) throw new SW({
|
|
60161
60173
|
field: "domain",
|
|
60162
60174
|
metaMessages: [
|
|
60163
60175
|
"- Domain must be an RFC 3986 authority.",
|
|
@@ -60166,7 +60178,7 @@ function wW(e) {
|
|
|
60166
60178
|
`Provided value: ${n}`
|
|
60167
60179
|
]
|
|
60168
60180
|
});
|
|
60169
|
-
if (!
|
|
60181
|
+
if (!kW.test(a)) throw new SW({
|
|
60170
60182
|
field: "nonce",
|
|
60171
60183
|
metaMessages: [
|
|
60172
60184
|
"- Nonce must be at least 8 characters.",
|
|
@@ -60175,7 +60187,7 @@ function wW(e) {
|
|
|
60175
60187
|
`Provided value: ${a}`
|
|
60176
60188
|
]
|
|
60177
60189
|
});
|
|
60178
|
-
if (!
|
|
60190
|
+
if (!CW(u)) throw new SW({
|
|
60179
60191
|
field: "uri",
|
|
60180
60192
|
metaMessages: [
|
|
60181
60193
|
"- URI must be a RFC 3986 URI referring to the resource that is the subject of the signing.",
|
|
@@ -60184,7 +60196,7 @@ function wW(e) {
|
|
|
60184
60196
|
`Provided value: ${u}`
|
|
60185
60197
|
]
|
|
60186
60198
|
});
|
|
60187
|
-
if (d !== "1") throw new
|
|
60199
|
+
if (d !== "1") throw new SW({
|
|
60188
60200
|
field: "version",
|
|
60189
60201
|
metaMessages: [
|
|
60190
60202
|
"- Version must be '1'.",
|
|
@@ -60192,7 +60204,7 @@ function wW(e) {
|
|
|
60192
60204
|
`Provided value: ${d}`
|
|
60193
60205
|
]
|
|
60194
60206
|
});
|
|
60195
|
-
if (l && !
|
|
60207
|
+
if (l && !AW.test(l)) throw new SW({
|
|
60196
60208
|
field: "scheme",
|
|
60197
60209
|
metaMessages: [
|
|
60198
60210
|
"- Scheme must be an RFC 3986 URI scheme.",
|
|
@@ -60202,7 +60214,7 @@ function wW(e) {
|
|
|
60202
60214
|
]
|
|
60203
60215
|
});
|
|
60204
60216
|
let r = e.statement;
|
|
60205
|
-
if (r?.includes("\n")) throw new
|
|
60217
|
+
if (r?.includes("\n")) throw new SW({
|
|
60206
60218
|
field: "statement",
|
|
60207
60219
|
metaMessages: [
|
|
60208
60220
|
"- Statement must not include '\\n'.",
|
|
@@ -60215,7 +60227,7 @@ function wW(e) {
|
|
|
60215
60227
|
if (r && (m += `\nExpiration Time: ${r.toISOString()}`), o && (m += `\nNot Before: ${o.toISOString()}`), s && (m += `\nRequest ID: ${s}`), c) {
|
|
60216
60228
|
let e = "\nResources:";
|
|
60217
60229
|
for (let t of c) {
|
|
60218
|
-
if (!
|
|
60230
|
+
if (!CW(t)) throw new SW({
|
|
60219
60231
|
field: "resources",
|
|
60220
60232
|
metaMessages: [
|
|
60221
60233
|
"- Every resource must be a RFC 3986 URI.",
|
|
@@ -60230,7 +60242,7 @@ function wW(e) {
|
|
|
60230
60242
|
}
|
|
60231
60243
|
return `${p}\n${m}`;
|
|
60232
60244
|
}
|
|
60233
|
-
var
|
|
60245
|
+
var EW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1,5})?$/, DW = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:[0-9]{1,5})?$/, OW = /^localhost(:[0-9]{1,5})?$/, kW = /^[a-zA-Z0-9]{8,}$/, AW = /^([a-zA-Z][a-zA-Z0-9+-.]*)$/, jW = Object.freeze({
|
|
60234
60246
|
"--jaw-color-background": "oklch(1 0 0)",
|
|
60235
60247
|
"--jaw-color-foreground": "oklch(0.145 0 0)",
|
|
60236
60248
|
"--jaw-color-card": "oklch(1 0 0)",
|
|
@@ -60256,7 +60268,7 @@ var TW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
|
|
|
60256
60268
|
"--jaw-color-warning-foreground": "oklch(0.205 0 0)",
|
|
60257
60269
|
"--jaw-color-info": "oklch(0.623 0.214 259.815)",
|
|
60258
60270
|
"--jaw-color-info-foreground": "oklch(0.985 0 0)"
|
|
60259
|
-
}),
|
|
60271
|
+
}), MW = Object.freeze({
|
|
60260
60272
|
"--jaw-color-background": "oklch(0.178 0 0)",
|
|
60261
60273
|
"--jaw-color-foreground": "oklch(0.985 0 0)",
|
|
60262
60274
|
"--jaw-color-card": "oklch(0.215 0 0)",
|
|
@@ -60282,21 +60294,21 @@ var TW = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
|
|
|
60282
60294
|
"--jaw-color-warning-foreground": "oklch(0.920 0.150 80)",
|
|
60283
60295
|
"--jaw-color-info": "oklch(0.623 0.214 259.815)",
|
|
60284
60296
|
"--jaw-color-info-foreground": "oklch(0.985 0 0)"
|
|
60285
|
-
}),
|
|
60297
|
+
}), NW = Object.freeze({
|
|
60286
60298
|
sm: "0.375rem",
|
|
60287
60299
|
md: "0.625rem",
|
|
60288
60300
|
lg: "1rem"
|
|
60289
|
-
}),
|
|
60301
|
+
}), PW = Object.freeze({
|
|
60290
60302
|
system: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
60291
60303
|
rounded: "\"Nunito\", \"SF Pro Rounded\", ui-rounded, \"Hiragino Maru Gothic ProN\", sans-serif",
|
|
60292
60304
|
mono: "ui-monospace, \"SF Mono\", \"Cascadia Code\", \"Segoe UI Mono\", Menlo, Consolas, monospace"
|
|
60293
60305
|
});
|
|
60294
60306
|
//#endregion
|
|
60295
60307
|
//#region src/theme/palette.ts
|
|
60296
|
-
function
|
|
60308
|
+
function FW(e) {
|
|
60297
60309
|
return e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
60298
60310
|
}
|
|
60299
|
-
function
|
|
60311
|
+
function IW(e) {
|
|
60300
60312
|
let t = e.replace(/^#/, "");
|
|
60301
60313
|
if (t.length !== 6 && t.length !== 3) throw Error(`Invalid hex color: ${e}`);
|
|
60302
60314
|
let n = t.length === 3 ? t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t;
|
|
@@ -60306,14 +60318,14 @@ function FW(e) {
|
|
|
60306
60318
|
parseInt(n.slice(4, 6), 16) / 255
|
|
60307
60319
|
];
|
|
60308
60320
|
}
|
|
60309
|
-
function
|
|
60321
|
+
function LW(e, t, n) {
|
|
60310
60322
|
return [
|
|
60311
60323
|
.4124564 * e + .3575761 * t + .1804375 * n,
|
|
60312
60324
|
.2126729 * e + .7151522 * t + .072175 * n,
|
|
60313
60325
|
.0193339 * e + .119192 * t + .9503041 * n
|
|
60314
60326
|
];
|
|
60315
60327
|
}
|
|
60316
|
-
function
|
|
60328
|
+
function RW(e, t, n) {
|
|
60317
60329
|
let r = .8189330101 * e + .3618667424 * t - .1288597137 * n, i = .0329845436 * e + .9293118715 * t + .0361456387 * n, a = .0482003018 * e + .2643662691 * t + .633851707 * n, o = Math.cbrt(r), s = Math.cbrt(i), c = Math.cbrt(a);
|
|
60318
60330
|
return [
|
|
60319
60331
|
.2104542553 * o + .793617785 * s - .0040720468 * c,
|
|
@@ -60321,7 +60333,7 @@ function LW(e, t, n) {
|
|
|
60321
60333
|
.0259040371 * o + .7827717662 * s - .808675766 * c
|
|
60322
60334
|
];
|
|
60323
60335
|
}
|
|
60324
|
-
function
|
|
60336
|
+
function zW(e, t, n) {
|
|
60325
60337
|
let r = Math.sqrt(t * t + n * n), i = Math.atan2(n, t) * 180 / Math.PI;
|
|
60326
60338
|
return i < 0 && (i += 360), {
|
|
60327
60339
|
l: e,
|
|
@@ -60329,25 +60341,25 @@ function RW(e, t, n) {
|
|
|
60329
60341
|
h: i
|
|
60330
60342
|
};
|
|
60331
60343
|
}
|
|
60332
|
-
function zW(e) {
|
|
60333
|
-
let [t, n, r] = FW(e), [i, a, o] = IW(PW(t), PW(n), PW(r)), [s, c, l] = LW(i, a, o);
|
|
60334
|
-
return RW(s, c, l);
|
|
60335
|
-
}
|
|
60336
60344
|
function BW(e) {
|
|
60345
|
+
let [t, n, r] = IW(e), [i, a, o] = LW(FW(t), FW(n), FW(r)), [s, c, l] = RW(i, a, o);
|
|
60346
|
+
return zW(s, c, l);
|
|
60347
|
+
}
|
|
60348
|
+
function VW(e) {
|
|
60337
60349
|
return `oklch(${e.l.toFixed(3)} ${e.c.toFixed(3)} ${e.h.toFixed(1)})`;
|
|
60338
60350
|
}
|
|
60339
|
-
function
|
|
60340
|
-
let r =
|
|
60351
|
+
function HW(e, t, n) {
|
|
60352
|
+
let r = BW(e), i = t === "dark" && r.l < .5 ? {
|
|
60341
60353
|
l: Math.min(r.l + .15, .75),
|
|
60342
60354
|
c: r.c,
|
|
60343
60355
|
h: r.h
|
|
60344
|
-
} : r, a =
|
|
60345
|
-
o = n ? BW(
|
|
60346
|
-
let s =
|
|
60356
|
+
} : r, a = VW(i), o;
|
|
60357
|
+
o = n ? VW(BW(n)) : i.l > .6 ? "oklch(0.205 0 0)" : "oklch(0.985 0 0)";
|
|
60358
|
+
let s = VW({
|
|
60347
60359
|
l: i.l,
|
|
60348
60360
|
c: i.c * .5,
|
|
60349
60361
|
h: i.h
|
|
60350
|
-
}), c =
|
|
60362
|
+
}), c = VW({
|
|
60351
60363
|
l: t === "dark" ? .25 : .95,
|
|
60352
60364
|
c: r.c * .15,
|
|
60353
60365
|
h: r.h
|
|
@@ -60362,23 +60374,23 @@ function VW(e, t, n) {
|
|
|
60362
60374
|
}
|
|
60363
60375
|
//#endregion
|
|
60364
60376
|
//#region src/theme/resolve-theme.ts
|
|
60365
|
-
function
|
|
60366
|
-
let n = e.mode === "light" || e.mode === "dark" ? e.mode : t, r = { ...n === "dark" ?
|
|
60377
|
+
function UW(e, t) {
|
|
60378
|
+
let n = e.mode === "light" || e.mode === "dark" ? e.mode : t, r = { ...n === "dark" ? MW : jW };
|
|
60367
60379
|
if (e.accentColor) try {
|
|
60368
|
-
let t =
|
|
60380
|
+
let t = HW(e.accentColor, n, e.accentColorForeground);
|
|
60369
60381
|
Object.assign(r, t);
|
|
60370
60382
|
} catch {}
|
|
60371
60383
|
if (e.accentColorForeground && !e.accentColor) try {
|
|
60372
|
-
r["--jaw-color-primary-foreground"] = BW(
|
|
60384
|
+
r["--jaw-color-primary-foreground"] = VW(BW(e.accentColorForeground));
|
|
60373
60385
|
} catch {}
|
|
60374
|
-
return e.borderRadius && (r["--jaw-radius"] =
|
|
60386
|
+
return e.borderRadius && (r["--jaw-radius"] = NW[e.borderRadius]), e.fontStack && (r["--jaw-font-family"] = PW[e.fontStack]), e.cssVariables && Object.assign(r, e.cssVariables), Object.freeze({
|
|
60375
60387
|
variables: Object.freeze(r),
|
|
60376
60388
|
colorScheme: n
|
|
60377
60389
|
});
|
|
60378
60390
|
}
|
|
60379
60391
|
//#endregion
|
|
60380
60392
|
//#region src/theme/apply-theme.ts
|
|
60381
|
-
var
|
|
60393
|
+
var WW = {
|
|
60382
60394
|
"--jaw-color-background": "--background",
|
|
60383
60395
|
"--jaw-color-foreground": "--foreground",
|
|
60384
60396
|
"--jaw-color-card": "--card",
|
|
@@ -60405,12 +60417,12 @@ var UW = {
|
|
|
60405
60417
|
"--jaw-color-info": "--info",
|
|
60406
60418
|
"--jaw-color-info-foreground": "--info-foreground"
|
|
60407
60419
|
};
|
|
60408
|
-
function
|
|
60420
|
+
function GW(e, t) {
|
|
60409
60421
|
let n = Object.entries(t.variables);
|
|
60410
60422
|
for (let t = 0; t < n.length; t++) {
|
|
60411
60423
|
let [r, i] = n[t];
|
|
60412
60424
|
e.style.setProperty(r, i);
|
|
60413
|
-
let a =
|
|
60425
|
+
let a = WW[r];
|
|
60414
60426
|
a && e.style.setProperty(a, i);
|
|
60415
60427
|
}
|
|
60416
60428
|
let r = t.variables["--jaw-radius"];
|
|
@@ -60420,19 +60432,19 @@ function WW(e, t) {
|
|
|
60420
60432
|
}
|
|
60421
60433
|
//#endregion
|
|
60422
60434
|
//#region src/theme/use-color-scheme.ts
|
|
60423
|
-
var
|
|
60424
|
-
function
|
|
60435
|
+
var KW = "(prefers-color-scheme: dark)";
|
|
60436
|
+
function qW() {
|
|
60425
60437
|
if (typeof window > "u") return "light";
|
|
60426
60438
|
let e = document.documentElement;
|
|
60427
|
-
return e.classList.contains("dark") ? "dark" : e.classList.contains("light") ? "light" : window.matchMedia(
|
|
60439
|
+
return e.classList.contains("dark") ? "dark" : e.classList.contains("light") ? "light" : window.matchMedia(KW).matches ? "dark" : "light";
|
|
60428
60440
|
}
|
|
60429
|
-
function
|
|
60430
|
-
let [e, t] = z(
|
|
60441
|
+
function JW() {
|
|
60442
|
+
let [e, t] = z(qW);
|
|
60431
60443
|
return at(() => {
|
|
60432
60444
|
if (typeof window > "u") return;
|
|
60433
60445
|
let e = () => {
|
|
60434
|
-
t(
|
|
60435
|
-
}, n = window.matchMedia(
|
|
60446
|
+
t(qW());
|
|
60447
|
+
}, n = window.matchMedia(KW);
|
|
60436
60448
|
n.addEventListener("change", e);
|
|
60437
60449
|
let r = new MutationObserver(e);
|
|
60438
60450
|
return r.observe(document.documentElement, {
|
|
@@ -60445,10 +60457,10 @@ function qW() {
|
|
|
60445
60457
|
}
|
|
60446
60458
|
//#endregion
|
|
60447
60459
|
//#region src/react/ReactUIHandler.tsx
|
|
60448
|
-
function
|
|
60460
|
+
function YW(e) {
|
|
60449
60461
|
return ue.find((t) => t.id === e)?.name || "Unknown Network";
|
|
60450
60462
|
}
|
|
60451
|
-
var
|
|
60463
|
+
var XW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
|
|
60452
60464
|
day: "2-digit",
|
|
60453
60465
|
month: "2-digit",
|
|
60454
60466
|
year: "numeric",
|
|
@@ -60456,18 +60468,18 @@ var YW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
|
|
|
60456
60468
|
minute: "2-digit",
|
|
60457
60469
|
second: "2-digit",
|
|
60458
60470
|
hour12: !1
|
|
60459
|
-
}),
|
|
60460
|
-
function
|
|
60461
|
-
let n =
|
|
60471
|
+
}), ZW = jo;
|
|
60472
|
+
function QW({ theme: e, container: t }) {
|
|
60473
|
+
let n = JW();
|
|
60462
60474
|
return at(() => {
|
|
60463
|
-
(!e.mode || e.mode === "auto") &&
|
|
60475
|
+
(!e.mode || e.mode === "auto") && GW(t, UW(e, n));
|
|
60464
60476
|
}, [
|
|
60465
60477
|
n,
|
|
60466
60478
|
e,
|
|
60467
60479
|
t
|
|
60468
60480
|
]), null;
|
|
60469
60481
|
}
|
|
60470
|
-
var
|
|
60482
|
+
var $W = class {
|
|
60471
60483
|
config = {};
|
|
60472
60484
|
localTheme;
|
|
60473
60485
|
constructor(e) {
|
|
@@ -60510,7 +60522,7 @@ var QW = class {
|
|
|
60510
60522
|
WebkitFontSmoothing: "antialiased",
|
|
60511
60523
|
MozOsxFontSmoothing: "grayscale",
|
|
60512
60524
|
WebkitTapHighlightColor: "transparent"
|
|
60513
|
-
}),
|
|
60525
|
+
}), GW(n, UW(this.effectiveTheme, qW())), document.body.appendChild(n);
|
|
60514
60526
|
let r = pt(n), i = () => {
|
|
60515
60527
|
try {
|
|
60516
60528
|
document.body.style.removeProperty("pointer-events"), r.unmount(), n.parentNode && n.parentNode.removeChild(n);
|
|
@@ -60530,7 +60542,7 @@ var QW = class {
|
|
|
60530
60542
|
error: n || jR.userRejected()
|
|
60531
60543
|
});
|
|
60532
60544
|
}), o = this.effectiveTheme;
|
|
60533
|
-
r.render(et.createElement(wo.Provider, { value: n }, et.createElement(
|
|
60545
|
+
r.render(et.createElement(wo.Provider, { value: n }, et.createElement(QW, {
|
|
60534
60546
|
theme: o,
|
|
60535
60547
|
container: n
|
|
60536
60548
|
}), a));
|
|
@@ -60558,7 +60570,7 @@ var QW = class {
|
|
|
60558
60570
|
}
|
|
60559
60571
|
renderDialog(e, t, n) {
|
|
60560
60572
|
switch (e.type) {
|
|
60561
|
-
case "wallet_connect": return /* @__PURE__ */ B(
|
|
60573
|
+
case "wallet_connect": return /* @__PURE__ */ B(rG, {
|
|
60562
60574
|
request: e,
|
|
60563
60575
|
onApprove: t,
|
|
60564
60576
|
onReject: n,
|
|
@@ -60569,14 +60581,14 @@ var QW = class {
|
|
|
60569
60581
|
});
|
|
60570
60582
|
case "personal_sign": {
|
|
60571
60583
|
let r = e;
|
|
60572
|
-
return MU(r.data.message) ? /* @__PURE__ */ B(
|
|
60584
|
+
return MU(r.data.message) ? /* @__PURE__ */ B(dG, {
|
|
60573
60585
|
request: r,
|
|
60574
60586
|
onApprove: t,
|
|
60575
60587
|
onReject: n,
|
|
60576
60588
|
apiKey: this.config.apiKey,
|
|
60577
60589
|
defaultChainId: this.config.defaultChainId,
|
|
60578
60590
|
paymasters: this.config.paymasters
|
|
60579
|
-
}) : /* @__PURE__ */ B(
|
|
60591
|
+
}) : /* @__PURE__ */ B(iG, {
|
|
60580
60592
|
request: r,
|
|
60581
60593
|
onApprove: t,
|
|
60582
60594
|
onReject: n,
|
|
@@ -60589,7 +60601,7 @@ var QW = class {
|
|
|
60589
60601
|
let r = e, i = r.data.request.type;
|
|
60590
60602
|
if (i === "0x45") {
|
|
60591
60603
|
let e = r.data.request.data.message;
|
|
60592
|
-
return MU(e) ? /* @__PURE__ */ B(
|
|
60604
|
+
return MU(e) ? /* @__PURE__ */ B(dG, {
|
|
60593
60605
|
request: {
|
|
60594
60606
|
...r,
|
|
60595
60607
|
type: "personal_sign",
|
|
@@ -60604,7 +60616,7 @@ var QW = class {
|
|
|
60604
60616
|
apiKey: this.config.apiKey,
|
|
60605
60617
|
defaultChainId: this.config.defaultChainId,
|
|
60606
60618
|
paymasters: this.config.paymasters
|
|
60607
|
-
}) : /* @__PURE__ */ B(
|
|
60619
|
+
}) : /* @__PURE__ */ B(iG, {
|
|
60608
60620
|
request: {
|
|
60609
60621
|
...r,
|
|
60610
60622
|
type: "personal_sign",
|
|
@@ -60622,7 +60634,7 @@ var QW = class {
|
|
|
60622
60634
|
});
|
|
60623
60635
|
} else if (i === "0x01") {
|
|
60624
60636
|
let e = r.data.request.data, i = typeof e == "string" ? e : JSON.stringify(e);
|
|
60625
|
-
return /* @__PURE__ */ B(
|
|
60637
|
+
return /* @__PURE__ */ B(aG, {
|
|
60626
60638
|
request: {
|
|
60627
60639
|
...r,
|
|
60628
60640
|
type: "eth_signTypedData_v4",
|
|
@@ -60638,12 +60650,12 @@ var QW = class {
|
|
|
60638
60650
|
defaultChainId: this.config.defaultChainId,
|
|
60639
60651
|
paymasters: this.config.paymasters
|
|
60640
60652
|
});
|
|
60641
|
-
} else return /* @__PURE__ */ B(
|
|
60653
|
+
} else return /* @__PURE__ */ B(pG, {
|
|
60642
60654
|
method: `wallet_sign (type: ${i})`,
|
|
60643
60655
|
onReject: n
|
|
60644
60656
|
});
|
|
60645
60657
|
}
|
|
60646
|
-
case "eth_signTypedData_v4": return /* @__PURE__ */ B(
|
|
60658
|
+
case "eth_signTypedData_v4": return /* @__PURE__ */ B(aG, {
|
|
60647
60659
|
request: e,
|
|
60648
60660
|
onApprove: t,
|
|
60649
60661
|
onReject: n,
|
|
@@ -60651,7 +60663,7 @@ var QW = class {
|
|
|
60651
60663
|
defaultChainId: this.config.defaultChainId,
|
|
60652
60664
|
paymasters: this.config.paymasters
|
|
60653
60665
|
});
|
|
60654
|
-
case "wallet_sendCalls": return /* @__PURE__ */ B(
|
|
60666
|
+
case "wallet_sendCalls": return /* @__PURE__ */ B(oG, {
|
|
60655
60667
|
request: e,
|
|
60656
60668
|
onApprove: t,
|
|
60657
60669
|
onReject: n,
|
|
@@ -60659,7 +60671,7 @@ var QW = class {
|
|
|
60659
60671
|
defaultChainId: this.config.defaultChainId,
|
|
60660
60672
|
paymasters: this.config.paymasters
|
|
60661
60673
|
});
|
|
60662
|
-
case "eth_sendTransaction": return /* @__PURE__ */ B(
|
|
60674
|
+
case "eth_sendTransaction": return /* @__PURE__ */ B(sG, {
|
|
60663
60675
|
request: e,
|
|
60664
60676
|
onApprove: t,
|
|
60665
60677
|
onReject: n,
|
|
@@ -60667,7 +60679,7 @@ var QW = class {
|
|
|
60667
60679
|
defaultChainId: this.config.defaultChainId,
|
|
60668
60680
|
paymasters: this.config.paymasters
|
|
60669
60681
|
});
|
|
60670
|
-
case "wallet_grantPermissions": return /* @__PURE__ */ B(
|
|
60682
|
+
case "wallet_grantPermissions": return /* @__PURE__ */ B(uG, {
|
|
60671
60683
|
request: e,
|
|
60672
60684
|
onApprove: t,
|
|
60673
60685
|
onReject: n,
|
|
@@ -60675,7 +60687,7 @@ var QW = class {
|
|
|
60675
60687
|
defaultChainId: this.config.defaultChainId,
|
|
60676
60688
|
paymasters: this.config.paymasters
|
|
60677
60689
|
});
|
|
60678
|
-
case "wallet_revokePermissions": return /* @__PURE__ */ B(
|
|
60690
|
+
case "wallet_revokePermissions": return /* @__PURE__ */ B(fG, {
|
|
60679
60691
|
request: e,
|
|
60680
60692
|
onApprove: t,
|
|
60681
60693
|
onReject: n,
|
|
@@ -60683,24 +60695,24 @@ var QW = class {
|
|
|
60683
60695
|
defaultChainId: this.config.defaultChainId,
|
|
60684
60696
|
paymasters: this.config.paymasters
|
|
60685
60697
|
});
|
|
60686
|
-
default: return /* @__PURE__ */ B(
|
|
60698
|
+
default: return /* @__PURE__ */ B(pG, {
|
|
60687
60699
|
method: e.type,
|
|
60688
60700
|
onReject: n
|
|
60689
60701
|
});
|
|
60690
60702
|
}
|
|
60691
60703
|
}
|
|
60692
60704
|
};
|
|
60693
|
-
function
|
|
60705
|
+
function eG(e, t, n) {
|
|
60694
60706
|
return {
|
|
60695
60707
|
id: e,
|
|
60696
60708
|
rpcUrl: t ? `${S}?chainId=${e}&api-key=${t}` : `${S}?chainId=${e}`,
|
|
60697
60709
|
...n && { paymaster: { url: n } }
|
|
60698
60710
|
};
|
|
60699
60711
|
}
|
|
60700
|
-
function
|
|
60712
|
+
function tG(e) {
|
|
60701
60713
|
return e ? `${S}?chainId=1&api-key=${e}` : `${S}?chainId=1`;
|
|
60702
60714
|
}
|
|
60703
|
-
async function
|
|
60715
|
+
async function nG(e, t, n) {
|
|
60704
60716
|
if (!e) throw Error("API key is required for signing operations");
|
|
60705
60717
|
let r = t || 1;
|
|
60706
60718
|
return await az.get({
|
|
@@ -60709,8 +60721,8 @@ async function tG(e, t, n) {
|
|
|
60709
60721
|
paymasterUrl: n
|
|
60710
60722
|
});
|
|
60711
60723
|
}
|
|
60712
|
-
function
|
|
60713
|
-
let [c, l] = z(!0), [u, d] = z([]), [f, p] = z(null), [m, h] = z(!1), [g, _] = z(!1), [v, y] = z(!1), [b, x] = z(null), [S, C] = z(null), [w, T] = z(!1), [E, D] = z(!1), [O, k] = z(""), A = typeof window < "u" ? window.location.hostname : "localhost", j = typeof window < "u" ? window.location.origin : "unknown", M = e.data.chainId || a || 1, N =
|
|
60724
|
+
function rG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId: a, paymasters: o, ens: s }) {
|
|
60725
|
+
let [c, l] = z(!0), [u, d] = z([]), [f, p] = z(null), [m, h] = z(!1), [g, _] = z(!1), [v, y] = z(!1), [b, x] = z(null), [S, C] = z(null), [w, T] = z(!1), [E, D] = z(!1), [O, k] = z(""), A = typeof window < "u" ? window.location.hostname : "localhost", j = typeof window < "u" ? window.location.origin : "unknown", M = e.data.chainId || a || 1, N = YW(M), P = pz(M, i, 24);
|
|
60714
60726
|
at(() => {
|
|
60715
60727
|
d(az.getStoredAccounts(i).map((e) => ({
|
|
60716
60728
|
username: e.username,
|
|
@@ -60821,7 +60833,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60821
60833
|
} catch {
|
|
60822
60834
|
e = j, t = j;
|
|
60823
60835
|
}
|
|
60824
|
-
return
|
|
60836
|
+
return TW({
|
|
60825
60837
|
address: S,
|
|
60826
60838
|
chainId: n(se.chainId),
|
|
60827
60839
|
domain: se.domain || e,
|
|
@@ -60849,7 +60861,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60849
60861
|
if (!(!S || !ce)) {
|
|
60850
60862
|
D(!0), k("Signing message...");
|
|
60851
60863
|
try {
|
|
60852
|
-
let e = await (await
|
|
60864
|
+
let e = await (await nG(i, M, o?.[M]?.url)).signMessage(ce);
|
|
60853
60865
|
k("Sign-in successful!"), t({ accounts: [{
|
|
60854
60866
|
address: S,
|
|
60855
60867
|
capabilities: { signInWithEthereum: {
|
|
@@ -60865,7 +60877,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60865
60877
|
E || (y(!1), x(null), C(null), p(null), k(""));
|
|
60866
60878
|
};
|
|
60867
60879
|
if (v && S && se) if (!ce) console.error("SIWE capability present but message could not be built");
|
|
60868
|
-
else return /* @__PURE__ */ B(
|
|
60880
|
+
else return /* @__PURE__ */ B(fW, {
|
|
60869
60881
|
open: !0,
|
|
60870
60882
|
onOpenChange: (e) => {
|
|
60871
60883
|
e || fe();
|
|
@@ -60879,7 +60891,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60879
60891
|
chainName: N,
|
|
60880
60892
|
chainId: M,
|
|
60881
60893
|
chainIcon: P,
|
|
60882
|
-
mainnetRpcUrl:
|
|
60894
|
+
mainnetRpcUrl: tG(i),
|
|
60883
60895
|
onSign: de,
|
|
60884
60896
|
onCancel: fe,
|
|
60885
60897
|
isProcessing: E,
|
|
@@ -60887,7 +60899,7 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60887
60899
|
canSign: !E,
|
|
60888
60900
|
warningMessage: le
|
|
60889
60901
|
});
|
|
60890
|
-
return v && S ? /* @__PURE__ */ B(
|
|
60902
|
+
return v && S ? /* @__PURE__ */ B(pW, {
|
|
60891
60903
|
open: !0,
|
|
60892
60904
|
onOpenChange: (e) => {
|
|
60893
60905
|
e || te();
|
|
@@ -60901,12 +60913,12 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60901
60913
|
chainName: N,
|
|
60902
60914
|
chainId: M,
|
|
60903
60915
|
chainIcon: P,
|
|
60904
|
-
mainnetRpcUrl:
|
|
60916
|
+
mainnetRpcUrl: tG(i),
|
|
60905
60917
|
onConnect: async () => F(),
|
|
60906
60918
|
onCancel: te,
|
|
60907
60919
|
showPermissions: !1,
|
|
60908
60920
|
isProcessing: w
|
|
60909
|
-
}) : /* @__PURE__ */ B(
|
|
60921
|
+
}) : /* @__PURE__ */ B(ZW, {
|
|
60910
60922
|
open: c,
|
|
60911
60923
|
onOpenChange: (e) => {
|
|
60912
60924
|
e ? l(e) : ee();
|
|
@@ -60926,18 +60938,18 @@ function nG({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
|
|
|
60926
60938
|
isCreating: g,
|
|
60927
60939
|
ensDomain: ie,
|
|
60928
60940
|
chainId: ae,
|
|
60929
|
-
mainnetRpcUrl:
|
|
60941
|
+
mainnetRpcUrl: tG(i),
|
|
60930
60942
|
apiKey: i,
|
|
60931
60943
|
supportedChains: ue.map((e) => ({ id: e.id })),
|
|
60932
60944
|
subnameTextRecords: oe
|
|
60933
60945
|
})
|
|
60934
60946
|
});
|
|
60935
60947
|
}
|
|
60936
|
-
function
|
|
60937
|
-
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p =
|
|
60948
|
+
function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
60949
|
+
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = YW(f), m = pz(f, r, 24), h = async () => {
|
|
60938
60950
|
l(!0), d("Signing message...");
|
|
60939
60951
|
try {
|
|
60940
|
-
let n = await (await
|
|
60952
|
+
let n = await (await nG(r, f, a?.[f]?.url)).signMessage(e.data.message, { address: e.data.address });
|
|
60941
60953
|
d("Signature successful!"), t(n);
|
|
60942
60954
|
} catch (e) {
|
|
60943
60955
|
console.error("Signature failed:", e);
|
|
@@ -60949,7 +60961,7 @@ function rG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60949
60961
|
}, g = () => {
|
|
60950
60962
|
s(!1), n(jR.userRejected());
|
|
60951
60963
|
};
|
|
60952
|
-
return /* @__PURE__ */ B(
|
|
60964
|
+
return /* @__PURE__ */ B(qU, {
|
|
60953
60965
|
open: o,
|
|
60954
60966
|
onOpenChange: (e) => {
|
|
60955
60967
|
e ? s(e) : g();
|
|
@@ -60961,7 +60973,7 @@ function rG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60961
60973
|
chainName: p,
|
|
60962
60974
|
chainId: f,
|
|
60963
60975
|
chainIcon: m,
|
|
60964
|
-
mainnetRpcUrl:
|
|
60976
|
+
mainnetRpcUrl: tG(r),
|
|
60965
60977
|
onSign: h,
|
|
60966
60978
|
onCancel: g,
|
|
60967
60979
|
isProcessing: c,
|
|
@@ -60969,11 +60981,11 @@ function rG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60969
60981
|
canSign: !c && !!e.data.message
|
|
60970
60982
|
});
|
|
60971
60983
|
}
|
|
60972
|
-
function
|
|
60984
|
+
function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
60973
60985
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = async () => {
|
|
60974
60986
|
l(!0), d("Signing typed data...");
|
|
60975
60987
|
try {
|
|
60976
|
-
let n = await
|
|
60988
|
+
let n = await nG(r, f, a?.[f]?.url), i = typeof e.data.typedData == "string" ? JSON.parse(e.data.typedData) : e.data.typedData, o = await n.signTypedData({
|
|
60977
60989
|
domain: i.domain,
|
|
60978
60990
|
types: i.types,
|
|
60979
60991
|
primaryType: i.primaryType,
|
|
@@ -60990,7 +61002,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60990
61002
|
}, m = () => {
|
|
60991
61003
|
s(!1), n(jR.userRejected());
|
|
60992
61004
|
};
|
|
60993
|
-
return /* @__PURE__ */ B(
|
|
61005
|
+
return /* @__PURE__ */ B(bW, {
|
|
60994
61006
|
open: o,
|
|
60995
61007
|
onOpenChange: (e) => {
|
|
60996
61008
|
e ? s(e) : m();
|
|
@@ -60999,7 +61011,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
60999
61011
|
origin: typeof window < "u" ? window.location.origin : "unknown",
|
|
61000
61012
|
timestamp: new Date(e.timestamp),
|
|
61001
61013
|
accountAddress: e.data.address,
|
|
61002
|
-
mainnetRpcUrl:
|
|
61014
|
+
mainnetRpcUrl: tG(r),
|
|
61003
61015
|
onSign: p,
|
|
61004
61016
|
onCancel: m,
|
|
61005
61017
|
isProcessing: c,
|
|
@@ -61007,7 +61019,7 @@ function iG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61007
61019
|
canSign: !0
|
|
61008
61020
|
});
|
|
61009
61021
|
}
|
|
61010
|
-
function
|
|
61022
|
+
function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61011
61023
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(null), [f, p] = z(""), [m, h] = z([]), [g, _] = z(!1), v = e.data.chainId || i || 1, y = ue.find((e) => e.id === v), b = y?.name || "Unknown Network", S = vz(m?.find((e) => e.isNative)?.symbol || y?.nativeCurrency?.symbol || "ETH"), w = ct(() => e.data.capabilities?.paymasterService?.url || a?.[v]?.url, [
|
|
61012
61024
|
e.data.capabilities?.paymasterService?.url,
|
|
61013
61025
|
a,
|
|
@@ -61078,7 +61090,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61078
61090
|
t && _(!1);
|
|
61079
61091
|
return;
|
|
61080
61092
|
}
|
|
61081
|
-
let o =
|
|
61093
|
+
let o = eG(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61082
61094
|
try {
|
|
61083
61095
|
let n = await yU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61084
61096
|
return {
|
|
@@ -61125,7 +61137,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61125
61137
|
let e = !0;
|
|
61126
61138
|
return (async () => {
|
|
61127
61139
|
try {
|
|
61128
|
-
let t = await
|
|
61140
|
+
let t = await nG(r, v, w);
|
|
61129
61141
|
e && d(t);
|
|
61130
61142
|
} catch (e) {
|
|
61131
61143
|
console.error("Error initializing account:", e);
|
|
@@ -61160,7 +61172,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61160
61172
|
}, ne = () => {
|
|
61161
61173
|
s(!1), n(jR.userRejected());
|
|
61162
61174
|
}, re = !E && m.some((e) => !e.isNative);
|
|
61163
|
-
return /* @__PURE__ */ B(
|
|
61175
|
+
return /* @__PURE__ */ B(KU, {
|
|
61164
61176
|
open: o,
|
|
61165
61177
|
onOpenChange: (e) => {
|
|
61166
61178
|
e ? s(e) : ne();
|
|
@@ -61176,7 +61188,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61176
61188
|
isProcessing: c,
|
|
61177
61189
|
transactionStatus: f,
|
|
61178
61190
|
networkName: b,
|
|
61179
|
-
mainnetRpcUrl:
|
|
61191
|
+
mainnetRpcUrl: tG(r),
|
|
61180
61192
|
apiKey: r,
|
|
61181
61193
|
feeTokens: m,
|
|
61182
61194
|
feeTokensLoading: g,
|
|
@@ -61187,7 +61199,7 @@ function aG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61187
61199
|
nativeCurrencySymbol: y?.nativeCurrency?.symbol
|
|
61188
61200
|
});
|
|
61189
61201
|
}
|
|
61190
|
-
function
|
|
61202
|
+
function sG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61191
61203
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(null), [f, p] = z(""), [m, h] = z([]), [g, _] = z(!1), v = e.data.chainId || i || 1, y = ue.find((e) => e.id === v), b = y?.name || "Unknown Network", S = vz(m?.find((e) => e.isNative)?.symbol || y?.nativeCurrency?.symbol || "ETH"), w = ct(() => e.data.capabilities?.paymasterService?.url || a?.[v]?.url, [
|
|
61192
61204
|
e.data.capabilities?.paymasterService?.url,
|
|
61193
61205
|
a,
|
|
@@ -61257,7 +61269,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61257
61269
|
t && _(!1);
|
|
61258
61270
|
return;
|
|
61259
61271
|
}
|
|
61260
|
-
let o =
|
|
61272
|
+
let o = eG(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61261
61273
|
try {
|
|
61262
61274
|
let n = await yU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61263
61275
|
return {
|
|
@@ -61304,7 +61316,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61304
61316
|
let e = !0;
|
|
61305
61317
|
return (async () => {
|
|
61306
61318
|
try {
|
|
61307
|
-
let t = await
|
|
61319
|
+
let t = await nG(r, v, w);
|
|
61308
61320
|
e && d(t);
|
|
61309
61321
|
} catch (e) {
|
|
61310
61322
|
console.error("Error initializing account:", e);
|
|
@@ -61333,7 +61345,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61333
61345
|
}, L = () => {
|
|
61334
61346
|
s(!1), n(jR.userRejected());
|
|
61335
61347
|
}, ne = !E && m.some((e) => !e.isNative);
|
|
61336
|
-
return /* @__PURE__ */ B(
|
|
61348
|
+
return /* @__PURE__ */ B(KU, {
|
|
61337
61349
|
open: o,
|
|
61338
61350
|
onOpenChange: (e) => {
|
|
61339
61351
|
e ? s(e) : L();
|
|
@@ -61349,7 +61361,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61349
61361
|
isProcessing: c,
|
|
61350
61362
|
transactionStatus: f,
|
|
61351
61363
|
networkName: b,
|
|
61352
|
-
mainnetRpcUrl:
|
|
61364
|
+
mainnetRpcUrl: tG(r),
|
|
61353
61365
|
apiKey: r,
|
|
61354
61366
|
feeTokens: m,
|
|
61355
61367
|
feeTokensLoading: g,
|
|
@@ -61360,7 +61372,7 @@ function oG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61360
61372
|
nativeCurrencySymbol: y?.nativeCurrency?.symbol
|
|
61361
61373
|
});
|
|
61362
61374
|
}
|
|
61363
|
-
var
|
|
61375
|
+
var cG = {
|
|
61364
61376
|
"0x32323232": "Any Function",
|
|
61365
61377
|
"0xe0e0e0e0": "Empty Calldata",
|
|
61366
61378
|
"0xcc53287f": "lockdown((address,address)[])",
|
|
@@ -61368,8 +61380,8 @@ var sG = {
|
|
|
61368
61380
|
"0x095ea7b3": "approve(address,uint256)",
|
|
61369
61381
|
"0x23b872dd": "transferFrom(address,address,uint256)",
|
|
61370
61382
|
"0xa9059cbb": "transfer(address,uint256)"
|
|
61371
|
-
},
|
|
61372
|
-
function
|
|
61383
|
+
}, lG = (e) => cG[e.toLowerCase()] || e;
|
|
61384
|
+
function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61373
61385
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), [f, p] = z({}), [m, h] = z(!0), [g, _] = z(null), [v, y] = z([]), [b, S] = z(!0), w = e.data.chainId, T = typeof w == "string" ? parseInt(w, w.startsWith("0x") ? 16 : 10) : w || i || 1, E = ue.find((e) => e.id === T), D = E?.name || "Unknown Network", O = v?.find((e) => e.isNative)?.symbol || E?.nativeCurrency?.symbol || "ETH", k = vz(O), A = ct(() => e.data.capabilities?.paymasterService?.url || a?.[T]?.url, [
|
|
61374
61386
|
e.data.capabilities?.paymasterService?.url,
|
|
61375
61387
|
a,
|
|
@@ -61427,7 +61439,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61427
61439
|
te,
|
|
61428
61440
|
N,
|
|
61429
61441
|
k
|
|
61430
|
-
]), ae = ct(() =>
|
|
61442
|
+
]), ae = ct(() => eG(T, r, re), [
|
|
61431
61443
|
T,
|
|
61432
61444
|
r,
|
|
61433
61445
|
re
|
|
@@ -61522,7 +61534,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61522
61534
|
t && S(!1);
|
|
61523
61535
|
return;
|
|
61524
61536
|
}
|
|
61525
|
-
let o =
|
|
61537
|
+
let o = eG(T, r).rpcUrl || E?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61526
61538
|
try {
|
|
61527
61539
|
let n = await yU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61528
61540
|
return {
|
|
@@ -61569,7 +61581,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61569
61581
|
let e = !0;
|
|
61570
61582
|
return (async () => {
|
|
61571
61583
|
try {
|
|
61572
|
-
let t = await
|
|
61584
|
+
let t = await nG(r, T, A);
|
|
61573
61585
|
e && _(t);
|
|
61574
61586
|
} catch (e) {
|
|
61575
61587
|
console.error("[PermissionDialogWrapper] Error initializing account:", e);
|
|
@@ -61605,8 +61617,8 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61605
61617
|
]), le = ct(() => se.map((e) => ({
|
|
61606
61618
|
target: e.target,
|
|
61607
61619
|
selector: e.selector,
|
|
61608
|
-
functionSignature: e.functionSignature || (e.selector ?
|
|
61609
|
-
})), [se]), de = ct(() =>
|
|
61620
|
+
functionSignature: e.functionSignature || (e.selector ? lG(e.selector) : "Unknown Function")
|
|
61621
|
+
})), [se]), de = ct(() => XW(e.data.expiry), [e.data.expiry]), fe = ct(() => {
|
|
61610
61622
|
let e = [];
|
|
61611
61623
|
if (ce.length > 0) {
|
|
61612
61624
|
let t = ce.map((e) => {
|
|
@@ -61649,7 +61661,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61649
61661
|
}, me = () => {
|
|
61650
61662
|
s(!1), n(jR.userRejected());
|
|
61651
61663
|
};
|
|
61652
|
-
return /* @__PURE__ */ B(
|
|
61664
|
+
return /* @__PURE__ */ B(xW, {
|
|
61653
61665
|
open: o,
|
|
61654
61666
|
onOpenChange: (e) => {
|
|
61655
61667
|
e ? s(e) : me();
|
|
@@ -61674,7 +61686,7 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61674
61686
|
gasFeeLoading: ee,
|
|
61675
61687
|
gasEstimationError: F,
|
|
61676
61688
|
sponsored: M,
|
|
61677
|
-
mainnetRpcUrl:
|
|
61689
|
+
mainnetRpcUrl: tG(r),
|
|
61678
61690
|
feeTokens: v,
|
|
61679
61691
|
feeTokensLoading: b,
|
|
61680
61692
|
selectedFeeToken: I,
|
|
@@ -61684,8 +61696,8 @@ function lG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61684
61696
|
nativeCurrencySymbol: E?.nativeCurrency?.symbol
|
|
61685
61697
|
});
|
|
61686
61698
|
}
|
|
61687
|
-
function
|
|
61688
|
-
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p =
|
|
61699
|
+
function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61700
|
+
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = YW(f), m = pz(f, r, 24), h = typeof window < "u" ? window.location.origin : "unknown", g = ct(() => {
|
|
61689
61701
|
let t = e.data.message;
|
|
61690
61702
|
if (t.startsWith("0x")) try {
|
|
61691
61703
|
return jU(t);
|
|
@@ -61705,7 +61717,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61705
61717
|
}, [g, h]), y = async () => {
|
|
61706
61718
|
l(!0), d("Signing message...");
|
|
61707
61719
|
try {
|
|
61708
|
-
let n = await (await
|
|
61720
|
+
let n = await (await nG(r, f, a?.[f]?.url)).signMessage(e.data.message);
|
|
61709
61721
|
d("Sign-in successful!"), t(n);
|
|
61710
61722
|
} catch (e) {
|
|
61711
61723
|
console.error("SIWE signature failed:", e);
|
|
@@ -61717,7 +61729,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61717
61729
|
}, b = () => {
|
|
61718
61730
|
s(!1), n(jR.userRejected());
|
|
61719
61731
|
};
|
|
61720
|
-
return /* @__PURE__ */ B(
|
|
61732
|
+
return /* @__PURE__ */ B(fW, {
|
|
61721
61733
|
open: o,
|
|
61722
61734
|
onOpenChange: (e) => {
|
|
61723
61735
|
e ? s(e) : b();
|
|
@@ -61730,7 +61742,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61730
61742
|
chainName: p,
|
|
61731
61743
|
chainId: f,
|
|
61732
61744
|
chainIcon: m,
|
|
61733
|
-
mainnetRpcUrl:
|
|
61745
|
+
mainnetRpcUrl: tG(r),
|
|
61734
61746
|
onSign: y,
|
|
61735
61747
|
onCancel: b,
|
|
61736
61748
|
isProcessing: c,
|
|
@@ -61739,7 +61751,7 @@ function uG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61739
61751
|
warningMessage: v
|
|
61740
61752
|
});
|
|
61741
61753
|
}
|
|
61742
|
-
function
|
|
61754
|
+
function fG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
|
|
61743
61755
|
let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), [f, p] = z(!0), [m, h] = z(null), [g, _] = z({}), [v, y] = z(null), [b, S] = z([]), [w, T] = z(!0), E = e.data.chainId || i || 1, D = ue.find((e) => e.id === E), O = D?.name || "Unknown Network", k = b?.find((e) => e.isNative)?.symbol || D?.nativeCurrency?.symbol || "ETH", A = vz(k), j = ct(() => e.data.capabilities?.paymasterService?.url || a?.[E]?.url, [
|
|
61744
61756
|
e.data.capabilities?.paymasterService?.url,
|
|
61745
61757
|
a,
|
|
@@ -61792,7 +61804,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61792
61804
|
I,
|
|
61793
61805
|
ee,
|
|
61794
61806
|
A
|
|
61795
|
-
]), oe = ct(() =>
|
|
61807
|
+
]), oe = ct(() => eG(E, r, ie), [
|
|
61796
61808
|
E,
|
|
61797
61809
|
r,
|
|
61798
61810
|
ie
|
|
@@ -61879,7 +61891,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61879
61891
|
t && T(!1);
|
|
61880
61892
|
return;
|
|
61881
61893
|
}
|
|
61882
|
-
let o =
|
|
61894
|
+
let o = eG(E, r).rpcUrl || D?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
|
|
61883
61895
|
try {
|
|
61884
61896
|
let n = await yU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = vU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
|
|
61885
61897
|
return {
|
|
@@ -61926,7 +61938,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61926
61938
|
let e = !0;
|
|
61927
61939
|
return (async () => {
|
|
61928
61940
|
try {
|
|
61929
|
-
let t = await
|
|
61941
|
+
let t = await nG(r, E, j);
|
|
61930
61942
|
e && y(t);
|
|
61931
61943
|
} catch (e) {
|
|
61932
61944
|
console.error("[RevokePermissionDialogWrapper] Error initializing account:", e);
|
|
@@ -61959,8 +61971,8 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61959
61971
|
]), ce = ct(() => m?.calls ? m.calls.map((e) => ({
|
|
61960
61972
|
target: e.target,
|
|
61961
61973
|
selector: e.selector,
|
|
61962
|
-
functionSignature: e.functionSignature || (e.selector ?
|
|
61963
|
-
})) : [], [m]), le = ct(() => m ?
|
|
61974
|
+
functionSignature: e.functionSignature || (e.selector ? lG(e.selector) : "Unknown Function")
|
|
61975
|
+
})) : [], [m]), le = ct(() => m ? XW(parseInt(m.end, 10)) : "", [m]), de = m?.spender || "0x...", fe = async () => {
|
|
61964
61976
|
if (!v) {
|
|
61965
61977
|
console.error("[RevokePermissionDialogWrapper] Account not initialized");
|
|
61966
61978
|
return;
|
|
@@ -61978,7 +61990,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61978
61990
|
}, pe = () => {
|
|
61979
61991
|
s(!1), n(jR.userRejected());
|
|
61980
61992
|
};
|
|
61981
|
-
return /* @__PURE__ */ B(
|
|
61993
|
+
return /* @__PURE__ */ B(xW, {
|
|
61982
61994
|
open: o,
|
|
61983
61995
|
onOpenChange: (e) => {
|
|
61984
61996
|
e ? s(e) : pe();
|
|
@@ -61999,7 +62011,7 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
61999
62011
|
status: u,
|
|
62000
62012
|
isLoadingTokenInfo: f,
|
|
62001
62013
|
timestamp: new Date(e.timestamp),
|
|
62002
|
-
mainnetRpcUrl:
|
|
62014
|
+
mainnetRpcUrl: tG(r),
|
|
62003
62015
|
gasFee: ee,
|
|
62004
62016
|
gasFeeLoading: F,
|
|
62005
62017
|
gasEstimationError: te,
|
|
@@ -62013,11 +62025,11 @@ function dG({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
|
|
|
62013
62025
|
nativeCurrencySymbol: D?.nativeCurrency?.symbol
|
|
62014
62026
|
});
|
|
62015
62027
|
}
|
|
62016
|
-
function
|
|
62028
|
+
function pG({ method: e, onReject: t }) {
|
|
62017
62029
|
let [n, r] = z(!0), [i, a] = z(!1), o = typeof window < "u" ? window.location.origin : "unknown", s = () => {
|
|
62018
62030
|
i || (a(!0), r(!1), t(jR.unsupportedRequest(e)));
|
|
62019
62031
|
};
|
|
62020
|
-
return /* @__PURE__ */ B(
|
|
62032
|
+
return /* @__PURE__ */ B(ZW, {
|
|
62021
62033
|
open: n,
|
|
62022
62034
|
onOpenChange: (e) => {
|
|
62023
62035
|
e ? r(e) : s();
|
|
@@ -62082,4 +62094,4 @@ function fG({ method: e, onReject: t }) {
|
|
|
62082
62094
|
});
|
|
62083
62095
|
}
|
|
62084
62096
|
//#endregion
|
|
62085
|
-
export {
|
|
62097
|
+
export { NW as BORDER_RADIUS_MAP, ms as BadgeDollarIcon, ls as CloseIcon, pW as ConnectDialog, fs as CopiedIcon, ds as CopyIcon, MW as DEFAULT_DARK_PALETTE, jW as DEFAULT_LIGHT_PALETTE, jo as DefaultDialog, bW as Eip712Dialog, gs as EthIcon, ps as EyeIcon, PW as FONT_STACK_MAP, JL as FeeTokenSelector, ys as GenericTokenIcon, hs as LockIcon, fM as OnboardingDialog, Zo as OrSeparator, xW as PermissionDialog, wo as PortalContainerContext, $W as ReactUIHandler, qU as SignatureDialog, fW as SiweDialog, KU as TransactionDialog, _s as UsdcIcon, vs as UsdtIcon, us as WalletIcon, VH as applyFormat, GW as applyThemeToContainer, vH as caip10, _z as clearTokenPriceCache, Co as cn, JH as createTokenResolver, HH as decodeCalldataWithSignature, HW as deriveAccentPalette, CH as eip712TypeHash, yU as fetchTokenBalance, gz as fetchTokenPrice, hU as formatAddress, kU as getChainLabel, _H as getDefaultDescriptorSource, gU as getDisplayAddress, dM as getJustaNameInstance, XH as getNativeDecimals, YH as getNativeSymbol, FU as getSiweOriginWarning, qW as getSystemColorScheme, BW as hexToOklch, jU as hexToUtf8, vU as isNativeToken, IU as isSafeImageUrl, MU as isSiweMessage, VW as oklchToString, NU as parseSiweMessage, xH as resolveCalldataDescriptor, OH as resolveEip712Descriptor, fH as resolvePath, UW as resolveTheme, pU as reverseResolveAddresses, mU as reverseResolveWithAvatars, pz as useChainIconURI, oU as useClearSigningTypedData, JW as useColorScheme, aU as useDecodedCalldata, vz as useFeeTokenPrice, Cz as useGasEstimation, YL as useIsMobile };
|