@flapsdk/vault-runtime 0.1.29 → 0.1.30

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/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Generated from `flap-vault-ui-template`.
4
4
 
5
+
6
+
5
7
  This package is the shared runtime surface that local preview, Artifact Workbench, and `flap.sh` should agree on.
6
8
 
7
9
  ## Exports
@@ -3,7 +3,7 @@ import { getTaxVaultHostChainConfig } from './chunk-CPAMDXX7.js';
3
3
  import { Loader2, ExternalLink, AlertTriangle, CheckCircle2, Info, X, ShieldCheck } from 'lucide-react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
- import * as React4 from 'react';
6
+ import * as React5 from 'react';
7
7
  import { createContext, useState, useEffect, useMemo, useContext } from 'react';
8
8
  import { Slot } from '@radix-ui/react-slot';
9
9
  import { cva } from 'class-variance-authority';
@@ -89,13 +89,13 @@ var buttonVariants = cva(
89
89
  }
90
90
  }
91
91
  );
92
- var Button = React4.forwardRef(
92
+ var Button = React5.forwardRef(
93
93
  ({ className, variant, size, asChild = false, loading = false, disabled, children, ...props }, ref) => {
94
94
  const Comp = asChild ? Slot : "button";
95
95
  if (asChild) {
96
- return /* @__PURE__ */ React4.createElement(Comp, { "data-flap-ui": "button", className: cn(buttonVariants({ variant, size, className })), ref, ...props }, children);
96
+ return /* @__PURE__ */ React5.createElement(Comp, { "data-flap-ui": "button", className: cn(buttonVariants({ variant, size, className })), ref, ...props }, children);
97
97
  }
98
- return /* @__PURE__ */ React4.createElement(
98
+ return /* @__PURE__ */ React5.createElement(
99
99
  Comp,
100
100
  {
101
101
  "data-flap-ui": "button",
@@ -104,13 +104,69 @@ var Button = React4.forwardRef(
104
104
  disabled: disabled || loading,
105
105
  ...props
106
106
  },
107
- loading ? /* @__PURE__ */ React4.createElement(Loader2, { className: "relative z-10 h-4 w-4 animate-spin" }) : null,
108
- /* @__PURE__ */ React4.createElement("span", { className: "relative z-10 inline-flex min-w-0 items-center justify-center gap-2" }, children)
107
+ loading ? /* @__PURE__ */ React5.createElement(Loader2, { className: "relative z-10 h-4 w-4 animate-spin" }) : null,
108
+ /* @__PURE__ */ React5.createElement("span", { className: "relative z-10 inline-flex min-w-0 items-center justify-center gap-2" }, children)
109
109
  );
110
110
  }
111
111
  );
112
112
  Button.displayName = "Button";
113
- var Card = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
113
+
114
+ // src/ui/binanceImageUrl.ts
115
+ var BINANCE_IMAGE_HOSTNAME = "bin.bnbstatic.com";
116
+ var MAX_BINANCE_IMAGE_URL_LENGTH = 4096;
117
+ var CONTROL_CHARACTER_RE = /[\u0000-\u001F\u007F]/u;
118
+ function normalizeBinanceImageUrl(value) {
119
+ if (typeof value !== "string" || !value || value.length > MAX_BINANCE_IMAGE_URL_LENGTH) return null;
120
+ if (value !== value.trim() || CONTROL_CHARACTER_RE.test(value)) return null;
121
+ try {
122
+ const parsed = new URL(value);
123
+ if (parsed.protocol !== "https:") return null;
124
+ if (parsed.hostname.toLowerCase() !== BINANCE_IMAGE_HOSTNAME) return null;
125
+ if (parsed.username || parsed.password || parsed.port) return null;
126
+ return parsed.href;
127
+ } catch {
128
+ return null;
129
+ }
130
+ }
131
+
132
+ // src/ui/BinanceImage.tsx
133
+ function BinanceImage({ alt, src, fallback = null, className, onError, ...props }) {
134
+ const safeSrc = React5.useMemo(() => normalizeBinanceImageUrl(src), [src]);
135
+ const [failedSrc, setFailedSrc] = React5.useState(null);
136
+ const {
137
+ alt: _unsafeAlt,
138
+ decoding: _unsafeDecoding,
139
+ loading: _unsafeLoading,
140
+ referrerPolicy: _unsafeReferrerPolicy,
141
+ src: _unsafeSrc,
142
+ srcSet: _unsafeSrcSet,
143
+ ...imageProps
144
+ } = props;
145
+ if (!safeSrc || failedSrc === safeSrc) {
146
+ return /* @__PURE__ */ React5.createElement("span", { className: cn("block", className), "data-flap-binance-image-state": safeSrc ? "error" : "invalid" }, fallback);
147
+ }
148
+ return (
149
+ // eslint-disable-next-line @next/next/no-img-element -- BinanceImage owns the exact-host runtime boundary and browser loading policy.
150
+ /* @__PURE__ */ React5.createElement(
151
+ "img",
152
+ {
153
+ ...imageProps,
154
+ alt,
155
+ className: cn("block max-w-full", className),
156
+ "data-flap-binance-image-state": "ready",
157
+ decoding: "async",
158
+ loading: "lazy",
159
+ onError: (event) => {
160
+ setFailedSrc(safeSrc);
161
+ onError?.(event);
162
+ },
163
+ referrerPolicy: "no-referrer",
164
+ src: safeSrc
165
+ }
166
+ )
167
+ );
168
+ }
169
+ var Card = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
114
170
  "div",
115
171
  {
116
172
  "data-flap-ui": "card",
@@ -123,20 +179,20 @@ var Card = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ R
123
179
  }
124
180
  ));
125
181
  Card.displayName = "Card";
126
- var CardHeader = React4.forwardRef(
127
- ({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement("div", { "data-flap-ui": "card-header", ref, className: cn("flex flex-col gap-1.5 p-4 sm:p-5", className), ...props })
182
+ var CardHeader = React5.forwardRef(
183
+ ({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { "data-flap-ui": "card-header", ref, className: cn("flex flex-col gap-1.5 p-4 sm:p-5", className), ...props })
128
184
  );
129
185
  CardHeader.displayName = "CardHeader";
130
- var CardTitle = React4.forwardRef(
131
- ({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement("h3", { "data-flap-ui": "card-title", ref, className: cn("text-base font-semibold uppercase leading-tight tracking-normal text-white sm:text-lg", className), ...props })
186
+ var CardTitle = React5.forwardRef(
187
+ ({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement("h3", { "data-flap-ui": "card-title", ref, className: cn("text-base font-semibold uppercase leading-tight tracking-normal text-white sm:text-lg", className), ...props })
132
188
  );
133
189
  CardTitle.displayName = "CardTitle";
134
- var CardDescription = React4.forwardRef(
135
- ({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement("p", { "data-flap-ui": "card-description", ref, className: cn("text-sm leading-6 text-[#84888C]", className), ...props })
190
+ var CardDescription = React5.forwardRef(
191
+ ({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement("p", { "data-flap-ui": "card-description", ref, className: cn("text-sm leading-6 text-[#84888C]", className), ...props })
136
192
  );
137
193
  CardDescription.displayName = "CardDescription";
138
- var CardContent = React4.forwardRef(
139
- ({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement("div", { "data-flap-ui": "card-content", ref, className: cn("p-4 pt-0 sm:p-5 sm:pt-0", className), ...props })
194
+ var CardContent = React5.forwardRef(
195
+ ({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { "data-flap-ui": "card-content", ref, className: cn("p-4 pt-0 sm:p-5 sm:pt-0", className), ...props })
140
196
  );
141
197
  CardContent.displayName = "CardContent";
142
198
  function formatMs(ms) {
@@ -214,23 +270,23 @@ function normalizeExternalUrl(url) {
214
270
  }
215
271
  }
216
272
  function WarningIcon({ className }) {
217
- return /* @__PURE__ */ React4.createElement("svg", { viewBox: "0 0 80 80", fill: "currentColor", "aria-hidden": "true", shapeRendering: "crispEdges", className }, /* @__PURE__ */ React4.createElement("rect", { x: "32.4395", y: "11.7969", width: "2.62997", height: "6.57492" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "6.57492", transform: "matrix(-1 0 0 1 47.5605 11.7969)" }), /* @__PURE__ */ React4.createElement("rect", { x: "35.0693", y: "9.16699", width: "2.62997", height: "5.25994" }), /* @__PURE__ */ React4.createElement("rect", { x: "37.6982", y: "9.16699", width: "4.60245", height: "2.62997" }), /* @__PURE__ */ React4.createElement("rect", { x: "38.333", y: "6.66699", width: "3.33333", height: "2.5" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.25994", transform: "matrix(-1 0 0 1 44.9307 9.16699)" }), /* @__PURE__ */ React4.createElement("rect", { x: "29.8086", y: "16.3989", width: "2.62997", height: "6.57492" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "6.57492", transform: "matrix(-1 0 0 1 50.1914 16.3989)" }), /* @__PURE__ */ React4.createElement("rect", { x: "27.1787", y: "21.6592", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 52.8213 21.6592)" }), /* @__PURE__ */ React4.createElement("rect", { x: "24.5488", y: "24.2891", width: "2.62997", height: "7.23242" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "7.23242", transform: "matrix(-1 0 0 1 55.4512 24.2891)" }), /* @__PURE__ */ React4.createElement("rect", { x: "21.9189", y: "29.5488", width: "2.62997", height: "7.23242" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "7.23242", transform: "matrix(-1 0 0 1 58.0811 29.5488)" }), /* @__PURE__ */ React4.createElement("rect", { x: "19.2891", y: "34.8086", width: "2.62997", height: "7.23242" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "7.23242", transform: "matrix(-1 0 0 1 60.7109 34.8086)" }), /* @__PURE__ */ React4.createElement("rect", { x: "16.6592", y: "40.0693", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 63.3408 40.0693)" }), /* @__PURE__ */ React4.createElement("rect", { x: "14.0293", y: "44.6709", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 65.9707 44.6709)" }), /* @__PURE__ */ React4.createElement("rect", { x: "11.3984", y: "48.6165", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 68.6016 48.6165)" }), /* @__PURE__ */ React4.createElement("rect", { x: "8.76855", y: "53.8762", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 71.2314 53.8762)" }), /* @__PURE__ */ React4.createElement("rect", { x: "6.13965", y: "58.4783", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 73.8604 58.4783)" }), /* @__PURE__ */ React4.createElement("rect", { x: "4.16699", y: "62.4236", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React4.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 75.833 62.4236)" }), /* @__PURE__ */ React4.createElement("rect", { x: "6.79688", y: "68.3406", width: "2.62997", height: "2.62997" }), /* @__PURE__ */ React4.createElement("rect", { x: "70.5742", y: "68.3406", width: "2.62997", height: "2.62997" }), /* @__PURE__ */ React4.createElement("rect", { x: "9.42578", y: "70.9709", width: "61.1468", height: "2.62997" }), /* @__PURE__ */ React4.createElement("rect", { x: "38.333", y: "30.833", width: "4.16667", height: "22.5" }), /* @__PURE__ */ React4.createElement("rect", { x: "38.333", y: "57.5", width: "4.16667", height: "4.16667" }));
273
+ return /* @__PURE__ */ React5.createElement("svg", { viewBox: "0 0 80 80", fill: "currentColor", "aria-hidden": "true", shapeRendering: "crispEdges", className }, /* @__PURE__ */ React5.createElement("rect", { x: "32.4395", y: "11.7969", width: "2.62997", height: "6.57492" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "6.57492", transform: "matrix(-1 0 0 1 47.5605 11.7969)" }), /* @__PURE__ */ React5.createElement("rect", { x: "35.0693", y: "9.16699", width: "2.62997", height: "5.25994" }), /* @__PURE__ */ React5.createElement("rect", { x: "37.6982", y: "9.16699", width: "4.60245", height: "2.62997" }), /* @__PURE__ */ React5.createElement("rect", { x: "38.333", y: "6.66699", width: "3.33333", height: "2.5" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.25994", transform: "matrix(-1 0 0 1 44.9307 9.16699)" }), /* @__PURE__ */ React5.createElement("rect", { x: "29.8086", y: "16.3989", width: "2.62997", height: "6.57492" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "6.57492", transform: "matrix(-1 0 0 1 50.1914 16.3989)" }), /* @__PURE__ */ React5.createElement("rect", { x: "27.1787", y: "21.6592", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 52.8213 21.6592)" }), /* @__PURE__ */ React5.createElement("rect", { x: "24.5488", y: "24.2891", width: "2.62997", height: "7.23242" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "7.23242", transform: "matrix(-1 0 0 1 55.4512 24.2891)" }), /* @__PURE__ */ React5.createElement("rect", { x: "21.9189", y: "29.5488", width: "2.62997", height: "7.23242" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "7.23242", transform: "matrix(-1 0 0 1 58.0811 29.5488)" }), /* @__PURE__ */ React5.createElement("rect", { x: "19.2891", y: "34.8086", width: "2.62997", height: "7.23242" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "7.23242", transform: "matrix(-1 0 0 1 60.7109 34.8086)" }), /* @__PURE__ */ React5.createElement("rect", { x: "16.6592", y: "40.0693", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 63.3408 40.0693)" }), /* @__PURE__ */ React5.createElement("rect", { x: "14.0293", y: "44.6709", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 65.9707 44.6709)" }), /* @__PURE__ */ React5.createElement("rect", { x: "11.3984", y: "48.6165", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 68.6016 48.6165)" }), /* @__PURE__ */ React5.createElement("rect", { x: "8.76855", y: "53.8762", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 71.2314 53.8762)" }), /* @__PURE__ */ React5.createElement("rect", { x: "6.13965", y: "58.4783", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 73.8604 58.4783)" }), /* @__PURE__ */ React5.createElement("rect", { x: "4.16699", y: "62.4236", width: "2.62997", height: "5.91743" }), /* @__PURE__ */ React5.createElement("rect", { width: "2.62997", height: "5.91743", transform: "matrix(-1 0 0 1 75.833 62.4236)" }), /* @__PURE__ */ React5.createElement("rect", { x: "6.79688", y: "68.3406", width: "2.62997", height: "2.62997" }), /* @__PURE__ */ React5.createElement("rect", { x: "70.5742", y: "68.3406", width: "2.62997", height: "2.62997" }), /* @__PURE__ */ React5.createElement("rect", { x: "9.42578", y: "70.9709", width: "61.1468", height: "2.62997" }), /* @__PURE__ */ React5.createElement("rect", { x: "38.333", y: "30.833", width: "4.16667", height: "22.5" }), /* @__PURE__ */ React5.createElement("rect", { x: "38.333", y: "57.5", width: "4.16667", height: "4.16667" }));
218
274
  }
219
275
  function ExternalLink2({ url, children, locale, className, copy }) {
220
- const [open, setOpen] = React4.useState(false);
221
- const [acknowledged, setAcknowledged] = React4.useState(false);
222
- const [mounted, setMounted] = React4.useState(false);
276
+ const [open, setOpen] = React5.useState(false);
277
+ const [acknowledged, setAcknowledged] = React5.useState(false);
278
+ const [mounted, setMounted] = React5.useState(false);
223
279
  const text = { ...COPY[resolveLocale(locale)], ...copy };
224
- const safeUrl = React4.useMemo(() => normalizeExternalUrl(url), [url]);
280
+ const safeUrl = React5.useMemo(() => normalizeExternalUrl(url), [url]);
225
281
  const canProceed = acknowledged && Boolean(safeUrl);
226
- React4.useEffect(() => {
282
+ React5.useEffect(() => {
227
283
  setMounted(true);
228
284
  }, []);
229
- const close = React4.useCallback(() => {
285
+ const close = React5.useCallback(() => {
230
286
  setOpen(false);
231
287
  setAcknowledged(false);
232
288
  }, []);
233
- React4.useEffect(() => {
289
+ React5.useEffect(() => {
234
290
  if (!open) return;
235
291
  const onKey = (event) => {
236
292
  if (event.key === "Escape") close();
@@ -248,7 +304,7 @@ function ExternalLink2({ url, children, locale, className, copy }) {
248
304
  window.open(safeUrl, "_blank", "noopener,noreferrer");
249
305
  close();
250
306
  };
251
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
307
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
252
308
  "button",
253
309
  {
254
310
  type: "button",
@@ -256,17 +312,17 @@ function ExternalLink2({ url, children, locale, className, copy }) {
256
312
  onClick: () => setOpen(true),
257
313
  className: cn("inline-flex min-w-0 items-center gap-1 text-[#d0ff00] hover:underline", className)
258
314
  },
259
- /* @__PURE__ */ React4.createElement("span", { className: "truncate" }, children),
260
- /* @__PURE__ */ React4.createElement(ExternalLink, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": "true" })
315
+ /* @__PURE__ */ React5.createElement("span", { className: "truncate" }, children),
316
+ /* @__PURE__ */ React5.createElement(ExternalLink, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": "true" })
261
317
  ), open && mounted ? createPortal(
262
- /* @__PURE__ */ React4.createElement(
318
+ /* @__PURE__ */ React5.createElement(
263
319
  "div",
264
320
  {
265
321
  className: "fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm",
266
322
  style: { zIndex: 2147483647 },
267
323
  onClick: close
268
324
  },
269
- /* @__PURE__ */ React4.createElement(
325
+ /* @__PURE__ */ React5.createElement(
270
326
  "div",
271
327
  {
272
328
  role: "dialog",
@@ -282,22 +338,22 @@ function ExternalLink2({ url, children, locale, className, copy }) {
282
338
  },
283
339
  className: "flex w-[min(540px,100%)] max-h-[calc(100vh-2rem)] flex-col overflow-hidden rounded-[4px] text-white shadow-panel"
284
340
  },
285
- /* @__PURE__ */ React4.createElement(
341
+ /* @__PURE__ */ React5.createElement(
286
342
  "div",
287
343
  {
288
344
  className: "flex items-center justify-between border-b border-[#484b51] px-6 py-[14px]",
289
345
  style: { boxSizing: "border-box", height: "49px", lineHeight: 1 }
290
346
  },
291
- /* @__PURE__ */ React4.createElement(
347
+ /* @__PURE__ */ React5.createElement(
292
348
  "span",
293
349
  {
294
350
  className: "truncate text-[18px] font-medium uppercase leading-none tracking-[-0.4px]",
295
351
  style: { lineHeight: 1 }
296
352
  },
297
- /* @__PURE__ */ React4.createElement("span", { className: "text-[#d0ff00]" }, "//"),
353
+ /* @__PURE__ */ React5.createElement("span", { className: "text-[#d0ff00]" }, "//"),
298
354
  text.title
299
355
  ),
300
- /* @__PURE__ */ React4.createElement(
356
+ /* @__PURE__ */ React5.createElement(
301
357
  "button",
302
358
  {
303
359
  type: "button",
@@ -305,10 +361,10 @@ function ExternalLink2({ url, children, locale, className, copy }) {
305
361
  "aria-label": text.cancel,
306
362
  className: "flex size-5 shrink-0 items-center justify-center border border-[#484b51] text-white/80 hover:text-white"
307
363
  },
308
- /* @__PURE__ */ React4.createElement(X, { className: "h-3.5 w-3.5" })
364
+ /* @__PURE__ */ React5.createElement(X, { className: "h-3.5 w-3.5" })
309
365
  )
310
366
  ),
311
- /* @__PURE__ */ React4.createElement("div", { className: "flex flex-col gap-6 overflow-y-auto p-6" }, /* @__PURE__ */ React4.createElement("div", { className: "flex flex-col items-center gap-5" }, /* @__PURE__ */ React4.createElement(WarningIcon, { className: "h-20 w-20 text-[#f68f15]" }), /* @__PURE__ */ React4.createElement("h2", { className: "text-center text-[18px] font-medium uppercase leading-[1.4] tracking-[-0.4px]" }, text.heading)), /* @__PURE__ */ React4.createElement("p", { className: "text-[14px] leading-[1.4] tracking-[-0.4px] text-[#a0a3a7]" }, text.description), /* @__PURE__ */ React4.createElement("div", { className: "min-w-0 border border-[#262626] bg-[#0a0a0a] px-3 py-2 text-[13px]" }, /* @__PURE__ */ React4.createElement("div", { className: "mb-1 uppercase tracking-[-0.4px] text-[#6b7280]" }, text.destinationLabel), /* @__PURE__ */ React4.createElement("div", { className: "truncate text-[#d4d4d4]", title: safeUrl ?? url }, safeUrl ? new URL(safeUrl).host : text.invalidDestination)), /* @__PURE__ */ React4.createElement("label", { className: "flex cursor-pointer items-center gap-2 text-[14px] leading-[1.4] tracking-[-0.4px] text-white" }, /* @__PURE__ */ React4.createElement(
367
+ /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col gap-6 overflow-y-auto p-6" }, /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col items-center gap-5" }, /* @__PURE__ */ React5.createElement(WarningIcon, { className: "h-20 w-20 text-[#f68f15]" }), /* @__PURE__ */ React5.createElement("h2", { className: "text-center text-[18px] font-medium uppercase leading-[1.4] tracking-[-0.4px]" }, text.heading)), /* @__PURE__ */ React5.createElement("p", { className: "text-[14px] leading-[1.4] tracking-[-0.4px] text-[#a0a3a7]" }, text.description), /* @__PURE__ */ React5.createElement("div", { className: "min-w-0 border border-[#262626] bg-[#0a0a0a] px-3 py-2 text-[13px]" }, /* @__PURE__ */ React5.createElement("div", { className: "mb-1 uppercase tracking-[-0.4px] text-[#6b7280]" }, text.destinationLabel), /* @__PURE__ */ React5.createElement("div", { className: "truncate text-[#d4d4d4]", title: safeUrl ?? url }, safeUrl ? new URL(safeUrl).host : text.invalidDestination)), /* @__PURE__ */ React5.createElement("label", { className: "flex cursor-pointer items-center gap-2 text-[14px] leading-[1.4] tracking-[-0.4px] text-white" }, /* @__PURE__ */ React5.createElement(
312
368
  "input",
313
369
  {
314
370
  type: "checkbox",
@@ -316,7 +372,7 @@ function ExternalLink2({ url, children, locale, className, copy }) {
316
372
  onChange: (event) => setAcknowledged(event.target.checked),
317
373
  className: "sr-only"
318
374
  }
319
- ), /* @__PURE__ */ React4.createElement(
375
+ ), /* @__PURE__ */ React5.createElement(
320
376
  "span",
321
377
  {
322
378
  "aria-hidden": "true",
@@ -325,8 +381,8 @@ function ExternalLink2({ url, children, locale, className, copy }) {
325
381
  acknowledged ? "border-[#d0ff00] bg-[#d0ff00] text-[#070808]" : "border-[#a0a3a7] bg-transparent"
326
382
  )
327
383
  },
328
- acknowledged ? /* @__PURE__ */ React4.createElement("svg", { viewBox: "0 0 12 12", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: 2 }, /* @__PURE__ */ React4.createElement("path", { d: "M2 6.5 L5 9 L10 3", strokeLinecap: "square" })) : null
329
- ), /* @__PURE__ */ React4.createElement("span", { className: "min-w-0" }, text.acknowledge)), /* @__PURE__ */ React4.createElement("div", { className: "flex gap-6" }, /* @__PURE__ */ React4.createElement(
384
+ acknowledged ? /* @__PURE__ */ React5.createElement("svg", { viewBox: "0 0 12 12", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: 2 }, /* @__PURE__ */ React5.createElement("path", { d: "M2 6.5 L5 9 L10 3", strokeLinecap: "square" })) : null
385
+ ), /* @__PURE__ */ React5.createElement("span", { className: "min-w-0" }, text.acknowledge)), /* @__PURE__ */ React5.createElement("div", { className: "flex gap-6" }, /* @__PURE__ */ React5.createElement(
330
386
  "button",
331
387
  {
332
388
  type: "button",
@@ -334,7 +390,7 @@ function ExternalLink2({ url, children, locale, className, copy }) {
334
390
  className: "flex flex-1 items-center justify-center rounded-[2px] border border-[#84888c] bg-transparent py-3 text-[14px] font-bold uppercase tracking-[-0.4px] text-white transition-colors hover:border-white"
335
391
  },
336
392
  text.cancel
337
- ), /* @__PURE__ */ React4.createElement(
393
+ ), /* @__PURE__ */ React5.createElement(
338
394
  "button",
339
395
  {
340
396
  type: "button",
@@ -350,7 +406,7 @@ function ExternalLink2({ url, children, locale, className, copy }) {
350
406
  document.body
351
407
  ) : null);
352
408
  }
353
- var Input = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
409
+ var Input = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
354
410
  "input",
355
411
  {
356
412
  "data-flap-ui": "input",
@@ -364,16 +420,16 @@ var Input = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
364
420
  ));
365
421
  Input.displayName = "Input";
366
422
  function IpfsImage({ alt, cid, path, validationPath, className, decoding = "async", loading = "lazy", onError, ...props }) {
367
- const urls = React4.useMemo(() => resolveIpfsImageUrls(cid, 56, path), [cid, path]);
368
- const [urlIndex, setUrlIndex] = React4.useState(0);
423
+ const urls = React5.useMemo(() => resolveIpfsImageUrls(cid, 56, path), [cid, path]);
424
+ const [urlIndex, setUrlIndex] = React5.useState(0);
369
425
  const src = urls[urlIndex];
370
- React4.useEffect(() => {
426
+ React5.useEffect(() => {
371
427
  setUrlIndex(0);
372
428
  }, [cid, path]);
373
429
  if (!src) return null;
374
430
  return (
375
431
  // eslint-disable-next-line @next/next/no-img-element -- IpfsImage owns CID-to-gateway fallback; next/image cannot represent this boundary.
376
- /* @__PURE__ */ React4.createElement(
432
+ /* @__PURE__ */ React5.createElement(
377
433
  "img",
378
434
  {
379
435
  ...props,
@@ -394,7 +450,7 @@ function IpfsImage({ alt, cid, path, validationPath, className, decoding = "asyn
394
450
  );
395
451
  }
396
452
  function IpfsBackground({ cid, className, imageClassName, overlayClassName, ...props }) {
397
- return /* @__PURE__ */ React4.createElement("div", { ...props, "aria-hidden": "true", className: cn("pointer-events-none absolute inset-0 overflow-hidden", className) }, /* @__PURE__ */ React4.createElement(IpfsImage, { alt: "", cid, className: cn("h-full w-full object-cover", imageClassName), loading: "eager" }), overlayClassName ? /* @__PURE__ */ React4.createElement("div", { className: cn("absolute inset-0", overlayClassName) }) : null);
453
+ return /* @__PURE__ */ React5.createElement("div", { ...props, "aria-hidden": "true", className: cn("pointer-events-none absolute inset-0 overflow-hidden", className) }, /* @__PURE__ */ React5.createElement(IpfsImage, { alt: "", cid, className: cn("h-full w-full object-cover", imageClassName), loading: "eager" }), overlayClassName ? /* @__PURE__ */ React5.createElement("div", { className: cn("absolute inset-0", overlayClassName) }) : null);
398
454
  }
399
455
  var RuntimeContext = createContext(null);
400
456
  function useFlapSdk() {
@@ -413,9 +469,9 @@ function useFlapNotify() {
413
469
  }
414
470
  function NftMetadataImage({ alt, tokenId, fallback = null, className, decoding = "async", loading = "lazy", onError, ...props }) {
415
471
  const sdk = useFlapSdk();
416
- const [metadata, setMetadata] = React4.useState(null);
417
- const [state, setState] = React4.useState("loading");
418
- React4.useEffect(() => {
472
+ const [metadata, setMetadata] = React5.useState(null);
473
+ const [state, setState] = React5.useState("loading");
474
+ React5.useEffect(() => {
419
475
  let cancelled = false;
420
476
  setState("loading");
421
477
  setMetadata(null);
@@ -431,11 +487,11 @@ function NftMetadataImage({ alt, tokenId, fallback = null, className, decoding =
431
487
  };
432
488
  }, [sdk, sdk.refetchNonce, tokenId]);
433
489
  if (state !== "ready" || !metadata) {
434
- return /* @__PURE__ */ React4.createElement("span", { "data-flap-nft-media-state": state, className: cn("block", className) }, fallback);
490
+ return /* @__PURE__ */ React5.createElement("span", { "data-flap-nft-media-state": state, className: cn("block", className) }, fallback);
435
491
  }
436
492
  return (
437
493
  // eslint-disable-next-line @next/next/no-img-element -- shared runtime resolves tokenURI metadata to a validated, size-limited data image.
438
- /* @__PURE__ */ React4.createElement(
494
+ /* @__PURE__ */ React5.createElement(
439
495
  "img",
440
496
  {
441
497
  ...props,
@@ -483,7 +539,7 @@ function ReviewedFrame({ className, frameId, provider, src, title, ...props }) {
483
539
  title: _title,
484
540
  ...safeProps
485
541
  } = props;
486
- return /* @__PURE__ */ React4.createElement(
542
+ return /* @__PURE__ */ React5.createElement(
487
543
  "iframe",
488
544
  {
489
545
  ...safeProps,
@@ -539,6 +595,6 @@ function VaultBanner({ title, description, badges, meta, action, icon, className
539
595
  );
540
596
  }
541
597
 
542
- export { AddressLink, Alert, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Countdown, DataRow, DetailTile, ExternalLink2 as ExternalLink, Input, IpfsBackground, IpfsImage, Metric, NftMetadataImage, ReviewedFrame, RuntimeContext, StatusBadge, TxButton, VaultBanner, buttonVariants, isIpfsImageCid, normalizeIpfsImagePath, resolveIpfsImageUrl, resolveIpfsImageUrls, useFlapI18n, useFlapNotify, useFlapSdk, useVaultContext };
543
- //# sourceMappingURL=chunk-ZK3O6QPF.js.map
544
- //# sourceMappingURL=chunk-ZK3O6QPF.js.map
598
+ export { AddressLink, Alert, BinanceImage, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Countdown, DataRow, DetailTile, ExternalLink2 as ExternalLink, Input, IpfsBackground, IpfsImage, Metric, NftMetadataImage, ReviewedFrame, RuntimeContext, StatusBadge, TxButton, VaultBanner, buttonVariants, isIpfsImageCid, normalizeIpfsImagePath, resolveIpfsImageUrl, resolveIpfsImageUrls, useFlapI18n, useFlapNotify, useFlapSdk, useVaultContext };
599
+ //# sourceMappingURL=chunk-4S6TVBHU.js.map
600
+ //# sourceMappingURL=chunk-4S6TVBHU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/sdk/ipfsImage.ts","../../src/ui/AddressLink.tsx","../../src/ui/utils.ts","../../src/ui/Alert.tsx","../../src/ui/Button.tsx","../../src/ui/binanceImageUrl.ts","../../src/ui/BinanceImage.tsx","../../src/ui/Card.tsx","../../src/ui/Countdown.tsx","../../src/ui/DataRow.tsx","../../src/ui/DetailTile.tsx","../../src/ui/ExternalLink.tsx","../../src/ui/Input.tsx","../../src/ui/IpfsImage.tsx","../../src/ui/IpfsBackground.tsx","../../src/sdk/runtimeStore.tsx","../../src/ui/NftMetadataImage.tsx","../../src/ui/Metric.tsx","../../src/ui/ReviewedFrame.tsx","../../src/ui/StatusBadge.tsx","../../src/ui/TxButton.tsx","../../src/ui/VaultBanner.tsx"],"names":["React2","React3","React4","useState","useMemo","toneClass","ExternalLink","ExternalLinkIcon","CloseIcon","React6","React7","React8","React9","React10"],"mappings":";;;;;;;;;;;;AAEA,IAAM,0BAAA,GAA6B,6BAAA;AACnC,IAAM,mBAAA,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\";\nconst IPFS_IMAGE_GATEWAYS = [\"https://flap.mypinata.cloud\", \"https://magenta-naval-penguin-822.mypinata.cloud\"] as const;\nconst CID_RE = /^(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|b[a-z2-7]{20,})$/;\nconst PATH_SEGMENT_RE = /^[A-Za-z0-9._~-]+$/;\n\nexport function isIpfsImageCid(value: string) {\n return CID_RE.test(value.trim());\n}\n\nexport function normalizeIpfsImagePath(value: string | undefined) {\n if (value === undefined) return \"\";\n const trimmed = value.trim();\n if (!trimmed || trimmed.length > 512 || trimmed.startsWith(\"/\") || trimmed.endsWith(\"/\")) return undefined;\n const segments = trimmed.split(\"/\");\n if (segments.some((segment) => !segment || segment === \".\" || segment === \"..\" || !PATH_SEGMENT_RE.test(segment))) return undefined;\n return segments.join(\"/\");\n}\n\nexport function resolveIpfsImageUrl(cid: string, chainId = 56, path?: string) {\n const normalizedPath = normalizeIpfsImagePath(path);\n if (!isIpfsImageCid(cid) || normalizedPath === undefined) return undefined;\n const gateway = (getTaxVaultHostChainConfig(chainId)?.ipfsGateway ?? DEFAULT_IPFS_IMAGE_GATEWAY).replace(/\\/+$/, \"\");\n return `${gateway}/ipfs/${cid.trim()}${normalizedPath ? `/${normalizedPath}` : \"\"}`;\n}\n\nexport function resolveIpfsImageUrls(cid: string, chainId = 56, path?: string) {\n const normalizedPath = normalizeIpfsImagePath(path);\n if (!isIpfsImageCid(cid) || normalizedPath === undefined) return [];\n const preferred = (getTaxVaultHostChainConfig(chainId)?.ipfsGateway ?? DEFAULT_IPFS_IMAGE_GATEWAY).replace(/\\/+$/, \"\");\n const gateways = [preferred, ...IPFS_IMAGE_GATEWAYS.map((gateway) => gateway.replace(/\\/+$/, \"\"))];\n return [...new Set(gateways)].map((gateway) => `${gateway}/ipfs/${cid.trim()}${normalizedPath ? `/${normalizedPath}` : \"\"}`);\n}\n","import { ExternalLink } from \"lucide-react\";\nimport { shortenAddress } from \"@/src/sdk/format\";\n\ninterface AddressLinkProps {\n address?: string;\n explorerBaseUrl?: string;\n label?: string;\n}\n\nexport function AddressLink({ address, explorerBaseUrl, label }: AddressLinkProps) {\n if (!address) return <span>-</span>;\n const href = explorerBaseUrl ? `${explorerBaseUrl.replace(/\\/$/, \"\")}/address/${address}` : undefined;\n const content = (\n <span className=\"inline-flex min-w-0 items-center gap-1 text-primary\">\n <span className=\"truncate\">{label || shortenAddress(address)}</span>\n {href ? <ExternalLink className=\"h-3.5 w-3.5 shrink-0\" /> : null}\n </span>\n );\n return href ? (\n <a href={href} target=\"_blank\" rel=\"noreferrer\">\n {content}\n </a>\n ) : (\n content\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { AlertTriangle, CheckCircle2, Info } from \"lucide-react\";\nimport { ReactNode } from \"react\";\nimport { cn } from \"./utils\";\n\ntype AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst toneClass: Record<AlertTone, string> = {\n info: \"border-[#303236] bg-black text-[#D4D4D4]\",\n success: \"border-[#D0FF00]/45 bg-[#101400] text-[#D0FF00]\",\n warning: \"border-[#FFD166]/45 bg-[#1A1305] text-[#FFD166]\",\n danger: \"border-[#FF4A55]/55 bg-[#1D0709] text-[#FF8A91]\",\n};\n\nconst iconMap = {\n info: Info,\n success: CheckCircle2,\n warning: AlertTriangle,\n danger: AlertTriangle,\n};\n\nexport function Alert({ children, tone = \"info\", className }: { children: ReactNode; tone?: AlertTone; className?: string }) {\n const Icon = iconMap[tone];\n return (\n <div data-flap-ui=\"alert\" className={cn(\"flex gap-3 rounded-[6px] border p-3 text-sm font-medium leading-6\", toneClass[tone], className)}>\n <Icon className=\"mt-0.5 h-4 w-4 shrink-0 opacity-90\" />\n <div className=\"min-w-0 break-words\">{children}</div>\n </div>\n );\n}\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Loader2 } from \"lucide-react\";\nimport { cn } from \"./utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold uppercase leading-[1.4] tracking-normal duration-0 hover:transition-colors hover:duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#D0FF00]/45 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"ui20-connect-chamfer text-[#070808] [--ui20-chamfer-bg:#D0FF00] [--ui20-chamfer-border:#D0FF00] hover:[--ui20-chamfer-bg:#BDE800] hover:[--ui20-chamfer-border:#BDE800]\",\n secondary:\n \"ui20-connect-chamfer text-white [--ui20-chamfer-bg:#262626] [--ui20-chamfer-border:#262626] hover:text-[#D0FF00] hover:[--ui20-chamfer-bg:#303030] hover:[--ui20-chamfer-border:#303030]\",\n outline:\n \"ui20-connect-chamfer text-[#D4D4D4] [--ui20-chamfer-bg:#000000] [--ui20-chamfer-border:#303236] hover:text-[#D0FF00] hover:[--ui20-chamfer-border:#D0FF00]\",\n ghost: \"rounded-[6px] text-[#D4D4D4] hover:bg-[#131516] hover:text-[#D0FF00]\",\n destructive:\n \"ui20-connect-chamfer text-[#FF4A55] [--ui20-chamfer-bg:#000000] [--ui20-chamfer-border:#FF4A55] hover:text-black hover:[--ui20-chamfer-bg:#FF4A55]\",\n },\n size: {\n default: \"h-10 px-4\",\n sm: \"h-8 px-3 text-xs\",\n lg: \"h-12 px-5\",\n icon: \"h-10 w-10 px-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, loading = false, disabled, children, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n if (asChild) {\n return (\n <Comp data-flap-ui=\"button\" className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props}>\n {children}\n </Comp>\n );\n }\n return (\n <Comp\n data-flap-ui=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n >\n {loading ? <Loader2 className=\"relative z-10 h-4 w-4 animate-spin\" /> : null}\n <span className=\"relative z-10 inline-flex min-w-0 items-center justify-center gap-2\">{children}</span>\n </Comp>\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","export const BINANCE_IMAGE_HOSTNAME = \"bin.bnbstatic.com\";\n\nconst MAX_BINANCE_IMAGE_URL_LENGTH = 4096;\nconst CONTROL_CHARACTER_RE = /[\\u0000-\\u001F\\u007F]/u;\n\n/**\n * Accept only absolute HTTPS image URLs on Binance's exact static asset host.\n * The pathname is intentionally unrestricted because the upstream API returns\n * assets from multiple directories.\n */\nexport function normalizeBinanceImageUrl(value: string | null | undefined): string | null {\n if (typeof value !== \"string\" || !value || value.length > MAX_BINANCE_IMAGE_URL_LENGTH) return null;\n if (value !== value.trim() || CONTROL_CHARACTER_RE.test(value)) return null;\n\n try {\n const parsed = new URL(value);\n if (parsed.protocol !== \"https:\") return null;\n if (parsed.hostname.toLowerCase() !== BINANCE_IMAGE_HOSTNAME) return null;\n if (parsed.username || parsed.password || parsed.port) return null;\n return parsed.href;\n } catch {\n return null;\n }\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { normalizeBinanceImageUrl } from \"./binanceImageUrl\";\nimport { cn } from \"./utils\";\n\nexport interface BinanceImageProps\n extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, \"alt\" | \"decoding\" | \"loading\" | \"referrerPolicy\" | \"src\" | \"srcSet\"> {\n alt: string;\n src: string | null | undefined;\n fallback?: React.ReactNode;\n}\n\n/** Render one image from the exact https://bin.bnbstatic.com host. */\nexport function BinanceImage({ alt, src, fallback = null, className, onError, ...props }: BinanceImageProps) {\n const safeSrc = React.useMemo(() => normalizeBinanceImageUrl(src), [src]);\n const [failedSrc, setFailedSrc] = React.useState<string | null>(null);\n\n // Ignore source/security attributes even if an untyped caller supplies them.\n const {\n alt: _unsafeAlt,\n decoding: _unsafeDecoding,\n loading: _unsafeLoading,\n referrerPolicy: _unsafeReferrerPolicy,\n src: _unsafeSrc,\n srcSet: _unsafeSrcSet,\n ...imageProps\n } = props as React.ImgHTMLAttributes<HTMLImageElement>;\n void _unsafeAlt;\n void _unsafeDecoding;\n void _unsafeLoading;\n void _unsafeReferrerPolicy;\n void _unsafeSrc;\n void _unsafeSrcSet;\n\n if (!safeSrc || failedSrc === safeSrc) {\n return (\n <span className={cn(\"block\", className)} data-flap-binance-image-state={safeSrc ? \"error\" : \"invalid\"}>\n {fallback}\n </span>\n );\n }\n\n return (\n // eslint-disable-next-line @next/next/no-img-element -- BinanceImage owns the exact-host runtime boundary and browser loading policy.\n <img\n {...imageProps}\n alt={alt}\n className={cn(\"block max-w-full\", className)}\n data-flap-binance-image-state=\"ready\"\n decoding=\"async\"\n loading=\"lazy\"\n onError={(event) => {\n setFailedSrc(safeSrc);\n onError?.(event);\n }}\n referrerPolicy=\"no-referrer\"\n src={safeSrc}\n />\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"./utils\";\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\n <div\n data-flap-ui=\"card\"\n ref={ref}\n className={cn(\n \"rounded-[8px] border border-[#303236] bg-[#070808] text-white shadow-[0_18px_60px_-42px_rgba(208,255,0,0.45)]\",\n className,\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div data-flap-ui=\"card-header\" ref={ref} className={cn(\"flex flex-col gap-1.5 p-4 sm:p-5\", className)} {...props} />\n ),\n);\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3 data-flap-ui=\"card-title\" ref={ref} className={cn(\"text-base font-semibold uppercase leading-tight tracking-normal text-white sm:text-lg\", className)} {...props} />\n ),\n);\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\n ({ className, ...props }, ref) => (\n <p data-flap-ui=\"card-description\" ref={ref} className={cn(\"text-sm leading-6 text-[#84888C]\", className)} {...props} />\n ),\n);\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div data-flap-ui=\"card-content\" ref={ref} className={cn(\"p-4 pt-0 sm:p-5 sm:pt-0\", className)} {...props} />,\n);\nCardContent.displayName = \"CardContent\";\n\nexport { Card, CardContent, CardDescription, CardHeader, CardTitle };\n","import { useEffect, useMemo, useState } from \"react\";\n\nfunction formatMs(ms: number) {\n const safe = Math.max(0, ms);\n const totalSeconds = Math.floor(safe / 1000);\n const days = Math.floor(totalSeconds / 86400);\n const hours = Math.floor((totalSeconds % 86400) / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n if (days > 0) return `${days}d ${hours}h ${minutes}m`;\n if (hours > 0) return `${hours}h ${minutes}m ${seconds}s`;\n return `${minutes}m ${seconds}s`;\n}\n\nexport function Countdown({ targetTimeMs, fallback = \"-\" }: { targetTimeMs?: number; fallback?: string }) {\n const [now, setNow] = useState(() => Date.now());\n\n useEffect(() => {\n const timer = window.setInterval(() => setNow(Date.now()), 1000);\n return () => window.clearInterval(timer);\n }, []);\n\n const text = useMemo(() => {\n if (!targetTimeMs) return fallback;\n return formatMs(targetTimeMs - now);\n }, [fallback, now, targetTimeMs]);\n\n return <span>{text}</span>;\n}\n","import { ReactNode } from \"react\";\nimport { cn } from \"./utils\";\n\ninterface DataRowProps {\n label: ReactNode;\n value: ReactNode;\n detail?: ReactNode;\n className?: string;\n}\n\nexport function DataRow({ label, value, detail, className }: DataRowProps) {\n return (\n <div className={cn(\"flex items-start justify-between gap-4 border-b border-white/8 py-3 last:border-0\", className)}>\n <div className=\"min-w-0 text-sm text-white/54\">{label}</div>\n <div className=\"min-w-0 text-right\">\n <div className=\"break-words text-sm font-semibold text-white\">{value}</div>\n {detail ? <div className=\"mt-1 text-xs text-white/42\">{detail}</div> : null}\n </div>\n </div>\n );\n}\n","import { ReactNode } from \"react\";\nimport { cn } from \"./utils\";\n\ntype DetailTileTone = \"default\" | \"primary\" | \"success\" | \"warning\" | \"muted\";\n\nconst toneClass: Record<DetailTileTone, string> = {\n default: \"border-[#303236] bg-[#0B0D0E]\",\n primary: \"border-[#D0FF00]/70 bg-[#101400]\",\n success: \"border-[#2EDEDB]/45 bg-[#061615]\",\n warning: \"border-[#FFD166]/45 bg-[#1A1305]\",\n muted: \"border-[#303236] bg-black\",\n};\n\ninterface DetailTileProps {\n label: ReactNode;\n value: ReactNode;\n detail?: ReactNode;\n icon?: ReactNode;\n tone?: DetailTileTone;\n className?: string;\n valueClassName?: string;\n}\n\nexport function DetailTile({ label, value, detail, icon, tone = \"default\", className, valueClassName }: DetailTileProps) {\n return (\n <div data-flap-ui=\"detail-tile\" className={cn(\"min-w-0 rounded-[6px] border p-3\", toneClass[tone], className)}>\n <div className=\"flex min-w-0 items-center gap-2 text-xs font-medium uppercase leading-[1.4] text-[#84888C]\">\n {icon ? <span className=\"shrink-0 text-[#D0FF00]\">{icon}</span> : null}\n <span className=\"min-w-0 truncate\">{label}</span>\n </div>\n <div className={cn(\"mt-2 min-w-0 break-words text-base font-semibold leading-snug text-white\", valueClassName)}>\n {value}\n </div>\n {detail ? <div className=\"mt-1 min-w-0 break-words text-xs leading-5 text-[#84888C]\">{detail}</div> : null}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { ExternalLink as ExternalLinkIcon, X as CloseIcon } from \"lucide-react\";\nimport { cn } from \"./utils\";\n\ntype ExternalLinkLocale = \"en\" | \"zh\";\n\ninterface ExternalLinkCopy {\n title: string;\n heading: string;\n description: string;\n destinationLabel: string;\n invalidDestination: string;\n acknowledge: string;\n cancel: string;\n proceed: string;\n}\n\nconst COPY: Record<ExternalLinkLocale, ExternalLinkCopy> = {\n en: {\n title: \"THIRD-PARTY WARNING\",\n heading: \"YOU ARE LEAVING FLAP\",\n description:\n \"You are about to visit a third-party page maintained by an external developer. This site is not operated by FLAP and may contain unknown security or privacy risks.\",\n destinationLabel: \"Destination\",\n invalidDestination: \"Unsupported destination\",\n acknowledge: \"I understand the risks and want to proceed\",\n cancel: \"CLOSE\",\n proceed: \"CONTINUE\",\n },\n zh: {\n title: \"第三方风险提示\",\n heading: \"您即将离开 FLAP\",\n description:\n \"您即将访问由外部开发者维护的第三方页面。该站点不由 FLAP 运营,可能存在未知的安全或隐私风险。\",\n destinationLabel: \"目标地址\",\n invalidDestination: \"不支持的目标地址\",\n acknowledge: \"我已了解风险并希望继续\",\n cancel: \"关闭\",\n proceed: \"继续\",\n },\n};\n\nexport interface ExternalLinkProps {\n /** Absolute HTTPS destination. Shown to the user and opened only after explicit consent. */\n url: string;\n /** Trigger content (the visible link text or element). */\n children: React.ReactNode;\n /** Active locale for the built-in warning copy. Defaults to \"en\". */\n locale?: string;\n /** Class applied to the inline trigger button. */\n className?: string;\n /** Optional per-field copy overrides for the warning dialog. */\n copy?: Partial<ExternalLinkCopy>;\n}\n\nfunction resolveLocale(locale?: string): ExternalLinkLocale {\n return locale && locale.toLowerCase().startsWith(\"zh\") ? \"zh\" : \"en\";\n}\n\nfunction normalizeExternalUrl(url: string): string | null {\n try {\n const parsed = new URL(url);\n if (parsed.protocol !== \"https:\" || parsed.username || parsed.password) return null;\n return parsed.href;\n } catch {\n return null;\n }\n}\n\nfunction WarningIcon({ className }: { className?: string }) {\n // Pixel-art warning triangle, exported from Figma (node 1196:9849). Color via currentColor.\n return (\n <svg viewBox=\"0 0 80 80\" fill=\"currentColor\" aria-hidden=\"true\" shapeRendering=\"crispEdges\" className={className}>\n <rect x=\"32.4395\" y=\"11.7969\" width=\"2.62997\" height=\"6.57492\" />\n <rect width=\"2.62997\" height=\"6.57492\" transform=\"matrix(-1 0 0 1 47.5605 11.7969)\" />\n <rect x=\"35.0693\" y=\"9.16699\" width=\"2.62997\" height=\"5.25994\" />\n <rect x=\"37.6982\" y=\"9.16699\" width=\"4.60245\" height=\"2.62997\" />\n <rect x=\"38.333\" y=\"6.66699\" width=\"3.33333\" height=\"2.5\" />\n <rect width=\"2.62997\" height=\"5.25994\" transform=\"matrix(-1 0 0 1 44.9307 9.16699)\" />\n <rect x=\"29.8086\" y=\"16.3989\" width=\"2.62997\" height=\"6.57492\" />\n <rect width=\"2.62997\" height=\"6.57492\" transform=\"matrix(-1 0 0 1 50.1914 16.3989)\" />\n <rect x=\"27.1787\" y=\"21.6592\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 52.8213 21.6592)\" />\n <rect x=\"24.5488\" y=\"24.2891\" width=\"2.62997\" height=\"7.23242\" />\n <rect width=\"2.62997\" height=\"7.23242\" transform=\"matrix(-1 0 0 1 55.4512 24.2891)\" />\n <rect x=\"21.9189\" y=\"29.5488\" width=\"2.62997\" height=\"7.23242\" />\n <rect width=\"2.62997\" height=\"7.23242\" transform=\"matrix(-1 0 0 1 58.0811 29.5488)\" />\n <rect x=\"19.2891\" y=\"34.8086\" width=\"2.62997\" height=\"7.23242\" />\n <rect width=\"2.62997\" height=\"7.23242\" transform=\"matrix(-1 0 0 1 60.7109 34.8086)\" />\n <rect x=\"16.6592\" y=\"40.0693\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 63.3408 40.0693)\" />\n <rect x=\"14.0293\" y=\"44.6709\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 65.9707 44.6709)\" />\n <rect x=\"11.3984\" y=\"48.6165\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 68.6016 48.6165)\" />\n <rect x=\"8.76855\" y=\"53.8762\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 71.2314 53.8762)\" />\n <rect x=\"6.13965\" y=\"58.4783\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 73.8604 58.4783)\" />\n <rect x=\"4.16699\" y=\"62.4236\" width=\"2.62997\" height=\"5.91743\" />\n <rect width=\"2.62997\" height=\"5.91743\" transform=\"matrix(-1 0 0 1 75.833 62.4236)\" />\n <rect x=\"6.79688\" y=\"68.3406\" width=\"2.62997\" height=\"2.62997\" />\n <rect x=\"70.5742\" y=\"68.3406\" width=\"2.62997\" height=\"2.62997\" />\n <rect x=\"9.42578\" y=\"70.9709\" width=\"61.1468\" height=\"2.62997\" />\n <rect x=\"38.333\" y=\"30.833\" width=\"4.16667\" height=\"22.5\" />\n <rect x=\"38.333\" y=\"57.5\" width=\"4.16667\" height=\"4.16667\" />\n </svg>\n );\n}\n\n/**\n * ExternalLink is the sanctioned way to send a user to a non-allowlisted external\n * site. It intercepts navigation, shows a third-party risk warning, and only opens\n * the destination (in a new tab, with noopener/noreferrer) after the user checks the\n * risk-acknowledgement box and confirms.\n */\nexport function ExternalLink({ url, children, locale, className, copy }: ExternalLinkProps) {\n const [open, setOpen] = React.useState(false);\n const [acknowledged, setAcknowledged] = React.useState(false);\n const [mounted, setMounted] = React.useState(false);\n const text = { ...COPY[resolveLocale(locale)], ...copy };\n const safeUrl = React.useMemo(() => normalizeExternalUrl(url), [url]);\n const canProceed = acknowledged && Boolean(safeUrl);\n\n React.useEffect(() => {\n setMounted(true);\n }, []);\n\n const close = React.useCallback(() => {\n setOpen(false);\n setAcknowledged(false);\n }, []);\n\n React.useEffect(() => {\n if (!open) return;\n const onKey = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") close();\n };\n document.addEventListener(\"keydown\", onKey);\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n return () => {\n document.removeEventListener(\"keydown\", onKey);\n document.body.style.overflow = previousOverflow;\n };\n }, [open, close]);\n\n const proceed = () => {\n if (!canProceed || !safeUrl) return;\n window.open(safeUrl, \"_blank\", \"noopener,noreferrer\");\n close();\n };\n\n return (\n <>\n <button\n type=\"button\"\n data-flap-ui=\"external-link\"\n onClick={() => setOpen(true)}\n className={cn(\"inline-flex min-w-0 items-center gap-1 text-[#d0ff00] hover:underline\", className)}\n >\n <span className=\"truncate\">{children}</span>\n <ExternalLinkIcon className=\"h-3.5 w-3.5 shrink-0\" aria-hidden=\"true\" />\n </button>\n\n {open && mounted ? (\n createPortal(\n <div\n className=\"fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm\"\n style={{ zIndex: 2147483647 }}\n onClick={close}\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={text.title}\n onClick={(event) => event.stopPropagation()}\n style={{\n width: \"min(540px, 100%)\",\n maxHeight: \"calc(100vh - 2rem)\",\n fontFamily: \"'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace\",\n backgroundColor: \"#070808\",\n border: \"1px solid #414141\",\n }}\n className=\"flex w-[min(540px,100%)] max-h-[calc(100vh-2rem)] flex-col overflow-hidden rounded-[4px] text-white shadow-panel\"\n >\n <div\n className=\"flex items-center justify-between border-b border-[#484b51] px-6 py-[14px]\"\n style={{ boxSizing: \"border-box\", height: \"49px\", lineHeight: 1 }}\n >\n <span\n className=\"truncate text-[18px] font-medium uppercase leading-none tracking-[-0.4px]\"\n style={{ lineHeight: 1 }}\n >\n <span className=\"text-[#d0ff00]\">{\"//\"}</span>\n {text.title}\n </span>\n <button\n type=\"button\"\n onClick={close}\n aria-label={text.cancel}\n className=\"flex size-5 shrink-0 items-center justify-center border border-[#484b51] text-white/80 hover:text-white\"\n >\n <CloseIcon className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n\n <div className=\"flex flex-col gap-6 overflow-y-auto p-6\">\n <div className=\"flex flex-col items-center gap-5\">\n <WarningIcon className=\"h-20 w-20 text-[#f68f15]\" />\n <h2 className=\"text-center text-[18px] font-medium uppercase leading-[1.4] tracking-[-0.4px]\">{text.heading}</h2>\n </div>\n\n <p className=\"text-[14px] leading-[1.4] tracking-[-0.4px] text-[#a0a3a7]\">{text.description}</p>\n\n <div className=\"min-w-0 border border-[#262626] bg-[#0a0a0a] px-3 py-2 text-[13px]\">\n <div className=\"mb-1 uppercase tracking-[-0.4px] text-[#6b7280]\">{text.destinationLabel}</div>\n <div className=\"truncate text-[#d4d4d4]\" title={safeUrl ?? url}>\n {safeUrl ? new URL(safeUrl).host : text.invalidDestination}\n </div>\n </div>\n\n <label className=\"flex cursor-pointer items-center gap-2 text-[14px] leading-[1.4] tracking-[-0.4px] text-white\">\n <input\n type=\"checkbox\"\n checked={acknowledged}\n onChange={(event) => setAcknowledged(event.target.checked)}\n className=\"sr-only\"\n />\n <span\n aria-hidden=\"true\"\n className={cn(\n \"flex size-4 shrink-0 items-center justify-center border\",\n acknowledged ? \"border-[#d0ff00] bg-[#d0ff00] text-[#070808]\" : \"border-[#a0a3a7] bg-transparent\",\n )}\n >\n {acknowledged ? (\n <svg viewBox=\"0 0 12 12\" className=\"h-3 w-3\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2}>\n <path d=\"M2 6.5 L5 9 L10 3\" strokeLinecap=\"square\" />\n </svg>\n ) : null}\n </span>\n <span className=\"min-w-0\">{text.acknowledge}</span>\n </label>\n\n <div className=\"flex gap-6\">\n <button\n type=\"button\"\n onClick={close}\n className=\"flex flex-1 items-center justify-center rounded-[2px] border border-[#84888c] bg-transparent py-3 text-[14px] font-bold uppercase tracking-[-0.4px] text-white transition-colors hover:border-white\"\n >\n {text.cancel}\n </button>\n <button\n type=\"button\"\n onClick={proceed}\n disabled={!canProceed}\n style={{ backgroundColor: canProceed ? \"#d0ff00\" : \"#536600\", color: \"#070808\" }}\n className=\"flex flex-1 items-center justify-center rounded-[2px] py-3 text-[14px] font-bold uppercase tracking-[-0.4px] transition-colors\"\n >\n {text.proceed}\n </button>\n </div>\n </div>\n </div>\n </div>,\n document.body,\n )\n ) : null}\n </>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"./utils\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => (\n <input\n data-flap-ui=\"input\"\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-[6px] border border-[#303236] bg-black px-3 py-2 text-sm font-semibold text-white caret-[#D0FF00] shadow-[inset_0_1px_0_rgba(255,255,255,0.04)] outline-none duration-0 selection:bg-[#D0FF00]/35 selection:text-white placeholder:text-[#84888C] focus:border-[#D0FF00] focus:ring-2 focus:ring-[#D0FF00]/25 disabled:cursor-not-allowed disabled:bg-[#131516] disabled:text-[#84888C] disabled:opacity-80\",\n className,\n )}\n {...props}\n />\n));\nInput.displayName = \"Input\";\n\nexport { Input };\n","import * as React from \"react\";\nimport { resolveIpfsImageUrls } from \"@/src/sdk/ipfsImage\";\nimport { cn } from \"./utils\";\n\nexport interface IpfsImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, \"alt\" | \"src\" | \"srcSet\"> {\n alt: string;\n cid: string;\n /** Safe relative file path below the static CID. */\n path?: string;\n /** Static representative image path required by vault:check when path is dynamic. */\n validationPath?: string;\n}\n\nexport function IpfsImage({ alt, cid, path, validationPath, className, decoding = \"async\", loading = \"lazy\", onError, ...props }: IpfsImageProps) {\n void validationPath;\n const urls = React.useMemo(() => resolveIpfsImageUrls(cid, 56, path), [cid, path]);\n const [urlIndex, setUrlIndex] = React.useState(0);\n const src = urls[urlIndex];\n\n React.useEffect(() => {\n setUrlIndex(0);\n }, [cid, path]);\n\n if (!src) return null;\n\n return (\n // eslint-disable-next-line @next/next/no-img-element -- IpfsImage owns CID-to-gateway fallback; next/image cannot represent this boundary.\n <img\n {...props}\n alt={alt}\n className={cn(\"block max-w-full\", className)}\n decoding={decoding}\n loading={loading}\n onError={(event) => {\n if (urlIndex < urls.length - 1) {\n setUrlIndex((index) => Math.min(index + 1, urls.length - 1));\n return;\n }\n onError?.(event);\n }}\n src={src}\n />\n );\n}\n","import * as React from \"react\";\nimport { IpfsImage } from \"./IpfsImage\";\nimport { cn } from \"./utils\";\n\nexport interface IpfsBackgroundProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n cid: string;\n imageClassName?: string;\n overlayClassName?: string;\n}\n\nexport function IpfsBackground({ cid, className, imageClassName, overlayClassName, ...props }: IpfsBackgroundProps) {\n return (\n <div {...props} aria-hidden=\"true\" className={cn(\"pointer-events-none absolute inset-0 overflow-hidden\", className)}>\n <IpfsImage alt=\"\" cid={cid} className={cn(\"h-full w-full object-cover\", imageClassName)} loading=\"eager\" />\n {overlayClassName ? <div className={cn(\"absolute inset-0\", overlayClassName)} /> : null}\n </div>\n );\n}\n","\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport type { FlapVaultSdk } from \"./types\";\n\nexport const RuntimeContext = createContext<FlapVaultSdk | null>(null);\n\nexport function useFlapSdk() {\n const sdk = useContext(RuntimeContext);\n if (!sdk) throw new Error(\"useFlapSdk must be used within VaultRuntimeProvider.\");\n return sdk;\n}\n\nexport function useVaultContext() {\n return useFlapSdk().context;\n}\n\nexport function useFlapI18n() {\n return useFlapSdk().i18n;\n}\n\nexport function useFlapNotify() {\n return useFlapSdk().notify;\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { useFlapSdk } from \"../sdk/runtimeStore\";\nimport type { NftMetadataSnapshot } from \"../sdk/types\";\nimport { cn } from \"./utils\";\n\nexport interface NftMetadataImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, \"alt\" | \"src\" | \"srcSet\"> {\n alt: string;\n tokenId: bigint;\n fallback?: React.ReactNode;\n}\n\nexport function NftMetadataImage({ alt, tokenId, fallback = null, className, decoding = \"async\", loading = \"lazy\", onError, ...props }: NftMetadataImageProps) {\n const sdk = useFlapSdk();\n const [metadata, setMetadata] = React.useState<NftMetadataSnapshot | null>(null);\n const [state, setState] = React.useState<\"loading\" | \"ready\" | \"error\">(\"loading\");\n\n React.useEffect(() => {\n let cancelled = false;\n setState(\"loading\");\n setMetadata(null);\n sdk\n .readNftMetadata({ tokenId })\n .then((nextMetadata) => {\n if (cancelled) return;\n setMetadata(nextMetadata);\n setState(\"ready\");\n })\n .catch(() => {\n if (!cancelled) setState(\"error\");\n });\n return () => {\n cancelled = true;\n };\n }, [sdk, sdk.refetchNonce, tokenId]);\n\n if (state !== \"ready\" || !metadata) {\n return <span data-flap-nft-media-state={state} className={cn(\"block\", className)}>{fallback}</span>;\n }\n\n return (\n // eslint-disable-next-line @next/next/no-img-element -- shared runtime resolves tokenURI metadata to a validated, size-limited data image.\n <img\n {...props}\n alt={alt}\n className={cn(\"block max-w-full\", className)}\n data-flap-nft-media-source={metadata.source}\n data-flap-nft-media-state={state}\n decoding={decoding}\n loading={loading}\n onError={(event) => {\n setState(\"error\");\n onError?.(event);\n }}\n src={metadata.imageDataUrl}\n />\n );\n}\n","import { ReactNode } from \"react\";\nimport { cn } from \"./utils\";\n\ntype MetricTone = \"default\" | \"primary\" | \"success\" | \"warning\" | \"muted\";\n\nconst toneClass: Record<MetricTone, string> = {\n default: \"border-[#303236] bg-[#0B0D0E]\",\n primary: \"border-[#D0FF00]/70 bg-[#101400]\",\n success: \"border-[#2EDEDB]/45 bg-[#061615]\",\n warning: \"border-[#FFD166]/45 bg-[#1A1305]\",\n muted: \"border-[#303236] bg-black\",\n};\n\nconst valueToneClass: Record<MetricTone, string> = {\n default: \"text-white\",\n primary: \"text-[#D0FF00]\",\n success: \"text-[#2EDEDB]\",\n warning: \"text-[#FFD166]\",\n muted: \"text-white\",\n};\n\ninterface MetricProps {\n label: ReactNode;\n value: ReactNode;\n hint?: ReactNode;\n tone?: MetricTone;\n className?: string;\n}\n\nexport function Metric({ label, value, hint, tone = \"default\", className }: MetricProps) {\n return (\n <div data-flap-ui=\"metric\" className={cn(\"rounded-[6px] border p-3\", toneClass[tone], className)}>\n <div className=\"truncate text-xs font-medium uppercase leading-[1.4] text-[#84888C]\">{label}</div>\n <div className={cn(\"mt-2 break-words text-xl font-semibold tracking-normal\", valueToneClass[tone])}>{value}</div>\n {hint ? <div className=\"mt-1 truncate text-xs text-[#D4D4D4]\">{hint}</div> : null}\n </div>\n );\n}\n","import * as React from \"react\";\nimport { cn } from \"./utils\";\n\nexport type ReviewedFrameProvider = \"tradingview\" | \"dexscreener\" | \"coingecko-terminal\";\n\nexport interface ReviewedFrameProps\n extends Omit<React.IframeHTMLAttributes<HTMLIFrameElement>, \"allow\" | \"referrerPolicy\" | \"sandbox\" | \"src\" | \"srcDoc\" | \"title\"> {\n frameId: string;\n provider: ReviewedFrameProvider;\n src: string;\n title: string;\n}\n\nexport function ReviewedFrame({ className, frameId, provider, src, title, ...props }: ReviewedFrameProps) {\n const {\n allow: _allow,\n referrerPolicy: _referrerPolicy,\n sandbox: _sandbox,\n src: _src,\n srcDoc: _srcDoc,\n title: _title,\n ...safeProps\n } = props as React.IframeHTMLAttributes<HTMLIFrameElement>;\n\n return (\n <iframe\n {...safeProps}\n data-frame-id={frameId}\n data-frame-provider={provider}\n src={src}\n title={title}\n loading=\"lazy\"\n referrerPolicy=\"no-referrer\"\n sandbox=\"allow-scripts allow-same-origin\"\n className={cn(\"min-h-[360px] w-full rounded-lg border border-[#3a4d66] bg-[#0b111a]\", className)}\n />\n );\n}\n","import { ReactNode } from \"react\";\nimport { cn } from \"./utils\";\n\nexport type StatusTone = \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\nconst toneClass: Record<StatusTone, string> = {\n neutral: \"border-[#303236] bg-black text-[#D4D4D4]\",\n success: \"border-[#D0FF00]/65 bg-[#101400] text-[#D0FF00]\",\n warning: \"border-[#FFD166]/55 bg-[#1A1305] text-[#FFD166]\",\n danger: \"border-[#FF4A55]/65 bg-[#1D0709] text-[#FF8A91]\",\n};\n\nexport function StatusBadge({ children, tone = \"neutral\" }: { children: ReactNode; tone?: StatusTone }) {\n return (\n <span data-flap-ui=\"status-badge\" className={cn(\"inline-flex items-center rounded-[6px] border px-2.5 py-1 text-xs font-semibold uppercase leading-none\", toneClass[tone])}>\n {children}\n </span>\n );\n}\n","import { Button, type ButtonProps } from \"./Button\";\n\nexport type TxButtonState = \"idle\" | \"validating\" | \"approving\" | \"approval_confirming\" | \"simulating\" | \"writing\" | \"confirming\" | \"success\" | \"failed\";\n\nconst labels: Record<TxButtonState, string> = {\n idle: \"\",\n validating: \"Validating\",\n approving: \"Approving\",\n approval_confirming: \"Confirming approval\",\n simulating: \"Simulating\",\n writing: \"Sending\",\n confirming: \"Confirming\",\n success: \"Done\",\n failed: \"Retry\",\n};\n\ninterface TxButtonProps extends ButtonProps {\n state?: TxButtonState;\n idleLabel: string;\n}\n\nexport function TxButton({ state = \"idle\", idleLabel, children, ...props }: TxButtonProps) {\n const loading = [\"validating\", \"approving\", \"approval_confirming\", \"simulating\", \"writing\", \"confirming\"].includes(state);\n return (\n <Button loading={loading} {...props}>\n {children || labels[state] || idleLabel}\n </Button>\n );\n}\n","import { ShieldCheck } from \"lucide-react\";\nimport { ReactNode } from \"react\";\nimport { cn } from \"./utils\";\n\ninterface VaultBannerProps {\n title: ReactNode;\n description: ReactNode;\n badges?: ReactNode;\n meta?: ReactNode;\n action?: ReactNode;\n icon?: ReactNode;\n className?: string;\n}\n\nexport function VaultBanner({ title, description, badges, meta, action, icon, className }: VaultBannerProps) {\n return (\n <section\n className={cn(\n \"rounded-lg border border-[#3b82f6] bg-[#172a5a] p-4 shadow-[inset_0_1px_0_rgba(255,255,255,0.08)]\",\n className,\n )}\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <span className=\"inline-flex h-4 w-4 shrink-0 items-center justify-center text-[#8fc8ff]\">\n {icon ?? <ShieldCheck className=\"h-4 w-4\" />}\n </span>\n <h3 className=\"min-w-0 text-base font-semibold leading-tight text-white\">{title}</h3>\n {badges}\n </div>\n <p className=\"mt-3 max-w-3xl text-sm font-medium leading-6 text-[#d8e2ef]\">{description}</p>\n {meta ? <div className=\"mt-2 text-xs font-medium leading-5 text-[#92a4bd]\">{meta}</div> : null}\n </div>\n {action ? <div className=\"shrink-0\">{action}</div> : null}\n </div>\n </section>\n );\n}\n"]}
@@ -68,6 +68,9 @@ function parsePortalTokenInfo(tokenData) {
68
68
  tokenVersion: toNumber(getTupleField(tokenData, "tokenVersion", 4))
69
69
  };
70
70
  }
71
+ function normalizeOnchainPortalTokenVersion(tokenVersion) {
72
+ return Number.isInteger(tokenVersion) && tokenVersion >= 0 ? tokenVersion + 1 : tokenVersion;
73
+ }
71
74
  function parseFeeVaultInfo(vaultInfo) {
72
75
  if (!vaultInfo) return null;
73
76
  return {
@@ -403,6 +406,6 @@ function handleTxError(error, messages) {
403
406
  return messages?.[kind] ?? defaultMessages[kind];
404
407
  }
405
408
 
406
- export { ZERO_ADDRESS, chainLabelForChain, createTaxInfoHostContext, createVaultRuntimeContext, explorerForChain, getTupleField, getTxErrorKind, handleTxError, isActionAvailableForPhase, isCustomVaultTaxToken, isManifestRuntimeMatch, isSameAddress, isValidAddress, isVaultBindingMatch, normalizeAddress, parseFeeVaultInfo, parsePortalTokenInfo, parseTaxTokenInfo, parseVaultPortalInfo, readTaxVaultHostContext, resolveFeeMode, resolveManifestBinding, resolveTaxInfoRenderSurface, resolveTokenMarketPhase, resolveVaultBinding, standardErc20Abi };
407
- //# sourceMappingURL=chunk-SYEMIHOY.js.map
408
- //# sourceMappingURL=chunk-SYEMIHOY.js.map
409
+ export { ZERO_ADDRESS, chainLabelForChain, createTaxInfoHostContext, createVaultRuntimeContext, explorerForChain, getTupleField, getTxErrorKind, handleTxError, isActionAvailableForPhase, isCustomVaultTaxToken, isManifestRuntimeMatch, isSameAddress, isValidAddress, isVaultBindingMatch, normalizeAddress, normalizeOnchainPortalTokenVersion, parseFeeVaultInfo, parsePortalTokenInfo, parseTaxTokenInfo, parseVaultPortalInfo, readTaxVaultHostContext, resolveFeeMode, resolveManifestBinding, resolveTaxInfoRenderSurface, resolveTokenMarketPhase, resolveVaultBinding, standardErc20Abi };
410
+ //# sourceMappingURL=chunk-VUIWNFCV.js.map
411
+ //# sourceMappingURL=chunk-VUIWNFCV.js.map