@deriv-web-design/ui 0.1.39 → 0.1.41

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.mjs CHANGED
@@ -1023,6 +1023,7 @@ var Pagination = ({
1023
1023
  {
1024
1024
  className: ["pagination", className ?? ""].filter(Boolean).join(" "),
1025
1025
  "aria-label": "Pagination navigation",
1026
+ dir: "ltr",
1026
1027
  children: [
1027
1028
  /* @__PURE__ */ jsx16(
1028
1029
  "button",
@@ -4775,7 +4776,7 @@ import {
4775
4776
 
4776
4777
  // templates/DayNightTransition/webflowDayNightV2Ix.ts
4777
4778
  var DESC_SWATCH = { r: 24, g: 28, b: 37 };
4778
- var BODY_TEXT = { r: 51, g: 51, b: 51 };
4779
+ var DAY_TEXT = { r: 0, g: 0, b: 0 };
4779
4780
  var rgb = (r, g, b) => `rgb(${r},${g},${b})`;
4780
4781
  var lerp = (a, b, u) => a + (b - a) * u;
4781
4782
  var seg = (t, t0, t1, v0, v1) => {
@@ -4785,33 +4786,33 @@ var seg = (t, t0, t1, v0, v1) => {
4785
4786
  };
4786
4787
  function webflowV2DescriptionColor(t, media) {
4787
4788
  if (media === "desktop") {
4788
- const body2 = rgb(BODY_TEXT.r, BODY_TEXT.g, BODY_TEXT.b);
4789
+ const day2 = rgb(DAY_TEXT.r, DAY_TEXT.g, DAY_TEXT.b);
4789
4790
  const dark2 = rgb(DESC_SWATCH.r, DESC_SWATCH.g, DESC_SWATCH.b);
4790
4791
  const white2 = rgb(255, 255, 255);
4791
- if (t < 0.49) return body2;
4792
+ if (t < 0.49) return day2;
4792
4793
  if (t < 0.5) return dark2;
4793
4794
  return white2;
4794
4795
  }
4795
4796
  const white = rgb(255, 255, 255);
4796
4797
  const dark = rgb(DESC_SWATCH.r, DESC_SWATCH.g, DESC_SWATCH.b);
4797
- const body = rgb(BODY_TEXT.r, BODY_TEXT.g, BODY_TEXT.b);
4798
- if (t < 0.58) return body;
4798
+ const day = rgb(DAY_TEXT.r, DAY_TEXT.g, DAY_TEXT.b);
4799
+ if (t < 0.58) return day;
4799
4800
  if (t < 0.59) return dark;
4800
4801
  return white;
4801
4802
  }
4802
4803
  function webflowV2TitleColor(t, media) {
4803
4804
  if (media === "desktop") {
4804
- const body2 = rgb(BODY_TEXT.r, BODY_TEXT.g, BODY_TEXT.b);
4805
+ const day2 = rgb(DAY_TEXT.r, DAY_TEXT.g, DAY_TEXT.b);
4805
4806
  const black = rgb(0, 0, 0);
4806
4807
  const white2 = rgb(255, 255, 255);
4807
- if (t < 0.51) return body2;
4808
+ if (t < 0.51) return day2;
4808
4809
  if (t >= 0.52) return white2;
4809
4810
  return seg(t, 0.51, 0.52, black, white2);
4810
4811
  }
4811
4812
  const dark = rgb(DESC_SWATCH.r, DESC_SWATCH.g, DESC_SWATCH.b);
4812
4813
  const white = rgb(255, 255, 255);
4813
- const body = rgb(BODY_TEXT.r, BODY_TEXT.g, BODY_TEXT.b);
4814
- if (t < 0.6) return body;
4814
+ const day = rgb(DAY_TEXT.r, DAY_TEXT.g, DAY_TEXT.b);
4815
+ if (t < 0.6) return day;
4815
4816
  if (t >= 0.61) return white;
4816
4817
  const u = (t - 0.6) / 0.01;
4817
4818
  return rgb(
@@ -4884,6 +4885,7 @@ var DayNightTransition = ({
4884
4885
  const [nightMarginStart, setNightMarginStart] = useState13("0px");
4885
4886
  const [nightMarginEnd, setNightMarginEnd] = useState13("0px");
4886
4887
  const [ixMedia, setIxMedia] = useState13("desktop");
4888
+ const [isRtl, setIsRtl] = useState13(false);
4887
4889
  const webflowV2 = scrollPreset === "webflow-day-night-v2";
4888
4890
  useEffect11(() => {
4889
4891
  const mq = window.matchMedia("(max-width: 991px)");
@@ -4892,6 +4894,21 @@ var DayNightTransition = ({
4892
4894
  mq.addEventListener("change", sync);
4893
4895
  return () => mq.removeEventListener("change", sync);
4894
4896
  }, []);
4897
+ useEffect11(() => {
4898
+ const syncRtl = () => {
4899
+ const doc = document.documentElement;
4900
+ setIsRtl(
4901
+ doc.getAttribute("dir") === "rtl" || doc.lang.toLowerCase().startsWith("ar")
4902
+ );
4903
+ };
4904
+ syncRtl();
4905
+ const mo = new MutationObserver(syncRtl);
4906
+ mo.observe(document.documentElement, {
4907
+ attributes: true,
4908
+ attributeFilter: ["dir", "lang"]
4909
+ });
4910
+ return () => mo.disconnect();
4911
+ }, []);
4895
4912
  const MotionHeadline = headlineLevel === "h1" ? motion3.h1 : motion3.h2;
4896
4913
  useLayoutEffect2(() => {
4897
4914
  if (!inlineDayNightHeadline) return;
@@ -4913,8 +4930,14 @@ var DayNightTransition = ({
4913
4930
  const ro = new ResizeObserver(syncNightPull);
4914
4931
  if (dayWordRef.current) ro.observe(dayWordRef.current);
4915
4932
  window.addEventListener("resize", syncNightPull);
4933
+ const mo = new MutationObserver(syncNightPull);
4934
+ mo.observe(document.documentElement, {
4935
+ attributes: true,
4936
+ attributeFilter: ["dir", "lang"]
4937
+ });
4916
4938
  return () => {
4917
4939
  ro.disconnect();
4940
+ mo.disconnect();
4918
4941
  window.removeEventListener("resize", syncNightPull);
4919
4942
  };
4920
4943
  }, [
@@ -4974,7 +4997,7 @@ var DayNightTransition = ({
4974
4997
  const v2NightWordOp = useTransform2(progress, (t) => webflowV2NightWordOpacity(t, ixMedia));
4975
4998
  const v2DayHeight = useTransform2(
4976
4999
  progress,
4977
- (t) => ixMedia === "mobile" ? `${webflowV2DayClipPercent(t, ixMedia)}%` : "100vh"
5000
+ (t) => ixMedia === "mobile" || isRtl ? `${webflowV2DayClipPercent(t, "mobile")}%` : "100vh"
4978
5001
  );
4979
5002
  const hasDescription = Boolean(dayDescription || nightDescription);
4980
5003
  const useInlineHeadline = Boolean(inlineDayNightHeadline);
@@ -4996,19 +5019,23 @@ var DayNightTransition = ({
4996
5019
  motion3.div,
4997
5020
  {
4998
5021
  className: "dnt__v2-bg-day trade-day-night_background-day is-alternative",
4999
- style: {
5000
- backgroundImage: `url(${dayImageUrl})`,
5001
- height: v2DayHeight
5002
- }
5022
+ style: { height: v2DayHeight },
5023
+ children: /* @__PURE__ */ jsx36(
5024
+ "div",
5025
+ {
5026
+ className: "dnt__v2-bg-media",
5027
+ style: { backgroundImage: `url(${dayImageUrl})` }
5028
+ }
5029
+ )
5003
5030
  }
5004
5031
  ),
5005
- /* @__PURE__ */ jsx36(
5032
+ /* @__PURE__ */ jsx36("div", { className: "dnt__v2-bg-night trade-day-night_background-night is-alternative", children: /* @__PURE__ */ jsx36(
5006
5033
  "div",
5007
5034
  {
5008
- className: "dnt__v2-bg-night trade-day-night_background-night is-alternative",
5035
+ className: "dnt__v2-bg-media",
5009
5036
  style: { backgroundImage: `url(${nightImageUrl})` }
5010
5037
  }
5011
- )
5038
+ ) })
5012
5039
  ] }),
5013
5040
  /* @__PURE__ */ jsxs33("div", { className: webflowV2 ? "dnt__sticky dnt__sticky--webflow-v2" : "dnt__sticky", children: [
5014
5041
  !webflowV2 && /* @__PURE__ */ jsxs33(Fragment5, { children: [
@@ -7271,6 +7298,9 @@ var CoralBanner = ({
7271
7298
  ] }) }) });
7272
7299
  };
7273
7300
 
7301
+ // templates/FeatureAwards/FeatureAwards.tsx
7302
+ import { useEffect as useEffect17, useState as useState19 } from "react";
7303
+
7274
7304
  // assets/award-leaf-left.png
7275
7305
  var award_leaf_left_default = "data:image/png;base64,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";
7276
7306
 
@@ -7312,9 +7342,12 @@ var LaurelIcon = ({ side }) => /* @__PURE__ */ jsx52(
7312
7342
  draggable: false
7313
7343
  }
7314
7344
  );
7315
- var AwardBadge2 = ({ award }) => /* @__PURE__ */ jsxs48("div", { className: "fa__item", role: "listitem", children: [
7345
+ var AwardBadge2 = ({
7346
+ award,
7347
+ textDir
7348
+ }) => /* @__PURE__ */ jsxs48("div", { className: "fa__item", role: "listitem", dir: "ltr", children: [
7316
7349
  /* @__PURE__ */ jsx52(LaurelIcon, { side: "left" }),
7317
- /* @__PURE__ */ jsxs48("div", { className: "fa__item-text", children: [
7350
+ /* @__PURE__ */ jsxs48("div", { className: "fa__item-text", dir: textDir, children: [
7318
7351
  /* @__PURE__ */ jsx52("p", { className: "fa__item-title", children: award.title }),
7319
7352
  /* @__PURE__ */ jsx52("p", { className: "fa__item-subtitle", children: award.subtitle })
7320
7353
  ] }),
@@ -7327,6 +7360,21 @@ var FeatureAwards = ({
7327
7360
  className,
7328
7361
  ...props
7329
7362
  }) => {
7363
+ const [textDir, setTextDir] = useState19("ltr");
7364
+ useEffect17(() => {
7365
+ const sync = () => {
7366
+ setTextDir(
7367
+ document.documentElement.getAttribute("dir") === "rtl" ? "rtl" : "ltr"
7368
+ );
7369
+ };
7370
+ sync();
7371
+ const mo = new MutationObserver(sync);
7372
+ mo.observe(document.documentElement, {
7373
+ attributes: true,
7374
+ attributeFilter: ["dir"]
7375
+ });
7376
+ return () => mo.disconnect();
7377
+ }, []);
7330
7378
  if (!awards || awards.length === 0) return null;
7331
7379
  const trackStyle = {
7332
7380
  "--fa-duration": `${autoScrollDuration}s`
@@ -7338,16 +7386,16 @@ var FeatureAwards = ({
7338
7386
  ...props,
7339
7387
  children: /* @__PURE__ */ jsxs48("div", { className: "fa__inner", children: [
7340
7388
  title && /* @__PURE__ */ jsx52("h2", { className: "fa__title", children: title }),
7341
- /* @__PURE__ */ jsx52("div", { className: "fa__grid", role: "list", children: awards.map((award, i) => /* @__PURE__ */ jsx52(AwardBadge2, { award }, `g-${i}`)) }),
7342
- /* @__PURE__ */ jsx52("div", { className: "fa__scroller", children: /* @__PURE__ */ jsxs48("div", { className: "fa__track fa__track--auto", style: trackStyle, children: [
7343
- /* @__PURE__ */ jsx52("div", { className: "fa__track-group", role: "list", children: awards.map((award, i) => /* @__PURE__ */ jsx52(AwardBadge2, { award }, `m-${i}`)) }),
7389
+ /* @__PURE__ */ jsx52("div", { className: "fa__grid", role: "list", children: awards.map((award, i) => /* @__PURE__ */ jsx52(AwardBadge2, { award, textDir }, `g-${i}`)) }),
7390
+ /* @__PURE__ */ jsx52("div", { className: "fa__scroller", dir: "ltr", children: /* @__PURE__ */ jsxs48("div", { className: "fa__track fa__track--auto", style: trackStyle, children: [
7391
+ /* @__PURE__ */ jsx52("div", { className: "fa__track-group", role: "list", children: awards.map((award, i) => /* @__PURE__ */ jsx52(AwardBadge2, { award, textDir }, `m-${i}`)) }),
7344
7392
  /* @__PURE__ */ jsx52(
7345
7393
  "div",
7346
7394
  {
7347
7395
  className: "fa__track-group",
7348
7396
  role: "presentation",
7349
7397
  "aria-hidden": "true",
7350
- children: awards.map((award, i) => /* @__PURE__ */ jsx52(AwardBadge2, { award }, `m-dup-${i}`))
7398
+ children: awards.map((award, i) => /* @__PURE__ */ jsx52(AwardBadge2, { award, textDir }, `m-dup-${i}`))
7351
7399
  }
7352
7400
  )
7353
7401
  ] }) })
@@ -7434,7 +7482,7 @@ var FeatureBlog = ({
7434
7482
  };
7435
7483
 
7436
7484
  // templates/FeatureBlogCategories/FeatureBlogCategories.tsx
7437
- import { useMemo as useMemo3, useState as useState19 } from "react";
7485
+ import { useMemo as useMemo3, useState as useState20 } from "react";
7438
7486
  import { jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
7439
7487
  var isExternalUrl = (href) => Boolean(href && /^https?:\/\//i.test(href));
7440
7488
  var FEATURE_BLOG_CATEGORIES_TEXT_CONTENT = {
@@ -7498,8 +7546,8 @@ var FeatureBlogCategories = ({
7498
7546
  className,
7499
7547
  ...props
7500
7548
  }) => {
7501
- const [search, setSearch] = useState19("");
7502
- const [internalActiveId, setInternalActiveId] = useState19(defaultActiveCategoryId ?? allCategoryId);
7549
+ const [search, setSearch] = useState20("");
7550
+ const [internalActiveId, setInternalActiveId] = useState20(defaultActiveCategoryId ?? allCategoryId);
7503
7551
  const isControlled = activeCategoryId !== void 0;
7504
7552
  const activeId = isControlled ? activeCategoryId : internalActiveId;
7505
7553
  const tabs = useMemo3(
@@ -7607,7 +7655,7 @@ var HelpCentreCategories = ({
7607
7655
  };
7608
7656
 
7609
7657
  // templates/HelpCentreSubCategories/HelpCentreSubCategories.tsx
7610
- import { useMemo as useMemo4, useState as useState20 } from "react";
7658
+ import { useMemo as useMemo4, useState as useState21 } from "react";
7611
7659
  import { jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
7612
7660
  var externalLinkRel4 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
7613
7661
  var QuestionCard = ({ item }) => {
@@ -7624,7 +7672,7 @@ var HelpCentreSubCategories = ({
7624
7672
  noResultsText = 'No results found for "{query}"',
7625
7673
  onSearchChange
7626
7674
  }) => {
7627
- const [search, setSearch] = useState20("");
7675
+ const [search, setSearch] = useState21("");
7628
7676
  const filtered = useMemo4(() => {
7629
7677
  const q = search.trim().toLowerCase();
7630
7678
  if (!q) return items;
@@ -7656,7 +7704,7 @@ var HelpCentreSubCategories = ({
7656
7704
  };
7657
7705
 
7658
7706
  // templates/HelpCenterPage/HelpCenterPage.tsx
7659
- import { useMemo as useMemo5, useState as useState21 } from "react";
7707
+ import { useMemo as useMemo5, useState as useState22 } from "react";
7660
7708
  import { jsx as jsx57, jsxs as jsxs53 } from "react/jsx-runtime";
7661
7709
  var externalLinkRel5 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
7662
7710
  var ChevronDownIcon5 = () => /* @__PURE__ */ jsx57("svg", { "aria-hidden": "true", fill: "none", height: "16", viewBox: "0 0 16 16", width: "16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx57("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) });
@@ -7722,9 +7770,9 @@ var HelpCenterPage = ({
7722
7770
  articlesSheetTitle = "Articles in this section",
7723
7771
  className
7724
7772
  }) => {
7725
- const [search, setSearch] = useState21("");
7726
- const [internalActiveId, setInternalActiveId] = useState21(defaultActiveQuestionId ?? questions[0]?.id);
7727
- const [sheetOpen, setSheetOpen] = useState21(false);
7773
+ const [search, setSearch] = useState22("");
7774
+ const [internalActiveId, setInternalActiveId] = useState22(defaultActiveQuestionId ?? questions[0]?.id);
7775
+ const [sheetOpen, setSheetOpen] = useState22(false);
7728
7776
  const isControlled = activeQuestionId !== void 0;
7729
7777
  const activeId = isControlled ? activeQuestionId : internalActiveId;
7730
7778
  const activeItem = questions.find((item) => item.id === activeId);
@@ -7791,7 +7839,7 @@ var HelpCenterPage = ({
7791
7839
  };
7792
7840
 
7793
7841
  // templates/FeatureBlogPage/FeatureBlogPage.tsx
7794
- import { useEffect as useEffect17, useMemo as useMemo6, useState as useState22 } from "react";
7842
+ import { useEffect as useEffect18, useMemo as useMemo6, useState as useState23 } from "react";
7795
7843
 
7796
7844
  // assets/share-link.png
7797
7845
  var share_link_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABYklEQVR4AezVgU3DMBAFUMRAzMEQzMEQzMEQzMFE+FX5kuNGF4cgIVWp8us73/n/76vaPj/98+sycE3gmsBDTuCl/bQELayfv5zAW5P6avgYwEzb2n7OGBiJGYjK9xLoYWhJ75ffGCCUm2bF/N7e4HVZxS28Pc7cgvHtiAG3ITiSZd+tIRrizyXRs4TrZdYAgowyxG4IcqyjMXupOS+/w4wBh3txoojsqUVky0D20uPcCnsGCBByCEnEe2JjVtOj3wpiEKcuXmHPwJZ4SBEhloM8kPdnmUxttVYGeoLcfHV4SJiBUbw8WxkI/+ieSGo+CoL29IkPGa8MIIvQuBKz1xvQf0gcQWXArfQgtvZgoK8zAnrUyrFrCmYMIAZnmBEDEWAECAd6p1AZ6MkI+hU0YjEQIMwE9P1qU6gMIAgpITlkT3waewYIEHRDfzIgB7XTmDFwWqQiuAxcE3j8CVTfALUfAAAA//85/ClxAAAABklEQVQDABFpTkF24Li2AAAAAElFTkSuQmCC";
@@ -7848,7 +7896,7 @@ var TocCard = ({
7848
7896
  idSuffix,
7849
7897
  collapsible
7850
7898
  }) => {
7851
- const [open, setOpen] = useState22(defaultOpen);
7899
+ const [open, setOpen] = useState23(defaultOpen);
7852
7900
  const panelId = `fbp-toc-panel-${idSuffix}`;
7853
7901
  const isOpen = collapsible ? open : true;
7854
7902
  const list = /* @__PURE__ */ jsx58("ol", { className: "fbp-tocList", id: panelId, children: headings.map((heading) => /* @__PURE__ */ jsx58("li", { className: "fbp-tocItem", children: /* @__PURE__ */ jsx58(
@@ -7890,7 +7938,7 @@ var ShareRow = ({
7890
7938
  onShare,
7891
7939
  copiedLabel
7892
7940
  }) => {
7893
- const [copied, setCopied] = useState22(false);
7941
+ const [copied, setCopied] = useState23(false);
7894
7942
  const handleCopy = async () => {
7895
7943
  onShare?.("copy");
7896
7944
  try {
@@ -8000,8 +8048,8 @@ var FeatureBlogPage = ({
8000
8048
  ).map(({ block, i }) => ({ id: headingIds.get(i), text: block.text ?? "" })),
8001
8049
  [content, headingIds]
8002
8050
  );
8003
- const [activeId, setActiveId] = useState22(null);
8004
- useEffect17(() => {
8051
+ const [activeId, setActiveId] = useState23(null);
8052
+ useEffect18(() => {
8005
8053
  if (typeof IntersectionObserver === "undefined" || headings.length === 0) return;
8006
8054
  const elements = headings.map((heading) => document.getElementById(heading.id)).filter((el) => el !== null);
8007
8055
  if (elements.length === 0) return;
@@ -8215,7 +8263,7 @@ var ParallaxBanner = ({
8215
8263
  };
8216
8264
 
8217
8265
  // templates/TradingCalculator/TradingCalculator.tsx
8218
- import { useCallback as useCallback6, useEffect as useEffect18, useId as useId6, useMemo as useMemo7, useRef as useRef21, useState as useState23 } from "react";
8266
+ import { useCallback as useCallback6, useEffect as useEffect19, useId as useId6, useMemo as useMemo7, useRef as useRef21, useState as useState24 } from "react";
8219
8267
 
8220
8268
  // templates/TradingCalculator/TradingCalculator.types.ts
8221
8269
  var DEFAULT_TRADING_CALCULATOR_LABELS = {
@@ -8306,7 +8354,7 @@ function useExchangeRates(wsUrl) {
8306
8354
  /* @__PURE__ */ new Map()
8307
8355
  );
8308
8356
  const cacheRef = useRef21(/* @__PURE__ */ new Map());
8309
- useEffect18(() => {
8357
+ useEffect19(() => {
8310
8358
  const pending = pendingRef.current;
8311
8359
  return () => {
8312
8360
  socketRef.current?.close();
@@ -8377,11 +8425,11 @@ function useExchangeRates(wsUrl) {
8377
8425
  return getRates;
8378
8426
  }
8379
8427
  function useSymbols(symbolsProp, endpoint) {
8380
- const [state, setState] = useState23(
8428
+ const [state, setState] = useState24(
8381
8429
  symbolsProp ? { status: "ready", data: symbolsProp } : { status: "loading" }
8382
8430
  );
8383
- const [retryToken, setRetryToken] = useState23(0);
8384
- useEffect18(() => {
8431
+ const [retryToken, setRetryToken] = useState24(0);
8432
+ useEffect19(() => {
8385
8433
  if (symbolsProp) {
8386
8434
  setState({ status: "ready", data: symbolsProp });
8387
8435
  return;
@@ -8433,9 +8481,9 @@ var SymbolCombobox = ({
8433
8481
  inputId,
8434
8482
  copy
8435
8483
  }) => {
8436
- const [query, setQuery] = useState23("");
8437
- const [isOpen, setIsOpen] = useState23(false);
8438
- const [activeIndex, setActiveIndex] = useState23(-1);
8484
+ const [query, setQuery] = useState24("");
8485
+ const [isOpen, setIsOpen] = useState24(false);
8486
+ const [activeIndex, setActiveIndex] = useState24(-1);
8439
8487
  const wrapperRef = useRef21(null);
8440
8488
  const listboxId = useId6();
8441
8489
  const isLoading = symbolsState.status === "loading";
@@ -8450,7 +8498,7 @@ var SymbolCombobox = ({
8450
8498
  }, [allSymbols, query]);
8451
8499
  const grouped = useMemo7(() => groupByAssetClass(filtered), [filtered]);
8452
8500
  const flatOptions = useMemo7(() => grouped.flatMap(([, items]) => items), [grouped]);
8453
- useEffect18(() => {
8501
+ useEffect19(() => {
8454
8502
  if (!isOpen) return;
8455
8503
  const handlePointerDown = (event) => {
8456
8504
  if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
@@ -8592,15 +8640,15 @@ var TradingCalculator = ({
8592
8640
  const showTradeVolume = variant === "main";
8593
8641
  const [symbolsState, retrySymbols] = useSymbols(symbolsProp, symbolsEndpoint);
8594
8642
  const getRates = useExchangeRates(exchangeRateWsUrl);
8595
- const [selectedSymbol, setSelectedSymbol] = useState23(null);
8596
- const [volumeInLots, setVolumeInLots] = useState23("");
8597
- const [assetPrice, setAssetPrice] = useState23("");
8598
- const [errors, setErrors] = useState23({});
8599
- const [results, setResults] = useState23(null);
8600
- const [isCalculating, setIsCalculating] = useState23(false);
8601
- const [calcError, setCalcError] = useState23(null);
8643
+ const [selectedSymbol, setSelectedSymbol] = useState24(null);
8644
+ const [volumeInLots, setVolumeInLots] = useState24("");
8645
+ const [assetPrice, setAssetPrice] = useState24("");
8646
+ const [errors, setErrors] = useState24({});
8647
+ const [results, setResults] = useState24(null);
8648
+ const [isCalculating, setIsCalculating] = useState24(false);
8649
+ const [calcError, setCalcError] = useState24(null);
8602
8650
  const didPreselect = useRef21(false);
8603
- useEffect18(() => {
8651
+ useEffect19(() => {
8604
8652
  if (didPreselect.current || !defaultSymbol || symbolsState.status !== "ready") return;
8605
8653
  const match = symbolsState.data.find((item) => item.symbol === defaultSymbol);
8606
8654
  if (match) {
@@ -8810,7 +8858,7 @@ var TradingCalculator = ({
8810
8858
  };
8811
8859
 
8812
8860
  // templates/TradingCalculatorHowTo/TradingCalculatorHowTo.tsx
8813
- import { Fragment as Fragment12, useEffect as useEffect19, useLayoutEffect as useLayoutEffect3, useRef as useRef22, useState as useState24 } from "react";
8861
+ import { Fragment as Fragment12, useEffect as useEffect20, useLayoutEffect as useLayoutEffect3, useRef as useRef22, useState as useState25 } from "react";
8814
8862
 
8815
8863
  // templates/TradingCalculatorHowTo/TradingCalculatorHowTo.types.ts
8816
8864
  var DEFAULT_TRADING_CALCULATOR_HOWTO_LABELS = {
@@ -9011,7 +9059,7 @@ function swapTabsForLabels(labels) {
9011
9059
  { id: "percentage", label: percentage }
9012
9060
  ];
9013
9061
  }
9014
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect3 : useEffect19;
9062
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect3 : useEffect20;
9015
9063
  var FormulaBlockView = ({ block }) => {
9016
9064
  if (block.type === "footnote") {
9017
9065
  return /* @__PURE__ */ jsx61("p", { className: "tchow-footnote", children: block.content });
@@ -9035,7 +9083,7 @@ var ConnectorArrow = () => /* @__PURE__ */ jsxs57("svg", { width: "8", height: "
9035
9083
  var CalculationStrip = ({ tokens }) => {
9036
9084
  const wrapperRef = useRef22(null);
9037
9085
  const stripRef = useRef22(null);
9038
- const [fit, setFit] = useState24({ scale: 1, naturalHeight: 0 });
9086
+ const [fit, setFit] = useState25({ scale: 1, naturalHeight: 0 });
9039
9087
  useIsomorphicLayoutEffect(() => {
9040
9088
  const wrapper = wrapperRef.current;
9041
9089
  const strip = stripRef.current;
@@ -9119,8 +9167,8 @@ var TradingCalculatorHowTo = ({
9119
9167
  ...props
9120
9168
  }) => {
9121
9169
  const isSwap = variant === "swap-points" || variant === "swap-percentage";
9122
- const [swapTab, setSwapTab] = useState24(() => swapModeForVariant(variant));
9123
- useEffect19(() => {
9170
+ const [swapTab, setSwapTab] = useState25(() => swapModeForVariant(variant));
9171
+ useEffect20(() => {
9124
9172
  setSwapTab(swapModeForVariant(variant));
9125
9173
  }, [variant]);
9126
9174
  const baseContent = variant === "pip" ? PIP_CONTENT : isSwap ? swapTab === "percentage" ? SWAP_PERCENTAGE_CONTENT : SWAP_POINTS_CONTENT : MARGIN_CONTENT;
@@ -9165,11 +9213,11 @@ var TradingCalculatorHowTo = ({
9165
9213
  // templates/CryptoTradeConverter/CryptoTradeConverter.tsx
9166
9214
  import {
9167
9215
  useCallback as useCallback7,
9168
- useEffect as useEffect21,
9216
+ useEffect as useEffect22,
9169
9217
  useId as useId7,
9170
9218
  useMemo as useMemo8,
9171
9219
  useRef as useRef23,
9172
- useState as useState26
9220
+ useState as useState27
9173
9221
  } from "react";
9174
9222
 
9175
9223
  // templates/cryptoMarketData/origins.ts
@@ -10005,7 +10053,7 @@ function getSharedMarketDataClient(apiOrigin) {
10005
10053
  }
10006
10054
 
10007
10055
  // templates/cryptoMarketData/useCryptoMarketData.ts
10008
- import { useEffect as useEffect20, useState as useState25 } from "react";
10056
+ import { useEffect as useEffect21, useState as useState26 } from "react";
10009
10057
  var EMPTY = {
10010
10058
  kind: "spot",
10011
10059
  status: "idle",
@@ -10018,8 +10066,8 @@ var EMPTY = {
10018
10066
  };
10019
10067
  function useCryptoMarketData(options) {
10020
10068
  const { kind, kline, apiOrigin, enabled = true } = options;
10021
- const [snapshot, setSnapshot] = useState25({ ...EMPTY, kind });
10022
- useEffect20(() => {
10069
+ const [snapshot, setSnapshot] = useState26({ ...EMPTY, kind });
10070
+ useEffect21(() => {
10023
10071
  if (!enabled || typeof window === "undefined") return;
10024
10072
  const client = getSharedMarketDataClient(apiOrigin);
10025
10073
  return client.subscribe({ kind, kline }, setSnapshot);
@@ -10069,7 +10117,7 @@ function matchPair(rows, defaultPair) {
10069
10117
  return rows.find((r) => r.id === needle) ?? rows.find((r) => r.name.toLowerCase() === needle) ?? rows.find((r) => r.name.replace("/", "").toLowerCase() === needle.replace("/", "")) ?? rows[0] ?? null;
10070
10118
  }
10071
10119
  function CoinAvatar({ base, icon, label }) {
10072
- const [failed, setFailed] = useState26(false);
10120
+ const [failed, setFailed] = useState27(false);
10073
10121
  if (failed) {
10074
10122
  return /* @__PURE__ */ jsx62("span", { className: "ctc-avatar ctc-avatar--fallback", "aria-hidden": "true", children: base.slice(0, 3) });
10075
10123
  }
@@ -10125,18 +10173,18 @@ var CryptoTradeConverter = ({
10125
10173
  const statusId = `ctc-status-${reactId}`;
10126
10174
  const snapshot = useCryptoMarketData({ kind: "spot", kline: false, apiOrigin });
10127
10175
  const rows = useMemo8(() => [...snapshot.rows.values()], [snapshot.rows]);
10128
- const [side, setSide] = useState26("buy");
10129
- const [selectedId, setSelectedId] = useState26(null);
10130
- const [pay, setPay] = useState26("");
10131
- const [receive, setReceive] = useState26("");
10132
- const [edited, setEdited] = useState26("pay");
10133
- const [pickerOpen, setPickerOpen] = useState26(false);
10134
- const [activeOption, setActiveOption] = useState26(0);
10176
+ const [side, setSide] = useState27("buy");
10177
+ const [selectedId, setSelectedId] = useState27(null);
10178
+ const [pay, setPay] = useState27("");
10179
+ const [receive, setReceive] = useState27("");
10180
+ const [edited, setEdited] = useState27("pay");
10181
+ const [pickerOpen, setPickerOpen] = useState27(false);
10182
+ const [activeOption, setActiveOption] = useState27(0);
10135
10183
  const rootRef = useRef23(null);
10136
10184
  const buttonRef = useRef23(null);
10137
10185
  const listRef = useRef23(null);
10138
10186
  const selected = (selectedId ? rows.find((r) => r.id === selectedId) : null) ?? matchPair(rows, defaultPair);
10139
- useEffect21(() => {
10187
+ useEffect22(() => {
10140
10188
  if (!selectedId && selected) setSelectedId(selected.id);
10141
10189
  }, [selected, selectedId]);
10142
10190
  const conversion = useMemo8(
@@ -10153,7 +10201,7 @@ var CryptoTradeConverter = ({
10153
10201
  }),
10154
10202
  [side, selected?.last, pay, receive, edited, copy.waitingForPrice, copy.invalidAmount]
10155
10203
  );
10156
- useEffect21(() => {
10204
+ useEffect22(() => {
10157
10205
  if (edited === "pay") setReceive(conversion.receive);
10158
10206
  else setPay(conversion.pay);
10159
10207
  }, [conversion.pay, conversion.receive, edited]);
@@ -10162,7 +10210,7 @@ var CryptoTradeConverter = ({
10162
10210
  setPickerOpen(false);
10163
10211
  buttonRef.current?.focus();
10164
10212
  }, []);
10165
- useEffect21(() => {
10213
+ useEffect22(() => {
10166
10214
  if (!pickerOpen) return;
10167
10215
  const onDoc = (event) => {
10168
10216
  if (!rootRef.current?.contains(event.target)) setPickerOpen(false);
@@ -10210,7 +10258,7 @@ var CryptoTradeConverter = ({
10210
10258
  closePicker();
10211
10259
  }
10212
10260
  };
10213
- useEffect21(() => {
10261
+ useEffect22(() => {
10214
10262
  if (!pickerOpen) return;
10215
10263
  listRef.current?.querySelectorAll('[role="option"]')[activeOption]?.scrollIntoView({
10216
10264
  block: "nearest"
@@ -10472,7 +10520,7 @@ var CryptoTradeConverter = ({
10472
10520
  };
10473
10521
 
10474
10522
  // templates/CryptoMarketsTable/CryptoMarketsTable.tsx
10475
- import { useEffect as useEffect22, useId as useId8, useMemo as useMemo9, useRef as useRef24, useState as useState27 } from "react";
10523
+ import { useEffect as useEffect23, useId as useId8, useMemo as useMemo9, useRef as useRef24, useState as useState28 } from "react";
10476
10524
 
10477
10525
  // templates/CryptoMarketsTable/CryptoMarketsTable.types.ts
10478
10526
  var DEFAULT_CRYPTO_MARKETS_TABLE_TITLE = "Explore the markets";
@@ -10505,7 +10553,7 @@ function mergeLabels3(overrides) {
10505
10553
  return { ...DEFAULT_CRYPTO_MARKETS_TABLE_LABELS, ...overrides };
10506
10554
  }
10507
10555
  function CoinAvatar2({ base, icon }) {
10508
- const [failed, setFailed] = useState27(false);
10556
+ const [failed, setFailed] = useState28(false);
10509
10557
  if (failed) {
10510
10558
  return /* @__PURE__ */ jsx63("span", { className: "cmt-avatar cmt-avatar--fallback", "aria-hidden": "true", children: base.slice(0, 3) });
10511
10559
  }
@@ -10530,7 +10578,7 @@ function Sparkline({
10530
10578
  reducedMotion
10531
10579
  }) {
10532
10580
  const canvasRef = useRef24(null);
10533
- useEffect22(() => {
10581
+ useEffect23(() => {
10534
10582
  const canvas = canvasRef.current;
10535
10583
  if (!canvas) return;
10536
10584
  const points = values.map(Number).filter(Number.isFinite);
@@ -10615,15 +10663,15 @@ var CryptoMarketsTable = ({
10615
10663
  }) => {
10616
10664
  const copy = mergeLabels3(labelsProp);
10617
10665
  const reactId = useId8().replace(/:/g, "");
10618
- const [kind, setKind] = useState27(initialMarket);
10619
- const [quote, setQuote] = useState27(initialQuoteCurrency.toUpperCase());
10620
- const [sortKey, setSortKey] = useState27("last");
10621
- const [sortDir, setSortDir] = useState27("desc");
10622
- const [reducedMotion, setReducedMotion] = useState27(false);
10666
+ const [kind, setKind] = useState28(initialMarket);
10667
+ const [quote, setQuote] = useState28(initialQuoteCurrency.toUpperCase());
10668
+ const [sortKey, setSortKey] = useState28("last");
10669
+ const [sortDir, setSortDir] = useState28("desc");
10670
+ const [reducedMotion, setReducedMotion] = useState28(false);
10623
10671
  const scrollRef = useRef24(null);
10624
- const [scrolled, setScrolled] = useState27(false);
10672
+ const [scrolled, setScrolled] = useState28(false);
10625
10673
  const snapshot = useCryptoMarketData({ kind, kline: true, apiOrigin });
10626
- useEffect22(() => {
10674
+ useEffect23(() => {
10627
10675
  if (typeof window === "undefined") return;
10628
10676
  const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
10629
10677
  const update = () => setReducedMotion(mq.matches);
@@ -10631,7 +10679,7 @@ var CryptoMarketsTable = ({
10631
10679
  mq.addEventListener?.("change", update);
10632
10680
  return () => mq.removeEventListener?.("change", update);
10633
10681
  }, []);
10634
- useEffect22(() => {
10682
+ useEffect23(() => {
10635
10683
  const node = scrollRef.current;
10636
10684
  if (!node) return;
10637
10685
  const onScroll = () => setScrolled(node.scrollLeft > 0);
@@ -10639,7 +10687,7 @@ var CryptoMarketsTable = ({
10639
10687
  node.addEventListener("scroll", onScroll, { passive: true });
10640
10688
  return () => node.removeEventListener("scroll", onScroll);
10641
10689
  }, []);
10642
- useEffect22(() => {
10690
+ useEffect23(() => {
10643
10691
  if (snapshot.quotes.length && !snapshot.quotes.includes(quote)) {
10644
10692
  setQuote(snapshot.quotes[0]);
10645
10693
  }
@@ -10779,7 +10827,7 @@ var CryptoMarketsTable = ({
10779
10827
  };
10780
10828
 
10781
10829
  // templates/FeatureOffices/FeatureOffices.tsx
10782
- import { useMemo as useMemo10, useState as useState28 } from "react";
10830
+ import { useMemo as useMemo10, useState as useState29 } from "react";
10783
10831
  import { jsx as jsx64, jsxs as jsxs60 } from "react/jsx-runtime";
10784
10832
  var isExternalUrl2 = (href) => Boolean(href && /^https?:\/\//i.test(href));
10785
10833
  var FEATURE_OFFICES_TEXT_CONTENT = {
@@ -10833,7 +10881,7 @@ var FeatureOffices = ({
10833
10881
  className,
10834
10882
  ...props
10835
10883
  }) => {
10836
- const [internalActiveId, setInternalActiveId] = useState28(
10884
+ const [internalActiveId, setInternalActiveId] = useState29(
10837
10885
  defaultActiveRegionId ?? regions[0]?.id
10838
10886
  );
10839
10887
  const isControlled = activeRegionId !== void 0;
@@ -11097,10 +11145,10 @@ var ResourceBanner = ({
11097
11145
 
11098
11146
  // templates/OptionsTypes/OptionsTypes.tsx
11099
11147
  import {
11100
- useEffect as useEffect23,
11148
+ useEffect as useEffect24,
11101
11149
  useId as useId9,
11102
11150
  useRef as useRef25,
11103
- useState as useState29
11151
+ useState as useState30
11104
11152
  } from "react";
11105
11153
  import { Fragment as Fragment15, jsx as jsx69, jsxs as jsxs65 } from "react/jsx-runtime";
11106
11154
  var OPTIONS_TYPES_PLACEHOLDER_ITEMS = [
@@ -11308,10 +11356,10 @@ function TogglePanel({
11308
11356
  setPlaying
11309
11357
  }) {
11310
11358
  const animations = item.animations;
11311
- const [activeIndex, setActiveIndex] = useState29(0);
11359
+ const [activeIndex, setActiveIndex] = useState30(0);
11312
11360
  const switchRefs = useRef25([]);
11313
11361
  const safeIndex = Math.min(activeIndex, Math.max(animations.length - 1, 0));
11314
- useEffect23(() => {
11362
+ useEffect24(() => {
11315
11363
  setPlaying({});
11316
11364
  }, [safeIndex, setPlaying]);
11317
11365
  const hasMarkets = Boolean(item.markets && item.markets.length > 0);
@@ -11434,15 +11482,15 @@ function OptionsTypes({
11434
11482
  ...props
11435
11483
  }) {
11436
11484
  const usableItems = Array.isArray(items) ? items.filter((item) => item?.id) : [];
11437
- const [internalActiveId, setInternalActiveId] = useState29(
11485
+ const [internalActiveId, setInternalActiveId] = useState30(
11438
11486
  defaultActiveId ?? usableItems[0]?.id ?? ""
11439
11487
  );
11440
11488
  const selectedId = usableItems.find((item) => item.id === activeId)?.id ?? usableItems.find((item) => item.id === internalActiveId)?.id ?? usableItems[0]?.id ?? "";
11441
- const [playing, setPlaying] = useState29({});
11489
+ const [playing, setPlaying] = useState30({});
11442
11490
  const generatedId = useId9().replace(/:/g, "");
11443
11491
  const tabPrefix = `options-types-${generatedId}`;
11444
11492
  const Heading = headingLevel;
11445
- useEffect23(() => {
11493
+ useEffect24(() => {
11446
11494
  setPlaying({});
11447
11495
  }, [selectedId]);
11448
11496
  const selectItem = (id) => {
@@ -11858,7 +11906,7 @@ var CountryLinkGrid = ({
11858
11906
  };
11859
11907
 
11860
11908
  // templates/DocumentChips/DocumentChips.tsx
11861
- import { useState as useState30 } from "react";
11909
+ import { useState as useState31 } from "react";
11862
11910
  import { jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
11863
11911
  var DEFAULT_GROUPS = [
11864
11912
  {
@@ -11962,7 +12010,7 @@ var DocumentChips = ({
11962
12010
  }) => {
11963
12011
  const resolvedGroups = groups && groups.length > 0 ? groups : DEFAULT_GROUPS;
11964
12012
  const groupKeys = resolvedGroups.map((group, i) => String(group.id ?? i));
11965
- const [openKeys, setOpenKeys] = useState30(void 0);
12013
+ const [openKeys, setOpenKeys] = useState31(void 0);
11966
12014
  const resolvedOpenKeys = openKeys === void 0 ? groupKeys.slice(0, 1) : openKeys;
11967
12015
  const handleToggle = (key, next) => {
11968
12016
  setOpenKeys((current) => {
@@ -12013,7 +12061,7 @@ var DocumentChips = ({
12013
12061
  };
12014
12062
 
12015
12063
  // components/LinkModal/LinkModal.tsx
12016
- import { useCallback as useCallback8, useEffect as useEffect24, useId as useId10, useRef as useRef26 } from "react";
12064
+ import { useCallback as useCallback8, useEffect as useEffect25, useId as useId10, useRef as useRef26 } from "react";
12017
12065
  import { createPortal as createPortal2 } from "react-dom";
12018
12066
  import { jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
12019
12067
  var XMarkIcon3 = () => /* @__PURE__ */ jsx73(
@@ -12065,7 +12113,7 @@ var LinkModal = ({
12065
12113
  (el) => el.offsetParent !== null || el === document.activeElement
12066
12114
  );
12067
12115
  }, []);
12068
- useEffect24(() => {
12116
+ useEffect25(() => {
12069
12117
  if (!open || typeof document === "undefined") return;
12070
12118
  triggerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
12071
12119
  panelRef.current?.focus();
@@ -12075,7 +12123,7 @@ var LinkModal = ({
12075
12123
  if (trigger && document.contains(trigger)) trigger.focus();
12076
12124
  };
12077
12125
  }, [open]);
12078
- useEffect24(() => {
12126
+ useEffect25(() => {
12079
12127
  if (!open || typeof document === "undefined") return;
12080
12128
  const handleKeyDown = (event) => {
12081
12129
  if (event.key === "Escape") {
@@ -12086,7 +12134,7 @@ var LinkModal = ({
12086
12134
  document.addEventListener("keydown", handleKeyDown);
12087
12135
  return () => document.removeEventListener("keydown", handleKeyDown);
12088
12136
  }, [open, onClose]);
12089
- useEffect24(() => {
12137
+ useEffect25(() => {
12090
12138
  if (!open || typeof document === "undefined") return;
12091
12139
  const body = document.body;
12092
12140
  const previousOverflow = body.style.overflow;
@@ -12226,7 +12274,7 @@ var LanguageSelectModal = ({
12226
12274
  };
12227
12275
 
12228
12276
  // templates/AffiliatesSlider/AffiliatesSlider.tsx
12229
- import { useCallback as useCallback9, useMemo as useMemo11, useState as useState31 } from "react";
12277
+ import { useCallback as useCallback9, useMemo as useMemo11, useState as useState32 } from "react";
12230
12278
  import { jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
12231
12279
  var ArrowIcon2 = () => /* @__PURE__ */ jsx75(
12232
12280
  "svg",
@@ -12311,7 +12359,7 @@ var AffiliatesSlider = ({
12311
12359
  className,
12312
12360
  ...props
12313
12361
  }) => {
12314
- const [internalValue, setInternalValue] = useState31(defaultValue);
12362
+ const [internalValue, setInternalValue] = useState32(defaultValue);
12315
12363
  const currentValue = value ?? internalValue;
12316
12364
  const handleChange = useCallback9(
12317
12365
  (next) => {