@loafmarkets/ui 0.1.383 → 0.1.384

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
@@ -1900,7 +1900,6 @@ var Orderbook = React5__namespace.forwardRef(
1900
1900
  amountPrecision = 2,
1901
1901
  defaultTab = "orderbook",
1902
1902
  onTabChange,
1903
- showTradesTab = true,
1904
1903
  rightHeader,
1905
1904
  variant = "auto",
1906
1905
  userOrderPrices,
@@ -1914,9 +1913,7 @@ var Orderbook = React5__namespace.forwardRef(
1914
1913
  ...props
1915
1914
  }, ref) => {
1916
1915
  const resolvedRightHeader = rightHeader ?? /* @__PURE__ */ jsxRuntime.jsx(LoafLiquidityBadge, { className: "text-[0.6rem] orderbook-ll-badge", onClick: onLoafLiquidityClick });
1917
- const [tab, setTabState] = React5__namespace.useState(defaultTab);
1918
- const setTab = setTabState;
1919
- const effectiveTab = showTradesTab ? tab : "orderbook";
1916
+ const [tab, setTab] = React5__namespace.useState(defaultTab);
1920
1917
  const [tradeFilter, setTradeFilter] = React5__namespace.useState("all");
1921
1918
  const viewportCompact = useViewportCompact(COMPACT_BREAKPOINT_PX);
1922
1919
  const { userAskPrices, userBidPrices } = React5__namespace.useMemo(() => {
@@ -2010,8 +2007,7 @@ var Orderbook = React5__namespace.forwardRef(
2010
2007
  const midClass = midChangePercent == null ? "text-white" : midChangePercent >= 0 ? "text-[#0ecb81]" : "text-[#f6465d]";
2011
2008
  const tradeFiltered = trades.filter((t) => tradeFilter === "all" || t.type === tradeFilter);
2012
2009
  const layoutProps = {
2013
- tab: effectiveTab,
2014
- showTradesTab,
2010
+ tab,
2015
2011
  handleTab,
2016
2012
  tradeFilter,
2017
2013
  setTradeFilter,
@@ -2088,7 +2084,6 @@ function SkeletonRow({ compact }) {
2088
2084
  }
2089
2085
  function DesktopOrderbookLayout({
2090
2086
  tab,
2091
- showTradesTab = true,
2092
2087
  handleTab,
2093
2088
  tradeFilter,
2094
2089
  setTradeFilter,
@@ -2138,7 +2133,7 @@ function DesktopOrderbookLayout({
2138
2133
  ]
2139
2134
  }
2140
2135
  ),
2141
- showTradesTab ? /* @__PURE__ */ jsxRuntime.jsxs(
2136
+ /* @__PURE__ */ jsxRuntime.jsxs(
2142
2137
  "button",
2143
2138
  {
2144
2139
  type: "button",
@@ -2152,7 +2147,7 @@ function DesktopOrderbookLayout({
2152
2147
  tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -bottom-px left-0 h-[2px] w-full bg-[#E6C87E]" }) : null
2153
2148
  ]
2154
2149
  }
2155
- ) : null
2150
+ )
2156
2151
  ] }),
2157
2152
  tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-xs", children: [
2158
2153
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2291,7 +2286,6 @@ function DesktopOrderbookLayout({
2291
2286
  }
2292
2287
  function MobileOrderbookLayout({
2293
2288
  tab,
2294
- showTradesTab = true,
2295
2289
  handleTab,
2296
2290
  tradeFilter,
2297
2291
  setTradeFilter,
@@ -2340,7 +2334,7 @@ function MobileOrderbookLayout({
2340
2334
  children: "Orderbook"
2341
2335
  }
2342
2336
  ),
2343
- showTradesTab ? /* @__PURE__ */ jsxRuntime.jsx(
2337
+ /* @__PURE__ */ jsxRuntime.jsx(
2344
2338
  "span",
2345
2339
  {
2346
2340
  onClick: () => handleTab("trades"),
@@ -2354,7 +2348,7 @@ function MobileOrderbookLayout({
2354
2348
  },
2355
2349
  children: "Trades"
2356
2350
  }
2357
- ) : null
2351
+ )
2358
2352
  ] }),
2359
2353
  tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 text-[0.6rem] text-white/70", children: ["all", "buy", "sell"].map((filter) => /* @__PURE__ */ jsxRuntime.jsx(
2360
2354
  "button",
@@ -5042,9 +5036,9 @@ var PulsingDot = styled10__default.default.span`
5042
5036
  `;
5043
5037
  function fmtCompactUsd(n) {
5044
5038
  const abs = Math.abs(n);
5045
- if (abs >= 1e6) return `${(abs / 1e6).toFixed(2)}M`;
5046
- if (abs >= 1e3) return `${(abs / 1e3).toFixed(1)}K`;
5047
- return `${abs.toFixed(2)}`;
5039
+ if (abs >= 1e6) return `$${(abs / 1e6).toFixed(2)}M`;
5040
+ if (abs >= 1e3) return `$${(abs / 1e3).toFixed(1)}K`;
5041
+ return `$${abs.toFixed(2)}`;
5048
5042
  }
5049
5043
  function useIsNarrow(maxWidthPx = 768) {
5050
5044
  const query = `(max-width:${maxWidthPx}px)`;
@@ -5067,6 +5061,8 @@ var DEFAULT_ABOUT_PATH = "/about";
5067
5061
  var DEFAULT_LEARN_PATH = "/learn";
5068
5062
  var DEFAULT_API_PATH = "/api";
5069
5063
  var DEFAULT_PROPERTY_MAP_PATH = "/map";
5064
+ var DEFAULT_LEADERBOARD_PATH = "/league";
5065
+ var DEFAULT_LEADERBOARD_PAGE_PATH = "/leaderboard";
5070
5066
  var DEFAULT_PORTFOLIO_PATH = "/portfolio";
5071
5067
  var DEFAULT_LOAF_LIQUIDITY_PATH = "/loaf-liquidity";
5072
5068
  var DEFAULT_AUTH_RETURN_PARAM = "returnTo";
@@ -5087,6 +5083,8 @@ var Header = ({
5087
5083
  apiPath = DEFAULT_API_PATH,
5088
5084
  offeringsPath,
5089
5085
  propertyMapPath = DEFAULT_PROPERTY_MAP_PATH,
5086
+ leaderboardPath = DEFAULT_LEADERBOARD_PATH,
5087
+ leaderboardPagePath = DEFAULT_LEADERBOARD_PAGE_PATH,
5090
5088
  portfolioPath = DEFAULT_PORTFOLIO_PATH,
5091
5089
  loafLiquidityPath = DEFAULT_LOAF_LIQUIDITY_PATH,
5092
5090
  authLoginUrl,
@@ -5360,6 +5358,8 @@ var Header = ({
5360
5358
  const resolvedOfferingsPath = offeringsPath ?? void 0;
5361
5359
  const offeringsHref = resolvedOfferingsPath ?? resolvedHomePath;
5362
5360
  const resolvedPropertyMapPath = propertyMapPath ?? DEFAULT_PROPERTY_MAP_PATH;
5361
+ const resolvedLeaderboardPath = leaderboardPath ?? DEFAULT_LEADERBOARD_PATH;
5362
+ const resolvedLeaderboardPagePath = leaderboardPagePath ?? DEFAULT_LEADERBOARD_PAGE_PATH;
5363
5363
  const resolvedPortfolioPath = portfolioPath ?? DEFAULT_PORTFOLIO_PATH;
5364
5364
  const resolvedLoafLiquidityPath = loafLiquidityPath ?? DEFAULT_LOAF_LIQUIDITY_PATH;
5365
5365
  const inferredActiveTab = (() => {
@@ -5370,6 +5370,8 @@ var Header = ({
5370
5370
  if (locationPath === resolvedApiPath) return "api";
5371
5371
  if (resolvedOfferingsPath && locationPath.startsWith(resolvedOfferingsPath)) return "offerings";
5372
5372
  if (locationPath === resolvedPropertyMapPath) return "propertyMap";
5373
+ if (locationPath === resolvedLeaderboardPagePath) return "leaderboardPage";
5374
+ if (locationPath === resolvedLeaderboardPath) return "leaderboard";
5373
5375
  if (locationPath === resolvedPortfolioPath) return "portfolio";
5374
5376
  return null;
5375
5377
  })();
@@ -5378,6 +5380,8 @@ var Header = ({
5378
5380
  const homeActive = resolvedActiveTab === "home";
5379
5381
  const offeringsActive = resolvedActiveTab === "offerings";
5380
5382
  const propertyMapActive = resolvedActiveTab === "propertyMap";
5383
+ const leaderboardActive = resolvedActiveTab === "leaderboard";
5384
+ const leaderboardPageActive = resolvedActiveTab === "leaderboardPage";
5381
5385
  const aboutActive = resolvedActiveTab === "about";
5382
5386
  const portfolioActive = resolvedActiveTab === "portfolio";
5383
5387
  const learnActive = resolvedActiveTab === "learn";
@@ -5385,7 +5389,7 @@ var Header = ({
5385
5389
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5386
5390
  /* @__PURE__ */ jsxRuntime.jsx(SafeAreaCover, {}),
5387
5391
  /* @__PURE__ */ jsxRuntime.jsx(Overlay, { $isOpen: isMobileMenuOpen, onClick: () => setIsMobileMenuOpen(false) }),
5388
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { id: "loaf-header", $bgOpacity: headerBgOpacity, $menuOpen: isMobileMenuOpen, children: [
5392
+ /* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { id: "loaf-header", $bgOpacity: headerBgOpacity, children: [
5389
5393
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
5390
5394
  /* @__PURE__ */ jsxRuntime.jsxs(Logo, { children: [
5391
5395
  /* @__PURE__ */ jsxRuntime.jsx(LogoLink, { href: logoHref ?? resolvedHomePath, onClick: handleLogoNavigation, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: Loaf_logo_Banner_default, alt: "LOAF Logo" }) }),
@@ -5461,48 +5465,91 @@ var Header = ({
5461
5465
  /* @__PURE__ */ jsxRuntime.jsx(
5462
5466
  NavLink,
5463
5467
  {
5464
- href: resolvedLearnPath,
5465
- className: learnActive ? "active" : "",
5468
+ href: resolvedLeaderboardPath,
5469
+ className: leaderboardActive ? "active" : "",
5466
5470
  onClick: (event) => {
5467
5471
  event.preventDefault();
5468
- handleNavigation(resolvedLearnPath);
5472
+ handleNavigation(resolvedLeaderboardPath);
5469
5473
  },
5470
- children: "Learn"
5474
+ children: "Competition"
5471
5475
  }
5472
5476
  ),
5473
5477
  /* @__PURE__ */ jsxRuntime.jsx(
5474
5478
  NavLink,
5475
5479
  {
5476
- href: resolvedAboutPath,
5477
- className: aboutActive ? "active" : "",
5480
+ href: resolvedLeaderboardPagePath,
5481
+ className: leaderboardPageActive ? "active" : "",
5478
5482
  onClick: (event) => {
5479
5483
  event.preventDefault();
5480
- handleNavigation(resolvedAboutPath);
5484
+ handleNavigation(resolvedLeaderboardPagePath);
5481
5485
  },
5482
- children: "About"
5486
+ children: "Leaderboard"
5483
5487
  }
5484
5488
  ),
5485
5489
  /* @__PURE__ */ jsxRuntime.jsx(
5486
5490
  NavLink,
5487
5491
  {
5488
- href: resolvedApiPath,
5489
- className: apiActive ? "active" : "",
5492
+ href: resolvedLearnPath,
5493
+ className: learnActive ? "active" : "",
5490
5494
  onClick: (event) => {
5491
5495
  event.preventDefault();
5492
- handleNavigation(resolvedApiPath);
5496
+ handleNavigation(resolvedLearnPath);
5493
5497
  },
5494
- children: "API"
5495
- }
5496
- ),
5497
- /* @__PURE__ */ jsxRuntime.jsx(
5498
- NavLink,
5499
- {
5500
- href: "https://docs.loafmarkets.com/en/",
5501
- target: "_blank",
5502
- rel: "noopener noreferrer",
5503
- children: "Docs"
5498
+ children: "Learn"
5504
5499
  }
5505
5500
  ),
5501
+ /* @__PURE__ */ jsxRuntime.jsxs(MoreMenu, { className: "more-menu", children: [
5502
+ /* @__PURE__ */ jsxRuntime.jsxs(
5503
+ MoreTrigger,
5504
+ {
5505
+ type: "button",
5506
+ className: `${isMoreMenuOpen ? "open" : ""} ${aboutActive || apiActive ? "active" : ""}`,
5507
+ "aria-haspopup": "true",
5508
+ "aria-expanded": isMoreMenuOpen,
5509
+ onClick: () => setIsMoreMenuOpen((open) => !open),
5510
+ children: [
5511
+ "More",
5512
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6", strokeLinecap: "round", strokeLinejoin: "round" }) })
5513
+ ]
5514
+ }
5515
+ ),
5516
+ isMoreMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs(MoreDropdown, { children: [
5517
+ /* @__PURE__ */ jsxRuntime.jsx(
5518
+ MoreItem,
5519
+ {
5520
+ href: resolvedAboutPath,
5521
+ className: aboutActive ? "active" : "",
5522
+ onClick: (event) => {
5523
+ event.preventDefault();
5524
+ handleNavigation(resolvedAboutPath);
5525
+ },
5526
+ children: "About"
5527
+ }
5528
+ ),
5529
+ /* @__PURE__ */ jsxRuntime.jsx(
5530
+ MoreItem,
5531
+ {
5532
+ href: resolvedApiPath,
5533
+ className: apiActive ? "active" : "",
5534
+ onClick: (event) => {
5535
+ event.preventDefault();
5536
+ handleNavigation(resolvedApiPath);
5537
+ },
5538
+ children: "API"
5539
+ }
5540
+ ),
5541
+ /* @__PURE__ */ jsxRuntime.jsx(
5542
+ MoreItem,
5543
+ {
5544
+ href: "https://docs.loafmarkets.com/en/",
5545
+ target: "_blank",
5546
+ rel: "noopener noreferrer",
5547
+ onClick: () => setIsMoreMenuOpen(false),
5548
+ children: "Docs"
5549
+ }
5550
+ )
5551
+ ] })
5552
+ ] }),
5506
5553
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
5507
5554
  "div",
5508
5555
  {
@@ -5543,6 +5590,8 @@ var Header = ({
5543
5590
  ),
5544
5591
  /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(offeringsHref), children: "Initial Offerings" }),
5545
5592
  /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedPropertyMapPath), children: "Property Map" }),
5593
+ /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLeaderboardPath), children: "Competition" }),
5594
+ /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLeaderboardPagePath), children: "Leaderboard" }),
5546
5595
  /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLearnPath), children: "Learn" }),
5547
5596
  /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedAboutPath), children: "About" }),
5548
5597
  /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedApiPath), children: "API" }),
@@ -5816,8 +5865,7 @@ var Overlay = styled10__default.default.div`
5816
5865
  height: 100%;
5817
5866
  background-color: rgba(0, 0, 0, 0.7);
5818
5867
  backdrop-filter: blur(3px);
5819
- /* Above the trade page's sticky/console layers (z 2000) + close modal (10001). */
5820
- z-index: 10070;
5868
+ z-index: 970;
5821
5869
  `;
5822
5870
  var MobileOnlyButton = styled10__default.default.button.attrs({ type: "button" })`
5823
5871
  display: none;
@@ -5865,11 +5913,7 @@ var HeaderContainer = styled10__default.default.header`
5865
5913
  top: 0;
5866
5914
  left: 0;
5867
5915
  right: 0;
5868
- /* Normally 1000. When the mobile menu is open, lift the whole header
5869
- (and the Nav drawer trapped inside its stacking context) above the
5870
- backdrop Overlay (10070) AND the trade page's modal layers (10001) so
5871
- the drawer renders on top instead of being dimmed by the backdrop. */
5872
- z-index: ${({ $menuOpen }) => $menuOpen ? 10075 : 1e3};
5916
+ z-index: 1000;
5873
5917
  width: 100%;
5874
5918
  /* Fallback min-height for browsers that can't evaluate calc+env */
5875
5919
  min-height: 56px;
@@ -5963,8 +6007,7 @@ var Nav = styled10__default.default.nav`
5963
6007
  max-width: 100%;
5964
6008
  height: calc(100dvh - var(--loaf-menu-top, calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)))));
5965
6009
  background: rgb(17, 17, 19);
5966
- /* Above the trade page's sticky/console layers (z 2000) + close modal (10001). */
5967
- z-index: 10080;
6010
+ z-index: 980;
5968
6011
  /* Gentle fade + slide-down instead of an abrupt slide-in. */
5969
6012
  opacity: ${(props) => props.$isOpen ? "1" : "0"};
5970
6013
  transform: ${(props) => props.$isOpen ? "translateY(0)" : "translateY(-14px)"};
@@ -5982,12 +6025,9 @@ var Nav = styled10__default.default.nav`
5982
6025
  display: flex;
5983
6026
  flex-direction: column;
5984
6027
  align-items: center;
5985
- /* safe-center keeps centering when the menu fits, but top-aligns (honouring the
5986
- 2.5rem top padding) when the logged-in menu overflows — otherwise flex
5987
- centering pushes the first item + padding above the scroll area and clips it. */
5988
- justify-content: safe center;
6028
+ justify-content: center;
5989
6029
  min-height: 100%;
5990
- padding: 2.5rem 1.5rem 2.5rem;
6030
+ padding: 2rem 1.5rem 2.5rem;
5991
6031
  gap: 0.4rem;
5992
6032
  }
5993
6033
  }
@@ -6060,6 +6100,77 @@ var NavLink = styled10__default.default.a`
6060
6100
  }
6061
6101
  }
6062
6102
  `;
6103
+ var MoreMenu = styled10__default.default.div`
6104
+ position: relative;
6105
+ display: flex;
6106
+ align-items: center;
6107
+ height: 56px;
6108
+ `;
6109
+ var MoreTrigger = styled10__default.default.button`
6110
+ margin: 0 12px;
6111
+ padding: 0 4px;
6112
+ height: 56px;
6113
+ display: inline-flex;
6114
+ align-items: center;
6115
+ gap: 4px;
6116
+ background: none;
6117
+ border: none;
6118
+ cursor: pointer;
6119
+ color: #eaecef;
6120
+ font-weight: 500;
6121
+ font-size: 14px;
6122
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
6123
+ letter-spacing: 0.2px;
6124
+ transition: color 0.2s ease;
6125
+
6126
+ &:hover,
6127
+ &.active {
6128
+ color: #E6C87E;
6129
+ }
6130
+
6131
+ svg {
6132
+ width: 14px;
6133
+ height: 14px;
6134
+ transition: transform 0.2s ease;
6135
+ }
6136
+ &.open svg {
6137
+ transform: rotate(180deg);
6138
+ }
6139
+ `;
6140
+ var MoreDropdown = styled10__default.default.div`
6141
+ position: absolute;
6142
+ top: 100%;
6143
+ right: 0;
6144
+ min-width: 160px;
6145
+ padding: 6px;
6146
+ background: #1e2026;
6147
+ border: 1px solid #2b3139;
6148
+ border-radius: 10px;
6149
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
6150
+ display: flex;
6151
+ flex-direction: column;
6152
+ z-index: 1100;
6153
+ `;
6154
+ var MoreItem = styled10__default.default.a`
6155
+ padding: 10px 12px;
6156
+ border-radius: 6px;
6157
+ color: #eaecef;
6158
+ font-weight: 500;
6159
+ font-size: 14px;
6160
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
6161
+ letter-spacing: 0.2px;
6162
+ text-decoration: none;
6163
+ cursor: pointer;
6164
+ transition: background 0.15s ease, color 0.15s ease;
6165
+
6166
+ &:hover {
6167
+ background: #2b3139;
6168
+ color: #E6C87E;
6169
+ }
6170
+ &.active {
6171
+ color: #E6C87E;
6172
+ }
6173
+ `;
6063
6174
  var Button2 = styled10__default.default.button.attrs({ type: "button" })`
6064
6175
  padding: 0.5rem 1rem;
6065
6176
  border-radius: 6px;
@@ -6626,17 +6737,6 @@ PropertySubheader.displayName = "PropertySubheader";
6626
6737
  var DEFAULT_LOGO_SRC = Loaf_logo_Banner_default;
6627
6738
  var DEFAULT_LOGO_ALT = "Loaf";
6628
6739
  var OTP_INPUT_LENGTH = 6;
6629
- var CODE_PREFIX = "LOAF-";
6630
- var CODE_SUFFIX_LEN = 5;
6631
- var normalizeAccessCode = (raw) => CODE_PREFIX + raw.toUpperCase().replace(/^LOAF-?/, "").replace(/[^A-Z0-9]/g, "").slice(0, CODE_SUFFIX_LEN);
6632
- var friendlyError = (err, fallback) => {
6633
- const data = err?.response?.data;
6634
- if (typeof data?.error === "string" && data.error.trim()) return data.error;
6635
- if (typeof data?.message === "string" && data.message.trim()) return data.message;
6636
- const msg = err instanceof Error ? err.message : "";
6637
- if (msg && !/request failed with status code/i.test(msg) && !/network error/i.test(msg)) return msg;
6638
- return fallback;
6639
- };
6640
6740
  var LoginPopup = ({
6641
6741
  onClose,
6642
6742
  onOpenEarlyAccess,
@@ -6655,13 +6755,10 @@ var LoginPopup = ({
6655
6755
  renderKycWidget,
6656
6756
  onFundWallet,
6657
6757
  initialView,
6658
- initialCode,
6659
6758
  kycStatus: kycStatusProp,
6660
6759
  walletAddress,
6661
6760
  onSubmitReferralCode,
6662
- onValidateCode,
6663
- onCheckAccess,
6664
- gate
6761
+ onJoinWaitlist
6665
6762
  }) => {
6666
6763
  const [view, setView] = React5.useState(() => initialView ?? "main");
6667
6764
  const [email, setEmail] = React5.useState("");
@@ -6669,17 +6766,19 @@ var LoginPopup = ({
6669
6766
  const [otp, setOtp] = React5.useState(Array(OTP_INPUT_LENGTH).fill(""));
6670
6767
  const [error, setError] = React5.useState("");
6671
6768
  const [copied, setCopied] = React5.useState(false);
6672
- const [referralCode, setReferralCode] = React5.useState(
6673
- () => gate && initialCode ? normalizeAccessCode(initialCode) : ""
6674
- );
6769
+ const [referralCode, setReferralCode] = React5.useState("");
6675
6770
  const [referralLoading, setReferralLoading] = React5.useState(false);
6676
6771
  const [referralError, setReferralError] = React5.useState("");
6677
- const [codeStatus, setCodeStatus] = React5.useState("idle");
6678
- const [signInRevealed, setSignInRevealed] = React5.useState(false);
6679
- const [otpStatus, setOtpStatus] = React5.useState("idle");
6680
- const [signInMode, setSignInMode] = React5.useState(false);
6772
+ const [waitlistLoading, setWaitlistLoading] = React5.useState(false);
6773
+ const [waitlistMessage, setWaitlistMessage] = React5.useState("");
6681
6774
  const [loading, setLoading] = React5.useState(false);
6682
6775
  const [isSignUp, setIsSignUp] = React5.useState(false);
6776
+ const [loginTitle] = React5.useState(() => {
6777
+ if (typeof window === "undefined") return null;
6778
+ const t = window.__LOAF_LOGIN_TITLE__ ?? null;
6779
+ if (t) delete window.__LOAF_LOGIN_TITLE__;
6780
+ return t;
6781
+ });
6683
6782
  const [fundingAmount] = React5.useState("");
6684
6783
  const [kycLoading, setKycLoading] = React5.useState(false);
6685
6784
  const [showKycWidget, setShowKycWidget] = React5.useState(false);
@@ -6689,64 +6788,6 @@ var LoginPopup = ({
6689
6788
  const [fundingError, setFundingError] = React5.useState("");
6690
6789
  const [transakWidgetUrl, setTransakWidgetUrl] = React5.useState(null);
6691
6790
  const suppressAutoCloseRef = React5__namespace.default.useRef(false);
6692
- const validatedCodeRef = React5__namespace.default.useRef(null);
6693
- const finishGate = React5__namespace.default.useCallback(async () => {
6694
- if (!gate) return true;
6695
- const code = validatedCodeRef.current;
6696
- if (code) {
6697
- try {
6698
- await onSubmitReferralCode?.(code);
6699
- window.dispatchEvent(new CustomEvent("loaf:onboarding-start"));
6700
- return true;
6701
- } catch {
6702
- }
6703
- }
6704
- const hasAccess = onCheckAccess ? await onCheckAccess() : true;
6705
- if (hasAccess) return true;
6706
- suppressAutoCloseRef.current = true;
6707
- validatedCodeRef.current = null;
6708
- setOtp(Array(OTP_INPUT_LENGTH).fill(""));
6709
- setOtpStatus("idle");
6710
- setSignInMode(false);
6711
- setSignInRevealed(false);
6712
- setCodeStatus(code ? "invalid" : "idle");
6713
- setView("referral");
6714
- setError(
6715
- code ? "That code can't be redeemed anymore. Enter a different access code." : "Enter your access code to continue."
6716
- );
6717
- return false;
6718
- }, [gate, onSubmitReferralCode, onCheckAccess]);
6719
- const runCodeValidation = React5__namespace.default.useCallback(async (fullCode) => {
6720
- setCodeStatus("checking");
6721
- setError("");
6722
- try {
6723
- const ok = onValidateCode ? await onValidateCode(fullCode) : true;
6724
- if (!ok) {
6725
- validatedCodeRef.current = null;
6726
- setCodeStatus("invalid");
6727
- return;
6728
- }
6729
- validatedCodeRef.current = fullCode;
6730
- setCodeStatus("valid");
6731
- if (isAuthenticated) {
6732
- if (await finishGate()) setTimeout(() => onClose(), 500);
6733
- return;
6734
- }
6735
- setIsSignUp(true);
6736
- setSignInRevealed(true);
6737
- } catch {
6738
- validatedCodeRef.current = null;
6739
- setCodeStatus("invalid");
6740
- }
6741
- }, [onValidateCode, isAuthenticated, finishGate, onClose]);
6742
- const autoCodeTriedRef = React5__namespace.default.useRef(false);
6743
- React5.useEffect(() => {
6744
- if (autoCodeTriedRef.current || !gate || !initialCode) return;
6745
- const full = normalizeAccessCode(initialCode);
6746
- if (full.length !== CODE_PREFIX.length + CODE_SUFFIX_LEN) return;
6747
- autoCodeTriedRef.current = true;
6748
- void runCodeValidation(full);
6749
- }, [gate, initialCode, runCodeValidation]);
6750
6791
  React5.useEffect(() => {
6751
6792
  if (typeof initialView === "string") {
6752
6793
  setView(initialView);
@@ -6801,11 +6842,11 @@ var LoginPopup = ({
6801
6842
  }, [autoCloseOnAuth, currentUser, isAuthenticated, onClose, view]);
6802
6843
  React5.useEffect(() => {
6803
6844
  const handleEsc = (e) => {
6804
- if (e.key === "Escape" && !gate) onClose();
6845
+ if (e.key === "Escape") onClose();
6805
6846
  };
6806
6847
  window.addEventListener("keydown", handleEsc);
6807
6848
  return () => window.removeEventListener("keydown", handleEsc);
6808
- }, [onClose, gate]);
6849
+ }, [onClose]);
6809
6850
  const handleWalletLogin = async () => {
6810
6851
  if (onWalletLogin) {
6811
6852
  suppressAutoCloseRef.current = true;
@@ -6817,16 +6858,12 @@ var LoginPopup = ({
6817
6858
  setView("wallet-handle");
6818
6859
  return;
6819
6860
  }
6820
- if (await finishGate()) {
6821
- suppressAutoCloseRef.current = false;
6822
- onClose();
6823
- }
6861
+ suppressAutoCloseRef.current = false;
6862
+ onClose();
6824
6863
  return;
6825
6864
  } catch (err) {
6826
6865
  console.error("[LoginTrace][Popup] Wallet login failed", err);
6827
6866
  suppressAutoCloseRef.current = false;
6828
- setError(friendlyError(err, "Wallet login failed. Please try again."));
6829
- return;
6830
6867
  }
6831
6868
  }
6832
6869
  onClose();
@@ -6848,13 +6885,6 @@ var LoginPopup = ({
6848
6885
  setError("");
6849
6886
  try {
6850
6887
  await onWalletSignup(handle.trim());
6851
- if (gate) {
6852
- if (await finishGate()) {
6853
- suppressAutoCloseRef.current = false;
6854
- onClose();
6855
- }
6856
- return;
6857
- }
6858
6888
  if (onSubmitReferralCode) {
6859
6889
  setView("referral");
6860
6890
  } else {
@@ -6866,11 +6896,6 @@ var LoginPopup = ({
6866
6896
  setLoading(false);
6867
6897
  }
6868
6898
  };
6869
- const handleEmailClick = (signUp = false) => {
6870
- setIsSignUp(signUp);
6871
- setView("email");
6872
- setError("");
6873
- };
6874
6899
  const handleSendCode = async (event) => {
6875
6900
  event?.preventDefault();
6876
6901
  if (!email || !email.includes("@")) {
@@ -6883,7 +6908,6 @@ var LoginPopup = ({
6883
6908
  }
6884
6909
  setLoading(true);
6885
6910
  setError("");
6886
- setOtpStatus("idle");
6887
6911
  const normalizedHandle = isSignUp && handle.trim() ? handle.trim() : void 0;
6888
6912
  try {
6889
6913
  const demoResult = await onDemoLogin?.(email, normalizedHandle ?? null);
@@ -6904,15 +6928,11 @@ var LoginPopup = ({
6904
6928
  setView("otp");
6905
6929
  setOtp(Array(OTP_INPUT_LENGTH).fill(""));
6906
6930
  } catch (err) {
6907
- const message = friendlyError(err, "We couldn't send a code to that email. Please double-check it and try again.");
6931
+ const message = err instanceof Error ? err.message : "Failed to send verification code";
6908
6932
  console.error("[LoginTrace][Popup] onSendEmailCode threw", err);
6909
6933
  if (!isSignUp && message.includes("No account found")) {
6910
- if (signInMode) {
6911
- setError("No account found for this email. Go back and enter your access code to create one.");
6912
- setLoading(false);
6913
- return;
6914
- }
6915
6934
  setIsSignUp(true);
6935
+ setView("email");
6916
6936
  setError("");
6917
6937
  setLoading(false);
6918
6938
  return;
@@ -6924,7 +6944,7 @@ var LoginPopup = ({
6924
6944
  setView("otp");
6925
6945
  setOtp(Array(OTP_INPUT_LENGTH).fill(""));
6926
6946
  } catch (retryErr) {
6927
- setError(friendlyError(retryErr, "We couldn't send a code to that email. Please try again."));
6947
+ setError(retryErr instanceof Error ? retryErr.message : "Failed to send verification code");
6928
6948
  }
6929
6949
  setLoading(false);
6930
6950
  return;
@@ -7018,30 +7038,6 @@ var LoginPopup = ({
7018
7038
  setLoading(false);
7019
7039
  }
7020
7040
  };
7021
- const runGateOtpVerify = React5__namespace.default.useCallback(async (code) => {
7022
- if (!onVerifyEmailCode) return;
7023
- setOtpStatus("checking");
7024
- setError("");
7025
- suppressAutoCloseRef.current = true;
7026
- try {
7027
- await onVerifyEmailCode({ code, email });
7028
- if (await finishGate()) {
7029
- setOtpStatus("valid");
7030
- setTimeout(() => onClose(), 750);
7031
- }
7032
- } catch {
7033
- suppressAutoCloseRef.current = false;
7034
- setOtpStatus("invalid");
7035
- }
7036
- }, [onVerifyEmailCode, email, finishGate, onClose]);
7037
- React5.useEffect(() => {
7038
- if (!gate || view !== "otp") return;
7039
- if (otp.join("").length < OTP_INPUT_LENGTH) {
7040
- if (otpStatus === "invalid") setOtpStatus("idle");
7041
- return;
7042
- }
7043
- if (otpStatus === "idle") void runGateOtpVerify(otp.join(""));
7044
- }, [gate, view, otp, otpStatus, runGateOtpVerify]);
7045
7041
  const handleKycWidgetResult = (result) => {
7046
7042
  setShowKycWidget(false);
7047
7043
  if (result.passed) {
@@ -7138,36 +7134,35 @@ var LoginPopup = ({
7138
7134
  setError("");
7139
7135
  };
7140
7136
  if (view === "main") {
7141
- return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7137
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7142
7138
  /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7143
- /* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
7144
- /* @__PURE__ */ jsxRuntime.jsxs(LogoContainer3, { children: [
7145
- /* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }),
7146
- /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
7147
- ] }),
7148
- /* @__PURE__ */ jsxRuntime.jsx(TitleText, { children: "Welcome to Loaf" })
7149
- ] }),
7150
- /* @__PURE__ */ jsxRuntime.jsx(Subtitle, { children: "Sign in to claim 100k in test USD." }),
7151
- /* @__PURE__ */ jsxRuntime.jsxs(ButtonsContainer, { children: [
7152
- /* @__PURE__ */ jsxRuntime.jsxs(LoginButton, { onClick: () => handleEmailClick(false), children: [
7153
- /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" }) }),
7154
- "Sign in with Email"
7139
+ /* @__PURE__ */ jsxRuntime.jsx(MainHeading, { children: loginTitle?.title ?? "Welcome to Loaf" }),
7140
+ (loginTitle ? loginTitle.subtitle : "Sign in to claim 100k in test USD.") && /* @__PURE__ */ jsxRuntime.jsx(MainSubtitle, { children: loginTitle ? loginTitle.subtitle : "Sign in to claim 100k in test USD." }),
7141
+ /* @__PURE__ */ jsxRuntime.jsxs(GateForm, { onSubmit: handleSendCode, children: [
7142
+ /* @__PURE__ */ jsxRuntime.jsxs(GateInputRow, { children: [
7143
+ /* @__PURE__ */ jsxRuntime.jsx(
7144
+ GateInput,
7145
+ {
7146
+ type: "email",
7147
+ placeholder: "Enter your email",
7148
+ value: email,
7149
+ onChange: (event) => setEmail(event.target.value),
7150
+ autoFocus: true
7151
+ }
7152
+ ),
7153
+ /* @__PURE__ */ jsxRuntime.jsx(GateSubmit, { type: "submit", disabled: loading || !email, "aria-label": "Continue with email", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) }) })
7155
7154
  ] }),
7156
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { textAlign: "center", color: "var(--color-text-secondary, #848e9c)", fontSize: "0.875rem" }, children: "or" }),
7157
- /* @__PURE__ */ jsxRuntime.jsxs(LoginButton, { onClick: handleWalletLogin, children: [
7158
- /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
7159
- "Sign in with Wallet"
7160
- ] })
7155
+ error && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error })
7161
7156
  ] }),
7162
- /* @__PURE__ */ jsxRuntime.jsxs(SignUpPrompt, { children: [
7163
- "New to Loaf?",
7164
- " ",
7165
- /* @__PURE__ */ jsxRuntime.jsx(SignUpLink, { type: "button", onClick: () => handleEmailClick(true), children: "Sign up" })
7157
+ /* @__PURE__ */ jsxRuntime.jsx(GateOr, { children: "or" }),
7158
+ /* @__PURE__ */ jsxRuntime.jsxs(LoginButton, { onClick: handleWalletLogin, children: [
7159
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
7160
+ "Join with wallet"
7166
7161
  ] })
7167
7162
  ] }) });
7168
7163
  }
7169
7164
  if (view === "email") {
7170
- return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7165
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7171
7166
  /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7172
7167
  /* @__PURE__ */ jsxRuntime.jsxs(BackButton, { onClick: handleBack, children: [
7173
7168
  /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
@@ -7206,7 +7201,7 @@ var LoginPopup = ({
7206
7201
  ] }) });
7207
7202
  }
7208
7203
  if (view === "wallet-handle") {
7209
- return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7204
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7210
7205
  !loading && /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7211
7206
  /* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
7212
7207
  /* @__PURE__ */ jsxRuntime.jsx(LogoContainer3, { children: /* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
@@ -7231,71 +7226,7 @@ var LoginPopup = ({
7231
7226
  ] }) });
7232
7227
  }
7233
7228
  if (view === "otp") {
7234
- if (gate) {
7235
- return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { children: [
7236
- /* @__PURE__ */ jsxRuntime.jsx(GateTint, { $reveal: otpStatus === "valid" ? 3 : 2 }),
7237
- /* @__PURE__ */ jsxRuntime.jsxs(GateForm, { children: [
7238
- /* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
7239
- /* @__PURE__ */ jsxRuntime.jsx(GateLogoLink, { href: "https://loafmarkets.com", "aria-label": "Go to loafmarkets.com", children: /* @__PURE__ */ jsxRuntime.jsx(GateLogo, { src: logoSrc, alt: logoAlt }) }),
7240
- /* @__PURE__ */ jsxRuntime.jsx(GateBrandDivider, {}),
7241
- /* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Private Beta" })
7242
- ] }),
7243
- /* @__PURE__ */ jsxRuntime.jsxs(GateOtpText, { children: [
7244
- "We sent a code to",
7245
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
7246
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: email })
7247
- ] }),
7248
- /* @__PURE__ */ jsxRuntime.jsx(OTPContainer, { children: otp.map((digit, index) => /* @__PURE__ */ jsxRuntime.jsx(
7249
- OTPInput,
7250
- {
7251
- id: `otp-${index}`,
7252
- type: "text",
7253
- inputMode: "numeric",
7254
- maxLength: 1,
7255
- $status: otpStatus,
7256
- readOnly: otpStatus === "valid" || otpStatus === "checking",
7257
- value: digit,
7258
- onChange: (event) => handleOTPChange(index, event.target.value),
7259
- onKeyDown: (event) => handleOTPKeyDown(index, event),
7260
- onInput: (event) => handleOTPInput(index, event),
7261
- onPaste: handleOTPPaste,
7262
- autoComplete: index === 0 ? "one-time-code" : "off",
7263
- autoFocus: index === 0
7264
- },
7265
- index
7266
- )) }),
7267
- otpStatus === "invalid" && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: "That code isn't right. Try again." }),
7268
- /* @__PURE__ */ jsxRuntime.jsxs(GateResendText, { children: [
7269
- /* @__PURE__ */ jsxRuntime.jsx(
7270
- "button",
7271
- {
7272
- type: "button",
7273
- onClick: (event) => {
7274
- event.preventDefault();
7275
- void handleSendCode(event);
7276
- },
7277
- children: "Resend code"
7278
- }
7279
- ),
7280
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: " \xB7 " }),
7281
- /* @__PURE__ */ jsxRuntime.jsx(
7282
- "button",
7283
- {
7284
- type: "button",
7285
- onClick: () => {
7286
- setOtp(Array(OTP_INPUT_LENGTH).fill(""));
7287
- setOtpStatus("idle");
7288
- setError("");
7289
- setView("referral");
7290
- },
7291
- children: "Back"
7292
- }
7293
- )
7294
- ] })
7295
- ] })
7296
- ] });
7297
- }
7298
- return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7229
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7299
7230
  !loading && /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7300
7231
  loading ? /* @__PURE__ */ jsxRuntime.jsxs(AccountCreationLoader, { children: [
7301
7232
  /* @__PURE__ */ jsxRuntime.jsx(SpinnerRing, {}),
@@ -7384,8 +7315,8 @@ var LoginPopup = ({
7384
7315
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
7385
7316
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
7386
7317
  ] }) }),
7387
- /* @__PURE__ */ jsxRuntime.jsx(KycHeading, { children: "Verify Wholesale Status" }),
7388
- /* @__PURE__ */ jsxRuntime.jsx(KycSubline, { children: "Initial offerings are only available to accredited or wholesale investors" }),
7318
+ /* @__PURE__ */ jsxRuntime.jsx(KycHeading, { children: "Verify Your Identity" }),
7319
+ /* @__PURE__ */ jsxRuntime.jsx(KycSubline, { children: "Initial offerings are only available to verified investors" }),
7389
7320
  /* @__PURE__ */ jsxRuntime.jsx(KycStartButton, { type: "button", onClick: handleKycStart, disabled: kycLoading, children: kycLoading ? "Verifying\u2026" : kycStatusProp === "PENDING" || kycStatusProp === "ON_HOLD" ? "Resume Verification" : "Start Verification" }),
7390
7321
  /* @__PURE__ */ jsxRuntime.jsx(KycDuration, { children: "Takes about 2 minutes" }),
7391
7322
  /* @__PURE__ */ jsxRuntime.jsx(KycDivider, {}),
@@ -7471,7 +7402,7 @@ var LoginPopup = ({
7471
7402
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Deposit USDC from an exchange or wallet" })
7472
7403
  ] })
7473
7404
  ] }),
7474
- /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled: true, children: [
7405
+ /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled: fiatFundingLoading, children: [
7475
7406
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
7476
7407
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "22", x2: "21", y2: "22" }),
7477
7408
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "18", x2: "6", y2: "11" }),
@@ -7481,10 +7412,7 @@ var LoginPopup = ({
7481
7412
  /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "12 2 20 7 4 7" })
7482
7413
  ] }),
7483
7414
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
7484
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "0.25rem" }, children: [
7485
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem" }, children: fiatFundingLoading ? "Loading widget\u2026" : "Bank Deposit" }),
7486
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.6rem", fontWeight: 700, color: "#E6C87E", background: "rgba(230,198,86,0.12)", padding: "0.12rem 0.4rem", borderRadius: "4px", textTransform: "uppercase", letterSpacing: "0.04em", whiteSpace: "nowrap" }, children: "Coming Soon" })
7487
- ] }),
7415
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: fiatFundingLoading ? "Loading widget\u2026" : "Bank Deposit" }),
7488
7416
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Deposit to your account via card or bank transfer" })
7489
7417
  ] })
7490
7418
  ] })
@@ -7515,162 +7443,84 @@ var LoginPopup = ({
7515
7443
  setReferralLoading(false);
7516
7444
  }
7517
7445
  };
7518
- const codeSuffix = referralCode.startsWith(CODE_PREFIX) ? referralCode.slice(CODE_PREFIX.length) : referralCode.replace(/^LOAF-?/i, "");
7519
- const setCodeSuffix = (suffix) => {
7520
- setReferralCode(CODE_PREFIX + suffix);
7446
+ const handleJoinWaitlistSkip = async () => {
7447
+ if (!onJoinWaitlist || !email) {
7448
+ onClose();
7449
+ return;
7450
+ }
7521
7451
  setReferralError("");
7522
- setError("");
7523
- if (gate) {
7524
- if (suffix.length === 5) void runCodeValidation(CODE_PREFIX + suffix);
7525
- else {
7526
- validatedCodeRef.current = null;
7527
- setCodeStatus("idle");
7528
- }
7452
+ setWaitlistLoading(true);
7453
+ try {
7454
+ const message = await onJoinWaitlist(email);
7455
+ setWaitlistMessage(message || "You're on the waitlist.");
7456
+ setTimeout(() => onClose(), 1400);
7457
+ } catch (err) {
7458
+ setReferralError(err instanceof Error ? err.message : "Couldn't join the waitlist. Please try again.");
7459
+ setWaitlistLoading(false);
7529
7460
  }
7530
7461
  };
7531
- const handleCodeChange = (e) => {
7532
- setCodeSuffix(e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 5));
7533
- };
7534
- const handleCodePaste = (e) => {
7535
- e.preventDefault();
7536
- const text = (e.clipboardData.getData("text") || "").toUpperCase();
7537
- setCodeSuffix(text.replace(/^LOAF-?/, "").replace(/[^A-Z0-9]/g, "").slice(0, 5));
7538
- };
7539
- const codeComplete = codeSuffix.length === 5;
7540
- const codeInput = /* @__PURE__ */ jsxRuntime.jsx(
7541
- CodeSuffixInput,
7542
- {
7543
- type: "text",
7544
- inputMode: "text",
7545
- autoComplete: "off",
7546
- autoCapitalize: "characters",
7547
- spellCheck: false,
7548
- maxLength: 5,
7549
- "aria-label": "Access code",
7550
- readOnly: codeStatus === "valid",
7551
- value: codeSuffix,
7552
- onChange: handleCodeChange,
7553
- onPaste: handleCodePaste,
7554
- onKeyDown: (e) => {
7555
- if (e.key !== "Enter" || !codeComplete) return;
7556
- if (gate) void runCodeValidation(referralCode);
7557
- else void handleReferralSubmit();
7558
- },
7559
- autoFocus: true
7560
- }
7561
- );
7562
- const signInStep = /* @__PURE__ */ jsxRuntime.jsxs(GateReveal, { children: [
7563
- /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSendCode, style: { width: "100%" }, children: [
7564
- /* @__PURE__ */ jsxRuntime.jsxs(CodeInputWrapper, { children: [
7462
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7463
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7464
+ /* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { children: [
7465
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
7466
+ width: 52,
7467
+ height: 52,
7468
+ borderRadius: 14,
7469
+ background: "linear-gradient(135deg, rgba(230,200,126,0.15) 0%, rgba(230,200,126,0.08) 100%)",
7470
+ border: "1px solid rgba(230,200,126,0.25)",
7471
+ display: "flex",
7472
+ alignItems: "center",
7473
+ justifyContent: "center",
7474
+ marginBottom: "1.1rem"
7475
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#e6c87e", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
7476
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
7477
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9", cy: "7", r: "4" }),
7478
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
7479
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
7480
+ ] }) }),
7481
+ /* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { children: "Enter code to access Private Beta trading" }),
7482
+ /* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { marginBottom: "1.5rem" }, children: "Enter code to trade 100k in USDC, or skip to continue." }),
7483
+ /* @__PURE__ */ jsxRuntime.jsxs(EmailFormContainer, { style: { width: "100%", marginBottom: 0 }, children: [
7565
7484
  /* @__PURE__ */ jsxRuntime.jsx(
7566
- GateEmailInput,
7485
+ EmailInput,
7567
7486
  {
7568
- type: "email",
7569
- inputMode: "email",
7570
- autoComplete: "email",
7571
- placeholder: "Enter your email",
7572
- value: email,
7573
- onChange: (event) => setEmail(event.target.value),
7487
+ type: "text",
7488
+ placeholder: "e.g. LOAF-XXXX",
7489
+ value: referralCode,
7490
+ onChange: (e) => {
7491
+ setReferralCode(e.target.value.toUpperCase());
7492
+ setReferralError("");
7493
+ },
7494
+ onKeyDown: (e) => {
7495
+ if (e.key === "Enter") void handleReferralSubmit();
7496
+ },
7574
7497
  autoFocus: true
7575
7498
  }
7576
7499
  ),
7577
- /* @__PURE__ */ jsxRuntime.jsx(GateSubmit, { type: "submit", "aria-label": "Continue", disabled: loading || !email, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(GateSpinner, {}) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) }) })
7578
- ] }),
7579
- error && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error })
7580
- ] }),
7581
- /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7582
- /* @__PURE__ */ jsxRuntime.jsx(GateOr, { children: "or" }),
7583
- /* @__PURE__ */ jsxRuntime.jsxs(GateWalletButton, { type: "button", onClick: handleWalletLogin, children: [
7584
- /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
7585
- signInMode ? "Sign in with Wallet" : "Connect Wallet"
7586
- ] })
7587
- ] })
7588
- ] });
7589
- if (gate) {
7590
- const codeAccepted = codeStatus === "valid";
7591
- const showSignIn = signInMode || signInRevealed;
7592
- return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { children: [
7593
- /* @__PURE__ */ jsxRuntime.jsx(GateTint, { $reveal: showSignIn ? 1 : 0 }),
7594
- /* @__PURE__ */ jsxRuntime.jsxs(GateForm, { children: [
7595
- /* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
7596
- /* @__PURE__ */ jsxRuntime.jsx(GateLogoLink, { href: "https://loafmarkets.com", "aria-label": "Go to loafmarkets.com", children: /* @__PURE__ */ jsxRuntime.jsx(GateLogo, { src: logoSrc, alt: logoAlt }) }),
7597
- /* @__PURE__ */ jsxRuntime.jsx(GateBrandDivider, {}),
7598
- /* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Private Beta" })
7599
- ] }),
7600
- signInMode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7601
- signInStep,
7602
- /* @__PURE__ */ jsxRuntime.jsx(GateResendText, { children: /* @__PURE__ */ jsxRuntime.jsx(
7603
- "button",
7604
- {
7605
- type: "button",
7606
- onClick: () => {
7607
- setError("");
7608
- setSignInMode(false);
7609
- },
7610
- children: "\u2190 Enter access code instead"
7611
- }
7612
- ) })
7613
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7614
- /* @__PURE__ */ jsxRuntime.jsxs(CodeInputWrapper, { $status: codeStatus, children: [
7615
- /* @__PURE__ */ jsxRuntime.jsx(CodePrefix, { children: CODE_PREFIX }),
7616
- codeInput,
7617
- /* @__PURE__ */ jsxRuntime.jsx(
7618
- GateSubmit,
7619
- {
7620
- type: "button",
7621
- "aria-label": "Submit access code",
7622
- $status: codeStatus,
7623
- disabled: codeStatus === "checking" || !codeComplete,
7624
- onClick: () => void runCodeValidation(referralCode),
7625
- children: codeAccepted ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6L9 17l-5-5" }) }) : codeStatus === "checking" ? /* @__PURE__ */ jsxRuntime.jsx(GateSpinner, {}) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) })
7626
- }
7627
- )
7628
- ] }),
7629
- (codeStatus === "invalid" || error && !signInRevealed) && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error || "That code isn't valid. Double-check and try again." }),
7630
- signInRevealed ? signInStep : /* @__PURE__ */ jsxRuntime.jsxs(GateResendText, { children: [
7631
- "Already have an account?",
7632
- " ",
7633
- /* @__PURE__ */ jsxRuntime.jsx(
7634
- "button",
7635
- {
7636
- type: "button",
7637
- onClick: () => {
7638
- setError("");
7639
- setIsSignUp(false);
7640
- setSignInMode(true);
7641
- },
7642
- children: "Sign in"
7643
- }
7644
- )
7645
- ] })
7646
- ] })
7647
- ] })
7648
- ] });
7649
- }
7650
- return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7651
- /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7652
- /* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
7653
- /* @__PURE__ */ jsxRuntime.jsxs(LogoContainer3, { children: [
7654
- /* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }),
7655
- /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
7656
- ] }),
7657
- /* @__PURE__ */ jsxRuntime.jsx(TitleText, { children: "Enter your access code" })
7658
- ] }),
7659
- /* @__PURE__ */ jsxRuntime.jsxs(EmailFormContainer, { style: { width: "100%", marginTop: "1.5rem", marginBottom: 0 }, children: [
7660
- /* @__PURE__ */ jsxRuntime.jsxs(CodeInputWrapper, { children: [
7661
- /* @__PURE__ */ jsxRuntime.jsx(CodePrefix, { children: CODE_PREFIX }),
7662
- codeInput
7500
+ /* @__PURE__ */ jsxRuntime.jsx(
7501
+ SubmitButton,
7502
+ {
7503
+ type: "button",
7504
+ onClick: () => void handleReferralSubmit(),
7505
+ disabled: referralLoading || !referralCode.trim(),
7506
+ children: referralLoading ? "Verifying\u2026" : "Apply Code"
7507
+ }
7508
+ ),
7509
+ referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
7663
7510
  ] }),
7664
- /* @__PURE__ */ jsxRuntime.jsx(
7665
- SubmitButton,
7511
+ waitlistMessage ? /* @__PURE__ */ jsxRuntime.jsxs(StatusMessage, { style: { marginTop: "0.75rem" }, children: [
7512
+ "\u2713 ",
7513
+ waitlistMessage
7514
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
7515
+ OnboardingSkipButton,
7666
7516
  {
7667
7517
  type: "button",
7668
- onClick: () => void handleReferralSubmit(),
7669
- disabled: referralLoading || !codeComplete,
7670
- children: referralLoading ? "Verifying\u2026" : "Continue"
7518
+ onClick: () => void handleJoinWaitlistSkip(),
7519
+ disabled: waitlistLoading,
7520
+ style: { marginTop: "0.75rem" },
7521
+ children: waitlistLoading ? "Joining\u2026" : email ? "Skip for now & join Waitlist" : "Skip for now"
7671
7522
  }
7672
- ),
7673
- referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
7523
+ )
7674
7524
  ] })
7675
7525
  ] }) });
7676
7526
  }
@@ -7790,9 +7640,8 @@ var Overlay2 = styled10__default.default.div`
7790
7640
  left: 0;
7791
7641
  right: 0;
7792
7642
  bottom: 0;
7793
- background-color: ${(props) => props.$gate ? "var(--color-background, #0a0a0a)" : props.$transparent ? "rgba(0, 0, 0, 0.45)" : "rgba(0, 0, 0, 0.8)"};
7794
- backdrop-filter: ${(props) => props.$gate ? "none" : props.$transparent ? "blur(2px)" : "blur(4px)"};
7795
- transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
7643
+ background-color: rgba(0, 0, 0, 0.8);
7644
+ backdrop-filter: blur(4px);
7796
7645
  display: flex;
7797
7646
  justify-content: center;
7798
7647
  align-items: center;
@@ -7809,15 +7658,15 @@ var Overlay2 = styled10__default.default.div`
7809
7658
  }
7810
7659
  `;
7811
7660
  var PopupContainer = styled10__default.default.div`
7812
- background-color: ${(props) => props.$gate ? "transparent" : "var(--color-background, #0a0a0a)"};
7813
- border: ${(props) => props.$gate ? "none" : "1px solid rgba(230, 198, 86, 0.3)"};
7661
+ background-color: var(--color-background, #0a0a0a);
7662
+ border: 1px solid rgba(230, 198, 86, 0.3);
7814
7663
  border-radius: var(--border-radius, 12px);
7815
7664
  padding: 2.5rem;
7816
7665
  max-width: 440px;
7817
7666
  width: 90%;
7818
7667
  position: relative;
7819
7668
  animation: slideUp 0.3s ease-out;
7820
- box-shadow: ${(props) => props.$gate ? "none" : "0 10px 30px rgba(0, 0, 0, 0.3)"};
7669
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
7821
7670
 
7822
7671
  @keyframes slideUp {
7823
7672
  from {
@@ -8004,379 +7853,180 @@ var Title = styled10__default.default.h2`
8004
7853
  flex-direction: column;
8005
7854
  align-items: center;
8006
7855
  justify-content: center;
8007
- gap: 1rem;
8008
- `;
8009
- var TitleText = styled10__default.default.span`
8010
- text-align: center;
8011
- line-height: 1.2;
8012
- `;
8013
- var LogoBeta = styled10__default.default.span`
8014
- color: var(--color-accent, #E6C87E);
8015
- font-size: 0.6rem;
8016
- font-weight: 600;
8017
- letter-spacing: 0.14em;
8018
- text-transform: uppercase;
8019
- white-space: nowrap;
8020
- padding-bottom: 0.95rem;
7856
+ gap: 0.4rem;
8021
7857
  `;
8022
- var Subtitle = styled10__default.default.p`
7858
+ styled10__default.default.p`
8023
7859
  font-size: 0.9rem;
8024
7860
  font-weight: 400;
8025
7861
  color: var(--color-text-secondary, #848e9c);
8026
7862
  text-align: center;
8027
7863
  margin: 0 0 2rem;
8028
7864
  `;
8029
- var LogoContainer3 = styled10__default.default.div`
8030
- display: flex;
8031
- align-items: flex-end;
8032
- justify-content: center;
8033
- gap: 0.45rem;
8034
- margin-bottom: 0.5rem;
8035
- `;
8036
- var LogoImage = styled10__default.default.img`
8037
- height: 60px;
8038
- `;
8039
- var ButtonsContainer = styled10__default.default.div`
8040
- display: flex;
8041
- flex-direction: column;
8042
- gap: 1rem;
8043
- margin-bottom: 1.5rem;
8044
- `;
8045
- var SignUpPrompt = styled10__default.default.div`
8046
- text-align: center;
8047
- font-size: 0.875rem;
8048
- color: var(--color-text-secondary, #848e9c);
8049
- margin-bottom: 0.5rem;
8050
- `;
8051
- var SignUpLink = styled10__default.default.button`
8052
- background: none;
8053
- border: none;
8054
- padding: 0;
8055
- font: inherit;
8056
- color: var(--color-accent, #E6C87E);
8057
- text-decoration: underline;
8058
- cursor: pointer;
8059
-
8060
- &:hover {
8061
- opacity: 0.85;
8062
- }
8063
- `;
8064
- var LoginButton = styled10__default.default.button`
8065
- display: flex;
8066
- align-items: center;
8067
- justify-content: center;
8068
- gap: 0.75rem;
8069
- padding: 1rem 1.5rem;
8070
- background-color: var(--color-background-light, #1a1a1a);
8071
- border: 1px solid rgba(230, 198, 86, 0.2);
8072
- border-radius: var(--border-radius, 8px);
8073
- color: var(--color-text, #eaecef);
8074
- font-size: 1rem;
8075
- font-weight: 500;
8076
- cursor: pointer;
8077
- transition: all 0.2s ease;
8078
-
8079
- &:hover {
8080
- background-color: rgba(230, 198, 86, 0.1);
8081
- border-color: var(--color-accent, #E6C87E);
8082
- }
8083
-
8084
- svg {
8085
- width: 20px;
8086
- height: 20px;
8087
- color: var(--color-accent, #E6C87E);
8088
- }
8089
- `;
8090
- var InfoText = styled10__default.default.p`
8091
- color: var(--color-text-secondary, #848e9c);
8092
- font-size: 0.875rem;
8093
- text-align: center;
8094
- line-height: 1.5;
8095
- `;
8096
- var EmailFormContainer = styled10__default.default.div`
8097
- display: flex;
8098
- flex-direction: column;
8099
- gap: 1rem;
8100
- margin-bottom: 1.5rem;
8101
- `;
8102
- var EmailInput = styled10__default.default.input`
8103
- width: 100%;
8104
- padding: 1rem 1.25rem;
8105
- background-color: var(--color-background-light, #1a1a1a);
8106
- border: 1px solid rgba(230, 198, 86, 0.2);
8107
- border-radius: var(--border-radius, 8px);
7865
+ var MainHeading = styled10__default.default.h2`
7866
+ font-size: 1.5rem;
7867
+ font-weight: 700;
8108
7868
  color: var(--color-text, #eaecef);
8109
- font-size: 1rem;
8110
- transition: all 0.2s ease;
8111
-
8112
- &:focus {
8113
- outline: none;
8114
- border-color: var(--color-accent, #E6C87E);
8115
- }
8116
-
8117
- &::placeholder {
8118
- color: var(--color-text-secondary, #848e9c);
8119
- }
8120
- `;
8121
- var codeBorderColor = (status, focused) => {
8122
- if (status === "valid") return "var(--color-positive, #00C076)";
8123
- if (status === "invalid") return "var(--color-negative, #FF5757)";
8124
- return focused ? "var(--color-accent, #E6C87E)" : "rgba(230, 198, 86, 0.2)";
8125
- };
8126
- var CodeInputWrapper = styled10__default.default.div`
8127
- display: flex;
8128
- align-items: center;
8129
- width: 100%;
8130
- padding: 1rem 1.25rem;
8131
- background-color: var(--color-background-light, #1a1a1a);
8132
- border: 1px solid ${(props) => codeBorderColor(props.$status, false)};
8133
- border-radius: var(--border-radius, 8px);
8134
- box-shadow: ${(props) => props.$status === "valid" ? "0 0 0 1px var(--color-positive, #00C076)" : props.$status === "invalid" ? "0 0 0 1px var(--color-negative, #FF5757)" : "none"};
8135
- transition: all 0.2s ease;
8136
-
8137
- &:focus-within {
8138
- border-color: ${(props) => codeBorderColor(props.$status, true)};
8139
- }
7869
+ text-align: left;
7870
+ margin: 0 0 0.35rem;
8140
7871
  `;
8141
- var CodePrefix = styled10__default.default.span`
7872
+ var MainSubtitle = styled10__default.default.p`
7873
+ font-size: 0.9rem;
7874
+ font-weight: 400;
8142
7875
  color: var(--color-text-secondary, #848e9c);
8143
- font-size: 1.1rem;
8144
- font-weight: 600;
8145
- letter-spacing: 0.22em;
8146
- font-family: 'Space Grotesk', monospace;
8147
- user-select: none;
8148
- `;
8149
- var CodeSuffixInput = styled10__default.default.input`
8150
- flex: 1;
8151
- min-width: 0;
8152
- border: none;
8153
- background: transparent;
8154
- color: var(--color-text, #eaecef);
8155
- font-size: 1.1rem;
8156
- font-weight: 600;
8157
- letter-spacing: 0.22em;
8158
- text-transform: uppercase;
8159
- font-family: 'Space Grotesk', monospace;
8160
- /* Explicit line-height so iOS in-app WebViews size the caret to the text
8161
- box instead of rendering a short, top-aligned caret (line-height: normal
8162
- + webfont + letter-spacing miscomputes it in some WebViews). */
7876
+ text-align: left;
7877
+ margin: 0 0 1.5rem;
8163
7878
  line-height: 1.5;
8164
-
8165
- &:focus {
8166
- outline: none;
8167
- }
8168
-
8169
- &::placeholder {
8170
- color: rgba(132, 142, 156, 0.45);
8171
- letter-spacing: 0.22em;
8172
- }
8173
- `;
8174
- var GateBrand = styled10__default.default.div`
8175
- display: flex;
8176
- align-items: center;
8177
- justify-content: center;
8178
- gap: 0.7rem;
8179
- margin-bottom: 0.6rem;
8180
- `;
8181
- var GateLogoLink = styled10__default.default.a`
8182
- display: inline-flex;
8183
- align-items: center;
8184
- cursor: pointer;
8185
- transition: opacity 0.15s ease;
8186
-
8187
- &:hover {
8188
- opacity: 0.85;
8189
- }
8190
- `;
8191
- var GateLogo = styled10__default.default.img`
8192
- height: 44px;
8193
- display: block;
8194
- `;
8195
- var GateBrandDivider = styled10__default.default.span`
8196
- width: 1px;
8197
- height: 26px;
8198
- background: rgba(255, 255, 255, 0.18);
8199
- `;
8200
- var GateBetaTag = styled10__default.default.span`
8201
- color: var(--color-text-secondary, #848e9c);
8202
- font-size: 0.8rem;
8203
- font-weight: 500;
8204
- letter-spacing: 0.28em;
8205
- text-transform: uppercase;
8206
- `;
8207
- var GateForm = styled10__default.default.div`
8208
- display: flex;
8209
- flex-direction: column;
8210
- align-items: center;
8211
- gap: 0.9rem;
8212
- width: 100%;
8213
- max-width: 360px;
8214
- position: relative;
8215
- z-index: 1;
8216
- `;
8217
- var GateShell = styled10__default.default.div`
8218
- position: fixed;
8219
- inset: 0;
7879
+ `;
7880
+ var LogoContainer3 = styled10__default.default.div`
8220
7881
  display: flex;
8221
- align-items: center;
7882
+ align-items: flex-end;
8222
7883
  justify-content: center;
8223
- z-index: 10000;
8224
- background-color: rgba(10, 10, 12, 0.66);
7884
+ gap: 0.45rem;
7885
+ margin-bottom: 0.5rem;
8225
7886
  `;
8226
- var GateTint = styled10__default.default.div`
8227
- position: absolute;
8228
- left: 0;
8229
- right: 0;
8230
- bottom: 0;
8231
- height: calc(${(props) => (3 - Math.max(0, Math.min(3, props.$reveal))) / 3 * 100}% + 90px);
8232
- background: linear-gradient(
8233
- to top,
8234
- var(--color-background, #0a0a0c) calc(100% - 90px),
8235
- rgba(10, 10, 12, 0) 100%
8236
- );
8237
- transition: height 0.65s ease;
8238
- pointer-events: none;
7887
+ var LogoImage = styled10__default.default.img`
7888
+ height: 40px;
8239
7889
  `;
8240
- var GateOtpText = styled10__default.default.p`
8241
- margin: 0;
7890
+ styled10__default.default.div`
7891
+ display: flex;
7892
+ flex-direction: column;
7893
+ gap: 1rem;
7894
+ margin-bottom: 1.5rem;
7895
+ `;
7896
+ styled10__default.default.div`
8242
7897
  text-align: center;
8243
- font-size: 0.9rem;
8244
- line-height: 1.5;
7898
+ font-size: 0.875rem;
8245
7899
  color: var(--color-text-secondary, #848e9c);
8246
-
8247
- strong {
8248
- color: var(--color-text, #eaecef);
8249
- font-weight: 600;
8250
- }
7900
+ margin-bottom: 0.5rem;
8251
7901
  `;
8252
- var GateResendText = styled10__default.default.p`
8253
- margin: 0.2rem 0 0;
8254
- font-size: 0.85rem;
8255
- color: var(--color-text-secondary, #848e9c);
7902
+ styled10__default.default.button`
7903
+ background: none;
7904
+ border: none;
7905
+ padding: 0;
7906
+ font: inherit;
7907
+ color: var(--color-accent, #E6C87E);
7908
+ text-decoration: underline;
7909
+ cursor: pointer;
8256
7910
 
8257
- button {
8258
- background: none;
8259
- border: none;
8260
- color: var(--color-accent, #E6C87E);
8261
- cursor: pointer;
8262
- text-decoration: underline;
8263
- font-size: inherit;
7911
+ &:hover {
7912
+ opacity: 0.85;
8264
7913
  }
8265
7914
  `;
8266
- var GateSubmit = styled10__default.default.button`
7915
+ var LoginButton = styled10__default.default.button`
8267
7916
  display: flex;
7917
+ width: 100%;
7918
+ box-sizing: border-box;
8268
7919
  align-items: center;
8269
7920
  justify-content: center;
8270
- flex-shrink: 0;
8271
- width: 28px;
8272
- height: 28px;
8273
- margin-left: 0.5rem;
8274
- padding: 0;
8275
- background: none;
8276
- border: none;
7921
+ gap: 0.55rem;
7922
+ padding: 0.55rem 1.1rem;
7923
+ background-color: var(--color-background-light, #1a1a1a);
7924
+ border: 1px solid rgba(230, 198, 86, 0.2);
7925
+ border-radius: var(--border-radius, 8px);
7926
+ color: var(--color-text, #eaecef);
7927
+ font-size: 0.82rem;
7928
+ font-weight: 500;
8277
7929
  cursor: pointer;
8278
- color: ${(props) => props.$status === "valid" ? "var(--color-positive, #00C076)" : props.$status === "invalid" ? "var(--color-negative, #FF5757)" : "var(--color-accent, #E6C87E)"};
8279
- transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
7930
+ transition: all 0.2s ease;
8280
7931
 
8281
- &:not(:disabled):hover {
8282
- transform: translateX(2px);
7932
+ svg { width: 16px; height: 16px; }
7933
+
7934
+ &:hover {
7935
+ background-color: rgba(230, 198, 86, 0.1);
7936
+ border-color: var(--color-accent, #E6C87E);
8283
7937
  }
8284
7938
 
8285
- &:disabled {
8286
- opacity: ${(props) => props.$status === "valid" ? 1 : 0.35};
8287
- color: ${(props) => props.$status === "valid" ? "var(--color-positive, #00C076)" : "var(--color-text-secondary, #848e9c)"};
8288
- cursor: default;
7939
+ svg {
7940
+ width: 20px;
7941
+ height: 20px;
7942
+ color: var(--color-accent, #E6C87E);
8289
7943
  }
8290
7944
  `;
8291
- var GateEmailInput = styled10__default.default.input`
8292
- flex: 1;
8293
- min-width: 0;
8294
- border: none;
8295
- background: transparent;
7945
+ var InfoText = styled10__default.default.p`
7946
+ color: var(--color-text-secondary, #848e9c);
7947
+ font-size: 0.875rem;
7948
+ text-align: center;
7949
+ line-height: 1.5;
7950
+ `;
7951
+ var EmailFormContainer = styled10__default.default.div`
7952
+ display: flex;
7953
+ flex-direction: column;
7954
+ gap: 1rem;
7955
+ margin-bottom: 1.5rem;
7956
+ `;
7957
+ var EmailInput = styled10__default.default.input`
7958
+ width: 100%;
7959
+ padding: 1rem 1.25rem;
7960
+ background-color: var(--color-background-light, #1a1a1a);
7961
+ border: 1px solid rgba(230, 198, 86, 0.2);
7962
+ border-radius: var(--border-radius, 8px);
8296
7963
  color: var(--color-text, #eaecef);
8297
7964
  font-size: 1rem;
7965
+ transition: all 0.2s ease;
8298
7966
 
8299
7967
  &:focus {
8300
7968
  outline: none;
7969
+ border-color: var(--color-accent, #E6C87E);
8301
7970
  }
8302
7971
 
8303
7972
  &::placeholder {
8304
- color: rgba(132, 142, 156, 0.5);
8305
- }
8306
- `;
8307
- var GateSpinner = styled10__default.default.span`
8308
- width: 18px;
8309
- height: 18px;
8310
- border: 2px solid rgba(230, 198, 86, 0.3);
8311
- border-top-color: var(--color-accent, #E6C87E);
8312
- border-radius: 50%;
8313
- animation: gateSpin 0.7s linear infinite;
8314
-
8315
- @keyframes gateSpin {
8316
- to { transform: rotate(360deg); }
7973
+ color: var(--color-text-secondary, #848e9c);
8317
7974
  }
8318
7975
  `;
8319
- var GateOr = styled10__default.default.div`
7976
+ var GateForm = styled10__default.default.form`
8320
7977
  display: flex;
8321
- align-items: center;
7978
+ flex-direction: column;
8322
7979
  gap: 0.6rem;
8323
7980
  width: 100%;
8324
- color: var(--color-text-secondary, #848e9c);
8325
- font-size: 0.78rem;
8326
- text-transform: lowercase;
7981
+ `;
7982
+ var GateInputRow = styled10__default.default.div`
7983
+ position: relative;
7984
+ width: 100%;
7985
+ `;
7986
+ var GateInput = styled10__default.default.input`
7987
+ width: 100%;
7988
+ box-sizing: border-box;
7989
+ padding: 1rem 3.25rem 1rem 1.25rem;
7990
+ background-color: var(--color-background-light, #1a1a1a);
7991
+ border: 1px solid rgba(230, 198, 86, 0.2);
7992
+ border-radius: var(--border-radius, 8px);
7993
+ color: var(--color-text, #eaecef);
7994
+ font-size: 1rem;
7995
+ transition: all 0.2s ease;
8327
7996
 
8328
- &::before,
8329
- &::after {
8330
- content: "";
8331
- flex: 1;
8332
- height: 1px;
8333
- background: rgba(255, 255, 255, 0.1);
8334
- }
7997
+ &:focus { outline: none; border-color: var(--color-accent, #E6C87E); }
7998
+ &::placeholder { color: var(--color-text-secondary, #848e9c); }
8335
7999
  `;
8336
- var GateWalletButton = styled10__default.default.button`
8337
- display: inline-flex;
8000
+ var GateSubmit = styled10__default.default.button`
8001
+ position: absolute;
8002
+ top: 50%;
8003
+ right: 0.55rem;
8004
+ transform: translateY(-50%);
8005
+ width: 34px;
8006
+ height: 34px;
8007
+ display: flex;
8338
8008
  align-items: center;
8339
8009
  justify-content: center;
8340
- gap: 0.5rem;
8341
- margin-top: 0.1rem;
8342
- padding: 0.55rem 1.1rem;
8343
- background: transparent;
8344
- border: 1px solid rgba(255, 255, 255, 0.12);
8345
- border-radius: var(--border-radius, 8px);
8010
+ background: none;
8011
+ border: none;
8012
+ border-radius: 8px;
8346
8013
  color: var(--color-text-secondary, #848e9c);
8347
- font-size: 0.85rem;
8348
- font-weight: 500;
8349
8014
  cursor: pointer;
8350
- transition: border-color 0.15s ease, color 0.15s ease;
8351
-
8352
- svg {
8353
- width: 16px;
8354
- height: 16px;
8355
- }
8015
+ transition: color 0.2s ease, background 0.2s ease;
8356
8016
 
8357
- &:hover {
8358
- border-color: rgba(230, 198, 86, 0.4);
8359
- color: var(--color-text, #eaecef);
8360
- }
8017
+ svg { width: 18px; height: 18px; }
8018
+ &:hover:not(:disabled) { color: var(--color-accent, #E6C87E); background: rgba(230, 198, 86, 0.1); }
8019
+ &:disabled { opacity: 0.4; cursor: not-allowed; }
8361
8020
  `;
8362
- var GateReveal = styled10__default.default.div`
8021
+ var GateOr = styled10__default.default.div`
8363
8022
  display: flex;
8364
- flex-direction: column;
8365
8023
  align-items: center;
8366
- gap: 0.9rem;
8367
- width: 100%;
8368
- animation: gateReveal 0.3s ease-out;
8024
+ gap: 0.75rem;
8025
+ color: var(--color-text-secondary, #848e9c);
8026
+ font-size: 0.8rem;
8027
+ margin: 0.4rem 0;
8369
8028
 
8370
- @keyframes gateReveal {
8371
- from {
8372
- opacity: 0;
8373
- transform: translateY(-6px);
8374
- }
8375
- to {
8376
- opacity: 1;
8377
- transform: translateY(0);
8378
- }
8379
- }
8029
+ &::before, &::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }
8380
8030
  `;
8381
8031
  var OTPContainer = styled10__default.default.div`
8382
8032
  display: flex;
@@ -8390,17 +8040,15 @@ var OTPInput = styled10__default.default.input`
8390
8040
  font-size: 1.5rem;
8391
8041
  font-weight: 600;
8392
8042
  background-color: var(--color-background-light, #1a1a1a);
8393
- border: 1px solid ${(props) => codeBorderColor(props.$status, false)};
8043
+ border: 1px solid rgba(230, 198, 86, 0.2);
8394
8044
  border-radius: var(--border-radius, 8px);
8395
- color: ${(props) => props.$status === "valid" ? "var(--color-positive, #00C076)" : props.$status === "invalid" ? "var(--color-negative, #FF5757)" : "var(--color-accent, #E6C87E)"};
8396
- box-shadow: ${(props) => props.$status === "valid" ? "0 0 0 1px var(--color-positive, #00C076)" : props.$status === "invalid" ? "0 0 0 1px var(--color-negative, #FF5757)" : "none"};
8397
- opacity: ${(props) => props.$status === "checking" ? 0.6 : 1};
8045
+ color: var(--color-accent, #E6C87E);
8398
8046
  transition: all 0.2s ease;
8399
8047
 
8400
8048
  &:focus {
8401
8049
  outline: none;
8402
- border-color: ${(props) => codeBorderColor(props.$status, true)};
8403
- box-shadow: 0 0 0 2px ${(props) => props.$status === "valid" ? "rgba(0, 192, 118, 0.25)" : props.$status === "invalid" ? "rgba(255, 87, 87, 0.25)" : "rgba(230, 198, 86, 0.2)"};
8050
+ border-color: var(--color-accent, #E6C87E);
8051
+ box-shadow: 0 0 0 2px rgba(230, 198, 86, 0.2);
8404
8052
  }
8405
8053
  `;
8406
8054
  var SubmitButton = styled10__default.default.button`
@@ -8768,24 +8416,15 @@ var SpinnerRing = styled10__default.default.div`
8768
8416
  }
8769
8417
  `;
8770
8418
  var PREPARING_FACTS = [
8771
- // Exchange
8419
+ "Property is the world's largest asset class \u2014 worth over US$300 trillion.",
8420
+ "Loaf settles trades in about 1 second. Traditional property takes ~90 days.",
8772
8421
  "Our matching engine processes orders in 30 microseconds.",
8773
- "Loaf settles in 1 second. Traditional property takes 30-90 days.",
8422
+ "Every token is backed 1:1 by land-title-registered property.",
8423
+ "Own a slice of premium real estate \u2014 no mortgage, no paperwork.",
8774
8424
  "Buy and sell property as easily as a stock, on a live orderbook.",
8775
- "Continuous price discovery, not a single buyer negotiating in a back room.",
8776
- "Algo-trade property on our API. Build a bot with Claude using our docs.",
8777
- // What you're holding
8778
- "Hold shares secured 1:1 by the underlying property, as regulated securities.",
8779
- "The same economic exposure as owning the property. Without the friction, gatekeeping, or illiquidity.",
8780
- "Securitisation of property brings a new dimension of flexibility and tradability.",
8781
- // Frictionless
8782
- "Settle in seconds, then sell again whenever you want. No waiting days or weeks.",
8783
- "99% of the frictions in property transactions can be, and have been, reduced.",
8784
- // Vision
8785
- "A family office can rebalance a billion dollars in an afternoon, but couldn't sell a $50M property in under six months.",
8786
- "Family offices and HNWIs prize capital flexibility. Loaf makes property flexible.",
8787
- "There's no law of physics that says the world's oldest asset class must stay illiquid.",
8788
- "What if property underwent an IPO?"
8425
+ "Earn rental yield on the exact fraction of property you own.",
8426
+ "Title-backed by the NSW Land Registry \u2014 real ownership, on-chain.",
8427
+ "Loaf ran the world's first property IPO."
8789
8428
  ];
8790
8429
  var FactCard = styled10__default.default.div`
8791
8430
  margin-top: 1.5rem;
@@ -8893,7 +8532,7 @@ var LogoImage2 = styled10__default.default.img`
8893
8532
  height: 30px;
8894
8533
  width: auto;
8895
8534
  `;
8896
- var LogoBeta2 = styled10__default.default.span`
8535
+ var LogoBeta = styled10__default.default.span`
8897
8536
  font-size: 0.6rem;
8898
8537
  font-weight: 600;
8899
8538
  letter-spacing: 0.08em;
@@ -9051,7 +8690,7 @@ function OnboardingGuide({
9051
8690
  /* @__PURE__ */ jsxRuntime.jsx(CloseButton2, { onClick: onClose, "aria-label": "Skip", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l12 12M18 6L6 18" }) }) }),
9052
8691
  /* @__PURE__ */ jsxRuntime.jsxs(LogoRow, { children: [
9053
8692
  /* @__PURE__ */ jsxRuntime.jsx(LogoImage2, { src: logoSrc, alt: "Loaf" }),
9054
- /* @__PURE__ */ jsxRuntime.jsx(LogoBeta2, { children: "Private Beta" })
8693
+ /* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
9055
8694
  ] }),
9056
8695
  /* @__PURE__ */ jsxRuntime.jsx(Title2, { children: "You're in \u{1F389}" }),
9057
8696
  /* @__PURE__ */ jsxRuntime.jsx(Subtitle2, { children: "Here's everything you need to make your first trade." }),
@@ -12421,8 +12060,7 @@ function AssetSelectorBar({
12421
12060
  onSelect,
12422
12061
  trailing,
12423
12062
  imageUrl,
12424
- badgeLabel,
12425
- tickerPrimary
12063
+ badgeLabel
12426
12064
  }) {
12427
12065
  const [isDropdownOpen, setIsDropdownOpen] = React5.useState(false);
12428
12066
  const hasItems = selectorItems && selectorItems.length > 0;
@@ -12433,14 +12071,9 @@ function AssetSelectorBar({
12433
12071
  ];
12434
12072
  return /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(IPOAssetSelector, { children: [
12435
12073
  imageUrl && /* @__PURE__ */ jsxRuntime.jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
12436
- /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { $flush: tickerPrimary, onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
12437
- tickerPrimary && currentTicker ? /* @__PURE__ */ jsxRuntime.jsxs(AssetIdentity, { children: [
12438
- /* @__PURE__ */ jsxRuntime.jsx(AssetTicker, { children: currentTicker.toUpperCase() }),
12439
- /* @__PURE__ */ jsxRuntime.jsx(AssetSubName, { children: propertyName })
12440
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12441
- propertyName,
12442
- currentTicker ? ` (${currentTicker.toUpperCase()})` : ""
12443
- ] }),
12074
+ /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
12075
+ propertyName,
12076
+ currentTicker ? ` (${currentTicker.toUpperCase()})` : "",
12444
12077
  badgeLabel && /* @__PURE__ */ jsxRuntime.jsx(CompetitionBadge, { children: badgeLabel }),
12445
12078
  hasItems && /* @__PURE__ */ jsxRuntime.jsx(
12446
12079
  "svg",
@@ -12469,7 +12102,7 @@ function AssetSelectorBar({
12469
12102
  ] })
12470
12103
  ] })
12471
12104
  ] }, m.label)) }),
12472
- trailing != null && /* @__PURE__ */ jsxRuntime.jsx(TrailingWrapper, { className: "asset-bar-trailing", children: /* @__PURE__ */ jsxRuntime.jsx(TrailingInner, { children: trailing }) }),
12105
+ trailing != null && /* @__PURE__ */ jsxRuntime.jsx(TrailingWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(TrailingInner, { children: trailing }) }),
12473
12106
  isDropdownOpen && hasItems && /* @__PURE__ */ jsxRuntime.jsx(IPODropdown, { children: selectorItems.map((item) => {
12474
12107
  const isCurrent = item.tokenName === currentTokenName;
12475
12108
  const status = item.status?.toUpperCase();
@@ -12560,40 +12193,13 @@ var AssetSelectorDropdown = styled10__default.default.div`
12560
12193
  display: flex;
12561
12194
  align-items: center;
12562
12195
  cursor: pointer;
12563
- /* $flush (tickerPrimary): no horizontal padding / no hover box, so opening the
12564
- selector doesn't make the ticker appear shoved right by the highlight box. */
12565
- padding: ${(p) => p.$flush ? "0.25rem 0" : "0.5rem"};
12196
+ padding: 0.5rem;
12566
12197
  border-radius: 8px;
12567
- transition: ${(p) => p.$flush ? "none" : "all 0.2s ease"};
12198
+ transition: all 0.2s ease;
12568
12199
  flex: 0 1 auto;
12569
12200
  min-width: 0;
12570
12201
  overflow: hidden;
12571
- &:hover { background-color: ${(p) => p.$flush ? "transparent" : "rgba(255,255,255,0.05)"}; }
12572
- `;
12573
- var AssetIdentity = styled10__default.default.div`
12574
- display: flex;
12575
- flex-direction: column;
12576
- min-width: 0;
12577
- line-height: 1.2;
12578
- `;
12579
- var AssetTicker = styled10__default.default.span`
12580
- font-weight: 700;
12581
- font-size: 1.35rem;
12582
- color: var(--color-text);
12583
- letter-spacing: -0.01em;
12584
- white-space: nowrap;
12585
- overflow: hidden;
12586
- text-overflow: ellipsis;
12587
-
12588
- @media (max-width: 480px) { font-size: 1.2rem; }
12589
- `;
12590
- var AssetSubName = styled10__default.default.span`
12591
- font-size: 0.8rem;
12592
- font-weight: 500;
12593
- color: rgba(255, 255, 255, 0.4);
12594
- white-space: nowrap;
12595
- overflow: hidden;
12596
- text-overflow: ellipsis;
12202
+ &:hover { background-color: rgba(255,255,255,0.05); }
12597
12203
  `;
12598
12204
  var AssetName = styled10__default.default.div`
12599
12205
  display: flex;
@@ -15271,30 +14877,27 @@ function PortfolioActivityPanel({
15271
14877
  ] }, pos.tokenName);
15272
14878
  })
15273
14879
  ] }),
15274
- positions.length > 0 && closeAllOpen && onClosePosition && typeof document !== "undefined" && ReactDOM.createPortal(
15275
- /* @__PURE__ */ jsxRuntime.jsx(CloseAllOverlay, { onClick: () => setCloseAllOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CloseAllModal, { onClick: (e) => e.stopPropagation(), children: [
15276
- /* @__PURE__ */ jsxRuntime.jsx(CloseAllModalX, { onClick: () => setCloseAllOpen(false), children: "\xD7" }),
15277
- /* @__PURE__ */ jsxRuntime.jsx(CloseAllTitle, { children: "Confirm Sell All" }),
15278
- /* @__PURE__ */ jsxRuntime.jsx(CloseAllDesc, { children: "This will sell all your positions and cancel their associated TP/SL orders." }),
15279
- /* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("market"), children: [
15280
- /* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "market" }),
15281
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Market Sell" })
15282
- ] }),
15283
- /* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("limit"), children: [
15284
- /* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "limit" }),
15285
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Limit Sell at Mid Price" })
15286
- ] }),
15287
- /* @__PURE__ */ jsxRuntime.jsxs(CloseAllConfirmBtn, { onClick: () => {
15288
- positions.forEach((pos) => onClosePosition(pos.tokenName, closeAllType, pos.quantity, pos.marketPrice));
15289
- setCloseAllOpen(false);
15290
- }, children: [
15291
- "Confirm ",
15292
- closeAllType === "market" ? "Market" : "Limit",
15293
- " Sell"
15294
- ] })
15295
- ] }) }),
15296
- document.body
15297
- )
14880
+ positions.length > 0 && closeAllOpen && onClosePosition && /* @__PURE__ */ jsxRuntime.jsx(CloseAllOverlay, { onClick: () => setCloseAllOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CloseAllModal, { onClick: (e) => e.stopPropagation(), children: [
14881
+ /* @__PURE__ */ jsxRuntime.jsx(CloseAllModalX, { onClick: () => setCloseAllOpen(false), children: "\xD7" }),
14882
+ /* @__PURE__ */ jsxRuntime.jsx(CloseAllTitle, { children: "Confirm Sell All" }),
14883
+ /* @__PURE__ */ jsxRuntime.jsx(CloseAllDesc, { children: "This will sell all your positions and cancel their associated TP/SL orders." }),
14884
+ /* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("market"), children: [
14885
+ /* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "market" }),
14886
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Market Sell" })
14887
+ ] }),
14888
+ /* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("limit"), children: [
14889
+ /* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "limit" }),
14890
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Limit Sell at Mid Price" })
14891
+ ] }),
14892
+ /* @__PURE__ */ jsxRuntime.jsxs(CloseAllConfirmBtn, { onClick: () => {
14893
+ positions.forEach((pos) => onClosePosition(pos.tokenName, closeAllType, pos.quantity, pos.marketPrice));
14894
+ setCloseAllOpen(false);
14895
+ }, children: [
14896
+ "Confirm ",
14897
+ closeAllType === "market" ? "Market" : "Limit",
14898
+ " Sell"
14899
+ ] })
14900
+ ] }) })
15298
14901
  ] }),
15299
14902
  activeTab === "subscriptions" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15300
14903
  offeringOrders.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
@@ -15751,63 +15354,57 @@ function PortfolioActivityPanel({
15751
15354
  ] }),
15752
15355
  /* @__PURE__ */ jsxRuntime.jsx(PaginationBtn, { disabled: currentPage >= totalPages - 1, onClick: () => setCurrentPage((p) => p + 1), children: "Next \u203A" })
15753
15356
  ] }),
15754
- cancelAllConfirmOpen && typeof document !== "undefined" && ReactDOM.createPortal(
15755
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setCancelAllConfirmOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
15756
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel All Orders" }),
15757
- /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmBody, { children: [
15758
- "Are you sure you want to cancel all ",
15759
- openOrdersCount,
15760
- " open orders? This action cannot be undone."
15761
- ] }),
15762
- /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
15763
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setCancelAllConfirmOpen(false), children: "Keep Orders" }),
15764
- /* @__PURE__ */ jsxRuntime.jsx(
15765
- CancelConfirmProceed,
15766
- {
15767
- type: "button",
15768
- disabled: cancellingAll,
15769
- onClick: async () => {
15770
- if (onCancelAllOrders) {
15771
- setCancellingAll(true);
15772
- try {
15773
- await onCancelAllOrders();
15774
- } finally {
15775
- setCancellingAll(false);
15776
- }
15777
- }
15778
- setCancelAllConfirmOpen(false);
15779
- },
15780
- children: cancellingAll ? "Cancelling\u2026" : "Yes, Cancel All"
15781
- }
15782
- )
15783
- ] })
15784
- ] }) }),
15785
- document.body
15786
- ),
15787
- pendingCancelOrderId !== null && typeof document !== "undefined" && ReactDOM.createPortal(
15788
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setPendingCancelOrderId(null), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
15789
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel Order" }),
15790
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmBody, { children: "Are you sure you want to cancel this order? This action cannot be undone." }),
15791
- /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
15792
- /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setPendingCancelOrderId(null), children: "Keep Order" }),
15793
- /* @__PURE__ */ jsxRuntime.jsx(
15794
- CancelConfirmProceed,
15795
- {
15796
- type: "button",
15797
- disabled: cancellingOrderId != null,
15798
- onClick: async () => {
15799
- if (onCancelOrder && pendingCancelOrderId !== null) {
15800
- await onCancelOrder(pendingCancelOrderId);
15357
+ cancelAllConfirmOpen && /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setCancelAllConfirmOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
15358
+ /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel All Orders" }),
15359
+ /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmBody, { children: [
15360
+ "Are you sure you want to cancel all ",
15361
+ openOrdersCount,
15362
+ " open orders? This action cannot be undone."
15363
+ ] }),
15364
+ /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
15365
+ /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setCancelAllConfirmOpen(false), children: "Keep Orders" }),
15366
+ /* @__PURE__ */ jsxRuntime.jsx(
15367
+ CancelConfirmProceed,
15368
+ {
15369
+ type: "button",
15370
+ disabled: cancellingAll,
15371
+ onClick: async () => {
15372
+ if (onCancelAllOrders) {
15373
+ setCancellingAll(true);
15374
+ try {
15375
+ await onCancelAllOrders();
15376
+ } finally {
15377
+ setCancellingAll(false);
15801
15378
  }
15802
- setPendingCancelOrderId(null);
15803
- },
15804
- children: cancellingOrderId === pendingCancelOrderId ? "Cancelling\u2026" : "Yes, Cancel"
15805
- }
15806
- )
15807
- ] })
15808
- ] }) }),
15809
- document.body
15810
- )
15379
+ }
15380
+ setCancelAllConfirmOpen(false);
15381
+ },
15382
+ children: cancellingAll ? "Cancelling\u2026" : "Yes, Cancel All"
15383
+ }
15384
+ )
15385
+ ] })
15386
+ ] }) }),
15387
+ pendingCancelOrderId !== null && /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setPendingCancelOrderId(null), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
15388
+ /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel Order" }),
15389
+ /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmBody, { children: "Are you sure you want to cancel this order? This action cannot be undone." }),
15390
+ /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
15391
+ /* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setPendingCancelOrderId(null), children: "Keep Order" }),
15392
+ /* @__PURE__ */ jsxRuntime.jsx(
15393
+ CancelConfirmProceed,
15394
+ {
15395
+ type: "button",
15396
+ disabled: cancellingOrderId != null,
15397
+ onClick: async () => {
15398
+ if (onCancelOrder && pendingCancelOrderId !== null) {
15399
+ await onCancelOrder(pendingCancelOrderId);
15400
+ }
15401
+ setPendingCancelOrderId(null);
15402
+ },
15403
+ children: cancellingOrderId === pendingCancelOrderId ? "Cancelling\u2026" : "Yes, Cancel"
15404
+ }
15405
+ )
15406
+ ] })
15407
+ ] }) })
15811
15408
  ] });
15812
15409
  }
15813
15410
  var Container2 = styled10__default.default.div`
@@ -15878,7 +15475,7 @@ var Tab = styled10__default.default.button`
15878
15475
  }
15879
15476
  `;
15880
15477
  var TabCount = styled10__default.default.span`
15881
- color: var(--color-accent, #E6C87E);
15478
+ color: #E6C656;
15882
15479
  font-weight: 600;
15883
15480
  margin-left: 2px;
15884
15481
  `;
@@ -16063,8 +15660,7 @@ var CancelConfirmOverlay = styled10__default.default.div`
16063
15660
  display: flex;
16064
15661
  align-items: center;
16065
15662
  justify-content: center;
16066
- /* Above the trade page's fullscreen/sticky layers (TradePage.css uses up to 10001). */
16067
- z-index: 10050;
15663
+ z-index: 1000;
16068
15664
  `;
16069
15665
  var CancelConfirmModal = styled10__default.default.div`
16070
15666
  background: #1a1a1a;
@@ -16178,8 +15774,7 @@ var CloseAllOverlay = styled10__default.default.div`
16178
15774
  display: flex;
16179
15775
  align-items: center;
16180
15776
  justify-content: center;
16181
- /* Above the trade page's fullscreen/sticky layers (TradePage.css uses up to 10001). */
16182
- z-index: 10050;
15777
+ z-index: 1000;
16183
15778
  `;
16184
15779
  var CloseAllModal = styled10__default.default.div`
16185
15780
  background: #1a1a1a;