@nuskin/nextgen-header 1.21.0 → 1.22.0
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/package-dist/index.js +980 -460
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +104827 -0
- package/package-dist/index.mjs.map +1 -0
- package/package.json +1 -1
package/package-dist/index.js
CHANGED
|
@@ -100564,62 +100564,62 @@ var colors = {
|
|
|
100564
100564
|
accentHover: "#0d9488"
|
|
100565
100565
|
};
|
|
100566
100566
|
var HeaderRoot = /*#__PURE__*/createStyled("header", true ? {
|
|
100567
|
-
target: "
|
|
100567
|
+
target: "e1607tyl40"
|
|
100568
100568
|
} : 0)("box-sizing:border-box;width:100%;font-family:\"Inter\",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;color:", colors.text, ";background:", colors.surface, ";border-bottom:1px solid ", colors.borderLight, ";*,*::before,*::after{box-sizing:border-box;}button{font:inherit;cursor:pointer;}button:disabled{cursor:not-allowed;opacity:0.55;}" + ( true ? "" : 0));
|
|
100569
100569
|
|
|
100570
100570
|
/** Logo (left) + utility + search (stacked right) */
|
|
100571
100571
|
var TopHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
100572
|
-
target: "
|
|
100572
|
+
target: "e1607tyl39"
|
|
100573
100573
|
} : 0)( true ? {
|
|
100574
|
-
name: "
|
|
100575
|
-
styles: "display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 0.5rem;padding:1rem clamp(1rem, 4vw, 2rem) 0.75rem;max-width:1440px;margin:0 auto;@media (min-width:
|
|
100574
|
+
name: "1dro8oz",
|
|
100575
|
+
styles: "display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 0.5rem;padding:1rem clamp(1rem, 4vw, 2rem) 0.75rem;max-width:1440px;margin:0 auto;@media (min-width: 1025px){gap:1rem 2rem;}"
|
|
100576
100576
|
} : 0);
|
|
100577
100577
|
var LogoSlot = /*#__PURE__*/createStyled("div", true ? {
|
|
100578
|
-
target: "
|
|
100579
|
-
} : 0)("flex:0 0 auto;align-self:center;@media (max-width:
|
|
100578
|
+
target: "e1607tyl38"
|
|
100579
|
+
} : 0)("flex:0 0 auto;align-self:center;@media (max-width: 1024px){margin-right:auto;}[data-copy-loading]{display:flex;align-items:center;min-height:2.75rem;}.header-copy-placeholder{color:", colors.muted, ";letter-spacing:0.02em;}" + ( true ? "" : 0));
|
|
100580
100580
|
var WordmarkButton = /*#__PURE__*/createStyled("button", true ? {
|
|
100581
|
-
target: "
|
|
100581
|
+
target: "e1607tyl37"
|
|
100582
100582
|
} : 0)("margin:0;padding:0.25rem 0;border:none;background:none;font-size:1.5rem;font-weight:700;letter-spacing:0.2em;color:", colors.text, ";text-transform:uppercase;line-height:1.2;transition:opacity 0.15s ease;&:hover{opacity:0.72;}" + ( true ? "" : 0));
|
|
100583
100583
|
|
|
100584
100584
|
/** Utility row + search — wireframe: separate from each other, top-aligned within column */
|
|
100585
100585
|
var RightHeaderCluster = /*#__PURE__*/createStyled("div", true ? {
|
|
100586
|
-
target: "
|
|
100586
|
+
target: "e1607tyl36"
|
|
100587
100587
|
} : 0)( true ? {
|
|
100588
|
-
name: "
|
|
100589
|
-
styles: "display:none;@media (min-width:
|
|
100588
|
+
name: "14zly0b",
|
|
100589
|
+
styles: "display:none;@media (min-width: 1025px){display:flex;flex-direction:column;align-items:flex-end;gap:0.65rem;flex:1 1 320px;min-width:min(100%, 280px);max-width:42rem;}"
|
|
100590
100590
|
} : 0);
|
|
100591
100591
|
var UtilityBar = /*#__PURE__*/createStyled("div", true ? {
|
|
100592
|
-
target: "
|
|
100592
|
+
target: "e1607tyl35"
|
|
100593
100593
|
} : 0)("display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0.35rem 1rem;width:100%;font-size:0.8125rem;line-height:1.35;color:", colors.text, ";" + ( true ? "" : 0));
|
|
100594
100594
|
var UtilityBarDivider = /*#__PURE__*/createStyled("span", true ? {
|
|
100595
|
-
target: "
|
|
100595
|
+
target: "e1607tyl34"
|
|
100596
100596
|
} : 0)("color:", colors.muted, ";user-select:none;" + ( true ? "" : 0));
|
|
100597
100597
|
var UtilityButton = /*#__PURE__*/createStyled("button", true ? {
|
|
100598
|
-
target: "
|
|
100598
|
+
target: "e1607tyl33"
|
|
100599
100599
|
} : 0)( true ? {
|
|
100600
100600
|
name: "1f5cjb2",
|
|
100601
100601
|
styles: "display:inline-flex;align-items:center;gap:0.35rem;margin:0;padding:0.2rem 0.35rem;border:none;border-radius:4px;background:transparent;color:inherit;white-space:nowrap;transition:background 0.15s ease;&:not(:disabled):hover{background:rgba(0, 0, 0, 0.05);}svg{flex-shrink:0;opacity:0.85;}"
|
|
100602
100602
|
} : 0);
|
|
100603
100603
|
var LocaleLabel = /*#__PURE__*/createStyled("span", true ? {
|
|
100604
|
-
target: "
|
|
100604
|
+
target: "e1607tyl32"
|
|
100605
100605
|
} : 0)( true ? {
|
|
100606
100606
|
name: "101gt3q",
|
|
100607
100607
|
styles: "display:inline-flex;align-items:center;gap:0.3rem"
|
|
100608
100608
|
} : 0);
|
|
100609
100609
|
var AccountCluster = /*#__PURE__*/createStyled("div", true ? {
|
|
100610
|
-
target: "
|
|
100610
|
+
target: "e1607tyl31"
|
|
100611
100611
|
} : 0)( true ? {
|
|
100612
|
-
name: "
|
|
100613
|
-
styles: "display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.125rem 0.35rem;@media (max-width:
|
|
100612
|
+
name: "m6tz52",
|
|
100613
|
+
styles: "display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.125rem 0.35rem;@media (max-width: 1024px){.account-icon{display:none;}.account-sign-up{display:none;}.account-divider{display:none;}.account-sign-in{font-size:1rem;font-weight:400;padding:0;}}"
|
|
100614
100614
|
} : 0);
|
|
100615
100615
|
var CartButtonInner = /*#__PURE__*/createStyled("span", true ? {
|
|
100616
|
-
target: "
|
|
100616
|
+
target: "e1607tyl30"
|
|
100617
100617
|
} : 0)( true ? {
|
|
100618
100618
|
name: "ww3r3k",
|
|
100619
100619
|
styles: "display:inline-flex;align-items:center;position:relative"
|
|
100620
100620
|
} : 0);
|
|
100621
100621
|
var CartBadge = /*#__PURE__*/createStyled("span", true ? {
|
|
100622
|
-
target: "
|
|
100622
|
+
target: "e1607tyl29"
|
|
100623
100623
|
} : 0)( true ? {
|
|
100624
100624
|
name: "1sj9dvc",
|
|
100625
100625
|
styles: "position:absolute;top:-8px;right:-8px;display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:50%;font-size:0.75rem;font-weight:600;line-height:1;background:#5b81a5;color:#fff;border:2px solid #fff"
|
|
@@ -100627,100 +100627,115 @@ var CartBadge = /*#__PURE__*/createStyled("span", true ? {
|
|
|
100627
100627
|
|
|
100628
100628
|
/** Pill search: icon left, full-width field, submit control on right */
|
|
100629
100629
|
var SearchSlot = /*#__PURE__*/createStyled("div", true ? {
|
|
100630
|
-
target: "
|
|
100630
|
+
target: "e1607tyl28"
|
|
100631
100631
|
} : 0)( true ? {
|
|
100632
100632
|
name: "kuwwf0",
|
|
100633
100633
|
styles: "width:100%;[data-region=\"search\"]{width:100%;}"
|
|
100634
100634
|
} : 0);
|
|
100635
100635
|
var SearchPillForm = /*#__PURE__*/createStyled("form", true ? {
|
|
100636
|
-
target: "
|
|
100636
|
+
target: "e1607tyl27"
|
|
100637
100637
|
} : 0)("display:flex;align-items:center;width:100%;min-height:2.75rem;padding:0 0.35rem 0 0.85rem;border:1px solid ", colors.border, ";border-radius:999px;background:", colors.surface, ";overflow:hidden;transition:border-color 0.15s ease,box-shadow 0.15s ease;&:focus-within{border-color:", colors.muted, ";box-shadow:0 0 0 1px rgba(17, 24, 39, 0.08);}.search-pill__icon{flex-shrink:0;margin-right:0.5rem;color:", colors.muted, ";}input{flex:1;min-width:0;padding:0.5rem 0;border:none;background:transparent;font-size:0.9375rem;outline:none;&::placeholder{color:", colors.muted, ";}}button[type=\"submit\"]{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;margin:0.1rem 0.1rem 0.1rem 0.25rem;padding:0;border:none;border-radius:50%;background:", colors.text, ";color:#fff;transition:opacity 0.15s ease,transform 0.1s ease;&:hover:not(:disabled){opacity:0.88;}&:disabled{opacity:0.4;}svg{width:16px;height:16px;}}" + ( true ? "" : 0));
|
|
100638
100638
|
var NavSection = /*#__PURE__*/createStyled("div", true ? {
|
|
100639
|
-
target: "
|
|
100640
|
-
} : 0)("display:none;border-top:1px solid ", colors.borderLight, ";background:", colors.surface, ";@media (min-width:
|
|
100639
|
+
target: "e1607tyl26"
|
|
100640
|
+
} : 0)("display:none;border-top:1px solid ", colors.borderLight, ";background:", colors.surface, ";@media (min-width: 1025px){display:block;}" + ( true ? "" : 0));
|
|
100641
100641
|
var PrimaryNav = /*#__PURE__*/createStyled("nav", true ? {
|
|
100642
|
-
target: "
|
|
100642
|
+
target: "e1607tyl25"
|
|
100643
100643
|
} : 0)("max-width:1440px;margin:0 auto;padding:0 clamp(1rem, 4vw, 2rem);ul{display:flex;flex-wrap:wrap;align-items:stretch;gap:0;margin:0;padding:0;list-style:none;}li{margin:0;}li>span,li>button{display:block;width:100%;margin:0;padding:0.95rem 0.85rem;border:none;background:none;font-size:0.9375rem;font-weight:500;text-align:left;color:", colors.text, ";border-bottom:3px solid transparent;transition:color 0.15s ease,border-color 0.15s ease;}li>button{cursor:pointer;font-family:inherit;}li:hover>span,li:hover>button{color:", colors.accent, ";}li[data-nav-active=\"true\"]>span,li[data-nav-active=\"true\"]>button{font-weight:700;border-bottom-color:", colors.navActive, ";}&[data-copy-loading] li>span{color:", colors.muted, ";}" + ( true ? "" : 0));
|
|
100644
100644
|
var MegaMenuPreview = /*#__PURE__*/createStyled("section", true ? {
|
|
100645
|
-
target: "
|
|
100645
|
+
target: "e1607tyl24"
|
|
100646
100646
|
} : 0)("border-top:1px solid ", colors.borderLight, ";background:#f9fafb;" + ( true ? "" : 0));
|
|
100647
100647
|
var MegaMenuInner = /*#__PURE__*/createStyled("div", true ? {
|
|
100648
|
-
target: "
|
|
100648
|
+
target: "e1607tyl23"
|
|
100649
100649
|
} : 0)( true ? {
|
|
100650
100650
|
name: "1awwgt4",
|
|
100651
100651
|
styles: "display:grid;grid-template-columns:minmax(11rem, 14rem) 1fr;gap:1.5rem 2.5rem;max-width:1440px;margin:0 auto;padding:1.25rem clamp(1rem, 4vw, 2rem) 1.75rem;@media (max-width: 800px){grid-template-columns:1fr;}"
|
|
100652
100652
|
} : 0);
|
|
100653
100653
|
var JumpToColumn = /*#__PURE__*/createStyled("div", true ? {
|
|
100654
|
-
target: "
|
|
100654
|
+
target: "e1607tyl22"
|
|
100655
100655
|
} : 0)("padding:1rem;border:1px solid ", colors.border, ";border-radius:6px;background:", colors.surface, ";" + ( true ? "" : 0));
|
|
100656
100656
|
var JumpToTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
100657
|
-
target: "
|
|
100657
|
+
target: "e1607tyl21"
|
|
100658
100658
|
} : 0)("margin:0 0 0.75rem;font-size:0.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;color:", colors.text, ";" + ( true ? "" : 0));
|
|
100659
100659
|
var JumpToList = /*#__PURE__*/createStyled("ul", true ? {
|
|
100660
|
-
target: "
|
|
100660
|
+
target: "e1607tyl20"
|
|
100661
100661
|
} : 0)( true ? {
|
|
100662
100662
|
name: "gt7hyk",
|
|
100663
100663
|
styles: "display:flex;flex-direction:column;gap:0.5rem;margin:0;padding:0;list-style:none"
|
|
100664
100664
|
} : 0);
|
|
100665
100665
|
var JumpToPill = /*#__PURE__*/createStyled("button", true ? {
|
|
100666
|
-
target: "
|
|
100666
|
+
target: "e1607tyl19"
|
|
100667
100667
|
} : 0)("display:block;width:100%;margin:0;padding:0.5rem 0.85rem;border:1px solid ", colors.border, ";border-radius:999px;background:", colors.surface, ";font-size:0.8125rem;font-weight:500;text-align:left;color:", colors.text, ";transition:background 0.15s ease,border-color 0.15s ease;&:hover:not(:disabled){background:#f3f4f6;border-color:", colors.muted, ";}" + ( true ? "" : 0));
|
|
100668
100668
|
var CategoriesPane = /*#__PURE__*/createStyled("div", true ? {
|
|
100669
|
-
target: "
|
|
100669
|
+
target: "e1607tyl18"
|
|
100670
100670
|
} : 0)("padding:1rem 1.25rem;border:1px solid ", colors.border, ";border-radius:6px;background:", colors.surface, ";" + ( true ? "" : 0));
|
|
100671
100671
|
var CategoryHeaderStrip = /*#__PURE__*/createStyled("div", true ? {
|
|
100672
|
-
target: "
|
|
100672
|
+
target: "e1607tyl17"
|
|
100673
100673
|
} : 0)("display:flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.5rem;margin-bottom:1.25rem;padding-bottom:0.65rem;border-bottom:1px solid ", colors.borderLight, ";font-size:0.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:", colors.text, ";span{white-space:nowrap;}svg{flex-shrink:0;color:", colors.muted, ";}" + ( true ? "" : 0));
|
|
100674
100674
|
var CategoryColumns = /*#__PURE__*/createStyled("div", true ? {
|
|
100675
|
-
target: "
|
|
100675
|
+
target: "e1607tyl16"
|
|
100676
100676
|
} : 0)( true ? {
|
|
100677
100677
|
name: "xxda9t",
|
|
100678
100678
|
styles: "display:grid;grid-template-columns:repeat(3, 1fr);gap:1.25rem 1.5rem;@media (max-width: 900px){grid-template-columns:1fr;}"
|
|
100679
100679
|
} : 0);
|
|
100680
100680
|
var CategoryColumn = /*#__PURE__*/createStyled("div", true ? {
|
|
100681
|
-
target: "
|
|
100681
|
+
target: "e1607tyl15"
|
|
100682
100682
|
} : 0)( true ? "" : 0);
|
|
100683
100683
|
var CategorySubLabel = /*#__PURE__*/createStyled("p", true ? {
|
|
100684
|
-
target: "
|
|
100684
|
+
target: "e1607tyl14"
|
|
100685
100685
|
} : 0)("margin:0 0 0.5rem;font-size:0.75rem;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;color:", colors.muted, ";" + ( true ? "" : 0));
|
|
100686
100686
|
var CategoryLinkList = /*#__PURE__*/createStyled("ul", true ? {
|
|
100687
|
-
target: "
|
|
100687
|
+
target: "e1607tyl13"
|
|
100688
100688
|
} : 0)("margin:0;padding:0;list-style:none;li{margin:0;padding:0;}button.link-like{display:block;width:100%;margin:0;padding:0.35rem 0;border:none;background:none;font-size:0.875rem;text-align:left;color:", colors.text, ";text-decoration:none;cursor:pointer;transition:color 0.12s ease;&:hover{color:", colors.accent, ";text-decoration:underline;}}" + ( true ? "" : 0));
|
|
100689
100689
|
var MobileMenuButton = /*#__PURE__*/createStyled("button", true ? {
|
|
100690
|
-
target: "
|
|
100691
|
-
} : 0)("display:flex;align-items:center;justify-content:center;margin:0;padding:0.5rem;border:none;background:transparent;color:", colors.text, ";cursor:pointer;transition:background 0.15s ease;&:hover{background:rgba(0, 0, 0, 0.05);}@media (min-width:
|
|
100690
|
+
target: "e1607tyl12"
|
|
100691
|
+
} : 0)("display:flex;align-items:center;justify-content:center;margin:0;padding:0.5rem;border:none;background:transparent;color:", colors.text, ";cursor:pointer;transition:background 0.15s ease;&:hover{background:rgba(0, 0, 0, 0.05);}@media (min-width: 1025px){display:none;}" + ( true ? "" : 0));
|
|
100692
100692
|
var MobileUtilityBar = /*#__PURE__*/createStyled("div", true ? {
|
|
100693
|
-
target: "
|
|
100694
|
-
} : 0)("display:flex;align-items:center;gap:1rem;margin-left:auto;font-size:1rem;@media (min-width:
|
|
100693
|
+
target: "e1607tyl11"
|
|
100694
|
+
} : 0)("display:flex;align-items:center;gap:1rem;margin-left:auto;font-size:1rem;@media (min-width: 1025px){display:none;}button{display:flex;align-items:center;padding:0;background:none;border:none;color:", colors.text, ";cursor:pointer;font-size:1rem;svg{width:24px;height:24px;}}" + ( true ? "" : 0));
|
|
100695
100695
|
var MobileDrawer = /*#__PURE__*/createStyled("div", true ? {
|
|
100696
|
-
target: "
|
|
100696
|
+
target: "e1607tyl10"
|
|
100697
100697
|
} : 0)( true ? {
|
|
100698
100698
|
name: "kxea5q",
|
|
100699
100699
|
styles: "position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;display:flex"
|
|
100700
100700
|
} : 0);
|
|
100701
100701
|
var MobileDrawerBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
100702
|
-
target: "
|
|
100702
|
+
target: "e1607tyl9"
|
|
100703
100703
|
} : 0)( true ? {
|
|
100704
100704
|
name: "eq959j",
|
|
100705
100705
|
styles: "position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);cursor:pointer"
|
|
100706
100706
|
} : 0);
|
|
100707
100707
|
var MobileDrawerContent = /*#__PURE__*/createStyled("div", true ? {
|
|
100708
|
-
target: "
|
|
100709
|
-
} : 0)("position:relative;z-index:1;width:85%;max-width:375px;height:100%;background:", colors.surface, ";display:flex;flex-direction:column;box-shadow:2px 0 8px rgba(0, 0, 0, 0.15);" + ( true ? "" : 0));
|
|
100708
|
+
target: "e1607tyl8"
|
|
100709
|
+
} : 0)("position:relative;z-index:1;width:85%;max-width:375px;height:100%;background:", colors.surface, ";display:flex;flex-direction:column;gap:16px;box-shadow:2px 0 8px rgba(0, 0, 0, 0.15);" + ( true ? "" : 0));
|
|
100710
100710
|
var MobileDrawerHeader = /*#__PURE__*/createStyled("div", true ? {
|
|
100711
|
+
target: "e1607tyl7"
|
|
100712
|
+
} : 0)( true ? {
|
|
100713
|
+
name: "dvskpv",
|
|
100714
|
+
styles: "box-sizing:border-box;width:100%;height:98px;min-height:98px;flex-shrink:0;padding:66px 0 0;background:#ffffff;opacity:1"
|
|
100715
|
+
} : 0);
|
|
100716
|
+
var MobileDrawerHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
100717
|
+
target: "e1607tyl6"
|
|
100718
|
+
} : 0)( true ? {
|
|
100719
|
+
name: "150vzce",
|
|
100720
|
+
styles: "display:flex;align-items:center;justify-content:space-between;height:32px;min-height:32px;max-height:32px;width:100%;box-sizing:border-box;padding-left:20px;padding-right:20px"
|
|
100721
|
+
} : 0);
|
|
100722
|
+
var MobileDrawerMarketTriggerSlot = /*#__PURE__*/createStyled("div", true ? {
|
|
100711
100723
|
target: "e1607tyl5"
|
|
100712
|
-
} : 0)(
|
|
100724
|
+
} : 0)( true ? {
|
|
100725
|
+
name: "u09th4",
|
|
100726
|
+
styles: "flex:0 1 auto;min-width:0;height:32px;display:flex;align-items:center;justify-content:flex-end"
|
|
100727
|
+
} : 0);
|
|
100713
100728
|
var MobileDrawerLogoSlot = /*#__PURE__*/createStyled("div", true ? {
|
|
100714
100729
|
target: "e1607tyl4"
|
|
100715
100730
|
} : 0)( true ? {
|
|
100716
|
-
name: "
|
|
100717
|
-
styles: "display:flex"
|
|
100731
|
+
name: "1659k0q",
|
|
100732
|
+
styles: "display:flex;align-items:center;justify-content:flex-start;min-width:0;flex:1 1 auto;height:100%;overflow:hidden"
|
|
100718
100733
|
} : 0);
|
|
100719
100734
|
var MobileDrawerNav = /*#__PURE__*/createStyled("nav", true ? {
|
|
100720
100735
|
target: "e1607tyl3"
|
|
100721
100736
|
} : 0)( true ? {
|
|
100722
|
-
name: "
|
|
100723
|
-
styles: "flex:1;overflow-y:auto;padding:
|
|
100737
|
+
name: "cg7f1j",
|
|
100738
|
+
styles: "flex:1;overflow-y:auto;padding:0 0 1rem"
|
|
100724
100739
|
} : 0);
|
|
100725
100740
|
var MobileDrawerNavItem = /*#__PURE__*/createStyled("div", true ? {
|
|
100726
100741
|
target: "e1607tyl2"
|
|
@@ -101711,7 +101726,8 @@ function MobileHeaderDrawer(_ref) {
|
|
|
101711
101726
|
logoData = _ref.logoData,
|
|
101712
101727
|
localeData = _ref.localeData,
|
|
101713
101728
|
navigationData = _ref.navigationData,
|
|
101714
|
-
loyaltyData = _ref.loyaltyData
|
|
101729
|
+
loyaltyData = _ref.loyaltyData,
|
|
101730
|
+
marketTriggerMountRef = _ref.marketTriggerMountRef;
|
|
101715
101731
|
if (!isOpen) return null;
|
|
101716
101732
|
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawer, {
|
|
101717
101733
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerBackdrop, {
|
|
@@ -101719,15 +101735,20 @@ function MobileHeaderDrawer(_ref) {
|
|
|
101719
101735
|
"aria-label": "Close menu"
|
|
101720
101736
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerContent, {
|
|
101721
101737
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerHeader, {
|
|
101722
|
-
children: /*#__PURE__*/(0,jsx_runtime_.
|
|
101723
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
101724
|
-
|
|
101725
|
-
|
|
101726
|
-
|
|
101727
|
-
|
|
101728
|
-
|
|
101729
|
-
|
|
101730
|
-
|
|
101738
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerHeaderRow, {
|
|
101739
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerLogoSlot, {
|
|
101740
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
101741
|
+
logo: logoData.logo,
|
|
101742
|
+
logoAlt: logoData.logoAlt,
|
|
101743
|
+
href: logoData.href,
|
|
101744
|
+
showLogo: logoData.showLogo,
|
|
101745
|
+
size: logoData.size || "Large",
|
|
101746
|
+
$: logoData.$
|
|
101747
|
+
})
|
|
101748
|
+
}), marketTriggerMountRef ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerMarketTriggerSlot, {
|
|
101749
|
+
ref: marketTriggerMountRef,
|
|
101750
|
+
"data-testid": "mobile-drawer-market-trigger-mount"
|
|
101751
|
+
}) : null]
|
|
101731
101752
|
})
|
|
101732
101753
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerNav, {
|
|
101733
101754
|
children: [(_navigationData$topNa = navigationData.topNavItems) === null || _navigationData$topNa === void 0 ? void 0 : _navigationData$topNa.map(function (item) {
|
|
@@ -101745,7 +101766,7 @@ function MobileHeaderDrawer(_ref) {
|
|
|
101745
101766
|
},
|
|
101746
101767
|
children: loyaltyData.link_label
|
|
101747
101768
|
})
|
|
101748
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerNavItem, {
|
|
101769
|
+
}), marketTriggerMountRef ? null : /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerNavItem, {
|
|
101749
101770
|
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerLocaleButton, {
|
|
101750
101771
|
children: [localeData.control_label, /*#__PURE__*/(0,jsx_runtime_.jsx)(IconChevronDown, {})]
|
|
101751
101772
|
})
|
|
@@ -101760,8 +101781,13 @@ MobileHeaderDrawer.propTypes = {
|
|
|
101760
101781
|
logoData: (external_prop_types_default()).object.isRequired,
|
|
101761
101782
|
localeData: (external_prop_types_default()).object.isRequired,
|
|
101762
101783
|
navigationData: (external_prop_types_default()).object.isRequired,
|
|
101763
|
-
loyaltyData: (external_prop_types_default()).object
|
|
101784
|
+
loyaltyData: (external_prop_types_default()).object,
|
|
101785
|
+
marketTriggerMountRef: external_prop_types_default().shape({
|
|
101786
|
+
current: (external_prop_types_default()).any
|
|
101787
|
+
})
|
|
101764
101788
|
};
|
|
101789
|
+
// EXTERNAL MODULE: external "react-dom"
|
|
101790
|
+
var external_react_dom_ = __webpack_require__(2326);
|
|
101765
101791
|
// EXTERNAL MODULE: ./node_modules/@mui/material/Button/Button.js
|
|
101766
101792
|
var Button = __webpack_require__(1629);
|
|
101767
101793
|
;// ./src/components/button/CancelButton.styled.jsx
|
|
@@ -101839,12 +101865,9 @@ var TABS_TOP_NAV_ROOT_PADDING = "32px 32px 16px";
|
|
|
101839
101865
|
var TABS_MOBILE_MAX_WIDTH_PX = 1024;
|
|
101840
101866
|
var TABS_MOBILE_MEDIA_QUERY = "(max-width: ".concat(TABS_MOBILE_MAX_WIDTH_PX, "px)");
|
|
101841
101867
|
var ARIA_LABEL_TABS_DEFAULT = "Tabs";
|
|
101842
|
-
var ARIA_LABEL_OPEN_MENU = "Open menu";
|
|
101843
|
-
var ARIA_LABEL_CLOSE_MENU = "Close menu";
|
|
101844
101868
|
var ARIA_LABEL_MARKET_SELECTOR_TABS = "Market selector tabs";
|
|
101845
101869
|
var ARIA_LABEL_TOP_NAV_TABS = "Top nav tabs";
|
|
101846
101870
|
var FALLBACK_REGION_LABEL = "Region";
|
|
101847
|
-
var FALLBACK_MENU_LABEL = "Menu";
|
|
101848
101871
|
var TAB_ID_FALLBACK_SEGMENT = "item";
|
|
101849
101872
|
|
|
101850
101873
|
/** Desktop tab hover: delay before activating tab (ms) */
|
|
@@ -101852,80 +101875,21 @@ var TABS_HOVER_ACTIVATE_MS = 80;
|
|
|
101852
101875
|
/** Desktop tab hover: delay after mouseleave before clearing selection (ms) */
|
|
101853
101876
|
var TABS_HOVER_CLEAR_MS = 120;
|
|
101854
101877
|
;// ./src/components/tabs/Tabs.styled.jsx
|
|
101855
|
-
/* unused harmony import specifier */ var _styled;
|
|
101856
|
-
/* unused harmony import specifier */ var Tabs_styled_TABS_MOBILE_MAX_WIDTH_PX;
|
|
101857
101878
|
|
|
101858
101879
|
function Tabs_styled_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
101859
101880
|
|
|
101860
|
-
|
|
101861
101881
|
var TabsRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
101862
|
-
target: "
|
|
101882
|
+
target: "e1wqq0259"
|
|
101863
101883
|
} : 0)("--tabs-text:#2f2f2f;--tabs-muted:#666666;--tabs-border:#e5e5e5;--tabs-surface:#ffffff;--tabs-surface-muted:#f6f6f6;--tabs-focus-visible:#007bff;--tabs-font-sans:Lora,sans-serif;box-sizing:border-box;max-width:1440px;margin:0 auto;color:var(--tabs-text);font-family:var(--tabs-font-sans);position:relative;", function (p) {
|
|
101864
|
-
return p.$mobileEmbeddedFullScreen && "\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n width: 100%;\n max-width: none;\n margin: 0;\n ";
|
|
101865
|
-
}, " ", function (p) {
|
|
101866
101884
|
return p.$isTopNav && "\n max-width: ".concat(TABS_TOP_NAV_MAX_WIDTH_PX, "px;\n padding: ").concat(TABS_TOP_NAV_ROOT_PADDING, ";\n ");
|
|
101867
101885
|
}, "@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){max-width:none;width:100%;", function (p) {
|
|
101868
101886
|
return p.$isTopNav && "padding: 0;";
|
|
101869
101887
|
}, ";}" + ( true ? "" : 0));
|
|
101870
|
-
|
|
101871
|
-
/* Shown only below 1025px: hamburger */
|
|
101872
|
-
var MobileTabsBar = /*#__PURE__*/(/* unused pure expression or super */ null && (_styled("div", true ? {
|
|
101873
|
-
target: "e1wqq02517"
|
|
101874
|
-
} : 0)("display:none;align-items:center;justify-content:flex-start;padding:16px;min-height:48px;@media (max-width: ", Tabs_styled_TABS_MOBILE_MAX_WIDTH_PX, "px){display:flex;position:relative;z-index:1090;}" + ( true ? "" : 0))));
|
|
101875
|
-
var HamburgerButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101876
|
-
target: "e1wqq02516"
|
|
101877
|
-
} : 0)( true ? {
|
|
101878
|
-
name: "1staojr",
|
|
101879
|
-
styles: "appearance:none;border:0;background:transparent;margin:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;color:var(--tabs-text);&:focus-visible{outline:1px solid var(--tabs-focus-visible);outline-offset:1px;}svg{display:block;}"
|
|
101880
|
-
} : 0);
|
|
101881
|
-
var MobileBackdrop = /*#__PURE__*/createStyled("button", true ? {
|
|
101882
|
-
target: "e1wqq02515"
|
|
101883
|
-
} : 0)( true ? {
|
|
101884
|
-
name: "1vvlses",
|
|
101885
|
-
styles: "position:fixed;inset:0;z-index:1105;margin:0;padding:0;border:0;background:rgba(34, 34, 34, 0.5);cursor:pointer;animation:tabs-backdrop-in 0.2s ease;@keyframes tabs-backdrop-in{from{opacity:0;}to{opacity:1;}}&:focus-visible{outline:1px solid var(--tabs-focus-visible);outline-offset:1px;}"
|
|
101886
|
-
} : 0);
|
|
101887
101888
|
var TabList = /*#__PURE__*/createStyled("div", true ? {
|
|
101888
|
-
target: "
|
|
101889
|
+
target: "e1wqq0258"
|
|
101889
101890
|
} : 0)("display:flex;align-items:flex-end;justify-content:", function (props) {
|
|
101890
101891
|
return props.$justify || "flex-start";
|
|
101891
|
-
}, ";gap:8px;border-bottom:0;padding:6px 0;overflow:visible;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){position:relative;top:auto;left:auto;z-index:auto;width:100%;max-width:none;height:auto;margin:0;padding:0;border:0;box-sizing:border-box;flex-direction:column;align-items:stretch;gap:0;border-bottom:none;overflow:visible;overflow-x:hidden;background:#ffffff;box-shadow:none;justify-content:flex-start;transform:none;transition:none;visibility:visible;pointer-events:auto;"
|
|
101892
|
-
return p.$mobileEmbedded && "\n position: relative;\n top: auto;\n left: auto;\n z-index: auto;\n width: 100%;\n max-width: none;\n height: auto;\n max-height: none;\n min-height: 0;\n flex: 1;\n transform: none;\n transition: none;\n visibility: visible;\n pointer-events: auto;\n box-shadow: none;\n overflow: visible;\n ";
|
|
101893
|
-
}, ";}" + ( true ? "" : 0));
|
|
101894
|
-
|
|
101895
|
-
/** Optional header slot inside the mobile drawer (above tab rows). */
|
|
101896
|
-
var MobileDrawerLeadArea = /*#__PURE__*/(/* unused pure expression or super */ null && (_styled("div", true ? {
|
|
101897
|
-
target: "e1wqq02513"
|
|
101898
|
-
} : 0)("display:none;@media (max-width: ", Tabs_styled_TABS_MOBILE_MAX_WIDTH_PX, "px){display:block;flex-shrink:0;min-height:98px;padding-top:66px;padding-bottom:0;background:#ffffff;box-sizing:border-box;}" + ( true ? "" : 0))));
|
|
101899
|
-
var MobileDrawerBrandRow = /*#__PURE__*/createStyled("div", true ? {
|
|
101900
|
-
target: "e1wqq02512"
|
|
101901
|
-
} : 0)( true ? {
|
|
101902
|
-
name: "nssoa3",
|
|
101903
|
-
styles: "display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:32px;padding-left:20px;padding-right:20px;box-sizing:border-box"
|
|
101904
|
-
} : 0);
|
|
101905
|
-
var MobileDrawerLogoWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
101906
|
-
target: "e1wqq02511"
|
|
101907
|
-
} : 0)( true ? {
|
|
101908
|
-
name: "pdqe4u",
|
|
101909
|
-
styles: "flex:0 0 auto;width:90px;height:17.96px;display:inline-flex;align-items:center;>*{width:90px;height:17.96px;display:inline-flex;}"
|
|
101910
|
-
} : 0);
|
|
101911
|
-
var MobileMarketLabelTrigger = /*#__PURE__*/createStyled("button", true ? {
|
|
101912
|
-
target: "e1wqq02510"
|
|
101913
|
-
} : 0)( true ? {
|
|
101914
|
-
name: "601n5",
|
|
101915
|
-
styles: "appearance:none;border:0;background:transparent;margin:0;width:130px;min-height:32px;border-radius:20px;padding:4px 0;cursor:pointer;display:inline-flex;align-items:center;justify-content:flex-end;gap:2px;font-family:var(--tabs-font-sans);font-weight:400;font-size:14px;line-height:20px;color:#5f5f5f;flex-shrink:0;-webkit-tap-highlight-color:transparent;text-align:right;&:focus-visible{outline:1px solid var(--tabs-focus-visible);outline-offset:2px;border-radius:4px;}"
|
|
101916
|
-
} : 0);
|
|
101917
|
-
var MobileMarketLabelText = /*#__PURE__*/createStyled("span", true ? {
|
|
101918
|
-
target: "e1wqq0259"
|
|
101919
|
-
} : 0)( true ? {
|
|
101920
|
-
name: "pb7uva",
|
|
101921
|
-
styles: "min-width:98px;text-align:right"
|
|
101922
|
-
} : 0);
|
|
101923
|
-
var MobileMarketLabelIcon = /*#__PURE__*/createStyled(dist.NsIcon, true ? {
|
|
101924
|
-
target: "e1wqq0258"
|
|
101925
|
-
} : 0)( true ? {
|
|
101926
|
-
name: "131myzh",
|
|
101927
|
-
styles: "width:24px;height:24px;flex-shrink:0"
|
|
101928
|
-
} : 0);
|
|
101892
|
+
}, ";gap:8px;border-bottom:0;padding:6px 0;overflow:visible;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){position:relative;top:auto;left:auto;z-index:auto;width:100%;max-width:none;height:auto;margin:0;padding:0;border:0;box-sizing:border-box;flex-direction:column;align-items:stretch;gap:0;border-bottom:none;overflow:visible;overflow-x:hidden;background:#ffffff;box-shadow:none;justify-content:flex-start;transform:none;transition:none;visibility:visible;pointer-events:auto;}" + ( true ? "" : 0));
|
|
101929
101893
|
var MobileDrawerScroll = /*#__PURE__*/createStyled("div", true ? {
|
|
101930
101894
|
target: "e1wqq0257"
|
|
101931
101895
|
} : 0)("display:none;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){display:block;flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;padding:1rem 0 0;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none;width:0;height:0;}}" + ( true ? "" : 0));
|
|
@@ -101962,7 +101926,6 @@ var Panel = /*#__PURE__*/createStyled("div", true ? {
|
|
|
101962
101926
|
target: "e1wqq0250"
|
|
101963
101927
|
} : 0)("padding-top:0;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
|
|
101964
101928
|
;// ./src/components/tabs/utils/tabsHelpers.js
|
|
101965
|
-
/* unused harmony import specifier */ var tabsHelpers_FALLBACK_MENU_LABEL;
|
|
101966
101929
|
function tabsHelpers_typeof(o) { "@babel/helpers - typeof"; return tabsHelpers_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, tabsHelpers_typeof(o); }
|
|
101967
101930
|
function tabsHelpers_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
101968
101931
|
function tabsHelpers_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? tabsHelpers_ownKeys(Object(t), !0).forEach(function (r) { tabsHelpers_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : tabsHelpers_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -101980,26 +101943,6 @@ function safeId(prefix, raw) {
|
|
|
101980
101943
|
function getRegionLabel(region) {
|
|
101981
101944
|
return (region === null || region === void 0 ? void 0 : region.region_title) || (region === null || region === void 0 ? void 0 : region.title) || (region === null || region === void 0 ? void 0 : region.label) || FALLBACK_REGION_LABEL;
|
|
101982
101945
|
}
|
|
101983
|
-
function getTopNavLabel(navItem) {
|
|
101984
|
-
var _navItem$category;
|
|
101985
|
-
var cat = navItem === null || navItem === void 0 || (_navItem$category = navItem.category) === null || _navItem$category === void 0 || (_navItem$category = _navItem$category.category) === null || _navItem$category === void 0 ? void 0 : _navItem$category[0];
|
|
101986
|
-
return (cat === null || cat === void 0 ? void 0 : cat.display_name) || (cat === null || cat === void 0 ? void 0 : cat.title) || tabsHelpers_FALLBACK_MENU_LABEL;
|
|
101987
|
-
}
|
|
101988
|
-
function getTopNavTabItems(topNavJson) {
|
|
101989
|
-
var _ref, _topNavJson$0$referen, _topNavJson$, _topNavJson$reference;
|
|
101990
|
-
var topNavigation = (_ref = (_topNavJson$0$referen = topNavJson === null || topNavJson === void 0 || (_topNavJson$ = topNavJson[0]) === null || _topNavJson$ === void 0 || (_topNavJson$ = _topNavJson$.reference) === null || _topNavJson$ === void 0 || (_topNavJson$ = _topNavJson$[0]) === null || _topNavJson$ === void 0 ? void 0 : _topNavJson$.top_navigation) !== null && _topNavJson$0$referen !== void 0 ? _topNavJson$0$referen : topNavJson === null || topNavJson === void 0 || (_topNavJson$reference = topNavJson.reference) === null || _topNavJson$reference === void 0 || (_topNavJson$reference = _topNavJson$reference[0]) === null || _topNavJson$reference === void 0 ? void 0 : _topNavJson$reference.top_navigation) !== null && _ref !== void 0 ? _ref : [];
|
|
101991
|
-
return topNavigation.map(function (entry, idx) {
|
|
101992
|
-
var _entry$category;
|
|
101993
|
-
var label = getTopNavLabel(entry);
|
|
101994
|
-
return {
|
|
101995
|
-
id: safeId("nav", (entry === null || entry === void 0 || (_entry$category = entry.category) === null || _entry$category === void 0 || (_entry$category = _entry$category.category) === null || _entry$category === void 0 || (_entry$category = _entry$category[0]) === null || _entry$category === void 0 ? void 0 : _entry$category.uid) || label || idx),
|
|
101996
|
-
label: label,
|
|
101997
|
-
data: entry
|
|
101998
|
-
};
|
|
101999
|
-
}).filter(function (t) {
|
|
102000
|
-
return t.label;
|
|
102001
|
-
});
|
|
102002
|
-
}
|
|
102003
101946
|
function normalizeMarketRegions(data) {
|
|
102004
101947
|
var _data$regions, _data$market_selector, _data$market_selector2;
|
|
102005
101948
|
if (Array.isArray(data)) return data;
|
|
@@ -102007,8 +101950,8 @@ function normalizeMarketRegions(data) {
|
|
|
102007
101950
|
return (_data$market_selector = data === null || data === void 0 || (_data$market_selector2 = data.market_selector) === null || _data$market_selector2 === void 0 || (_data$market_selector2 = _data$market_selector2.reference) === null || _data$market_selector2 === void 0 || (_data$market_selector2 = _data$market_selector2[0]) === null || _data$market_selector2 === void 0 ? void 0 : _data$market_selector2.regions) !== null && _data$market_selector !== void 0 ? _data$market_selector : [];
|
|
102008
101951
|
}
|
|
102009
101952
|
function regionHasMarketOrCountry(region) {
|
|
102010
|
-
var
|
|
102011
|
-
var items = (
|
|
101953
|
+
var _ref, _region$markets;
|
|
101954
|
+
var items = (_ref = (_region$markets = region === null || region === void 0 ? void 0 : region.markets) !== null && _region$markets !== void 0 ? _region$markets : region === null || region === void 0 ? void 0 : region.countries) !== null && _ref !== void 0 ? _ref : [];
|
|
102012
101955
|
return items.length > 0;
|
|
102013
101956
|
}
|
|
102014
101957
|
function buildMarketSelectorTabs(regions) {
|
|
@@ -102291,8 +102234,6 @@ function Tabs(_ref4) {
|
|
|
102291
102234
|
ariaLabel = _ref4$ariaLabel === void 0 ? ARIA_LABEL_TABS_DEFAULT : _ref4$ariaLabel,
|
|
102292
102235
|
_ref4$isTopNav = _ref4.isTopNav,
|
|
102293
102236
|
isTopNav = _ref4$isTopNav === void 0 ? false : _ref4$isTopNav,
|
|
102294
|
-
_ref4$mobileEmbeddedF = _ref4.mobileEmbeddedFullScreen,
|
|
102295
|
-
mobileEmbeddedFullScreen = _ref4$mobileEmbeddedF === void 0 ? false : _ref4$mobileEmbeddedF,
|
|
102296
102237
|
tabListContainer$ = _ref4.tabListContainer$;
|
|
102297
102238
|
var _useTabsController = useTabsController({
|
|
102298
102239
|
tabs: tabs,
|
|
@@ -102328,7 +102269,6 @@ function Tabs(_ref4) {
|
|
|
102328
102269
|
var showPanel = activationMode === "click" || panelContent;
|
|
102329
102270
|
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(TabsRoot, {
|
|
102330
102271
|
$isTopNav: isTopNav,
|
|
102331
|
-
$mobileEmbeddedFullScreen: mobileEmbeddedFullScreen,
|
|
102332
102272
|
className: className,
|
|
102333
102273
|
onMouseEnter: handleContainerEnter,
|
|
102334
102274
|
onMouseLeave: handleContainerLeave,
|
|
@@ -102338,8 +102278,7 @@ function Tabs(_ref4) {
|
|
|
102338
102278
|
id: sidebarId,
|
|
102339
102279
|
role: "tablist",
|
|
102340
102280
|
"aria-label": ariaLabel,
|
|
102341
|
-
$justify: tabAlign
|
|
102342
|
-
$mobileEmbedded: mobileEmbeddedFullScreen
|
|
102281
|
+
$justify: tabAlign
|
|
102343
102282
|
}, tabListContainer$ !== null && tabListContainer$ !== void 0 ? tabListContainer$ : {}), {}, {
|
|
102344
102283
|
children: [!isMobile ? desktopTabs : null, isMobile ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerScroll, {
|
|
102345
102284
|
"data-tabs-mobile-accordion": "",
|
|
@@ -102368,7 +102307,6 @@ function Tabs(_ref4) {
|
|
|
102368
102307
|
});
|
|
102369
102308
|
}
|
|
102370
102309
|
Tabs.propTypes = {
|
|
102371
|
-
mobileEmbeddedFullScreen: (external_prop_types_default()).bool,
|
|
102372
102310
|
isTopNav: (external_prop_types_default()).bool,
|
|
102373
102311
|
tabs: external_prop_types_default().arrayOf(external_prop_types_default().shape({
|
|
102374
102312
|
id: (external_prop_types_default()).string.isRequired,
|
|
@@ -102906,10 +102844,8 @@ var CountryListSelectorTheme = {
|
|
|
102906
102844
|
panelPadding: "12px 32px 20px",
|
|
102907
102845
|
sectionGap: "50px 100px",
|
|
102908
102846
|
localeGap: "8px",
|
|
102909
|
-
mobilePanelPadding: "16px 0 0",
|
|
102910
102847
|
mobileSectionGap: "25px",
|
|
102911
102848
|
mobileLocaleGap: "10px",
|
|
102912
|
-
mobileLocaleIndent: "25px",
|
|
102913
102849
|
mobileLocaleListMarginTop: "10px"
|
|
102914
102850
|
},
|
|
102915
102851
|
button: {
|
|
@@ -102950,7 +102886,7 @@ var CountryListSelectorHeading = /*#__PURE__*/createStyled("h2", true ? {
|
|
|
102950
102886
|
} : 0)("margin:0;text-align:center;font-size:", CountryListSelectorTheme.typography.titleSize, ";line-height:", CountryListSelectorTheme.typography.titleLineHeight, ";font-weight:500;" + ( true ? "" : 0));
|
|
102951
102887
|
var CountryListSelectorPanel = /*#__PURE__*/createStyled("div", true ? {
|
|
102952
102888
|
target: "eszgqfj8"
|
|
102953
|
-
} : 0)("padding:", CountryListSelectorTheme.spacing.panelPadding, "
|
|
102889
|
+
} : 0)("padding:", CountryListSelectorTheme.spacing.panelPadding, ";" + ( true ? "" : 0));
|
|
102954
102890
|
|
|
102955
102891
|
/** Stacks multiple `CountryCards` grids when a region has several Contentstack `countries[]` groups. */
|
|
102956
102892
|
var CountryCardGroups = /*#__PURE__*/createStyled("div", true ? {
|
|
@@ -102972,10 +102908,10 @@ var CountryButton = /*#__PURE__*/createStyled("div", true ? {
|
|
|
102972
102908
|
} : 0)("background:transparent;margin:0;padding:0;width:100%;text-align:left;border-bottom:1px solid ", CountryListSelectorTheme.colors.border, ";cursor:pointer;>*{width:100%;}&:hover{border-color:transparent;background:", CountryListSelectorTheme.colors.chipBackground, ";}.country-button-label{cursor:pointer;>span{font-size:", CountryListSelectorTheme.typography.countrySize, ";font-weight:500;}}.country-button-label:focus-visible{outline:1px solid ", CountryListSelectorTheme.colors.chipSelected, ";outline-offset:2px;}@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){&:hover{border-color:", CountryListSelectorTheme.colors.border, ";background:transparent;}.country-button-label{min-height:", CountryListSelectorTheme.sizing.mobileCountryMinHeight, ";padding:0;}.country-button-label>span{font-size:", CountryListSelectorTheme.typography.mobileCountrySize, ";line-height:", CountryListSelectorTheme.typography.mobileCountryLineHeight, ";}}" + ( true ? "" : 0));
|
|
102973
102909
|
var LocaleList = /*#__PURE__*/createStyled("ul", true ? {
|
|
102974
102910
|
target: "eszgqfj3"
|
|
102975
|
-
} : 0)("list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;row-gap:", CountryListSelectorTheme.spacing.localeGap, ";column-gap:16px;@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){margin-top:", CountryListSelectorTheme.spacing.mobileLocaleListMarginTop, ";display:
|
|
102911
|
+
} : 0)("list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;row-gap:", CountryListSelectorTheme.spacing.localeGap, ";column-gap:16px;@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){margin-top:", CountryListSelectorTheme.spacing.mobileLocaleListMarginTop, ";display:flex;flex-wrap:wrap;row-gap:", CountryListSelectorTheme.spacing.mobileLocaleGap, ";column-gap:18px;}" + ( true ? "" : 0));
|
|
102976
102912
|
var LocaleItem = /*#__PURE__*/createStyled("li", true ? {
|
|
102977
102913
|
target: "eszgqfj2"
|
|
102978
|
-
} : 0)("margin:0;display:flex;@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){width:
|
|
102914
|
+
} : 0)("margin:0;display:flex;@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){width:auto;}" + ( true ? "" : 0));
|
|
102979
102915
|
var LocaleButton = /*#__PURE__*/createStyled("div", true ? {
|
|
102980
102916
|
target: "eszgqfj1"
|
|
102981
102917
|
} : 0)("--locale-icon-space:20px;border-radius:", CountryListSelectorTheme.button.borderRadius, ";background:", function (props) {
|
|
@@ -102984,7 +102920,9 @@ var LocaleButton = /*#__PURE__*/createStyled("div", true ? {
|
|
|
102984
102920
|
return props.$selected ? CountryListSelectorTheme.typography.selectedLocaleWeight : CountryListSelectorTheme.typography.localeWeight;
|
|
102985
102921
|
}, ";cursor:pointer;color:", function (props) {
|
|
102986
102922
|
return props.$selected ? CountryListSelectorTheme.colors.localeSelectedTextDesktop : CountryListSelectorTheme.colors.localeColor;
|
|
102987
|
-
}, ";&:hover{color:", CountryListSelectorTheme.colors.chipSelected, ";}}&:hover{background:", CountryListSelectorTheme.colors.chipBackground, ";}.locale-button-label:focus-visible{outline:1px solid ", CountryListSelectorTheme.colors.chipSelected, ";outline-offset:2px;}@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){--locale-icon-space:0px;background:transparent;width:
|
|
102923
|
+
}, ";&:hover{color:", CountryListSelectorTheme.colors.chipSelected, ";}}&:hover{background:", CountryListSelectorTheme.colors.chipBackground, ";}.locale-button-label:focus-visible{outline:1px solid ", CountryListSelectorTheme.colors.chipSelected, ";outline-offset:2px;}@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){--locale-icon-space:0px;background:transparent;width:auto;padding:0;>*{min-height:auto;}&:hover{background:transparent;}.locale-button-label{justify-content:flex-start;padding:0px 4px;min-height:", CountryListSelectorTheme.sizing.mobileLocaleMinHeight, ";}.locale-button-label>span{font-size:", CountryListSelectorTheme.typography.mobileLocaleSize, ";line-height:", CountryListSelectorTheme.typography.mobileLocaleLineHeight, ";font-weight:", CountryListSelectorTheme.typography.localeWeight, ";text-align:left;color:", CountryListSelectorTheme.colors.localeTextMobile, ";}.locale-button-label>span:hover{color:", CountryListSelectorTheme.colors.localeTextMobile, ";}.locale-button-label svg{position:static;transform:none;width:16px;height:16px;}", function (props) {
|
|
102924
|
+
return props.$selected ? "\n background: ".concat(CountryListSelectorTheme.colors.localeSelectedBackgroundDesktop, ";\n\n .locale-button-label > span {\n font-weight: ").concat(CountryListSelectorTheme.typography.selectedLocaleWeight, ";\n color: ").concat(CountryListSelectorTheme.colors.text, ";\n }\n ") : "";
|
|
102925
|
+
}, ";}" + ( true ? "" : 0));
|
|
102988
102926
|
var EmptyState = /*#__PURE__*/createStyled("p", true ? {
|
|
102989
102927
|
target: "eszgqfj0"
|
|
102990
102928
|
} : 0)("margin:0;text-align:center;color:", CountryListSelectorTheme.colors.mutedText, ";" + ( true ? "" : 0));
|
|
@@ -103015,6 +102953,7 @@ function CountryListSelector_toPrimitive(t, r) { if ("object" != CountryListSele
|
|
|
103015
102953
|
|
|
103016
102954
|
|
|
103017
102955
|
|
|
102956
|
+
|
|
103018
102957
|
function navigateToPath(path) {
|
|
103019
102958
|
var browserWindow = globalThis.window;
|
|
103020
102959
|
if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.location)) {
|
|
@@ -103032,24 +102971,11 @@ function navigateToPath(path) {
|
|
|
103032
102971
|
browserWindow.location.assign(path);
|
|
103033
102972
|
}
|
|
103034
102973
|
function SelectedLocaleIcon() {
|
|
103035
|
-
return /*#__PURE__*/(0,jsx_runtime_.
|
|
103036
|
-
|
|
103037
|
-
|
|
103038
|
-
|
|
103039
|
-
|
|
103040
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
103041
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("circle", {
|
|
103042
|
-
cx: "8",
|
|
103043
|
-
cy: "8",
|
|
103044
|
-
r: "8",
|
|
103045
|
-
fill: "currentColor"
|
|
103046
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
103047
|
-
d: "M5.2 8.1L7 9.9L10.8 6.1",
|
|
103048
|
-
stroke: "#FFFFFF",
|
|
103049
|
-
strokeWidth: "1.4",
|
|
103050
|
-
strokeLinecap: "round",
|
|
103051
|
-
strokeLinejoin: "round"
|
|
103052
|
-
})]
|
|
102974
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
102975
|
+
name: "success",
|
|
102976
|
+
size: "small",
|
|
102977
|
+
colorOverride: "#252525",
|
|
102978
|
+
"aria-hidden": true
|
|
103053
102979
|
});
|
|
103054
102980
|
}
|
|
103055
102981
|
function renderLocaleOption(_ref) {
|
|
@@ -103434,8 +103360,9 @@ function normalizeStackMarketSelector_toPrimitive(t, r) { if ("object" != normal
|
|
|
103434
103360
|
function normalizeStackMarketSelector_typeof(o) { "@babel/helpers - typeof"; return normalizeStackMarketSelector_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, normalizeStackMarketSelector_typeof(o); }
|
|
103435
103361
|
/**
|
|
103436
103362
|
* Normalizes Contentstack `market_selector` entry JSON into tab/panel regions:
|
|
103437
|
-
* each region has `
|
|
103438
|
-
* `
|
|
103363
|
+
* `regions[]` → each region has `markets[]` (ISO `iso_code_2`) and each market has `languages[]`
|
|
103364
|
+
* (`iso_code_2` / display names). Output keeps `countries[]` as the normalized market list for
|
|
103365
|
+
* `CountryListSelector` / `buildMarketSelectorTabs`.
|
|
103439
103366
|
*/
|
|
103440
103367
|
|
|
103441
103368
|
function resolveMarketSelectorEntry(data) {
|
|
@@ -103445,8 +103372,18 @@ function resolveMarketSelectorEntry(data) {
|
|
|
103445
103372
|
}
|
|
103446
103373
|
|
|
103447
103374
|
/**
|
|
103448
|
-
*
|
|
103449
|
-
*
|
|
103375
|
+
* Contentstack Live Preview `.$` map for the market selector entry root.
|
|
103376
|
+
* Works for both array-shaped (`[{ ..., $ }]`) and object-shaped (`{ ..., $ }`) `data` props.
|
|
103377
|
+
*/
|
|
103378
|
+
function resolveMarketSelectorDollarFields(data) {
|
|
103379
|
+
var _entry$$;
|
|
103380
|
+
var entry = resolveMarketSelectorEntry(data);
|
|
103381
|
+
return (_entry$$ = entry === null || entry === void 0 ? void 0 : entry.$) !== null && _entry$$ !== void 0 ? _entry$$ : {};
|
|
103382
|
+
}
|
|
103383
|
+
|
|
103384
|
+
/**
|
|
103385
|
+
* Field props under `.$.<fieldKey>` (e.g. `regions.$.region_title`) for Contentstack Live Preview.
|
|
103386
|
+
* Spread the return value onto the DOM node that shows the field value: `{...getContentstackDollarFieldProps($, "region_title")}`.
|
|
103450
103387
|
*/
|
|
103451
103388
|
function getContentstackDollarFieldProps(dollarBlock, fieldKey) {
|
|
103452
103389
|
if (!dollarBlock || !fieldKey) {
|
|
@@ -103469,9 +103406,9 @@ function firstNonEmptyString() {
|
|
|
103469
103406
|
}
|
|
103470
103407
|
return "";
|
|
103471
103408
|
}
|
|
103472
|
-
function normalizeLanguage(
|
|
103473
|
-
var _ref,
|
|
103474
|
-
var source = (_ref = (
|
|
103409
|
+
function normalizeLanguage(languageEntry, index) {
|
|
103410
|
+
var _ref, _languageEntry$langua, _ref2, _source$_metadata$uid, _source$_metadata;
|
|
103411
|
+
var source = (_ref = (_languageEntry$langua = languageEntry === null || languageEntry === void 0 ? void 0 : languageEntry.language) !== null && _languageEntry$langua !== void 0 ? _languageEntry$langua : languageEntry) !== null && _ref !== void 0 ? _ref : {};
|
|
103475
103412
|
var localeIso = firstNonEmptyString(source === null || source === void 0 ? void 0 : source.locale_iso, source === null || source === void 0 ? void 0 : source.iso_code_2);
|
|
103476
103413
|
var localeLabel = firstNonEmptyString(source === null || source === void 0 ? void 0 : source.locales, source === null || source === void 0 ? void 0 : source.full_name, source === null || source === void 0 ? void 0 : source.general_name, source === null || source === void 0 ? void 0 : source.title) || "Language ".concat(index + 1);
|
|
103477
103414
|
var locales$ = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "locales");
|
|
@@ -103486,24 +103423,24 @@ function normalizeLanguage(languageWrapper, index) {
|
|
|
103486
103423
|
locales$: locales$
|
|
103487
103424
|
} : {});
|
|
103488
103425
|
}
|
|
103489
|
-
function
|
|
103490
|
-
var
|
|
103491
|
-
var source =
|
|
103492
|
-
var languagesRaw = (
|
|
103493
|
-
var country$ = getContentstackDollarFieldProps(
|
|
103494
|
-
var countryLabel$ = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "country_label");
|
|
103495
|
-
var currency$ = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "currency");
|
|
103496
|
-
var supportedLanguages$ = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "supported_languages");
|
|
103426
|
+
function normalizeMarketFromStack(market, index) {
|
|
103427
|
+
var _source$languages, _getContentstackDolla, _getContentstackDolla2, _getContentstackDolla3, _ref3, _source$_metadata$uid2, _source$_metadata2, _ref4, _source$default_langu;
|
|
103428
|
+
var source = market !== null && market !== void 0 ? market : {};
|
|
103429
|
+
var languagesRaw = (_source$languages = source.languages) !== null && _source$languages !== void 0 ? _source$languages : [];
|
|
103430
|
+
var country$ = getContentstackDollarFieldProps(market === null || market === void 0 ? void 0 : market.$, "country");
|
|
103431
|
+
var countryLabel$ = (_getContentstackDolla = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "country_label")) !== null && _getContentstackDolla !== void 0 ? _getContentstackDolla : getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "title");
|
|
103432
|
+
var currency$ = (_getContentstackDolla2 = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "currency")) !== null && _getContentstackDolla2 !== void 0 ? _getContentstackDolla2 : getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "currency_code");
|
|
103433
|
+
var supportedLanguages$ = (_getContentstackDolla3 = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "languages")) !== null && _getContentstackDolla3 !== void 0 ? _getContentstackDolla3 : getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "supported_languages");
|
|
103497
103434
|
return normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread({
|
|
103498
|
-
uid: (
|
|
103435
|
+
uid: (_ref3 = (_source$_metadata$uid2 = source === null || source === void 0 || (_source$_metadata2 = source._metadata) === null || _source$_metadata2 === void 0 ? void 0 : _source$_metadata2.uid) !== null && _source$_metadata$uid2 !== void 0 ? _source$_metadata$uid2 : source === null || source === void 0 ? void 0 : source.uid) !== null && _ref3 !== void 0 ? _ref3 : "country-".concat(index),
|
|
103499
103436
|
title: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.country_label, source === null || source === void 0 ? void 0 : source.default_display_country, source === null || source === void 0 ? void 0 : source.title),
|
|
103500
103437
|
label: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.country_label, source === null || source === void 0 ? void 0 : source.default_display_country, source === null || source === void 0 ? void 0 : source.title),
|
|
103501
103438
|
country_code: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.country_iso, source === null || source === void 0 ? void 0 : source.iso_code_2),
|
|
103502
103439
|
currency: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.currency, source === null || source === void 0 ? void 0 : source.currency_code),
|
|
103503
103440
|
eq_home_url: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.eq_home_url),
|
|
103504
103441
|
home_url: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.home_url),
|
|
103505
|
-
default_language_code: String((
|
|
103506
|
-
languages:
|
|
103442
|
+
default_language_code: String((_ref4 = (_source$default_langu = source === null || source === void 0 ? void 0 : source.default_language_code) !== null && _source$default_langu !== void 0 ? _source$default_langu : source === null || source === void 0 ? void 0 : source.default_language) !== null && _ref4 !== void 0 ? _ref4 : "").trim(),
|
|
103443
|
+
languages: languagesRaw.map(normalizeLanguage)
|
|
103507
103444
|
}, country$ ? {
|
|
103508
103445
|
country$: country$
|
|
103509
103446
|
} : {}), countryLabel$ ? {
|
|
@@ -103514,55 +103451,33 @@ function normalizeCountry(countryWrapper, index) {
|
|
|
103514
103451
|
supportedLanguages$: supportedLanguages$
|
|
103515
103452
|
} : {});
|
|
103516
103453
|
}
|
|
103517
|
-
function normalizeRegion(
|
|
103518
|
-
var
|
|
103519
|
-
var
|
|
103520
|
-
var
|
|
103521
|
-
var
|
|
103522
|
-
|
|
103523
|
-
var countries = Array.isArray(groupedCountries) ? groupedCountries.map(function (entry, idx) {
|
|
103524
|
-
return normalizeCountry(entry, idx);
|
|
103525
|
-
}) : [normalizeCountry(countryGroup, 0)];
|
|
103526
|
-
var supportedCountries$ = getContentstackDollarFieldProps(countryGroup === null || countryGroup === void 0 ? void 0 : countryGroup.$, "supported_countries");
|
|
103527
|
-
return normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread({}, supportedCountries$ ? {
|
|
103528
|
-
supportedCountries$: supportedCountries$
|
|
103529
|
-
} : {}), {}, {
|
|
103530
|
-
countries: countries
|
|
103531
|
-
});
|
|
103454
|
+
function normalizeRegion(region, index) {
|
|
103455
|
+
var _getContentstackDolla4, _ref5, _regionSource$_metada, _regionSource$_metada2;
|
|
103456
|
+
var regionSource = region !== null && region !== void 0 ? region : {};
|
|
103457
|
+
var marketsRaw = Array.isArray(regionSource.markets) ? regionSource.markets : [];
|
|
103458
|
+
var countries = marketsRaw.map(function (m, idx) {
|
|
103459
|
+
return normalizeMarketFromStack(m, idx);
|
|
103532
103460
|
});
|
|
103533
|
-
var
|
|
103534
|
-
var
|
|
103535
|
-
countries:
|
|
103536
|
-
return normalizeCountry(entry, idx);
|
|
103537
|
-
})
|
|
103461
|
+
var label$ = (_getContentstackDolla4 = getContentstackDollarFieldProps(regionSource === null || regionSource === void 0 ? void 0 : regionSource.$, "region_title")) !== null && _getContentstackDolla4 !== void 0 ? _getContentstackDolla4 : getContentstackDollarFieldProps(regionSource === null || regionSource === void 0 ? void 0 : regionSource.$, "region_label");
|
|
103462
|
+
var countryGroups = countries.length > 0 ? [{
|
|
103463
|
+
countries: countries
|
|
103538
103464
|
}] : [];
|
|
103539
|
-
var countryGroups = countryGroupsFromLegacy.length ? countryGroupsFromLegacy : marketGroup;
|
|
103540
|
-
var flattenedCountries = countryGroups.flatMap(function (g) {
|
|
103541
|
-
var _g$countries;
|
|
103542
|
-
return (_g$countries = g.countries) !== null && _g$countries !== void 0 ? _g$countries : [];
|
|
103543
|
-
});
|
|
103544
|
-
var label$ = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "region_label");
|
|
103545
103465
|
return normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread({
|
|
103546
|
-
uid: (
|
|
103547
|
-
region_title: firstNonEmptyString(
|
|
103466
|
+
uid: (_ref5 = (_regionSource$_metada = regionSource === null || regionSource === void 0 || (_regionSource$_metada2 = regionSource._metadata) === null || _regionSource$_metada2 === void 0 ? void 0 : _regionSource$_metada2.uid) !== null && _regionSource$_metada !== void 0 ? _regionSource$_metada : regionSource === null || regionSource === void 0 ? void 0 : regionSource.uid) !== null && _ref5 !== void 0 ? _ref5 : "region-".concat(index),
|
|
103467
|
+
region_title: firstNonEmptyString(regionSource === null || regionSource === void 0 ? void 0 : regionSource.region_title, regionSource === null || regionSource === void 0 ? void 0 : regionSource.region_label, regionSource === null || regionSource === void 0 ? void 0 : regionSource.title)
|
|
103548
103468
|
}, label$ ? {
|
|
103549
103469
|
label$: label$
|
|
103550
103470
|
} : {}), {}, {
|
|
103551
|
-
countries:
|
|
103471
|
+
countries: countries,
|
|
103472
|
+
markets: countries,
|
|
103552
103473
|
countryGroups: countryGroups
|
|
103553
103474
|
});
|
|
103554
103475
|
}
|
|
103555
103476
|
function normalizeRegionsForTabs(data, selector) {
|
|
103556
103477
|
var _selector$regions;
|
|
103557
103478
|
var rawRegions = (_selector$regions = selector === null || selector === void 0 ? void 0 : selector.regions) !== null && _selector$regions !== void 0 ? _selector$regions : [];
|
|
103558
|
-
return rawRegions.
|
|
103559
|
-
|
|
103560
|
-
if (Array.isArray(supported) && supported.length > 0) {
|
|
103561
|
-
return supported.map(function (supportedEntry, idx) {
|
|
103562
|
-
return normalizeRegion(supportedEntry, idx);
|
|
103563
|
-
});
|
|
103564
|
-
}
|
|
103565
|
-
return [normalizeRegion(regionEntry, index)];
|
|
103479
|
+
return rawRegions.map(function (region, index) {
|
|
103480
|
+
return normalizeRegion(region, index);
|
|
103566
103481
|
});
|
|
103567
103482
|
}
|
|
103568
103483
|
function resolveMarketSelectorText(marketSelector) {
|
|
@@ -103579,11 +103494,158 @@ function getNormalizedMarketSelectorRegions(data) {
|
|
|
103579
103494
|
var selector = resolveMarketSelectorEntry(data);
|
|
103580
103495
|
return normalizeRegionsForTabs(data, selector);
|
|
103581
103496
|
}
|
|
103497
|
+
;// ./src/components/market-selector/marketSelectorWindow.js
|
|
103498
|
+
|
|
103499
|
+
|
|
103500
|
+
/** Avoid a mobile-first paint with `isMobileViewport === false` (pill stuck inside hidden desktop utility bar). */
|
|
103501
|
+
function getInitialMobileViewportMatches() {
|
|
103502
|
+
try {
|
|
103503
|
+
var w = globalThis.window;
|
|
103504
|
+
if (!(w !== null && w !== void 0 && w.matchMedia)) return false;
|
|
103505
|
+
return Boolean(w.matchMedia(TABS_MOBILE_MEDIA_QUERY).matches);
|
|
103506
|
+
} catch (_unused) {
|
|
103507
|
+
return false;
|
|
103508
|
+
}
|
|
103509
|
+
}
|
|
103510
|
+
function marketSelectorWindow_navigateToPath(path) {
|
|
103511
|
+
var browserWindow = globalThis.window;
|
|
103512
|
+
if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.location)) {
|
|
103513
|
+
return;
|
|
103514
|
+
}
|
|
103515
|
+
try {
|
|
103516
|
+
var topWindow = browserWindow.top;
|
|
103517
|
+
if (topWindow !== null && topWindow !== void 0 && topWindow.location) {
|
|
103518
|
+
topWindow.location.assign(path);
|
|
103519
|
+
return;
|
|
103520
|
+
}
|
|
103521
|
+
} catch (_unused2) {
|
|
103522
|
+
// Fall back when top-level navigation is not accessible.
|
|
103523
|
+
}
|
|
103524
|
+
browserWindow.location.assign(path);
|
|
103525
|
+
}
|
|
103582
103526
|
;// ./src/components/market-selector/MarketSelector.styled.jsx
|
|
103583
103527
|
|
|
103584
103528
|
function MarketSelector_styled_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
103585
103529
|
|
|
103530
|
+
|
|
103586
103531
|
var DESKTOP_MIN_WIDTH_PX = 1025;
|
|
103532
|
+
|
|
103533
|
+
/** Full-screen market modal layer (above mobile drawer z-index 9999). */
|
|
103534
|
+
var MobileMarketFullScreenRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103535
|
+
target: "e1g1uu3p36"
|
|
103536
|
+
} : 0)( true ? {
|
|
103537
|
+
name: "1n6oz2n",
|
|
103538
|
+
styles: "position:fixed;inset:0;z-index:10050;background:#ffffff;display:flex;flex-direction:column;box-sizing:border-box;transform:translateX(15%);opacity:0;transition:transform 220ms ease-out,opacity 220ms ease-out;&[data-state=\"open\"]{transform:translateX(0);opacity:1;}"
|
|
103539
|
+
} : 0);
|
|
103540
|
+
var MobileMarketDialogInner = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103541
|
+
target: "e1g1uu3p35"
|
|
103542
|
+
} : 0)( true ? {
|
|
103543
|
+
name: "1d69jno",
|
|
103544
|
+
styles: "margin:0;padding:0;border:0;width:100%;height:100%;max-width:none;max-height:none;background:#ffffff;display:flex;flex-direction:column;overflow:hidden"
|
|
103545
|
+
} : 0);
|
|
103546
|
+
var MobileStickyHeaderContainer = /*#__PURE__*/createStyled("div", true ? {
|
|
103547
|
+
target: "e1g1uu3p34"
|
|
103548
|
+
} : 0)( true ? {
|
|
103549
|
+
name: "kyd2ed",
|
|
103550
|
+
styles: "position:sticky;top:0;z-index:2;width:100%;max-width:100%;height:110px;min-height:110px;padding-top:66px;padding-bottom:16px;background:#ffffff;box-sizing:border-box"
|
|
103551
|
+
} : 0);
|
|
103552
|
+
var MobileCompactHeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
103553
|
+
target: "e1g1uu3p33"
|
|
103554
|
+
} : 0)( true ? {
|
|
103555
|
+
name: "1tdg822",
|
|
103556
|
+
styles: "flex-shrink:0;box-sizing:border-box;width:100%;max-width:100%;height:28px;min-height:28px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-left:20px;padding-right:20px"
|
|
103557
|
+
} : 0);
|
|
103558
|
+
var MobileCompactTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
103559
|
+
target: "e1g1uu3p32"
|
|
103560
|
+
} : 0)( true ? {
|
|
103561
|
+
name: "eo9mb5",
|
|
103562
|
+
styles: "margin:0;flex:1 1 auto;min-width:0;height:28px;line-height:28px;font-family:Lora,sans-serif;font-weight:400;font-size:22px;color:#252525;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
103563
|
+
} : 0);
|
|
103564
|
+
var MobileModalHeaderCancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103565
|
+
target: "e1g1uu3p31"
|
|
103566
|
+
} : 0)( true ? {
|
|
103567
|
+
name: "fld1nn",
|
|
103568
|
+
styles: "flex:0 0 auto;margin-left:auto;height:28px;display:flex;justify-content:flex-end;align-items:center;.market-selector-mobile-header-cancel{width:auto;max-width:none;min-width:0;min-height:28px;border-radius:20px;padding-top:4px;padding-bottom:4px;padding-left:8px;padding-right:0;justify-content:flex-end;}.market-selector-mobile-header-cancel.MuiButton-root{min-width:0;}.market-selector-mobile-header-cancel span{min-width:0;white-space:nowrap;}"
|
|
103569
|
+
} : 0);
|
|
103570
|
+
var MobileModalScrollContent = /*#__PURE__*/createStyled("div", true ? {
|
|
103571
|
+
target: "e1g1uu3p30"
|
|
103572
|
+
} : 0)( true ? {
|
|
103573
|
+
name: "1q7526u",
|
|
103574
|
+
styles: "flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;display:flex;flex-direction:column;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{width:0;height:0;display:none;}"
|
|
103575
|
+
} : 0);
|
|
103576
|
+
var MobileRememberControlsWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103577
|
+
target: "e1g1uu3p29"
|
|
103578
|
+
} : 0)( true ? {
|
|
103579
|
+
name: "2wv1be",
|
|
103580
|
+
styles: "width:100%;box-sizing:border-box"
|
|
103581
|
+
} : 0);
|
|
103582
|
+
var MobileRememberControls = /*#__PURE__*/createStyled("div", true ? {
|
|
103583
|
+
target: "e1g1uu3p28"
|
|
103584
|
+
} : 0)( true ? {
|
|
103585
|
+
name: "1dmiggy",
|
|
103586
|
+
styles: "display:flex;align-items:center;justify-content:flex-start"
|
|
103587
|
+
} : 0);
|
|
103588
|
+
var MobileRememberRowCompact = /*#__PURE__*/createStyled("label", true ? {
|
|
103589
|
+
target: "e1g1uu3p27"
|
|
103590
|
+
} : 0)( true ? {
|
|
103591
|
+
name: "1v7mvq",
|
|
103592
|
+
styles: "display:inline-flex;align-items:center;gap:10px;width:246px;height:44px;border-radius:24px;padding:0 20px;box-sizing:border-box;cursor:pointer;color:#5f5f5f;font-family:Lora,sans-serif;font-size:16px;line-height:22px;font-weight:500;text-align:center;vertical-align:middle;background:transparent;&:hover{background:#ebebeb;color:#252525;text-decoration:underline;text-decoration-color:#252525;}&:active{background:#dcdcdc;}&[data-checked=\"true\"]{background:transparent;color:#252525;}&[data-checked=\"true\"][data-toggle-source=\"row\"][data-hovered=\"true\"]{background:#dcdcdc;color:#252525;text-decoration:none;}&[data-toggle-source=\"checkbox\"][data-hovered=\"true\"]{background:#ebebeb;color:#252525;text-decoration:underline;text-decoration-color:#252525;}"
|
|
103593
|
+
} : 0);
|
|
103594
|
+
var MobileLocaleSectionBlock = /*#__PURE__*/createStyled("div", true ? {
|
|
103595
|
+
target: "e1g1uu3p26"
|
|
103596
|
+
} : 0)( true ? {
|
|
103597
|
+
name: "1uu8bvb",
|
|
103598
|
+
styles: "width:100%;min-height:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;padding:0 0 16px;border-bottom:1px solid #e0e0e0;box-sizing:border-box"
|
|
103599
|
+
} : 0);
|
|
103600
|
+
var MobileLocaleList = /*#__PURE__*/createStyled("ul", true ? {
|
|
103601
|
+
target: "e1g1uu3p25"
|
|
103602
|
+
} : 0)( true ? {
|
|
103603
|
+
name: "1pxu7om",
|
|
103604
|
+
styles: "width:100%;min-height:0;list-style:none;margin:0;padding:0"
|
|
103605
|
+
} : 0);
|
|
103606
|
+
var MobileLocaleRow = /*#__PURE__*/createStyled("li", true ? {
|
|
103607
|
+
target: "e1g1uu3p24"
|
|
103608
|
+
} : 0)( true ? {
|
|
103609
|
+
name: "duoqfw",
|
|
103610
|
+
styles: "width:100%;min-height:44px;padding:0 20px;box-sizing:border-box"
|
|
103611
|
+
} : 0);
|
|
103612
|
+
|
|
103613
|
+
/** Same navigation affordance as desktop `CountryListSelector` locale links. */
|
|
103614
|
+
var MobileLocaleRowLink = /*#__PURE__*/createStyled("a", true ? {
|
|
103615
|
+
target: "e1g1uu3p23"
|
|
103616
|
+
} : 0)( true ? {
|
|
103617
|
+
name: "12tmgo3",
|
|
103618
|
+
styles: "display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:44px;box-sizing:border-box;text-decoration:none;color:inherit;cursor:pointer;&:hover{background:rgba(0, 0, 0, 0.04);}&:focus-visible{outline:1px solid #007bff;outline-offset:1px;}"
|
|
103619
|
+
} : 0);
|
|
103620
|
+
var MobileLocaleRowMain = /*#__PURE__*/createStyled("div", true ? {
|
|
103621
|
+
target: "e1g1uu3p22"
|
|
103622
|
+
} : 0)( true ? {
|
|
103623
|
+
name: "6778cq",
|
|
103624
|
+
styles: "width:280px;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:4px"
|
|
103625
|
+
} : 0);
|
|
103626
|
+
var MobileLocaleText = /*#__PURE__*/createStyled("span", true ? {
|
|
103627
|
+
target: "e1g1uu3p21"
|
|
103628
|
+
} : 0)("min-height:44px;display:inline-flex;align-items:center;flex:1 1 auto;min-width:0;font-family:Lora,sans-serif;font-size:16px;line-height:22px;color:#252525;vertical-align:middle;font-weight:", function (p) {
|
|
103629
|
+
return p.$selected ? 600 : 400;
|
|
103630
|
+
}, ";" + ( true ? "" : 0));
|
|
103631
|
+
var MobileLocaleStatusIcon = /*#__PURE__*/createStyled(dist.NsIcon, true ? {
|
|
103632
|
+
target: "e1g1uu3p20"
|
|
103633
|
+
} : 0)( true ? {
|
|
103634
|
+
name: "1oi3xqh",
|
|
103635
|
+
styles: "width:24px;height:24px;flex-shrink:0;color:#252525"
|
|
103636
|
+
} : 0);
|
|
103637
|
+
var MobileModalBody = /*#__PURE__*/createStyled("div", true ? {
|
|
103638
|
+
target: "e1g1uu3p19"
|
|
103639
|
+
} : 0)( true ? {
|
|
103640
|
+
name: "1vektn8",
|
|
103641
|
+
styles: "width:100%;min-height:0;display:flex;flex-direction:column;gap:16px;padding-bottom:48px;box-sizing:border-box"
|
|
103642
|
+
} : 0);
|
|
103643
|
+
var MobileRegionsSection = /*#__PURE__*/createStyled("div", true ? {
|
|
103644
|
+
target: "e1g1uu3p18"
|
|
103645
|
+
} : 0)( true ? {
|
|
103646
|
+
name: "1wqadvr",
|
|
103647
|
+
styles: "width:100%;flex-shrink:0;display:flex;flex-direction:column;box-sizing:border-box;.market-selector-mobile-regions-tabs{width:100%;}.market-selector-mobile-regions-tabs [class*=\"TabList\"]{flex:none;min-height:0;height:auto;max-height:none;overflow:visible;padding:0;}.market-selector-mobile-regions-tabs [data-tabs-mobile-accordion]{display:block;flex:none;overflow-y:visible;overflow-x:hidden;max-height:none;padding-top:0;scrollbar-width:none;-ms-overflow-style:none;}.market-selector-mobile-regions-tabs [data-tabs-mobile-accordion]::-webkit-scrollbar{width:0;height:0;display:none;}.market-selector-mobile-regions-tabs [class*=\"MobileTabRow\"]{touch-action:pan-y;}.market-selector-mobile-regions-tabs [class*=\"MobileTabRowMain\"]{min-height:44px;}.market-selector-mobile-regions-tabs [class*=\"MobileAccordionPanel\"]{overflow:visible;touch-action:pan-y;}"
|
|
103648
|
+
} : 0);
|
|
103587
103649
|
var TriggerPillSlash = /*#__PURE__*/createStyled(dist.NsIcon, true ? {
|
|
103588
103650
|
target: "e1g1uu3p17"
|
|
103589
103651
|
} : 0)( true ? {
|
|
@@ -103596,35 +103658,26 @@ var TriggerPillInner = /*#__PURE__*/createStyled("span", true ? {
|
|
|
103596
103658
|
name: "1edu2bp",
|
|
103597
103659
|
styles: "display:inline-flex;align-items:center;gap:0px;color:inherit;border-bottom:1px solid transparent;box-sizing:border-box"
|
|
103598
103660
|
} : 0);
|
|
103599
|
-
var MarketSelectorRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103600
|
-
target: "e1g1uu3p15"
|
|
103601
|
-
} : 0)( true ? {
|
|
103602
|
-
name: "13jutq1",
|
|
103603
|
-
styles: "display:inline-flex;@media (max-width: 1024px){display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:100%;}"
|
|
103604
|
-
} : 0);
|
|
103605
103661
|
|
|
103606
|
-
/**
|
|
103607
|
-
|
|
103662
|
+
/**
|
|
103663
|
+
* Mobile nav drawer market control: text + chevron only (no pill); intrinsic width.
|
|
103664
|
+
* Label color matches earlier market trigger tokens (#5f5f5f, Lora).
|
|
103665
|
+
*/
|
|
103666
|
+
var MobileDrawerTriggerPill = /*#__PURE__*/createStyled("button", true ? {
|
|
103667
|
+
target: "e1g1uu3p15"
|
|
103668
|
+
} : 0)("appearance:none;box-sizing:border-box;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#5f5f5f;font-family:Lora,sans-serif;font-weight:500;font-size:16px;line-height:32px;min-height:32px;display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;cursor:pointer;text-decoration:none;flex:0 1 auto;min-width:0;max-width:100%;&[data-trigger-mode=\"drawerPortal\"]{justify-content:flex-end;}", TriggerPillInner, "{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}&:hover{color:#2f2f2f;}&:focus-visible{outline:1px solid #007bff;outline-offset:1px;color:#2f2f2f;}svg{flex-shrink:0;width:16px;height:16px;color:currentColor;}" + ( true ? "" : 0));
|
|
103669
|
+
var MarketSelectorRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103608
103670
|
target: "e1g1uu3p14"
|
|
103609
|
-
} : 0)( true ?
|
|
103610
|
-
name: "2wv1be",
|
|
103611
|
-
styles: "width:100%;box-sizing:border-box"
|
|
103612
|
-
} : 0);
|
|
103671
|
+
} : 0)("display:inline-flex;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){&[data-drawer-portal-host=\"true\"]{display:contents;}&:not([data-drawer-portal-host=\"true\"]){display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:100%;}}" + ( true ? "" : 0));
|
|
103613
103672
|
var TriggerPill = /*#__PURE__*/createStyled("button", true ? {
|
|
103614
103673
|
target: "e1g1uu3p13"
|
|
103615
103674
|
} : 0)("appearance:none;border:0;background:transparent;color:#5f5f5f;font-family:Lora,sans-serif;font-weight:500;font-size:16px;line-height:22px;min-height:44px;padding:11px 16px;border-radius:24px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;&:hover{background:#efefef;color:#2f2f2f;text-decoration:none;", TriggerPillInner, "{border-bottom-color:currentColor;}}&:focus-visible{outline:1px solid #007bff;outline-offset:1px;color:#2f2f2f;text-decoration:none;", TriggerPillInner, "{border-bottom-color:currentColor;}}" + ( true ? "" : 0));
|
|
103616
103675
|
var Overlay = /*#__PURE__*/createStyled("div", true ? {
|
|
103617
103676
|
target: "e1g1uu3p12"
|
|
103618
|
-
} : 0)( true ?
|
|
103619
|
-
name: "cbjq7",
|
|
103620
|
-
styles: "position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);z-index:1400;display:flex;align-items:flex-start;justify-content:center;padding:0;opacity:0;transition:opacity 220ms ease-in;&[data-state=\"open\"]{opacity:1;transition:opacity 220ms ease-out;}@media (max-width: 1024px){padding:0;align-items:stretch;}"
|
|
103621
|
-
} : 0);
|
|
103677
|
+
} : 0)("position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);z-index:1400;display:flex;align-items:flex-start;justify-content:center;padding:0;opacity:0;transition:opacity 220ms ease-in;&[data-state=\"open\"]{opacity:1;transition:opacity 220ms ease-out;}@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){padding:0;align-items:stretch;}" + ( true ? "" : 0));
|
|
103622
103678
|
var ModalSurface = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103623
103679
|
target: "e1g1uu3p11"
|
|
103624
|
-
} : 0)( true ?
|
|
103625
|
-
name: "axwg80",
|
|
103626
|
-
styles: "width:100%;height:auto;background:#ffffff;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;margin:0;padding:0;border:0;transform-origin:center;transform:scaleY(0.88);opacity:0;transition:transform 220ms ease-in,opacity 220ms ease-in;&[data-state=\"open\"]{transform:scaleY(1);opacity:1;transition:transform 220ms ease-out,opacity 220ms ease-out;}@media (max-width: 1024px){width:100%;max-height:100%;border:0;transform-origin:top center;}"
|
|
103627
|
-
} : 0);
|
|
103680
|
+
} : 0)("width:100%;height:auto;background:#ffffff;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;margin:0;padding:0;border:0;transform-origin:center;transform:scaleY(0.88);opacity:0;transition:transform 220ms ease-in,opacity 220ms ease-in;&[data-state=\"open\"]{transform:scaleY(1);opacity:1;transition:transform 220ms ease-out,opacity 220ms ease-out;}@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){width:100%;max-height:100%;border:0;transform-origin:top center;}" + ( true ? "" : 0));
|
|
103628
103681
|
var ModalScrollArea = /*#__PURE__*/createStyled("div", true ? {
|
|
103629
103682
|
target: "e1g1uu3p10"
|
|
103630
103683
|
} : 0)( true ? {
|
|
@@ -103642,22 +103695,13 @@ var StickyTop = /*#__PURE__*/createStyled("div", true ? {
|
|
|
103642
103695
|
} : 0);
|
|
103643
103696
|
var HeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
103644
103697
|
target: "e1g1uu3p7"
|
|
103645
|
-
} : 0)( true ?
|
|
103646
|
-
name: "1ec45cr",
|
|
103647
|
-
styles: "width:100%;height:78px;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:32px 32px 16px;@media (max-width: 1024px){min-height:78px;grid-template-columns:1fr auto;padding:0 20px;}"
|
|
103648
|
-
} : 0);
|
|
103698
|
+
} : 0)("width:100%;height:78px;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:32px 32px 16px;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){min-height:78px;grid-template-columns:1fr auto;padding:0 20px;}" + ( true ? "" : 0));
|
|
103649
103699
|
var LogoWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103650
103700
|
target: "e1g1uu3p6"
|
|
103651
|
-
} : 0)( true ?
|
|
103652
|
-
name: "1cl6vm6",
|
|
103653
|
-
styles: "display:inline-flex;align-items:center;justify-content:flex-start;width:147.5px;height:30px;>*{width:147.5px;height:30px;display:inline-flex;}@media (max-width: 1024px){display:none;}"
|
|
103654
|
-
} : 0);
|
|
103701
|
+
} : 0)("display:inline-flex;align-items:center;justify-content:flex-start;width:147.5px;height:30px;>*{width:147.5px;height:30px;display:inline-flex;}@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
|
|
103655
103702
|
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
103656
103703
|
target: "e1g1uu3p5"
|
|
103657
|
-
} : 0)( true ?
|
|
103658
|
-
name: "gg8qcb",
|
|
103659
|
-
styles: "margin:0;text-align:left;color:#252525;font-family:Lora,sans-serif;width:364px;height:34px;font-size:26px;line-height:34px;font-weight:400;@media (max-width: 1024px){text-align:left;font-size:44px;line-height:58px;}"
|
|
103660
|
-
} : 0);
|
|
103704
|
+
} : 0)("margin:0;text-align:left;color:#252525;font-family:Lora,sans-serif;width:364px;height:34px;font-size:26px;line-height:34px;font-weight:400;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){text-align:left;font-size:44px;line-height:58px;}" + ( true ? "" : 0));
|
|
103661
103705
|
var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103662
103706
|
target: "e1g1uu3p4"
|
|
103663
103707
|
} : 0)( true ? {
|
|
@@ -103666,16 +103710,10 @@ var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
|
103666
103710
|
} : 0);
|
|
103667
103711
|
var TopControls = /*#__PURE__*/createStyled("div", true ? {
|
|
103668
103712
|
target: "e1g1uu3p3"
|
|
103669
|
-
} : 0)( true ?
|
|
103670
|
-
name: "70hzpq",
|
|
103671
|
-
styles: "display:flex;align-items:center;justify-content:center;@media (max-width: 1024px){justify-content:flex-start;}"
|
|
103672
|
-
} : 0);
|
|
103713
|
+
} : 0)("display:flex;align-items:center;justify-content:center;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){justify-content:flex-start;}" + ( true ? "" : 0));
|
|
103673
103714
|
var TabsRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103674
103715
|
target: "e1g1uu3p2"
|
|
103675
|
-
} : 0)( true ?
|
|
103676
|
-
name: "v5dtsv",
|
|
103677
|
-
styles: "width:100%;min-height:88px;box-sizing:border-box;display:block;gap:32px;padding:22px 32px;.market-selector-tabs{width:100%;max-width:1440px;margin:0 auto;}.market-selector-tabs [role=\"tablist\"]{width:100%;height:44px;padding:0;box-sizing:border-box;justify-content:center;gap:8px;}@media (max-width: 1024px){display:none;}"
|
|
103678
|
-
} : 0);
|
|
103716
|
+
} : 0)("width:100%;min-height:88px;box-sizing:border-box;display:block;gap:32px;padding:22px 32px;.market-selector-tabs{width:100%;max-width:1440px;margin:0 auto;}.market-selector-tabs [role=\"tablist\"]{width:100%;height:44px;padding:0;box-sizing:border-box;justify-content:center;gap:8px;}@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
|
|
103679
103717
|
var RememberRow = /*#__PURE__*/createStyled("label", true ? {
|
|
103680
103718
|
target: "e1g1uu3p1"
|
|
103681
103719
|
} : 0)( true ? {
|
|
@@ -103952,8 +103990,21 @@ function MarketSelector_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
103952
103990
|
|
|
103953
103991
|
|
|
103954
103992
|
|
|
103993
|
+
|
|
103994
|
+
|
|
103955
103995
|
var REMEMBER_KEY = "marketSelectorRemember";
|
|
103956
103996
|
var SELECTION_KEY = "marketSelectorSelection";
|
|
103997
|
+
function collectMarketsWithParentRegions(regions) {
|
|
103998
|
+
return (regions !== null && regions !== void 0 ? regions : []).flatMap(function (region) {
|
|
103999
|
+
var _region$countries;
|
|
104000
|
+
return ((_region$countries = region === null || region === void 0 ? void 0 : region.countries) !== null && _region$countries !== void 0 ? _region$countries : []).map(function (country) {
|
|
104001
|
+
return {
|
|
104002
|
+
country: country,
|
|
104003
|
+
region: region
|
|
104004
|
+
};
|
|
104005
|
+
});
|
|
104006
|
+
});
|
|
104007
|
+
}
|
|
103957
104008
|
var VB_EMPTY_STATE_TEXT = "Markets and languages are not authorable in Visual Builder mode.";
|
|
103958
104009
|
var DEFAULT_EMPTY_STATE_TEXT = "No countries found.";
|
|
103959
104010
|
function computeTriggerDisplay(_ref) {
|
|
@@ -103982,6 +104033,135 @@ function computeTriggerDisplay(_ref) {
|
|
|
103982
104033
|
languageLabel: languageCode
|
|
103983
104034
|
};
|
|
103984
104035
|
}
|
|
104036
|
+
function buildMobileLocaleFallbackRows(effectivePageLocale) {
|
|
104037
|
+
var label = String(effectivePageLocale !== null && effectivePageLocale !== void 0 ? effectivePageLocale : "").trim();
|
|
104038
|
+
if (!label) return [];
|
|
104039
|
+
return [{
|
|
104040
|
+
id: "fallback",
|
|
104041
|
+
label: label,
|
|
104042
|
+
currency: "",
|
|
104043
|
+
languageLabel: label,
|
|
104044
|
+
selected: true,
|
|
104045
|
+
navigable: false,
|
|
104046
|
+
country: null,
|
|
104047
|
+
locale: null,
|
|
104048
|
+
region: null
|
|
104049
|
+
}];
|
|
104050
|
+
}
|
|
104051
|
+
function findCountryRegionByPersistedUid(pairs, persistedUid) {
|
|
104052
|
+
if (!persistedUid) return null;
|
|
104053
|
+
var hit = pairs.find(function (p) {
|
|
104054
|
+
var _p$country$uid, _p$country;
|
|
104055
|
+
return String((_p$country$uid = (_p$country = p.country) === null || _p$country === void 0 ? void 0 : _p$country.uid) !== null && _p$country$uid !== void 0 ? _p$country$uid : "") === persistedUid;
|
|
104056
|
+
});
|
|
104057
|
+
if (!hit) return null;
|
|
104058
|
+
return {
|
|
104059
|
+
country: hit.country,
|
|
104060
|
+
region: hit.region
|
|
104061
|
+
};
|
|
104062
|
+
}
|
|
104063
|
+
function findCountryRegionByPageCountryCode(pairs, effectivePageLocale) {
|
|
104064
|
+
var _parseStackEntryLocal2 = parseStackEntryLocale(effectivePageLocale),
|
|
104065
|
+
countryCode = _parseStackEntryLocal2.countryCode;
|
|
104066
|
+
if (!countryCode) return null;
|
|
104067
|
+
var cc = String(countryCode).toLowerCase();
|
|
104068
|
+
var hit = pairs.find(function (p) {
|
|
104069
|
+
return getCountryCode(p.country) === cc;
|
|
104070
|
+
});
|
|
104071
|
+
if (!hit) return null;
|
|
104072
|
+
return {
|
|
104073
|
+
country: hit.country,
|
|
104074
|
+
region: hit.region
|
|
104075
|
+
};
|
|
104076
|
+
}
|
|
104077
|
+
function findDefaultCountryRegion(pairs) {
|
|
104078
|
+
var _pairs$find;
|
|
104079
|
+
var hit = (_pairs$find = pairs.find(function (p) {
|
|
104080
|
+
var _p$country$languages, _p$country2;
|
|
104081
|
+
return ((_p$country$languages = (_p$country2 = p.country) === null || _p$country2 === void 0 ? void 0 : _p$country2.languages) !== null && _p$country$languages !== void 0 ? _p$country$languages : []).some(function (l) {
|
|
104082
|
+
return l.selected;
|
|
104083
|
+
});
|
|
104084
|
+
})) !== null && _pairs$find !== void 0 ? _pairs$find : pairs[0];
|
|
104085
|
+
return {
|
|
104086
|
+
country: hit === null || hit === void 0 ? void 0 : hit.country,
|
|
104087
|
+
region: hit === null || hit === void 0 ? void 0 : hit.region
|
|
104088
|
+
};
|
|
104089
|
+
}
|
|
104090
|
+
function resolveCountryAndRegionForMobileRows(pairs, persistedSelection, effectivePageLocale) {
|
|
104091
|
+
var _persistedSelection$c;
|
|
104092
|
+
var persistedUid = String((_persistedSelection$c = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.countryUid) !== null && _persistedSelection$c !== void 0 ? _persistedSelection$c : "").trim();
|
|
104093
|
+
var fromPersisted = findCountryRegionByPersistedUid(pairs, persistedUid);
|
|
104094
|
+
if (fromPersisted) return fromPersisted;
|
|
104095
|
+
var fromPageCode = findCountryRegionByPageCountryCode(pairs, effectivePageLocale);
|
|
104096
|
+
if (fromPageCode) return fromPageCode;
|
|
104097
|
+
return findDefaultCountryRegion(pairs);
|
|
104098
|
+
}
|
|
104099
|
+
function isMobileLocaleRowSelected(_ref2) {
|
|
104100
|
+
var selLocaleIso = _ref2.selLocaleIso,
|
|
104101
|
+
localeIso = _ref2.localeIso,
|
|
104102
|
+
lang = _ref2.lang,
|
|
104103
|
+
pageLangLower = _ref2.pageLangLower,
|
|
104104
|
+
idx = _ref2.idx;
|
|
104105
|
+
if (selLocaleIso) return localeIso === selLocaleIso;
|
|
104106
|
+
if (lang.selected) return true;
|
|
104107
|
+
if (pageLangLower && localeIso === pageLangLower) return true;
|
|
104108
|
+
return !selLocaleIso && !pageLangLower && idx === 0;
|
|
104109
|
+
}
|
|
104110
|
+
function mapCountryLanguagesToMobileLocaleRows(_ref3) {
|
|
104111
|
+
var _country$languages, _country$currency, _persistedSelection$l;
|
|
104112
|
+
var country = _ref3.country,
|
|
104113
|
+
region = _ref3.region,
|
|
104114
|
+
persistedSelection = _ref3.persistedSelection,
|
|
104115
|
+
effectivePageLocale = _ref3.effectivePageLocale;
|
|
104116
|
+
var languages = (_country$languages = country === null || country === void 0 ? void 0 : country.languages) !== null && _country$languages !== void 0 ? _country$languages : [];
|
|
104117
|
+
var currency = String((_country$currency = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency !== void 0 ? _country$currency : "").trim();
|
|
104118
|
+
var selLocaleIso = String((_persistedSelection$l = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.localeIso) !== null && _persistedSelection$l !== void 0 ? _persistedSelection$l : "").trim().toLowerCase();
|
|
104119
|
+
var _parseStackEntryLocal3 = parseStackEntryLocale(effectivePageLocale),
|
|
104120
|
+
pageLang = _parseStackEntryLocal3.languageCode;
|
|
104121
|
+
var pageLangLower = String(pageLang !== null && pageLang !== void 0 ? pageLang : "").trim().toLowerCase();
|
|
104122
|
+
return languages.map(function (lang, idx) {
|
|
104123
|
+
var _lang$locale_iso, _lang$locale_iso2, _ref4, _lang$uid;
|
|
104124
|
+
var langLabel = getLanguageLabel(lang).trim() || String((_lang$locale_iso = lang === null || lang === void 0 ? void 0 : lang.locale_iso) !== null && _lang$locale_iso !== void 0 ? _lang$locale_iso : "").toUpperCase();
|
|
104125
|
+
var label = currency ? "".concat(currency, " ").concat(langLabel) : langLabel;
|
|
104126
|
+
var localeIso = String((_lang$locale_iso2 = lang === null || lang === void 0 ? void 0 : lang.locale_iso) !== null && _lang$locale_iso2 !== void 0 ? _lang$locale_iso2 : "").trim().toLowerCase();
|
|
104127
|
+
var selected = isMobileLocaleRowSelected({
|
|
104128
|
+
selLocaleIso: selLocaleIso,
|
|
104129
|
+
localeIso: localeIso,
|
|
104130
|
+
lang: lang,
|
|
104131
|
+
pageLangLower: pageLangLower,
|
|
104132
|
+
idx: idx
|
|
104133
|
+
});
|
|
104134
|
+
return {
|
|
104135
|
+
id: String((_ref4 = (_lang$uid = lang.uid) !== null && _lang$uid !== void 0 ? _lang$uid : getLocaleCode(lang)) !== null && _ref4 !== void 0 ? _ref4 : idx),
|
|
104136
|
+
label: label,
|
|
104137
|
+
currency: currency,
|
|
104138
|
+
languageLabel: langLabel,
|
|
104139
|
+
selected: selected,
|
|
104140
|
+
navigable: true,
|
|
104141
|
+
country: country,
|
|
104142
|
+
locale: lang,
|
|
104143
|
+
region: region
|
|
104144
|
+
};
|
|
104145
|
+
});
|
|
104146
|
+
}
|
|
104147
|
+
function buildMobileLocaleRows(_ref5) {
|
|
104148
|
+
var regions = _ref5.regions,
|
|
104149
|
+
persistedSelection = _ref5.persistedSelection,
|
|
104150
|
+
effectivePageLocale = _ref5.effectivePageLocale;
|
|
104151
|
+
var pairs = collectMarketsWithParentRegions(regions);
|
|
104152
|
+
if (!pairs.length) {
|
|
104153
|
+
return buildMobileLocaleFallbackRows(effectivePageLocale);
|
|
104154
|
+
}
|
|
104155
|
+
var _resolveCountryAndReg = resolveCountryAndRegionForMobileRows(pairs, persistedSelection, effectivePageLocale),
|
|
104156
|
+
country = _resolveCountryAndReg.country,
|
|
104157
|
+
region = _resolveCountryAndReg.region;
|
|
104158
|
+
return mapCountryLanguagesToMobileLocaleRows({
|
|
104159
|
+
country: country,
|
|
104160
|
+
region: region,
|
|
104161
|
+
persistedSelection: persistedSelection,
|
|
104162
|
+
effectivePageLocale: effectivePageLocale
|
|
104163
|
+
});
|
|
104164
|
+
}
|
|
103985
104165
|
function useRememberedMarketSelection() {
|
|
103986
104166
|
var _useState = (0,external_react_.useState)(false),
|
|
103987
104167
|
_useState2 = MarketSelector_slicedToArray(_useState, 2),
|
|
@@ -104032,7 +104212,7 @@ function useMarketSelectorModalController() {
|
|
|
104032
104212
|
_useState8 = MarketSelector_slicedToArray(_useState7, 2),
|
|
104033
104213
|
isVisible = _useState8[0],
|
|
104034
104214
|
setIsVisible = _useState8[1];
|
|
104035
|
-
var _useState9 = (0,external_react_.useState)(
|
|
104215
|
+
var _useState9 = (0,external_react_.useState)(getInitialMobileViewportMatches),
|
|
104036
104216
|
_useState0 = MarketSelector_slicedToArray(_useState9, 2),
|
|
104037
104217
|
isMobileViewport = _useState0[0],
|
|
104038
104218
|
setIsMobileViewport = _useState0[1];
|
|
@@ -104047,7 +104227,6 @@ function useMarketSelectorModalController() {
|
|
|
104047
104227
|
};
|
|
104048
104228
|
var openModal = function openModal() {
|
|
104049
104229
|
var _globalThis$window3;
|
|
104050
|
-
if (isMobileViewport) return;
|
|
104051
104230
|
if (closeTimerRef.current) {
|
|
104052
104231
|
clearTimeout(closeTimerRef.current);
|
|
104053
104232
|
closeTimerRef.current = null;
|
|
@@ -104114,92 +104293,48 @@ function useMarketSelectorModalController() {
|
|
|
104114
104293
|
closeModal: closeModal
|
|
104115
104294
|
};
|
|
104116
104295
|
}
|
|
104117
|
-
function
|
|
104118
|
-
var
|
|
104119
|
-
var
|
|
104120
|
-
|
|
104121
|
-
|
|
104122
|
-
|
|
104123
|
-
|
|
104124
|
-
|
|
104125
|
-
|
|
104126
|
-
|
|
104127
|
-
|
|
104128
|
-
|
|
104129
|
-
|
|
104130
|
-
|
|
104131
|
-
|
|
104132
|
-
|
|
104133
|
-
|
|
104134
|
-
|
|
104135
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPill, {
|
|
104136
|
-
type: "button",
|
|
104137
|
-
"aria-haspopup": "dialog",
|
|
104138
|
-
"aria-expanded": isVisible,
|
|
104139
|
-
"aria-controls": "market-selector-modal",
|
|
104140
|
-
onClick: openModal,
|
|
104141
|
-
"data-testid": "market-selector-trigger",
|
|
104142
|
-
children: triggerDisplay ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(TriggerPillInner, {
|
|
104143
|
-
children: [triggerPillCurrency ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", MarketSelector_objectSpread(MarketSelector_objectSpread({}, (_triggerDisplay$curre = triggerDisplay.currency$) !== null && _triggerDisplay$curre !== void 0 ? _triggerDisplay$curre : {}), {}, {
|
|
104144
|
-
children: triggerPillCurrency
|
|
104145
|
-
})) : null, triggerPillShowSlash ? /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPillSlash, {
|
|
104146
|
-
name: "slash",
|
|
104147
|
-
size: "small",
|
|
104148
|
-
"aria-hidden": true,
|
|
104149
|
-
colorOverride: "currentColor"
|
|
104150
|
-
}) : null, triggerPillLanguage ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", MarketSelector_objectSpread(MarketSelector_objectSpread({}, (_triggerDisplay$local = triggerDisplay.locales$) !== null && _triggerDisplay$local !== void 0 ? _triggerDisplay$local : {}), {}, {
|
|
104151
|
-
children: triggerPillLanguage
|
|
104152
|
-
})) : null]
|
|
104153
|
-
}) : null
|
|
104154
|
-
});
|
|
104155
|
-
}
|
|
104156
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelectorMobileNavHost, {
|
|
104157
|
-
"data-testid": "market-selector-mobile-nav",
|
|
104158
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Tabs, {
|
|
104159
|
-
className: "market-selector-tabs",
|
|
104160
|
-
tabs: tabs,
|
|
104161
|
-
activationMode: "click",
|
|
104162
|
-
defaultActiveId: persistedActiveTabId,
|
|
104163
|
-
tabAlign: "center",
|
|
104164
|
-
tabListContainer$: selector === null || selector === void 0 || (_selector$regions = selector.regions) === null || _selector$regions === void 0 || (_selector$regions = _selector$regions[0]) === null || _selector$regions === void 0 || (_selector$regions = _selector$regions.$) === null || _selector$regions === void 0 ? void 0 : _selector$regions.supported_regions,
|
|
104165
|
-
renderPanel: function renderPanel(tab) {
|
|
104166
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(CountryListSelector, {
|
|
104167
|
-
variant: "regionPanelOnly",
|
|
104168
|
-
data: tab !== null && tab !== void 0 && tab.data ? [tab.data] : [],
|
|
104169
|
-
emptyStateText: emptyStateText,
|
|
104170
|
-
selectedCountryId: persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.countryUid,
|
|
104171
|
-
selectedLocaleCode: persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.localeIso,
|
|
104172
|
-
onCountryNavigate: handleSelectionChange,
|
|
104173
|
-
onLocaleNavigate: handleSelectionChange,
|
|
104174
|
-
resolveLocalePath: resolveLocalePath
|
|
104175
|
-
});
|
|
104176
|
-
},
|
|
104177
|
-
ariaLabel: ARIA_LABEL_MARKET_SELECTOR_TABS
|
|
104178
|
-
})
|
|
104296
|
+
function renderTriggerInner(_ref6) {
|
|
104297
|
+
var _triggerDisplay$curre, _triggerDisplay$local;
|
|
104298
|
+
var triggerDisplay = _ref6.triggerDisplay,
|
|
104299
|
+
triggerPillCurrency = _ref6.triggerPillCurrency,
|
|
104300
|
+
triggerPillLanguage = _ref6.triggerPillLanguage,
|
|
104301
|
+
triggerPillShowSlash = _ref6.triggerPillShowSlash;
|
|
104302
|
+
if (!triggerDisplay) return null;
|
|
104303
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(TriggerPillInner, {
|
|
104304
|
+
children: [triggerPillCurrency ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", MarketSelector_objectSpread(MarketSelector_objectSpread({}, (_triggerDisplay$curre = triggerDisplay.currency$) !== null && _triggerDisplay$curre !== void 0 ? _triggerDisplay$curre : {}), {}, {
|
|
104305
|
+
children: triggerPillCurrency
|
|
104306
|
+
})) : null, triggerPillShowSlash ? /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPillSlash, {
|
|
104307
|
+
name: "slash",
|
|
104308
|
+
size: "small",
|
|
104309
|
+
"aria-hidden": true,
|
|
104310
|
+
colorOverride: "currentColor"
|
|
104311
|
+
}) : null, triggerPillLanguage ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", MarketSelector_objectSpread(MarketSelector_objectSpread({}, (_triggerDisplay$local = triggerDisplay.locales$) !== null && _triggerDisplay$local !== void 0 ? _triggerDisplay$local : {}), {}, {
|
|
104312
|
+
children: triggerPillLanguage
|
|
104313
|
+
})) : null]
|
|
104179
104314
|
});
|
|
104180
104315
|
}
|
|
104181
|
-
function
|
|
104182
|
-
var
|
|
104183
|
-
var isOpen =
|
|
104184
|
-
isVisible =
|
|
104185
|
-
closeModal =
|
|
104186
|
-
parent$ =
|
|
104187
|
-
|
|
104188
|
-
text =
|
|
104189
|
-
rememberSelection =
|
|
104190
|
-
rememberToggleSource =
|
|
104191
|
-
isRememberHovered =
|
|
104192
|
-
setIsRememberHovered =
|
|
104193
|
-
setRememberToggleSource =
|
|
104194
|
-
setRememberSelection =
|
|
104195
|
-
|
|
104196
|
-
|
|
104197
|
-
|
|
104198
|
-
|
|
104199
|
-
|
|
104200
|
-
|
|
104201
|
-
|
|
104202
|
-
|
|
104316
|
+
function renderMarketSelectorModalDesktop(_ref7) {
|
|
104317
|
+
var _marketSelectorDollar, _marketSelectorDollar2, _marketSelectorDollar3, _selector$regions;
|
|
104318
|
+
var isOpen = _ref7.isOpen,
|
|
104319
|
+
isVisible = _ref7.isVisible,
|
|
104320
|
+
closeModal = _ref7.closeModal,
|
|
104321
|
+
parent$ = _ref7.parent$,
|
|
104322
|
+
marketSelectorDollar = _ref7.marketSelectorDollar,
|
|
104323
|
+
text = _ref7.text,
|
|
104324
|
+
rememberSelection = _ref7.rememberSelection,
|
|
104325
|
+
rememberToggleSource = _ref7.rememberToggleSource,
|
|
104326
|
+
isRememberHovered = _ref7.isRememberHovered,
|
|
104327
|
+
setIsRememberHovered = _ref7.setIsRememberHovered,
|
|
104328
|
+
setRememberToggleSource = _ref7.setRememberToggleSource,
|
|
104329
|
+
setRememberSelection = _ref7.setRememberSelection,
|
|
104330
|
+
regions = _ref7.regions,
|
|
104331
|
+
emptyStateText = _ref7.emptyStateText,
|
|
104332
|
+
persistedSelection = _ref7.persistedSelection,
|
|
104333
|
+
persistedActiveTabId = _ref7.persistedActiveTabId,
|
|
104334
|
+
handleSelectionChange = _ref7.handleSelectionChange,
|
|
104335
|
+
selector = _ref7.selector,
|
|
104336
|
+
resolveLocalePath = _ref7.resolveLocalePath,
|
|
104337
|
+
logo = _ref7.logo;
|
|
104203
104338
|
if (!isOpen) return null;
|
|
104204
104339
|
return /*#__PURE__*/(0,jsx_runtime_.jsx)(Overlay, {
|
|
104205
104340
|
"data-state": isVisible ? "open" : "closing",
|
|
@@ -104222,17 +104357,22 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104222
104357
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(LogoWrap, {
|
|
104223
104358
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
104224
104359
|
"data-testid": "market-selector-logo",
|
|
104225
|
-
|
|
104360
|
+
logo: logo === null || logo === void 0 ? void 0 : logo.logo,
|
|
104361
|
+
logoAlt: logo === null || logo === void 0 ? void 0 : logo.logoAlt,
|
|
104362
|
+
href: logo === null || logo === void 0 ? void 0 : logo.href,
|
|
104363
|
+
showLogo: logo === null || logo === void 0 ? void 0 : logo.showLogo,
|
|
104364
|
+
size: logo === null || logo === void 0 ? void 0 : logo.size,
|
|
104365
|
+
$: logo === null || logo === void 0 ? void 0 : logo.$
|
|
104226
104366
|
})
|
|
104227
104367
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104228
104368
|
id: "market-selector-modal-title"
|
|
104229
|
-
}, (
|
|
104369
|
+
}, (_marketSelectorDollar = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar !== void 0 ? _marketSelectorDollar : {}), {}, {
|
|
104230
104370
|
children: text.modalTitle
|
|
104231
104371
|
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(CancelWrap, {
|
|
104232
104372
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CancelButton, {
|
|
104233
104373
|
label: text.cancelText,
|
|
104234
104374
|
onClick: closeModal,
|
|
104235
|
-
parent$: (
|
|
104375
|
+
parent$: (_marketSelectorDollar2 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.cancel_text) !== null && _marketSelectorDollar2 !== void 0 ? _marketSelectorDollar2 : {}
|
|
104236
104376
|
})
|
|
104237
104377
|
})]
|
|
104238
104378
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(TopControls, {
|
|
@@ -104261,7 +104401,7 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104261
104401
|
}
|
|
104262
104402
|
setRememberToggleSource("row");
|
|
104263
104403
|
}
|
|
104264
|
-
}, (
|
|
104404
|
+
}, (_marketSelectorDollar3 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.remember_region_text) !== null && _marketSelectorDollar3 !== void 0 ? _marketSelectorDollar3 : {}), {}, {
|
|
104265
104405
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(RememberCheckbox, {
|
|
104266
104406
|
id: "market-selector-remember-selection",
|
|
104267
104407
|
type: "checkbox",
|
|
@@ -104284,7 +104424,7 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104284
104424
|
"data-testid": "market-selector-remember-selection"
|
|
104285
104425
|
}), text.rememberSelectionText]
|
|
104286
104426
|
}))
|
|
104287
|
-
}),
|
|
104427
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(TabsRow, {
|
|
104288
104428
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CountryListSelector, {
|
|
104289
104429
|
className: "market-selector-tabs",
|
|
104290
104430
|
data: regions,
|
|
@@ -104294,24 +104434,345 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104294
104434
|
defaultActiveTabId: persistedActiveTabId,
|
|
104295
104435
|
onCountryNavigate: handleSelectionChange,
|
|
104296
104436
|
onLocaleNavigate: handleSelectionChange,
|
|
104297
|
-
tabListContainer$: selector === null || selector === void 0 || (_selector$
|
|
104437
|
+
tabListContainer$: selector === null || selector === void 0 || (_selector$regions = selector.regions) === null || _selector$regions === void 0 || (_selector$regions = _selector$regions[0]) === null || _selector$regions === void 0 ? void 0 : _selector$regions.$,
|
|
104298
104438
|
resolveLocalePath: resolveLocalePath
|
|
104299
104439
|
})
|
|
104300
|
-
})
|
|
104440
|
+
})]
|
|
104301
104441
|
})
|
|
104302
104442
|
})
|
|
104303
104443
|
})
|
|
104304
104444
|
}))
|
|
104305
104445
|
});
|
|
104306
104446
|
}
|
|
104307
|
-
function
|
|
104447
|
+
function renderMarketSelectorModalMobile(_ref8) {
|
|
104448
|
+
var _marketSelectorDollar4, _marketSelectorDollar5, _marketSelectorDollar6, _selector$regions2;
|
|
104449
|
+
var isOpen = _ref8.isOpen,
|
|
104450
|
+
isVisible = _ref8.isVisible,
|
|
104451
|
+
closeModal = _ref8.closeModal,
|
|
104452
|
+
parent$ = _ref8.parent$,
|
|
104453
|
+
marketSelectorDollar = _ref8.marketSelectorDollar,
|
|
104454
|
+
text = _ref8.text,
|
|
104455
|
+
rememberSelection = _ref8.rememberSelection,
|
|
104456
|
+
rememberToggleSource = _ref8.rememberToggleSource,
|
|
104457
|
+
isRememberHovered = _ref8.isRememberHovered,
|
|
104458
|
+
setIsRememberHovered = _ref8.setIsRememberHovered,
|
|
104459
|
+
setRememberToggleSource = _ref8.setRememberToggleSource,
|
|
104460
|
+
setRememberSelection = _ref8.setRememberSelection,
|
|
104461
|
+
regions = _ref8.regions,
|
|
104462
|
+
emptyStateText = _ref8.emptyStateText,
|
|
104463
|
+
persistedSelection = _ref8.persistedSelection,
|
|
104464
|
+
persistedActiveTabId = _ref8.persistedActiveTabId,
|
|
104465
|
+
handleSelectionChange = _ref8.handleSelectionChange,
|
|
104466
|
+
selector = _ref8.selector,
|
|
104467
|
+
resolveLocalePath = _ref8.resolveLocalePath,
|
|
104468
|
+
localeRows = _ref8.localeRows,
|
|
104469
|
+
mobileScrollContentRef = _ref8.mobileScrollContentRef,
|
|
104470
|
+
onMobileLocaleRowActivate = _ref8.onMobileLocaleRowActivate;
|
|
104471
|
+
if (!isOpen) return null;
|
|
104472
|
+
var doc = globalThis.document;
|
|
104473
|
+
var forwardTabsWheelToModalScroll = function forwardTabsWheelToModalScroll(event) {
|
|
104474
|
+
var container = mobileScrollContentRef.current;
|
|
104475
|
+
if (!container) return;
|
|
104476
|
+
var deltaY = event.deltaY;
|
|
104477
|
+
if (!deltaY) return;
|
|
104478
|
+
var atTop = container.scrollTop <= 0;
|
|
104479
|
+
var atBottom = container.scrollTop + container.clientHeight >= container.scrollHeight - 1;
|
|
104480
|
+
if (deltaY < 0 && atTop || deltaY > 0 && atBottom) return;
|
|
104481
|
+
container.scrollTop += deltaY;
|
|
104482
|
+
event.preventDefault();
|
|
104483
|
+
};
|
|
104484
|
+
var modalTree = /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileMarketFullScreenRoot, {
|
|
104485
|
+
"data-state": isVisible ? "open" : "closing",
|
|
104486
|
+
"data-testid": "market-selector-mobile-fullscreen",
|
|
104487
|
+
onClick: function onClick(event) {
|
|
104488
|
+
return event.stopPropagation();
|
|
104489
|
+
},
|
|
104490
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileMarketDialogInner, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104491
|
+
open: true,
|
|
104492
|
+
"aria-modal": "true",
|
|
104493
|
+
"aria-labelledby": "market-selector-modal-title",
|
|
104494
|
+
id: "market-selector-modal",
|
|
104495
|
+
onClick: function onClick(event) {
|
|
104496
|
+
return event.stopPropagation();
|
|
104497
|
+
}
|
|
104498
|
+
}, parent$ !== null && parent$ !== void 0 ? parent$ : {}), {}, {
|
|
104499
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileStickyHeaderContainer, {
|
|
104500
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileCompactHeaderRow, {
|
|
104501
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileCompactTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104502
|
+
id: "market-selector-modal-title"
|
|
104503
|
+
}, (_marketSelectorDollar4 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar4 !== void 0 ? _marketSelectorDollar4 : {}), {}, {
|
|
104504
|
+
children: text.modalTitle
|
|
104505
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileModalHeaderCancelWrap, {
|
|
104506
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CancelButton, {
|
|
104507
|
+
className: "market-selector-mobile-header-cancel",
|
|
104508
|
+
label: text.cancelText,
|
|
104509
|
+
onClick: closeModal,
|
|
104510
|
+
parent$: (_marketSelectorDollar5 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.cancel_text) !== null && _marketSelectorDollar5 !== void 0 ? _marketSelectorDollar5 : {}
|
|
104511
|
+
})
|
|
104512
|
+
})]
|
|
104513
|
+
})
|
|
104514
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileModalScrollContent, {
|
|
104515
|
+
ref: mobileScrollContentRef,
|
|
104516
|
+
"data-testid": "market-selector-mobile-scroll-content",
|
|
104517
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileRememberControlsWrap, {
|
|
104518
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileRememberControls, {
|
|
104519
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileRememberRowCompact, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104520
|
+
htmlFor: "market-selector-remember-selection",
|
|
104521
|
+
"data-checked": rememberSelection ? "true" : "false",
|
|
104522
|
+
"data-toggle-source": rememberToggleSource,
|
|
104523
|
+
"data-hovered": isRememberHovered ? "true" : "false",
|
|
104524
|
+
onMouseEnter: function onMouseEnter() {
|
|
104525
|
+
return setIsRememberHovered(true);
|
|
104526
|
+
},
|
|
104527
|
+
onMouseLeave: function onMouseLeave() {
|
|
104528
|
+
return setIsRememberHovered(false);
|
|
104529
|
+
},
|
|
104530
|
+
onMouseDown: function onMouseDown(event) {
|
|
104531
|
+
var _event$target3;
|
|
104532
|
+
if (((_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.id) === "market-selector-remember-selection") {
|
|
104533
|
+
return;
|
|
104534
|
+
}
|
|
104535
|
+
setRememberToggleSource("row");
|
|
104536
|
+
},
|
|
104537
|
+
onClick: function onClick(event) {
|
|
104538
|
+
var _event$target4;
|
|
104539
|
+
if (((_event$target4 = event.target) === null || _event$target4 === void 0 ? void 0 : _event$target4.id) === "market-selector-remember-selection") {
|
|
104540
|
+
return;
|
|
104541
|
+
}
|
|
104542
|
+
setRememberToggleSource("row");
|
|
104543
|
+
}
|
|
104544
|
+
}, (_marketSelectorDollar6 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.remember_region_text) !== null && _marketSelectorDollar6 !== void 0 ? _marketSelectorDollar6 : {}), {}, {
|
|
104545
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(RememberCheckbox, {
|
|
104546
|
+
id: "market-selector-remember-selection",
|
|
104547
|
+
type: "checkbox",
|
|
104548
|
+
checked: rememberSelection,
|
|
104549
|
+
onMouseDown: function onMouseDown(event) {
|
|
104550
|
+
event.stopPropagation();
|
|
104551
|
+
setRememberToggleSource("checkbox");
|
|
104552
|
+
},
|
|
104553
|
+
onChange: function onChange(event) {
|
|
104554
|
+
setRememberSelection(event.currentTarget.checked);
|
|
104555
|
+
},
|
|
104556
|
+
onKeyDown: function onKeyDown(event) {
|
|
104557
|
+
if (event.key !== "Enter") return;
|
|
104558
|
+
event.preventDefault();
|
|
104559
|
+
setRememberToggleSource("checkbox");
|
|
104560
|
+
setRememberSelection(function (prev) {
|
|
104561
|
+
return !prev;
|
|
104562
|
+
});
|
|
104563
|
+
},
|
|
104564
|
+
"data-testid": "market-selector-remember-selection"
|
|
104565
|
+
}), text.rememberSelectionText]
|
|
104566
|
+
}))
|
|
104567
|
+
})
|
|
104568
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileModalBody, {
|
|
104569
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleSectionBlock, {
|
|
104570
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleList, {
|
|
104571
|
+
"data-testid": "market-selector-locale-list",
|
|
104572
|
+
children: localeRows.map(function (row) {
|
|
104573
|
+
var _row$currency, _ref9, _row$languageLabel;
|
|
104574
|
+
var showIcon = row.selected;
|
|
104575
|
+
var rowCurrency = String((_row$currency = row.currency) !== null && _row$currency !== void 0 ? _row$currency : "").trim();
|
|
104576
|
+
var rowLanguage = String((_ref9 = (_row$languageLabel = row.languageLabel) !== null && _row$languageLabel !== void 0 ? _row$languageLabel : row.label) !== null && _ref9 !== void 0 ? _ref9 : "").trim();
|
|
104577
|
+
var showSlash = rowCurrency !== "" && rowLanguage !== "";
|
|
104578
|
+
var labelAndIcon = /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
104579
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileLocaleText, {
|
|
104580
|
+
$selected: row.selected,
|
|
104581
|
+
children: [rowCurrency ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", {
|
|
104582
|
+
children: rowCurrency
|
|
104583
|
+
}) : null, showSlash ? /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPillSlash, {
|
|
104584
|
+
name: "slash",
|
|
104585
|
+
size: "small",
|
|
104586
|
+
"aria-hidden": true,
|
|
104587
|
+
colorOverride: "currentColor"
|
|
104588
|
+
}) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)("span", {
|
|
104589
|
+
children: rowLanguage
|
|
104590
|
+
})]
|
|
104591
|
+
}), showIcon ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleStatusIcon, {
|
|
104592
|
+
"aria-hidden": true,
|
|
104593
|
+
name: "success",
|
|
104594
|
+
size: "medium",
|
|
104595
|
+
colorOverride: "#252525"
|
|
104596
|
+
}) : null]
|
|
104597
|
+
});
|
|
104598
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleRow, {
|
|
104599
|
+
"data-selected": row.selected ? "true" : "false",
|
|
104600
|
+
children: row.navigable ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleRowLink, {
|
|
104601
|
+
href: buildLocalePath({
|
|
104602
|
+
country: row.country,
|
|
104603
|
+
locale: row.locale
|
|
104604
|
+
}),
|
|
104605
|
+
onClick: function onClick(event) {
|
|
104606
|
+
onMobileLocaleRowActivate(event, row);
|
|
104607
|
+
},
|
|
104608
|
+
"data-testid": "market-selector-mobile-locale-".concat(row.id),
|
|
104609
|
+
children: labelAndIcon
|
|
104610
|
+
}) : /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleRowMain, {
|
|
104611
|
+
children: labelAndIcon
|
|
104612
|
+
})
|
|
104613
|
+
}, row.id);
|
|
104614
|
+
})
|
|
104615
|
+
})
|
|
104616
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileRegionsSection, {
|
|
104617
|
+
"data-testid": "market-selector-mobile-regions",
|
|
104618
|
+
onWheel: forwardTabsWheelToModalScroll,
|
|
104619
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CountryListSelector, {
|
|
104620
|
+
className: "market-selector-mobile-regions-tabs",
|
|
104621
|
+
data: regions,
|
|
104622
|
+
emptyStateText: emptyStateText,
|
|
104623
|
+
selectedCountryId: persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.countryUid,
|
|
104624
|
+
selectedLocaleCode: persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.localeIso,
|
|
104625
|
+
defaultActiveTabId: persistedActiveTabId,
|
|
104626
|
+
onCountryNavigate: handleSelectionChange,
|
|
104627
|
+
onLocaleNavigate: handleSelectionChange,
|
|
104628
|
+
tabListContainer$: selector === null || selector === void 0 || (_selector$regions2 = selector.regions) === null || _selector$regions2 === void 0 || (_selector$regions2 = _selector$regions2[0]) === null || _selector$regions2 === void 0 ? void 0 : _selector$regions2.$,
|
|
104629
|
+
resolveLocalePath: resolveLocalePath
|
|
104630
|
+
})
|
|
104631
|
+
})]
|
|
104632
|
+
})]
|
|
104633
|
+
})]
|
|
104634
|
+
}))
|
|
104635
|
+
});
|
|
104636
|
+
if (doc !== null && doc !== void 0 && doc.body) {
|
|
104637
|
+
return /*#__PURE__*/(0,external_react_dom_.createPortal)(modalTree, doc.body);
|
|
104638
|
+
}
|
|
104639
|
+
return modalTree;
|
|
104640
|
+
}
|
|
104641
|
+
function computeEffectivePageLocale(locale, selector) {
|
|
104642
|
+
var _selector$locale;
|
|
104643
|
+
var fromHeader = String(locale !== null && locale !== void 0 ? locale : "").trim();
|
|
104644
|
+
if (fromHeader) return fromHeader;
|
|
104645
|
+
return String((_selector$locale = selector === null || selector === void 0 ? void 0 : selector.locale) !== null && _selector$locale !== void 0 ? _selector$locale : "").trim();
|
|
104646
|
+
}
|
|
104647
|
+
function computePersistedActiveTabId(persistedSelection, tabs) {
|
|
104648
|
+
var _tabs$, _matched$id, _tabs$2;
|
|
104649
|
+
var regionUid = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.regionUid;
|
|
104650
|
+
if (!regionUid) return tabs === null || tabs === void 0 || (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id;
|
|
104651
|
+
var regionLabel = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.regionLabel;
|
|
104652
|
+
var preferredId = safeId("region", regionUid || regionLabel);
|
|
104653
|
+
var matched = tabs.find(function (tab) {
|
|
104654
|
+
return tab.id === preferredId;
|
|
104655
|
+
});
|
|
104656
|
+
return (_matched$id = matched === null || matched === void 0 ? void 0 : matched.id) !== null && _matched$id !== void 0 ? _matched$id : tabs === null || tabs === void 0 || (_tabs$2 = tabs[0]) === null || _tabs$2 === void 0 ? void 0 : _tabs$2.id;
|
|
104657
|
+
}
|
|
104658
|
+
function resolveMarketSelectorEmptyStateText() {
|
|
104659
|
+
return isEditingMode() ? VB_EMPTY_STATE_TEXT : DEFAULT_EMPTY_STATE_TEXT;
|
|
104660
|
+
}
|
|
104661
|
+
function buildPersistedSelectionPayload(_ref0) {
|
|
104662
|
+
var _country$uid, _country$country_code, _country$currency2, _locale$uid, _locale$locale_iso, _region$uid, _region$region_title;
|
|
104663
|
+
var country = _ref0.country,
|
|
104664
|
+
locale = _ref0.locale,
|
|
104665
|
+
region = _ref0.region;
|
|
104666
|
+
return {
|
|
104667
|
+
countryUid: (_country$uid = country === null || country === void 0 ? void 0 : country.uid) !== null && _country$uid !== void 0 ? _country$uid : "",
|
|
104668
|
+
countryIso: String((_country$country_code = country === null || country === void 0 ? void 0 : country.country_code) !== null && _country$country_code !== void 0 ? _country$country_code : "").toLowerCase(),
|
|
104669
|
+
currency: (_country$currency2 = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency2 !== void 0 ? _country$currency2 : "",
|
|
104670
|
+
localeUid: (_locale$uid = locale === null || locale === void 0 ? void 0 : locale.uid) !== null && _locale$uid !== void 0 ? _locale$uid : "",
|
|
104671
|
+
localeIso: String((_locale$locale_iso = locale === null || locale === void 0 ? void 0 : locale.locale_iso) !== null && _locale$locale_iso !== void 0 ? _locale$locale_iso : "").toLowerCase(),
|
|
104672
|
+
localeLabel: getLanguageLabel(locale).trim(),
|
|
104673
|
+
regionUid: (_region$uid = region === null || region === void 0 ? void 0 : region.uid) !== null && _region$uid !== void 0 ? _region$uid : "",
|
|
104674
|
+
regionLabel: (_region$region_title = region === null || region === void 0 ? void 0 : region.region_title) !== null && _region$region_title !== void 0 ? _region$region_title : ""
|
|
104675
|
+
};
|
|
104676
|
+
}
|
|
104677
|
+
function buildSessionPillDisplayUpdate(country, locale) {
|
|
104678
|
+
var _locale$locale_iso2, _country$currency3;
|
|
104679
|
+
var languageLabel = getLanguageLabel(locale).trim() || String((_locale$locale_iso2 = locale === null || locale === void 0 ? void 0 : locale.locale_iso) !== null && _locale$locale_iso2 !== void 0 ? _locale$locale_iso2 : "").toUpperCase();
|
|
104680
|
+
if (!languageLabel) return null;
|
|
104681
|
+
var currency = String((_country$currency3 = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency3 !== void 0 ? _country$currency3 : "").trim();
|
|
104682
|
+
return MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104683
|
+
currency: currency,
|
|
104684
|
+
languageLabel: languageLabel
|
|
104685
|
+
}, country !== null && country !== void 0 && country.currency$ ? {
|
|
104686
|
+
currency$: country.currency$
|
|
104687
|
+
} : {}), locale !== null && locale !== void 0 && locale.locales$ ? {
|
|
104688
|
+
locales$: locale.locales$
|
|
104689
|
+
} : {});
|
|
104690
|
+
}
|
|
104691
|
+
function resolveMarketSelectorTriggerElement(_ref1) {
|
|
104692
|
+
var isMobileViewport = _ref1.isMobileViewport,
|
|
104693
|
+
drawerPortal = _ref1.drawerPortal,
|
|
104694
|
+
drawerOpen = _ref1.drawerOpen,
|
|
104695
|
+
drawerTriggerMountRef = _ref1.drawerTriggerMountRef,
|
|
104696
|
+
desktopTrigger = _ref1.desktopTrigger,
|
|
104697
|
+
mobileTrigger = _ref1.mobileTrigger;
|
|
104698
|
+
if (!isMobileViewport) {
|
|
104699
|
+
return desktopTrigger;
|
|
104700
|
+
}
|
|
104701
|
+
if (!drawerPortal) {
|
|
104702
|
+
return mobileTrigger;
|
|
104703
|
+
}
|
|
104704
|
+
var mount = drawerTriggerMountRef === null || drawerTriggerMountRef === void 0 ? void 0 : drawerTriggerMountRef.current;
|
|
104705
|
+
if (drawerOpen && mount) {
|
|
104706
|
+
return /*#__PURE__*/(0,external_react_dom_.createPortal)(mobileTrigger, mount);
|
|
104707
|
+
}
|
|
104708
|
+
return null;
|
|
104709
|
+
}
|
|
104710
|
+
function shouldForceDrawerTriggerRemount(drawerPortal, isMobileViewport, wasOpen, nowOpen) {
|
|
104711
|
+
return drawerPortal && isMobileViewport && nowOpen && !wasOpen;
|
|
104712
|
+
}
|
|
104713
|
+
function runMobileLocaleRowNavigation(_x) {
|
|
104714
|
+
return _runMobileLocaleRowNavigation.apply(this, arguments);
|
|
104715
|
+
}
|
|
104716
|
+
function _runMobileLocaleRowNavigation() {
|
|
104717
|
+
_runMobileLocaleRowNavigation = MarketSelector_asyncToGenerator(/*#__PURE__*/MarketSelector_regenerator().m(function _callee2(_ref10) {
|
|
104718
|
+
var event, row, applySelection, resolveLocalePath, resolved, _t;
|
|
104719
|
+
return MarketSelector_regenerator().w(function (_context2) {
|
|
104720
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
104721
|
+
case 0:
|
|
104722
|
+
event = _ref10.event, row = _ref10.row, applySelection = _ref10.applySelection, resolveLocalePath = _ref10.resolveLocalePath;
|
|
104723
|
+
if (!(!(row !== null && row !== void 0 && row.navigable) || !row.country || !row.locale)) {
|
|
104724
|
+
_context2.n = 1;
|
|
104725
|
+
break;
|
|
104726
|
+
}
|
|
104727
|
+
return _context2.a(2);
|
|
104728
|
+
case 1:
|
|
104729
|
+
event.preventDefault();
|
|
104730
|
+
applySelection({
|
|
104731
|
+
country: row.country,
|
|
104732
|
+
locale: row.locale,
|
|
104733
|
+
region: row.region
|
|
104734
|
+
});
|
|
104735
|
+
_context2.p = 2;
|
|
104736
|
+
_context2.n = 3;
|
|
104737
|
+
return resolveLocalePath({
|
|
104738
|
+
country: row.country,
|
|
104739
|
+
locale: row.locale
|
|
104740
|
+
});
|
|
104741
|
+
case 3:
|
|
104742
|
+
resolved = _context2.v;
|
|
104743
|
+
marketSelectorWindow_navigateToPath(resolved);
|
|
104744
|
+
_context2.n = 5;
|
|
104745
|
+
break;
|
|
104746
|
+
case 4:
|
|
104747
|
+
_context2.p = 4;
|
|
104748
|
+
_t = _context2.v;
|
|
104749
|
+
marketSelectorWindow_navigateToPath(buildLocalePath({
|
|
104750
|
+
country: row.country,
|
|
104751
|
+
locale: row.locale
|
|
104752
|
+
}));
|
|
104753
|
+
case 5:
|
|
104754
|
+
return _context2.a(2);
|
|
104755
|
+
}
|
|
104756
|
+
}, _callee2, null, [[2, 4]]);
|
|
104757
|
+
}));
|
|
104758
|
+
return _runMobileLocaleRowNavigation.apply(this, arguments);
|
|
104759
|
+
}
|
|
104760
|
+
function MarketSelector(_ref11) {
|
|
104308
104761
|
var _triggerDisplay$curre2, _triggerDisplay$langu;
|
|
104309
|
-
var data =
|
|
104310
|
-
|
|
104311
|
-
parent$ =
|
|
104312
|
-
|
|
104313
|
-
locale =
|
|
104762
|
+
var data = _ref11.data,
|
|
104763
|
+
logo = _ref11.logo,
|
|
104764
|
+
_ref11$parent$ = _ref11.parent$,
|
|
104765
|
+
parent$ = _ref11$parent$ === void 0 ? {} : _ref11$parent$,
|
|
104766
|
+
_ref11$locale = _ref11.locale,
|
|
104767
|
+
locale = _ref11$locale === void 0 ? "" : _ref11$locale,
|
|
104768
|
+
_ref11$drawerOpen = _ref11.drawerOpen,
|
|
104769
|
+
drawerOpen = _ref11$drawerOpen === void 0 ? false : _ref11$drawerOpen,
|
|
104770
|
+
_ref11$drawerTriggerM = _ref11.drawerTriggerMountRef,
|
|
104771
|
+
drawerTriggerMountRef = _ref11$drawerTriggerM === void 0 ? null : _ref11$drawerTriggerM,
|
|
104772
|
+
_ref11$mobileTriggerM = _ref11.mobileTriggerMode,
|
|
104773
|
+
mobileTriggerMode = _ref11$mobileTriggerM === void 0 ? "inline" : _ref11$mobileTriggerM;
|
|
104314
104774
|
var selector = resolveMarketSelectorEntry(data);
|
|
104775
|
+
var marketSelectorDollar = resolveMarketSelectorDollarFields(data);
|
|
104315
104776
|
var showSelector = (selector === null || selector === void 0 ? void 0 : selector.show) !== false;
|
|
104316
104777
|
var _useRememberedMarketS = useRememberedMarketSelection(),
|
|
104317
104778
|
rememberSelection = _useRememberedMarketS.rememberSelection,
|
|
@@ -104324,6 +104785,13 @@ function MarketSelector(_ref4) {
|
|
|
104324
104785
|
isMobileViewport = _useMarketSelectorMod.isMobileViewport,
|
|
104325
104786
|
openModal = _useMarketSelectorMod.openModal,
|
|
104326
104787
|
closeModal = _useMarketSelectorMod.closeModal;
|
|
104788
|
+
var _useReducer = (0,external_react_.useReducer)(function (n) {
|
|
104789
|
+
return n + 1;
|
|
104790
|
+
}, 0),
|
|
104791
|
+
_useReducer2 = MarketSelector_slicedToArray(_useReducer, 2),
|
|
104792
|
+
forceDrawerTriggerRemount = _useReducer2[1];
|
|
104793
|
+
var prevDrawerOpenRef = (0,external_react_.useRef)(false);
|
|
104794
|
+
var mobileScrollContentRef = (0,external_react_.useRef)(null);
|
|
104327
104795
|
/** In-session pill only (modal pick). Never hydrated from localStorage — pill prefers header `locale` until user picks. */
|
|
104328
104796
|
var _useState1 = (0,external_react_.useState)(null),
|
|
104329
104797
|
_useState10 = MarketSelector_slicedToArray(_useState1, 2),
|
|
@@ -104339,26 +104807,39 @@ function MarketSelector(_ref4) {
|
|
|
104339
104807
|
setIsRememberHovered = _useState14[1];
|
|
104340
104808
|
var text = (0,external_react_.useMemo)(function () {
|
|
104341
104809
|
return resolveMarketSelectorText(selector);
|
|
104342
|
-
}, [selector]);
|
|
104810
|
+
}, [selector === null || selector === void 0 ? void 0 : selector.select_your_market_language_text, selector === null || selector === void 0 ? void 0 : selector.remember_region_text, selector === null || selector === void 0 ? void 0 : selector.cancel_text]);
|
|
104343
104811
|
var regions = (0,external_react_.useMemo)(function () {
|
|
104344
104812
|
return normalizeRegionsForTabs(data, selector);
|
|
104345
104813
|
}, [data, selector]);
|
|
104346
104814
|
var tabs = (0,external_react_.useMemo)(function () {
|
|
104347
104815
|
return buildMarketSelectorTabs(regions);
|
|
104348
104816
|
}, [regions]);
|
|
104349
|
-
var emptyStateText =
|
|
104817
|
+
var emptyStateText = resolveMarketSelectorEmptyStateText();
|
|
104350
104818
|
var marketSelectorService = (0,external_react_.useMemo)(function () {
|
|
104351
104819
|
return createHeaderMarketSelectorService();
|
|
104352
104820
|
}, []);
|
|
104353
104821
|
var effectivePageLocale = (0,external_react_.useMemo)(function () {
|
|
104354
|
-
|
|
104355
|
-
var fromHeader = String(locale !== null && locale !== void 0 ? locale : "").trim();
|
|
104356
|
-
if (fromHeader) return fromHeader;
|
|
104357
|
-
return String((_selector$locale = selector === null || selector === void 0 ? void 0 : selector.locale) !== null && _selector$locale !== void 0 ? _selector$locale : "").trim();
|
|
104822
|
+
return computeEffectivePageLocale(locale, selector);
|
|
104358
104823
|
}, [locale, selector === null || selector === void 0 ? void 0 : selector.locale]);
|
|
104824
|
+
var localeRows = (0,external_react_.useMemo)(function () {
|
|
104825
|
+
return buildMobileLocaleRows({
|
|
104826
|
+
regions: regions,
|
|
104827
|
+
persistedSelection: persistedSelection,
|
|
104828
|
+
effectivePageLocale: effectivePageLocale
|
|
104829
|
+
});
|
|
104830
|
+
}, [regions, persistedSelection, effectivePageLocale]);
|
|
104359
104831
|
(0,external_react_.useEffect)(function () {
|
|
104360
104832
|
setSessionPillDisplay(null);
|
|
104361
104833
|
}, [effectivePageLocale]);
|
|
104834
|
+
var drawerPortal = mobileTriggerMode === "drawerPortal";
|
|
104835
|
+
(0,external_react_.useLayoutEffect)(function () {
|
|
104836
|
+
var wasOpen = prevDrawerOpenRef.current;
|
|
104837
|
+
var nowOpen = drawerOpen;
|
|
104838
|
+
prevDrawerOpenRef.current = nowOpen;
|
|
104839
|
+
if (shouldForceDrawerTriggerRemount(drawerPortal, isMobileViewport, wasOpen, nowOpen)) {
|
|
104840
|
+
forceDrawerTriggerRemount();
|
|
104841
|
+
}
|
|
104842
|
+
}, [drawerPortal, drawerOpen, isMobileViewport, drawerTriggerMountRef]);
|
|
104362
104843
|
var triggerDisplay = (0,external_react_.useMemo)(function () {
|
|
104363
104844
|
return computeTriggerDisplay({
|
|
104364
104845
|
sessionPillDisplay: sessionPillDisplay,
|
|
@@ -104367,51 +104848,27 @@ function MarketSelector(_ref4) {
|
|
|
104367
104848
|
});
|
|
104368
104849
|
}, [sessionPillDisplay, regions, effectivePageLocale]);
|
|
104369
104850
|
var persistedActiveTabId = (0,external_react_.useMemo)(function () {
|
|
104370
|
-
|
|
104371
|
-
var regionUid = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.regionUid;
|
|
104372
|
-
if (!regionUid) return tabs === null || tabs === void 0 || (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id;
|
|
104373
|
-
var regionLabel = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.regionLabel;
|
|
104374
|
-
var preferredId = safeId("region", regionUid || regionLabel);
|
|
104375
|
-
var matched = tabs.find(function (tab) {
|
|
104376
|
-
return tab.id === preferredId;
|
|
104377
|
-
});
|
|
104378
|
-
return (_matched$id = matched === null || matched === void 0 ? void 0 : matched.id) !== null && _matched$id !== void 0 ? _matched$id : tabs === null || tabs === void 0 || (_tabs$2 = tabs[0]) === null || _tabs$2 === void 0 ? void 0 : _tabs$2.id;
|
|
104851
|
+
return computePersistedActiveTabId(persistedSelection, tabs);
|
|
104379
104852
|
}, [persistedSelection, tabs]);
|
|
104380
|
-
var handleSelectionChange = function handleSelectionChange(
|
|
104381
|
-
var
|
|
104382
|
-
|
|
104383
|
-
|
|
104384
|
-
|
|
104385
|
-
|
|
104386
|
-
|
|
104387
|
-
|
|
104388
|
-
|
|
104389
|
-
|
|
104390
|
-
|
|
104391
|
-
}, country !== null && country !== void 0 && country.currency$ ? {
|
|
104392
|
-
currency$: country.currency$
|
|
104393
|
-
} : {}), locale !== null && locale !== void 0 && locale.locales$ ? {
|
|
104394
|
-
locales$: locale.locales$
|
|
104395
|
-
} : {}));
|
|
104396
|
-
}
|
|
104397
|
-
setPersistedSelection({
|
|
104398
|
-
countryUid: (_country$uid = country === null || country === void 0 ? void 0 : country.uid) !== null && _country$uid !== void 0 ? _country$uid : "",
|
|
104399
|
-
countryIso: String((_country$country_code = country === null || country === void 0 ? void 0 : country.country_code) !== null && _country$country_code !== void 0 ? _country$country_code : "").toLowerCase(),
|
|
104400
|
-
currency: (_country$currency2 = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency2 !== void 0 ? _country$currency2 : "",
|
|
104401
|
-
localeUid: (_locale$uid = locale === null || locale === void 0 ? void 0 : locale.uid) !== null && _locale$uid !== void 0 ? _locale$uid : "",
|
|
104402
|
-
localeIso: String((_locale$locale_iso2 = locale === null || locale === void 0 ? void 0 : locale.locale_iso) !== null && _locale$locale_iso2 !== void 0 ? _locale$locale_iso2 : "").toLowerCase(),
|
|
104403
|
-
localeLabel: getLanguageLabel(locale).trim(),
|
|
104404
|
-
regionUid: (_region$uid = region === null || region === void 0 ? void 0 : region.uid) !== null && _region$uid !== void 0 ? _region$uid : "",
|
|
104405
|
-
regionLabel: (_region$region_title = region === null || region === void 0 ? void 0 : region.region_title) !== null && _region$region_title !== void 0 ? _region$region_title : ""
|
|
104406
|
-
});
|
|
104853
|
+
var handleSelectionChange = function handleSelectionChange(_ref12) {
|
|
104854
|
+
var country = _ref12.country,
|
|
104855
|
+
locale = _ref12.locale,
|
|
104856
|
+
region = _ref12.region;
|
|
104857
|
+
var pill = buildSessionPillDisplayUpdate(country, locale);
|
|
104858
|
+
if (pill) setSessionPillDisplay(pill);
|
|
104859
|
+
setPersistedSelection(buildPersistedSelectionPayload({
|
|
104860
|
+
country: country,
|
|
104861
|
+
locale: locale,
|
|
104862
|
+
region: region
|
|
104863
|
+
}));
|
|
104407
104864
|
};
|
|
104408
104865
|
var resolveLocalePath = /*#__PURE__*/function () {
|
|
104409
|
-
var
|
|
104866
|
+
var _ref14 = MarketSelector_asyncToGenerator(/*#__PURE__*/MarketSelector_regenerator().m(function _callee(_ref13) {
|
|
104410
104867
|
var country, selectedLocale;
|
|
104411
104868
|
return MarketSelector_regenerator().w(function (_context) {
|
|
104412
104869
|
while (1) switch (_context.n) {
|
|
104413
104870
|
case 0:
|
|
104414
|
-
country =
|
|
104871
|
+
country = _ref13.country, selectedLocale = _ref13.locale;
|
|
104415
104872
|
_context.n = 1;
|
|
104416
104873
|
return marketSelectorService.resolveRedirectUrl({
|
|
104417
104874
|
country: country,
|
|
@@ -104423,64 +104880,113 @@ function MarketSelector(_ref4) {
|
|
|
104423
104880
|
}
|
|
104424
104881
|
}, _callee);
|
|
104425
104882
|
}));
|
|
104426
|
-
return function resolveLocalePath(
|
|
104427
|
-
return
|
|
104883
|
+
return function resolveLocalePath(_x2) {
|
|
104884
|
+
return _ref14.apply(this, arguments);
|
|
104428
104885
|
};
|
|
104429
104886
|
}();
|
|
104887
|
+
var handleMobileLocaleRowActivate = function handleMobileLocaleRowActivate(event, row) {
|
|
104888
|
+
return runMobileLocaleRowNavigation({
|
|
104889
|
+
event: event,
|
|
104890
|
+
row: row,
|
|
104891
|
+
applySelection: handleSelectionChange,
|
|
104892
|
+
resolveLocalePath: resolveLocalePath
|
|
104893
|
+
});
|
|
104894
|
+
};
|
|
104430
104895
|
if (!showSelector) return null;
|
|
104431
104896
|
var triggerPillCurrency = triggerDisplay ? String((_triggerDisplay$curre2 = triggerDisplay.currency) !== null && _triggerDisplay$curre2 !== void 0 ? _triggerDisplay$curre2 : "").trim() : "";
|
|
104432
104897
|
var triggerPillLanguage = triggerDisplay ? String((_triggerDisplay$langu = triggerDisplay.languageLabel) !== null && _triggerDisplay$langu !== void 0 ? _triggerDisplay$langu : "").trim() : "";
|
|
104433
104898
|
var triggerPillShowSlash = triggerPillCurrency !== "" && triggerPillLanguage !== "";
|
|
104434
|
-
|
|
104435
|
-
|
|
104436
|
-
|
|
104437
|
-
|
|
104438
|
-
|
|
104439
|
-
|
|
104440
|
-
|
|
104441
|
-
|
|
104442
|
-
|
|
104443
|
-
|
|
104444
|
-
|
|
104445
|
-
|
|
104446
|
-
|
|
104447
|
-
|
|
104448
|
-
|
|
104449
|
-
|
|
104450
|
-
|
|
104451
|
-
|
|
104452
|
-
|
|
104453
|
-
|
|
104454
|
-
|
|
104455
|
-
|
|
104456
|
-
|
|
104457
|
-
|
|
104458
|
-
|
|
104459
|
-
isRememberHovered: isRememberHovered,
|
|
104460
|
-
setIsRememberHovered: setIsRememberHovered,
|
|
104461
|
-
setRememberToggleSource: setRememberToggleSource,
|
|
104462
|
-
setRememberSelection: setRememberSelection,
|
|
104463
|
-
isMobileViewport: isMobileViewport,
|
|
104464
|
-
regions: regions,
|
|
104465
|
-
emptyStateText: emptyStateText,
|
|
104466
|
-
persistedSelection: persistedSelection,
|
|
104467
|
-
persistedActiveTabId: persistedActiveTabId,
|
|
104468
|
-
handleSelectionChange: handleSelectionChange,
|
|
104469
|
-
selector: selector,
|
|
104470
|
-
resolveLocalePath: resolveLocalePath
|
|
104899
|
+
var triggerInner = renderTriggerInner({
|
|
104900
|
+
triggerDisplay: triggerDisplay,
|
|
104901
|
+
triggerPillCurrency: triggerPillCurrency,
|
|
104902
|
+
triggerPillLanguage: triggerPillLanguage,
|
|
104903
|
+
triggerPillShowSlash: triggerPillShowSlash
|
|
104904
|
+
});
|
|
104905
|
+
var triggerButtonShared = {
|
|
104906
|
+
type: "button",
|
|
104907
|
+
"aria-haspopup": "dialog",
|
|
104908
|
+
"aria-expanded": isVisible,
|
|
104909
|
+
"aria-controls": "market-selector-modal",
|
|
104910
|
+
onClick: openModal,
|
|
104911
|
+
"data-testid": "market-selector-trigger"
|
|
104912
|
+
};
|
|
104913
|
+
var desktopTrigger = /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPill, MarketSelector_objectSpread(MarketSelector_objectSpread({}, triggerButtonShared), {}, {
|
|
104914
|
+
children: triggerInner
|
|
104915
|
+
}));
|
|
104916
|
+
var mobileTrigger = /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerTriggerPill, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104917
|
+
"data-trigger-mode": drawerPortal ? "drawerPortal" : "inline"
|
|
104918
|
+
}, triggerButtonShared), {}, {
|
|
104919
|
+
children: [triggerInner, /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104920
|
+
name: "chevronRight",
|
|
104921
|
+
size: "medium",
|
|
104922
|
+
colorOverride: "currentColor",
|
|
104923
|
+
"aria-hidden": true
|
|
104471
104924
|
})]
|
|
104925
|
+
}));
|
|
104926
|
+
var triggerElement = resolveMarketSelectorTriggerElement({
|
|
104927
|
+
isMobileViewport: isMobileViewport,
|
|
104928
|
+
drawerPortal: drawerPortal,
|
|
104929
|
+
drawerOpen: drawerOpen,
|
|
104930
|
+
drawerTriggerMountRef: drawerTriggerMountRef,
|
|
104931
|
+
desktopTrigger: desktopTrigger,
|
|
104932
|
+
mobileTrigger: mobileTrigger
|
|
104933
|
+
});
|
|
104934
|
+
var modalShared = {
|
|
104935
|
+
isOpen: isOpen,
|
|
104936
|
+
isVisible: isVisible,
|
|
104937
|
+
closeModal: closeModal,
|
|
104938
|
+
parent$: parent$,
|
|
104939
|
+
marketSelectorDollar: marketSelectorDollar,
|
|
104940
|
+
text: text,
|
|
104941
|
+
rememberSelection: rememberSelection,
|
|
104942
|
+
rememberToggleSource: rememberToggleSource,
|
|
104943
|
+
isRememberHovered: isRememberHovered,
|
|
104944
|
+
setIsRememberHovered: setIsRememberHovered,
|
|
104945
|
+
setRememberToggleSource: setRememberToggleSource,
|
|
104946
|
+
setRememberSelection: setRememberSelection,
|
|
104947
|
+
regions: regions,
|
|
104948
|
+
emptyStateText: emptyStateText,
|
|
104949
|
+
persistedSelection: persistedSelection,
|
|
104950
|
+
persistedActiveTabId: persistedActiveTabId,
|
|
104951
|
+
handleSelectionChange: handleSelectionChange,
|
|
104952
|
+
selector: selector,
|
|
104953
|
+
resolveLocalePath: resolveLocalePath,
|
|
104954
|
+
onMobileLocaleRowActivate: handleMobileLocaleRowActivate
|
|
104955
|
+
};
|
|
104956
|
+
var modalElement = isMobileViewport ? renderMarketSelectorModalMobile(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
|
|
104957
|
+
localeRows: localeRows,
|
|
104958
|
+
mobileScrollContentRef: mobileScrollContentRef
|
|
104959
|
+
})) : renderMarketSelectorModalDesktop(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
|
|
104960
|
+
logo: logo
|
|
104961
|
+
}));
|
|
104962
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(MarketSelectorRoot, {
|
|
104963
|
+
"data-drawer-portal-host": drawerPortal && isMobileViewport ? "true" : undefined,
|
|
104964
|
+
children: [triggerElement, modalElement]
|
|
104472
104965
|
});
|
|
104473
104966
|
}
|
|
104474
104967
|
MarketSelector.propTypes = {
|
|
104475
104968
|
locale: (external_prop_types_default()).string,
|
|
104476
104969
|
parent$: (external_prop_types_default()).object,
|
|
104970
|
+
drawerOpen: (external_prop_types_default()).bool,
|
|
104971
|
+
drawerTriggerMountRef: external_prop_types_default().shape({
|
|
104972
|
+
current: (external_prop_types_default()).any
|
|
104973
|
+
}),
|
|
104974
|
+
mobileTriggerMode: external_prop_types_default().oneOf(["inline", "drawerPortal"]),
|
|
104477
104975
|
data: external_prop_types_default().oneOfType([external_prop_types_default().shape({
|
|
104478
104976
|
show: (external_prop_types_default()).bool,
|
|
104479
104977
|
select_your_market_language_text: (external_prop_types_default()).string,
|
|
104480
104978
|
remember_region_text: (external_prop_types_default()).string,
|
|
104481
104979
|
cancel_text: (external_prop_types_default()).string,
|
|
104482
104980
|
regions: external_prop_types_default().arrayOf((external_prop_types_default()).object)
|
|
104483
|
-
}), external_prop_types_default().arrayOf((external_prop_types_default()).object)])
|
|
104981
|
+
}), external_prop_types_default().arrayOf((external_prop_types_default()).object)]),
|
|
104982
|
+
logo: external_prop_types_default().shape({
|
|
104983
|
+
logo: (external_prop_types_default()).string,
|
|
104984
|
+
logoAlt: (external_prop_types_default()).string,
|
|
104985
|
+
href: (external_prop_types_default()).string,
|
|
104986
|
+
showLogo: (external_prop_types_default()).bool,
|
|
104987
|
+
size: external_prop_types_default().oneOf(["Small", "Medium", "Large"]),
|
|
104988
|
+
$: (external_prop_types_default()).object
|
|
104989
|
+
})
|
|
104484
104990
|
};
|
|
104485
104991
|
;// ./src/components/header/HeaderView.jsx
|
|
104486
104992
|
function HeaderView_slicedToArray(r, e) { return HeaderView_arrayWithHoles(r) || HeaderView_iterableToArrayLimit(r, e) || HeaderView_unsupportedIterableToArray(r, e) || HeaderView_nonIterableRest(); }
|
|
@@ -104512,6 +105018,14 @@ var DEFAULT_LOGO = {
|
|
|
104512
105018
|
var DEFAULT_LOCALE = {
|
|
104513
105019
|
control_label: "USD | English"
|
|
104514
105020
|
};
|
|
105021
|
+
var DEFAULT_MARKET_SELECTOR = {
|
|
105022
|
+
show: true,
|
|
105023
|
+
regions: [],
|
|
105024
|
+
select_your_market_language_text: "Select Your Market/Language",
|
|
105025
|
+
remember_region_text: "Remember My Selection",
|
|
105026
|
+
cancel_text: "Cancel",
|
|
105027
|
+
control_label: DEFAULT_LOCALE.control_label
|
|
105028
|
+
};
|
|
104515
105029
|
var DEFAULT_LOYALTY = {
|
|
104516
105030
|
link_label: "Nu Skin Rewards",
|
|
104517
105031
|
href: "/rewards"
|
|
@@ -104589,6 +105103,7 @@ function HeaderView(_ref) {
|
|
|
104589
105103
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
104590
105104
|
isMobileMenuOpen = _useState2[0],
|
|
104591
105105
|
setIsMobileMenuOpen = _useState2[1];
|
|
105106
|
+
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
104592
105107
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
104593
105108
|
var localeData = (_headerEntry$locale_s = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale_selector) !== null && _headerEntry$locale_s !== void 0 ? _headerEntry$locale_s : DEFAULT_LOCALE;
|
|
104594
105109
|
var loyaltyData = (_headerEntry$loyalty = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.loyalty) !== null && _headerEntry$loyalty !== void 0 ? _headerEntry$loyalty : DEFAULT_LOYALTY;
|
|
@@ -104597,7 +105112,7 @@ function HeaderView(_ref) {
|
|
|
104597
105112
|
var searchData = (_headerEntry$search = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.search) !== null && _headerEntry$search !== void 0 ? _headerEntry$search : DEFAULT_SEARCH;
|
|
104598
105113
|
var topRibbonLinks = (_headerEntry$top_ribb = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.top_ribbon_links) !== null && _headerEntry$top_ribb !== void 0 ? _headerEntry$top_ribb : DEFAULT_TOP_RIBBON_LINKS;
|
|
104599
105114
|
var navigationData = (_headerEntry$navigati = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.navigation) !== null && _headerEntry$navigati !== void 0 ? _headerEntry$navigati : DEFAULT_NAVIGATION;
|
|
104600
|
-
var marketSelector = (_headerEntry$market_s = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.market_selector) !== null && _headerEntry$market_s !== void 0 ? _headerEntry$market_s :
|
|
105115
|
+
var marketSelector = (_headerEntry$market_s = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.market_selector) !== null && _headerEntry$market_s !== void 0 ? _headerEntry$market_s : DEFAULT_MARKET_SELECTOR;
|
|
104601
105116
|
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(HeaderRoot, {
|
|
104602
105117
|
"data-testid": "header-view",
|
|
104603
105118
|
"data-country": country,
|
|
@@ -104638,8 +105153,12 @@ function HeaderView(_ref) {
|
|
|
104638
105153
|
"data-region": "utility-bar",
|
|
104639
105154
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
104640
105155
|
data: marketSelector,
|
|
105156
|
+
logo: logoData,
|
|
104641
105157
|
locale: String((_ref2 = (_headerEntry$locale = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale) !== null && _headerEntry$locale !== void 0 ? _headerEntry$locale : locale) !== null && _ref2 !== void 0 ? _ref2 : "").trim(),
|
|
104642
|
-
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.market_selector__0
|
|
105158
|
+
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.market_selector__0,
|
|
105159
|
+
mobileTriggerMode: "drawerPortal",
|
|
105160
|
+
drawerOpen: isMobileMenuOpen,
|
|
105161
|
+
drawerTriggerMountRef: mobileMarketTriggerMountRef
|
|
104643
105162
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
104644
105163
|
data: loyaltyData
|
|
104645
105164
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
@@ -104665,7 +105184,8 @@ function HeaderView(_ref) {
|
|
|
104665
105184
|
logoData: logoData,
|
|
104666
105185
|
localeData: localeData,
|
|
104667
105186
|
navigationData: navigationData,
|
|
104668
|
-
loyaltyData: loyaltyData
|
|
105187
|
+
loyaltyData: loyaltyData,
|
|
105188
|
+
marketTriggerMountRef: mobileMarketTriggerMountRef
|
|
104669
105189
|
})]
|
|
104670
105190
|
});
|
|
104671
105191
|
}
|